@codyswann/lisa 4.28.4 → 4.28.5
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/README.md +3 -1
- package/all/copy-overwrite/scripts/lisa-postinstall.mjs +6 -2
- package/dist/cli/apply.d.ts +20 -0
- package/dist/cli/apply.d.ts.map +1 -1
- package/dist/cli/apply.js +70 -3
- package/dist/cli/apply.js.map +1 -1
- package/dist/cli/doctor-apply-freshness.d.ts.map +1 -1
- package/dist/cli/doctor-apply-freshness.js +10 -4
- package/dist/cli/doctor-apply-freshness.js.map +1 -1
- package/dist/cli/shared-options.d.ts +11 -4
- package/dist/cli/shared-options.d.ts.map +1 -1
- package/dist/cli/shared-options.js +8 -8
- package/dist/cli/shared-options.js.map +1 -1
- package/dist/core/apply-mode.d.ts +80 -29
- package/dist/core/apply-mode.d.ts.map +1 -1
- package/dist/core/apply-mode.js +23 -2
- package/dist/core/apply-mode.js.map +1 -1
- package/dist/core/apply-receipt.d.ts +5 -1
- package/dist/core/apply-receipt.d.ts.map +1 -1
- package/dist/core/apply-receipt.js.map +1 -1
- package/dist/core/config.d.ts +24 -12
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js.map +1 -1
- package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
- package/dist/core/lisa-owned-hash-ledger.js +4 -0
- package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
- 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 -2
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/dist/migrations/ensure-lisa-postinstall.d.ts +1 -1
- package/dist/migrations/ensure-lisa-postinstall.d.ts.map +1 -1
- package/dist/migrations/ensure-lisa-postinstall.js +28 -5
- package/dist/migrations/ensure-lisa-postinstall.js.map +1 -1
- package/dist/utils/postinstall-trampoline-source.js +10 -1
- package/dist/utils/postinstall-trampoline-source.js.map +1 -1
- 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
- package/scripts/install-claude-plugins.sh +7 -2
package/README.md
CHANGED
|
@@ -184,7 +184,9 @@ whenever a project seems to have stopped tracking upstream changes; a repo can
|
|
|
184
184
|
otherwise sit silently stale for months.
|
|
185
185
|
|
|
186
186
|
The same check covers a second, quieter gap. A package install runs apply in
|
|
187
|
-
**postinstall-safe** mode
|
|
187
|
+
**postinstall-safe** mode — declared by the `LISA_POSTINSTALL=1` /
|
|
188
|
+
`--postinstall-safe` marker every Lisa-written postinstall invocation carries —
|
|
189
|
+
which deliberately skips every
|
|
188
190
|
agent emit — Codex, Claude, agy, Copilot, OpenCode — and the Sonar integration,
|
|
189
191
|
because those rewrite host-owned files. So no `bun install` at any version can
|
|
190
192
|
reconcile `.codex/config.toml`; only a full `lisa apply .` does. Doctor now says
|
|
@@ -152,7 +152,11 @@ export function runPostinstall(cwd = process.cwd(), env = process.env) {
|
|
|
152
152
|
try {
|
|
153
153
|
child = boundedSpawnSync(
|
|
154
154
|
process.execPath,
|
|
155
|
-
|
|
155
|
+
// `--postinstall-safe` is what selects the reduced apply, NOT
|
|
156
|
+
// `--skip-git-check` (CodySwannGT/lisa#3066). Both are needed here: an
|
|
157
|
+
// install has already dirtied package.json and the lockfile, and an
|
|
158
|
+
// install must not regenerate committed agent trees.
|
|
159
|
+
[LISA_ENTRY, "--yes", "--skip-git-check", "--postinstall-safe", "."],
|
|
156
160
|
{
|
|
157
161
|
cwd,
|
|
158
162
|
env: { ...env, LISA_BOOTSTRAP: "1" },
|
|
@@ -209,7 +213,7 @@ export function runPostinstall(cwd = process.cwd(), env = process.env) {
|
|
|
209
213
|
" The error is printed above. Run `lisa doctor` for the recorded state, or",
|
|
210
214
|
" re-run the apply directly to see it in isolation:",
|
|
211
215
|
"",
|
|
212
|
-
` node ${LISA_ENTRY} --yes --skip-git-check .`,
|
|
216
|
+
` node ${LISA_ENTRY} --yes --skip-git-check --postinstall-safe .`,
|
|
213
217
|
"",
|
|
214
218
|
].join("\n")
|
|
215
219
|
);
|
package/dist/cli/apply.d.ts
CHANGED
|
@@ -1,4 +1,24 @@
|
|
|
1
|
+
import { type ApplyModeInputs } from "../core/apply-mode.js";
|
|
1
2
|
import { type CLIOptions } from "./shared-options.js";
|
|
3
|
+
/**
|
|
4
|
+
* The one-time notice for the retired meaning of `--skip-git-check`.
|
|
5
|
+
*
|
|
6
|
+
* Until CodySwannGT/lisa#3066 the flag also selected the reduced
|
|
7
|
+
* `postinstall-safe` subset. Every Lisa-written postinstall invocation now
|
|
8
|
+
* declares its own context instead, so those callers are unaffected — but a
|
|
9
|
+
* hand-written or copied command that passes only the flag gets a DIFFERENT
|
|
10
|
+
* apply than it used to, and a change of meaning that arrives silently is the
|
|
11
|
+
* defect restated rather than fixed.
|
|
12
|
+
*
|
|
13
|
+
* It warns rather than fails. A hard failure would abort the apply for every
|
|
14
|
+
* consumer whose `package.json` still carries the pre-fix hook text, turning a
|
|
15
|
+
* template-sync change into a fleet-wide stop on template updates — strictly
|
|
16
|
+
* worse than the bug. The hook migrates itself on the first apply, so the
|
|
17
|
+
* notice is also self-limiting.
|
|
18
|
+
* @param state - The resolved apply-mode inputs for this invocation.
|
|
19
|
+
* @returns The notice, or undefined when nothing changed for this caller.
|
|
20
|
+
*/
|
|
21
|
+
export declare function getRetiredSkipGitCheckNotice(state: ApplyModeInputs): string | undefined;
|
|
2
22
|
/**
|
|
3
23
|
* Apply Lisa to the given destination with the given options.
|
|
4
24
|
*
|
package/dist/cli/apply.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply.d.ts","sourceRoot":"","sources":["../../src/cli/apply.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"apply.d.ts","sourceRoot":"","sources":["../../src/cli/apply.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,eAAe,EAIrB,MAAM,uBAAuB,CAAC;AAgB/B,OAAO,EACL,KAAK,UAAU,EAGhB,MAAM,qBAAqB,CAAC;AAoO7B;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,eAAe,GACrB,MAAM,GAAG,SAAS,CAepB;AAmCD;;;;;;;;;;GAUG;AACH,wBAAsB,QAAQ,CAC5B,WAAW,EAAE,MAAM,GAAG,SAAS,EAC/B,OAAO,EAAE,UAAU,GAClB,OAAO,CAAC,IAAI,CAAC,CAwEf"}
|
package/dist/cli/apply.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as path from "node:path";
|
|
2
2
|
import { fileURLToPath } from "node:url";
|
|
3
|
-
import { resolveApplyMode } from "../core/apply-mode.js";
|
|
3
|
+
import { LISA_POSTINSTALL_ENV, resolveApplyMode, resolvePostinstallDeclaration, } from "../core/apply-mode.js";
|
|
4
4
|
import { recordSuccessfulApply } from "../core/apply-receipt.js";
|
|
5
5
|
import { getBootstrapApplySkipNotice } from "../core/bootstrap-environment.js";
|
|
6
6
|
import { ACCEPTED_HARNESS_INPUTS } from "../core/config.js";
|
|
@@ -32,7 +32,12 @@ function printUsageAndExit() {
|
|
|
32
32
|
console.log(" -n, --dry-run Show what would be done without making changes");
|
|
33
33
|
console.log(" -y, --yes Non-interactive mode (auto-accept defaults, overwrite on conflict)");
|
|
34
34
|
console.log(" -v, --validate Validate project compatibility without applying changes");
|
|
35
|
-
console.log(" --skip-git-check Skip dirty git working directory check
|
|
35
|
+
console.log(" --skip-git-check Skip the dirty git working directory check. The apply still");
|
|
36
|
+
console.log(" runs in full, including every agent emit.");
|
|
37
|
+
console.log(" --postinstall-safe");
|
|
38
|
+
console.log(" Declare a package-manager install lifecycle: runs the reduced");
|
|
39
|
+
console.log(" subset (no agent emit, no Sonar). Same as LISA_POSTINSTALL=1.");
|
|
40
|
+
console.log(" --full-apply Run the FULL apply even inside a declared postinstall");
|
|
36
41
|
console.log(" --refresh-templates [paths]");
|
|
37
42
|
console.log(" Let a non-interactive apply replace managed files it would");
|
|
38
43
|
console.log(" otherwise report as out of date. Optionally scope to a");
|
|
@@ -99,7 +104,8 @@ async function migrateLegacyHarnessIfNeeded(destDir, logger) {
|
|
|
99
104
|
* @param parts.yesMode - Whether prompts auto-accept
|
|
100
105
|
* @param parts.validateOnly - Whether to validate instead of apply
|
|
101
106
|
* @param parts.skipGitCheck - Whether the dirty-tree prompt is skipped
|
|
102
|
-
* @param parts.
|
|
107
|
+
* @param parts.postinstall - Whether this apply declared a postinstall context
|
|
108
|
+
* @param parts.fullApply - Whether to force the full apply anyway
|
|
103
109
|
* @param parts.refreshTemplates - Opted-in managed files, if any
|
|
104
110
|
* @param parts.harness - Target harness for emitted artifacts
|
|
105
111
|
* @returns The config to hand to Lisa
|
|
@@ -157,6 +163,64 @@ async function finalizeSuccessfulApply(parts) {
|
|
|
157
163
|
stalePaths,
|
|
158
164
|
});
|
|
159
165
|
}
|
|
166
|
+
/**
|
|
167
|
+
* The one-time notice for the retired meaning of `--skip-git-check`.
|
|
168
|
+
*
|
|
169
|
+
* Until CodySwannGT/lisa#3066 the flag also selected the reduced
|
|
170
|
+
* `postinstall-safe` subset. Every Lisa-written postinstall invocation now
|
|
171
|
+
* declares its own context instead, so those callers are unaffected — but a
|
|
172
|
+
* hand-written or copied command that passes only the flag gets a DIFFERENT
|
|
173
|
+
* apply than it used to, and a change of meaning that arrives silently is the
|
|
174
|
+
* defect restated rather than fixed.
|
|
175
|
+
*
|
|
176
|
+
* It warns rather than fails. A hard failure would abort the apply for every
|
|
177
|
+
* consumer whose `package.json` still carries the pre-fix hook text, turning a
|
|
178
|
+
* template-sync change into a fleet-wide stop on template updates — strictly
|
|
179
|
+
* worse than the bug. The hook migrates itself on the first apply, so the
|
|
180
|
+
* notice is also self-limiting.
|
|
181
|
+
* @param state - The resolved apply-mode inputs for this invocation.
|
|
182
|
+
* @returns The notice, or undefined when nothing changed for this caller.
|
|
183
|
+
*/
|
|
184
|
+
export function getRetiredSkipGitCheckNotice(state) {
|
|
185
|
+
if (!state.skipGitCheck ||
|
|
186
|
+
state.postinstall === true ||
|
|
187
|
+
state.fullApply === true) {
|
|
188
|
+
return undefined;
|
|
189
|
+
}
|
|
190
|
+
return ("--skip-git-check now waives ONLY the clean-tree check; this apply runs in " +
|
|
191
|
+
"FULL, including every agent emit and the Sonar integration. It used to " +
|
|
192
|
+
"also select the reduced postinstall-safe subset (CodySwannGT/lisa#3066). " +
|
|
193
|
+
`Pass --postinstall-safe (or set ${LISA_POSTINSTALL_ENV}=1) if you wanted ` +
|
|
194
|
+
"the reduced apply.");
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Read this process's postinstall declaration.
|
|
198
|
+
*
|
|
199
|
+
* The environment spelling is not optional here: the declaration originates in
|
|
200
|
+
* the hook text inside a consumer's own `package.json`, and a shell command
|
|
201
|
+
* prefix is the only way that text can reach the process it launches.
|
|
202
|
+
* @param options - Parsed CLI options for this invocation.
|
|
203
|
+
* @returns True when this apply declared itself a package-manager install.
|
|
204
|
+
*/
|
|
205
|
+
function readPostinstallDeclaration(options) {
|
|
206
|
+
// Lisa's CLI is not a Nest service or a Lambda handler; it must introspect
|
|
207
|
+
// the environment its own postinstall hook hands it, and routing this one
|
|
208
|
+
// presence check through a config service would add indirection rather than
|
|
209
|
+
// type-safety.
|
|
210
|
+
// eslint-disable-next-line no-restricted-syntax -- see above
|
|
211
|
+
return resolvePostinstallDeclaration(options.postinstallSafe, process.env);
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Announce the retired meaning of `--skip-git-check` when it applies.
|
|
215
|
+
* @param logger - Where the notice goes.
|
|
216
|
+
* @param state - The resolved apply-mode inputs for this invocation.
|
|
217
|
+
*/
|
|
218
|
+
function warnIfRetiredSkipGitCheck(logger, state) {
|
|
219
|
+
const notice = getRetiredSkipGitCheckNotice(state);
|
|
220
|
+
if (notice !== undefined) {
|
|
221
|
+
logger.warn(notice);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
160
224
|
/**
|
|
161
225
|
* Apply Lisa to the given destination with the given options.
|
|
162
226
|
*
|
|
@@ -184,18 +248,21 @@ export async function runApply(destination, options) {
|
|
|
184
248
|
const configFileExists = await projectConfigExists(destDir);
|
|
185
249
|
const harness = resolveHarness(options.harness, projectConfig);
|
|
186
250
|
const refreshTemplates = parseRefreshTemplates(options.refreshTemplates);
|
|
251
|
+
const postinstall = readPostinstallDeclaration(options);
|
|
187
252
|
const config = buildApplyConfig({
|
|
188
253
|
destDir,
|
|
189
254
|
dryRun,
|
|
190
255
|
yesMode,
|
|
191
256
|
validateOnly,
|
|
192
257
|
skipGitCheck: options.skipGitCheck ?? false,
|
|
258
|
+
postinstall,
|
|
193
259
|
fullApply: options.fullApply ?? false,
|
|
194
260
|
refreshTemplates,
|
|
195
261
|
harness,
|
|
196
262
|
});
|
|
197
263
|
const deps = createDependencies(dryRun, yesMode, logger);
|
|
198
264
|
const lisa = new Lisa(config, deps);
|
|
265
|
+
warnIfRetiredSkipGitCheck(logger, config);
|
|
199
266
|
try {
|
|
200
267
|
const result = options.validate
|
|
201
268
|
? await lisa.validate()
|
package/dist/cli/apply.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply.js","sourceRoot":"","sources":["../../src/cli/apply.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,
|
|
1
|
+
{"version":3,"file":"apply.js","sourceRoot":"","sources":["../../src/cli/apply.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAEL,oBAAoB,EACpB,gBAAgB,EAChB,6BAA6B,GAC9B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EACL,4BAA4B,EAC5B,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,0BAA0B,EAC1B,kBAAkB,GACnB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BA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
1
|
+
{"version":3,"file":"doctor-apply-freshness.d.ts","sourceRoot":"","sources":["../../src/cli/doctor-apply-freshness.ts"],"names":[],"mappings":"AAkFA,wEAAwE;AACxE,UAAU,cAAc;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC;CAChB;AAoLD;;;;GAIG;AACH,wBAAsB,mBAAmB,CACvC,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,cAAc,CAAC,CA2BzB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,gBAAgB,IAAI,cAAc,CASjD"}
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
* version stamp means none has finished since that version. Both are reported
|
|
16
16
|
* with the version and date, and with the command that reproduces the failure.
|
|
17
17
|
*
|
|
18
|
-
* A third silence lives in the same subsystem: postinstall-safe mode
|
|
19
|
-
*
|
|
20
|
-
* emit. That is deliberate — those emits rewrite host-owned files — but it
|
|
18
|
+
* A third silence lives in the same subsystem: postinstall-safe mode (what a
|
|
19
|
+
* package manager's install declares, via `--postinstall-safe` /
|
|
20
|
+
* `LISA_POSTINSTALL=1`) skips every agent emit. That is deliberate — those emits rewrite host-owned files — but it
|
|
21
21
|
* means no `bun install` at any version can reconcile `.codex/config.toml`, so
|
|
22
22
|
* repos on the newest Lisa still carry a deprecated `codex_hooks` key and an
|
|
23
23
|
* audit reasonably but wrongly concluded "apply just hasn't re-run". Same shape
|
|
@@ -51,7 +51,13 @@ import { getPackageVersion } from "./version.js";
|
|
|
51
51
|
const CHECK_NAME = "Templates applied by this Lisa version?";
|
|
52
52
|
const YAML_CHECK_NAME = "YAML runtime usable?";
|
|
53
53
|
const REAPPLY_COMMAND = "node node_modules/@codyswann/lisa/dist/index.js --yes --skip-git-check .";
|
|
54
|
-
/**
|
|
54
|
+
/**
|
|
55
|
+
* A plain operator apply, which performs the agent emits.
|
|
56
|
+
*
|
|
57
|
+
* `REAPPLY_COMMAND` above performs them too now — since
|
|
58
|
+
* CodySwannGT/lisa#3066 `--skip-git-check` waives only the clean-tree check —
|
|
59
|
+
* but this is the form to hand someone whose tree is already clean.
|
|
60
|
+
*/
|
|
55
61
|
const FULL_APPLY_COMMAND = "node node_modules/@codyswann/lisa/dist/index.js .";
|
|
56
62
|
/**
|
|
57
63
|
* How many stale paths to name inline before deferring to the receipt.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor-apply-freshness.js","sourceRoot":"","sources":["../../src/cli/doctor-apply-freshness.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAEnC,OAAO,EACL,0BAA0B,EAC1B,gBAAgB,GACjB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjD,MAAM,UAAU,GAAG,yCAAyC,CAAC;AAC7D,MAAM,eAAe,GAAG,sBAAsB,CAAC;AAC/C,MAAM,eAAe,GACnB,0EAA0E,CAAC;AAC7E
|
|
1
|
+
{"version":3,"file":"doctor-apply-freshness.js","sourceRoot":"","sources":["../../src/cli/doctor-apply-freshness.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAEnC,OAAO,EAC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AAO,EAAE,CAAC;AACjE,CAAC"}
|
|
@@ -12,11 +12,18 @@ export interface CLIOptions {
|
|
|
12
12
|
validate?: boolean;
|
|
13
13
|
skipGitCheck?: boolean;
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* Declare this apply a package-manager install lifecycle.
|
|
16
16
|
*
|
|
17
|
-
* The
|
|
18
|
-
*
|
|
19
|
-
*
|
|
17
|
+
* The only thing that selects the reduced `postinstall-safe` subset. Every
|
|
18
|
+
* Lisa-written postinstall invocation carries it, in this spelling or as
|
|
19
|
+
* `LISA_POSTINSTALL=1` (CodySwannGT/lisa#3066).
|
|
20
|
+
*/
|
|
21
|
+
postinstallSafe?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Run the FULL apply even inside a declared postinstall.
|
|
24
|
+
*
|
|
25
|
+
* The override of last resort, for an operator forcing the complete apply
|
|
26
|
+
* from inside a lifecycle script.
|
|
20
27
|
*/
|
|
21
28
|
fullApply?: boolean;
|
|
22
29
|
/** Bare `--refresh-templates` yields true; with a value, the raw path list. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared-options.d.ts","sourceRoot":"","sources":["../../src/cli/shared-options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAwB,MAAM,WAAW,CAAC;AAC/D,OAAO,KAAK,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAGnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAExD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAOzD;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,OAA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AED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAStD;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAuC1D;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,aAAa,GACpB,gBAAgB,CAYlB"}
|
|
@@ -52,14 +52,14 @@ export function addSharedOptions(command) {
|
|
|
52
52
|
.option("-n, --dry-run", "Show what would be done without making changes")
|
|
53
53
|
.option("-y, --yes", "Non-interactive mode (auto-accept defaults, overwrite on conflict)")
|
|
54
54
|
.option("-v, --validate", "Validate project compatibility without applying changes")
|
|
55
|
-
.option("--skip-git-check", "Skip dirty git working directory check
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
55
|
+
.option("--skip-git-check", "Skip the dirty git working directory check. Means only that: the apply " +
|
|
56
|
+
"still runs in full, including every agent emit (CodySwannGT/lisa#3066).")
|
|
57
|
+
.option("--postinstall-safe", "Declare this apply a package-manager install lifecycle, which runs the " +
|
|
58
|
+
"reduced postinstall-safe subset: no agent emit (Codex, Claude, agy, " +
|
|
59
|
+
"Copilot, OpenCode) and no Sonar integration, so an install never " +
|
|
60
|
+
"regenerates committed agent trees. Equivalent to LISA_POSTINSTALL=1.")
|
|
61
|
+
.option("--full-apply", "Run the FULL apply even inside a declared postinstall. Overrides " +
|
|
62
|
+
"--postinstall-safe and LISA_POSTINSTALL=1.")
|
|
63
63
|
.option("--refresh-templates [paths]", "Let a non-interactive apply replace managed files it would otherwise report as out of date. " +
|
|
64
64
|
"Optionally scope to a comma-separated list of repo-relative paths " +
|
|
65
65
|
"(e.g. --refresh-templates=scripts/lisa-hooks). Backs up before replacing.")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared-options.js","sourceRoot":"","sources":["../../src/cli/shared-options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAE/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"shared-options.js","sourceRoot":"","sources":["../../src/cli/shared-options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAE/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AA+B9C;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CACnC,KAAmC;IAEnC,IAAI,KAAK,KAAK,SAAS,IAAI,KAA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E,sEAAsE;QACtE,mEAAmE;QACnE,sEAAsE,CACzE;SACA,MAAM,CACL,cAAc,EACd,mEAAmE;QACjE,4CAA4C,CAC/C;SACA,MAAM,CACL,6BAA6B,EAC7B,8FAA8F;QAC5F,oEAAoE;QACpE,2EAA2E,CAC9E;SACA,MAAM,CACL,qBAAqB,EACrB,yCAAyC,uBAAuB,CAAC,IAAI,CAAC,KAAK,CAAC,qDAAqD,EACjI,eAAe,CAChB,CAAC;AACN,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAChC,MAAe,EACf,OAAgB,EAChB,MAAqB;IAErB,OAAO;QACL,MAAM;QACN,QAAQ,EAAE,cAAc,CAAC,OAAO,CAAC;QACjC,aAAa,EAAE,MAAM;YACnB,CAAC,CAAC,IAAI,mBAAmB,EAAE;YAC3B,CAAC,CAAC,IAAI,aAAa,CAAC,MAAM,CAAC;QAC7B,gBAAgB,EAAE,IAAI,gBAAgB,EAAE;QACxC,gBAAgB,EAAE,IAAI,gBAAgB,EAAE;QACxC,UAAU,EAAE,IAAI,UAAU,EAAE;QAC5B,iBAAiB,EAAE,IAAI,iBAAiB,EAAE;KAC3C,CAAC;AACJ,CAAC"}
|
|
@@ -20,42 +20,78 @@
|
|
|
20
20
|
* fleet. A silent gap is bad; a silent gap with an instrument attesting to it
|
|
21
21
|
* is worse.
|
|
22
22
|
*
|
|
23
|
-
* ##
|
|
24
|
-
*
|
|
25
|
-
* `--skip-git-check`
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
23
|
+
* ## The conflation, and how it is separated
|
|
24
|
+
*
|
|
25
|
+
* `--skip-git-check` used to carry two unrelated propositions, and selecting
|
|
26
|
+
* the reduced subset was the one nothing in its name suggested
|
|
27
|
+
* (CodySwannGT/lisa#3066). They are separated here because they are scoped to
|
|
28
|
+
* different things:
|
|
29
|
+
*
|
|
30
|
+
* | proposition | scoped to | expressed by |
|
|
31
|
+
* |---|---|---|
|
|
32
|
+
* | "do not require a clean working tree" | the INVOCATION — the caller knows its own tree | `--skip-git-check` |
|
|
33
|
+
* | "run the reduced subset" | the CONTEXT — is this a package manager's install lifecycle | `--postinstall-safe` / `LISA_POSTINSTALL=1` |
|
|
34
|
+
*
|
|
35
|
+
* `skipGitCheck` is accepted by {@link ApplyModeInputs} and deliberately read
|
|
36
|
+
* by nothing in this module. Keeping the field makes the separation directly
|
|
37
|
+
* assertable and makes any future re-reading of it a visible diff rather than
|
|
38
|
+
* a silent regression.
|
|
39
|
+
*
|
|
40
|
+
* ## Why the context is DECLARED and not detected
|
|
41
|
+
*
|
|
42
|
+
* Lisa already has an ambient detector — `isRunningAsLifecycleScript()`, which
|
|
43
|
+
* reads `npm_package_json`. It cannot decide this, and the reason is measured
|
|
44
|
+
* rather than assumed:
|
|
45
|
+
*
|
|
46
|
+
* - `npm install` postinstall sets `npm_lifecycle_event=postinstall`.
|
|
47
|
+
* - **`bun install` postinstall sets neither `npm_lifecycle_event` nor
|
|
48
|
+
* `npm_command`** while still running the script; it does set
|
|
49
|
+
* `npm_config_user_agent` and `npm_package_json`.
|
|
50
|
+
* - Every one of those leaks into the descendants of ANY `bun run` / `npm run`
|
|
51
|
+
* — including the shell an operator, a CI job, or an agent runs an apply
|
|
52
|
+
* from.
|
|
53
|
+
*
|
|
54
|
+
* A detector keyed on the first would classify every bun-based project's
|
|
55
|
+
* postinstall as a full apply, and a full apply under `bun install`
|
|
56
|
+
* regenerates agent trees — exactly what the reduced mode exists to prevent. A
|
|
57
|
+
* detector keyed on the second over-fires instead, handing the reduced subset
|
|
58
|
+
* back to the very callers this fixes, silently. A declaration can do neither:
|
|
59
|
+
* only Lisa's own postinstall invocations carry it.
|
|
60
|
+
*
|
|
61
|
+
* The declaration is also concrete at the moment the decision is taken — a
|
|
62
|
+
* plain string already present in the process, never a deferred or
|
|
63
|
+
* lazily-resolved value that could still be token-shaped when read.
|
|
47
64
|
* @module core/apply-mode
|
|
48
65
|
*/
|
|
49
66
|
import type { ApplyMode } from "./apply-receipt.js";
|
|
67
|
+
/** Environment variable a postinstall invocation sets to declare itself. */
|
|
68
|
+
export declare const LISA_POSTINSTALL_ENV = "LISA_POSTINSTALL";
|
|
69
|
+
/** The value {@link LISA_POSTINSTALL_ENV} must hold to count as declared. */
|
|
70
|
+
export declare const LISA_POSTINSTALL_ENV_VALUE = "1";
|
|
50
71
|
/** The subset of config this decision reads. */
|
|
51
72
|
export interface ApplyModeInputs {
|
|
52
|
-
/**
|
|
73
|
+
/**
|
|
74
|
+
* Whether the dirty-tree check was waived.
|
|
75
|
+
*
|
|
76
|
+
* Accepted and DELIBERATELY UNREAD. This field used to decide the mode, and
|
|
77
|
+
* that conflation is the defect this module resolves; it stays in the shape
|
|
78
|
+
* so the separation can be asserted directly and so re-reading it would show
|
|
79
|
+
* up as a diff here rather than as behaviour nobody notices.
|
|
80
|
+
*/
|
|
53
81
|
readonly skipGitCheck: boolean;
|
|
54
82
|
/**
|
|
55
|
-
*
|
|
83
|
+
* Whether this apply declared itself a package-manager install lifecycle.
|
|
84
|
+
*
|
|
85
|
+
* Set by `--postinstall-safe` or `LISA_POSTINSTALL=1`, which every
|
|
86
|
+
* Lisa-written postinstall invocation carries. This is the only input that
|
|
87
|
+
* selects the reduced subset.
|
|
88
|
+
*/
|
|
89
|
+
readonly postinstall?: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Explicit request for the full apply even inside a declared postinstall.
|
|
56
92
|
*
|
|
57
|
-
* The
|
|
58
|
-
*
|
|
93
|
+
* The override of last resort, for an operator who means to force the
|
|
94
|
+
* complete apply from inside a lifecycle script.
|
|
59
95
|
*/
|
|
60
96
|
readonly fullApply?: boolean;
|
|
61
97
|
}
|
|
@@ -63,7 +99,7 @@ export interface ApplyModeInputs {
|
|
|
63
99
|
* Resolves the mode this apply runs in.
|
|
64
100
|
*
|
|
65
101
|
* Every consumer — agent emits, `package.json` protection, and the receipt —
|
|
66
|
-
* MUST read this rather than re-deriving from
|
|
102
|
+
* MUST read this rather than re-deriving from any single flag, so the recorded
|
|
67
103
|
* mode can never describe work the run did not do.
|
|
68
104
|
* @param config - The apply's resolved configuration.
|
|
69
105
|
* @returns `"postinstall-safe"` for the reduced subset, otherwise `"full"`.
|
|
@@ -79,4 +115,19 @@ export declare function resolveApplyMode(config: ApplyModeInputs): ApplyMode;
|
|
|
79
115
|
* @returns True when the reduced `postinstall-safe` subset applies.
|
|
80
116
|
*/
|
|
81
117
|
export declare function isPostinstallSafeApply(config: ApplyModeInputs): boolean;
|
|
118
|
+
/**
|
|
119
|
+
* Resolve the postinstall declaration from the CLI flag and the environment.
|
|
120
|
+
*
|
|
121
|
+
* Two spellings, one meaning. The flag is what Lisa's own spawned invocations
|
|
122
|
+
* pass, because a spawned child's environment is sanitised of package-manager
|
|
123
|
+
* variables and a flag survives that; the environment variable is what the
|
|
124
|
+
* hook text in a consumer's `package.json` carries, because prefixing an
|
|
125
|
+
* assignment leaves the command tail untouched and therefore leaves the
|
|
126
|
+
* recogniser in `ensure-lisa-postinstall` matching both shapes with a single
|
|
127
|
+
* added alternative.
|
|
128
|
+
* @param flag - Value of `--postinstall-safe`, if passed.
|
|
129
|
+
* @param env - Environment to read {@link LISA_POSTINSTALL_ENV} from.
|
|
130
|
+
* @returns True when this apply declared itself a postinstall.
|
|
131
|
+
*/
|
|
132
|
+
export declare function resolvePostinstallDeclaration(flag: boolean | undefined, env: Readonly<Record<string, string | undefined>>): boolean;
|
|
82
133
|
//# sourceMappingURL=apply-mode.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply-mode.d.ts","sourceRoot":"","sources":["../../src/core/apply-mode.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"apply-mode.d.ts","sourceRoot":"","sources":["../../src/core/apply-mode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgEG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD,4EAA4E;AAC5E,eAAO,MAAM,oBAAoB,qBAAqB,CAAC;AAEvD,6EAA6E;AAC7E,eAAO,MAAM,0BAA0B,MAAM,CAAC;AAE9C,gDAAgD;AAChD,MAAM,WAAW,eAAe;IAC9B;;;;;;;OAOG;IACH,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B;;;;;;OAMG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IAC/B;;;;;OAKG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,eAAe,GAAG,SAAS,CAKnE;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAEvE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,OAAO,GAAG,SAAS,EACzB,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,GAChD,OAAO,CAIT"}
|
package/dist/core/apply-mode.js
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
/** Environment variable a postinstall invocation sets to declare itself. */
|
|
2
|
+
export const LISA_POSTINSTALL_ENV = "LISA_POSTINSTALL";
|
|
3
|
+
/** The value {@link LISA_POSTINSTALL_ENV} must hold to count as declared. */
|
|
4
|
+
export const LISA_POSTINSTALL_ENV_VALUE = "1";
|
|
1
5
|
/**
|
|
2
6
|
* Resolves the mode this apply runs in.
|
|
3
7
|
*
|
|
4
8
|
* Every consumer — agent emits, `package.json` protection, and the receipt —
|
|
5
|
-
* MUST read this rather than re-deriving from
|
|
9
|
+
* MUST read this rather than re-deriving from any single flag, so the recorded
|
|
6
10
|
* mode can never describe work the run did not do.
|
|
7
11
|
* @param config - The apply's resolved configuration.
|
|
8
12
|
* @returns `"postinstall-safe"` for the reduced subset, otherwise `"full"`.
|
|
@@ -11,7 +15,7 @@ export function resolveApplyMode(config) {
|
|
|
11
15
|
if (config.fullApply === true) {
|
|
12
16
|
return "full";
|
|
13
17
|
}
|
|
14
|
-
return config.
|
|
18
|
+
return config.postinstall === true ? "postinstall-safe" : "full";
|
|
15
19
|
}
|
|
16
20
|
/**
|
|
17
21
|
* Whether this apply runs the reduced subset.
|
|
@@ -25,4 +29,21 @@ export function resolveApplyMode(config) {
|
|
|
25
29
|
export function isPostinstallSafeApply(config) {
|
|
26
30
|
return resolveApplyMode(config) === "postinstall-safe";
|
|
27
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* Resolve the postinstall declaration from the CLI flag and the environment.
|
|
34
|
+
*
|
|
35
|
+
* Two spellings, one meaning. The flag is what Lisa's own spawned invocations
|
|
36
|
+
* pass, because a spawned child's environment is sanitised of package-manager
|
|
37
|
+
* variables and a flag survives that; the environment variable is what the
|
|
38
|
+
* hook text in a consumer's `package.json` carries, because prefixing an
|
|
39
|
+
* assignment leaves the command tail untouched and therefore leaves the
|
|
40
|
+
* recogniser in `ensure-lisa-postinstall` matching both shapes with a single
|
|
41
|
+
* added alternative.
|
|
42
|
+
* @param flag - Value of `--postinstall-safe`, if passed.
|
|
43
|
+
* @param env - Environment to read {@link LISA_POSTINSTALL_ENV} from.
|
|
44
|
+
* @returns True when this apply declared itself a postinstall.
|
|
45
|
+
*/
|
|
46
|
+
export function resolvePostinstallDeclaration(flag, env) {
|
|
47
|
+
return (flag === true || env[LISA_POSTINSTALL_ENV] === LISA_POSTINSTALL_ENV_VALUE);
|
|
48
|
+
}
|
|
28
49
|
//# sourceMappingURL=apply-mode.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply-mode.js","sourceRoot":"","sources":["../../src/core/apply-mode.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"apply-mode.js","sourceRoot":"","sources":["../../src/core/apply-mode.ts"],"names":[],"mappings":"AAmEA,4EAA4E;AAC5E,MAAM,CAAC,MAAM,oBAAoB,GAAG,kBAAkB,CAAC;AAEvD,6EAA6E;AAC7E,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAG,CAAC;AA8B9C;;;;;;;;GAQG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAuB;IACtD,IAAI,MAAM,CAAC,SAAS,KAAK,IAAI,EAAE,CAAC;QAC9B,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,OAAO,MAAM,CAAC,WAAW,KAAK,IAAI,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,MAAM,CAAC;AACnE,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,sBAAsB,CAAC,MAAuB;IAC5D,OAAO,gBAAgB,CAAC,MAAM,CAAC,KAAK,kBAAkB,CAAC;AACzD,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,6BAA6B,CAC3C,IAAyB,EACzB,GAAiD;IAEjD,OAAO,CACL,IAAI,KAAK,IAAI,IAAI,GAAG,CAAC,oBAAoB,CAAC,KAAK,0BAA0B,CAC1E,CAAC;AACJ,CAAC"}
|
|
@@ -8,7 +8,11 @@ export declare const APPLY_RECEIPT_SCHEMA_VERSION = 1;
|
|
|
8
8
|
/**
|
|
9
9
|
* How complete the recorded apply was.
|
|
10
10
|
*
|
|
11
|
-
* `postinstall-safe` is the
|
|
11
|
+
* `postinstall-safe` is the path a package manager's install runs, selected by
|
|
12
|
+
* the `--postinstall-safe` / `LISA_POSTINSTALL=1` declaration every
|
|
13
|
+
* Lisa-written postinstall invocation carries. (It used to be selected by
|
|
14
|
+
* `--skip-git-check`, which also meant something else entirely — see
|
|
15
|
+
* `core/apply-mode` and CodySwannGT/lisa#3066.) It
|
|
12
16
|
* deliberately skips every agent emit (Codex, Claude, agy, Copilot, OpenCode)
|
|
13
17
|
* and the Sonar integration, because those rewrite host-owned files that must
|
|
14
18
|
* not change under an install. That is the right behaviour and the wrong
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply-receipt.d.ts","sourceRoot":"","sources":["../../src/core/apply-receipt.ts"],"names":[],"mappings":"AA2BA,+EAA+E;AAC/E,eAAO,MAAM,0BAA0B,6BAA6B,CAAC;AAErE;;;GAGG;AACH,eAAO,MAAM,4BAA4B,IAAI,CAAC;AAE9C
|
|
1
|
+
{"version":3,"file":"apply-receipt.d.ts","sourceRoot":"","sources":["../../src/core/apply-receipt.ts"],"names":[],"mappings":"AA2BA,+EAA+E;AAC/E,eAAO,MAAM,0BAA0B,6BAA6B,CAAC;AAErE;;;GAGG;AACH,eAAO,MAAM,4BAA4B,IAAI,CAAC;AAE9C;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,kBAAkB,GAAG,SAAS,CAAC;AAEhE,sDAAsD;AACtD,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,6CAA6C;IAC7C,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,mCAAmC;IACnC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,+CAA+C;IAC/C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,wEAAwE;IACxE,QAAQ,CAAC,UAAU,EAAE,SAAS,CAAC;IAC/B;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;CACzC;AA8BD;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED;;;;;GAKG;AACH,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAmB9B;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,qBAAqB,CACzC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE;IACP,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;CACxC,EACD,GAAG,GAAE,MAAM,IAAuB,GACjC,OAAO,CAAC,OAAO,CAAC,CAmBlB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply-receipt.js","sourceRoot":"","sources":["../../src/core/apply-receipt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,+EAA+E;AAC/E,MAAM,CAAC,MAAM,0BAA0B,GAAG,0BAA0B,CAAC;AAErE;;;GAGG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"apply-receipt.js","sourceRoot":"","sources":["../../src/core/apply-receipt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,E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