unplugin-dingtalk 1003.0.0 → 1004.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/nuxt.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  vite_default
3
- } from "./chunk-552KT7KH.js";
4
- import "./chunk-W3PXXTYA.js";
5
- import "./chunk-A2RZ6ACY.js";
3
+ } from "./chunk-7VYUT3GL.js";
6
4
  import "./chunk-KQOHODTC.js";
7
- import "./chunk-MCTMMV5B.js";
5
+ import "./chunk-5U7LETMH.js";
6
+ import "./chunk-DZEMXGMI.js";
7
+ import "./chunk-5JBD5THX.js";
8
8
 
9
9
  // src/nuxt.ts
10
10
  import { addVitePlugin, defineNuxtModule } from "@nuxt/kit";
package/dist/rollup.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  unpluginFactory
3
- } from "./chunk-W3PXXTYA.js";
4
- import "./chunk-A2RZ6ACY.js";
5
- import "./chunk-MCTMMV5B.js";
3
+ } from "./chunk-5U7LETMH.js";
4
+ import "./chunk-DZEMXGMI.js";
5
+ import "./chunk-5JBD5THX.js";
6
6
 
7
7
  // src/rollup.ts
8
8
  import { createRollupPlugin } from "unplugin";
package/dist/rspack.js CHANGED
@@ -1,10 +1,11 @@
1
1
  import {
2
- fetch,
3
2
  resovedInfo,
4
3
  unpluginFactory
5
- } from "./chunk-W3PXXTYA.js";
6
- import "./chunk-A2RZ6ACY.js";
7
- import "./chunk-MCTMMV5B.js";
4
+ } from "./chunk-5U7LETMH.js";
5
+ import {
6
+ getChromeDevtoolsHtml
7
+ } from "./chunk-DZEMXGMI.js";
8
+ import "./chunk-5JBD5THX.js";
8
9
 
9
10
  // src/rspack.ts
10
11
  import { createRspackPlugin } from "unplugin";
@@ -40,18 +41,10 @@ var rspack_default = (options) => {
40
41
  if (req.url !== "/__chrome_devtools") {
41
42
  return next();
42
43
  }
43
- const availablePort = resovedInfo.availablePort;
44
44
  try {
45
- const raw = await fetch(`http://localhost:${availablePort}/targets`);
46
- const data = await raw.json();
47
- if ((data == null ? void 0 : data.targets.length) > 0) {
48
- const devToolsUrl = `http://localhost:${availablePort}/front_end/chii_app.html?ws=localhost:${availablePort}/client/${Math.random().toString(20).substring(2, 8)}?target=${data.targets[0].id}&rtc=false`;
49
- res.writeHead(302, { Location: devToolsUrl });
50
- res.end();
51
- } else {
52
- res.writeHead(404);
53
- res.end();
54
- }
45
+ res.writeHead(200, { "Content-Type": "text/html; charset=utf-8" });
46
+ res.write(getChromeDevtoolsHtml(resovedInfo.availablePort));
47
+ res.end();
55
48
  } catch (error) {
56
49
  debug(`${error}`);
57
50
  res.writeHead(502);
package/dist/types.d.ts CHANGED
@@ -12,8 +12,11 @@ interface Options {
12
12
  chii?: {
13
13
  /** default true */
14
14
  enable?: boolean;
15
- /** default 127.0.0.1 */
16
- host: string;
15
+ /**
16
+ * default false
17
+ * @link [chii embedded](https://chii.liriliri.io/docs/#usage)
18
+ */
19
+ embedded?: boolean;
17
20
  };
18
21
  debugCookies?: string[];
19
22
  }
package/dist/utils.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  interopDefault
3
3
  } from "./chunk-KQOHODTC.js";
4
- import "./chunk-MCTMMV5B.js";
4
+ import "./chunk-5JBD5THX.js";
5
5
  export {
6
6
  interopDefault
7
7
  };
package/dist/vite.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  vite_default
3
- } from "./chunk-552KT7KH.js";
4
- import "./chunk-W3PXXTYA.js";
5
- import "./chunk-A2RZ6ACY.js";
3
+ } from "./chunk-7VYUT3GL.js";
6
4
  import "./chunk-KQOHODTC.js";
7
- import "./chunk-MCTMMV5B.js";
5
+ import "./chunk-5U7LETMH.js";
6
+ import "./chunk-DZEMXGMI.js";
7
+ import "./chunk-5JBD5THX.js";
8
8
  export {
9
9
  vite_default as default
10
10
  };
package/dist/webpack.js CHANGED
@@ -1,10 +1,11 @@
1
1
  import {
2
- fetch,
3
2
  resovedInfo,
4
3
  unpluginFactory
5
- } from "./chunk-W3PXXTYA.js";
6
- import "./chunk-A2RZ6ACY.js";
7
- import "./chunk-MCTMMV5B.js";
4
+ } from "./chunk-5U7LETMH.js";
5
+ import {
6
+ getChromeDevtoolsHtml
7
+ } from "./chunk-DZEMXGMI.js";
8
+ import "./chunk-5JBD5THX.js";
8
9
 
9
10
  // src/webpack.ts
10
11
  import { createWebpackPlugin } from "unplugin";
@@ -37,18 +38,10 @@ var webpack_default = (options) => {
37
38
  }
38
39
  if (enableChii) {
39
40
  devServer.app.get("/__chrome_devtools", async (_req, res) => {
40
- const availablePort = resovedInfo.availablePort;
41
41
  try {
42
- const raw = await fetch(`http://localhost:${availablePort}/targets`);
43
- const data = await raw.json();
44
- if ((data == null ? void 0 : data.targets.length) > 0) {
45
- const devToolsUrl = `http://localhost:${availablePort}/front_end/chii_app.html?ws=localhost:${availablePort}/client/${Math.random().toString(20).substring(2, 8)}?target=${data.targets[0].id}&rtc=false`;
46
- res.writeHead(302, { Location: devToolsUrl });
47
- res.end();
48
- } else {
49
- res.writeHead(404);
50
- res.end();
51
- }
42
+ res.writeHead(200, { "Content-Type": "text/html; charset=utf-8" });
43
+ res.write(getChromeDevtoolsHtml(resovedInfo.availablePort));
44
+ res.end();
52
45
  } catch (error) {
53
46
  debug(`${error}`);
54
47
  res.writeHead(502);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "unplugin-dingtalk",
3
3
  "type": "module",
4
- "version": "1003.0.0",
4
+ "version": "1004.0.0",
5
5
  "description": "",
6
6
  "license": "MIT",
7
7
  "homepage": "https://github.com/zcf0508/unplugin-dingtalk#readme",
@@ -99,7 +99,6 @@
99
99
  "eslint-plugin-security": "^3.0.0",
100
100
  "fast-glob": "^3.3.2",
101
101
  "get-port-please": "^3.1.2",
102
- "node-fetch": "^3.3.2",
103
102
  "nodemon": "^3.0.2",
104
103
  "rimraf": "^5.0.5",
105
104
  "rollup": "^4.6.1",