Inline base64 source maps had been checked into tracked src files. This strips those comments from the repository without changing runtime behavior or adding ongoing guardrails, per the requested one-time cleanup scope. Constraint: Keep this change limited to tracked source cleanup only Rejected: Add CI/source verification guard | user requested one-time cleanup only Confidence: high Scope-risk: narrow Reversibility: clean Directive: If these directives reappear, fix the producing transform instead of reintroducing repo-side cleanup code Tested: rg -n "sourceMappingURL" ., bun run smoke, bun run verify:privacy, bun run test:provider, npm run test:provider-recommendation Not-tested: bun run typecheck (repository has many pre-existing unrelated failures) Co-authored-by: anandh8x <test@example.com>
24 lines
979 B
TypeScript
24 lines
979 B
TypeScript
import * as React from 'react';
|
|
import { Passes } from '../../components/Passes/Passes.js';
|
|
import { logEvent } from '../../services/analytics/index.js';
|
|
import { getCachedRemainingPasses } from '../../services/api/referral.js';
|
|
import type { LocalJSXCommandOnDone } from '../../types/command.js';
|
|
import { getGlobalConfig, saveGlobalConfig } from '../../utils/config.js';
|
|
export async function call(onDone: LocalJSXCommandOnDone): Promise<React.ReactNode> {
|
|
// Mark that user has visited /passes so we stop showing the upsell
|
|
const config = getGlobalConfig();
|
|
const isFirstVisit = !config.hasVisitedPasses;
|
|
if (isFirstVisit) {
|
|
const remaining = getCachedRemainingPasses();
|
|
saveGlobalConfig(current => ({
|
|
...current,
|
|
hasVisitedPasses: true,
|
|
passesLastSeenRemaining: remaining ?? current.passesLastSeenRemaining
|
|
}));
|
|
}
|
|
logEvent('tengu_guest_passes_visited', {
|
|
is_first_visit: isFirstVisit
|
|
});
|
|
return <Passes onDone={onDone} />;
|
|
}
|