larkway 0.3.29 → 0.3.31
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/README.md +2 -2
- package/README.zh.md +2 -2
- package/dist/cli/index.js +58 -776
- package/dist/main.js +169 -796
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -10740,769 +10740,6 @@ var require_proxy_from_env = __commonJS({
|
|
|
10740
10740
|
}
|
|
10741
10741
|
});
|
|
10742
10742
|
|
|
10743
|
-
// node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js
|
|
10744
|
-
var require_ms = __commonJS({
|
|
10745
|
-
"node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js"(exports, module) {
|
|
10746
|
-
var s = 1e3;
|
|
10747
|
-
var m = s * 60;
|
|
10748
|
-
var h = m * 60;
|
|
10749
|
-
var d = h * 24;
|
|
10750
|
-
var w = d * 7;
|
|
10751
|
-
var y = d * 365.25;
|
|
10752
|
-
module.exports = function(val, options) {
|
|
10753
|
-
options = options || {};
|
|
10754
|
-
var type2 = typeof val;
|
|
10755
|
-
if (type2 === "string" && val.length > 0) {
|
|
10756
|
-
return parse(val);
|
|
10757
|
-
} else if (type2 === "number" && isFinite(val)) {
|
|
10758
|
-
return options.long ? fmtLong(val) : fmtShort(val);
|
|
10759
|
-
}
|
|
10760
|
-
throw new Error(
|
|
10761
|
-
"val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
|
|
10762
|
-
);
|
|
10763
|
-
};
|
|
10764
|
-
function parse(str2) {
|
|
10765
|
-
str2 = String(str2);
|
|
10766
|
-
if (str2.length > 100) {
|
|
10767
|
-
return;
|
|
10768
|
-
}
|
|
10769
|
-
var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
|
|
10770
|
-
str2
|
|
10771
|
-
);
|
|
10772
|
-
if (!match) {
|
|
10773
|
-
return;
|
|
10774
|
-
}
|
|
10775
|
-
var n = parseFloat(match[1]);
|
|
10776
|
-
var type2 = (match[2] || "ms").toLowerCase();
|
|
10777
|
-
switch (type2) {
|
|
10778
|
-
case "years":
|
|
10779
|
-
case "year":
|
|
10780
|
-
case "yrs":
|
|
10781
|
-
case "yr":
|
|
10782
|
-
case "y":
|
|
10783
|
-
return n * y;
|
|
10784
|
-
case "weeks":
|
|
10785
|
-
case "week":
|
|
10786
|
-
case "w":
|
|
10787
|
-
return n * w;
|
|
10788
|
-
case "days":
|
|
10789
|
-
case "day":
|
|
10790
|
-
case "d":
|
|
10791
|
-
return n * d;
|
|
10792
|
-
case "hours":
|
|
10793
|
-
case "hour":
|
|
10794
|
-
case "hrs":
|
|
10795
|
-
case "hr":
|
|
10796
|
-
case "h":
|
|
10797
|
-
return n * h;
|
|
10798
|
-
case "minutes":
|
|
10799
|
-
case "minute":
|
|
10800
|
-
case "mins":
|
|
10801
|
-
case "min":
|
|
10802
|
-
case "m":
|
|
10803
|
-
return n * m;
|
|
10804
|
-
case "seconds":
|
|
10805
|
-
case "second":
|
|
10806
|
-
case "secs":
|
|
10807
|
-
case "sec":
|
|
10808
|
-
case "s":
|
|
10809
|
-
return n * s;
|
|
10810
|
-
case "milliseconds":
|
|
10811
|
-
case "millisecond":
|
|
10812
|
-
case "msecs":
|
|
10813
|
-
case "msec":
|
|
10814
|
-
case "ms":
|
|
10815
|
-
return n;
|
|
10816
|
-
default:
|
|
10817
|
-
return void 0;
|
|
10818
|
-
}
|
|
10819
|
-
}
|
|
10820
|
-
function fmtShort(ms) {
|
|
10821
|
-
var msAbs = Math.abs(ms);
|
|
10822
|
-
if (msAbs >= d) {
|
|
10823
|
-
return Math.round(ms / d) + "d";
|
|
10824
|
-
}
|
|
10825
|
-
if (msAbs >= h) {
|
|
10826
|
-
return Math.round(ms / h) + "h";
|
|
10827
|
-
}
|
|
10828
|
-
if (msAbs >= m) {
|
|
10829
|
-
return Math.round(ms / m) + "m";
|
|
10830
|
-
}
|
|
10831
|
-
if (msAbs >= s) {
|
|
10832
|
-
return Math.round(ms / s) + "s";
|
|
10833
|
-
}
|
|
10834
|
-
return ms + "ms";
|
|
10835
|
-
}
|
|
10836
|
-
function fmtLong(ms) {
|
|
10837
|
-
var msAbs = Math.abs(ms);
|
|
10838
|
-
if (msAbs >= d) {
|
|
10839
|
-
return plural(ms, msAbs, d, "day");
|
|
10840
|
-
}
|
|
10841
|
-
if (msAbs >= h) {
|
|
10842
|
-
return plural(ms, msAbs, h, "hour");
|
|
10843
|
-
}
|
|
10844
|
-
if (msAbs >= m) {
|
|
10845
|
-
return plural(ms, msAbs, m, "minute");
|
|
10846
|
-
}
|
|
10847
|
-
if (msAbs >= s) {
|
|
10848
|
-
return plural(ms, msAbs, s, "second");
|
|
10849
|
-
}
|
|
10850
|
-
return ms + " ms";
|
|
10851
|
-
}
|
|
10852
|
-
function plural(ms, msAbs, n, name) {
|
|
10853
|
-
var isPlural = msAbs >= n * 1.5;
|
|
10854
|
-
return Math.round(ms / n) + " " + name + (isPlural ? "s" : "");
|
|
10855
|
-
}
|
|
10856
|
-
}
|
|
10857
|
-
});
|
|
10858
|
-
|
|
10859
|
-
// node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/common.js
|
|
10860
|
-
var require_common = __commonJS({
|
|
10861
|
-
"node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/common.js"(exports, module) {
|
|
10862
|
-
function setup(env) {
|
|
10863
|
-
createDebug.debug = createDebug;
|
|
10864
|
-
createDebug.default = createDebug;
|
|
10865
|
-
createDebug.coerce = coerce2;
|
|
10866
|
-
createDebug.disable = disable;
|
|
10867
|
-
createDebug.enable = enable;
|
|
10868
|
-
createDebug.enabled = enabled;
|
|
10869
|
-
createDebug.humanize = require_ms();
|
|
10870
|
-
createDebug.destroy = destroy;
|
|
10871
|
-
Object.keys(env).forEach((key) => {
|
|
10872
|
-
createDebug[key] = env[key];
|
|
10873
|
-
});
|
|
10874
|
-
createDebug.names = [];
|
|
10875
|
-
createDebug.skips = [];
|
|
10876
|
-
createDebug.formatters = {};
|
|
10877
|
-
function selectColor(namespace) {
|
|
10878
|
-
let hash = 0;
|
|
10879
|
-
for (let i = 0; i < namespace.length; i++) {
|
|
10880
|
-
hash = (hash << 5) - hash + namespace.charCodeAt(i);
|
|
10881
|
-
hash |= 0;
|
|
10882
|
-
}
|
|
10883
|
-
return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
|
|
10884
|
-
}
|
|
10885
|
-
createDebug.selectColor = selectColor;
|
|
10886
|
-
function createDebug(namespace) {
|
|
10887
|
-
let prevTime;
|
|
10888
|
-
let enableOverride = null;
|
|
10889
|
-
let namespacesCache;
|
|
10890
|
-
let enabledCache;
|
|
10891
|
-
function debug(...args) {
|
|
10892
|
-
if (!debug.enabled) {
|
|
10893
|
-
return;
|
|
10894
|
-
}
|
|
10895
|
-
const self2 = debug;
|
|
10896
|
-
const curr = Number(/* @__PURE__ */ new Date());
|
|
10897
|
-
const ms = curr - (prevTime || curr);
|
|
10898
|
-
self2.diff = ms;
|
|
10899
|
-
self2.prev = prevTime;
|
|
10900
|
-
self2.curr = curr;
|
|
10901
|
-
prevTime = curr;
|
|
10902
|
-
args[0] = createDebug.coerce(args[0]);
|
|
10903
|
-
if (typeof args[0] !== "string") {
|
|
10904
|
-
args.unshift("%O");
|
|
10905
|
-
}
|
|
10906
|
-
let index = 0;
|
|
10907
|
-
args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
|
|
10908
|
-
if (match === "%%") {
|
|
10909
|
-
return "%";
|
|
10910
|
-
}
|
|
10911
|
-
index++;
|
|
10912
|
-
const formatter = createDebug.formatters[format];
|
|
10913
|
-
if (typeof formatter === "function") {
|
|
10914
|
-
const val = args[index];
|
|
10915
|
-
match = formatter.call(self2, val);
|
|
10916
|
-
args.splice(index, 1);
|
|
10917
|
-
index--;
|
|
10918
|
-
}
|
|
10919
|
-
return match;
|
|
10920
|
-
});
|
|
10921
|
-
createDebug.formatArgs.call(self2, args);
|
|
10922
|
-
const logFn = self2.log || createDebug.log;
|
|
10923
|
-
logFn.apply(self2, args);
|
|
10924
|
-
}
|
|
10925
|
-
debug.namespace = namespace;
|
|
10926
|
-
debug.useColors = createDebug.useColors();
|
|
10927
|
-
debug.color = createDebug.selectColor(namespace);
|
|
10928
|
-
debug.extend = extend3;
|
|
10929
|
-
debug.destroy = createDebug.destroy;
|
|
10930
|
-
Object.defineProperty(debug, "enabled", {
|
|
10931
|
-
enumerable: true,
|
|
10932
|
-
configurable: false,
|
|
10933
|
-
get: () => {
|
|
10934
|
-
if (enableOverride !== null) {
|
|
10935
|
-
return enableOverride;
|
|
10936
|
-
}
|
|
10937
|
-
if (namespacesCache !== createDebug.namespaces) {
|
|
10938
|
-
namespacesCache = createDebug.namespaces;
|
|
10939
|
-
enabledCache = createDebug.enabled(namespace);
|
|
10940
|
-
}
|
|
10941
|
-
return enabledCache;
|
|
10942
|
-
},
|
|
10943
|
-
set: (v) => {
|
|
10944
|
-
enableOverride = v;
|
|
10945
|
-
}
|
|
10946
|
-
});
|
|
10947
|
-
if (typeof createDebug.init === "function") {
|
|
10948
|
-
createDebug.init(debug);
|
|
10949
|
-
}
|
|
10950
|
-
return debug;
|
|
10951
|
-
}
|
|
10952
|
-
function extend3(namespace, delimiter) {
|
|
10953
|
-
const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
|
|
10954
|
-
newDebug.log = this.log;
|
|
10955
|
-
return newDebug;
|
|
10956
|
-
}
|
|
10957
|
-
function enable(namespaces) {
|
|
10958
|
-
createDebug.save(namespaces);
|
|
10959
|
-
createDebug.namespaces = namespaces;
|
|
10960
|
-
createDebug.names = [];
|
|
10961
|
-
createDebug.skips = [];
|
|
10962
|
-
const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
|
|
10963
|
-
for (const ns of split) {
|
|
10964
|
-
if (ns[0] === "-") {
|
|
10965
|
-
createDebug.skips.push(ns.slice(1));
|
|
10966
|
-
} else {
|
|
10967
|
-
createDebug.names.push(ns);
|
|
10968
|
-
}
|
|
10969
|
-
}
|
|
10970
|
-
}
|
|
10971
|
-
function matchesTemplate(search, template) {
|
|
10972
|
-
let searchIndex = 0;
|
|
10973
|
-
let templateIndex = 0;
|
|
10974
|
-
let starIndex = -1;
|
|
10975
|
-
let matchIndex = 0;
|
|
10976
|
-
while (searchIndex < search.length) {
|
|
10977
|
-
if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
|
|
10978
|
-
if (template[templateIndex] === "*") {
|
|
10979
|
-
starIndex = templateIndex;
|
|
10980
|
-
matchIndex = searchIndex;
|
|
10981
|
-
templateIndex++;
|
|
10982
|
-
} else {
|
|
10983
|
-
searchIndex++;
|
|
10984
|
-
templateIndex++;
|
|
10985
|
-
}
|
|
10986
|
-
} else if (starIndex !== -1) {
|
|
10987
|
-
templateIndex = starIndex + 1;
|
|
10988
|
-
matchIndex++;
|
|
10989
|
-
searchIndex = matchIndex;
|
|
10990
|
-
} else {
|
|
10991
|
-
return false;
|
|
10992
|
-
}
|
|
10993
|
-
}
|
|
10994
|
-
while (templateIndex < template.length && template[templateIndex] === "*") {
|
|
10995
|
-
templateIndex++;
|
|
10996
|
-
}
|
|
10997
|
-
return templateIndex === template.length;
|
|
10998
|
-
}
|
|
10999
|
-
function disable() {
|
|
11000
|
-
const namespaces = [
|
|
11001
|
-
...createDebug.names,
|
|
11002
|
-
...createDebug.skips.map((namespace) => "-" + namespace)
|
|
11003
|
-
].join(",");
|
|
11004
|
-
createDebug.enable("");
|
|
11005
|
-
return namespaces;
|
|
11006
|
-
}
|
|
11007
|
-
function enabled(name) {
|
|
11008
|
-
for (const skip of createDebug.skips) {
|
|
11009
|
-
if (matchesTemplate(name, skip)) {
|
|
11010
|
-
return false;
|
|
11011
|
-
}
|
|
11012
|
-
}
|
|
11013
|
-
for (const ns of createDebug.names) {
|
|
11014
|
-
if (matchesTemplate(name, ns)) {
|
|
11015
|
-
return true;
|
|
11016
|
-
}
|
|
11017
|
-
}
|
|
11018
|
-
return false;
|
|
11019
|
-
}
|
|
11020
|
-
function coerce2(val) {
|
|
11021
|
-
if (val instanceof Error) {
|
|
11022
|
-
return val.stack || val.message;
|
|
11023
|
-
}
|
|
11024
|
-
return val;
|
|
11025
|
-
}
|
|
11026
|
-
function destroy() {
|
|
11027
|
-
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
11028
|
-
}
|
|
11029
|
-
createDebug.enable(createDebug.load());
|
|
11030
|
-
return createDebug;
|
|
11031
|
-
}
|
|
11032
|
-
module.exports = setup;
|
|
11033
|
-
}
|
|
11034
|
-
});
|
|
11035
|
-
|
|
11036
|
-
// node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/browser.js
|
|
11037
|
-
var require_browser = __commonJS({
|
|
11038
|
-
"node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/browser.js"(exports, module) {
|
|
11039
|
-
exports.formatArgs = formatArgs;
|
|
11040
|
-
exports.save = save;
|
|
11041
|
-
exports.load = load2;
|
|
11042
|
-
exports.useColors = useColors;
|
|
11043
|
-
exports.storage = localstorage();
|
|
11044
|
-
exports.destroy = /* @__PURE__ */ (() => {
|
|
11045
|
-
let warned = false;
|
|
11046
|
-
return () => {
|
|
11047
|
-
if (!warned) {
|
|
11048
|
-
warned = true;
|
|
11049
|
-
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
11050
|
-
}
|
|
11051
|
-
};
|
|
11052
|
-
})();
|
|
11053
|
-
exports.colors = [
|
|
11054
|
-
"#0000CC",
|
|
11055
|
-
"#0000FF",
|
|
11056
|
-
"#0033CC",
|
|
11057
|
-
"#0033FF",
|
|
11058
|
-
"#0066CC",
|
|
11059
|
-
"#0066FF",
|
|
11060
|
-
"#0099CC",
|
|
11061
|
-
"#0099FF",
|
|
11062
|
-
"#00CC00",
|
|
11063
|
-
"#00CC33",
|
|
11064
|
-
"#00CC66",
|
|
11065
|
-
"#00CC99",
|
|
11066
|
-
"#00CCCC",
|
|
11067
|
-
"#00CCFF",
|
|
11068
|
-
"#3300CC",
|
|
11069
|
-
"#3300FF",
|
|
11070
|
-
"#3333CC",
|
|
11071
|
-
"#3333FF",
|
|
11072
|
-
"#3366CC",
|
|
11073
|
-
"#3366FF",
|
|
11074
|
-
"#3399CC",
|
|
11075
|
-
"#3399FF",
|
|
11076
|
-
"#33CC00",
|
|
11077
|
-
"#33CC33",
|
|
11078
|
-
"#33CC66",
|
|
11079
|
-
"#33CC99",
|
|
11080
|
-
"#33CCCC",
|
|
11081
|
-
"#33CCFF",
|
|
11082
|
-
"#6600CC",
|
|
11083
|
-
"#6600FF",
|
|
11084
|
-
"#6633CC",
|
|
11085
|
-
"#6633FF",
|
|
11086
|
-
"#66CC00",
|
|
11087
|
-
"#66CC33",
|
|
11088
|
-
"#9900CC",
|
|
11089
|
-
"#9900FF",
|
|
11090
|
-
"#9933CC",
|
|
11091
|
-
"#9933FF",
|
|
11092
|
-
"#99CC00",
|
|
11093
|
-
"#99CC33",
|
|
11094
|
-
"#CC0000",
|
|
11095
|
-
"#CC0033",
|
|
11096
|
-
"#CC0066",
|
|
11097
|
-
"#CC0099",
|
|
11098
|
-
"#CC00CC",
|
|
11099
|
-
"#CC00FF",
|
|
11100
|
-
"#CC3300",
|
|
11101
|
-
"#CC3333",
|
|
11102
|
-
"#CC3366",
|
|
11103
|
-
"#CC3399",
|
|
11104
|
-
"#CC33CC",
|
|
11105
|
-
"#CC33FF",
|
|
11106
|
-
"#CC6600",
|
|
11107
|
-
"#CC6633",
|
|
11108
|
-
"#CC9900",
|
|
11109
|
-
"#CC9933",
|
|
11110
|
-
"#CCCC00",
|
|
11111
|
-
"#CCCC33",
|
|
11112
|
-
"#FF0000",
|
|
11113
|
-
"#FF0033",
|
|
11114
|
-
"#FF0066",
|
|
11115
|
-
"#FF0099",
|
|
11116
|
-
"#FF00CC",
|
|
11117
|
-
"#FF00FF",
|
|
11118
|
-
"#FF3300",
|
|
11119
|
-
"#FF3333",
|
|
11120
|
-
"#FF3366",
|
|
11121
|
-
"#FF3399",
|
|
11122
|
-
"#FF33CC",
|
|
11123
|
-
"#FF33FF",
|
|
11124
|
-
"#FF6600",
|
|
11125
|
-
"#FF6633",
|
|
11126
|
-
"#FF9900",
|
|
11127
|
-
"#FF9933",
|
|
11128
|
-
"#FFCC00",
|
|
11129
|
-
"#FFCC33"
|
|
11130
|
-
];
|
|
11131
|
-
function useColors() {
|
|
11132
|
-
if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
|
|
11133
|
-
return true;
|
|
11134
|
-
}
|
|
11135
|
-
if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
|
11136
|
-
return false;
|
|
11137
|
-
}
|
|
11138
|
-
let m;
|
|
11139
|
-
return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
|
|
11140
|
-
typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
|
|
11141
|
-
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
|
11142
|
-
typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
|
|
11143
|
-
typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
|
11144
|
-
}
|
|
11145
|
-
function formatArgs(args) {
|
|
11146
|
-
args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module.exports.humanize(this.diff);
|
|
11147
|
-
if (!this.useColors) {
|
|
11148
|
-
return;
|
|
11149
|
-
}
|
|
11150
|
-
const c = "color: " + this.color;
|
|
11151
|
-
args.splice(1, 0, c, "color: inherit");
|
|
11152
|
-
let index = 0;
|
|
11153
|
-
let lastC = 0;
|
|
11154
|
-
args[0].replace(/%[a-zA-Z%]/g, (match) => {
|
|
11155
|
-
if (match === "%%") {
|
|
11156
|
-
return;
|
|
11157
|
-
}
|
|
11158
|
-
index++;
|
|
11159
|
-
if (match === "%c") {
|
|
11160
|
-
lastC = index;
|
|
11161
|
-
}
|
|
11162
|
-
});
|
|
11163
|
-
args.splice(lastC, 0, c);
|
|
11164
|
-
}
|
|
11165
|
-
exports.log = console.debug || console.log || (() => {
|
|
11166
|
-
});
|
|
11167
|
-
function save(namespaces) {
|
|
11168
|
-
try {
|
|
11169
|
-
if (namespaces) {
|
|
11170
|
-
exports.storage.setItem("debug", namespaces);
|
|
11171
|
-
} else {
|
|
11172
|
-
exports.storage.removeItem("debug");
|
|
11173
|
-
}
|
|
11174
|
-
} catch (error) {
|
|
11175
|
-
}
|
|
11176
|
-
}
|
|
11177
|
-
function load2() {
|
|
11178
|
-
let r;
|
|
11179
|
-
try {
|
|
11180
|
-
r = exports.storage.getItem("debug") || exports.storage.getItem("DEBUG");
|
|
11181
|
-
} catch (error) {
|
|
11182
|
-
}
|
|
11183
|
-
if (!r && typeof process !== "undefined" && "env" in process) {
|
|
11184
|
-
r = process.env.DEBUG;
|
|
11185
|
-
}
|
|
11186
|
-
return r;
|
|
11187
|
-
}
|
|
11188
|
-
function localstorage() {
|
|
11189
|
-
try {
|
|
11190
|
-
return localStorage;
|
|
11191
|
-
} catch (error) {
|
|
11192
|
-
}
|
|
11193
|
-
}
|
|
11194
|
-
module.exports = require_common()(exports);
|
|
11195
|
-
var { formatters } = module.exports;
|
|
11196
|
-
formatters.j = function(v) {
|
|
11197
|
-
try {
|
|
11198
|
-
return JSON.stringify(v);
|
|
11199
|
-
} catch (error) {
|
|
11200
|
-
return "[UnexpectedJSONParseError]: " + error.message;
|
|
11201
|
-
}
|
|
11202
|
-
};
|
|
11203
|
-
}
|
|
11204
|
-
});
|
|
11205
|
-
|
|
11206
|
-
// node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js
|
|
11207
|
-
var require_has_flag = __commonJS({
|
|
11208
|
-
"node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js"(exports, module) {
|
|
11209
|
-
"use strict";
|
|
11210
|
-
module.exports = (flag, argv = process.argv) => {
|
|
11211
|
-
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
11212
|
-
const position = argv.indexOf(prefix + flag);
|
|
11213
|
-
const terminatorPosition = argv.indexOf("--");
|
|
11214
|
-
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
11215
|
-
};
|
|
11216
|
-
}
|
|
11217
|
-
});
|
|
11218
|
-
|
|
11219
|
-
// node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js
|
|
11220
|
-
var require_supports_color = __commonJS({
|
|
11221
|
-
"node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js"(exports, module) {
|
|
11222
|
-
"use strict";
|
|
11223
|
-
var os2 = __require("os");
|
|
11224
|
-
var tty = __require("tty");
|
|
11225
|
-
var hasFlag = require_has_flag();
|
|
11226
|
-
var { env } = process;
|
|
11227
|
-
var forceColor;
|
|
11228
|
-
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
11229
|
-
forceColor = 0;
|
|
11230
|
-
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
11231
|
-
forceColor = 1;
|
|
11232
|
-
}
|
|
11233
|
-
if ("FORCE_COLOR" in env) {
|
|
11234
|
-
if (env.FORCE_COLOR === "true") {
|
|
11235
|
-
forceColor = 1;
|
|
11236
|
-
} else if (env.FORCE_COLOR === "false") {
|
|
11237
|
-
forceColor = 0;
|
|
11238
|
-
} else {
|
|
11239
|
-
forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
|
|
11240
|
-
}
|
|
11241
|
-
}
|
|
11242
|
-
function translateLevel(level) {
|
|
11243
|
-
if (level === 0) {
|
|
11244
|
-
return false;
|
|
11245
|
-
}
|
|
11246
|
-
return {
|
|
11247
|
-
level,
|
|
11248
|
-
hasBasic: true,
|
|
11249
|
-
has256: level >= 2,
|
|
11250
|
-
has16m: level >= 3
|
|
11251
|
-
};
|
|
11252
|
-
}
|
|
11253
|
-
function supportsColor(haveStream, streamIsTTY) {
|
|
11254
|
-
if (forceColor === 0) {
|
|
11255
|
-
return 0;
|
|
11256
|
-
}
|
|
11257
|
-
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
11258
|
-
return 3;
|
|
11259
|
-
}
|
|
11260
|
-
if (hasFlag("color=256")) {
|
|
11261
|
-
return 2;
|
|
11262
|
-
}
|
|
11263
|
-
if (haveStream && !streamIsTTY && forceColor === void 0) {
|
|
11264
|
-
return 0;
|
|
11265
|
-
}
|
|
11266
|
-
const min = forceColor || 0;
|
|
11267
|
-
if (env.TERM === "dumb") {
|
|
11268
|
-
return min;
|
|
11269
|
-
}
|
|
11270
|
-
if (process.platform === "win32") {
|
|
11271
|
-
const osRelease = os2.release().split(".");
|
|
11272
|
-
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
11273
|
-
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
11274
|
-
}
|
|
11275
|
-
return 1;
|
|
11276
|
-
}
|
|
11277
|
-
if ("CI" in env) {
|
|
11278
|
-
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
|
|
11279
|
-
return 1;
|
|
11280
|
-
}
|
|
11281
|
-
return min;
|
|
11282
|
-
}
|
|
11283
|
-
if ("TEAMCITY_VERSION" in env) {
|
|
11284
|
-
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
11285
|
-
}
|
|
11286
|
-
if (env.COLORTERM === "truecolor") {
|
|
11287
|
-
return 3;
|
|
11288
|
-
}
|
|
11289
|
-
if ("TERM_PROGRAM" in env) {
|
|
11290
|
-
const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
11291
|
-
switch (env.TERM_PROGRAM) {
|
|
11292
|
-
case "iTerm.app":
|
|
11293
|
-
return version >= 3 ? 3 : 2;
|
|
11294
|
-
case "Apple_Terminal":
|
|
11295
|
-
return 2;
|
|
11296
|
-
}
|
|
11297
|
-
}
|
|
11298
|
-
if (/-256(color)?$/i.test(env.TERM)) {
|
|
11299
|
-
return 2;
|
|
11300
|
-
}
|
|
11301
|
-
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
11302
|
-
return 1;
|
|
11303
|
-
}
|
|
11304
|
-
if ("COLORTERM" in env) {
|
|
11305
|
-
return 1;
|
|
11306
|
-
}
|
|
11307
|
-
return min;
|
|
11308
|
-
}
|
|
11309
|
-
function getSupportLevel(stream) {
|
|
11310
|
-
const level = supportsColor(stream, stream && stream.isTTY);
|
|
11311
|
-
return translateLevel(level);
|
|
11312
|
-
}
|
|
11313
|
-
module.exports = {
|
|
11314
|
-
supportsColor: getSupportLevel,
|
|
11315
|
-
stdout: translateLevel(supportsColor(true, tty.isatty(1))),
|
|
11316
|
-
stderr: translateLevel(supportsColor(true, tty.isatty(2)))
|
|
11317
|
-
};
|
|
11318
|
-
}
|
|
11319
|
-
});
|
|
11320
|
-
|
|
11321
|
-
// node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/node.js
|
|
11322
|
-
var require_node = __commonJS({
|
|
11323
|
-
"node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/node.js"(exports, module) {
|
|
11324
|
-
var tty = __require("tty");
|
|
11325
|
-
var util2 = __require("util");
|
|
11326
|
-
exports.init = init;
|
|
11327
|
-
exports.log = log;
|
|
11328
|
-
exports.formatArgs = formatArgs;
|
|
11329
|
-
exports.save = save;
|
|
11330
|
-
exports.load = load2;
|
|
11331
|
-
exports.useColors = useColors;
|
|
11332
|
-
exports.destroy = util2.deprecate(
|
|
11333
|
-
() => {
|
|
11334
|
-
},
|
|
11335
|
-
"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."
|
|
11336
|
-
);
|
|
11337
|
-
exports.colors = [6, 2, 3, 4, 5, 1];
|
|
11338
|
-
try {
|
|
11339
|
-
const supportsColor = require_supports_color();
|
|
11340
|
-
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
|
|
11341
|
-
exports.colors = [
|
|
11342
|
-
20,
|
|
11343
|
-
21,
|
|
11344
|
-
26,
|
|
11345
|
-
27,
|
|
11346
|
-
32,
|
|
11347
|
-
33,
|
|
11348
|
-
38,
|
|
11349
|
-
39,
|
|
11350
|
-
40,
|
|
11351
|
-
41,
|
|
11352
|
-
42,
|
|
11353
|
-
43,
|
|
11354
|
-
44,
|
|
11355
|
-
45,
|
|
11356
|
-
56,
|
|
11357
|
-
57,
|
|
11358
|
-
62,
|
|
11359
|
-
63,
|
|
11360
|
-
68,
|
|
11361
|
-
69,
|
|
11362
|
-
74,
|
|
11363
|
-
75,
|
|
11364
|
-
76,
|
|
11365
|
-
77,
|
|
11366
|
-
78,
|
|
11367
|
-
79,
|
|
11368
|
-
80,
|
|
11369
|
-
81,
|
|
11370
|
-
92,
|
|
11371
|
-
93,
|
|
11372
|
-
98,
|
|
11373
|
-
99,
|
|
11374
|
-
112,
|
|
11375
|
-
113,
|
|
11376
|
-
128,
|
|
11377
|
-
129,
|
|
11378
|
-
134,
|
|
11379
|
-
135,
|
|
11380
|
-
148,
|
|
11381
|
-
149,
|
|
11382
|
-
160,
|
|
11383
|
-
161,
|
|
11384
|
-
162,
|
|
11385
|
-
163,
|
|
11386
|
-
164,
|
|
11387
|
-
165,
|
|
11388
|
-
166,
|
|
11389
|
-
167,
|
|
11390
|
-
168,
|
|
11391
|
-
169,
|
|
11392
|
-
170,
|
|
11393
|
-
171,
|
|
11394
|
-
172,
|
|
11395
|
-
173,
|
|
11396
|
-
178,
|
|
11397
|
-
179,
|
|
11398
|
-
184,
|
|
11399
|
-
185,
|
|
11400
|
-
196,
|
|
11401
|
-
197,
|
|
11402
|
-
198,
|
|
11403
|
-
199,
|
|
11404
|
-
200,
|
|
11405
|
-
201,
|
|
11406
|
-
202,
|
|
11407
|
-
203,
|
|
11408
|
-
204,
|
|
11409
|
-
205,
|
|
11410
|
-
206,
|
|
11411
|
-
207,
|
|
11412
|
-
208,
|
|
11413
|
-
209,
|
|
11414
|
-
214,
|
|
11415
|
-
215,
|
|
11416
|
-
220,
|
|
11417
|
-
221
|
|
11418
|
-
];
|
|
11419
|
-
}
|
|
11420
|
-
} catch (error) {
|
|
11421
|
-
}
|
|
11422
|
-
exports.inspectOpts = Object.keys(process.env).filter((key) => {
|
|
11423
|
-
return /^debug_/i.test(key);
|
|
11424
|
-
}).reduce((obj, key) => {
|
|
11425
|
-
const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => {
|
|
11426
|
-
return k.toUpperCase();
|
|
11427
|
-
});
|
|
11428
|
-
let val = process.env[key];
|
|
11429
|
-
if (/^(yes|on|true|enabled)$/i.test(val)) {
|
|
11430
|
-
val = true;
|
|
11431
|
-
} else if (/^(no|off|false|disabled)$/i.test(val)) {
|
|
11432
|
-
val = false;
|
|
11433
|
-
} else if (val === "null") {
|
|
11434
|
-
val = null;
|
|
11435
|
-
} else {
|
|
11436
|
-
val = Number(val);
|
|
11437
|
-
}
|
|
11438
|
-
obj[prop] = val;
|
|
11439
|
-
return obj;
|
|
11440
|
-
}, {});
|
|
11441
|
-
function useColors() {
|
|
11442
|
-
return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
|
|
11443
|
-
}
|
|
11444
|
-
function formatArgs(args) {
|
|
11445
|
-
const { namespace: name, useColors: useColors2 } = this;
|
|
11446
|
-
if (useColors2) {
|
|
11447
|
-
const c = this.color;
|
|
11448
|
-
const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
|
|
11449
|
-
const prefix = ` ${colorCode};1m${name} \x1B[0m`;
|
|
11450
|
-
args[0] = prefix + args[0].split("\n").join("\n" + prefix);
|
|
11451
|
-
args.push(colorCode + "m+" + module.exports.humanize(this.diff) + "\x1B[0m");
|
|
11452
|
-
} else {
|
|
11453
|
-
args[0] = getDate() + name + " " + args[0];
|
|
11454
|
-
}
|
|
11455
|
-
}
|
|
11456
|
-
function getDate() {
|
|
11457
|
-
if (exports.inspectOpts.hideDate) {
|
|
11458
|
-
return "";
|
|
11459
|
-
}
|
|
11460
|
-
return (/* @__PURE__ */ new Date()).toISOString() + " ";
|
|
11461
|
-
}
|
|
11462
|
-
function log(...args) {
|
|
11463
|
-
return process.stderr.write(util2.formatWithOptions(exports.inspectOpts, ...args) + "\n");
|
|
11464
|
-
}
|
|
11465
|
-
function save(namespaces) {
|
|
11466
|
-
if (namespaces) {
|
|
11467
|
-
process.env.DEBUG = namespaces;
|
|
11468
|
-
} else {
|
|
11469
|
-
delete process.env.DEBUG;
|
|
11470
|
-
}
|
|
11471
|
-
}
|
|
11472
|
-
function load2() {
|
|
11473
|
-
return process.env.DEBUG;
|
|
11474
|
-
}
|
|
11475
|
-
function init(debug) {
|
|
11476
|
-
debug.inspectOpts = {};
|
|
11477
|
-
const keys = Object.keys(exports.inspectOpts);
|
|
11478
|
-
for (let i = 0; i < keys.length; i++) {
|
|
11479
|
-
debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
|
|
11480
|
-
}
|
|
11481
|
-
}
|
|
11482
|
-
module.exports = require_common()(exports);
|
|
11483
|
-
var { formatters } = module.exports;
|
|
11484
|
-
formatters.o = function(v) {
|
|
11485
|
-
this.inspectOpts.colors = this.useColors;
|
|
11486
|
-
return util2.inspect(v, this.inspectOpts).split("\n").map((str2) => str2.trim()).join(" ");
|
|
11487
|
-
};
|
|
11488
|
-
formatters.O = function(v) {
|
|
11489
|
-
this.inspectOpts.colors = this.useColors;
|
|
11490
|
-
return util2.inspect(v, this.inspectOpts);
|
|
11491
|
-
};
|
|
11492
|
-
}
|
|
11493
|
-
});
|
|
11494
|
-
|
|
11495
|
-
// node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/index.js
|
|
11496
|
-
var require_src = __commonJS({
|
|
11497
|
-
"node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/index.js"(exports, module) {
|
|
11498
|
-
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
|
|
11499
|
-
module.exports = require_browser();
|
|
11500
|
-
} else {
|
|
11501
|
-
module.exports = require_node();
|
|
11502
|
-
}
|
|
11503
|
-
}
|
|
11504
|
-
});
|
|
11505
|
-
|
|
11506
10743
|
// node_modules/.pnpm/follow-redirects@1.16.0/node_modules/follow-redirects/debug.js
|
|
11507
10744
|
var require_debug = __commonJS({
|
|
11508
10745
|
"node_modules/.pnpm/follow-redirects@1.16.0/node_modules/follow-redirects/debug.js"(exports, module) {
|
|
@@ -11510,7 +10747,7 @@ var require_debug = __commonJS({
|
|
|
11510
10747
|
module.exports = function() {
|
|
11511
10748
|
if (!debug) {
|
|
11512
10749
|
try {
|
|
11513
|
-
debug =
|
|
10750
|
+
debug = __require("debug")("follow-redirects");
|
|
11514
10751
|
} catch (error) {
|
|
11515
10752
|
}
|
|
11516
10753
|
if (typeof debug !== "function") {
|
|
@@ -117754,7 +116991,7 @@ var require_canvas = __commonJS({
|
|
|
117754
116991
|
});
|
|
117755
116992
|
|
|
117756
116993
|
// node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/browser.js
|
|
117757
|
-
var
|
|
116994
|
+
var require_browser = __commonJS({
|
|
117758
116995
|
"node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/browser.js"(exports) {
|
|
117759
116996
|
var canPromise = require_can_promise();
|
|
117760
116997
|
var QRCode2 = require_qrcode();
|
|
@@ -117901,7 +117138,7 @@ var require_server = __commonJS({
|
|
|
117901
117138
|
}
|
|
117902
117139
|
}
|
|
117903
117140
|
exports.create = QRCode2.create;
|
|
117904
|
-
exports.toCanvas =
|
|
117141
|
+
exports.toCanvas = require_browser().toCanvas;
|
|
117905
117142
|
exports.toString = function toString3(text, opts, cb) {
|
|
117906
117143
|
const params = checkParams(text, opts, cb);
|
|
117907
117144
|
const type2 = params.opts ? params.opts.type : void 0;
|
|
@@ -124829,6 +124066,9 @@ import path from "node:path";
|
|
|
124829
124066
|
|
|
124830
124067
|
// src/responseSurface.ts
|
|
124831
124068
|
var NonEmptyString = external_exports.string().trim().min(1);
|
|
124069
|
+
var CardKitMentionUserIdSchema = NonEmptyString.max(128).regex(/^[A-Za-z0-9_:-]+$/, {
|
|
124070
|
+
message: "mention user_id must contain only letters, numbers, underscore, colon, or hyphen"
|
|
124071
|
+
});
|
|
124832
124072
|
function defaultResponseSurfacePrototypeConfig() {
|
|
124833
124073
|
return {
|
|
124834
124074
|
enabled: true,
|
|
@@ -124838,6 +124078,7 @@ function defaultResponseSurfacePrototypeConfig() {
|
|
|
124838
124078
|
post_outbound_enabled: true,
|
|
124839
124079
|
cardkit_streaming_enabled: true,
|
|
124840
124080
|
allow_agent_mentions: true,
|
|
124081
|
+
denied_mention_open_ids: [],
|
|
124841
124082
|
allowed_mention_open_ids: []
|
|
124842
124083
|
};
|
|
124843
124084
|
}
|
|
@@ -124850,6 +124091,7 @@ var responseSurfacePrototypeConfigDefaults = () => ({
|
|
|
124850
124091
|
post_outbound_enabled: true,
|
|
124851
124092
|
cardkit_streaming_enabled: true,
|
|
124852
124093
|
allow_agent_mentions: true,
|
|
124094
|
+
denied_mention_open_ids: [],
|
|
124853
124095
|
allowed_mention_open_ids: []
|
|
124854
124096
|
});
|
|
124855
124097
|
var ResponseSurfaceModeSchema = external_exports.enum(["card", "post", "hybrid"]);
|
|
@@ -124862,7 +124104,7 @@ var ResponseSurfaceCapabilitySchema = external_exports.enum([
|
|
|
124862
124104
|
"audit"
|
|
124863
124105
|
]);
|
|
124864
124106
|
var MentionTargetSchema = external_exports.object({
|
|
124865
|
-
user_id:
|
|
124107
|
+
user_id: CardKitMentionUserIdSchema,
|
|
124866
124108
|
label: external_exports.string().trim().min(1).max(80).optional()
|
|
124867
124109
|
});
|
|
124868
124110
|
var ResponseSurfacePostSchema = external_exports.object({
|
|
@@ -124873,7 +124115,7 @@ var ResponseSurfaceCardSchema = external_exports.object({
|
|
|
124873
124115
|
capabilities: external_exports.array(ResponseSurfaceCapabilitySchema).max(8).default([])
|
|
124874
124116
|
});
|
|
124875
124117
|
var StrictResponseSurfaceStateSchema = external_exports.object({
|
|
124876
|
-
mode: ResponseSurfaceModeSchema,
|
|
124118
|
+
mode: ResponseSurfaceModeSchema.optional().default("card"),
|
|
124877
124119
|
primary: ResponseSurfacePrimarySchema.optional(),
|
|
124878
124120
|
post: ResponseSurfacePostSchema.optional(),
|
|
124879
124121
|
card: ResponseSurfaceCardSchema.optional()
|
|
@@ -124888,9 +124130,18 @@ var StrictResponseSurfaceStateSchema = external_exports.object({
|
|
|
124888
124130
|
});
|
|
124889
124131
|
var ResponseSurfaceStateSchema = external_exports.preprocess((value) => {
|
|
124890
124132
|
if (value === void 0) return void 0;
|
|
124891
|
-
|
|
124892
|
-
return result.success ? result.data : void 0;
|
|
124133
|
+
return parseResponseSurfaceState(value).state;
|
|
124893
124134
|
}, StrictResponseSurfaceStateSchema.optional());
|
|
124135
|
+
function parseResponseSurfaceState(value) {
|
|
124136
|
+
const result = StrictResponseSurfaceStateSchema.safeParse(value);
|
|
124137
|
+
if (result.success) return { state: result.data, diagnostics: [] };
|
|
124138
|
+
return {
|
|
124139
|
+
diagnostics: result.error.issues.map((issue) => {
|
|
124140
|
+
const path25 = issue.path.length > 0 ? issue.path.join(".") : "<root>";
|
|
124141
|
+
return `${path25}: ${issue.message}`;
|
|
124142
|
+
})
|
|
124143
|
+
};
|
|
124144
|
+
}
|
|
124894
124145
|
var ResponseSurfacePrototypeConfigSchema = external_exports.object({
|
|
124895
124146
|
/**
|
|
124896
124147
|
* Master gate. Default true makes response surfaces available unless the
|
|
@@ -124931,10 +124182,16 @@ var ResponseSurfacePrototypeConfigSchema = external_exports.object({
|
|
|
124931
124182
|
*/
|
|
124932
124183
|
allow_agent_mentions: external_exports.boolean().default(true),
|
|
124933
124184
|
/**
|
|
124934
|
-
* Optional
|
|
124935
|
-
* may choose mention targets
|
|
124185
|
+
* Optional deny-list for Agent-authored @ mentions. Empty means the Agent
|
|
124186
|
+
* may choose mention targets, except broadcast aliases such as @all.
|
|
124936
124187
|
* Keep real IDs in private bot config, never in public docs/tests.
|
|
124937
124188
|
*/
|
|
124189
|
+
denied_mention_open_ids: external_exports.array(external_exports.string().min(1)).default([]),
|
|
124190
|
+
/**
|
|
124191
|
+
* Deprecated compatibility field. It is still parsed so older private
|
|
124192
|
+
* configs do not fail, but mention policy is deny-list/default-allow.
|
|
124193
|
+
* Use denied_mention_open_ids for new restrictions.
|
|
124194
|
+
*/
|
|
124938
124195
|
allowed_mention_open_ids: external_exports.array(external_exports.string().min(1)).default([])
|
|
124939
124196
|
}).default(responseSurfacePrototypeConfigDefaults);
|
|
124940
124197
|
|
|
@@ -129392,8 +128649,24 @@ import { readFile as readFile10, access as access9 } from "node:fs/promises";
|
|
|
129392
128649
|
import "node:module";
|
|
129393
128650
|
import path17 from "node:path";
|
|
129394
128651
|
var DEFAULT_NPM_PACKAGE_SPEC = "larkway@latest";
|
|
129395
|
-
|
|
129396
|
-
|
|
128652
|
+
var UPDATE_REQUIRE_EXPLICIT_HINT = "Refusing to install `larkway@latest` without explicit approval. Use `larkway update --package larkway@<version>`, `LARKWAY_UPDATE_URL=<trusted-spec> larkway update`, or `larkway update --latest` if you intentionally want npm latest.";
|
|
128653
|
+
function readFlagValue(args, flag) {
|
|
128654
|
+
const idx = args.indexOf(flag);
|
|
128655
|
+
if (idx === -1) return void 0;
|
|
128656
|
+
const value = args[idx + 1];
|
|
128657
|
+
if (!value || value.startsWith("--")) return null;
|
|
128658
|
+
return value;
|
|
128659
|
+
}
|
|
128660
|
+
function resolveNpmPackageSpec(args) {
|
|
128661
|
+
const envSpec = process.env["LARKWAY_UPDATE_URL"];
|
|
128662
|
+
if (envSpec && envSpec.trim()) return { packageSpec: envSpec.trim() };
|
|
128663
|
+
const packageArg = readFlagValue(args, "--package");
|
|
128664
|
+
if (packageArg === null) {
|
|
128665
|
+
return { error: "`--package` requires an npm-installable spec, e.g. `larkway@0.3.30`." };
|
|
128666
|
+
}
|
|
128667
|
+
if (packageArg) return { packageSpec: packageArg };
|
|
128668
|
+
if (args.includes("--latest")) return { packageSpec: DEFAULT_NPM_PACKAGE_SPEC };
|
|
128669
|
+
return { error: UPDATE_REQUIRE_EXPLICIT_HINT };
|
|
129397
128670
|
}
|
|
129398
128671
|
function buildNpmSteps(packageSpec, cwd) {
|
|
129399
128672
|
return [
|
|
@@ -129554,8 +128827,17 @@ async function run7(ctx, args) {
|
|
|
129554
128827
|
const { ui, flags, cwd } = ctx;
|
|
129555
128828
|
const isDryRun = args.includes("--dry-run");
|
|
129556
128829
|
const forceGitPull = args.includes("--git-pull");
|
|
129557
|
-
const packageSpec = resolveNpmPackageSpec();
|
|
129558
128830
|
if (!forceGitPull) {
|
|
128831
|
+
const resolved = resolveNpmPackageSpec(args);
|
|
128832
|
+
if (resolved.error) {
|
|
128833
|
+
if (flags.json) {
|
|
128834
|
+
ui.emitJson({ ok: false, error: resolved.error });
|
|
128835
|
+
} else {
|
|
128836
|
+
ui.failure(resolved.error);
|
|
128837
|
+
}
|
|
128838
|
+
return 1;
|
|
128839
|
+
}
|
|
128840
|
+
const packageSpec = resolved.packageSpec ?? DEFAULT_NPM_PACKAGE_SPEC;
|
|
129559
128841
|
const npmSteps = buildNpmSteps(packageSpec, cwd);
|
|
129560
128842
|
const lifecycleLabels2 = /* @__PURE__ */ new Set(["larkway stop (bridge lifecycle)", "larkway start (bridge lifecycle)"]);
|
|
129561
128843
|
if (isDryRun) {
|
|
@@ -129610,7 +128892,7 @@ async function run7(ctx, args) {
|
|
|
129610
128892
|
if (hadWarning2) {
|
|
129611
128893
|
ui.success("larkway update \u5B8C\u6210,\u4F46 bridge \u9700\u624B\u52A8\u91CD\u542F(\u8BF7\u8FD0\u884C `larkway start`)\u3002");
|
|
129612
128894
|
} else {
|
|
129613
|
-
ui.success("larkway update \u5B8C\u6210\u3002\u5DF2\u5347\u7EA7\
|
|
128895
|
+
ui.success("larkway update \u5B8C\u6210\u3002\u5DF2\u5347\u7EA7\u6307\u5B9A npm package,bridge \u5DF2\u91CD\u542F\u3002");
|
|
129614
128896
|
}
|
|
129615
128897
|
}
|
|
129616
128898
|
return 0;
|