@peninsula-med/beisen-ehr-plugin 1.0.3 → 1.0.4
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 +11 -0
- package/package.json +1 -1
- package/scripts/configure.js +32 -3
package/README.md
CHANGED
|
@@ -19,10 +19,21 @@ openclaw plugins install @peninsula-med/beisen-ehr-plugin
|
|
|
19
19
|
|
|
20
20
|
**方式 A:使用配置向导(推荐 ⭐)**
|
|
21
21
|
|
|
22
|
+
**Mac/Linux:**
|
|
22
23
|
```bash
|
|
23
24
|
node ~/.openclaw/extensions/beisen-ehr-plugin/scripts/configure.js
|
|
24
25
|
```
|
|
25
26
|
|
|
27
|
+
**Windows:**
|
|
28
|
+
```bash
|
|
29
|
+
node %USERPROFILE%\.openclaw\extensions\beisen-ehr-plugin\scripts\configure.js
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
或使用完整路径:
|
|
33
|
+
```bash
|
|
34
|
+
node C:\Users\Administrator\.openclaw\extensions\beisen-ehr-plugin\scripts\configure.js
|
|
35
|
+
```
|
|
36
|
+
|
|
26
37
|
按提示输入北森凭证即可,自动完成配置!
|
|
27
38
|
|
|
28
39
|
**方式 B:运行配置脚本**
|
package/package.json
CHANGED
package/scripts/configure.js
CHANGED
|
@@ -119,10 +119,39 @@ async function main() {
|
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
// 写入配置
|
|
122
|
-
|
|
122
|
+
try {
|
|
123
|
+
fs.writeFileSync(configPath, JSON.stringify(openclawConfig, null, 2), 'utf-8');
|
|
124
|
+
console.log('');
|
|
125
|
+
console.log('✅ 配置已保存到:', configPath);
|
|
126
|
+
console.log('');
|
|
127
|
+
|
|
128
|
+
// 验证写入
|
|
129
|
+
const verifyContent = fs.readFileSync(configPath, 'utf-8');
|
|
130
|
+
const verifyConfig = JSON.parse(verifyContent);
|
|
131
|
+
if (verifyConfig.plugins && verifyConfig.plugins['@peninsula-med/beisen-ehr-plugin']) {
|
|
132
|
+
console.log('✅ 配置验证成功!');
|
|
133
|
+
} else {
|
|
134
|
+
console.log('⚠️ 配置验证失败,请检查配置文件');
|
|
135
|
+
}
|
|
136
|
+
} catch (writeError) {
|
|
137
|
+
console.error('');
|
|
138
|
+
console.error('❌ 保存配置失败:', writeError.message);
|
|
139
|
+
console.error('');
|
|
140
|
+
console.error('请手动编辑配置文件:');
|
|
141
|
+
console.error(' ' + configPath);
|
|
142
|
+
console.error('');
|
|
143
|
+
console.error('添加以下内容:');
|
|
144
|
+
console.error(JSON.stringify({
|
|
145
|
+
plugins: {
|
|
146
|
+
'@peninsula-med/beisen-ehr-plugin': {
|
|
147
|
+
enabled: true,
|
|
148
|
+
config: config
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}, null, 2));
|
|
152
|
+
throw writeError;
|
|
153
|
+
}
|
|
123
154
|
|
|
124
|
-
console.log('');
|
|
125
|
-
console.log('✅ 配置已保存!');
|
|
126
155
|
console.log('');
|
|
127
156
|
console.log('📋 配置摘要:');
|
|
128
157
|
console.log(' • API 地址:', config.apiUrl);
|