unplugin-dingtalk 1005.0.0 → 1006.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__chrome_devtools.cjs +115 -0
- package/dist/__chrome_devtools.d.cts +3 -0
- package/dist/astro.cjs +679 -0
- package/dist/astro.d.cts +13 -0
- package/dist/astro.js +1 -1
- package/dist/{chunk-ZLK5HLCO.js → chunk-EG2ZYJ3S.js} +56 -51
- package/dist/{chunk-D63IDACA.js → chunk-LMNMIIAV.js} +2 -2
- package/dist/esbuild.cjs +669 -0
- package/dist/esbuild.d.cts +9 -0
- package/dist/esbuild.js +1 -1
- package/dist/index.cjs +676 -0
- package/dist/index.d.cts +19 -0
- package/dist/index.d.ts +5 -1
- package/dist/index.js +3 -1
- package/dist/main-Q4R5NCQC.js +129 -0
- package/dist/nuxt.cjs +844 -0
- package/dist/nuxt.d.cts +11 -0
- package/dist/nuxt.js +2 -2
- package/dist/rollup.cjs +669 -0
- package/dist/rollup.d.cts +9 -0
- package/dist/rollup.js +1 -1
- package/dist/rspack.cjs +729 -0
- package/dist/rspack.d.cts +9 -0
- package/dist/rspack.d.ts +2 -1
- package/dist/rspack.js +7 -1
- package/dist/types.cjs +19 -0
- package/dist/types.d.cts +38 -0
- package/dist/utils.cjs +34 -0
- package/dist/utils.d.cts +6 -0
- package/dist/vite.cjs +825 -0
- package/dist/vite.d.cts +9 -0
- package/dist/vite.js +2 -2
- package/dist/webpack.cjs +723 -0
- package/dist/webpack.d.cts +9 -0
- package/dist/webpack.js +7 -1
- package/package.json +55 -14
package/dist/index.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
|
+
createProxyMiddleware,
|
|
2
3
|
index_default,
|
|
3
4
|
resovedInfo,
|
|
4
5
|
unplugin,
|
|
5
6
|
unpluginFactory
|
|
6
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-EG2ZYJ3S.js";
|
|
7
8
|
import "./chunk-2YQKM4BX.js";
|
|
8
9
|
import "./chunk-5JBD5THX.js";
|
|
9
10
|
export {
|
|
11
|
+
createProxyMiddleware,
|
|
10
12
|
index_default as default,
|
|
11
13
|
resovedInfo,
|
|
12
14
|
unplugin,
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import "./chunk-5JBD5THX.js";
|
|
2
|
+
|
|
3
|
+
// node_modules/.pnpm/vite-plugin-vconsole@2.1.1/node_modules/vite-plugin-vconsole/dist/main.mjs
|
|
4
|
+
var parseVConsoleOptions = (config) => Object.keys(config).reduce((code, key) => {
|
|
5
|
+
const value = config[key];
|
|
6
|
+
if (typeof value === "function") {
|
|
7
|
+
if (/^[(f]/.test(value.toString())) {
|
|
8
|
+
code += `${key}: ${value},`;
|
|
9
|
+
return code;
|
|
10
|
+
} else {
|
|
11
|
+
code += `${value},`;
|
|
12
|
+
return code;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
code += `${key}: ${JSON.stringify(config[key])},`;
|
|
16
|
+
return code;
|
|
17
|
+
}, "");
|
|
18
|
+
var getEventItems = (event, id) => {
|
|
19
|
+
return event.map(
|
|
20
|
+
(ele) => `
|
|
21
|
+
${id}.on('${ele.eventName}', ${ele.callback})
|
|
22
|
+
`
|
|
23
|
+
).join(";");
|
|
24
|
+
};
|
|
25
|
+
var getDynamicConfig = (dynamicConfig) => {
|
|
26
|
+
let configString = "";
|
|
27
|
+
if (!dynamicConfig) {
|
|
28
|
+
return configString;
|
|
29
|
+
}
|
|
30
|
+
for (const key in dynamicConfig) {
|
|
31
|
+
if (typeof dynamicConfig[key] === "string") {
|
|
32
|
+
configString += `${key}: ${dynamicConfig[key]},`;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return configString;
|
|
36
|
+
};
|
|
37
|
+
var getPlugins = (plugin) => {
|
|
38
|
+
let plugins = "";
|
|
39
|
+
if (plugin && plugin.length) {
|
|
40
|
+
plugins = plugin.map(
|
|
41
|
+
(e) => `
|
|
42
|
+
const ${e.id} = new VConsole.VConsolePlugin('${e.id}', '${e.name}');
|
|
43
|
+
${getEventItems(e.event, e.id)}
|
|
44
|
+
vConsole.addPlugin(${e.id})
|
|
45
|
+
`
|
|
46
|
+
).join(";");
|
|
47
|
+
}
|
|
48
|
+
return plugins;
|
|
49
|
+
};
|
|
50
|
+
function viteVConsole(opt) {
|
|
51
|
+
const {
|
|
52
|
+
entry,
|
|
53
|
+
enabled = true,
|
|
54
|
+
config = {},
|
|
55
|
+
plugin,
|
|
56
|
+
customHide = false,
|
|
57
|
+
dynamicConfig = {},
|
|
58
|
+
eventListener = ""
|
|
59
|
+
} = opt;
|
|
60
|
+
let entryPath = Array.isArray(entry) ? entry : [entry];
|
|
61
|
+
if (process.platform === "win32")
|
|
62
|
+
entryPath = entryPath.map((item) => item.replace(/\\/g, "/"));
|
|
63
|
+
const enabledTruly = enabled;
|
|
64
|
+
return {
|
|
65
|
+
name: "vite:vconsole",
|
|
66
|
+
enforce: "pre",
|
|
67
|
+
transform(_source, id) {
|
|
68
|
+
if (entryPath.includes(id) && enabledTruly) {
|
|
69
|
+
const code = `/* eslint-disable */;
|
|
70
|
+
import VConsole from 'vconsole';
|
|
71
|
+
// config
|
|
72
|
+
const vConsole = new VConsole({${parseVConsoleOptions(
|
|
73
|
+
config
|
|
74
|
+
)}});
|
|
75
|
+
window.vConsole = vConsole;
|
|
76
|
+
|
|
77
|
+
// plugins
|
|
78
|
+
${getPlugins(plugin)}
|
|
79
|
+
|
|
80
|
+
// dynamic config
|
|
81
|
+
window.vConsole.dynamicFunction = function() {
|
|
82
|
+
if (${getDynamicConfig(dynamicConfig).length > 0}) {
|
|
83
|
+
vConsole.setOption({${getDynamicConfig(dynamicConfig)}});
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
window.vConsole.dynamicChange = {
|
|
88
|
+
value: new Date().getTime()
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
window.vConsole.dynamicFunction();
|
|
92
|
+
|
|
93
|
+
if (${customHide}) {
|
|
94
|
+
vConsole.hideSwitch();
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// In order to be compatible with old equipment, I used defineProperty. In the future, when proxy covers enough devices, proxy will be used.
|
|
98
|
+
Object.defineProperty(window.vConsole.dynamicChange, 'value', {
|
|
99
|
+
get: function() {
|
|
100
|
+
return this._value;
|
|
101
|
+
},
|
|
102
|
+
set: function(newValue) {
|
|
103
|
+
window.vConsole.dynamicFunction();
|
|
104
|
+
this._value = newValue;
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
// eventListener
|
|
109
|
+
${eventListener}
|
|
110
|
+
/* eslint-enable */${_source}`;
|
|
111
|
+
return {
|
|
112
|
+
code,
|
|
113
|
+
map: null
|
|
114
|
+
// support source map
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
return {
|
|
118
|
+
code: _source,
|
|
119
|
+
map: null
|
|
120
|
+
// support source map
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
var main_default = viteVConsole;
|
|
126
|
+
export {
|
|
127
|
+
main_default as default,
|
|
128
|
+
viteVConsole
|
|
129
|
+
};
|