@dgck81lnn/koishi-plugin-music 0.1.4 → 0.1.5

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 (2) hide show
  1. package/lib/index.js +1 -1
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -99,7 +99,7 @@ function apply(ctx, config) {
99
99
  catch (e) {
100
100
  return koishi_1.h.text(String(e));
101
101
  }
102
- let gutteredCode = `(${gutterFunc})(${new Function("$", "with($){" + code + "}")})`;
102
+ let gutteredCode = `(${gutterFunc})(function($){with($){\n${code}\n}})`;
103
103
  if (config.evalCommand !== "eval")
104
104
  gutteredCode = `process.stdout.write(${gutteredCode})`;
105
105
  ctx.logger.debug(config.evalCommand, gutteredCode);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dgck81lnn/koishi-plugin-music",
3
3
  "description": "Synthesize melodies in Koishi",
4
- "version": "0.1.4",
4
+ "version": "0.1.5",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [