@unicom-cloud/utils 0.1.25 → 0.1.27
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/axios/chunk/BJvTEV6n.js +253 -0
- package/axios/chunk/CB3wlosT.js +64 -0
- package/axios/index.d.ts +796 -0
- package/axios/index.js +43 -0
- package/axios/lib/axios.js +1635 -0
- package/axios/lib/utils.js +5 -0
- package/axios/mock-adapter/index.d.ts +59 -0
- package/axios/mock-adapter/index.js +205 -0
- package/axios/mock-adapter/request.js +50 -0
- package/axios/mock-adapter/utils.js +130 -0
- package/case-name/index.js +1 -1
- package/caseName.js +1 -1
- package/class-name/index.js +1 -1
- package/className.js +1 -1
- package/clipboard-copy/index.js +1 -1
- package/clipboardCopy.js +1 -1
- package/constant/address.js +1 -1
- package/constant/chineseCharacters.js +1 -1
- package/constant/constellations.js +1 -1
- package/constant/domain.js +1 -1
- package/constant/emoji.js +1 -1
- package/constant/identity.js +1 -1
- package/constant/index.js +1 -1
- package/constant/keyboardCode.js +1 -1
- package/constant/licensePlate.js +1 -1
- package/constant/name.js +1 -1
- package/constant/platform.js +16 -17
- package/constant/protocol.js +1 -1
- package/constant/ui.js +16 -16
- package/constant.js +1 -1
- package/content-disposition/index.js +1 -1
- package/contentDisposition.js +1 -1
- package/cookie/index.js +1 -1
- package/cookie/src/index.js +1 -1
- package/cookie.js +1 -1
- package/date/convertTime.js +1 -1
- package/date/convertToDuration.js +1 -1
- package/date/index.js +1 -1
- package/date.js +1 -1
- package/decimal/decimal.js +1 -8
- package/decimal/index.js +1 -1
- package/decimal.js +1 -1
- package/dom-helpers/activeElement.js +1 -1
- package/dom-helpers/addClass.js +1 -1
- package/dom-helpers/addEventListener.js +1 -1
- package/dom-helpers/animate.js +1 -1
- package/dom-helpers/animationFrame.js +1 -1
- package/dom-helpers/attribute.js +1 -1
- package/dom-helpers/camelize.js +1 -1
- package/dom-helpers/camelizeStyle.js +1 -1
- package/dom-helpers/canUseDOM.js +1 -1
- package/dom-helpers/childElements.js +1 -1
- package/dom-helpers/childNodes.js +1 -1
- package/dom-helpers/clear.js +1 -1
- package/dom-helpers/closest.js +1 -1
- package/dom-helpers/collectElements.js +1 -1
- package/dom-helpers/collectSiblings.js +1 -1
- package/dom-helpers/contains.js +1 -1
- package/dom-helpers/css.js +1 -1
- package/dom-helpers/filterEventHandler.js +1 -1
- package/dom-helpers/getComputedStyle.js +1 -1
- package/dom-helpers/getScrollAccessor.js +1 -1
- package/dom-helpers/hasClass.js +1 -1
- package/dom-helpers/height.js +1 -1
- package/dom-helpers/hyphenate.js +1 -1
- package/dom-helpers/hyphenateStyle.js +1 -1
- package/dom-helpers/index.js +1 -1
- package/dom-helpers/insertAfter.js +1 -1
- package/dom-helpers/isDocument.js +1 -1
- package/dom-helpers/isInput.js +1 -1
- package/dom-helpers/isTransform.js +1 -1
- package/dom-helpers/isVisible.js +1 -1
- package/dom-helpers/isWindow.js +1 -1
- package/dom-helpers/listen.js +1 -1
- package/dom-helpers/matches.js +1 -1
- package/dom-helpers/nextUntil.js +1 -1
- package/dom-helpers/offset.js +1 -1
- package/dom-helpers/offsetParent.js +1 -1
- package/dom-helpers/ownerDocument.js +1 -1
- package/dom-helpers/ownerWindow.js +1 -1
- package/dom-helpers/parents.js +1 -1
- package/dom-helpers/position.js +1 -1
- package/dom-helpers/prepend.js +1 -1
- package/dom-helpers/querySelectorAll.js +1 -1
- package/dom-helpers/reflow.js +1 -1
- package/dom-helpers/remove.js +1 -1
- package/dom-helpers/removeClass.js +1 -1
- package/dom-helpers/removeEventListener.js +1 -1
- package/dom-helpers/scrollLeft.js +1 -1
- package/dom-helpers/scrollParent.js +1 -1
- package/dom-helpers/scrollTo.js +1 -1
- package/dom-helpers/scrollTop.js +1 -1
- package/dom-helpers/scrollbarSize.js +1 -1
- package/dom-helpers/siblings.js +1 -1
- package/dom-helpers/text.js +1 -1
- package/dom-helpers/toggleClass.js +1 -1
- package/dom-helpers/transitionEnd.js +1 -1
- package/dom-helpers/triggerEvent.js +1 -1
- package/dom-helpers/types.js +1 -1
- package/dom-helpers/width.js +1 -1
- package/domHelpers.js +1 -1
- package/emitter/index.js +1 -1
- package/emitter/src/index.js +1 -1
- package/emitter.js +1 -1
- package/file/fileToURL.js +1 -1
- package/file/index.js +1 -1
- package/file/saveAs.js +1 -1
- package/file.js +1 -1
- package/idb/index.js +1 -1
- package/idb.js +1 -1
- package/index.js +1 -1
- package/invariant/index.js +1 -1
- package/invariant.js +1 -1
- package/is/index.js +140 -123
- package/is.js +77 -76
- package/js-cookie/index.js +1 -1
- package/js-cookie/src/api.js +1 -1
- package/js-cookie/src/assign.js +1 -1
- package/js-cookie/src/converter.js +1 -1
- package/jsCookie.js +1 -1
- package/lunar/index.js +1 -1
- package/lunar/lib/Holiday.js +1 -1
- package/lunar/lib/HolidayUtil.js +1 -1
- package/lunar/lib/I18n.js +1 -1
- package/lunar/lib/JieQi.js +1 -1
- package/lunar/lib/Lunar.js +1 -1
- package/lunar/lib/LunarMonth.js +1 -1
- package/lunar/lib/LunarTime.js +1 -1
- package/lunar/lib/LunarUtil.js +1 -1
- package/lunar/lib/LunarYear.js +1 -1
- package/lunar/lib/ShouXingUtil.js +1 -1
- package/lunar/lib/Solar.js +1 -1
- package/lunar/lib/SolarHalfYear.js +1 -1
- package/lunar/lib/SolarMonth.js +1 -1
- package/lunar/lib/SolarSeason.js +1 -1
- package/lunar/lib/SolarUtil.js +1 -1
- package/lunar/lib/SolarWeek.js +1 -1
- package/lunar/lib/SolarYear.js +1 -1
- package/lunar/lib/index.js +1 -1
- package/lunar.js +1 -1
- package/math/index.js +1 -1
- package/math.js +1 -1
- package/md5/index.js +1 -1
- package/md5.js +1 -1
- package/mock/MockWebSocket.js +1 -1
- package/mock/MockXMLHttpRequest.js +1 -1
- package/mock/index.js +1 -1
- package/mock.js +1 -1
- package/normalize-wheel/ExecutionEnvironment.js +1 -1
- package/normalize-wheel/UserAgent_DEPRECATED.js +1 -1
- package/normalize-wheel/index.js +1 -1
- package/normalize-wheel/isEventSupported.js +1 -15
- package/normalizeWheel.js +1 -1
- package/number-to-chinese/index.js +1 -1
- package/numberToChinese.js +1 -1
- package/nzh/cn.js +1 -1
- package/nzh/hk.js +1 -1
- package/nzh/index.js +1 -1
- package/nzh/nzh.js +1 -1
- package/nzh/src/autoGet.js +1 -1
- package/nzh/src/index.js +1 -1
- package/nzh/src/langs/cn_b.js +1 -1
- package/nzh/src/langs/cn_s.js +1 -1
- package/nzh/src/langs/hk_b.js +1 -1
- package/nzh/src/langs/hk_s.js +1 -1
- package/nzh/src/utils.js +1 -1
- package/nzh.js +1 -1
- package/object-keys-sort/index.js +1 -1
- package/object-prototype-to-string-call/index.js +7 -0
- package/objectKeysSort.js +1 -1
- package/objectPrototypeToStringCall.js +5 -0
- package/package.json +1 -1
- package/pinyin/index.js +1 -1
- package/pinyin/simplified.js +1 -1
- package/pinyin/src/core.js +1 -1
- package/pinyin/src/simplified.js +1 -1
- package/pinyin/src/simplified_dict.js +1 -1
- package/pinyin/src/traditional.js +1 -1
- package/pinyin/src/traditional_dict.js +1 -1
- package/pinyin/traditional.js +1 -1
- package/pinyin.js +1 -1
- package/query-string/base.js +1 -1
- package/query-string/index.js +1 -1
- package/query-string/splitOnFirst.js +1 -1
- package/queryString.js +1 -1
- package/random/address.js +1 -1
- package/random/constellation.js +1 -1
- package/random/image.js +1 -1
- package/random/index.js +1 -1
- package/random/licensePlate.js +1 -1
- package/random/name.js +1 -1
- package/random/number.js +1 -1
- package/random/text.js +12 -11
- package/random/time.js +1 -1
- package/random/web.js +1 -1
- package/random.js +1 -1
- package/screenfull/index.js +21 -20
- package/screenfull.js +4 -3
- package/sleep/index.js +1 -1
- package/sleep.js +1 -1
- package/snapdom/index.js +1 -1
- package/snapdom/src/api/preCache.js +1 -1
- package/snapdom/src/api/snapdom.js +1 -1
- package/snapdom/src/core/cache.js +1 -1
- package/snapdom/src/core/capture.js +1 -1
- package/snapdom/src/core/clone.js +1 -1
- package/snapdom/src/core/context.js +1 -1
- package/snapdom/src/core/plugins.js +1 -1
- package/snapdom/src/core/prepare.js +1 -1
- package/snapdom/src/exporters/download.js +1 -1
- package/snapdom/src/exporters/toBlob.js +1 -1
- package/snapdom/src/exporters/toCanvas.js +1 -1
- package/snapdom/src/exporters/toImg.js +1 -1
- package/snapdom/src/modules/CSSVar.js +1 -1
- package/snapdom/src/modules/background.js +1 -1
- package/snapdom/src/modules/changeCSS.js +1 -1
- package/snapdom/src/modules/counter.js +1 -1
- package/snapdom/src/modules/fonts.js +1 -1
- package/snapdom/src/modules/iconFonts.js +1 -1
- package/snapdom/src/modules/images.js +1 -1
- package/snapdom/src/modules/lineClamp.js +1 -1
- package/snapdom/src/modules/pseudo.js +1 -1
- package/snapdom/src/modules/rasterize.js +1 -1
- package/snapdom/src/modules/snapFetch.js +1 -1
- package/snapdom/src/modules/styles.js +1 -1
- package/snapdom/src/modules/svgDefs.js +1 -1
- package/snapdom/src/utils/browser.js +1 -1
- package/snapdom/src/utils/css.js +1 -1
- package/snapdom/src/utils/helpers.js +1 -1
- package/snapdom/src/utils/image.js +1 -1
- package/snapdom.js +1 -1
- package/tinycolor/index.js +1 -1
- package/tinycolor/src/conversion.js +1 -1
- package/tinycolor/src/css-color-names.js +1 -1
- package/tinycolor/src/format-input.js +1 -1
- package/tinycolor/src/from-ratio.js +1 -1
- package/tinycolor/src/index.js +1 -1
- package/tinycolor/src/random.js +1 -1
- package/tinycolor/src/readability.js +1 -1
- package/tinycolor/src/to-ms-filter.js +1 -1
- package/tinycolor/src/utils.js +1 -1
- package/tinycolor.js +1 -1
- package/tree/index.js +31 -30
- package/tree/search/index.js +1 -1
- package/tree.js +13 -12
- package/tween/index.js +1 -1
- package/tween/src/easing.js +1 -1
- package/tween/src/tween.js +1 -1
- package/tween.js +1 -1
- package/types/constant/platform.d.ts +8 -7
- package/types/is/index.d.ts +16 -16
- package/types/object-prototype-to-string-call/index.d.ts +2 -0
- package/types/validate/src/locale/en-US.d.ts +2 -2
- package/types/validate/src/locale/zh-CN.d.ts +2 -2
- package/ui-color/compareColorByRange.js +1 -1
- package/ui-color/index.js +1 -1
- package/uiColor.js +1 -1
- package/url-toolkit/index.js +1 -1
- package/url-toolkit/src/url-toolkit.js +1 -1
- package/urlToolkit.js +1 -1
- package/validate/index.js +11 -11
- package/validate/src/index.js +1 -1
- package/validate/src/locale/en-US.js +1 -1
- package/validate/src/locale/zh-CN.js +1 -1
- package/validate/src/message.js +3 -3
- package/validate/src/rules/array.js +1 -1
- package/validate/src/rules/base.js +15 -15
- package/validate/src/rules/boolean.js +1 -1
- package/validate/src/rules/custom.js +1 -1
- package/validate/src/rules/number.js +1 -1
- package/validate/src/rules/object.js +1 -1
- package/validate/src/rules/string.js +1 -1
- package/validate/src/rules/type.js +1 -1
- package/validate/src/utils.js +1 -1
- package/validate.js +11 -11
- package/version/index.js +1 -1
- package/version.js +1 -1
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
AxiosAdapter,
|
|
3
|
+
AxiosInstance,
|
|
4
|
+
AxiosRequestConfig,
|
|
5
|
+
} from '../index.js';
|
|
6
|
+
|
|
7
|
+
type CallbackResponseSpecFunc = (
|
|
8
|
+
config: AxiosRequestConfig,
|
|
9
|
+
) => any[] | Promise<any[]>;
|
|
10
|
+
|
|
11
|
+
type ResponseSpecFunc = (
|
|
12
|
+
statusOrCallback: number | CallbackResponseSpecFunc,
|
|
13
|
+
data?: any,
|
|
14
|
+
headers?: any,
|
|
15
|
+
) => MockAdapter;
|
|
16
|
+
|
|
17
|
+
interface RequestHandler {
|
|
18
|
+
reply: ResponseSpecFunc;
|
|
19
|
+
replyOnce: ResponseSpecFunc;
|
|
20
|
+
|
|
21
|
+
passThrough(): void;
|
|
22
|
+
networkError(): void;
|
|
23
|
+
timeout(): void;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
interface MockAdapterOptions {
|
|
27
|
+
delayResponse?: number;
|
|
28
|
+
onNoMatch?: 'passthrough' | 'throwException';
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
interface RequestDataMatcher {
|
|
32
|
+
[index: string]: any;
|
|
33
|
+
params?: {
|
|
34
|
+
[index: string]: any;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
type RequestMatcherFunc = (
|
|
39
|
+
matcher?: string | RegExp,
|
|
40
|
+
body?: string | RequestDataMatcher,
|
|
41
|
+
) => RequestHandler;
|
|
42
|
+
|
|
43
|
+
declare class MockAdapter {
|
|
44
|
+
constructor(axiosInstance: AxiosInstance, options?: MockAdapterOptions);
|
|
45
|
+
|
|
46
|
+
adapter(): AxiosAdapter;
|
|
47
|
+
reset(): void;
|
|
48
|
+
restore(): void;
|
|
49
|
+
|
|
50
|
+
onGet: RequestMatcherFunc;
|
|
51
|
+
onPost: RequestMatcherFunc;
|
|
52
|
+
onPut: RequestMatcherFunc;
|
|
53
|
+
onHead: RequestMatcherFunc;
|
|
54
|
+
onDelete: RequestMatcherFunc;
|
|
55
|
+
onPatch: RequestMatcherFunc;
|
|
56
|
+
onAny: RequestMatcherFunc;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export default MockAdapter;
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
/* 2025-11-07 13:23:48 */
|
|
2
|
+
import { A as E } from "../chunk/BJvTEV6n.js";
|
|
3
|
+
import { request as w } from "./request.js";
|
|
4
|
+
import i from "./utils.js";
|
|
5
|
+
const A = [
|
|
6
|
+
"get",
|
|
7
|
+
"post",
|
|
8
|
+
"head",
|
|
9
|
+
"delete",
|
|
10
|
+
"patch",
|
|
11
|
+
"put",
|
|
12
|
+
"options",
|
|
13
|
+
"list",
|
|
14
|
+
"link",
|
|
15
|
+
"unlink"
|
|
16
|
+
];
|
|
17
|
+
function m() {
|
|
18
|
+
const r = [];
|
|
19
|
+
return A.forEach(function(e) {
|
|
20
|
+
Object.defineProperty(r, e, {
|
|
21
|
+
get() {
|
|
22
|
+
return r.filter(function(n) {
|
|
23
|
+
return !n.method || n.method === e;
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}), r;
|
|
28
|
+
}
|
|
29
|
+
class N {
|
|
30
|
+
constructor(e, n = {
|
|
31
|
+
delayResponse: 27,
|
|
32
|
+
onNoMatch: "passthrough"
|
|
33
|
+
}) {
|
|
34
|
+
if (this.reset(), e)
|
|
35
|
+
this.axiosInstance = e, this.axiosInstanceWithoutInterceptors = e.create ? e.create() : void 0, this.originalAdapter = e.defaults.adapter, this.delayResponse = n.delayResponse > 0 ? n.delayResponse : null, this.onNoMatch = n.onNoMatch || null, e.defaults.adapter = this.adapter();
|
|
36
|
+
else
|
|
37
|
+
throw new Error("Please provide an instance of axios to mock");
|
|
38
|
+
}
|
|
39
|
+
adapter() {
|
|
40
|
+
return (e) => w(this, e);
|
|
41
|
+
}
|
|
42
|
+
restore() {
|
|
43
|
+
this.axiosInstance && (this.axiosInstance.defaults.adapter = this.originalAdapter, this.axiosInstance = void 0);
|
|
44
|
+
}
|
|
45
|
+
reset() {
|
|
46
|
+
this.resetHandlers(), this.resetHistory();
|
|
47
|
+
}
|
|
48
|
+
resetHandlers() {
|
|
49
|
+
this.handlers ? this.handlers.length = 0 : this.handlers = m();
|
|
50
|
+
}
|
|
51
|
+
resetHistory() {
|
|
52
|
+
this.history ? this.history.length = 0 : this.history = m();
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
const R = [
|
|
56
|
+
"any",
|
|
57
|
+
"get",
|
|
58
|
+
"delete",
|
|
59
|
+
"head",
|
|
60
|
+
"options"
|
|
61
|
+
];
|
|
62
|
+
function T(r, e, n) {
|
|
63
|
+
return R.includes(r) ? O(r, e || {}) : O(r, Object.assign({}, n, { data: e }));
|
|
64
|
+
}
|
|
65
|
+
const C = ["headers", "params", "data"];
|
|
66
|
+
function O(r, e) {
|
|
67
|
+
for (const n in e)
|
|
68
|
+
if (!C.includes(n))
|
|
69
|
+
throw new Error(
|
|
70
|
+
`Invalid config property ${JSON.stringify(
|
|
71
|
+
n
|
|
72
|
+
)} provided to ${g(r)}. Config: ${JSON.stringify(
|
|
73
|
+
e
|
|
74
|
+
)}`
|
|
75
|
+
);
|
|
76
|
+
return e;
|
|
77
|
+
}
|
|
78
|
+
function g(r) {
|
|
79
|
+
return `on${r.charAt(0).toUpperCase()}${r.slice(1)}`;
|
|
80
|
+
}
|
|
81
|
+
A.concat("any").forEach(function(r) {
|
|
82
|
+
N.prototype[g(r)] = function(e, n, a) {
|
|
83
|
+
const s = this;
|
|
84
|
+
let d;
|
|
85
|
+
e = e === void 0 ? /.*/ : e;
|
|
86
|
+
const o = T(r, n, a);
|
|
87
|
+
function c(t, u, p) {
|
|
88
|
+
const h = {
|
|
89
|
+
url: e,
|
|
90
|
+
method: r === "any" ? void 0 : r,
|
|
91
|
+
params: o.params,
|
|
92
|
+
data: o.data,
|
|
93
|
+
headers: o.headers,
|
|
94
|
+
replyOnce: !1,
|
|
95
|
+
delay: d,
|
|
96
|
+
response: E.isFunction(t) ? t : [t, u, p]
|
|
97
|
+
};
|
|
98
|
+
return y(r, s.handlers, h), s;
|
|
99
|
+
}
|
|
100
|
+
function x(t) {
|
|
101
|
+
d = t;
|
|
102
|
+
const u = f.reply.bind(f);
|
|
103
|
+
return Object.assign(u, f), u;
|
|
104
|
+
}
|
|
105
|
+
function l(t, u, p) {
|
|
106
|
+
const h = {
|
|
107
|
+
url: e,
|
|
108
|
+
method: r === "any" ? void 0 : r,
|
|
109
|
+
params: o.params,
|
|
110
|
+
data: o.data,
|
|
111
|
+
headers: o.headers,
|
|
112
|
+
replyOnce: !0,
|
|
113
|
+
delay: d,
|
|
114
|
+
response: E.isFunction(t) ? t : [t, u, p]
|
|
115
|
+
};
|
|
116
|
+
return y(r, s.handlers, h), s;
|
|
117
|
+
}
|
|
118
|
+
const f = {
|
|
119
|
+
reply: c,
|
|
120
|
+
replyOnce: l,
|
|
121
|
+
withDelayInMs: x,
|
|
122
|
+
passThrough() {
|
|
123
|
+
const t = {
|
|
124
|
+
passThrough: !0,
|
|
125
|
+
method: r === "any" ? void 0 : r,
|
|
126
|
+
url: e,
|
|
127
|
+
params: o.params,
|
|
128
|
+
data: o.data,
|
|
129
|
+
headers: o.headers
|
|
130
|
+
};
|
|
131
|
+
return y(r, s.handlers, t), s;
|
|
132
|
+
},
|
|
133
|
+
abortRequest() {
|
|
134
|
+
return c(async function(t) {
|
|
135
|
+
throw i.createAxiosError(
|
|
136
|
+
"Request aborted",
|
|
137
|
+
t,
|
|
138
|
+
void 0,
|
|
139
|
+
"ECONNABORTED"
|
|
140
|
+
);
|
|
141
|
+
});
|
|
142
|
+
},
|
|
143
|
+
abortRequestOnce() {
|
|
144
|
+
return l(async function(t) {
|
|
145
|
+
throw i.createAxiosError(
|
|
146
|
+
"Request aborted",
|
|
147
|
+
t,
|
|
148
|
+
void 0,
|
|
149
|
+
"ECONNABORTED"
|
|
150
|
+
);
|
|
151
|
+
});
|
|
152
|
+
},
|
|
153
|
+
networkError() {
|
|
154
|
+
return c(async function(t) {
|
|
155
|
+
throw i.createAxiosError("Network Error", t);
|
|
156
|
+
});
|
|
157
|
+
},
|
|
158
|
+
networkErrorOnce() {
|
|
159
|
+
return l(async function(t) {
|
|
160
|
+
throw i.createAxiosError("Network Error", t);
|
|
161
|
+
});
|
|
162
|
+
},
|
|
163
|
+
timeout() {
|
|
164
|
+
return c(async function(t) {
|
|
165
|
+
throw i.createAxiosError(
|
|
166
|
+
t.timeoutErrorMessage || `timeout of ${t.timeout}ms exceeded`,
|
|
167
|
+
t,
|
|
168
|
+
void 0,
|
|
169
|
+
t.transitional && t.transitional.clarifyTimeoutError ? "ETIMEDOUT" : "ECONNABORTED"
|
|
170
|
+
);
|
|
171
|
+
});
|
|
172
|
+
},
|
|
173
|
+
timeoutOnce() {
|
|
174
|
+
return l(async function(t) {
|
|
175
|
+
throw i.createAxiosError(
|
|
176
|
+
t.timeoutErrorMessage || `timeout of ${t.timeout}ms exceeded`,
|
|
177
|
+
t,
|
|
178
|
+
void 0,
|
|
179
|
+
t.transitional && t.transitional.clarifyTimeoutError ? "ETIMEDOUT" : "ECONNABORTED"
|
|
180
|
+
);
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
return f;
|
|
185
|
+
};
|
|
186
|
+
});
|
|
187
|
+
function M(r, e) {
|
|
188
|
+
let n = -1;
|
|
189
|
+
for (let a = 0; a < r.length; a += 1) {
|
|
190
|
+
const s = r[a], d = s.url instanceof RegExp && e.url instanceof RegExp ? String(s.url) === String(e.url) : s.url === e.url;
|
|
191
|
+
(!s.method || s.method === e.method) && d && i.isEqual(s.params, e.params) && i.isEqual(s.data, e.data) && i.isEqual(s.headers, e.headers) && !s.replyOnce && (n = a);
|
|
192
|
+
}
|
|
193
|
+
return n;
|
|
194
|
+
}
|
|
195
|
+
function y(r, e, n) {
|
|
196
|
+
if (r === "any")
|
|
197
|
+
e.push(n);
|
|
198
|
+
else {
|
|
199
|
+
const a = M(e, n);
|
|
200
|
+
a > -1 && !n.replyOnce ? e.splice(a, 1, n) : e.push(n);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
export {
|
|
204
|
+
N as default
|
|
205
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/* 2025-11-07 13:23:48 */
|
|
2
|
+
import { A as l } from "../chunk/BJvTEV6n.js";
|
|
3
|
+
import a from "./utils.js";
|
|
4
|
+
function u(s, e) {
|
|
5
|
+
let t = e.baseURL;
|
|
6
|
+
return t && !/^https?:/.test(t) && (t = void 0), l.isFunction(s.originalAdapter) ? s.originalAdapter(e) : s.axiosInstanceWithoutInterceptors(
|
|
7
|
+
Object.assign({}, e, {
|
|
8
|
+
baseURL: t,
|
|
9
|
+
// Use the original adapter, not the mock adapter
|
|
10
|
+
adapter: s.originalAdapter,
|
|
11
|
+
// The request transformation runs on the original axios handler already
|
|
12
|
+
transformRequest: [],
|
|
13
|
+
transformResponse: []
|
|
14
|
+
})
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
function n(s, e) {
|
|
18
|
+
return l.isNumber(e.delay) ? e.delay : s.delayResponse;
|
|
19
|
+
}
|
|
20
|
+
async function i(s, e) {
|
|
21
|
+
let t = e.url || "";
|
|
22
|
+
e.baseURL && t.substr(0, e.baseURL.length) === e.baseURL && (t = t.slice(e.baseURL.length)), delete e.adapter, s.history.push(e);
|
|
23
|
+
const r = a.findHandler(
|
|
24
|
+
s.handlers,
|
|
25
|
+
e.method,
|
|
26
|
+
t,
|
|
27
|
+
e.data,
|
|
28
|
+
e.params,
|
|
29
|
+
e.headers && e.headers.constructor.name === "AxiosHeaders" ? Object.assign({}, e.headers.toJSON()) : e.headers,
|
|
30
|
+
e.baseURL
|
|
31
|
+
);
|
|
32
|
+
if (r)
|
|
33
|
+
return r.replyOnce && a.purgeIfReplyOnce(s, r), r.passThrough ? u(s, e) : a.settle(
|
|
34
|
+
e,
|
|
35
|
+
r.response,
|
|
36
|
+
n(s, r)
|
|
37
|
+
);
|
|
38
|
+
switch (s.onNoMatch) {
|
|
39
|
+
case "passthrough":
|
|
40
|
+
return u(s, e);
|
|
41
|
+
case "throwException":
|
|
42
|
+
throw a.createCouldNotFindMockError(e);
|
|
43
|
+
default:
|
|
44
|
+
return a.settle(e, { status: 404 }, s.delayResponse);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
export {
|
|
48
|
+
i as default,
|
|
49
|
+
i as request
|
|
50
|
+
};
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/* 2025-11-07 13:23:48 */
|
|
2
|
+
import O from "lodash/isArrayBuffer.js";
|
|
3
|
+
import b from "lodash/isBuffer.js";
|
|
4
|
+
import d from "lodash/isEqual.js";
|
|
5
|
+
import { A as m } from "../chunk/CB3wlosT.js";
|
|
6
|
+
import { A as o } from "../chunk/BJvTEV6n.js";
|
|
7
|
+
function p(t, r) {
|
|
8
|
+
const n = t.length;
|
|
9
|
+
for (let i = 0; i < n; i++) {
|
|
10
|
+
const e = t[i];
|
|
11
|
+
if (r(e)) return e;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
function w(t) {
|
|
15
|
+
return o.isStream(t);
|
|
16
|
+
}
|
|
17
|
+
function N(t) {
|
|
18
|
+
return o.isBlob(t);
|
|
19
|
+
}
|
|
20
|
+
function l(t, r) {
|
|
21
|
+
return t ? `${t.replace(/\/+$/, "")}/${r.replace(/^\/+/, "")}` : r;
|
|
22
|
+
}
|
|
23
|
+
function E(t, r, n, i, e, c, a) {
|
|
24
|
+
return p(t[r.toLowerCase()], function(s) {
|
|
25
|
+
let u = !1;
|
|
26
|
+
return o.isString(s.url) ? u = h(n, s.url) || h(l(a, n), s.url) : s.url instanceof RegExp && (u = s.url.test(n) || s.url.test(l(a, n))), u && S(i, e, s) && f(c, s.headers);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function h(t, r) {
|
|
30
|
+
const n = t[0] === "/" ? t.substr(1) : t, i = r[0] === "/" ? r.substr(1) : r;
|
|
31
|
+
return n === i;
|
|
32
|
+
}
|
|
33
|
+
function S(t, r, n) {
|
|
34
|
+
return f(r, n.params) && y(t, n.data);
|
|
35
|
+
}
|
|
36
|
+
function f(t, r) {
|
|
37
|
+
return r === void 0 ? !0 : o.isFunction(r.asymmetricMatch) ? r.asymmetricMatch(t) : d(t, r);
|
|
38
|
+
}
|
|
39
|
+
function y(t, r) {
|
|
40
|
+
if (r === void 0)
|
|
41
|
+
return !0;
|
|
42
|
+
let n;
|
|
43
|
+
try {
|
|
44
|
+
n = JSON.parse(t);
|
|
45
|
+
} catch (i) {
|
|
46
|
+
console.error(i);
|
|
47
|
+
}
|
|
48
|
+
return f(n || t, r);
|
|
49
|
+
}
|
|
50
|
+
function M(t, r) {
|
|
51
|
+
const n = t.handlers.indexOf(r);
|
|
52
|
+
n > -1 && t.handlers.splice(n, 1);
|
|
53
|
+
}
|
|
54
|
+
function A(t) {
|
|
55
|
+
return O(t) || o.isBuffer(t) || w(t) || N(t) ? t : o.isObject(t) ? JSON.parse(JSON.stringify(t)) : t;
|
|
56
|
+
}
|
|
57
|
+
async function B(t, r) {
|
|
58
|
+
o.isFunction(t) && (t = await t(r));
|
|
59
|
+
const n = t.status || t[0], i = A(t.data || t[1]), e = t.headers || t[2];
|
|
60
|
+
return t.config && (r = t.config), {
|
|
61
|
+
status: n,
|
|
62
|
+
data: i,
|
|
63
|
+
headers: e,
|
|
64
|
+
config: r,
|
|
65
|
+
request: { responseURL: r.url }
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
async function J(t, r, n) {
|
|
69
|
+
n > 0 && await new Promise((e) => setTimeout(e, n));
|
|
70
|
+
const i = await B(r, t);
|
|
71
|
+
if (!i.config.validateStatus || i.config.validateStatus(i.status))
|
|
72
|
+
return i;
|
|
73
|
+
throw g(
|
|
74
|
+
`Request failed with status code ${i.status}`,
|
|
75
|
+
i.config,
|
|
76
|
+
i
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
function g(t, r, n, i) {
|
|
80
|
+
if (o.isFunction(m))
|
|
81
|
+
return m.from(new Error(t), i, r, null, n);
|
|
82
|
+
const e = new Error(t);
|
|
83
|
+
return e.isAxiosError = !0, e.config = r, n !== void 0 && (e.response = n), i !== void 0 && (e.code = i), e.toJSON = function() {
|
|
84
|
+
return {
|
|
85
|
+
// Standard
|
|
86
|
+
message: this.message,
|
|
87
|
+
name: this.name,
|
|
88
|
+
// Microsoft
|
|
89
|
+
description: this.description,
|
|
90
|
+
number: this.number,
|
|
91
|
+
// Mozilla
|
|
92
|
+
fileName: this.fileName,
|
|
93
|
+
lineNumber: this.lineNumber,
|
|
94
|
+
columnNumber: this.columnNumber,
|
|
95
|
+
stack: this.stack,
|
|
96
|
+
// Axios
|
|
97
|
+
config: this.config,
|
|
98
|
+
code: this.code
|
|
99
|
+
};
|
|
100
|
+
}, e;
|
|
101
|
+
}
|
|
102
|
+
function k(t) {
|
|
103
|
+
const r = `Could not find mock for:
|
|
104
|
+
${JSON.stringify(
|
|
105
|
+
{
|
|
106
|
+
method: t.method,
|
|
107
|
+
url: t.url,
|
|
108
|
+
params: t.params,
|
|
109
|
+
headers: t.headers
|
|
110
|
+
},
|
|
111
|
+
null,
|
|
112
|
+
2
|
|
113
|
+
)}`, n = new Error(r);
|
|
114
|
+
return n.isCouldNotFindMockError = !0, n.url = t.url, n.method = t.method, n;
|
|
115
|
+
}
|
|
116
|
+
const U = {
|
|
117
|
+
createAxiosError: g,
|
|
118
|
+
createCouldNotFindMockError: k,
|
|
119
|
+
find: p,
|
|
120
|
+
findHandler: E,
|
|
121
|
+
isBlob: N,
|
|
122
|
+
isBodyOrParametersMatching: S,
|
|
123
|
+
isBuffer: b,
|
|
124
|
+
isEqual: d,
|
|
125
|
+
purgeIfReplyOnce: M,
|
|
126
|
+
settle: J
|
|
127
|
+
};
|
|
128
|
+
export {
|
|
129
|
+
U as default
|
|
130
|
+
};
|
package/case-name/index.js
CHANGED
package/caseName.js
CHANGED
package/class-name/index.js
CHANGED
package/className.js
CHANGED
package/clipboard-copy/index.js
CHANGED
package/clipboardCopy.js
CHANGED
package/constant/address.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 2025-11-
|
|
1
|
+
/* 2025-11-07 15:27:13 */
|
|
2
2
|
const t = "的一是在不了有和人这中大为上个国我以要他时来用们生到作地于出就分对成会可主发年动同工也能下过子说产种面而方后多定行学法所民得经十三之进着等部度家电力里如水化高自二理起小物现实加量都两体制机当使点从业本去把性好应开它合还因由其些然前外天政四日那社义事平形相全表间样与关各重新线内数正心反你明看原又么利比或但质气第向道命此变条只没结解问意建月公无系军很情者最立代想已通并提直题党程展五果料象员革位入常文总次品式活设及管特件长求老头基资边流路级少图山统接知较将组见计别她手角期根论运农指几九区强放决西被干做必战先回则任取据处队南给色光门即保治北造百规热领七海口东导器压志世金增争济阶油思术极交受联什认六共权收证改清己美再采转更单风切打白教速花带安场身车例真务具万每目至达走积示议声报斗完类八离华名确才科张信马节话米整空元况今集温传土许步群广石记需段研界拉林律叫且究观越织装影算低持音众书布复容儿须际商非验连断深难近矿千周委素技备半办青省列习响约支般史感劳便团往酸历市克何除消构府称太准精值号率族维划选标写存候毛亲快效斯院查江型眼王按格养易置派层片始却专状育厂京识适属圆包火住调满县局照参红细引听该铁价严龙飞";
|
|
3
3
|
export {
|
|
4
4
|
t as default
|
package/constant/domain.js
CHANGED
package/constant/emoji.js
CHANGED
package/constant/identity.js
CHANGED
package/constant/index.js
CHANGED
package/constant/keyboardCode.js
CHANGED
package/constant/licensePlate.js
CHANGED
package/constant/name.js
CHANGED
package/constant/platform.js
CHANGED
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
/* 2025-11-
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
),
|
|
5
|
-
i
|
|
6
|
-
)) && ("ontouchend" in document || "ontouchend" in window), l = ["fullscreen", "standalone", "minimal-ui"].some((e) => window.matchMedia(`(display-mode: ${e})`).matches) || window.navigator.standalone === !0, u = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
|
|
1
|
+
/* 2025-11-07 15:27:13 */
|
|
2
|
+
const n = navigator.userAgent.toLowerCase(), e = ("ontouchstart" in document || "ontouchstart" in window) && ("ontouchend" in document || "ontouchend" in window), a = window.__wxjs_environment === "miniprogram" || !!window.wx?.getSystemInfoSync, r = /micromessenger/i.test(n), c = /dingtalk/i.test(n), d = /alipay|aliapp/i.test(n), o = /ipad|iphone|ipod/i.test(n), t = /android/i.test(n), w = /openharmony/i.test(n), s = /macintosh|mac os x/i.test(n), m = o || s, p = /windows|win32|win64|wow64/i.test(n), u = e && (o || t || /windows phone|blackberry|mobile|webos|iemobile|opera (mini|mobi)/i.test(
|
|
3
|
+
n
|
|
4
|
+
)), l = ["fullscreen", "standalone", "minimal-ui"].some((i) => window.matchMedia(`(display-mode: ${i})`).matches) || window.navigator.standalone === !0, h = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
|
|
7
5
|
export {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
d as isAlipayBrowser,
|
|
7
|
+
t as isAndroidOS,
|
|
8
|
+
m as isAppleDevice,
|
|
9
|
+
h as isBrowser,
|
|
10
|
+
c as isDingtalkBrowser,
|
|
13
11
|
w as isHarmony,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
o as isIOS_OS,
|
|
13
|
+
s as isMacOS,
|
|
14
|
+
u as isMobileDevice,
|
|
17
15
|
l as isPWA,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
e as isTouchSupport,
|
|
17
|
+
r as isWeChatBrowser,
|
|
18
|
+
a as isWeChatMiniProgram,
|
|
19
|
+
p as isWindowsOS
|
|
21
20
|
};
|
package/constant/protocol.js
CHANGED
package/constant/ui.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
/* 2025-11-
|
|
2
|
-
const
|
|
1
|
+
/* 2025-11-07 15:27:13 */
|
|
2
|
+
const t = "pc", I = "mobile", _ = "pqbc", o = "pqb-common", c = `${_}-theme-light`, e = `${_}-theme-dark`, E = "pqb", n = "pqb-pc", A = `${E}-theme-light`, C = `${E}-theme-dark`, M = "pqbm", s = "pqb-mobile", L = `${M}-theme-light`, O = `${M}-theme-dark`;
|
|
3
3
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
4
|
+
I as MOBILE_KEY,
|
|
5
|
+
t as PC_KEY,
|
|
6
|
+
o as UI_COMMON_KEY,
|
|
7
|
+
_ as UI_COMMON_PREFIX,
|
|
8
|
+
e as UI_COMMON_THEME_DARK_CLASS_NAME,
|
|
9
|
+
c as UI_COMMON_THEME_LIGHT_CLASS_NAME,
|
|
10
|
+
s as UI_MOBILE_KEY,
|
|
11
|
+
M as UI_MOBILE_PREFIX,
|
|
12
|
+
O as UI_MOBILE_THEME_DARK_CLASS_NAME,
|
|
13
|
+
L as UI_MOBILE_THEME_LIGHT_CLASS_NAME,
|
|
14
|
+
n as UI_PC_KEY,
|
|
15
|
+
E as UI_PC_PREFIX,
|
|
16
|
+
C as UI_PC_THEME_DARK_CLASS_NAME,
|
|
17
|
+
A as UI_PC_THEME_LIGHT_CLASS_NAME
|
|
18
18
|
};
|
package/constant.js
CHANGED
package/contentDisposition.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 2025-11-
|
|
1
|
+
/* 2025-11-07 15:27:13 */
|
|
2
2
|
import "lodash/isString";
|
|
3
3
|
import { default as r, getContentDispositionFromHeader as i, getContentDispositionParametersFilenameFromHeader as n, getContentDispositionParametersFromHeader as a } from "./content-disposition/index.js";
|
|
4
4
|
export {
|