Skip to content

Commit

Permalink
Chore: remove unused packages and routes
Browse files Browse the repository at this point in the history
  • Loading branch information
avivash committed Nov 22, 2023
1 parent 4837b01 commit a0a38b3
Show file tree
Hide file tree
Showing 10 changed files with 3 additions and 1,254 deletions.
862 changes: 2 additions & 860 deletions package-lock.json

Large diffs are not rendered by default.

5 changes: 0 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@
"dependencies": {
"@fission-codes/homestar": "^0.6.2",
"@oddjs/odd": "0.37.0",
"@open-rpc/client-js": "^1.8.1",
"@types/three": "^0.156.0",
"chart.js": "^4.4.0",
"clipboard-copy": "^4.0.1",
"iso-base": "^2.0.1",
Expand All @@ -69,9 +67,6 @@
"qrcode-svg": "^1.1.0",
"sanitize-html": "^2.11.0",
"svelvet": "npm:meetspur-svelvet@^8.1.1",
"three": "^0.156.1",
"three-globe": "^2.29.3",
"three-trackballcontrols": "^0.9.0",
"uint8arrays": "^4.0.2",
"unws": "^0.2.4"
},
Expand Down
26 changes: 0 additions & 26 deletions src/lib/rpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,8 @@ import { Homestar } from '@fission-codes/homestar'
import { WebsocketTransport } from '@fission-codes/homestar/transports/ws.js'
import { WebSocket } from 'unws'

import {
RequestManager,
Client,
WebSocketTransport as OpenRPCWebSocketTransport
} from '@open-rpc/client-js'
import { addNotification } from './notifications'

const openRPCTransport = new OpenRPCWebSocketTransport(
import.meta.env.VITE_WEBSOCKET_ENDPOINT
)
const requestManager = new RequestManager([openRPCTransport])
export const rpcClient = new Client(requestManager)

let homestar
export const getHomestarClient = () => {
try {
Expand All @@ -37,21 +26,6 @@ export const getHomestarClient = () => {
}
}

/**
* Subscribe to WS messages and pass the data to the appropriate handler
*/
export const subscribeRPC = (): void => {
// requestManager.transports[0].subscribe('notification', async event => {
// const decoded = new TextDecoder().decode(
// new Uint8Array(event?.params?.result)
// )
// const parsed = JSON.parse(decoded)
// if (parsed?.metadata?.workflow) {
// await handleWorkflowMessage(parsed as Message)
// }
// })
}

/**
* Unsubscribe from WS messages
*/
Expand Down
7 changes: 0 additions & 7 deletions src/lib/stores.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import type { AccountSettings } from '$lib/account-settings'
import type { Notification } from '$lib/notifications'
import type { Session } from '$lib/session'
import type { Theme } from '$lib/theme'
import type { ProjectsStore } from '$lib/projects'
import projects from '$routes/projects/lib/project-mocks'
import type { FunctionsStore } from '$lib/functions'
import functions from '$routes/functions/lib/function-mocks'
import type { NetworkStore } from '$lib/network'
Expand Down Expand Up @@ -37,11 +35,6 @@ export const accountSettingsStore: Writable<AccountSettings> = writable({
loading: true,
})

export const projectsStore: Writable<ProjectsStore> = writable({
loading: false,
projects
})

export const functionsStore: Writable<FunctionsStore> = writable({
loading: false,
functions
Expand Down
3 changes: 1 addition & 2 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import subscribNetworkEvents from '$lib/network'
import { addNotification } from '$lib/notifications'
import { sessionStore, themeStore } from '$lib/stores'
import { subscribeRPC, unsubscribeRPC } from '$lib/rpc'
import { unsubscribeRPC } from '$lib/rpc'
import { errorToMessage } from '$lib/session'
import { initialize } from '$lib/init'
import DataWidget from '$components/common/DataWidget.svelte'
Expand Down Expand Up @@ -47,7 +47,6 @@
init()
onMount(() => {
subscribeRPC()
subscribNetworkEvents()
})
Expand Down
83 changes: 0 additions & 83 deletions src/routes/nodes/+page.svelte

This file was deleted.

179 changes: 0 additions & 179 deletions src/routes/nodes/lib/world.json

This file was deleted.

Empty file removed src/routes/projects/+page.svelte
Empty file.
45 changes: 0 additions & 45 deletions src/routes/projects/[id]/+page.svelte

This file was deleted.

47 changes: 0 additions & 47 deletions src/routes/projects/lib/project-mocks.ts

This file was deleted.

0 comments on commit a0a38b3

Please sign in to comment.