Skip to content

Commit 7fab957

Browse files
fix(overmind-devtools): fix derived path in flush indication
1 parent f94ddc5 commit 7fab957

File tree

4 files changed

+4
-69
lines changed

4 files changed

+4
-69
lines changed

packages/node_modules/overmind-devtools/src/overmind/operators.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ export const updateFlushWithDerived: () => Operator<DirtyDerivedMessage> = () =>
177177
mutate(({ state }, message) => {
178178
ensureFlushExists(state.apps[message.appName].flushes, message.data)
179179
state.apps[message.appName].flushes[message.data.flushId].derived.push(
180-
message.data.path
180+
message.data.derivedPath
181181
)
182182
})
183183

packages/node_modules/overmind-devtools/src/overmind/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@ export type DirtyDerivedMessage = AppMessage<{
275275
paths: string[]
276276
updateCount: number
277277
value: any
278+
derivedPath: string
278279
}>
279280

280281
export type StartActionMessage = AppMessage<{
Lines changed: 2 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
1-
import {
2-
Action,
3-
pipe,
4-
mutate,
5-
filter,
6-
debounce,
7-
Operator,
8-
when,
9-
fork,
10-
parallel,
11-
catchError,
12-
map,
13-
} from 'overmind'
14-
import { Page, RouteContext, GuideParams, VideoParams } from './types'
1+
import { Action, pipe, debounce, Operator } from 'overmind'
2+
import { RouteContext, GuideParams, VideoParams } from './types'
153
import * as o from './operators'
164

175
export const openHome: Operator<RouteContext> = pipe(
@@ -71,55 +59,3 @@ export const changeQuery: Operator<string> = pipe(
7159
export const viewHelpGotIt: Action = ({ state }) => {
7260
state.showViewHelp = false
7361
}
74-
75-
export const test: Operator<string> = pipe(
76-
mutate(function setArray({ state }) {
77-
state.test = []
78-
state.test.push('foo')
79-
}),
80-
when(
81-
function isTrue() {
82-
return true
83-
},
84-
{
85-
true: pipe(
86-
map(function truePath({ state }) {
87-
return 'truePath'
88-
}),
89-
map(function truePath2({ state }) {
90-
return 'truePath2'
91-
}),
92-
fork(() => 'foo', {
93-
foo: pipe(
94-
map(function fooPath({ state }) {
95-
return 'fooPath'
96-
}),
97-
map(function fooPath2() {
98-
return 'fooPath2'
99-
})
100-
),
101-
})
102-
),
103-
false: mutate(function falsePath() {}),
104-
}
105-
),
106-
filter(() => false),
107-
parallel(
108-
pipe(
109-
map(function pa1({ state }, val) {
110-
console.log('VAL', val)
111-
return 'pa1'
112-
}),
113-
map(function pa2({ state }) {
114-
return 'pa2'
115-
})
116-
),
117-
map(function endStuff({ state }) {
118-
return 'endStuff'
119-
})
120-
),
121-
catchError(function catchError() {
122-
console.log('NOW I RUN CATCH!')
123-
return 'hihi'
124-
})
125-
)

packages/overmind-website/src/overmind/state.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ type State = {
3232
versions: {
3333
[name: string]: string
3434
}
35-
test: string[]
3635
}
3736

3837
const state: State = {
@@ -56,7 +55,6 @@ const state: State = {
5655
isLoadingVideos: false,
5756
showViewHelp: false,
5857
versions: {},
59-
test: [],
6058
}
6159

6260
export default state

0 commit comments

Comments
 (0)