@lovrabet/rabetbase-cli 2.4.3-beta.1 → 2.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (294) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/index.js +1 -1
  20. package/lib/commands/app/list.js +1 -1
  21. package/lib/commands/app/members-list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/shared.js +1 -1
  24. package/lib/commands/app-config/delete.js +1 -1
  25. package/lib/commands/app-config/get.js +1 -1
  26. package/lib/commands/app-config/index.js +1 -1
  27. package/lib/commands/app-config/list.js +1 -1
  28. package/lib/commands/app-config/set.js +1 -1
  29. package/lib/commands/app-config/shared.js +1 -1
  30. package/lib/commands/auth/index.js +1 -1
  31. package/lib/commands/bff/create.js +1 -1
  32. package/lib/commands/bff/delete.js +1 -1
  33. package/lib/commands/bff/detail.js +1 -1
  34. package/lib/commands/bff/index.js +1 -1
  35. package/lib/commands/bff/list.js +1 -1
  36. package/lib/commands/bff/pull.js +1 -1
  37. package/lib/commands/bff/push.js +1 -1
  38. package/lib/commands/bff/status.js +1 -1
  39. package/lib/commands/cli-skill/index.js +1 -1
  40. package/lib/commands/cli-update.js +1 -1
  41. package/lib/commands/codegen/index.js +1 -1
  42. package/lib/commands/codegen/sdk.js +1 -1
  43. package/lib/commands/codegen/sql.js +1 -1
  44. package/lib/commands/common/app-registry.js +1 -1
  45. package/lib/commands/common/app-selector.js +1 -1
  46. package/lib/commands/common/async-task.js +1 -1
  47. package/lib/commands/common/dry-run.js +1 -1
  48. package/lib/commands/common/flags.js +1 -1
  49. package/lib/commands/common/local-file.js +1 -1
  50. package/lib/commands/common/validate.js +1 -1
  51. package/lib/commands/config/get.js +1 -1
  52. package/lib/commands/config/index.js +1 -1
  53. package/lib/commands/config/list.js +1 -1
  54. package/lib/commands/config/set.js +1 -1
  55. package/lib/commands/config/shared.js +1 -1
  56. package/lib/commands/data/filter.js +1 -1
  57. package/lib/commands/data/getOne.js +1 -1
  58. package/lib/commands/data/index.js +1 -1
  59. package/lib/commands/data/shared.js +1 -1
  60. package/lib/commands/dataset/business-group-update.js +1 -1
  61. package/lib/commands/dataset/capability.js +1 -1
  62. package/lib/commands/dataset/delete.js +1 -1
  63. package/lib/commands/dataset/detail.js +1 -1
  64. package/lib/commands/dataset/extend-update.js +1 -1
  65. package/lib/commands/dataset/field-update.js +1 -1
  66. package/lib/commands/dataset/generate.js +1 -1
  67. package/lib/commands/dataset/index.js +1 -1
  68. package/lib/commands/dataset/list.js +1 -1
  69. package/lib/commands/dataset/operations.js +1 -1
  70. package/lib/commands/dataset/relation-audit.js +1 -1
  71. package/lib/commands/dataset/relation-create.js +1 -1
  72. package/lib/commands/dataset/relation-delete.js +1 -1
  73. package/lib/commands/dataset/relation-shared.js +1 -1
  74. package/lib/commands/dataset/relation-update.js +1 -1
  75. package/lib/commands/dataset/relations.js +1 -1
  76. package/lib/commands/dataset/rename.js +1 -1
  77. package/lib/commands/dataset/restore.js +1 -1
  78. package/lib/commands/db/analysis-batching.js +1 -1
  79. package/lib/commands/db/analyze-batch-plan.js +1 -1
  80. package/lib/commands/db/analyze-cancel.js +1 -1
  81. package/lib/commands/db/analyze-start.js +1 -1
  82. package/lib/commands/db/analyze-status.js +1 -1
  83. package/lib/commands/db/create.js +1 -1
  84. package/lib/commands/db/delete.js +1 -1
  85. package/lib/commands/db/detail.js +1 -1
  86. package/lib/commands/db/diff.js +1 -1
  87. package/lib/commands/db/index.js +1 -1
  88. package/lib/commands/db/list.js +1 -1
  89. package/lib/commands/db/shared.js +1 -1
  90. package/lib/commands/db/tables.js +1 -1
  91. package/lib/commands/db/test.js +1 -1
  92. package/lib/commands/db/update.js +1 -1
  93. package/lib/commands/doctor.js +1 -1
  94. package/lib/commands/file/index.js +1 -1
  95. package/lib/commands/init/index.js +1 -1
  96. package/lib/commands/issue/index.js +1 -1
  97. package/lib/commands/issue/nudge.js +1 -1
  98. package/lib/commands/issue/report.js +1 -1
  99. package/lib/commands/issue/shared.js +1 -1
  100. package/lib/commands/kb/create.js +1 -1
  101. package/lib/commands/kb/delete.js +1 -1
  102. package/lib/commands/kb/detail.js +1 -1
  103. package/lib/commands/kb/index.js +1 -1
  104. package/lib/commands/kb/list.js +1 -1
  105. package/lib/commands/kb/shared.js +1 -1
  106. package/lib/commands/kb/update.js +1 -1
  107. package/lib/commands/logs/index.js +1 -1
  108. package/lib/commands/menu/asset-update.js +1 -1
  109. package/lib/commands/menu/delete.js +1 -1
  110. package/lib/commands/menu/external-link-create.js +1 -1
  111. package/lib/commands/menu/external-link-update.js +1 -1
  112. package/lib/commands/menu/group-create.js +1 -1
  113. package/lib/commands/menu/group-update.js +1 -1
  114. package/lib/commands/menu/index.js +1 -1
  115. package/lib/commands/menu/list.js +1 -1
  116. package/lib/commands/menu/move.js +1 -1
  117. package/lib/commands/menu/regroup-start.js +1 -1
  118. package/lib/commands/menu/rename.js +1 -1
  119. package/lib/commands/menu/shared/compare-table.js +1 -1
  120. package/lib/commands/menu/shared/delete-plan.js +1 -1
  121. package/lib/commands/menu/shared/facts.js +1 -1
  122. package/lib/commands/menu/shared/index.js +1 -1
  123. package/lib/commands/menu/shared/inquirer.js +1 -1
  124. package/lib/commands/menu/shared/local-pages.js +1 -1
  125. package/lib/commands/menu/shared/logic.js +1 -1
  126. package/lib/commands/menu/shared/mutations.js +1 -1
  127. package/lib/commands/menu/shared/service.js +1 -1
  128. package/lib/commands/menu/shared/sync-core.js +1 -1
  129. package/lib/commands/menu/shared/update-core.js +1 -1
  130. package/lib/commands/menu/shared/valid-url.js +1 -1
  131. package/lib/commands/menu/sync.js +1 -1
  132. package/lib/commands/notification/config-list.js +1 -1
  133. package/lib/commands/notification/index.js +1 -1
  134. package/lib/commands/ocr/index.js +1 -1
  135. package/lib/commands/page/generate-start.js +1 -1
  136. package/lib/commands/page/generate-status.js +1 -1
  137. package/lib/commands/page/index.js +1 -1
  138. package/lib/commands/page/pull.js +1 -1
  139. package/lib/commands/page/push.js +1 -1
  140. package/lib/commands/page/react/create.js +1 -1
  141. package/lib/commands/page/react/detail.js +1 -1
  142. package/lib/commands/page/react/list.js +1 -1
  143. package/lib/commands/page/react/publish.js +1 -1
  144. package/lib/commands/page/react/shared.js +1 -1
  145. package/lib/commands/page/react/syntax.js +1 -1
  146. package/lib/commands/page/react/template.js +1 -1
  147. package/lib/commands/page/react/update.js +1 -1
  148. package/lib/commands/page/relation-audit.js +1 -1
  149. package/lib/commands/page/restore.js +1 -1
  150. package/lib/commands/page/shared.js +1 -1
  151. package/lib/commands/page/standard-page-status.js +1 -1
  152. package/lib/commands/page/sync.js +1 -1
  153. package/lib/commands/permit/index.js +1 -1
  154. package/lib/commands/permit/page-get.js +1 -1
  155. package/lib/commands/permit/page-set.js +1 -1
  156. package/lib/commands/permit/role-apis-set.js +1 -1
  157. package/lib/commands/permit/role-menus-set.js +1 -1
  158. package/lib/commands/permit/role-menus.js +1 -1
  159. package/lib/commands/permit/shared.js +1 -1
  160. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  161. package/lib/commands/project/create/format-elapsed.js +1 -1
  162. package/lib/commands/project/create/main.js +1 -1
  163. package/lib/commands/project/create/non-interactive.js +1 -1
  164. package/lib/commands/project/create/project-template-path.js +1 -1
  165. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  166. package/lib/commands/project/create/use-format-code.js +1 -1
  167. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  168. package/lib/commands/project/index.js +1 -1
  169. package/lib/commands/project/upgrade.js +1 -1
  170. package/lib/commands/registry.js +1 -1
  171. package/lib/commands/role/create.js +1 -1
  172. package/lib/commands/role/delete.js +1 -1
  173. package/lib/commands/role/detail.js +1 -1
  174. package/lib/commands/role/index.js +1 -1
  175. package/lib/commands/role/list.js +1 -1
  176. package/lib/commands/role/shared.js +1 -1
  177. package/lib/commands/role/update.js +1 -1
  178. package/lib/commands/role/user-add.js +1 -1
  179. package/lib/commands/role/user-remove.js +1 -1
  180. package/lib/commands/role/user-resolve.js +1 -1
  181. package/lib/commands/run/index.js +1 -1
  182. package/lib/commands/schema.js +1 -1
  183. package/lib/commands/sql/create.js +1 -1
  184. package/lib/commands/sql/delete.js +1 -1
  185. package/lib/commands/sql/detail.js +1 -1
  186. package/lib/commands/sql/exec.js +1 -1
  187. package/lib/commands/sql/index.js +1 -1
  188. package/lib/commands/sql/list.js +1 -1
  189. package/lib/commands/sql/pull.js +1 -1
  190. package/lib/commands/sql/push.js +1 -1
  191. package/lib/commands/sql/shared.js +1 -1
  192. package/lib/commands/sql/status.js +1 -1
  193. package/lib/commands/sql/validate.js +1 -1
  194. package/lib/commands/task/index.js +1 -1
  195. package/lib/commands/task/status.js +1 -1
  196. package/lib/commands/tenant/index.js +1 -1
  197. package/lib/commands/tenant/members-list.js +1 -1
  198. package/lib/commands/tenant/shared.js +1 -1
  199. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  200. package/lib/commands/user-account/index.js +1 -1
  201. package/lib/commands/workspace/add.js +1 -1
  202. package/lib/commands/workspace/index.js +1 -1
  203. package/lib/commands/workspace/remove.js +1 -1
  204. package/lib/config/schema.js +1 -1
  205. package/lib/constant/cdn.js +1 -1
  206. package/lib/constant/cli.js +1 -1
  207. package/lib/constant/defaults.js +1 -1
  208. package/lib/constant/domain.js +1 -1
  209. package/lib/constant/env.js +1 -1
  210. package/lib/constant/output.js +1 -1
  211. package/lib/constant/paths.js +1 -1
  212. package/lib/constant/risk.js +1 -1
  213. package/lib/context/app-resolver.js +1 -1
  214. package/lib/context/auth-resolver.js +1 -1
  215. package/lib/context/config-loader.js +1 -1
  216. package/lib/context.js +1 -1
  217. package/lib/core/alias-resolver.js +1 -1
  218. package/lib/core/api-client.js +1 -1
  219. package/lib/core/bff/config.js +1 -1
  220. package/lib/core/bff/file-system.js +1 -1
  221. package/lib/core/bff/hash.js +1 -1
  222. package/lib/core/bff/lock.js +1 -1
  223. package/lib/core/bff/utils.js +1 -1
  224. package/lib/core/db-resolver.js +1 -1
  225. package/lib/core/page/file-system.js +1 -1
  226. package/lib/core/page/hash.js +1 -1
  227. package/lib/core/page/lock.js +1 -1
  228. package/lib/core/sql-index-auditor.js +1 -1
  229. package/lib/core/sql-sync/config.js +1 -1
  230. package/lib/core/sql-sync/file-system.js +1 -1
  231. package/lib/core/sql-sync/hash.js +1 -1
  232. package/lib/core/sql-sync/lock.js +1 -1
  233. package/lib/core/sql-sync/utils.js +1 -1
  234. package/lib/core/sql-validator.js +1 -1
  235. package/lib/errors.js +1 -1
  236. package/lib/framework/build-all-flags.js +1 -1
  237. package/lib/framework/error-output.js +1 -1
  238. package/lib/framework/explicit-yes.js +1 -1
  239. package/lib/framework/flags.js +1 -1
  240. package/lib/framework/help.js +1 -1
  241. package/lib/framework/index.js +1 -1
  242. package/lib/framework/output.js +1 -1
  243. package/lib/framework/response.js +1 -1
  244. package/lib/framework/runner-alias.js +1 -1
  245. package/lib/framework/runner.js +1 -1
  246. package/lib/framework/schema-export.js +1 -1
  247. package/lib/framework/types.js +1 -1
  248. package/lib/generated/build-info.d.ts +4 -4
  249. package/lib/generated/build-info.js +1 -1
  250. package/lib/help.js +1 -1
  251. package/lib/postinstall.js +1 -1
  252. package/lib/runtime/confirmation.js +1 -1
  253. package/lib/runtime/event.js +1 -1
  254. package/lib/runtime/index.js +1 -1
  255. package/lib/runtime/queue.js +1 -1
  256. package/lib/runtime/resolve.js +1 -1
  257. package/lib/skills/builtin-skill.js +1 -1
  258. package/lib/skills/main.js +1 -1
  259. package/lib/skills/npx-skills-add.js +1 -1
  260. package/lib/skills/skill-presence.js +1 -1
  261. package/lib/telemetry/cli-command-trace.js +1 -1
  262. package/lib/telemetry/cli-help-trace.js +1 -1
  263. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  264. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  265. package/lib/telemetry/send-cli-trace-log.js +1 -1
  266. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  267. package/lib/utils/ai_config.js +1 -1
  268. package/lib/utils/apply-jq-filter.js +1 -1
  269. package/lib/utils/cdn-config.js +1 -1
  270. package/lib/utils/check-sdk-version.js +1 -1
  271. package/lib/utils/cli-version-check.js +1 -1
  272. package/lib/utils/cli-version-policy.js +1 -1
  273. package/lib/utils/config.js +1 -1
  274. package/lib/utils/copy-directory.js +1 -1
  275. package/lib/utils/entity-with-id.js +1 -1
  276. package/lib/utils/file-utils.js +1 -1
  277. package/lib/utils/guides-cdn.js +1 -1
  278. package/lib/utils/http-client.js +1 -1
  279. package/lib/utils/is-non-interactive.js +1 -1
  280. package/lib/utils/logger.js +1 -1
  281. package/lib/utils/params.js +1 -1
  282. package/lib/utils/platform.js +1 -1
  283. package/lib/utils/rules-cdn.js +1 -1
  284. package/lib/utils/sleep.js +1 -1
  285. package/lib/utils/template-replacer.js +1 -1
  286. package/lib/utils/update-notice.js +1 -1
  287. package/lib/utils/version.js +1 -1
  288. package/lib/utils/with-active-cookie.js +1 -1
  289. package/lib/utils/write-cli-side-channel.js +1 -1
  290. package/package.json +1 -1
  291. package/skills/rabetbase/SKILL.md +1 -1
  292. package/skills/rabetbase/guides/react-custom-page-workflow.md +9 -3
  293. package/skills/rabetbase/knowledge/react-page/generation-standards.md +13 -2
  294. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- const a289_0x50b144=a289_0x49c6;(function(_0x35f82b,_0x5c466f){const _0x584d26=a289_0x49c6,_0x1c3e66=_0x35f82b();while(!![]){try{const _0x2446e6=-parseInt(_0x584d26(0x14e))/0x1+parseInt(_0x584d26(0x157))/0x2+-parseInt(_0x584d26(0x155))/0x3*(parseInt(_0x584d26(0x14f))/0x4)+parseInt(_0x584d26(0x14a))/0x5+parseInt(_0x584d26(0x178))/0x6*(-parseInt(_0x584d26(0x145))/0x7)+parseInt(_0x584d26(0x144))/0x8+-parseInt(_0x584d26(0x171))/0x9*(-parseInt(_0x584d26(0x16b))/0xa);if(_0x2446e6===_0x5c466f)break;else _0x1c3e66['push'](_0x1c3e66['shift']());}catch(_0x2ec370){_0x1c3e66['push'](_0x1c3e66['shift']());}}}(a289_0x4384,0x7074e));import a289_0x639c0b from'node:fs';import a289_0x268e29 from'node:path';function a289_0x49c6(_0x2a7add,_0x114c9a){_0x2a7add=_0x2a7add-0x13d;const _0x438401=a289_0x4384();let _0x49c636=_0x438401[_0x2a7add];return _0x49c636;}import{logger}from'../utils/logger.js';import{getCliVersion}from'../utils/version.js';const CLI_VERSION=getCliVersion();export class TemplateReplacer{static['pad'](_0x5d9142){const _0x2babcf=a289_0x49c6;return String(_0x5d9142)[_0x2babcf(0x174)](0x2,'0');}static[a289_0x50b144(0x172)](_0x6974b2){const _0x44f1c6=a289_0x50b144,_0x1c2197=_0x6974b2[_0x44f1c6(0x143)](),_0x436549=this[_0x44f1c6(0x17d)](_0x6974b2[_0x44f1c6(0x149)]()+0x1),_0x4a49d1=this[_0x44f1c6(0x17d)](_0x6974b2[_0x44f1c6(0x16d)]()),_0xbecdad=this[_0x44f1c6(0x17d)](_0x6974b2['getHours']()),_0x47de73=this['pad'](_0x6974b2[_0x44f1c6(0x151)]()),_0x4b81b0=this[_0x44f1c6(0x17d)](_0x6974b2['getSeconds']());return{'createdAt':_0x1c2197+'-'+_0x436549+'-'+_0x4a49d1+'\x20'+_0xbecdad+':'+_0x47de73+':'+_0x4b81b0,'createdDate':_0x1c2197+'-'+_0x436549+'-'+_0x4a49d1,'createdTime':_0xbecdad+':'+_0x47de73+':'+_0x4b81b0};}static[a289_0x50b144(0x160)](_0x523534){const _0xe45648=a289_0x50b144,_0x309d32=_0x523534['split']('/')[_0xe45648(0x159)]()||_0x523534;return _0x309d32[_0xe45648(0x165)]('-')[_0xe45648(0x141)](_0x45597e=>_0x45597e[_0xe45648(0x16a)](0x0)[_0xe45648(0x17b)]()+_0x45597e[_0xe45648(0x15b)](0x1)[_0xe45648(0x175)]())[_0xe45648(0x169)]('');}static[a289_0x50b144(0x176)](_0xa8035f){const _0x485e49=a289_0x50b144,_0x49f4ff=_0xa8035f[_0x485e49(0x165)]('/')[_0x485e49(0x159)]()||_0xa8035f;return _0x49f4ff[_0x485e49(0x165)]('-')['map'](_0x21cfb0=>_0x21cfb0[_0x485e49(0x16a)](0x0)[_0x485e49(0x17b)]()+_0x21cfb0[_0x485e49(0x15b)](0x1)['toLowerCase']())[_0x485e49(0x169)]('\x20');}static[a289_0x50b144(0x182)](_0xedaf81,_0x4cc150,_0x56115d){const _0x3a7673=a289_0x50b144,_0x379ecb=this[_0x3a7673(0x160)](_0x4cc150),_0x34a68e=this[_0x3a7673(0x176)](_0x4cc150),{createdAt:_0x49f719,createdDate:_0x210c2b,createdTime:_0x1789e1}=this[_0x3a7673(0x172)](new Date());let _0x1180f0=_0xedaf81[_0x3a7673(0x140)](/\{CliVersion\}/g,CLI_VERSION)[_0x3a7673(0x140)](/\{ComponentName\}/g,_0x379ecb)[_0x3a7673(0x140)](/\{DisplayTitle\}/g,_0x34a68e)[_0x3a7673(0x140)](/\{PageName\}/g,_0x4cc150)[_0x3a7673(0x140)](/\{TemplateName\}/g,_0x56115d)[_0x3a7673(0x140)](/\{CreatedAt\}/g,_0x49f719)[_0x3a7673(0x140)](/\{CreatedDate\}/g,_0x210c2b)[_0x3a7673(0x140)](/\{CreatedTime\}/g,_0x1789e1);return _0x1180f0;}static['replaceApiContent'](_0x23a784,_0x516ca6,_0x135944,_0xbdcf0a,_0x131ac9,_0x590434,_0x194656,_0x4db443){const _0x11a016=a289_0x50b144,_0x172910=new Date(),_0x4b938e=_0x172910[_0x11a016(0x154)](),_0x33c558=_0x135944['map'](_0x129d85=>{const _0x4e8e2e=_0x11a016,_0x3232cc=[_0x4e8e2e(0x173)+_0x129d85[_0x4e8e2e(0x147)]+'\x22',_0x4e8e2e(0x15f)+_0x129d85[_0x4e8e2e(0x16e)]+'\x22',_0x4e8e2e(0x187)+_0x129d85[_0x4e8e2e(0x142)]+'\x22'];return _0x129d85[_0x4e8e2e(0x150)]&&_0x3232cc[_0x4e8e2e(0x153)](_0x4e8e2e(0x13e)+_0x129d85[_0x4e8e2e(0x150)]+'\x22'),'\x0a\x20\x20\x20\x20{\x20'+_0x3232cc[_0x4e8e2e(0x169)](',\x20')+_0x4e8e2e(0x180);})[_0x11a016(0x169)](''),_0x23590b=_0xbdcf0a||_0x135944[0x0]?.[_0x11a016(0x150)]||_0x11a016(0x148);let _0x5f2d94=_0x23a784[_0x11a016(0x140)](/\{AppCode\}/g,_0x516ca6)['replace'](/\{ModelConfigs\}/g,_0x33c558)[_0x11a016(0x140)](/\{ExampleModelName\}/g,_0x23590b)[_0x11a016(0x140)](/\{ApiFileName\}/g,_0x131ac9||_0x11a016(0x168))[_0x11a016(0x140)](/\{ConfigName\}/g,_0x590434||_0x11a016(0x184))[_0x11a016(0x140)](/\{ClientConfigParam\}/g,_0x194656||'')['replace'](/\{VarPrefix\}/g,_0x4db443||_0x11a016(0x15d))[_0x11a016(0x140)](/\{CreatedAt\}/g,_0x4b938e);return _0x5f2d94;}static async[a289_0x50b144(0x163)](_0x2c9b0b,_0x400ff9,_0x10184d,_0x318137,_0x25c2f1=!![]){const _0x5a07fc=a289_0x50b144,_0x29b52e=Date[_0x5a07fc(0x156)]();try{_0x25c2f1&&logger['info']('template',_0x5a07fc(0x162),{'templatePath':_0x2c9b0b,'targetPath':_0x400ff9,'pageName':_0x10184d,'templateName':_0x318137});await a289_0x639c0b[_0x5a07fc(0x17a)][_0x5a07fc(0x15c)](_0x400ff9,{'recursive':!![]}),await this[_0x5a07fc(0x14d)](_0x2c9b0b,_0x400ff9,_0x10184d,_0x318137);if(_0x25c2f1){const _0x241011=Date[_0x5a07fc(0x156)]()-_0x29b52e;logger[_0x5a07fc(0x152)]('template',_0x5a07fc(0x16f),_0x241011,{'pageName':_0x10184d,'templateName':_0x318137});}}catch(_0x404e4d){if(_0x25c2f1){const _0x49c060=Date[_0x5a07fc(0x156)]()-_0x29b52e;logger[_0x5a07fc(0x17c)](_0x5a07fc(0x16c),_0x5a07fc(0x167),{'templatePath':_0x2c9b0b,'targetPath':_0x400ff9,'pageName':_0x10184d,'templateName':_0x318137,'error':_0x404e4d instanceof Error?_0x404e4d[_0x5a07fc(0x158)]:String(_0x404e4d),'duration':_0x49c060});}throw _0x404e4d;}}static async[a289_0x50b144(0x14d)](_0x54dd22,_0x5e6cbe,_0x27ecab,_0x5b54d5){const _0x1b6121=a289_0x50b144,_0x3aa847=await a289_0x639c0b[_0x1b6121(0x17a)][_0x1b6121(0x13d)](_0x54dd22,{'withFileTypes':!![]});for(const _0x305c1e of _0x3aa847){const _0x297ce6=a289_0x268e29[_0x1b6121(0x169)](_0x54dd22,_0x305c1e[_0x1b6121(0x142)]);let _0x31d4ce=a289_0x268e29[_0x1b6121(0x169)](_0x5e6cbe,_0x305c1e[_0x1b6121(0x142)]);_0x305c1e[_0x1b6121(0x142)][_0x1b6121(0x14b)](_0x1b6121(0x161))&&(_0x31d4ce=a289_0x268e29[_0x1b6121(0x169)](_0x5e6cbe,_0x305c1e['name']['replace'](/\.tpl$/,'')));if(_0x305c1e[_0x1b6121(0x164)]())await a289_0x639c0b[_0x1b6121(0x17a)][_0x1b6121(0x15c)](_0x31d4ce,{'recursive':!![]}),await this[_0x1b6121(0x14d)](_0x297ce6,_0x31d4ce,_0x27ecab,_0x5b54d5);else _0x305c1e[_0x1b6121(0x14c)]()&&await this[_0x1b6121(0x17f)](_0x297ce6,_0x31d4ce,_0x27ecab,_0x5b54d5);}}static async['processFile'](_0x3452d1,_0x520186,_0x540f88,_0xc64ac1){const _0x2a251e=a289_0x50b144,_0x5594e9=a289_0x268e29[_0x2a251e(0x166)](_0x3452d1)[_0x2a251e(0x175)]();_0x3452d1[_0x2a251e(0x14b)]('.tpl')&&(_0x520186=_0x520186[_0x2a251e(0x140)](/\.tpl$/,''));const _0x2dc889=[_0x2a251e(0x170),_0x2a251e(0x13f),_0x2a251e(0x181),_0x2a251e(0x186),_0x2a251e(0x17e),_0x2a251e(0x185),_0x2a251e(0x15a),'.scss','.tpl'];if(_0x2dc889[_0x2a251e(0x177)](_0x5594e9)||_0x3452d1['endsWith'](_0x2a251e(0x161))){const _0x440c16=await a289_0x639c0b[_0x2a251e(0x17a)][_0x2a251e(0x183)](_0x3452d1,_0x2a251e(0x179)),_0xb2519d=this[_0x2a251e(0x182)](_0x440c16,_0x540f88,_0xc64ac1);await a289_0x639c0b[_0x2a251e(0x17a)][_0x2a251e(0x146)](_0x520186,_0xb2519d,_0x2a251e(0x179));}else await a289_0x639c0b['promises'][_0x2a251e(0x15e)](_0x3452d1,_0x520186);}}function a289_0x4384(){const _0x104669=['slice','mkdir','LOVRABET','copyFile','tableName:\x20\x22','toComponentName','.tpl','开始处理模板内容替换','processTemplate','isDirectory','split','extname','模板内容替换失败','api','join','charAt','100EnSCUF','template','getDate','tableName','模板内容替换完成','.tsx','103347YDaTxD','formatLocalTimestamp','datasetCode:\x20\x22','padStart','toLowerCase','toDisplayTitle','includes','6CXHpav','utf8','promises','toUpperCase','error','pad','.json','processFile','\x20},','.jsx','replaceContent','readFile','default','.md','.js','name:\x20\x22','readdir','alias:\x20\x22','.ts','replace','map','name','getFullYear','7127688qrQPOQ','3775177PrfXqT','writeFile','datasetCode','YourModel','getMonth','4471025hbMQkr','endsWith','isFile','processDirectory','387952ZWDXfG','184zwAvAN','alias','getMinutes','success','push','toISOString','49206xebTZi','now','484762MtZSbY','message','pop','.css'];a289_0x4384=function(){return _0x104669;};return a289_0x4384();}
1
+ function a289_0x31e6(_0x1fa6d6,_0xd82114){_0x1fa6d6=_0x1fa6d6-0xca;const _0x3c5ee6=a289_0x3c5e();let _0x31e6e6=_0x3c5ee6[_0x1fa6d6];return _0x31e6e6;}const a289_0x7a7977=a289_0x31e6;(function(_0x133c64,_0x39a245){const _0x1e8e4f=a289_0x31e6,_0x3c2acc=_0x133c64();while(!![]){try{const _0x3c1ad0=parseInt(_0x1e8e4f(0xcc))/0x1+-parseInt(_0x1e8e4f(0xfa))/0x2*(parseInt(_0x1e8e4f(0xd4))/0x3)+parseInt(_0x1e8e4f(0xe2))/0x4*(parseInt(_0x1e8e4f(0xd3))/0x5)+parseInt(_0x1e8e4f(0xe3))/0x6*(parseInt(_0x1e8e4f(0xe4))/0x7)+-parseInt(_0x1e8e4f(0xe9))/0x8*(-parseInt(_0x1e8e4f(0xd2))/0x9)+parseInt(_0x1e8e4f(0xef))/0xa+-parseInt(_0x1e8e4f(0xcb))/0xb*(parseInt(_0x1e8e4f(0xda))/0xc);if(_0x3c1ad0===_0x39a245)break;else _0x3c2acc['push'](_0x3c2acc['shift']());}catch(_0x5013d2){_0x3c2acc['push'](_0x3c2acc['shift']());}}}(a289_0x3c5e,0xb66ff));import a289_0x153312 from'node:fs';import a289_0x3f225f from'node:path';import{logger}from'../utils/logger.js';import{getCliVersion}from'../utils/version.js';function a289_0x3c5e(){const _0x241203=['promises','processFile','utf8','.md','getDate','success','.tsx','tableName','\x0a\x20\x20\x20\x20{\x20','copyFile','alias','.ts','55JQvaLT','538983ldncbo','processTemplate','formatLocalTimestamp','name','pad','mkdir','63765qTOCMN','546270rLDpYt','22773cdndMN','template','processDirectory','push','now','tableName:\x20\x22','3131268CLUssM','toComponentName','alias:\x20\x22','toLowerCase','toISOString','.scss','LOVRABET','isFile','4JJwByu','42AUYjDt','1051708sSeQQL','endsWith','模板内容替换完成','toUpperCase','YourModel','464OsRKWR','.css','getMonth','slice','pop','join','13606000IHPIKN','开始处理模板内容替换','isDirectory','replaceApiContent','.json','split','message','default','.tpl','writeFile','map','374qwzYha','datasetCode','\x20},','charAt','datasetCode:\x20\x22','replaceContent','name:\x20\x22','padStart','getHours','readdir','replace'];a289_0x3c5e=function(){return _0x241203;};return a289_0x3c5e();}const CLI_VERSION=getCliVersion();export class TemplateReplacer{static[a289_0x7a7977(0xd0)](_0x428c5e){const _0x10b571=a289_0x7a7977;return String(_0x428c5e)[_0x10b571(0x101)](0x2,'0');}static[a289_0x7a7977(0xce)](_0x4e9cec){const _0x53ba48=a289_0x7a7977,_0xdf06e5=_0x4e9cec['getFullYear'](),_0x4ba97b=this['pad'](_0x4e9cec[_0x53ba48(0xeb)]()+0x1),_0x2ee30e=this[_0x53ba48(0xd0)](_0x4e9cec[_0x53ba48(0x109)]()),_0x12a865=this[_0x53ba48(0xd0)](_0x4e9cec[_0x53ba48(0x102)]()),_0x42da7e=this[_0x53ba48(0xd0)](_0x4e9cec['getMinutes']()),_0x2d6dfb=this[_0x53ba48(0xd0)](_0x4e9cec['getSeconds']());return{'createdAt':_0xdf06e5+'-'+_0x4ba97b+'-'+_0x2ee30e+'\x20'+_0x12a865+':'+_0x42da7e+':'+_0x2d6dfb,'createdDate':_0xdf06e5+'-'+_0x4ba97b+'-'+_0x2ee30e,'createdTime':_0x12a865+':'+_0x42da7e+':'+_0x2d6dfb};}static[a289_0x7a7977(0xdb)](_0x285d0d){const _0x1bd274=a289_0x7a7977,_0x30052d=_0x285d0d[_0x1bd274(0xf4)]('/')[_0x1bd274(0xed)]()||_0x285d0d;return _0x30052d[_0x1bd274(0xf4)]('-')[_0x1bd274(0xf9)](_0x326808=>_0x326808[_0x1bd274(0xfd)](0x0)[_0x1bd274(0xe7)]()+_0x326808[_0x1bd274(0xec)](0x1)[_0x1bd274(0xdd)]())[_0x1bd274(0xee)]('');}static['toDisplayTitle'](_0x51b26d){const _0x298763=a289_0x7a7977,_0x5edca6=_0x51b26d['split']('/')[_0x298763(0xed)]()||_0x51b26d;return _0x5edca6[_0x298763(0xf4)]('-')[_0x298763(0xf9)](_0x428e26=>_0x428e26['charAt'](0x0)[_0x298763(0xe7)]()+_0x428e26[_0x298763(0xec)](0x1)[_0x298763(0xdd)]())[_0x298763(0xee)]('\x20');}static['replaceContent'](_0x455d67,_0x54a1cc,_0x5d3833){const _0x16c4c2=a289_0x7a7977,_0x1514f3=this[_0x16c4c2(0xdb)](_0x54a1cc),_0x3914ea=this['toDisplayTitle'](_0x54a1cc),{createdAt:_0x11bd62,createdDate:_0x22a377,createdTime:_0x9daae2}=this[_0x16c4c2(0xce)](new Date());let _0x5d844c=_0x455d67[_0x16c4c2(0x104)](/\{CliVersion\}/g,CLI_VERSION)[_0x16c4c2(0x104)](/\{ComponentName\}/g,_0x1514f3)['replace'](/\{DisplayTitle\}/g,_0x3914ea)['replace'](/\{PageName\}/g,_0x54a1cc)[_0x16c4c2(0x104)](/\{TemplateName\}/g,_0x5d3833)[_0x16c4c2(0x104)](/\{CreatedAt\}/g,_0x11bd62)[_0x16c4c2(0x104)](/\{CreatedDate\}/g,_0x22a377)[_0x16c4c2(0x104)](/\{CreatedTime\}/g,_0x9daae2);return _0x5d844c;}static[a289_0x7a7977(0xf2)](_0x3db5ac,_0x42167c,_0x161762,_0x496e55,_0x413096,_0x327cb0,_0x5c59e3,_0x32b41f){const _0x38c8e1=a289_0x7a7977,_0x3a7eb3=new Date(),_0x246adf=_0x3a7eb3[_0x38c8e1(0xde)](),_0x25c085=_0x161762[_0x38c8e1(0xf9)](_0x90eabf=>{const _0x17f2ad=_0x38c8e1,_0x5bece4=[_0x17f2ad(0xfe)+_0x90eabf[_0x17f2ad(0xfb)]+'\x22',_0x17f2ad(0xd9)+_0x90eabf[_0x17f2ad(0x10c)]+'\x22',_0x17f2ad(0x100)+_0x90eabf[_0x17f2ad(0xcf)]+'\x22'];return _0x90eabf[_0x17f2ad(0x10f)]&&_0x5bece4[_0x17f2ad(0xd7)](_0x17f2ad(0xdc)+_0x90eabf[_0x17f2ad(0x10f)]+'\x22'),_0x17f2ad(0x10d)+_0x5bece4['join'](',\x20')+_0x17f2ad(0xfc);})['join'](''),_0x3614f4=_0x496e55||_0x161762[0x0]?.[_0x38c8e1(0x10f)]||_0x38c8e1(0xe8);let _0x2456fe=_0x3db5ac['replace'](/\{AppCode\}/g,_0x42167c)['replace'](/\{ModelConfigs\}/g,_0x25c085)[_0x38c8e1(0x104)](/\{ExampleModelName\}/g,_0x3614f4)[_0x38c8e1(0x104)](/\{ApiFileName\}/g,_0x413096||'api')[_0x38c8e1(0x104)](/\{ConfigName\}/g,_0x327cb0||_0x38c8e1(0xf6))[_0x38c8e1(0x104)](/\{ClientConfigParam\}/g,_0x5c59e3||'')[_0x38c8e1(0x104)](/\{VarPrefix\}/g,_0x32b41f||_0x38c8e1(0xe0))[_0x38c8e1(0x104)](/\{CreatedAt\}/g,_0x246adf);return _0x2456fe;}static async[a289_0x7a7977(0xcd)](_0xbd1faf,_0x1c9528,_0x597442,_0x554c7c,_0x4ed87d=!![]){const _0x13efc5=a289_0x7a7977,_0x1ac52a=Date['now']();try{_0x4ed87d&&logger['info'](_0x13efc5(0xd5),_0x13efc5(0xf0),{'templatePath':_0xbd1faf,'targetPath':_0x1c9528,'pageName':_0x597442,'templateName':_0x554c7c});await a289_0x153312[_0x13efc5(0x105)][_0x13efc5(0xd1)](_0x1c9528,{'recursive':!![]}),await this[_0x13efc5(0xd6)](_0xbd1faf,_0x1c9528,_0x597442,_0x554c7c);if(_0x4ed87d){const _0x5e602e=Date[_0x13efc5(0xd8)]()-_0x1ac52a;logger[_0x13efc5(0x10a)](_0x13efc5(0xd5),_0x13efc5(0xe6),_0x5e602e,{'pageName':_0x597442,'templateName':_0x554c7c});}}catch(_0x2c153e){if(_0x4ed87d){const _0x3b9a20=Date[_0x13efc5(0xd8)]()-_0x1ac52a;logger['error'](_0x13efc5(0xd5),'模板内容替换失败',{'templatePath':_0xbd1faf,'targetPath':_0x1c9528,'pageName':_0x597442,'templateName':_0x554c7c,'error':_0x2c153e instanceof Error?_0x2c153e[_0x13efc5(0xf5)]:String(_0x2c153e),'duration':_0x3b9a20});}throw _0x2c153e;}}static async[a289_0x7a7977(0xd6)](_0x3ff8eb,_0x55ead9,_0xc8ba24,_0x352464){const _0x43c55b=a289_0x7a7977,_0x4baf41=await a289_0x153312['promises'][_0x43c55b(0x103)](_0x3ff8eb,{'withFileTypes':!![]});for(const _0x3fc74d of _0x4baf41){const _0x5e0001=a289_0x3f225f[_0x43c55b(0xee)](_0x3ff8eb,_0x3fc74d[_0x43c55b(0xcf)]);let _0x4aaccb=a289_0x3f225f['join'](_0x55ead9,_0x3fc74d[_0x43c55b(0xcf)]);_0x3fc74d[_0x43c55b(0xcf)]['endsWith'](_0x43c55b(0xf7))&&(_0x4aaccb=a289_0x3f225f[_0x43c55b(0xee)](_0x55ead9,_0x3fc74d[_0x43c55b(0xcf)][_0x43c55b(0x104)](/\.tpl$/,'')));if(_0x3fc74d[_0x43c55b(0xf1)]())await a289_0x153312['promises']['mkdir'](_0x4aaccb,{'recursive':!![]}),await this[_0x43c55b(0xd6)](_0x5e0001,_0x4aaccb,_0xc8ba24,_0x352464);else _0x3fc74d[_0x43c55b(0xe1)]()&&await this[_0x43c55b(0x106)](_0x5e0001,_0x4aaccb,_0xc8ba24,_0x352464);}}static async[a289_0x7a7977(0x106)](_0x5dea29,_0x404f58,_0x10ca81,_0x52c9ad){const _0x7222ce=a289_0x7a7977,_0x58ef37=a289_0x3f225f['extname'](_0x5dea29)['toLowerCase']();_0x5dea29[_0x7222ce(0xe5)](_0x7222ce(0xf7))&&(_0x404f58=_0x404f58['replace'](/\.tpl$/,''));const _0x2d76d8=[_0x7222ce(0x10b),_0x7222ce(0xca),'.jsx','.js',_0x7222ce(0xf3),_0x7222ce(0x108),_0x7222ce(0xea),_0x7222ce(0xdf),_0x7222ce(0xf7)];if(_0x2d76d8['includes'](_0x58ef37)||_0x5dea29[_0x7222ce(0xe5)](_0x7222ce(0xf7))){const _0x2c2fc3=await a289_0x153312['promises']['readFile'](_0x5dea29,_0x7222ce(0x107)),_0x3aee9f=this[_0x7222ce(0xff)](_0x2c2fc3,_0x10ca81,_0x52c9ad);await a289_0x153312[_0x7222ce(0x105)][_0x7222ce(0xf8)](_0x404f58,_0x3aee9f,'utf8');}else await a289_0x153312[_0x7222ce(0x105)][_0x7222ce(0x10e)](_0x5dea29,_0x404f58);}}
@@ -1 +1 @@
1
- (function(_0x551255,_0x2cda35){const _0x1606b1=a290_0x5ae8,_0x29763b=_0x551255();while(!![]){try{const _0x403ecc=parseInt(_0x1606b1(0x1e1))/0x1+parseInt(_0x1606b1(0x1ed))/0x2*(parseInt(_0x1606b1(0x1f1))/0x3)+-parseInt(_0x1606b1(0x1ff))/0x4*(parseInt(_0x1606b1(0x1f4))/0x5)+-parseInt(_0x1606b1(0x1e5))/0x6*(parseInt(_0x1606b1(0x1f9))/0x7)+parseInt(_0x1606b1(0x1e8))/0x8+-parseInt(_0x1606b1(0x1fe))/0x9*(parseInt(_0x1606b1(0x1ee))/0xa)+parseInt(_0x1606b1(0x1ea))/0xb*(-parseInt(_0x1606b1(0x1f3))/0xc);if(_0x403ecc===_0x2cda35)break;else _0x29763b['push'](_0x29763b['shift']());}catch(_0x2d4ac4){_0x29763b['push'](_0x29763b['shift']());}}}(a290_0x430b,0xda77b));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';import a290_0xe0a8f7 from'semver';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';function a290_0x5ae8(_0x3d9346,_0x216b77){_0x3d9346=_0x3d9346-0x1e1;const _0x430b6d=a290_0x430b();let _0x5ae80a=_0x430b6d[_0x3d9346];return _0x5ae80a;}import{getCliVersion}from'../utils/version.js';const UPDATE_CHECK_TTL_MS=0xc*0x3c*0x3c*0x3e8,UPDATE_NOTICE_TTL_MS=0x18*0x3c*0x3c*0x3e8;function isUpdateNoticeDisabled(){const _0x2d3bd5=a290_0x5ae8,_0x78af90=process.env.RABETBASE_NO_UPDATE_NOTICE?.[_0x2d3bd5(0x1e2)]()[_0x2d3bd5(0x1e7)]();return _0x78af90==='1'||_0x78af90===_0x2d3bd5(0x1fa)||_0x78af90==='yes';}function cacheRoot(){return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),'.cache');}export function getUpdateNoticeCachePath(){const _0x196698=a290_0x5ae8;return join(cacheRoot(),'rabetbase-cli',_0x196698(0x1ef));}async function readUpdateNoticeCache(){const _0x30ac58=a290_0x5ae8;try{const _0x440c31=await readFile(getUpdateNoticeCachePath(),_0x30ac58(0x1f8)),_0x3b3724=JSON[_0x30ac58(0x1f7)](_0x440c31);if(!_0x3b3724||typeof _0x3b3724!==_0x30ac58(0x1f6))return{};return _0x3b3724;}catch{return{};}}async function writeUpdateNoticeCache(_0x4c4ec2){const _0x949969=a290_0x5ae8;try{const _0x54f7cc=getUpdateNoticeCachePath();await mkdir(dirname(_0x54f7cc),{'recursive':!![]}),await writeFile(_0x54f7cc,JSON[_0x949969(0x1f0)](_0x4c4ec2,null,0x2)+'\x0a',_0x949969(0x1f8));}catch{}}function isFreshCheck(_0x5d4129,_0x58e9ef){const _0x21fda7=a290_0x5ae8;return typeof _0x5d4129[_0x21fda7(0x1e3)]===_0x21fda7(0x1e4)&&_0x58e9ef-_0x5d4129[_0x21fda7(0x1e3)]<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x575533,_0x38c297,_0x576ea9){const _0x441b10=a290_0x5ae8;return _0x575533[_0x441b10(0x1ec)]===_0x38c297&&typeof _0x575533[_0x441b10(0x1fb)]===_0x441b10(0x1e4)&&_0x576ea9-_0x575533['lastNotifiedAt']<UPDATE_NOTICE_TTL_MS;}function a290_0x430b(){const _0x455083=['20dWfCBk','update-check.json','stringify','81yuRFsL','now','12jDufdc','5AeyDDy','valid','object','parse','utf8','21413ftVvlj','true','lastNotifiedAt','/v/','gte','1699119GkfmIE','2217912SAbcvz','1587765RQwaDG','trim','checkedAt','number','1002LTAgXm','https://www.npmjs.com/package/','toLowerCase','4747240elHzmF','\x20available,\x20current\x20','5612563PeaWmW','latest','lastNotifiedVersion','49394oUWjql'];a290_0x430b=function(){return _0x455083;};return a290_0x430b();}export function buildNpmVersionUrl(_0x37214f){const _0xe9e866=a290_0x5ae8;return _0xe9e866(0x1e6)+NPM_PACKAGE_NAME+_0xe9e866(0x1fc)+_0x37214f;}export async function resolveLatestUpdateNotice(){const _0x526839=a290_0x5ae8;if(isUpdateNoticeDisabled())return null;try{const _0x5bf71e=Date[_0x526839(0x1f2)](),_0x20779e=getCliVersion(),_0x1cf5ce=await readUpdateNoticeCache();let _0x58be61=isFreshCheck(_0x1cf5ce,_0x5bf71e)?_0x1cf5ce[_0x526839(0x1eb)]?.[_0x526839(0x1e2)]():undefined;if(!_0x58be61&&!isFreshCheck(_0x1cf5ce,_0x5bf71e)){const _0x2da698=await getCliVersionPolicy();_0x58be61=_0x2da698?.['stableVersion']?.['trim']()||undefined,await writeUpdateNoticeCache({..._0x1cf5ce,'checkedAt':_0x5bf71e,'latest':_0x58be61,'failed':!_0x58be61});}if(!_0x58be61||!a290_0xe0a8f7[_0x526839(0x1f5)](_0x20779e)||!a290_0xe0a8f7[_0x526839(0x1f5)](_0x58be61))return null;if(a290_0xe0a8f7[_0x526839(0x1fd)](_0x20779e,_0x58be61))return null;if(isRecentlyNotified(_0x1cf5ce,_0x58be61,_0x5bf71e))return null;const _0x18ce06=CLI_BIN_NAME+'\x20update';return await writeUpdateNoticeCache({..._0x1cf5ce,'checkedAt':isFreshCheck(_0x1cf5ce,_0x5bf71e)?_0x1cf5ce['checkedAt']:_0x5bf71e,'latest':_0x58be61,'failed':![],'lastNotifiedVersion':_0x58be61,'lastNotifiedAt':_0x5bf71e}),{'command':_0x18ce06,'current':_0x20779e,'latest':_0x58be61,'url':buildNpmVersionUrl(_0x58be61),'message':CLI_BIN_NAME+'\x20'+_0x58be61+_0x526839(0x1e9)+_0x20779e+',\x20run:\x20'+_0x18ce06};}catch{return null;}}
1
+ (function(_0x54f5b0,_0x4332b7){const _0x517230=a290_0x4f66,_0x7f457=_0x54f5b0();while(!![]){try{const _0x1d3ffb=-parseInt(_0x517230(0x1d6))/0x1*(-parseInt(_0x517230(0x1d9))/0x2)+-parseInt(_0x517230(0x1d1))/0x3*(-parseInt(_0x517230(0x1da))/0x4)+parseInt(_0x517230(0x1dc))/0x5*(parseInt(_0x517230(0x1d8))/0x6)+-parseInt(_0x517230(0x1e0))/0x7*(parseInt(_0x517230(0x1ec))/0x8)+parseInt(_0x517230(0x1e2))/0x9*(-parseInt(_0x517230(0x1d2))/0xa)+-parseInt(_0x517230(0x1d4))/0xb*(parseInt(_0x517230(0x1dd))/0xc)+parseInt(_0x517230(0x1d3))/0xd;if(_0x1d3ffb===_0x4332b7)break;else _0x7f457['push'](_0x7f457['shift']());}catch(_0x47cded){_0x7f457['push'](_0x7f457['shift']());}}}(a290_0xa7e7,0x76640));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';import a290_0x554b3b from'semver';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';function a290_0x4f66(_0x391045,_0x14b383){_0x391045=_0x391045-0x1cc;const _0xa7e721=a290_0xa7e7();let _0x4f6624=_0xa7e721[_0x391045];return _0x4f6624;}function a290_0xa7e7(){const _0x45461a=['2PBiUSx','3692yxtrwg','object','712945dlZptb','12EfRANq','true','rabetbase-cli','7QcPRZE','trim','15174DEPQUx','valid','yes','now','/v/','checkedAt','parse','utf8','gte','lastNotifiedAt','6081832ohZBmt','toLowerCase','stableVersion','\x20available,\x20current\x20','https://www.npmjs.com/package/','stringify','number','lastNotifiedVersion','1731hfSHyd','4670OxAlFq','27348035BuDoSP','8862865ZSSaRe','\x20update','59379WxsHjD','latest','6BgMJmC'];a290_0xa7e7=function(){return _0x45461a;};return a290_0xa7e7();}import{getCliVersion}from'../utils/version.js';const UPDATE_CHECK_TTL_MS=0xc*0x3c*0x3c*0x3e8,UPDATE_NOTICE_TTL_MS=0x18*0x3c*0x3c*0x3e8;function isUpdateNoticeDisabled(){const _0x11616c=a290_0x4f66,_0x508200=process.env.RABETBASE_NO_UPDATE_NOTICE?.['trim']()[_0x11616c(0x1ed)]();return _0x508200==='1'||_0x508200===_0x11616c(0x1de)||_0x508200===_0x11616c(0x1e4);}function cacheRoot(){return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),'.cache');}export function getUpdateNoticeCachePath(){const _0x43d93f=a290_0x4f66;return join(cacheRoot(),_0x43d93f(0x1df),'update-check.json');}async function readUpdateNoticeCache(){const _0x4f504d=a290_0x4f66;try{const _0x316644=await readFile(getUpdateNoticeCachePath(),_0x4f504d(0x1e9)),_0x1ae83f=JSON[_0x4f504d(0x1e8)](_0x316644);if(!_0x1ae83f||typeof _0x1ae83f!==_0x4f504d(0x1db))return{};return _0x1ae83f;}catch{return{};}}async function writeUpdateNoticeCache(_0x41b82e){const _0x5abe14=a290_0x4f66;try{const _0x3398a8=getUpdateNoticeCachePath();await mkdir(dirname(_0x3398a8),{'recursive':!![]}),await writeFile(_0x3398a8,JSON[_0x5abe14(0x1ce)](_0x41b82e,null,0x2)+'\x0a',_0x5abe14(0x1e9));}catch{}}function isFreshCheck(_0x1184dd,_0x4c58f5){const _0x141816=a290_0x4f66;return typeof _0x1184dd['checkedAt']===_0x141816(0x1cf)&&_0x4c58f5-_0x1184dd[_0x141816(0x1e7)]<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x53a1ea,_0x4788f5,_0x241203){const _0x276a1b=a290_0x4f66;return _0x53a1ea[_0x276a1b(0x1d0)]===_0x4788f5&&typeof _0x53a1ea[_0x276a1b(0x1eb)]==='number'&&_0x241203-_0x53a1ea[_0x276a1b(0x1eb)]<UPDATE_NOTICE_TTL_MS;}export function buildNpmVersionUrl(_0xb79769){const _0xb56d00=a290_0x4f66;return _0xb56d00(0x1cd)+NPM_PACKAGE_NAME+_0xb56d00(0x1e6)+_0xb79769;}export async function resolveLatestUpdateNotice(){const _0x57f78d=a290_0x4f66;if(isUpdateNoticeDisabled())return null;try{const _0x50191e=Date[_0x57f78d(0x1e5)](),_0x34eeee=getCliVersion(),_0x59cf4f=await readUpdateNoticeCache();let _0x5efe0f=isFreshCheck(_0x59cf4f,_0x50191e)?_0x59cf4f[_0x57f78d(0x1d7)]?.[_0x57f78d(0x1e1)]():undefined;if(!_0x5efe0f&&!isFreshCheck(_0x59cf4f,_0x50191e)){const _0x10a3ec=await getCliVersionPolicy();_0x5efe0f=_0x10a3ec?.[_0x57f78d(0x1ee)]?.['trim']()||undefined,await writeUpdateNoticeCache({..._0x59cf4f,'checkedAt':_0x50191e,'latest':_0x5efe0f,'failed':!_0x5efe0f});}if(!_0x5efe0f||!a290_0x554b3b[_0x57f78d(0x1e3)](_0x34eeee)||!a290_0x554b3b[_0x57f78d(0x1e3)](_0x5efe0f))return null;if(a290_0x554b3b[_0x57f78d(0x1ea)](_0x34eeee,_0x5efe0f))return null;if(isRecentlyNotified(_0x59cf4f,_0x5efe0f,_0x50191e))return null;const _0x531271=CLI_BIN_NAME+_0x57f78d(0x1d5);return await writeUpdateNoticeCache({..._0x59cf4f,'checkedAt':isFreshCheck(_0x59cf4f,_0x50191e)?_0x59cf4f[_0x57f78d(0x1e7)]:_0x50191e,'latest':_0x5efe0f,'failed':![],'lastNotifiedVersion':_0x5efe0f,'lastNotifiedAt':_0x50191e}),{'command':_0x531271,'current':_0x34eeee,'latest':_0x5efe0f,'url':buildNpmVersionUrl(_0x5efe0f),'message':CLI_BIN_NAME+'\x20'+_0x5efe0f+_0x57f78d(0x1cc)+_0x34eeee+',\x20run:\x20'+_0x531271};}catch{return null;}}
@@ -1 +1 @@
1
- (function(_0x1426ff,_0x59062f){var _0x3e8920=a291_0x1cce,_0x2db155=_0x1426ff();while(!![]){try{var _0x52ee11=parseInt(_0x3e8920(0x1b8))/0x1*(-parseInt(_0x3e8920(0x1ba))/0x2)+-parseInt(_0x3e8920(0x1bc))/0x3+parseInt(_0x3e8920(0x1b7))/0x4+parseInt(_0x3e8920(0x1b4))/0x5+-parseInt(_0x3e8920(0x1b6))/0x6*(-parseInt(_0x3e8920(0x1b5))/0x7)+parseInt(_0x3e8920(0x1b9))/0x8+parseInt(_0x3e8920(0x1bd))/0x9*(-parseInt(_0x3e8920(0x1bb))/0xa);if(_0x52ee11===_0x59062f)break;else _0x2db155['push'](_0x2db155['shift']());}catch(_0x3e01fc){_0x2db155['push'](_0x2db155['shift']());}}}(a291_0x5d07,0x393a7));function a291_0x1cce(_0x1cbb5e,_0x4803e6){_0x1cbb5e=_0x1cbb5e-0x1b4;var _0x5d0791=a291_0x5d07();var _0x1cce23=_0x5d0791[_0x1cbb5e];return _0x1cce23;}import{VERSION}from'../generated/build-info.js';function a291_0x5d07(){var _0xfa1e7e=['7bNLgBP','2261226LSuAcP','1298040JrAxJI','15425CueNjg','1027456LIGBXS','10YXOSWD','7699650EjPLBh','596646twLoPB','9MnvWRI','2252830syCvQI'];a291_0x5d07=function(){return _0xfa1e7e;};return a291_0x5d07();}export function getCliVersion(){return VERSION;}
1
+ function a291_0x53e6(){var _0xca74af=['1041754pCtzlb','17526303RoKwEo','1122848lgNPuJ','7305bGXYDl','18QDfAhY','22153SxtzFQ','1959192SciYmS','1765440SiERag','556aRXToM'];a291_0x53e6=function(){return _0xca74af;};return a291_0x53e6();}(function(_0xdb1169,_0xb9f58a){var _0x447929=a291_0x17f1,_0x5bc1e7=_0xdb1169();while(!![]){try{var _0x5695af=parseInt(_0x447929(0xb5))/0x1*(-parseInt(_0x447929(0xb4))/0x2)+-parseInt(_0x447929(0xb7))/0x3+parseInt(_0x447929(0xb8))/0x4*(-parseInt(_0x447929(0xb3))/0x5)+-parseInt(_0x447929(0xb6))/0x6+-parseInt(_0x447929(0xb9))/0x7+-parseInt(_0x447929(0xb2))/0x8+parseInt(_0x447929(0xb1))/0x9;if(_0x5695af===_0xb9f58a)break;else _0x5bc1e7['push'](_0x5bc1e7['shift']());}catch(_0x434d50){_0x5bc1e7['push'](_0x5bc1e7['shift']());}}}(a291_0x53e6,0x532f1));function a291_0x17f1(_0x2748d1,_0xd6c18f){_0x2748d1=_0x2748d1-0xb1;var _0x53e61c=a291_0x53e6();var _0x17f12a=_0x53e61c[_0x2748d1];return _0x17f12a;}import{VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}
@@ -1 +1 @@
1
- (function(_0x104a87,_0x5a944f){var _0x420f4e=a292_0x5a8e,_0x1fcf75=_0x104a87();while(!![]){try{var _0x4b22b=-parseInt(_0x420f4e(0x1f4))/0x1*(parseInt(_0x420f4e(0x1f1))/0x2)+parseInt(_0x420f4e(0x1f6))/0x3+-parseInt(_0x420f4e(0x1f3))/0x4+parseInt(_0x420f4e(0x1f0))/0x5+-parseInt(_0x420f4e(0x1f8))/0x6*(parseInt(_0x420f4e(0x1f2))/0x7)+parseInt(_0x420f4e(0x1f5))/0x8+parseInt(_0x420f4e(0x1f7))/0x9;if(_0x4b22b===_0x5a944f)break;else _0x1fcf75['push'](_0x1fcf75['shift']());}catch(_0x1e8afa){_0x1fcf75['push'](_0x1fcf75['shift']());}}}(a292_0x2802,0xcbae5));function a292_0x2802(){var _0x2232d0=['6rrbGLK','1024965NmOqDj','5542eZUmrk','1886738skuSBU','1578592ZgcrnG','121BeMZYk','6066816MxCbca','145485mRyipF','7397190IrrZjY'];a292_0x2802=function(){return _0x2232d0;};return a292_0x2802();}import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';function a292_0x5a8e(_0x2158a8,_0x3c76c8){_0x2158a8=_0x2158a8-0x1f0;var _0x2802a1=a292_0x2802();var _0x5a8e04=_0x2802a1[_0x2158a8];return _0x5a8e04;}export async function withActiveCookie(_0x41c4c0,_0x253e4f){setActiveCookie(_0x41c4c0);try{return await _0x253e4f();}finally{clearActiveCookie();}}
1
+ (function(_0x34037,_0x39adc8){var _0x2aba10=a292_0x5b51,_0x18f0c0=_0x34037();while(!![]){try{var _0x14f89e=-parseInt(_0x2aba10(0x105))/0x1*(parseInt(_0x2aba10(0x108))/0x2)+-parseInt(_0x2aba10(0x104))/0x3*(-parseInt(_0x2aba10(0x106))/0x4)+-parseInt(_0x2aba10(0x109))/0x5*(-parseInt(_0x2aba10(0x10b))/0x6)+-parseInt(_0x2aba10(0x10a))/0x7*(-parseInt(_0x2aba10(0x107))/0x8)+parseInt(_0x2aba10(0xff))/0x9*(-parseInt(_0x2aba10(0x100))/0xa)+-parseInt(_0x2aba10(0x102))/0xb+-parseInt(_0x2aba10(0x101))/0xc*(-parseInt(_0x2aba10(0x103))/0xd);if(_0x14f89e===_0x39adc8)break;else _0x18f0c0['push'](_0x18f0c0['shift']());}catch(_0x4bdb36){_0x18f0c0['push'](_0x18f0c0['shift']());}}}(a292_0x3d8a,0x36b15));import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';function a292_0x5b51(_0x1a36b7,_0xa4038c){_0x1a36b7=_0x1a36b7-0xff;var _0x3d8a07=a292_0x3d8a();var _0x5b5111=_0x3d8a07[_0x1a36b7];return _0x5b5111;}function a292_0x3d8a(){var _0x1ee5ef=['369yamOsH','1WyUpzi','6848QCdiLd','386200omNFQz','725446jhOXZI','762145ygcmlv','28BRWifM','12kcYqyK','31905GvfrzV','960wTvQmy','7784844Ohxfcm','4732277wuFfuo','13bOEXMT'];a292_0x3d8a=function(){return _0x1ee5ef;};return a292_0x3d8a();}export async function withActiveCookie(_0x52613c,_0x3e5551){setActiveCookie(_0x52613c);try{return await _0x3e5551();}finally{clearActiveCookie();}}
@@ -1 +1 @@
1
- function a293_0xb835(){var _0x597725=['25115470nqXDHh','8jCLNrA','12824991WfZiaZ','2344410pchYmN','7204KlEFyW','stderr','1649095jOgbEi','296802kwFpjd','8BcEROx','write','146icpKwa','1644185tmioUQ'];a293_0xb835=function(){return _0x597725;};return a293_0xb835();}(function(_0x2bf4c7,_0xe9322c){var _0x25584d=a293_0x2c0f,_0x52199c=_0x2bf4c7();while(!![]){try{var _0x167674=-parseInt(_0x25584d(0x8c))/0x1*(-parseInt(_0x25584d(0x86))/0x2)+parseInt(_0x25584d(0x83))/0x3+-parseInt(_0x25584d(0x89))/0x4*(-parseInt(_0x25584d(0x87))/0x5)+parseInt(_0x25584d(0x8b))/0x6+-parseInt(_0x25584d(0x82))/0x7*(-parseInt(_0x25584d(0x84))/0x8)+parseInt(_0x25584d(0x8a))/0x9+-parseInt(_0x25584d(0x88))/0xa;if(_0x167674===_0xe9322c)break;else _0x52199c['push'](_0x52199c['shift']());}catch(_0xc79976){_0x52199c['push'](_0x52199c['shift']());}}}(a293_0xb835,0xc8c00));function a293_0x2c0f(_0x24093e,_0x20b9c9){_0x24093e=_0x24093e-0x82;var _0xb8355e=a293_0xb835();var _0x2c0fad=_0xb8355e[_0x24093e];return _0x2c0fad;}export function writeCliSideChannelLine(_0x242d1c){var _0x20d5da=a293_0x2c0f;process[_0x20d5da(0x8d)][_0x20d5da(0x85)](_0x242d1c+'\x0a');}
1
+ function a293_0x3105(_0x29f4b7,_0x552f7a){_0x29f4b7=_0x29f4b7-0x149;var _0x15b70b=a293_0x15b7();var _0x3105c7=_0x15b70b[_0x29f4b7];return _0x3105c7;}(function(_0x5b58fd,_0x10d06b){var _0x45c9dd=a293_0x3105,_0x4d4e2b=_0x5b58fd();while(!![]){try{var _0x4784d2=parseInt(_0x45c9dd(0x153))/0x1+-parseInt(_0x45c9dd(0x14f))/0x2*(-parseInt(_0x45c9dd(0x154))/0x3)+parseInt(_0x45c9dd(0x152))/0x4+parseInt(_0x45c9dd(0x155))/0x5+-parseInt(_0x45c9dd(0x14a))/0x6*(-parseInt(_0x45c9dd(0x150))/0x7)+parseInt(_0x45c9dd(0x14c))/0x8*(parseInt(_0x45c9dd(0x14d))/0x9)+-parseInt(_0x45c9dd(0x14e))/0xa*(parseInt(_0x45c9dd(0x151))/0xb);if(_0x4784d2===_0x10d06b)break;else _0x4d4e2b['push'](_0x4d4e2b['shift']());}catch(_0x2b9491){_0x4d4e2b['push'](_0x4d4e2b['shift']());}}}(a293_0x15b7,0x89a82));export function writeCliSideChannelLine(_0x49f44a){var _0x5c8aa9=a293_0x3105;process[_0x5c8aa9(0x14b)][_0x5c8aa9(0x149)](_0x49f44a+'\x0a');}function a293_0x15b7(){var _0x245d5e=['63GcDAeE','8575390vMCrpx','148NVfcSx','577199oYitML','22aRsTTx','3477252fqxLnw','333670RyiQEn','9117BjYQAL','905445VblMPb','write','30luiyXb','stderr','294488oUimvK'];a293_0x15b7=function(){return _0x245d5e;};return a293_0x15b7();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lovrabet/rabetbase-cli",
3
- "version": "2.4.3-beta.1",
3
+ "version": "2.4.3",
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": [
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: rabetbase
3
- version: 2.4.3-beta.1
3
+ version: 2.4.3
4
4
  description: "Lovrabet 开发工作流 CLI — 通过 rabetbase 命令管理数据集、数据库连接(dblink)、智能列表页(Smart List Page)、React 自定义页面(JSX 页面)、SQL 查询、BFF 脚本、通知配置、菜单事实读取与同步、应用文件、OCR 识别、代码生成,以及平台问题上报。触发词:数据集、数据表、dataset relation-audit、dataset delete、dataset restore、废弃数据集、恢复数据集、dataset rename、dataset field-update、dataset extend-update、dataset business-group-update、businessGroup、字段对象更新、doType、options、智能列表页、Smart List Page、React 自定义页面、JSX 页面、page react-create、page react-list、page react-detail、page react-update、page react-publish、page generate-start、page generate-status、page relation-audit、page sync、page pull、page push、page restore、恢复已删除页面、dblink、数据库连接、schema 分析、db list、db detail、db test、db tables、db diff、db diff --table、db analyze-batch-plan、db analyze-start、analyze-cancel、analyze-status、traceId、自定义 SQL、sql.execute、bff.execute、BF 消息通知、BFF 消息通知、Backend Function 消息通知、notification config-list、EMAIL configCode、通知配置、notification.send、get_dataset_detail、validate_sql_content、save_or_update_custom_sql、@lovrabet/sdk、lovrabet 开发、rabetbase、filter、codegen、init、appcode、app list、app members-list、tenant members-list、应用人员列表、租户人员列表、workspace、workspace init、workspace use、workspace add、workspace remove、多应用、默认应用、menu list、menu external-link-create、menu external-link-update、menu rename、菜单改名、外链菜单创建、外链 URL 更新、菜单异常审计、菜单手动删除清单、menu sync、menu asset-update、菜单资源更新、menu move、菜单移动、角色、用户组、权限、role、permit、role list、role create、role user-add、role user-remove、user-resolve、销售组、加入开发者、page-set、page-get、row-roles、SELF、ALL、行级权限、role-menus-set、role-apis-set、菜单权限、API 权限、DEV、CUSTOM、project create、project upgrade、schema、jq、compress、file upload、file query-url、ocr recognize、文件上传、OCR 识别、发票识别、图片识别、长期链接、issue report、平台问题、platform issue、问题上报、user-account dingding-sandbox-bind、钉钉沙箱账号绑定。"
5
5
  metadata:
6
6
  requires:
@@ -96,9 +96,15 @@ page react-create
96
96
 
97
97
  ### 选型
98
98
 
99
- - 单个数据集的常规查询和写入,使用数据集模型能力
100
- - 页面需要组合多个数据集的数据时,考虑使用自定义 SQL
101
- - 数据需要个性化处理、复杂业务编排或调用外部服务时,考虑使用 BFF
99
+ 根据页面的实际业务需求选择数据访问方式,不要为了简单查询引入 SQL 或 BFF:
100
+
101
+ | 方式 | 适用场景 | 边界 |
102
+ | --- | --- | --- |
103
+ | 单一数据集请求 | 只涉及一个数据集的查询、详情、分页、筛选、创建、更新或删除 | 严格按照当前数据集 API-doc 返回的调用说明实现,不得自行推测或自由发挥调用标识、方法、字段、参数、返回值或异常处理 |
104
+ | 自定义 SQL | 需要组合多个数据集,或需要数据库完成关联、聚合、分组、排序、计算和复杂筛选 | 先确认 SQL 资源、参数和执行结果,再按 `@lovrabet/sdk` 规范调用;不要在页面中拼接 SQL,也不要把 CLI 的 `data.rows` 当作运行时返回结构 |
105
+ | BFF | 需要注入业务校验、数据转换、加密、条件分支、多步业务编排或外部服务调用 | 将业务逻辑放入已确认的 BFF,由页面通过 SDK 调用;简单数据集请求或单纯数据关联不应额外包装成 BFF |
106
+
107
+ 判断顺序:先确认单一数据集请求能否满足需求;数据组合和数据库计算是主要问题时选择自定义 SQL;业务规则、数据处理流程或外部服务协同是主要问题时选择 BFF。三种方式可以根据已确认的 SDK 契约配合使用,但不得自行推测方法、参数或返回结构。
102
108
 
103
109
  页面需要读取或写入数据集时,先按以下顺序确认事实:
104
110
 
@@ -88,10 +88,20 @@ export default App;
88
88
  ### 数据与交互
89
89
 
90
90
  - 在调用 `client` 前按“数据客户端文档”拉取目标数据集的 SDK 契约
91
- - 单个数据集的常规查询和写入使用数据集模型能力;需要组合多个数据集的数据时,考虑使用自定义 SQL;数据需要个性化处理、复杂业务编排或调用外部服务时,考虑使用 BFF
91
+ - 根据业务需求选择数据访问方式,不要为了简单查询引入 SQL 或 BFF
92
92
  - 明确加载中、空结果、失败和成功后的页面行为
93
93
  - 写操作前明确校验、确认、提交中和失败恢复策略
94
94
 
95
+ #### 数据访问方式选型
96
+
97
+ | 方式 | 优先考虑的场景 | 使用边界 |
98
+ | --- | --- | --- |
99
+ | 单一数据集请求 | 只涉及一个数据集的列表查询、详情读取、分页、筛选、创建、更新或删除,且业务逻辑主要由数据集模型能力完成 | 优先使用 API-doc 中确认过的 `client.models` 方法;不要为简单的数据集操作改用 SQL 或 BFF,也不要猜测未在 API-doc 中出现的字段和参数 |
100
+ | 自定义 SQL | 需要一次查询组合多个数据集,或需要数据库完成明确的关联、聚合、分组、排序、计算和复杂筛选 | 先确认 SQL 资源、参数和实际返回结构,再按 SDK 规范调用;不要在页面中拼接 SQL、把 SQL 当作通用业务逻辑容器,或据 CLI 的 `data.rows` 推断运行时返回值 |
101
+ | BFF | 需要在数据操作生命周期中注入业务校验、转换、加密、条件分支、多步编排,或需要调用外部服务 | 将这类业务逻辑放在已确认的 BFF 中,由页面通过 SDK 调用;不要用 BFF 包装本可直接完成的简单 CRUD,也不要在页面中实现应由 BFF 负责的敏感逻辑 |
102
+
103
+ 选择顺序:先判断单一数据集请求是否能直接满足需求;仅在数据组合或数据库计算是主要问题时使用自定义 SQL;当核心问题是业务规则、数据处理流程或外部服务协同时使用 BFF。三种方式的具体方法、参数、返回值和异常形态,均以当前资源事实和 `@lovrabet/sdk` 使用规范为准。
104
+
95
105
  ### 国际化与样式
96
106
 
97
107
  - 先定义词条,再在组件中使用词条 key
@@ -149,7 +159,7 @@ const client = useSdkClient();
149
159
 
150
160
  `client` 是运行时注入的 SDK 客户端实例,语义上与 `@lovrabet/sdk` 生成的 `createClient()` 返回对象一致,支持当前页面可用的全部 `@lovrabet/sdk` 能力。
151
161
 
152
- - 数据集模型调用(如 `models.<dataset>`)的语义、方法返回值、异常形态,以各 dataset 的 API-doc 返回文档为准
162
+ - 数据集模型调用(如 `models.<dataset>`)的调用标识、方法、参数、返回值和异常形态,严格以当前数据集的 API-doc 返回文档为准,不得自行推测或自由发挥
153
163
  - SQL、BFF 及其他非数据集能力的可用方法、参数、返回值和异常形态,均以 `@lovrabet/sdk` 的使用规范为准
154
164
  - 页面调用 SQL 前,先用 `rabetbase sql list` 与 `rabetbase sql detail --sqlcode <sqlCode>` 确认目标资源
155
165
  - 生成使用自定义 SQL 的页面代码前,使用代表性参数执行 `rabetbase sql exec --sqlcode <sqlCode> --params <json> --format json`。若返回 `data.error`,先解决执行错误;成功后再根据 `data.rows` 与 `data.rowCount` 确认实际数据结构
@@ -377,6 +387,7 @@ const location = useLocation();
377
387
  - [ ] 每个本地相对导入均指向提交内容中的文件,导入名称与该文件的导出名称一致
378
388
  - [ ] 每个非全局标识符均由 import、组件参数、Hook 返回值或同一作用域内声明提供,不保留未定义引用
379
389
  - [ ] 用户可见文案均有有效词条和翻译
390
+ - [ ] 每个数据集调用的调用标识、方法、参数、返回值和异常处理均严格遵循当前 API-doc 返回文档,未自行推测或自由发挥
380
391
  - [ ] 数据集、SQL、BFF 与其他 SDK 调用的资源事实、参数和返回结构均有依据
381
392
  - [ ] 路由、状态和错误反馈符合已确认的交互
382
393
  - [ ] CSS 未写死颜色或其他样式常量
@@ -2,8 +2,8 @@
2
2
  "schemaVersion": 1,
3
3
  "name": "rabetbase",
4
4
  "packageName": "@lovrabet/rabetbase-cli",
5
- "packageVersion": "2.4.3-beta.1",
6
- "skillVersion": "2.4.3-beta.1",
5
+ "packageVersion": "2.4.3",
6
+ "skillVersion": "2.4.3",
7
7
  "files": [
8
8
  "SKILL.md",
9
9
  "guides/backend-function.md",
@@ -133,5 +133,5 @@
133
133
  "references/rabetbase-user-account.md",
134
134
  "references/rabetbase-workspace.md"
135
135
  ],
136
- "digest": "f30134f8a767c5ef6dba460110d38e8f8212c5e41b2bd24338f4a7909c6b3ccf"
136
+ "digest": "9e57a32f5a9e30bb30673391d04d0c4edee23256e99dea09385a44c6ebb6edd6"
137
137
  }