zyd-server-build2 1.0.21 → 1.0.22

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/index.js +1 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -81,7 +81,7 @@ async function build({ src, dst, ignoreDir = [], ignoreFile = [], copyright = ""
81
81
  keep_fnames: true, // 默认 false。传 true来防止压缩器干掉函数名。对那些依赖
82
82
  toplevel: false
83
83
  })
84
- await fs.writeFileSync(_dst, (copyright ? "/* " + copyright + " */" : "") + result.code)
84
+ await fs.writeFileSync(_dst, (copyright ? "/* " + copyright + " */" : "") + result.code + (copyright ? `var _${generateComplexRandomString(5)}="${btoa(copyright.toString() + new Date().getFullYear() + "-" + (new Date().getUTCMonth() + 1) + "-" + new Date().getUTCDate() + "T" + new Date().getHours() + ":" + new Date().getMinutes() + ":" + new Date().getSeconds())}";` : ""))
85
85
  count[1]++
86
86
  }
87
87
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zyd-server-build2",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
4
4
  "description": "基于terser的js混淆build库,通过babel支持es6+",
5
5
  "main": "index.js",
6
6
  "scripts": {