Skip to content

Commit

Permalink
docs: write readmes
Browse files Browse the repository at this point in the history
  • Loading branch information
icidasset committed Dec 15, 2023
1 parent ac1b2c7 commit f78266e
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 34 deletions.
21 changes: 8 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,25 @@
__⚠️ Work in progress!__
# Nest 🪺

A layer around the `wnfs` package that provides a `FileSystem` class, transactions, a root tree and some other essentials.
A layer around the `wnfs` package that provides a `FileSystem` class, a root tree, mounts, transactions and some other essentials.

## Features

- A file system class that allows for an easy-to-use mutable API.
- A transaction system, rewinding the state if an error occurs.
- Creates a private forest automatically with a RSA modules using the Web Crypto API (supported on multiple platforms)
_More info in the [package readme](https://github.com/wnfs-wg/nest/tree/main/packages/nest/readme.md)._

## Packages

- [package1](https://github.com/fission-codes/js-template/tree/master/packages/package1) - description
- [package2](https://github.com/fission-codes/js-template/tree/master/packages/package2) - description
- [nest](https://github.com/wnfs-wg/nest/tree/main/packages/nest) - The primary `nest` package.

## Examples

- [`demo`](https://github.com/fission-codes/js-template/tree/master/examples/demo) - description
- [`demo`](https://github.com/wnfs-wg/nest/tree/main/examples/demo) - A simple demo of how the `nest` package is used.

### Checkout examples

You can use Codesandbox <https://githubbox.com/fission-codes/js-template/tree/master/examples/demo> and start hacking right away.
You can use Codesandbox <https://githubbox.com/wnfs-wg/nest/tree/main/examples/demo> and start hacking right away.

To clone it locally:

```bash
npx tiged fission-codes/js-template/examples/demo demo
npx tiged wnfs-wg/nest/examples/demo demo
cd demo
pnpm install
pnpm dev
Expand All @@ -36,7 +31,7 @@ You can try any of the examples by replacing `demo` with the name of the example

Read contributing guidelines [here](.github/CONTRIBUTING.md).

[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/hd-template/examples)
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/wnfs-wg/nest)

## License

Expand Down
15 changes: 4 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
{
"name": "js-template",
"name": "@wnfs-wg/nest-root",
"version": "0.0.0",
"private": true,
"workspaces": [
"packages/*",
"examples/*"
],
"workspaces": ["packages/*", "examples/*"],
"packageManager": "pnpm@8.6.1",
"engines": {
"node": ">=18"
Expand Down Expand Up @@ -40,11 +37,7 @@
},
"prettier": "@fission-codes/eslint-config/prettier.config.js",
"eslintConfig": {
"extends": [
"@fission-codes"
],
"ignorePatterns": [
"docs"
]
"extends": ["@fission-codes"],
"ignorePatterns": ["docs"]
}
}
4 changes: 2 additions & 2 deletions packages/nest/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "package1",
"name": "@wnfs-wg/nest",
"type": "module",
"version": "0.0.1",
"version": "0.1.0",
"description": "Example package description.",
"author": "Steven Vandevelde <icid.asset@gmail.com> (tokono.ma)",
"license": "(Apache-2.0 AND MIT)",
Expand Down
22 changes: 14 additions & 8 deletions packages/nest/readme.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
# Package 1
# Nest 🪺

[![npm (scoped)](https://img.shields.io/npm/v/%40fission-codes/eslint-config)](https://www.npmjs.com/package/@fission-codes/eslint-config)
[![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/fission-codes/stack/eslint-config.yml)](https://github.com/fission-codes/stack/actions/workflows/eslint-config.yml)
[![Built by FISSION](https://img.shields.io/badge/built_by-⌘_Fission-purple.svg)](https://fission.codes)
[![Discord](https://img.shields.io/discord/478735028319158273?&color=mediumslateblue)](https://discord.gg/zAQBDEq)
[![Discourse users](<https://img.shields.io/discourse/users?server=https%3A%2F%2Ftalk.fission.codes&label=talk&color=rgb(14%2C%20118%2C%20178)>)](https://talk.fission.codes)

Fission eslint, ts and prettier config.
## Features

- A file system class that allows for an easy-to-use mutable API.
- A root tree, holding references to all the needed individual parts (public fs, private forest, exchange, etc)
- A unix-fs compatibility layer for the public file system (allows for public files to be viewed through, for example, IPFS gateways)
- A mounting system for private nodes, mount specific paths.
- Provides a transaction system, rewinding the state if an error occurs.
- Creates a private forest automatically with a RSA modules using the Web Crypto API (supported on multiple platforms)
- Ability to verify commits to the file system. If a commit, aka. modification, is not verified, it will result in a no-op.
- And more: typed paths, events, path helpers, data casting, …

## Installation

```bash
pnpm install package1
pnpm install @wnfs-wg/nest
```

## Usage

```js
import { module } from 'package1'
import { module } from '@wnfs-wg/nest'
```

## Docs
Expand All @@ -28,7 +34,7 @@ Check <https://fission-codes.github.io/stack>

Read contributing guidelines [here](../../.github/CONTRIBUTING.md).

[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/hugomrdias/hd-template)
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/@wnfs-wg/nest)

## License

Expand Down
3 changes: 3 additions & 0 deletions packages/nest/src/class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,9 @@ export class FileSystem {
/**
* Mount private nodes onto the file system.
*
* When a `capsuleKey` is not given,
* it will create the given path instead of trying to load it.
*
* @group Mounting
*/
async mountPrivateNodes(
Expand Down

0 comments on commit f78266e

Please sign in to comment.