@caelis/caelis 0.32.0 → 0.34.0
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/lib/update-handoff.js +33 -9
- package/package.json +7 -7
package/lib/update-handoff.js
CHANGED
|
@@ -144,22 +144,45 @@ function normalizeVersion(value) {
|
|
|
144
144
|
return String(value || '').trim().replace(/^v/i, '');
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
-
|
|
147
|
+
function npmInstallInvocation(
|
|
148
|
+
plan,
|
|
149
|
+
platform = process.platform,
|
|
150
|
+
env = process.env,
|
|
151
|
+
) {
|
|
148
152
|
const executable = plan.command[0];
|
|
149
153
|
const args = plan.command.slice(1);
|
|
150
|
-
if (
|
|
154
|
+
if (platform === 'win32' && /\.(?:cmd|bat)$/i.test(executable)) {
|
|
151
155
|
const commandLine = String(plan.command_line || '').trim();
|
|
152
156
|
if (!commandLine) {
|
|
153
157
|
throw new Error('missing Windows npm command line');
|
|
154
158
|
}
|
|
155
|
-
return
|
|
156
|
-
|
|
157
|
-
['/d', '/s', '/c', commandLine],
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
159
|
+
return {
|
|
160
|
+
command: env.ComSpec || 'cmd.exe',
|
|
161
|
+
args: ['/d', '/s', '/c', commandLine],
|
|
162
|
+
options: {
|
|
163
|
+
env,
|
|
164
|
+
// Go has already encoded this as one cmd.exe command line. Node's
|
|
165
|
+
// normal Windows argv quoting would add backslashes before its
|
|
166
|
+
// embedded quotes, making cmd.exe look for a literal \"npm.cmd\".
|
|
167
|
+
windowsVerbatimArguments: true,
|
|
168
|
+
},
|
|
169
|
+
};
|
|
161
170
|
}
|
|
162
|
-
return
|
|
171
|
+
return {
|
|
172
|
+
command: executable,
|
|
173
|
+
args,
|
|
174
|
+
options: { env },
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
async function defaultRunInstall(plan, signalCoordinator) {
|
|
179
|
+
const invocation = npmInstallInvocation(plan);
|
|
180
|
+
return runCapturedProcess(
|
|
181
|
+
invocation.command,
|
|
182
|
+
invocation.args,
|
|
183
|
+
invocation.options,
|
|
184
|
+
signalCoordinator,
|
|
185
|
+
);
|
|
163
186
|
}
|
|
164
187
|
|
|
165
188
|
async function defaultVerifyVersion(executable, signalCoordinator) {
|
|
@@ -343,6 +366,7 @@ module.exports = {
|
|
|
343
366
|
handoffEnvironment,
|
|
344
367
|
handoffOwnershipName,
|
|
345
368
|
handoffPlanName,
|
|
369
|
+
npmInstallInvocation,
|
|
346
370
|
normalizeVersion,
|
|
347
371
|
removeOwnedLock,
|
|
348
372
|
reserveHandoffDirectory,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@caelis/caelis",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.34.0",
|
|
4
4
|
"description": "caelis CLI distributed via npm",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
"publish-release": "node ./scripts/publish-release.mjs"
|
|
38
38
|
},
|
|
39
39
|
"optionalDependencies": {
|
|
40
|
-
"@caelis/caelis-darwin-arm64": "0.
|
|
41
|
-
"@caelis/caelis-darwin-x64": "0.
|
|
42
|
-
"@caelis/caelis-linux-arm64": "0.
|
|
43
|
-
"@caelis/caelis-linux-x64": "0.
|
|
44
|
-
"@caelis/caelis-windows-arm64": "0.
|
|
45
|
-
"@caelis/caelis-windows-x64": "0.
|
|
40
|
+
"@caelis/caelis-darwin-arm64": "0.34.0",
|
|
41
|
+
"@caelis/caelis-darwin-x64": "0.34.0",
|
|
42
|
+
"@caelis/caelis-linux-arm64": "0.34.0",
|
|
43
|
+
"@caelis/caelis-linux-x64": "0.34.0",
|
|
44
|
+
"@caelis/caelis-windows-arm64": "0.34.0",
|
|
45
|
+
"@caelis/caelis-windows-x64": "0.34.0"
|
|
46
46
|
},
|
|
47
47
|
"publishConfig": {
|
|
48
48
|
"access": "public",
|