@sysce/estrogen 0.5.5 → 0.5.7
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 +30 -26
- package/dist/cjs/options.d.ts +13 -4
- package/dist/cjs/options.js +4 -0
- package/dist/esm/options.d.ts +13 -4
- package/dist/esm/options.js +4 -0
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<div align="center">
|
|
2
|
-
<img src="https://raw.githubusercontent.com/Fracital/estrogen/v0.5.
|
|
2
|
+
<img src="https://raw.githubusercontent.com/Fracital/estrogen/v0.5.7/docs/assets/estrogen.png" alt="estrogen" width="88" />
|
|
3
3
|
</div>
|
|
4
4
|
|
|
5
5
|
# @sysce/estrogen
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<div align="center">
|
|
8
8
|
<a href="https://www.npmjs.com/package/@sysce/estrogen"><img src="https://img.shields.io/npm/v/@sysce/estrogen?maxAge=3600&label=npm" alt="npm" /></a>
|
|
9
9
|
<a href="https://github.com/Fracital/estrogen/actions/workflows/ci.yml"><img src="https://github.com/Fracital/estrogen/actions/workflows/ci.yml/badge.svg?branch=main" alt="CI" /></a>
|
|
10
|
-
<a href="https://github.com/Fracital/estrogen/blob/v0.5.
|
|
10
|
+
<a href="https://github.com/Fracital/estrogen/blob/v0.5.7/LICENSE"><img src="https://img.shields.io/badge/license-ISC-blue.svg" alt="license: ISC" /></a>
|
|
11
11
|
<a href="https://github.com/Fracital/estrogen/issues"><img src="https://img.shields.io/github/issues/Fracital/estrogen?style=flat&color=orange" alt="GitHub issues" /></a>
|
|
12
12
|
<a href="https://github.com/Fracital/estrogen/stargazers"><img src="https://img.shields.io/github/stars/Fracital/estrogen?style=flat&color=orange" alt="GitHub stars" /></a>
|
|
13
13
|
</div>
|
|
@@ -48,7 +48,7 @@ an optional dependency. Supported targets: linux x64 and arm64, darwin x64 and
|
|
|
48
48
|
arm64, win32 x64.
|
|
49
49
|
|
|
50
50
|
A nightly build of `main` is published under the `nightly` dist-tag, versioned
|
|
51
|
-
like `0.5.
|
|
51
|
+
like `0.5.7-nightly.202611230617.g1a2b3c4` (UTC time and commit), once a day
|
|
52
52
|
when `main` has a new commit that passed CI:
|
|
53
53
|
|
|
54
54
|
```sh
|
|
@@ -89,11 +89,15 @@ export default defineConfig({
|
|
|
89
89
|
});
|
|
90
90
|
```
|
|
91
91
|
|
|
92
|
-
estrogen
|
|
93
|
-
|
|
92
|
+
Run estrogen on fresh bundler output. A later pass recognizes its own comment
|
|
93
|
+
header or existing generated code structure and skips protected files. Use
|
|
94
|
+
`--no-header`, `[options] header = false`, or the Node option `header: false`
|
|
95
|
+
to omit the default `generated by https://estro.help` comment. Decoder-backed
|
|
96
|
+
output remains safe to repeat and check; decoder-less no-header output needs a
|
|
97
|
+
fresh build. Changed options or canary lists need a fresh build too.
|
|
94
98
|
|
|
95
99
|
To bring packages into the build as well, run `estrogen build dist` with a
|
|
96
|
-
`[[vendor]]` config. See the [CLI reference](https://github.com/Fracital/estrogen/blob/v0.5.
|
|
100
|
+
`[[vendor]]` config. See the [CLI reference](https://github.com/Fracital/estrogen/blob/v0.5.7/docs/CLI.md).
|
|
97
101
|
|
|
98
102
|
## Benchmarks
|
|
99
103
|
|
|
@@ -106,7 +110,7 @@ file 20 times (median of 3 processes). javascript-obfuscator runs its three
|
|
|
106
110
|
shipped presets unchanged, `debugProtection` and `disableConsoleOutput`
|
|
107
111
|
included. Every build returns the same result as the original, and the VM
|
|
108
112
|
compiled every file it was given. The method and full tables are in
|
|
109
|
-
[docs/BENCHMARKS.md](https://github.com/Fracital/estrogen/blob/v0.5.
|
|
113
|
+
[docs/BENCHMARKS.md](https://github.com/Fracital/estrogen/blob/v0.5.7/docs/BENCHMARKS.md); `npm run bench` reruns it.
|
|
110
114
|
|
|
111
115
|
| | estrogen, VM | estrogen, `--no-vm` | javascript-obfuscator, default | medium | high |
|
|
112
116
|
| ---------------------------------------- | ------------ | ------------------- | ------------------------------ | -------- | --------- |
|
|
@@ -131,11 +135,11 @@ workloads the VM's size is mostly the runtime, about 9 KB gzip per file, which
|
|
|
131
135
|
`--shared-runtime` ships once for a build of ES modules. Hot code can leave the
|
|
132
136
|
VM with `--no-vm-glob`.
|
|
133
137
|
|
|
134
|
-
<img alt="Geometric mean slowdown, gzip size and build time for each tool and preset" src="https://raw.githubusercontent.com/Fracital/estrogen/v0.5.
|
|
138
|
+
<img alt="Geometric mean slowdown, gzip size and build time for each tool and preset" src="https://raw.githubusercontent.com/Fracital/estrogen/v0.5.7/docs/assets/bench/summary.png">
|
|
135
139
|
|
|
136
|
-
<img alt="Prettier format time, gzip size and build time for each tool and preset" src="https://raw.githubusercontent.com/Fracital/estrogen/v0.5.
|
|
140
|
+
<img alt="Prettier format time, gzip size and build time for each tool and preset" src="https://raw.githubusercontent.com/Fracital/estrogen/v0.5.7/docs/assets/bench/library.png">
|
|
137
141
|
|
|
138
|
-
<img alt="Steady-state slowdown against native for each workload, tool and preset" src="https://raw.githubusercontent.com/Fracital/estrogen/v0.5.
|
|
142
|
+
<img alt="Steady-state slowdown against native for each workload, tool and preset" src="https://raw.githubusercontent.com/Fracital/estrogen/v0.5.7/docs/assets/bench/slowdown.png">
|
|
139
143
|
|
|
140
144
|
## Compared with javascript-obfuscator
|
|
141
145
|
|
|
@@ -169,22 +173,22 @@ paid token, so the benchmark above runs the local package.
|
|
|
169
173
|
|
|
170
174
|
## Documentation
|
|
171
175
|
|
|
172
|
-
- [Text cloak and live injector](https://github.com/Fracital/estrogen/blob/v0.5.
|
|
176
|
+
- [Text cloak and live injector](https://github.com/Fracital/estrogen/blob/v0.5.7/docs/CLOAK.md): per-request ciphertext,
|
|
173
177
|
framework components, Ctrl+E overlays and opt-in frontend build inputs.
|
|
174
|
-
- [CLI reference](https://github.com/Fracital/estrogen/blob/v0.5.
|
|
178
|
+
- [CLI reference](https://github.com/Fracital/estrogen/blob/v0.5.7/docs/CLI.md): every flag, examples, exit codes, the
|
|
175
179
|
fail-closed rule.
|
|
176
|
-
- [Node API](https://github.com/Fracital/estrogen/blob/v0.5.
|
|
180
|
+
- [Node API](https://github.com/Fracital/estrogen/blob/v0.5.7/docs/NODE-API.md): `obfuscate()`, the esbuild, rsbuild, Vite and
|
|
177
181
|
Rollup plugins, the Astro integration, the options object, the `Report` shape.
|
|
178
|
-
- [Rust API](https://github.com/Fracital/estrogen/blob/v0.5.
|
|
179
|
-
- [Integration](https://github.com/Fracital/estrogen/blob/v0.5.
|
|
182
|
+
- [Rust API](https://github.com/Fracital/estrogen/blob/v0.5.7/docs/RUST-API.md): the `estrogen-core` public surface.
|
|
183
|
+
- [Integration](https://github.com/Fracital/estrogen/blob/v0.5.7/docs/INTEGRATION.md): esbuild, rsbuild, Vite, Rollup, Astro, and
|
|
180
184
|
a plain CLI step in `package.json`.
|
|
181
|
-
- [Benchmarks](https://github.com/Fracital/estrogen/blob/v0.5.
|
|
185
|
+
- [Benchmarks](https://github.com/Fracital/estrogen/blob/v0.5.7/docs/BENCHMARKS.md): what the VM and the literal pool cost at
|
|
182
186
|
run time and load, per workload, and the harness in `bench/`.
|
|
183
|
-
- [Project status](https://github.com/Fracital/estrogen/blob/v0.5.
|
|
187
|
+
- [Project status](https://github.com/Fracital/estrogen/blob/v0.5.7/docs/PROJECT_STATUS.md): current validation and remaining
|
|
184
188
|
compatibility work.
|
|
185
|
-
- [Proxy name rename](https://github.com/Fracital/estrogen/blob/v0.5.
|
|
189
|
+
- [Proxy name rename](https://github.com/Fracital/estrogen/blob/v0.5.7/docs/PROXY-NAMES.md): the `[proxy]` table, the vendor
|
|
186
190
|
and build scopes, `keep`, and the text a rename must not change.
|
|
187
|
-
- [Proxy integration coverage](https://github.com/Fracital/estrogen/blob/v0.5.
|
|
191
|
+
- [Proxy integration coverage](https://github.com/Fracital/estrogen/blob/v0.5.7/docs/PROXY_COVERAGE.md): per-site builds,
|
|
188
192
|
browser evidence, VM percentages and remaining gaps.
|
|
189
193
|
- [Wiki](https://github.com/Fracital/estrogen/wiki): install, configuration,
|
|
190
194
|
source maps, security and limits, contributing.
|
|
@@ -194,31 +198,31 @@ paid token, so the benchmark above runs the local package.
|
|
|
194
198
|
<table>
|
|
195
199
|
<tr><th></th><th>Site</th><th>Link</th><th>Repo</th></tr>
|
|
196
200
|
<tr>
|
|
197
|
-
<td align="center" valign="middle"><img src="https://raw.githubusercontent.com/Fracital/estrogen/v0.5.
|
|
201
|
+
<td align="center" valign="middle"><img src="https://raw.githubusercontent.com/Fracital/estrogen/v0.5.7/docs/assets/brands/abstract.png" alt="abstract v2" width="28"></td>
|
|
198
202
|
<td valign="middle">abstract v2</td>
|
|
199
203
|
<td valign="middle"><a href="https://abstracteducation.loan">abstracteducation.loan</a></td>
|
|
200
204
|
<td valign="middle"></td>
|
|
201
205
|
</tr>
|
|
202
206
|
<tr>
|
|
203
|
-
<td align="center" valign="middle"><img src="https://raw.githubusercontent.com/Fracital/estrogen/v0.5.
|
|
207
|
+
<td align="center" valign="middle"><img src="https://raw.githubusercontent.com/Fracital/estrogen/v0.5.7/docs/assets/brands/fracital.svg" alt="Fracital" width="28"></td>
|
|
204
208
|
<td valign="middle">Fracital</td>
|
|
205
209
|
<td valign="middle"><a href="https://fracit.al">fracit.al</a></td>
|
|
206
210
|
<td valign="middle"><a href="https://github.com/Fracital/Fracital"><code>Fracital/Fracital</code></a></td>
|
|
207
211
|
</tr>
|
|
208
212
|
<tr>
|
|
209
|
-
<td align="center" valign="middle"><img src="https://raw.githubusercontent.com/Fracital/estrogen/v0.5.
|
|
213
|
+
<td align="center" valign="middle"><img src="https://raw.githubusercontent.com/Fracital/estrogen/v0.5.7/docs/assets/brands/systemya.png" alt="SystemYA" width="28"></td>
|
|
210
214
|
<td valign="middle">SystemYA</td>
|
|
211
215
|
<td valign="middle"><a href="https://systemya.fracit.al">systemya.fracit.al</a></td>
|
|
212
216
|
<td valign="middle"><a href="https://github.com/Fracital/SystemYA"><code>Fracital/SystemYA</code></a></td>
|
|
213
217
|
</tr>
|
|
214
218
|
<tr>
|
|
215
|
-
<td align="center" valign="middle"><img src="https://raw.githubusercontent.com/Fracital/estrogen/v0.5.
|
|
219
|
+
<td align="center" valign="middle"><img src="https://raw.githubusercontent.com/Fracital/estrogen/v0.5.7/docs/assets/brands/stomp.png" alt="STomp" width="28"></td>
|
|
216
220
|
<td valign="middle">STomp (powerMouse)</td>
|
|
217
221
|
<td valign="middle"><a href="https://stomp.fracit.al">stomp.fracit.al</a></td>
|
|
218
222
|
<td valign="middle"><a href="https://github.com/Fracital/powerMouse"><code>Fracital/powerMouse</code></a></td>
|
|
219
223
|
</tr>
|
|
220
224
|
<tr>
|
|
221
|
-
<td align="center" valign="middle"><img src="https://raw.githubusercontent.com/Fracital/estrogen/v0.5.
|
|
225
|
+
<td align="center" valign="middle"><img src="https://raw.githubusercontent.com/Fracital/estrogen/v0.5.7/docs/assets/brands/holy-unblocker.svg" alt="Holy Unblocker" width="28"></td>
|
|
222
226
|
<td valign="middle">Holy Unblocker</td>
|
|
223
227
|
<td valign="middle"><a href="https://holyunb.locker">holyunb.locker</a></td>
|
|
224
228
|
<td valign="middle"><a href="https://github.com/holy-unblocker/website2"><code>holy-unblocker/website2</code></a></td>
|
|
@@ -229,8 +233,8 @@ paid token, so the benchmark above runs the local package.
|
|
|
229
233
|
|
|
230
234
|
| | GitHub | Name |
|
|
231
235
|
| ----------------------------------------------------------------------------- | ------------------------------ | ---------- |
|
|
232
|
-
| <img src="https://raw.githubusercontent.com/Fracital/estrogen/v0.5.
|
|
236
|
+
| <img src="https://raw.githubusercontent.com/Fracital/estrogen/v0.5.7/docs/assets/am%20i%20cool%20yet.png" width="64" alt="e9x's avatar"> | [@e9x](https://github.com/e9x) | David Reed |
|
|
233
237
|
|
|
234
238
|
## License
|
|
235
239
|
|
|
236
|
-
ISC. See [LICENSE](https://github.com/Fracital/estrogen/blob/v0.5.
|
|
240
|
+
ISC. See [LICENSE](https://github.com/Fracital/estrogen/blob/v0.5.7/LICENSE).
|
package/dist/cjs/options.d.ts
CHANGED
|
@@ -121,8 +121,10 @@ export interface Options {
|
|
|
121
121
|
*/
|
|
122
122
|
jobs?: number;
|
|
123
123
|
/**
|
|
124
|
-
* Check mode (`--check`).
|
|
125
|
-
* without writing changes
|
|
124
|
+
* Check mode (`--check`). Run the passes and the canary check over a finished
|
|
125
|
+
* output directory without writing changes, and fail with exit code 2 on any
|
|
126
|
+
* unprotected file: one a run would still obfuscate, or an eligible file no
|
|
127
|
+
* pass would change. Useful in CI after the protect step.
|
|
126
128
|
*/
|
|
127
129
|
check?: boolean;
|
|
128
130
|
/**
|
|
@@ -155,10 +157,17 @@ export interface Options {
|
|
|
155
157
|
* carries its own runtime.
|
|
156
158
|
*/
|
|
157
159
|
inlineVm?: boolean;
|
|
160
|
+
/**
|
|
161
|
+
* Write the generated comment header. Default `true`. `false` passes
|
|
162
|
+
* `--no-header`; decoder-backed repeat runs recognize the existing code
|
|
163
|
+
* structure instead. Decoder-less output needs a fresh build.
|
|
164
|
+
* Cannot be combined with `marker`.
|
|
165
|
+
*/
|
|
166
|
+
header?: boolean;
|
|
158
167
|
/**
|
|
159
168
|
* The header comment for each protected file (`--marker <text>`), in place of
|
|
160
|
-
* `generated by https://estro.help`. An empty string
|
|
161
|
-
*
|
|
169
|
+
* `generated by https://estro.help`. An empty string is the legacy spelling of
|
|
170
|
+
* `header: false`. Cannot be combined with `header: false`.
|
|
162
171
|
*/
|
|
163
172
|
marker?: string;
|
|
164
173
|
/**
|
package/dist/cjs/options.js
CHANGED
|
@@ -51,6 +51,10 @@ function buildArgs(options) {
|
|
|
51
51
|
args.push('--no-minify-css');
|
|
52
52
|
if (options.inlineVm)
|
|
53
53
|
args.push('--inline-vm');
|
|
54
|
+
if (options.header === false && options.marker !== undefined)
|
|
55
|
+
throw new Error('estrogen: header: false cannot be combined with marker');
|
|
56
|
+
if (options.header === false)
|
|
57
|
+
args.push('--no-header');
|
|
54
58
|
if (options.marker !== undefined)
|
|
55
59
|
args.push('--marker', options.marker);
|
|
56
60
|
if (options.report !== undefined)
|
package/dist/esm/options.d.ts
CHANGED
|
@@ -121,8 +121,10 @@ export interface Options {
|
|
|
121
121
|
*/
|
|
122
122
|
jobs?: number;
|
|
123
123
|
/**
|
|
124
|
-
* Check mode (`--check`).
|
|
125
|
-
* without writing changes
|
|
124
|
+
* Check mode (`--check`). Run the passes and the canary check over a finished
|
|
125
|
+
* output directory without writing changes, and fail with exit code 2 on any
|
|
126
|
+
* unprotected file: one a run would still obfuscate, or an eligible file no
|
|
127
|
+
* pass would change. Useful in CI after the protect step.
|
|
126
128
|
*/
|
|
127
129
|
check?: boolean;
|
|
128
130
|
/**
|
|
@@ -155,10 +157,17 @@ export interface Options {
|
|
|
155
157
|
* carries its own runtime.
|
|
156
158
|
*/
|
|
157
159
|
inlineVm?: boolean;
|
|
160
|
+
/**
|
|
161
|
+
* Write the generated comment header. Default `true`. `false` passes
|
|
162
|
+
* `--no-header`; decoder-backed repeat runs recognize the existing code
|
|
163
|
+
* structure instead. Decoder-less output needs a fresh build.
|
|
164
|
+
* Cannot be combined with `marker`.
|
|
165
|
+
*/
|
|
166
|
+
header?: boolean;
|
|
158
167
|
/**
|
|
159
168
|
* The header comment for each protected file (`--marker <text>`), in place of
|
|
160
|
-
* `generated by https://estro.help`. An empty string
|
|
161
|
-
*
|
|
169
|
+
* `generated by https://estro.help`. An empty string is the legacy spelling of
|
|
170
|
+
* `header: false`. Cannot be combined with `header: false`.
|
|
162
171
|
*/
|
|
163
172
|
marker?: string;
|
|
164
173
|
/**
|
package/dist/esm/options.js
CHANGED
|
@@ -47,6 +47,10 @@ export function buildArgs(options) {
|
|
|
47
47
|
args.push('--no-minify-css');
|
|
48
48
|
if (options.inlineVm)
|
|
49
49
|
args.push('--inline-vm');
|
|
50
|
+
if (options.header === false && options.marker !== undefined)
|
|
51
|
+
throw new Error('estrogen: header: false cannot be combined with marker');
|
|
52
|
+
if (options.header === false)
|
|
53
|
+
args.push('--no-header');
|
|
50
54
|
if (options.marker !== undefined)
|
|
51
55
|
args.push('--marker', options.marker);
|
|
52
56
|
if (options.report !== undefined)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sysce/estrogen",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.7",
|
|
4
4
|
"description": "Post-build web obfuscator in Rust. Rewrites a built directory in place: JavaScript into a per-build bytecode VM, strings into an encrypted pool, and HTML, SVG and wasm names to match.",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "David Reed",
|
|
@@ -209,11 +209,11 @@
|
|
|
209
209
|
"prepack": "npm run build && node scripts/readme.mjs"
|
|
210
210
|
},
|
|
211
211
|
"optionalDependencies": {
|
|
212
|
-
"@sysce/estrogen-darwin-arm64": "0.5.
|
|
213
|
-
"@sysce/estrogen-darwin-x64": "0.5.
|
|
214
|
-
"@sysce/estrogen-linux-arm64": "0.5.
|
|
215
|
-
"@sysce/estrogen-linux-x64": "0.5.
|
|
216
|
-
"@sysce/estrogen-win32-x64": "0.5.
|
|
212
|
+
"@sysce/estrogen-darwin-arm64": "0.5.7",
|
|
213
|
+
"@sysce/estrogen-darwin-x64": "0.5.7",
|
|
214
|
+
"@sysce/estrogen-linux-arm64": "0.5.7",
|
|
215
|
+
"@sysce/estrogen-linux-x64": "0.5.7",
|
|
216
|
+
"@sysce/estrogen-win32-x64": "0.5.7"
|
|
217
217
|
},
|
|
218
218
|
"peerDependencies": {
|
|
219
219
|
"@rsbuild/core": "*",
|