-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: move yjs out of api into an app (#481)
- Loading branch information
Showing
20 changed files
with
418 additions
and
8,275 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
dist/ | ||
conns/conn-*.json | ||
prisma/dev.db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
{ | ||
"name": "yjs", | ||
"version": "1.0.0", | ||
"license": "MIT", | ||
"scripts": { | ||
"build": "tsc", | ||
"start": "node build/yjs-server.js", | ||
"dev": "ts-node-dev src/yjs-server.ts", | ||
"test": "jest --config jest.config.js" | ||
}, | ||
"dependencies": { | ||
"@apollo/client": "^3.7.1", | ||
"@codepod/prisma": "workspace:*", | ||
"@kubernetes/client-node": "^0.17.1", | ||
"@prisma/client": "4.3.1", | ||
"apollo-server": "^3.5.0", | ||
"apollo-server-core": "^3.10.3", | ||
"apollo-server-express": "3.10.2", | ||
"bcryptjs": "^2.4.3", | ||
"dockerode": "^3.3.1", | ||
"google-auth-library": "^8.7.0", | ||
"graphql": "16.6.0", | ||
"jest": "^29.0.3", | ||
"jsdom": "^22.1.0", | ||
"jsonwebtoken": "^8.5.1", | ||
"lib0": "^0.2.83", | ||
"lodash": "^4.17.21", | ||
"nanoid": "^3.0.0", | ||
"nanoid-dictionary": "^4.3.0", | ||
"prisma": "4.3.1", | ||
"prosemirror-model": "^1.19.3", | ||
"prosemirror-view": "^1.31.7", | ||
"reactflow": "^11.7.4", | ||
"stompjs": "^2.3.3", | ||
"uuid": "^9.0.0", | ||
"ws": "^8.2.3", | ||
"y-prosemirror": "^1.2.1", | ||
"y-protocols": "^1.0.5", | ||
"yjs": "^13.6.7", | ||
"zeromq": "^6.0.0-beta.6" | ||
}, | ||
"devDependencies": { | ||
"@jest/globals": "^29.6.4", | ||
"@types/bcryptjs": "^2.4.2", | ||
"@types/dockerode": "^3.3.11", | ||
"@types/express": "^4.17.14", | ||
"@types/jest": "^29.0.2", | ||
"@types/jsdom": "^21.1.1", | ||
"@types/jsonwebtoken": "^8.5.9", | ||
"@types/node": "^18.11.2", | ||
"@types/stompjs": "^2.3.5", | ||
"@types/uuid": "^8.3.4", | ||
"@types/ws": "^8.5.3", | ||
"copyfiles": "^2.4.1", | ||
"nodemon": "^2.0.15", | ||
"ts-jest": "^29.0.1", | ||
"ts-node-dev": "^2.0.0", | ||
"typescript": "^4.4.4", | ||
"watch": "^1.0.2" | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// chooes between docker and k8s spawners | ||
import { | ||
spawnRuntime as spawnRuntime_docker, | ||
killRuntime as killRuntime_docker, | ||
infoRuntime as infoRuntime_docker, | ||
loopKillInactiveRoutes as loopKillInactiveRoutes_docker, | ||
initRoutes as initRoutes_docker, | ||
} from "./spawner-docker"; | ||
import { | ||
spawnRuntime as spawnRuntime_k8s, | ||
killRuntime as killRuntime_k8s, | ||
infoRuntime as infoRuntime_k8s, | ||
loopKillInactiveRoutes as loopKillInactiveRoutes_k8s, | ||
initRoutes as initRoutes_k8s, | ||
} from "./spawner-k8s"; | ||
|
||
export const spawnRuntime = | ||
process.env.RUNTIME_SPAWNER === "k8s" | ||
? spawnRuntime_k8s | ||
: spawnRuntime_docker; | ||
export const killRuntime = | ||
process.env.RUNTIME_SPAWNER === "k8s" ? killRuntime_k8s : killRuntime_docker; | ||
|
||
export const initRoutes = | ||
process.env.RUNTIME_SPAWNER !== "k8s" ? initRoutes_docker : initRoutes_k8s; | ||
export const loopKillInactiveRoutes = | ||
process.env.RUNTIME_SPAWNER !== "k8s" | ||
? loopKillInactiveRoutes_docker | ||
: loopKillInactiveRoutes_k8s; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"compilerOptions": { | ||
"module": "commonjs", | ||
"outDir": "./build", | ||
"target": "esnext", | ||
"allowJs": true, | ||
"allowSyntheticDefaultImports": true, | ||
"esModuleInterop": true, | ||
"lib": ["esnext"], | ||
"moduleResolution": "node", | ||
"noFallthroughCasesInSwitch": true, | ||
"resolveJsonModule": true, | ||
"skipLibCheck": true, | ||
"strict": true, | ||
"isolatedModules": true, | ||
"noImplicitAny": false | ||
}, | ||
"ts-node": { | ||
// these options are overrides used only by ts-node | ||
// same as the --compilerOptions flag and the TS_NODE_COMPILER_OPTIONS environment variable | ||
"compilerOptions": { | ||
"module": "commonjs" | ||
} | ||
}, | ||
"include": ["src"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.