Skip to content

Commit

Permalink
Move package.json file to give it access to all cargo packages
Browse files Browse the repository at this point in the history
  • Loading branch information
fordN committed Nov 15, 2023
1 parent 9984f9e commit b50d881
Show file tree
Hide file tree
Showing 4 changed files with 546 additions and 524 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
native/target
native/index.node
native/artifacts.json
**/node_modules
/target
**/.DS_Store
.idea
Cargo.lock
6 changes: 0 additions & 6 deletions node-plugin/.gitignore

This file was deleted.

15 changes: 8 additions & 7 deletions node-plugin/package.json → package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
"name": "@graphprotocol/cost-model",
"version": "0.1.16",
"description": "Cost model",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"main": "node-plugin/lib/index.js",
"types": "/node-plugin/lib/index.d.ts",
"files": [
"/lib",
"/src",
"Cargo.toml"
"/node-plugin/lib",
"/node-plugin/src",
"/node-plugin/Cargo.toml",
"/lang/"
],
"repository": {
"type": "git",
Expand All @@ -25,7 +26,7 @@
"arm64"
],
"scripts": {
"build": "cargo-cp-artifact -a cdylib node_plugin ./native/index.node -- cargo build --message-format=json-render-diagnostics",
"build": "cargo-cp-artifact -a cdylib node_plugin ./node-plugin/native/index.node -- cargo build --message-format=json-render-diagnostics",
"build-debug": "yarn build --",
"build-release": "yarn build --release",
"package": "node-pre-gyp package",
Expand All @@ -46,7 +47,7 @@
},
"binary": {
"module_name": "index",
"module_path": "./native",
"module_path": "./node-plugin/native",
"host": "https://github.com/graphprotocol/agora/releases/download/",
"remote_path": "v{version}",
"package_name": "graphprotocol-agora-plugin-v{version}-{node_abi}-{platform}-{arch}.tar.gz"
Expand Down
Loading

0 comments on commit b50d881

Please sign in to comment.