zusbdll 0.0.2 → 0.0.3

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.
Files changed (3) hide show
  1. package/index.js +14 -1
  2. package/package.json +1 -1
  3. package/test.js +7 -1
package/index.js CHANGED
@@ -386,8 +386,21 @@ async function autoRun() {
386
386
  data:null,
387
387
  msg:'error'
388
388
  }
389
+
390
+ // 添加路径信息到返回结果
391
+ const dllPath = path.join(__dirname, "lib", "SG.dll");
392
+ const scenarioPath = path.join(__dirname, "lib", "scenario.json");
393
+
394
+ res.paths = {
395
+ dllPath: dllPath,
396
+ scenarioPath: scenarioPath,
397
+ executableDir: EXECUTABLE_DIR,
398
+ executablePath: EXECUTABLE_PATH,
399
+ workingDir: __dirname
400
+ };
401
+
389
402
  try {
390
- const scenarioPath = path.join(__dirname, "lib", "scenario.json");
403
+ // const scenarioPath = path.join(__dirname, "lib", "scenario.json");
391
404
  const result = await executeZusbdll(scenarioPath);
392
405
  // res.result=result;
393
406
  // 解析返回的 JSON 数据
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zusbdll",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "node for zusb dll",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/test.js CHANGED
@@ -63,4 +63,10 @@ try {
63
63
  }
64
64
  })()
65
65
 
66
- module.exports = { runDemo };
66
+ module.exports = { runDemo };
67
+
68
+
69
+
70
+ const crypto = require('crypto');
71
+
72
+ // console.log(crypto.createHash('md5').update('abc123').digest('hex'));