8000 Merge next into main by icidasset · Pull Request #2 · icidasset/ts-odd · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Merge next into main #2

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

Merged
merged 113 commits into from
Sep 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
f8aff63
Integrate rs-wnfs & remove js-ipfs (#500)
icidasset Mar 29, 2023
455621b
Fix merge conflicts and clean up
icidasset Jun 13, 2023
7290fbc
Upgrade to wnfs 0.1.21
icidasset Jun 14, 2023
eb14c2b
Remove apps API
icidasset Jun 14, 2023
1763133
Include suggested changes
icidasset Jul 17, 2023
a91958b
Adapt to UCAN 0.9
icidasset Jun 14, 2023
76ee4f4
Remove mode things
icidasset Jul 6, 2023
26fca92
Fix tests, pt. 1
icidasset Jul 7, 2023
9fd77ad
Improve iso-signatures integration
icidasset Jul 10, 2023
881a1b1
Explicitely set issuer when creating UCANs
icidasset Jul 10, 2023
030d15c
Fix tests, pt. 2
icidasset Jul 10, 2023
bb408f1
Fix circular dependencies
icidasset Jul 10, 2023
f2e7d42
UCAN repo → Cabinet
icidasset Jul 11, 2023
c02891c
Fix tests and signing of UCANs
icidasset Jul 12, 2023
61795bd
Set up precommit hook to automatically format JS/TS/MD/JSON files
icidasset Jul 12, 2023
c32b2a7
Add a way of extending the account system
icidasset Jul 12, 2023
ed8034e
Clean up channel stuff a bit
icidasset Jul 12, 2023
31dc5e1
Improve documentation
icidasset Jul 13, 2023
0a0c357
Use cabinet to store access keys
icidasset Jul 13, 2023
6281617
Address linting errors
icidasset Jul 14, 2023
5a64174
Fix mounting of file system after initial creation and add local acco…
icidasset Jul 14, 2023
8d77b0d
#private fields and methods
icidasset Jul 14, 2023
feecba9
Local
icidasset Jul 14, 2023
4c1107f
access → authority
icidasset Jul 14, 2023
a274597
Fix issue with ensureKey
icidasset Jul 14, 2023
9afcd36
Proper data root check for local-only mode
icidasset Jul 14, 2023
e3440d0
fileSystem.load options object shouldn't be required
icidasset Jul 17, 2023
16065e5
Undo rename of path module export from entry point
icidasset Jul 17, 2023
18913d1
Update changelog
icidasset Jul 17, 2023
122a9fc
Use the default storage component for the store of the default agent …
icidasset Jul 17, 2023
4bb3e36
add handler to request verification code
blaine Jul 17, 2023
b00ce7d
prod/staging boolean -> string
blaine Jul 17, 2023
d129a54
? instead of null
blaine Jul 17, 2023
bc0d802
development include [for when that works]
blaine Jul 17, 2023
0e26783
did-munging
blaine Jul 17, 2023
a4e2f0b
production -> production for production :meow_grin:
blaine Jul 17, 2023
736ff25
oops, this too
blaine Jul 17, 2023
3ac81b2
Update src/components/account/implementation.ts
icidasset Jul 18, 2023
de02bfd
No trailing commas for params and args
icidasset Jul 18, 2023
bb6d253
chore: Rename capabilities to authority in events
icidasset Jul 18, 2023
c4fafc1
Add back predefined components and compositions, use dynamic imports
icidasset Jul 18, 2023
d52e703
fix: typo in agent description
icidasset Jul 18, 2023
35f7d15
chore: remove .vscode from git
icidasset Jul 18, 2023
d09c6ea
fix: when in localOnly mode, add to cid log before exiting
icidasset Jul 18, 2023
fbd39f3
Update src/components/agent/implementation/web-crypto-api.ts
icidasset Jul 19, 2023
09d31c1
Update src/components/account/implementation/local-only.ts
icidasset Jul 19, 2023
1c993a5
Update src/index.ts
icidasset Jul 19, 2023
027aa45
fix: fs tests
icidasset Jul 19, 2023
6407328
test: add more file systems tests
icidasset Jul 19, 2023
cb9199e
test: skip failing test for now, rs-wnfs bug
icidasset Jul 19, 2023
4a22da1
chore: expose fs.did method
icidasset Jul 19, 2023
43eb42b
feat: don't require local flag for progress fs
icidasset Jul 19, 2023
09c7951
fix: respect did option when loading file system
icidasset Jul 19, 2023
42e5f4c
Use regular strings for the other non-variable dynamic imports
icidasset Jul 19, 2023
f45d22b
chore: remove cabinet hook
icidasset Jul 19, 2023
dc2c6d7
refactor: use objects with more semantic info than just { ok }
icidasset Jul 19, 2023
56f07aa
test: add test for rsa encryption & decryption
icidasset Jul 19, 2023
0497632
chore: add back did shorthands
icidasset Jul 19, 2023
ec0aed9
fix: use semver valid version
icidasset Jul 19, 2023
b7ed4a4
feat: update to match server api
blaine Jul 20, 2023
8c64e58
fix: undo dynamic imports
icidasset Jul 20, 2023
ec327a8
Merge pull request #532 from oddsdk/icidasset/ucans
icidasset Jul 20, 2023
92f6dd7
fix: formatting fission-base accounts
icidasset Jul 20, 2023
368af07
chore: improve bundle size
icidasset Jul 20, 2023
fec0b41
chore: also adjust umd build
icidasset Jul 20, 2023
504fd2c
fix: gzip all js files please
icidasset Jul 20, 2023
1af1977
fix: forgot to determine the fission endpoints and pass it along
icidasset Jul 20, 2023
9e4b77a
chore: remove unused imports
icidasset Jul 20, 2023
d6aede5
Merge pull request #535 from oddsdk/icidasset/bundle
icidasset Jul 20, 2023
91c8374
add format checks (#539)
walkah Jul 28, 2023
e4e8e93
feat: refactor account system and file system loading
icidasset Jul 25, 2023
c717b19
Replace expect with assert (#541)
bgins Jul 31, 2023
19a3b5b
feat: make volume a progressive file system
icidasset Jul 31, 2023
c4c7bc5
feat: allow passing the account query
icidasset Jul 31, 2023
bbadce6
Apply suggestions from code review
icidasset Aug 1, 2023
42f47e8
fix: specificy AccountQuery type
icidasset Jul 31, 2023
4e67de0
refactor: program.dids -> program.did
icidasset Aug 1, 2023
08a0027
Merge pull request #538 from oddsdk/icidasset/account-system
icidasset Aug 1, 2023
df3caf6
feat: account implementation for the new fission server
icidasset Aug 1, 2023
74d7c74
fix: did inconsistencies
icidasset Aug 7, 2023
c45d36d
chore: improve ipfs depot
icidasset Aug 8, 2023
6538f97
chore: add yamux multiplexer
icidasset Aug 9, 2023
b45a1a2
chore: switch back to dns
icidasset Aug 9, 2023
a62f47d
feat: add ability to load file systems of other users
icidasset Aug 9, 2023
abea550
feat: add context to channel implementation
icidasset Aug 9, 2023
aec675b
feat: add custom online tracking to program
icidasset Aug 10, 2023
67859a3
chore: use emittery instead of custom event emitter
icidasset Aug 10, 2023
33831c2
chore: improve docs and fix tests
icidasset Aug 10, 2023
8c734be
fix: libp2p connection through ping
icidasset Aug 14, 2023
d95f95d
fix: types of event emitter methods on file system
icidasset Aug 16, 2023
c2a2c3d
Update src/compositions/fission.ts
icidasset Aug 16, 2023
1596321
Merge pull request #542 from oddsdk/icidasset/fission-account
icidasset Aug 16, 2023
a22f4ec
chore: update wnfs
icidasset Jul 24, 2023
0996b24
fix: proofs array shouldn't be empty
icidasset Aug 14, 2023
cfd0600
feat: add unix compatibility layer
icidasset Aug 16, 2023
0a56508
chore: remove empty file
icidasset Aug 17, 2023
26784a6
feat: add permalink implementation + fs method
icidasset Aug 17, 2023
25a9152
refactor: make appPath applicable to both partitions
icidasset Aug 17, 2023
7450b91
refactor: adjust to new version of wnfs
icidasset Aug 18, 2023
69c4a9e
docs: improve src/README.md
icidasset Aug 18, 2023
ab8bbd3
Merge pull request #536 from oddsdk/icidasset/update-wnfs
icidasset Aug 18, 2023
be49ad4
Added Starmap link to README.md
bdehaynin Aug 18, 2023
4ba3e38
Merge pull request #561 from oddsdk/bdehaynin-patch-1
icidasset Aug 18, 2023
775a8b1
feat: add design doc
icidasset Aug 21, 2023
c5edeaa
docs: address feedback
icidasset Aug 22, 2023
07a1ce8
Apply suggestions from code review
icidasset Aug 22, 2023
3f3fca1
refactor: allow storing any type of UCAN
icidasset Aug 21, 2023
7938f02
Merge pull request #562 from oddsdk/icidasset/design-doc
icidasset Aug 24, 2023
85de021
Merge pull request #564 from oddsdk/icidasset/tickets
icidasset Aug 25, 2023
6002097
Chore: update iso-base to v2 and fix two npm audit issues (#567)
avivash Aug 29, 2023
2adb25e
feat: implement authority transfer
icidasset Aug 24, 2023
cb651a4
feat: use unique DID for file system
icidasset Sep 5, 2023
0f24470
Merge pull request #1 from icidasset/icidasset/authority
icidasset Sep 9, 2023
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: 1 addition & 1 deletion .envrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
use flake
use flake
21 changes: 12 additions & 9 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,30 @@ module.exports = {
"plugin:@typescript-eslint/recommended",
],
rules: {
"no-empty-function": "off",
"@typescript-eslint/member-delimiter-style": ["error", {
"multiline": {
"delimiter": "none",
"requireLast": false
"requireLast": false,
},
}],
"@typescript-eslint/no-empty-function": ["off"],
"@typescript-eslint/no-explicit-any": ["off"],
"@typescript-eslint/no-use-before-define": ["off"],
"@typescript-eslint/semi": ["error", "never"],
"@typescript-eslint/ban-ts-comment": 1,
"@typescript-eslint/quotes": ["error", "double", {
allowTemplateLiterals: true
allowTemplateLiterals: true,
}],
// If you want to *intentionally* run a promise without awaiting, prepend it with "void " instead of "await "
"@typescript-eslint/no-floating-promises": ["error"],
'@typescript-eslint/no-unused-vars': [
'warn', // or error
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
"@typescript-eslint/no-unused-vars": [
"warn", // or error
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
},
],
}
},
}
39 changes: 17 additions & 22 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,28 @@ If you see someone who is making an extra effort to ensure our community is welc

The following behaviors are expected and requested of all community members:

* Participate in an authentic and active way. In doing so, you contribute to the health and longevity of this community.
* Exercise consideration and respect in your speech and actions.
* Attempt collaboration before conflict.
* Refrain from demeaning, discriminatory, or harassing behavior and speech.
* Be mindful of your surroundings and of your fellow participants. Alert community leaders if you notice a dangerous situation, someone in distress, or violations of this Code of Conduct, even if they seem inconsequential.
* Remember that community event venues may be shared with members of the public; please be respectful to all patrons of these locations.
- Participate in an authentic and active way. In doing so, you contribute to the health and longevity of this community.
- Exercise consideration and respect in your speech and actions.
- Attempt collaboration before conflict.
- Refrain from demeaning, discriminatory, or harassing behavior and speech.
- Be mindful of your surroundings and of your fellow participants. Alert community leaders if you notice a dangerous situation, someone in distress, or violations of this Code of Conduct, even if they seem inconsequential.
- Remember that community event venues may be shared with members of the public; please be respectful to all patrons of these locations.

## 4. Unacceptable Behavior

The following behaviors are considered harassment and are unacceptable within our community:

* Violence, threats of violence or violent language directed against another person.
* Sexist, racist, homophobic, transphobic, ableist or otherwise discriminatory jokes and language.
* Posting or displaying sexually explicit or violent material.
* Posting or threatening to post other people’s personally identifying information ("doxing").
* Personal insults, particularly those related to gender, sexual orientation, race, religion, or disability.
* Inappropriate photography or recording.
* Inappropriate physical contact. You should have someone’s consent before touching them.
* Unwelcome sexual attention. This includes, sexualized comments or jokes; inappropriate touching, groping, and unwelcomed sexual advances.
* Deliberate intimidation, stalking or following (online or in person).
* Advocating for, or encouraging, any of the above behavior.
* Sustained disruption of community events, including talks and presentations.
- Violence, threats of violence or violent language directed against another person.
- Sexist, racist, homophobic, transphobic, ableist or otherwise discriminatory jokes and language.
- Posting or displaying sexually explicit or violent material.
- Posting or threatening to post other people’s personally identifying information ("doxing").
- Personal insults, particularly those related to gender, sexual orientation, race, religion, or disability.
- Inappropriate photography or recording.
- Inappropriate physical contact. You should have someone’s consent before touching them.
- Unwelcome sexual attention. This includes, sexualized comments or jokes; inappropriate touching, groping, and unwelcomed sexual advances.
- Deliberate intimidation, stalking or following (online or in person).
- Advocating for, or encouraging, any of the above behavior.
- Sustained disruption of community events, including talks and presentations.

## 5. Consequences of Unacceptable Behavior

Expand All @@ -55,16 +55,12 @@ If a community member engages in unacceptable behavior, the community organizers

If you are subject to or witness unacceptable behavior, or have any other concerns, please notify a community organizer as soon as possible. hello@brooklynzelenka.com.



Additionally, community organizers are available to help community members engage with local law enforcement or to otherwise help those experiencing unacceptable behavior feel safe. In the context of in-person events, organizers will also provide escorts as desired by the person experiencing distress.

## 7. Addressing Grievances

If you feel you have been falsely or unfairly accused of violating this Code of Conduct, you should notify the maintainers with a concise description of your grievance. Your grievance will be handled in accordance with our existing governing policies.



## 8. Scope

We expect all community participants (contributors, paid or otherwise; sponsors; and other guests) to abide by this Code of Conduct in all community venues–online and in-person–as well as in all one-on-one communications pertaining to community business.
Expand All @@ -82,4 +78,3 @@ This Code of Conduct is distributed under a [Creative Commons Attribution-ShareA
Portions of text derived from the [Django Code of Conduct](https://www.djangoproject.com/conduct/) and the [Geek Feminism Anti-Harassment Policy](http://geekfeminism.wikia.com/wiki/Conference_anti-harassment/Policy).

Retrieved on November 22, 2016 from [http://citizencodeofconduct.org/](http://citizencodeofconduct.org/)

17 changes: 10 additions & 7 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand All @@ -40,15 +41,17 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
18 changes: 9 additions & 9 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ Thanks for submitting a pull request! Please provide enough information so that

For more information, see the `CONTRIBUTING` guide.


## Summary

<!-- Summary of the PR -->

This PR fixes/implements the following **bugs/features**

* [ ] Bug 1
* [ ] Bug 2
* [ ] Feature 1
* [ ] Feature 2
* [ ] Breaking changes
- [ ] Bug 1
- [ ] Bug 2
- [ ] Feature 1
- [ ] Feature 2
- [ ] Breaking changes

<!-- You can skip this if you're fixing a typo or adding an app to the Showcase. -->

Expand All @@ -29,13 +29,13 @@ Demonstrate the code is solid. Example: The exact commands you ran and their out

<!-- Make sure tests pass on Circle CI. -->


## Closing issues

<!-- Put `closes #XXXX` in your comment to auto-close the issue that your PR fixes (if such). -->

Fixes #

## After Merge
* [ ] Does this change invalidate any docs or tutorials? _If so ensure the changes needed are either made or recorded_
* [ ] Does this change require a release to be made? Is so please create and deploy the release

- [ ] Does this change invalidate any docs or tutorials? _If so ensure the changes needed are either made or recorded_
- [ ] Does this change require a release to be made? Is so please create and deploy the release
2 changes: 1 addition & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Changelog Check
on:
on:
pull_request:
branches: [ main ]

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,8 @@ jobs:
- name: Install Dependencies
run: npm install

- name: Format Check
run: npx dprint check

- name: Build & Test
run: npm run test:prod
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
/node_modules
/src/vendor
/yarn-error.log
/fission-ipfs
/.vscode
/.zed


# Created by https://www.toptal.com/developers/gitignore/api/yarn,node,elm
Expand Down Expand Up @@ -116,4 +117,4 @@ temp/
# End of https://www.toptal.com/developers/gitignore/api/yarn,node,elm

.DS_Store
/.direnv
/.direnv
20 changes: 10 additions & 10 deletions .mocharc.cjs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
module.exports = {
extension: [ "ts" ],
spec: [
"tests/**/*.test.ts",
"tests/*.test.ts",
"src/**/*.test.ts",
"src/*.test.ts",
],
require: [ "ts-node/register", "tests/mocha-hook.ts" ],
timeout: 120000,
loader: "ts-node/esm",
extension: ["ts"],
spec: [
"tests/**/*.test.ts",
"tests/*.test.ts",
"src/**/*.test.ts",
"src/*.test.ts",
],
require: ["ts-node/register", "tests/mocha-hook.ts"],
timeout: 120000,
loader: "ts-node/esm",
}
19 changes: 19 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: local
hooks:
- id: fmt
name: fmt
description: Format TS & JS files.
entry: npx dprint fmt
language: system
pass_filenames: false

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
1 change: 0 additions & 1 deletion .tool-versions

This file was deleted.

32 changes: 25 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# Changelog

### Next

- **Uses the rs-wnfs implementation of the Webnative file system**.
- **Upgrades to UCAN 0.9**
- **File system is not loaded automatically anymore.**
- **Abstracts the account and identifier/identity systems.**
- **Merges the interfaces of linking and the capabilities component.**
And now features a much more flexible interface so that each
consumer of UCANs can redelegate too (ie. each delegate is also an authority)
- Adds various new file system methods, including transactions.
- Adds a `flush` method to the depot component to allow for other block storage systems.
- Improves the `Program` type.
- Improves several types of the paths module.
- Better organisation of UCANs and other secrets.
- Removes sessions.
- Removes crypto component.
- Reference component has been removed, functionality has been moved to other components or into their own component.
- Backwards compatibility with older Webnative clients has been removed.
- Predefined components are imported using dynamic imports to reduce bundle size.

### V0.37.2

- Fixes an issue with the capabilities system which prevented ODD apps from receiving the capabilities.
Expand All @@ -12,7 +32,6 @@
- Adds session create and destroy events
- Rename Webnative SDK to ODD SDK and update external URLs


### V0.36.3

Now parses DAG-JSON formatted CIDs.
Expand Down Expand Up @@ -50,7 +69,6 @@ Fixes an issue with the CID log, which, in certain scenarios, caused Webnative t
- Fixes persistance issue with `fs.mv()`
- Fixes various issues with file/directory history.


### v0.35.2

Fixes issue with the types of the `path.appData` function. Now has the correct overloads.
Expand Down Expand Up @@ -402,7 +420,7 @@ Upgrade to CIDv1.
privatePaths: ["Music"],
publicPaths: ["Mixtapes"],
},
});
})
```

- Those prerequisites are passed to the `wn.redirectToLobby` function.
Expand Down Expand Up @@ -458,11 +476,11 @@ Upgrade to CIDv1.
Removed the default import from the index file. Now you use the SDK as follows, browser stays the same.

```js
import * as sdk from "fission-sdk";
import { initialise } from "fission-sdk";
import * as sdk from "fission-sdk"
import { initialise } from "fission-sdk"

sdk.initialise();
initialise();
sdk.initialise()
initialise()
```

### v0.14.0
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ You will likely receive feedback or requests for changes to your pull request. D
The primary goals for a pull request are to improve the codebase and for the contributor to succeed. Some pull requests may not be merged at the end of the day, but that does not indicate failure. If your pull request is not merged, please know that your efforts are appreciated and will have an impact on how we think about the codebase in the long run.

[coc]: ./CODE_OF_CONDUCT.md
[discord]: https://fission.codes/discord/
[discord]: https://fission.codes/discord/
[discussions]: https://github.com/oddsdk/ts-odd/discussions
[docs]: https://docs.odd.dev/
[issue]: https://github.com/oddsdk/ts-odd/issues
Expand Down
Loading
0