javascript-obfuscator 5.0.1 → 5.1.0
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/CHANGELOG.md +4 -0
- package/README.md +19 -0
- package/dist/index.browser.js +1 -1
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cli.js +1 -1
- package/dist/index.cli.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/typings/src/interfaces/pro-api/IProApiClient.d.ts +1 -0
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -308,6 +308,7 @@ console.log(result.getObfuscatedCode());
|
|
|
308
308
|
* `apiConfig` (`Object`) – Pro API configuration:
|
|
309
309
|
* `apiToken` (`string`, required) – your API token from obfuscator.io
|
|
310
310
|
* `timeout` (`number`, optional) – request timeout in ms (default: `300000` - 5 minutes)
|
|
311
|
+
* `version` (`string`, optional) – JavaScript Obfuscator Pro version to use (e.g., `'5.0.0-beta.20'`). Defaults to latest version if not specified.
|
|
311
312
|
* `onProgress` (`function`, optional) – callback for progress updates during obfuscation
|
|
312
313
|
|
|
313
314
|
**Returns:** `Promise<ObfuscationResult>`
|
|
@@ -317,6 +318,24 @@ console.log(result.getObfuscatedCode());
|
|
|
317
318
|
- API token is invalid or expired
|
|
318
319
|
- API request fails
|
|
319
320
|
|
|
321
|
+
### Pro API with Specific Version
|
|
322
|
+
|
|
323
|
+
You can specify which obfuscator version to use via the `version` option:
|
|
324
|
+
|
|
325
|
+
```javascript
|
|
326
|
+
const result = await JavaScriptObfuscator.obfuscatePro(
|
|
327
|
+
sourceCode,
|
|
328
|
+
{
|
|
329
|
+
vmObfuscation: true,
|
|
330
|
+
vmObfuscationThreshold: 1
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
apiToken: 'your_javascript_obfuscator_pro_api_token',
|
|
334
|
+
version: '5.0.0-beta.20' // Use specific version
|
|
335
|
+
}
|
|
336
|
+
);
|
|
337
|
+
```
|
|
338
|
+
|
|
320
339
|
### Pro API with Progress Updates
|
|
321
340
|
|
|
322
341
|
The API uses streaming mode to provide real-time progress updates during obfuscation:
|