MCPcopy Index your code
hub / github.com/bugy/script-server / createStore

Function createStore

web-src/tests/unit/scriptSetup_test.js:10–30  ·  view source on GitHub ↗
(sentData)

Source from the content-addressed store, hash-verified

8localVue.use(Vuex);
9
10function createStore(sentData) {
11 return new Vuex.Store({
12 modules: {
13 scriptSetup: cloneDeep(scriptSetup),
14 scriptConfig: {
15 namespaced: true,
16 state: {
17 lastClientModelId: null
18 },
19 actions: {
20 sendParameterValue(_, {parameterName, value}) {
21 sentData.push(createSentValue(parameterName, value));
22 },
23 reloadModel({state}, {clientModelId}) {
24 state.lastClientModelId = clientModelId
25 }
26 }
27 }
28 }
29 });
30}
31
32function createSentValue(parameter, value) {
33 return JSON.stringify({

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected