Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 53 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,56 @@ src/zkaf/inputs/*.json
*.png
node_modules
.DS_Store
default_*
default_*
.vscode/
*.pem

# dependencies
node_modules
.pnp
.pnp.js

# testing
coverage

# next.js
.next/
out/
build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

# turbo
.turbo

# vercel
.vercel

# graph
data
dist

# misc
packages/host-node/fixtures/*.data.json

# rust build
target

# generated docs
docs/packages
docs/index.*
yarn.lock
30 changes: 30 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/env sh
CARGO_MANIFESTS=(
"./src/contracts/nft/Cargo.toml"
"./src/contracts/verifier/contract/Cargo.toml"
"./src/contracts/nft/nft/Cargo.toml"
"./src/bitte_plugin/Cargo.toml"
"./src/near_indexer/Cargo.toml"
)

fail=0

for manifest in "${CARGO_MANIFESTS[@]}"; do
echo "Formatting project at $manifest"
# Run formatting
cargo fmt --manifest-path "$manifest"
# Run check
cargo fmt --manifest-path "$manifest" -- --check
if [ $? -ne 0 ]; then
echo "Rust formatting check failed for $manifest! Please run 'cargo fmt --manifest-path $manifest' to fix formatting."
fail=1
else
echo "Project at $manifest is correctly formatted! ✅"
fi
done

if [ $fail -ne 0 ]; then
exit 1
fi

echo "All Rust files in all projects are correctly formatted! ✅"
8 changes: 4 additions & 4 deletions .infisical.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"workspaceId": "661f17895c46394dc36d7279",
"defaultEnvironment": "",
"gitBranchToEnvironmentMapping": null
}
"workspaceId": "661f17895c46394dc36d7279",
"defaultEnvironment": "",
"gitBranchToEnvironmentMapping": null
}
1 change: 0 additions & 1 deletion .vscode/NOTES.txt

This file was deleted.

18 changes: 18 additions & 0 deletions lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = {
"**/*.{js,ts,cjs,mjs,cts,mts,json,jsonc}": (files) => {
// Filter out files in the .vscode folder.
const filteredFiles = files.filter(
(file) => !file.startsWith(".vscode/") && !file.includes("/.vscode/"),
);

// If no files remain after filtering, do nothing.
if (filteredFiles.length === 0) return [];

return [
// Run biome format fix on the filtered files.
`npx biome format --fix ${filteredFiles.join(" ")}`,
// Run biome check write on the filtered files.
`npx biome check --write ${filteredFiles.join(" ")}`,
];
},
};
33 changes: 33 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"name": "verity_dp",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"prepare": "husky",
"format": "npx biome format --fix",
"lint": "npx biome check ",
"lint:fix": "npx biome check --fix"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {},
"devDependencies": {
"@biomejs/biome": "^1.9.4",
"husky": "^9.1.7",
"lint-staged": "^15.5.0"
},
"lint-staged": {
"src/*.{ts,jsonc}": ["npx biome format --fix"]
},
"lint-staged:ignore": [".vscode/"],
"pnpm": {
"onlyBuiltDependencies": ["esbuild", "secp256k1"]
},
"biome": {
"formatter": {
"formatWithErrors": true
}
}
}
Loading
Loading