MCPcopy Create free account
hub / github.com/codeaashu/claude-code / AutoUpdaterWrapper

Function AutoUpdaterWrapper

src/components/AutoUpdaterWrapper.tsx:19–90  ·  view source on GitHub ↗
(t0)

Source from the content-addressed store, hash-verified

17 verbose: boolean;
18};
19export function AutoUpdaterWrapper(t0) {
20 const $ = _c(17);
21 const {
22 isUpdating,
23 onChangeIsUpdating,
24 onAutoUpdaterResult,
25 autoUpdaterResult,
26 showSuccessMessage,
27 verbose
28 } = t0;
29 const [useNativeInstaller, setUseNativeInstaller] = React.useState(null);
30 const [isPackageManager, setIsPackageManager] = React.useState(null);
31 let t1;
32 let t2;
33 if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
34 t1 = () => {
35 const checkInstallation = async function checkInstallation() {
36 if (feature("SKIP_DETECTION_WHEN_AUTOUPDATES_DISABLED") && isAutoUpdaterDisabled()) {
37 logForDebugging("AutoUpdaterWrapper: Skipping detection, auto-updates disabled");
38 return;
39 }
40 const installationType = await getCurrentInstallationType();
41 logForDebugging(`AutoUpdaterWrapper: Installation type: ${installationType}`);
42 setUseNativeInstaller(installationType === "native");
43 setIsPackageManager(installationType === "package-manager");
44 };
45 checkInstallation();
46 };
47 t2 = [];
48 $[0] = t1;
49 $[1] = t2;
50 } else {
51 t1 = $[0];
52 t2 = $[1];
53 }
54 React.useEffect(t1, t2);
55 if (useNativeInstaller === null || isPackageManager === null) {
56 return null;
57 }
58 if (isPackageManager) {
59 let t3;
60 if ($[2] !== autoUpdaterResult || $[3] !== isUpdating || $[4] !== onAutoUpdaterResult || $[5] !== onChangeIsUpdating || $[6] !== showSuccessMessage || $[7] !== verbose) {
61 t3 = <PackageManagerAutoUpdater verbose={verbose} onAutoUpdaterResult={onAutoUpdaterResult} autoUpdaterResult={autoUpdaterResult} isUpdating={isUpdating} onChangeIsUpdating={onChangeIsUpdating} showSuccessMessage={showSuccessMessage} />;
62 $[2] = autoUpdaterResult;
63 $[3] = isUpdating;
64 $[4] = onAutoUpdaterResult;
65 $[5] = onChangeIsUpdating;
66 $[6] = showSuccessMessage;
67 $[7] = verbose;
68 $[8] = t3;
69 } else {
70 t3 = $[8];
71 }
72 return t3;
73 }
74 const Updater = useNativeInstaller ? NativeAutoUpdater : AutoUpdater;
75 let t3;
76 if ($[9] !== Updater || $[10] !== autoUpdaterResult || $[11] !== isUpdating || $[12] !== onAutoUpdaterResult || $[13] !== onChangeIsUpdating || $[14] !== showSuccessMessage || $[15] !== verbose) {

Callers

nothing calls this directly

Calls 1

checkInstallationFunction · 0.85

Tested by

no test coverage detected