kentutai 1.7.1 → 1.7.3
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/cli/hooks/postinstall.js
CHANGED
|
@@ -1,23 +1,48 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
const { execSync } = require("child_process");
|
|
4
3
|
const path = require("path");
|
|
5
4
|
const fs = require("fs");
|
|
5
|
+
const { execSync } = require("child_process");
|
|
6
6
|
|
|
7
|
+
const packageDir = path.resolve(__dirname, "..", "..");
|
|
7
8
|
const appDir = path.join(__dirname, "..", "app");
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
if (fs.existsSync(
|
|
11
|
-
console.log("
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
9
|
+
const tarball = path.join(__dirname, "..", "kentutai-1.3.2.tgz");
|
|
10
|
+
|
|
11
|
+
if (fs.existsSync(path.join(appDir, "server.js"))) {
|
|
12
|
+
console.log("[kentutai] Standalone build already exists.");
|
|
13
|
+
process.exit(0);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
if (!fs.existsSync(tarball)) {
|
|
17
|
+
console.log("[kentutai] Tarball not found. Skipping extraction.");
|
|
18
|
+
process.exit(0);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
console.log("[kentutai] Extracting standalone build...");
|
|
22
|
+
|
|
23
|
+
try {
|
|
24
|
+
const tempDir = path.join(packageDir, ".kentutai-extract");
|
|
25
|
+
if (fs.existsSync(tempDir)) {
|
|
26
|
+
fs.rmSync(tempDir, { recursive: true, force: true });
|
|
27
|
+
}
|
|
28
|
+
fs.mkdirSync(tempDir, { recursive: true });
|
|
29
|
+
|
|
30
|
+
execSync(`tar -xzf "${tarball}" -C "${tempDir}"`, { stdio: "pipe" });
|
|
31
|
+
|
|
32
|
+
const extractedApp = path.join(tempDir, "package", "cli", "app");
|
|
33
|
+
if (fs.existsSync(extractedApp)) {
|
|
34
|
+
if (fs.existsSync(appDir)) {
|
|
35
|
+
fs.rmSync(appDir, { recursive: true, force: true });
|
|
36
|
+
}
|
|
37
|
+
fs.renameSync(extractedApp, appDir);
|
|
38
|
+
console.log("[kentutai] Standalone build extracted successfully!");
|
|
39
|
+
} else {
|
|
40
|
+
console.log("[kentutai] Could not find app in tarball.");
|
|
22
41
|
}
|
|
42
|
+
|
|
43
|
+
fs.rmSync(tempDir, { recursive: true, force: true });
|
|
44
|
+
} catch (err) {
|
|
45
|
+
console.warn("[kentutai] Extraction failed:", err.message);
|
|
23
46
|
}
|
|
47
|
+
|
|
48
|
+
process.exit(0);
|
package/package.json
CHANGED
|
@@ -294,16 +294,13 @@ export default function UserDetailPage() {
|
|
|
294
294
|
</Card>
|
|
295
295
|
|
|
296
296
|
{/* Access & Limits */}
|
|
297
|
-
<Card title="
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
</p>
|
|
305
|
-
</div>
|
|
306
|
-
{limits ? (
|
|
297
|
+
<Card title="Custom Rate Limits" icon="tune">
|
|
298
|
+
<div className="mb-4 p-3 rounded-lg bg-surface-2 border border-border">
|
|
299
|
+
<p className="text-xs text-text-muted">
|
|
300
|
+
<span className="font-medium text-text-main">Priority:</span> These limits override package settings. Leave empty to use package defaults.
|
|
301
|
+
</p>
|
|
302
|
+
</div>
|
|
303
|
+
{limits ? (
|
|
307
304
|
<div className="flex flex-col gap-4" data-testid="limits-form">
|
|
308
305
|
<div className="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
|
309
306
|
<Input
|
|
@@ -390,23 +387,16 @@ export default function UserDetailPage() {
|
|
|
390
387
|
>
|
|
391
388
|
Set Custom Limits
|
|
392
389
|
</Button>
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
<div className="border-t border-border my-4"></div>
|
|
398
|
-
|
|
399
|
-
{/* Subscription Package Section */}
|
|
400
|
-
<div>
|
|
401
|
-
<p className="text-sm font-medium text-text-main mb-3">Subscription Package</p>
|
|
402
|
-
<div className="mb-4 p-3 rounded-lg bg-surface-2 border border-border">
|
|
403
|
-
<p className="text-xs text-text-muted">
|
|
404
|
-
<span className="font-medium text-text-main">Limit Priority:</span> Custom Limits > Package Overrides > Package Defaults
|
|
405
|
-
</p>
|
|
406
|
-
</div>
|
|
390
|
+
</div>
|
|
391
|
+
)}
|
|
392
|
+
</div>
|
|
393
|
+
</Card>
|
|
407
394
|
|
|
395
|
+
{/* Subscription Package */}
|
|
396
|
+
<Card title="Subscription Package" icon="inventory_2" data-testid="package-card">
|
|
397
|
+
<div className="flex flex-col gap-4">
|
|
408
398
|
{userPackage ? (
|
|
409
|
-
|
|
399
|
+
<>
|
|
410
400
|
<div className="flex items-center justify-between">
|
|
411
401
|
<div className="flex items-center gap-3">
|
|
412
402
|
<div className="p-2 rounded-lg bg-primary/10">
|
|
@@ -482,7 +472,7 @@ export default function UserDetailPage() {
|
|
|
482
472
|
</span>
|
|
483
473
|
)}
|
|
484
474
|
</div>
|
|
485
|
-
|
|
475
|
+
</>
|
|
486
476
|
) : (
|
|
487
477
|
<div className="flex flex-col items-center justify-center py-8 text-center">
|
|
488
478
|
<span className="material-symbols-outlined text-[48px] text-text-muted/30 mb-4">workspace_premium</span>
|