waypoint-codex 1.1.0 → 1.1.1
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/src/cli.js +0 -1
- package/dist/src/upgrade.js +6 -3
- package/package.json +1 -1
package/dist/src/cli.js
CHANGED
package/dist/src/upgrade.js
CHANGED
|
@@ -4,6 +4,9 @@ import path from "node:path";
|
|
|
4
4
|
export function npmBinaryForPlatform(platform = process.platform) {
|
|
5
5
|
return platform === "win32" ? "npm.cmd" : "npm";
|
|
6
6
|
}
|
|
7
|
+
export function waypointBinaryForPlatform(platform = process.platform) {
|
|
8
|
+
return platform === "win32" ? "waypoint.cmd" : "waypoint";
|
|
9
|
+
}
|
|
7
10
|
export function buildInitArgs(projectRoot, config) {
|
|
8
11
|
const args = ["init", projectRoot];
|
|
9
12
|
if (config.profile === "app-friendly") {
|
|
@@ -164,8 +167,8 @@ function hasWaypointConfig(projectRoot) {
|
|
|
164
167
|
return existsSync(path.join(projectRoot, ".waypoint/config.toml"));
|
|
165
168
|
}
|
|
166
169
|
export function upgradeWaypoint(options) {
|
|
167
|
-
const nodeBinary = options.nodeBinary ?? process.execPath;
|
|
168
170
|
const npmBinary = options.npmBinary ?? process.env.WAYPOINT_NPM_COMMAND ?? npmBinaryForPlatform();
|
|
171
|
+
const waypointBinary = options.waypointBinary ?? process.env.WAYPOINT_COMMAND ?? waypointBinaryForPlatform();
|
|
169
172
|
const stdio = options.stdio ?? "inherit";
|
|
170
173
|
const updateStatus = installLatestWaypointCli({
|
|
171
174
|
npmBinary,
|
|
@@ -182,13 +185,13 @@ export function upgradeWaypoint(options) {
|
|
|
182
185
|
console.log("Waypoint CLI updated. No repo-local Waypoint config found, so repo refresh was skipped.");
|
|
183
186
|
return 0;
|
|
184
187
|
}
|
|
185
|
-
const init = spawnSync(
|
|
188
|
+
const init = spawnSync(waypointBinary, buildInitArgs(options.projectRoot, options.config), {
|
|
186
189
|
stdio,
|
|
187
190
|
});
|
|
188
191
|
if ((init.status ?? 1) !== 0) {
|
|
189
192
|
return init.status ?? 1;
|
|
190
193
|
}
|
|
191
|
-
const doctor = spawnSync(
|
|
194
|
+
const doctor = spawnSync(waypointBinary, ["doctor", options.projectRoot], {
|
|
192
195
|
stdio,
|
|
193
196
|
});
|
|
194
197
|
return doctor.status ?? 1;
|