jso-protector 0.4.5 → 0.4.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/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.7 - 2026-08-31
4
+
5
+ Attribution only. No behaviour changes.
6
+
7
+ - The dashboard links the CLI opens now carry a source tag: `src=cli-login`
8
+ from `login`, and `src=cli-nokey` / `src=cli-nopwd` from the missing-credential
9
+ errors. A sign-up that starts at the CLI was previously indistinguishable from
10
+ a web sign-up, which made the free first run impossible to measure.
11
+ - Held back until the site could actually read the tag. It was being lost twice
12
+ on the way: the dashboard bounced signed-out visitors to sign-in without the
13
+ query string, and the sign-in page then hardcoded its own tag over whatever
14
+ arrived. Both are fixed and live, verified end to end before this release.
15
+
16
+ ## 0.4.6 - 2026-08-31
17
+
18
+ Documentation only. No behaviour changes.
19
+
20
+ - **The README said you needed an API key to use this package.** Since 0.4.5
21
+ that is false for a first run, and it was the first thing anyone read on
22
+ npmjs.com - so the page was arguing against the feature the release shipped.
23
+ The quickstart now says no account is needed, "What you need" answers
24
+ "nothing, to start", and the payment section describes the free tier and where
25
+ it ends instead of claiming the package unlocks nothing on its own.
26
+ - The quickstart installs `javascriptobfuscator-com` and calls
27
+ `javascriptobfuscator`, the current names.
28
+
3
29
  ## 0.4.5 - 2026-08-31
4
30
 
5
31
  - **The first command now works without an account.** With no credentials at
package/README.md CHANGED
@@ -9,20 +9,29 @@ Node API, and plugins for webpack, Vite, Rollup, esbuild, Next.js, Metro, and
9
9
  the rest of the toolchain.
10
10
 
11
11
  ```bash
12
- npm install --save-dev jso-protector
13
- npx jso-protector --input dist --output dist-protected
12
+ npm install --save-dev javascriptobfuscator-com
13
+ npx javascriptobfuscator --input dist --output dist-protected
14
14
  ```
15
15
 
16
+ **No account needed to try it.** With no credentials configured the run uses the
17
+ free tier - up to 20 files and 200 KB per request, rate limited, no VM
18
+ protection - and tells you so. `npx javascriptobfuscator login` switches to your
19
+ plan when you need more.
20
+
16
21
  That protects every JavaScript file in `dist/` and writes the result to
17
22
  `dist-protected/`. Nothing else in your build has to change.
18
23
 
19
24
  ## What you need
20
25
 
21
- An API key and password from your [javascriptobfuscator.com](https://javascriptobfuscator.com/)
22
- dashboard, passed as `--api-key` / `--api-password` or read from the
23
- `JSO_API_KEY` and `JSO_API_PASSWORD` environment variables. Run
24
- `npx jso-protector --doctor` to check credentials, paths, and file matching
25
- before you wire it into CI.
26
+ Nothing, to start. A run with no credentials goes to the free tier.
27
+
28
+ Beyond it - more than 20 files or 200 KB in one request, compression, renaming,
29
+ control-flow flattening, VM protection - you need a key and password from your
30
+ [javascriptobfuscator.com](https://javascriptobfuscator.com/) dashboard. Run
31
+ `npx javascriptobfuscator login` to sign in once and store them, or pass
32
+ `--api-key` / `--api-password`, or set `JSO_API_KEY` and `JSO_API_PASSWORD`.
33
+ Run `npx javascriptobfuscator --doctor` to check credentials, paths, and file
34
+ matching before you wire it into CI.
26
35
 
27
36
  ## Already using another obfuscator?
28
37
 
@@ -318,7 +327,9 @@ internal remediation.
318
327
 
319
328
  ## Payment and API Access
320
329
 
321
- `jso-protector` is a localhost developer client for the paid JavaScript Obfuscator service: it drives the hosted API by default, or the bundled `jso-local` protector with `--local`. The npm package does not unlock protection by itself and does not contain payment logic.
330
+ This package is a client. It drives the hosted API by default, or the bundled `jso-local` protector with `--local`. Protection itself, billing and every plan limit live on the server, never in this package.
331
+
332
+ A request with no credentials is served on the **free tier**: up to 20 files and 200 KB per request, rate limited per IP, no VM protection. Everything above that is a paid plan, enforced server-side.
322
333
 
323
334
  Payment and account enforcement stay on `javascriptobfuscator.com`:
324
335
 
@@ -4702,8 +4702,8 @@ function isAnonymousRun(config) {
4702
4702
 
4703
4703
  function assertReady(config) {
4704
4704
  if (isAnonymousRun(config)) return;
4705
- if (!config.apiKey) throw new Error("Missing API key. Run `javascriptobfuscator login` to sign in and save credentials, or create a key at https://javascriptobfuscator.com/dashboard/APIKeys.aspx and set JSO_API_KEY.");
4706
- if (!config.apiPassword) throw new Error("Missing API password. Run `javascriptobfuscator login` to sign in and save credentials, or copy it from https://javascriptobfuscator.com/dashboard/APIKeys.aspx and set JSO_API_PASSWORD.");
4705
+ if (!config.apiKey) throw new Error("Missing API key. Run `javascriptobfuscator login` to sign in and save credentials, or create a key at https://javascriptobfuscator.com/dashboard/APIKeys.aspx?src=cli-nokey and set JSO_API_KEY.");
4706
+ if (!config.apiPassword) throw new Error("Missing API password. Run `javascriptobfuscator login` to sign in and save credentials, or copy it from https://javascriptobfuscator.com/dashboard/APIKeys.aspx?src=cli-nopwd and set JSO_API_PASSWORD.");
4707
4707
  }
4708
4708
 
4709
4709
  function sha256(value) {
@@ -4884,8 +4884,8 @@ async function runDoctor(config, args = {}) {
4884
4884
  const checks = [];
4885
4885
  const limitations = collectCompetitorLimitations(args.rawConfig && typeof args.rawConfig === "object" ? args.rawConfig : config, args);
4886
4886
  addDoctorCheck(checks, "endpoint", isValidUrl(config.endpoint), `Endpoint: ${config.endpoint}`, "Endpoint must be a valid URL.");
4887
- addDoctorCheck(checks, "apiKey", !!config.apiKey, "API key is present.", "Missing API key. Run `javascriptobfuscator login` to sign in and save credentials, or create a key at https://javascriptobfuscator.com/dashboard/APIKeys.aspx and set JSO_API_KEY.");
4888
- addDoctorCheck(checks, "apiPassword", !!config.apiPassword, "API password is present.", "Missing API password. Run `javascriptobfuscator login` to sign in and save credentials, or copy it from https://javascriptobfuscator.com/dashboard/APIKeys.aspx and set JSO_API_PASSWORD.");
4887
+ addDoctorCheck(checks, "apiKey", !!config.apiKey, "API key is present.", "Missing API key. Run `javascriptobfuscator login` to sign in and save credentials, or create a key at https://javascriptobfuscator.com/dashboard/APIKeys.aspx?src=cli-nokey and set JSO_API_KEY.");
4888
+ addDoctorCheck(checks, "apiPassword", !!config.apiPassword, "API password is present.", "Missing API password. Run `javascriptobfuscator login` to sign in and save credentials, or copy it from https://javascriptobfuscator.com/dashboard/APIKeys.aspx?src=cli-nopwd and set JSO_API_PASSWORD.");
4889
4889
  addDoctorCheck(checks, "preset", true, `Preset: ${config.preset}`);
4890
4890
  addDoctorCheck(checks, "options", Object.keys(config.options || {}).length > 0, `${Object.keys(config.options || {}).length} option(s) enabled.`, "No protection options are enabled.");
4891
4891
 
@@ -7154,8 +7154,8 @@ function validateProtectionConfig(config, args = {}) {
7154
7154
  }
7155
7155
 
7156
7156
  addValidationCheck(checks, "endpoint", isValidUrl(resolved.endpoint) ? "ok" : "error", isValidUrl(resolved.endpoint) ? `Endpoint: ${resolved.endpoint}` : "Endpoint must be a valid HTTP or HTTPS URL.");
7157
- addValidationCheck(checks, "apiKey", resolved.apiKey ? "ok" : "error", resolved.apiKey ? "API key is present." : "Missing API key. Run `javascriptobfuscator login` to sign in and save credentials, or create a key at https://javascriptobfuscator.com/dashboard/APIKeys.aspx and set JSO_API_KEY.");
7158
- addValidationCheck(checks, "apiPassword", resolved.apiPassword ? "ok" : "error", resolved.apiPassword ? "API password is present." : "Missing API password. Run `javascriptobfuscator login` to sign in and save credentials, or copy it from https://javascriptobfuscator.com/dashboard/APIKeys.aspx and set JSO_API_PASSWORD.");
7157
+ addValidationCheck(checks, "apiKey", resolved.apiKey ? "ok" : "error", resolved.apiKey ? "API key is present." : "Missing API key. Run `javascriptobfuscator login` to sign in and save credentials, or create a key at https://javascriptobfuscator.com/dashboard/APIKeys.aspx?src=cli-nokey and set JSO_API_KEY.");
7158
+ addValidationCheck(checks, "apiPassword", resolved.apiPassword ? "ok" : "error", resolved.apiPassword ? "API password is present." : "Missing API password. Run `javascriptobfuscator login` to sign in and save credentials, or copy it from https://javascriptobfuscator.com/dashboard/APIKeys.aspx?src=cli-nopwd and set JSO_API_PASSWORD.");
7159
7159
  addCredentialStorageValidation(checks, config, args);
7160
7160
  addValidationCheck(checks, "preset", "ok", `Preset: ${resolved.preset}`);
7161
7161
  addValidationCheck(checks, "paths", resolved.input && resolved.output ? "ok" : "error", resolved.input && resolved.output ? "Input and output paths are configured." : "Input and output paths must be configured.");
package/credentials.js CHANGED
@@ -22,7 +22,11 @@ const path = require("path");
22
22
  const readline = require("readline");
23
23
  const { spawn } = require("child_process");
24
24
 
25
- const DASHBOARD_URL = "https://javascriptobfuscator.com/dashboard/APIKeys.aspx";
25
+ // ?src= is attribution, not decoration: a signup that starts at `login` is
26
+ // otherwise indistinguishable from a web signup, and the CLI is the entry
27
+ // point whose value we are trying to measure. register.aspx carries plan/src/deal
28
+ // forward from the referrer, so the tag survives the sign-in hop.
29
+ const DASHBOARD_URL = "https://javascriptobfuscator.com/dashboard/APIKeys.aspx?src=cli-login";
26
30
  const STORE_DIR = path.join(os.homedir() || ".", ".jso-protector");
27
31
  const STORE_FILE = path.join(STORE_DIR, "credentials.json");
28
32
 
@@ -39,7 +39,7 @@ published as `javascriptobfuscator-com`; `jso-protector` is the former name and
39
39
  is deprecated but still updated:
40
40
 
41
41
  ```bash
42
- npm install --save-dev javascriptobfuscator-com@0.4.5
42
+ npm install --save-dev javascriptobfuscator-com@0.4.7
43
43
  ```
44
44
 
45
45
  Repository contributors can instead use the existing `file:../..` development
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jso-protector",
3
- "version": "0.4.5",
3
+ "version": "0.4.7",
4
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",