@lovrabet/dataset-mcp-server 1.3.2-beta.1 → 1.3.2-beta.5
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 +116 -126
- package/dist/analyzer/dataset-analyzer.js +1 -1
- package/dist/api/cache.js +1 -1
- package/dist/api/dev-api-client.js +1 -1
- package/dist/auth/constants.js +1 -1
- package/dist/auth/cookie-manager.js +1 -1
- package/dist/auth/session-validator.js +1 -1
- package/dist/config/env.js +1 -0
- package/dist/index.js +1 -1
- package/dist/server.js +1 -1
- package/dist/tools/execute-custom-sql.js +1 -1
- package/dist/tools/generate-sdk-code.js +1 -1
- package/dist/tools/generate-sql-code.js +1 -1
- package/dist/tools/get-dataset-detail.js +1 -1
- package/dist/tools/get-operation-detail.js +1 -1
- package/dist/tools/get-operations.js +1 -1
- package/dist/tools/index.js +1 -1
- package/dist/tools/list-datasets.js +1 -1
- package/dist/tools/list-sql-queries.js +1 -1
- package/dist/tools/login.js +1 -1
- package/dist/tools/save-or-update-custom-sql.js +1 -1
- package/dist/tools/search-datasets.js +1 -1
- package/dist/tools/validate-sql-content.js +1 -1
- package/dist/types/index.js +1 -1
- package/dist/types/mcp-types.js +1 -1
- package/dist/utils/rate-limiter.js +1 -0
- package/dist/utils/sql-parser.js +1 -1
- package/package.json +2 -2
- package/dist/tools/save-custom-sql.js +0 -1
package/README.md
CHANGED
|
@@ -1,185 +1,175 @@
|
|
|
1
|
-
# Lovrabet
|
|
1
|
+
# Lovrabet Dataset MCP Server
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> **AI-Native 数据集访问工具** - 让 Cursor/Claude Desktop 直接操作 Lovrabet 数据,10倍提升开发效率
|
|
4
4
|
|
|
5
|
-

|
|
6
|
-
](https://www.npmjs.com/package/@lovrabet/dataset-mcp-server)
|
|
6
|
+
[](https://www.npmjs.com/package/@lovrabet/dataset-mcp-server)
|
|
7
|
+
[](https://www.npmjs.com/package/@lovrabet-mcp-server)
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
本 MCP Server 是基于 [lovrabet 平台](https://www.lovrabet.com) 生成的业务系统二次开发而设计,能够方便开发者在 Cursor、ClaudeCode、 Qoder、Trae 等体系快速实现 Lovrabet 应用的扩展开发,**脱离 Lovrabet 体系单独使用无效**
|
|
9
|
+
---
|
|
12
10
|
|
|
13
|
-
##
|
|
11
|
+
## 💡 为什么需要它?
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
- 🔍 **完整的数据集分析**:基于 @lovrabet/dsparser 的全面元数据提取
|
|
17
|
-
- 📝 **SDK 代码生成**:自动生成完整的 TypeScript SDK 代码(支持简化和完整两种模式)
|
|
18
|
-
- 🔎 **智能搜索**:通过关键词快速查找数据集
|
|
19
|
-
- 🔐 **浏览器登录**:安全便捷的浏览器登录流程,Cookie 自动管理
|
|
20
|
-
- 🧪 **完整测试覆盖**:44+ 单元测试,确保代码质量
|
|
21
|
-
- 📚 **丰富示例**:3 个完整的使用示例,快速上手
|
|
13
|
+
**传统开发:手动查阅,反复切换**
|
|
22
14
|
|
|
23
|
-
|
|
15
|
+
```
|
|
16
|
+
需求 → 翻文档找数据集 → 复制字段定义 → 写 API 调用
|
|
17
|
+
→ 发现字段名记错 → 切回后台查看 → 修改代码
|
|
18
|
+
→ 忘记枚举值 → 再查文档 → 循环往复
|
|
19
|
+
```
|
|
24
20
|
|
|
25
|
-
|
|
21
|
+
**一个简单的查询功能,耗时 30 分钟以上。**
|
|
26
22
|
|
|
27
|
-
|
|
23
|
+
---
|
|
28
24
|
|
|
29
|
-
|
|
25
|
+
**通用 Vibe Coding:生成快,调试慢**
|
|
30
26
|
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"command": "npx",
|
|
36
|
-
"args": ["-y", "@lovrabet/dataset-mcp-server"],
|
|
37
|
-
"env": {
|
|
38
|
-
"LOVRABET_APP_CODE": "你的应用AppCode,例如app-12345678",
|
|
39
|
-
"LOVRABET_ENV": "online"
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
27
|
+
```
|
|
28
|
+
让 AI 写代码 → 5 分钟生成完成 → 运行报错
|
|
29
|
+
→ 字段名猜错了 → 类型不匹配 → 枚举值写错
|
|
30
|
+
→ 修复一处又一处 → 2 小时调试循环
|
|
44
31
|
```
|
|
45
32
|
|
|
46
|
-
|
|
33
|
+
**AI 没有业务数据集上下文,全靠"幻觉"和猜测,字段名、类型、枚举值一错再错。**
|
|
47
34
|
|
|
48
|
-
|
|
49
|
-
|-----|-----|-------|-----|
|
|
50
|
-
| `LOVRABET_APP_CODE` | ✅ | - | 你的应用 AppCode |
|
|
51
|
-
| `LOVRABET_ENV` | ❌ | `online` | 环境:`online` 或 `daily` |
|
|
52
|
-
| `LOVRABET_API_BASEURL` | ❌ | `https://api.lovrabet.com` | API 基础 URL(覆盖默认) |
|
|
53
|
-
| `LOVRABET_RUNTIME_BASEURL` | ❌ | `https://runtime.lovrabet.com` | Runtime API 基础 URL(覆盖默认) |
|
|
54
|
-
| `LOVRABET_USER_BASEURL` | ❌ | `https://user.lovrabet.com` | User API 基础 URL(覆盖默认) |
|
|
35
|
+
---
|
|
55
36
|
|
|
56
|
-
|
|
37
|
+
**使用 Lovrabet MCP:代码即用**
|
|
57
38
|
|
|
58
|
-
|
|
39
|
+
```
|
|
40
|
+
Cursor 中询问:"客户数据集有哪些字段?如何查询?"
|
|
41
|
+
→ AI 直接读取真实元数据 → 字段名、类型、枚举值全部准确
|
|
42
|
+
→ 生成可运行代码 → 复制即用
|
|
43
|
+
```
|
|
59
44
|
|
|
60
|
-
|
|
61
|
-
- ✅ 总是使用最新版本
|
|
62
|
-
- ✅ 多个项目可以使用不同版本
|
|
45
|
+
**耗时 2 分钟。效率提升 15 倍,返工率降低 50%。**
|
|
63
46
|
|
|
64
|
-
|
|
47
|
+
---
|
|
65
48
|
|
|
66
|
-
|
|
49
|
+
## ✨ 核心价值
|
|
67
50
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
51
|
+
- **开发效率 ↑ 300%** - AI 自动生成代码,减少查阅文档时间
|
|
52
|
+
- **减少返工率 50%** - 代码基于真实元数据生成,字段名、类型不会错
|
|
53
|
+
- **新人上手时间 ↓ 80%** - 无需学习 Lovrabet 后台操作,AI 即时指导
|
|
54
|
+
- **类型安全** - 完整的 TypeScript 类型定义,编译时捕获错误
|
|
55
|
+
- **400+ 测试用例** - 覆盖核心流程,保障稳定性
|
|
71
56
|
|
|
72
|
-
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## 🚀 快速开始
|
|
60
|
+
|
|
61
|
+
### 安装配置
|
|
62
|
+
|
|
63
|
+
在 Claude Desktop / Cursor 的配置文件中添加:
|
|
73
64
|
|
|
74
65
|
```json
|
|
75
66
|
{
|
|
76
67
|
"mcpServers": {
|
|
77
|
-
"lovrabet
|
|
78
|
-
"command": "
|
|
68
|
+
"lovrabet": {
|
|
69
|
+
"command": "npx",
|
|
70
|
+
"args": ["-y", "@lovrabet/dataset-mcp-server"],
|
|
79
71
|
"env": {
|
|
80
|
-
"LOVRABET_APP_CODE": "
|
|
81
|
-
"LOVRABET_ENV": "online"
|
|
72
|
+
"LOVRABET_APP_CODE": "your-app-code-here"
|
|
82
73
|
}
|
|
83
74
|
}
|
|
84
75
|
}
|
|
85
76
|
}
|
|
86
77
|
```
|
|
87
78
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
- ✅ 启动速度更快
|
|
91
|
-
- ✅ 可离线使用
|
|
92
|
-
- ✅ 配置更简洁
|
|
79
|
+
**只需设置 `LOVRABET_APP_CODE` 一个环境变量!**
|
|
93
80
|
|
|
94
81
|
### 开始使用
|
|
95
82
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
## 📊 功能展示
|
|
99
|
-
|
|
100
|
-
### 探索数据集操作
|
|
101
|
-
|
|
102
|
-
每个数据集都附带详细的 API 操作信息:
|
|
83
|
+
重启 IDE,直接在对话中提问:
|
|
103
84
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
girlfriend_id: 1,
|
|
120
|
-
reminder_time: "2025-11-02",
|
|
85
|
+
```
|
|
86
|
+
你:列出所有数据集
|
|
87
|
+
AI:[调用 list_datasets] 找到 15 个数据集...
|
|
88
|
+
|
|
89
|
+
你:客户数据集有哪些字段?
|
|
90
|
+
AI:[调用 get_dataset_detail] 客户数据集包含以下字段:
|
|
91
|
+
- id (主键,必填)
|
|
92
|
+
- name (客户名称)
|
|
93
|
+
- status (枚举:1=活跃,2=冻结)
|
|
94
|
+
- ...
|
|
95
|
+
|
|
96
|
+
你:帮我写一个查询活跃客户的代码
|
|
97
|
+
AI:[调用 generate_sdk_code] 这是完整代码:
|
|
98
|
+
const result = await client.models.customer.filter({
|
|
99
|
+
where: { status: { $eq: 1 } }
|
|
121
100
|
});
|
|
122
101
|
```
|
|
123
102
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
- 字段类型和约束
|
|
127
|
-
- 主键和关系
|
|
128
|
-
- 必填与可选字段
|
|
129
|
-
- 自增和时间戳字段
|
|
103
|
+
---
|
|
130
104
|
|
|
131
|
-
|
|
105
|
+
## 📊 功能特性
|
|
132
106
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
107
|
+
| 特性 | 说明 |
|
|
108
|
+
|------|------|
|
|
109
|
+
| **数据集探索** | 列出所有数据集,支持搜索和过滤 |
|
|
110
|
+
| **元数据解析** | 字段类型、主键、枚举值、表关系自动提取 |
|
|
111
|
+
| **SDK 代码生成** | 一键生成完整的 TypeScript SDK |
|
|
112
|
+
| **SQL 保存与执行** | 保存自定义 SQL,执行查询 |
|
|
113
|
+
| **智能关联分析** | 自动发现表间关联关系,简化 JOIN 查询 |
|
|
114
|
+
| **请求缓存** | 相同请求 5 分钟内复用缓存,提升响应速度 |
|
|
137
115
|
|
|
138
|
-
|
|
116
|
+
---
|
|
139
117
|
|
|
140
|
-
##
|
|
118
|
+
## 🛡️ 企业级特性
|
|
141
119
|
|
|
142
|
-
|
|
143
|
-
-
|
|
120
|
+
### 稳定性保障
|
|
121
|
+
- **请求缓存** - 减少重复 API 调用
|
|
122
|
+
- **错误重试** - 网络错误自动重试
|
|
123
|
+
- **Cookie 管理** - 过期自动提示重新登录
|
|
144
124
|
|
|
145
|
-
|
|
125
|
+
### 开发体验
|
|
126
|
+
- **详细错误提示** - 出错时给出具体原因和解决建议
|
|
127
|
+
- **进度可视化** - 长时间操作显示进度条
|
|
128
|
+
- **调试模式** - 可选的详细日志输出
|
|
146
129
|
|
|
147
|
-
|
|
148
|
-
-
|
|
149
|
-
-
|
|
130
|
+
### 质量保证
|
|
131
|
+
- **417+ 测试用例** - 覆盖核心功能
|
|
132
|
+
- **类型安全** - 完整的 TypeScript 类型定义
|
|
133
|
+
- **代码混淆** - 生产代码自动混淆保护
|
|
150
134
|
|
|
151
|
-
|
|
135
|
+
---
|
|
152
136
|
|
|
153
|
-
|
|
137
|
+
## 📦 MCP Tools 列表
|
|
154
138
|
|
|
155
|
-
|
|
139
|
+
| Tool | 功能 | 适用场景 |
|
|
140
|
+
|------|------|----------|
|
|
141
|
+
| `login` | 浏览器登录 | 获取访问凭证 |
|
|
142
|
+
| `list_datasets` | 列出数据集 | 浏览所有可用数据集 |
|
|
143
|
+
| `search_datasets` | 搜索数据集 | 按名称/描述搜索 |
|
|
144
|
+
| `get_dataset_detail` | 获取数据集详情 | 查看字段、操作、关联 |
|
|
145
|
+
| `get_operation_detail` | 获取操作详情 | 查看 API 调用方式 |
|
|
146
|
+
| `generate_sdk` | 生成 SDK 代码 | 生成 TypeScript SDK |
|
|
147
|
+
| `validate_sql` | 验证 SQL | 检查 SQL 语法,检测查询/修改类型 |
|
|
148
|
+
| `save_custom_sql` | 保存自定义 SQL | SELECT 查询自动保存;非 SELECT 返回警告(由客户端处理导出) |
|
|
156
149
|
|
|
157
|
-
|
|
158
|
-
- ✅ **集成使用** - 可以集成到您的开发工具链中
|
|
159
|
-
- ❌ **不得修改** - 不得修改、反编译或逆向工程
|
|
160
|
-
- ❌ **不得再分发** - 不得复制或分发本软件
|
|
161
|
-
- ❌ **源代码不公开** - 本软件为闭源软件
|
|
150
|
+
---
|
|
162
151
|
|
|
163
|
-
|
|
152
|
+
## 📚 文档与支持
|
|
164
153
|
|
|
165
|
-
|
|
154
|
+
- 📖 [完整文档](./docs)
|
|
155
|
+
- 💬 [问题反馈](https://github.com/lovra-bet/lovrabet-dataset-mcp/issues)
|
|
156
|
+
- 📧 技术支持:support@lovrabet.com
|
|
166
157
|
|
|
167
|
-
|
|
158
|
+
---
|
|
168
159
|
|
|
169
|
-
|
|
160
|
+
## 📄 许可证
|
|
170
161
|
|
|
171
|
-
|
|
172
|
-
- ✨ 完整的 SDK 代码生成:支持简化和完整两种模式
|
|
173
|
-
- ✨ 环境特定配置:online 环境不输出 env 配置,daily 环境明确标注
|
|
174
|
-
- ✨ 3 个完整使用示例:快速上手项目
|
|
162
|
+
本软件为 Lovrabet 开放平台专有工具:
|
|
175
163
|
|
|
176
|
-
|
|
164
|
+
- ✅ **允许使用** - 访问 Lovrabet 数据集
|
|
165
|
+
- ✅ **集成使用** - 集成到开发工具链
|
|
166
|
+
- ❌ **不得修改** - 禁止逆向工程
|
|
167
|
+
- ❌ **不得分发** - 禁止复制分发
|
|
177
168
|
|
|
178
|
-
|
|
179
|
-
- 🔧 Cookie 写入失败处理:明确错误提示和恢复建议
|
|
180
|
-
- 🔧 统一配置管理:examples 使用 config.json 集中配置
|
|
181
|
-
- 🔧 自动登录验证:每次使用前自动检查 session 有效性
|
|
169
|
+
详见 [LICENSE](./LICENSE)
|
|
182
170
|
|
|
183
171
|
---
|
|
184
172
|
|
|
185
|
-
<p align="center"
|
|
173
|
+
<p align="center">
|
|
174
|
+
Made with ❤️ by the Lovrabet Team
|
|
175
|
+
</p>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a0_0x3018f2=a0_0x5eb3;(function(_0x2b7c4c,_0x1d9543){const _0x318c73=a0_0x5eb3,_0x41753a=_0x2b7c4c();while(!![]){try{const _0x39193f=parseInt(_0x318c73(0x219))/0x1+-parseInt(_0x318c73(0x1cb))/0x2+parseInt(_0x318c73(0x20c))/0x3+parseInt(_0x318c73(0x225))/0x4+parseInt(_0x318c73(0x1dd))/0x5*(parseInt(_0x318c73(0x20a))/0x6)+parseInt(_0x318c73(0x203))/0x7+parseInt(_0x318c73(0x1e2))/0x8*(-parseInt(_0x318c73(0x238))/0x9);if(_0x39193f===_0x1d9543)break;else _0x41753a['push'](_0x41753a['shift']());}catch(_0x4dc53c){_0x41753a['push'](_0x41753a['shift']());}}}(a0_0x5cdb,0xe4a73));import{DatasetList,DrivenDataDetailPlus,formatDbType}from'@lovrabet/dsparser';export class DatasetAnalyzer{['analyzeDatasetList'](_0x3d5b70){const _0x504294=a0_0x5eb3,_0x2a20ee=_0x3d5b70[_0x504294(0x232)]?.[_0x504294(0x216)]||_0x3d5b70['tableData']||_0x3d5b70,_0x13a408=new DatasetList(_0x2a20ee);return{'total':_0x13a408[_0x504294(0x213)](),'datasets':_0x13a408[_0x504294(0x22a)]()[_0x504294(0x1fb)](_0x12b017=>this['analyzeDatasetItem'](_0x12b017))};}[a0_0x3018f2(0x202)](_0x1b4173){const _0x532e95=a0_0x3018f2;return{'id':_0x1b4173['id']||0x0,'name':_0x1b4173['name']||'','code':_0x1b4173[_0x532e95(0x1ea)]||'','tableName':_0x1b4173[_0x532e95(0x1f7)]?.()||_0x1b4173[_0x532e95(0x1da)]||'','source':_0x1b4173[_0x532e95(0x217)]||'','description':_0x1b4173[_0x532e95(0x1d6)]||'','isVirtual':_0x1b4173[_0x532e95(0x229)]?.()||![]};}[a0_0x3018f2(0x1d7)](_0xf5b0d3){const _0x9fd688=a0_0x3018f2,_0x120d73=_0xf5b0d3[_0x9fd688(0x232)]||_0xf5b0d3,_0x314c7b=new DrivenDataDetailPlus(_0x120d73),_0x3451b9={'name':_0x314c7b[_0x9fd688(0x22d)],'code':_0x314c7b[_0x9fd688(0x1ea)],'tableName':_0x314c7b[_0x9fd688(0x1f7)](),'tableKey':_0x314c7b[_0x9fd688(0x233)](),'datasetSDKKey':_0x314c7b[_0x9fd688(0x214)](),'modelAlias':_0x314c7b[_0x9fd688(0x1f0)]()},_0x53eed3=_0x314c7b[_0x9fd688(0x1cc)];_0x53eed3&&(_0x3451b9[_0x9fd688(0x234)]={'dbName':_0x53eed3[_0x9fd688(0x1fe)]??undefined,'dbId':_0x53eed3[_0x9fd688(0x1dc)]??undefined,'dbType':_0x53eed3[_0x9fd688(0x1ff)](),'dbVersion':_0x53eed3[_0x9fd688(0x21c)](),'tenantCode':_0x53eed3[_0x9fd688(0x1e6)](),'appCode':_0x53eed3['getAppCode']()});const _0xbf89f6=_0x314c7b['getFieldList'](),_0x16f6a7=_0xbf89f6['all']()[_0x9fd688(0x1fb)](_0x26b409=>{const _0x83c8e2=_0x9fd688,_0x8a0273=_0x26b409[_0x83c8e2(0x21d)],_0x3ee380=_0x26b409[_0x83c8e2(0x1ed)],_0x4afd2c={'name':_0x26b409['name'],'type':_0x26b409['type'],'required':_0x26b409[_0x83c8e2(0x22e)](),'primaryKey':_0x26b409[_0x83c8e2(0x1d4)](),'description':_0x26b409[_0x83c8e2(0x1d6)]||'','autoIncrement':Boolean(_0x8a0273[_0x83c8e2(0x1d8)]),'createTime':Boolean(_0x8a0273[_0x83c8e2(0x237)]),'updateTime':Boolean(_0x8a0273['updateTime']),'dbType':typeof _0x3ee380[_0x83c8e2(0x200)]===_0x83c8e2(0x1c5)?_0x3ee380[_0x83c8e2(0x200)]:undefined,'dbTypeLen':typeof _0x3ee380['dbTypeLen']===_0x83c8e2(0x209)?_0x3ee380[_0x83c8e2(0x222)]:undefined};if(_0x26b409[_0x83c8e2(0x22c)]()){const _0x1fedec=_0x26b409[_0x83c8e2(0x20d)]();if(_0x1fedec){_0x4afd2c[_0x83c8e2(0x22c)]=!![],_0x4afd2c['enumValues']=_0x1fedec[_0x83c8e2(0x206)];if(_0x1fedec[_0x83c8e2(0x1ca)]&&_0x1fedec[_0x83c8e2(0x1ca)][_0x83c8e2(0x1de)]>0x0)_0x4afd2c[_0x83c8e2(0x1c9)]=_0x1fedec[_0x83c8e2(0x1ca)];else _0x1fedec[_0x83c8e2(0x235)]&&(_0x4afd2c[_0x83c8e2(0x1fa)]=_0x1fedec[_0x83c8e2(0x235)]);}}return _0x4afd2c;}),_0x448742=_0x314c7b[_0x9fd688(0x22b)]()[_0x9fd688(0x1fb)](_0x5343eb=>{const _0x4d30d1=_0x9fd688,_0x426f00={'name':_0x5343eb[_0x4d30d1(0x22d)],'displayName':_0x5343eb['displayName'],'type':_0x5343eb[_0x4d30d1(0x1cf)],'method':_0x5343eb[_0x4d30d1(0x221)],'path':_0x5343eb['path'],'requestFields':_0x5343eb['requestFields'],'requestFieldsCount':_0x5343eb['requestFields']['length'],'requestExample':_0x5343eb['requestExample'],'responseExample':_0x5343eb['responseExample'],'enabled':_0x5343eb[_0x4d30d1(0x208)],'fullUrl':_0x5343eb[_0x4d30d1(0x1c7)]};return _0x426f00;});return{'basic':_0x3451b9,'fields':_0x16f6a7,'operations':_0x448742,'supportsCRUD':_0x314c7b[_0x9fd688(0x1e0)](),'fieldCount':_0x314c7b[_0x9fd688(0x1f3)](),'operationCount':_0x314c7b['getOperationCount'](),'enabledOperationCount':_0x448742[_0x9fd688(0x1de)]};}[a0_0x3018f2(0x1ec)](_0xa4bf83,_0x3a7ac5){const _0x17b6fb=a0_0x3018f2,_0x41254c=_0xa4bf83[_0x17b6fb(0x232)]||_0xa4bf83,_0x33bfb6=new DrivenDataDetailPlus(_0x41254c),_0x1480b2=_0x33bfb6[_0x17b6fb(0x20e)](_0x3a7ac5);if(!_0x1480b2)return null;return{'name':_0x1480b2[_0x17b6fb(0x22d)],'displayName':_0x1480b2[_0x17b6fb(0x226)],'type':_0x1480b2[_0x17b6fb(0x1cf)],'method':_0x1480b2['method'],'path':_0x1480b2[_0x17b6fb(0x231)],'requestFields':_0x1480b2[_0x17b6fb(0x227)],'requestFieldsCount':_0x1480b2[_0x17b6fb(0x227)]['length'],'requestExample':_0x1480b2['requestExample'],'responseExample':_0x1480b2[_0x17b6fb(0x1eb)],'enabled':_0x1480b2['enabled'],'fullUrl':_0x1480b2[_0x17b6fb(0x1c7)]};}[a0_0x3018f2(0x1e1)](_0x2bbcbb,_0x24e112,_0x205e5f,_0x206769=a0_0x3018f2(0x21a)){const _0x794dd0=a0_0x3018f2,_0x43c6a3=_0x2bbcbb[_0x794dd0(0x232)]||_0x2bbcbb,_0x3197bb=new DrivenDataDetailPlus(_0x43c6a3),_0x4c6d25=_0x3197bb[_0x794dd0(0x1d1)](_0x24e112);if(!_0x4c6d25)return null;const _0x57ff3c=_0x3197bb[_0x794dd0(0x233)](),_0x1cc04f=_0x3197bb[_0x794dd0(0x1f7)](),_0x2e533a=this[_0x794dd0(0x230)](_0x1cc04f),_0x50bc68=_0x3197bb['getOperationAnalysis'](_0x24e112),_0x44d8a7=_0x3197bb[_0x794dd0(0x201)](_0x24e112,_0x205e5f);return{'code':_0x4c6d25[_0x794dd0(0x1bb)]['code'],'sdkCallInfo':{'modelName':_0x2e533a,'tableName':_0x1cc04f,'tableKey':_0x57ff3c,'datasetCode':_0x3197bb['datasetCode'],'operationName':_0x24e112},'requestExample':_0x50bc68?.[_0x794dd0(0x1f9)],'responseExample':_0x50bc68?.[_0x794dd0(0x1eb)],'sdkInitCode':_0x3197bb[_0x794dd0(0x1fc)](_0x57ff3c),'usageExample':_0x4c6d25['usageExample'],'fullExample':_0x44d8a7||undefined,'aliasExplanation':_0x3197bb[_0x794dd0(0x1d2)]()};}[a0_0x3018f2(0x212)](_0x285605){const _0x404737=a0_0x3018f2,_0x3f3f51=_0x285605[_0x404737(0x232)]||_0x285605,_0x3fdee5=new DrivenDataDetailPlus(_0x3f3f51),_0x44e473=_0x3fdee5[_0x404737(0x22b)]()[_0x404737(0x1fb)](_0xcba524=>({'name':_0xcba524[_0x404737(0x22d)],'displayName':_0xcba524[_0x404737(0x226)],'description':_0xcba524[_0x404737(0x226)]+_0x404737(0x1df)+_0x3fdee5[_0x404737(0x22d)],'method':_0xcba524['method'],'path':_0xcba524[_0x404737(0x231)],'requestParams':_0xcba524['requestFields'],'requestExample':JSON['stringify'](_0xcba524['requestExample'],null,0x2),'responseExample':JSON['stringify'](_0xcba524[_0x404737(0x1eb)],null,0x2)}));return{'datasetName':_0x3fdee5[_0x404737(0x22d)],'tableName':_0x3fdee5[_0x404737(0x1f7)](),'operations':_0x44e473};}[a0_0x3018f2(0x1bf)](_0x4c1645,_0x44b720){const _0x55f114=a0_0x3018f2,_0x372d17=new DatasetList(_0x4c1645),_0xd9cc4=_0x44b720[_0x55f114(0x1c3)]();return _0x372d17[_0x55f114(0x22a)]()[_0x55f114(0x1cd)](_0x33a151=>{const _0x4e30ef=_0x55f114,_0x5d630e=(_0x33a151[_0x4e30ef(0x22d)]||'')[_0x4e30ef(0x1c3)]()[_0x4e30ef(0x220)](_0xd9cc4),_0x18fd74=(_0x33a151[_0x4e30ef(0x1f7)]?.()||_0x33a151['tableName']||'')['toLowerCase']()[_0x4e30ef(0x220)](_0xd9cc4),_0x2af8a9=(_0x33a151['datasetCode']||'')[_0x4e30ef(0x1c3)]()[_0x4e30ef(0x220)](_0xd9cc4),_0x18da06=(_0x33a151[_0x4e30ef(0x1d6)]||'')[_0x4e30ef(0x1c3)]()[_0x4e30ef(0x220)](_0xd9cc4);return _0x5d630e||_0x18fd74||_0x2af8a9||_0x18da06;})[_0x55f114(0x1fb)](_0x1b1636=>this[_0x55f114(0x202)](_0x1b1636));}[a0_0x3018f2(0x1e8)](_0x4dd190){const _0x6cef67=a0_0x3018f2,_0x1413ad=_0x4dd190['data']||_0x4dd190,_0x17f96e=new DrivenDataDetailPlus(_0x1413ad);let _0x50a02b='#\x20'+_0x17f96e['name']+'\x0a\x0a';_0x50a02b+='**Dataset\x20Code:**\x20'+_0x17f96e['datasetCode']+'\x0a',_0x50a02b+=_0x6cef67(0x1ba)+_0x17f96e[_0x6cef67(0x1f7)]()+'\x0a',_0x50a02b+=_0x6cef67(0x1d0)+_0x17f96e[_0x6cef67(0x233)]()+'\x0a\x0a',_0x50a02b+=_0x6cef67(0x211);const _0x599b65=_0x17f96e['getFieldList']();_0x599b65[_0x6cef67(0x1de)]>0x0&&(_0x50a02b+='|\x20Field\x20Name\x20|\x20Code\x20|\x20DB\x20Type\x20|\x20UI\x20Type\x20|\x20Required\x20|\x20Primary\x20Key\x20|\x20Enum\x20Values\x20|\x20Description\x20|\x0a',_0x50a02b+='|------------|------|---------|---------|----------|-------------|-------------|-------------|\x0a',_0x599b65['all']()['forEach'](_0x28e883=>{const _0x4416ef=_0x6cef67,_0x96cd93=_0x28e883['raw'],_0x2c7f48=formatDbType(typeof _0x96cd93[_0x4416ef(0x200)]===_0x4416ef(0x1c5)?_0x96cd93['dbType']:undefined,typeof _0x96cd93[_0x4416ef(0x222)]===_0x4416ef(0x209)?_0x96cd93[_0x4416ef(0x222)]:undefined);let _0x2e4dd3='';if(_0x28e883['isEnum']()){const _0x5b9df5=_0x28e883[_0x4416ef(0x20d)]();if(_0x5b9df5&&_0x5b9df5[_0x4416ef(0x206)][_0x4416ef(0x1de)]>0x0){const _0x42524f=_0x5b9df5[_0x4416ef(0x206)][_0x4416ef(0x1c6)](0x0,0x5);_0x2e4dd3=_0x42524f[_0x4416ef(0x21e)](',\x20'),_0x5b9df5[_0x4416ef(0x206)][_0x4416ef(0x1de)]>0x5&&(_0x2e4dd3+='\x20...\x20('+_0x5b9df5[_0x4416ef(0x206)][_0x4416ef(0x1de)]+'\x20total)');}}_0x50a02b+='|\x20'+_0x28e883[_0x4416ef(0x22d)]+'\x20|\x20'+_0x28e883[_0x4416ef(0x1db)]+_0x4416ef(0x207)+_0x2c7f48+_0x4416ef(0x207)+_0x28e883[_0x4416ef(0x1cf)]+_0x4416ef(0x207)+(_0x28e883[_0x4416ef(0x22e)]()?'✅':'')+_0x4416ef(0x207)+(_0x28e883[_0x4416ef(0x1d4)]()?'🔑':'')+_0x4416ef(0x207)+_0x2e4dd3+_0x4416ef(0x207)+(_0x28e883[_0x4416ef(0x1d6)]||'')+'\x20|\x0a';}),_0x50a02b+='\x0a');_0x50a02b+=_0x6cef67(0x210);const _0x5b08b3=_0x17f96e[_0x6cef67(0x22b)]();_0x5b08b3[_0x6cef67(0x1d5)](_0x483775=>{const _0x2b22c8=_0x6cef67;_0x50a02b+=_0x2b22c8(0x1e4)+_0x483775[_0x2b22c8(0x226)]+'\x20('+_0x483775[_0x2b22c8(0x22d)]+_0x2b22c8(0x1ce),_0x50a02b+='-\x20**Method:**\x20'+_0x483775[_0x2b22c8(0x221)]+'\x0a',_0x50a02b+='-\x20**Path:**\x20'+_0x483775[_0x2b22c8(0x231)]+'\x0a',_0x483775[_0x2b22c8(0x1c7)]&&(_0x50a02b+=_0x2b22c8(0x1b8)+_0x483775[_0x2b22c8(0x1c7)]+'\x0a'),_0x483775[_0x2b22c8(0x227)]&&_0x483775['requestFields']['length']>0x0&&(_0x50a02b+=_0x2b22c8(0x1bc)+_0x483775[_0x2b22c8(0x227)][_0x2b22c8(0x21e)](',\x20')+'\x0a'),_0x483775[_0x2b22c8(0x1f9)]&&(_0x50a02b+=_0x2b22c8(0x1c8)+JSON['stringify'](_0x483775[_0x2b22c8(0x1f9)],null,0x2)+_0x2b22c8(0x1f4)),_0x483775[_0x2b22c8(0x1eb)]&&(_0x50a02b+='\x0a**Response\x20Example:**\x0a```json\x0a'+JSON[_0x2b22c8(0x20b)](_0x483775['responseExample'],null,0x2)+_0x2b22c8(0x1f4)),_0x50a02b+='\x0a';});const _0x302d0d=_0x17f96e['getTableKey'](),_0x4707db=_0x17f96e[_0x6cef67(0x1fc)](_0x302d0d);return _0x4707db&&(_0x50a02b+='##\x20SDK\x20Usage\x0a\x0a',_0x50a02b+=_0x6cef67(0x1f6),_0x50a02b+=_0x4707db,_0x50a02b+=_0x6cef67(0x1e9)),_0x50a02b;}[a0_0x3018f2(0x1fd)](_0x39d902,_0x228959){const _0x13ca66=a0_0x3018f2,_0x3fb35c=_0x39d902[_0x13ca66(0x232)]||_0x39d902,_0x2f183d=_0x228959[_0x13ca66(0x232)]||_0x228959,_0x15854e=new DrivenDataDetailPlus(_0x3fb35c),_0x4503ac=new DrivenDataDetailPlus(_0x2f183d),_0x77563d=new Set(_0x15854e[_0x13ca66(0x1e7)]()[_0x13ca66(0x1ee)]()['map'](_0x3b9f27=>_0x3b9f27[_0x13ca66(0x22d)])),_0x4fa600=new Set(_0x4503ac['getFieldList']()[_0x13ca66(0x1ee)]()[_0x13ca66(0x1fb)](_0xa5e7f7=>_0xa5e7f7[_0x13ca66(0x22d)])),_0x16719f=new Set(_0x15854e['getEnabledOperationAnalyses']()[_0x13ca66(0x1fb)](_0x4f5dc1=>_0x4f5dc1['name'])),_0x12b78a=new Set(_0x4503ac[_0x13ca66(0x22b)]()[_0x13ca66(0x1fb)](_0x163242=>_0x163242[_0x13ca66(0x22d)])),_0x3057fc={'fields':{'added':Array[_0x13ca66(0x1d9)](_0x4fa600)['filter'](_0x53a7cc=>!_0x77563d['has'](_0x53a7cc)),'removed':Array['from'](_0x77563d)['filter'](_0x2e0a13=>!_0x4fa600[_0x13ca66(0x1f2)](_0x2e0a13)),'modified':[]},'operations':{'added':Array[_0x13ca66(0x1d9)](_0x12b78a)[_0x13ca66(0x1cd)](_0x2965a5=>!_0x16719f[_0x13ca66(0x1f2)](_0x2965a5)),'removed':Array[_0x13ca66(0x1d9)](_0x16719f)[_0x13ca66(0x1cd)](_0x229f2d=>!_0x12b78a[_0x13ca66(0x1f2)](_0x229f2d))}},_0x47768e=_0x13ca66(0x20f)+_0x3057fc[_0x13ca66(0x1ef)][_0x13ca66(0x1c0)][_0x13ca66(0x1de)]+'/-'+_0x3057fc[_0x13ca66(0x1ef)]['removed'][_0x13ca66(0x1de)]+',\x20'+(_0x13ca66(0x1c4)+_0x3057fc[_0x13ca66(0x223)][_0x13ca66(0x1c0)]['length']+'/-'+_0x3057fc[_0x13ca66(0x223)][_0x13ca66(0x21f)][_0x13ca66(0x1de)]);return{'differences':_0x3057fc,'summary':_0x47768e};}[a0_0x3018f2(0x230)](_0x5bb4da){const _0x36d77a=a0_0x3018f2;return _0x5bb4da['replace'](/[-_\s]+(.)?/g,(_0x14664c,_0x1f6a87)=>_0x1f6a87?_0x1f6a87[_0x36d77a(0x1f1)]():'')['replace'](/^(.)/,(_0x2fbd10,_0x430d8b)=>_0x430d8b[_0x36d77a(0x1f1)]());}[a0_0x3018f2(0x228)](_0xf3bb69,_0x120cdc){const _0x5388e1=a0_0x3018f2;let _0x2f9371=null;for(const [,_0x3a42ae]of _0x120cdc){const _0x28a723=_0x3a42ae[_0x5388e1(0x21b)]['find'](_0x138a84=>_0x138a84[_0x5388e1(0x1ea)]===_0xf3bb69);if(_0x28a723){_0x2f9371={'datasetCode':_0x28a723[_0x5388e1(0x1ea)],'datasetName':_0x28a723[_0x5388e1(0x1f8)],'tableName':_0x28a723[_0x5388e1(0x1da)]};break;}}if(!_0x2f9371)return null;const _0x4aa539=[],_0x3a47d0=[];for(const [,_0x4de2cb]of _0x120cdc){for(const _0x465bed of _0x4de2cb[_0x5388e1(0x21b)]){if(_0x465bed[_0x5388e1(0x1ea)]===_0xf3bb69)for(const _0x8857cc of _0x465bed['relations']){const _0x981c61=this[_0x5388e1(0x1c1)](_0x8857cc[_0x5388e1(0x1c2)],_0x120cdc);_0x4aa539[_0x5388e1(0x215)]({'fromField':_0x8857cc[_0x5388e1(0x1e5)],'toDataset':_0x8857cc[_0x5388e1(0x1c2)],'toDatasetName':_0x8857cc[_0x5388e1(0x1bd)],'toField':_0x8857cc[_0x5388e1(0x1d3)],'joinType':_0x8857cc[_0x5388e1(0x1f5)],'condition':_0x8857cc[_0x5388e1(0x22f)],'toTableName':_0x981c61?.[_0x5388e1(0x1da)]});}if(_0x465bed[_0x5388e1(0x1ea)]!==_0xf3bb69)for(const _0x515deb of _0x465bed[_0x5388e1(0x1b9)]){_0x515deb[_0x5388e1(0x1c2)]===_0xf3bb69&&_0x3a47d0['push']({'fromField':_0x515deb['fromField'],'toDataset':_0x515deb[_0x5388e1(0x1c2)],'toDatasetName':_0x515deb[_0x5388e1(0x1bd)],'toField':_0x515deb[_0x5388e1(0x1d3)],'joinType':_0x515deb[_0x5388e1(0x1f5)],'condition':_0x515deb['condition'],'toTableName':_0x2f9371[_0x5388e1(0x1da)]});}}}return{'datasetCode':_0x2f9371['datasetCode'],'datasetName':_0x2f9371[_0x5388e1(0x1f8)],'tableName':_0x2f9371[_0x5388e1(0x1da)],'outgoingRelations':_0x4aa539,'incomingRelations':_0x3a47d0,'allRelations':[..._0x4aa539,..._0x3a47d0]};}['findDatasetInErConfigs'](_0x9b0f97,_0x40db10){const _0x183323=a0_0x3018f2;for(const [,_0x3d2f15]of _0x40db10){const _0x27dfdc=_0x3d2f15[_0x183323(0x21b)][_0x183323(0x236)](_0x92ed61=>_0x92ed61[_0x183323(0x1ea)]===_0x9b0f97);if(_0x27dfdc)return{'datasetCode':_0x27dfdc['datasetCode'],'datasetName':_0x27dfdc[_0x183323(0x1f8)],'tableName':_0x27dfdc['tableName']};}return null;}[a0_0x3018f2(0x1be)](_0x32620d){const _0x1c91c5=a0_0x3018f2,_0x230942=new Map();for(const [,_0x163915]of _0x32620d){for(const _0xc7dff1 of _0x163915['datasets']){const _0x1229fd=this['parseDatasetRelations'](_0xc7dff1[_0x1c91c5(0x1ea)],_0x32620d);_0x1229fd&&_0x230942[_0x1c91c5(0x1e3)](_0xc7dff1['datasetCode'],_0x1229fd);}}return _0x230942;}[a0_0x3018f2(0x218)](_0x4c5781,_0x16e5e7){const _0x1ef765=a0_0x3018f2,_0x5e424d=this[_0x1ef765(0x228)](_0x4c5781,_0x16e5e7);if(!_0x5e424d)return[];const _0x4391c6=new Set();for(const _0x465d4d of _0x5e424d[_0x1ef765(0x224)]){_0x4391c6[_0x1ef765(0x205)](_0x465d4d[_0x1ef765(0x1c2)]);}for(const _0x297d3e of _0x5e424d[_0x1ef765(0x204)]){for(const [,_0x3eb359]of _0x16e5e7){const _0xf3c99d=_0x3eb359[_0x1ef765(0x21b)][_0x1ef765(0x236)](_0xe92808=>_0xe92808[_0x1ef765(0x1b9)]['some'](_0x5416f3=>_0x5416f3['toDataset']===_0x4c5781&&_0x5416f3[_0x1ef765(0x1e5)]===_0x297d3e['fromField']));if(_0xf3c99d){_0x4391c6[_0x1ef765(0x205)](_0xf3c99d[_0x1ef765(0x1ea)]);break;}}}return Array['from'](_0x4391c6);}}function a0_0x5eb3(_0x59c889,_0x48a64b){_0x59c889=_0x59c889-0x1b8;const _0x5cdb1d=a0_0x5cdb();let _0x5eb390=_0x5cdb1d[_0x59c889];return _0x5eb390;}function a0_0x5cdb(){const _0x19beec=['analyzeDatasetItem','8308335lUqhJw','incomingRelations','add','values','\x20|\x20','enabled','number','744EDpMzf','stringify','5591709wrkAVv','getEnumMeta','getOperationAnalysis','Fields:\x20+','##\x20Operations\x0a\x0a','##\x20Fields\x0a\x0a','generateApiDoc','getCount','getDatasetSDKKey','push','tableData','source','getRelatedDatasets','1314610QvmEAb','online','datasets','getDatabaseVersion','extend','join','removed','includes','method','dbTypeLen','operations','outgoingRelations','6168616dGNpDB','displayName','requestFields','parseDatasetRelations','isVirtualTable','toArray','getEnabledOperationAnalyses','isEnum','name','isRequired','condition','toPascalCase','path','data','getTableKey','database','selectItemsSource','find','createTime','303579dNRHhj','-\x20**Full\x20URL:**\x20','relations','**Table\x20Name:**\x20','sdkCall','-\x20**Request\x20Fields:**\x20','toDatasetName','buildRelationsMap','searchDatasets','added','findDatasetInErConfigs','toDataset','toLowerCase','Operations:\x20+','string','slice','fullUrl','\x0a**Request\x20Example:**\x0a```json\x0a','enumOptions','options','1824804daJSjT','dbtableConfig','filter',')\x0a\x0a','type','**Table\x20Key:**\x20','getOperationDocMeta','generateAliasExplanation','toField','isPrimaryKey','forEach','description','analyzeDatasetDetail','autoIncrement','from','tableName','code','dbId','44445gHXHvU','length','\x20operation\x20for\x20','supportsCRUD','generateSDKCode','1224wSNpva','set','###\x20','fromField','getTenantCode','getFieldList','generateMarkdownDoc','```\x0a','datasetCode','responseExample','getOperationDetail','raw','all','fields','getModelAlias','toUpperCase','has','getFieldCount','\x0a```\x0a','joinType','```typescript\x0a','getTableName','datasetName','requestExample','enumSource','map','generateSDKInitCode','compareDatasets','dbName','getDatabaseType','dbType','generateFullSDKExample'];a0_0x5cdb=function(){return _0x19beec;};return a0_0x5cdb();}
|
|
1
|
+
const a0_0x24ad38=a0_0x3482;function a0_0x3482(_0x45d362,_0x1cc8d5){_0x45d362=_0x45d362-0x11a;const _0x28a009=a0_0x28a0();let _0x348298=_0x28a009[_0x45d362];return _0x348298;}(function(_0x5dae7d,_0x4a0a70){const _0xce0255=a0_0x3482,_0x1c9fd2=_0x5dae7d();while(!![]){try{const _0x5b0135=parseInt(_0xce0255(0x17a))/0x1*(-parseInt(_0xce0255(0x141))/0x2)+parseInt(_0xce0255(0x162))/0x3+parseInt(_0xce0255(0x154))/0x4*(parseInt(_0xce0255(0x197))/0x5)+-parseInt(_0xce0255(0x169))/0x6*(-parseInt(_0xce0255(0x163))/0x7)+-parseInt(_0xce0255(0x19b))/0x8*(-parseInt(_0xce0255(0x16a))/0x9)+parseInt(_0xce0255(0x167))/0xa*(parseInt(_0xce0255(0x12e))/0xb)+-parseInt(_0xce0255(0x11b))/0xc*(parseInt(_0xce0255(0x19d))/0xd);if(_0x5b0135===_0x4a0a70)break;else _0x1c9fd2['push'](_0x1c9fd2['shift']());}catch(_0x3a8543){_0x1c9fd2['push'](_0x1c9fd2['shift']());}}}(a0_0x28a0,0x58c09));function a0_0x28a0(){const _0x905c80=['1155uimnvy','responseExample','usageExample','source','set','getOperationDocMeta','generateSDKInitCode','```\x0a','raw','requestFields','getOperationDetail','###\x20','generateMarkdownDoc','isRequired','joinType','incomingRelations','datasetName','map','toField','552716bAZpUw','code','parseDatasetRelations','-\x20**Full\x20URL:**\x20','getFieldCount','**Table\x20Key:**\x20','enumValues','data','Fields:\x20+','\x20|\x0a','dbId','getEnabledOperationAnalyses','push','operations','length','from','find','toLowerCase','\x0a**Request\x20Example:**\x0a```json\x0a','4bfcVXG','type','options','getOperationAnalysis','fromField','-\x20**Request\x20Fields:**\x20','dbName','tableName','method','filter','getModelAlias','getEnumMeta','selectItemsSource','getRelatedDatasets','1006956UIZIYn','42IxNTno','\x20...\x20(',')\x0a\x0a','generateApiDoc','18010lDVRGC','isEnum','559914ksgksI','9FJpzQF','dbType','replace','isVirtualTable','datasets','\x20operation\x20for\x20','searchDatasets','compareDatasets','extend','toArray','add','getOperationCount','displayName','createTime','datasetCode','```typescript\x0a','2risCOe','requestExample','generateSDKCode','path','getFieldList','|\x20Field\x20Name\x20|\x20Code\x20|\x20DB\x20Type\x20|\x20UI\x20Type\x20|\x20Required\x20|\x20Primary\x20Key\x20|\x20Enum\x20Values\x20|\x20Description\x20|\x0a','string','**Table\x20Name:**\x20','\x20|\x20','##\x20Fields\x0a\x0a','added','tableData','analyzeDatasetItem','has','dbTypeLen','##\x20SDK\x20Usage\x0a\x0a','number','fullUrl','|------------|------|---------|---------|----------|-------------|-------------|-------------|\x0a','outgoingRelations','enumSource','toDataset','removed','includes','updateTime','getTableKey','condition','name','isArray','3512280KzzDNB','\x0a```\x0a','##\x20Operations\x0a\x0a','getCount','2482824RVrKXL','online','465335uOyjxs','\x0a**Response\x20Example:**\x0a```json\x0a','396iOLfHb','dbtableConfig','all','isPrimaryKey','generateAliasExplanation','getDatabaseVersion','values','buildRelationsMap','description','autoIncrement','relations','toDatasetName','toUpperCase','enabled','forEach','findDatasetInErConfigs','enumOptions','stringify','getTableName'];a0_0x28a0=function(){return _0x905c80;};return a0_0x28a0();}import{DatasetList,DrivenDataDetailPlus,formatDbType}from'@lovrabet/dsparser';export class DatasetAnalyzer{['analyzeDatasetList'](_0xb0b10c){const _0x3fc4af=a0_0x3482;let _0xa4eb8b=_0xb0b10c[_0x3fc4af(0x148)];_0xa4eb8b&&!Array[_0x3fc4af(0x196)](_0xa4eb8b)&&(_0xa4eb8b=_0xa4eb8b[_0x3fc4af(0x185)]||_0xb0b10c[_0x3fc4af(0x185)]);!_0xa4eb8b&&(_0xa4eb8b=_0xb0b10c);const _0xda343d=new DatasetList(_0xa4eb8b);return{'total':_0xda343d[_0x3fc4af(0x19a)](),'datasets':_0xda343d[_0x3fc4af(0x173)]()['map'](_0x1c936f=>this[_0x3fc4af(0x186)](_0x1c936f))};}[a0_0x24ad38(0x186)](_0x12e4be){const _0x4618fb=a0_0x24ad38,_0x1082c0=_0x12e4be[_0x4618fb(0x11c)]||_0x12e4be[_0x4618fb(0x136)]?.[_0x4618fb(0x11c)];return{'id':_0x12e4be['id']||0x0,'name':_0x12e4be[_0x4618fb(0x195)]||'','code':_0x12e4be['datasetCode']||'','tableName':_0x12e4be[_0x4618fb(0x12d)]?.()||_0x12e4be[_0x4618fb(0x15b)]||'','source':_0x12e4be[_0x4618fb(0x131)]||'','description':_0x12e4be[_0x4618fb(0x123)]||'','isVirtual':_0x12e4be[_0x4618fb(0x16d)]?.()||![],'dbId':_0x1082c0?.[_0x4618fb(0x14b)],'dbName':_0x1082c0?.[_0x4618fb(0x15a)]};}['analyzeDatasetDetail'](_0x53a64f){const _0x2a3232=a0_0x24ad38,_0x3dc533=_0x53a64f[_0x2a3232(0x148)]||_0x53a64f,_0x16a574=new DrivenDataDetailPlus(_0x3dc533),_0x19ab14={'name':_0x16a574[_0x2a3232(0x195)],'code':_0x16a574[_0x2a3232(0x178)],'tableName':_0x16a574[_0x2a3232(0x12d)](),'tableKey':_0x16a574[_0x2a3232(0x193)](),'datasetSDKKey':_0x16a574['getDatasetSDKKey'](),'modelAlias':_0x16a574[_0x2a3232(0x15e)]()},_0x1866b5=_0x16a574['dbtableConfig'];_0x1866b5&&(_0x19ab14['database']={'dbName':_0x1866b5[_0x2a3232(0x15a)]??undefined,'dbId':_0x1866b5[_0x2a3232(0x14b)]??undefined,'dbType':_0x1866b5['getDatabaseType'](),'dbVersion':_0x1866b5[_0x2a3232(0x120)](),'tenantCode':_0x1866b5['getTenantCode'](),'appCode':_0x1866b5['getAppCode']()});const _0x1f3160=_0x16a574[_0x2a3232(0x17e)](),_0x61d86c=_0x1f3160['all']()['map'](_0x3baf17=>{const _0x531bc8=_0x2a3232,_0x12d443=_0x3baf17[_0x531bc8(0x172)],_0x224c4e=_0x3baf17[_0x531bc8(0x136)],_0x121aa2={'name':_0x3baf17[_0x531bc8(0x195)],'type':_0x3baf17[_0x531bc8(0x155)],'required':_0x3baf17[_0x531bc8(0x13b)](),'primaryKey':_0x3baf17[_0x531bc8(0x11e)](),'description':_0x3baf17['description']||'','autoIncrement':Boolean(_0x12d443[_0x531bc8(0x124)]),'createTime':Boolean(_0x12d443[_0x531bc8(0x177)]),'updateTime':Boolean(_0x12d443[_0x531bc8(0x192)]),'dbType':typeof _0x224c4e[_0x531bc8(0x16b)]==='string'?_0x224c4e[_0x531bc8(0x16b)]:undefined,'dbTypeLen':typeof _0x224c4e[_0x531bc8(0x188)]===_0x531bc8(0x18a)?_0x224c4e[_0x531bc8(0x188)]:undefined};if(_0x3baf17[_0x531bc8(0x168)]()){const _0x15994b=_0x3baf17[_0x531bc8(0x15f)]();if(_0x15994b){_0x121aa2['isEnum']=!![],_0x121aa2[_0x531bc8(0x147)]=_0x15994b[_0x531bc8(0x121)];if(_0x15994b[_0x531bc8(0x156)]&&_0x15994b[_0x531bc8(0x156)][_0x531bc8(0x14f)]>0x0)_0x121aa2[_0x531bc8(0x12b)]=_0x15994b[_0x531bc8(0x156)];else _0x15994b[_0x531bc8(0x160)]&&(_0x121aa2[_0x531bc8(0x18e)]=_0x15994b['selectItemsSource']);}}return _0x121aa2;}),_0x1b86ae=_0x16a574[_0x2a3232(0x14c)]()[_0x2a3232(0x13f)](_0x32a702=>{const _0x43be90=_0x2a3232,_0x1c9335={'name':_0x32a702[_0x43be90(0x195)],'displayName':_0x32a702['displayName'],'type':_0x32a702['type'],'method':_0x32a702[_0x43be90(0x15c)],'path':_0x32a702[_0x43be90(0x17d)],'requestFields':_0x32a702[_0x43be90(0x137)],'requestFieldsCount':_0x32a702[_0x43be90(0x137)][_0x43be90(0x14f)],'requestExample':_0x32a702[_0x43be90(0x17b)],'responseExample':_0x32a702[_0x43be90(0x12f)],'enabled':_0x32a702[_0x43be90(0x128)],'fullUrl':_0x32a702['fullUrl']};return _0x1c9335;});return{'basic':_0x19ab14,'fields':_0x61d86c,'operations':_0x1b86ae,'supportsCRUD':_0x16a574['supportsCRUD'](),'fieldCount':_0x16a574[_0x2a3232(0x145)](),'operationCount':_0x16a574[_0x2a3232(0x175)](),'enabledOperationCount':_0x1b86ae[_0x2a3232(0x14f)]};}[a0_0x24ad38(0x138)](_0x1e8718,_0x43ade0){const _0x5890b2=a0_0x24ad38,_0x505ff0=_0x1e8718['data']||_0x1e8718,_0x3734e6=new DrivenDataDetailPlus(_0x505ff0),_0x3e43fb=_0x3734e6[_0x5890b2(0x157)](_0x43ade0);if(!_0x3e43fb)return null;return{'name':_0x3e43fb[_0x5890b2(0x195)],'displayName':_0x3e43fb[_0x5890b2(0x176)],'type':_0x3e43fb[_0x5890b2(0x155)],'method':_0x3e43fb[_0x5890b2(0x15c)],'path':_0x3e43fb[_0x5890b2(0x17d)],'requestFields':_0x3e43fb['requestFields'],'requestFieldsCount':_0x3e43fb['requestFields'][_0x5890b2(0x14f)],'requestExample':_0x3e43fb[_0x5890b2(0x17b)],'responseExample':_0x3e43fb[_0x5890b2(0x12f)],'enabled':_0x3e43fb[_0x5890b2(0x128)],'fullUrl':_0x3e43fb[_0x5890b2(0x18b)]};}[a0_0x24ad38(0x17c)](_0x39f319,_0x14a1a0,_0x387b16,_0x1bb3c1=a0_0x24ad38(0x19c)){const _0x7b61bb=a0_0x24ad38,_0x47377c=_0x39f319[_0x7b61bb(0x148)]||_0x39f319,_0x15bf58=new DrivenDataDetailPlus(_0x47377c),_0x5ab5b5=_0x15bf58[_0x7b61bb(0x133)](_0x14a1a0);if(!_0x5ab5b5)return null;const _0x111b17=_0x15bf58[_0x7b61bb(0x193)](),_0x5392f8=_0x15bf58['getTableName'](),_0x5acac4=this['toPascalCase'](_0x5392f8),_0x17e932=_0x15bf58[_0x7b61bb(0x157)](_0x14a1a0),_0x1f16b4=_0x15bf58['generateFullSDKExample'](_0x14a1a0,_0x387b16);return{'code':_0x5ab5b5['sdkCall'][_0x7b61bb(0x142)],'sdkCallInfo':{'modelName':_0x5acac4,'tableName':_0x5392f8,'tableKey':_0x111b17,'datasetCode':_0x15bf58[_0x7b61bb(0x178)],'operationName':_0x14a1a0},'requestExample':_0x17e932?.['requestExample'],'responseExample':_0x17e932?.[_0x7b61bb(0x12f)],'sdkInitCode':_0x15bf58[_0x7b61bb(0x134)](_0x111b17),'usageExample':_0x5ab5b5[_0x7b61bb(0x130)],'fullExample':_0x1f16b4||undefined,'aliasExplanation':_0x15bf58[_0x7b61bb(0x11f)]()};}[a0_0x24ad38(0x166)](_0x33f3ca){const _0x499c22=a0_0x24ad38,_0x50d691=_0x33f3ca[_0x499c22(0x148)]||_0x33f3ca,_0x521678=new DrivenDataDetailPlus(_0x50d691),_0x485587=_0x521678[_0x499c22(0x14c)]()[_0x499c22(0x13f)](_0x575e17=>({'name':_0x575e17[_0x499c22(0x195)],'displayName':_0x575e17[_0x499c22(0x176)],'description':_0x575e17[_0x499c22(0x176)]+_0x499c22(0x16f)+_0x521678[_0x499c22(0x195)],'method':_0x575e17[_0x499c22(0x15c)],'path':_0x575e17['path'],'requestParams':_0x575e17['requestFields'],'requestExample':JSON[_0x499c22(0x12c)](_0x575e17[_0x499c22(0x17b)],null,0x2),'responseExample':JSON[_0x499c22(0x12c)](_0x575e17[_0x499c22(0x12f)],null,0x2)}));return{'datasetName':_0x521678['name'],'tableName':_0x521678['getTableName'](),'operations':_0x485587};}[a0_0x24ad38(0x170)](_0xc3c995,_0x294ca6){const _0x1fecaa=a0_0x24ad38,_0x4d8260=new DatasetList(_0xc3c995),_0x1d86ff=_0x294ca6['toLowerCase']();return _0x4d8260[_0x1fecaa(0x173)]()[_0x1fecaa(0x15d)](_0x36cfe9=>{const _0x155bb5=_0x1fecaa,_0x1db9f8=(_0x36cfe9[_0x155bb5(0x195)]||'')[_0x155bb5(0x152)]()[_0x155bb5(0x191)](_0x1d86ff),_0x2b51fe=(_0x36cfe9['getTableName']?.()||_0x36cfe9[_0x155bb5(0x15b)]||'')['toLowerCase']()['includes'](_0x1d86ff),_0x4e0575=(_0x36cfe9['datasetCode']||'')[_0x155bb5(0x152)]()[_0x155bb5(0x191)](_0x1d86ff),_0xa89843=(_0x36cfe9[_0x155bb5(0x123)]||'')[_0x155bb5(0x152)]()[_0x155bb5(0x191)](_0x1d86ff);return _0x1db9f8||_0x2b51fe||_0x4e0575||_0xa89843;})[_0x1fecaa(0x13f)](_0x2c69a0=>this[_0x1fecaa(0x186)](_0x2c69a0));}[a0_0x24ad38(0x13a)](_0x3fb353){const _0xff839=a0_0x24ad38,_0x485c6c=_0x3fb353[_0xff839(0x148)]||_0x3fb353,_0x3813e0=new DrivenDataDetailPlus(_0x485c6c);let _0x58500f='#\x20'+_0x3813e0[_0xff839(0x195)]+'\x0a\x0a';_0x58500f+='**Dataset\x20Code:**\x20'+_0x3813e0[_0xff839(0x178)]+'\x0a',_0x58500f+=_0xff839(0x181)+_0x3813e0[_0xff839(0x12d)]()+'\x0a',_0x58500f+=_0xff839(0x146)+_0x3813e0[_0xff839(0x193)]()+'\x0a\x0a',_0x58500f+=_0xff839(0x183);const _0x4737bb=_0x3813e0[_0xff839(0x17e)]();_0x4737bb[_0xff839(0x14f)]>0x0&&(_0x58500f+=_0xff839(0x17f),_0x58500f+=_0xff839(0x18c),_0x4737bb[_0xff839(0x11d)]()['forEach'](_0x51b74f=>{const _0x827bd3=_0xff839,_0x1b0991=_0x51b74f['raw'],_0x200dfa=formatDbType(typeof _0x1b0991[_0x827bd3(0x16b)]===_0x827bd3(0x180)?_0x1b0991[_0x827bd3(0x16b)]:undefined,typeof _0x1b0991[_0x827bd3(0x188)]===_0x827bd3(0x18a)?_0x1b0991[_0x827bd3(0x188)]:undefined);let _0x30e2a0='';if(_0x51b74f['isEnum']()){const _0x40971a=_0x51b74f[_0x827bd3(0x15f)]();if(_0x40971a&&_0x40971a['values']['length']>0x0){const _0x2af095=_0x40971a[_0x827bd3(0x121)]['slice'](0x0,0x5);_0x30e2a0=_0x2af095['join'](',\x20'),_0x40971a[_0x827bd3(0x121)][_0x827bd3(0x14f)]>0x5&&(_0x30e2a0+=_0x827bd3(0x164)+_0x40971a[_0x827bd3(0x121)]['length']+'\x20total)');}}_0x58500f+='|\x20'+_0x51b74f[_0x827bd3(0x195)]+_0x827bd3(0x182)+_0x51b74f[_0x827bd3(0x142)]+_0x827bd3(0x182)+_0x200dfa+'\x20|\x20'+_0x51b74f['type']+_0x827bd3(0x182)+(_0x51b74f[_0x827bd3(0x13b)]()?'✅':'')+'\x20|\x20'+(_0x51b74f[_0x827bd3(0x11e)]()?'🔑':'')+_0x827bd3(0x182)+_0x30e2a0+'\x20|\x20'+(_0x51b74f[_0x827bd3(0x123)]||'')+_0x827bd3(0x14a);}),_0x58500f+='\x0a');_0x58500f+=_0xff839(0x199);const _0x707e8=_0x3813e0[_0xff839(0x14c)]();_0x707e8[_0xff839(0x129)](_0x4d258e=>{const _0x1b8076=_0xff839;_0x58500f+=_0x1b8076(0x139)+_0x4d258e[_0x1b8076(0x176)]+'\x20('+_0x4d258e[_0x1b8076(0x195)]+_0x1b8076(0x165),_0x58500f+='-\x20**Method:**\x20'+_0x4d258e[_0x1b8076(0x15c)]+'\x0a',_0x58500f+='-\x20**Path:**\x20'+_0x4d258e[_0x1b8076(0x17d)]+'\x0a',_0x4d258e['fullUrl']&&(_0x58500f+=_0x1b8076(0x144)+_0x4d258e[_0x1b8076(0x18b)]+'\x0a'),_0x4d258e['requestFields']&&_0x4d258e[_0x1b8076(0x137)][_0x1b8076(0x14f)]>0x0&&(_0x58500f+=_0x1b8076(0x159)+_0x4d258e[_0x1b8076(0x137)]['join'](',\x20')+'\x0a'),_0x4d258e['requestExample']&&(_0x58500f+=_0x1b8076(0x153)+JSON[_0x1b8076(0x12c)](_0x4d258e[_0x1b8076(0x17b)],null,0x2)+_0x1b8076(0x198)),_0x4d258e[_0x1b8076(0x12f)]&&(_0x58500f+=_0x1b8076(0x11a)+JSON[_0x1b8076(0x12c)](_0x4d258e[_0x1b8076(0x12f)],null,0x2)+_0x1b8076(0x198)),_0x58500f+='\x0a';});const _0x29abbf=_0x3813e0[_0xff839(0x193)](),_0x5fabc3=_0x3813e0['generateSDKInitCode'](_0x29abbf);return _0x5fabc3&&(_0x58500f+=_0xff839(0x189),_0x58500f+=_0xff839(0x179),_0x58500f+=_0x5fabc3,_0x58500f+=_0xff839(0x135)),_0x58500f;}[a0_0x24ad38(0x171)](_0x41a691,_0x5ddfe1){const _0x16335b=a0_0x24ad38,_0x3a6088=_0x41a691[_0x16335b(0x148)]||_0x41a691,_0x1c02a3=_0x5ddfe1[_0x16335b(0x148)]||_0x5ddfe1,_0x23bc98=new DrivenDataDetailPlus(_0x3a6088),_0xdb5ae4=new DrivenDataDetailPlus(_0x1c02a3),_0x4c2122=new Set(_0x23bc98[_0x16335b(0x17e)]()['all']()[_0x16335b(0x13f)](_0x4580d0=>_0x4580d0[_0x16335b(0x195)])),_0x217e2b=new Set(_0xdb5ae4[_0x16335b(0x17e)]()[_0x16335b(0x11d)]()[_0x16335b(0x13f)](_0x43d51c=>_0x43d51c[_0x16335b(0x195)])),_0xd7668f=new Set(_0x23bc98['getEnabledOperationAnalyses']()[_0x16335b(0x13f)](_0x130f9a=>_0x130f9a['name'])),_0x21e188=new Set(_0xdb5ae4['getEnabledOperationAnalyses']()[_0x16335b(0x13f)](_0xcb131=>_0xcb131['name'])),_0x1d34b3={'fields':{'added':Array[_0x16335b(0x150)](_0x217e2b)[_0x16335b(0x15d)](_0x31b195=>!_0x4c2122[_0x16335b(0x187)](_0x31b195)),'removed':Array[_0x16335b(0x150)](_0x4c2122)[_0x16335b(0x15d)](_0xf60a0c=>!_0x217e2b[_0x16335b(0x187)](_0xf60a0c)),'modified':[]},'operations':{'added':Array['from'](_0x21e188)['filter'](_0x4f41e3=>!_0xd7668f['has'](_0x4f41e3)),'removed':Array[_0x16335b(0x150)](_0xd7668f)[_0x16335b(0x15d)](_0x4b0d9c=>!_0x21e188[_0x16335b(0x187)](_0x4b0d9c))}},_0x1d77ef=_0x16335b(0x149)+_0x1d34b3['fields']['added'][_0x16335b(0x14f)]+'/-'+_0x1d34b3['fields'][_0x16335b(0x190)][_0x16335b(0x14f)]+',\x20'+('Operations:\x20+'+_0x1d34b3['operations'][_0x16335b(0x184)]['length']+'/-'+_0x1d34b3[_0x16335b(0x14e)][_0x16335b(0x190)][_0x16335b(0x14f)]);return{'differences':_0x1d34b3,'summary':_0x1d77ef};}['toPascalCase'](_0x2cc68c){const _0x484760=a0_0x24ad38;return _0x2cc68c[_0x484760(0x16c)](/[-_\s]+(.)?/g,(_0x4b75fc,_0x5a6dd6)=>_0x5a6dd6?_0x5a6dd6[_0x484760(0x127)]():'')['replace'](/^(.)/,(_0x3515e2,_0x259e6b)=>_0x259e6b[_0x484760(0x127)]());}['parseDatasetRelations'](_0xb16c7c,_0x16f799){const _0x5e613c=a0_0x24ad38;let _0x94eba3=null;for(const [,_0x1e36be]of _0x16f799){const _0x483b0a=_0x1e36be['datasets'][_0x5e613c(0x151)](_0x10c9e3=>_0x10c9e3[_0x5e613c(0x178)]===_0xb16c7c);if(_0x483b0a){_0x94eba3={'datasetCode':_0x483b0a[_0x5e613c(0x178)],'datasetName':_0x483b0a[_0x5e613c(0x13e)],'tableName':_0x483b0a[_0x5e613c(0x15b)]};break;}}if(!_0x94eba3)return null;const _0x1cc829=[],_0x3d17b9=[];for(const [,_0x121c0e]of _0x16f799){for(const _0x55eee6 of _0x121c0e['datasets']){if(_0x55eee6[_0x5e613c(0x178)]===_0xb16c7c)for(const _0x4a970d of _0x55eee6[_0x5e613c(0x125)]){const _0x312396=this['findDatasetInErConfigs'](_0x4a970d[_0x5e613c(0x18f)],_0x16f799);_0x1cc829['push']({'fromField':_0x4a970d[_0x5e613c(0x158)],'toDataset':_0x4a970d[_0x5e613c(0x18f)],'toDatasetName':_0x4a970d[_0x5e613c(0x126)],'toField':_0x4a970d['toField'],'joinType':_0x4a970d[_0x5e613c(0x13c)],'condition':_0x4a970d[_0x5e613c(0x194)],'toTableName':_0x312396?.[_0x5e613c(0x15b)]});}if(_0x55eee6[_0x5e613c(0x178)]!==_0xb16c7c)for(const _0x1e6c9c of _0x55eee6[_0x5e613c(0x125)]){_0x1e6c9c[_0x5e613c(0x18f)]===_0xb16c7c&&_0x3d17b9[_0x5e613c(0x14d)]({'fromField':_0x1e6c9c[_0x5e613c(0x158)],'fromDataset':_0x55eee6[_0x5e613c(0x178)],'fromDatasetName':_0x55eee6[_0x5e613c(0x13e)],'fromTableName':_0x55eee6[_0x5e613c(0x15b)],'toDataset':_0x1e6c9c[_0x5e613c(0x18f)],'toDatasetName':_0x1e6c9c[_0x5e613c(0x126)],'toField':_0x1e6c9c[_0x5e613c(0x140)],'joinType':_0x1e6c9c[_0x5e613c(0x13c)],'condition':_0x1e6c9c[_0x5e613c(0x194)],'toTableName':_0x94eba3[_0x5e613c(0x15b)]});}}}return{'datasetCode':_0x94eba3[_0x5e613c(0x178)],'datasetName':_0x94eba3[_0x5e613c(0x13e)],'tableName':_0x94eba3[_0x5e613c(0x15b)],'outgoingRelations':_0x1cc829,'incomingRelations':_0x3d17b9,'allRelations':[..._0x1cc829,..._0x3d17b9]};}[a0_0x24ad38(0x12a)](_0x6a6cb3,_0x4a9c5d){const _0xa637c7=a0_0x24ad38;for(const [,_0xa3e26e]of _0x4a9c5d){const _0xc3572a=_0xa3e26e[_0xa637c7(0x16e)][_0xa637c7(0x151)](_0x2475ba=>_0x2475ba['datasetCode']===_0x6a6cb3);if(_0xc3572a)return{'datasetCode':_0xc3572a[_0xa637c7(0x178)],'datasetName':_0xc3572a[_0xa637c7(0x13e)],'tableName':_0xc3572a[_0xa637c7(0x15b)]};}return null;}[a0_0x24ad38(0x122)](_0x3bc3bd){const _0x17ea94=a0_0x24ad38,_0x2bbd7e=new Map();for(const [,_0x3f56f4]of _0x3bc3bd){for(const _0x565ec2 of _0x3f56f4[_0x17ea94(0x16e)]){const _0x5209f0=this['parseDatasetRelations'](_0x565ec2[_0x17ea94(0x178)],_0x3bc3bd);_0x5209f0&&_0x2bbd7e[_0x17ea94(0x132)](_0x565ec2['datasetCode'],_0x5209f0);}}return _0x2bbd7e;}[a0_0x24ad38(0x161)](_0x209dc5,_0x2bca14){const _0x4540fd=a0_0x24ad38,_0x493441=this[_0x4540fd(0x143)](_0x209dc5,_0x2bca14);if(!_0x493441)return[];const _0x213e3e=new Set();for(const _0xd02886 of _0x493441[_0x4540fd(0x18d)]){_0x213e3e['add'](_0xd02886[_0x4540fd(0x18f)]);}for(const _0x12721d of _0x493441[_0x4540fd(0x13d)]){for(const [,_0x4f0d7a]of _0x2bca14){const _0x499be3=_0x4f0d7a[_0x4540fd(0x16e)][_0x4540fd(0x151)](_0x581ee4=>_0x581ee4[_0x4540fd(0x125)]['some'](_0x35d50b=>_0x35d50b['toDataset']===_0x209dc5&&_0x35d50b[_0x4540fd(0x158)]===_0x12721d[_0x4540fd(0x158)]));if(_0x499be3){_0x213e3e[_0x4540fd(0x174)](_0x499be3[_0x4540fd(0x178)]);break;}}}return Array[_0x4540fd(0x150)](_0x213e3e);}}
|
package/dist/api/cache.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a1_0x3d21d5=a1_0x152c;function a1_0x5c35(){const _0x239e9d=['12682yUAgtw','7457037xcNfrb','floor','clear','keys','data','1360542SfkuEZ','38kBEtXu','delete','now','219036cXJyDX','8296712KPpMQd','cache','30128560VrQaYs','5OqtfEH','defaultTTL','get','9KcTImJ','2922668fSTHhh'];a1_0x5c35=function(){return _0x239e9d;};return a1_0x5c35();}(function(_0x450eb0,_0x524c16){const _0x6482b6=a1_0x152c,_0x2cf36c=_0x450eb0();while(!![]){try{const _0x4f1504=-parseInt(_0x6482b6(0x1ba))/0x1*(-parseInt(_0x6482b6(0x1c1))/0x2)+-parseInt(_0x6482b6(0x1b1))/0x3+parseInt(_0x6482b6(0x1b9))/0x4*(-parseInt(_0x6482b6(0x1b5))/0x5)+parseInt(_0x6482b6(0x1c0))/0x6+-parseInt(_0x6482b6(0x1bb))/0x7+parseInt(_0x6482b6(0x1b2))/0x8*(-parseInt(_0x6482b6(0x1b8))/0x9)+parseInt(_0x6482b6(0x1b4))/0xa;if(_0x4f1504===_0x524c16)break;else _0x2cf36c['push'](_0x2cf36c['shift']());}catch(_0x401c5a){_0x2cf36c['push'](_0x2cf36c['shift']());}}}(a1_0x5c35,0x8c430));function a1_0x152c(_0x2324c7,_0x1068dd){_0x2324c7=_0x2324c7-0x1af;const _0x5c3537=a1_0x5c35();let _0x152ca4=_0x5c3537[_0x2324c7];return _0x152ca4;}export class SimpleCache{['cache']=new Map();[a1_0x3d21d5(0x1b6)];constructor(_0x26bf99=0x5){const _0x157960=a1_0x3d21d5;this[_0x157960(0x1b6)]=_0x26bf99*0x3c*0x3e8;}[a1_0x3d21d5(0x1b7)](_0xad2784){const _0x5a5b89=a1_0x3d21d5,_0x35ec93=this[_0x5a5b89(0x1b3)][_0x5a5b89(0x1b7)](_0xad2784);if(!_0x35ec93)return null;const _0x1a1f66=Date[_0x5a5b89(0x1b0)](),_0xe0e56=_0x1a1f66-_0x35ec93['timestamp'];if(_0xe0e56>this[_0x5a5b89(0x1b6)])return this[_0x5a5b89(0x1b3)][_0x5a5b89(0x1af)](_0xad2784),null;const _0x2fc0ae=Math[_0x5a5b89(0x1bc)](_0xe0e56/0x3e8);return _0x35ec93[_0x5a5b89(0x1bf)];}['set'](_0x23de17,_0x3af5b9){const _0x5a5322=a1_0x3d21d5;this[_0x5a5322(0x1b3)]['set'](_0x23de17,{'data':_0x3af5b9,'timestamp':Date[_0x5a5322(0x1b0)]()});}[a1_0x3d21d5(0x1bd)](_0x3807c8){const _0x18a660=a1_0x3d21d5;_0x3807c8?this[_0x18a660(0x1b3)][_0x18a660(0x1af)](_0x3807c8):this[_0x18a660(0x1b3)][_0x18a660(0x1bd)]();}['getStats'](){const _0x25a000=a1_0x3d21d5;return{'size':this[_0x25a000(0x1b3)]['size'],'ttlMinutes':this['defaultTTL']/0xea60,'entries':Array['from'](this[_0x25a000(0x1b3)][_0x25a000(0x1be)]())};}}export const apiCache=new SimpleCache(0x5);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a2_0x4ca2(_0x4ed701,_0xb4dea1){_0x4ed701=_0x4ed701-0x1f1;const _0xc5607=a2_0xc560();let _0x4ca2b1=_0xc5607[_0x4ed701];return _0x4ca2b1;}const a2_0x17732e=a2_0x4ca2;(function(_0x66190,_0x3cfc04){const _0x4664b1=a2_0x4ca2,_0x372135=_0x66190();while(!![]){try{const _0x5db3ad=-parseInt(_0x4664b1(0x224))/0x1+-parseInt(_0x4664b1(0x200))/0x2*(parseInt(_0x4664b1(0x21e))/0x3)+parseInt(_0x4664b1(0x1f3))/0x4+parseInt(_0x4664b1(0x1fa))/0x5*(parseInt(_0x4664b1(0x23e))/0x6)+parseInt(_0x4664b1(0x20b))/0x7*(-parseInt(_0x4664b1(0x241))/0x8)+parseInt(_0x4664b1(0x232))/0x9*(-parseInt(_0x4664b1(0x211))/0xa)+parseInt(_0x4664b1(0x203))/0xb*(parseInt(_0x4664b1(0x22f))/0xc);if(_0x5db3ad===_0x3cfc04)break;else _0x372135['push'](_0x372135['shift']());}catch(_0x4bd939){_0x372135['push'](_0x372135['shift']());}}}(a2_0xc560,0xf0f3a));import{getCookie}from'../auth/cookie-manager.js';import{getEffectiveApiDomain,getEffectiveRuntimeDomain}from'../auth/constants.js';import{apiCache}from'./cache.js';function a2_0xc560(){const _0x5b35f5=['includes','cookie','updateUserCustomSql','get','currentPage','length','filter','status','set','runtimeBaseUrl','postRequest','dataset-detail:','20598sMKXDF','meta','online','getErConfig','getDatasetList','API\x20error:\x20','1510936cYySqR','yuntoo','/api/custom/executeSql','warn','Failed\x20to\x20get\x20ER\x20config\x20for\x20dblinkId:\x20','request','appCode','sqlName','params','/smartapi/custom/saveUserCustomSql','Authentication\x20failed.\x20Please\x20login\x20again.','11819580tjBDgD','\x0aURL:\x20','executeSql','2373741VgWUoR','from','getDatasetDetail','POST','sqlCode','forceRefresh','getAllErConfigs','dbId','errorMsg','sqlContent','stringify','dataset-list:','7314EtWjXk','apiBaseUrl','dbtableConfig','16zXGXxb','Failed\x20to\x20get\x20ER\x20config\x20for\x20dbId\x20','/smartapi/dataset/getList?appCode=','/smartapi/dataset/get-driven-data?id=','1895744LkUUPA','env','object','runtimeDomain','application/json','name','getUniqueDbIds','1780MhkQYx','message','pageSize','text','data','toLowerCase','254hjtVZK','add','&pageSize=','55igzlna','json','API\x20request\x20failed:\x20HTTP\x20','success','Unknown\x20error','description','er-config:','No\x20authentication\x20cookie\x20found.\x20Please\x20login\x20first.','2158191dHyAIC','getCustomSqlList','/smartapi/custom/updateUserCustomSql','apiDomain','searchDatasets','code','70XdCenB'];a2_0xc560=function(){return _0x5b35f5;};return a2_0xc560();}export class DevApiClient{[a2_0x17732e(0x22a)];[a2_0x17732e(0x1f4)];['cookie'];[a2_0x17732e(0x20e)];[a2_0x17732e(0x1f6)];constructor(_0x4c0f88){const _0x9a1d3e=a2_0x17732e;this['appCode']=_0x4c0f88[_0x9a1d3e(0x22a)],this[_0x9a1d3e(0x1f4)]=_0x4c0f88['env']||_0x9a1d3e(0x220),this[_0x9a1d3e(0x213)]=_0x4c0f88[_0x9a1d3e(0x213)]||getCookie(),this[_0x9a1d3e(0x20e)]=_0x4c0f88[_0x9a1d3e(0x23f)]||getEffectiveApiDomain(this[_0x9a1d3e(0x1f4)]),this[_0x9a1d3e(0x1f6)]=_0x4c0f88[_0x9a1d3e(0x21b)]||getEffectiveRuntimeDomain(this['env']);if(!this[_0x9a1d3e(0x213)])throw new Error(_0x9a1d3e(0x20a));}async[a2_0x17732e(0x229)](_0x37a3ce){const _0x5c8705=a2_0x17732e,_0x502e12=await fetch(_0x37a3ce,{'headers':{'Cookie':this[_0x5c8705(0x213)]}});if(!_0x502e12['ok']){if(_0x502e12[_0x5c8705(0x219)]===0x191)throw new Error('Authentication\x20failed.\x20Please\x20login\x20again.');let _0x246ea7='';try{_0x246ea7=await _0x502e12['text']();}catch{}throw new Error(_0x5c8705(0x205)+_0x502e12[_0x5c8705(0x219)]+'\x0aURL:\x20'+_0x37a3ce+(_0x246ea7?'\x0a'+_0x246ea7:''));}const _0xbc193d=await _0x502e12[_0x5c8705(0x204)]();if(_0xbc193d&&typeof _0xbc193d===_0x5c8705(0x1f5)&&_0x5c8705(0x206)in _0xbc193d&&!_0xbc193d[_0x5c8705(0x206)]){const _0x3c3090=_0xbc193d;throw new Error(_0x5c8705(0x223)+(_0x3c3090['message']||_0x3c3090['errorMsg']||_0x5c8705(0x207)));}return _0xbc193d;}async['postRequest'](_0x24b020,_0x226841){const _0x278d7d=a2_0x17732e,_0xb607=await fetch(_0x24b020,{'method':_0x278d7d(0x235),'headers':{'Content-Type':_0x278d7d(0x1f7),'Cookie':this['cookie']},'body':JSON[_0x278d7d(0x23c)](_0x226841)});if(!_0xb607['ok']){if(_0xb607[_0x278d7d(0x219)]===0x191)throw new Error(_0x278d7d(0x22e));let _0x56b2cd='';try{_0x56b2cd=await _0xb607[_0x278d7d(0x1fd)]();}catch{}throw new Error('API\x20request\x20failed:\x20HTTP\x20'+_0xb607['status']+_0x278d7d(0x230)+_0x24b020+(_0x56b2cd?'\x0a'+_0x56b2cd:''));}const _0x1b4c72=await _0xb607[_0x278d7d(0x204)]();if(_0x1b4c72&&typeof _0x1b4c72===_0x278d7d(0x1f5)&&_0x278d7d(0x206)in _0x1b4c72&&!_0x1b4c72[_0x278d7d(0x206)]){const _0x347bd3=_0x1b4c72;throw new Error(_0x278d7d(0x223)+(_0x347bd3[_0x278d7d(0x1fb)]||_0x347bd3[_0x278d7d(0x23a)]||'Unknown\x20error'));}return _0x1b4c72;}async[a2_0x17732e(0x222)](_0x36916a){const _0x2ea00c=a2_0x17732e,_0x506148=_0x36916a?.[_0x2ea00c(0x1fc)]||0x3e7,_0x3fb1a7=_0x36916a?.[_0x2ea00c(0x216)]||0x1,_0x324cf2=_0x36916a?.[_0x2ea00c(0x237)]||![],_0x2dd294=_0x2ea00c(0x23d)+this[_0x2ea00c(0x22a)]+':'+this['env']+':'+_0x506148+':'+_0x3fb1a7;if(!_0x324cf2){const _0x3c2367=apiCache[_0x2ea00c(0x215)](_0x2dd294);if(_0x3c2367)return _0x3c2367;}const _0x2a689d=this[_0x2ea00c(0x20e)]+_0x2ea00c(0x1f1)+this['appCode']+_0x2ea00c(0x202)+_0x506148+'¤tPage='+_0x3fb1a7,_0x18f75=await this[_0x2ea00c(0x229)](_0x2a689d);return apiCache[_0x2ea00c(0x21a)](_0x2dd294,_0x18f75),_0x18f75;}async[a2_0x17732e(0x234)](_0x352866,_0x6bc81e=![]){const _0x51e369=a2_0x17732e,_0x27bd42=_0x51e369(0x21d)+this[_0x51e369(0x22a)]+':'+this[_0x51e369(0x1f4)]+':'+_0x352866;if(!_0x6bc81e){const _0xb718f6=apiCache['get'](_0x27bd42);if(_0xb718f6)return _0xb718f6;}const _0x2b9aec=this[_0x51e369(0x20e)]+_0x51e369(0x1f2)+_0x352866,_0x54ad88=await this[_0x51e369(0x229)](_0x2b9aec);return apiCache[_0x51e369(0x21a)](_0x27bd42,_0x54ad88),_0x54ad88;}async[a2_0x17732e(0x20f)](_0x329f67){const _0x190cbc=a2_0x17732e,_0x9f7f52=await this[_0x190cbc(0x222)]({'pageSize':0x3e7});if(!_0x9f7f52[_0x190cbc(0x206)]||!_0x9f7f52[_0x190cbc(0x1fe)]?.['tableData'])return{'success':!![],'data':{'tableData':[]}};const _0xb01553=_0x9f7f52[_0x190cbc(0x1fe)]['tableData'][_0x190cbc(0x218)](_0x5452cf=>{const _0x45e9b7=_0x190cbc,_0x4d3293=_0x329f67['toLowerCase']();return _0x5452cf[_0x45e9b7(0x1f8)]?.[_0x45e9b7(0x1ff)]()[_0x45e9b7(0x212)](_0x4d3293)||_0x5452cf[_0x45e9b7(0x210)]?.['toLowerCase']()[_0x45e9b7(0x212)](_0x4d3293)||_0x5452cf['dbtableConfig']?.['tableName']?.[_0x45e9b7(0x1ff)]()[_0x45e9b7(0x212)](_0x4d3293)||_0x5452cf[_0x45e9b7(0x208)]?.[_0x45e9b7(0x1ff)]()[_0x45e9b7(0x212)](_0x4d3293);});return{'success':!![],'data':{'tableData':_0xb01553,'paging':{'totalCount':_0xb01553[_0x190cbc(0x217)],'currentPage':0x1,'pageSize':0x3e7}}};}async[a2_0x17732e(0x20c)](_0x553d03){const _0x297b29=a2_0x17732e,_0x508680=_0x553d03?.[_0x297b29(0x216)]||0x1,_0x52e88e=_0x553d03?.[_0x297b29(0x1fc)]||0x3e7,_0x345e5d=this[_0x297b29(0x20e)]+'/smartapi/custom/queryUserCustomSqlList',_0x4448f6={'appCode':this[_0x297b29(0x22a)],'currentPage':_0x508680,'pageSize':_0x52e88e,..._0x553d03?.[_0x297b29(0x236)]&&{'sqlCode':_0x553d03[_0x297b29(0x236)]},..._0x553d03?.[_0x297b29(0x22b)]&&{'sqlName':_0x553d03[_0x297b29(0x22b)]}},_0x3a1af3=await this[_0x297b29(0x21c)](_0x345e5d,_0x4448f6);return _0x3a1af3;}async[a2_0x17732e(0x231)](_0x37abb7){const _0x2dc9a4=a2_0x17732e,_0x560984=this['runtimeDomain']+_0x2dc9a4(0x226),_0x425810={'appCode':this[_0x2dc9a4(0x22a)],'sqlCode':_0x37abb7['sqlCode'],..._0x37abb7[_0x2dc9a4(0x22c)]&&{'params':_0x37abb7[_0x2dc9a4(0x22c)]}};return await this[_0x2dc9a4(0x21c)](_0x560984,_0x425810);}async['saveUserCustomSql'](_0xe76428){const _0x370c68=a2_0x17732e,_0x5c77ae=this[_0x370c68(0x20e)]+_0x370c68(0x22d),_0x52c2d8={'sqlName':_0xe76428[_0x370c68(0x22b)],'dbId':_0xe76428['dbId'],'sqlContent':_0xe76428['sqlContent'],'appCode':this['appCode']};return await this['postRequest'](_0x5c77ae,_0x52c2d8);}async[a2_0x17732e(0x214)](_0x162912){const _0x8c1ab4=a2_0x17732e,_0x26c6e2=this['apiDomain']+_0x8c1ab4(0x20d),_0x521137={'id':_0x162912['id'],'tenantCode':_0x8c1ab4(0x225),'appCode':this['appCode'],'dbId':_0x162912[_0x8c1ab4(0x239)],'dbName':null,'sqlName':_0x162912[_0x8c1ab4(0x22b)],'sqlCode':_0x162912[_0x8c1ab4(0x236)],'sqlContent':_0x162912[_0x8c1ab4(0x23b)],'sqlConfig':null,'params':null};return await this['postRequest'](_0x26c6e2,_0x521137);}async[a2_0x17732e(0x221)](_0x554c47,_0x3f999c=![]){const _0x5246b8=a2_0x17732e,_0x4b5f9b=_0x5246b8(0x209)+this[_0x5246b8(0x22a)]+':'+this[_0x5246b8(0x1f4)]+':'+_0x554c47;if(!_0x3f999c){const _0x549353=apiCache[_0x5246b8(0x215)](_0x4b5f9b);if(_0x549353)return _0x549353;}const _0x8d50ad=this[_0x5246b8(0x20e)]+'/smartapi/question/er-config',_0x48eff1=await this['postRequest'](_0x8d50ad,{'dblinkId':_0x554c47,'appCode':this[_0x5246b8(0x22a)]});if(!_0x48eff1[_0x5246b8(0x206)]||!_0x48eff1[_0x5246b8(0x1fe)])throw new Error(_0x5246b8(0x228)+_0x554c47);const _0x987a46={'meta':_0x48eff1[_0x5246b8(0x1fe)][_0x5246b8(0x21f)],'datasets':_0x48eff1[_0x5246b8(0x1fe)]['datasets']};return apiCache['set'](_0x4b5f9b,_0x987a46),_0x987a46;}async[a2_0x17732e(0x1f9)](_0xd0ca3d=![]){const _0x38b13d=a2_0x17732e,_0x1c9545=await this['getDatasetList']({'pageSize':0x3e7,'forceRefresh':_0xd0ca3d}),_0x5d8785=_0x1c9545[_0x38b13d(0x1fe)]?.['tableData']||[],_0x4318e8=new Set();for(const _0x5bc3b4 of _0x5d8785){_0x5bc3b4[_0x38b13d(0x240)]?.[_0x38b13d(0x239)]&&_0x4318e8[_0x38b13d(0x201)](_0x5bc3b4[_0x38b13d(0x240)][_0x38b13d(0x239)]);}return Array[_0x38b13d(0x233)](_0x4318e8)['sort']((_0x5bc950,_0x799189)=>_0x5bc950-_0x799189);}async[a2_0x17732e(0x238)](_0x21f5cf=![]){const _0x53b3bf=a2_0x17732e,_0x36c795=await this[_0x53b3bf(0x1f9)](_0x21f5cf),_0x1dbd63=new Map();for(const _0x371da8 of _0x36c795){try{const _0x113a0e=await this['getErConfig'](_0x371da8,_0x21f5cf);_0x1dbd63[_0x53b3bf(0x21a)](_0x371da8,_0x113a0e);}catch(_0x717a65){console[_0x53b3bf(0x227)](_0x53b3bf(0x242)+_0x371da8+':',_0x717a65);}}return _0x1dbd63;}}
|
|
1
|
+
const a2_0x5cf51c=a2_0x36d6;(function(_0x13d8c6,_0x2d7243){const _0x4b4767=a2_0x36d6,_0x3cc8e8=_0x13d8c6();while(!![]){try{const _0x13e046=parseInt(_0x4b4767(0xee))/0x1+parseInt(_0x4b4767(0xfb))/0x2+-parseInt(_0x4b4767(0x106))/0x3*(parseInt(_0x4b4767(0xf7))/0x4)+parseInt(_0x4b4767(0xe8))/0x5*(-parseInt(_0x4b4767(0x11d))/0x6)+parseInt(_0x4b4767(0xdd))/0x7+parseInt(_0x4b4767(0xf0))/0x8+-parseInt(_0x4b4767(0xe9))/0x9;if(_0x13e046===_0x2d7243)break;else _0x3cc8e8['push'](_0x3cc8e8['shift']());}catch(_0x4d6fe8){_0x3cc8e8['push'](_0x3cc8e8['shift']());}}}(a2_0x49d7,0xced64));import{getCookie}from'../auth/cookie-manager.js';function a2_0x36d6(_0x20a5c7,_0x1abed1){_0x20a5c7=_0x20a5c7-0xda;const _0x49d75c=a2_0x49d7();let _0x36d6fd=_0x49d75c[_0x20a5c7];return _0x36d6fd;}import{getEffectiveApiDomain,getEffectiveRuntimeDomain}from'../auth/constants.js';import{apiCache}from'./cache.js';export class DevApiClient{[a2_0x5cf51c(0x119)];['env'];[a2_0x5cf51c(0x103)];['apiDomain'];[a2_0x5cf51c(0x125)];constructor(_0x2c4758){const _0x4a4c30=a2_0x5cf51c;this[_0x4a4c30(0x119)]=_0x2c4758[_0x4a4c30(0x119)],this[_0x4a4c30(0x10d)]=globalThis[_0x4a4c30(0x12c)]?.[_0x4a4c30(0x10d)]?.[_0x4a4c30(0xff)]||_0x4a4c30(0xeb),this[_0x4a4c30(0x103)]=_0x2c4758['cookie']||getCookie(),this[_0x4a4c30(0xfc)]=_0x2c4758[_0x4a4c30(0x10b)]||getEffectiveApiDomain(),this[_0x4a4c30(0x125)]=_0x2c4758[_0x4a4c30(0xe3)]||getEffectiveRuntimeDomain();if(!this[_0x4a4c30(0x103)])throw new Error(_0x4a4c30(0x10c));}async[a2_0x5cf51c(0xe7)](_0x364e88){const _0x33f7fa=a2_0x5cf51c,_0x4728c4=await fetch(_0x364e88,{'headers':{'Cookie':this['cookie']}});if(!_0x4728c4['ok']){if(_0x4728c4[_0x33f7fa(0x11b)]===0x191)throw new Error(_0x33f7fa(0xfa));let _0x33e5af='';try{_0x33e5af=await _0x4728c4[_0x33f7fa(0x124)]();}catch{}throw new Error(_0x33f7fa(0x112)+_0x4728c4[_0x33f7fa(0x11b)]+_0x33f7fa(0xfe)+_0x364e88+(_0x33e5af?'\x0a'+_0x33e5af:''));}const _0x557b09=await _0x4728c4['json']();if(_0x557b09&&typeof _0x557b09===_0x33f7fa(0xde)&&'success'in _0x557b09&&!_0x557b09['success']){const _0x4f464a=_0x557b09;throw new Error('API\x20error:\x20'+(_0x4f464a['message']||_0x4f464a[_0x33f7fa(0xef)]||_0x33f7fa(0x114)));}return _0x557b09;}async[a2_0x5cf51c(0x113)](_0x2381e4,_0x53c74f){const _0x31dcff=a2_0x5cf51c,_0x15f5b9=await fetch(_0x2381e4,{'method':_0x31dcff(0x102),'headers':{'Content-Type':_0x31dcff(0x110),'Cookie':this['cookie']},'body':JSON['stringify'](_0x53c74f)});if(!_0x15f5b9['ok']){if(_0x15f5b9[_0x31dcff(0x11b)]===0x191)throw new Error(_0x31dcff(0xfa));let _0x462873='';try{_0x462873=await _0x15f5b9[_0x31dcff(0x124)]();}catch{}throw new Error('API\x20request\x20failed:\x20HTTP\x20'+_0x15f5b9['status']+'\x0aURL:\x20'+_0x2381e4+(_0x462873?'\x0a'+_0x462873:''));}const _0x249604=await _0x15f5b9[_0x31dcff(0xe1)]();if(_0x249604&&typeof _0x249604===_0x31dcff(0xde)&&_0x31dcff(0x109)in _0x249604&&!_0x249604[_0x31dcff(0x109)]){const _0x1f7a6c=_0x249604;throw new Error(_0x31dcff(0xf4)+(_0x1f7a6c['message']||_0x1f7a6c[_0x31dcff(0xef)]||_0x31dcff(0x114)));}return _0x249604;}async['getDatasetList'](_0x44ebc8){const _0xce5273=a2_0x5cf51c,_0x8bf521=_0x44ebc8?.[_0xce5273(0x116)]||![],_0x2e4725='dataset-list:'+this[_0xce5273(0x119)]+':'+this['env'];if(!_0x8bf521){const _0x1d363a=apiCache[_0xce5273(0xdf)](_0x2e4725);if(_0x1d363a)return _0x1d363a;}const _0x26d4ea=this['apiDomain']+'/smartapi/dataset/get-dataset-list',_0x41995d=await this[_0xce5273(0x113)](_0x26d4ea,{'appCode':this[_0xce5273(0x119)]});return apiCache['set'](_0x2e4725,_0x41995d),_0x41995d;}async[a2_0x5cf51c(0xda)](_0x488e72,_0x59bcfc=![],_0xedfec2=![]){const _0x33d4a5=a2_0x5cf51c,_0x20ccc0='dataset-detail:'+this[_0x33d4a5(0x119)]+':'+this[_0x33d4a5(0x10d)]+':'+_0x488e72+':'+(_0xedfec2?'with-relations':_0x33d4a5(0x12b));if(!_0x59bcfc){const _0x285a24=apiCache['get'](_0x20ccc0);if(_0x285a24)return _0x285a24;}const _0x4d7f4a=this[_0x33d4a5(0xfc)]+_0x33d4a5(0xf5)+_0x488e72,_0x4e83ed=await this[_0x33d4a5(0xe7)](_0x4d7f4a);if(_0xedfec2&&_0x4e83ed[_0x33d4a5(0xea)]?.[_0x33d4a5(0xe5)])try{const _0x2ec2f1=await this['getDatasetRelations'](_0x4e83ed[_0x33d4a5(0xea)][_0x33d4a5(0xe5)],_0x59bcfc);_0x4e83ed[_0x33d4a5(0xea)]['relations']=_0x2ec2f1;}catch(_0x250e16){process[_0x33d4a5(0x10d)][_0x33d4a5(0xf6)]!=='test'&&console['warn'](_0x33d4a5(0x10e)+_0x488e72+':',_0x250e16);}return apiCache[_0x33d4a5(0x129)](_0x20ccc0,_0x4e83ed),_0x4e83ed;}async['searchDatasets'](_0x21fe32){const _0x2613b1=a2_0x5cf51c,_0x5e50a4=await this['getDatasetList'](),_0x24e43c=Array[_0x2613b1(0x128)](_0x5e50a4['data'])?_0x5e50a4[_0x2613b1(0xea)]:_0x5e50a4[_0x2613b1(0xea)]?.[_0x2613b1(0x120)]||[];if(!_0x5e50a4[_0x2613b1(0x109)])return{'success':!![],'data':{'tableData':[]}};const _0x2837d3=_0x24e43c[_0x2613b1(0x12d)](_0x2b9bcb=>{const _0x2d975f=_0x2613b1,_0x15db2f=_0x21fe32[_0x2d975f(0x10a)]();return _0x2b9bcb[_0x2d975f(0xf9)]?.[_0x2d975f(0x10a)]()[_0x2d975f(0x12f)](_0x15db2f)||_0x2b9bcb[_0x2d975f(0x127)]?.[_0x2d975f(0x10a)]()['includes'](_0x15db2f)||_0x2b9bcb[_0x2d975f(0xe0)]?.[_0x2d975f(0x126)]?.[_0x2d975f(0x10a)]()[_0x2d975f(0x12f)](_0x15db2f)||_0x2b9bcb[_0x2d975f(0x12a)]?.['toLowerCase']()[_0x2d975f(0x12f)](_0x15db2f);});return{'success':!![],'data':{'tableData':_0x2837d3,'paging':{'totalCount':_0x2837d3['length'],'currentPage':0x1,'pageSize':_0x2837d3[_0x2613b1(0x11e)]}}};}async['getCustomSqlList'](_0x5a9970){const _0x5bffb0=a2_0x5cf51c,_0x1b12a=_0x5a9970?.['currentPage']||0x1,_0x52d27b=_0x5a9970?.['pageSize']||0x3e7,_0x5efd26=this['apiDomain']+_0x5bffb0(0x131),_0x861694={'appCode':this['appCode'],'currentPage':_0x1b12a,'pageSize':_0x52d27b,..._0x5a9970?.[_0x5bffb0(0x130)]&&{'sqlCode':_0x5a9970[_0x5bffb0(0x130)]},..._0x5a9970?.[_0x5bffb0(0x11c)]&&{'sqlName':_0x5a9970['sqlName']}},_0x392e45=await this[_0x5bffb0(0x113)](_0x5efd26,_0x861694);return _0x392e45;}async[a2_0x5cf51c(0x10f)](_0x38e15b){const _0x3a3695=a2_0x5cf51c,_0x15666e=this[_0x3a3695(0x125)]+_0x3a3695(0x11f),_0x28665c={'appCode':this['appCode'],'sqlCode':_0x38e15b[_0x3a3695(0x130)],..._0x38e15b[_0x3a3695(0x121)]&&{'params':_0x38e15b[_0x3a3695(0x121)]}};return await this[_0x3a3695(0x113)](_0x15666e,_0x28665c);}async['saveUserCustomSql'](_0x4325d1){const _0x2fbfc3=a2_0x5cf51c,_0x3ac1b1=this[_0x2fbfc3(0xfc)]+_0x2fbfc3(0xe4),_0x3fc484={'sqlName':_0x4325d1['sqlName'],'dbId':_0x4325d1[_0x2fbfc3(0x104)],'sqlContent':_0x4325d1['sqlContent'],'appCode':this[_0x2fbfc3(0x119)]};return await this[_0x2fbfc3(0x113)](_0x3ac1b1,_0x3fc484);}async[a2_0x5cf51c(0xe2)](_0x14582c){const _0x54a5ea=a2_0x5cf51c,_0x30caae=this[_0x54a5ea(0xfc)]+_0x54a5ea(0xe6),_0x11dcd5={'id':_0x14582c['id'],'dbId':_0x14582c[_0x54a5ea(0x104)],'sqlName':_0x14582c['sqlName'],'appCode':this[_0x54a5ea(0x119)],'sqlContent':_0x14582c[_0x54a5ea(0xf8)]};return await this['postRequest'](_0x30caae,_0x11dcd5);}async[a2_0x5cf51c(0xed)](_0x4ace09,_0x10a590=![]){const _0x294ccc=a2_0x5cf51c,_0xb0dd36=_0x294ccc(0x118)+this[_0x294ccc(0x119)]+':'+this['env']+':'+_0x4ace09;if(!_0x10a590){const _0x3c6883=apiCache[_0x294ccc(0xdf)](_0xb0dd36);if(_0x3c6883)return _0x3c6883;}const _0x3cd894=this[_0x294ccc(0xfc)]+'/smartapi/question/er-config',_0x1e6be1=await this[_0x294ccc(0x113)](_0x3cd894,{'dblinkId':_0x4ace09,'appCode':this['appCode']});if(!_0x1e6be1[_0x294ccc(0x109)]||!_0x1e6be1['data'])throw new Error(_0x294ccc(0x12e)+_0x4ace09);const _0x3d11f4={'meta':_0x1e6be1[_0x294ccc(0xea)][_0x294ccc(0x105)],'datasets':_0x1e6be1[_0x294ccc(0xea)][_0x294ccc(0x123)]};return apiCache[_0x294ccc(0x129)](_0xb0dd36,_0x3d11f4),_0x3d11f4;}async['getUniqueDbIds'](_0x4dc01d=![]){const _0x45fb5d=a2_0x5cf51c,_0x1f0ec6=await this[_0x45fb5d(0xdb)]({'forceRefresh':_0x4dc01d}),_0xd3472b=Array[_0x45fb5d(0x128)](_0x1f0ec6[_0x45fb5d(0xea)])?_0x1f0ec6[_0x45fb5d(0xea)]:_0x1f0ec6['data']?.[_0x45fb5d(0x120)]||[],_0x39c083=new Set();for(const _0x2d5b15 of _0xd3472b){_0x2d5b15[_0x45fb5d(0xe0)]?.[_0x45fb5d(0x104)]&&_0x39c083[_0x45fb5d(0x11a)](_0x2d5b15[_0x45fb5d(0xe0)][_0x45fb5d(0x104)]);}return Array[_0x45fb5d(0x115)](_0x39c083)[_0x45fb5d(0x132)]((_0x3ac637,_0x47e722)=>_0x3ac637-_0x47e722);}async['getAllErConfigs'](_0x367c02=![]){const _0x4b801c=a2_0x5cf51c,_0x6ada54='er-configs-all:'+this[_0x4b801c(0x119)]+':'+this[_0x4b801c(0x10d)];if(!_0x367c02){const _0x42f2f4=apiCache[_0x4b801c(0xdf)](_0x6ada54);if(_0x42f2f4)return _0x42f2f4;}const _0x26d0de=await this[_0x4b801c(0x107)](_0x367c02),_0x140006=new Map();for(const _0x2c53a4 of _0x26d0de){try{const _0x1da69c=await this[_0x4b801c(0xed)](_0x2c53a4,_0x367c02);_0x140006[_0x4b801c(0x129)](_0x2c53a4,_0x1da69c);}catch(_0x4d432b){console[_0x4b801c(0x108)](_0x4b801c(0xf1)+_0x2c53a4+':',_0x4d432b);}}return apiCache[_0x4b801c(0x129)](_0x6ada54,_0x140006),_0x140006;}async[a2_0x5cf51c(0xdc)](_0x1ee2a3,_0x5b0dba=![]){const _0x9a5676=a2_0x5cf51c,_0x397036=await this[_0x9a5676(0x100)](_0x5b0dba),_0x350c15=[],_0x2898ee=[];for(const [,_0x4e5f1e]of _0x397036){const _0xfce787=_0x4e5f1e['datasets'][_0x9a5676(0x117)](_0x248603=>_0x248603['datasetCode']===_0x1ee2a3);if(_0xfce787)for(const _0x19213b of _0xfce787[_0x9a5676(0xfd)]||[]){_0x350c15[_0x9a5676(0x122)]({'toDataset':_0x19213b[_0x9a5676(0x111)],'toDatasetName':_0x19213b['toDatasetName'],'toField':_0x19213b[_0x9a5676(0xf2)],'fromField':_0x19213b[_0x9a5676(0xec)],'joinType':_0x19213b[_0x9a5676(0xf3)]});}for(const _0x2cbabb of _0x4e5f1e[_0x9a5676(0x123)]){if(_0x2cbabb[_0x9a5676(0x101)]===_0x1ee2a3)continue;for(const _0x39bdde of _0x2cbabb[_0x9a5676(0xfd)]||[]){_0x39bdde[_0x9a5676(0x111)]===_0x1ee2a3&&_0x2898ee[_0x9a5676(0x122)]({'fromDataset':_0x2cbabb[_0x9a5676(0x101)],'fromDatasetName':_0x2cbabb['datasetName'],'fromField':_0x39bdde['fromField'],'toField':_0x39bdde[_0x9a5676(0xf2)],'joinType':_0x39bdde[_0x9a5676(0xf3)]});}}}return{'outgoing':_0x350c15,'incoming':_0x2898ee};}}function a2_0x49d7(){const _0x370f25=['cookie','dbId','meta','69555ETIovn','getUniqueDbIds','warn','success','toLowerCase','apiBaseUrl','No\x20authentication\x20cookie\x20found.\x20Please\x20login\x20first.','env','[getDatasetDetail]\x20Failed\x20to\x20fetch\x20relations\x20for\x20','executeSql','application/json','toDataset','API\x20request\x20failed:\x20HTTP\x20','postRequest','Unknown\x20error','from','forceRefresh','find','er-config:','appCode','add','status','sqlName','3100602qJgIKS','length','/api/custom/executeSql','tableData','params','push','datasets','text','runtimeDomain','tableName','code','isArray','set','description','no-relations','process','filter','Failed\x20to\x20get\x20ER\x20config\x20for\x20dblinkId:\x20','includes','sqlCode','/smartapi/custom/queryUserCustomSqlList','sort','getDatasetDetail','getDatasetList','getDatasetRelations','5312601pdcdAa','object','get','dbtableConfig','json','updateUserCustomSql','runtimeBaseUrl','/smartapi/custom/saveUserCustomSql','modelCode','/smartapi/custom/updateUserCustomSql','request','10likGvO','9096111foCrgR','data','online','fromField','getErConfig','1061858yBfkqc','errorMsg','2443432zYMRqm','Failed\x20to\x20get\x20ER\x20config\x20for\x20dbId\x20','toField','joinType','API\x20error:\x20','/smartapi/dataset/get-driven-data?id=','NODE_ENV','76xrVMOj','sqlContent','name','Authentication\x20failed.\x20Please\x20login\x20again.','2411404aRqqzx','apiDomain','relations','\x0aURL:\x20','LOVRABET_ENV','getAllErConfigs','datasetCode','POST'];a2_0x49d7=function(){return _0x370f25;};return a2_0x49d7();}
|
package/dist/auth/constants.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4017f1,_0x32b659){var _0x110fc9=a3_0x53d5,_0x4a979e=_0x4017f1();while(!![]){try{var _0x2de9b4=-parseInt(_0x110fc9(0xbf))/0x1*(-parseInt(_0x110fc9(0xbc))/0x2)+parseInt(_0x110fc9(0xc4))/0x3+parseInt(_0x110fc9(0xc1))/0x4*(-parseInt(_0x110fc9(0xc3))/0x5)+-parseInt(_0x110fc9(0xbd))/0x6+parseInt(_0x110fc9(0xc2))/0x7*(-parseInt(_0x110fc9(0xc0))/0x8)+-parseInt(_0x110fc9(0xbe))/0x9+parseInt(_0x110fc9(0xc5))/0xa;if(_0x2de9b4===_0x32b659)break;else _0x4a979e['push'](_0x4a979e['shift']());}catch(_0x3b3918){_0x4a979e['push'](_0x4a979e['shift']());}}}(a3_0x12f3,0x883cb));function a3_0x12f3(){var _0x584d4c=['2059650UUOzEK','23DjUBtN','8ELIEmY','17844TVKUxJ','6945316uVKUqT','45ucUIRQ','1950384GMvCBE','18021900NccuQp','40220PcFxJi','6573804pqCWiX'];a3_0x12f3=function(){return _0x584d4c;};return a3_0x12f3();}function a3_0x53d5(_0x4fcc75,_0x42cb46){_0x4fcc75=_0x4fcc75-0xbc;var _0x12f34f=a3_0x12f3();var _0x53d536=_0x12f34f[_0x4fcc75];return _0x53d536;}export{getEnvAppCode,getEnvironment,getEnvApiBaseUrl,getEnvRuntimeBaseUrl,getEnvUserBaseUrl,getEnvAuthCookie,configDir,cookieFile,defaultConfig,getEnvAppCodeWithFallback,getApiDomain,getUserDomain,getRuntimeDomain,getEffectiveApiDomain,getEffectiveRuntimeDomain,getEffectiveUserDomain}from'../config/env.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a4_0x4a28(){const _0xb222b6=['6990895bZtoka','3624744WEnYcz','1516964cucDzZ','utf-8','length','trim','9pkmBRs','16937OuqkWq','105qhQlwS','52085gBxqdy','122smQHME','9kqdZEY','11929010UrhNPF','760416EmYRRU','3204MBHNaC','message','Failed\x20to\x20save\x20cookie\x20to\x20'];a4_0x4a28=function(){return _0xb222b6;};return a4_0x4a28();}(function(_0x15cc4d,_0x50bc51){const _0x48a6fc=a4_0x5bb6,_0x1ec5fa=_0x15cc4d();while(!![]){try{const _0x16cc87=-parseInt(_0x48a6fc(0x10a))/0x1*(parseInt(_0x48a6fc(0xfc))/0x2)+parseInt(_0x48a6fc(0xfd))/0x3*(parseInt(_0x48a6fc(0x105))/0x4)+-parseInt(_0x48a6fc(0x103))/0x5+-parseInt(_0x48a6fc(0xff))/0x6*(-parseInt(_0x48a6fc(0xfa))/0x7)+parseInt(_0x48a6fc(0x104))/0x8+parseInt(_0x48a6fc(0x109))/0x9*(parseInt(_0x48a6fc(0xfe))/0xa)+-parseInt(_0x48a6fc(0xfb))/0xb*(parseInt(_0x48a6fc(0x100))/0xc);if(_0x16cc87===_0x50bc51)break;else _0x1ec5fa['push'](_0x1ec5fa['shift']());}catch(_0x273c96){_0x1ec5fa['push'](_0x1ec5fa['shift']());}}}(a4_0x4a28,0xf17f8));import{readFileSync,writeFileSync}from'node:fs';import{getEnvAuthCookie,cookieFile}from'../config/env.js';export function getCookie(){const _0x2565c8=a4_0x5bb6,_0x4222d6=getEnvAuthCookie();if(_0x4222d6)return _0x4222d6;try{return readFileSync(cookieFile,_0x2565c8(0x106))[_0x2565c8(0x108)]();}catch{return'';}}export function saveCookie(_0x1d663e){const _0x98f181=a4_0x5bb6;try{writeFileSync(cookieFile,_0x1d663e,_0x98f181(0x106));}catch(_0xb79d9c){throw new Error(_0x98f181(0x102)+cookieFile+':\x20'+_0xb79d9c[_0x98f181(0x101)]);}}function a4_0x5bb6(_0x4b0738,_0x5f2eaf){_0x4b0738=_0x4b0738-0xfa;const _0x4a28ee=a4_0x4a28();let _0x5bb681=_0x4a28ee[_0x4b0738];return _0x5bb681;}export function hasCookie(){const _0x2b7ea1=a4_0x5bb6,_0x460191=getCookie();return _0x460191[_0x2b7ea1(0x107)]>0x0;}export function clearCookie(){try{writeFileSync(cookieFile,'','utf-8');}catch{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a5_0x12b4(_0x3f6f7a,_0x3655b8){_0x3f6f7a=_0x3f6f7a-0x159;const _0x295c6c=a5_0x295c();let _0x12b403=_0x295c6c[_0x3f6f7a];return _0x12b403;}(function(_0x320c34,_0xb44436){const _0x51e225=a5_0x12b4,_0x31bbe7=_0x320c34();while(!![]){try{const _0xc7dbf4=-parseInt(_0x51e225(0x15d))/0x1+-parseInt(_0x51e225(0x15a))/0x2+-parseInt(_0x51e225(0x15e))/0x3+-parseInt(_0x51e225(0x161))/0x4*(parseInt(_0x51e225(0x160))/0x5)+-parseInt(_0x51e225(0x162))/0x6*(parseInt(_0x51e225(0x15c))/0x7)+-parseInt(_0x51e225(0x163))/0x8*(-parseInt(_0x51e225(0x15f))/0x9)+-parseInt(_0x51e225(0x164))/0xa*(-parseInt(_0x51e225(0x165))/0xb);if(_0xc7dbf4===_0xb44436)break;else _0x31bbe7['push'](_0x31bbe7['shift']());}catch(_0x4128bf){_0x31bbe7['push'](_0x31bbe7['shift']());}}}(a5_0x295c,0xbf129));function a5_0x295c(){const _0x274bc0=['4jXAjwo','6WbrnFY','43528DMNdwg','890OvunwD','547151NBrXVE','/api/auth/get-session','user','2541982bumlPn','json','2174347ghUpjV','891072bkBNdD','3094236sBZLtG','1503hBfsDj','5244335KleUXw'];a5_0x295c=function(){return _0x274bc0;};return a5_0x295c();}import{getCookie}from'./cookie-manager.js';import{getUserDomain}from'../config/env.js';export async function isSessionValid(){const _0x34bab9=a5_0x12b4,_0x4694ae=getCookie();if(!_0x4694ae)return![];try{const _0x39c4e5=await fetch(getUserDomain()+_0x34bab9(0x166),{'headers':{'cookie':_0x4694ae}});if(!_0x39c4e5['ok'])return![];const _0x686038=await _0x39c4e5[_0x34bab9(0x15b)]();return!!(_0x686038?.['session']&&_0x686038?.[_0x34bab9(0x159)]);}catch{return![];}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a6_0x31be(){const _0x2ac437=['NODE_ENV','108EdNaAi','test','/.lovrabet','3668100sOOobN','LOVRABET_ENV','daily','2971jUrFiy','production','1611795bzUkwe','144684EzGYoA','https://user-daily.lovrabet.com','LOVRABET_RUNTIME_BASEURL','https://daily-api.lovrabet.com','trim','/cookie','env','https://api.lovrabet.com','91JPlvYy','27468uUKZJe','LOVRABET_AUTH_COOKIE','LOVRABET_USER_BASEURL','https://runtime.lovrabet.com','online','304nzsDWX','11528110FGZHvL','29148PHgrXe','https://daily-runtime.lovrabet.com','52yDuCqz'];a6_0x31be=function(){return _0x2ac437;};return a6_0x31be();}const a6_0x543ae7=a6_0x24dc;(function(_0x33bede,_0x5f35e5){const _0x450b07=a6_0x24dc,_0x23808e=_0x33bede();while(!![]){try{const _0x251080=parseInt(_0x450b07(0x1f5))/0x1*(parseInt(_0x450b07(0x1ef))/0x2)+-parseInt(_0x450b07(0x1eb))/0x3*(parseInt(_0x450b07(0x1ed))/0x4)+-parseInt(_0x450b07(0x1f7))/0x5+-parseInt(_0x450b07(0x1f8))/0x6*(parseInt(_0x450b07(0x1e3))/0x7)+-parseInt(_0x450b07(0x1e9))/0x8*(-parseInt(_0x450b07(0x1e4))/0x9)+-parseInt(_0x450b07(0x1f2))/0xa+parseInt(_0x450b07(0x1ea))/0xb;if(_0x251080===_0x5f35e5)break;else _0x23808e['push'](_0x23808e['shift']());}catch(_0x54cacd){_0x23808e['push'](_0x23808e['shift']());}}}(a6_0x31be,0x2fb85));import{mkdirSync}from'node:fs';import{homedir}from'node:os';export function getEnvAppCode(){const _0x38d16c=a6_0x24dc;return process[_0x38d16c(0x1e1)]['LOVRABET_APP_CODE'];}export function getEnvironment(){const _0x307189=a6_0x24dc;return process[_0x307189(0x1e1)][_0x307189(0x1f3)]||'online';}export function getEnvApiBaseUrl(){return process['env']['LOVRABET_API_BASEURL'];}function a6_0x24dc(_0x2afe1b,_0x17ef7e){_0x2afe1b=_0x2afe1b-0x1e1;const _0x31be95=a6_0x31be();let _0x24dcc5=_0x31be95[_0x2afe1b];return _0x24dcc5;}export function getEnvRuntimeBaseUrl(){const _0x5ef77b=a6_0x24dc;return process['env'][_0x5ef77b(0x1fa)];}export function getEnvUserBaseUrl(){const _0x280eaa=a6_0x24dc;return process[_0x280eaa(0x1e1)][_0x280eaa(0x1e6)];}export function getEnvAuthCookie(){const _0x5e7fd5=a6_0x24dc;return process[_0x5e7fd5(0x1e1)][_0x5e7fd5(0x1e5)]?.[_0x5e7fd5(0x1fc)]();}export function isTestEnv(){const _0x14010c=a6_0x24dc;return process[_0x14010c(0x1e1)]['NODE_ENV']===_0x14010c(0x1f0);}export function isProductionEnv(){const _0x4c10ba=a6_0x24dc;return process[_0x4c10ba(0x1e1)][_0x4c10ba(0x1ee)]===_0x4c10ba(0x1f6);}export function isDevelopmentEnv(){const _0x46da8a=a6_0x24dc;return process[_0x46da8a(0x1e1)]['NODE_ENV']==='development';}export function shouldLog(){const _0x33d59a=a6_0x24dc,_0x578dca=process[_0x33d59a(0x1e1)]['NODE_ENV'];return _0x578dca==='development'||_0x578dca===_0x33d59a(0x1f4);}export const configDir=homedir()+a6_0x543ae7(0x1f1);export const cookieFile=configDir+a6_0x543ae7(0x1fd);mkdirSync(configDir,{'recursive':!![]});export const defaultConfig={'appCode':getEnvAppCode(),'env':getEnvironment()};export function getEnvAppCodeWithFallback(_0x381f1a){return getEnvAppCode()||_0x381f1a;}export function getApiDomain(){const _0x2a625b=a6_0x543ae7,_0x425d09=getEnvironment();return _0x425d09===_0x2a625b(0x1e8)?_0x2a625b(0x1e2):_0x2a625b(0x1fb);}export function getUserDomain(){const _0x90a56f=a6_0x543ae7,_0x53d31e=getEnvironment();return _0x53d31e==='online'?'https://user.lovrabet.com':_0x90a56f(0x1f9);}export function getRuntimeDomain(){const _0x16c041=a6_0x543ae7,_0x172714=getEnvironment();return _0x172714===_0x16c041(0x1e8)?_0x16c041(0x1e7):_0x16c041(0x1ec);}export function getEffectiveApiDomain(){return getEnvApiBaseUrl()||getApiDomain();}export function getEffectiveRuntimeDomain(){return getEnvRuntimeBaseUrl()||getRuntimeDomain();}export function getEffectiveUserDomain(){return getEnvUserBaseUrl()||getUserDomain();}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const
|
|
2
|
+
function a7_0xa9c8(_0x30c3db,_0x16835b){_0x30c3db=_0x30c3db-0x1be;const _0x23e5e3=a7_0x23e5();let _0xa9c868=_0x23e5e3[_0x30c3db];return _0xa9c868;}(function(_0x417a60,_0x1353a9){const _0x3d265d=a7_0xa9c8,_0x4f3d6b=_0x417a60();while(!![]){try{const _0x84ba29=parseInt(_0x3d265d(0x1c0))/0x1+-parseInt(_0x3d265d(0x1d2))/0x2+-parseInt(_0x3d265d(0x1c3))/0x3*(-parseInt(_0x3d265d(0x1d1))/0x4)+parseInt(_0x3d265d(0x1c7))/0x5*(parseInt(_0x3d265d(0x1be))/0x6)+-parseInt(_0x3d265d(0x1ca))/0x7*(-parseInt(_0x3d265d(0x1c8))/0x8)+-parseInt(_0x3d265d(0x1bf))/0x9*(-parseInt(_0x3d265d(0x1c6))/0xa)+-parseInt(_0x3d265d(0x1c1))/0xb;if(_0x84ba29===_0x1353a9)break;else _0x4f3d6b['push'](_0x4f3d6b['shift']());}catch(_0x55b075){_0x4f3d6b['push'](_0x4f3d6b['shift']());}}}(a7_0x23e5,0x848c4));function a7_0x23e5(){const _0x1abca4=['MCP_DEBUG','721yiJToG','Shutting\x20down\x20Lovrabet\x20Dataset\x20MCP\x20Server...','Unhandled\x20error:','SIGINT','Failed\x20to\x20start\x20Lovrabet\x20Dataset\x20MCP\x20Server:','SIGTERM','env','28XQsAfh','454426amYMSO','151266SeyAjp','36YqAlWJ','47795rlPlMf','12002958vCtvbe','connect','337623nUnGiZ','exit','error','1686100XSfKSU','10peNILS','23368LOfurO'];a7_0x23e5=function(){return _0x1abca4;};return a7_0x23e5();}import{StdioServerTransport}from'@modelcontextprotocol/sdk/server/stdio.js';import{createServer}from'./server.js';async function main(){const _0x5b5f25=a7_0xa9c8;try{const _0x2c3d8d=createServer(),_0xfe4fb7=new StdioServerTransport();_0x2c3d8d['logInfo'](),await _0x2c3d8d[_0x5b5f25(0x1c2)](_0xfe4fb7),process['on'](_0x5b5f25(0x1cd),async()=>{const _0x1f5c38=_0x5b5f25;process[_0x1f5c38(0x1d0)]['MCP_DEBUG']&&console['log'](_0x1f5c38(0x1cb)),process[_0x1f5c38(0x1c4)](0x0);}),process['on'](_0x5b5f25(0x1cf),async()=>{const _0x3bce9e=_0x5b5f25;process[_0x3bce9e(0x1d0)][_0x3bce9e(0x1c9)]&&console['log']('Shutting\x20down\x20Lovrabet\x20Dataset\x20MCP\x20Server...'),process[_0x3bce9e(0x1c4)](0x0);});}catch(_0x16b542){console['error'](_0x5b5f25(0x1ce),_0x16b542),process[_0x5b5f25(0x1c4)](0x1);}}main()['catch'](_0xb7454=>{const _0x22e5dd=a7_0xa9c8;console[_0x22e5dd(0x1c5)](_0x22e5dd(0x1cc),_0xb7454),process['exit'](0x1);});
|