Skip to content

Commit bfd4947

Browse files
committed
helper functions
depens updates
1 parent ed2c260 commit bfd4947

File tree

9 files changed

+1299
-174
lines changed

9 files changed

+1299
-174
lines changed

.gitignore

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@ node_modules
2929
############
3030
tests/*
3131

32+
# VIAT SITE #
33+
############
34+
viat/centralSite/*
35+
36+
# DBs #
37+
############
38+
*.mdb
39+
3240
# Testing #
3341
############
3442
tempCodeRunnerFile.js
@@ -63,4 +71,4 @@ Thumbs.db
6371
.nx/cache
6472
.nx/workspace-data
6573
.cursor/rules/nx-rules.mdc
66-
.github/instructions/nx.instructions.md
74+
.github/instructions/nx.instructions.md

examples/viat.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,18 @@ const txCore = {
3838
};
3939
async function exampleTX() {
4040
const txBlock = await viatNetwork.createTransaction(txCore, amy);
41-
// await viatNetwork.saveBlock(txBlock);
41+
await viatNetwork.saveBlock(txBlock);
42+
// await viatNetwork.saveBlock(txBlock.receipt);
4243
return txBlock;
4344
}
45+
// const exmplTX = await exampleTX();
46+
// console.log('txblock', exmplTX.block);
47+
// console.log('txblock', await exmplTX.getPath());
48+
// console.log('txblock', await exmplTX.receipt.getPath());
4449
// await exampleTX();
45-
await viatNetwork.submitTransaction(await exampleTX());
46-
console.log('mempool', viatNetwork.mempool);
47-
// await loop(exampleTX);
50+
// await viatNetwork.submitTransaction(await exampleTX());
51+
// console.log('mempool', viatNetwork.mempool);
52+
await loop(exampleTX);
4853
// const exmplTX = await exampleTX();
4954
// console.log('txblock', exmplTX.block);
5055
// console.log('txblock', await exmplTX.getPath());

examples/viatBench.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// Various optimization strategies could be used but for now will be kept this way to get a full feel of each event
2-
const sol = 'SOL';
2+
const txs = 'TXs & Receipts';
33
const amount = 60000;
44
const c = console.log;
5-
// console.log = () => {};
5+
console.log = () => {};
66
function logit(times) {
7-
c(sol, amount, Date.now() - times);
7+
c(txs, amount, Date.now() - times);
88
}
99
export async function loop(func) {
1010
// let count = 0;
@@ -18,3 +18,4 @@ export async function loop(func) {
1818
}
1919
}
2020
}
21+
// 10K - 50K Files/Folders

package.json

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@universalweb/network",
2+
"name": "network",
33
"appId": "universalWeb.browser",
44
"author": "Universal Web",
55
"type": "module",
@@ -20,10 +20,12 @@
2020
"boxen": "^8.0.1",
2121
"cbor-x": "^1.6.0",
2222
"colorette": "^2.0.20",
23-
"commander": "^14.0.0",
23+
"commander": "^14.0.1",
2424
"directory-tree": "^3.5.2",
25+
"du": "^1.0.0",
2526
"electron": "latest",
26-
"fs-extra": "^11.3.1",
27+
"fs-extra": "^11.3.2",
28+
"get-folder-size": "^5.0.0",
2729
"hash-wasm": "^4.12.0",
2830
"install": "^0.13.0",
2931
"ip": "^2.0.1",
@@ -120,7 +122,9 @@
120122
"publish": "pnpm update && pnpm run bumpVersion && pnpm run changelog",
121123
"varmemtest": "nodemon -expose-gc --watch 'memoryTests.js' memoryTests.js",
122124
"updateAll": "pnpm update --latest",
123-
"installMain": "pnpm install --no-optional"
125+
"installMain": "pnpm install --no-optional",
126+
"test": "NODE_ENV=test vitest run",
127+
"test:watch": "NODE_ENV=test vitest"
124128
},
125129
"version": "5.0.0",
126130
"designVersion": "5.0.0",
@@ -129,14 +133,16 @@
129133
"@babel/preset-env": "^7.28.3",
130134
"@stylistic/eslint-plugin": "^5.3.1",
131135
"auto-changelog": "^2.5.0",
132-
"axios": "^1.11.0",
136+
"axios": "^1.12.2",
133137
"benchmark": "^2.1.4",
134-
"daisyui": "^5.1.10",
138+
"daisyui": "^5.1.13",
135139
"eslint": "^9.35.0",
136-
"eslint-plugin-jsdoc": "^55.2.0",
140+
"eslint-plugin-jsdoc": "^59.0.2",
137141
"globals": "^16.4.0",
142+
"supertest": "^7.1.4",
138143
"tailwindcss": "^4.1.13",
139-
"textlint": "^15.2.2"
144+
"textlint": "^15.2.2",
145+
"vitest": "^3.2.4"
140146
},
141147
"overrides": {
142148
"pqclean": "latest"
@@ -157,5 +163,5 @@
157163
"lru-cache"
158164
]
159165
},
160-
"packageManager": "pnpm@10.14.0"
166+
"packageManager": "pnpm@10.17.0"
161167
}

0 commit comments

Comments
 (0)