refactor: move to new build system and cleanup/update deps
This commit is contained in:
parent
9bd04de7bb
commit
7d94995dd5
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"preset": [
|
||||||
|
"@lumeweb/presetter-relay-plugin-preset"
|
||||||
|
]
|
||||||
|
}
|
12
build.js
12
build.js
|
@ -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"',
|
|
||||||
}
|
|
||||||
});
|
|
6
build.sh
6
build.sh
|
@ -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
|
|
File diff suppressed because it is too large
Load Diff
29
package.json
29
package.json
|
@ -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.8",
|
||||||
"@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"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
{
|
{
|
||||||
"plugins": [
|
"core": {
|
||||||
"ipfs"
|
"plugins": [
|
||||||
]
|
"ipfs"
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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> {
|
||||||
|
|
|
@ -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
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue