jso-protector 0.4.0 → 0.4.1

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 CHANGED
@@ -1,5 +1,34 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.1 - 2026-08-27
4
+
5
+ Documentation only. No behaviour changes: the CLI, the Node API, the plugins,
6
+ and the protection engine are byte-for-byte the same as 0.4.0.
7
+
8
+ - **The npm page told visitors to install from a local path.** The README's
9
+ first instruction was `npm install --save-dev ./packages/jso-protector`, and
10
+ a later paragraph said the package was "intentionally local-only" and should
11
+ not go in a public registry — text written while it was, and left in place
12
+ when it was published. Someone arriving from npm search read an install
13
+ command that could not work and a claim that this was not a real product.
14
+ The first screen now says what the package does, installs from the registry,
15
+ and shows a two-line example.
16
+ - **Migration from another obfuscator is no longer buried.**
17
+ `--migrate-javascript-obfuscator` and `--migrate-js-confuser` convert an
18
+ existing config in one command; that was documented 1,500 lines down. It is
19
+ now on the first screen, with `--list-migration-map`, `--explain-compat`,
20
+ and `--competitor-gap-report` beside it.
21
+ - **`RELEASE.md` ships in the tarball and described the opposite of reality** —
22
+ `private: true`, `UNLICENSED`, and a publish guard that "should fail". It is
23
+ now the actual release runbook, including the site artifacts and checksums a
24
+ version bump has to keep in step.
25
+ - **Package metadata**: the description names what the tool does and the
26
+ toolchain it plugs into rather than calling itself an HTTP API wrapper, and
27
+ the keywords gained the terms people actually search for (`obfuscator`,
28
+ `code-protection`, `source-code-protection`, `anti-tamper`, `typescript`).
29
+ - Workspace and tarball install instructions still exist, under "Working from
30
+ a local checkout", where they belong.
31
+
3
32
  ## 0.4.0 - 2026-08-26
4
33
 
5
34
  - **Named configuration sets now protect.** `namedSets` — different protection
package/README.md CHANGED
@@ -1,48 +1,66 @@
1
1
  # jso-protector
2
2
 
3
- Lightweight Node.js CLI wrapper for the JavaScript Obfuscator HTTP API.
3
+ Obfuscate and protect JavaScript as part of your build: a dependency-free CLI,
4
+ Node API, and plugins for webpack, Vite, Rollup, esbuild, Next.js, Metro, and
5
+ the rest of the toolchain.
4
6
 
5
- This package is intentionally dependency-free. It is designed to close the developer workflow gap with npm-first obfuscators while keeping JavaScript Obfuscator's existing hosted API, account plans, and dashboard API keys.
7
+ ```bash
8
+ npm install --save-dev jso-protector
9
+ npx jso-protector --input dist --output dist-protected
10
+ ```
6
11
 
7
- ## Quick Start
12
+ That protects every JavaScript file in `dist/` and writes the result to
13
+ `dist-protected/`. Nothing else in your build has to change.
14
+
15
+ ## What you need
8
16
 
9
- Install from the local workspace path:
17
+ An API key and password from your [javascriptobfuscator.com](https://javascriptobfuscator.com/)
18
+ dashboard, passed as `--api-key` / `--api-password` or read from the
19
+ `JSO_API_KEY` and `JSO_API_PASSWORD` environment variables. Run
20
+ `npx jso-protector --doctor` to check credentials, paths, and file matching
21
+ before you wire it into CI.
22
+
23
+ ## Already using another obfuscator?
24
+
25
+ Bring your configuration with you rather than rewriting it:
10
26
 
11
27
  ```bash
12
- npm install --save-dev ./packages/jso-protector
13
- npx jso-protector --init
14
- npx jso-protector --init --init-template html-app --manifest dist-protected/jso-manifest.json
15
- npx jso-protector --init --init-template electron-app --input out --output out-protected
16
- npx jso-protector --init --init-template nextjs-app --manifest .next/static-protected/jso-manifest.json
17
- npx jso-protector --init --init-template vite-app --manifest dist-protected/jso-manifest.json
18
- npx jso-protector --init --init-template parcel-app --manifest dist-protected/jso-manifest.json
19
- npx jso-protector --init --init-template bun-app --manifest dist-protected/jso-manifest.json
20
- npx jso-protector --init --init-template browserify-app --manifest dist-protected/jso-manifest.json
21
- npx jso-protector --init --init-template turbopack-app --manifest .next/static-protected/jso-manifest.json
28
+ npx jso-protector --migrate-javascript-obfuscator javascript-obfuscator.json --output jso.config.json
29
+ npx jso-protector --migrate-js-confuser js-confuser.config.cjs --output jso.config.json
22
30
  ```
23
31
 
24
- For another app in the same workspace, pin the local dependency with a `file:` path:
32
+ `--list-migration-map` prints how each option maps, `--explain-compat <option>`
33
+ explains a single one, and `--competitor-gap-report` prints covered, partial,
34
+ and missing parity against common JavaScript obfuscators.
25
35
 
26
- ```json
27
- {
28
- "devDependencies": {
29
- "jso-protector": "file:../packages/jso-protector"
30
- }
31
- }
32
- ```
36
+ ## What this gives you that a static transform does not
33
37
 
34
- For internal sharing without publishing to npm, create a tarball and install that artifact inside the consuming project:
38
+ - **Protect on your own machine.** `--local` runs the bundled `jso-local`
39
+ executable instead of sending source to the hosted API.
40
+ - **Reproducible when you need it.** `--seed <value>` makes the same input,
41
+ options, and seed produce byte-identical output; omit it for the default
42
+ per-build polymorphic output.
43
+ - **Evidence you can hand to a reviewer.** `--ai-resistance-evidence`,
44
+ `--source-map-evidence`, `--vm-proof-pack`, `--deployment-hygiene-evidence`,
45
+ and `--runtime-incident-evidence` turn a build into a written report.
46
+ - **Presets instead of forty switches.** `--preset standard|balanced|maximum`,
47
+ or import a preset exported from the online tool with `--web-preset`.
48
+ - **Different profiles in one build.** `namedSets` maps file globs to their own
49
+ preset and options, so a checkout flow can ship maximum protection while
50
+ marketing pages stay on standard.
35
51
 
36
- ```bash
37
- npm pack --json
38
- npm install --save-dev path/to/jso-protector-0.4.0.tgz
39
- ```
52
+ Full option reference: [Docs / npm CLI](https://javascriptobfuscator.com/docs/npmcli.aspx)
53
+ and [Docs / npm options](https://javascriptobfuscator.com/docs/npmoptions.aspx).
40
54
 
41
- Keep local tarballs inside internal storage or build artifacts, not in public package registries.
55
+ ## Quick Start
42
56
 
43
- The package is intentionally local-only: `private:true`, `UNLICENSED`, and `prepublishOnly` block accidental npm publishing.
57
+ ```bash
58
+ npm install --save-dev jso-protector
59
+ npx jso-protector --init
60
+ ```
44
61
 
45
- `--init` supports starter templates for common release patterns:
62
+ `--init` writes a starter `jso.config.json`. It supports templates for common
63
+ release layouts:
46
64
 
47
65
  - `browser-app`: default browser build output in `dist/`
48
66
  - `html-app`: browser build output plus marked inline HTML/template script protection
@@ -58,28 +76,13 @@ The package is intentionally local-only: `private:true`, `UNLICENSED`, and `prep
58
76
  - `turbopack-app`: Next.js Turbopack production client chunks in `.next/static/` with `chunks/*.js` and nested `chunks/**/*.js` targeting
59
77
  - `react-native-app`: Metro/Expo release bundle outputs with mobile-oriented optimization defaults
60
78
 
61
- You can combine `--init` with normal config flags to scaffold a closer first draft:
79
+ Combine `--init` with normal flags to scaffold a closer first draft:
62
80
 
63
81
  ```bash
64
82
  npx jso-protector --init --init-template node-app --input build --output build-protected --manifest build-protected/jso-manifest.json
65
- ```
66
-
67
- For Electron Forge, Electron Builder, or custom desktop packaging flows that emit a release folder, start with the dedicated Electron scaffold:
68
-
69
- ```bash
70
83
  npx jso-protector --init --init-template electron-app --input out --output out-protected --manifest out-protected/jso-manifest.json
71
- ```
72
-
73
- For framework-specific release folders, start with the dedicated Next.js, Vite/Webpack-family, Turbopack, or React Native aliases:
74
-
75
- ```bash
76
84
  npx jso-protector --init --init-template next --manifest .next/static-protected/jso-manifest.json
77
85
  npx jso-protector --init --init-template vite --manifest dist-protected/jso-manifest.json
78
- npx jso-protector --init --init-template parcel --manifest dist-protected/jso-manifest.json
79
- npx jso-protector --init --init-template bun --manifest dist-protected/jso-manifest.json
80
- npx jso-protector --init --init-template browserify --manifest dist-protected/jso-manifest.json
81
- npx jso-protector --init --init-template webpack --manifest dist-protected/jso-manifest.json
82
- npx jso-protector --init --init-template rspack --manifest dist-protected/jso-manifest.json
83
86
  npx jso-protector --init --init-template turbopack --manifest .next/static-protected/jso-manifest.json
84
87
  npx jso-protector --init --init-template expo --input dist --output dist-protected
85
88
  ```
@@ -1550,6 +1553,41 @@ jobs:
1550
1553
  dist-protected/jso-manifest.json
1551
1554
  ```
1552
1555
 
1556
+ ## Working from a local checkout
1557
+
1558
+ Published releases install from the registry with
1559
+ `npm install --save-dev jso-protector`. The paths below are for building the
1560
+ package from a checkout of this repository — internal testing, a release
1561
+ candidate, or an air-gapped install.
1562
+
1563
+ Install the workspace copy directly:
1564
+
1565
+ ```bash
1566
+ npm install --save-dev ./packages/jso-protector
1567
+ ```
1568
+
1569
+ Or pin it from another app in the same workspace:
1570
+
1571
+ ```json
1572
+ {
1573
+ "devDependencies": {
1574
+ "jso-protector": "file:../packages/jso-protector"
1575
+ }
1576
+ }
1577
+ ```
1578
+
1579
+ For internal sharing without going through the registry, build a tarball and
1580
+ install that artifact in the consuming project:
1581
+
1582
+ ```bash
1583
+ npm pack --json
1584
+ npm install --save-dev path/to/jso-protector-0.4.0.tgz
1585
+ ```
1586
+
1587
+ Keep those tarballs in internal storage or build artifacts. `prepublishOnly`
1588
+ runs the full verification chain before any real publish, so a release cannot
1589
+ go out on an unverified tree.
1590
+
1553
1591
  ## Release Checklist
1554
1592
 
1555
1593
  1. Build unprotected JavaScript into a temporary output folder.
package/RELEASE.md CHANGED
@@ -1,82 +1,75 @@
1
- # Local Package Guide
1
+ # Release Guide
2
2
 
3
- This package is intentionally local-only. Keep `"private": true` and `"license": "UNLICENSED"` in `package.json` unless the product owner explicitly approves a public npm release later.
3
+ `jso-protector` is a published npm package. It is the developer-workflow front
4
+ end for JavaScript Obfuscator: protection itself runs through the hosted HTTP
5
+ API with the user's own dashboard credentials, or on their machine with
6
+ `--local`.
4
7
 
5
- ## Local Metadata Policy
8
+ ## Metadata Policy
6
9
 
7
- | Field | Required local value | Reason |
10
+ | Field | Value | Reason |
8
11
  | --- | --- | --- |
9
- | npm name | `jso-protector` | Local workspace/package name only; not reserved or published on npm. |
10
- | registry access | `"private": true` | Blocks accidental `npm publish`. |
11
- | license | `UNLICENSED` | Makes the package private/internal by default. |
12
- | credentials | Environment variables only | Keeps API credentials out of package files and logs. |
12
+ | npm name | `jso-protector` | Published name on the public registry. |
13
+ | license | `SEE LICENSE IN LICENSE` | Proprietary; the LICENSE file ships in the tarball. |
14
+ | credentials | Environment variables or CLI flags only | Keeps API credentials out of package files and logs. |
13
15
  | payment enforcement | Hosted API only | Keeps billing, account status, credits, and plan limits on the server. |
14
16
 
15
- ## Payment Model
17
+ Do not add billing logic, shared API keys, account secrets, or plan-limit
18
+ decisions to this package. The server must reject unpaid, expired, disabled, or
19
+ over-limit accounts.
16
20
 
17
- Use npm only as the local developer workflow. Users still need a paid JavaScript Obfuscator account because protection calls go to the hosted HTTP API with dashboard credentials.
18
-
19
- Do not add billing logic, shared API keys, account secrets, or plan-limit decisions to this package. The server must reject unpaid, expired, disabled, or over-limit accounts.
20
-
21
- ## Local Verification
22
-
23
- Use the package from another local project with either a workspace path:
24
-
25
- ```bash
26
- npm install --save-dev ../packages/jso-protector
27
- ```
28
-
29
- or a `file:` dependency:
30
-
31
- ```json
32
- {
33
- "devDependencies": {
34
- "jso-protector": "file:../packages/jso-protector"
35
- }
36
- }
37
- ```
38
-
39
- For internal handoff, create a tarball and install it directly in the consuming app:
40
-
41
- ```bash
42
- npm pack --json
43
- npm install --save-dev path/to/jso-protector-0.2.0.tgz
44
- ```
45
-
46
- Run the offline test suite:
21
+ ## Verification before any release
47
22
 
48
23
  ```bash
49
- npm test
24
+ npm test # offline suite
25
+ npm run smoke # package smoke
26
+ npm run verify:package # packaged contents + documentation contract
27
+ npm run verify:publish-metadata # license, files, metadata policy
28
+ npm run verify # everything, ~10 minutes
50
29
  ```
51
30
 
52
- Run the package smoke check:
53
-
54
- ```bash
55
- npm run smoke
56
- npm run verify:package
57
- ```
58
-
59
- Run the local-only metadata check:
60
-
61
- ```bash
62
- npm run verify:publish-metadata
63
- ```
64
-
65
- Run everything:
66
-
67
- ```bash
68
- npm run verify
69
- ```
70
-
71
- With test credentials only, run the live API preflight:
31
+ With test credentials only, the live API preflight:
72
32
 
73
33
  ```bash
74
34
  npm run smoke:api
75
35
  jso-protector --config jso.config.example.json --doctor --check-api --json
76
36
  ```
77
37
 
78
- ## Publish Guard
79
-
80
- The `prepublishOnly` script runs `ci/verify-publish-metadata.js` without the local-only allowance and blocks `npm publish`. `npm run verify:publish-ready` should fail while this package remains local-only.
81
-
82
- If a public npm release is ever approved, treat that as a separate product decision: choose a final package name/scope, approve a public license, add repository and support metadata, remove `private:true`, and rerun `npm run verify:publish-ready`.
38
+ `prepublishOnly` runs the verification chain again at publish time, so a release
39
+ cannot go out on an unverified tree.
40
+
41
+ ## Release loop
42
+
43
+ A version bump is not just `package.json` — the site serves matching artifacts
44
+ and their checksums, and `check-download-artifacts` fails when any of them
45
+ disagree. Work in this order:
46
+
47
+ 1. **Bump the version** in `package.json`, and anywhere an example or template
48
+ pins it. `npm run verify` catches a stale pin.
49
+ 2. **Write the CHANGELOG entry** — newest first, describing what changed for a
50
+ user rather than which files moved.
51
+ 3. **Build the artifacts** into `2026/JSO-Website/download/jso-protector/`:
52
+ ```bash
53
+ npm pack # jso-protector-<version>.tgz
54
+ ```
55
+ plus the `-server-upload.zip` companion of the same contents.
56
+ 4. **Update the published checksums** in
57
+ `2026/JSO-Website/download/SHA256SUMS.txt`, and the version strings on
58
+ `downloads.aspx`, `jso-protector.aspx`, and `Docs/NpmCli.aspx`. Bump the
59
+ `?v=` query on anything cached.
60
+ 5. **Remove the superseded artifacts** from the download folder. The inventory
61
+ check is exact: an extra file fails it as loudly as a missing one.
62
+ 6. **Run `npm run verify` again** and fix anything it finds before uploading.
63
+ 7. **Deploy the site surface** (see `trust/DEPLOY-LOG.md` for the FTPS flow and
64
+ the standing requirement to record every deploy there).
65
+ 8. **Publish**: `npm publish`. Then install from the registry into a scratch
66
+ directory and exercise the new behaviour end to end — a green local tree
67
+ proves the tarball, not the release.
68
+
69
+ ## What ships in the tarball
70
+
71
+ `files` in `package.json` is the allowlist. `verify:package` asserts the packed
72
+ contents against it, so adding a runtime file means adding it there too.
73
+ Documentation that ships to customers — `README.md`, `MIGRATION.md`,
74
+ `SECURITY.md`, and this file — is read on npmjs.com by people deciding whether
75
+ to trust the product. Keep it true to what the published package actually is.
@@ -37,7 +37,7 @@ These examples show the common release patterns:
37
37
  Install the published package before running examples:
38
38
 
39
39
  ```bash
40
- npm install --save-dev jso-protector@0.4.0
40
+ npm install --save-dev jso-protector@0.4.1
41
41
  ```
42
42
 
43
43
  Repository contributors can instead use the existing `file:../..` development
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "jso-protector",
3
- "version": "0.4.0",
4
- "description": "Command-line wrapper for JavaScript Obfuscator HTTP API workflows.",
3
+ "version": "0.4.1",
4
+ "description": "Obfuscate and protect JavaScript in your build or CI: dependency-free CLI, Node API, and webpack/Vite/Rollup/esbuild/Next.js/Metro plugins, with one-command migration from javascript-obfuscator and JS-Confuser configs.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "author": "JavaScript Obfuscator",
7
7
  "homepage": "https://javascriptobfuscator.com/docs/npmcli.aspx",
@@ -25,7 +25,17 @@
25
25
  "rollup",
26
26
  "esbuild",
27
27
  "gulp",
28
- "grunt"
28
+ "grunt",
29
+ "obfuscator",
30
+ "javascript-obfuscation",
31
+ "code-protection",
32
+ "source-code-protection",
33
+ "anti-tamper",
34
+ "minify",
35
+ "protect",
36
+ "typescript",
37
+ "nodejs",
38
+ "build-tool"
29
39
  ],
30
40
  "files": [
31
41
  "bin/",
@@ -205,7 +215,7 @@
205
215
  "smoke": "node ./bin/jso-protector.js --help && node ./bin/jso-protector.js --config ./jso.config.example.json --dry-run --json",
206
216
  "smoke:api": "node ./bin/jso-protector.js --config ./jso.config.example.json --json",
207
217
  "test": "node ./test/cli.test.js && node ./test/ai.test.js && node ./test/ai-precheck.test.js && node ./test/ai-script-governance.test.js && node ./test/data-exfiltration-guard.test.js && node ./test/compat-scan.test.js && node ./test/compliance.test.js && node ./test/evidence-forwarder.test.js && node ./test/config-schema.test.js && node ./test/countermeasures.test.js && node ./test/environment-integrity.test.js && node ./test/estimate.test.js && node ./test/github-action.test.js && node ./test/governance.test.js && node ./test/local-bridge.test.js && node ./test/managed-integrity.test.js && node ./test/named-sets.test.js && node ./test/release-signer.test.js && node ./test/scan-watermarks.test.js && node ./test/third-party-inventory.test.js && node ./test/watermark.test.js && node ./test/wire-format-vectors.test.js",
208
- "verify": "npm test && npm run verify:package && npm run verify:examples && npm run verify:publish-metadata && npm run verify:ci && npm run verify:polyglot && npm run verify:ai && npm run verify:verify-scripts-tracked && npm run verify:aspnet-bom && npm run verify:aspnet-compile && npm run verify:endrequest-guard && npm run verify:health-readiness && npm run verify:legacy-soap-security && npm run verify:online-demo-security && npm run verify:parser-engine && npm run verify:emit-validation && npm run verify:emit-validation-modern && npm run verify:runtime-defense-libraries && npm run verify:internal-links && npm run verify:seo && npm run verify:artifact-claims && npm run verify:runtime-dashboard && npm run verify:payment-page && npm run verify:payment-activation && npm run verify:payment-row-completeness && npm run verify:account-recovery && npm run verify:registration && npm run verify:admin-auth && npm run verify:http-api-auth && npm run verify:request-body-limits && npm run verify:public-form-security && npm run verify:operational-logs && npm run verify:richtexteditor-surface && npm run verify:dashboard-resource-governance && npm run verify:dashboard-diagnostic-surface && npm run verify:web-integrity-policy && npm run verify:entitlements && npm run verify:enterprise-governance && npm run verify:database-migrations && npm run verify:source-secrets && npm run verify:ignored-shipping-secrets && npm run verify:winforms-runtime-floor && npm run verify:ai-billing && npm run verify:ai-key-security && npm run verify:ajax-transport && npm run verify:competitor-gap && npm run verify:parity-defect-sync && npm run verify:source-map-evidence && npm run verify:migration-review && npm run verify:identifier-cache-review && npm run verify:runtime-defense-review && npm run verify:vm-proof && npm run verify:deployment-hygiene && npm run verify:download-artifacts && npm run verify:download-examples && npm run verify:copy-discipline && npm run verify:github-action",
218
+ "verify": "npm test && npm run verify:package && npm run verify:examples && npm run verify:publish-metadata && npm run verify:ci && npm run verify:polyglot && npm run verify:ai && npm run verify:verify-scripts-tracked && npm run verify:aspnet-bom && npm run verify:aspnet-compile && npm run verify:endrequest-guard && npm run verify:health-readiness && npm run verify:legacy-soap-security && npm run verify:online-demo-security && npm run verify:parser-engine && npm run verify:emit-validation && npm run verify:emit-validation-modern && npm run verify:runtime-defense-libraries && npm run verify:internal-links && npm run verify:seo && npm run verify:faq-visibility && npm run verify:artifact-claims && npm run verify:runtime-dashboard && npm run verify:payment-page && npm run verify:payment-activation && npm run verify:payment-row-completeness && npm run verify:account-recovery && npm run verify:registration && npm run verify:admin-auth && npm run verify:http-api-auth && npm run verify:request-body-limits && npm run verify:public-form-security && npm run verify:operational-logs && npm run verify:richtexteditor-surface && npm run verify:dashboard-resource-governance && npm run verify:dashboard-diagnostic-surface && npm run verify:web-integrity-policy && npm run verify:entitlements && npm run verify:enterprise-governance && npm run verify:database-migrations && npm run verify:source-secrets && npm run verify:ignored-shipping-secrets && npm run verify:winforms-runtime-floor && npm run verify:ai-billing && npm run verify:ai-key-security && npm run verify:ajax-transport && npm run verify:competitor-gap && npm run verify:parity-defect-sync && npm run verify:source-map-evidence && npm run verify:migration-review && npm run verify:identifier-cache-review && npm run verify:runtime-defense-review && npm run verify:vm-proof && npm run verify:deployment-hygiene && npm run verify:download-artifacts && npm run verify:download-examples && npm run verify:copy-discipline && npm run verify:github-action",
209
219
  "verify:release": "npm run verify && npm run verify:corpus-protect && npm run verify:corpus-runtime",
210
220
  "verify:verify-scripts-tracked": "node ../polyglot-smoke/check-verify-scripts-tracked.js",
211
221
  "verify:parity-defect-sync": "node ../polyglot-smoke/check-parity-defect-sync.js",
@@ -228,6 +238,7 @@
228
238
  "verify:runtime-defense-libraries": "node ../../tools/corpus-protect/runtime-defense-libraries.js",
229
239
  "verify:internal-links": "node ../polyglot-smoke/check-internal-links.js",
230
240
  "verify:seo": "node ../polyglot-smoke/check-public-seo.js",
241
+ "verify:faq-visibility": "node ../polyglot-smoke/check-faq-visibility.js",
231
242
  "verify:artifact-claims": "node ../polyglot-smoke/check-public-artifact-claims.js",
232
243
  "verify:artifact-claims-live": "node ../polyglot-smoke/check-public-artifact-claims.js --live",
233
244
  "verify:runtime-dashboard": "node ../polyglot-smoke/check-runtime-dashboard.js",