diff --git a/Dockerfile b/Dockerfile index ac0d1ca..7c0b97b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,14 +2,20 @@ FROM node:24-alpine RUN apk add --no-cache --update curl rclone g++ -# Install rust -# https://github.com/rust-lang/rustup/issues/1085 RUN RUSTUP_URL="https://sh.rustup.rs" \ && curl --silent --show-error --location --fail --retry 3 --proto '=https' --tlsv1.2 --output /tmp/rustup-linux-install.sh $RUSTUP_URL \ && sh /tmp/rustup-linux-install.sh -y -ENV PATH=/root/.cargo/bin:$PATH +ENV RUSTUP_HOME=/usr/local/rustup \ + CARGO_HOME=/usr/local/cargo \ + PATH=/usr/local/cargo/bin:$PATH -RUN rustup target add wasm32-unknown-unknown \ +RUN curl --silent --show-error --location --fail --retry 3 \ + --proto '=https' --tlsv1.2 \ + --output /tmp/rustup-init.sh https://sh.rustup.rs \ + && sh /tmp/rustup-init.sh -y --no-modify-path --profile minimal \ + && rm /tmp/rustup-init.sh \ + && rustup default stable \ + && rustup target add wasm32-unknown-unknown \ && cargo install wasm-pack \ && npm i -g pnpm diff --git a/app/src/lib/graph-interface/AddMenu.svelte b/app/src/lib/graph-interface/AddMenu.svelte index be42839..d604490 100644 --- a/app/src/lib/graph-interface/AddMenu.svelte +++ b/app/src/lib/graph-interface/AddMenu.svelte @@ -2,6 +2,7 @@ import type { GraphManager } from "./graph-manager.js"; import { HTML } from "@threlte/extras"; import { onMount } from "svelte"; + import type { NodeType } from "@nodes/types"; export let position: [x: number, y: number] | null; @@ -9,7 +10,7 @@ let input: HTMLInputElement; let value: string = ""; - let activeNodeId: string = ""; + let activeNodeId: NodeType = ""; const allNodes = graph.getNodeDefinitions(); diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts index 791ccbe..cfa4204 100644 --- a/packages/types/src/index.ts +++ b/packages/types/src/index.ts @@ -1,6 +1,17 @@ export type { NodeInput } from "./inputs"; -export type { NodeRegistry, RuntimeExecutor, SyncCache, AsyncCache } from "./components"; -export type { Node, NodeDefinition, Socket, NodeId, Edge, Graph } from "./types"; -export { NodeSchema, GraphSchema } from "./types"; +export type { + NodeRegistry, + RuntimeExecutor, + SyncCache, + AsyncCache, +} from "./components"; +export type { + Node, + NodeDefinition, + Socket, + NodeType as NodeId, + Edge, + Graph, +} from "./types"; +export { NodeSchema, GraphSchema, NodeType } from "./types"; export { NodeDefinitionSchema } from "./types"; - diff --git a/packages/ui/package.json b/packages/ui/package.json index 44d4675..dee7e65 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -52,13 +52,13 @@ "tslib": "^2.8.1", "typescript": "^5.9.3", "vite": "^7.2.4", - "vitest": "^4.0.13" + "vitest": "^4.0.13", + "@nodes/types": "link:../types" }, "svelte": "./dist/index.js", "types": "./dist/index.d.ts", "type": "module", "dependencies": { - "@nodes/types": "link:../types", "@threlte/core": "^8.3.0", "@threlte/extras": "^9.7.0" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 135b680..cca28e8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -158,9 +158,6 @@ importers: packages/ui: dependencies: - '@nodes/types': - specifier: link:../types - version: link:../types '@threlte/core': specifier: ^8.3.0 version: 8.3.0(svelte@5.43.14)(three@0.181.2) @@ -168,6 +165,9 @@ importers: specifier: ^9.7.0 version: 9.7.0(@types/three@0.181.0)(svelte@5.43.14)(three@0.181.2) devDependencies: + '@nodes/types': + specifier: link:../types + version: link:../types '@storybook/addon-essentials': specifier: ^8.6.14 version: 8.6.14(@types/react@18.3.12)(storybook@10.0.8(@testing-library/dom@10.4.1)(prettier@3.3.3)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)(vite@7.2.4(@types/node@22.8.6)(jiti@2.6.1)(less@4.2.0)(sass@1.80.6)(terser@5.36.0)(tsx@4.19.2)))