kentutai 1.7.1 → 1.7.2
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
|
@@ -5,19 +5,41 @@ const path = require("path");
|
|
|
5
5
|
const fs = require("fs");
|
|
6
6
|
|
|
7
7
|
const appDir = path.join(__dirname, "..", "app");
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
8
|
+
const serverPath = path.join(appDir, "server.js");
|
|
9
|
+
const nodeModulesDir = path.join(appDir, "node_modules");
|
|
10
|
+
|
|
11
|
+
if (!fs.existsSync(serverPath)) {
|
|
12
|
+
console.log("[kentutai] Standalone build not found. Skipping postinstall.");
|
|
13
|
+
process.exit(0);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const nodeModulesExists = fs.existsSync(nodeModulesDir);
|
|
17
|
+
const hasPackages = nodeModulesExists && fs.readdirSync(nodeModulesDir).length > 0;
|
|
18
|
+
|
|
19
|
+
if (hasPackages) {
|
|
20
|
+
console.log("[kentutai] Dependencies already installed.");
|
|
21
|
+
process.exit(0);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
console.log("[kentutai] Installing runtime dependencies...");
|
|
25
|
+
|
|
26
|
+
try {
|
|
27
|
+
const packageJson = path.join(appDir, "package.json");
|
|
28
|
+
if (!fs.existsSync(packageJson)) {
|
|
29
|
+
console.log("[kentutai] No package.json found. Skipping.");
|
|
30
|
+
process.exit(0);
|
|
22
31
|
}
|
|
32
|
+
|
|
33
|
+
execSync("npm install --production --ignore-scripts", {
|
|
34
|
+
cwd: appDir,
|
|
35
|
+
stdio: "inherit",
|
|
36
|
+
timeout: 120000
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
console.log("[kentutai] Dependencies installed successfully!");
|
|
40
|
+
} catch (err) {
|
|
41
|
+
console.warn("[kentutai] Failed to install dependencies:", err.message);
|
|
42
|
+
console.warn("[kentutai] Server may not work. Try: cd cli/app && npm install");
|
|
23
43
|
}
|
|
44
|
+
|
|
45
|
+
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
|
|
@@ -399,11 +396,6 @@ export default function UserDetailPage() {
|
|
|
399
396
|
{/* Subscription Package Section */}
|
|
400
397
|
<div>
|
|
401
398
|
<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>
|
|
407
399
|
|
|
408
400
|
{userPackage ? (
|
|
409
401
|
<div className="flex flex-col gap-4">
|