mirror of
https://github.com/enso-org/enso.git
synced 2024-11-26 08:52:58 +03:00
4bf79776c5
Fixes #6250 With this change, I've also slightly refactored the graph editor component by grouping related functionality into neat block and moving already loosely coupled groups to separate files. Further work will be needed to simplify it, but it is a good first step. https://github.com/enso-org/enso/assets/919491/fedce111-ea79-463f-a543-da3ecce28bf5
39 lines
980 B
TypeScript
39 lines
980 B
TypeScript
import { Server } from '@open-rpc/server-js'
|
|
import * as random from 'lib0/random'
|
|
import {
|
|
methods as pmMethods,
|
|
projects,
|
|
type ProjectId,
|
|
type ProjectName,
|
|
type UTCDateTime,
|
|
} from '../mock/projectManager'
|
|
import pmSpec from './pm-openrpc.json' assert { type: 'json' }
|
|
|
|
export default function setup() {
|
|
const pm = new Server({
|
|
transportConfigs: [
|
|
{
|
|
type: 'WebSocketTransport',
|
|
options: {
|
|
id: 'websocket',
|
|
udp: true,
|
|
ipv6: true,
|
|
port: 30535,
|
|
middleware: [],
|
|
},
|
|
},
|
|
],
|
|
openrpcDocument: pmSpec as typeof pmSpec & { openrpc: never },
|
|
methodMapping: pmMethods,
|
|
})
|
|
pm.start()
|
|
projects.set('mock project id 0001', {
|
|
id: random.uuidv4() as ProjectId,
|
|
created: new Date().toISOString() as UTCDateTime,
|
|
lastOpened: new Date().toISOString() as UTCDateTime,
|
|
engineVersion: '',
|
|
name: 'Mock Project Name' as ProjectName,
|
|
namespace: 'local',
|
|
})
|
|
}
|