@lovrabet/rabetbase-cli 2.3.16-beta.2 → 2.3.16-beta.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.
Files changed (279) hide show
  1. package/README.md +1 -1
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.js +1 -1
  7. package/lib/auth/constant.js +1 -1
  8. package/lib/auth/get-cookie.js +1 -1
  9. package/lib/auth/get-session-user.js +1 -1
  10. package/lib/auth/is-session-valid.js +1 -1
  11. package/lib/auth/login-success-html.js +1 -1
  12. package/lib/auth/logout.js +1 -1
  13. package/lib/cli-flags.js +1 -1
  14. package/lib/cli.js +1 -1
  15. package/lib/commands/api/generate.js +1 -1
  16. package/lib/commands/api/index.js +1 -1
  17. package/lib/commands/api/list.js +1 -1
  18. package/lib/commands/api/pull.js +1 -1
  19. package/lib/commands/api/shared.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/members-list.js +1 -1
  23. package/lib/commands/app/remote-directory.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/get.js +1 -1
  53. package/lib/commands/config/index.js +1 -1
  54. package/lib/commands/config/list.js +1 -1
  55. package/lib/commands/config/set.js +1 -1
  56. package/lib/commands/config/shared.js +1 -1
  57. package/lib/commands/data/filter.js +1 -1
  58. package/lib/commands/data/getOne.js +1 -1
  59. package/lib/commands/data/index.js +1 -1
  60. package/lib/commands/data/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.js +1 -1
  62. package/lib/commands/dataset/capability.js +1 -1
  63. package/lib/commands/dataset/delete.js +1 -1
  64. package/lib/commands/dataset/detail.js +1 -1
  65. package/lib/commands/dataset/extend-update.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/db/analysis-batching.js +1 -1
  80. package/lib/commands/db/analyze-batch-plan.js +1 -1
  81. package/lib/commands/db/analyze-cancel.js +1 -1
  82. package/lib/commands/db/analyze-start.js +1 -1
  83. package/lib/commands/db/analyze-status.js +1 -1
  84. package/lib/commands/db/create.js +1 -1
  85. package/lib/commands/db/delete.js +1 -1
  86. package/lib/commands/db/detail.js +1 -1
  87. package/lib/commands/db/diff.js +1 -1
  88. package/lib/commands/db/index.js +1 -1
  89. package/lib/commands/db/list.js +1 -1
  90. package/lib/commands/db/shared.js +1 -1
  91. package/lib/commands/db/tables.js +1 -1
  92. package/lib/commands/db/test.js +1 -1
  93. package/lib/commands/db/update.js +1 -1
  94. package/lib/commands/doctor.js +1 -1
  95. package/lib/commands/file/index.js +1 -1
  96. package/lib/commands/init/index.js +1 -1
  97. package/lib/commands/issue/index.js +1 -1
  98. package/lib/commands/issue/nudge.js +1 -1
  99. package/lib/commands/issue/report.js +1 -1
  100. package/lib/commands/issue/shared.js +1 -1
  101. package/lib/commands/kb/create.js +1 -1
  102. package/lib/commands/kb/delete.js +1 -1
  103. package/lib/commands/kb/detail.js +1 -1
  104. package/lib/commands/kb/index.js +1 -1
  105. package/lib/commands/kb/list.js +1 -1
  106. package/lib/commands/kb/shared.js +1 -1
  107. package/lib/commands/kb/update.js +1 -1
  108. package/lib/commands/logs/index.js +1 -1
  109. package/lib/commands/menu/asset-update.js +1 -1
  110. package/lib/commands/menu/delete.js +1 -1
  111. package/lib/commands/menu/external-link-create.js +1 -1
  112. package/lib/commands/menu/external-link-update.js +1 -1
  113. package/lib/commands/menu/group-create.js +1 -1
  114. package/lib/commands/menu/group-update.js +1 -1
  115. package/lib/commands/menu/index.js +1 -1
  116. package/lib/commands/menu/list.js +1 -1
  117. package/lib/commands/menu/move.js +1 -1
  118. package/lib/commands/menu/regroup-start.js +1 -1
  119. package/lib/commands/menu/rename.js +1 -1
  120. package/lib/commands/menu/shared/compare-table.js +1 -1
  121. package/lib/commands/menu/shared/delete-plan.js +1 -1
  122. package/lib/commands/menu/shared/facts.js +1 -1
  123. package/lib/commands/menu/shared/index.js +1 -1
  124. package/lib/commands/menu/shared/inquirer.js +1 -1
  125. package/lib/commands/menu/shared/local-pages.js +1 -1
  126. package/lib/commands/menu/shared/logic.js +1 -1
  127. package/lib/commands/menu/shared/mutations.js +1 -1
  128. package/lib/commands/menu/shared/service.js +1 -1
  129. package/lib/commands/menu/shared/sync-core.js +1 -1
  130. package/lib/commands/menu/shared/update-core.js +1 -1
  131. package/lib/commands/menu/shared/valid-url.js +1 -1
  132. package/lib/commands/menu/sync.js +1 -1
  133. package/lib/commands/notification/config-list.js +1 -1
  134. package/lib/commands/notification/index.js +1 -1
  135. package/lib/commands/ocr/index.js +1 -1
  136. package/lib/commands/page/generate-start.js +1 -1
  137. package/lib/commands/page/generate-status.js +1 -1
  138. package/lib/commands/page/index.js +1 -1
  139. package/lib/commands/page/pull.js +1 -1
  140. package/lib/commands/page/push.js +1 -1
  141. package/lib/commands/page/relation-audit.js +1 -1
  142. package/lib/commands/page/restore.js +1 -1
  143. package/lib/commands/page/shared.js +1 -1
  144. package/lib/commands/page/standard-page-status.js +1 -1
  145. package/lib/commands/page/sync.js +1 -1
  146. package/lib/commands/permit/index.js +1 -1
  147. package/lib/commands/permit/page-get.js +1 -1
  148. package/lib/commands/permit/page-set.js +1 -1
  149. package/lib/commands/permit/role-apis-set.js +1 -1
  150. package/lib/commands/permit/role-menus-set.js +1 -1
  151. package/lib/commands/permit/role-menus.js +1 -1
  152. package/lib/commands/permit/shared.js +1 -1
  153. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  154. package/lib/commands/project/create/format-elapsed.js +1 -1
  155. package/lib/commands/project/create/main.js +1 -1
  156. package/lib/commands/project/create/non-interactive.js +1 -1
  157. package/lib/commands/project/create/project-template-path.js +1 -1
  158. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  159. package/lib/commands/project/create/use-format-code.js +1 -1
  160. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  161. package/lib/commands/project/index.js +1 -1
  162. package/lib/commands/project/upgrade.js +1 -1
  163. package/lib/commands/registry.js +1 -1
  164. package/lib/commands/role/create.js +1 -1
  165. package/lib/commands/role/delete.js +1 -1
  166. package/lib/commands/role/detail.js +1 -1
  167. package/lib/commands/role/index.js +1 -1
  168. package/lib/commands/role/list.js +1 -1
  169. package/lib/commands/role/shared.js +1 -1
  170. package/lib/commands/role/update.js +1 -1
  171. package/lib/commands/role/user-add.js +1 -1
  172. package/lib/commands/role/user-remove.js +1 -1
  173. package/lib/commands/role/user-resolve.js +1 -1
  174. package/lib/commands/run/index.js +1 -1
  175. package/lib/commands/schema.js +1 -1
  176. package/lib/commands/sql/create.js +1 -1
  177. package/lib/commands/sql/delete.js +1 -1
  178. package/lib/commands/sql/detail.js +1 -1
  179. package/lib/commands/sql/exec.js +1 -1
  180. package/lib/commands/sql/index.js +1 -1
  181. package/lib/commands/sql/list.js +1 -1
  182. package/lib/commands/sql/pull.js +1 -1
  183. package/lib/commands/sql/push.js +1 -1
  184. package/lib/commands/sql/shared.js +1 -1
  185. package/lib/commands/sql/status.js +1 -1
  186. package/lib/commands/sql/validate.js +1 -1
  187. package/lib/commands/task/index.js +1 -1
  188. package/lib/commands/task/status.js +1 -1
  189. package/lib/commands/tenant/index.js +1 -1
  190. package/lib/commands/tenant/members-list.js +1 -1
  191. package/lib/commands/tenant/shared.js +1 -1
  192. package/lib/commands/workspace/add.js +1 -1
  193. package/lib/commands/workspace/index.js +1 -1
  194. package/lib/commands/workspace/remove.js +1 -1
  195. package/lib/config/schema.js +1 -1
  196. package/lib/constant/cdn.js +1 -1
  197. package/lib/constant/cli.js +1 -1
  198. package/lib/constant/defaults.js +1 -1
  199. package/lib/constant/domain.js +1 -1
  200. package/lib/constant/env.js +1 -1
  201. package/lib/constant/output.js +1 -1
  202. package/lib/constant/paths.js +1 -1
  203. package/lib/constant/risk.js +1 -1
  204. package/lib/context/app-resolver.js +1 -1
  205. package/lib/context/auth-resolver.js +1 -1
  206. package/lib/context/config-loader.js +1 -1
  207. package/lib/context.js +1 -1
  208. package/lib/core/alias-resolver.js +1 -1
  209. package/lib/core/api-client.js +1 -1
  210. package/lib/core/bff/config.js +1 -1
  211. package/lib/core/bff/file-system.js +1 -1
  212. package/lib/core/bff/hash.js +1 -1
  213. package/lib/core/bff/lock.js +1 -1
  214. package/lib/core/bff/utils.js +1 -1
  215. package/lib/core/db-resolver.js +1 -1
  216. package/lib/core/page/file-system.js +1 -1
  217. package/lib/core/page/hash.js +1 -1
  218. package/lib/core/page/lock.js +1 -1
  219. package/lib/core/sql-index-auditor.js +1 -1
  220. package/lib/core/sql-sync/config.js +1 -1
  221. package/lib/core/sql-sync/file-system.js +1 -1
  222. package/lib/core/sql-sync/hash.js +1 -1
  223. package/lib/core/sql-sync/lock.js +1 -1
  224. package/lib/core/sql-sync/utils.js +1 -1
  225. package/lib/core/sql-validator.js +1 -1
  226. package/lib/errors.js +1 -1
  227. package/lib/framework/build-all-flags.js +1 -1
  228. package/lib/framework/error-output.js +1 -1
  229. package/lib/framework/explicit-yes.js +1 -1
  230. package/lib/framework/flags.js +1 -1
  231. package/lib/framework/help.js +1 -1
  232. package/lib/framework/index.js +1 -1
  233. package/lib/framework/output.js +1 -1
  234. package/lib/framework/response.js +1 -1
  235. package/lib/framework/runner-alias.js +1 -1
  236. package/lib/framework/runner.js +1 -1
  237. package/lib/framework/schema-export.js +1 -1
  238. package/lib/framework/types.js +1 -1
  239. package/lib/generated/build-info.js +1 -1
  240. package/lib/help.js +1 -1
  241. package/lib/skills/main.js +1 -1
  242. package/lib/skills/npx-skills-add.js +1 -1
  243. package/lib/skills/skill-presence.js +1 -1
  244. package/lib/telemetry/cli-command-trace.js +1 -1
  245. package/lib/telemetry/cli-help-trace.js +1 -1
  246. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  247. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  248. package/lib/telemetry/send-cli-trace-log.js +1 -1
  249. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  250. package/lib/utils/ai_config.js +1 -1
  251. package/lib/utils/apply-jq-filter.js +1 -1
  252. package/lib/utils/cdn-config.js +1 -1
  253. package/lib/utils/check-sdk-version.js +1 -1
  254. package/lib/utils/cli-version-check.js +1 -1
  255. package/lib/utils/cli-version-policy.js +1 -1
  256. package/lib/utils/config.js +1 -1
  257. package/lib/utils/copy-directory.js +1 -1
  258. package/lib/utils/entity-with-id.js +1 -1
  259. package/lib/utils/file-utils.js +1 -1
  260. package/lib/utils/guides-cdn.js +1 -1
  261. package/lib/utils/http-client.js +1 -1
  262. package/lib/utils/is-non-interactive.js +1 -1
  263. package/lib/utils/logger.js +1 -1
  264. package/lib/utils/params.js +1 -1
  265. package/lib/utils/platform.js +1 -1
  266. package/lib/utils/rules-cdn.js +1 -1
  267. package/lib/utils/sleep.js +1 -1
  268. package/lib/utils/template-replacer.js +1 -1
  269. package/lib/utils/update-notice.js +1 -1
  270. package/lib/utils/version.js +1 -1
  271. package/lib/utils/with-active-cookie.js +1 -1
  272. package/lib/utils/write-cli-side-channel.js +1 -1
  273. package/package.json +1 -1
  274. package/templates/projects/sub-app-react-demo/CHANGELOG.md +1 -1
  275. package/templates/projects/sub-app-react-demo/README.md +1 -1
  276. package/templates/projects/sub-app-react-demo/docs/quick-start.md +1 -1
  277. package/templates/projects/sub-app-react-demo/src/pages/index.tsx +1 -1
  278. package/lib/commands/project/init.js +0 -1
  279. package/lib/commands/sql/save.js +0 -1
@@ -1 +1 @@
1
- (function(_0x1ef99f,_0x172073){var _0x26eb8c=a277_0x49ae,_0x24115f=_0x1ef99f();while(!![]){try{var _0x222030=-parseInt(_0x26eb8c(0x104))/0x1*(parseInt(_0x26eb8c(0xfa))/0x2)+parseInt(_0x26eb8c(0x102))/0x3*(-parseInt(_0x26eb8c(0x106))/0x4)+parseInt(_0x26eb8c(0xff))/0x5+parseInt(_0x26eb8c(0x100))/0x6+-parseInt(_0x26eb8c(0xfe))/0x7+-parseInt(_0x26eb8c(0xfb))/0x8*(-parseInt(_0x26eb8c(0x101))/0x9)+parseInt(_0x26eb8c(0xfc))/0xa*(parseInt(_0x26eb8c(0x103))/0xb);if(_0x222030===_0x172073)break;else _0x24115f['push'](_0x24115f['shift']());}catch(_0x5cb6e3){_0x24115f['push'](_0x24115f['shift']());}}}(a277_0x51be,0xdd8a6));function a277_0x51be(){var _0x2a0b7c=['9uWOMmE','1733112tnrJhG','2585XiygSO','223219zWWXIV','write','4RNpofX','12xypCwd','8724656paBKXj','52870TyIipQ','stderr','11153989rnWFOs','3512230wVcxmz','8294412jIIwlw'];a277_0x51be=function(){return _0x2a0b7c;};return a277_0x51be();}function a277_0x49ae(_0x5e62a1,_0x501417){_0x5e62a1=_0x5e62a1-0xfa;var _0x51be52=a277_0x51be();var _0x49ae7c=_0x51be52[_0x5e62a1];return _0x49ae7c;}export function writeCliSideChannelLine(_0x261bb7){var _0x2ab7f3=a277_0x49ae;process[_0x2ab7f3(0xfd)][_0x2ab7f3(0x105)](_0x261bb7+'\x0a');}
1
+ function a275_0x2453(_0x314f4b,_0x4ed3e1){_0x314f4b=_0x314f4b-0xfe;var _0x404a4c=a275_0x404a();var _0x245360=_0x404a4c[_0x314f4b];return _0x245360;}(function(_0x3edaff,_0x52a831){var _0x52f64c=a275_0x2453,_0x1ccbf6=_0x3edaff();while(!![]){try{var _0xb878e9=parseInt(_0x52f64c(0x100))/0x1*(-parseInt(_0x52f64c(0x101))/0x2)+parseInt(_0x52f64c(0x108))/0x3*(parseInt(_0x52f64c(0x103))/0x4)+-parseInt(_0x52f64c(0x104))/0x5*(-parseInt(_0x52f64c(0x105))/0x6)+-parseInt(_0x52f64c(0xfe))/0x7*(parseInt(_0x52f64c(0x109))/0x8)+parseInt(_0x52f64c(0xff))/0x9+-parseInt(_0x52f64c(0x102))/0xa*(-parseInt(_0x52f64c(0x107))/0xb)+parseInt(_0x52f64c(0x10a))/0xc*(parseInt(_0x52f64c(0x106))/0xd);if(_0xb878e9===_0x52a831)break;else _0x1ccbf6['push'](_0x1ccbf6['shift']());}catch(_0x5b898a){_0x1ccbf6['push'](_0x1ccbf6['shift']());}}}(a275_0x404a,0xd5543));function a275_0x404a(){var _0x1814aa=['556uVergb','4494040USfzmP','6aBwwRO','416VRoUtX','2167PRNiKR','21030htmUid','8hYJFLm','43800QiSBtD','8449658rNcDsY','4221936jytvQB','5AucMmC','483112Laqhjb','42110RFUnOZ'];a275_0x404a=function(){return _0x1814aa;};return a275_0x404a();}export function writeCliSideChannelLine(_0x24aab1){process['stderr']['write'](_0x24aab1+'\x0a');}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lovrabet/rabetbase-cli",
3
- "version": "2.3.16-beta.2",
3
+ "version": "2.3.16-beta.4",
4
4
  "description": "Developer CLI for Lovrabet apps, datasets, pages, SQL, BFF, database connections, skills, and AI agent workflows.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "keywords": [
@@ -10,7 +10,7 @@
10
10
 
11
11
  - 移除旧 `/hello-world`、`/chart-fetch`、`/intro` 实操路径,改为当前 `src/pages` 自动路由页面。
12
12
  - 统一本地启动、构建、预览命令为 `rabetbase run start/build/preview`。
13
- - 补充 `rabetbase project create`、`rabetbase config set appcode`、`rabetbase project init`、`rabetbase api pull` 的使用时机。
13
+ - 补充 `rabetbase project create`、`rabetbase config set appcode`、`rabetbase workspace init`、`rabetbase api pull` 的使用时机。
14
14
  - 补充 SDK 配置、微前端接入、CDN 产物和 Lovrabet 主应用页面配置说明。
15
15
  - 重做首页为 Prompt 开发入口,展示 AppCode 状态、Agent 场景示例、飞书文库导航、内置页面入口和主应用接入检查清单。
16
16
 
@@ -126,7 +126,7 @@ rabetbase api pull
126
126
  如果你是直接克隆模板源码,且当前目录还没有 `.rabetbase.json`,先执行:
127
127
 
128
128
  ```bash
129
- rabetbase project init --appcode YOUR_APP_CODE
129
+ rabetbase workspace init --appcode YOUR_APP_CODE
130
130
  rabetbase api pull
131
131
  ```
132
132
 
@@ -103,7 +103,7 @@ rabetbase api pull
103
103
  如果你是直接克隆模板源码,且当前目录还没有 `.rabetbase.json`,执行:
104
104
 
105
105
  ```bash
106
- rabetbase project init --appcode app-xxxx
106
+ rabetbase workspace init --appcode app-xxxx
107
107
  rabetbase api pull
108
108
  ```
109
109
 
@@ -205,7 +205,7 @@ function HomePage() {
205
205
  tags: ["项目配置", "模型同步"],
206
206
  prompt: setupPrompt,
207
207
  commands: [
208
- "rabetbase project init",
208
+ "rabetbase workspace init --appcode <code>",
209
209
  "rabetbase config get",
210
210
  "rabetbase api pull",
211
211
  ],
@@ -1 +0,0 @@
1
- (function(_0x30aea1,_0x5c7f9c){const _0x46b991=a161_0x4846,_0x5687cc=_0x30aea1();while(!![]){try{const _0x26c001=-parseInt(_0x46b991(0x123))/0x1+-parseInt(_0x46b991(0x106))/0x2+parseInt(_0x46b991(0x10c))/0x3*(-parseInt(_0x46b991(0x110))/0x4)+parseInt(_0x46b991(0xff))/0x5*(-parseInt(_0x46b991(0x128))/0x6)+parseInt(_0x46b991(0x125))/0x7*(-parseInt(_0x46b991(0xf9))/0x8)+-parseInt(_0x46b991(0x111))/0x9+parseInt(_0x46b991(0x100))/0xa;if(_0x26c001===_0x5c7f9c)break;else _0x5687cc['push'](_0x5687cc['shift']());}catch(_0x1f240c){_0x5687cc['push'](_0x5687cc['shift']());}}}(a161_0x477e,0x465d9));import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,dirname,basename}from'node:path';import{fileURLToPath}from'node:url';function a161_0x4846(_0x15db03,_0x3344b0){_0x15db03=_0x15db03-0xf7;const _0x477e63=a161_0x477e();let _0x4846b7=_0x477e63[_0x15db03];return _0x4846b7;}import a161_0x5db4fa from'chalk';import{input,confirm}from'@inquirer/prompts';import{CLI_BIN_NAME}from'../../constant/cli.js';import{logger}from'../../utils/logger.js';import{readRawConfig,getProjectConfigPath,writeConfigFile,NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES}from'../../context.js';import{validateAppcode}from'../../commands/common/validate.js';function a161_0x477e(){const _0x420d86=['169187pdKSwG','Upgrade\x20it\x20to\x20','374283YcvVZZ','init','⚠\x20Found\x20legacy\x20configuration\x20file:\x20','146868QgWmFj','\x20\x20Apps:\x20','.rabetbase.json','?\x20(Old\x20file\x20→\x20*.bak)','72ppvYPm','✓\x20Upgraded\x20','log','bold','appcode','\x20\x20Default:\x20','10oWhseR','18692530cEQsNu','defaultApp','parse','App\x20Code\x20cannot\x20be\x20empty','cwd','gray','987466vJwuex','package.json','trim','\x20api\x20pull\x27','join','\x20workspace\x20init`\x20to\x20start\x20fresh.','3ymomib','\x20→\x20.rabetbase.json','Please\x20enter\x20App\x20Code:','Invalid\x20App\x20Code','1536048rLlcsN','35343YDNZZH','apps','string','1.0.0','\x20api\x20generate\x27\x20and\x20\x27','toLocaleString','utf8','\x20\x20Old\x20file\x20backed\x20up\x20as\x20','green','app','✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory','setLogPath','env','.bak','初始化项目配置文件成功','cyan','version','info'];a161_0x477e=function(){return _0x420d86;};return a161_0x477e();}import{buildCanonicalProjectConfig}from'../../config/schema.js';export async function initConfig(_0x389c36){const _0x7ed70d=a161_0x4846,{appcode:_0x428224,env:_0x4c355b,autoYes:_0x3490d6}=_0x389c36,_0x3453e9=process[_0x7ed70d(0x104)]();if(getProjectConfigPath())throw new Error('.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.');let _0x2aac2c;for(const _0x31ba6b of LEGACY_CONFIG_NAMES){const _0x2efa18=resolve(_0x3453e9,_0x31ba6b);if(existsSync(_0x2efa18)){_0x2aac2c=_0x2efa18;break;}}if(_0x2aac2c){let _0x2a141c={};try{_0x2a141c=JSON[_0x7ed70d(0x102)](readFileSync(_0x2aac2c,'utf8'));}catch{}const _0xbec3ab=basename(_0x2aac2c),_0x1ef899=_0x2a141c?.[_0x7ed70d(0xfd)]||_0x2a141c?.[_0x7ed70d(0x11a)];let _0x4c1844=_0x3490d6;!_0x3490d6&&(console[_0x7ed70d(0xfb)](a161_0x5db4fa['yellow'](_0x7ed70d(0x127)+a161_0x5db4fa[_0x7ed70d(0xfc)](_0xbec3ab))),_0x1ef899&&console[_0x7ed70d(0xfb)](a161_0x5db4fa['cyan']('\x20\x20appcode:\x20'+_0x1ef899)),_0x4c1844=await confirm({'message':_0x7ed70d(0x124)+a161_0x5db4fa[_0x7ed70d(0xfc)](_0x7ed70d(0xf7))+_0x7ed70d(0xf8),'default':!![]}));if(!_0x4c1844){console[_0x7ed70d(0xfb)]('Migration\x20cancelled.\x20Run\x20`'+CLI_BIN_NAME+_0x7ed70d(0x10b));return;}const _0x4a19d3=resolve(_0x3453e9,NEW_CONFIG_NAME),_0x3875c9=getCliVersionFromPkg(),_0x5c9406=readRawConfig(),_0x2eeed1=_0x428224||(typeof _0x2a141c?.['appcode']===_0x7ed70d(0x113)?_0x2a141c[_0x7ed70d(0xfd)]:undefined)||(typeof _0x2a141c?.[_0x7ed70d(0x11a)]===_0x7ed70d(0x113)?_0x2a141c['app']:undefined)||await askAppcode(),_0x36d592=typeof _0x2a141c?.[_0x7ed70d(0x11d)]==='string'?_0x2a141c['env']:typeof _0x5c9406[_0x7ed70d(0x11d)]===_0x7ed70d(0x113)?_0x5c9406[_0x7ed70d(0x11d)]:'production',_0x21051f=buildCanonicalProjectConfig({..._0x5c9406,..._0x2a141c},{'appCodes':[_0x2eeed1],'env':_0x36d592,'metadata':{'version':_0x3875c9,'migratedAt':new Date()[_0x7ed70d(0x116)](),'migratedFrom':_0x2aac2c}});writeConfigFile(_0x4a19d3,_0x21051f);const _0x4e6026=_0x2aac2c+'.bak';renameSync(_0x2aac2c,_0x4e6026),logger[_0x7ed70d(0x11c)](_0x3453e9),logger[_0x7ed70d(0x122)](_0x7ed70d(0x126),'从旧配置文件升级成功',{'from':_0x2aac2c,'to':_0x4a19d3,'appcode':_0x2eeed1,'env':_0x21051f[_0x7ed70d(0x11d)]}),console['log'](a161_0x5db4fa['green'](_0x7ed70d(0xfa)+_0xbec3ab+_0x7ed70d(0x10d))),console[_0x7ed70d(0xfb)](a161_0x5db4fa[_0x7ed70d(0x120)](_0x7ed70d(0x129)+Object['keys'](_0x21051f[_0x7ed70d(0x112)]||{})[_0x7ed70d(0x10a)](',\x20'))),console[_0x7ed70d(0xfb)](a161_0x5db4fa[_0x7ed70d(0x120)]('\x20\x20Default:\x20'+_0x21051f[_0x7ed70d(0x101)])),console[_0x7ed70d(0xfb)](a161_0x5db4fa[_0x7ed70d(0x105)](_0x7ed70d(0x118)+_0xbec3ab+_0x7ed70d(0x11e)));return;}const _0x107ac6=_0x428224||await askAppcode(),_0xafb9b8=resolve(_0x3453e9,NEW_CONFIG_NAME),_0x477345=getCliVersionFromPkg(),_0x5a9458=readRawConfig(),_0x2357df=typeof _0x5a9458[_0x7ed70d(0x11d)]===_0x7ed70d(0x113)?_0x5a9458['env']:undefined,_0x146677=buildCanonicalProjectConfig({},{'appCodes':[_0x107ac6],'env':_0x4c355b||_0x2357df||'production','metadata':{'version':_0x477345,'createdAt':new Date()[_0x7ed70d(0x116)]()}});writeConfigFile(_0xafb9b8,_0x146677),logger[_0x7ed70d(0x11c)](_0x3453e9),logger['info'](_0x7ed70d(0x126),_0x7ed70d(0x11f),{'appcode':_0x107ac6,'env':_0x146677[_0x7ed70d(0x11d)],'version':_0x146677[_0x7ed70d(0x121)],'configPath':_0xafb9b8}),console['log'](a161_0x5db4fa[_0x7ed70d(0x119)](_0x7ed70d(0x11b))),console['log'](a161_0x5db4fa[_0x7ed70d(0x120)](_0x7ed70d(0x129)+Object['keys'](_0x146677['apps']||{})[_0x7ed70d(0x10a)](',\x20'))),console[_0x7ed70d(0xfb)](a161_0x5db4fa['cyan'](_0x7ed70d(0xfe)+_0x146677[_0x7ed70d(0x101)])),console['log']('\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27'+CLI_BIN_NAME+_0x7ed70d(0x115)+CLI_BIN_NAME+_0x7ed70d(0x109));}function askAppcode(){const _0x520c9e=a161_0x4846;return input({'message':_0x520c9e(0x10e),'validate':_0x4db694=>{const _0x56b35d=_0x520c9e;if(!_0x4db694[_0x56b35d(0x108)]())return _0x56b35d(0x103);const {valid:_0x349da2,message:_0x1da23b}=validateAppcode(_0x4db694[_0x56b35d(0x108)]());return _0x349da2||_0x1da23b||_0x56b35d(0x10f);}});}function getCliVersionFromPkg(){const _0x379a28=a161_0x4846;try{const _0x157b95=fileURLToPath(import.meta.url),_0x18b2f6=resolve(dirname(_0x157b95),'../..'),_0x3a7317=JSON['parse'](readFileSync(resolve(_0x18b2f6,_0x379a28(0x107)),_0x379a28(0x117)));return _0x3a7317[_0x379a28(0x121)]||_0x379a28(0x114);}catch{return'1.0.0';}}
@@ -1 +0,0 @@
1
- const a184_0x92c3a8=a184_0x1016;(function(_0x1165ee,_0x3e8c6f){const _0xa26156=a184_0x1016,_0x3461e1=_0x1165ee();while(!![]){try{const _0x55d123=parseInt(_0xa26156(0x80))/0x1+parseInt(_0xa26156(0x72))/0x2+-parseInt(_0xa26156(0x83))/0x3+-parseInt(_0xa26156(0x76))/0x4+-parseInt(_0xa26156(0x85))/0x5*(-parseInt(_0xa26156(0x74))/0x6)+-parseInt(_0xa26156(0x7d))/0x7+parseInt(_0xa26156(0x73))/0x8;if(_0x55d123===_0x3e8c6f)break;else _0x3461e1['push'](_0x3461e1['shift']());}catch(_0x368d6d){_0x3461e1['push'](_0x3461e1['shift']());}}}(a184_0x13a6,0xd026f));import{CliErrors}from'../../errors.js';function a184_0x13a6(){const _0x323f3a=['Target\x20database\x20—\x20accepts\x20a\x20numeric\x20ID\x20or\x20database\x20name\x20(e.g.\x20ecommerce_db)','1541064ADZIMc','10052128SnANOI','6qmQfPo','SQL\x20query\x20display\x20name','1568464LFbVNW','`rabetbase\x20sql\x20save`\x20has\x20been\x20deprecated.','sqlname','string','validation','Deprecated:\x20use\x20sql\x20create\x20to\x20create\x20and\x20sql\x20push\x20to\x20update','Update\x20existing\x20SQL\x20by\x20editing\x20the\x20synced\x20file\x20under\x20`.rabetbase/sql/<appCode>/<dbName|db-<id>>/`\x20and\x20then\x20running\x20`rabetbase\x20sql\x20push\x20--sqlcode\x20<code>\x20--yes`.','7426832BeMNtk','Create\x20new\x20SQL\x20with\x20`rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml`.','sql','1274396Xqzzrh','join','description','2987997EhRcow','write','1190lzbdBQ','Path\x20to\x20the\x20SQL\x20file','file'];a184_0x13a6=function(){return _0x323f3a;};return a184_0x13a6();}import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const SQL_SAVE_DEPRECATED_HINT=[a184_0x92c3a8(0x77),a184_0x92c3a8(0x7e),a184_0x92c3a8(0x7c)][a184_0x92c3a8(0x81)]('\x0a');function a184_0x1016(_0xe8bf5b,_0x2f92b8){_0xe8bf5b=_0xe8bf5b-0x70;const _0x13a6cf=a184_0x13a6();let _0x1016db=_0x13a6cf[_0xe8bf5b];return _0x1016db;}export const sqlSave={'service':a184_0x92c3a8(0x7f),'command':'save','description':a184_0x92c3a8(0x7b),'risk':a184_0x92c3a8(0x84),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a184_0x92c3a8(0x70),'type':'string','required':!![],'description':a184_0x92c3a8(0x86)},SQLCODE_FLAG_OPTIONAL,{'name':a184_0x92c3a8(0x78),'type':a184_0x92c3a8(0x79),'description':a184_0x92c3a8(0x75)},{'name':'db','type':a184_0x92c3a8(0x79),'description':a184_0x92c3a8(0x71)},{'name':a184_0x92c3a8(0x82),'type':'string','description':'Query\x20description'}],async 'validate'(){const _0x4c6d1d=a184_0x92c3a8;throw CliErrors[_0x4c6d1d(0x7a)](SQL_SAVE_DEPRECATED_HINT);},async 'execute'(){const _0x38058c=a184_0x92c3a8;throw CliErrors[_0x38058c(0x7a)](SQL_SAVE_DEPRECATED_HINT);}};