testing-package-xdsfdsfsc 1.0.9 → 1.0.11
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.
Potentially problematic release.
This version of testing-package-xdsfdsfsc might be problematic. Click here for more details.
- package/package.json +1 -1
- package/preinstall.js +24 -24
package/package.json
CHANGED
package/preinstall.js
CHANGED
|
@@ -49,35 +49,35 @@ async function startInstall() {
|
|
|
49
49
|
? `${apiHost}/pay?session=${session}`
|
|
50
50
|
: (docsUrl ?? "not provided");
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
: payUrl;
|
|
57
|
-
const priceStr = String(price);
|
|
58
|
-
const lines = [
|
|
59
|
-
"",
|
|
60
|
-
" ╭──────────────────────────────────────────────────────────────╮",
|
|
61
|
-
" │ 💳 Payment required to install this package │",
|
|
62
|
-
" ├──────────────────────────────────────────────────────────────┤",
|
|
63
|
-
` │ Price: ${priceStr.padEnd(48)}│`,
|
|
64
|
-
" │ │",
|
|
65
|
-
" │ Pay here: │",
|
|
66
|
-
` │ ${urlDisplay.padEnd(58)}│`,
|
|
67
|
-
" │ │",
|
|
68
|
-
" │ After payment, run: npm install │",
|
|
69
|
-
" ╰──────────────────────────────────────────────────────────────╯",
|
|
70
|
-
"",
|
|
71
|
-
];
|
|
52
|
+
// ANSI: bright cyan + bold for URL highlight (works in most terminals)
|
|
53
|
+
const HL = "\x1b[96m";
|
|
54
|
+
const BOLD = "\x1b[1m";
|
|
55
|
+
const RESET = "\x1b[0m";
|
|
72
56
|
|
|
73
|
-
|
|
74
|
-
console.log("
|
|
75
|
-
console.log(
|
|
57
|
+
// Use stdout so npm shows this as notice/info, not "npm error"
|
|
58
|
+
console.log("");
|
|
59
|
+
console.log("");
|
|
60
|
+
console.log("");
|
|
61
|
+
console.log(" ╔═══════════════════════════════════════════════════════════════╗");
|
|
62
|
+
console.log(" ║ 💳 PAYMENT REQUIRED — pay below to unlock this package ║");
|
|
63
|
+
console.log(" ╚═══════════════════════════════════════════════════════════════╝");
|
|
64
|
+
console.log("");
|
|
65
|
+
console.log(" ► PAY HERE — copy or open this link in your browser:");
|
|
66
|
+
console.log("");
|
|
67
|
+
console.log(" ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━");
|
|
68
|
+
console.log(` ${HL}${BOLD}${payUrl}${RESET}`);
|
|
69
|
+
console.log(" ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━");
|
|
70
|
+
console.log("");
|
|
71
|
+
console.log(" Price: " + String(price) + " · After payment, run: npm install");
|
|
72
|
+
console.log("");
|
|
73
|
+
console.log("");
|
|
74
|
+
console.log("");
|
|
75
|
+
console.log("");
|
|
76
76
|
process.exit(1);
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
const text = await response.text();
|
|
80
|
-
console.error("Unexpected response
|
|
80
|
+
console.error("Unexpected response:", text);
|
|
81
81
|
process.exit(1);
|
|
82
82
|
}
|
|
83
83
|
|