kentutai 1.7.2 → 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,45 +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
|
-
const nodeModulesDir = path.join(appDir, "node_modules");
|
|
9
|
+
const tarball = path.join(__dirname, "..", "kentutai-1.3.2.tgz");
|
|
10
10
|
|
|
11
|
-
if (
|
|
12
|
-
console.log("[kentutai] Standalone build
|
|
11
|
+
if (fs.existsSync(path.join(appDir, "server.js"))) {
|
|
12
|
+
console.log("[kentutai] Standalone build already exists.");
|
|
13
13
|
process.exit(0);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
if (hasPackages) {
|
|
20
|
-
console.log("[kentutai] Dependencies already installed.");
|
|
16
|
+
if (!fs.existsSync(tarball)) {
|
|
17
|
+
console.log("[kentutai] Tarball not found. Skipping extraction.");
|
|
21
18
|
process.exit(0);
|
|
22
19
|
}
|
|
23
20
|
|
|
24
|
-
console.log("[kentutai]
|
|
21
|
+
console.log("[kentutai] Extracting standalone build...");
|
|
25
22
|
|
|
26
23
|
try {
|
|
27
|
-
const
|
|
28
|
-
if (
|
|
29
|
-
|
|
30
|
-
|
|
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.");
|
|
31
41
|
}
|
|
32
42
|
|
|
33
|
-
|
|
34
|
-
cwd: appDir,
|
|
35
|
-
stdio: "inherit",
|
|
36
|
-
timeout: 120000
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
console.log("[kentutai] Dependencies installed successfully!");
|
|
43
|
+
fs.rmSync(tempDir, { recursive: true, force: true });
|
|
40
44
|
} catch (err) {
|
|
41
|
-
console.warn("[kentutai]
|
|
42
|
-
console.warn("[kentutai] Server may not work. Try: cd cli/app && npm install");
|
|
45
|
+
console.warn("[kentutai] Extraction failed:", err.message);
|
|
43
46
|
}
|
|
44
47
|
|
|
45
48
|
process.exit(0);
|
package/package.json
CHANGED
|
@@ -387,18 +387,16 @@ export default function UserDetailPage() {
|
|
|
387
387
|
>
|
|
388
388
|
Set Custom Limits
|
|
389
389
|
</Button>
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
<div className="border-t border-border my-4"></div>
|
|
395
|
-
|
|
396
|
-
{/* Subscription Package Section */}
|
|
397
|
-
<div>
|
|
398
|
-
<p className="text-sm font-medium text-text-main mb-3">Subscription Package</p>
|
|
390
|
+
</div>
|
|
391
|
+
)}
|
|
392
|
+
</div>
|
|
393
|
+
</Card>
|
|
399
394
|
|
|
395
|
+
{/* Subscription Package */}
|
|
396
|
+
<Card title="Subscription Package" icon="inventory_2" data-testid="package-card">
|
|
397
|
+
<div className="flex flex-col gap-4">
|
|
400
398
|
{userPackage ? (
|
|
401
|
-
|
|
399
|
+
<>
|
|
402
400
|
<div className="flex items-center justify-between">
|
|
403
401
|
<div className="flex items-center gap-3">
|
|
404
402
|
<div className="p-2 rounded-lg bg-primary/10">
|
|
@@ -474,7 +472,7 @@ export default function UserDetailPage() {
|
|
|
474
472
|
</span>
|
|
475
473
|
)}
|
|
476
474
|
</div>
|
|
477
|
-
|
|
475
|
+
</>
|
|
478
476
|
) : (
|
|
479
477
|
<div className="flex flex-col items-center justify-center py-8 text-center">
|
|
480
478
|
<span className="material-symbols-outlined text-[48px] text-text-muted/30 mb-4">workspace_premium</span>
|