Skip to content

Commit

Permalink
feat: Implement service worker and main-thread demo (#3)
Browse files Browse the repository at this point in the history
* feat: move helia stuff to service worker

* debugging: add dag, bootstrap, etc.... why doesnt libp2p like me

* fix: libp2p/webtransports in serviceworker

see libp2p/js-libp2p-webtransport#59

* feat: add some input caching and service worker stuff

* feat: sw and main thread work properly, with status updating in UI terminal

* feat: lint and fix all type errors

* no more any
* reframev1-routing and ipni-routing extend from CustomRouting.ts and are much smaller now
* added eslint, plus 'npm run lint' and 'npm run lint:fix' commands
* added lint run prior to prod build (inside 'npm run build')

if we want to customize timeouts/other in the custom routing methods, we may need to just modify CustomRouting and then the 'super' calls inside the subclasses

* chore: remove libp2p patch

* chore: cleanup eslintrc.cjs

* fix: empty localMultiAddr shouldn't try to dial

* Revert "chore: remove libp2p patch"

This reverts commit 74660c9.

* fix: CustomRouting class and subclasses mapEvent

* docs: update example image

* fix: some typings

* feat: consistent working with SW and window (when local multiAddr is provided)

* fix: some UI styling

* feat: split out libp2p configs

* chore: remove src/components/Form.tsx

* chore: move src/form.tsx to src/components/Form.tsx

* chore: move header html to src/components/Header.tsx

* feat: enable libp2p config toggle
  • Loading branch information
SgtPooki authored Mar 25, 2023
1 parent 70916a4 commit 2a630c0
Show file tree
Hide file tree
Showing 37 changed files with 2,229 additions and 591 deletions.
18 changes: 18 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = {
'root': true,
'extends': [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'standard-with-typescript'
],
'parser': '@typescript-eslint/parser',
'parserOptions': { 'project': ['./tsconfig.json'] },
'plugins': [
'@typescript-eslint'
],
'rules': {
"@typescript-eslint/restrict-template-expressions": "off",
"eqeqeq": ["error", "always", {"null": "ignore"}],
},
'ignorePatterns': ['src/**/*.test.ts', 'src/frontend/generated/*']
}
Binary file modified img/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/window+sw-working.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 2a630c0

Please sign in to comment.