Compare commits

...

3 Commits

9 changed files with 19880 additions and 62 deletions

13
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,13 @@
name: Build/Publish
on:
push:
branches:
- master
- develop
- develop-*
jobs:
main:
uses: lumeweb/github-node-deploy-workflow/.github/workflows/main.yml@master
secrets: inherit

5
.presetterrc.json Normal file
View File

@ -0,0 +1,5 @@
{
"preset": [
"@lumeweb/presetter-relay-plugin-preset"
]
}

View File

@ -1,12 +0,0 @@
import esbuild from 'esbuild'
esbuild.buildSync({
entryPoints: ["src/index.ts"],
outfile: "dist/ipfs.js",
format: "cjs",
bundle: true,
platform: "node",
define: {
__dirname: '"./plugins/leveldown"',
}
});

View File

@ -1,6 +0,0 @@
#!/usr/bin/env bash
node build.js
mkdir dist/dist -p
rsync -avzP node_modules/leveldown/prebuilds dist/leveldown
cp node_modules/rabin-wasm/dist/rabin.wasm dist/dist/rabin.wasm

19848
npm-shrinkwrap.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -3,30 +3,17 @@
"type": "module", "type": "module",
"version": "0.1.0", "version": "0.1.0",
"scripts": { "scripts": {
"build": "node build.js" "prepare": "presetter bootstrap",
"build": "run build"
}, },
"readme": "ERROR: No README data found!",
"_id": "@lumeweb/relay-plugin-ipfs@0.1.0",
"devDependencies": { "devDependencies": {
"@libp2p/interface-connection-encrypter": "^3.0.6", "@lumeweb/presetter-relay-plugin-preset": "^0.1.0-develop.9",
"@libp2p/interface-peer-id": "^2.0.1", "presetter": "*"
"@libp2p/multistream-select": "^3.1.4",
"@lumeweb/relay-types": "git+https://git.lumeweb.com/LumeWeb/relay-types.git",
"@types/b4a": "^1.6.0",
"@types/streamx": "^2.9.1",
"esbuild": "^0.15.18",
"prettier": "^2.8.7",
"rimraf": "^3.0.2"
}, },
"dependencies": { "dependencies": {
"@chainsafe/libp2p-noise": "^11.0.4", "@lumeweb/interface-relay": "^0.0.2-develop.3",
"@libp2p/interface-connection": "^3.1.1", "@lumeweb/libhyperproxy": "^0.0.2-develop.2"
"@libp2p/peer-id": "^2.0.3",
"@lumeweb/libhyperproxy": "git+https://git.lumeweb.com/LumeWeb/libhyperproxy.git",
"@multiformats/multiaddr": "^11.6.1",
"b4a": "^1.6.3",
"compact-encoding": "^2.11.0",
"debug-stream": "^3.0.1",
"serialize-error": "^11.0.0",
"stream-to-it": "^0.2.4",
"streamx": "^2.13.2"
} }
} }

View File

@ -1,5 +1,7 @@
{ {
"core": {
"plugins": [ "plugins": [
"ipfs" "ipfs"
] ]
}
} }

View File

@ -1,13 +1,8 @@
import type { Plugin, PluginAPI } from "@lumeweb/relay-types"; import type { Plugin, PluginAPI } from "@lumeweb/interface-relay";
import { MultiSocketProxy } from "@lumeweb/libhyperproxy"; import { MultiSocketProxy } from "@lumeweb/libhyperproxy";
const PROTOCOL = "lumeweb.proxy.ipfs"; const PROTOCOL = "lumeweb.proxy.ipfs";
interface PeerInfoResult {
publicKey: Uint8Array;
libp2pPublicKey: Uint8Array;
}
const plugin: Plugin = { const plugin: Plugin = {
name: "ipfs", name: "ipfs",
async plugin(api: PluginAPI): Promise<void> { async plugin(api: PluginAPI): Promise<void> {

View File

@ -1,14 +0,0 @@
{
"compilerOptions": {
"target": "es2021",
"module": "commonjs",
"moduleResolution": "node",
"rootDir": "src",
"outDir": "dist",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true,
"resolveJsonModule": true
}
}