@ruan-cat/utils 1.3.2 → 1.3.4
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/index.global.js +46 -55
- package/dist/index.global.js.map +1 -1
- package/package.json +7 -6
package/dist/index.global.js
CHANGED
|
@@ -34231,7 +34231,7 @@ const ${helpers.map((s) => `_${helperNameMap[s]} = ${helperNameMap[s]}`).join(",
|
|
|
34231
34231
|
function unref2(ref22) {
|
|
34232
34232
|
return isRef2(ref22) ? ref22.value : ref22;
|
|
34233
34233
|
}
|
|
34234
|
-
function
|
|
34234
|
+
function toValue(source) {
|
|
34235
34235
|
return shared.isFunction(source) ? source() : unref2(source);
|
|
34236
34236
|
}
|
|
34237
34237
|
var shallowUnwrapHandlers = {
|
|
@@ -34630,7 +34630,7 @@ const ${helpers.map((s) => `_${helperNameMap[s]} = ${helperNameMap[s]}`).join(",
|
|
|
34630
34630
|
exports2.toReadonly = toReadonly;
|
|
34631
34631
|
exports2.toRef = toRef;
|
|
34632
34632
|
exports2.toRefs = toRefs;
|
|
34633
|
-
exports2.toValue =
|
|
34633
|
+
exports2.toValue = toValue;
|
|
34634
34634
|
exports2.track = track;
|
|
34635
34635
|
exports2.traverse = traverse;
|
|
34636
34636
|
exports2.trigger = trigger;
|
|
@@ -36062,7 +36062,7 @@ const ${helpers.map((s) => `_${helperNameMap[s]} = ${helperNameMap[s]}`).join(",
|
|
|
36062
36062
|
function unref2(ref22) {
|
|
36063
36063
|
return isRef2(ref22) ? ref22.value : ref22;
|
|
36064
36064
|
}
|
|
36065
|
-
function
|
|
36065
|
+
function toValue(source) {
|
|
36066
36066
|
return shared.isFunction(source) ? source() : unref2(source);
|
|
36067
36067
|
}
|
|
36068
36068
|
var shallowUnwrapHandlers = {
|
|
@@ -36492,7 +36492,7 @@ const ${helpers.map((s) => `_${helperNameMap[s]} = ${helperNameMap[s]}`).join(",
|
|
|
36492
36492
|
exports2.toReadonly = toReadonly;
|
|
36493
36493
|
exports2.toRef = toRef;
|
|
36494
36494
|
exports2.toRefs = toRefs;
|
|
36495
|
-
exports2.toValue =
|
|
36495
|
+
exports2.toValue = toValue;
|
|
36496
36496
|
exports2.track = track;
|
|
36497
36497
|
exports2.traverse = traverse;
|
|
36498
36498
|
exports2.trigger = trigger;
|
|
@@ -64888,9 +64888,9 @@ ${codeFrame}` : message);
|
|
|
64888
64888
|
}
|
|
64889
64889
|
});
|
|
64890
64890
|
|
|
64891
|
-
// ../../node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/common.js
|
|
64891
|
+
// ../../node_modules/.pnpm/debug@4.4.0_supports-color@5.5.0/node_modules/debug/src/common.js
|
|
64892
64892
|
var require_common = __commonJS({
|
|
64893
|
-
"../../node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/common.js"(exports2, module2) {
|
|
64893
|
+
"../../node_modules/.pnpm/debug@4.4.0_supports-color@5.5.0/node_modules/debug/src/common.js"(exports2, module2) {
|
|
64894
64894
|
"use strict";
|
|
64895
64895
|
function setup(env) {
|
|
64896
64896
|
createDebug.debug = createDebug;
|
|
@@ -65066,9 +65066,9 @@ ${codeFrame}` : message);
|
|
|
65066
65066
|
}
|
|
65067
65067
|
});
|
|
65068
65068
|
|
|
65069
|
-
// ../../node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/browser.js
|
|
65069
|
+
// ../../node_modules/.pnpm/debug@4.4.0_supports-color@5.5.0/node_modules/debug/src/browser.js
|
|
65070
65070
|
var require_browser = __commonJS({
|
|
65071
|
-
"../../node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/browser.js"(exports2, module2) {
|
|
65071
|
+
"../../node_modules/.pnpm/debug@4.4.0_supports-color@5.5.0/node_modules/debug/src/browser.js"(exports2, module2) {
|
|
65072
65072
|
"use strict";
|
|
65073
65073
|
exports2.formatArgs = formatArgs;
|
|
65074
65074
|
exports2.save = save;
|
|
@@ -65237,41 +65237,35 @@ ${codeFrame}` : message);
|
|
|
65237
65237
|
}
|
|
65238
65238
|
});
|
|
65239
65239
|
|
|
65240
|
-
// ../../node_modules/.pnpm/has-flag@
|
|
65240
|
+
// ../../node_modules/.pnpm/has-flag@3.0.0/node_modules/has-flag/index.js
|
|
65241
65241
|
var require_has_flag = __commonJS({
|
|
65242
|
-
"../../node_modules/.pnpm/has-flag@
|
|
65242
|
+
"../../node_modules/.pnpm/has-flag@3.0.0/node_modules/has-flag/index.js"(exports2, module2) {
|
|
65243
65243
|
"use strict";
|
|
65244
|
-
module2.exports = (flag, argv
|
|
65244
|
+
module2.exports = (flag, argv) => {
|
|
65245
|
+
argv = argv || process.argv;
|
|
65245
65246
|
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
65246
|
-
const
|
|
65247
|
-
const
|
|
65248
|
-
return
|
|
65247
|
+
const pos = argv.indexOf(prefix + flag);
|
|
65248
|
+
const terminatorPos = argv.indexOf("--");
|
|
65249
|
+
return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
|
|
65249
65250
|
};
|
|
65250
65251
|
}
|
|
65251
65252
|
});
|
|
65252
65253
|
|
|
65253
|
-
// ../../node_modules/.pnpm/supports-color@
|
|
65254
|
+
// ../../node_modules/.pnpm/supports-color@5.5.0/node_modules/supports-color/index.js
|
|
65254
65255
|
var require_supports_color = __commonJS({
|
|
65255
|
-
"../../node_modules/.pnpm/supports-color@
|
|
65256
|
+
"../../node_modules/.pnpm/supports-color@5.5.0/node_modules/supports-color/index.js"(exports2, module2) {
|
|
65256
65257
|
"use strict";
|
|
65257
65258
|
var os = __require("os");
|
|
65258
|
-
var tty = __require("tty");
|
|
65259
65259
|
var hasFlag = require_has_flag();
|
|
65260
|
-
var
|
|
65260
|
+
var env = process.env;
|
|
65261
65261
|
var forceColor;
|
|
65262
|
-
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")
|
|
65263
|
-
forceColor =
|
|
65262
|
+
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) {
|
|
65263
|
+
forceColor = false;
|
|
65264
65264
|
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
65265
|
-
forceColor =
|
|
65265
|
+
forceColor = true;
|
|
65266
65266
|
}
|
|
65267
65267
|
if ("FORCE_COLOR" in env) {
|
|
65268
|
-
|
|
65269
|
-
forceColor = 1;
|
|
65270
|
-
} else if (env.FORCE_COLOR === "false") {
|
|
65271
|
-
forceColor = 0;
|
|
65272
|
-
} else {
|
|
65273
|
-
forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
|
|
65274
|
-
}
|
|
65268
|
+
forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
|
|
65275
65269
|
}
|
|
65276
65270
|
function translateLevel(level) {
|
|
65277
65271
|
if (level === 0) {
|
|
@@ -65284,8 +65278,8 @@ ${codeFrame}` : message);
|
|
|
65284
65278
|
has16m: level >= 3
|
|
65285
65279
|
};
|
|
65286
65280
|
}
|
|
65287
|
-
function supportsColor(
|
|
65288
|
-
if (forceColor ===
|
|
65281
|
+
function supportsColor(stream4) {
|
|
65282
|
+
if (forceColor === false) {
|
|
65289
65283
|
return 0;
|
|
65290
65284
|
}
|
|
65291
65285
|
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
@@ -65294,22 +65288,19 @@ ${codeFrame}` : message);
|
|
|
65294
65288
|
if (hasFlag("color=256")) {
|
|
65295
65289
|
return 2;
|
|
65296
65290
|
}
|
|
65297
|
-
if (
|
|
65291
|
+
if (stream4 && !stream4.isTTY && forceColor !== true) {
|
|
65298
65292
|
return 0;
|
|
65299
65293
|
}
|
|
65300
|
-
const min = forceColor
|
|
65301
|
-
if (env.TERM === "dumb") {
|
|
65302
|
-
return min;
|
|
65303
|
-
}
|
|
65294
|
+
const min = forceColor ? 1 : 0;
|
|
65304
65295
|
if (process.platform === "win32") {
|
|
65305
65296
|
const osRelease = os.release().split(".");
|
|
65306
|
-
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
65297
|
+
if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
65307
65298
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
65308
65299
|
}
|
|
65309
65300
|
return 1;
|
|
65310
65301
|
}
|
|
65311
65302
|
if ("CI" in env) {
|
|
65312
|
-
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"
|
|
65303
|
+
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
|
|
65313
65304
|
return 1;
|
|
65314
65305
|
}
|
|
65315
65306
|
return min;
|
|
@@ -65338,23 +65329,26 @@ ${codeFrame}` : message);
|
|
|
65338
65329
|
if ("COLORTERM" in env) {
|
|
65339
65330
|
return 1;
|
|
65340
65331
|
}
|
|
65332
|
+
if (env.TERM === "dumb") {
|
|
65333
|
+
return min;
|
|
65334
|
+
}
|
|
65341
65335
|
return min;
|
|
65342
65336
|
}
|
|
65343
65337
|
function getSupportLevel(stream4) {
|
|
65344
|
-
const level = supportsColor(stream4
|
|
65338
|
+
const level = supportsColor(stream4);
|
|
65345
65339
|
return translateLevel(level);
|
|
65346
65340
|
}
|
|
65347
65341
|
module2.exports = {
|
|
65348
65342
|
supportsColor: getSupportLevel,
|
|
65349
|
-
stdout:
|
|
65350
|
-
stderr:
|
|
65343
|
+
stdout: getSupportLevel(process.stdout),
|
|
65344
|
+
stderr: getSupportLevel(process.stderr)
|
|
65351
65345
|
};
|
|
65352
65346
|
}
|
|
65353
65347
|
});
|
|
65354
65348
|
|
|
65355
|
-
// ../../node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/node.js
|
|
65349
|
+
// ../../node_modules/.pnpm/debug@4.4.0_supports-color@5.5.0/node_modules/debug/src/node.js
|
|
65356
65350
|
var require_node = __commonJS({
|
|
65357
|
-
"../../node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/node.js"(exports2, module2) {
|
|
65351
|
+
"../../node_modules/.pnpm/debug@4.4.0_supports-color@5.5.0/node_modules/debug/src/node.js"(exports2, module2) {
|
|
65358
65352
|
"use strict";
|
|
65359
65353
|
var tty = __require("tty");
|
|
65360
65354
|
var util3 = __require("util");
|
|
@@ -65527,9 +65521,9 @@ ${codeFrame}` : message);
|
|
|
65527
65521
|
}
|
|
65528
65522
|
});
|
|
65529
65523
|
|
|
65530
|
-
// ../../node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/index.js
|
|
65524
|
+
// ../../node_modules/.pnpm/debug@4.4.0_supports-color@5.5.0/node_modules/debug/src/index.js
|
|
65531
65525
|
var require_src = __commonJS({
|
|
65532
|
-
"../../node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/index.js"(exports2, module2) {
|
|
65526
|
+
"../../node_modules/.pnpm/debug@4.4.0_supports-color@5.5.0/node_modules/debug/src/index.js"(exports2, module2) {
|
|
65533
65527
|
"use strict";
|
|
65534
65528
|
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
|
|
65535
65529
|
module2.exports = require_browser();
|
|
@@ -66984,10 +66978,7 @@ ${codeFrame}` : message);
|
|
|
66984
66978
|
var vue_exports = {};
|
|
66985
66979
|
__reExport(vue_exports, __toESM(require_vue(), 1));
|
|
66986
66980
|
|
|
66987
|
-
// ../../node_modules/.pnpm/@vueuse+shared@12.
|
|
66988
|
-
function toValue(r) {
|
|
66989
|
-
return typeof r === "function" ? r() : (0, vue_exports.unref)(r);
|
|
66990
|
-
}
|
|
66981
|
+
// ../../node_modules/.pnpm/@vueuse+shared@12.3.0_typescript@5.7.2/node_modules/@vueuse/shared/index.mjs
|
|
66991
66982
|
var isWorker = typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
|
|
66992
66983
|
var noop = () => {
|
|
66993
66984
|
};
|
|
@@ -67037,7 +67028,7 @@ ${codeFrame}` : message);
|
|
|
67037
67028
|
const promises = [watcher];
|
|
67038
67029
|
if (timeout != null) {
|
|
67039
67030
|
promises.push(
|
|
67040
|
-
promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => stop == null ? void 0 : stop())
|
|
67031
|
+
promiseTimeout(timeout, throwOnTimeout).then(() => (0, vue_exports.toValue)(r)).finally(() => stop == null ? void 0 : stop())
|
|
67041
67032
|
);
|
|
67042
67033
|
}
|
|
67043
67034
|
return Promise.race(promises);
|
|
@@ -67069,9 +67060,9 @@ ${codeFrame}` : message);
|
|
|
67069
67060
|
const promises = [watcher];
|
|
67070
67061
|
if (timeout != null) {
|
|
67071
67062
|
promises.push(
|
|
67072
|
-
promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => {
|
|
67063
|
+
promiseTimeout(timeout, throwOnTimeout).then(() => (0, vue_exports.toValue)(r)).finally(() => {
|
|
67073
67064
|
stop == null ? void 0 : stop();
|
|
67074
|
-
return toValue(r);
|
|
67065
|
+
return (0, vue_exports.toValue)(r);
|
|
67075
67066
|
})
|
|
67076
67067
|
);
|
|
67077
67068
|
}
|
|
@@ -67092,7 +67083,7 @@ ${codeFrame}` : message);
|
|
|
67092
67083
|
function toContains(value, options) {
|
|
67093
67084
|
return toMatch((v) => {
|
|
67094
67085
|
const array = Array.from(v);
|
|
67095
|
-
return array.includes(value) || array.includes(toValue(value));
|
|
67086
|
+
return array.includes(value) || array.includes((0, vue_exports.toValue)(value));
|
|
67096
67087
|
}, options);
|
|
67097
67088
|
}
|
|
67098
67089
|
function changed(options) {
|
|
@@ -67105,7 +67096,7 @@ ${codeFrame}` : message);
|
|
|
67105
67096
|
return count >= n;
|
|
67106
67097
|
}, options);
|
|
67107
67098
|
}
|
|
67108
|
-
if (Array.isArray(toValue(r))) {
|
|
67099
|
+
if (Array.isArray((0, vue_exports.toValue)(r))) {
|
|
67109
67100
|
const instance = {
|
|
67110
67101
|
toMatch,
|
|
67111
67102
|
toContains,
|
|
@@ -70423,7 +70414,7 @@ ${codeFrame}` : message);
|
|
|
70423
70414
|
mergeConfig: mergeConfig2
|
|
70424
70415
|
} = axios_default;
|
|
70425
70416
|
|
|
70426
|
-
// ../../node_modules/.pnpm/@vueuse+integrations@12.
|
|
70417
|
+
// ../../node_modules/.pnpm/@vueuse+integrations@12.3.0_axios@1.7.9_change-case@5.4.4_focus-trap@7.6.2_qrcode@1.5.4_typescript@5.7.2/node_modules/@vueuse/integrations/useAxios.mjs
|
|
70427
70418
|
function useAxios(...args) {
|
|
70428
70419
|
const url2 = typeof args[0] === "string" ? args[0] : void 0;
|
|
70429
70420
|
const argsPlaceholder = typeof url2 === "string" ? 1 : 0;
|
|
@@ -70450,13 +70441,13 @@ ${codeFrame}` : message);
|
|
|
70450
70441
|
options = args[args.length - 1] || defaultOptions;
|
|
70451
70442
|
}
|
|
70452
70443
|
const {
|
|
70453
|
-
initialData,
|
|
70454
70444
|
shallow,
|
|
70455
70445
|
onSuccess = noop,
|
|
70456
70446
|
onError = noop,
|
|
70457
70447
|
immediate,
|
|
70458
70448
|
resetOnExecute = false
|
|
70459
70449
|
} = options;
|
|
70450
|
+
const initialData = options.initialData;
|
|
70460
70451
|
const response = (0, vue_exports.shallowRef)();
|
|
70461
70452
|
const data = (shallow ? vue_exports.shallowRef : vue_exports.ref)(initialData);
|
|
70462
70453
|
const isFinished = (0, vue_exports.ref)(false);
|