@mx-space/cli 0.9.0 → 0.10.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/dist/bin/mxs.mjs
CHANGED
|
@@ -37649,4 +37649,4 @@ const unsafeAdd = /*#__PURE__*/ dual((args) => isFiberSet(args[0]), (self, fiber
|
|
|
37649
37649
|
*/
|
|
37650
37650
|
const join = (self) => _await(self.deferred);
|
|
37651
37651
|
//#endregion
|
|
37652
|
-
export { drain as $,
|
|
37652
|
+
export { drain as $, pipe as $a, reduceRight as $i, uninterruptible as $n, has$4 as $r, either$1 as $t, compose as A, BaseProto as Aa, every$1 as Ai, orElse$3 as An, addFinalizer$1 as Ar, encodeSync as At, ensuring as B, combine$7 as Ba, headNonEmpty$2 as Bi, scoped$3 as Bn, update$1 as Br, async as Bt, Number$ as C, boolean as Ca, isMissingDataOnly as Ci, match$2 as Cn, Error$1 as Cr, currentContext as Ct, String$ as D, merge$3 as Da, contains as Di, onError as Dn, error as Dr, unsafeMake$3 as Dt, Schema_exports as E, left as Ea, appendAll$2 as Ei, negate as En, taggedEnum as Er, get$3 as Et, transform as F, symbolRedactable as Fa, findLast as Fi, retry as Fn, void_$2 as Fr, addFinalizer as Ft, mapError as G, isObject as Ga, make$48 as Gi, sync$1 as Gn, CommitPrototype as Gr, catchIf as Gt, fromChannel as H, string$3 as Ha, isEmptyReadonlyArray as Hi, serviceOption as Hn, allLevels as Hr, catchAll as Ht, make$5 as I, toStringUnknown as Ia, flatMap$8 as Ii, runFork$1 as In, ParentSpan as Ir, all as It, splitLines as J, constFalse as Ja, matchLeft as Ji, tapErrorCause as Jn, isNil as Jr, catchTags as Jt, run as K, isTagged as Ka, map$12 as Ki, tap as Kn, round as Kr, catchSome as Kt, isConfig as L, equals$3 as La, fromIterable$10 as Li, runSync as Ln, get$5 as Lr, annotateLogs as Lt, decodeUnknown as M, NodeInspectSymbol as Ma, filterMap as Mi, provide$1 as Mn, isInterruptedOnly as Mr, _void as Mt, int as N, format$4 as Na, findFirst$1 as Ni, provideService as Nn, fail$7 as Nr, acquireRelease as Nt, TaggedError as O, right as Oa, drop$1 as Oi, onInterrupt as On, log as Or, nominal as Ot, optional as P, redact as Pa, findFirstIndex as Pi, repeatN as Pn, isFailure as Pr, acquireUseRelease$2 as Pt, unwrapScoped as Q, identity as Qa, reduce$7 as Qi, try_ as Qn, get$9 as Qr, dieMessage as Qt, asyncScoped as R, symbol as Ra, getSomes as Ri, runtime as Rn, make$27 as Rr, as as Rt, Literal as S, some$1 as Sa, isConfigError as Si, mapInputContext as Sn, Equivalence$2 as Sr, succeed$1 as St, Record as T, string$2 as Ta, append$2 as Ti, matchEffect as Tn, tagged as Tr, currentTracerEnabled as Tt, fromReadableStream as U, symbol$1 as Ua, isNonEmptyReadonlyArray as Ui, succeed$3 as Un, getOrDefault as Ur, catchAllCause$1 as Ut, fail as V, hash as Va, isArray as Vi, serviceFunctions as Vn, updateAndGet as Vr, cached as Vt, mapChunks as W, hasProperty as Wa, join$3 as Wi, suspend$6 as Wn, updateAs as Wr, catchAllDefect as Wt, transduce as X, constVoid as Xa, of$2 as Xi, tryMap as Xn, empty$19 as Xr, contextWithEffect as Xt, suspend$1 as Y, constUndefined as Ya, matchRight as Yi, timeout as Yn, of as Yr, context as Yt, unwrap as Z, dual as Za, prepend$2 as Zi, tryPromise as Zn, fromIterable$5 as Zr, die as Zt, fromString as _, isSome as _a, Tag as _i, logError as _n, interrupt$1 as _r, effect$1 as _t, make$1 as a, take$3 as aa, fromIterable$6 as ai, filterOrDieMessage as an, when$2 as ar, embedInput as at, Defect as b, none$4 as ba, merge$1 as bi, mapBoth$1 as bn, succeed$4 as br, provideMerge as bt, defaultLogger as c, map$13 as ca, seconds as ci, fnUntraced as cn, zip$1 as cr, fromEffect as ct, get as d, fromNullable as da, of$1 as di, forkScoped as dn, zipWith as dr, write as dt, some as ea, isEmpty$5 as ei, ensuring$4 as en, __commonJSMin as eo, uninterruptibleMask as er, foldLeftChunks as et, make$3 as f, getOrElse as fa, reduce$6 as fi, gen as fn, DeferredTypeId as fr, spaced as ft, when as g, isOption as ga, Reference as gi, locally as gn, failCause$3 as gr, make$10 as gt, value as h, isNone as ha, GenericTag as hi, isEffect as hn, fail$5 as hr, get$1 as ht, isMailbox as i, tailNonEmpty$1 as ia, add as ii, filter$1 as in, useSpan as ir, acquireUseRelease as it, declare as j, Class$5 as ja, filter$4 as ji, orElseFail as jn, isInterrupted as jr, is as jt, Union as k, pipeArguments as ka, empty$26 as ki, orDie as kn, Scope as kr, decodeSync as kt, prettyLoggerDefault as l, filter$5 as la, appendAll$1 as li, forEach$2 as ln, zipLeft as lr, suspend$2 as lt, orElse as m, getOrUndefined as ma, unsafeFromArray as mi, interruptible as mn, complete as mr, updateContext as mt, make as n, span as na, set$4 as ni, failCause$2 as nn, __require as no, unsafeMakeLatch as nr, fromChannel$1 as nt, toChannel as o, unsafeGet$3 as oa, has$5 as oi, flatMap$4 as on, withFiberRuntime as or, ensuring$1 as ot, updateEffect as p, getOrThrow as pa, toArray$1 as pi, ignore as pn, _await as pr, runFork as pt, runCollect as q, globalValue as qa, match$8 as qi, tapError as qn, cons as qr, catchTag as qt, unsafeAdd as r, splitAt as ra, make$39 as ri, failSync as rn, __toESM as ro, unsafeMakeSemaphore as rr, unwrapScoped$1 as rt, unify as s, getEquivalence$5 as sa, remove$1 as si, flatten$3 as sn, withParentSpan as sr, flatMap as st, join as t, sort as ta, make$36 as ti, fail$4 as tn, __exportAll as to, unlessEffect as tr, forEach as tt, withMinimumLogLevel as u, flatMap$9 as ua, map$11 as ui, forkDaemon as un, zipRight$1 as ur, void_ as ut, Cause as v, map$14 as va, get$13 as vi, logWarning as vn, isDone as vr, mergeAll$1 as vt, NumberFromString as w, mapInput as wa, allocate as wi, matchCauseEffect as wn, TaggedError$1 as wr, currentLoggers as wt, Int as x, orElse$5 as xa, omit$3 as xi, mapError$4 as xn, unsafeDone as xr, scoped$2 as xt, Date$ as y, match$9 as ya, getOption$1 as yi, map$3 as yn, make$15 as yr, provide as yt, bufferChunks as z, cached$1 as za, head$2 as zi, scope as zn, set$2 as zr, asVoid as zt };
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as defaultMessageFor, c as tagToCode, i as codeForTag, l as toErrorEnvelope, n as defaultGlobalFlags, o as exitCodeForError, r as parseGlobalFlags, s as exitCodeForTag, t as run } from "./mxs-
|
|
1
|
+
import { a as defaultMessageFor, c as tagToCode, i as codeForTag, l as toErrorEnvelope, n as defaultGlobalFlags, o as exitCodeForError, r as parseGlobalFlags, s as exitCodeForTag, t as run } from "./mxs-BLgwEih6.mjs";
|
|
2
2
|
export { codeForTag, defaultGlobalFlags, defaultMessageFor, exitCodeForError, exitCodeForTag, parseGlobalFlags, run, tagToCode, toErrorEnvelope };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as drain, $a as
|
|
1
|
+
import { $ as drain, $a as pipe, $i as reduceRight, $n as uninterruptible, $r as has, $t as either, A as compose, Aa as BaseProto, Ai as every, An as orElse$3, Ar as addFinalizer$1, At as encodeSync, B as ensuring$2, Ba as combine$2, Bi as headNonEmpty, Bn as scoped, Br as update$7, Bt as async, C as Number$, Ca as boolean$3, Ci as isMissingDataOnly, Cn as match$2, Cr as Error$1, Ct as currentContext, D as String$, Da as merge$2, Di as contains, Dn as onError, Dr as error$1, Dt as unsafeMake, Ea as left, Ei as appendAll, En as negate, Er as taggedEnum, Et as get$16, Fa as symbolRedactable, Fi as findLast, Fn as retry, Fr as void_$1, Ft as addFinalizer, G as mapError$1, Ga as isObject, Gi as make$22, Gn as sync, Gr as CommitPrototype, Gt as catchIf, H as fromChannel, Ha as string, Hi as isEmptyReadonlyArray, Hn as serviceOption, Hr as allLevels, Ht as catchAll, I as make$21, Ia as toStringUnknown, Ii as flatMap$4, In as runFork$1, Ir as ParentSpan, It as all$5, J as splitLines, Ja as constFalse, Ji as matchLeft, Jn as tapErrorCause, Jr as isNil, Jt as catchTags, K as run$5, Ka as isTagged, Ki as map$7, Kn as tap, Kr as round, Kt as catchSome, L as isConfig, La as equals, Li as fromIterable$1, Ln as runSync, Lr as get$11, Lt as annotateLogs, M as decodeUnknown, Ma as NodeInspectSymbol, Mi as filterMap, Mn as provide$1, Mr as isInterruptedOnly, Mt as _void, N as int, Na as format$3, Ni as findFirst, Nn as provideService, Nr as fail$3, Nt as acquireRelease, O as TaggedError, Oa as right, Oi as drop, On as onInterrupt, Or as log, Ot as nominal, P as optional$8, Pa as redact$1, Pi as findFirstIndex, Pn as repeatN, Pr as isFailure, Pt as acquireUseRelease, Q as unwrapScoped, Qa as identity, Qi as reduce$1, Qn as try_, Qr as get$12, Qt as dieMessage, R as asyncScoped, Ra as symbol$2, Ri as getSomes, Rn as runtime, Rr as make$23, Rt as as, S as Literal, Sa as some, Si as isConfigError, Sn as mapInputContext, St as succeed$2, Ta as string$1, Ti as append$2, Tn as matchEffect, Tr as tagged, Tt as currentTracerEnabled, Ua as symbol$1, Ui as isNonEmptyReadonlyArray, Un as succeed$1, Ur as getOrDefault, Ut as catchAllCause, Va as hash, Vi as isArray$1, Vn as serviceFunctions, Vr as updateAndGet, Vt as cached$1, W as mapChunks, Wi as join, Wn as suspend, Wr as updateAs, Wt as catchAllDefect, X as transduce, Xa as constVoid, Xi as of$2, Xn as tryMap, Xr as empty$12, Xt as contextWithEffect, Y as suspend$2, Ya as constUndefined, Yi as matchRight, Yn as timeout, Yr as of$3, Yt as context, Z as unwrap$7, Za as dual, Zi as prepend$1, Zn as tryPromise, Zr as fromIterable$2, Zt as die, _ as fromString, _a as isSome, _i as Tag$2, _n as logError, _r as interrupt, _t as effect, a as make$29, aa as take, ai as fromIterable$3, an as filterOrDieMessage, ar as when$1, at as embedInput, b as Defect, ba as none$3, bi as merge$3, bn as mapBoth, br as succeed$3, bt as provideMerge, c as defaultLogger, ca as map$10, ci as seconds, cn as fnUntraced, cr as zip, ct as fromEffect, d as get$13, da as fromNullable, di as of$1, dn as forkScoped, dr as zipWith, dt as write, ea as some$1, ei as isEmpty$5, en as ensuring, eo as __commonJSMin, er as uninterruptibleMask, et as foldLeftChunks, f as make$25, fa as getOrElse, fi as reduce$2, fn as gen, fr as DeferredTypeId, ft as spaced, g as when, ga as isOption, gi as Reference, gn as locally, gr as failCause, gt as make$28, h as value$1, ha as isNone, hi as GenericTag, hn as isEffect, hr as fail$4, ht as get$14, i as isMailbox, ia as tailNonEmpty, ii as add$1, in as filter$1, ir as useSpan, it as acquireUseRelease$1, ja as Class, ji as filter$2, jn as orElseFail, jr as isInterrupted, jt as is$2, k as Union, ka as pipeArguments, ki as empty$11, kn as orDie, kr as Scope, kt as decodeSync, l as prettyLoggerDefault, la as filter$3, li as appendAll$1, ln as forEach$1, lr as zipLeft, lt as suspend$1, m as orElse$1, ma as getOrUndefined, mi as unsafeFromArray, mn as interruptible, mr as complete, mt as updateContext, n as make$30, na as span, ni as set$2, nn as failCause$1, no as __require, nr as unsafeMakeLatch, nt as fromChannel$1, o as toChannel, oa as unsafeGet, oi as has$1, on as flatMap$1, or as withFiberRuntime, ot as ensuring$1, p as updateEffect, pa as getOrThrow, pi as toArray, pn as ignore, pr as _await, pt as runFork, q as runCollect, qa as globalValue, qi as match$1, qn as tapError, qr as cons$1, qt as catchTag, r as unsafeAdd, ra as splitAt, ri as make$26, rn as failSync, ro as __toESM, rr as unsafeMakeSemaphore, rt as unwrapScoped$1, s as unify, si as remove$4, sn as flatten$3, sr as withParentSpan, st as flatMap$2, t as join$1, ta as sort$2, ti as make$24, tn as fail$2, to as __exportAll, tr as unlessEffect, tt as forEach, u as withMinimumLogLevel, ua as flatMap$3, ui as map$9, un as forkDaemon, ur as zipRight, ut as void_, v as Cause, va as map$8, vi as get$15, vn as logWarning, vr as isDone, vt as mergeAll, w as NumberFromString, wa as mapInput, wi as allocate, wn as matchCauseEffect, wr as TaggedError$1, wt as currentLoggers, x as Int, xa as orElse$2, xi as omit, xn as mapError, xr as unsafeDone, xt as scoped$1, y as Date$, ya as match, yi as getOption, yn as map$6, yr as make$27, yt as provide, z as bufferChunks, za as cached, zi as head$2, zn as scope, zr as set$3, zt as asVoid } from "./esm-eihI6wbY.mjs";
|
|
2
2
|
import { _ as LinkNode, a as HeadingNode, b as CodeHighlightNode, d as ListItemNode, f as ListNode, g as AutoLinkNode, o as QuoteNode, x as CodeNode } from "./LexicalRichText.node-Bg9jND3Q.mjs";
|
|
3
3
|
import { a as HorizontalRuleNode } from "./LexicalExtension.node-BVlcrgOx.mjs";
|
|
4
4
|
import { $t as ElementNode, Qt as DecoratorNode } from "./Lexical.node-fXM8Jp7p.mjs";
|
|
@@ -9,7 +9,7 @@ import { Readable } from "node:stream";
|
|
|
9
9
|
import * as Crypto from "node:crypto";
|
|
10
10
|
import { webcrypto } from "node:crypto";
|
|
11
11
|
import * as NFS from "node:fs";
|
|
12
|
-
import fs, { existsSync, mkdirSync, readFileSync, realpathSync, renameSync, writeFileSync } from "node:fs";
|
|
12
|
+
import fs, { existsSync, mkdirSync, openSync, readFileSync, realpathSync, renameSync, writeFileSync } from "node:fs";
|
|
13
13
|
import * as OS from "node:os";
|
|
14
14
|
import os, { arch, platform } from "node:os";
|
|
15
15
|
import * as Path from "node:path";
|
|
@@ -31288,7 +31288,7 @@ function parseBody(res) {
|
|
|
31288
31288
|
function decodeWithSchema(schema, body) {
|
|
31289
31289
|
return tryPromise({
|
|
31290
31290
|
try: async () => {
|
|
31291
|
-
const { Schema: SchemaMod } = await import("./esm-
|
|
31291
|
+
const { Schema: SchemaMod } = await import("./esm-Bw9S3CPp.mjs");
|
|
31292
31292
|
return SchemaMod.decodeUnknownPromise(schema)(body);
|
|
31293
31293
|
},
|
|
31294
31294
|
catch: (err) => new ServerError({
|
|
@@ -38900,6 +38900,35 @@ async function defaultSpawnUpgrade(cmd, args) {
|
|
|
38900
38900
|
});
|
|
38901
38901
|
});
|
|
38902
38902
|
}
|
|
38903
|
+
function defaultSpawnDetached(cmd, args, logPath) {
|
|
38904
|
+
try {
|
|
38905
|
+
mkdirSync(path.dirname(logPath), { recursive: true });
|
|
38906
|
+
} catch {}
|
|
38907
|
+
let out;
|
|
38908
|
+
try {
|
|
38909
|
+
out = openSync(logPath, "a");
|
|
38910
|
+
} catch {
|
|
38911
|
+
out = openSync(os.platform() === "win32" ? "NUL" : "/dev/null", "a");
|
|
38912
|
+
}
|
|
38913
|
+
try {
|
|
38914
|
+
const child = spawn(cmd, args, {
|
|
38915
|
+
stdio: [
|
|
38916
|
+
"ignore",
|
|
38917
|
+
out,
|
|
38918
|
+
out
|
|
38919
|
+
],
|
|
38920
|
+
cwd: process.cwd(),
|
|
38921
|
+
shell: os.platform() === "win32",
|
|
38922
|
+
detached: true,
|
|
38923
|
+
env: {
|
|
38924
|
+
...process.env,
|
|
38925
|
+
MXS_NO_UPDATE_CHECK: "1"
|
|
38926
|
+
}
|
|
38927
|
+
});
|
|
38928
|
+
child.on("error", () => {});
|
|
38929
|
+
child.unref();
|
|
38930
|
+
} catch {}
|
|
38931
|
+
}
|
|
38903
38932
|
function defaultConfigDir() {
|
|
38904
38933
|
const xdg = process.env.XDG_CONFIG_HOME;
|
|
38905
38934
|
const base = xdg && xdg.length > 0 ? xdg : path.join(os.homedir(), ".config");
|
|
@@ -38942,6 +38971,18 @@ function shouldSkipNotify(opts) {
|
|
|
38942
38971
|
function readChannelFromEnv(env) {
|
|
38943
38972
|
return env.MXS_UPDATE_CHANNEL === "next" ? "next" : "stable";
|
|
38944
38973
|
}
|
|
38974
|
+
const AUTO_UPDATE_LOG = "auto-update.log";
|
|
38975
|
+
const isAutoUpdateDisabled = (env) => env.MXS_NO_AUTO_UPDATE === "1" || env.MXS_NO_AUTO_UPDATE === "true" || env.MXS_NO_AUTO_UPDATE === "yes";
|
|
38976
|
+
const planAutoUpdate = (entry, channel) => {
|
|
38977
|
+
const detection = detectPackageManager(entry);
|
|
38978
|
+
if (detection.kind !== "global") return null;
|
|
38979
|
+
const { cmd, args } = buildUpgradeCommand(detection.pm, channel);
|
|
38980
|
+
return {
|
|
38981
|
+
pm: detection.pm,
|
|
38982
|
+
cmd,
|
|
38983
|
+
args
|
|
38984
|
+
};
|
|
38985
|
+
};
|
|
38945
38986
|
const KNOWN_PMS = new Set([
|
|
38946
38987
|
"npm",
|
|
38947
38988
|
"pnpm",
|
|
@@ -38952,9 +38993,30 @@ const make$1 = (deps = {}) => {
|
|
|
38952
38993
|
const now = () => deps.now ? deps.now() : Date.now();
|
|
38953
38994
|
const fetchImpl = deps.fetchImpl;
|
|
38954
38995
|
const spawnImpl = deps.spawnImpl ?? defaultSpawnUpgrade;
|
|
38996
|
+
const spawnDetached = deps.spawnDetached ?? defaultSpawnDetached;
|
|
38955
38997
|
const emitInfo = deps.emitInfo ?? ((msg) => process.stderr.write(`${msg}\n`));
|
|
38956
38998
|
const baseConfigDir = deps.configDir;
|
|
38957
38999
|
const resolvedConfigDir = (opts) => opts.configDir ?? baseConfigDir ?? defaultConfigDir();
|
|
39000
|
+
const triggerAutoUpdate = (opts, latest, cache, dir, ts) => {
|
|
39001
|
+
const env = opts.env ?? process.env;
|
|
39002
|
+
if (isAutoUpdateDisabled(env)) return false;
|
|
39003
|
+
if (cache?.last_auto_update_ts !== void 0 && ts - cache.last_auto_update_ts < THROTTLE_MS) return false;
|
|
39004
|
+
const channel = opts.channel ?? readChannelFromEnv(env);
|
|
39005
|
+
const plan = planAutoUpdate(deps.entrypoint ?? process.argv[1] ?? "", channel);
|
|
39006
|
+
if (!plan) return false;
|
|
39007
|
+
try {
|
|
39008
|
+
spawnDetached(plan.cmd, plan.args, path.join(dir, AUTO_UPDATE_LOG));
|
|
39009
|
+
} catch {
|
|
39010
|
+
return false;
|
|
39011
|
+
}
|
|
39012
|
+
writeCacheAtomic({
|
|
39013
|
+
last_check_ts: ts,
|
|
39014
|
+
latest_version: latest,
|
|
39015
|
+
etag: cache?.etag,
|
|
39016
|
+
last_auto_update_ts: ts
|
|
39017
|
+
}, dir);
|
|
39018
|
+
return true;
|
|
39019
|
+
};
|
|
38958
39020
|
const maybeNotify = (opts) => tryPromise({
|
|
38959
39021
|
try: async () => {
|
|
38960
39022
|
if (shouldSkipNotify(opts)) return;
|
|
@@ -38964,7 +39026,7 @@ const make$1 = (deps = {}) => {
|
|
|
38964
39026
|
const channel = opts.channel ?? readChannelFromEnv(opts.env ?? process.env);
|
|
38965
39027
|
const emit = opts.emit ?? ((msg) => process.stderr.write(`${msg}\n`));
|
|
38966
39028
|
if (cache && !opts.force && ts - cache.last_check_ts < THROTTLE_MS) {
|
|
38967
|
-
if (cache.latest_version && compareSemver(opts.currentVersion, cache.latest_version) < 0) emit(`mxs update available: ${opts.currentVersion} → ${cache.latest_version} run 'mxs update' to upgrade`);
|
|
39029
|
+
if (cache.latest_version && compareSemver(opts.currentVersion, cache.latest_version) < 0) emit(triggerAutoUpdate(opts, cache.latest_version, cache, dir, ts) ? `mxs: auto-updating ${opts.currentVersion} → ${cache.latest_version} in background (set MXS_NO_AUTO_UPDATE=1 to disable)` : `mxs update available: ${opts.currentVersion} → ${cache.latest_version} run 'mxs update' to upgrade`);
|
|
38968
39030
|
return;
|
|
38969
39031
|
}
|
|
38970
39032
|
const controller = new AbortController();
|
|
@@ -38988,8 +39050,17 @@ const make$1 = (deps = {}) => {
|
|
|
38988
39050
|
writeCacheAtomic({
|
|
38989
39051
|
last_check_ts: ts,
|
|
38990
39052
|
latest_version: hit.version,
|
|
38991
|
-
etag: hit.etag
|
|
39053
|
+
etag: hit.etag,
|
|
39054
|
+
last_auto_update_ts: cache?.last_auto_update_ts
|
|
38992
39055
|
}, dir);
|
|
39056
|
+
if (compareSemver(opts.currentVersion, hit.version) < 0) {
|
|
39057
|
+
if (triggerAutoUpdate(opts, hit.version, {
|
|
39058
|
+
last_check_ts: ts,
|
|
39059
|
+
latest_version: hit.version,
|
|
39060
|
+
etag: hit.etag,
|
|
39061
|
+
last_auto_update_ts: cache?.last_auto_update_ts
|
|
39062
|
+
}, dir, ts)) emit(`mxs: auto-updating ${opts.currentVersion} → ${hit.version} in background (set MXS_NO_AUTO_UPDATE=1 to disable)`);
|
|
39063
|
+
}
|
|
38993
39064
|
} catch {
|
|
38994
39065
|
clearTimeout(timer);
|
|
38995
39066
|
writeCacheAtomic({
|
|
@@ -39083,31 +39154,7 @@ const make$1 = (deps = {}) => {
|
|
|
39083
39154
|
command: shown
|
|
39084
39155
|
};
|
|
39085
39156
|
}
|
|
39086
|
-
|
|
39087
|
-
if (!opts.yes && interactive && deps.confirmImpl) {
|
|
39088
|
-
const confirm = deps.confirmImpl;
|
|
39089
|
-
if (!(yield* tryPromise({
|
|
39090
|
-
try: () => confirm(`Run \`${shown}\` to upgrade?`),
|
|
39091
|
-
catch: (cause) => new UpdateSpawnFailed({
|
|
39092
|
-
message: "failed to prompt for confirmation",
|
|
39093
|
-
details: { cause: cause instanceof Error ? cause.message : cause }
|
|
39094
|
-
})
|
|
39095
|
-
}))) {
|
|
39096
|
-
emitInfo("mxs: update cancelled");
|
|
39097
|
-
return {
|
|
39098
|
-
fromVersion: opts.currentVersion,
|
|
39099
|
-
toVersion: hit.version,
|
|
39100
|
-
pm,
|
|
39101
|
-
channel,
|
|
39102
|
-
status: 0,
|
|
39103
|
-
upgraded: false,
|
|
39104
|
-
dryRun: true,
|
|
39105
|
-
upToDate: false,
|
|
39106
|
-
command: shown,
|
|
39107
|
-
cancelled: true
|
|
39108
|
-
};
|
|
39109
|
-
}
|
|
39110
|
-
}
|
|
39157
|
+
if (!opts.json) emitInfo(`mxs: running ${shown}`);
|
|
39111
39158
|
const result = yield* tryPromise({
|
|
39112
39159
|
try: () => spawnImpl(cmd, args),
|
|
39113
39160
|
catch: (cause) => new UpdateSpawnFailed({
|
|
@@ -39150,7 +39197,7 @@ var UpdateNotifier = class UpdateNotifier extends Tag$2("UpdateNotifier")() {
|
|
|
39150
39197
|
//#region src/cli/update/index.ts
|
|
39151
39198
|
registerCommandHelp({
|
|
39152
39199
|
name: "update",
|
|
39153
|
-
description: "
|
|
39200
|
+
description: "install the newest mxs release (auto, no prompt)",
|
|
39154
39201
|
isLeaf: true,
|
|
39155
39202
|
leafOptions: [
|
|
39156
39203
|
{
|
|
@@ -39171,7 +39218,7 @@ registerCommandHelp({
|
|
|
39171
39218
|
},
|
|
39172
39219
|
{
|
|
39173
39220
|
flag: "--yes",
|
|
39174
|
-
description: "
|
|
39221
|
+
description: "deprecated no-op (kept for back-compat; updates run without a prompt by default)"
|
|
39175
39222
|
}
|
|
39176
39223
|
]
|
|
39177
39224
|
});
|
|
@@ -39206,10 +39253,9 @@ const updateCmd = make$13("update", {
|
|
|
39206
39253
|
force,
|
|
39207
39254
|
yes
|
|
39208
39255
|
}, ({ check, prerelease, pm, force, yes }) => gen(function* () {
|
|
39209
|
-
const editor = yield* Editor;
|
|
39210
39256
|
const renderer = yield* Renderer;
|
|
39211
39257
|
const outOpts = yield* renderer.options;
|
|
39212
|
-
const updater = make$1(
|
|
39258
|
+
const updater = make$1();
|
|
39213
39259
|
const opts = {
|
|
39214
39260
|
currentVersion: CLI_VERSION$1,
|
|
39215
39261
|
check: optBool(check),
|
package/package.json
CHANGED
package/dist/esm-By7trG9K.mjs
DELETED