whistle.global-magic-preview-component-local-resource 1.0.2 → 1.0.3

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/.console.log CHANGED
@@ -1,23 +1,4 @@
1
-
2
- From: whistle.demo-redirect@1.0.1
3
- Node: v16.20.2
4
- Host: GL7TGHYG23
5
- Date: 12/24/2025, 12:01:36 PM
6
- TypeError: Cannot read properties of undefined (reading 'ok')
7
- at checkResPort (/Users/bytedance/Desktop/package/lib/rulesServer.js:9:15)
8
- at processTicksAndRejections (node:internal/process/task_queues:96:5)
9
- at async Server.<anonymous> (/Users/bytedance/Desktop/package/lib/rulesServer.js:28:21)新的 common-component-button
10
- 新的 common-component-button
11
- 新的 common-component-button
12
- 新的 common-component-image
13
- 新的 common-component-button
14
- 新的 common-component-image
15
-
16
- From: whistle.demo-redirect@1.0.1
17
- Node: v16.20.2
18
- Host: GL7TGHYG23
19
- Date: 12/24/2025, 2:10:36 PM
20
- TypeError: Cannot read properties of undefined (reading 'ok')
21
- at checkResPort (/Users/bytedance/Desktop/package/lib/rulesServer.js:13:15)
22
- at processTicksAndRejections (node:internal/process/task_queues:96:5)
23
- at async Server.<anonymous> (/Users/bytedance/Desktop/package/lib/rulesServer.js:33:21)
1
+ componentName: common-component-button, port: 8080, url: http://127.0.0.1:8080/common-component-button_index.js
2
+ componentName: common-component-image, port: 8082, url: http://127.0.0.1:8082/common-component-image_index.js
3
+ componentName: common-component-button, port: 8080, url: http://127.0.0.1:8080/common-component-button_index.js
4
+ componentName: common-component-image, port: 8082, url: http://127.0.0.1:8082/common-component-image_index.js
@@ -35,6 +35,7 @@ module.exports = async (server) => {
35
35
  const ports = [8080, 8082, 8084, 8086, 8088]
36
36
  const headRes = await checkResPort(ports, 0, componentName)
37
37
  if (headRes?.ok && method === "GET") {
38
+ console.log(`componentName: ${componentName}, port: ${headRes.port}, url: ${headRes.url}`)
38
39
  res.end(`https://sf16-website.neutral.ttwstatic.com${url} ${headRes.url}`);
39
40
  } else {
40
41
  res.end();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whistle.global-magic-preview-component-local-resource",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "将线上JS资源转发到本地IP对应的文件",
5
5
  "main": "index.js",
6
6
  "publicConfig": {
@@ -17,7 +17,7 @@
17
17
  "author": "suyuefeng",
18
18
  "license": "ISC",
19
19
  "whistleConfig": {
20
- "name": "preview-component-local-resource",
20
+ "name": "global-magic-preview-component-local-resource",
21
21
  "ui": "ui/index.html",
22
22
  "rules": "rules.txt",
23
23
  "_rules": "_rules.txt"
package/rules.txt CHANGED
@@ -1,2 +1,2 @@
1
1
  # 写法 A (推荐): 匹配的URL whistle.你的插件名://
2
- /common-component-[^_]+/ whistle.demo-redirect://
2
+ /common-component-[^_]+/ whistle.global-magic-preview-component-local-resource://