@dev-to/react-loader 0.3.0 → 1.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/README.md +36 -4
- package/dist/ReactLoader.d.ts +9 -3
- package/dist/ReactLoader.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +21 -3
- package/dist/index.umd.js +29 -6
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -46,14 +46,46 @@ export function Demo() {
|
|
|
46
46
|
|
|
47
47
|
## 默认桥接端点
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
-
|
|
49
|
+
### v2.0+ 统一发现端点(推荐)
|
|
50
|
+
- **Discovery**: `/__dev_to__/discovery.json` - 统一发现端点,包含所有配置信息
|
|
51
|
+
|
|
52
|
+
### React 专用端点(兼容)
|
|
53
|
+
- **Contract**: `/__dev_to__/react/contract.js` - 桥接合约
|
|
54
|
+
- **Init**: `/__dev_to__/react/init.js` - 初始化脚本
|
|
51
55
|
|
|
52
56
|
这些端点常量由 `@dev-to/react-shared` 统一定义,保证与 `@dev-to/react-plugin` 保持一致。
|
|
53
57
|
|
|
54
58
|
可通过 `contractEndpoint` 自定义 contract 路径;init 路径由 contract 返回值决定(未提供时回退到默认值)。
|
|
55
59
|
|
|
60
|
+
### 新增功能(v2.0+)
|
|
61
|
+
|
|
62
|
+
使用新的发现端点 API:
|
|
63
|
+
|
|
64
|
+
```tsx
|
|
65
|
+
import { loadDiscoveryContract } from '@dev-to/react-loader'
|
|
66
|
+
|
|
67
|
+
// 加载统一发现合约
|
|
68
|
+
const discovery = await loadDiscoveryContract('http://localhost:5173')
|
|
69
|
+
|
|
70
|
+
console.log(discovery.framework.type) // 'react'
|
|
71
|
+
console.log(discovery.framework.version) // '18.2.0'
|
|
72
|
+
console.log(discovery.server.origins) // 所有可用的 origin
|
|
73
|
+
console.log(discovery.components) // 组件映射
|
|
74
|
+
```
|
|
75
|
+
|
|
56
76
|
## 导出内容
|
|
57
77
|
|
|
58
|
-
|
|
59
|
-
-
|
|
78
|
+
### React 组件
|
|
79
|
+
- `ReactLoader` - 主加载器组件
|
|
80
|
+
|
|
81
|
+
### 底层能力
|
|
82
|
+
- `loadDiscoveryContract` - (新) 加载统一发现合约
|
|
83
|
+
- `loadBridgeContract` - 加载桥接合约(兼容旧版)
|
|
84
|
+
- `ensureBridgeInit` - 确保 HMR 运行时初始化
|
|
85
|
+
- `resolveReactEntry` - 解析组件入口 URL
|
|
86
|
+
- `resolveReactEntryForLoader` - 带错误处理的入口解析
|
|
87
|
+
|
|
88
|
+
### 常量
|
|
89
|
+
- `DEFAULT_DISCOVERY_ENDPOINT` - (新) 默认发现端点
|
|
90
|
+
- `DEFAULT_CONTRACT_ENDPOINT` - 默认合约端点
|
|
91
|
+
- `DEFAULT_INIT_ENDPOINT` - 默认初始化端点
|
package/dist/ReactLoader.d.ts
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
-
import { type DevToReactBridgeContract } from '@dev-to/react-shared';
|
|
2
|
+
import { type DevToDiscoveryContract, type DevToReactBridgeContract } from '@dev-to/react-shared';
|
|
3
3
|
/**
|
|
4
4
|
* --- DevTo React Bridge Protocol Types & Utils ---
|
|
5
5
|
*/
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
6
|
+
export declare const DEFAULT_DISCOVERY_ENDPOINT: "/__dev_to__/discovery.json";
|
|
7
|
+
export declare const DEFAULT_CONTRACT_ENDPOINT: "/__dev_to__/react/contract.js";
|
|
8
|
+
export declare const DEFAULT_INIT_ENDPOINT: "/__dev_to__/react/init.js";
|
|
9
|
+
/**
|
|
10
|
+
* Load unified discovery contract from dev server (framework-agnostic).
|
|
11
|
+
* This is the new recommended way to discover server capabilities.
|
|
12
|
+
*/
|
|
13
|
+
export declare function loadDiscoveryContract(origin: string, discoveryEndpoint?: string): Promise<DevToDiscoveryContract>;
|
|
8
14
|
/** 加载远程 dev server 的桥接合约(无副作用) */
|
|
9
15
|
export declare function loadBridgeContract(origin: string, contractEndpoint?: string): Promise<DevToReactBridgeContract>;
|
|
10
16
|
/** 初始化远程 dev server 的 HMR/Refresh 运行时 */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReactLoader.d.ts","sourceRoot":"","sources":["../src/ReactLoader.tsx"],"names":[],"mappings":"AAAA,OAAc,EAQZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAA;AAGd,OAAO,
|
|
1
|
+
{"version":3,"file":"ReactLoader.d.ts","sourceRoot":"","sources":["../src/ReactLoader.tsx"],"names":[],"mappings":"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"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { DEFAULT_CONTRACT_ENDPOINT, DEFAULT_INIT_ENDPOINT, ReactLoader, ensureBridgeInit, loadBridgeContract, resolveReactEntry, resolveReactEntryForLoader, } from './ReactLoader.js';
|
|
1
|
+
export { DEFAULT_CONTRACT_ENDPOINT, DEFAULT_DISCOVERY_ENDPOINT, DEFAULT_INIT_ENDPOINT, ReactLoader, ensureBridgeInit, loadBridgeContract, loadDiscoveryContract, resolveReactEntry, resolveReactEntryForLoader, } from './ReactLoader.js';
|
|
2
2
|
export type { ReactEntryResolution, ReactEntryResolutionError, ReactEntryResolutionResult, ReactLoaderError, ReactLoaderProps, } from './ReactLoader.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,WAAW,EACX,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,0BAA0B,GAC3B,MAAM,kBAAkB,CAAA;AAEzB,YAAY,EACV,oBAAoB,EACpB,yBAAyB,EACzB,0BAA0B,EAC1B,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,kBAAkB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,0BAA0B,EAC1B,qBAAqB,EACrB,WAAW,EACX,gBAAgB,EAChB,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,EACjB,0BAA0B,GAC3B,MAAM,kBAAkB,CAAA;AAEzB,YAAY,EACV,oBAAoB,EACpB,yBAAyB,EACzB,0BAA0B,EAC1B,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,kBAAkB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
3
|
-
import { DEV_TO_REACT_BASE_PATH, DEV_TO_REACT_CONTRACT_PATH,
|
|
3
|
+
import { DEV_TO_DEBUG_HTML_PATH, DEV_TO_DISCOVERY_PATH, DEV_TO_REACT_BASE_PATH, DEV_TO_REACT_CONTRACT_PATH, DEV_TO_REACT_INIT_PATH, DEV_TO_REACT_NAMESPACE } from "@dev-to/react-shared";
|
|
4
4
|
function isRecord(value) {
|
|
5
5
|
return 'object' == typeof value && null !== value;
|
|
6
6
|
}
|
|
@@ -22,6 +22,7 @@ function resolveRemoteRuntime(runtimeModule) {
|
|
|
22
22
|
ReactDOMClient: domCandidate
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
|
+
const DEFAULT_DISCOVERY_ENDPOINT = DEV_TO_DISCOVERY_PATH;
|
|
25
26
|
const DEFAULT_CONTRACT_ENDPOINT = DEV_TO_REACT_CONTRACT_PATH;
|
|
26
27
|
const DEFAULT_INIT_ENDPOINT = DEV_TO_REACT_INIT_PATH;
|
|
27
28
|
function resolveEndpointUrl(origin, endpoint) {
|
|
@@ -44,8 +45,25 @@ function resolveContract(initModule) {
|
|
|
44
45
|
return contractCandidate;
|
|
45
46
|
}
|
|
46
47
|
const nativeImport = new Function('url', 'return import(url)');
|
|
48
|
+
const discoveryCache = new Map();
|
|
47
49
|
const contractCache = new Map();
|
|
48
50
|
const initCache = new Map();
|
|
51
|
+
async function loadDiscoveryContract(origin, discoveryEndpoint) {
|
|
52
|
+
const endpoint = discoveryEndpoint || DEFAULT_DISCOVERY_ENDPOINT;
|
|
53
|
+
const discoveryUrl = resolveEndpointUrl(origin, endpoint);
|
|
54
|
+
if (discoveryCache.has(discoveryUrl)) return discoveryCache.get(discoveryUrl);
|
|
55
|
+
const p = fetch(discoveryUrl).then(async (resp)=>{
|
|
56
|
+
if (!resp.ok) throw new Error(`Discovery endpoint returned ${resp.status}: ${resp.statusText}`);
|
|
57
|
+
const data = await resp.json();
|
|
58
|
+
if (!data || 'object' != typeof data) throw new Error('Invalid discovery response: not a JSON object');
|
|
59
|
+
return data;
|
|
60
|
+
}).catch((e)=>{
|
|
61
|
+
discoveryCache.delete(discoveryUrl);
|
|
62
|
+
throw e instanceof Error ? e : new Error(String(e));
|
|
63
|
+
});
|
|
64
|
+
discoveryCache.set(discoveryUrl, p);
|
|
65
|
+
return p;
|
|
66
|
+
}
|
|
49
67
|
async function loadBridgeContract(origin, contractEndpoint) {
|
|
50
68
|
const endpoint = contractEndpoint || DEFAULT_CONTRACT_ENDPOINT;
|
|
51
69
|
const initUrl = resolveEndpointUrl(origin, endpoint);
|
|
@@ -499,7 +517,7 @@ function InlineViteErrorView(props) {
|
|
|
499
517
|
fontStyle: 'italic'
|
|
500
518
|
}
|
|
501
519
|
};
|
|
502
|
-
const debugPanelUrl = `${currentOrigin}${
|
|
520
|
+
const debugPanelUrl = `${currentOrigin}${DEV_TO_DEBUG_HTML_PATH}`;
|
|
503
521
|
const componentNameLabel = componentName || '';
|
|
504
522
|
return /*#__PURE__*/ jsxs("div", {
|
|
505
523
|
className: "vdev-container",
|
|
@@ -856,4 +874,4 @@ function ReactLoader(props) {
|
|
|
856
874
|
]
|
|
857
875
|
});
|
|
858
876
|
}
|
|
859
|
-
export { DEFAULT_CONTRACT_ENDPOINT, DEFAULT_INIT_ENDPOINT, ReactLoader, ensureBridgeInit, loadBridgeContract, resolveReactEntry, resolveReactEntryForLoader };
|
|
877
|
+
export { DEFAULT_CONTRACT_ENDPOINT, DEFAULT_DISCOVERY_ENDPOINT, DEFAULT_INIT_ENDPOINT, ReactLoader, ensureBridgeInit, loadBridgeContract, loadDiscoveryContract, resolveReactEntry, resolveReactEntryForLoader };
|
package/dist/index.umd.js
CHANGED
|
@@ -56,21 +56,26 @@
|
|
|
56
56
|
(()=>{
|
|
57
57
|
__webpack_require__.r(__webpack_exports__);
|
|
58
58
|
__webpack_require__.d(__webpack_exports__, {
|
|
59
|
+
resolveReactEntryForLoader: ()=>resolveReactEntryForLoader,
|
|
59
60
|
resolveReactEntry: ()=>resolveReactEntry,
|
|
60
61
|
loadBridgeContract: ()=>loadBridgeContract,
|
|
61
62
|
DEFAULT_CONTRACT_ENDPOINT: ()=>DEFAULT_CONTRACT_ENDPOINT,
|
|
63
|
+
DEFAULT_DISCOVERY_ENDPOINT: ()=>DEFAULT_DISCOVERY_ENDPOINT,
|
|
62
64
|
ensureBridgeInit: ()=>ensureBridgeInit,
|
|
63
65
|
ReactLoader: ()=>ReactLoader,
|
|
64
66
|
DEFAULT_INIT_ENDPOINT: ()=>DEFAULT_INIT_ENDPOINT,
|
|
65
|
-
|
|
67
|
+
loadDiscoveryContract: ()=>loadDiscoveryContract
|
|
66
68
|
});
|
|
67
69
|
var external_React_ = __webpack_require__("react");
|
|
68
70
|
var external_React_default = /*#__PURE__*/ __webpack_require__.n(external_React_);
|
|
69
|
-
const
|
|
70
|
-
const
|
|
71
|
+
const DEV_TO_NAMESPACE = 'dev_to';
|
|
72
|
+
const DEV_TO_BASE_PATH = `/__${DEV_TO_NAMESPACE}__`;
|
|
73
|
+
const DEV_TO_DISCOVERY_PATH = `${DEV_TO_BASE_PATH}/discovery.json`;
|
|
74
|
+
const DEV_TO_DEBUG_HTML_PATH = `${DEV_TO_BASE_PATH}/debug.html`;
|
|
75
|
+
const DEV_TO_REACT_NAMESPACE = 'react';
|
|
76
|
+
const DEV_TO_REACT_BASE_PATH = `${DEV_TO_BASE_PATH}/${DEV_TO_REACT_NAMESPACE}`;
|
|
71
77
|
const DEV_TO_REACT_CONTRACT_PATH = `${DEV_TO_REACT_BASE_PATH}/contract.js`;
|
|
72
78
|
const DEV_TO_REACT_INIT_PATH = `${DEV_TO_REACT_BASE_PATH}/init.js`;
|
|
73
|
-
const DEV_TO_REACT_DEBUG_HTML_PATH = `${DEV_TO_REACT_BASE_PATH}/debug.html`;
|
|
74
79
|
function isRecord(value) {
|
|
75
80
|
return 'object' == typeof value && null !== value;
|
|
76
81
|
}
|
|
@@ -92,6 +97,7 @@
|
|
|
92
97
|
ReactDOMClient: domCandidate
|
|
93
98
|
};
|
|
94
99
|
}
|
|
100
|
+
const DEFAULT_DISCOVERY_ENDPOINT = DEV_TO_DISCOVERY_PATH;
|
|
95
101
|
const DEFAULT_CONTRACT_ENDPOINT = DEV_TO_REACT_CONTRACT_PATH;
|
|
96
102
|
const DEFAULT_INIT_ENDPOINT = DEV_TO_REACT_INIT_PATH;
|
|
97
103
|
function resolveEndpointUrl(origin, endpoint) {
|
|
@@ -114,8 +120,25 @@
|
|
|
114
120
|
return contractCandidate;
|
|
115
121
|
}
|
|
116
122
|
const nativeImport = new Function('url', 'return import(url)');
|
|
123
|
+
const discoveryCache = new Map();
|
|
117
124
|
const contractCache = new Map();
|
|
118
125
|
const initCache = new Map();
|
|
126
|
+
async function loadDiscoveryContract(origin, discoveryEndpoint) {
|
|
127
|
+
const endpoint = discoveryEndpoint || DEFAULT_DISCOVERY_ENDPOINT;
|
|
128
|
+
const discoveryUrl = resolveEndpointUrl(origin, endpoint);
|
|
129
|
+
if (discoveryCache.has(discoveryUrl)) return discoveryCache.get(discoveryUrl);
|
|
130
|
+
const p = fetch(discoveryUrl).then(async (resp)=>{
|
|
131
|
+
if (!resp.ok) throw new Error(`Discovery endpoint returned ${resp.status}: ${resp.statusText}`);
|
|
132
|
+
const data = await resp.json();
|
|
133
|
+
if (!data || 'object' != typeof data) throw new Error('Invalid discovery response: not a JSON object');
|
|
134
|
+
return data;
|
|
135
|
+
}).catch((e)=>{
|
|
136
|
+
discoveryCache.delete(discoveryUrl);
|
|
137
|
+
throw e instanceof Error ? e : new Error(String(e));
|
|
138
|
+
});
|
|
139
|
+
discoveryCache.set(discoveryUrl, p);
|
|
140
|
+
return p;
|
|
141
|
+
}
|
|
119
142
|
async function loadBridgeContract(origin, contractEndpoint) {
|
|
120
143
|
const endpoint = contractEndpoint || DEFAULT_CONTRACT_ENDPOINT;
|
|
121
144
|
const initUrl = resolveEndpointUrl(origin, endpoint);
|
|
@@ -400,7 +423,7 @@
|
|
|
400
423
|
const { errorMessage, currentOrigin, componentName, setupGuide, statusCode } = props;
|
|
401
424
|
const isComponentNotFound = errorMessage.includes('not found in devComponentMap');
|
|
402
425
|
const isFetchError = errorMessage.includes('Failed to fetch dynamically imported module');
|
|
403
|
-
const isInternalBridgeFile = errorMessage.includes(DEV_TO_REACT_BASE_PATH) || errorMessage.includes(
|
|
426
|
+
const isInternalBridgeFile = errorMessage.includes(DEV_TO_REACT_BASE_PATH) || errorMessage.includes("react");
|
|
404
427
|
const isContractError = errorMessage.includes('Vite dev contract not found') || errorMessage.includes('Failed to load Vite bridge contract') || errorMessage.includes('Failed to load contract from') || isFetchError && isInternalBridgeFile;
|
|
405
428
|
const isModuleFetchError = isFetchError && !isInternalBridgeFile;
|
|
406
429
|
let title = 'Vite Server Error';
|
|
@@ -569,7 +592,7 @@
|
|
|
569
592
|
fontStyle: 'italic'
|
|
570
593
|
}
|
|
571
594
|
};
|
|
572
|
-
const debugPanelUrl = `${currentOrigin}${
|
|
595
|
+
const debugPanelUrl = `${currentOrigin}${DEV_TO_DEBUG_HTML_PATH}`;
|
|
573
596
|
const componentNameLabel = componentName || '';
|
|
574
597
|
return /*#__PURE__*/ external_React_default().createElement("div", {
|
|
575
598
|
className: "vdev-container",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dev-to/react-loader",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"access": "public"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@dev-to/react-shared": "0.
|
|
32
|
+
"@dev-to/react-shared": "1.0.0"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
35
|
"build": "rslib build",
|