Skip to content

Commit 33c52dd

Browse files
committed
feat(almin): Support Transaction Events
fix #2 #1
1 parent 2a070f3 commit 33c52dd

File tree

3 files changed

+20
-16
lines changed

3 files changed

+20
-16
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
},
3636
"homepage": "https://github.com/almin/almin-devtools",
3737
"devDependencies": {
38-
"almin": "^0.11.0",
38+
"almin": "^0.13.0",
3939
"babel-cli": "^6.23.0",
4040
"babel-preset-jsdoc-to-assert": "^4.0.0",
4141
"babel-preset-latest": "^6.22.0",

src/almin-devtools.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ const contextToDevTools = (alminContext, devTools) => {
4141
alminContext.onChange(() => {
4242
sendDispatched()
4343
});
44+
alminContext.events.onBeginTransaction((payload, meta) => {
45+
devTools.send(`Transaction Begin:${meta.transaction.name}`, alminContext.getState())
46+
});
47+
alminContext.events.onEndTransaction((payload, meta) => {
48+
devTools.send(`Transaction End:${meta.transaction.name}`, alminContext.getState())
49+
});
50+
4451
alminContext.events.onDidExecuteEachUseCase(() => {
4552
sendDispatched();
4653
});

yarn.lock

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,12 @@ ajv@^4.9.1:
2121
co "^4.6.0"
2222
json-stable-stringify "^1.0.1"
2323

24-
almin@^0.11.0:
25-
version "0.11.0"
26-
resolved "https://registry.yarnpkg.com/almin/-/almin-0.11.0.tgz#4bf913559b53cbc685875115bada70a718422f85"
24+
almin@^0.13.0:
25+
version "0.13.11"
26+
resolved "https://registry.yarnpkg.com/almin/-/almin-0.13.11.tgz#953c6efa380d4a9245c3ed05bf8fa4826363635e"
2727
dependencies:
28-
lru-map-like "^1.1.2"
29-
map-like "^1.1.0"
30-
object-assign "^4.1.0"
28+
map-like "^2.0.0"
29+
shallow-equal-object "^1.0.1"
3130

3231
ansi-regex@^2.0.0:
3332
version "2.1.1"
@@ -1374,15 +1373,9 @@ lru-cache@^4.0.1:
13741373
pseudomap "^1.0.2"
13751374
yallist "^2.1.2"
13761375

1377-
lru-map-like@^1.1.2:
1378-
version "1.1.2"
1379-
resolved "https://registry.yarnpkg.com/lru-map-like/-/lru-map-like-1.1.2.tgz#80fa80c512cbfdd2c2d8c5506d82c28439faa666"
1380-
dependencies:
1381-
map-like "^1.0.3"
1382-
1383-
map-like@^1.0.3, map-like@^1.1.0:
1384-
version "1.1.3"
1385-
resolved "https://registry.yarnpkg.com/map-like/-/map-like-1.1.3.tgz#6faaca5339e0cc6567a3a55dd281fd871a39e5da"
1376+
map-like@^2.0.0:
1377+
version "2.0.0"
1378+
resolved "https://registry.yarnpkg.com/map-like/-/map-like-2.0.0.tgz#94496d49ad333c0dc3234b27adbbd1e8535953b4"
13861379

13871380
micromatch@^2.1.5:
13881381
version "2.3.11"
@@ -1818,6 +1811,10 @@ set-immediate-shim@^1.0.1:
18181811
version "1.0.1"
18191812
resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61"
18201813

1814+
shallow-equal-object@^1.0.1:
1815+
version "1.0.1"
1816+
resolved "https://registry.yarnpkg.com/shallow-equal-object/-/shallow-equal-object-1.0.1.tgz#a402410fb4b7c15370ec7e78701e9280f1c1d1e4"
1817+
18211818
shebang-command@^1.2.0:
18221819
version "1.2.0"
18231820
resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea"

0 commit comments

Comments
 (0)