Skip to content

Commit b9d0478

Browse files
authored
Merge pull request #538 from Yonava/yva/ci-fixes
fix(ci): build scripts
2 parents 3b26f4b + 58fd955 commit b9d0478

7 files changed

Lines changed: 63 additions & 59 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magic-graphs",
33
"version": "1.0.0",
44
"scripts": {
5-
"start": "cd packages/server && pnpm i --omit=dev && node dist/index.js",
5+
"start": "cd packages/server && pnpm install && pnpm start",
66
"dev": "concurrently -c auto command 'pnpm:dev-*'",
77
"dev-client": "cd packages/client && pnpm dev",
88
"dev-server": "cd packages/server && pnpm dev",

packages/products/src/markov-chains/MainView.vue

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -18,56 +18,56 @@
1818
const markov = useMarkovChain(graph);
1919
useMarkovColorizer(graph, markov).colorize();
2020
21-
const int = gsap.utils.interpolate(colors.RED_500, colors.RED_800);
21+
// const int = gsap.utils.interpolate(colors.RED_500, colors.RED_800);
2222
23-
const { play, stop } = graph.defineTimeline({
24-
forShapes: ["circle"],
25-
durationMs: 2000,
26-
customInterpolations: {
27-
stroke: {
28-
value: (progress, schema) => ({
29-
color: progress < 0.5 ? int(progress * 2) : int(2 - progress * 2),
30-
lineWidth: schema.stroke?.lineWidth ?? 10,
31-
}),
32-
easing: "in-out",
33-
},
34-
},
35-
synchronize: true,
36-
});
23+
// const { play, stop } = graph.defineTimeline({
24+
// forShapes: ["circle"],
25+
// durationMs: 2000,
26+
// customInterpolations: {
27+
// stroke: {
28+
// value: (progress, schema) => ({
29+
// color: progress < 0.5 ? int(progress * 2) : int(2 - progress * 2),
30+
// lineWidth: schema.stroke?.lineWidth ?? 10,
31+
// }),
32+
// easing: "in-out",
33+
// },
34+
// },
35+
// synchronize: true,
36+
// });
3737
38-
graph.subscribe("onFocusChange", (newIds, oldIds) => {
39-
const newNodeIds = Array.from(newIds).filter(graph.getNode);
40-
const oldNodeIds = Array.from(oldIds).filter(graph.getNode);
41-
newNodeIds.forEach((nodeId) => {
42-
stop({ shapeId: nodeId });
43-
});
44-
const noLongerFocused = Array.from(oldNodeIds).filter(
45-
(nodeId) => !newNodeIds.includes(nodeId)
46-
);
47-
for (const nodeId of noLongerFocused) {
48-
if (markov.invalidStates.value.has(nodeId)) play({ shapeId: nodeId });
49-
}
50-
});
38+
// graph.subscribe("onFocusChange", (newIds, oldIds) => {
39+
// const newNodeIds = Array.from(newIds).filter(graph.getNode);
40+
// const oldNodeIds = Array.from(oldIds).filter(graph.getNode);
41+
// newNodeIds.forEach((nodeId) => {
42+
// stop({ shapeId: nodeId });
43+
// });
44+
// const noLongerFocused = Array.from(oldNodeIds).filter(
45+
// (nodeId) => !newNodeIds.includes(nodeId)
46+
// );
47+
// for (const nodeId of noLongerFocused) {
48+
// if (markov.invalidStates.value.has(nodeId)) play({ shapeId: nodeId });
49+
// }
50+
// });
5151
52-
watch(markov.invalidStates, () => {
53-
for (const node of graph.nodes.value) {
54-
stop({ shapeId: node.id });
55-
if (markov.invalidStates.value.has(node.id)) play({ shapeId: node.id });
56-
}
57-
});
52+
// watch(markov.invalidStates, () => {
53+
// for (const node of graph.nodes.value) {
54+
// stop({ shapeId: node.id });
55+
// if (markov.invalidStates.value.has(node.id)) play({ shapeId: node.id });
56+
// }
57+
// });
5858
59-
const test = () => {
60-
for (const nodeId of markov.invalidStates.value) {
61-
play({ shapeId: nodeId });
62-
}
63-
};
59+
// const test = () => {
60+
// for (const nodeId of markov.invalidStates.value) {
61+
// play({ shapeId: nodeId });
62+
// }
63+
// };
6464
</script>
6565

6666
<template>
6767
<GraphProduct v-bind="graphWithCanvas">
6868
<template #top-center>
6969
<MarkovChainInfo :markov="markov" />
70-
<GButton @click="test">Test</GButton>
70+
<!-- <GButton @click="test">Test</GButton> -->
7171
</template>
7272

7373
<template #bottom-center>

packages/server/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
"version": "1.0.0",
44
"private": true,
55
"description": "",
6-
"main": "dist/types/index.js",
7-
"type": "module",
6+
"main": "dist/index.js",
87
"scripts": {
9-
"start": "node .",
8+
"start": "tsc && node .",
109
"dev": "nodemon --exec tsx src/index.ts",
1110
"build:types": "tsc -b ."
1211
},

packages/server/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import dotenv from 'dotenv';
22
import express from 'express';
3-
import { sockets } from './sockets.js';
3+
import { sockets } from './sockets';
44
import { createServer } from 'http';
5-
import { LOCALHOST_PORT } from './constants.js';
5+
import { LOCALHOST_PORT } from './constants';
66

77
dotenv.config();
88

packages/server/src/sockets.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Server } from 'socket.io'
22
import { createServer } from 'http'
3-
import { trackGraphState } from './trackGraphState.js'
4-
import { Collaborator, SocketEvents } from '@magic/graph/collab/types.js'
3+
import { trackGraphState } from './trackGraphState'
4+
import { Collaborator, SocketEvents } from '@magic/graph/collab/types'
55

66
export const sockets = (httpServer: ReturnType<typeof createServer>) => {
77
const io = new Server<SocketEvents, SocketEvents, {}, {}>(httpServer, {

packages/server/src/trackGraphState.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { GraphState } from "@magic/graph/collab/types.js"
2-
import type { GEdge, GNode } from "@magic/graph/types.js"
1+
import type { GraphState } from "@magic/graph/collab/types"
2+
import type { GEdge, GNode } from "@magic/graph/types"
33

44
/**
55
* maps the room id to the live version of the graph for that room

packages/server/tsconfig.json

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
11
{
2-
"extends": "../../tsconfig.base.json",
32
"compilerOptions": {
4-
"outDir": "./dist/types",
53
"rootDir": "./src",
4+
"outDir": "dist",
5+
"target": "ES2022",
6+
"module": "CommonJS",
7+
"moduleResolution": "Node",
8+
"strict": true,
9+
"noImplicitAny": true,
10+
"declaration": false,
11+
"skipLibCheck": true,
12+
"strictNullChecks": true,
13+
"resolveJsonModule": true,
14+
"esModuleInterop": true,
615
"paths": {
7-
"@magic/server/*": ["./src/*"],
816
"@magic/graph/*": ["../graph/src/*"]
9-
},
10-
"moduleResolution": "nodenext",
11-
"module": "nodenext",
12-
"emitDeclarationOnly": false
17+
}
1318
},
1419
"references": [{ "path": "../graph" }],
15-
"include": ["./src/**/*"],
16-
"exclude": ["./dist", "**/node_modules"]
20+
"include": ["src"],
21+
"exclude": ["node_modules"]
1722
}

0 commit comments

Comments
 (0)