@winner-fed/winner-deploy 4.3.6 → 4.3.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.
- package/README.md +174 -161
- package/dist/index.cjs +7 -7
- package/dist/index.d.cts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +7 -7
- package/package.json +1 -1
- package/templates/see/bash/scripts/afterInstall.sh +48 -0
- package/templates/see/bash/scripts/js/confuse.js +43 -0
- package/templates/see/bash/scripts/js/confuse.sh +58 -0
- package/templates/see/bash/scripts/js/obfuscator.js +2 -0
- package/templates/see/bash/scripts/js/readme.md +16 -0
- package/templates/see/python/scripts/afterInstall.py +34 -3
- package/templates/see/python/scripts/js/confuse.js +43 -0
- package/templates/see/python/scripts/js/confuse.sh +58 -0
- package/templates/see/python/scripts/js/obfuscator.js +2 -0
- package/templates/see/python/scripts/js/readme.md +16 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
1. scripts/js/confuse.js
|
|
2
|
+
用 path.join(pkgRoot, webAppName, configBase + '.js') 定位配置文件。
|
|
3
|
+
参数:argv[1]=webAppName;argv[2]=配置名(不含 .js,默认 sysconfig);argv[3]=发布包根目录。
|
|
4
|
+
依赖 node + javascript-obfuscator(obfuscator.js),强混淆。
|
|
5
|
+
|
|
6
|
+
2. scripts/js/confuse.sh
|
|
7
|
+
无 node 时的 bash 兜底:整文件 base64 + `(function(_0x){eval(atob(_0x))})('...')` 包裹。
|
|
8
|
+
参数与 confuse.js 相同。强度远弱于 confuse.js,仅兼容无 node 环境。
|
|
9
|
+
已带 `__WINNER_BASH_OBFUSCATED__` 标记时会跳过,避免重复包裹。
|
|
10
|
+
|
|
11
|
+
3. scripts/afterInstall.sh
|
|
12
|
+
`enableObfuscation` 为真时:有 node 走 confuse.js,否则走 confuse.sh。
|
|
13
|
+
调用前先 `pkg_root=\`pwd\``,再 `cd` 到脚本目录,执行 `./js/confuse.*`。
|
|
14
|
+
|
|
15
|
+
4. genWebPackage.ts
|
|
16
|
+
`enableObfuscation === true` 时拷贝 `templates/see/{bash|python}/scripts/js` 到 `tmp/scripts/{name}/js`。
|