@lamalibre/install-portlama-e2e-mcp 0.1.2 → 0.1.4
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/package.json +1 -1
- package/src/lib/deps.js +0 -2
- package/src/tools/provision.js +15 -6
package/package.json
CHANGED
package/src/lib/deps.js
CHANGED
|
@@ -79,7 +79,6 @@ export const SINGLE_VM_DEPS = {
|
|
|
79
79
|
11: [3], // input-validation
|
|
80
80
|
12: [3], // user-invitations
|
|
81
81
|
13: [3], // site-lifecycle
|
|
82
|
-
14: [3], // shell-lifecycle
|
|
83
82
|
15: [3], // plugin-lifecycle
|
|
84
83
|
16: [3], // enrollment-tokens
|
|
85
84
|
};
|
|
@@ -99,7 +98,6 @@ export const THREE_VM_DEPS = {
|
|
|
99
98
|
7: [1], // site-visitor-journey
|
|
100
99
|
8: [1], // invitation-journey
|
|
101
100
|
9: [1], // agent-site-deploy
|
|
102
|
-
10: [1], // shell-lifecycle
|
|
103
101
|
11: [1], // plugin-lifecycle
|
|
104
102
|
12: [1], // enrollment-lifecycle
|
|
105
103
|
};
|
package/src/tools/provision.js
CHANGED
|
@@ -69,12 +69,21 @@ export const provisionHostTool = {
|
|
|
69
69
|
const tarball = await packPackage('create-portlama');
|
|
70
70
|
steps.push(`Packed installer: ${tarball}`);
|
|
71
71
|
|
|
72
|
-
// 2.
|
|
73
|
-
await mp.exec(VM_HOST, '
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
72
|
+
// 2. Ensure npm is available (NodeSource images ship with Node+npm)
|
|
73
|
+
const npmCheck = await mp.exec(VM_HOST, 'npm --version', { allowFailure: true });
|
|
74
|
+
if (npmCheck.exitCode !== 0) {
|
|
75
|
+
await mp.exec(VM_HOST, 'apt-get update', {
|
|
76
|
+
sudo: true,
|
|
77
|
+
timeout: 120_000,
|
|
78
|
+
});
|
|
79
|
+
await mp.exec(VM_HOST, 'apt-get install -y npm', {
|
|
80
|
+
sudo: true,
|
|
81
|
+
timeout: 120_000,
|
|
82
|
+
});
|
|
83
|
+
steps.push('npm installed on host');
|
|
84
|
+
} else {
|
|
85
|
+
steps.push(`npm already available (v${npmCheck.stdout.trim()})`);
|
|
86
|
+
}
|
|
78
87
|
|
|
79
88
|
// 3. Transfer and install
|
|
80
89
|
await mp.transfer(tarball, `${VM_HOST}:/tmp/create-portlama.tgz`);
|