jssm 5.76.0 → 5.77.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +44 -42
- package/README.md +2 -2
- package/dist/es6/jssm.d.ts +42 -2
- package/dist/es6/jssm.js +46 -2
- package/dist/es6/version.js +1 -1
- package/dist/jssm.es5.cjs.js +1 -1
- package/dist/jssm.es5.iife.js +1 -1
- package/jssm.d.ts +42 -2
- package/package.json +2 -2
- package/rollup.config.deno.js +45 -0
- package/typedoc-options.js +1 -1
package/jssm.d.ts
CHANGED
|
@@ -665,7 +665,7 @@ declare class Machine<mDT> {
|
|
|
665
665
|
set history_length(to: number);
|
|
666
666
|
/********
|
|
667
667
|
*
|
|
668
|
-
* Instruct the machine to complete an action.
|
|
668
|
+
* Instruct the machine to complete an action. Synonym for {@link do}.
|
|
669
669
|
*
|
|
670
670
|
* ```typescript
|
|
671
671
|
* const light = sm`red 'next' -> green 'next' -> yellow 'next' -> red; [red yellow green] 'shutdown' ~> off 'start' -> red;`;
|
|
@@ -685,7 +685,27 @@ declare class Machine<mDT> {
|
|
|
685
685
|
action(actionName: StateType, newData?: mDT): boolean;
|
|
686
686
|
/********
|
|
687
687
|
*
|
|
688
|
-
* Instruct the machine to complete
|
|
688
|
+
* Instruct the machine to complete an action. Synonym for {@link action}.
|
|
689
|
+
*
|
|
690
|
+
* ```typescript
|
|
691
|
+
* const light = sm`red 'next' -> green 'next' -> yellow 'next' -> red; [red yellow green] 'shutdown' ~> off 'start' -> red;`;
|
|
692
|
+
*
|
|
693
|
+
* light.state(); // 'red'
|
|
694
|
+
* light.do('next'); // true
|
|
695
|
+
* light.state(); // 'green'
|
|
696
|
+
* ```
|
|
697
|
+
*
|
|
698
|
+
* @typeparam mDT The type of the machine data member; usually omitted
|
|
699
|
+
*
|
|
700
|
+
* @param actionName The action to engage
|
|
701
|
+
*
|
|
702
|
+
* @param newData The data change to insert during the action
|
|
703
|
+
*
|
|
704
|
+
*/
|
|
705
|
+
do(actionName: StateType, newData?: mDT): boolean;
|
|
706
|
+
/********
|
|
707
|
+
*
|
|
708
|
+
* Instruct the machine to complete a transition. Synonym for {@link go}.
|
|
689
709
|
*
|
|
690
710
|
* ```typescript
|
|
691
711
|
* const light = sm`red -> green -> yellow -> red; [red yellow green] 'shutdown' ~> off 'start' -> red;`;
|
|
@@ -703,6 +723,26 @@ declare class Machine<mDT> {
|
|
|
703
723
|
*
|
|
704
724
|
*/
|
|
705
725
|
transition(newState: StateType, newData?: mDT): boolean;
|
|
726
|
+
/********
|
|
727
|
+
*
|
|
728
|
+
* Instruct the machine to complete a transition. Synonym for {@link transition}.
|
|
729
|
+
*
|
|
730
|
+
* ```typescript
|
|
731
|
+
* const light = sm`red -> green -> yellow -> red; [red yellow green] 'shutdown' ~> off 'start' -> red;`;
|
|
732
|
+
*
|
|
733
|
+
* light.state(); // 'red'
|
|
734
|
+
* light.go('green'); // true
|
|
735
|
+
* light.state(); // 'green'
|
|
736
|
+
* ```
|
|
737
|
+
*
|
|
738
|
+
* @typeparam mDT The type of the machine data member; usually omitted
|
|
739
|
+
*
|
|
740
|
+
* @param newState The state to switch to
|
|
741
|
+
*
|
|
742
|
+
* @param newData The data change to insert during the transition
|
|
743
|
+
*
|
|
744
|
+
*/
|
|
745
|
+
go(newState: StateType, newData?: mDT): boolean;
|
|
706
746
|
/********
|
|
707
747
|
*
|
|
708
748
|
* Instruct the machine to complete a forced transition (which will reject if
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jssm",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.77.1",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=10.0.0"
|
|
6
6
|
},
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"@typescript-eslint/eslint-plugin": "^5.30.4",
|
|
109
109
|
"@typescript-eslint/parser": "^5.30.4",
|
|
110
110
|
"benny": "^3.7.1",
|
|
111
|
-
"cloc": "^2.
|
|
111
|
+
"cloc": "^2.10.0",
|
|
112
112
|
"coveralls": "^3.0.11",
|
|
113
113
|
"eslint": "^7.32.0",
|
|
114
114
|
"eslint-plugin-fp": "^2.3.0",
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
|
|
2
|
+
import nodeResolve from '@rollup/plugin-node-resolve';
|
|
3
|
+
import commonjs from '@rollup/plugin-commonjs';
|
|
4
|
+
import replace from '@rollup/plugin-replace';
|
|
5
|
+
|
|
6
|
+
const pkg = require('./package.json');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
const config = {
|
|
12
|
+
|
|
13
|
+
input: 'dist/es6/jssm.js',
|
|
14
|
+
|
|
15
|
+
output: {
|
|
16
|
+
file : 'dist/deno/jssm.deno-esm.js',
|
|
17
|
+
format : 'esm',
|
|
18
|
+
name : 'jssm'
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
plugins : [
|
|
22
|
+
|
|
23
|
+
nodeResolve({
|
|
24
|
+
mainFields : ['module', 'main'],
|
|
25
|
+
browser : true,
|
|
26
|
+
extensions : [ '.js', '.json', '.ts', '.tsx' ],
|
|
27
|
+
preferBuiltins : false
|
|
28
|
+
}),
|
|
29
|
+
|
|
30
|
+
commonjs(),
|
|
31
|
+
|
|
32
|
+
replace({
|
|
33
|
+
preventAssignment : true,
|
|
34
|
+
'process.env.NODE_ENV' : JSON.stringify( 'production' )
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
]
|
|
38
|
+
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
export default config;
|
package/typedoc-options.js
CHANGED
|
@@ -27,7 +27,7 @@ module.exports = {
|
|
|
27
27
|
{ title: 'Node', source: 'todo.md' },
|
|
28
28
|
{ title: 'Typescript', source: 'todo.md' },
|
|
29
29
|
{ title: 'The browser', source: 'todo.md' },
|
|
30
|
-
|
|
30
|
+
// { title: 'Deno', source: 'todo.md' },
|
|
31
31
|
{ title: 'AWS Lambda', source: 'todo.md' },
|
|
32
32
|
{ title: 'SQL', source: 'todo.md' },
|
|
33
33
|
] },
|