getculpa 1.0.1 → 1.0.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/LICENSE +41 -0
- package/assets/culpa-compose.yml +6 -6
- package/assets/uninstall-culpa.ps1 +115 -5
- package/bin/getculpa.js +34 -6
- package/lib/bootstrap.d.mts +29 -0
- package/lib/bootstrap.mjs +97 -0
- package/lib/dispatch.d.mts +12 -0
- package/lib/dispatch.mjs +59 -0
- package/lib/docker.d.mts +4 -0
- package/lib/docker.mjs +19 -0
- package/lib/doctor.mjs +38 -10
- package/lib/install-summary.d.mts +18 -0
- package/lib/install-summary.mjs +156 -0
- package/lib/paths.mjs +6 -0
- package/lib/provision.d.mts +30 -1
- package/lib/provision.mjs +86 -5
- package/lib/repair.d.mts +1 -0
- package/lib/repair.mjs +174 -135
- package/lib/start.d.mts +2 -0
- package/lib/start.mjs +99 -7
- package/lib/tty.d.mts +18 -0
- package/lib/tty.mjs +58 -0
- package/lib/uninstall.mjs +45 -6
- package/package.json +25 -24
- package/scripts/install.js +35 -12
package/package.json
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "getculpa",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Culpa CLI: `npm i -g getculpa` provisions the full Culpa install (Windows-installer parity) and leaves it dormant. `getculpa` wakes the stack.",
|
|
5
|
-
"license": "SEE LICENSE IN
|
|
6
|
-
"bin": {
|
|
7
|
-
"getculpa": "bin/getculpa.js",
|
|
8
|
-
"culpa": "bin/culpa.js"
|
|
9
|
-
},
|
|
10
|
-
"scripts": {
|
|
11
|
-
"postinstall": "node scripts/install.js",
|
|
12
|
-
"prepack": "node scripts/prepack.js"
|
|
13
|
-
},
|
|
14
|
-
"files": [
|
|
15
|
-
"bin/",
|
|
16
|
-
"lib/",
|
|
17
|
-
"scripts/",
|
|
18
|
-
"assets/",
|
|
19
|
-
"README.md"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "getculpa",
|
|
3
|
+
"version": "1.0.3",
|
|
4
|
+
"description": "Culpa CLI: `npm i -g getculpa` provisions the full Culpa install (Windows-installer parity) and leaves it dormant. `getculpa` wakes the stack.",
|
|
5
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
6
|
+
"bin": {
|
|
7
|
+
"getculpa": "bin/getculpa.js",
|
|
8
|
+
"culpa": "bin/culpa.js"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"postinstall": "node scripts/install.js",
|
|
12
|
+
"prepack": "node scripts/prepack.js"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"bin/",
|
|
16
|
+
"lib/",
|
|
17
|
+
"scripts/",
|
|
18
|
+
"assets/",
|
|
19
|
+
"README.md",
|
|
20
|
+
"LICENSE"
|
|
21
|
+
],
|
|
22
|
+
"engines": {
|
|
23
|
+
"node": ">=20"
|
|
24
|
+
}
|
|
25
|
+
}
|
package/scripts/install.js
CHANGED
|
@@ -111,21 +111,44 @@ async function main() {
|
|
|
111
111
|
);
|
|
112
112
|
provisionOpts.delegateWindowsInstaller = () => true;
|
|
113
113
|
}
|
|
114
|
-
const { classification, previousVersion } =
|
|
114
|
+
const { classification, previousVersion, dockerState, imagesStaged, collectorStaged } =
|
|
115
|
+
await provision(provisionOpts);
|
|
116
|
+
|
|
117
|
+
// T-CF28-4b: stage the CLI payload the launcher actually runs. Without this
|
|
118
|
+
// a fresh install leaves state.json at `current: null` and the first
|
|
119
|
+
// `getculpa` dead-ends — the Mac tester's exact experience. Best-effort by
|
|
120
|
+
// construction: any failure leaves the payload deferred and the summary
|
|
121
|
+
// below names `getculpa update`, which is where we already were.
|
|
122
|
+
const { readPayloadState, stageInitialPayload, vendoredLauncherPath } = await import("../lib/bootstrap.mjs");
|
|
123
|
+
stageInitialPayload({
|
|
124
|
+
launcherPath: vendoredLauncherPath(path.join(__dirname, "..")),
|
|
125
|
+
env: process.env,
|
|
126
|
+
});
|
|
127
|
+
// V102 T-V102-15 (M3): the summary reports what updates/state.json actually
|
|
128
|
+
// says, never the updater's exit code — "installed" was claimed on a Mac
|
|
129
|
+
// whose state read current: null while doctor FAILed the same install.
|
|
130
|
+
const payloadState = readPayloadState({ env: process.env });
|
|
115
131
|
|
|
116
132
|
// CF20-T6: the completion line names what actually happened — an upgrade
|
|
117
133
|
// is STAGED only; the new version applies at the next `getculpa`, not here.
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
134
|
+
// T-CF28-5/7: those words now live in lib/install-summary.mjs so they are
|
|
135
|
+
// testable, and they no longer report success without saying whether Docker
|
|
136
|
+
// — which Culpa cannot run without — is actually present.
|
|
137
|
+
const { buildInstallSummary } = await import("../lib/install-summary.mjs");
|
|
138
|
+
const summary = buildInstallSummary({
|
|
139
|
+
classification,
|
|
140
|
+
version: pkg.version,
|
|
141
|
+
previousVersion,
|
|
142
|
+
appDir,
|
|
143
|
+
dockerState,
|
|
144
|
+
imagesStaged,
|
|
145
|
+
collectorStaged,
|
|
146
|
+
payloadState,
|
|
147
|
+
platform: process.platform,
|
|
148
|
+
isTTY: Boolean(process.stdout.isTTY),
|
|
149
|
+
env: process.env,
|
|
150
|
+
});
|
|
151
|
+
for (const line of summary) console.log(line);
|
|
129
152
|
}
|
|
130
153
|
|
|
131
154
|
main().catch((e) => {
|