unplugin-dingtalk 0.3.1 → 0.4.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/astro.cjs +35 -5
- package/dist/astro.d.cts +1 -0
- package/dist/astro.d.ts +1 -0
- package/dist/astro.js +1 -1
- package/dist/{chunk-Q26XYG3E.js → chunk-2OB7UBRW.js} +1 -1
- package/dist/{chunk-E34H52KV.js → chunk-RDTWBIQD.js} +35 -5
- package/dist/esbuild.cjs +35 -5
- package/dist/esbuild.d.cts +1 -0
- package/dist/esbuild.d.ts +1 -0
- package/dist/esbuild.js +1 -1
- package/dist/index.cjs +35 -5
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/nuxt.cjs +78 -123
- package/dist/nuxt.d.cts +1 -0
- package/dist/nuxt.d.ts +1 -0
- package/dist/nuxt.js +3 -7
- package/dist/rollup.cjs +35 -5
- package/dist/rollup.d.cts +1 -0
- package/dist/rollup.d.ts +1 -0
- package/dist/rollup.js +1 -1
- package/dist/rspack.cjs +157 -53
- package/dist/rspack.d.cts +4 -2
- package/dist/rspack.d.ts +4 -2
- package/dist/rspack.js +80 -2
- package/dist/types.d.cts +15 -1
- package/dist/types.d.ts +15 -1
- package/dist/vite.cjs +35 -5
- package/dist/vite.d.cts +1 -0
- package/dist/vite.d.ts +1 -0
- package/dist/vite.js +2 -2
- package/dist/webpack.cjs +36 -6
- package/dist/webpack.d.cts +1 -0
- package/dist/webpack.d.ts +1 -0
- package/dist/webpack.js +78 -3
- package/package.json +5 -1
- package/dist/chunk-OVAVOVTT.js +0 -83
package/dist/astro.cjs
CHANGED
|
@@ -6514,6 +6514,7 @@ var import_picocolors = __toESM(require("picocolors"), 1);
|
|
|
6514
6514
|
var import_cookie = __toESM(require("cookie"), 1);
|
|
6515
6515
|
var import_chii = require("chii");
|
|
6516
6516
|
var import_get_port_please = require("get-port-please");
|
|
6517
|
+
var cwd = import_node_process.default.cwd();
|
|
6517
6518
|
var config;
|
|
6518
6519
|
var colorUrl = (url) => import_picocolors.default.green(url.replace(/:(\d+)\//, (_, port) => `:${import_picocolors.default.bold(port)}/`));
|
|
6519
6520
|
var resovedInfo = {
|
|
@@ -6546,17 +6547,18 @@ var unpluginFactory = (options) => {
|
|
|
6546
6547
|
port: resovedInfo.availablePort
|
|
6547
6548
|
});
|
|
6548
6549
|
}
|
|
6549
|
-
if (
|
|
6550
|
+
if (options == null ? void 0 : options.enable) {
|
|
6550
6551
|
const codes = [
|
|
6551
|
-
|
|
6552
|
-
import { devtools } from '@vue/devtools'
|
|
6553
|
-
devtools.connect(${(_b = options == null ? void 0 : options.vueDevtools) == null ? void 0 : _b.host}, ${(_c = options == null ? void 0 : options.vueDevtools) == null ? void 0 : _c.port})
|
|
6552
|
+
"/* eslint-disable */;",
|
|
6553
|
+
((_a4 = options == null ? void 0 : options.vueDevtools) == null ? void 0 : _a4.enable) ? `import { devtools } from '@vue/devtools'
|
|
6554
|
+
devtools.connect(${(_b = options == null ? void 0 : options.vueDevtools) == null ? void 0 : _b.host}, ${(_c = options == null ? void 0 : options.vueDevtools) == null ? void 0 : _c.port});` : "",
|
|
6554
6555
|
(options == null ? void 0 : options.enable) && enableChii ? `(() => {
|
|
6555
6556
|
const script = document.createElement('script');
|
|
6556
6557
|
script.src="http://localhost:${resovedInfo.availablePort}/target.js";
|
|
6557
6558
|
document.body.appendChild(script);
|
|
6558
6559
|
})()` : "",
|
|
6559
|
-
|
|
6560
|
+
"/* eslint-enable */",
|
|
6561
|
+
`${_source};`
|
|
6560
6562
|
];
|
|
6561
6563
|
return {
|
|
6562
6564
|
code: codes.join("\n"),
|
|
@@ -6686,6 +6688,34 @@ var unpluginFactory = (options) => {
|
|
|
6686
6688
|
if (options == null ? void 0 : options.corpId) {
|
|
6687
6689
|
resovedInfo.targetURL.searchParams.append("corpId", options.corpId);
|
|
6688
6690
|
}
|
|
6691
|
+
},
|
|
6692
|
+
async rspack(compiler) {
|
|
6693
|
+
var _a4, _b, _c, _d2, _e;
|
|
6694
|
+
if (!(options == null ? void 0 : options.enable)) {
|
|
6695
|
+
return;
|
|
6696
|
+
}
|
|
6697
|
+
const devServerOptions = __spreadValues(__spreadValues({
|
|
6698
|
+
host: "localhost",
|
|
6699
|
+
port: 8080
|
|
6700
|
+
}, compiler.options.devServer), (_c = (_b = await ((_a4 = await import("@rsbuild/core")) == null ? void 0 : _a4.loadConfig({
|
|
6701
|
+
cwd
|
|
6702
|
+
}))) == null ? void 0 : _b.content) == null ? void 0 : _c.server);
|
|
6703
|
+
const source = `${devServerOptions.host === "0.0.0.0" ? "127.0.0.1" : devServerOptions.host}:${devServerOptions.port}`;
|
|
6704
|
+
const base = compiler.options.output.publicPath || "/";
|
|
6705
|
+
const _targetUrl = (_d2 = options == null ? void 0 : options.targetUrl) != null ? _d2 : `http://${source}${base}`;
|
|
6706
|
+
resovedInfo.targetURL = new URL(_targetUrl);
|
|
6707
|
+
resovedInfo.targetURL.searchParams.append("ddtab", "true");
|
|
6708
|
+
if (options == null ? void 0 : options.corpId) {
|
|
6709
|
+
resovedInfo.targetURL.searchParams.append("corpId", options.corpId);
|
|
6710
|
+
}
|
|
6711
|
+
console.log(` ${import_picocolors.default.green("\u279C")} ${import_picocolors.default.bold(
|
|
6712
|
+
`Open in dingtalk${((_e = options == null ? void 0 : options.vueDevtools) == null ? void 0 : _e.enable) ? " (with vue-devtools)" : ""}`
|
|
6713
|
+
)}: ${colorUrl(`http://${source}${base}open-dingtalk`)}`);
|
|
6714
|
+
if (enableChii) {
|
|
6715
|
+
console.log(` ${import_picocolors.default.green("\u279C")} ${import_picocolors.default.bold(
|
|
6716
|
+
"Click to open chrome devtools"
|
|
6717
|
+
)}: ${colorUrl(`http://${source}${base}__chrome_devtools`)}`);
|
|
6718
|
+
}
|
|
6689
6719
|
}
|
|
6690
6720
|
};
|
|
6691
6721
|
return unpluginDing;
|
package/dist/astro.d.cts
CHANGED
package/dist/astro.d.ts
CHANGED
package/dist/astro.js
CHANGED
|
@@ -1305,6 +1305,7 @@ import c from "picocolors";
|
|
|
1305
1305
|
import cookie from "cookie";
|
|
1306
1306
|
import { start } from "chii";
|
|
1307
1307
|
import { getRandomPort } from "get-port-please";
|
|
1308
|
+
var cwd = process2.cwd();
|
|
1308
1309
|
var config;
|
|
1309
1310
|
var colorUrl = (url) => c.green(url.replace(/:(\d+)\//, (_, port) => `:${c.bold(port)}/`));
|
|
1310
1311
|
var resovedInfo = {
|
|
@@ -1337,17 +1338,18 @@ var unpluginFactory = (options) => {
|
|
|
1337
1338
|
port: resovedInfo.availablePort
|
|
1338
1339
|
});
|
|
1339
1340
|
}
|
|
1340
|
-
if (
|
|
1341
|
+
if (options == null ? void 0 : options.enable) {
|
|
1341
1342
|
const codes = [
|
|
1342
|
-
|
|
1343
|
-
import { devtools } from '@vue/devtools'
|
|
1344
|
-
devtools.connect(${(_b = options == null ? void 0 : options.vueDevtools) == null ? void 0 : _b.host}, ${(_c = options == null ? void 0 : options.vueDevtools) == null ? void 0 : _c.port})
|
|
1343
|
+
"/* eslint-disable */;",
|
|
1344
|
+
((_a = options == null ? void 0 : options.vueDevtools) == null ? void 0 : _a.enable) ? `import { devtools } from '@vue/devtools'
|
|
1345
|
+
devtools.connect(${(_b = options == null ? void 0 : options.vueDevtools) == null ? void 0 : _b.host}, ${(_c = options == null ? void 0 : options.vueDevtools) == null ? void 0 : _c.port});` : "",
|
|
1345
1346
|
(options == null ? void 0 : options.enable) && enableChii ? `(() => {
|
|
1346
1347
|
const script = document.createElement('script');
|
|
1347
1348
|
script.src="http://localhost:${resovedInfo.availablePort}/target.js";
|
|
1348
1349
|
document.body.appendChild(script);
|
|
1349
1350
|
})()` : "",
|
|
1350
|
-
|
|
1351
|
+
"/* eslint-enable */",
|
|
1352
|
+
`${_source};`
|
|
1351
1353
|
];
|
|
1352
1354
|
return {
|
|
1353
1355
|
code: codes.join("\n"),
|
|
@@ -1477,6 +1479,34 @@ var unpluginFactory = (options) => {
|
|
|
1477
1479
|
if (options == null ? void 0 : options.corpId) {
|
|
1478
1480
|
resovedInfo.targetURL.searchParams.append("corpId", options.corpId);
|
|
1479
1481
|
}
|
|
1482
|
+
},
|
|
1483
|
+
async rspack(compiler) {
|
|
1484
|
+
var _a, _b, _c, _d, _e;
|
|
1485
|
+
if (!(options == null ? void 0 : options.enable)) {
|
|
1486
|
+
return;
|
|
1487
|
+
}
|
|
1488
|
+
const devServerOptions = __spreadValues(__spreadValues({
|
|
1489
|
+
host: "localhost",
|
|
1490
|
+
port: 8080
|
|
1491
|
+
}, compiler.options.devServer), (_c = (_b = await ((_a = await import("@rsbuild/core")) == null ? void 0 : _a.loadConfig({
|
|
1492
|
+
cwd
|
|
1493
|
+
}))) == null ? void 0 : _b.content) == null ? void 0 : _c.server);
|
|
1494
|
+
const source = `${devServerOptions.host === "0.0.0.0" ? "127.0.0.1" : devServerOptions.host}:${devServerOptions.port}`;
|
|
1495
|
+
const base = compiler.options.output.publicPath || "/";
|
|
1496
|
+
const _targetUrl = (_d = options == null ? void 0 : options.targetUrl) != null ? _d : `http://${source}${base}`;
|
|
1497
|
+
resovedInfo.targetURL = new URL(_targetUrl);
|
|
1498
|
+
resovedInfo.targetURL.searchParams.append("ddtab", "true");
|
|
1499
|
+
if (options == null ? void 0 : options.corpId) {
|
|
1500
|
+
resovedInfo.targetURL.searchParams.append("corpId", options.corpId);
|
|
1501
|
+
}
|
|
1502
|
+
console.log(` ${c.green("\u279C")} ${c.bold(
|
|
1503
|
+
`Open in dingtalk${((_e = options == null ? void 0 : options.vueDevtools) == null ? void 0 : _e.enable) ? " (with vue-devtools)" : ""}`
|
|
1504
|
+
)}: ${colorUrl(`http://${source}${base}open-dingtalk`)}`);
|
|
1505
|
+
if (enableChii) {
|
|
1506
|
+
console.log(` ${c.green("\u279C")} ${c.bold(
|
|
1507
|
+
"Click to open chrome devtools"
|
|
1508
|
+
)}: ${colorUrl(`http://${source}${base}__chrome_devtools`)}`);
|
|
1509
|
+
}
|
|
1480
1510
|
}
|
|
1481
1511
|
};
|
|
1482
1512
|
return unpluginDing;
|
package/dist/esbuild.cjs
CHANGED
|
@@ -6515,6 +6515,7 @@ var import_picocolors = __toESM(require("picocolors"), 1);
|
|
|
6515
6515
|
var import_cookie = __toESM(require("cookie"), 1);
|
|
6516
6516
|
var import_chii = require("chii");
|
|
6517
6517
|
var import_get_port_please = require("get-port-please");
|
|
6518
|
+
var cwd = import_node_process.default.cwd();
|
|
6518
6519
|
var config;
|
|
6519
6520
|
var colorUrl = (url) => import_picocolors.default.green(url.replace(/:(\d+)\//, (_, port) => `:${import_picocolors.default.bold(port)}/`));
|
|
6520
6521
|
var resovedInfo = {
|
|
@@ -6547,17 +6548,18 @@ var unpluginFactory = (options) => {
|
|
|
6547
6548
|
port: resovedInfo.availablePort
|
|
6548
6549
|
});
|
|
6549
6550
|
}
|
|
6550
|
-
if (
|
|
6551
|
+
if (options == null ? void 0 : options.enable) {
|
|
6551
6552
|
const codes = [
|
|
6552
|
-
|
|
6553
|
-
import { devtools } from '@vue/devtools'
|
|
6554
|
-
devtools.connect(${(_b = options == null ? void 0 : options.vueDevtools) == null ? void 0 : _b.host}, ${(_c = options == null ? void 0 : options.vueDevtools) == null ? void 0 : _c.port})
|
|
6553
|
+
"/* eslint-disable */;",
|
|
6554
|
+
((_a4 = options == null ? void 0 : options.vueDevtools) == null ? void 0 : _a4.enable) ? `import { devtools } from '@vue/devtools'
|
|
6555
|
+
devtools.connect(${(_b = options == null ? void 0 : options.vueDevtools) == null ? void 0 : _b.host}, ${(_c = options == null ? void 0 : options.vueDevtools) == null ? void 0 : _c.port});` : "",
|
|
6555
6556
|
(options == null ? void 0 : options.enable) && enableChii ? `(() => {
|
|
6556
6557
|
const script = document.createElement('script');
|
|
6557
6558
|
script.src="http://localhost:${resovedInfo.availablePort}/target.js";
|
|
6558
6559
|
document.body.appendChild(script);
|
|
6559
6560
|
})()` : "",
|
|
6560
|
-
|
|
6561
|
+
"/* eslint-enable */",
|
|
6562
|
+
`${_source};`
|
|
6561
6563
|
];
|
|
6562
6564
|
return {
|
|
6563
6565
|
code: codes.join("\n"),
|
|
@@ -6687,6 +6689,34 @@ var unpluginFactory = (options) => {
|
|
|
6687
6689
|
if (options == null ? void 0 : options.corpId) {
|
|
6688
6690
|
resovedInfo.targetURL.searchParams.append("corpId", options.corpId);
|
|
6689
6691
|
}
|
|
6692
|
+
},
|
|
6693
|
+
async rspack(compiler) {
|
|
6694
|
+
var _a4, _b, _c, _d2, _e;
|
|
6695
|
+
if (!(options == null ? void 0 : options.enable)) {
|
|
6696
|
+
return;
|
|
6697
|
+
}
|
|
6698
|
+
const devServerOptions = __spreadValues(__spreadValues({
|
|
6699
|
+
host: "localhost",
|
|
6700
|
+
port: 8080
|
|
6701
|
+
}, compiler.options.devServer), (_c = (_b = await ((_a4 = await import("@rsbuild/core")) == null ? void 0 : _a4.loadConfig({
|
|
6702
|
+
cwd
|
|
6703
|
+
}))) == null ? void 0 : _b.content) == null ? void 0 : _c.server);
|
|
6704
|
+
const source = `${devServerOptions.host === "0.0.0.0" ? "127.0.0.1" : devServerOptions.host}:${devServerOptions.port}`;
|
|
6705
|
+
const base = compiler.options.output.publicPath || "/";
|
|
6706
|
+
const _targetUrl = (_d2 = options == null ? void 0 : options.targetUrl) != null ? _d2 : `http://${source}${base}`;
|
|
6707
|
+
resovedInfo.targetURL = new URL(_targetUrl);
|
|
6708
|
+
resovedInfo.targetURL.searchParams.append("ddtab", "true");
|
|
6709
|
+
if (options == null ? void 0 : options.corpId) {
|
|
6710
|
+
resovedInfo.targetURL.searchParams.append("corpId", options.corpId);
|
|
6711
|
+
}
|
|
6712
|
+
console.log(` ${import_picocolors.default.green("\u279C")} ${import_picocolors.default.bold(
|
|
6713
|
+
`Open in dingtalk${((_e = options == null ? void 0 : options.vueDevtools) == null ? void 0 : _e.enable) ? " (with vue-devtools)" : ""}`
|
|
6714
|
+
)}: ${colorUrl(`http://${source}${base}open-dingtalk`)}`);
|
|
6715
|
+
if (enableChii) {
|
|
6716
|
+
console.log(` ${import_picocolors.default.green("\u279C")} ${import_picocolors.default.bold(
|
|
6717
|
+
"Click to open chrome devtools"
|
|
6718
|
+
)}: ${colorUrl(`http://${source}${base}__chrome_devtools`)}`);
|
|
6719
|
+
}
|
|
6690
6720
|
}
|
|
6691
6721
|
};
|
|
6692
6722
|
return unpluginDing;
|
package/dist/esbuild.d.cts
CHANGED
package/dist/esbuild.d.ts
CHANGED
package/dist/esbuild.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -6515,6 +6515,7 @@ var import_picocolors = __toESM(require("picocolors"), 1);
|
|
|
6515
6515
|
var import_cookie = __toESM(require("cookie"), 1);
|
|
6516
6516
|
var import_chii = require("chii");
|
|
6517
6517
|
var import_get_port_please = require("get-port-please");
|
|
6518
|
+
var cwd = import_node_process.default.cwd();
|
|
6518
6519
|
var config;
|
|
6519
6520
|
var colorUrl = (url) => import_picocolors.default.green(url.replace(/:(\d+)\//, (_, port) => `:${import_picocolors.default.bold(port)}/`));
|
|
6520
6521
|
var resovedInfo = {
|
|
@@ -6547,17 +6548,18 @@ var unpluginFactory = (options) => {
|
|
|
6547
6548
|
port: resovedInfo.availablePort
|
|
6548
6549
|
});
|
|
6549
6550
|
}
|
|
6550
|
-
if (
|
|
6551
|
+
if (options == null ? void 0 : options.enable) {
|
|
6551
6552
|
const codes = [
|
|
6552
|
-
|
|
6553
|
-
import { devtools } from '@vue/devtools'
|
|
6554
|
-
devtools.connect(${(_b = options == null ? void 0 : options.vueDevtools) == null ? void 0 : _b.host}, ${(_c = options == null ? void 0 : options.vueDevtools) == null ? void 0 : _c.port})
|
|
6553
|
+
"/* eslint-disable */;",
|
|
6554
|
+
((_a4 = options == null ? void 0 : options.vueDevtools) == null ? void 0 : _a4.enable) ? `import { devtools } from '@vue/devtools'
|
|
6555
|
+
devtools.connect(${(_b = options == null ? void 0 : options.vueDevtools) == null ? void 0 : _b.host}, ${(_c = options == null ? void 0 : options.vueDevtools) == null ? void 0 : _c.port});` : "",
|
|
6555
6556
|
(options == null ? void 0 : options.enable) && enableChii ? `(() => {
|
|
6556
6557
|
const script = document.createElement('script');
|
|
6557
6558
|
script.src="http://localhost:${resovedInfo.availablePort}/target.js";
|
|
6558
6559
|
document.body.appendChild(script);
|
|
6559
6560
|
})()` : "",
|
|
6560
|
-
|
|
6561
|
+
"/* eslint-enable */",
|
|
6562
|
+
`${_source};`
|
|
6561
6563
|
];
|
|
6562
6564
|
return {
|
|
6563
6565
|
code: codes.join("\n"),
|
|
@@ -6687,6 +6689,34 @@ var unpluginFactory = (options) => {
|
|
|
6687
6689
|
if (options == null ? void 0 : options.corpId) {
|
|
6688
6690
|
resovedInfo.targetURL.searchParams.append("corpId", options.corpId);
|
|
6689
6691
|
}
|
|
6692
|
+
},
|
|
6693
|
+
async rspack(compiler) {
|
|
6694
|
+
var _a4, _b, _c, _d2, _e;
|
|
6695
|
+
if (!(options == null ? void 0 : options.enable)) {
|
|
6696
|
+
return;
|
|
6697
|
+
}
|
|
6698
|
+
const devServerOptions = __spreadValues(__spreadValues({
|
|
6699
|
+
host: "localhost",
|
|
6700
|
+
port: 8080
|
|
6701
|
+
}, compiler.options.devServer), (_c = (_b = await ((_a4 = await import("@rsbuild/core")) == null ? void 0 : _a4.loadConfig({
|
|
6702
|
+
cwd
|
|
6703
|
+
}))) == null ? void 0 : _b.content) == null ? void 0 : _c.server);
|
|
6704
|
+
const source = `${devServerOptions.host === "0.0.0.0" ? "127.0.0.1" : devServerOptions.host}:${devServerOptions.port}`;
|
|
6705
|
+
const base = compiler.options.output.publicPath || "/";
|
|
6706
|
+
const _targetUrl = (_d2 = options == null ? void 0 : options.targetUrl) != null ? _d2 : `http://${source}${base}`;
|
|
6707
|
+
resovedInfo.targetURL = new URL(_targetUrl);
|
|
6708
|
+
resovedInfo.targetURL.searchParams.append("ddtab", "true");
|
|
6709
|
+
if (options == null ? void 0 : options.corpId) {
|
|
6710
|
+
resovedInfo.targetURL.searchParams.append("corpId", options.corpId);
|
|
6711
|
+
}
|
|
6712
|
+
console.log(` ${import_picocolors.default.green("\u279C")} ${import_picocolors.default.bold(
|
|
6713
|
+
`Open in dingtalk${((_e = options == null ? void 0 : options.vueDevtools) == null ? void 0 : _e.enable) ? " (with vue-devtools)" : ""}`
|
|
6714
|
+
)}: ${colorUrl(`http://${source}${base}open-dingtalk`)}`);
|
|
6715
|
+
if (enableChii) {
|
|
6716
|
+
console.log(` ${import_picocolors.default.green("\u279C")} ${import_picocolors.default.bold(
|
|
6717
|
+
"Click to open chrome devtools"
|
|
6718
|
+
)}: ${colorUrl(`http://${source}${base}__chrome_devtools`)}`);
|
|
6719
|
+
}
|
|
6690
6720
|
}
|
|
6691
6721
|
};
|
|
6692
6722
|
return unpluginDing;
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED