Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(shared state server): added shared state server #2056

Merged
merged 47 commits into from
Feb 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
c8c95bc
feat(shared state): moved sharedb test project to monorepo
sr258 Jan 1, 2022
b6ab0a3
refactor: typings
sr258 Jan 1, 2022
6634ca8
feat: integrate shared state into rest example
sr258 Jan 1, 2022
fd79144
refactor: code improvements
sr258 Jan 1, 2022
fdff19b
refactor: shared state server now class
sr258 Jan 1, 2022
c9fbc35
feat: library metadata extension
sr258 Jan 1, 2022
87686a7
feat: authentication in websocket
sr258 Jan 2, 2022
f2eacf8
feat: authorization
sr258 Jan 2, 2022
fcffd72
feat: load schemas from library
sr258 Jan 3, 2022
d3b2d6d
feat: logic checker stub
sr258 Jan 3, 2022
f9831a4
feat: first logic checker implementation
sr258 Jan 3, 2022
fc23da1
feat: implemented logical operators and more tests
sr258 Jan 4, 2022
5373b03
refactor: removed old schemas
sr258 Jan 4, 2022
fff5bfb
refactor: simplified logic checker structure
sr258 Jan 4, 2022
8b852ce
fix: fixed logic checker issues and added tests
sr258 Jan 4, 2022
b94ada2
feat: op logic checks
sr258 Jan 4, 2022
3c8454b
fix: logic checks
sr258 Jan 4, 2022
7b9c47b
feat: logic check for snapshot
sr258 Jan 5, 2022
038757b
feat: added access level to integration
sr258 Jan 5, 2022
d41e688
feat: hooks in core
sr258 Jan 6, 2022
7e4d435
feat: implemented clearing content state
sr258 Jan 6, 2022
d8cf7d6
feat: implemented create check
sr258 Jan 6, 2022
7a19e78
feat: snapshot logic test, $in and $nin work on arrays
sr258 Jan 6, 2022
da9bc75
chore: deps updated react-scripts to v5
sr258 Jan 7, 2022
577d093
refactor: cleanup
sr258 Jan 7, 2022
8cab524
refactor: moved validator storage to own class
sr258 Jan 7, 2022
696e4dd
refactor: minor chanes
sr258 Jan 7, 2022
6ce50fa
refactor: removed dependency on ContentManager
sr258 Jan 7, 2022
fc43337
refactor: moved middleware to its own files
sr258 Jan 7, 2022
48b8255
fix: adapted example code
sr258 Jan 8, 2022
dd00fa2
feat: add get auth route
sr258 Jan 28, 2022
d3d89d9
refactor: debug logs
sr258 Jan 30, 2022
6e1aa50
fix: made logic check $in more tolerant
sr258 Feb 4, 2022
77defb9
feat: snapshot data in op logic test
sr258 Feb 4, 2022
d883ad1
fix: always allow server ops
sr258 Feb 4, 2022
49ca02b
refactor: refactoring and documentation
sr258 Feb 11, 2022
dc0b763
refactor: logs in debug module
sr258 Feb 11, 2022
9476009
refactor: removed custom typing of ShareDB context
sr258 Feb 18, 2022
b5594be
refactor: change concurrent build phases to reduce memory peak
sr258 Feb 18, 2022
faef628
refactor: added shared state server to build artifacts
sr258 Feb 18, 2022
620e3cd
refactor: shared state example only optional
sr258 Feb 18, 2022
827ddbb
refactor: removed old access level injection
sr258 Feb 18, 2022
8e46814
refactor: added state extension property to library schema
sr258 Feb 18, 2022
74b0992
Merge remote-tracking branch 'origin/master' into feat/shared-state
sr258 Feb 18, 2022
19e1afc
chore: updated package lock
sr258 Feb 18, 2022
13ccf63
docs: added propsal doc
sr258 Feb 18, 2022
d886ea5
Merge remote-tracking branch 'origin/master' into feat/shared-state
sr258 Feb 25, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ jobs:
- packages/h5p-react/node_modules
- packages/h5p-server/build
- packages/h5p-server/node_modules
- packages/h5p-shared-state-server/build
- packages/h5p-shared-state-server/node_modules
- packages/h5p-webcomponents/build
- packages/h5p-webcomponents/node_modules
- packages/h5p-rest-example-client/node_modules
Expand Down
3 changes: 2 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ module.exports = {
roots: [
'<rootDir>/packages/h5p-express/test',
'<rootDir>/packages/h5p-server/test',
'<rootDir>/packages/h5p-html-exporter/test'
'<rootDir>/packages/h5p-html-exporter/test',
'<rootDir>/packages/h5p-shared-state-server/test'
],

// Allows you to use a custom runner instead of Jest's default test runner
Expand Down
12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@
"url": "https://github.com/Lumieducation/H5P-Nodejs-library"
},
"scripts": {
"build:h5p-server": "npm run build --prefix packages/h5p-server",
"build:h5p-examples": "npm run build --prefix packages/h5p-examples",
"build:h5p-express": "npm run build --prefix packages/h5p-express",
"build:h5p-html-exporter": "npm run build --prefix packages/h5p-html-exporter",
"build:h5p-react": "npm run build --prefix packages/h5p-react",
"build:h5p-webcomponents": "npm run build --prefix packages/h5p-webcomponents",
"build:h5p-redis-lock": "npm run build --prefix packages/h5p-redis-lock",
"build": "npm run build --prefix packages/h5p-server && concurrently \"npm run build --prefix packages/h5p-express\" \"npm run build --prefix packages/h5p-html-exporter\" \"npm run build --prefix packages/h5p-redis-lock\" \"npm run build --prefix packages/h5p-mongos3\" && concurrently \"npm run build --prefix packages/h5p-examples\" \"npm run build:h5p-webcomponents\" && npm run build:h5p-react",
"build:h5p-server": "npm run build --prefix packages/h5p-server",
"build:h5p-shared-state-server": "npm run build --prefix packages/h5p-shared-state-server",
"build:h5p-webcomponents": "npm run build --prefix packages/h5p-webcomponents",
"build": "npm run build --prefix packages/h5p-server && concurrently \"npm run build --prefix packages/h5p-express\" \"npm run build --prefix packages/h5p-html-exporter\" \"npm run build --prefix packages/h5p-redis-lock\" \"npm run build --prefix packages/h5p-mongos3\" && concurrently \"npm run build --prefix packages/h5p-shared-state-server\" \"npm run build --prefix packages/h5p-examples\" \"npm run build:h5p-webcomponents\" && npm run build:h5p-react",
"download:content-type-cache": "ts-node scripts/update-real-content-type-cache.ts",
"download:content": "node scripts/download-examples.js test/data/content-type-cache/real-content-types.json test/data/hub-content",
"download:h5p": "sh scripts/install.sh",
Expand All @@ -25,6 +26,7 @@
"lint:main": "eslint -c .eslintrc.js --ext .ts packages --quiet",
"lint:rest-client": "npm run lint --prefix packages/h5p-rest-example-client",
"lint": "concurrently \"npm:lint:main\" \"npm:lint:rest-client\" \"npm:lint:docs\"",
"localize": "./localize.sh",
"postinstall": "npx lerna bootstrap && concurrently \"npm run build\" \"npm run download:content-type-cache && npm run download:h5p\"",
"pre-commit": "concurrently \"npm:lint\" \"npm:format\"",
"prepare": "husky install",
Expand All @@ -44,15 +46,15 @@
"test:e2e": "npm run test:e2e --prefix packages/h5p-examples",
"test:h5p-mongos3": "npm test --prefix packages/h5p-mongos3",
"test:h5p-redis-lock": "npm test --prefix packages/h5p-redis-lock",
"test:h5p-shared-state-server": "jest packages/h5p-shared-state-server/test",
"test:html-exporter": "jest --config packages/h5p-html-exporter/jest.config.js --maxWorkers=${BUILD_WORKERS-`nproc`}",
"test:integration": "npx jest --config jest.integration.config.js --maxWorkers=${BUILD_WORKERS-`nproc`} && npm run test:h5p-redis-lock",
"test:server+upload": "npm run test:server+upload --prefix packages/h5p-server",
"test:upload": "npm run test:upload --prefix packages/h5p-server",
"test:watch:h5p-express": "npm run test:watch --prefix packages/h5p-express",
"test:watch:h5p-mongos3": "npm run test:watch --prefix packages/h5p-mongos3",
"test:watch": "jest --watch --logHeapUsage --maxWorkers=${BUILD_WORKERS-`nproc`}",
"test": "jest --maxWorkers=${BUILD_WORKERS-`nproc`}",
"localize": "./localize.sh"
"test": "jest --maxWorkers=${BUILD_WORKERS-`nproc`}"
},
"release": {
"branch": "release"
Expand Down
Loading