@viberaven/cli 1.6.0 → 1.6.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/AGENTS.md +64 -64
- package/LICENSE +21 -21
- package/README.md +113 -113
- package/SECURITY.md +59 -59
- package/dist/cli.js +45 -15
- package/dist/console/app.js +251 -251
- package/dist/console/index.html +46 -46
- package/dist/console/styles.css +267 -267
- package/dist/playbooks/_stack-default.json +11 -11
- package/dist/playbooks/auth-supabase.json +31 -31
- package/dist/playbooks/stripe.json +66 -66
- package/dist/playbooks/supabase.json +51 -51
- package/dist/playbooks/vercel.json +42 -42
- package/dist/report/assets/provider-authjs.svg +5 -5
- package/dist/report/assets/provider-aws.svg +5 -5
- package/dist/report/assets/provider-logrocket.svg +4 -4
- package/dist/report/report-cli.css +1466 -1466
- package/dist/report/station.css +11854 -11854
- package/dist/report/station.js +8319 -8319
- package/dist/stack/app.js +1 -1
- package/dist/stack/stack.css +1008 -1008
- package/dist/vendor/anime.umd.min.js +7 -7
- package/package.json +84 -84
- package/playbooks/_stack-default.json +11 -11
- package/playbooks/auth-supabase.json +31 -31
- package/playbooks/stripe.json +66 -66
- package/playbooks/supabase.json +51 -51
- package/playbooks/vercel.json +42 -42
- package/schemas/permissions-matrix.schema.json +90 -90
- package/templates/AGENTS.snippet.md +56 -56
- package/templates/CLAUDE.snippet.md +14 -14
- package/templates/CURSOR.snippet.md +14 -14
package/dist/cli.js
CHANGED
|
@@ -8563,6 +8563,16 @@ function safe(text) {
|
|
|
8563
8563
|
function at(loc) {
|
|
8564
8564
|
return loc ? `${loc.file}:${loc.line}` : "an unknown location";
|
|
8565
8565
|
}
|
|
8566
|
+
function policyNameNote(name) {
|
|
8567
|
+
if (/\bservice[ _-]?role\b/i.test(name)) {
|
|
8568
|
+
return ` The name mentions the service role, but the service role bypasses row level security and never needs a policy, so this one only opens the table to everyone else.`;
|
|
8569
|
+
}
|
|
8570
|
+
const promise = name.match(/\b(?:own|owner|owners|their|admins?|teachers?|creators?|authors?|members?|self)\b/i);
|
|
8571
|
+
if (promise) {
|
|
8572
|
+
return ` The name says "${name}", but nothing in the policy checks who the caller is.`;
|
|
8573
|
+
}
|
|
8574
|
+
return "";
|
|
8575
|
+
}
|
|
8566
8576
|
function audience(roles) {
|
|
8567
8577
|
const set = new Set(roles);
|
|
8568
8578
|
if (set.has("public") || set.has("anon") && set.has("authenticated")) return "anyone, signed in or not,";
|
|
@@ -8618,7 +8628,7 @@ function analyzeRls(replay) {
|
|
|
8618
8628
|
id: "rls_policy_allows_all_read",
|
|
8619
8629
|
severity: "high",
|
|
8620
8630
|
message: safe(
|
|
8621
|
-
`Policy "${policy.name}" on ${table2.display} (${at(policy.loc)}) lets ${who} read every row: using (true). Fine for truly public content; wrong for anything per-user
|
|
8631
|
+
`Policy "${policy.name}" on ${table2.display} (${at(policy.loc)}) lets ${who} read every row: using (true). Fine for truly public content; wrong for anything per-user.${policyNameNote(policy.name)}`
|
|
8622
8632
|
),
|
|
8623
8633
|
file: policy.loc.file,
|
|
8624
8634
|
line: policy.loc.line,
|
|
@@ -8650,7 +8660,7 @@ function analyzeRls(replay) {
|
|
|
8650
8660
|
permissive.push({
|
|
8651
8661
|
id: "rls_policy_allows_all_write",
|
|
8652
8662
|
severity,
|
|
8653
|
-
message: safe(`Policy "${policy.name}" on ${table2.display} (${at(policy.loc)}) lets ${who} ${verb}: ${clause}
|
|
8663
|
+
message: safe(`Policy "${policy.name}" on ${table2.display} (${at(policy.loc)}) lets ${who} ${verb}: ${clause}.${severity === "critical" ? policyNameNote(policy.name) : ""}`),
|
|
8654
8664
|
file: policy.loc.file,
|
|
8655
8665
|
line: policy.loc.line,
|
|
8656
8666
|
table: table2.display,
|
|
@@ -13807,9 +13817,9 @@ var init_clipboard = __esm({
|
|
|
13807
13817
|
}
|
|
13808
13818
|
});
|
|
13809
13819
|
|
|
13810
|
-
// node_modules/picocolors/picocolors.js
|
|
13820
|
+
// ../../../../../VibeRice/packages/cli/node_modules/picocolors/picocolors.js
|
|
13811
13821
|
var require_picocolors = __commonJS({
|
|
13812
|
-
"node_modules/picocolors/picocolors.js"(exports2, module2) {
|
|
13822
|
+
"../../../../../VibeRice/packages/cli/node_modules/picocolors/picocolors.js"(exports2, module2) {
|
|
13813
13823
|
var p2 = process || {};
|
|
13814
13824
|
var argv = p2.argv || [];
|
|
13815
13825
|
var env = p2.env || {};
|
|
@@ -14033,9 +14043,9 @@ var init_terminalSummary = __esm({
|
|
|
14033
14043
|
}
|
|
14034
14044
|
});
|
|
14035
14045
|
|
|
14036
|
-
// node_modules/sisteransi/src/index.js
|
|
14046
|
+
// ../../../../../VibeRice/packages/cli/node_modules/sisteransi/src/index.js
|
|
14037
14047
|
var require_src = __commonJS({
|
|
14038
|
-
"node_modules/sisteransi/src/index.js"(exports2, module2) {
|
|
14048
|
+
"../../../../../VibeRice/packages/cli/node_modules/sisteransi/src/index.js"(exports2, module2) {
|
|
14039
14049
|
"use strict";
|
|
14040
14050
|
var ESC = "\x1B";
|
|
14041
14051
|
var CSI = `${ESC}[`;
|
|
@@ -14089,7 +14099,7 @@ var require_src = __commonJS({
|
|
|
14089
14099
|
}
|
|
14090
14100
|
});
|
|
14091
14101
|
|
|
14092
|
-
// node_modules/@clack/core/dist/index.mjs
|
|
14102
|
+
// ../../../../../VibeRice/packages/cli/node_modules/@clack/core/dist/index.mjs
|
|
14093
14103
|
function DD({ onlyFirst: e2 = false } = {}) {
|
|
14094
14104
|
const t = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
|
|
14095
14105
|
return new RegExp(t, e2 ? void 0 : "g");
|
|
@@ -14201,7 +14211,7 @@ function fD({ input: e2 = import_node_process.stdin, output: u2 = import_node_pr
|
|
|
14201
14211
|
}
|
|
14202
14212
|
var import_sisteransi, import_node_process, g, import_node_readline, import_node_stream, uD, W, tD, eD, FD, sD, w, N, I, R, C, iD, rD, ED, d, oD, y, V, nD, G, _, z, K, aD, k, hD, lD, xD, B, AD, S, gD, vD, h, x, A, OD, PD, J, LD;
|
|
14203
14213
|
var init_dist = __esm({
|
|
14204
|
-
"node_modules/@clack/core/dist/index.mjs"() {
|
|
14214
|
+
"../../../../../VibeRice/packages/cli/node_modules/@clack/core/dist/index.mjs"() {
|
|
14205
14215
|
import_sisteransi = __toESM(require_src(), 1);
|
|
14206
14216
|
import_node_process = require("node:process");
|
|
14207
14217
|
g = __toESM(require("node:readline"), 1);
|
|
@@ -14451,13 +14461,13 @@ var init_dist = __esm({
|
|
|
14451
14461
|
}
|
|
14452
14462
|
});
|
|
14453
14463
|
|
|
14454
|
-
// node_modules/@clack/prompts/dist/index.mjs
|
|
14464
|
+
// ../../../../../VibeRice/packages/cli/node_modules/@clack/prompts/dist/index.mjs
|
|
14455
14465
|
function ce() {
|
|
14456
14466
|
return import_node_process2.default.platform !== "win32" ? import_node_process2.default.env.TERM !== "linux" : !!import_node_process2.default.env.CI || !!import_node_process2.default.env.WT_SESSION || !!import_node_process2.default.env.TERMINUS_SUBLIME || import_node_process2.default.env.ConEmuTask === "{cmd::Cmder}" || import_node_process2.default.env.TERM_PROGRAM === "Terminus-Sublime" || import_node_process2.default.env.TERM_PROGRAM === "vscode" || import_node_process2.default.env.TERM === "xterm-256color" || import_node_process2.default.env.TERM === "alacritty" || import_node_process2.default.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
14457
14467
|
}
|
|
14458
14468
|
var import_node_process2, import_picocolors2, import_sisteransi2, V2, u, le, L2, W2, C2, ue, o, d2, k2, P2, A2, T, F, $e, _2, me, de, pe, q, D, U, K2, b2, G2, ve, xe, Ie, Se, M2, J2, Y2;
|
|
14459
14469
|
var init_dist2 = __esm({
|
|
14460
|
-
"node_modules/@clack/prompts/dist/index.mjs"() {
|
|
14470
|
+
"../../../../../VibeRice/packages/cli/node_modules/@clack/prompts/dist/index.mjs"() {
|
|
14461
14471
|
init_dist();
|
|
14462
14472
|
init_dist();
|
|
14463
14473
|
import_node_process2 = __toESM(require("node:process"), 1);
|
|
@@ -14690,7 +14700,7 @@ var VERSION;
|
|
|
14690
14700
|
var init_version = __esm({
|
|
14691
14701
|
"src/version.ts"() {
|
|
14692
14702
|
"use strict";
|
|
14693
|
-
VERSION = "1.6.
|
|
14703
|
+
VERSION = "1.6.2";
|
|
14694
14704
|
}
|
|
14695
14705
|
});
|
|
14696
14706
|
|
|
@@ -17417,6 +17427,17 @@ var init_initGithub = __esm({
|
|
|
17417
17427
|
}
|
|
17418
17428
|
});
|
|
17419
17429
|
|
|
17430
|
+
// src/local-ui/stack/setupLink.ts
|
|
17431
|
+
function setupFragment(ids) {
|
|
17432
|
+
const safe2 = [...new Set(ids.filter((id) => /^[a-z][a-z0-9-]{0,39}$/.test(id)))].slice(0, 30);
|
|
17433
|
+
return `#${new URLSearchParams({ stack: safe2.join(",") })}`;
|
|
17434
|
+
}
|
|
17435
|
+
var init_setupLink = __esm({
|
|
17436
|
+
"src/local-ui/stack/setupLink.ts"() {
|
|
17437
|
+
"use strict";
|
|
17438
|
+
}
|
|
17439
|
+
});
|
|
17440
|
+
|
|
17420
17441
|
// src/commands/doctorAgents.ts
|
|
17421
17442
|
function managedBlocks(content) {
|
|
17422
17443
|
const blocks = content.match(/<!-- (?:VIBERAVEN:START|viberaven:agent-rules:start) -->[\s\S]*?<!-- (?:VIBERAVEN:END|viberaven:agent-rules:end) -->/g);
|
|
@@ -24762,7 +24783,8 @@ __export(cli_exports, {
|
|
|
24762
24783
|
parseArgs: () => parseArgs,
|
|
24763
24784
|
printHelp: () => printHelp,
|
|
24764
24785
|
resolveDefaultEntrypointMode: () => resolveDefaultEntrypointMode,
|
|
24765
|
-
runScanCommand: () => runScanCommand
|
|
24786
|
+
runScanCommand: () => runScanCommand,
|
|
24787
|
+
stackInitialPath: () => stackInitialPath
|
|
24766
24788
|
});
|
|
24767
24789
|
module.exports = __toCommonJS(cli_exports);
|
|
24768
24790
|
function printHelp() {
|
|
@@ -24777,6 +24799,7 @@ Usage:
|
|
|
24777
24799
|
viberaven tui Interactive terminal menu
|
|
24778
24800
|
|
|
24779
24801
|
viberaven check [--json] [--quiet] [path]
|
|
24802
|
+
viberaven --stack supabase,vercel,stripe Open the Studio with these services already picked
|
|
24780
24803
|
viberaven check --base <ref> [--markdown] What this change introduced and fixed, compared with <ref>
|
|
24781
24804
|
viberaven init --github [--dry-run] Check every pull request in GitHub Actions
|
|
24782
24805
|
Local production check: one line per finding, exit 1 on blockers
|
|
@@ -24937,6 +24960,11 @@ function isBooleanFlag(command, key) {
|
|
|
24937
24960
|
if (key === "agents" && command === "doctor") return true;
|
|
24938
24961
|
return false;
|
|
24939
24962
|
}
|
|
24963
|
+
function stackInitialPath(flags) {
|
|
24964
|
+
if (typeof flags.stack !== "string") return void 0;
|
|
24965
|
+
const ids = flags.stack.split(",").map((id) => id.trim().toLowerCase()).filter(Boolean);
|
|
24966
|
+
return ids.length ? `/${setupFragment(ids)}` : void 0;
|
|
24967
|
+
}
|
|
24940
24968
|
function hasFlag(flags, key) {
|
|
24941
24969
|
return flags[key] === true || typeof flags[key] === "string";
|
|
24942
24970
|
}
|
|
@@ -25220,7 +25248,7 @@ async function main() {
|
|
|
25220
25248
|
});
|
|
25221
25249
|
if (mode === "local-ui") {
|
|
25222
25250
|
const cwd = positional[0] ? (0, import_node_path42.resolve)(process.cwd(), positional[0]) : process.cwd();
|
|
25223
|
-
const handle = await startLocalUiServer({ cwd });
|
|
25251
|
+
const handle = await startLocalUiServer({ cwd, initialPath: stackInitialPath(flags) });
|
|
25224
25252
|
console.log(`VibeRaven local UI: ${handle.url}`);
|
|
25225
25253
|
await waitForServerShutdown();
|
|
25226
25254
|
await handle.close();
|
|
@@ -25241,7 +25269,7 @@ async function main() {
|
|
|
25241
25269
|
case "ui": {
|
|
25242
25270
|
const cwd = positional[0] ? (0, import_node_path42.resolve)(process.cwd(), positional[0]) : process.cwd();
|
|
25243
25271
|
const envPort = Number(process.env.PORT);
|
|
25244
|
-
const handle = await startLocalUiServer({ cwd, port: Number.isFinite(envPort) && envPort > 0 ? envPort : void 0 });
|
|
25272
|
+
const handle = await startLocalUiServer({ cwd, port: Number.isFinite(envPort) && envPort > 0 ? envPort : void 0, initialPath: stackInitialPath(flags) });
|
|
25245
25273
|
console.log(`VibeRaven local UI: ${handle.url}`);
|
|
25246
25274
|
await waitForServerShutdown();
|
|
25247
25275
|
await handle.close();
|
|
@@ -25421,6 +25449,7 @@ var init_cli = __esm({
|
|
|
25421
25449
|
init_commands();
|
|
25422
25450
|
init_runInit();
|
|
25423
25451
|
init_initGithub();
|
|
25452
|
+
init_setupLink();
|
|
25424
25453
|
init_runDoctor();
|
|
25425
25454
|
init_runValidateNpmPackage();
|
|
25426
25455
|
init_runAudit();
|
|
@@ -25458,5 +25487,6 @@ init_cli();
|
|
|
25458
25487
|
parseArgs,
|
|
25459
25488
|
printHelp,
|
|
25460
25489
|
resolveDefaultEntrypointMode,
|
|
25461
|
-
runScanCommand
|
|
25490
|
+
runScanCommand,
|
|
25491
|
+
stackInitialPath
|
|
25462
25492
|
});
|