Skip to content

Commit

Permalink
fixing coverage, es6 package.json surgery
Browse files Browse the repository at this point in the history
  • Loading branch information
StoneCypher committed Feb 1, 2020
1 parent 76352f8 commit 7f6f597
Show file tree
Hide file tree
Showing 22 changed files with 16,043 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .nycrc
@@ -1,5 +1,6 @@
{
"exclude": [
"src/js/jssm-dot.js"
"src/js/jssm-dot.js",
"build/**/*"
]
}
1 change: 1 addition & 0 deletions CHANGELOG.md
@@ -1,3 +1,4 @@
* [[`76352f8fc8`](https://github.com/StoneCypher/jssm/commit/76352f8fc8)] - inversion appears to work (John Haugeland)
* [[`a3ebea3dc6`](https://github.com/StoneCypher/jssm/commit/a3ebea3dc6)] - geohot's bug confirmed. typescript now building independently on stricter config (John Haugeland)
* [[`c7335a9e99`](https://github.com/StoneCypher/jssm/commit/c7335a9e99)] - simple guards on non-states for is\_unenterable and state\_is\_terminal (John Haugeland)
* [[`cc39df41a5`](https://github.com/StoneCypher/jssm/commit/cc39df41a5)] - Merge pull request #397 from StoneCypher/ArrangeStartAndEnd (John Haugeland)
Expand Down
6 changes: 6 additions & 0 deletions dist/es6/jssm-dot.d.ts
@@ -0,0 +1,6 @@
declare function peg$SyntaxError(message: any, expected: any, found: any, location: any): void;
declare namespace peg$SyntaxError {
var buildMessage: (expected: any, found: any) => string;
}
declare function peg$parse(input: any, options: any): any;
export { peg$SyntaxError as SyntaxError, peg$parse as parse };
15,052 changes: 15,052 additions & 0 deletions dist/es6/jssm-dot.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/es6/jssm-dot.js.map

Large diffs are not rendered by default.

99 changes: 99 additions & 0 deletions dist/es6/jssm.d.ts
@@ -0,0 +1,99 @@
declare type StateType = string;
import { JssmGenericState, JssmGenericConfig, JssmTransition, JssmTransitionList, JssmMachineInternalState, JssmParseTree, JssmStateDeclaration, JssmArrow, JssmArrowDirection, JssmArrowKind, JssmLayout, FslDirection, FslTheme } from './jssm_types';
import { seq, weighted_rand_select, weighted_sample_select, histograph, weighted_histo_key } from './jssm_util';
import { parse } from './jssm-dot';
import { version } from './version';
declare function arrow_direction(arrow: JssmArrow): JssmArrowDirection;
declare function arrow_left_kind(arrow: JssmArrow): JssmArrowKind;
declare function arrow_right_kind(arrow: JssmArrow): JssmArrowKind;
declare function compile<mDT>(tree: JssmParseTree): JssmGenericConfig<mDT>;
declare function make<mDT>(plan: string): JssmGenericConfig<mDT>;
declare function transfer_state_properties(state_decl: JssmStateDeclaration): JssmStateDeclaration;
declare class Machine<mDT> {
_state: StateType;
_states: Map<StateType, JssmGenericState>;
_edges: Array<JssmTransition<mDT>>;
_edge_map: Map<StateType, Map<StateType, number>>;
_named_transitions: Map<StateType, number>;
_actions: Map<StateType, Map<StateType, number>>;
_reverse_actions: Map<StateType, Map<StateType, number>>;
_reverse_action_targets: Map<StateType, Map<StateType, number>>;
_machine_author?: Array<string>;
_machine_comment?: string;
_machine_contributor?: Array<string>;
_machine_definition?: string;
_machine_language?: string;
_machine_license?: string;
_machine_name?: string;
_machine_version?: string;
_fsl_version?: string;
_raw_state_declaration?: Array<Object>;
_state_declarations: Map<StateType, JssmStateDeclaration>;
_graph_layout: JssmLayout;
_dot_preamble: string;
_arrange_declaration: Array<Array<StateType>>;
_arrange_start_declaration: Array<Array<StateType>>;
_arrange_end_declaration: Array<Array<StateType>>;
_theme: FslTheme;
_flow: FslDirection;
constructor({ start_states, complete, transitions, machine_author, machine_comment, machine_contributor, machine_definition, machine_language, machine_license, machine_name, machine_version, state_declaration, fsl_version, dot_preamble, arrange_declaration, arrange_start_declaration, arrange_end_declaration, theme, flow, graph_layout }: JssmGenericConfig<mDT>);
_new_state(state_config: JssmGenericState): StateType;
state(): StateType;
state_is_final(whichState: StateType): boolean;
is_final(): boolean;
graph_layout(): string;
dot_preamble(): string;
machine_author(): Array<string>;
machine_comment(): string;
machine_contributor(): Array<string>;
machine_definition(): string;
machine_language(): string;
machine_license(): string;
machine_name(): string;
machine_version(): string;
raw_state_declarations(): Array<Object>;
state_declaration(which: StateType): JssmStateDeclaration;
state_declarations(): Map<StateType, Object>;
fsl_version(): string;
machine_state(): JssmMachineInternalState<mDT>;
states(): Array<StateType>;
state_for(whichState: StateType): JssmGenericState;
has_state(whichState: StateType): boolean;
list_edges(): Array<JssmTransition<mDT>>;
list_named_transitions(): Map<StateType, number>;
list_actions(): Array<StateType>;
theme(): FslTheme;
flow(): FslDirection;
get_transition_by_state_names(from: StateType, to: StateType): number;
lookup_transition_for(from: StateType, to: StateType): JssmTransition<mDT>;
list_transitions(whichState?: StateType): JssmTransitionList;
list_entrances(whichState?: StateType): Array<StateType>;
list_exits(whichState?: StateType): Array<StateType>;
probable_exits_for(whichState: StateType): Array<JssmTransition<mDT>>;
probabilistic_transition(): boolean;
probabilistic_walk(n: number): Array<StateType>;
probabilistic_histo_walk(n: number): Map<StateType, number>;
actions(whichState?: StateType): Array<StateType>;
list_states_having_action(whichState: StateType): Array<StateType>;
list_exit_actions(whichState?: StateType): Array<StateType>;
probable_action_exits(whichState?: StateType): Array<any>;
is_unenterable(whichState: StateType): boolean;
has_unenterables(): boolean;
is_terminal(): boolean;
state_is_terminal(whichState: StateType): boolean;
has_terminals(): boolean;
is_complete(): boolean;
state_is_complete(whichState: StateType): boolean;
has_completes(): boolean;
action(name: StateType, newData?: mDT): boolean;
transition(newState: StateType, newData?: mDT): boolean;
force_transition(newState: StateType, newData?: mDT): boolean;
current_action_for(action: StateType): number;
current_action_edge_for(action: StateType): JssmTransition<mDT>;
valid_action(action: StateType, _newData?: mDT): boolean;
valid_transition(newState: StateType, _newData?: mDT): boolean;
valid_force_transition(newState: StateType, _newData?: mDT): boolean;
sm(template_strings: Array<string>, ...remainder: any[]): Machine<mDT>;
}
declare function sm<mDT>(template_strings: Array<string>, ...remainder: any[]): Machine<mDT>;
export { version, transfer_state_properties, Machine, make, parse, compile, sm, arrow_direction, arrow_left_kind, arrow_right_kind, seq, weighted_rand_select, histograph, weighted_sample_select, weighted_histo_key };

0 comments on commit 7f6f597

Please sign in to comment.