Skip to content
This repository was archived by the owner on Dec 22, 2024. It is now read-only.

Commit e02b40d

Browse files
committed
chore: scaffold project structure
1 parent 17b25f4 commit e02b40d

File tree

6 files changed

+378
-0
lines changed

6 files changed

+378
-0
lines changed

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[*.{ts,js}]
2+
indent_style = space
3+
indent_size = 2

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.pnpm-store
2+
node_modules
3+
dist

package.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"name": "automerge-repo-storage-opfs",
3+
"version": "0.0.1",
4+
"description": "OPFS storage adapter for Automerge Repo",
5+
"repository": "https://github.com/openscript-ch/automerge-repo-storage-opfs",
6+
"type": "module",
7+
"main": "dist/index.js",
8+
"scripts": {
9+
"build": "tsc",
10+
"test": "echo \"Error: no test specified\" && exit 1"
11+
},
12+
"keywords": [],
13+
"author": "openscript Ltd. <[email protected]>",
14+
"license": "MIT",
15+
"dependencies": {
16+
"@automerge/automerge-repo": "^1.0.19",
17+
"typescript": "^5.3.3"
18+
},
19+
"publishConfig": {
20+
"access": "public"
21+
}
22+
}

pnpm-lock.yaml

Lines changed: 315 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { Chunk, StorageAdapter, StorageKey } from '@automerge/automerge-repo';
2+
3+
export class OPFSStorageAdapter extends StorageAdapter {
4+
load(key: StorageKey): Promise<Uint8Array | undefined> {
5+
throw new Error('Method not implemented.');
6+
}
7+
save(key: StorageKey, data: Uint8Array): Promise<void> {
8+
throw new Error('Method not implemented.');
9+
}
10+
remove(key: StorageKey): Promise<void> {
11+
throw new Error('Method not implemented.');
12+
}
13+
loadRange(keyPrefix: StorageKey): Promise<Chunk[]> {
14+
throw new Error('Method not implemented.');
15+
}
16+
removeRange(keyPrefix: StorageKey): Promise<void> {
17+
throw new Error('Method not implemented.');
18+
}
19+
}

tsconfig.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"compilerOptions": {
3+
"target": "ESNext",
4+
"jsx": "react",
5+
"module": "NodeNext",
6+
"moduleResolution": "Node16",
7+
"declaration": true,
8+
"declarationMap": true,
9+
"outDir": "./dist",
10+
"esModuleInterop": true,
11+
"forceConsistentCasingInFileNames": true,
12+
"strict": false,
13+
"skipLibCheck": true
14+
},
15+
"include": ["src/**/*.ts"]
16+
}

0 commit comments

Comments
 (0)