create-fhevm-example 1.4.7 → 1.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"maintenance.d.ts","sourceRoot":"","sources":["../../../scripts/commands/maintenance.ts"],"names":[],"mappings":";AAEA;;;;;;;;;GASG;
|
|
1
|
+
{"version":3,"file":"maintenance.d.ts","sourceRoot":"","sources":["../../../scripts/commands/maintenance.ts"],"names":[],"mappings":";AAEA;;;;;;;;;GASG;AAmQH,wBAAsB,eAAe,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAqC3E"}
|
|
@@ -134,27 +134,57 @@ async function runTestPipeline(tempDir, exampleCount) {
|
|
|
134
134
|
for (let i = 0; i < testFiles.length; i++) {
|
|
135
135
|
const testFile = testFiles[i];
|
|
136
136
|
const progress = `[${i + 1}/${testFiles.length}]`;
|
|
137
|
-
|
|
137
|
+
p.log.message(`${picocolors_1.default.cyan(picocolors_1.default.bold(progress))} ${picocolors_1.default.bold(testFile)}`);
|
|
138
138
|
const testStart = Date.now();
|
|
139
139
|
const result = await (0, generators_1.runCommandWithStatus)("npx", ["hardhat", "test", `test/${testFile}`], tempDir);
|
|
140
140
|
const duration = ((Date.now() - testStart) / 1000).toFixed(1);
|
|
141
|
+
// Filter output to show only relevant test results
|
|
142
|
+
const lines = result.output.split("\n");
|
|
143
|
+
let relevantOutput = "";
|
|
144
|
+
let captured = false;
|
|
145
|
+
for (const line of lines) {
|
|
146
|
+
// Start capturing from the first non-empty line after Hardhat compilation noise
|
|
147
|
+
if (!captured &&
|
|
148
|
+
line.trim() &&
|
|
149
|
+
!line.includes("Nothing to compile") &&
|
|
150
|
+
!line.includes("Successfully compiled")) {
|
|
151
|
+
captured = true;
|
|
152
|
+
}
|
|
153
|
+
if (captured) {
|
|
154
|
+
// Skip final summary lines that we handle ourselves
|
|
155
|
+
if (line.includes("passing") || line.includes("failing")) {
|
|
156
|
+
continue;
|
|
157
|
+
}
|
|
158
|
+
if (line.trim()) {
|
|
159
|
+
relevantOutput += ` ${line}\n`;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
if (relevantOutput.trim()) {
|
|
164
|
+
p.log.message(relevantOutput);
|
|
165
|
+
}
|
|
141
166
|
if (result.success) {
|
|
142
167
|
const testResults = (0, generators_1.extractTestResults)(result.output);
|
|
143
168
|
const resultInfo = testResults
|
|
144
169
|
? picocolors_1.default.dim(`(${testResults.replace(" ✓", "")})`)
|
|
145
170
|
: "";
|
|
146
|
-
p.log.message(picocolors_1.default.green(
|
|
171
|
+
p.log.message(picocolors_1.default.green(` ✓`) +
|
|
172
|
+
` ${picocolors_1.default.dim(duration + "s")} ${picocolors_1.default.green(picocolors_1.default.bold("PASSED"))} ${resultInfo}`);
|
|
173
|
+
p.log.message("");
|
|
147
174
|
passedTests++;
|
|
148
175
|
}
|
|
149
176
|
else {
|
|
150
|
-
p.log.message(picocolors_1.default.red(
|
|
177
|
+
p.log.message(picocolors_1.default.red(` ✗`) +
|
|
178
|
+
` ${picocolors_1.default.dim(duration + "s")} ${picocolors_1.default.red(picocolors_1.default.bold("FAILED"))}`);
|
|
151
179
|
failedTests++;
|
|
152
180
|
summary.failedTests.push(testFile);
|
|
153
181
|
const errorMsg = (0, generators_1.extractErrorMessage)(result.output);
|
|
154
182
|
if (errorMsg) {
|
|
155
|
-
|
|
156
|
-
p.log.message(
|
|
183
|
+
p.log.message("");
|
|
184
|
+
p.log.message(picocolors_1.default.red(" Error Detail:"));
|
|
185
|
+
p.log.message(` ${picocolors_1.default.red(picocolors_1.default.dim(errorMsg.replace(/\n/g, "\n ")))}`);
|
|
157
186
|
}
|
|
187
|
+
p.log.message("");
|
|
158
188
|
}
|
|
159
189
|
}
|
|
160
190
|
const totalDuration = ((Date.now() - startTime) / 1000).toFixed(1);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-fhevm-example",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.8",
|
|
4
4
|
"description": "Create FHEVM example projects with a single command - A comprehensive toolkit for building privacy-preserving smart contracts",
|
|
5
5
|
"bin": {
|
|
6
6
|
"create-fhevm-example": "./dist/scripts/index.js"
|
|
@@ -14,16 +14,16 @@
|
|
|
14
14
|
],
|
|
15
15
|
"scripts": {
|
|
16
16
|
"build": "tsc",
|
|
17
|
-
"create": "LOCAL_DEV=1
|
|
18
|
-
"create:example": "
|
|
19
|
-
"create:category": "
|
|
20
|
-
"create:docs": "
|
|
21
|
-
"test:all": "
|
|
22
|
-
"generate:config": "
|
|
23
|
-
"doctor": "
|
|
24
|
-
"help:create": "LOCAL_DEV=1
|
|
25
|
-
"help:docs": "
|
|
26
|
-
"help:test": "
|
|
17
|
+
"create": "LOCAL_DEV=1 ts-node scripts/index.ts",
|
|
18
|
+
"create:example": "ts-node scripts/index.ts --example",
|
|
19
|
+
"create:category": "ts-node scripts/index.ts --category",
|
|
20
|
+
"create:docs": "ts-node scripts/commands/generate-docs.ts",
|
|
21
|
+
"test:all": "ts-node scripts/commands/maintenance.ts test-all",
|
|
22
|
+
"generate:config": "ts-node scripts/commands/generate-config.ts",
|
|
23
|
+
"doctor": "ts-node scripts/commands/doctor.ts",
|
|
24
|
+
"help:create": "LOCAL_DEV=1 ts-node scripts/index.ts --help",
|
|
25
|
+
"help:docs": "ts-node scripts/commands/generate-docs.ts --help",
|
|
26
|
+
"help:test": "ts-node scripts/commands/maintenance.ts test-all --help",
|
|
27
27
|
|
|
28
28
|
"prepare": "git submodule update --init --recursive || true",
|
|
29
29
|
"prepublishOnly": "npm run build",
|