aios-core 4.2.9 → 4.2.10
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.
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
# - SHA256 hashes for change detection
|
|
8
8
|
# - File types for categorization
|
|
9
9
|
#
|
|
10
|
-
version: 4.2.
|
|
11
|
-
generated_at: "2026-02-16T15:
|
|
10
|
+
version: 4.2.10
|
|
11
|
+
generated_at: "2026-02-16T15:38:48.714Z"
|
|
12
12
|
generator: scripts/generate-install-manifest.js
|
|
13
13
|
file_count: 1004
|
|
14
14
|
files:
|
package/package.json
CHANGED
|
@@ -772,6 +772,11 @@ async function activateProByAuth(client, sessionToken) {
|
|
|
772
772
|
showInfo('Deactivate another device or upgrade your license.');
|
|
773
773
|
return { success: false, error: error.message };
|
|
774
774
|
}
|
|
775
|
+
if (error.code === 'ALREADY_ACTIVATED') {
|
|
776
|
+
// License already exists — treat as success (re-install scenario)
|
|
777
|
+
spinner.succeed('Pro license already activated for this account.');
|
|
778
|
+
return { success: true, key: 'existing', activationResult: { reactivation: true } };
|
|
779
|
+
}
|
|
775
780
|
|
|
776
781
|
spinner.fail(`Activation failed: ${error.message}`);
|
|
777
782
|
return { success: false, error: error.message };
|
|
@@ -132,14 +132,20 @@ class LicenseApiClient {
|
|
|
132
132
|
return;
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
+
// Normalize server error envelope: { error: { code, message, details } } → flat
|
|
136
|
+
const err = response.error || response;
|
|
137
|
+
const code = err.code;
|
|
138
|
+
const message = err.message;
|
|
139
|
+
const details = err.details;
|
|
140
|
+
|
|
135
141
|
// Client errors
|
|
136
142
|
switch (statusCode) {
|
|
137
143
|
case 400:
|
|
138
144
|
reject(
|
|
139
145
|
new LicenseActivationError(
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
146
|
+
message || 'Invalid request',
|
|
147
|
+
code || 'BAD_REQUEST',
|
|
148
|
+
details,
|
|
143
149
|
),
|
|
144
150
|
);
|
|
145
151
|
break;
|
|
@@ -149,28 +155,28 @@ class LicenseApiClient {
|
|
|
149
155
|
break;
|
|
150
156
|
|
|
151
157
|
case 403:
|
|
152
|
-
if (
|
|
158
|
+
if (code === 'EXPIRED_KEY') {
|
|
153
159
|
reject(LicenseActivationError.expiredKey());
|
|
154
|
-
} else if (
|
|
160
|
+
} else if (code === 'SEAT_LIMIT_EXCEEDED') {
|
|
155
161
|
reject(
|
|
156
162
|
LicenseActivationError.seatLimitExceeded(
|
|
157
|
-
|
|
158
|
-
|
|
163
|
+
details?.used || 0,
|
|
164
|
+
details?.max || 0,
|
|
159
165
|
),
|
|
160
166
|
);
|
|
161
167
|
} else {
|
|
162
168
|
reject(
|
|
163
169
|
new LicenseActivationError(
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
170
|
+
message || 'Access forbidden',
|
|
171
|
+
code || 'FORBIDDEN',
|
|
172
|
+
details,
|
|
167
173
|
),
|
|
168
174
|
);
|
|
169
175
|
}
|
|
170
176
|
break;
|
|
171
177
|
|
|
172
178
|
case 429:
|
|
173
|
-
reject(LicenseActivationError.rateLimited(response.retryAfter));
|
|
179
|
+
reject(LicenseActivationError.rateLimited(err.retryAfter || response.retryAfter));
|
|
174
180
|
break;
|
|
175
181
|
|
|
176
182
|
case 500:
|
|
@@ -178,12 +184,12 @@ class LicenseApiClient {
|
|
|
178
184
|
case 503:
|
|
179
185
|
case 504:
|
|
180
186
|
// Preserve server error code if provided (e.g., BUYER_SERVICE_UNAVAILABLE)
|
|
181
|
-
if (
|
|
187
|
+
if (code) {
|
|
182
188
|
reject(
|
|
183
189
|
new LicenseActivationError(
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
190
|
+
message || 'Server error',
|
|
191
|
+
code,
|
|
192
|
+
details,
|
|
187
193
|
),
|
|
188
194
|
);
|
|
189
195
|
} else {
|