@rainbow-robotics/muscat-plugin-kit 0.1.2-dev.16 → 0.1.2-dev.17

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.
Files changed (2) hide show
  1. package/cli/src/update.mjs +19 -1
  2. package/package.json +1 -1
@@ -202,9 +202,27 @@ function updateLocalDeps(root, tag) {
202
202
 
203
203
  // ── main ─────────────────────────────────────────────────────────────────────
204
204
 
205
+ async function resolveTag(explicitTag) {
206
+ if (explicitTag) return explicitTag;
207
+
208
+ const current = kitVersion();
209
+ const isDevVersion = current.includes("-dev.");
210
+
211
+ if (!isDevVersion) return "latest";
212
+
213
+ const answer = await prompt(
214
+ `You are on a dev version (v${current}).\n` +
215
+ ` [1] Stay on dev — update to latest dev build\n` +
216
+ ` [2] Switch to stable — update to latest stable release\n` +
217
+ `Choice [1/2, default: 1]: `
218
+ );
219
+ return answer.trim() === "2" ? "latest" : "dev";
220
+ }
221
+
205
222
  export async function runUpdate(args = []) {
206
223
  const opts = parseArgs(args);
207
- const tag = opts._[0] || opts.version || opts.tag || "latest";
224
+ const explicitTag = opts._[0] || opts.version || opts.tag || "";
225
+ const tag = await resolveTag(explicitTag);
208
226
 
209
227
  // 1. Update the CLI itself
210
228
  if (isBinaryMode) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rainbow-robotics/muscat-plugin-kit",
3
- "version": "0.1.2-dev.16",
3
+ "version": "0.1.2-dev.17",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": ">=20"