@codyswann/lisa 4.23.37 → 4.23.38
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/core/nightly-e2e-guard-behavior-certificate.js +2 -2
- package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
- package/dist/core/upstream-evidence-manifest.js +4 -0
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/dist/health/deterministic.d.ts.map +1 -1
- package/dist/health/deterministic.js +6 -0
- package/dist/health/deterministic.js.map +1 -1
- package/dist/health/expo-splash-inspection.d.ts +70 -0
- package/dist/health/expo-splash-inspection.d.ts.map +1 -0
- package/dist/health/expo-splash-inspection.js +210 -0
- package/dist/health/expo-splash-inspection.js.map +1 -0
- package/expo/copy-overwrite/plugins/withAndroidSplashNoClientExit.js +167 -0
- package/package.json +3 -3
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-agy/plugin.json +1 -1
- package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-agy/plugin.json +1 -1
- package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-agy/plugin.json +1 -1
- package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deterministic.d.ts","sourceRoot":"","sources":["../../src/health/deterministic.ts"],"names":[],"mappings":"AAOA,OAAO,EAGL,KAAK,YAAY,EAGlB,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"deterministic.d.ts","sourceRoot":"","sources":["../../src/health/deterministic.ts"],"names":[],"mappings":"AAOA,OAAO,EAGL,KAAK,YAAY,EAGlB,MAAM,eAAe,CAAC;AAiBvB,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC/E,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,wBAAwB,CAAC;AAShC,OAAO,EACL,kBAAkB,EAElB,KAAK,aAAa,EACnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAGL,KAAK,YAAY,EAClB,MAAM,+BAA+B,CAAC;AAQvC;;;;GAIG;AACH,MAAM,WAAW,0BAA0B;IACzC,oDAAoD;IACpD,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,mEAAmE;IACnE,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,qDAAqD;IACrD,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,kDAAkD;IAClD,QAAQ,CAAC,YAAY,CAAC,EAAE,aAAa,CAAC;IACtC,yDAAyD;IACzD,QAAQ,CAAC,oBAAoB,CAAC,EAAE,qBAAqB,CAAC;IACtD,uDAAuD;IACvD,QAAQ,CAAC,aAAa,CAAC,EAAE,eAAe,CAAC;IACzC,mDAAmD;IACnD,QAAQ,CAAC,YAAY,CAAC,EAAE,YAAY,CAAC;CACtC;AAyND;;;;;;GAMG;AACH,wBAAsB,sBAAsB,CAC1C,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE,0BAA+B,GACvC,OAAO,CAAC,YAAY,CAAC,CA4CvB;AAED,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAC9B,YAAY,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -8,6 +8,7 @@ import { summarizeHealthFindings, validateHealthResult, } from "./contract.js";
|
|
|
8
8
|
import { HealthDeadline } from "./deadline.js";
|
|
9
9
|
import { declaredChecksDriftFinding } from "./declared-checks-inspection.js";
|
|
10
10
|
import { loadConfigState, safeSyncReads, shareRulesetReader, } from "./deterministic-inputs.js";
|
|
11
|
+
import { splashExitFinding } from "./expo-splash-inspection.js";
|
|
11
12
|
import { deterministicFinding } from "./finding-utils.js";
|
|
12
13
|
import { hookFinding, managedTemplateFinding, packageFinding, pluginFinding, workflowFinding, } from "./governance-probes.js";
|
|
13
14
|
import { readCoreHooksPath } from "./hook-inspection.js";
|
|
@@ -32,6 +33,7 @@ const CHECKS = [
|
|
|
32
33
|
{ check: "github.rulesets", unavailable: "warn" },
|
|
33
34
|
{ check: "github.declared-checks", unavailable: "warn" },
|
|
34
35
|
{ check: "github.ruleset-reach", unavailable: "warn" },
|
|
36
|
+
{ check: "expo.splash-exit", unavailable: "warn" },
|
|
35
37
|
];
|
|
36
38
|
/**
|
|
37
39
|
* Stable fallback when a check cannot complete inside the shared deadline.
|
|
@@ -137,6 +139,10 @@ function probes(roots, configState, shape, deadline, options) {
|
|
|
137
139
|
...CHECKS[13],
|
|
138
140
|
run: () => rulesetReachFinding(roots.lisaRoot, roots.projectRoot, configState.config, rulesets, options.readBranches ?? readGithubBranches, deadline.remainingMs(), deadline.signal),
|
|
139
141
|
},
|
|
142
|
+
{
|
|
143
|
+
...CHECKS[14],
|
|
144
|
+
run: () => splashExitFinding(roots.projectRoot, safeShape.types),
|
|
145
|
+
},
|
|
140
146
|
];
|
|
141
147
|
}
|
|
142
148
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|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AAE,KAAK,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAC/D,QAAQ,CAAC,GAAG,CACV,KAAK,CAAC,GAAG,EACT,kBAAkB,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,CACnD,CACF,CACF,CAAC;QACF,OAAO,MAAM,CAAC,OAAO,EAAE,GAAG,EAAE,EAAE,QAAQ,CAAC,CAAC;IAC1C,CAAC;YAAS,CAAC;QACT,QAAQ,CAAC,KAAK,EAAE,CAAC;IACnB,CAAC;AACH,CAAC;AAED,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAE9B,uHAAuH"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Read-only inspection of the Android splash-exit opt-out for Expo projects.
|
|
3
|
+
*
|
|
4
|
+
* ## Why a health finding rather than only a template file
|
|
5
|
+
*
|
|
6
|
+
* Lisa's Expo template ships `eslint.config.ts`, `tsconfig*.json`, `jest*`,
|
|
7
|
+
* `knip.json` and `scripts/` — and **never** `app.config.*` or `app.json`. The
|
|
8
|
+
* Expo plugin list is host-owned, so Lisa can put
|
|
9
|
+
* `withAndroidSplashNoClientExit.js` on disk but cannot register it.
|
|
10
|
+
*
|
|
11
|
+
* A config plugin that is present and unregistered does **nothing**. Shipping
|
|
12
|
+
* one without saying so would put a file that looks like a fix into every
|
|
13
|
+
* consumer while the defect stayed live — the same silent-no-op class the
|
|
14
|
+
* plugin exists to remove, reproduced by the delivery mechanism, and strictly
|
|
15
|
+
* worse than shipping nothing because it looks done.
|
|
16
|
+
*
|
|
17
|
+
* This check is what makes shipping the file honest: it reports the one thing
|
|
18
|
+
* Lisa cannot do for the project.
|
|
19
|
+
*
|
|
20
|
+
* ## What is being detected
|
|
21
|
+
*
|
|
22
|
+
* `expo-splash-screen` unconditionally registers an `OnExitAnimationListener`,
|
|
23
|
+
* which arms the platform's 2000ms splash-transfer deadline. A first frame
|
|
24
|
+
* slower than that strands a `STARTING_REVEAL` animation on the activity's main
|
|
25
|
+
* window for its lifetime, and every synced input event then waits out
|
|
26
|
+
* WindowManager's 5000ms animation budget twice.
|
|
27
|
+
*
|
|
28
|
+
* The exposure therefore requires `expo-splash-screen` to be **enabled**. A
|
|
29
|
+
* project that does not use it has no listener to clear and must not be
|
|
30
|
+
* reported — a check that fired on every Expo project would be noise, and noise
|
|
31
|
+
* is how a real finding gets ignored.
|
|
32
|
+
* @module health/expo-splash-inspection
|
|
33
|
+
*/
|
|
34
|
+
import type { HealthFinding } from "./contract.js";
|
|
35
|
+
/** The health check id. */
|
|
36
|
+
export declare const SPLASH_EXIT_CHECK = "expo.splash-exit";
|
|
37
|
+
/** The plugin file Lisa ships into the Expo template. */
|
|
38
|
+
export declare const SPLASH_PLUGIN_BASENAME = "withAndroidSplashNoClientExit";
|
|
39
|
+
/** What the inspection concluded. */
|
|
40
|
+
export type SplashExitInspection = {
|
|
41
|
+
readonly status: "pass";
|
|
42
|
+
readonly reason: string;
|
|
43
|
+
} | {
|
|
44
|
+
readonly status: "warn";
|
|
45
|
+
readonly reason: string;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Inspect an Expo project for the unregistered splash-exit opt-out.
|
|
49
|
+
*
|
|
50
|
+
* Fail-safe toward silence: anything unreadable yields `pass`. A health check
|
|
51
|
+
* that guesses when it cannot see is worse than one that says nothing, because
|
|
52
|
+
* a warning nobody can act on trains readers to skip the whole report.
|
|
53
|
+
* @param projectRoot Absolute project root.
|
|
54
|
+
* @returns The inspection outcome.
|
|
55
|
+
*/
|
|
56
|
+
export declare function inspectSplashExitOptOut(projectRoot: string): Promise<SplashExitInspection>;
|
|
57
|
+
/**
|
|
58
|
+
* The health finding for the splash-exit opt-out.
|
|
59
|
+
*
|
|
60
|
+
* Gated on the Expo stack. `expo-splash-screen` cannot be a dependency of a
|
|
61
|
+
* project that is not an Expo project, so this is belt-and-braces — but it is
|
|
62
|
+
* the cheap kind: it means a future change to dependency detection cannot make
|
|
63
|
+
* this check start speaking to Rails or CDK projects, where its advice would be
|
|
64
|
+
* nonsense and its presence would teach readers to skim the report.
|
|
65
|
+
* @param projectRoot Absolute project root.
|
|
66
|
+
* @param types Detected project types for this repository.
|
|
67
|
+
* @returns The finding.
|
|
68
|
+
*/
|
|
69
|
+
export declare function splashExitFinding(projectRoot: string, types: readonly string[]): Promise<HealthFinding>;
|
|
70
|
+
//# sourceMappingURL=expo-splash-inspection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expo-splash-inspection.d.ts","sourceRoot":"","sources":["../../src/health/expo-splash-inspection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAInD,2BAA2B;AAC3B,eAAO,MAAM,iBAAiB,qBAAqB,CAAC;AAEpD,yDAAyD;AACzD,eAAO,MAAM,sBAAsB,kCAAkC,CAAC;AAmBtE,qCAAqC;AACrC,MAAM,MAAM,oBAAoB,GAC5B;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACpD;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAoHzD;;;;;;;;GAQG;AACH,wBAAsB,uBAAuB,CAC3C,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,oBAAoB,CAAC,CAoC/B;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,iBAAiB,CACrC,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,SAAS,MAAM,EAAE,GACvB,OAAO,CAAC,aAAa,CAAC,CAaxB"}
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Read-only inspection of the Android splash-exit opt-out for Expo projects.
|
|
3
|
+
*
|
|
4
|
+
* ## Why a health finding rather than only a template file
|
|
5
|
+
*
|
|
6
|
+
* Lisa's Expo template ships `eslint.config.ts`, `tsconfig*.json`, `jest*`,
|
|
7
|
+
* `knip.json` and `scripts/` — and **never** `app.config.*` or `app.json`. The
|
|
8
|
+
* Expo plugin list is host-owned, so Lisa can put
|
|
9
|
+
* `withAndroidSplashNoClientExit.js` on disk but cannot register it.
|
|
10
|
+
*
|
|
11
|
+
* A config plugin that is present and unregistered does **nothing**. Shipping
|
|
12
|
+
* one without saying so would put a file that looks like a fix into every
|
|
13
|
+
* consumer while the defect stayed live — the same silent-no-op class the
|
|
14
|
+
* plugin exists to remove, reproduced by the delivery mechanism, and strictly
|
|
15
|
+
* worse than shipping nothing because it looks done.
|
|
16
|
+
*
|
|
17
|
+
* This check is what makes shipping the file honest: it reports the one thing
|
|
18
|
+
* Lisa cannot do for the project.
|
|
19
|
+
*
|
|
20
|
+
* ## What is being detected
|
|
21
|
+
*
|
|
22
|
+
* `expo-splash-screen` unconditionally registers an `OnExitAnimationListener`,
|
|
23
|
+
* which arms the platform's 2000ms splash-transfer deadline. A first frame
|
|
24
|
+
* slower than that strands a `STARTING_REVEAL` animation on the activity's main
|
|
25
|
+
* window for its lifetime, and every synced input event then waits out
|
|
26
|
+
* WindowManager's 5000ms animation budget twice.
|
|
27
|
+
*
|
|
28
|
+
* The exposure therefore requires `expo-splash-screen` to be **enabled**. A
|
|
29
|
+
* project that does not use it has no listener to clear and must not be
|
|
30
|
+
* reported — a check that fired on every Expo project would be noise, and noise
|
|
31
|
+
* is how a real finding gets ignored.
|
|
32
|
+
* @module health/expo-splash-inspection
|
|
33
|
+
*/
|
|
34
|
+
import { deterministicFinding } from "./finding-utils.js";
|
|
35
|
+
import { readProjectJsonObject, readProjectText } from "./read-only-fs.js";
|
|
36
|
+
/** The health check id. */
|
|
37
|
+
export const SPLASH_EXIT_CHECK = "expo.splash-exit";
|
|
38
|
+
/** The plugin file Lisa ships into the Expo template. */
|
|
39
|
+
export const SPLASH_PLUGIN_BASENAME = "withAndroidSplashNoClientExit";
|
|
40
|
+
/** The Expo package whose registration creates the exposure. */
|
|
41
|
+
const SPLASH_PACKAGE = "expo-splash-screen";
|
|
42
|
+
/**
|
|
43
|
+
* App-config filenames Expo resolves, in its own precedence order.
|
|
44
|
+
*
|
|
45
|
+
* All are read rather than only the first found: a project may carry both a
|
|
46
|
+
* static `app.json` and a dynamic `app.config.ts` that extends it, and the
|
|
47
|
+
* registration can live in either.
|
|
48
|
+
*/
|
|
49
|
+
const APP_CONFIG_FILES = Object.freeze([
|
|
50
|
+
"app.config.ts",
|
|
51
|
+
"app.config.js",
|
|
52
|
+
"app.config.mjs",
|
|
53
|
+
"app.json",
|
|
54
|
+
]);
|
|
55
|
+
/**
|
|
56
|
+
* Whether a `plugins` entry names the plugin.
|
|
57
|
+
*
|
|
58
|
+
* An entry is either a bare specifier or `[specifier, options]`, so the tuple
|
|
59
|
+
* form has to be unwrapped or a plugin configured with options reads as absent.
|
|
60
|
+
* @param entry One element of the plugins array.
|
|
61
|
+
* @returns True when it references the plugin.
|
|
62
|
+
*/
|
|
63
|
+
function entryNamesPlugin(entry) {
|
|
64
|
+
const specifier = Array.isArray(entry) ? entry[0] : entry;
|
|
65
|
+
return (typeof specifier === "string" && specifier.includes(SPLASH_PLUGIN_BASENAME));
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Registration PROVEN from static `app.json`, which can be parsed exactly.
|
|
69
|
+
* @param projectRoot Absolute project root.
|
|
70
|
+
* @returns True when `expo.plugins` actually contains the plugin.
|
|
71
|
+
*/
|
|
72
|
+
async function provenInAppJson(projectRoot) {
|
|
73
|
+
const config = await readProjectJsonObject(projectRoot, "app.json").catch(() => undefined);
|
|
74
|
+
const expo = config?.["expo"];
|
|
75
|
+
if (expo === null || typeof expo !== "object")
|
|
76
|
+
return false;
|
|
77
|
+
const plugins = expo["plugins"];
|
|
78
|
+
return Array.isArray(plugins) && plugins.some(entryNamesPlugin);
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* How well the app config evidences that the plugin is actually registered.
|
|
82
|
+
*
|
|
83
|
+
* ## Why a mention is not proof
|
|
84
|
+
*
|
|
85
|
+
* A dynamic `app.config.ts` cannot be evaluated from a read-only health check —
|
|
86
|
+
* running project code to answer a question about project code is not something
|
|
87
|
+
* this layer may do. So for that file all that is available is text, and text
|
|
88
|
+
* lies in the dangerous direction: a commented-out line, an unused import, or a
|
|
89
|
+
* registration inside a branch that never executes all contain the name while
|
|
90
|
+
* the plugin is not registered at all.
|
|
91
|
+
*
|
|
92
|
+
* Treating a mention as proof would make this check report `pass` — "you are
|
|
93
|
+
* protected" — to a project that is fully exposed. That is a worse outcome than
|
|
94
|
+
* no check, and it is precisely the false-green failure this check exists to
|
|
95
|
+
* prevent, so the asymmetry decides it: `pass` requires proof, and a mention
|
|
96
|
+
* that cannot be proven stays a warning that says exactly what to confirm.
|
|
97
|
+
* @param projectRoot Absolute project root.
|
|
98
|
+
* @returns The strongest evidence available.
|
|
99
|
+
*/
|
|
100
|
+
async function registrationEvidence(projectRoot) {
|
|
101
|
+
if (await provenInAppJson(projectRoot))
|
|
102
|
+
return "proven";
|
|
103
|
+
for (const file of APP_CONFIG_FILES) {
|
|
104
|
+
const text = await readProjectText(projectRoot, file);
|
|
105
|
+
if (typeof text === "string" && text.includes(SPLASH_PLUGIN_BASENAME))
|
|
106
|
+
return "mentioned";
|
|
107
|
+
}
|
|
108
|
+
return "absent";
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* The project manifest, or undefined when it cannot be read as one.
|
|
112
|
+
*
|
|
113
|
+
* `readProjectJsonObject` THROWS on malformed JSON and on a non-object root, so
|
|
114
|
+
* an unparseable package.json would propagate out of a health check whose whole
|
|
115
|
+
* contract is to stay quiet when it cannot see. Collapsed to undefined here
|
|
116
|
+
* because "cannot read the manifest" and "the manifest says no" are the same
|
|
117
|
+
* answer for this check: no evidence of exposure, so no finding.
|
|
118
|
+
* @param projectRoot Absolute project root.
|
|
119
|
+
* @returns The manifest, or undefined.
|
|
120
|
+
*/
|
|
121
|
+
async function readManifest(projectRoot) {
|
|
122
|
+
return readProjectJsonObject(projectRoot, "package.json").catch(() => undefined);
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Whether the project depends on `expo-splash-screen`.
|
|
126
|
+
*
|
|
127
|
+
* Dependency presence, not app-config mention: the package registers its
|
|
128
|
+
* listener from its own autolinked module, so being installed is what creates
|
|
129
|
+
* the exposure. A project that lists it in `plugins` but has not installed it
|
|
130
|
+
* is not exposed, and one that installed it without listing it is.
|
|
131
|
+
* @param projectRoot Absolute project root.
|
|
132
|
+
* @returns True when the package is a declared dependency.
|
|
133
|
+
*/
|
|
134
|
+
async function dependsOnSplashScreen(projectRoot) {
|
|
135
|
+
// `readProjectJsonObject` THROWS on malformed JSON and on a non-object root,
|
|
136
|
+
// so an unparseable package.json would propagate out of a health check whose
|
|
137
|
+
// whole contract is to stay quiet when it cannot see. Caught here rather than
|
|
138
|
+
// at the call site: "cannot read the manifest" and "the manifest says no" are
|
|
139
|
+
// the same answer for this check — no evidence of exposure, so no finding.
|
|
140
|
+
const pkg = await readManifest(projectRoot);
|
|
141
|
+
if (!pkg)
|
|
142
|
+
return false;
|
|
143
|
+
for (const field of ["dependencies", "devDependencies"]) {
|
|
144
|
+
const deps = pkg[field];
|
|
145
|
+
if (deps !== null &&
|
|
146
|
+
typeof deps === "object" &&
|
|
147
|
+
SPLASH_PACKAGE in deps)
|
|
148
|
+
return true;
|
|
149
|
+
}
|
|
150
|
+
return false;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Inspect an Expo project for the unregistered splash-exit opt-out.
|
|
154
|
+
*
|
|
155
|
+
* Fail-safe toward silence: anything unreadable yields `pass`. A health check
|
|
156
|
+
* that guesses when it cannot see is worse than one that says nothing, because
|
|
157
|
+
* a warning nobody can act on trains readers to skip the whole report.
|
|
158
|
+
* @param projectRoot Absolute project root.
|
|
159
|
+
* @returns The inspection outcome.
|
|
160
|
+
*/
|
|
161
|
+
export async function inspectSplashExitOptOut(projectRoot) {
|
|
162
|
+
if (!(await dependsOnSplashScreen(projectRoot)))
|
|
163
|
+
return {
|
|
164
|
+
status: "pass",
|
|
165
|
+
reason: `${SPLASH_PACKAGE} is not a dependency, so no exit listener is registered and there is nothing to clear`,
|
|
166
|
+
};
|
|
167
|
+
const evidence = await registrationEvidence(projectRoot);
|
|
168
|
+
if (evidence === "proven")
|
|
169
|
+
return {
|
|
170
|
+
status: "pass",
|
|
171
|
+
reason: `app.json lists ${SPLASH_PLUGIN_BASENAME} in expo.plugins, so the Android 12+ splash-exit handshake is opted out of`,
|
|
172
|
+
};
|
|
173
|
+
if (evidence === "mentioned")
|
|
174
|
+
return {
|
|
175
|
+
status: "warn",
|
|
176
|
+
reason: `${SPLASH_PLUGIN_BASENAME} is named in a dynamic app config, but a read-only check cannot ` +
|
|
177
|
+
"execute that config to confirm the plugin is actually in the effective `plugins` array — a " +
|
|
178
|
+
"commented-out line, an unused import, or a branch that never runs all read the same as a real " +
|
|
179
|
+
"registration. Confirm it is registered AFTER expo-splash-screen. This is reported rather than " +
|
|
180
|
+
"passed because a wrong `pass` here tells an exposed project it is protected.",
|
|
181
|
+
};
|
|
182
|
+
return {
|
|
183
|
+
status: "warn",
|
|
184
|
+
reason: `${SPLASH_PACKAGE} is installed and the app config does not register ${SPLASH_PLUGIN_BASENAME}. ` +
|
|
185
|
+
"Lisa ships that plugin but CANNOT register it — the Expo plugin list is owned by this project. " +
|
|
186
|
+
"Until it is registered the plugin file is inert: expo-splash-screen's exit listener stays " +
|
|
187
|
+
"armed, and a first frame slower than the platform's 2000ms splash-transfer deadline strands a " +
|
|
188
|
+
"STARTING_REVEAL animation for the life of the activity, costing every synced input event two " +
|
|
189
|
+
"5000ms animation waits. Add it to the plugins array AFTER expo-splash-screen.",
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* The health finding for the splash-exit opt-out.
|
|
194
|
+
*
|
|
195
|
+
* Gated on the Expo stack. `expo-splash-screen` cannot be a dependency of a
|
|
196
|
+
* project that is not an Expo project, so this is belt-and-braces — but it is
|
|
197
|
+
* the cheap kind: it means a future change to dependency detection cannot make
|
|
198
|
+
* this check start speaking to Rails or CDK projects, where its advice would be
|
|
199
|
+
* nonsense and its presence would teach readers to skim the report.
|
|
200
|
+
* @param projectRoot Absolute project root.
|
|
201
|
+
* @param types Detected project types for this repository.
|
|
202
|
+
* @returns The finding.
|
|
203
|
+
*/
|
|
204
|
+
export async function splashExitFinding(projectRoot, types) {
|
|
205
|
+
if (!types.includes("expo"))
|
|
206
|
+
return deterministicFinding(SPLASH_EXIT_CHECK, "pass", "not an Expo project, so there is no Android splash-exit handshake to opt out of");
|
|
207
|
+
const inspection = await inspectSplashExitOptOut(projectRoot);
|
|
208
|
+
return deterministicFinding(SPLASH_EXIT_CHECK, inspection.status, inspection.reason);
|
|
209
|
+
}
|
|
210
|
+
//# sourceMappingURL=expo-splash-inspection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expo-splash-inspection.js","sourceRoot":"","sources":["../../src/health/expo-splash-inspection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE3E,2BAA2B;AAC3B,MAAM,CAAC,MAAM,iBAAiB,GAAG,kBAAkB,CAAC;AAEpD,yDAAyD;AACzD,MAAM,CAAC,MAAM,sBAAsB,GAAG,+BAA+B,CAAC;AAEtE,gEAAgE;AAChE,MAAM,cAAc,GAAG,oBAAoB,CAAC;AAE5C;;;;;;GAMG;AACH,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC;IACrC,eAAe;I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AAsB,kEAAkE;gBAC3F,6FAA6F;gBAC7F,gGAAgG;gBAChG,gGAAgG;gBAChG,8EAA8E;SACjF,CAAC;IAEJ,OAAO;QACL,MAAM,EAAE,MAAM;QACd,MAAM,EACJ,GAAG,cAAc,sDAAsD,sBAAsB,IAAI;YACjG,iGAAiG;YACjG,4FAA4F;YAC5F,gGAAgG;YAChG,+FAA+F;YAC/F,+EAA+E;KAClF,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,WAAmB,EACnB,KAAwB;IAExB,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC;QACzB,OAAO,oBAAoB,CACzB,iBAAiB,EACjB,MAAM,EACN,iFAAiF,CAClF,CAAC;IACJ,MAAM,UAAU,GAAG,MAAM,uBAAuB,CAAC,WAAW,CAAC,CAAC;IAC9D,OAAO,oBAAoB,CACzB,iBAAiB,EACjB,UAAU,CAAC,MAAM,EACjB,UAAU,CAAC,MAAM,CAClB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
// This file is managed by Lisa and IS replaced on each `lisa` run.
|
|
2
|
+
// Do not edit directly — durable changes belong upstream in Lisa.
|
|
3
|
+
|
|
4
|
+
const { withMainActivity } = require("expo/config-plugins");
|
|
5
|
+
const {
|
|
6
|
+
mergeContents,
|
|
7
|
+
} = require("@expo/config-plugins/build/utils/generateCode");
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Tag written into the generated MainActivity so the mod is idempotent. Expo
|
|
11
|
+
* runs prebuild mods repeatedly, and `expo prebuild` can be run against an
|
|
12
|
+
* existing `android/` directory, so an unconditional insert would stack.
|
|
13
|
+
*/
|
|
14
|
+
const TAG = "lisa-splash-no-client-exit";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Anchor. `super.onCreate(null)` is React Native's own template line, not one
|
|
18
|
+
* of expo-splash-screen's `@generated` markers, so this does not depend on
|
|
19
|
+
* expo-splash-screen's marker text staying stable. expo-splash-screen anchors
|
|
20
|
+
* its own `SplashScreenManager.registerOnActivity(this)` on the same line at
|
|
21
|
+
* offset 0 (immediately BEFORE it), so inserting at offset 1 lands after both
|
|
22
|
+
* the registration and `super.onCreate` — the Activity is fully attached, and
|
|
23
|
+
* still far ahead of `onResume`, which is where the platform latches whether
|
|
24
|
+
* the app handles the splash exit.
|
|
25
|
+
*/
|
|
26
|
+
const ANCHOR = /super\.onCreate\(null\)/;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Kotlin inserted into `MainActivity.onCreate`.
|
|
30
|
+
*
|
|
31
|
+
* `android.os.Build` is fully qualified on purpose: the RN template happens to
|
|
32
|
+
* import it today, but relying on that would make this plugin fail to compile
|
|
33
|
+
* the first time the template drops the import.
|
|
34
|
+
*/
|
|
35
|
+
const SNIPPET = ` // Opt out of the Android 12+ client-side splash-exit handshake.
|
|
36
|
+
//
|
|
37
|
+
// expo-splash-screen's SplashScreenManager.registerOnActivity() always calls
|
|
38
|
+
// splashScreen.setOnExitAnimationListener(), which latches
|
|
39
|
+
// ActivityRecord.mHandleExitSplashScreen = true on the server at
|
|
40
|
+
// resume-report time. That switches on the cross-process transfer state
|
|
41
|
+
// machine: COPYING -> ATTACH_TO_CLIENT -> FINISH. On entering
|
|
42
|
+
// ATTACH_TO_CLIENT the system arms TRANSFER_SPLASH_SCREEN_TIMEOUT (2000ms)
|
|
43
|
+
// and hands over the splash bitmap; the app must then build a
|
|
44
|
+
// SplashScreenView, attach it, and call reportSplashScreenAttached -- which
|
|
45
|
+
// ActivityThread gates behind an onPreDraw plus a postOnAnimation, so it
|
|
46
|
+
// requires the UI thread to COMPLETE A FRAME.
|
|
47
|
+
//
|
|
48
|
+
// Miss those 2000ms and the server takes the timeout path, which (unlike
|
|
49
|
+
// the success path) skips mStartingWindow.cancelAnimation() and still asks
|
|
50
|
+
// for a reveal animation. Two STARTING_REVEAL animations then exist -- one
|
|
51
|
+
// on the starting window, one on the main window -- and the cancel loop in
|
|
52
|
+
// WindowState#removeIfPossible short-circuits on the first match, so the
|
|
53
|
+
// main window's reveal is never cancelled. StartingWindowAnimationAdaptor
|
|
54
|
+
// discards its finish callback, so nothing else ends it: WindowManager
|
|
55
|
+
// believes the activity is animating until it is destroyed.
|
|
56
|
+
//
|
|
57
|
+
// UiAutomation.injectInputEvent(event, sync) implies waitForAnimations=true,
|
|
58
|
+
// which blocks in WindowManagerService#waitForAnimationsToComplete for
|
|
59
|
+
// ANIMATION_COMPLETED_TIMEOUT_MS (5000ms), TWICE per gesture. Automated taps
|
|
60
|
+
// then cost ~10s and per-character text entry breaches the driver's
|
|
61
|
+
// deadline. On a 2-core software-GL emulator frames cost 700-1900ms, so
|
|
62
|
+
// 2000ms is one to three frames of budget.
|
|
63
|
+
//
|
|
64
|
+
// Clearing the listener removes the failure mode rather than making it less
|
|
65
|
+
// likely: with no exit listener registered, mHandleExitSplashScreen stays
|
|
66
|
+
// false, transferSplashScreenIfNeeded() returns immediately, and the state
|
|
67
|
+
// machine never leaves TRANSFER_SPLASH_SCREEN_IDLE. There is no copy, no
|
|
68
|
+
// attach, no 2000ms deadline, and no second reveal to strand. The system
|
|
69
|
+
// performs the splash exit itself, as it does for any app that does not opt
|
|
70
|
+
// in.
|
|
71
|
+
//
|
|
72
|
+
// Cost: the 400ms alpha fade of the splash VIEW. The splash itself is
|
|
73
|
+
// unaffected -- it still shows, and still stays up until
|
|
74
|
+
// SplashScreen.hideAsync(), because that is expo's own
|
|
75
|
+
// keepSplashScreenOnScreen pre-draw gate, independent of the exit listener.
|
|
76
|
+
//
|
|
77
|
+
// Not alternatives, so they are not worth re-trying: SplashScreenOptions.fade
|
|
78
|
+
// is inert on Android in expo-splash-screen 57.0.2 (declared, never read --
|
|
79
|
+
// configureSplashScreen uses only duration). Reducing duration does not help
|
|
80
|
+
// either, because the deadline is on the platform's attach report, which
|
|
81
|
+
// happens before any exit animation would run. Nor do disabled animations or
|
|
82
|
+
// zeroed animation scales: this is a STUCK animation, not a slow one.
|
|
83
|
+
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.S) {
|
|
84
|
+
splashScreen.clearOnExitAnimationListener()
|
|
85
|
+
}`;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Merges the snippet into MainActivity, converting a missing anchor into an
|
|
89
|
+
* actionable failure.
|
|
90
|
+
*
|
|
91
|
+
* A silent no-op is exactly the failure this plugin exists to prevent, so
|
|
92
|
+
* prebuild must fail rather than emit a build that merely looks patched.
|
|
93
|
+
* `mergeContents` already throws when the anchor is absent, but its message
|
|
94
|
+
* names only the regex; this rethrows with the file and constant to edit.
|
|
95
|
+
* @param {string} contents Current MainActivity source.
|
|
96
|
+
* @returns {object} The mergeContents result, with the snippet inserted.
|
|
97
|
+
*/
|
|
98
|
+
const mergeOrThrow = contents => {
|
|
99
|
+
try {
|
|
100
|
+
return mergeContents({
|
|
101
|
+
src: contents,
|
|
102
|
+
newSrc: SNIPPET,
|
|
103
|
+
tag: TAG,
|
|
104
|
+
anchor: ANCHOR,
|
|
105
|
+
offset: 1,
|
|
106
|
+
comment: " //",
|
|
107
|
+
});
|
|
108
|
+
} catch (error) {
|
|
109
|
+
throw new Error(
|
|
110
|
+
"withAndroidSplashNoClientExit could not find `super.onCreate(null)` in " +
|
|
111
|
+
"MainActivity, so the splash-exit listener would not be cleared and the " +
|
|
112
|
+
"stranded-reveal defect would re-open. Failing prebuild deliberately: " +
|
|
113
|
+
"an unpatched build is the outcome this plugin exists to prevent.\n\n" +
|
|
114
|
+
"Most likely a React Native upgrade changed the onCreate signature. " +
|
|
115
|
+
"THIS FILE IS MANAGED BY LISA and is replaced on each `lisa` run, so " +
|
|
116
|
+
"editing ANCHOR here will be reverted — report the RN version and the " +
|
|
117
|
+
"MainActivity onCreate line upstream instead.\n\n" +
|
|
118
|
+
"To unblock immediately, remove this plugin from your app config. That " +
|
|
119
|
+
"restores the defect (slow first frames strand a reveal animation and " +
|
|
120
|
+
"degrade every synced input event) but is a deliberate, visible choice " +
|
|
121
|
+
"rather than a silently unpatched build.\n\n" +
|
|
122
|
+
`Underlying error: ${error instanceof Error ? error.message : String(error)}`
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Expo config plugin that stops the app from taking over the Android 12+
|
|
129
|
+
* splash-screen exit animation.
|
|
130
|
+
*
|
|
131
|
+
* Without this, a slow first frame can miss the platform's 2000ms
|
|
132
|
+
* splash-transfer deadline, which strands a `STARTING_REVEAL` animation on the
|
|
133
|
+
* activity's main window for the life of that activity. Every subsequent
|
|
134
|
+
* synced input event then waits out WindowManager's 5000ms animation budget
|
|
135
|
+
* twice. See the snippet's own comments for the full chain.
|
|
136
|
+
*
|
|
137
|
+
* Must run AFTER `expo-splash-screen`, which registers the listener this
|
|
138
|
+
* removes. Appending it to the plugin list after that entry is what guarantees
|
|
139
|
+
* mod order.
|
|
140
|
+
* @param {object} config The Expo config being modified.
|
|
141
|
+
* @returns {object} The config with the MainActivity mod applied.
|
|
142
|
+
*/
|
|
143
|
+
const withAndroidSplashNoClientExit = config =>
|
|
144
|
+
withMainActivity(config, config => {
|
|
145
|
+
const { modResults } = config;
|
|
146
|
+
|
|
147
|
+
if (modResults.language !== "kt") {
|
|
148
|
+
throw new Error(
|
|
149
|
+
"withAndroidSplashNoClientExit expects a Kotlin MainActivity, got " +
|
|
150
|
+
`"${modResults.language}". Port the snippet to Java before removing ` +
|
|
151
|
+
"this guard — silently skipping would re-open the stranded-reveal defect."
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
const merged = mergeOrThrow(modResults.contents);
|
|
156
|
+
|
|
157
|
+
return {
|
|
158
|
+
...config,
|
|
159
|
+
modResults: {
|
|
160
|
+
...modResults,
|
|
161
|
+
contents: merged.contents,
|
|
162
|
+
},
|
|
163
|
+
};
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
module.exports = withAndroidSplashNoClientExit;
|
|
167
|
+
module.exports.TAG = TAG;
|
package/package.json
CHANGED
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
"zod-validation-error": "^4.0.0"
|
|
162
162
|
},
|
|
163
163
|
"name": "@codyswann/lisa",
|
|
164
|
-
"version": "4.23.
|
|
164
|
+
"version": "4.23.38",
|
|
165
165
|
"description": "Claude Code governance framework that applies guardrails, guidance, and automated enforcement to projects",
|
|
166
166
|
"main": "dist/index.js",
|
|
167
167
|
"exports": {
|
|
@@ -305,6 +305,6 @@
|
|
|
305
305
|
"test": "tests"
|
|
306
306
|
},
|
|
307
307
|
"types": "./dist/index.d.ts",
|
|
308
|
-
"lisaReleaseCommit": "
|
|
309
|
-
"gitHead": "
|
|
308
|
+
"lisaReleaseCommit": "70a9c2e5589e47499cbe3cb704737b16bc0ceeda",
|
|
309
|
+
"gitHead": "70a9c2e5589e47499cbe3cb704737b16bc0ceeda"
|
|
310
310
|
}
|