BREAKING CHANGE(core): switch to esm

This commit is contained in:
2022-08-07 11:18:02 +02:00
parent 8b9dec976c
commit 0a8e4a3517
17 changed files with 12813 additions and 902 deletions

8
ts/00_commitinfo_data.ts Normal file
View File

@ -0,0 +1,8 @@
/**
* autocreated commitinfo by @pushrocks/commitinfo
*/
export const commitinfo = {
name: '@pushrocks/smartrule',
version: '2.0.0',
description: 'a smart rule library for handling decision trees.'
}

View File

@ -1 +1 @@
export * from './smartrule.classes.smartrule';
export * from './smartrule.classes.smartrule.js';

View File

@ -1,8 +1,8 @@
import * as plugins from './smartrule.plugins';
import { SmartRule } from './smartrule.classes.smartrule';
import * as plugins from './smartrule.plugins.js';
import { SmartRule } from './smartrule.classes.smartrule.js';
export type TTreeActionResult = 'continue' | 'apply-continue' | 'apply-stop' | 'stop';
export type TActionFunc = (objectArg) => Promise<any>;
export type TActionFunc<T = any> = (objectArg: T) => Promise<any>;
export type TCheckFunc<T> = (objectArg: T) => Promise<TTreeActionResult>;

View File

@ -1,5 +1,5 @@
import * as plugins from './smartrule.plugins';
import { Rule, TCheckFunc, TActionFunc, TTreeActionResult } from './smartrule.classes.rule';
import * as plugins from './smartrule.plugins.js';
import { Rule, TCheckFunc, TActionFunc, TTreeActionResult } from './smartrule.classes.rule.js';
export class SmartRule<T> {
public rules: Array<Rule<T>> = [];