aiblueprint-cli 1.4.14 → 1.4.15
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/dist/cli.js +16 -11
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -35434,7 +35434,7 @@ function getTokenInfo() {
|
|
|
35434
35434
|
// src/commands/pro.ts
|
|
35435
35435
|
var import_fs_extra16 = __toESM(require_lib4(), 1);
|
|
35436
35436
|
var API_URL = "https://codeline.app/api/products";
|
|
35437
|
-
var
|
|
35437
|
+
var PRODUCT_IDS = ["prd_XJVgxVPbGG", "prd_NKabAkdOkw"];
|
|
35438
35438
|
async function countInstalledItems(claudeDir) {
|
|
35439
35439
|
const counts = {
|
|
35440
35440
|
commands: 0,
|
|
@@ -35490,18 +35490,23 @@ async function proActivateCommand(userToken) {
|
|
|
35490
35490
|
userToken = result;
|
|
35491
35491
|
}
|
|
35492
35492
|
const spinner = Y2();
|
|
35493
|
-
spinner.start("Validating token...");
|
|
35494
|
-
|
|
35495
|
-
|
|
35496
|
-
|
|
35497
|
-
|
|
35498
|
-
|
|
35499
|
-
|
|
35493
|
+
spinner.start("Validating token against premium products...");
|
|
35494
|
+
let validationSuccess = false;
|
|
35495
|
+
let data = null;
|
|
35496
|
+
for (const productId of PRODUCT_IDS) {
|
|
35497
|
+
const response = await fetch(`${API_URL}/${productId}/have-access?token=${userToken}`);
|
|
35498
|
+
if (response.ok) {
|
|
35499
|
+
const responseData = await response.json();
|
|
35500
|
+
if (responseData.hasAccess) {
|
|
35501
|
+
data = responseData;
|
|
35502
|
+
validationSuccess = true;
|
|
35503
|
+
break;
|
|
35504
|
+
}
|
|
35505
|
+
}
|
|
35500
35506
|
}
|
|
35501
|
-
|
|
35502
|
-
if (!data.hasAccess) {
|
|
35507
|
+
if (!validationSuccess || !data) {
|
|
35503
35508
|
spinner.stop("Token validation failed");
|
|
35504
|
-
M2.error(
|
|
35509
|
+
M2.error("Invalid token or no access to premium products");
|
|
35505
35510
|
M2.info("\uD83D\uDC8E Get AIBlueprint CLI Premium at: https://mlv.sh/claude-cli");
|
|
35506
35511
|
Se(source_default.red("❌ Activation failed"));
|
|
35507
35512
|
process.exit(1);
|