Comparing version 0.5.6 to 0.6.0
import { Observable } from 'rxjs'; | ||
import { ITextMatch } from './Text'; | ||
import { IRule, Matcher, Handler } from './Rules'; | ||
import { IRule, Handler } from './Rules'; | ||
export interface LuisIntent { | ||
@@ -26,7 +26,6 @@ intent: string; | ||
} | ||
export interface LuisRule<M extends ITextMatch> { | ||
intent: string; | ||
handler: Handler<M & ILuisMatch>; | ||
export interface LuisRules<M> { | ||
[intent: string]: Handler<M & ILuisMatch> | IRule<M & ILuisMatch>; | ||
} | ||
export declare class LuisModel<M extends ITextMatch> { | ||
export declare class LuisModel { | ||
private scoreThreshold; | ||
@@ -38,9 +37,8 @@ private cache; | ||
call(utterance: string): Observable<LuisResponse>; | ||
match: Matcher<M, M & { | ||
match<M extends ITextMatch = any>(match: M): Observable<M & { | ||
luisResponse: LuisResponse; | ||
}>; | ||
rule(intent: string, handler: Handler<M & ILuisMatch>): LuisRule<M>; | ||
best(...luisRules: LuisRule<M>[]): IRule<M>; | ||
best<M extends ITextMatch = any>(luisRules: LuisRules<M>): IRule<M>; | ||
static findEntity(entities: LuisEntity[], type: string): LuisEntity[]; | ||
static entityValues(entities: LuisEntity[], type: string): string[]; | ||
} |
@@ -31,3 +31,2 @@ "use strict"; | ||
if (scoreThreshold === void 0) { scoreThreshold = 0.5; } | ||
var _this = this; | ||
this.scoreThreshold = scoreThreshold; | ||
@@ -109,8 +108,2 @@ this.cache = {}; | ||
}; | ||
this.match = function (match) { | ||
return _this.call(match.text) | ||
.filter(function (luisResponse) { return luisResponse.topScoringIntent.score >= _this.scoreThreshold; }) | ||
.map(function (luisResponse) { return (__assign({}, match, { luisResponse: __assign({}, luisResponse, { intents: (luisResponse.intents || luisResponse.topScoringIntent && [luisResponse.topScoringIntent]) | ||
.filter(function (luisIntent) { return luisIntent.score >= _this.scoreThreshold; }) }) })); }); | ||
}; | ||
this.url = | ||
@@ -139,7 +132,8 @@ id === 'id' && key === 'key' ? 'testData' : | ||
}; | ||
LuisModel.prototype.rule = function (intent, handler) { | ||
return ({ | ||
intent: intent, | ||
handler: handler | ||
}); | ||
LuisModel.prototype.match = function (match) { | ||
var _this = this; | ||
return this.call(match.text) | ||
.filter(function (luisResponse) { return luisResponse.topScoringIntent.score >= _this.scoreThreshold; }) | ||
.map(function (luisResponse) { return (__assign({}, match, { luisResponse: __assign({}, luisResponse, { intents: (luisResponse.intents || luisResponse.topScoringIntent && [luisResponse.topScoringIntent]) | ||
.filter(function (luisIntent) { return luisIntent.score >= _this.scoreThreshold; }) }) })); }); | ||
}; | ||
@@ -162,10 +156,6 @@ // "classic" LUIS usage - for a given model, say what to do with each intent above a given threshold | ||
// luis.rule('intent2', handler2) | ||
// ).prepend(luis.model()) | ||
LuisModel.prototype.best = function () { | ||
// ).prependMatcher(luis.model()) | ||
LuisModel.prototype.best = function (luisRules) { | ||
var _this = this; | ||
var luisRules = []; | ||
for (var _i = 0; _i < arguments.length; _i++) { | ||
luisRules[_i] = arguments[_i]; | ||
} | ||
return new (BestMatchingLuisRule.bind.apply(BestMatchingLuisRule, [void 0, function (match) { return _this.match(match); }].concat(luisRules)))(); | ||
return new BestMatchingLuisRule(function (match) { return _this.match(match); }, luisRules); | ||
}; | ||
@@ -185,7 +175,3 @@ LuisModel.findEntity = function (entities, type) { | ||
__extends(BestMatchingLuisRule, _super); | ||
function BestMatchingLuisRule(matchModel) { | ||
var luisRules = []; | ||
for (var _i = 1; _i < arguments.length; _i++) { | ||
luisRules[_i - 1] = arguments[_i]; | ||
} | ||
function BestMatchingLuisRule(matchModel, luisRules) { | ||
var _this = _super.call(this) || this; | ||
@@ -202,8 +188,7 @@ _this.matchModel = matchModel; | ||
.flatMap(function (luisIntent) { | ||
return rxjs_1.Observable.of(_this.luisRules.find(function (luisRule) { return luisRule.intent === luisIntent.intent; })) | ||
.filter(function (luisRule) { return !!luisRule; }) | ||
.map(function (luisRule) { return ({ | ||
score: luisIntent.score, | ||
action: function () { return luisRule.handler(__assign({}, m, entityFields(m.luisResponse.entities))); } | ||
}); }); | ||
return rxjs_1.Observable.of(_this.luisRules[luisIntent.intent]) | ||
.filter(function (rule) { return !!rule; }) | ||
.flatMap(function (rule) { | ||
return Rules_1.ruleize(rule).tryMatch(__assign({}, match, { score: luisIntent.score }, entityFields(m.luisResponse.entities))); | ||
}); | ||
}, 1) | ||
@@ -210,0 +195,0 @@ .take(1); |
@@ -6,5 +6,3 @@ import { ITextMatch } from './Text'; | ||
} | ||
export declare const RegExpHelpers: <M extends ITextMatch>() => { | ||
matchRegExp: (intents: RegExp | RegExp[]) => Matcher<M, M & IRegExpMatch>; | ||
re: (intents: RegExp | RegExp[], handler: Handler<M & IRegExpMatch>) => IRule<M>; | ||
}; | ||
export declare const matchRegExp: <M extends ITextMatch = any>(intents: RegExp | RegExp[]) => Matcher<M, M & IRegExpMatch>; | ||
export declare const re: <M extends ITextMatch = any>(intents: RegExp | RegExp[], handler: Handler<M & IRegExpMatch>) => IRule<M>; |
@@ -13,26 +13,19 @@ "use strict"; | ||
var Rules_1 = require("./Rules"); | ||
exports.RegExpHelpers = function () { | ||
// helpers are first defined as local variables so that they can call each other if necessary | ||
var matchRegExp = function (intents) { | ||
return function (match) { | ||
return rxjs_1.Observable.from(Rules_1.arrayize(intents)) | ||
.do(function (_) { return console.log("RegExp.match matching", match); }) | ||
.map(function (regexp) { return regexp.exec(match.text); }) | ||
.do(function (groups) { return console.log("RegExp.match result", groups); }) | ||
.filter(function (groups) { return groups && groups[0] === match.text; }) | ||
.take(1) | ||
.do(function (groups) { return console.log("RegExp.match returning", groups); }) | ||
.map(function (groups) { return (__assign({}, match, { // remove "as any" when TypeScript fixes this bug, | ||
groups: groups })); }); | ||
}; | ||
exports.matchRegExp = function (intents) { | ||
return function (match) { | ||
return rxjs_1.Observable.from(Rules_1.arrayize(intents)) | ||
.do(function (_) { return console.log("RegExp.match matching", match); }) | ||
.map(function (regexp) { return regexp.exec(match.text); }) | ||
.do(function (groups) { return console.log("RegExp.match result", groups); }) | ||
.filter(function (groups) { return groups && groups[0] === match.text; }) | ||
.take(1) | ||
.do(function (groups) { return console.log("RegExp.match returning", groups); }) | ||
.map(function (groups) { return (__assign({}, match, { // remove "as any" when TypeScript fixes this bug, | ||
groups: groups })); }); | ||
}; | ||
// Either call as re(intent, action) or re([intent, intent, ...], action) | ||
var re = function (intents, handler) { | ||
return new Rules_1.SimpleRule(matchRegExp(intents), handler); | ||
}; | ||
return { | ||
matchRegExp: matchRegExp, | ||
re: re | ||
}; | ||
}; | ||
// Either call as re(intent, action) or re([intent, intent, ...], action) | ||
exports.re = function (intents, handler) { | ||
return new Rules_1.SimpleRule(exports.matchRegExp(intents), handler); | ||
}; | ||
//# sourceMappingURL=RegExp.js.map |
@@ -10,12 +10,15 @@ import { Observable } from 'rxjs'; | ||
} | ||
export interface IRule<M extends Match = Match> { | ||
export interface IRule<M extends Match = any> { | ||
tryMatch(match: M): Observable<RuleResult>; | ||
callHandlerIfMatch(match: M): Observable<any>; | ||
prependMatcher<L extends Match>(matcher: Matcher<L, M>): IRule<L>; | ||
prependMatcher<L extends Match = any>(matcher: Matcher<L, M>): IRule<L>; | ||
} | ||
export declare type Matcher<A extends Match = Match, Z extends Match = Match> = (match: A) => Observizeable<Z>; | ||
export declare type Handler<Z extends Match = Match> = (match: Z) => Observizeable<any>; | ||
export declare type Matcher<A extends Match = any, Z extends Match = any> = (match: A) => Observizeable<Z>; | ||
export declare type Handler<Z extends Match = any> = (match: Z) => Observizeable<any>; | ||
export declare const arrayize: <T>(stuff: T | T[]) => T[]; | ||
export declare const observize: <T>(t: Observizeable<T>) => Observable<T>; | ||
export declare abstract class BaseRule<M extends Match> implements IRule<M> { | ||
export declare function isRule<M>(r: IRule<M> | Handler<M>): r is IRule<M>; | ||
export declare const ruleize: <M extends Match = any>(r: IRule<M> | Handler<M>) => IRule<M>; | ||
export declare const matchize: <M extends Match = any>(matcher: Matcher<M, any>, match: M) => Observable<any>; | ||
export declare abstract class BaseRule<M extends Match = any> implements IRule<M> { | ||
abstract tryMatch(match: M): Observable<RuleResult>; | ||
@@ -25,20 +28,20 @@ callHandlerIfMatch(match: M): Observable<any>; | ||
} | ||
export declare function combineMatchers<M extends Match, N extends Match>(m1: Matcher<M, N>): Matcher<M, N>; | ||
export declare function combineMatchers<M extends Match, N extends Match, O extends Match>(m1: Matcher<M, N>, m2: Matcher<N, O>): Matcher<M, O>; | ||
export declare function combineMatchers<M extends Match, N extends Match, O extends Match, P extends Match>(m1: Matcher<M, N>, m2: Matcher<N, O>, m3: Matcher<O, P>): Matcher<M, P>; | ||
export declare function combineMatchers<M extends Match, N extends Match, O extends Match, P extends Match, Q extends Match>(m1: Matcher<M, N>, m2: Matcher<N, O>, m3: Matcher<O, P>, m4: Matcher<P, Q>): Matcher<M, Q>; | ||
export declare function combineMatchers<M extends Match>(...matchers: Matcher[]): Matcher<M, any>; | ||
export declare class SimpleRule<M extends Match> extends BaseRule<M> { | ||
export declare function combineMatchers<M extends Match = any, N extends Match = any>(m1: Matcher<M, N>): Matcher<M, N>; | ||
export declare function combineMatchers<M extends Match = any, N extends Match = any, O extends Match = any>(m1: Matcher<M, N>, m2: Matcher<N, O>): Matcher<M, O>; | ||
export declare function combineMatchers<M extends Match = any, N extends Match = any, O extends Match = any, P extends Match = any>(m1: Matcher<M, N>, m2: Matcher<N, O>, m3: Matcher<O, P>): Matcher<M, P>; | ||
export declare function combineMatchers<M extends Match = any, N extends Match = any, O extends Match = any, P extends Match = any, Q extends Match = any>(m1: Matcher<M, N>, m2: Matcher<N, O>, m3: Matcher<O, P>, m4: Matcher<P, Q>): Matcher<M, Q>; | ||
export declare function combineMatchers<M extends Match = any>(...matchers: Matcher[]): Matcher<M, any>; | ||
export declare class SimpleRule<M extends Match = any> extends BaseRule<M> { | ||
private matchers; | ||
private handler; | ||
constructor(...args: (Matcher | Handler)[]); | ||
constructor(...args: (Matcher | Predicate | Handler)[]); | ||
tryMatch(match: M): Observable<RuleResult>; | ||
prependMatcher<L extends Match>(matcher: Matcher<L, M>): SimpleRule<L>; | ||
prependMatcher<L extends Match = any>(matcher: Matcher<L, M>): SimpleRule<L>; | ||
} | ||
export declare class FirstMatchingRule<M extends Match> extends BaseRule<M> { | ||
export declare class FirstMatchingRule<M extends Match = any> extends BaseRule<M> { | ||
private rule$; | ||
constructor(...rules: IRule<M>[]); | ||
constructor(...rules: (IRule<M> | Handler<M>)[]); | ||
tryMatch(match: M): Observable<RuleResult>; | ||
} | ||
export declare class RuleWithPrependedMatcher<L extends Match, M extends Match> extends BaseRule<L> { | ||
export declare class RuleWithPrependedMatcher<L extends Match = any, M extends Match = any> extends BaseRule<L> { | ||
private matcher; | ||
@@ -49,3 +52,3 @@ private rule; | ||
} | ||
export declare class RunRule<M extends Match> extends BaseRule<M> { | ||
export declare class RunRule<M extends Match = any> extends BaseRule<M> { | ||
private handler; | ||
@@ -55,30 +58,19 @@ constructor(handler: Handler<M>); | ||
} | ||
export interface Predicate<M extends Match> { | ||
export interface Predicate<M extends Match = any> { | ||
(match: M): Observizeable<boolean>; | ||
} | ||
export interface Predicates<M extends Match> { | ||
[name: string]: Predicate<M>; | ||
} | ||
export declare const Helpers: <M extends Match>() => { | ||
rule: { | ||
(handler: Handler<M>): any; | ||
<Z extends Match>(m1: Matcher<M, Z>, handler: Handler<Z>): any; | ||
<N extends Match, Z extends Match>(m1: Matcher<M, N>, m2: Matcher<N, Z>, handler: Handler<Z>): any; | ||
<N extends Match, O extends Match, Z extends Match>(m1: Matcher<M, N>, m2: Matcher<N, O>, m3: Matcher<O, Z>, handler: Handler<Z>): any; | ||
<N extends Match, O extends Match, P extends Match, Z extends Match>(m1: Matcher<M, N>, m2: Matcher<N, O>, m3: Matcher<O, Z>, m4: Matcher<P, Z>, handler: Handler<Z>): any; | ||
<N extends Match, O extends Match, P extends Match, Q extends Match, Z extends Match>(m1: Matcher<M, N>, m2: Matcher<N, O>, m3: Matcher<O, Z>, m4: Matcher<P, Q>, m5: Matcher<Q, Z>, handler: Handler<Z>): any; | ||
}; | ||
first: (...rules: IRule<M>[]) => IRule<M>; | ||
run: (handler: Handler<M>) => IRule<M>; | ||
matchAlways: (match: M) => M; | ||
matchPredicate: (predicate: Predicate<M>) => (match: any) => Observable<any>; | ||
filter: (predicate: Predicate<M>, rule: IRule<M>) => IRule<M>; | ||
prepend: { | ||
<L extends Match>(m1: Matcher<L, M>, rule: IRule<M>): IRule<L>; | ||
<K extends Match, L extends Match>(m1: Matcher<K, L>, m2: Matcher<L, M>, rule: IRule<M>): IRule<K>; | ||
<J extends Match, K extends Match, L extends Match>(m1: Matcher<J, K>, m2: Matcher<K, L>, m3: Matcher<L, M>, rule: IRule<M>): IRule<J>; | ||
<I extends Match, J extends Match, K extends Match, L extends Match>(m1: Matcher<I, J>, m2: Matcher<J, K>, m3: Matcher<K, L>, m4: Matcher<L, M>, rule: IRule<M>): IRule<I>; | ||
<H extends Match, I extends Match, J extends Match, K extends Match, L extends Match>(m1: Matcher<H, I>, m2: Matcher<I, J>, m3: Matcher<J, K>, m4: Matcher<K, L>, m5: Matcher<L, M>, rule: IRule<M>): IRule<H>; | ||
<L extends Match>(m1: Matcher<L, Match>, ...matchers: (Matcher<Match, Match> | IRule<Match>)[]): IRule<L>; | ||
}; | ||
}; | ||
export declare function rule<M extends Match = any>(handler: Handler<M> | IRule<M>): any; | ||
export declare function rule<M extends Match = any>(p1: Predicate<M>, handler: Handler<M> | IRule<M>): IRule<M>; | ||
export declare function rule<M extends Match = any, Z extends Match = any>(m1: Matcher<M, Z>, handler: Handler<Z> | IRule<Z>): IRule<M>; | ||
export declare function rule<M extends Match = any, Z extends Match = any>(p1: Predicate<M>, m2: Matcher<M, Z>, handler: Handler<Z> | IRule<Z>): IRule<M>; | ||
export declare function rule<M extends Match = any, Z extends Match = any>(m1: Matcher<M, Z>, p2: Predicate<Z>, handler: Handler<Z> | IRule<Z>): IRule<M>; | ||
export declare function rule<M extends Match = any, N extends Match = any, Z extends Match = any>(m1: Matcher<M, N>, m2: Matcher<N, Z>, handler: Handler<Z> | IRule<Z>): IRule<M>; | ||
export declare function rule<M extends Match = any, Z extends Match = any>(m1: Matcher<M, Z>, p2: Predicate<Z>, p3: Predicate<Z>, handler: Handler<Z> | IRule<Z>): IRule<M>; | ||
export declare function rule<M extends Match = any, Z extends Match = any>(p1: Matcher<M>, m2: Matcher<M, Z>, p3: Predicate<Z>, handler: Handler<Z> | IRule<Z>): IRule<M>; | ||
export declare function rule<M extends Match = any, Z extends Match = any>(p1: Predicate<M>, p2: Predicate<M>, m3: Matcher<M, Z>, handler: Handler<Z> | IRule<Z>): IRule<M>; | ||
export declare function rule<M extends Match = any, N extends Match = any, Z extends Match = any>(p1: Predicate<M>, m2: Matcher<M, N>, m3: Matcher<N, Z>, handler: Handler<Z> | IRule<Z>): IRule<M>; | ||
export declare function rule<M extends Match = any, N extends Match = any, Z extends Match = any>(m1: Matcher<M, N>, p2: Predicate<N>, m3: Matcher<N, Z>, handler: Handler<Z> | IRule<Z>): IRule<M>; | ||
export declare function rule<M extends Match = any, N extends Match = any, Z extends Match = any>(m1: Matcher<M, N>, m2: Matcher<N, Z>, p3: Predicate<Z>, handler: Handler<Z> | IRule<Z>): IRule<M>; | ||
export declare function rule<M extends Match = any, N extends Match = any, O extends Match = any, Z extends Match = any>(m1: Matcher<M, N>, m2: Matcher<N, O>, m3: Matcher<O, Z>, handler: Handler<Z> | IRule<Z>): IRule<M>; | ||
export declare const first: <M extends Match = any>(...rules: (IRule<M> | Handler<M>)[]) => IRule<M>; | ||
export declare const run: <M extends Match = any>(handler: Handler<M>) => IRule<M>; |
@@ -27,2 +27,16 @@ "use strict"; | ||
}; | ||
function isRule(r) { | ||
return (r.tryMatch !== undefined); | ||
} | ||
exports.isRule = isRule; | ||
exports.ruleize = function (r) { | ||
return isRule(r) ? r : new SimpleRule(r); | ||
}; | ||
exports.matchize = function (matcher, match) { | ||
// we want to allow any matcher to be a predicate (return a boolean) | ||
// if so, the 'falsey' case will be filtered out by observize, | ||
// so we just need to catch the case where it is precisely true | ||
return exports.observize(matcher(match)) | ||
.map(function (m) { return typeof (m) === 'boolean' ? match : m; }); | ||
}; | ||
var BaseRule = (function () { | ||
@@ -55,3 +69,4 @@ function BaseRule() { | ||
console.log("calling matcher #" + i, currentMatcher); | ||
return exports.observize(currentMatcher(prevMatch)).do(function (result) { return console.log("result", result); }); | ||
return exports.matchize(currentMatcher, prevMatch) | ||
.do(function (result) { return console.log("result", result); }); | ||
}); | ||
@@ -84,13 +99,15 @@ }, rxjs_1.Observable.of(match)) | ||
console.log("SimpleRule.tryMatch", this.matchers); | ||
return this.matchers.length | ||
? combineMatchers.apply(void 0, this.matchers)(match) | ||
.do(function (m) { return console.log("match", m); }) | ||
.map(function (m) { return ({ | ||
score: m.score, | ||
action: function () { return _this.handler(m); } | ||
}); }) | ||
: rxjs_1.Observable.of({ | ||
if (this.matchers.length === 0) | ||
return rxjs_1.Observable.of({ | ||
score: match.score, | ||
action: function () { return _this.handler(match); } | ||
}); | ||
return (this.matchers.length === 1 | ||
? exports.matchize(this.matchers[0], match) | ||
: combineMatchers.apply(void 0, this.matchers)(match)) | ||
.do(function (m) { return console.log("match", m); }) | ||
.map(function (m) { return ({ | ||
score: m.score, | ||
action: function () { return _this.handler(m); } | ||
}); }); | ||
}; | ||
@@ -113,3 +130,5 @@ SimpleRule.prototype.prependMatcher = function (matcher) { | ||
console.log("FirstMatchingRule.constructor: rules", rules); | ||
_this.rule$ = rxjs_1.Observable.from(rules).filter(function (rule) { return !!rule; }); | ||
_this.rule$ = rxjs_1.Observable.from(rules) | ||
.filter(function (rule) { return !!rule; }) | ||
.map(function (rule) { return exports.ruleize(rule); }); | ||
return _this; | ||
@@ -141,3 +160,3 @@ } | ||
var _this = this; | ||
return exports.observize(this.matcher(match)) | ||
return exports.matchize(this.matcher, match) | ||
.flatMap(function (m) { return _this.rule.tryMatch(m); }); | ||
@@ -162,46 +181,29 @@ }; | ||
exports.RunRule = RunRule; | ||
exports.Helpers = function () { | ||
// helpers are first defined as local variables so that they can call each other if necessary | ||
function rule() { | ||
var args = []; | ||
for (var _i = 0; _i < arguments.length; _i++) { | ||
args[_i] = arguments[_i]; | ||
} | ||
return new (SimpleRule.bind.apply(SimpleRule, [void 0].concat(args)))(); | ||
function rule() { | ||
var args = []; | ||
for (var _i = 0; _i < arguments.length; _i++) { | ||
args[_i] = arguments[_i]; | ||
} | ||
var first = function () { | ||
var rules = []; | ||
for (var _i = 0; _i < arguments.length; _i++) { | ||
rules[_i] = arguments[_i]; | ||
var ruleOrHandler = args[args.length - 1]; | ||
if (isRule(ruleOrHandler)) { | ||
switch (args.length) { | ||
case 1: | ||
return ruleOrHandler; | ||
case 2: | ||
return ruleOrHandler.prependMatcher(args[0]); | ||
default: | ||
return ruleOrHandler.prependMatcher(combineMatchers.apply(void 0, args.slice(0, args.length - 1))); | ||
} | ||
return new (FirstMatchingRule.bind.apply(FirstMatchingRule, [void 0].concat(rules)))(); | ||
}; | ||
var run = function (handler) { return new RunRule(handler); }; | ||
var matchAlways = function (match) { return match; }; | ||
var matchPredicate = function (predicate) { | ||
return function (match) { | ||
return exports.observize(predicate(match)) | ||
.map(function (_) { return match; }); | ||
}; | ||
}; | ||
var filter = function (predicate, rule) { | ||
return rule.prependMatcher(matchPredicate(predicate)); | ||
}; | ||
function prepend() { | ||
var args = []; | ||
for (var _i = 0; _i < arguments.length; _i++) { | ||
args[_i] = arguments[_i]; | ||
} | ||
return args[args.length - 1].prependMatcher(combineMatchers.apply(void 0, args.slice(0, args.length - 1))); | ||
} | ||
return { | ||
rule: rule, | ||
first: first, | ||
run: run, | ||
matchAlways: matchAlways, | ||
matchPredicate: matchPredicate, | ||
filter: filter, | ||
prepend: prepend, | ||
}; | ||
return new (SimpleRule.bind.apply(SimpleRule, [void 0].concat(args)))(); | ||
} | ||
exports.rule = rule; | ||
exports.first = function () { | ||
var rules = []; | ||
for (var _i = 0; _i < arguments.length; _i++) { | ||
rules[_i] = arguments[_i]; | ||
} | ||
return new (FirstMatchingRule.bind.apply(FirstMatchingRule, [void 0].concat(rules)))(); | ||
}; | ||
exports.run = function (handler) { return new RunRule(handler); }; | ||
//# sourceMappingURL=Rules.js.map |
@@ -1,12 +0,7 @@ | ||
export * from './Rules'; | ||
export * from './rules/LUIS'; | ||
export * from './rules/RegExp'; | ||
export * from './rules/Prompt'; | ||
export * from './recipes/Connectors/WebChat'; | ||
export * from './recipes/Connectors/DirectLine'; | ||
export * from './recipes/Text'; | ||
export * from './recipes/Chat'; | ||
export * from './recipes/State'; | ||
export * from './recipes/ChatState'; | ||
export * from './recipes/Redux'; | ||
export * from './recipes/ReduxChat'; | ||
export * from './core/Rules'; | ||
export * from './core/Text'; | ||
export * from './core/LUIS'; | ||
export * from './core/RegExp'; | ||
export * from './core/State'; | ||
export * from './core/ChatState'; | ||
export * from './core/Prompt'; |
"use strict"; | ||
// Eventually this libary might be factored into multiple libraries/plugins. Until then, this | ||
// file exists as an entry point to the entire thing. | ||
function __export(m) { | ||
@@ -8,15 +6,6 @@ for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
// Core | ||
__export(require("./Rules")); | ||
// Rules | ||
__export(require("./rules/LUIS")); | ||
__export(require("./rules/RegExp")); | ||
__export(require("./rules/Prompt")); | ||
// Chat Connectors | ||
__export(require("./recipes/Connectors/WebChat")); | ||
__export(require("./recipes/Connectors/DirectLine")); | ||
__export(require("./recipes/Chat")); | ||
__export(require("./recipes/Redux")); | ||
__export(require("./recipes/ReduxChat")); | ||
// export * from './recipes/NodeConsole'; | ||
__export(require("./core/Rules")); | ||
__export(require("./core/LUIS")); | ||
__export(require("./core/RegExp")); | ||
__export(require("./core/Prompt")); | ||
//# sourceMappingURL=prague.js.map |
{ | ||
"name": "prague", | ||
"version": "0.5.6", | ||
"repository": { | ||
}, | ||
"version": "0.6.0", | ||
"description": "rules-based app engine", | ||
@@ -15,10 +18,7 @@ "main": "dist/prague.js", | ||
"devDependencies": { | ||
"@types/node": "^7.0.18", | ||
"botframework-directlinejs": "^0.9.6", | ||
"typescript": "^2.3.2" | ||
}, | ||
"dependencies": { | ||
"redux": "^3.6.0", | ||
"rxjs": "^5.3.0" | ||
} | ||
} |
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
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
1
1
110583
48
1727
1
- Removedredux@^3.6.0
- Removedjs-tokens@4.0.0(transitive)
- Removedlodash@4.17.21(transitive)
- Removedlodash-es@4.17.21(transitive)
- Removedloose-envify@1.4.0(transitive)
- Removedredux@3.7.2(transitive)
- Removedsymbol-observable@1.2.0(transitive)