@viberaven/cli 1.4.2 → 1.4.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/dist/cli.js +163 -21
- package/dist/cli.js.map +2 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -11558,7 +11558,7 @@ var VERSION;
|
|
|
11558
11558
|
var init_version = __esm({
|
|
11559
11559
|
"src/version.ts"() {
|
|
11560
11560
|
"use strict";
|
|
11561
|
-
VERSION = "1.4.
|
|
11561
|
+
VERSION = "1.4.3";
|
|
11562
11562
|
}
|
|
11563
11563
|
});
|
|
11564
11564
|
|
|
@@ -15468,6 +15468,7 @@ function providerStatusText(state) {
|
|
|
15468
15468
|
case "connect_live":
|
|
15469
15469
|
return "Connect live";
|
|
15470
15470
|
case "not_detected":
|
|
15471
|
+
return "Not detected";
|
|
15471
15472
|
default:
|
|
15472
15473
|
return "Missing";
|
|
15473
15474
|
}
|
|
@@ -15488,6 +15489,16 @@ function verifyActionForGap(gap) {
|
|
|
15488
15489
|
};
|
|
15489
15490
|
}
|
|
15490
15491
|
function proofForProvider(providerId, gap) {
|
|
15492
|
+
if (providerId === "posthog") {
|
|
15493
|
+
return {
|
|
15494
|
+
level: "dashboard_needed",
|
|
15495
|
+
summary: "PostHog dashboard ingestion can only be confirmed in the PostHog dashboard, not from repo code.",
|
|
15496
|
+
checks: [
|
|
15497
|
+
{ label: "Code found", status: "yes", source: "repo" },
|
|
15498
|
+
{ label: "Dashboard ingestion proof", status: "unknown", source: "dashboard" }
|
|
15499
|
+
]
|
|
15500
|
+
};
|
|
15501
|
+
}
|
|
15491
15502
|
if (!gap) {
|
|
15492
15503
|
return {
|
|
15493
15504
|
level: "code_only",
|
|
@@ -15518,6 +15529,8 @@ function whereToClick(providerId) {
|
|
|
15518
15529
|
return "Table editor -> select table -> Policies -> Enable RLS";
|
|
15519
15530
|
case "vercel":
|
|
15520
15531
|
return "Project settings -> Environment variables -> Production";
|
|
15532
|
+
case "posthog":
|
|
15533
|
+
return "Data management -> Events";
|
|
15521
15534
|
default:
|
|
15522
15535
|
return "Open provider dashboard -> complete the selected production action";
|
|
15523
15536
|
}
|
|
@@ -15541,6 +15554,12 @@ function youLane(providerId, providerName, gap) {
|
|
|
15541
15554
|
body: "Open Vercel and confirm the production environment, deployment, or domain setting that blocks launch."
|
|
15542
15555
|
};
|
|
15543
15556
|
}
|
|
15557
|
+
if (providerId === "posthog") {
|
|
15558
|
+
return {
|
|
15559
|
+
title: "Confirm PostHog dashboard ingestion",
|
|
15560
|
+
body: "Open PostHog and confirm live events are arriving from production. Repo code alone cannot prove ingestion."
|
|
15561
|
+
};
|
|
15562
|
+
}
|
|
15544
15563
|
return {
|
|
15545
15564
|
title: `Confirm ${providerName} provider proof`,
|
|
15546
15565
|
body: gap?.detail ?? `Open ${providerName} and complete the selected production action.`
|
|
@@ -15767,9 +15786,19 @@ function emptyLocalUiState(cwd) {
|
|
|
15767
15786
|
empty: true
|
|
15768
15787
|
};
|
|
15769
15788
|
}
|
|
15770
|
-
function mapArtifactToLocalUiState(artifact) {
|
|
15789
|
+
function mapArtifactToLocalUiState(artifact, presentProviderIds) {
|
|
15771
15790
|
const projectName = projectNameFromPath(artifact.workspacePath);
|
|
15772
|
-
const providers = listLocalUiProviderCatalog().map((template) => mapProvider(template, artifact, projectName)).map((provider2) =>
|
|
15791
|
+
const providers = listLocalUiProviderCatalog().map((template) => mapProvider(template, artifact, projectName)).map((provider2) => {
|
|
15792
|
+
if (presentProviderIds && !presentProviderIds.has(provider2.id)) {
|
|
15793
|
+
const missing = {
|
|
15794
|
+
...provider2,
|
|
15795
|
+
state: "not_detected",
|
|
15796
|
+
statusText: providerStatusText("not_detected")
|
|
15797
|
+
};
|
|
15798
|
+
return { ...missing, grade: providerGrade(missing) };
|
|
15799
|
+
}
|
|
15800
|
+
return { ...provider2, grade: providerGrade(provider2) };
|
|
15801
|
+
});
|
|
15773
15802
|
const globalProviderId = providerIdForGap(primaryGap(artifact));
|
|
15774
15803
|
const selectedProvider = providers.find((provider2) => provider2.id === globalProviderId) ?? providers.find((provider2) => provider2.state === "needs_repo_fix") ?? providers.find((provider2) => provider2.state === "repo_evidence_found") ?? providers[0];
|
|
15775
15804
|
const missionCards = buildMissionCards(artifact, providers);
|
|
@@ -16223,7 +16252,7 @@ function providerHealth(raw, normalized) {
|
|
|
16223
16252
|
const allReady = total > 0 && ready === total;
|
|
16224
16253
|
const summary = providerScopedDetail(raw || normalized || {});
|
|
16225
16254
|
if (state === 'not_detected') {
|
|
16226
|
-
return { label: '
|
|
16255
|
+
return { label: 'Not detected', tone: 'orange', summary, meta: 'Not in this project' };
|
|
16227
16256
|
}
|
|
16228
16257
|
if (state === 'live_verified') {
|
|
16229
16258
|
return { label: 'Ready', tone: 'green', summary, meta: checks + ' checks' };
|
|
@@ -16242,7 +16271,7 @@ function providerHealth(raw, normalized) {
|
|
|
16242
16271
|
|
|
16243
16272
|
function providerHealthIcon(health) {
|
|
16244
16273
|
if (health.tone === 'green' && (health.label === 'Ready' || health.label === 'Detected')) return Icon('heart');
|
|
16245
|
-
if (health.label === '
|
|
16274
|
+
if (health.label === 'Not detected') return Icon('flag');
|
|
16246
16275
|
return Icon('refresh');
|
|
16247
16276
|
}
|
|
16248
16277
|
|
|
@@ -16326,6 +16355,19 @@ function TradingCard(provider, variant, options) {
|
|
|
16326
16355
|
const placedClass = opts.placed ? ' is-placed' : '';
|
|
16327
16356
|
const tagOpen = opts.asDiv ? 'div' : 'button type="button"';
|
|
16328
16357
|
const tagClose = opts.asDiv ? 'div' : 'button';
|
|
16358
|
+
if (provider.state === 'not_detected') {
|
|
16359
|
+
// Locked card: the provider isn't in this project. Keep the logo (dimmed)
|
|
16360
|
+
// behind a lock seal so you can see which provider it is and that it's
|
|
16361
|
+
// there to unlock by adding it \u2014 never a fake grade or a blank back.
|
|
16362
|
+
return '<' + tagOpen + ' class="vr-tcard is-locked ' + size + placedClass + '" data-foil="' + foil + '"' +
|
|
16363
|
+
(opts.asDiv ? '' : ' data-action="deal-provider" data-provider="' + foil + '" aria-label="' + escapeHtml(provider.name) + ' is not in this project \u2014 add it to unlock this card" title="' + escapeHtml(provider.name) + ' \xB7 not in this project \u2014 add to unlock"') +
|
|
16364
|
+
(opts.style ? ' style="' + opts.style + '"' : '') + '>' +
|
|
16365
|
+
(opts.placed ? '<span class="vr-tcard-unplace" data-action="unplace-card" data-unplace="' + foil + '" title="Remove from the table" role="button" aria-label="Remove from the table">✕</span>' : '') +
|
|
16366
|
+
'<span class="vr-tcard-lockart">' + ProviderToken(provider, 'is-locked') + '<span class="vr-tcard-lockbadge">' + Icon('lock') + '</span></span>' +
|
|
16367
|
+
'<span class="vr-tcard-backname">' + escapeHtml(provider.name) + '</span>' +
|
|
16368
|
+
'<span class="vr-tcard-lockhint">Not in this project</span>' +
|
|
16369
|
+
'</' + tagClose + '>';
|
|
16370
|
+
}
|
|
16329
16371
|
if (grade.tier === 'facedown' && !opts.forceFace) {
|
|
16330
16372
|
return '<' + tagOpen + ' class="vr-tcard is-back ' + size + placedClass + '"' +
|
|
16331
16373
|
(opts.asDiv ? '' : ' data-action="deal-provider" data-provider="' + foil + '" aria-label="Flip ' + escapeHtml(provider.name) + ' \u2014 run its first checks" title="' + escapeHtml(provider.name) + ' \xB7 face down \u2014 click to flip"') +
|
|
@@ -18309,8 +18351,8 @@ function DiscoveryModal() {
|
|
|
18309
18351
|
return '<div class="vr-discover-card' + (demo.flippedCards['disc:' + provider.id] ? ' is-flipped' : '') + '" data-flip-card data-flip-id="disc:' + escapeHtml(provider.id) + '" data-rank="' + rank[0] + '" style="--vr-i:' + String(index) + '">' +
|
|
18310
18352
|
'<span class="vr-flip-inner">' +
|
|
18311
18353
|
'<span class="vr-flip-back vr-tcard is-back is-dealt" data-action="flip-discover" role="button" tabindex="0" aria-label="Flip to reveal ' + escapeHtml(provider.name) + '">' +
|
|
18312
|
-
'<span class="vr-tcard-backart"><
|
|
18313
|
-
'<span class="vr-tcard-backname">
|
|
18354
|
+
'<span class="vr-tcard-backart"><span class="vr-pack-seal" aria-hidden="true">✦</span></span>' +
|
|
18355
|
+
'<span class="vr-tcard-backname">Flip to reveal</span>' +
|
|
18314
18356
|
'</span>' +
|
|
18315
18357
|
'<span class="vr-flip-face">' +
|
|
18316
18358
|
TradingCard(provider, 'dealt', { asDiv: true, forceFace: true }) +
|
|
@@ -35122,7 +35164,9 @@ button.vr-chat-gate-chip.vr-stamp i { display: none; }
|
|
|
35122
35164
|
.vr-start-here-cta:hover { background: #e6e9ef; }
|
|
35123
35165
|
.vr-start-here-cta:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.55); }
|
|
35124
35166
|
.vr-start-here-cta svg { stroke: #0a0b0e; color: #0a0b0e; }
|
|
35125
|
-
.vr-start-here-cta
|
|
35167
|
+
.vr-start-here-cta,
|
|
35168
|
+
.vr-start-here-cta span { font-family: Geist, Inter, "Segoe UI", system-ui, sans-serif !important; }
|
|
35169
|
+
.vr-start-here-cta span { color: #0a0b0e; letter-spacing: 0.02em; text-transform: none; font-weight: 700; }
|
|
35126
35170
|
|
|
35127
35171
|
/* ==========================================================================
|
|
35128
35172
|
HUD layer: manga ink pass \u2014 the perceptual redesign.
|
|
@@ -37908,6 +37952,99 @@ button.vr-tcard { appearance: none; }
|
|
|
37908
37952
|
drop-shadow(0 5px 12px rgba(0, 0, 0, 0.65))
|
|
37909
37953
|
drop-shadow(0 0 22px rgba(232, 193, 90, 0.65));
|
|
37910
37954
|
}
|
|
37955
|
+
/* Locked card: a provider that is not in this project. Dimmed logo + gold
|
|
37956
|
+
lock seal, dashed inner frame (vs the solid frame of a graded card). */
|
|
37957
|
+
.vr-tcard.is-locked {
|
|
37958
|
+
position: relative;
|
|
37959
|
+
border: 2.5px solid rgba(184, 135, 63, 0.5);
|
|
37960
|
+
padding: 0;
|
|
37961
|
+
gap: 0;
|
|
37962
|
+
display: flex;
|
|
37963
|
+
flex-direction: column;
|
|
37964
|
+
align-items: center;
|
|
37965
|
+
justify-content: flex-end;
|
|
37966
|
+
background:
|
|
37967
|
+
radial-gradient(circle at 50% 40%, rgba(232, 193, 90, 0.08), transparent 55%),
|
|
37968
|
+
conic-gradient(from 210deg at 50% 46%, #141418, #1b1b21 22%, #141419 48%, #191922 74%, #141418),
|
|
37969
|
+
#0b0b0f;
|
|
37970
|
+
}
|
|
37971
|
+
.vr-tcard.is-locked::after {
|
|
37972
|
+
content: '';
|
|
37973
|
+
position: absolute;
|
|
37974
|
+
inset: 5px;
|
|
37975
|
+
border: 1.5px dashed rgba(232, 193, 90, 0.26);
|
|
37976
|
+
border-radius: 7px;
|
|
37977
|
+
pointer-events: none;
|
|
37978
|
+
}
|
|
37979
|
+
.vr-tcard.is-locked .vr-tcard-lockart {
|
|
37980
|
+
position: relative;
|
|
37981
|
+
flex: 1;
|
|
37982
|
+
width: 100%;
|
|
37983
|
+
display: grid;
|
|
37984
|
+
place-items: center;
|
|
37985
|
+
}
|
|
37986
|
+
.vr-tcard.is-locked .vr-provider-token {
|
|
37987
|
+
width: 48%;
|
|
37988
|
+
opacity: 0.35;
|
|
37989
|
+
filter: grayscale(1) brightness(1.3);
|
|
37990
|
+
}
|
|
37991
|
+
.vr-tcard.is-locked .vr-provider-token svg,
|
|
37992
|
+
.vr-tcard.is-locked .vr-provider-token img {
|
|
37993
|
+
width: 100%;
|
|
37994
|
+
height: auto;
|
|
37995
|
+
}
|
|
37996
|
+
.vr-tcard.is-locked .vr-tcard-lockbadge {
|
|
37997
|
+
position: absolute;
|
|
37998
|
+
top: 50%;
|
|
37999
|
+
left: 50%;
|
|
38000
|
+
transform: translate(-50%, -50%);
|
|
38001
|
+
width: 30%;
|
|
38002
|
+
aspect-ratio: 1 / 1;
|
|
38003
|
+
display: grid;
|
|
38004
|
+
place-items: center;
|
|
38005
|
+
border-radius: 50%;
|
|
38006
|
+
color: #e8c15a;
|
|
38007
|
+
background: radial-gradient(circle at 42% 34%, #2b2b34, #121216);
|
|
38008
|
+
border: 1.5px solid rgba(232, 193, 90, 0.6);
|
|
38009
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), inset 0 0 8px rgba(232, 193, 90, 0.15);
|
|
38010
|
+
}
|
|
38011
|
+
.vr-tcard.is-locked .vr-tcard-lockbadge svg {
|
|
38012
|
+
width: 52%;
|
|
38013
|
+
height: 52%;
|
|
38014
|
+
}
|
|
38015
|
+
.vr-tcard.is-locked .vr-tcard-lockhint {
|
|
38016
|
+
font-size: 7.5px;
|
|
38017
|
+
letter-spacing: 0.2px;
|
|
38018
|
+
text-transform: uppercase;
|
|
38019
|
+
font-weight: 800;
|
|
38020
|
+
color: #2a1c02;
|
|
38021
|
+
text-shadow: 0 1px 0 rgba(255, 245, 205, 0.45);
|
|
38022
|
+
margin-bottom: 6px;
|
|
38023
|
+
}
|
|
38024
|
+
.vr-tcard.is-locked .vr-tcard-backname {
|
|
38025
|
+
margin-bottom: 3px;
|
|
38026
|
+
font-size: 10px;
|
|
38027
|
+
letter-spacing: 0.3px;
|
|
38028
|
+
font-weight: 800;
|
|
38029
|
+
color: #1a1201;
|
|
38030
|
+
text-shadow: 0 1px 0 rgba(255, 245, 205, 0.45);
|
|
38031
|
+
}
|
|
38032
|
+
.vr-tcard.is-locked:hover {
|
|
38033
|
+
border-color: rgba(232, 193, 90, 0.7);
|
|
38034
|
+
}
|
|
38035
|
+
.vr-tcard.is-locked:hover .vr-provider-token {
|
|
38036
|
+
opacity: 0.5;
|
|
38037
|
+
}
|
|
38038
|
+
.vr-tcard.is-locked:hover .vr-tcard-lockbadge {
|
|
38039
|
+
box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6), 0 0 14px rgba(232, 193, 90, 0.4), inset 0 0 8px rgba(232, 193, 90, 0.2);
|
|
38040
|
+
}
|
|
38041
|
+
/* Pack card back: a sealed mystery \u2014 no provider identity until you flip. */
|
|
38042
|
+
.vr-discover-card .vr-flip-back .vr-pack-seal {
|
|
38043
|
+
font-size: 34px;
|
|
38044
|
+
line-height: 1;
|
|
38045
|
+
color: rgba(232, 193, 90, 0.5);
|
|
38046
|
+
text-shadow: 0 0 18px rgba(232, 193, 90, 0.4);
|
|
38047
|
+
}
|
|
37911
38048
|
/* inside a flip card the back must stay an absolute overlay \u2014 the
|
|
37912
38049
|
position: relative above would otherwise stack it under the face */
|
|
37913
38050
|
[data-flip-card] .vr-flip-back,
|
|
@@ -40241,25 +40378,25 @@ function hasFile(files, needles) {
|
|
|
40241
40378
|
function providerDetected(providerId, deps, files) {
|
|
40242
40379
|
switch (providerId) {
|
|
40243
40380
|
case "supabase":
|
|
40244
|
-
return hasDependency(deps, ["@supabase/supabase-js", "supabase"]) || hasFile(files, ["supabase/", "supabase
|
|
40381
|
+
return hasDependency(deps, ["@supabase/supabase-js", "@supabase/ssr", "supabase"]) || hasFile(files, ["supabase/", "supabase.ts"]);
|
|
40245
40382
|
case "vercel":
|
|
40246
|
-
return hasFile(files, ["vercel.json", ".vercel/project.json"])
|
|
40383
|
+
return hasDependency(deps, ["@vercel/"]) || hasFile(files, ["vercel.json", ".vercel/project.json"]);
|
|
40247
40384
|
case "stripe":
|
|
40248
|
-
return hasDependency(deps, ["stripe", "@stripe/stripe-js"]) || hasFile(files, ["stripe"
|
|
40385
|
+
return hasDependency(deps, ["stripe", "@stripe/stripe-js"]) || hasFile(files, ["stripe."]);
|
|
40249
40386
|
case "github":
|
|
40250
|
-
return hasFile(files, [".github/workflows", ".github/dependabot.yml"])
|
|
40387
|
+
return hasFile(files, [".github/workflows", ".github/dependabot.yml"]);
|
|
40251
40388
|
case "sentry":
|
|
40252
|
-
return hasDependency(deps, ["@sentry/"]) || hasFile(files, ["sentry."
|
|
40389
|
+
return hasDependency(deps, ["@sentry/"]) || hasFile(files, ["sentry."]);
|
|
40253
40390
|
case "posthog":
|
|
40254
|
-
return hasDependency(deps, ["posthog", "posthog-js"]) || hasFile(files, ["posthog"]);
|
|
40391
|
+
return hasDependency(deps, ["posthog", "posthog-js", "posthog-node"]) || hasFile(files, ["posthog."]);
|
|
40255
40392
|
case "clerk":
|
|
40256
|
-
return hasDependency(deps, ["@clerk/"]) || hasFile(files, ["clerk
|
|
40393
|
+
return hasDependency(deps, ["@clerk/"]) || hasFile(files, ["clerk."]);
|
|
40257
40394
|
case "authjs":
|
|
40258
|
-
return hasDependency(deps, ["next-auth", "@auth/"]) || hasFile(files, ["
|
|
40395
|
+
return hasDependency(deps, ["next-auth", "@auth/"]) || hasFile(files, ["nextauth", "auth.config."]);
|
|
40259
40396
|
case "resend":
|
|
40260
|
-
return hasDependency(deps, ["resend"]) || hasFile(files, ["resend"
|
|
40397
|
+
return hasDependency(deps, ["resend"]) || hasFile(files, ["resend."]);
|
|
40261
40398
|
case "upstash":
|
|
40262
|
-
return hasDependency(deps, ["@upstash/", "upstash"])
|
|
40399
|
+
return hasDependency(deps, ["@upstash/", "upstash"]);
|
|
40263
40400
|
default:
|
|
40264
40401
|
return false;
|
|
40265
40402
|
}
|
|
@@ -40284,7 +40421,7 @@ function applyProviderDetection(state, deps, files) {
|
|
|
40284
40421
|
return {
|
|
40285
40422
|
...provider2,
|
|
40286
40423
|
state: providerState2,
|
|
40287
|
-
statusText: detected ? "Detected in repo" : "
|
|
40424
|
+
statusText: detected ? "Detected in repo" : "Not detected",
|
|
40288
40425
|
connectLabel: detected ? "Open slot" : "Add provider",
|
|
40289
40426
|
launchPath: provider2.launchPath.map((item4, index) => ({
|
|
40290
40427
|
...item4,
|
|
@@ -40760,7 +40897,11 @@ async function readState(cwd) {
|
|
|
40760
40897
|
let state;
|
|
40761
40898
|
try {
|
|
40762
40899
|
const raw = await (0, import_promises23.readFile)((0, import_node_path30.join)(cwd, ".viberaven", "last-scan.json"), "utf8");
|
|
40763
|
-
|
|
40900
|
+
const packageJson = await readPackageJson(cwd);
|
|
40901
|
+
const deps = dependencyNames(packageJson);
|
|
40902
|
+
const files = await listProjectFiles(cwd);
|
|
40903
|
+
const present = new Set(PROVIDER_IDS.filter((id) => providerDetected(id, deps, files)));
|
|
40904
|
+
state = mapArtifactToLocalUiState(JSON.parse(raw), present);
|
|
40764
40905
|
} catch {
|
|
40765
40906
|
state = emptyLocalUiState(cwd);
|
|
40766
40907
|
}
|
|
@@ -41911,7 +42052,7 @@ async function waitForServerShutdown() {
|
|
|
41911
42052
|
process.once("SIGTERM", done);
|
|
41912
42053
|
});
|
|
41913
42054
|
}
|
|
41914
|
-
var import_node_http, import_node_child_process4, import_promises23, import_node_path30, CLI_AGENT_SETUP, MCP_CONFIG_PATHS, MCP_PROVIDER_NEEDLES, MCP_CONNECT_COMMANDS, MCP_SERVER_RECIPES, CLI_AUTH_PROBE;
|
|
42055
|
+
var import_node_http, import_node_child_process4, import_promises23, import_node_path30, CLI_AGENT_SETUP, MCP_CONFIG_PATHS, MCP_PROVIDER_NEEDLES, MCP_CONNECT_COMMANDS, MCP_SERVER_RECIPES, PROVIDER_IDS, CLI_AUTH_PROBE;
|
|
41915
42056
|
var init_server = __esm({
|
|
41916
42057
|
"src/local-ui/server.ts"() {
|
|
41917
42058
|
"use strict";
|
|
@@ -42025,6 +42166,7 @@ var init_server = __esm({
|
|
|
42025
42166
|
note: "Set UPSTASH_EMAIL and UPSTASH_API_KEY in your shell before the agent starts."
|
|
42026
42167
|
}
|
|
42027
42168
|
};
|
|
42169
|
+
PROVIDER_IDS = ["supabase", "vercel", "stripe", "github", "sentry", "posthog", "clerk", "authjs", "resend", "upstash"];
|
|
42028
42170
|
CLI_AUTH_PROBE = {
|
|
42029
42171
|
codex: "codex login status",
|
|
42030
42172
|
claude: "claude auth status",
|