@qwik.dev/devtools 0.0.3 → 0.0.5
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/LICENSE +21 -0
- package/README.md +49 -30
- package/dist/component/_virtual/_commonjsHelpers.qwik.cjs +6 -0
- package/dist/component/_virtual/_commonjsHelpers.qwik.mjs +6 -0
- package/{lib → dist/component}/devtools.qwik.cjs +19 -20
- package/{lib → dist/component}/devtools.qwik.mjs +11 -12
- package/{lib → dist/component}/index.qwik.cjs +0 -2
- package/dist/component/index.qwik.mjs +4 -0
- package/{lib-types → dist/component/lib-types/devtools/src}/index.d.ts +0 -1
- package/dist/component/node_modules/.pnpm/@qwikest_icons@0.0.13_@builder.io_qwik@1.11.0_vite@5.4.10_@types_node@20.14.11__/node_modules/@qwikest/icons/lib/hi.qwik.qwik.cjs +60 -0
- package/dist/component/node_modules/.pnpm/@qwikest_icons@0.0.13_@builder.io_qwik@1.11.0_vite@5.4.10_@types_node@20.14.11__/node_modules/@qwikest/icons/lib/hi.qwik.qwik.mjs +60 -0
- package/dist/component/node_modules/.pnpm/@qwikest_icons@0.0.13_@builder.io_qwik@1.11.0_vite@5.4.10_@types_node@20.14.11__/node_modules/@qwikest/icons/lib/lu.qwik.qwik.cjs +32 -0
- package/dist/component/node_modules/.pnpm/@qwikest_icons@0.0.13_@builder.io_qwik@1.11.0_vite@5.4.10_@types_node@20.14.11__/node_modules/@qwikest/icons/lib/lu.qwik.qwik.mjs +32 -0
- package/dist/component/node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.qwik.cjs +54 -0
- package/dist/component/node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.qwik.mjs +54 -0
- package/dist/component/node_modules/.pnpm/birpc@0.2.19/node_modules/birpc/dist/index.qwik.cjs +128 -0
- package/dist/component/node_modules/.pnpm/birpc@0.2.19/node_modules/birpc/dist/index.qwik.mjs +128 -0
- package/dist/component/node_modules/.pnpm/brace-expansion@2.0.1/node_modules/brace-expansion/index.qwik.cjs +149 -0
- package/dist/component/node_modules/.pnpm/brace-expansion@2.0.1/node_modules/brace-expansion/index.qwik.mjs +150 -0
- package/dist/component/node_modules/.pnpm/copy-anything@3.0.5/node_modules/copy-anything/dist/index.qwik.cjs +36 -0
- package/dist/component/node_modules/.pnpm/copy-anything@3.0.5/node_modules/copy-anything/dist/index.qwik.mjs +36 -0
- package/dist/component/node_modules/.pnpm/dree@5.1.5/node_modules/dree/bundled/lib/esm/index.esm.qwik.cjs +12 -0
- package/dist/component/node_modules/.pnpm/dree@5.1.5/node_modules/dree/bundled/lib/esm/index.esm.qwik.mjs +12 -0
- package/dist/component/node_modules/.pnpm/is-what@4.1.16/node_modules/is-what/dist/index.qwik.cjs +17 -0
- package/dist/component/node_modules/.pnpm/is-what@4.1.16/node_modules/is-what/dist/index.qwik.mjs +17 -0
- package/dist/component/node_modules/.pnpm/minimatch@10.0.1/node_modules/minimatch/dist/esm/assert-valid-pattern.qwik.cjs +12 -0
- package/dist/component/node_modules/.pnpm/minimatch@10.0.1/node_modules/minimatch/dist/esm/assert-valid-pattern.qwik.mjs +12 -0
- package/dist/component/node_modules/.pnpm/minimatch@10.0.1/node_modules/minimatch/dist/esm/ast.qwik.cjs +513 -0
- package/dist/component/node_modules/.pnpm/minimatch@10.0.1/node_modules/minimatch/dist/esm/ast.qwik.mjs +513 -0
- package/dist/component/node_modules/.pnpm/minimatch@10.0.1/node_modules/minimatch/dist/esm/brace-expressions.qwik.cjs +110 -0
- package/dist/component/node_modules/.pnpm/minimatch@10.0.1/node_modules/minimatch/dist/esm/brace-expressions.qwik.mjs +110 -0
- package/dist/component/node_modules/.pnpm/minimatch@10.0.1/node_modules/minimatch/dist/esm/escape.qwik.cjs +6 -0
- package/dist/component/node_modules/.pnpm/minimatch@10.0.1/node_modules/minimatch/dist/esm/escape.qwik.mjs +6 -0
- package/dist/component/node_modules/.pnpm/minimatch@10.0.1/node_modules/minimatch/dist/esm/index.qwik.cjs +738 -0
- package/dist/component/node_modules/.pnpm/minimatch@10.0.1/node_modules/minimatch/dist/esm/index.qwik.mjs +738 -0
- package/dist/component/node_modules/.pnpm/minimatch@10.0.1/node_modules/minimatch/dist/esm/unescape.qwik.cjs +6 -0
- package/dist/component/node_modules/.pnpm/minimatch@10.0.1/node_modules/minimatch/dist/esm/unescape.qwik.mjs +6 -0
- package/dist/component/node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/accessDeep.qwik.cjs +120 -0
- package/dist/component/node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/accessDeep.qwik.mjs +120 -0
- package/dist/component/node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/class-registry.qwik.cjs +23 -0
- package/dist/component/node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/class-registry.qwik.mjs +23 -0
- package/dist/component/node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/custom-transformer-registry.qwik.cjs +18 -0
- package/dist/component/node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/custom-transformer-registry.qwik.mjs +18 -0
- package/dist/component/node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/double-indexed-kv.qwik.cjs +23 -0
- package/dist/component/node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/double-indexed-kv.qwik.mjs +23 -0
- package/dist/component/node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/index.qwik.cjs +91 -0
- package/dist/component/node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/index.qwik.mjs +91 -0
- package/dist/component/node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/is.qwik.cjs +51 -0
- package/dist/component/node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/is.qwik.mjs +51 -0
- package/dist/component/node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/pathstringifier.qwik.cjs +30 -0
- package/dist/component/node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/pathstringifier.qwik.mjs +30 -0
- package/dist/component/node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/plainer.qwik.cjs +148 -0
- package/dist/component/node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/plainer.qwik.mjs +148 -0
- package/dist/component/node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/registry.qwik.cjs +28 -0
- package/dist/component/node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/registry.qwik.mjs +28 -0
- package/dist/component/node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/transformer.qwik.cjs +203 -0
- package/dist/component/node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/transformer.qwik.mjs +203 -0
- package/dist/component/node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/util.qwik.cjs +47 -0
- package/dist/component/node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/util.qwik.mjs +47 -0
- package/dist/component/node_modules/.pnpm/vite-hot-client@0.2.4_vite@5.4.10_@types_node@20.14.11_/node_modules/vite-hot-client/dist/index.qwik.cjs +35 -0
- package/dist/component/node_modules/.pnpm/vite-hot-client@0.2.4_vite@5.4.10_@types_node@20.14.11_/node_modules/vite-hot-client/dist/index.qwik.mjs +35 -0
- package/{lib/kit → dist/component/packages/kit/src}/client.qwik.cjs +5 -5
- package/{lib/kit → dist/component/packages/kit/src}/client.qwik.mjs +2 -2
- package/{lib/kit → dist/component/packages/kit/src}/context.qwik.cjs +0 -12
- package/{lib/kit → dist/component/packages/kit/src}/context.qwik.mjs +2 -14
- package/{lib/kit → dist/component/packages/kit/src}/globals.qwik.cjs +0 -4
- package/dist/component/packages/kit/src/globals.qwik.mjs +6 -0
- package/dist/plugin/index.cjs +10504 -0
- package/dist/plugin/index.mjs +10492 -0
- package/package.json +34 -41
- package/lib/index.qwik.mjs +0 -6
- package/lib/kit/globals.qwik.mjs +0 -10
- package/lib/kit/server.qwik.cjs +0 -18
- package/lib/kit/server.qwik.mjs +0 -18
- package/lib/plugin/assets/index.qwik.cjs +0 -67
- package/lib/plugin/assets/index.qwik.mjs +0 -67
- package/lib/plugin/index.qwik.cjs +0 -49
- package/lib/plugin/index.qwik.mjs +0 -49
- package/lib/plugin/npm/index.qwik.cjs +0 -19
- package/lib/plugin/npm/index.qwik.mjs +0 -19
- package/lib/plugin/routes/index.qwik.cjs +0 -17
- package/lib/plugin/routes/index.qwik.mjs +0 -17
- package/lib/plugin/rpc/index.qwik.cjs +0 -14
- package/lib/plugin/rpc/index.qwik.mjs +0 -14
- package/lib/utils/location.qwik.cjs +0 -9
- package/lib/utils/location.qwik.mjs +0 -9
- package/lib-types/plugin/assets/index.d.ts +0 -5
- package/lib-types/plugin/components/index.d.ts +0 -0
- package/lib-types/plugin/index.d.ts +0 -2
- package/lib-types/plugin/npm/index.d.ts +0 -5
- package/lib-types/plugin/routes/index.d.ts +0 -5
- package/lib-types/plugin/rpc/index.d.ts +0 -3
- package/lib-types/plugin/types/index.d.ts +0 -5
- package/src/devtools.css +0 -558
- package/src/devtools.tsx +0 -404
- package/src/entry.dev.tsx +0 -17
- package/src/entry.ssr.tsx +0 -25
- package/src/index.ts +0 -2
- package/src/kit/client.ts +0 -21
- package/src/kit/constants.ts +0 -1
- package/src/kit/context.ts +0 -42
- package/src/kit/globals.ts +0 -22
- package/src/kit/index.ts +0 -4
- package/src/kit/server.ts +0 -21
- package/src/kit/shared.ts +0 -11
- package/src/kit/types.ts +0 -48
- package/src/plugin/assets/index.ts +0 -126
- package/src/plugin/components/index.ts +0 -0
- package/src/plugin/index.ts +0 -50
- package/src/plugin/npm/index.ts +0 -24
- package/src/plugin/routes/index.ts +0 -16
- package/src/plugin/rpc/index.ts +0 -14
- package/src/plugin/types/index.ts +0 -6
- package/src/root.tsx +0 -15
- package/src/utils/location.ts +0 -9
- /package/{lib → dist/component}/devtools.css.qwik.cjs +0 -0
- /package/{lib → dist/component}/devtools.css.qwik.mjs +0 -0
- /package/{lib-types → dist/component/lib-types/devtools/src}/devtools.d.ts +0 -0
- /package/{lib-types → dist/component/lib-types/devtools/src}/entry.dev.d.ts +0 -0
- /package/{lib-types → dist/component/lib-types/devtools/src}/entry.ssr.d.ts +0 -0
- /package/{lib-types → dist/component/lib-types/devtools/src}/root.d.ts +0 -0
- /package/{lib-types → dist/component/lib-types/devtools/src}/utils/location.d.ts +0 -0
- /package/{lib-types/kit → dist/component/lib-types/kit/src}/client.d.ts +0 -0
- /package/{lib-types/kit → dist/component/lib-types/kit/src}/constants.d.ts +0 -0
- /package/{lib-types/kit → dist/component/lib-types/kit/src}/context.d.ts +0 -0
- /package/{lib-types/kit → dist/component/lib-types/kit/src}/globals.d.ts +0 -0
- /package/{lib-types/kit → dist/component/lib-types/kit/src}/index.d.ts +0 -0
- /package/{lib-types/kit → dist/component/lib-types/kit/src}/server.d.ts +0 -0
- /package/{lib-types/kit → dist/component/lib-types/kit/src}/shared.d.ts +0 -0
- /package/{lib-types/kit → dist/component/lib-types/kit/src}/types.d.ts +0 -0
- /package/{lib/kit → dist/component/packages/kit/src}/constants.qwik.cjs +0 -0
- /package/{lib/kit → dist/component/packages/kit/src}/constants.qwik.mjs +0 -0
- /package/{lib/kit → dist/component/packages/kit/src}/shared.qwik.cjs +0 -0
- /package/{lib/kit → dist/component/packages/kit/src}/shared.qwik.mjs +0 -0
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const DEFAULT_TIMEOUT = 6e4;
|
|
4
|
+
function defaultSerialize(i) {
|
|
5
|
+
return i;
|
|
6
|
+
}
|
|
7
|
+
const defaultDeserialize = defaultSerialize;
|
|
8
|
+
const { clearTimeout, setTimeout } = globalThis;
|
|
9
|
+
const random = Math.random.bind(Math);
|
|
10
|
+
function createBirpc(functions, options) {
|
|
11
|
+
const {
|
|
12
|
+
post,
|
|
13
|
+
on,
|
|
14
|
+
off = () => {
|
|
15
|
+
},
|
|
16
|
+
eventNames = [],
|
|
17
|
+
serialize = defaultSerialize,
|
|
18
|
+
deserialize = defaultDeserialize,
|
|
19
|
+
resolver,
|
|
20
|
+
bind = "rpc",
|
|
21
|
+
timeout = DEFAULT_TIMEOUT
|
|
22
|
+
} = options;
|
|
23
|
+
const rpcPromiseMap = /* @__PURE__ */ new Map();
|
|
24
|
+
let _promise;
|
|
25
|
+
let closed = false;
|
|
26
|
+
const rpc = new Proxy({}, {
|
|
27
|
+
get(_, method) {
|
|
28
|
+
if (method === "$functions")
|
|
29
|
+
return functions;
|
|
30
|
+
if (method === "$close")
|
|
31
|
+
return close;
|
|
32
|
+
if (method === "then" && !eventNames.includes("then") && !("then" in functions))
|
|
33
|
+
return void 0;
|
|
34
|
+
const sendEvent = (...args) => {
|
|
35
|
+
post(serialize({ m: method, a: args, t: "q" }));
|
|
36
|
+
};
|
|
37
|
+
if (eventNames.includes(method)) {
|
|
38
|
+
sendEvent.asEvent = sendEvent;
|
|
39
|
+
return sendEvent;
|
|
40
|
+
}
|
|
41
|
+
const sendCall = async (...args) => {
|
|
42
|
+
if (closed)
|
|
43
|
+
throw new Error(`[birpc] rpc is closed, cannot call "${method}"`);
|
|
44
|
+
if (_promise) {
|
|
45
|
+
try {
|
|
46
|
+
await _promise;
|
|
47
|
+
} finally {
|
|
48
|
+
_promise = void 0;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return new Promise((resolve, reject) => {
|
|
52
|
+
const id = nanoid();
|
|
53
|
+
let timeoutId;
|
|
54
|
+
if (timeout >= 0) {
|
|
55
|
+
timeoutId = setTimeout(() => {
|
|
56
|
+
try {
|
|
57
|
+
options.onTimeoutError?.(method, args);
|
|
58
|
+
throw new Error(`[birpc] timeout on calling "${method}"`);
|
|
59
|
+
} catch (e) {
|
|
60
|
+
reject(e);
|
|
61
|
+
}
|
|
62
|
+
rpcPromiseMap.delete(id);
|
|
63
|
+
}, timeout);
|
|
64
|
+
if (typeof timeoutId === "object")
|
|
65
|
+
timeoutId = timeoutId.unref?.();
|
|
66
|
+
}
|
|
67
|
+
rpcPromiseMap.set(id, { resolve, reject, timeoutId, method });
|
|
68
|
+
post(serialize({ m: method, a: args, i: id, t: "q" }));
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
sendCall.asEvent = sendEvent;
|
|
72
|
+
return sendCall;
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
function close() {
|
|
76
|
+
closed = true;
|
|
77
|
+
rpcPromiseMap.forEach(({ reject, method }) => {
|
|
78
|
+
reject(new Error(`[birpc] rpc is closed, cannot call "${method}"`));
|
|
79
|
+
});
|
|
80
|
+
rpcPromiseMap.clear();
|
|
81
|
+
off(onMessage);
|
|
82
|
+
}
|
|
83
|
+
async function onMessage(data, ...extra) {
|
|
84
|
+
const msg = deserialize(data);
|
|
85
|
+
if (msg.t === "q") {
|
|
86
|
+
const { m: method, a: args } = msg;
|
|
87
|
+
let result, error;
|
|
88
|
+
const fn = resolver ? resolver(method, functions[method]) : functions[method];
|
|
89
|
+
if (!fn) {
|
|
90
|
+
error = new Error(`[birpc] function "${method}" not found`);
|
|
91
|
+
} else {
|
|
92
|
+
try {
|
|
93
|
+
result = await fn.apply(bind === "rpc" ? rpc : functions, args);
|
|
94
|
+
} catch (e) {
|
|
95
|
+
error = e;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
if (msg.i) {
|
|
99
|
+
if (error && options.onError)
|
|
100
|
+
options.onError(error, method, args);
|
|
101
|
+
post(serialize({ t: "s", i: msg.i, r: result, e: error }), ...extra);
|
|
102
|
+
}
|
|
103
|
+
} else {
|
|
104
|
+
const { i: ack, r: result, e: error } = msg;
|
|
105
|
+
const promise = rpcPromiseMap.get(ack);
|
|
106
|
+
if (promise) {
|
|
107
|
+
clearTimeout(promise.timeoutId);
|
|
108
|
+
if (error)
|
|
109
|
+
promise.reject(error);
|
|
110
|
+
else
|
|
111
|
+
promise.resolve(result);
|
|
112
|
+
}
|
|
113
|
+
rpcPromiseMap.delete(ack);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
_promise = on(onMessage);
|
|
117
|
+
return rpc;
|
|
118
|
+
}
|
|
119
|
+
const urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
120
|
+
function nanoid(size = 21) {
|
|
121
|
+
let id = "";
|
|
122
|
+
let i = size;
|
|
123
|
+
while (i--)
|
|
124
|
+
id += urlAlphabet[random() * 64 | 0];
|
|
125
|
+
return id;
|
|
126
|
+
}
|
|
127
|
+
exports.DEFAULT_TIMEOUT = DEFAULT_TIMEOUT;
|
|
128
|
+
exports.createBirpc = createBirpc;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
const DEFAULT_TIMEOUT = 6e4;
|
|
2
|
+
function defaultSerialize(i) {
|
|
3
|
+
return i;
|
|
4
|
+
}
|
|
5
|
+
const defaultDeserialize = defaultSerialize;
|
|
6
|
+
const { clearTimeout, setTimeout } = globalThis;
|
|
7
|
+
const random = Math.random.bind(Math);
|
|
8
|
+
function createBirpc(functions, options) {
|
|
9
|
+
const {
|
|
10
|
+
post,
|
|
11
|
+
on,
|
|
12
|
+
off = () => {
|
|
13
|
+
},
|
|
14
|
+
eventNames = [],
|
|
15
|
+
serialize = defaultSerialize,
|
|
16
|
+
deserialize = defaultDeserialize,
|
|
17
|
+
resolver,
|
|
18
|
+
bind = "rpc",
|
|
19
|
+
timeout = DEFAULT_TIMEOUT
|
|
20
|
+
} = options;
|
|
21
|
+
const rpcPromiseMap = /* @__PURE__ */ new Map();
|
|
22
|
+
let _promise;
|
|
23
|
+
let closed = false;
|
|
24
|
+
const rpc = new Proxy({}, {
|
|
25
|
+
get(_, method) {
|
|
26
|
+
if (method === "$functions")
|
|
27
|
+
return functions;
|
|
28
|
+
if (method === "$close")
|
|
29
|
+
return close;
|
|
30
|
+
if (method === "then" && !eventNames.includes("then") && !("then" in functions))
|
|
31
|
+
return void 0;
|
|
32
|
+
const sendEvent = (...args) => {
|
|
33
|
+
post(serialize({ m: method, a: args, t: "q" }));
|
|
34
|
+
};
|
|
35
|
+
if (eventNames.includes(method)) {
|
|
36
|
+
sendEvent.asEvent = sendEvent;
|
|
37
|
+
return sendEvent;
|
|
38
|
+
}
|
|
39
|
+
const sendCall = async (...args) => {
|
|
40
|
+
if (closed)
|
|
41
|
+
throw new Error(`[birpc] rpc is closed, cannot call "${method}"`);
|
|
42
|
+
if (_promise) {
|
|
43
|
+
try {
|
|
44
|
+
await _promise;
|
|
45
|
+
} finally {
|
|
46
|
+
_promise = void 0;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return new Promise((resolve, reject) => {
|
|
50
|
+
const id = nanoid();
|
|
51
|
+
let timeoutId;
|
|
52
|
+
if (timeout >= 0) {
|
|
53
|
+
timeoutId = setTimeout(() => {
|
|
54
|
+
try {
|
|
55
|
+
options.onTimeoutError?.(method, args);
|
|
56
|
+
throw new Error(`[birpc] timeout on calling "${method}"`);
|
|
57
|
+
} catch (e) {
|
|
58
|
+
reject(e);
|
|
59
|
+
}
|
|
60
|
+
rpcPromiseMap.delete(id);
|
|
61
|
+
}, timeout);
|
|
62
|
+
if (typeof timeoutId === "object")
|
|
63
|
+
timeoutId = timeoutId.unref?.();
|
|
64
|
+
}
|
|
65
|
+
rpcPromiseMap.set(id, { resolve, reject, timeoutId, method });
|
|
66
|
+
post(serialize({ m: method, a: args, i: id, t: "q" }));
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
sendCall.asEvent = sendEvent;
|
|
70
|
+
return sendCall;
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
function close() {
|
|
74
|
+
closed = true;
|
|
75
|
+
rpcPromiseMap.forEach(({ reject, method }) => {
|
|
76
|
+
reject(new Error(`[birpc] rpc is closed, cannot call "${method}"`));
|
|
77
|
+
});
|
|
78
|
+
rpcPromiseMap.clear();
|
|
79
|
+
off(onMessage);
|
|
80
|
+
}
|
|
81
|
+
async function onMessage(data, ...extra) {
|
|
82
|
+
const msg = deserialize(data);
|
|
83
|
+
if (msg.t === "q") {
|
|
84
|
+
const { m: method, a: args } = msg;
|
|
85
|
+
let result, error;
|
|
86
|
+
const fn = resolver ? resolver(method, functions[method]) : functions[method];
|
|
87
|
+
if (!fn) {
|
|
88
|
+
error = new Error(`[birpc] function "${method}" not found`);
|
|
89
|
+
} else {
|
|
90
|
+
try {
|
|
91
|
+
result = await fn.apply(bind === "rpc" ? rpc : functions, args);
|
|
92
|
+
} catch (e) {
|
|
93
|
+
error = e;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
if (msg.i) {
|
|
97
|
+
if (error && options.onError)
|
|
98
|
+
options.onError(error, method, args);
|
|
99
|
+
post(serialize({ t: "s", i: msg.i, r: result, e: error }), ...extra);
|
|
100
|
+
}
|
|
101
|
+
} else {
|
|
102
|
+
const { i: ack, r: result, e: error } = msg;
|
|
103
|
+
const promise = rpcPromiseMap.get(ack);
|
|
104
|
+
if (promise) {
|
|
105
|
+
clearTimeout(promise.timeoutId);
|
|
106
|
+
if (error)
|
|
107
|
+
promise.reject(error);
|
|
108
|
+
else
|
|
109
|
+
promise.resolve(result);
|
|
110
|
+
}
|
|
111
|
+
rpcPromiseMap.delete(ack);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
_promise = on(onMessage);
|
|
115
|
+
return rpc;
|
|
116
|
+
}
|
|
117
|
+
const urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
118
|
+
function nanoid(size = 21) {
|
|
119
|
+
let id = "";
|
|
120
|
+
let i = size;
|
|
121
|
+
while (i--)
|
|
122
|
+
id += urlAlphabet[random() * 64 | 0];
|
|
123
|
+
return id;
|
|
124
|
+
}
|
|
125
|
+
export {
|
|
126
|
+
DEFAULT_TIMEOUT,
|
|
127
|
+
createBirpc
|
|
128
|
+
};
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const _commonjsHelpers = require("../../../../../_virtual/_commonjsHelpers.qwik.cjs");
|
|
3
|
+
const index = require("../../../balanced-match@1.0.2/node_modules/balanced-match/index.qwik.cjs");
|
|
4
|
+
var balanced = index.balancedMatch;
|
|
5
|
+
var braceExpansion = expandTop;
|
|
6
|
+
var escSlash = "\0SLASH" + Math.random() + "\0";
|
|
7
|
+
var escOpen = "\0OPEN" + Math.random() + "\0";
|
|
8
|
+
var escClose = "\0CLOSE" + Math.random() + "\0";
|
|
9
|
+
var escComma = "\0COMMA" + Math.random() + "\0";
|
|
10
|
+
var escPeriod = "\0PERIOD" + Math.random() + "\0";
|
|
11
|
+
function numeric(str) {
|
|
12
|
+
return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0);
|
|
13
|
+
}
|
|
14
|
+
function escapeBraces(str) {
|
|
15
|
+
return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod);
|
|
16
|
+
}
|
|
17
|
+
function unescapeBraces(str) {
|
|
18
|
+
return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".");
|
|
19
|
+
}
|
|
20
|
+
function parseCommaParts(str) {
|
|
21
|
+
if (!str)
|
|
22
|
+
return [""];
|
|
23
|
+
var parts = [];
|
|
24
|
+
var m = balanced("{", "}", str);
|
|
25
|
+
if (!m)
|
|
26
|
+
return str.split(",");
|
|
27
|
+
var pre = m.pre;
|
|
28
|
+
var body = m.body;
|
|
29
|
+
var post = m.post;
|
|
30
|
+
var p = pre.split(",");
|
|
31
|
+
p[p.length - 1] += "{" + body + "}";
|
|
32
|
+
var postParts = parseCommaParts(post);
|
|
33
|
+
if (post.length) {
|
|
34
|
+
p[p.length - 1] += postParts.shift();
|
|
35
|
+
p.push.apply(p, postParts);
|
|
36
|
+
}
|
|
37
|
+
parts.push.apply(parts, p);
|
|
38
|
+
return parts;
|
|
39
|
+
}
|
|
40
|
+
function expandTop(str) {
|
|
41
|
+
if (!str)
|
|
42
|
+
return [];
|
|
43
|
+
if (str.substr(0, 2) === "{}") {
|
|
44
|
+
str = "\\{\\}" + str.substr(2);
|
|
45
|
+
}
|
|
46
|
+
return expand(escapeBraces(str), true).map(unescapeBraces);
|
|
47
|
+
}
|
|
48
|
+
function embrace(str) {
|
|
49
|
+
return "{" + str + "}";
|
|
50
|
+
}
|
|
51
|
+
function isPadded(el) {
|
|
52
|
+
return /^-?0\d/.test(el);
|
|
53
|
+
}
|
|
54
|
+
function lte(i, y) {
|
|
55
|
+
return i <= y;
|
|
56
|
+
}
|
|
57
|
+
function gte(i, y) {
|
|
58
|
+
return i >= y;
|
|
59
|
+
}
|
|
60
|
+
function expand(str, isTop) {
|
|
61
|
+
var expansions = [];
|
|
62
|
+
var m = balanced("{", "}", str);
|
|
63
|
+
if (!m) return [str];
|
|
64
|
+
var pre = m.pre;
|
|
65
|
+
var post = m.post.length ? expand(m.post, false) : [""];
|
|
66
|
+
if (/\$$/.test(m.pre)) {
|
|
67
|
+
for (var k = 0; k < post.length; k++) {
|
|
68
|
+
var expansion = pre + "{" + m.body + "}" + post[k];
|
|
69
|
+
expansions.push(expansion);
|
|
70
|
+
}
|
|
71
|
+
} else {
|
|
72
|
+
var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
|
|
73
|
+
var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
|
|
74
|
+
var isSequence = isNumericSequence || isAlphaSequence;
|
|
75
|
+
var isOptions = m.body.indexOf(",") >= 0;
|
|
76
|
+
if (!isSequence && !isOptions) {
|
|
77
|
+
if (m.post.match(/,.*\}/)) {
|
|
78
|
+
str = m.pre + "{" + m.body + escClose + m.post;
|
|
79
|
+
return expand(str);
|
|
80
|
+
}
|
|
81
|
+
return [str];
|
|
82
|
+
}
|
|
83
|
+
var n;
|
|
84
|
+
if (isSequence) {
|
|
85
|
+
n = m.body.split(/\.\./);
|
|
86
|
+
} else {
|
|
87
|
+
n = parseCommaParts(m.body);
|
|
88
|
+
if (n.length === 1) {
|
|
89
|
+
n = expand(n[0], false).map(embrace);
|
|
90
|
+
if (n.length === 1) {
|
|
91
|
+
return post.map(function(p) {
|
|
92
|
+
return m.pre + n[0] + p;
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
var N;
|
|
98
|
+
if (isSequence) {
|
|
99
|
+
var x = numeric(n[0]);
|
|
100
|
+
var y = numeric(n[1]);
|
|
101
|
+
var width = Math.max(n[0].length, n[1].length);
|
|
102
|
+
var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1;
|
|
103
|
+
var test = lte;
|
|
104
|
+
var reverse = y < x;
|
|
105
|
+
if (reverse) {
|
|
106
|
+
incr *= -1;
|
|
107
|
+
test = gte;
|
|
108
|
+
}
|
|
109
|
+
var pad = n.some(isPadded);
|
|
110
|
+
N = [];
|
|
111
|
+
for (var i = x; test(i, y); i += incr) {
|
|
112
|
+
var c;
|
|
113
|
+
if (isAlphaSequence) {
|
|
114
|
+
c = String.fromCharCode(i);
|
|
115
|
+
if (c === "\\")
|
|
116
|
+
c = "";
|
|
117
|
+
} else {
|
|
118
|
+
c = String(i);
|
|
119
|
+
if (pad) {
|
|
120
|
+
var need = width - c.length;
|
|
121
|
+
if (need > 0) {
|
|
122
|
+
var z = new Array(need + 1).join("0");
|
|
123
|
+
if (i < 0)
|
|
124
|
+
c = "-" + z + c.slice(1);
|
|
125
|
+
else
|
|
126
|
+
c = z + c;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
N.push(c);
|
|
131
|
+
}
|
|
132
|
+
} else {
|
|
133
|
+
N = [];
|
|
134
|
+
for (var j = 0; j < n.length; j++) {
|
|
135
|
+
N.push.apply(N, expand(n[j], false));
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
for (var j = 0; j < N.length; j++) {
|
|
139
|
+
for (var k = 0; k < post.length; k++) {
|
|
140
|
+
var expansion = pre + N[j] + post[k];
|
|
141
|
+
if (!isTop || isSequence || expansion)
|
|
142
|
+
expansions.push(expansion);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
return expansions;
|
|
147
|
+
}
|
|
148
|
+
const expand$1 = /* @__PURE__ */ _commonjsHelpers.getDefaultExportFromCjs(braceExpansion);
|
|
149
|
+
module.exports = expand$1;
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { getDefaultExportFromCjs } from "../../../../../_virtual/_commonjsHelpers.qwik.mjs";
|
|
2
|
+
import { b as balancedMatch } from "../../../balanced-match@1.0.2/node_modules/balanced-match/index.qwik.mjs";
|
|
3
|
+
var balanced = balancedMatch;
|
|
4
|
+
var braceExpansion = expandTop;
|
|
5
|
+
var escSlash = "\0SLASH" + Math.random() + "\0";
|
|
6
|
+
var escOpen = "\0OPEN" + Math.random() + "\0";
|
|
7
|
+
var escClose = "\0CLOSE" + Math.random() + "\0";
|
|
8
|
+
var escComma = "\0COMMA" + Math.random() + "\0";
|
|
9
|
+
var escPeriod = "\0PERIOD" + Math.random() + "\0";
|
|
10
|
+
function numeric(str) {
|
|
11
|
+
return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0);
|
|
12
|
+
}
|
|
13
|
+
function escapeBraces(str) {
|
|
14
|
+
return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod);
|
|
15
|
+
}
|
|
16
|
+
function unescapeBraces(str) {
|
|
17
|
+
return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".");
|
|
18
|
+
}
|
|
19
|
+
function parseCommaParts(str) {
|
|
20
|
+
if (!str)
|
|
21
|
+
return [""];
|
|
22
|
+
var parts = [];
|
|
23
|
+
var m = balanced("{", "}", str);
|
|
24
|
+
if (!m)
|
|
25
|
+
return str.split(",");
|
|
26
|
+
var pre = m.pre;
|
|
27
|
+
var body = m.body;
|
|
28
|
+
var post = m.post;
|
|
29
|
+
var p = pre.split(",");
|
|
30
|
+
p[p.length - 1] += "{" + body + "}";
|
|
31
|
+
var postParts = parseCommaParts(post);
|
|
32
|
+
if (post.length) {
|
|
33
|
+
p[p.length - 1] += postParts.shift();
|
|
34
|
+
p.push.apply(p, postParts);
|
|
35
|
+
}
|
|
36
|
+
parts.push.apply(parts, p);
|
|
37
|
+
return parts;
|
|
38
|
+
}
|
|
39
|
+
function expandTop(str) {
|
|
40
|
+
if (!str)
|
|
41
|
+
return [];
|
|
42
|
+
if (str.substr(0, 2) === "{}") {
|
|
43
|
+
str = "\\{\\}" + str.substr(2);
|
|
44
|
+
}
|
|
45
|
+
return expand(escapeBraces(str), true).map(unescapeBraces);
|
|
46
|
+
}
|
|
47
|
+
function embrace(str) {
|
|
48
|
+
return "{" + str + "}";
|
|
49
|
+
}
|
|
50
|
+
function isPadded(el) {
|
|
51
|
+
return /^-?0\d/.test(el);
|
|
52
|
+
}
|
|
53
|
+
function lte(i, y) {
|
|
54
|
+
return i <= y;
|
|
55
|
+
}
|
|
56
|
+
function gte(i, y) {
|
|
57
|
+
return i >= y;
|
|
58
|
+
}
|
|
59
|
+
function expand(str, isTop) {
|
|
60
|
+
var expansions = [];
|
|
61
|
+
var m = balanced("{", "}", str);
|
|
62
|
+
if (!m) return [str];
|
|
63
|
+
var pre = m.pre;
|
|
64
|
+
var post = m.post.length ? expand(m.post, false) : [""];
|
|
65
|
+
if (/\$$/.test(m.pre)) {
|
|
66
|
+
for (var k = 0; k < post.length; k++) {
|
|
67
|
+
var expansion = pre + "{" + m.body + "}" + post[k];
|
|
68
|
+
expansions.push(expansion);
|
|
69
|
+
}
|
|
70
|
+
} else {
|
|
71
|
+
var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
|
|
72
|
+
var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
|
|
73
|
+
var isSequence = isNumericSequence || isAlphaSequence;
|
|
74
|
+
var isOptions = m.body.indexOf(",") >= 0;
|
|
75
|
+
if (!isSequence && !isOptions) {
|
|
76
|
+
if (m.post.match(/,.*\}/)) {
|
|
77
|
+
str = m.pre + "{" + m.body + escClose + m.post;
|
|
78
|
+
return expand(str);
|
|
79
|
+
}
|
|
80
|
+
return [str];
|
|
81
|
+
}
|
|
82
|
+
var n;
|
|
83
|
+
if (isSequence) {
|
|
84
|
+
n = m.body.split(/\.\./);
|
|
85
|
+
} else {
|
|
86
|
+
n = parseCommaParts(m.body);
|
|
87
|
+
if (n.length === 1) {
|
|
88
|
+
n = expand(n[0], false).map(embrace);
|
|
89
|
+
if (n.length === 1) {
|
|
90
|
+
return post.map(function(p) {
|
|
91
|
+
return m.pre + n[0] + p;
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
var N;
|
|
97
|
+
if (isSequence) {
|
|
98
|
+
var x = numeric(n[0]);
|
|
99
|
+
var y = numeric(n[1]);
|
|
100
|
+
var width = Math.max(n[0].length, n[1].length);
|
|
101
|
+
var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1;
|
|
102
|
+
var test = lte;
|
|
103
|
+
var reverse = y < x;
|
|
104
|
+
if (reverse) {
|
|
105
|
+
incr *= -1;
|
|
106
|
+
test = gte;
|
|
107
|
+
}
|
|
108
|
+
var pad = n.some(isPadded);
|
|
109
|
+
N = [];
|
|
110
|
+
for (var i = x; test(i, y); i += incr) {
|
|
111
|
+
var c;
|
|
112
|
+
if (isAlphaSequence) {
|
|
113
|
+
c = String.fromCharCode(i);
|
|
114
|
+
if (c === "\\")
|
|
115
|
+
c = "";
|
|
116
|
+
} else {
|
|
117
|
+
c = String(i);
|
|
118
|
+
if (pad) {
|
|
119
|
+
var need = width - c.length;
|
|
120
|
+
if (need > 0) {
|
|
121
|
+
var z = new Array(need + 1).join("0");
|
|
122
|
+
if (i < 0)
|
|
123
|
+
c = "-" + z + c.slice(1);
|
|
124
|
+
else
|
|
125
|
+
c = z + c;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
N.push(c);
|
|
130
|
+
}
|
|
131
|
+
} else {
|
|
132
|
+
N = [];
|
|
133
|
+
for (var j = 0; j < n.length; j++) {
|
|
134
|
+
N.push.apply(N, expand(n[j], false));
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
for (var j = 0; j < N.length; j++) {
|
|
138
|
+
for (var k = 0; k < post.length; k++) {
|
|
139
|
+
var expansion = pre + N[j] + post[k];
|
|
140
|
+
if (!isTop || isSequence || expansion)
|
|
141
|
+
expansions.push(expansion);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
return expansions;
|
|
146
|
+
}
|
|
147
|
+
const expand$1 = /* @__PURE__ */ getDefaultExportFromCjs(braceExpansion);
|
|
148
|
+
export {
|
|
149
|
+
expand$1 as default
|
|
150
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const index = require("../../../../is-what@4.1.16/node_modules/is-what/dist/index.qwik.cjs");
|
|
4
|
+
function assignProp(carry, key, newVal, originalObject, includeNonenumerable) {
|
|
5
|
+
const propType = {}.propertyIsEnumerable.call(originalObject, key) ? "enumerable" : "nonenumerable";
|
|
6
|
+
if (propType === "enumerable")
|
|
7
|
+
carry[key] = newVal;
|
|
8
|
+
if (includeNonenumerable && propType === "nonenumerable") {
|
|
9
|
+
Object.defineProperty(carry, key, {
|
|
10
|
+
value: newVal,
|
|
11
|
+
enumerable: false,
|
|
12
|
+
writable: true,
|
|
13
|
+
configurable: true
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function copy(target, options = {}) {
|
|
18
|
+
if (index.isArray(target)) {
|
|
19
|
+
return target.map((item) => copy(item, options));
|
|
20
|
+
}
|
|
21
|
+
if (!index.isPlainObject(target)) {
|
|
22
|
+
return target;
|
|
23
|
+
}
|
|
24
|
+
const props = Object.getOwnPropertyNames(target);
|
|
25
|
+
const symbols = Object.getOwnPropertySymbols(target);
|
|
26
|
+
return [...props, ...symbols].reduce((carry, key) => {
|
|
27
|
+
if (index.isArray(options.props) && !options.props.includes(key)) {
|
|
28
|
+
return carry;
|
|
29
|
+
}
|
|
30
|
+
const val = target[key];
|
|
31
|
+
const newVal = copy(val, options);
|
|
32
|
+
assignProp(carry, key, newVal, target, options.nonenumerable);
|
|
33
|
+
return carry;
|
|
34
|
+
}, {});
|
|
35
|
+
}
|
|
36
|
+
exports.copy = copy;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { isArray, isPlainObject } from "../../../../is-what@4.1.16/node_modules/is-what/dist/index.qwik.mjs";
|
|
2
|
+
function assignProp(carry, key, newVal, originalObject, includeNonenumerable) {
|
|
3
|
+
const propType = {}.propertyIsEnumerable.call(originalObject, key) ? "enumerable" : "nonenumerable";
|
|
4
|
+
if (propType === "enumerable")
|
|
5
|
+
carry[key] = newVal;
|
|
6
|
+
if (includeNonenumerable && propType === "nonenumerable") {
|
|
7
|
+
Object.defineProperty(carry, key, {
|
|
8
|
+
value: newVal,
|
|
9
|
+
enumerable: false,
|
|
10
|
+
writable: true,
|
|
11
|
+
configurable: true
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
function copy(target, options = {}) {
|
|
16
|
+
if (isArray(target)) {
|
|
17
|
+
return target.map((item) => copy(item, options));
|
|
18
|
+
}
|
|
19
|
+
if (!isPlainObject(target)) {
|
|
20
|
+
return target;
|
|
21
|
+
}
|
|
22
|
+
const props = Object.getOwnPropertyNames(target);
|
|
23
|
+
const symbols = Object.getOwnPropertySymbols(target);
|
|
24
|
+
return [...props, ...symbols].reduce((carry, key) => {
|
|
25
|
+
if (isArray(options.props) && !options.props.includes(key)) {
|
|
26
|
+
return carry;
|
|
27
|
+
}
|
|
28
|
+
const val = target[key];
|
|
29
|
+
const newVal = copy(val, options);
|
|
30
|
+
assignProp(carry, key, newVal, target, options.nonenumerable);
|
|
31
|
+
return carry;
|
|
32
|
+
}, {});
|
|
33
|
+
}
|
|
34
|
+
export {
|
|
35
|
+
copy
|
|
36
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
require("node:path");
|
|
4
|
+
require("node:os");
|
|
5
|
+
require("node:crypto");
|
|
6
|
+
require("node:fs");
|
|
7
|
+
require("node:fs/promises");
|
|
8
|
+
require("../../../../../../minimatch@10.0.1/node_modules/minimatch/dist/esm/index.qwik.cjs");
|
|
9
|
+
var re = ((n) => (n.DIRECTORY = "directory", n.FILE = "file", n))(re || {}), ne = ((l) => (l.ALPHABETICAL = "alpha", l.ALPHABETICAL_REVERSE = "antialpha", l.ALPHABETICAL_INSENSITIVE = "alpha-insensitive", l.ALPHABETICAL_INSENSITIVE_REVERSE = "antialpha-insensitive", l))(ne || {}), se = ((a) => (a.ALPHABETICAL = "alpha", a.ALPHABETICAL_REVERSE = "antialpha", a.ALPHABETICAL_INSENSITIVE = "alpha-insensitive", a.ALPHABETICAL_INSENSITIVE_REVERSE = "antialpha-insensitive", a.FOLDERS_FIRST = "folders-first", a.FILES_FIRST = "files-first", a))(se || {});
|
|
10
|
+
exports.PostSortMethodPredefined = se;
|
|
11
|
+
exports.SortMethodPredefined = ne;
|
|
12
|
+
exports.Type = re;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import "node:path";
|
|
2
|
+
import "node:os";
|
|
3
|
+
import "node:crypto";
|
|
4
|
+
import "node:fs";
|
|
5
|
+
import "node:fs/promises";
|
|
6
|
+
import "../../../../../../minimatch@10.0.1/node_modules/minimatch/dist/esm/index.qwik.mjs";
|
|
7
|
+
var re = ((n) => (n.DIRECTORY = "directory", n.FILE = "file", n))(re || {}), ne = ((l) => (l.ALPHABETICAL = "alpha", l.ALPHABETICAL_REVERSE = "antialpha", l.ALPHABETICAL_INSENSITIVE = "alpha-insensitive", l.ALPHABETICAL_INSENSITIVE_REVERSE = "antialpha-insensitive", l))(ne || {}), se = ((a) => (a.ALPHABETICAL = "alpha", a.ALPHABETICAL_REVERSE = "antialpha", a.ALPHABETICAL_INSENSITIVE = "alpha-insensitive", a.ALPHABETICAL_INSENSITIVE_REVERSE = "antialpha-insensitive", a.FOLDERS_FIRST = "folders-first", a.FILES_FIRST = "files-first", a))(se || {});
|
|
8
|
+
export {
|
|
9
|
+
se as PostSortMethodPredefined,
|
|
10
|
+
ne as SortMethodPredefined,
|
|
11
|
+
re as Type
|
|
12
|
+
};
|
package/dist/component/node_modules/.pnpm/is-what@4.1.16/node_modules/is-what/dist/index.qwik.cjs
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
function getType(payload) {
|
|
4
|
+
return Object.prototype.toString.call(payload).slice(8, -1);
|
|
5
|
+
}
|
|
6
|
+
function isArray(payload) {
|
|
7
|
+
return getType(payload) === "Array";
|
|
8
|
+
}
|
|
9
|
+
function isPlainObject(payload) {
|
|
10
|
+
if (getType(payload) !== "Object")
|
|
11
|
+
return false;
|
|
12
|
+
const prototype = Object.getPrototypeOf(payload);
|
|
13
|
+
return !!prototype && prototype.constructor === Object && prototype === Object.prototype;
|
|
14
|
+
}
|
|
15
|
+
exports.getType = getType;
|
|
16
|
+
exports.isArray = isArray;
|
|
17
|
+
exports.isPlainObject = isPlainObject;
|
package/dist/component/node_modules/.pnpm/is-what@4.1.16/node_modules/is-what/dist/index.qwik.mjs
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
function getType(payload) {
|
|
2
|
+
return Object.prototype.toString.call(payload).slice(8, -1);
|
|
3
|
+
}
|
|
4
|
+
function isArray(payload) {
|
|
5
|
+
return getType(payload) === "Array";
|
|
6
|
+
}
|
|
7
|
+
function isPlainObject(payload) {
|
|
8
|
+
if (getType(payload) !== "Object")
|
|
9
|
+
return false;
|
|
10
|
+
const prototype = Object.getPrototypeOf(payload);
|
|
11
|
+
return !!prototype && prototype.constructor === Object && prototype === Object.prototype;
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
getType,
|
|
15
|
+
isArray,
|
|
16
|
+
isPlainObject
|
|
17
|
+
};
|