unplugin-dingtalk 1001.0.0 → 1002.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/astro.js +1 -1
- package/dist/{chunk-W5UIO4ZZ.js → chunk-6LTE4RPT.js} +255 -1
- package/dist/{chunk-WE6LHUBA.js → chunk-CTXK6UCW.js} +1 -1
- package/dist/esbuild.js +1 -1
- package/dist/index.js +1 -1
- package/dist/nuxt.js +2 -2
- package/dist/rollup.js +1 -1
- package/dist/rspack.js +1 -1
- package/dist/vite.js +2 -2
- package/dist/webpack.js +1 -1
- package/package.json +4 -4
package/dist/astro.js
CHANGED
|
@@ -1306,7 +1306,261 @@ import c from "picocolors";
|
|
|
1306
1306
|
import cookie from "cookie";
|
|
1307
1307
|
import { start } from "z-chii";
|
|
1308
1308
|
import dns2 from "dns2";
|
|
1309
|
-
|
|
1309
|
+
|
|
1310
|
+
// node_modules/.pnpm/get-port-please@3.1.2/node_modules/get-port-please/dist/index.mjs
|
|
1311
|
+
import { createServer } from "node:net";
|
|
1312
|
+
import { networkInterfaces } from "node:os";
|
|
1313
|
+
var unsafePorts = /* @__PURE__ */ new Set([
|
|
1314
|
+
1,
|
|
1315
|
+
// tcpmux
|
|
1316
|
+
7,
|
|
1317
|
+
// echo
|
|
1318
|
+
9,
|
|
1319
|
+
// discard
|
|
1320
|
+
11,
|
|
1321
|
+
// systat
|
|
1322
|
+
13,
|
|
1323
|
+
// daytime
|
|
1324
|
+
15,
|
|
1325
|
+
// netstat
|
|
1326
|
+
17,
|
|
1327
|
+
// qotd
|
|
1328
|
+
19,
|
|
1329
|
+
// chargen
|
|
1330
|
+
20,
|
|
1331
|
+
// ftp data
|
|
1332
|
+
21,
|
|
1333
|
+
// ftp access
|
|
1334
|
+
22,
|
|
1335
|
+
// ssh
|
|
1336
|
+
23,
|
|
1337
|
+
// telnet
|
|
1338
|
+
25,
|
|
1339
|
+
// smtp
|
|
1340
|
+
37,
|
|
1341
|
+
// time
|
|
1342
|
+
42,
|
|
1343
|
+
// name
|
|
1344
|
+
43,
|
|
1345
|
+
// nicname
|
|
1346
|
+
53,
|
|
1347
|
+
// domain
|
|
1348
|
+
69,
|
|
1349
|
+
// tftp
|
|
1350
|
+
77,
|
|
1351
|
+
// priv-rjs
|
|
1352
|
+
79,
|
|
1353
|
+
// finger
|
|
1354
|
+
87,
|
|
1355
|
+
// ttylink
|
|
1356
|
+
95,
|
|
1357
|
+
// supdup
|
|
1358
|
+
101,
|
|
1359
|
+
// hostriame
|
|
1360
|
+
102,
|
|
1361
|
+
// iso-tsap
|
|
1362
|
+
103,
|
|
1363
|
+
// gppitnp
|
|
1364
|
+
104,
|
|
1365
|
+
// acr-nema
|
|
1366
|
+
109,
|
|
1367
|
+
// pop2
|
|
1368
|
+
110,
|
|
1369
|
+
// pop3
|
|
1370
|
+
111,
|
|
1371
|
+
// sunrpc
|
|
1372
|
+
113,
|
|
1373
|
+
// auth
|
|
1374
|
+
115,
|
|
1375
|
+
// sftp
|
|
1376
|
+
117,
|
|
1377
|
+
// uucp-path
|
|
1378
|
+
119,
|
|
1379
|
+
// nntp
|
|
1380
|
+
123,
|
|
1381
|
+
// NTP
|
|
1382
|
+
135,
|
|
1383
|
+
// loc-srv /epmap
|
|
1384
|
+
137,
|
|
1385
|
+
// netbios
|
|
1386
|
+
139,
|
|
1387
|
+
// netbios
|
|
1388
|
+
143,
|
|
1389
|
+
// imap2
|
|
1390
|
+
161,
|
|
1391
|
+
// snmp
|
|
1392
|
+
179,
|
|
1393
|
+
// BGP
|
|
1394
|
+
389,
|
|
1395
|
+
// ldap
|
|
1396
|
+
427,
|
|
1397
|
+
// SLP (Also used by Apple Filing Protocol)
|
|
1398
|
+
465,
|
|
1399
|
+
// smtp+ssl
|
|
1400
|
+
512,
|
|
1401
|
+
// print / exec
|
|
1402
|
+
513,
|
|
1403
|
+
// login
|
|
1404
|
+
514,
|
|
1405
|
+
// shell
|
|
1406
|
+
515,
|
|
1407
|
+
// printer
|
|
1408
|
+
526,
|
|
1409
|
+
// tempo
|
|
1410
|
+
530,
|
|
1411
|
+
// courier
|
|
1412
|
+
531,
|
|
1413
|
+
// chat
|
|
1414
|
+
532,
|
|
1415
|
+
// netnews
|
|
1416
|
+
540,
|
|
1417
|
+
// uucp
|
|
1418
|
+
548,
|
|
1419
|
+
// AFP (Apple Filing Protocol)
|
|
1420
|
+
554,
|
|
1421
|
+
// rtsp
|
|
1422
|
+
556,
|
|
1423
|
+
// remotefs
|
|
1424
|
+
563,
|
|
1425
|
+
// nntp+ssl
|
|
1426
|
+
587,
|
|
1427
|
+
// smtp (rfc6409)
|
|
1428
|
+
601,
|
|
1429
|
+
// syslog-conn (rfc3195)
|
|
1430
|
+
636,
|
|
1431
|
+
// ldap+ssl
|
|
1432
|
+
989,
|
|
1433
|
+
// ftps-data
|
|
1434
|
+
990,
|
|
1435
|
+
// ftps
|
|
1436
|
+
993,
|
|
1437
|
+
// ldap+ssl
|
|
1438
|
+
995,
|
|
1439
|
+
// pop3+ssl
|
|
1440
|
+
1719,
|
|
1441
|
+
// h323gatestat
|
|
1442
|
+
1720,
|
|
1443
|
+
// h323hostcall
|
|
1444
|
+
1723,
|
|
1445
|
+
// pptp
|
|
1446
|
+
2049,
|
|
1447
|
+
// nfs
|
|
1448
|
+
3659,
|
|
1449
|
+
// apple-sasl / PasswordServer
|
|
1450
|
+
4045,
|
|
1451
|
+
// lockd
|
|
1452
|
+
5060,
|
|
1453
|
+
// sip
|
|
1454
|
+
5061,
|
|
1455
|
+
// sips
|
|
1456
|
+
6e3,
|
|
1457
|
+
// X11
|
|
1458
|
+
6566,
|
|
1459
|
+
// sane-port
|
|
1460
|
+
6665,
|
|
1461
|
+
// Alternate IRC [Apple addition]
|
|
1462
|
+
6666,
|
|
1463
|
+
// Alternate IRC [Apple addition]
|
|
1464
|
+
6667,
|
|
1465
|
+
// Standard IRC [Apple addition]
|
|
1466
|
+
6668,
|
|
1467
|
+
// Alternate IRC [Apple addition]
|
|
1468
|
+
6669,
|
|
1469
|
+
// Alternate IRC [Apple addition]
|
|
1470
|
+
6697,
|
|
1471
|
+
// IRC + TLS
|
|
1472
|
+
10080
|
|
1473
|
+
// Amanda
|
|
1474
|
+
]);
|
|
1475
|
+
function isUnsafePort(port) {
|
|
1476
|
+
return unsafePorts.has(port);
|
|
1477
|
+
}
|
|
1478
|
+
function isSafePort(port) {
|
|
1479
|
+
return !isUnsafePort(port);
|
|
1480
|
+
}
|
|
1481
|
+
var __defProp = Object.defineProperty;
|
|
1482
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1483
|
+
var __publicField = (obj, key, value) => {
|
|
1484
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1485
|
+
return value;
|
|
1486
|
+
};
|
|
1487
|
+
var GetPortError = class extends Error {
|
|
1488
|
+
constructor(message, opts) {
|
|
1489
|
+
super(message, opts);
|
|
1490
|
+
this.message = message;
|
|
1491
|
+
__publicField(this, "name", "GetPortError");
|
|
1492
|
+
}
|
|
1493
|
+
};
|
|
1494
|
+
function _log(verbose, message) {
|
|
1495
|
+
if (verbose) {
|
|
1496
|
+
console.log(`[get-port] ${message}`);
|
|
1497
|
+
}
|
|
1498
|
+
}
|
|
1499
|
+
function _tryPort(port, host) {
|
|
1500
|
+
return new Promise((resolve) => {
|
|
1501
|
+
const server = createServer();
|
|
1502
|
+
server.unref();
|
|
1503
|
+
server.on("error", () => {
|
|
1504
|
+
resolve(false);
|
|
1505
|
+
});
|
|
1506
|
+
server.listen({ port, host }, () => {
|
|
1507
|
+
const { port: port2 } = server.address();
|
|
1508
|
+
server.close(() => {
|
|
1509
|
+
resolve(isSafePort(port2) && port2);
|
|
1510
|
+
});
|
|
1511
|
+
});
|
|
1512
|
+
});
|
|
1513
|
+
}
|
|
1514
|
+
function _getLocalHosts(additional) {
|
|
1515
|
+
const hosts = new Set(additional);
|
|
1516
|
+
for (const _interface of Object.values(networkInterfaces())) {
|
|
1517
|
+
for (const config2 of _interface || []) {
|
|
1518
|
+
if (config2.address && !config2.internal && !config2.address.startsWith("fe80::")) {
|
|
1519
|
+
hosts.add(config2.address);
|
|
1520
|
+
}
|
|
1521
|
+
}
|
|
1522
|
+
}
|
|
1523
|
+
return [...hosts];
|
|
1524
|
+
}
|
|
1525
|
+
function _fmtOnHost(hostname) {
|
|
1526
|
+
return hostname ? `on host ${JSON.stringify(hostname)}` : "on any host";
|
|
1527
|
+
}
|
|
1528
|
+
var HOSTNAME_RE = new RegExp("^(?!-)[\\d.:A-Za-z-]{1,63}(?<!-)$");
|
|
1529
|
+
async function getRandomPort(host) {
|
|
1530
|
+
const port = await checkPort(0, host);
|
|
1531
|
+
if (port === false) {
|
|
1532
|
+
throw new GetPortError(`Unable to find a random port ${_fmtOnHost(host)}`);
|
|
1533
|
+
}
|
|
1534
|
+
return port;
|
|
1535
|
+
}
|
|
1536
|
+
async function checkPort(port, host = process.env.HOST, verbose) {
|
|
1537
|
+
if (!host) {
|
|
1538
|
+
host = _getLocalHosts([void 0, "0.0.0.0"]);
|
|
1539
|
+
}
|
|
1540
|
+
if (!Array.isArray(host)) {
|
|
1541
|
+
return _tryPort(port, host);
|
|
1542
|
+
}
|
|
1543
|
+
for (const _host of host) {
|
|
1544
|
+
const _port = await _tryPort(port, _host);
|
|
1545
|
+
if (_port === false) {
|
|
1546
|
+
if (port < 1024 && verbose) {
|
|
1547
|
+
_log(
|
|
1548
|
+
verbose,
|
|
1549
|
+
`Unable to listen to the privileged port ${port} ${_fmtOnHost(
|
|
1550
|
+
_host
|
|
1551
|
+
)}`
|
|
1552
|
+
);
|
|
1553
|
+
}
|
|
1554
|
+
return false;
|
|
1555
|
+
}
|
|
1556
|
+
if (port === 0 && _port !== 0) {
|
|
1557
|
+
port = _port;
|
|
1558
|
+
}
|
|
1559
|
+
}
|
|
1560
|
+
return port;
|
|
1561
|
+
}
|
|
1562
|
+
|
|
1563
|
+
// src/index.ts
|
|
1310
1564
|
import httpProxy from "http-proxy";
|
|
1311
1565
|
var cwd = process2.cwd();
|
|
1312
1566
|
var config;
|
package/dist/esbuild.js
CHANGED
package/dist/index.js
CHANGED
package/dist/nuxt.js
CHANGED
package/dist/rollup.js
CHANGED
package/dist/rspack.js
CHANGED
package/dist/vite.js
CHANGED
package/dist/webpack.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unplugin-dingtalk",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "1002.0.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://github.com/zcf0508/unplugin-dingtalk#readme",
|
|
@@ -82,11 +82,8 @@
|
|
|
82
82
|
}
|
|
83
83
|
},
|
|
84
84
|
"dependencies": {
|
|
85
|
-
"@antfu/eslint-config": "^2.18.1",
|
|
86
85
|
"cookie": "^1.0.2",
|
|
87
86
|
"dns2": "^2.1.0",
|
|
88
|
-
"eslint-plugin-security": "^3.0.0",
|
|
89
|
-
"get-port-please": "^3.1.2",
|
|
90
87
|
"http-proxy": "^1.18.1",
|
|
91
88
|
"picocolors": "^1.0.1",
|
|
92
89
|
"unplugin": "^1.5.1",
|
|
@@ -94,6 +91,7 @@
|
|
|
94
91
|
"z-chii": "1.15.5-beta.1"
|
|
95
92
|
},
|
|
96
93
|
"devDependencies": {
|
|
94
|
+
"@antfu/eslint-config": "^2.18.1",
|
|
97
95
|
"@nuxt/kit": "^3.8.2",
|
|
98
96
|
"@nuxt/schema": "^3.8.2",
|
|
99
97
|
"@types/dns2": "^2.0.9",
|
|
@@ -101,7 +99,9 @@
|
|
|
101
99
|
"bumpp": "^9.2.0",
|
|
102
100
|
"chalk": "^5.3.0",
|
|
103
101
|
"eslint": "^8.55.0",
|
|
102
|
+
"eslint-plugin-security": "^3.0.0",
|
|
104
103
|
"fast-glob": "^3.3.2",
|
|
104
|
+
"get-port-please": "^3.1.2",
|
|
105
105
|
"node-fetch": "^3.3.2",
|
|
106
106
|
"nodemon": "^3.0.2",
|
|
107
107
|
"rimraf": "^5.0.5",
|