jso-protector 0.4.6 → 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,18 @@
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
+
3
16
  ## 0.4.6 - 2026-08-31
4
17
 
5
18
  Documentation only. No behaviour changes.
@@ -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.6
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.6",
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",