@lovrabet/rabetbase-cli 2.3.12-beta.1 → 2.3.13-beta.1

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 (260) 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/add.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/remote-directory.js +1 -1
  23. package/lib/commands/app/remove.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/logs/index.js +1 -1
  102. package/lib/commands/menu/delete.js +1 -1
  103. package/lib/commands/menu/external-link-create.js +1 -1
  104. package/lib/commands/menu/group-create.js +1 -1
  105. package/lib/commands/menu/group-update.js +1 -1
  106. package/lib/commands/menu/index.js +1 -1
  107. package/lib/commands/menu/list.js +1 -1
  108. package/lib/commands/menu/move.js +1 -1
  109. package/lib/commands/menu/regroup-start.js +1 -1
  110. package/lib/commands/menu/shared/compare-table.js +1 -1
  111. package/lib/commands/menu/shared/delete-plan.js +1 -1
  112. package/lib/commands/menu/shared/facts.js +1 -1
  113. package/lib/commands/menu/shared/index.js +1 -1
  114. package/lib/commands/menu/shared/inquirer.js +1 -1
  115. package/lib/commands/menu/shared/local-pages.js +1 -1
  116. package/lib/commands/menu/shared/logic.js +1 -1
  117. package/lib/commands/menu/shared/mutations.js +1 -1
  118. package/lib/commands/menu/shared/service.js +1 -1
  119. package/lib/commands/menu/shared/sync-core.js +1 -1
  120. package/lib/commands/menu/shared/update-core.js +1 -1
  121. package/lib/commands/menu/shared/valid-url.js +1 -1
  122. package/lib/commands/menu/sync.js +1 -1
  123. package/lib/commands/menu/update.js +1 -1
  124. package/lib/commands/notification/config-list.js +1 -1
  125. package/lib/commands/notification/index.js +1 -1
  126. package/lib/commands/page/generate-start.js +1 -1
  127. package/lib/commands/page/generate-status.js +1 -1
  128. package/lib/commands/page/index.js +1 -1
  129. package/lib/commands/page/pull.js +1 -1
  130. package/lib/commands/page/push.js +1 -1
  131. package/lib/commands/page/relation-audit.js +1 -1
  132. package/lib/commands/page/shared.js +1 -1
  133. package/lib/commands/page/standard-page-status.js +1 -1
  134. package/lib/commands/page/sync.js +1 -1
  135. package/lib/commands/permit/index.js +1 -1
  136. package/lib/commands/permit/page-get.js +1 -1
  137. package/lib/commands/permit/page-set.js +1 -1
  138. package/lib/commands/permit/role-apis-set.js +1 -1
  139. package/lib/commands/permit/role-menus-set.js +1 -1
  140. package/lib/commands/permit/role-menus.js +1 -1
  141. package/lib/commands/permit/shared.js +1 -1
  142. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  143. package/lib/commands/project/create/format-elapsed.js +1 -1
  144. package/lib/commands/project/create/main.js +1 -1
  145. package/lib/commands/project/create/non-interactive.js +1 -1
  146. package/lib/commands/project/create/project-template-path.js +1 -1
  147. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  148. package/lib/commands/project/create/use-format-code.js +1 -1
  149. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  150. package/lib/commands/project/index.js +1 -1
  151. package/lib/commands/project/init.js +1 -1
  152. package/lib/commands/project/upgrade.js +1 -1
  153. package/lib/commands/registry.js +1 -1
  154. package/lib/commands/role/create.js +1 -1
  155. package/lib/commands/role/delete.js +1 -1
  156. package/lib/commands/role/detail.js +1 -1
  157. package/lib/commands/role/index.js +1 -1
  158. package/lib/commands/role/list.js +1 -1
  159. package/lib/commands/role/shared.js +1 -1
  160. package/lib/commands/role/update.js +1 -1
  161. package/lib/commands/role/user-add.js +1 -1
  162. package/lib/commands/role/user-remove.js +1 -1
  163. package/lib/commands/role/user-resolve.js +1 -1
  164. package/lib/commands/run/index.js +1 -1
  165. package/lib/commands/schema.js +1 -1
  166. package/lib/commands/sql/create.js +1 -1
  167. package/lib/commands/sql/delete.js +1 -1
  168. package/lib/commands/sql/detail.js +1 -1
  169. package/lib/commands/sql/exec.js +1 -1
  170. package/lib/commands/sql/index.js +1 -1
  171. package/lib/commands/sql/list.js +1 -1
  172. package/lib/commands/sql/pull.js +1 -1
  173. package/lib/commands/sql/push.js +1 -1
  174. package/lib/commands/sql/save.js +1 -1
  175. package/lib/commands/sql/shared.js +1 -1
  176. package/lib/commands/sql/status.js +1 -1
  177. package/lib/commands/sql/validate.js +1 -1
  178. package/lib/commands/task/index.js +1 -1
  179. package/lib/commands/task/status.js +1 -1
  180. package/lib/commands/workspace/add.js +1 -1
  181. package/lib/commands/workspace/index.js +1 -1
  182. package/lib/commands/workspace/remove.js +1 -1
  183. package/lib/config/schema.js +1 -1
  184. package/lib/constant/cdn.js +1 -1
  185. package/lib/constant/cli.js +1 -1
  186. package/lib/constant/defaults.js +1 -1
  187. package/lib/constant/domain.js +1 -1
  188. package/lib/constant/env.js +1 -1
  189. package/lib/constant/output.js +1 -1
  190. package/lib/constant/paths.js +1 -1
  191. package/lib/constant/risk.js +1 -1
  192. package/lib/context/app-resolver.js +1 -1
  193. package/lib/context/auth-resolver.js +1 -1
  194. package/lib/context/config-loader.js +1 -1
  195. package/lib/context.js +1 -1
  196. package/lib/core/alias-resolver.js +1 -1
  197. package/lib/core/api-client.js +1 -1
  198. package/lib/core/bff/config.js +1 -1
  199. package/lib/core/bff/file-system.js +1 -1
  200. package/lib/core/bff/hash.js +1 -1
  201. package/lib/core/bff/lock.js +1 -1
  202. package/lib/core/bff/utils.js +1 -1
  203. package/lib/core/db-resolver.js +1 -1
  204. package/lib/core/page/file-system.js +1 -1
  205. package/lib/core/page/hash.js +1 -1
  206. package/lib/core/page/lock.js +1 -1
  207. package/lib/core/sql-index-auditor.js +1 -1
  208. package/lib/core/sql-sync/config.js +1 -1
  209. package/lib/core/sql-sync/file-system.js +1 -1
  210. package/lib/core/sql-sync/hash.js +1 -1
  211. package/lib/core/sql-sync/lock.js +1 -1
  212. package/lib/core/sql-sync/utils.js +1 -1
  213. package/lib/core/sql-validator.js +1 -1
  214. package/lib/errors.js +1 -1
  215. package/lib/framework/build-all-flags.js +1 -1
  216. package/lib/framework/error-output.js +1 -1
  217. package/lib/framework/explicit-yes.js +1 -1
  218. package/lib/framework/flags.js +1 -1
  219. package/lib/framework/help.js +1 -1
  220. package/lib/framework/index.js +1 -1
  221. package/lib/framework/output.js +1 -1
  222. package/lib/framework/response.js +1 -1
  223. package/lib/framework/runner-alias.js +1 -1
  224. package/lib/framework/runner.js +1 -1
  225. package/lib/framework/schema-export.js +1 -1
  226. package/lib/framework/types.js +1 -1
  227. package/lib/generated/build-info.js +1 -1
  228. package/lib/help.js +1 -1
  229. package/lib/skills/main.js +1 -1
  230. package/lib/skills/npx-skills-add.js +1 -1
  231. package/lib/telemetry/cli-command-trace.js +1 -1
  232. package/lib/telemetry/cli-help-trace.js +1 -1
  233. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  234. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  235. package/lib/telemetry/send-cli-trace-log.js +1 -1
  236. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  237. package/lib/utils/ai_config.js +1 -1
  238. package/lib/utils/apply-jq-filter.js +1 -1
  239. package/lib/utils/cdn-config.js +1 -1
  240. package/lib/utils/check-sdk-version.js +1 -1
  241. package/lib/utils/cli-version-check.js +1 -1
  242. package/lib/utils/cli-version-policy.js +1 -1
  243. package/lib/utils/config.js +1 -1
  244. package/lib/utils/copy-directory.js +1 -1
  245. package/lib/utils/entity-with-id.js +1 -1
  246. package/lib/utils/file-utils.js +1 -1
  247. package/lib/utils/guides-cdn.js +1 -1
  248. package/lib/utils/http-client.js +1 -1
  249. package/lib/utils/is-non-interactive.js +1 -1
  250. package/lib/utils/logger.js +1 -1
  251. package/lib/utils/params.js +1 -1
  252. package/lib/utils/platform.js +1 -1
  253. package/lib/utils/rules-cdn.js +1 -1
  254. package/lib/utils/sleep.js +1 -1
  255. package/lib/utils/template-replacer.js +1 -1
  256. package/lib/utils/update-notice.js +1 -1
  257. package/lib/utils/version.js +1 -1
  258. package/lib/utils/with-active-cookie.js +1 -1
  259. package/lib/utils/write-cli-side-channel.js +1 -1
  260. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x5e0abc,_0x1140a){const _0x3707b0=a135_0x201f,_0x3f13b3=_0x5e0abc();while(!![]){try{const _0x3c973e=parseInt(_0x3707b0(0x1f2))/0x1+-parseInt(_0x3707b0(0x1f3))/0x2+parseInt(_0x3707b0(0x1ee))/0x3+parseInt(_0x3707b0(0x1f4))/0x4+-parseInt(_0x3707b0(0x1ef))/0x5+parseInt(_0x3707b0(0x1f0))/0x6+-parseInt(_0x3707b0(0x1f1))/0x7;if(_0x3c973e===_0x1140a)break;else _0x3f13b3['push'](_0x3f13b3['shift']());}catch(_0x2bbac1){_0x3f13b3['push'](_0x3f13b3['shift']());}}}(a135_0x6610,0x40955));import{permitPageGet}from'../../commands/permit/page-get.js';import{permitPageSet}from'../../commands/permit/page-set.js';function a135_0x201f(_0x37f834,_0x2bb4d4){_0x37f834=_0x37f834-0x1ee;const _0x66105b=a135_0x6610();let _0x201f1c=_0x66105b[_0x37f834];return _0x201f1c;}function a135_0x6610(){const _0x438336=['1302140tnfkyb','874575ZNuipu','1450835EYbMpJ','1778550mXvYRj','2108260qPjxYc','450562BQebUR','1016334vJDaTP'];a135_0x6610=function(){return _0x438336;};return a135_0x6610();}import{permitRoleMenus}from'../../commands/permit/role-menus.js';import{permitRoleMenusSet}from'../../commands/permit/role-menus-set.js';import{permitRoleApisSet}from'../../commands/permit/role-apis-set.js';export const permitDefinitions=[permitPageGet,permitPageSet,permitRoleMenus,permitRoleMenusSet,permitRoleApisSet];
1
+ function a135_0x2865(_0x554b28,_0x3af433){_0x554b28=_0x554b28-0x18b;const _0x25a612=a135_0x25a6();let _0x2865ee=_0x25a612[_0x554b28];return _0x2865ee;}(function(_0x4545ff,_0x398530){const _0x5d9c80=a135_0x2865,_0x4bced9=_0x4545ff();while(!![]){try{const _0x1b7c83=-parseInt(_0x5d9c80(0x18d))/0x1*(parseInt(_0x5d9c80(0x194))/0x2)+parseInt(_0x5d9c80(0x18b))/0x3+parseInt(_0x5d9c80(0x191))/0x4*(parseInt(_0x5d9c80(0x18e))/0x5)+parseInt(_0x5d9c80(0x193))/0x6+parseInt(_0x5d9c80(0x195))/0x7+parseInt(_0x5d9c80(0x192))/0x8*(parseInt(_0x5d9c80(0x18f))/0x9)+-parseInt(_0x5d9c80(0x18c))/0xa*(parseInt(_0x5d9c80(0x190))/0xb);if(_0x1b7c83===_0x398530)break;else _0x4bced9['push'](_0x4bced9['shift']());}catch(_0x18d248){_0x4bced9['push'](_0x4bced9['shift']());}}}(a135_0x25a6,0x91a91));import{permitPageGet}from'../../commands/permit/page-get.js';import{permitPageSet}from'../../commands/permit/page-set.js';import{permitRoleMenus}from'../../commands/permit/role-menus.js';import{permitRoleMenusSet}from'../../commands/permit/role-menus-set.js';import{permitRoleApisSet}from'../../commands/permit/role-apis-set.js';export const permitDefinitions=[permitPageGet,permitPageSet,permitRoleMenus,permitRoleMenusSet,permitRoleApisSet];function a135_0x25a6(){const _0x4f8c3f=['2245PnSabP','2899431AsQbWs','113531jvUMzm','4548lcqJHn','8fAcNSi','5030256MPGeRw','2duuzGv','475055VQwAcD','2725380gfVGsG','1910MVHQjn','79437pBYJzp'];a135_0x25a6=function(){return _0x4f8c3f;};return a135_0x25a6();}
@@ -1 +1 @@
1
- function a136_0x4b62(_0x327e97,_0x928554){_0x327e97=_0x327e97-0x1cc;const _0x1363ea=a136_0x1363();let _0x4b6252=_0x1363ea[_0x327e97];return _0x4b6252;}const a136_0xf4b04c=a136_0x4b62;function a136_0x1363(){const _0x46c909=['2910xteHMa','3395105juddPJ','page-get','10069398kmLywv','707229OroXEo','Page\x20permit\x20for\x20menu\x20','6220ZdnWst','menu-id','440732TKnGNW','Show\x20the\x20page\x20permission\x20snapshot\x20for\x20a\x20menu','6917760OJVufj','3LyZKeQ','permit','2264856MZJhzP'];a136_0x1363=function(){return _0x46c909;};return a136_0x1363();}(function(_0x161c61,_0x1010d4){const _0x151159=a136_0x4b62,_0x399828=_0x161c61();while(!![]){try{const _0x5ecbe6=-parseInt(_0x151159(0x1cf))/0x1*(-parseInt(_0x151159(0x1cc))/0x2)+parseInt(_0x151159(0x1d1))/0x3+parseInt(_0x151159(0x1d8))/0x4*(parseInt(_0x151159(0x1d2))/0x5)+-parseInt(_0x151159(0x1d5))/0x6+-parseInt(_0x151159(0x1d3))/0x7+parseInt(_0x151159(0x1ce))/0x8+-parseInt(_0x151159(0x1d6))/0x9;if(_0x5ecbe6===_0x1010d4)break;else _0x399828['push'](_0x399828['shift']());}catch(_0x3439c6){_0x399828['push'](_0x399828['shift']());}}}(a136_0x1363,0xe674f));import{getPagePermit}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{MENU_ID_FLAG,projectPagePermit}from'../../commands/permit/shared.js';export const permitPageGet={'service':a136_0xf4b04c(0x1d0),'command':a136_0xf4b04c(0x1d4),'description':a136_0xf4b04c(0x1cd),'risk':'read','flags':[MENU_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x1fd879){const _0x11b865=a136_0xf4b04c,_0x6d76c4=_0x1fd879['num'](_0x11b865(0x1d9)),_0x249ffc=await getPagePermit(_0x6d76c4);return{'ok':!![],'data':{'page':projectPagePermit(_0x249ffc)},'message':_0x11b865(0x1d7)+_0x6d76c4};}};
1
+ const a136_0x16f5e4=a136_0x22fc;(function(_0xcc86af,_0x3f3def){const _0x113833=a136_0x22fc,_0x306f31=_0xcc86af();while(!![]){try{const _0x267eb8=-parseInt(_0x113833(0x177))/0x1*(parseInt(_0x113833(0x16e))/0x2)+parseInt(_0x113833(0x16b))/0x3+-parseInt(_0x113833(0x171))/0x4+-parseInt(_0x113833(0x173))/0x5+parseInt(_0x113833(0x16c))/0x6*(parseInt(_0x113833(0x178))/0x7)+parseInt(_0x113833(0x175))/0x8+parseInt(_0x113833(0x172))/0x9*(-parseInt(_0x113833(0x174))/0xa);if(_0x267eb8===_0x3f3def)break;else _0x306f31['push'](_0x306f31['shift']());}catch(_0x1de3cf){_0x306f31['push'](_0x306f31['shift']());}}}(a136_0x1b00,0xe1402));function a136_0x1b00(){const _0x2cb43f=['4600760VUDmLK','437120pLEBnR','13445096yGWLhO','num','1eTNdWQ','338324sjxokd','Page\x20permit\x20for\x20menu\x20','page-get','3629874IPjejt','222eTQzRG','permit','2692960KBxhbI','Show\x20the\x20page\x20permission\x20snapshot\x20for\x20a\x20menu','read','4035156RJOjVR','99pDQclc'];a136_0x1b00=function(){return _0x2cb43f;};return a136_0x1b00();}import{getPagePermit}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a136_0x22fc(_0x29c08c,_0x123518){_0x29c08c=_0x29c08c-0x16b;const _0x1b0054=a136_0x1b00();let _0x22fcbb=_0x1b0054[_0x29c08c];return _0x22fcbb;}import{MENU_ID_FLAG,projectPagePermit}from'../../commands/permit/shared.js';export const permitPageGet={'service':a136_0x16f5e4(0x16d),'command':a136_0x16f5e4(0x17a),'description':a136_0x16f5e4(0x16f),'risk':a136_0x16f5e4(0x170),'flags':[MENU_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x422270){const _0x55d121=a136_0x16f5e4,_0x52ced9=_0x422270[_0x55d121(0x176)]('menu-id'),_0x4dbe13=await getPagePermit(_0x52ced9);return{'ok':!![],'data':{'page':projectPagePermit(_0x4dbe13)},'message':_0x55d121(0x179)+_0x52ced9};}};
@@ -1 +1 @@
1
- const a137_0x227e39=a137_0x4878;function a137_0x4878(_0x3fa117,_0x3c8ce7){_0x3fa117=_0x3fa117-0x1f3;const _0x392fc5=a137_0x392f();let _0x487842=_0x392fc5[_0x3fa117];return _0x487842;}(function(_0x1274a4,_0xaced9c){const _0x20d523=a137_0x4878,_0x59fed8=_0x1274a4();while(!![]){try{const _0x115cfa=parseInt(_0x20d523(0x202))/0x1+-parseInt(_0x20d523(0x208))/0x2+parseInt(_0x20d523(0x1f3))/0x3+-parseInt(_0x20d523(0x1f5))/0x4*(parseInt(_0x20d523(0x213))/0x5)+parseInt(_0x20d523(0x207))/0x6*(-parseInt(_0x20d523(0x1fb))/0x7)+parseInt(_0x20d523(0x214))/0x8*(-parseInt(_0x20d523(0x1fc))/0x9)+-parseInt(_0x20d523(0x1fa))/0xa*(-parseInt(_0x20d523(0x1f4))/0xb);if(_0x115cfa===_0xaced9c)break;else _0x59fed8['push'](_0x59fed8['shift']());}catch(_0xbc3e1e){_0x59fed8['push'](_0x59fed8['shift']());}}}(a137_0x392f,0x87698));import{getPagePermit,savePagePermit}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{MENU_ID_FLAG,PAGE_SET_ROLE_FLAGS,PAGE_SLOT_SPECS,projectPageSlot,resolvePermitRoles,splitList}from'../../commands/permit/shared.js';const SAVE_PATH='/smartapi/permit/page/save';function a137_0x392f(){const _0x3a1704=['Updated\x20page\x20permit\x20for\x20menu\x20','validation','POST','rolePermit','5Nsufmq','2452752mbrSIm','menu-id','page-set','1020465seDVFO','56914cvQAnd','1859084gnocZy','This\x20page\x20has\x20no\x20\x22','push','Pass\x20at\x20least\x20one\x20of:\x20','permit','3270kFToHJ','14laUwii','9wgICib','label','Nothing\x20to\x20set.','key','appCode','menuId','423785aLzpXN','join','length','map','allowSelf','701094dCrIsG','1792254HkDBeM','selector','\x22\x20permission\x20slot\x20(','flag','\x20cannot\x20be\x20empty.','Only\x20slots\x20present\x20in\x20`permit\x20page-get`\x20can\x20be\x20set.','spec'];a137_0x392f=function(){return _0x3a1704;};return a137_0x392f();}function collectRequestedSlots(_0xc04c32){const _0x54a9f3=a137_0x4878,_0x37cb1b=[];for(const _0x1c811b of PAGE_SLOT_SPECS){const _0x56da73=_0xc04c32['flag'](_0x1c811b['flag']);if(_0x56da73===undefined||_0x56da73===null)continue;const _0x538c27=splitList(String(_0x56da73));if(_0x538c27[_0x54a9f3(0x204)]===0x0)throw CliErrors[_0x54a9f3(0x210)]('--'+_0x1c811b[_0x54a9f3(0x20b)]+_0x54a9f3(0x20c),'Pass\x20at\x20least\x20one\x20role,\x20or\x20omit\x20the\x20flag.\x20Clearing\x20permissions\x20is\x20not\x20supported\x20by\x20this\x20command.');_0x37cb1b[_0x54a9f3(0x1f7)]({'spec':_0x1c811b,'refs':_0x538c27});}return _0x37cb1b;}async function buildPlan(_0x5428a4,_0x16c916){const _0x51a086=a137_0x4878,_0x1496ac=_0x5428a4['num'](_0x51a086(0x215)),_0x5998d8=collectRequestedSlots(_0x5428a4);if(_0x5998d8[_0x51a086(0x204)]===0x0)throw CliErrors[_0x51a086(0x210)](_0x51a086(0x1fe),_0x51a086(0x1f8)+PAGE_SLOT_SPECS[_0x51a086(0x205)](_0x229e8c=>'--'+_0x229e8c[_0x51a086(0x20b)])[_0x51a086(0x203)](',\x20')+'.');const _0x3bf7ba=await getPagePermit(_0x1496ac),_0x3b9a05={},_0x1970a2={},_0x530e06=[];for(const {spec:_0x572b49,refs:_0x14e177}of _0x5998d8){const _0xf0c09e=_0x3bf7ba[_0x572b49[_0x51a086(0x1ff)]];if(!_0xf0c09e)throw CliErrors[_0x51a086(0x210)](_0x51a086(0x1f6)+_0x572b49[_0x51a086(0x1fd)]+_0x51a086(0x20a)+_0x572b49[_0x51a086(0x1ff)]+').',_0x51a086(0x20d));_0x3b9a05[_0x572b49[_0x51a086(0x1ff)]]=projectPageSlot(_0xf0c09e);const _0xab6aa=await resolvePermitRoles(_0x5428a4['appCode'],_0x14e177,{'allowSelf':_0x572b49[_0x51a086(0x206)],'label':_0x572b49['label']});_0xf0c09e[_0x51a086(0x212)]=_0xab6aa,_0x1970a2[_0x572b49['key']]=projectPageSlot(_0xf0c09e);}const _0x597138={'operation':_0x51a086(0x216),'selector':{'appCode':_0x5428a4[_0x51a086(0x200)],'menuId':_0x1496ac,'slots':_0x5998d8[_0x51a086(0x205)](_0x2b8fd3=>_0x2b8fd3[_0x51a086(0x20e)][_0x51a086(0x1ff)])},'before':_0x3b9a05,'after':_0x1970a2,'dryRun':_0x16c916,'backend':{'method':_0x51a086(0x211),'path':SAVE_PATH},'warnings':_0x530e06};return{'page':_0x3bf7ba,'mutation':_0x597138};}export const permitPageSet={'service':a137_0x227e39(0x1f9),'command':a137_0x227e39(0x216),'description':'Set\x20page\x20permissions\x20for\x20a\x20menu\x20(menu/create/update/delete/detail/export/row\x20roles);\x20requires\x20--yes','risk':'high-risk-write','flags':[MENU_ID_FLAG,...PAGE_SET_ROLE_FLAGS,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1b5132){const _0x42388d=a137_0x227e39,_0x5b21a3=collectRequestedSlots(_0x1b5132);if(_0x5b21a3[_0x42388d(0x204)]===0x0)throw CliErrors[_0x42388d(0x210)](_0x42388d(0x1fe),'Pass\x20at\x20least\x20one\x20of:\x20'+PAGE_SLOT_SPECS['map'](_0x5d08da=>'--'+_0x5d08da[_0x42388d(0x20b)])['join'](',\x20')+'.');},async 'dryRun'(_0x2fc043){const _0x58fa85=a137_0x227e39,{mutation:_0x54f7d9}=await buildPlan(_0x2fc043,!![]);return asDryRunResult(_0x54f7d9,{'method':_0x58fa85(0x211),'url':SAVE_PATH});},async 'execute'(_0xd0275a){const _0x10f74b=a137_0x227e39,{page:_0x242f1a,mutation:_0x3f3abc}=await buildPlan(_0xd0275a,![]);return await savePagePermit(_0x242f1a),{'ok':!![],'data':_0x3f3abc,'message':_0x10f74b(0x20f)+_0x3f3abc[_0x10f74b(0x209)][_0x10f74b(0x201)]};}};
1
+ const a137_0x2a0f83=a137_0x5b61;function a137_0x5b61(_0x2491ec,_0x2f9de3){_0x2491ec=_0x2491ec-0x1c1;const _0x404409=a137_0x4044();let _0x5b61ff=_0x404409[_0x2491ec];return _0x5b61ff;}(function(_0x591b8e,_0x58af3b){const _0x34ebb=a137_0x5b61,_0xb3962a=_0x591b8e();while(!![]){try{const _0x50a560=-parseInt(_0x34ebb(0x1c5))/0x1*(parseInt(_0x34ebb(0x1e1))/0x2)+-parseInt(_0x34ebb(0x1de))/0x3*(-parseInt(_0x34ebb(0x1cf))/0x4)+-parseInt(_0x34ebb(0x1d8))/0x5*(parseInt(_0x34ebb(0x1d6))/0x6)+parseInt(_0x34ebb(0x1c9))/0x7+-parseInt(_0x34ebb(0x1c1))/0x8+parseInt(_0x34ebb(0x1e2))/0x9*(parseInt(_0x34ebb(0x1dc))/0xa)+parseInt(_0x34ebb(0x1c7))/0xb;if(_0x50a560===_0x58af3b)break;else _0xb3962a['push'](_0xb3962a['shift']());}catch(_0x121997){_0xb3962a['push'](_0xb3962a['shift']());}}}(a137_0x4044,0xe1307));import{getPagePermit,savePagePermit}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';function a137_0x4044(){const _0x5daa23=['63glOfcy','map','5198963rrItKD','validation','111111uVwXUm','high-risk-write','Only\x20slots\x20present\x20in\x20`permit\x20page-get`\x20can\x20be\x20set.','Pass\x20at\x20least\x20one\x20role,\x20or\x20omit\x20the\x20flag.\x20Clearing\x20permissions\x20is\x20not\x20supported\x20by\x20this\x20command.','flag','Updated\x20page\x20permit\x20for\x20menu\x20','5859516ZcqqVs','join','key','menu-id','rolePermit','This\x20page\x20has\x20no\x20\x22','Nothing\x20to\x20set.','46884fVckNf','menuId','1005QIFLjR','allowSelf','label','spec','16998290fvpzhr','appCode','3KNfRBz','selector','num','5538jjcbRU','9rDZtho','page-set','7886224LCcPJa','length','/smartapi/permit/page/save','POST'];a137_0x4044=function(){return _0x5daa23;};return a137_0x4044();}import{MENU_ID_FLAG,PAGE_SET_ROLE_FLAGS,PAGE_SLOT_SPECS,projectPageSlot,resolvePermitRoles,splitList}from'../../commands/permit/shared.js';const SAVE_PATH=a137_0x2a0f83(0x1c3);function collectRequestedSlots(_0x4223f7){const _0x10962e=a137_0x2a0f83,_0x17133f=[];for(const _0x410c4e of PAGE_SLOT_SPECS){const _0x3c7f86=_0x4223f7['flag'](_0x410c4e[_0x10962e(0x1cd)]);if(_0x3c7f86===undefined||_0x3c7f86===null)continue;const _0x4cfb67=splitList(String(_0x3c7f86));if(_0x4cfb67['length']===0x0)throw CliErrors[_0x10962e(0x1c8)]('--'+_0x410c4e[_0x10962e(0x1cd)]+'\x20cannot\x20be\x20empty.',_0x10962e(0x1cc));_0x17133f['push']({'spec':_0x410c4e,'refs':_0x4cfb67});}return _0x17133f;}async function buildPlan(_0x2b62c3,_0x2e0f78){const _0x47437e=a137_0x2a0f83,_0x494103=_0x2b62c3[_0x47437e(0x1e0)](_0x47437e(0x1d2)),_0x372107=collectRequestedSlots(_0x2b62c3);if(_0x372107[_0x47437e(0x1c2)]===0x0)throw CliErrors[_0x47437e(0x1c8)]('Nothing\x20to\x20set.','Pass\x20at\x20least\x20one\x20of:\x20'+PAGE_SLOT_SPECS['map'](_0x350fb7=>'--'+_0x350fb7[_0x47437e(0x1cd)])['join'](',\x20')+'.');const _0x4bfc33=await getPagePermit(_0x494103),_0x366dce={},_0x4457d5={},_0x3e2c2a=[];for(const {spec:_0x592daa,refs:_0x52b57c}of _0x372107){const _0x31f6fe=_0x4bfc33[_0x592daa['key']];if(!_0x31f6fe)throw CliErrors[_0x47437e(0x1c8)](_0x47437e(0x1d4)+_0x592daa[_0x47437e(0x1da)]+'\x22\x20permission\x20slot\x20('+_0x592daa['key']+').',_0x47437e(0x1cb));_0x366dce[_0x592daa[_0x47437e(0x1d1)]]=projectPageSlot(_0x31f6fe);const _0x5c45b0=await resolvePermitRoles(_0x2b62c3[_0x47437e(0x1dd)],_0x52b57c,{'allowSelf':_0x592daa[_0x47437e(0x1d9)],'label':_0x592daa[_0x47437e(0x1da)]});_0x31f6fe[_0x47437e(0x1d3)]=_0x5c45b0,_0x4457d5[_0x592daa[_0x47437e(0x1d1)]]=projectPageSlot(_0x31f6fe);}const _0x138869={'operation':_0x47437e(0x1e3),'selector':{'appCode':_0x2b62c3[_0x47437e(0x1dd)],'menuId':_0x494103,'slots':_0x372107[_0x47437e(0x1c6)](_0xabd64c=>_0xabd64c[_0x47437e(0x1db)][_0x47437e(0x1d1)])},'before':_0x366dce,'after':_0x4457d5,'dryRun':_0x2e0f78,'backend':{'method':_0x47437e(0x1c4),'path':SAVE_PATH},'warnings':_0x3e2c2a};return{'page':_0x4bfc33,'mutation':_0x138869};}export const permitPageSet={'service':'permit','command':a137_0x2a0f83(0x1e3),'description':'Set\x20page\x20permissions\x20for\x20a\x20menu\x20(menu/create/update/delete/detail/export/row\x20roles);\x20requires\x20--yes','risk':a137_0x2a0f83(0x1ca),'flags':[MENU_ID_FLAG,...PAGE_SET_ROLE_FLAGS,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x522be4){const _0xa77675=a137_0x2a0f83,_0x1af3cd=collectRequestedSlots(_0x522be4);if(_0x1af3cd[_0xa77675(0x1c2)]===0x0)throw CliErrors['validation'](_0xa77675(0x1d5),'Pass\x20at\x20least\x20one\x20of:\x20'+PAGE_SLOT_SPECS[_0xa77675(0x1c6)](_0x2cc8ba=>'--'+_0x2cc8ba['flag'])[_0xa77675(0x1d0)](',\x20')+'.');},async 'dryRun'(_0x1cb24d){const _0xac89c4=a137_0x2a0f83,{mutation:_0x332cc3}=await buildPlan(_0x1cb24d,!![]);return asDryRunResult(_0x332cc3,{'method':_0xac89c4(0x1c4),'url':SAVE_PATH});},async 'execute'(_0x54bfd1){const _0x179d33=a137_0x2a0f83,{page:_0x19c8c6,mutation:_0x58617c}=await buildPlan(_0x54bfd1,![]);return await savePagePermit(_0x19c8c6),{'ok':!![],'data':_0x58617c,'message':_0x179d33(0x1ce)+_0x58617c[_0x179d33(0x1df)][_0x179d33(0x1d7)]};}};
@@ -1 +1 @@
1
- const a138_0x31801b=a138_0x4058;(function(_0x5c3a12,_0xc3c686){const _0x266aef=a138_0x4058,_0x337334=_0x5c3a12();while(!![]){try{const _0x1fd8e8=-parseInt(_0x266aef(0x14d))/0x1*(-parseInt(_0x266aef(0x14f))/0x2)+parseInt(_0x266aef(0x14b))/0x3*(parseInt(_0x266aef(0x147))/0x4)+-parseInt(_0x266aef(0x141))/0x5+parseInt(_0x266aef(0x143))/0x6*(-parseInt(_0x266aef(0x14a))/0x7)+parseInt(_0x266aef(0x145))/0x8+parseInt(_0x266aef(0x148))/0x9*(-parseInt(_0x266aef(0x158))/0xa)+parseInt(_0x266aef(0x154))/0xb;if(_0x1fd8e8===_0xc3c686)break;else _0x337334['push'](_0x337334['shift']());}catch(_0x4bb984){_0x337334['push'](_0x337334['shift']());}}}(a138_0x1550,0x83465));import{getRoleApiResources,updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a138_0x4058(_0x4b9cca,_0x2e7255){_0x4b9cca=_0x4b9cca-0x13b;const _0x15503f=a138_0x1550();let _0x4058fb=_0x15503f[_0x4b9cca];return _0x4058fb;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{buildPermits,DATASETS_FLAG,flattenApiResources,readRoleRef,REVOKE_FLAG,ROLE_REF_FLAG,splitList}from'../../commands/permit/shared.js';import{assertPermConfigurable,resolveRoleRef}from'../../commands/role/shared.js';function a138_0x1550(){const _0x7caad4=['roleName','api-revoke','Pass\x20--datasets\x20<datasetCode,...>.','set','get','join','length','selector','role-apis-set\x20currently\x20supports\x20revoking\x20dataset\x20API\x20access\x20(use\x20case\x204).','/smartapi/permit/role/update','action','POST','str','datasets','validation','API','5332910Jmeqwg','high-risk-write','138582yLxXxB','revoke','5535400yCtGra','Missing\x20--revoke.','520628wGIXua','18GtPcfj','Verify\x20the\x20datasetCode,\x20or\x20check\x20the\x20role\x27s\x20API\x20resource\x20matrix.','224gbeGVA','21Jkqqrq','Unknown\x20datasetCode(s)\x20for\x20this\x20role\x27s\x20API\x20resources:\x20','2PrCWeN','role-apis-set','734522xWexMp','Revoked\x20API\x20access\x20for\x20','Revoke\x20a\x20role\x27s\x20dataset\x20API\x20access\x20by\x20datasetCode\x20(roleType\x20API);\x20requires\x20--yes','flagMissing','has','10714077fHCkMq','bool','push','permit','4840830dYWuyv','appCode'];a138_0x1550=function(){return _0x7caad4;};return a138_0x1550();}const UPDATE_PATH=a138_0x31801b(0x163);async function buildPlan(_0xc004af,_0x25fe8){const _0x1e8d92=a138_0x31801b,_0x562f81=await resolveRoleRef(_0xc004af['appCode'],readRoleRef(_0xc004af));assertPermConfigurable(_0x562f81);if(!_0xc004af[_0x1e8d92(0x155)](_0x1e8d92(0x144)))throw CliErrors[_0x1e8d92(0x13f)](_0x1e8d92(0x146),_0x1e8d92(0x162));const _0x3fb80f=splitList(_0xc004af[_0x1e8d92(0x13d)](_0x1e8d92(0x13e)));if(_0x3fb80f['length']===0x0)throw CliErrors[_0x1e8d92(0x152)](_0x1e8d92(0x13e),'Pass\x20--datasets\x20<datasetCode,...>.');const _0x287e3a=await getRoleApiResources(_0xc004af['appCode'],_0x562f81['id']),{byCode:_0x1c3536,byDataset:_0x5c337c}=flattenApiResources(_0x287e3a),_0x4613b2=_0x3fb80f['filter'](_0xbb60cd=>!_0x5c337c[_0x1e8d92(0x153)](_0xbb60cd));if(_0x4613b2[_0x1e8d92(0x160)]>0x0)throw CliErrors[_0x1e8d92(0x13f)](_0x1e8d92(0x14c)+_0x4613b2[_0x1e8d92(0x15f)](',\x20')+'.',_0x1e8d92(0x149));const _0xe9ab72=new Map(),_0x5aa72a=[],_0x1bf0a1=[];for(const _0x3a7ecc of _0x3fb80f){for(const _0x25f642 of _0x5c337c[_0x1e8d92(0x15e)](_0x3a7ecc)){const _0x193881=_0x1c3536['get'](_0x25f642);_0xe9ab72[_0x1e8d92(0x15d)](_0x25f642,'0'),_0x5aa72a[_0x1e8d92(0x156)]({'resourceCode':_0x25f642,'datasetCode':_0x3a7ecc,'action':_0x193881[_0x1e8d92(0x13b)]}),_0x1bf0a1[_0x1e8d92(0x156)]({'resourceCode':_0x25f642,'datasetCode':_0x3a7ecc,'action':'0'});}}const _0x346540=buildPermits(_0x1c3536,_0xe9ab72),_0x35f59d={'operation':_0x1e8d92(0x15b),'selector':{'appCode':_0xc004af[_0x1e8d92(0x159)],'roleId':_0x562f81['id'],'roleName':_0x562f81[_0x1e8d92(0x15a)],'datasetCodes':_0x3fb80f},'before':_0x5aa72a,'after':_0x1bf0a1,'dryRun':_0x25fe8,'backend':{'method':_0x1e8d92(0x13c),'path':UPDATE_PATH,'roleType':_0x1e8d92(0x140)},'warnings':[]};return{'role':_0x562f81,'permits':_0x346540,'mutation':_0x35f59d};}export const permitRoleApisSet={'service':a138_0x31801b(0x157),'command':a138_0x31801b(0x14e),'description':a138_0x31801b(0x151),'risk':a138_0x31801b(0x142),'flags':[ROLE_REF_FLAG,REVOKE_FLAG,DATASETS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3292dc){const _0x344d06=a138_0x31801b;if(!_0x3292dc[_0x344d06(0x155)](_0x344d06(0x144)))throw CliErrors[_0x344d06(0x13f)](_0x344d06(0x146),_0x344d06(0x162));if(splitList(_0x3292dc[_0x344d06(0x13d)](_0x344d06(0x13e)))[_0x344d06(0x160)]===0x0)throw CliErrors[_0x344d06(0x152)](_0x344d06(0x13e),_0x344d06(0x15c));},async 'dryRun'(_0x30a450){const _0x13018b=a138_0x31801b,{mutation:_0x5bd0d6}=await buildPlan(_0x30a450,!![]);return asDryRunResult(_0x5bd0d6,{'method':_0x13018b(0x13c),'url':UPDATE_PATH});},async 'execute'(_0x2f7395){const _0x6d89c3=a138_0x31801b,{role:_0x209b04,permits:_0x493a93,mutation:_0x19ec61}=await buildPlan(_0x2f7395,![]);return await updateAppRole({'id':_0x209b04['id'],'appCode':_0x2f7395[_0x6d89c3(0x159)],'roleType':_0x6d89c3(0x140),'permits':_0x493a93}),{'ok':!![],'data':_0x19ec61,'message':_0x6d89c3(0x150)+_0x19ec61[_0x6d89c3(0x161)]['datasetCodes']['length']+'\x20dataset(s)\x20on\x20role\x20'+_0x209b04[_0x6d89c3(0x15a)]};}};
1
+ const a138_0x20502a=a138_0xee8e;(function(_0x47cf4e,_0x451ce0){const _0x3a5e1e=a138_0xee8e,_0x1c39b3=_0x47cf4e();while(!![]){try{const _0x21986b=-parseInt(_0x3a5e1e(0x8d))/0x1*(-parseInt(_0x3a5e1e(0x8e))/0x2)+-parseInt(_0x3a5e1e(0xa6))/0x3+parseInt(_0x3a5e1e(0x9a))/0x4+-parseInt(_0x3a5e1e(0x89))/0x5+-parseInt(_0x3a5e1e(0xa2))/0x6+parseInt(_0x3a5e1e(0x99))/0x7+parseInt(_0x3a5e1e(0x95))/0x8;if(_0x21986b===_0x451ce0)break;else _0x1c39b3['push'](_0x1c39b3['shift']());}catch(_0x19b8a3){_0x1c39b3['push'](_0x1c39b3['shift']());}}}(a138_0x2caf,0x88571));import{getRoleApiResources,updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{buildPermits,DATASETS_FLAG,flattenApiResources,readRoleRef,REVOKE_FLAG,ROLE_REF_FLAG,splitList}from'../../commands/permit/shared.js';import{assertPermConfigurable,resolveRoleRef}from'../../commands/role/shared.js';const UPDATE_PATH='/smartapi/permit/role/update';function a138_0xee8e(_0x3e3fff,_0x468985){_0x3e3fff=_0x3e3fff-0x89;const _0x2cafb4=a138_0x2caf();let _0xee8ed3=_0x2cafb4[_0x3e3fff];return _0xee8ed3;}async function buildPlan(_0x2d56eb,_0x7de9c9){const _0x41da82=a138_0xee8e,_0x7d1402=await resolveRoleRef(_0x2d56eb[_0x41da82(0x9f)],readRoleRef(_0x2d56eb));assertPermConfigurable(_0x7d1402);if(!_0x2d56eb['bool'](_0x41da82(0xaa)))throw CliErrors[_0x41da82(0xa4)](_0x41da82(0x97),_0x41da82(0xac));const _0x80ac82=splitList(_0x2d56eb[_0x41da82(0xa3)]('datasets'));if(_0x80ac82['length']===0x0)throw CliErrors[_0x41da82(0x93)](_0x41da82(0x9c),'Pass\x20--datasets\x20<datasetCode,...>.');const _0x35a9e3=await getRoleApiResources(_0x2d56eb[_0x41da82(0x9f)],_0x7d1402['id']),{byCode:_0x5f4c2e,byDataset:_0x3967cb}=flattenApiResources(_0x35a9e3),_0x5b1ee5=_0x80ac82[_0x41da82(0xa5)](_0x547e93=>!_0x3967cb[_0x41da82(0xab)](_0x547e93));if(_0x5b1ee5[_0x41da82(0x9d)]>0x0)throw CliErrors[_0x41da82(0xa4)](_0x41da82(0xa8)+_0x5b1ee5[_0x41da82(0x94)](',\x20')+'.',_0x41da82(0xa1));const _0x87e90e=new Map(),_0x3d36d4=[],_0x2caee1=[];for(const _0x3ca290 of _0x80ac82){for(const _0xae8147 of _0x3967cb[_0x41da82(0xa7)](_0x3ca290)){const _0x2506d4=_0x5f4c2e[_0x41da82(0xa7)](_0xae8147);_0x87e90e['set'](_0xae8147,'0'),_0x3d36d4[_0x41da82(0xa0)]({'resourceCode':_0xae8147,'datasetCode':_0x3ca290,'action':_0x2506d4[_0x41da82(0xad)]}),_0x2caee1[_0x41da82(0xa0)]({'resourceCode':_0xae8147,'datasetCode':_0x3ca290,'action':'0'});}}const _0x250a8c=buildPermits(_0x5f4c2e,_0x87e90e),_0xb04d6b={'operation':_0x41da82(0x98),'selector':{'appCode':_0x2d56eb[_0x41da82(0x9f)],'roleId':_0x7d1402['id'],'roleName':_0x7d1402[_0x41da82(0x8c)],'datasetCodes':_0x80ac82},'before':_0x3d36d4,'after':_0x2caee1,'dryRun':_0x7de9c9,'backend':{'method':_0x41da82(0x8b),'path':UPDATE_PATH,'roleType':_0x41da82(0x8a)},'warnings':[]};return{'role':_0x7d1402,'permits':_0x250a8c,'mutation':_0xb04d6b};}function a138_0x2caf(){const _0x549390=['join','13211224nIRZDy','high-risk-write','Missing\x20--revoke.','api-revoke','1794240VqZXGP','617984IDglIJ','\x20dataset(s)\x20on\x20role\x20','datasets','length','role-apis-set','appCode','push','Verify\x20the\x20datasetCode,\x20or\x20check\x20the\x20role\x27s\x20API\x20resource\x20matrix.','5804544RcEsjL','str','validation','filter','1144890QsCJyA','get','Unknown\x20datasetCode(s)\x20for\x20this\x20role\x27s\x20API\x20resources:\x20','Revoke\x20a\x20role\x27s\x20dataset\x20API\x20access\x20by\x20datasetCode\x20(roleType\x20API);\x20requires\x20--yes','revoke','has','role-apis-set\x20currently\x20supports\x20revoking\x20dataset\x20API\x20access\x20(use\x20case\x204).','action','permit','3290725ZKNMOr','API','POST','roleName','1exPnRO','1006858cQpWkp','Revoked\x20API\x20access\x20for\x20','datasetCodes','selector','bool','flagMissing'];a138_0x2caf=function(){return _0x549390;};return a138_0x2caf();}export const permitRoleApisSet={'service':a138_0x20502a(0xae),'command':a138_0x20502a(0x9e),'description':a138_0x20502a(0xa9),'risk':a138_0x20502a(0x96),'flags':[ROLE_REF_FLAG,REVOKE_FLAG,DATASETS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3dcc85){const _0x2f2bad=a138_0x20502a;if(!_0x3dcc85[_0x2f2bad(0x92)](_0x2f2bad(0xaa)))throw CliErrors[_0x2f2bad(0xa4)](_0x2f2bad(0x97),_0x2f2bad(0xac));if(splitList(_0x3dcc85[_0x2f2bad(0xa3)](_0x2f2bad(0x9c)))[_0x2f2bad(0x9d)]===0x0)throw CliErrors[_0x2f2bad(0x93)]('datasets','Pass\x20--datasets\x20<datasetCode,...>.');},async 'dryRun'(_0x4b462a){const _0x5eb550=a138_0x20502a,{mutation:_0x4eb5a7}=await buildPlan(_0x4b462a,!![]);return asDryRunResult(_0x4eb5a7,{'method':_0x5eb550(0x8b),'url':UPDATE_PATH});},async 'execute'(_0x1ad7d3){const _0x48f3ee=a138_0x20502a,{role:_0x4b1206,permits:_0x815adf,mutation:_0x1a7b12}=await buildPlan(_0x1ad7d3,![]);return await updateAppRole({'id':_0x4b1206['id'],'appCode':_0x1ad7d3['appCode'],'roleType':'API','permits':_0x815adf}),{'ok':!![],'data':_0x1a7b12,'message':_0x48f3ee(0x8f)+_0x1a7b12[_0x48f3ee(0x91)][_0x48f3ee(0x90)][_0x48f3ee(0x9d)]+_0x48f3ee(0x9b)+_0x4b1206['roleName']};}};
@@ -1 +1 @@
1
- (function(_0x541cf3,_0x2bba5a){const _0x1e1e4e=a139_0x55c1,_0x2a0553=_0x541cf3();while(!![]){try{const _0x4c80b5=-parseInt(_0x1e1e4e(0x1d2))/0x1*(parseInt(_0x1e1e4e(0x1d0))/0x2)+parseInt(_0x1e1e4e(0x1d6))/0x3*(-parseInt(_0x1e1e4e(0x1e3))/0x4)+-parseInt(_0x1e1e4e(0x1d9))/0x5+parseInt(_0x1e1e4e(0x1e1))/0x6+-parseInt(_0x1e1e4e(0x1cd))/0x7*(parseInt(_0x1e1e4e(0x1cf))/0x8)+-parseInt(_0x1e1e4e(0x1ce))/0x9*(parseInt(_0x1e1e4e(0x1e8))/0xa)+parseInt(_0x1e1e4e(0x1dd))/0xb;if(_0x4c80b5===_0x2bba5a)break;else _0x2a0553['push'](_0x2a0553['shift']());}catch(_0x5fe6){_0x2a0553['push'](_0x2a0553['shift']());}}}(a139_0x5f57,0x1fea8));import{getRoleMenuResources,updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a139_0x55c1(_0x5b9b2d,_0x56573e){_0x5b9b2d=_0x5b9b2d-0x1cb;const _0x5f57ed=a139_0x5f57();let _0x55c1fb=_0x5f57ed[_0x5b9b2d];return _0x55c1fb;}function a139_0x5f57(){const _0x1371c8=['56KpHaFq','22NIIKGu','menu-revoke','22147kJWuYh','Updated\x20','access','menus','15dthesb','filter','push','33185zJSrWy','flagMissing','get','menu-grant','7228672ItOcRN','POST','PAGE','\x20menu\x20permit(s)\x20for\x20role\x20','1373058ZaBHKO','Run\x20`permit\x20role-menus\x20--role\x20<id>`\x20to\x20see\x20valid\x20resourceCodes.','128308vAuBAE','Pass\x20--menus\x20<resourceCode,...>.','str','has','validation','1254790qMLpgD','length','roleName','appCode','join','219149VyElVL','9UdeEhv'];a139_0x5f57=function(){return _0x1371c8;};return a139_0x5f57();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{buildPermits,flattenMenuResources,GRANT_FLAG,MENUS_FLAG,readGrantRevoke,readRoleRef,REVOKE_FLAG,ROLE_REF_FLAG,splitList}from'../../commands/permit/shared.js';import{assertPermConfigurable,resolveRoleRef}from'../../commands/role/shared.js';const UPDATE_PATH='/smartapi/permit/role/update';async function buildPlan(_0x1a7ed2,_0x3a928f){const _0x185721=a139_0x55c1,_0x27d87f=await resolveRoleRef(_0x1a7ed2[_0x185721(0x1cb)],readRoleRef(_0x1a7ed2));assertPermConfigurable(_0x27d87f);const _0x41203e=readGrantRevoke(_0x1a7ed2),_0x4944bf=splitList(_0x1a7ed2[_0x185721(0x1e5)](_0x185721(0x1d5)));if(_0x4944bf[_0x185721(0x1e9)]===0x0)throw CliErrors[_0x185721(0x1da)](_0x185721(0x1d5),_0x185721(0x1e4));const _0x5e9508=await getRoleMenuResources(_0x1a7ed2[_0x185721(0x1cb)],_0x27d87f['id']),_0x47dde1=flattenMenuResources(_0x5e9508),_0x5cda04=_0x4944bf[_0x185721(0x1d7)](_0x24544b=>!_0x47dde1[_0x185721(0x1e6)](_0x24544b));if(_0x5cda04[_0x185721(0x1e9)]>0x0)throw CliErrors[_0x185721(0x1e7)]('Unknown\x20menu\x20resourceCode(s):\x20'+_0x5cda04[_0x185721(0x1cc)](',\x20')+'.',_0x185721(0x1e2));const _0xd75d81=new Map(),_0x146333=[],_0x52d5ca=[];for(const _0x35cef0 of _0x4944bf){const _0xe6b3db=_0x47dde1[_0x185721(0x1db)](_0x35cef0);_0xd75d81['set'](_0x35cef0,_0x41203e),_0x146333[_0x185721(0x1d8)]({'resourceCode':_0x35cef0,'action':_0xe6b3db['action']}),_0x52d5ca[_0x185721(0x1d8)]({'resourceCode':_0x35cef0,'action':_0x41203e});}const _0x5a52b2=buildPermits(_0x47dde1,_0xd75d81),_0x4384f2={'operation':_0x41203e===_0x185721(0x1d4)?_0x185721(0x1dc):_0x185721(0x1d1),'selector':{'appCode':_0x1a7ed2[_0x185721(0x1cb)],'roleId':_0x27d87f['id'],'roleName':_0x27d87f[_0x185721(0x1ea)],'resourceCodes':_0x4944bf},'before':_0x146333,'after':_0x52d5ca,'dryRun':_0x3a928f,'backend':{'method':_0x185721(0x1de),'path':UPDATE_PATH,'roleType':_0x185721(0x1df)},'warnings':[]};return{'role':_0x27d87f,'permits':_0x5a52b2,'mutation':_0x4384f2};}export const permitRoleMenusSet={'service':'permit','command':'role-menus-set','description':'Grant\x20or\x20revoke\x20a\x20role\x27s\x20menu\x20access\x20by\x20resourceCode\x20(roleType\x20PAGE);\x20requires\x20--yes','risk':'high-risk-write','flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,MENUS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1332d7){const _0x3d8a9d=a139_0x55c1;readGrantRevoke(_0x1332d7);if(splitList(_0x1332d7[_0x3d8a9d(0x1e5)]('menus'))['length']===0x0)throw CliErrors['flagMissing'](_0x3d8a9d(0x1d5),_0x3d8a9d(0x1e4));},async 'dryRun'(_0x3e53d6){const {mutation:_0x19371b}=await buildPlan(_0x3e53d6,!![]);return asDryRunResult(_0x19371b,{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0x5cdffe){const _0xf1ca48=a139_0x55c1,{role:_0x1968f7,permits:_0x31e9f3,mutation:_0x20540d}=await buildPlan(_0x5cdffe,![]);return await updateAppRole({'id':_0x1968f7['id'],'appCode':_0x5cdffe[_0xf1ca48(0x1cb)],'roleType':_0xf1ca48(0x1df),'permits':_0x31e9f3}),{'ok':!![],'data':_0x20540d,'message':_0xf1ca48(0x1d3)+_0x20540d['selector']['resourceCodes']['length']+_0xf1ca48(0x1e0)+_0x1968f7[_0xf1ca48(0x1ea)]};}};
1
+ const a139_0x2b54d6=a139_0x80fc;(function(_0x538056,_0x3c332c){const _0x3bc58e=a139_0x80fc,_0x52fb34=_0x538056();while(!![]){try{const _0x43dd11=-parseInt(_0x3bc58e(0x1e6))/0x1+-parseInt(_0x3bc58e(0x1c9))/0x2*(parseInt(_0x3bc58e(0x1d2))/0x3)+-parseInt(_0x3bc58e(0x1e8))/0x4*(-parseInt(_0x3bc58e(0x1e4))/0x5)+parseInt(_0x3bc58e(0x1df))/0x6*(-parseInt(_0x3bc58e(0x1e7))/0x7)+parseInt(_0x3bc58e(0x1d6))/0x8+parseInt(_0x3bc58e(0x1e2))/0x9*(-parseInt(_0x3bc58e(0x1d9))/0xa)+parseInt(_0x3bc58e(0x1db))/0xb;if(_0x43dd11===_0x3c332c)break;else _0x52fb34['push'](_0x52fb34['shift']());}catch(_0xab8781){_0x52fb34['push'](_0x52fb34['shift']());}}}(a139_0x2610,0x314ce));import{getRoleMenuResources,updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{buildPermits,flattenMenuResources,GRANT_FLAG,MENUS_FLAG,readGrantRevoke,readRoleRef,REVOKE_FLAG,ROLE_REF_FLAG,splitList}from'../../commands/permit/shared.js';import{assertPermConfigurable,resolveRoleRef}from'../../commands/role/shared.js';const UPDATE_PATH='/smartapi/permit/role/update';async function buildPlan(_0x4799de,_0x39a2){const _0x112fe1=a139_0x80fc,_0x3c85f4=await resolveRoleRef(_0x4799de[_0x112fe1(0x1ea)],readRoleRef(_0x4799de));assertPermConfigurable(_0x3c85f4);const _0x4e71fc=readGrantRevoke(_0x4799de),_0x34b87f=splitList(_0x4799de[_0x112fe1(0x1d7)](_0x112fe1(0x1c8)));if(_0x34b87f['length']===0x0)throw CliErrors['flagMissing'](_0x112fe1(0x1c8),'Pass\x20--menus\x20<resourceCode,...>.');const _0x3eeb7e=await getRoleMenuResources(_0x4799de[_0x112fe1(0x1ea)],_0x3c85f4['id']),_0x13e625=flattenMenuResources(_0x3eeb7e),_0xfd678d=_0x34b87f['filter'](_0x459ec9=>!_0x13e625[_0x112fe1(0x1e0)](_0x459ec9));if(_0xfd678d[_0x112fe1(0x1cf)]>0x0)throw CliErrors[_0x112fe1(0x1d0)]('Unknown\x20menu\x20resourceCode(s):\x20'+_0xfd678d['join'](',\x20')+'.','Run\x20`permit\x20role-menus\x20--role\x20<id>`\x20to\x20see\x20valid\x20resourceCodes.');const _0x427400=new Map(),_0x50074e=[],_0x185a5e=[];for(const _0x50f0f4 of _0x34b87f){const _0x1cf061=_0x13e625[_0x112fe1(0x1d8)](_0x50f0f4);_0x427400[_0x112fe1(0x1e9)](_0x50f0f4,_0x4e71fc),_0x50074e[_0x112fe1(0x1cc)]({'resourceCode':_0x50f0f4,'action':_0x1cf061[_0x112fe1(0x1e5)]}),_0x185a5e[_0x112fe1(0x1cc)]({'resourceCode':_0x50f0f4,'action':_0x4e71fc});}const _0x3a8d89=buildPermits(_0x13e625,_0x427400),_0x400349={'operation':_0x4e71fc===_0x112fe1(0x1dc)?_0x112fe1(0x1cb):_0x112fe1(0x1dd),'selector':{'appCode':_0x4799de[_0x112fe1(0x1ea)],'roleId':_0x3c85f4['id'],'roleName':_0x3c85f4['roleName'],'resourceCodes':_0x34b87f},'before':_0x50074e,'after':_0x185a5e,'dryRun':_0x39a2,'backend':{'method':'POST','path':UPDATE_PATH,'roleType':_0x112fe1(0x1d3)},'warnings':[]};return{'role':_0x3c85f4,'permits':_0x3a8d89,'mutation':_0x400349};}export const permitRoleMenusSet={'service':a139_0x2b54d6(0x1cd),'command':a139_0x2b54d6(0x1d1),'description':'Grant\x20or\x20revoke\x20a\x20role\x27s\x20menu\x20access\x20by\x20resourceCode\x20(roleType\x20PAGE);\x20requires\x20--yes','risk':a139_0x2b54d6(0x1e1),'flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,MENUS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3f37ab){const _0x59fc7f=a139_0x2b54d6;readGrantRevoke(_0x3f37ab);if(splitList(_0x3f37ab['str']('menus'))[_0x59fc7f(0x1cf)]===0x0)throw CliErrors[_0x59fc7f(0x1ca)](_0x59fc7f(0x1c8),_0x59fc7f(0x1de));},async 'dryRun'(_0x23cf6f){const _0x26bb71=a139_0x2b54d6,{mutation:_0x15d933}=await buildPlan(_0x23cf6f,!![]);return asDryRunResult(_0x15d933,{'method':_0x26bb71(0x1e3),'url':UPDATE_PATH});},async 'execute'(_0x538119){const _0x5edaa2=a139_0x2b54d6,{role:_0x12611f,permits:_0x4fe43b,mutation:_0x2b9a83}=await buildPlan(_0x538119,![]);return await updateAppRole({'id':_0x12611f['id'],'appCode':_0x538119[_0x5edaa2(0x1ea)],'roleType':'PAGE','permits':_0x4fe43b}),{'ok':!![],'data':_0x2b9a83,'message':_0x5edaa2(0x1da)+_0x2b9a83[_0x5edaa2(0x1d5)]['resourceCodes'][_0x5edaa2(0x1cf)]+_0x5edaa2(0x1d4)+_0x12611f[_0x5edaa2(0x1ce)]};}};function a139_0x80fc(_0x44f3ec,_0x277d1b){_0x44f3ec=_0x44f3ec-0x1c8;const _0x2610eb=a139_0x2610();let _0x80fcda=_0x2610eb[_0x44f3ec];return _0x80fcda;}function a139_0x2610(){const _0x58bae3=['menus','1906tuPyBL','flagMissing','menu-grant','push','permit','roleName','length','validation','role-menus-set','1263nrKWZI','PAGE','\x20menu\x20permit(s)\x20for\x20role\x20','selector','1598472oUVxId','str','get','20UlNplG','Updated\x20','7304319ibDHlo','access','menu-revoke','Pass\x20--menus\x20<resourceCode,...>.','384mFxiVo','has','high-risk-write','1424187YYKWxa','POST','11140FxveFD','action','21133JbgNrJ','11081xRKQiC','320oXvwpl','set','appCode'];a139_0x2610=function(){return _0x58bae3;};return a139_0x2610();}
@@ -1 +1 @@
1
- const a140_0x268c90=a140_0x48e1;(function(_0xb3e7b,_0x512fc0){const _0x36f2ee=a140_0x48e1,_0x16dbb0=_0xb3e7b();while(!![]){try{const _0x28e68e=-parseInt(_0x36f2ee(0x167))/0x1+parseInt(_0x36f2ee(0x16d))/0x2+-parseInt(_0x36f2ee(0x16b))/0x3+parseInt(_0x36f2ee(0x171))/0x4*(-parseInt(_0x36f2ee(0x172))/0x5)+parseInt(_0x36f2ee(0x162))/0x6+parseInt(_0x36f2ee(0x16f))/0x7+parseInt(_0x36f2ee(0x16e))/0x8;if(_0x28e68e===_0x512fc0)break;else _0x16dbb0['push'](_0x16dbb0['shift']());}catch(_0x324bca){_0x16dbb0['push'](_0x16dbb0['shift']());}}}(a140_0x3ec0,0x7c4ca));function a140_0x48e1(_0x390f3a,_0xa7ee51){_0x390f3a=_0x390f3a-0x15d;const _0x3ec00b=a140_0x3ec0();let _0x48e16b=_0x3ec00b[_0x390f3a];return _0x48e16b;}import{getRoleMenuResources}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{flattenMenuResources,readRoleRef,ROLE_REF_FLAG}from'../../commands/permit/shared.js';import{resolveRoleRef}from'../../commands/role/shared.js';export const permitRoleMenus={'service':'permit','command':'role-menus','description':a140_0x268c90(0x165),'risk':a140_0x268c90(0x15d),'flags':[ROLE_REF_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x419a9b){const _0x555fa3=a140_0x268c90,_0x5467eb=await resolveRoleRef(_0x419a9b[_0x555fa3(0x164)],readRoleRef(_0x419a9b)),_0x5285d1=await getRoleMenuResources(_0x419a9b['appCode'],_0x5467eb['id']),_0x43649b=flattenMenuResources(_0x5285d1),_0x41d8ad=Array[_0x555fa3(0x16a)](_0x43649b['values']())[_0x555fa3(0x166)](_0x4ba306=>({'resourceCode':_0x4ba306[_0x555fa3(0x169)],'resourceName':_0x4ba306['resourceName'],'allowed':_0x4ba306[_0x555fa3(0x161)]===_0x555fa3(0x160),'action':_0x4ba306[_0x555fa3(0x161)]}));return{'ok':!![],'data':{'selector':{'appCode':_0x419a9b[_0x555fa3(0x164)],'roleId':_0x5467eb['id'],'roleName':_0x5467eb[_0x555fa3(0x15f)]},'menus':_0x41d8ad},'message':'Role\x20'+_0x5467eb[_0x555fa3(0x15f)]+_0x555fa3(0x163)+_0x41d8ad[_0x555fa3(0x16c)](_0x55fc6f=>_0x55fc6f[_0x555fa3(0x15e)])[_0x555fa3(0x170)]+'/'+_0x41d8ad['length']+_0x555fa3(0x168)};}};function a140_0x3ec0(){const _0xe09a24=['map','873422yJRIHw','\x20menu(s)\x20allowed','resourceCode','from','1881084unXdUw','filter','1223488uqBSkY','6305752XFgytw','5401361NGbOTU','length','3255752dGQcpx','5GkLeTS','read','allowed','roleName','access','action','3911592aUwnKJ','\x20has\x20','appCode','Show\x20a\x20role\x27s\x20current\x20menu\x20permission\x20matrix'];a140_0x3ec0=function(){return _0xe09a24;};return a140_0x3ec0();}
1
+ const a140_0x40f319=a140_0x380b;(function(_0x6a94f6,_0x45f04e){const _0x26ca7b=a140_0x380b,_0x41c026=_0x6a94f6();while(!![]){try{const _0x10566a=-parseInt(_0x26ca7b(0xab))/0x1*(-parseInt(_0x26ca7b(0xa6))/0x2)+parseInt(_0x26ca7b(0xb3))/0x3+parseInt(_0x26ca7b(0xa8))/0x4+-parseInt(_0x26ca7b(0xa1))/0x5+parseInt(_0x26ca7b(0xa2))/0x6*(parseInt(_0x26ca7b(0x9f))/0x7)+-parseInt(_0x26ca7b(0xa0))/0x8*(-parseInt(_0x26ca7b(0xa5))/0x9)+-parseInt(_0x26ca7b(0xaf))/0xa;if(_0x10566a===_0x45f04e)break;else _0x41c026['push'](_0x41c026['shift']());}catch(_0x5969d2){_0x41c026['push'](_0x41c026['shift']());}}}(a140_0x4d50,0x269e6));function a140_0x380b(_0x43d91b,_0x5c0eff){_0x43d91b=_0x43d91b-0x9c;const _0x4d507f=a140_0x4d50();let _0x380b30=_0x4d507f[_0x43d91b];return _0x380b30;}import{getRoleMenuResources}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{flattenMenuResources,readRoleRef,ROLE_REF_FLAG}from'../../commands/permit/shared.js';import{resolveRoleRef}from'../../commands/role/shared.js';function a140_0x4d50(){const _0x237589=['2921190OExdsH','\x20has\x20','resourceCode','action','562743UScoCH','values','roleName','role-menus','12481PRWUre','2015000GlOjeB','878375BFbFds','66Kcaxpb','appCode','Role\x20','9qAraoM','19534mBuTXe','map','472288IKZLQC','read','Show\x20a\x20role\x27s\x20current\x20menu\x20permission\x20matrix','5FCbMpg','\x20menu(s)\x20allowed','length','access'];a140_0x4d50=function(){return _0x237589;};return a140_0x4d50();}export const permitRoleMenus={'service':'permit','command':a140_0x40f319(0x9e),'description':a140_0x40f319(0xaa),'risk':a140_0x40f319(0xa9),'flags':[ROLE_REF_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x3ba90a){const _0x3c8952=a140_0x40f319,_0x1ce4b0=await resolveRoleRef(_0x3ba90a[_0x3c8952(0xa3)],readRoleRef(_0x3ba90a)),_0x47de6e=await getRoleMenuResources(_0x3ba90a['appCode'],_0x1ce4b0['id']),_0x537c24=flattenMenuResources(_0x47de6e),_0x2c13ab=Array['from'](_0x537c24[_0x3c8952(0x9c)]())[_0x3c8952(0xa7)](_0x315085=>({'resourceCode':_0x315085[_0x3c8952(0xb1)],'resourceName':_0x315085['resourceName'],'allowed':_0x315085[_0x3c8952(0xb2)]===_0x3c8952(0xae),'action':_0x315085[_0x3c8952(0xb2)]}));return{'ok':!![],'data':{'selector':{'appCode':_0x3ba90a[_0x3c8952(0xa3)],'roleId':_0x1ce4b0['id'],'roleName':_0x1ce4b0[_0x3c8952(0x9d)]},'menus':_0x2c13ab},'message':_0x3c8952(0xa4)+_0x1ce4b0[_0x3c8952(0x9d)]+_0x3c8952(0xb0)+_0x2c13ab['filter'](_0x5ac687=>_0x5ac687['allowed'])[_0x3c8952(0xad)]+'/'+_0x2c13ab[_0x3c8952(0xad)]+_0x3c8952(0xac)};}};
@@ -1 +1 @@
1
- const a141_0x3068f7=a141_0x3071;(function(_0x43cda1,_0x2a34c2){const _0x28084d=a141_0x3071,_0x18b8b7=_0x43cda1();while(!![]){try{const _0x59de51=-parseInt(_0x28084d(0xfa))/0x1+parseInt(_0x28084d(0x10a))/0x2*(-parseInt(_0x28084d(0xf7))/0x3)+parseInt(_0x28084d(0xf5))/0x4*(-parseInt(_0x28084d(0x128))/0x5)+parseInt(_0x28084d(0x109))/0x6*(-parseInt(_0x28084d(0xfe))/0x7)+parseInt(_0x28084d(0x120))/0x8*(-parseInt(_0x28084d(0xf9))/0x9)+parseInt(_0x28084d(0x126))/0xa+parseInt(_0x28084d(0x113))/0xb;if(_0x59de51===_0x2a34c2)break;else _0x18b8b7['push'](_0x18b8b7['shift']());}catch(_0x3d4eb9){_0x18b8b7['push'](_0x18b8b7['shift']());}}}(a141_0x2a29,0x34a87));import{listPermitRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const MENU_ID_FLAG={'name':a141_0x3068f7(0x11d),'type':'number','required':!![],'description':'Menu\x20id\x20(from\x20`menu\x20list`)'};export const ROLE_REF_FLAG={'name':a141_0x3068f7(0xf3),'type':a141_0x3068f7(0x11f),'required':!![],'description':a141_0x3068f7(0x122)};export const GRANT_FLAG={'name':a141_0x3068f7(0xd7),'type':a141_0x3068f7(0xe6),'required':![],'description':a141_0x3068f7(0x119)};export const REVOKE_FLAG={'name':a141_0x3068f7(0x11b),'type':a141_0x3068f7(0xe6),'required':![],'description':a141_0x3068f7(0x110)};function a141_0x2a29(){const _0x5817c6=['boolean','menu\x20visibility','appCode','apiList','Comma-separated\x20menu\x20resourceCodes\x20to\x20grant/revoke','data\x20create','str','set','push','\x22\x20not\x20found.','menuPermit','Special\x20role\x20','filter','role','dataUpdate','452620PNQVaS','bool','144225rcdhSs','Role\x20id\x20','36711ZarcqA','52974zNjIZS','\x22\x20is\x20ambiguous\x20(ids:\x20','Missing\x20action.','flag','14xiullD','Role\x20\x22','resourceName','trim','roleName','ALL','pageNodeList','update-roles','Disambiguate\x20with\x20an\x20id.','test','menu-roles','851454aarILd','10XdVbYL','rolePermit','find','export-roles','resourceCode','datasetCode','Revoke\x20access\x20to\x20the\x20listed\x20resources','dataPermit','key','8101016hssCCq','Run\x20`role\x20list`,\x20or\x20use\x20SELF/ALL/<id>.',';\x20SELF\x20=\x20only\x20own\x20rows','validation','data\x20detail','entries','Grant\x20access\x20to\x20the\x20listed\x20resources','row\x20visibility','revoke','detail-roles','menu-id','data\x20export','string','344RoyrDI','menus','Role\x20id\x20or\x20role\x20name','create-roles','\x20not\x20found.','action','3449500OFyEhY','some','5rsJRVr','label','split','row-roles','grant','map','dataExport','Pass\x20--role\x20<id|name>.','menuId','dataDelete','get','Roles\x20for\x20','allowSelf','datasets','roleType','access','flagMissing','SELF','SELF\x20(row-level)\x20applies\x20only\x20to\x20--row-roles.'];a141_0x2a29=function(){return _0x5817c6;};return a141_0x2a29();}export const MENUS_FLAG={'name':a141_0x3068f7(0x121),'type':a141_0x3068f7(0x11f),'required':!![],'description':a141_0x3068f7(0xea)};export const DATASETS_FLAG={'name':a141_0x3068f7(0xe0),'type':'string','required':!![],'description':'Comma-separated\x20datasetCodes\x20to\x20revoke\x20API\x20access\x20for'};function a141_0x3071(_0xa6a6ab,_0x4e1198){_0xa6a6ab=_0xa6a6ab-0xd5;const _0x2a292c=a141_0x2a29();let _0x307187=_0x2a292c[_0xa6a6ab];return _0x307187;}export const PAGE_SLOT_SPECS=[{'flag':a141_0x3068f7(0x108),'key':a141_0x3068f7(0xf0),'allowSelf':![],'label':a141_0x3068f7(0xe7)},{'flag':a141_0x3068f7(0x123),'key':'dataCreate','allowSelf':![],'label':a141_0x3068f7(0xeb)},{'flag':a141_0x3068f7(0x105),'key':a141_0x3068f7(0xf4),'allowSelf':![],'label':'data\x20update'},{'flag':'delete-roles','key':a141_0x3068f7(0xdc),'allowSelf':![],'label':'data\x20delete'},{'flag':a141_0x3068f7(0x11c),'key':'dataDetail','allowSelf':![],'label':a141_0x3068f7(0x117)},{'flag':a141_0x3068f7(0x10d),'key':a141_0x3068f7(0xd9),'allowSelf':![],'label':a141_0x3068f7(0x11e)},{'flag':a141_0x3068f7(0xd6),'key':a141_0x3068f7(0x111),'allowSelf':!![],'label':a141_0x3068f7(0x11a)}];export const PAGE_SET_ROLE_FLAGS=PAGE_SLOT_SPECS[a141_0x3068f7(0xd8)](_0x27509d=>({'name':_0x27509d[a141_0x3068f7(0xfd)],'type':'string','required':![],'description':a141_0x3068f7(0xde)+_0x27509d['label']+'\x20(comma-separated\x20SELF/ALL/id/name)'+(_0x27509d[a141_0x3068f7(0xdf)]?a141_0x3068f7(0x115):'')}));export function splitList(_0x24224a){const _0x4d2e21=a141_0x3068f7;return _0x24224a[_0x4d2e21(0xd5)](',')['map'](_0x55eba2=>_0x55eba2['trim']())[_0x4d2e21(0xf2)](Boolean);}export function projectRoleRef(_0x21fb84){const _0x1d1e6b=a141_0x3068f7;return{'id':_0x21fb84['id'],'roleName':_0x21fb84[_0x1d1e6b(0x102)],'roleType':_0x21fb84['roleType']};}export async function resolvePermitRoles(_0x1f8d31,_0x3a8eb3,_0x46c0b4){const _0x13efaf=a141_0x3068f7,_0x4e81c8=await listPermitRoles(_0x1f8d31,{'needSelf':!![],'needPublic':!![]}),_0x244d47=[];for(const _0x50ed96 of _0x3a8eb3){const _0x1f43d7=resolveOnePermitRole(_0x4e81c8,_0x50ed96);if(!_0x46c0b4[_0x13efaf(0xdf)]&&_0x1f43d7['roleType']===_0x13efaf(0xe4))throw CliErrors[_0x13efaf(0x116)]('SELF\x20is\x20not\x20allowed\x20for\x20'+_0x46c0b4[_0x13efaf(0x129)]+'.',_0x13efaf(0xe5));if(!_0x244d47[_0x13efaf(0x127)](_0xf953f4=>_0xf953f4['id']===_0x1f43d7['id']))_0x244d47[_0x13efaf(0xee)](_0x1f43d7);}return _0x244d47;}function resolveOnePermitRole(_0x29ec96,_0x4d22e8){const _0x579523=a141_0x3068f7,_0x2a16cb=_0x4d22e8[_0x579523(0x101)](),_0x2f4d3f=_0x2a16cb['toUpperCase']();if(_0x2f4d3f===_0x579523(0xe4)||_0x2f4d3f===_0x579523(0x103)){const _0x419853=_0x29ec96['find'](_0xc79c5=>_0xc79c5[_0x579523(0xe1)]===_0x2f4d3f);if(!_0x419853)throw CliErrors[_0x579523(0x116)](_0x579523(0xf1)+_0x2f4d3f+'\x20is\x20not\x20available\x20for\x20this\x20app.');return _0x419853;}if(/^-?\d+$/[_0x579523(0x107)](_0x2a16cb)){const _0xbfd7b7=Number(_0x2a16cb),_0x1145cc=_0x29ec96[_0x579523(0x10c)](_0x2298e4=>_0x2298e4['id']===_0xbfd7b7);if(!_0x1145cc)throw CliErrors['validation'](_0x579523(0xf8)+_0xbfd7b7+_0x579523(0x124),'Run\x20`role\x20list`.');return _0x1145cc;}const _0x17df1e=_0x29ec96[_0x579523(0xf2)](_0x21bfca=>_0x21bfca[_0x579523(0x102)]===_0x2a16cb);if(_0x17df1e['length']===0x0)throw CliErrors[_0x579523(0x116)](_0x579523(0xff)+_0x2a16cb+_0x579523(0xef),_0x579523(0x114));if(_0x17df1e['length']>0x1)throw CliErrors[_0x579523(0x116)](_0x579523(0xff)+_0x2a16cb+_0x579523(0xfb)+_0x17df1e['map'](_0x11887b=>_0x11887b['id'])['join'](',\x20')+').',_0x579523(0x106));return _0x17df1e[0x0];}export function projectPageSlot(_0x281196){const _0xacf2b2=a141_0x3068f7;if(!_0x281196)return null;return{'resourceCode':_0x281196[_0xacf2b2(0x10e)],'roles':(_0x281196[_0xacf2b2(0x10b)]??[])[_0xacf2b2(0xd8)](projectRoleRef)};}export function projectPagePermit(_0xdb1ef5){const _0x1f5627=a141_0x3068f7,_0x5aa2cc={'menuId':_0xdb1ef5[_0x1f5627(0xdb)],'appCode':_0xdb1ef5[_0x1f5627(0xe8)],'menuPermit':projectPageSlot(_0xdb1ef5[_0x1f5627(0xf0)])};for(const _0x15489 of PAGE_SLOT_SPECS){if(_0x15489[_0x1f5627(0x112)]===_0x1f5627(0xf0))continue;_0x5aa2cc[_0x15489[_0x1f5627(0x112)]]=projectPageSlot(_0xdb1ef5[_0x15489['key']]);}return _0x5aa2cc;}export function flattenMenuResources(_0xa3cc11){const _0x254e71=new Map(),_0x44d018=_0x41cae4=>{const _0x3fbe6a=a141_0x3071;for(const _0x698160 of _0x41cae4??[]){_0x254e71[_0x3fbe6a(0xed)](_0x698160['resourceCode'],{'resourceCode':_0x698160[_0x3fbe6a(0x10e)],'resourceName':_0x698160['resourceName'],'action':_0x698160['allowedActions']?.[0x0]??'0'});if(_0x698160['pageNodeList'])_0x44d018(_0x698160[_0x3fbe6a(0x104)]);}};return _0x44d018(_0xa3cc11),_0x254e71;}export function flattenApiResources(_0x1e31d1){const _0x1a7be6=a141_0x3068f7,_0x10928f=new Map(),_0x346a4f=new Map();for(const _0x1cd574 of _0x1e31d1){const _0x41490f=_0x1cd574[_0x1a7be6(0xe9)]??{};for(const [_0x4059ac,_0x2ca4f3]of Object[_0x1a7be6(0x118)](_0x41490f)){_0x10928f[_0x1a7be6(0xed)](_0x4059ac,{'resourceCode':_0x4059ac,'resourceName':_0x1cd574[_0x1a7be6(0x100)],'datasetCode':_0x1cd574['datasetCode'],'action':_0x2ca4f3?.[0x0]??'0'});const _0x10ecc0=_0x346a4f[_0x1a7be6(0xdd)](_0x1cd574[_0x1a7be6(0x10f)])??[];_0x10ecc0[_0x1a7be6(0xee)](_0x4059ac),_0x346a4f[_0x1a7be6(0xed)](_0x1cd574[_0x1a7be6(0x10f)],_0x10ecc0);}}return{'byCode':_0x10928f,'byDataset':_0x346a4f};}export function buildPermits(_0x161ded,_0x4d705a){const _0x2ff373=a141_0x3068f7,_0x36698b={};for(const [_0x5c1464,_0x416264]of _0x161ded){const _0x5e2d16=_0x4d705a[_0x2ff373(0xdd)](_0x5c1464)??_0x416264[_0x2ff373(0x125)];_0x36698b[_0x5c1464]=[_0x5e2d16];}return _0x36698b;}export function readRoleRef(_0x2241d5){const _0x45580d=a141_0x3068f7,_0x1e35ad=_0x2241d5[_0x45580d(0xec)]('role')[_0x45580d(0x101)]();if(!_0x1e35ad)throw CliErrors[_0x45580d(0xe3)](_0x45580d(0xf3),_0x45580d(0xda));return _0x1e35ad;}export function readGrantRevoke(_0x52ff8e){const _0x817947=a141_0x3068f7,_0x18cf9e=_0x52ff8e[_0x817947(0xf6)](_0x817947(0xd7)),_0x197931=_0x52ff8e[_0x817947(0xf6)](_0x817947(0x11b));if(_0x18cf9e&&_0x197931)throw CliErrors[_0x817947(0x116)]('--grant\x20and\x20--revoke\x20are\x20mutually\x20exclusive.');if(!_0x18cf9e&&!_0x197931)throw CliErrors['validation'](_0x817947(0xfc),'Pass\x20exactly\x20one\x20of\x20--grant\x20/\x20--revoke.');return _0x18cf9e?_0x817947(0xe2):'0';}
1
+ const a141_0x26d082=a141_0x2882;(function(_0x1bc503,_0x1da934){const _0x4b55e7=a141_0x2882,_0x245cde=_0x1bc503();while(!![]){try{const _0x5c8d4a=parseInt(_0x4b55e7(0x108))/0x1*(-parseInt(_0x4b55e7(0x116))/0x2)+parseInt(_0x4b55e7(0x10a))/0x3+-parseInt(_0x4b55e7(0xee))/0x4+-parseInt(_0x4b55e7(0x134))/0x5*(parseInt(_0x4b55e7(0xed))/0x6)+parseInt(_0x4b55e7(0x123))/0x7*(parseInt(_0x4b55e7(0x111))/0x8)+-parseInt(_0x4b55e7(0x122))/0x9+parseInt(_0x4b55e7(0x125))/0xa;if(_0x5c8d4a===_0x1da934)break;else _0x245cde['push'](_0x245cde['shift']());}catch(_0x2432bc){_0x245cde['push'](_0x245cde['shift']());}}}(a141_0x4513,0xe8732));import{listPermitRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const MENU_ID_FLAG={'name':a141_0x26d082(0x10d),'type':a141_0x26d082(0x114),'required':!![],'description':'Menu\x20id\x20(from\x20`menu\x20list`)'};export const ROLE_REF_FLAG={'name':a141_0x26d082(0xe6),'type':a141_0x26d082(0x132),'required':!![],'description':'Role\x20id\x20or\x20role\x20name'};export const GRANT_FLAG={'name':a141_0x26d082(0x10e),'type':a141_0x26d082(0xf5),'required':![],'description':a141_0x26d082(0x100)};function a141_0x2882(_0x5d19ca,_0x266db8){_0x5d19ca=_0x5d19ca-0xe6;const _0x451327=a141_0x4513();let _0x288227=_0x451327[_0x5d19ca];return _0x288227;}export const REVOKE_FLAG={'name':a141_0x26d082(0xe7),'type':'boolean','required':![],'description':a141_0x26d082(0x12a)};export const MENUS_FLAG={'name':'menus','type':a141_0x26d082(0x132),'required':!![],'description':a141_0x26d082(0x104)};export const DATASETS_FLAG={'name':a141_0x26d082(0x11e),'type':a141_0x26d082(0x132),'required':!![],'description':'Comma-separated\x20datasetCodes\x20to\x20revoke\x20API\x20access\x20for'};export const PAGE_SLOT_SPECS=[{'flag':a141_0x26d082(0x137),'key':'menuPermit','allowSelf':![],'label':a141_0x26d082(0x107)},{'flag':'create-roles','key':a141_0x26d082(0x131),'allowSelf':![],'label':a141_0x26d082(0x117)},{'flag':a141_0x26d082(0x106),'key':a141_0x26d082(0x110),'allowSelf':![],'label':a141_0x26d082(0xf4)},{'flag':a141_0x26d082(0xf9),'key':a141_0x26d082(0x138),'allowSelf':![],'label':'data\x20delete'},{'flag':'detail-roles','key':'dataDetail','allowSelf':![],'label':a141_0x26d082(0x115)},{'flag':a141_0x26d082(0x133),'key':a141_0x26d082(0xf2),'allowSelf':![],'label':a141_0x26d082(0x12b)},{'flag':a141_0x26d082(0xeb),'key':a141_0x26d082(0xfa),'allowSelf':!![],'label':a141_0x26d082(0xf8)}];export const PAGE_SET_ROLE_FLAGS=PAGE_SLOT_SPECS[a141_0x26d082(0x135)](_0x36f157=>({'name':_0x36f157[a141_0x26d082(0x105)],'type':a141_0x26d082(0x132),'required':![],'description':a141_0x26d082(0x11b)+_0x36f157['label']+'\x20(comma-separated\x20SELF/ALL/id/name)'+(_0x36f157[a141_0x26d082(0xfb)]?a141_0x26d082(0xe9):'')}));export function splitList(_0xdeb5d9){const _0x36748d=a141_0x26d082;return _0xdeb5d9[_0x36748d(0x103)](',')['map'](_0x20239f=>_0x20239f[_0x36748d(0xf1)]())[_0x36748d(0x127)](Boolean);}export function projectRoleRef(_0x1902e1){const _0x58dc1a=a141_0x26d082;return{'id':_0x1902e1['id'],'roleName':_0x1902e1[_0x58dc1a(0x113)],'roleType':_0x1902e1[_0x58dc1a(0x109)]};}export async function resolvePermitRoles(_0x3d4ad3,_0x38ea5e,_0x184024){const _0x38f5a4=a141_0x26d082,_0x7abff3=await listPermitRoles(_0x3d4ad3,{'needSelf':!![],'needPublic':!![]}),_0x1db2ed=[];for(const _0x20cb1e of _0x38ea5e){const _0x2254e1=resolveOnePermitRole(_0x7abff3,_0x20cb1e);if(!_0x184024['allowSelf']&&_0x2254e1[_0x38f5a4(0x109)]==='SELF')throw CliErrors[_0x38f5a4(0x102)](_0x38f5a4(0x119)+_0x184024['label']+'.',_0x38f5a4(0x128));if(!_0x1db2ed[_0x38f5a4(0x10c)](_0x19dd29=>_0x19dd29['id']===_0x2254e1['id']))_0x1db2ed[_0x38f5a4(0x124)](_0x2254e1);}return _0x1db2ed;}function resolveOnePermitRole(_0x1a071b,_0x56b30e){const _0x4b90e3=a141_0x26d082,_0x534b3b=_0x56b30e[_0x4b90e3(0xf1)](),_0x2f7fcc=_0x534b3b[_0x4b90e3(0x11a)]();if(_0x2f7fcc===_0x4b90e3(0x12e)||_0x2f7fcc===_0x4b90e3(0xe8)){const _0x2c09bd=_0x1a071b[_0x4b90e3(0x120)](_0x3dc6a0=>_0x3dc6a0[_0x4b90e3(0x109)]===_0x2f7fcc);if(!_0x2c09bd)throw CliErrors['validation']('Special\x20role\x20'+_0x2f7fcc+_0x4b90e3(0x101));return _0x2c09bd;}if(/^-?\d+$/['test'](_0x534b3b)){const _0x506e8c=Number(_0x534b3b),_0x1f8cc3=_0x1a071b[_0x4b90e3(0x120)](_0xa847eb=>_0xa847eb['id']===_0x506e8c);if(!_0x1f8cc3)throw CliErrors[_0x4b90e3(0x102)](_0x4b90e3(0x126)+_0x506e8c+_0x4b90e3(0x121),_0x4b90e3(0xf6));return _0x1f8cc3;}const _0x56b9f4=_0x1a071b[_0x4b90e3(0x127)](_0x3ae22f=>_0x3ae22f[_0x4b90e3(0x113)]===_0x534b3b);if(_0x56b9f4[_0x4b90e3(0xef)]===0x0)throw CliErrors[_0x4b90e3(0x102)]('Role\x20\x22'+_0x534b3b+'\x22\x20not\x20found.',_0x4b90e3(0x12f));if(_0x56b9f4['length']>0x1)throw CliErrors[_0x4b90e3(0x102)](_0x4b90e3(0x130)+_0x534b3b+'\x22\x20is\x20ambiguous\x20(ids:\x20'+_0x56b9f4['map'](_0x188ccb=>_0x188ccb['id'])[_0x4b90e3(0x11c)](',\x20')+').',_0x4b90e3(0xf3));return _0x56b9f4[0x0];}export function projectPageSlot(_0x2b9b2d){const _0x452331=a141_0x26d082;if(!_0x2b9b2d)return null;return{'resourceCode':_0x2b9b2d[_0x452331(0x129)],'roles':(_0x2b9b2d[_0x452331(0x118)]??[])[_0x452331(0x135)](projectRoleRef)};}export function projectPagePermit(_0x19f625){const _0x3ca775=a141_0x26d082,_0x136187={'menuId':_0x19f625['menuId'],'appCode':_0x19f625[_0x3ca775(0xf7)],'menuPermit':projectPageSlot(_0x19f625[_0x3ca775(0x11d)])};for(const _0x1ea3de of PAGE_SLOT_SPECS){if(_0x1ea3de[_0x3ca775(0x10f)]==='menuPermit')continue;_0x136187[_0x1ea3de[_0x3ca775(0x10f)]]=projectPageSlot(_0x19f625[_0x1ea3de[_0x3ca775(0x10f)]]);}return _0x136187;}export function flattenMenuResources(_0x45335a){const _0x56409e=new Map(),_0x27e786=_0x5923e3=>{const _0xb91cbc=a141_0x2882;for(const _0x3b109c of _0x5923e3??[]){_0x56409e[_0xb91cbc(0xfc)](_0x3b109c[_0xb91cbc(0x129)],{'resourceCode':_0x3b109c[_0xb91cbc(0x129)],'resourceName':_0x3b109c[_0xb91cbc(0xff)],'action':_0x3b109c[_0xb91cbc(0x112)]?.[0x0]??'0'});if(_0x3b109c['pageNodeList'])_0x27e786(_0x3b109c[_0xb91cbc(0xf0)]);}};return _0x27e786(_0x45335a),_0x56409e;}export function flattenApiResources(_0x4dcb4a){const _0x1ddaf9=a141_0x26d082,_0x4f8461=new Map(),_0xd9bc7c=new Map();for(const _0x43e8ab of _0x4dcb4a){const _0x48e763=_0x43e8ab[_0x1ddaf9(0x10b)]??{};for(const [_0xb6bafc,_0x408530]of Object[_0x1ddaf9(0xea)](_0x48e763)){_0x4f8461[_0x1ddaf9(0xfc)](_0xb6bafc,{'resourceCode':_0xb6bafc,'resourceName':_0x43e8ab['resourceName'],'datasetCode':_0x43e8ab[_0x1ddaf9(0xfe)],'action':_0x408530?.[0x0]??'0'});const _0x3a2bbe=_0xd9bc7c[_0x1ddaf9(0x12d)](_0x43e8ab[_0x1ddaf9(0xfe)])??[];_0x3a2bbe['push'](_0xb6bafc),_0xd9bc7c['set'](_0x43e8ab[_0x1ddaf9(0xfe)],_0x3a2bbe);}}return{'byCode':_0x4f8461,'byDataset':_0xd9bc7c};}function a141_0x4513(){const _0x4d5be1=['validation','split','Comma-separated\x20menu\x20resourceCodes\x20to\x20grant/revoke','flag','update-roles','menu\x20visibility','556mXbpVW','roleType','3683505cDqgLg','apiList','some','menu-id','grant','key','dataUpdate','369680RMVDMn','allowedActions','roleName','number','data\x20detail','1088XUUoIt','data\x20create','rolePermit','SELF\x20is\x20not\x20allowed\x20for\x20','toUpperCase','Roles\x20for\x20','join','menuPermit','datasets','str','find','\x20not\x20found.','7238628TzEzIv','14OMviQx','push','32939740dRiCYm','Role\x20id\x20','filter','SELF\x20(row-level)\x20applies\x20only\x20to\x20--row-roles.','resourceCode','Revoke\x20access\x20to\x20the\x20listed\x20resources','data\x20export','Missing\x20action.','get','SELF','Run\x20`role\x20list`,\x20or\x20use\x20SELF/ALL/<id>.','Role\x20\x22','dataCreate','string','export-roles','3693295EIqAsj','map','--grant\x20and\x20--revoke\x20are\x20mutually\x20exclusive.','menu-roles','dataDelete','role','revoke','ALL',';\x20SELF\x20=\x20only\x20own\x20rows','entries','row-roles','action','12Vzabtm','4312164iblpcU','length','pageNodeList','trim','dataExport','Disambiguate\x20with\x20an\x20id.','data\x20update','boolean','Run\x20`role\x20list`.','appCode','row\x20visibility','delete-roles','dataPermit','allowSelf','set','access','datasetCode','resourceName','Grant\x20access\x20to\x20the\x20listed\x20resources','\x20is\x20not\x20available\x20for\x20this\x20app.'];a141_0x4513=function(){return _0x4d5be1;};return a141_0x4513();}export function buildPermits(_0x2d8748,_0x6fd305){const _0x5c99db=a141_0x26d082,_0x208cff={};for(const [_0x3095d9,_0x35ec0]of _0x2d8748){const _0x92d8ca=_0x6fd305[_0x5c99db(0x12d)](_0x3095d9)??_0x35ec0[_0x5c99db(0xec)];_0x208cff[_0x3095d9]=[_0x92d8ca];}return _0x208cff;}export function readRoleRef(_0x4e6c2d){const _0x5462c2=a141_0x26d082,_0x44b5be=_0x4e6c2d[_0x5462c2(0x11f)](_0x5462c2(0xe6))[_0x5462c2(0xf1)]();if(!_0x44b5be)throw CliErrors['flagMissing'](_0x5462c2(0xe6),'Pass\x20--role\x20<id|name>.');return _0x44b5be;}export function readGrantRevoke(_0xb9070d){const _0x36be62=a141_0x26d082,_0x37a1de=_0xb9070d['bool'](_0x36be62(0x10e)),_0xbba3c1=_0xb9070d['bool']('revoke');if(_0x37a1de&&_0xbba3c1)throw CliErrors[_0x36be62(0x102)](_0x36be62(0x136));if(!_0x37a1de&&!_0xbba3c1)throw CliErrors['validation'](_0x36be62(0x12c),'Pass\x20exactly\x20one\x20of\x20--grant\x20/\x20--revoke.');return _0x37a1de?_0x36be62(0xfd):'0';}
@@ -1 +1 @@
1
- (function(_0x36aa44,_0x1d2f68){const _0xee7d3a=a142_0x52ee,_0x4c6ffb=_0x36aa44();while(!![]){try{const _0x47e863=parseInt(_0xee7d3a(0x1d1))/0x1+parseInt(_0xee7d3a(0x1c2))/0x2+-parseInt(_0xee7d3a(0x1ce))/0x3*(parseInt(_0xee7d3a(0x1c5))/0x4)+-parseInt(_0xee7d3a(0x1d3))/0x5*(parseInt(_0xee7d3a(0x1cc))/0x6)+parseInt(_0xee7d3a(0x1d6))/0x7+-parseInt(_0xee7d3a(0x1de))/0x8*(-parseInt(_0xee7d3a(0x1dc))/0x9)+-parseInt(_0xee7d3a(0x1c3))/0xa*(parseInt(_0xee7d3a(0x1c6))/0xb);if(_0x47e863===_0x1d2f68)break;else _0x4c6ffb['push'](_0x4c6ffb['shift']());}catch(_0x5bac75){_0x4c6ffb['push'](_0x4c6ffb['shift']());}}}(a142_0x1772,0x69d8b));import{existsSync}from'node:fs';import a142_0x1a1d7e from'node:path';import a142_0x4380dc from'chalk';function a142_0x1772(){const _0xe502e3=['4637941slnNxy','cyan','Project\x20name:','production','trim','√\x20Project\x20Name:\x20','4428927WaNUXI','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','8oPhvLz','string','1437468iYnoHJ','1346690ZDbPzI','env','12onrpsh','66tPikje','resolve','test','√\x20Login\x20status:\x20','No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','log','4805688YHvvqd','Login\x20failed','207861UMnhAV','green','√\x20App\x20Code:\x20','376970lSpttc','cwd','5DryFRH','Directory\x20\x22','Not\x20set'];a142_0x1772=function(){return _0xe502e3;};return a142_0x1772();}import{input,confirm}from'@inquirer/prompts';import{getIsSessionValid}from'../../../auth/is-session-valid.js';import{authServer}from'../../../auth/auth-server.js';import{readConfig}from'../../../utils/config.js';function a142_0x52ee(_0xee8089,_0x50273b){_0xee8089=_0xee8089-0x1c2;const _0x1772b7=a142_0x1772();let _0x52ee79=_0x1772b7[_0xee8089];return _0x52ee79;}import{selectSingleAppcode}from'../../../commands/common/app-selector.js';export async function guidedCreateProject(_0xa482de,_0x19acaf,_0x5199c6){const _0x921f07=a142_0x52ee,_0x4a669c='my-app',_0xd242e=readConfig(),_0x3231a5=typeof _0xd242e[_0x921f07(0x1c4)]===_0x921f07(0x1df)?_0xd242e[_0x921f07(0x1c4)]:undefined,_0x10e5e4=await input({'message':_0x921f07(0x1d8),'default':_0x4a669c,'validate':_0x56b7b3=>{const _0xdaa2f1=_0x921f07,_0x421cf6=_0x56b7b3[_0xdaa2f1(0x1da)]()||_0x4a669c;if(_0x421cf6['length']>0x32)return'Project\x20name\x20cannot\x20exceed\x2050\x20characters';const _0x15a36f=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x421cf6&&!_0x15a36f[_0xdaa2f1(0x1c8)](_0x421cf6))return _0xdaa2f1(0x1dd);const _0x3f51a6=a142_0x1a1d7e[_0xdaa2f1(0x1c7)](process[_0xdaa2f1(0x1d2)](),_0x421cf6);if(existsSync(_0x3f51a6))return _0xdaa2f1(0x1d4)+_0x421cf6+'\x22\x20already\x20exists';return!![];}});console[_0x921f07(0x1cb)](a142_0x4380dc[_0x921f07(0x1cf)](_0x921f07(0x1db)+a142_0x4380dc[_0x921f07(0x1d7)](_0x10e5e4)));const _0x2f1515=await selectSingleAppcode(_0x5199c6);console[_0x921f07(0x1cb)](a142_0x4380dc[_0x921f07(0x1cf)](_0x921f07(0x1d0)+a142_0x4380dc['cyan'](_0x2f1515||_0x921f07(0x1d5))));if(_0x2f1515){const _0x571690=await getIsSessionValid();if(!_0x571690){const _0x587376=await confirm({'message':_0x921f07(0x1ca),'default':!![]});if(_0x587376){const _0x6c8cdb=await authServer({'silent':!![]});console[_0x921f07(0x1cb)](a142_0x4380dc[_0x921f07(0x1cf)]('√\x20Login\x20status:\x20'+a142_0x4380dc[_0x921f07(0x1d7)](_0x6c8cdb?'Logged\x20in':_0x921f07(0x1cd))));}else console[_0x921f07(0x1cb)](a142_0x4380dc[_0x921f07(0x1cf)](_0x921f07(0x1c9)+a142_0x4380dc[_0x921f07(0x1d7)]('Skipped')));}await _0xa482de({'projectName':_0x10e5e4,'appCode':_0x2f1515,'env':_0x19acaf||_0x3231a5||_0x921f07(0x1d9)});}else await _0xa482de({'projectName':_0x10e5e4,'env':_0x19acaf||_0x3231a5||_0x921f07(0x1d9)});}
1
+ (function(_0x4f1788,_0x36df1e){const _0x1110c1=a142_0x1013,_0x498d6f=_0x4f1788();while(!![]){try{const _0x3db0d8=parseInt(_0x1110c1(0x13a))/0x1*(-parseInt(_0x1110c1(0x144))/0x2)+-parseInt(_0x1110c1(0x130))/0x3*(parseInt(_0x1110c1(0x143))/0x4)+-parseInt(_0x1110c1(0x137))/0x5*(parseInt(_0x1110c1(0x12f))/0x6)+-parseInt(_0x1110c1(0x140))/0x7*(parseInt(_0x1110c1(0x13c))/0x8)+-parseInt(_0x1110c1(0x12a))/0x9+parseInt(_0x1110c1(0x12d))/0xa*(-parseInt(_0x1110c1(0x12e))/0xb)+parseInt(_0x1110c1(0x139))/0xc;if(_0x3db0d8===_0x36df1e)break;else _0x498d6f['push'](_0x498d6f['shift']());}catch(_0x546585){_0x498d6f['push'](_0x498d6f['shift']());}}}(a142_0x1bb3,0x9cdf6));function a142_0x1bb3(){const _0x3e1801=['test','cyan','1268433jrJKlY','string','cwd','1310vOGGLm','14773IicUZz','6jwPZhd','33891cRfAqD','length','env','Skipped','√\x20App\x20Code:\x20','Not\x20set','√\x20Project\x20Name:\x20','5220795ZQAHcZ','log','52966476kaodaD','298705POktZS','\x22\x20already\x20exists','24FKQiZE','Logged\x20in','my-app','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','2001118pfAmEv','√\x20Login\x20status:\x20','production','444dRmJEO','2lnBddG','green','resolve','trim'];a142_0x1bb3=function(){return _0x3e1801;};return a142_0x1bb3();}import{existsSync}from'node:fs';import a142_0x89ae49 from'node:path';import a142_0x2968f8 from'chalk';function a142_0x1013(_0x2830a5,_0xdcae39){_0x2830a5=_0x2830a5-0x125;const _0x1bb352=a142_0x1bb3();let _0x101311=_0x1bb352[_0x2830a5];return _0x101311;}import{input,confirm}from'@inquirer/prompts';import{getIsSessionValid}from'../../../auth/is-session-valid.js';import{authServer}from'../../../auth/auth-server.js';import{readConfig}from'../../../utils/config.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';export async function guidedCreateProject(_0xeabdcd,_0x29fc7a,_0xff2872){const _0x4bbeda=a142_0x1013,_0x21776b=_0x4bbeda(0x13e),_0xed6d0e=readConfig(),_0x4b9d8b=typeof _0xed6d0e[_0x4bbeda(0x132)]===_0x4bbeda(0x12b)?_0xed6d0e[_0x4bbeda(0x132)]:undefined,_0x171ac9=await input({'message':'Project\x20name:','default':_0x21776b,'validate':_0x2dec27=>{const _0x5e0002=_0x4bbeda,_0x4a2779=_0x2dec27[_0x5e0002(0x127)]()||_0x21776b;if(_0x4a2779[_0x5e0002(0x131)]>0x32)return'Project\x20name\x20cannot\x20exceed\x2050\x20characters';const _0xb82690=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x4a2779&&!_0xb82690[_0x5e0002(0x128)](_0x4a2779))return _0x5e0002(0x13f);const _0x590f9c=a142_0x89ae49[_0x5e0002(0x126)](process[_0x5e0002(0x12c)](),_0x4a2779);if(existsSync(_0x590f9c))return'Directory\x20\x22'+_0x4a2779+_0x5e0002(0x13b);return!![];}});console['log'](a142_0x2968f8['green'](_0x4bbeda(0x136)+a142_0x2968f8[_0x4bbeda(0x129)](_0x171ac9)));const _0x214251=await selectSingleAppcode(_0xff2872);console[_0x4bbeda(0x138)](a142_0x2968f8[_0x4bbeda(0x125)](_0x4bbeda(0x134)+a142_0x2968f8[_0x4bbeda(0x129)](_0x214251||_0x4bbeda(0x135))));if(_0x214251){const _0x4469cd=await getIsSessionValid();if(!_0x4469cd){const _0x388e38=await confirm({'message':'No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','default':!![]});if(_0x388e38){const _0x5ecf2b=await authServer({'silent':!![]});console[_0x4bbeda(0x138)](a142_0x2968f8[_0x4bbeda(0x125)](_0x4bbeda(0x141)+a142_0x2968f8[_0x4bbeda(0x129)](_0x5ecf2b?_0x4bbeda(0x13d):'Login\x20failed')));}else console[_0x4bbeda(0x138)](a142_0x2968f8[_0x4bbeda(0x125)](_0x4bbeda(0x141)+a142_0x2968f8[_0x4bbeda(0x129)](_0x4bbeda(0x133))));}await _0xeabdcd({'projectName':_0x171ac9,'appCode':_0x214251,'env':_0x29fc7a||_0x4b9d8b||'production'});}else await _0xeabdcd({'projectName':_0x171ac9,'env':_0x29fc7a||_0x4b9d8b||_0x4bbeda(0x142)});}
@@ -1 +1 @@
1
- function a143_0xaacd(_0x5aee0a,_0x16645e){_0x5aee0a=_0x5aee0a-0x192;const _0x453ae3=a143_0x453a();let _0xaacdff=_0x453ae3[_0x5aee0a];return _0xaacdff;}function a143_0x453a(){const _0x517178=['6142032agJLJi','now','63wEZHiG','replace','91044SrByCf','72SjwQzp','5922602YUvmHz','4783674QhyaGu','1853132GjqZdv','3854460hcTSFR','1221720orFXEj','1wsRhHr'];a143_0x453a=function(){return _0x517178;};return a143_0x453a();}(function(_0x4a124b,_0xb021a3){const _0x384fdc=a143_0xaacd,_0x35e040=_0x4a124b();while(!![]){try{const _0x2d333e=parseInt(_0x384fdc(0x19d))/0x1*(parseInt(_0x384fdc(0x19a))/0x2)+parseInt(_0x384fdc(0x194))/0x3*(parseInt(_0x384fdc(0x196))/0x4)+-parseInt(_0x384fdc(0x19b))/0x5+parseInt(_0x384fdc(0x199))/0x6+parseInt(_0x384fdc(0x198))/0x7+-parseInt(_0x384fdc(0x192))/0x8+parseInt(_0x384fdc(0x197))/0x9*(-parseInt(_0x384fdc(0x19c))/0xa);if(_0x2d333e===_0xb021a3)break;else _0x35e040['push'](_0x35e040['shift']());}catch(_0x2c592e){_0x35e040['push'](_0x35e040['shift']());}}}(a143_0x453a,0x81db2));export function formatElapsed(_0x34e882){const _0x402da4=a143_0xaacd,_0x5887a7=Date[_0x402da4(0x193)]()-_0x34e882;if(_0x5887a7<0x3e8)return _0x5887a7+'ms';const _0x20b6e3=(_0x5887a7/0x3e8)['toFixed'](0x2),_0x8dd340=_0x20b6e3[_0x402da4(0x195)](/\.?0+$/u,'');return _0x8dd340+'s';}
1
+ function a143_0x54de(_0x168705,_0x5a2e6e){_0x168705=_0x168705-0x1ea;const _0x18834e=a143_0x1883();let _0x54ded0=_0x18834e[_0x168705];return _0x54ded0;}(function(_0x51f916,_0x4eaeb3){const _0x10c845=a143_0x54de,_0x3c19c1=_0x51f916();while(!![]){try{const _0x328288=-parseInt(_0x10c845(0x1f3))/0x1+parseInt(_0x10c845(0x1ec))/0x2*(-parseInt(_0x10c845(0x1ee))/0x3)+-parseInt(_0x10c845(0x1f0))/0x4+-parseInt(_0x10c845(0x1f1))/0x5+-parseInt(_0x10c845(0x1ef))/0x6+-parseInt(_0x10c845(0x1f2))/0x7+parseInt(_0x10c845(0x1ed))/0x8*(parseInt(_0x10c845(0x1ea))/0x9);if(_0x328288===_0x4eaeb3)break;else _0x3c19c1['push'](_0x3c19c1['shift']());}catch(_0x5101a1){_0x3c19c1['push'](_0x3c19c1['shift']());}}}(a143_0x1883,0xf2aa7));function a143_0x1883(){const _0x57ef41=['110200MLTGsf','7914anjSty','11357358zoVzYv','666152vuChIp','4685430pdkGgV','6512898TBIzHw','1422056BiLVMd','4158Cxtefv','toFixed','16yHgeBN'];a143_0x1883=function(){return _0x57ef41;};return a143_0x1883();}export function formatElapsed(_0x415a3a){const _0xb00b33=a143_0x54de,_0x449996=Date['now']()-_0x415a3a;if(_0x449996<0x3e8)return _0x449996+'ms';const _0x71f39d=(_0x449996/0x3e8)[_0xb00b33(0x1eb)](0x2),_0x196c32=_0x71f39d['replace'](/\.?0+$/u,'');return _0x196c32+'s';}
@@ -1 +1 @@
1
- (function(_0x520bcf,_0x176f17){const _0x216fd9=a144_0xfcd1,_0x4efc98=_0x520bcf();while(!![]){try{const _0x5a2440=-parseInt(_0x216fd9(0x122))/0x1*(parseInt(_0x216fd9(0xd7))/0x2)+-parseInt(_0x216fd9(0xfd))/0x3*(parseInt(_0x216fd9(0xef))/0x4)+-parseInt(_0x216fd9(0xf4))/0x5+parseInt(_0x216fd9(0xff))/0x6+parseInt(_0x216fd9(0x11a))/0x7*(parseInt(_0x216fd9(0x10b))/0x8)+parseInt(_0x216fd9(0x118))/0x9+-parseInt(_0x216fd9(0xce))/0xa;if(_0x5a2440===_0x176f17)break;else _0x4efc98['push'](_0x4efc98['shift']());}catch(_0x100274){_0x4efc98['push'](_0x4efc98['shift']());}}}(a144_0x3cfe,0xd6374));import a144_0x334446 from'path';import a144_0x35457d from'fs';import a144_0x4eec2f from'chalk';import a144_0x57e1d1 from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';function a144_0xfcd1(_0x4d27f7,_0x4b7bd4){_0x4d27f7=_0x4d27f7-0xcc;const _0x3cfe70=a144_0x3cfe();let _0xfcd1dc=_0x3cfe70[_0x4d27f7];return _0xfcd1dc;}import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{readConfig}from'../../../utils/config.js';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';function a144_0x3cfe(){const _0x57f537=['495922BeWJwg','projectName','writeFileSync','\x20run\x20start','\x20dataset(s),\x20generated\x20','配置应用AppCode:\x20','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','rmSync','964793ExSQuD','\x20api\x20pull','cyan','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','readFileSync','join','\x20\x201.\x20Start\x20project:\x20','759580NYMHPB','success','🚀\x20Next\x20Steps:','package.json','env','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','*\x20Configuring\x20AppCode\x20for\x20project\x20','开始创建项目:\x20','API\x20配置拉取异常','2DdPjrV','message','清理项目目录失败:\x20','*\x20Pulling\x20API\x20configuration...','green','√\x20Pulled\x20','resolve','parse','info','length','string','gray','bold','Copy\x20project\x20files','\x20|\x20Default:\x20','Format\x20code','currentVersion','\x20√\x20','projectCode','CLI\x20版本检查','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','setLogPath','chdir','dirname','988reZYwT','test','create','\x20|\x20AppCode:\x20','...','4124605ODphBQ','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','belowMinimum','production','\x20config\x20set\x20appcode\x20<app-code>\x27','error','API\x20configuration\x20pulled:\x20','项目创建失败:\x20','stableVersion','2811DDZxWM','log','6181254wSfejy','1.0.0','minimumVersion','repeat','√\x20package.json\x20updated:\x20name=','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','utf8','\x20Generated\x20by\x20rabetbase\x20cli\x20','needsUpgrade','\x20&&\x20','配置应用AppCode失败','fail','112ctrvEI','Install\x20dependencies','cwd','stop','Project\x20name\x20cannot\x20be\x20empty','Project\x20directory\x20','apps','keys','\x20model(s)','existsSync','modelCount','appCode','cookie','8572374nOQabj','version'];a144_0x3cfe=function(){return _0x57f537;};return a144_0x3cfe();}import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';import{logger}from'../../../utils/logger.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';export async function createApp(_0x22f27e){const _0x313a6e=a144_0xfcd1,_0x1dc10c=await checkCliVersion();(_0x1dc10c['needsUpgrade']||_0x1dc10c[_0x313a6e(0xf6)])&&(printCliUpgradeWarning(_0x1dc10c),assertCliVersionSupported(_0x1dc10c),logger[_0x313a6e(0xdf)](_0x313a6e(0xf1),_0x313a6e(0xea),{'currentVersion':_0x1dc10c[_0x313a6e(0xe7)],'stableVersion':_0x1dc10c[_0x313a6e(0xfc)],'minimumVersion':_0x1dc10c[_0x313a6e(0x101)],'needsUpgrade':_0x1dc10c[_0x313a6e(0x107)],'belowMinimum':_0x1dc10c[_0x313a6e(0xf6)]}));if(_0x22f27e[_0x313a6e(0xe9)]&&_0x22f27e[_0x313a6e(0x116)])await runCreate({'projectName':_0x22f27e['projectCode'],'appCode':_0x22f27e[_0x313a6e(0x116)],'env':_0x22f27e[_0x313a6e(0xd2)]},_0x22f27e);else{if(_0x22f27e[_0x313a6e(0xe9)]){const _0x379fa9=await selectSingleAppcode(_0x22f27e[_0x313a6e(0x117)]);await runCreate({'projectName':_0x22f27e[_0x313a6e(0xe9)],'appCode':_0x379fa9||undefined,'env':_0x22f27e[_0x313a6e(0xd2)]},_0x22f27e);}else await guidedCreateProject(_0x5e0c5b=>runCreate(_0x5e0c5b,_0x22f27e),_0x22f27e[_0x313a6e(0xd2)],_0x22f27e['cookie']);}}async function runCreate(_0x455e7f,_0x2dd651){const _0x317eca=a144_0xfcd1;if(!_0x455e7f[_0x317eca(0x11b)]||_0x455e7f[_0x317eca(0x11b)]['trim']()==='')throw new Error(_0x317eca(0x10f));const _0x252e0f=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x252e0f[_0x317eca(0xf0)](_0x455e7f[_0x317eca(0x11b)]))throw new Error(_0x317eca(0x104));if(_0x455e7f[_0x317eca(0x11b)][_0x317eca(0xe0)]>0x64)throw new Error(_0x317eca(0xeb));const _0x82dfcb=a144_0x334446[_0x317eca(0xdd)](process[_0x317eca(0x10d)](),_0x455e7f['projectName']);if(a144_0x35457d[_0x317eca(0x114)](_0x82dfcb))throw new Error(_0x317eca(0x110)+_0x455e7f[_0x317eca(0x11b)]+'\x20already\x20exists');try{a144_0x35457d['accessSync'](a144_0x334446[_0x317eca(0xee)](_0x82dfcb),a144_0x35457d['constants']['W_OK']);}catch{throw new Error('Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions');}logger[_0x317eca(0xec)](_0x82dfcb),logger['info'](_0x317eca(0xf1),_0x317eca(0xd5)+_0x455e7f[_0x317eca(0x11b)],{'projectDir':_0x82dfcb,'appCode':_0x455e7f['appCode']}),console['log'](),console[_0x317eca(0xfe)](a144_0x4eec2f['green']('\x20√\x20')+'Project\x20name:\x20'+a144_0x4eec2f['green'](_0x455e7f[_0x317eca(0x11b)])+(_0x455e7f[_0x317eca(0x116)]?_0x317eca(0xf2)+a144_0x4eec2f[_0x317eca(0x124)](_0x455e7f[_0x317eca(0x116)]):''));try{await runTask(_0x317eca(0xe4),()=>copyProjectTemplate(_0x455e7f['projectName'])),await updatePackageJsonName(_0x455e7f[_0x317eca(0x11b)]),await runTask(_0x317eca(0x10c),()=>installDependencies(_0x455e7f[_0x317eca(0x11b)])),await runTask(_0x317eca(0xe6),()=>formatProjectCode(_0x455e7f['projectName'])),await configureAppCode(_0x455e7f['projectName'],_0x455e7f[_0x317eca(0x116)]||'',_0x455e7f['env']);let _0x2aa0db=![];if(_0x455e7f[_0x317eca(0x116)]){console[_0x317eca(0xfe)](_0x317eca(0xda));const _0x4f8fa0=process[_0x317eca(0x10d)]();try{process[_0x317eca(0xed)](_0x82dfcb);const _0x4bbce9=_0x455e7f[_0x317eca(0xd2)]||'production';initEnv(_0x4bbce9);const {configArray:_0x21543f}=await fetchModelList(_0x455e7f['appCode'],_0x2dd651['cookie']||''),_0xbf2b27=DEFAULT_API_DIR,_0x48a760=await generateApiFile(_0x21543f,'',_0x455e7f[_0x317eca(0x116)],!![],_0x4bbce9,_0xbf2b27);console[_0x317eca(0xfe)](_0x317eca(0xdc)+_0x21543f['length']+_0x317eca(0x11e)+_0x48a760[_0x317eca(0x115)]+_0x317eca(0x113)),logger[_0x317eca(0xdf)](_0x317eca(0xf1),_0x317eca(0xfa)+_0x455e7f[_0x317eca(0x116)]);}catch(_0x3aa705){_0x2aa0db=!![],console[_0x317eca(0xfe)](_0x317eca(0x125)),logger['warn']('create',_0x317eca(0xd6),{'error':_0x3aa705 instanceof Error?_0x3aa705[_0x317eca(0xd8)]:String(_0x3aa705)});}finally{process[_0x317eca(0xed)](_0x4f8fa0);}}logger[_0x317eca(0xcf)](_0x317eca(0xf1),'项目创建完成:\x20'+_0x455e7f[_0x317eca(0x11b)]),console['log'](),console[_0x317eca(0xfe)](a144_0x4eec2f[_0x317eca(0xdb)]('─'[_0x317eca(0x102)](0x3c))),console[_0x317eca(0xfe)](a144_0x4eec2f['cyan'][_0x317eca(0xe3)](_0x317eca(0xd0))),console[_0x317eca(0xfe)](),console['log'](_0x317eca(0xcd)+a144_0x4eec2f[_0x317eca(0x124)][_0x317eca(0xe3)]('cd\x20'+_0x455e7f[_0x317eca(0x11b)]+_0x317eca(0x108)+CLI_BIN_NAME+_0x317eca(0x11d))),_0x2aa0db&&console[_0x317eca(0xfe)]('\x20\x202.\x20Pull\x20API\x20configuration:\x20'+a144_0x4eec2f[_0x317eca(0x124)][_0x317eca(0xe3)](CLI_BIN_NAME+_0x317eca(0x123))),console[_0x317eca(0xfe)](a144_0x4eec2f[_0x317eca(0xdb)]('─'[_0x317eca(0x102)](0x3c)));}catch(_0x582261){logger[_0x317eca(0xf9)](_0x317eca(0xf1),_0x317eca(0xfb)+_0x455e7f['projectName'],{'error':_0x582261 instanceof Error?_0x582261[_0x317eca(0xd8)]:String(_0x582261)});try{a144_0x35457d[_0x317eca(0x114)](_0x82dfcb)&&(console[_0x317eca(0xfe)](_0x317eca(0xf5)+_0x82dfcb),a144_0x35457d[_0x317eca(0x121)](_0x82dfcb,{'recursive':!![],'force':!![]}));}catch{logger['warn'](_0x317eca(0xf1),_0x317eca(0xd9)+_0x82dfcb);}throw _0x582261;}}async function runTask(_0x18ab25,_0x36083a){const _0x2d1a93=a144_0xfcd1,_0x2e74b7=a144_0x57e1d1(_0x18ab25+_0x2d1a93(0xf3))['start']();try{const _0xd5a612=await _0x36083a();_0x2e74b7[_0x2d1a93(0x10e)](),console[_0x2d1a93(0xfe)](''+a144_0x4eec2f['green'](_0x2d1a93(0xe8))+_0x18ab25+'\x20'+a144_0x4eec2f[_0x2d1a93(0xe2)]('['+_0xd5a612+']'));}catch(_0x542014){_0x2e74b7[_0x2d1a93(0x10a)](_0x18ab25);throw _0x542014;}}async function updatePackageJsonName(_0xddc063){const _0xe5919b=a144_0xfcd1,_0x2ccc84=a144_0x334446[_0xe5919b(0xdd)](process['cwd'](),_0xddc063),_0x3b8db2=a144_0x334446[_0xe5919b(0xcc)](_0x2ccc84,_0xe5919b(0xd1));try{console[_0xe5919b(0xfe)](_0xe5919b(0xd3));const _0x4cacc0=getRabetbaseCliPackageRoot(),_0x37aa1f=a144_0x334446[_0xe5919b(0xcc)](_0x4cacc0,'package.json');let _0x20ce4c='1.0.0';try{const _0x24103f=JSON[_0xe5919b(0xde)](a144_0x35457d[_0xe5919b(0x126)](_0x37aa1f,_0xe5919b(0x105)));_0x20ce4c=_0x24103f[_0xe5919b(0x119)]||'1.0.0';}catch{}const _0x2f1f0a=a144_0x35457d[_0xe5919b(0x126)](_0x3b8db2,'utf8'),_0x4414f0=JSON[_0xe5919b(0xde)](_0x2f1f0a);_0x4414f0['name']=_0xddc063,_0x4414f0['description']=_0xddc063+_0xe5919b(0x106)+_0x20ce4c,a144_0x35457d[_0xe5919b(0x11c)](_0x3b8db2,JSON['stringify'](_0x4414f0,null,0x2)+'\x0a',_0xe5919b(0x105)),console[_0xe5919b(0xfe)](_0xe5919b(0x103)+_0xddc063),logger['info']('create','更新\x20package.json\x20name');}catch(_0x1afb9c){logger['error'](_0xe5919b(0xf1),'更新\x20package.json\x20失败');throw _0x1afb9c;}}async function configureAppCode(_0x1d6dda,_0x1c0174,_0x47d35b){const _0x52961a=a144_0xfcd1,_0x173ecb=a144_0x334446[_0x52961a(0xdd)](process[_0x52961a(0x10d)](),_0x1d6dda),_0x72798b=a144_0x334446[_0x52961a(0xcc)](_0x173ecb,NEW_CONFIG_NAME);try{_0x1c0174?console[_0x52961a(0xfe)](_0x52961a(0xd4)+_0x1d6dda+':\x20'+_0x1c0174):console[_0x52961a(0xfe)]('*\x20Creating\x20configuration\x20file\x20for\x20project\x20'+_0x1d6dda);const _0x2ae243=getRabetbaseCliPackageRoot(),_0x2dd585=a144_0x334446[_0x52961a(0xcc)](_0x2ae243,_0x52961a(0xd1));let _0x402980=_0x52961a(0x100);try{const _0x4590c4=JSON[_0x52961a(0xde)](a144_0x35457d[_0x52961a(0x126)](_0x2dd585,_0x52961a(0x105)));_0x402980=_0x4590c4[_0x52961a(0x119)]||'1.0.0';}catch{}const _0x49373d=readConfig(),_0x3420c2=typeof _0x49373d['env']===_0x52961a(0xe1)?_0x49373d['env']:undefined,_0x50f064={};for(const _0x213a12 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x49373d[_0x213a12]!=null)_0x50f064[_0x213a12]=_0x49373d[_0x213a12];}const _0xb3872a=buildCanonicalProjectConfig(_0x50f064,{'appCodes':_0x1c0174?[_0x1c0174]:[],'env':_0x47d35b||_0x3420c2||_0x52961a(0xf7),'metadata':{'createdAt':new Date()['toLocaleString'](),'version':_0x402980}});writeConfigFile(_0x72798b,_0xb3872a),_0x1c0174?console[_0x52961a(0xfe)]('√\x20Configuration\x20file\x20created,\x20Apps:\x20'+Object[_0x52961a(0x112)](_0xb3872a[_0x52961a(0x111)]||{})[_0x52961a(0xcc)](',\x20')+_0x52961a(0xe5)+_0xb3872a['defaultApp']):console['log'](_0x52961a(0x120)+CLI_BIN_NAME+_0x52961a(0xf8)),logger['info'](_0x52961a(0xf1),_0x52961a(0x11f)+_0x1c0174);}catch(_0x45f8b2){logger[_0x52961a(0xf9)]('create',_0x52961a(0x109));}}
1
+ (function(_0x205d65,_0xdec407){const _0x2f2fe7=a144_0x2f27,_0x3e026a=_0x205d65();while(!![]){try{const _0x7743ba=parseInt(_0x2f2fe7(0x10c))/0x1+-parseInt(_0x2f2fe7(0xc3))/0x2+-parseInt(_0x2f2fe7(0x102))/0x3*(parseInt(_0x2f2fe7(0x11d))/0x4)+parseInt(_0x2f2fe7(0x10a))/0x5+parseInt(_0x2f2fe7(0x108))/0x6*(-parseInt(_0x2f2fe7(0x104))/0x7)+parseInt(_0x2f2fe7(0x11b))/0x8*(-parseInt(_0x2f2fe7(0x101))/0x9)+-parseInt(_0x2f2fe7(0xbf))/0xa*(-parseInt(_0x2f2fe7(0x105))/0xb);if(_0x7743ba===_0xdec407)break;else _0x3e026a['push'](_0x3e026a['shift']());}catch(_0x4c7403){_0x3e026a['push'](_0x3e026a['shift']());}}}(a144_0x162e,0xd9d04));import a144_0xbab26c from'path';import a144_0x3191b1 from'fs';function a144_0x2f27(_0x449bab,_0x23f788){_0x449bab=_0x449bab-0xbe;const _0x162e93=a144_0x162e();let _0x2f27f7=_0x162e93[_0x449bab];return _0x2f27f7;}import a144_0x9db5a9 from'chalk';import a144_0x3ef576 from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{readConfig}from'../../../utils/config.js';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';function a144_0x162e(){const _0x38f1e2=['√\x20Pulled\x20','trim','*\x20Pulling\x20API\x20configuration...','*\x20Configuring\x20AppCode\x20for\x20project\x20','projectName','stableVersion','\x20|\x20Default:\x20','apps','√\x20package.json\x20updated:\x20name=','utf8','needsUpgrade','CLI\x20版本检查','开始创建项目:\x20','keys','green','bold','name','start','810dHsESR','39IdYtES','currentVersion','22232FQEeuh','11xjMZKy','error','\x20Generated\x20by\x20rabetbase\x20cli\x20','894wxSVKJ','配置应用AppCode失败','6708760wNuUoH','minimumVersion','611562qpxcVK','appCode','🚀\x20Next\x20Steps:','√\x20Configuration\x20file\x20created,\x20Apps:\x20','W_OK','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','cyan','cwd','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','accessSync','info','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','Format\x20code','join','writeFileSync','3688JciPzy','existsSync','149628ytNLQB','readFileSync','warn','log','11603240ePHHZE','projectCode','repeat','message','2440938ElWvYs','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','\x20|\x20AppCode:\x20','...','production','resolve','\x20√\x20','清理项目目录失败:\x20','belowMinimum','API\x20配置拉取异常','cd\x20','length','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','配置应用AppCode:\x20','Project\x20directory\x20','fail','package.json','更新\x20package.json\x20失败','1.0.0','项目创建失败:\x20','constants','Project\x20name:\x20','\x20\x201.\x20Start\x20project:\x20','stringify','stop','success','Project\x20name\x20cannot\x20be\x20empty','create','Copy\x20project\x20files','\x20\x202.\x20Pull\x20API\x20configuration:\x20','string','API\x20configuration\x20pulled:\x20','parse','setLogPath','\x20config\x20set\x20appcode\x20<app-code>\x27','dirname','version','cookie','\x20run\x20start','env','chdir','Install\x20dependencies','\x20dataset(s),\x20generated\x20'];a144_0x162e=function(){return _0x38f1e2;};return a144_0x162e();}import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';import{logger}from'../../../utils/logger.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';export async function createApp(_0x516647){const _0x54796d=a144_0x2f27,_0x4ddeea=await checkCliVersion();(_0x4ddeea[_0x54796d(0xf9)]||_0x4ddeea[_0x54796d(0xcb)])&&(printCliUpgradeWarning(_0x4ddeea),assertCliVersionSupported(_0x4ddeea),logger[_0x54796d(0x116)](_0x54796d(0xdf),_0x54796d(0xfa),{'currentVersion':_0x4ddeea[_0x54796d(0x103)],'stableVersion':_0x4ddeea[_0x54796d(0xf4)],'minimumVersion':_0x4ddeea[_0x54796d(0x10b)],'needsUpgrade':_0x4ddeea[_0x54796d(0xf9)],'belowMinimum':_0x4ddeea[_0x54796d(0xcb)]}));if(_0x516647[_0x54796d(0xc0)]&&_0x516647[_0x54796d(0x10d)])await runCreate({'projectName':_0x516647[_0x54796d(0xc0)],'appCode':_0x516647['appCode'],'env':_0x516647[_0x54796d(0xeb)]},_0x516647);else{if(_0x516647[_0x54796d(0xc0)]){const _0x54c86e=await selectSingleAppcode(_0x516647[_0x54796d(0xe9)]);await runCreate({'projectName':_0x516647[_0x54796d(0xc0)],'appCode':_0x54c86e||undefined,'env':_0x516647[_0x54796d(0xeb)]},_0x516647);}else await guidedCreateProject(_0x643d68=>runCreate(_0x643d68,_0x516647),_0x516647[_0x54796d(0xeb)],_0x516647['cookie']);}}async function runCreate(_0x242fcd,_0xfcf4ff){const _0x188c70=a144_0x2f27;if(!_0x242fcd['projectName']||_0x242fcd[_0x188c70(0xf3)][_0x188c70(0xf0)]()==='')throw new Error(_0x188c70(0xde));const _0x4c56ea=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x4c56ea['test'](_0x242fcd['projectName']))throw new Error(_0x188c70(0xc4));if(_0x242fcd['projectName'][_0x188c70(0xce)]>0x64)throw new Error('Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters');const _0x22f804=a144_0xbab26c[_0x188c70(0xc8)](process[_0x188c70(0x113)](),_0x242fcd[_0x188c70(0xf3)]);if(a144_0x3191b1[_0x188c70(0x11c)](_0x22f804))throw new Error(_0x188c70(0xd2)+_0x242fcd[_0x188c70(0xf3)]+'\x20already\x20exists');try{a144_0x3191b1[_0x188c70(0x115)](a144_0xbab26c[_0x188c70(0xe7)](_0x22f804),a144_0x3191b1[_0x188c70(0xd8)][_0x188c70(0x110)]);}catch{throw new Error(_0x188c70(0x117));}logger[_0x188c70(0xe5)](_0x22f804),logger[_0x188c70(0x116)]('create',_0x188c70(0xfb)+_0x242fcd['projectName'],{'projectDir':_0x22f804,'appCode':_0x242fcd['appCode']}),console[_0x188c70(0xbe)](),console[_0x188c70(0xbe)](a144_0x9db5a9['green'](_0x188c70(0xc9))+_0x188c70(0xd9)+a144_0x9db5a9['green'](_0x242fcd['projectName'])+(_0x242fcd[_0x188c70(0x10d)]?_0x188c70(0xc5)+a144_0x9db5a9[_0x188c70(0x112)](_0x242fcd[_0x188c70(0x10d)]):''));try{await runTask(_0x188c70(0xe0),()=>copyProjectTemplate(_0x242fcd[_0x188c70(0xf3)])),await updatePackageJsonName(_0x242fcd[_0x188c70(0xf3)]),await runTask(_0x188c70(0xed),()=>installDependencies(_0x242fcd[_0x188c70(0xf3)])),await runTask(_0x188c70(0x118),()=>formatProjectCode(_0x242fcd[_0x188c70(0xf3)])),await configureAppCode(_0x242fcd[_0x188c70(0xf3)],_0x242fcd['appCode']||'',_0x242fcd[_0x188c70(0xeb)]);let _0x26d703=![];if(_0x242fcd[_0x188c70(0x10d)]){console['log'](_0x188c70(0xf1));const _0x4367f0=process[_0x188c70(0x113)]();try{process[_0x188c70(0xec)](_0x22f804);const _0x58220e=_0x242fcd[_0x188c70(0xeb)]||_0x188c70(0xc7);initEnv(_0x58220e);const {configArray:_0x41d5e5}=await fetchModelList(_0x242fcd[_0x188c70(0x10d)],_0xfcf4ff[_0x188c70(0xe9)]||''),_0x2d7486=DEFAULT_API_DIR,_0xf6bd79=await generateApiFile(_0x41d5e5,'',_0x242fcd[_0x188c70(0x10d)],!![],_0x58220e,_0x2d7486);console[_0x188c70(0xbe)](_0x188c70(0xef)+_0x41d5e5[_0x188c70(0xce)]+_0x188c70(0xee)+_0xf6bd79['modelCount']+'\x20model(s)'),logger['info'](_0x188c70(0xdf),_0x188c70(0xe3)+_0x242fcd[_0x188c70(0x10d)]);}catch(_0x53347b){_0x26d703=!![],console[_0x188c70(0xbe)](_0x188c70(0x114)),logger['warn'](_0x188c70(0xdf),_0x188c70(0xcc),{'error':_0x53347b instanceof Error?_0x53347b[_0x188c70(0xc2)]:String(_0x53347b)});}finally{process[_0x188c70(0xec)](_0x4367f0);}}logger[_0x188c70(0xdd)]('create','项目创建完成:\x20'+_0x242fcd[_0x188c70(0xf3)]),console['log'](),console[_0x188c70(0xbe)](a144_0x9db5a9[_0x188c70(0xfd)]('─'[_0x188c70(0xc1)](0x3c))),console[_0x188c70(0xbe)](a144_0x9db5a9[_0x188c70(0x112)]['bold'](_0x188c70(0x10e))),console['log'](),console[_0x188c70(0xbe)](_0x188c70(0xda)+a144_0x9db5a9['cyan'][_0x188c70(0xfe)](_0x188c70(0xcd)+_0x242fcd[_0x188c70(0xf3)]+'\x20&&\x20'+CLI_BIN_NAME+_0x188c70(0xea))),_0x26d703&&console[_0x188c70(0xbe)](_0x188c70(0xe1)+a144_0x9db5a9[_0x188c70(0x112)][_0x188c70(0xfe)](CLI_BIN_NAME+'\x20api\x20pull')),console[_0x188c70(0xbe)](a144_0x9db5a9['green']('─'[_0x188c70(0xc1)](0x3c)));}catch(_0x49390c){logger[_0x188c70(0x106)](_0x188c70(0xdf),_0x188c70(0xd7)+_0x242fcd['projectName'],{'error':_0x49390c instanceof Error?_0x49390c[_0x188c70(0xc2)]:String(_0x49390c)});try{a144_0x3191b1[_0x188c70(0x11c)](_0x22f804)&&(console[_0x188c70(0xbe)](_0x188c70(0xcf)+_0x22f804),a144_0x3191b1['rmSync'](_0x22f804,{'recursive':!![],'force':!![]}));}catch{logger[_0x188c70(0x11f)](_0x188c70(0xdf),_0x188c70(0xca)+_0x22f804);}throw _0x49390c;}}async function runTask(_0x26f3ee,_0x1b006b){const _0x207e42=a144_0x2f27,_0x1b4218=a144_0x3ef576(_0x26f3ee+_0x207e42(0xc6))[_0x207e42(0x100)]();try{const _0x21bc31=await _0x1b006b();_0x1b4218[_0x207e42(0xdc)](),console[_0x207e42(0xbe)](''+a144_0x9db5a9[_0x207e42(0xfd)]('\x20√\x20')+_0x26f3ee+'\x20'+a144_0x9db5a9['gray']('['+_0x21bc31+']'));}catch(_0x86a122){_0x1b4218[_0x207e42(0xd3)](_0x26f3ee);throw _0x86a122;}}async function updatePackageJsonName(_0x4577f4){const _0x331a14=a144_0x2f27,_0x41e38c=a144_0xbab26c[_0x331a14(0xc8)](process[_0x331a14(0x113)](),_0x4577f4),_0x54caf7=a144_0xbab26c[_0x331a14(0x119)](_0x41e38c,'package.json');try{console[_0x331a14(0xbe)](_0x331a14(0x111));const _0x1065f9=getRabetbaseCliPackageRoot(),_0x8e884f=a144_0xbab26c[_0x331a14(0x119)](_0x1065f9,_0x331a14(0xd4));let _0x384f1c='1.0.0';try{const _0x411947=JSON['parse'](a144_0x3191b1[_0x331a14(0x11e)](_0x8e884f,_0x331a14(0xf8)));_0x384f1c=_0x411947[_0x331a14(0xe8)]||'1.0.0';}catch{}const _0x42d05e=a144_0x3191b1[_0x331a14(0x11e)](_0x54caf7,_0x331a14(0xf8)),_0x854df3=JSON['parse'](_0x42d05e);_0x854df3[_0x331a14(0xff)]=_0x4577f4,_0x854df3['description']=_0x4577f4+_0x331a14(0x107)+_0x384f1c,a144_0x3191b1[_0x331a14(0x11a)](_0x54caf7,JSON[_0x331a14(0xdb)](_0x854df3,null,0x2)+'\x0a',_0x331a14(0xf8)),console['log'](_0x331a14(0xf7)+_0x4577f4),logger[_0x331a14(0x116)]('create','更新\x20package.json\x20name');}catch(_0x16bac4){logger[_0x331a14(0x106)]('create',_0x331a14(0xd5));throw _0x16bac4;}}async function configureAppCode(_0x1c667f,_0x2c6d8f,_0x5e0e7f){const _0x20d2c9=a144_0x2f27,_0x1fb56d=a144_0xbab26c[_0x20d2c9(0xc8)](process[_0x20d2c9(0x113)](),_0x1c667f),_0x46b261=a144_0xbab26c[_0x20d2c9(0x119)](_0x1fb56d,NEW_CONFIG_NAME);try{_0x2c6d8f?console[_0x20d2c9(0xbe)](_0x20d2c9(0xf2)+_0x1c667f+':\x20'+_0x2c6d8f):console['log'](_0x20d2c9(0xd0)+_0x1c667f);const _0xd0d4ef=getRabetbaseCliPackageRoot(),_0x22c66b=a144_0xbab26c[_0x20d2c9(0x119)](_0xd0d4ef,_0x20d2c9(0xd4));let _0x3bb23d='1.0.0';try{const _0x2a1704=JSON[_0x20d2c9(0xe4)](a144_0x3191b1[_0x20d2c9(0x11e)](_0x22c66b,'utf8'));_0x3bb23d=_0x2a1704[_0x20d2c9(0xe8)]||_0x20d2c9(0xd6);}catch{}const _0x4f29ed=readConfig(),_0x5036ea=typeof _0x4f29ed[_0x20d2c9(0xeb)]===_0x20d2c9(0xe2)?_0x4f29ed[_0x20d2c9(0xeb)]:undefined,_0x3070ad={};for(const _0x31fa1b of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x4f29ed[_0x31fa1b]!=null)_0x3070ad[_0x31fa1b]=_0x4f29ed[_0x31fa1b];}const _0x123da3=buildCanonicalProjectConfig(_0x3070ad,{'appCodes':_0x2c6d8f?[_0x2c6d8f]:[],'env':_0x5e0e7f||_0x5036ea||_0x20d2c9(0xc7),'metadata':{'createdAt':new Date()['toLocaleString'](),'version':_0x3bb23d}});writeConfigFile(_0x46b261,_0x123da3),_0x2c6d8f?console[_0x20d2c9(0xbe)](_0x20d2c9(0x10f)+Object[_0x20d2c9(0xfc)](_0x123da3[_0x20d2c9(0xf6)]||{})[_0x20d2c9(0x119)](',\x20')+_0x20d2c9(0xf5)+_0x123da3['defaultApp']):console[_0x20d2c9(0xbe)]('√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27'+CLI_BIN_NAME+_0x20d2c9(0xe6)),logger[_0x20d2c9(0x116)](_0x20d2c9(0xdf),_0x20d2c9(0xd1)+_0x2c6d8f);}catch(_0x12da25){logger[_0x20d2c9(0x106)](_0x20d2c9(0xdf),_0x20d2c9(0x109));}}
@@ -1 +1 @@
1
- (function(_0x619ba7,_0x49e3ab){const _0x4d89cd=a145_0x3475,_0x41e2bd=_0x619ba7();while(!![]){try{const _0x222e46=parseInt(_0x4d89cd(0x13c))/0x1*(parseInt(_0x4d89cd(0x130))/0x2)+-parseInt(_0x4d89cd(0x13b))/0x3+-parseInt(_0x4d89cd(0x125))/0x4*(parseInt(_0x4d89cd(0x118))/0x5)+parseInt(_0x4d89cd(0x129))/0x6+-parseInt(_0x4d89cd(0x11c))/0x7+-parseInt(_0x4d89cd(0x126))/0x8*(parseInt(_0x4d89cd(0x103))/0x9)+parseInt(_0x4d89cd(0x114))/0xa*(parseInt(_0x4d89cd(0x139))/0xb);if(_0x222e46===_0x49e3ab)break;else _0x41e2bd['push'](_0x41e2bd['shift']());}catch(_0x6399de){_0x41e2bd['push'](_0x41e2bd['shift']());}}}(a145_0x3b7e,0xcf928));import a145_0x523b96 from'path';import a145_0x3f6743 from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';function a145_0x3475(_0x23e63d,_0x4fc759){_0x23e63d=_0x23e63d-0x101;const _0x3b7e81=a145_0x3b7e();let _0x347579=_0x3b7e81[_0x23e63d];return _0x347579;}function a145_0x3b7e(){const _0x35e0bc=['139wfvVfH','parse','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','toLocaleString','195354OLgOFo','bun\x20run\x20format','\x20\x20rabetbase\x20run\x20start\x0a','\x20\x20Installing\x20dependencies...','\x20\x20√\x20Configuration\x20file\x20created','length','\x20\x20√\x20Code\x20formatted','stringify','log','constants','*\x20Creating\x20project\x20','Project\x20name\x20cannot\x20be\x20empty.','ignore','test','writeFile','validation','\x20\x20√\x20Project\x20template\x20created','30urhyUT','Cannot\x20create\x20project\x20in\x20current\x20directory.','env','\x20\x20Pulling\x20API\x20configuration...','5741165qUgiFT','Project\x20directory\x20\x22','cwd','name','10191580lUOPTj','bun','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','\x20created\x20successfully!','access','Use\x20a\x20different\x20project\x20name.','\x20model(s)','npm','production','4HyAXEP','616OUTlJu','\x0a√\x20Project\x20','\x20dataset(s),\x20generated\x20','9288696rydJEw','Check\x20directory\x20permissions.','description','...','bun\x20--version','chdir','\x20\x20√\x20package.json\x20updated','11464vDqhZs','\x20\x20√\x20Pulled\x20','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','trim','string','package.json','resolve','utf-8','belowMinimum','11530904NOFrqB','join','1091715LMgCia'];a145_0x3b7e=function(){return _0x35e0bc;};return a145_0x3b7e();}import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{readConfig}from'../../../utils/config.js';import{getCliVersion}from'../../../utils/version.js';import{CliErrors}from'../../../errors.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';const execAsync=promisify(exec);export async function createProjectNonInteractive(_0x224570,_0x58e167,_0x117d9f,_0x5264dc){const _0x1cec4b=a145_0x3475,_0xa4c3d0=await checkCliVersion();(_0xa4c3d0['needsUpgrade']||_0xa4c3d0[_0x1cec4b(0x138)])&&(printCliUpgradeWarning(_0xa4c3d0),assertCliVersionSupported(_0xa4c3d0));if(!_0x224570||_0x224570[_0x1cec4b(0x133)]()==='')throw CliErrors['validation'](_0x1cec4b(0x10e));const _0x8c566d=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x8c566d[_0x1cec4b(0x110)](_0x224570))throw CliErrors[_0x1cec4b(0x112)]('Project\x20name\x20contains\x20invalid\x20characters.','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters');if(_0x224570[_0x1cec4b(0x108)]>0x64)throw CliErrors[_0x1cec4b(0x112)](_0x1cec4b(0x11e));const _0x41ce0a=a145_0x523b96[_0x1cec4b(0x136)](process[_0x1cec4b(0x11a)](),_0x224570);if(existsSync(_0x41ce0a))throw CliErrors[_0x1cec4b(0x112)](_0x1cec4b(0x119)+_0x224570+'\x22\x20already\x20exists.',_0x1cec4b(0x121));try{const _0x22314e=a145_0x523b96['dirname'](_0x41ce0a);await a145_0x3f6743[_0x1cec4b(0x120)](_0x22314e,a145_0x3f6743[_0x1cec4b(0x10c)]['W_OK']);}catch{throw CliErrors['validation'](_0x1cec4b(0x115),_0x1cec4b(0x12a));}try{console[_0x1cec4b(0x10b)](_0x1cec4b(0x10d)+_0x224570+_0x1cec4b(0x12c));const _0x17d641=getSubAppReactDemoTemplateDir();await copyDirectory(_0x17d641,_0x41ce0a),console[_0x1cec4b(0x10b)](_0x1cec4b(0x113)),await updatePackageJsonName(_0x224570),console['log'](_0x1cec4b(0x12f)),console[_0x1cec4b(0x10b)](_0x1cec4b(0x106)),console[_0x1cec4b(0x10b)](_0x1cec4b(0x132)),await formatCode(_0x41ce0a),console[_0x1cec4b(0x10b)](_0x1cec4b(0x109)),await configureProject(_0x224570,_0x117d9f,_0x58e167),console[_0x1cec4b(0x10b)](_0x1cec4b(0x107)),_0x117d9f&&await pullApiConfig(_0x41ce0a,_0x117d9f,_0x58e167,_0x5264dc),console['log'](_0x1cec4b(0x127)+_0x224570+_0x1cec4b(0x11f)),console[_0x1cec4b(0x10b)]('\x0a\x20\x20cd\x20'+_0x224570),console[_0x1cec4b(0x10b)](_0x1cec4b(0x105));}catch(_0x935334){try{existsSync(_0x41ce0a)&&await a145_0x3f6743['rm'](_0x41ce0a,{'recursive':!![],'force':!![]});}catch{}throw _0x935334;}}async function updatePackageJsonName(_0x1284e8){const _0x562a6c=a145_0x3475,_0x39a6ab=a145_0x523b96[_0x562a6c(0x136)](process[_0x562a6c(0x11a)](),_0x1284e8),_0xfede28=a145_0x523b96[_0x562a6c(0x13a)](_0x39a6ab,_0x562a6c(0x135)),_0x34bf65=await a145_0x3f6743['readFile'](_0xfede28,_0x562a6c(0x137)),_0x111b6f=JSON[_0x562a6c(0x13d)](_0x34bf65);_0x111b6f[_0x562a6c(0x11b)]=_0x1284e8,_0x111b6f[_0x562a6c(0x12b)]=_0x562a6c(0x101),await a145_0x3f6743[_0x562a6c(0x111)](_0xfede28,JSON[_0x562a6c(0x10a)](_0x111b6f,null,0x2)+'\x0a');}function detectPackageManager(){const _0x500da6=a145_0x3475;try{return execSync(_0x500da6(0x12d),{'stdio':_0x500da6(0x10f)}),_0x500da6(0x11d);}catch{return _0x500da6(0x123);}}async function formatCode(_0x1dde95){const _0x427bc7=a145_0x3475;try{await execAsync(_0x427bc7(0x104),{'cwd':_0x1dde95});}catch{}}async function configureProject(_0xfa8708,_0x1fc8aa,_0x58c316){const _0x2aa609=a145_0x3475,_0x379b55=a145_0x523b96[_0x2aa609(0x136)](process[_0x2aa609(0x11a)](),_0xfa8708),_0x4af65b=a145_0x523b96[_0x2aa609(0x13a)](_0x379b55,NEW_CONFIG_NAME),_0x1d9daf=readConfig(),_0x2149d6=typeof _0x1d9daf[_0x2aa609(0x116)]===_0x2aa609(0x134)?_0x1d9daf[_0x2aa609(0x116)]:undefined,_0x502036={};for(const _0x341031 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x1d9daf[_0x341031]!=null)_0x502036[_0x341031]=_0x1d9daf[_0x341031];}const _0x5244f6=buildCanonicalProjectConfig(_0x502036,{'appCodes':_0x1fc8aa?[_0x1fc8aa]:[],'env':_0x58c316||_0x2149d6||'production','metadata':{'createdAt':new Date()[_0x2aa609(0x102)](),'version':getCliVersion()}});writeConfigFile(_0x4af65b,_0x5244f6);}async function pullApiConfig(_0x2b808b,_0x47823e,_0x58ceb2,_0x19e69b){const _0xbb41f3=a145_0x3475,_0x4d2bcb=process[_0xbb41f3(0x11a)]();try{process[_0xbb41f3(0x12e)](_0x2b808b);const _0x35c3dd=_0x58ceb2||_0xbb41f3(0x124);initEnv(_0x35c3dd),console['log'](_0xbb41f3(0x117));const {configArray:_0xd2b950}=await fetchModelList(_0x47823e,_0x19e69b||''),_0x287ab1=await generateApiFile(_0xd2b950,'',_0x47823e,!![],_0x35c3dd,DEFAULT_API_DIR);console[_0xbb41f3(0x10b)](_0xbb41f3(0x131)+_0xd2b950[_0xbb41f3(0x108)]+_0xbb41f3(0x128)+_0x287ab1['modelCount']+_0xbb41f3(0x122));}catch(_0x46b038){console[_0xbb41f3(0x10b)]('\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`'+CLI_BIN_NAME+'\x20api\x20pull`\x20manually\x20later.');}finally{process[_0xbb41f3(0x12e)](_0x4d2bcb);}}
1
+ (function(_0x14f688,_0x561382){const _0x1b3c78=a145_0x4e30,_0x1df95c=_0x14f688();while(!![]){try{const _0x2c6bcb=-parseInt(_0x1b3c78(0x1ee))/0x1*(parseInt(_0x1b3c78(0x1c9))/0x2)+parseInt(_0x1b3c78(0x1f0))/0x3*(parseInt(_0x1b3c78(0x1d6))/0x4)+parseInt(_0x1b3c78(0x1de))/0x5*(-parseInt(_0x1b3c78(0x1c1))/0x6)+parseInt(_0x1b3c78(0x1c0))/0x7*(-parseInt(_0x1b3c78(0x1d8))/0x8)+-parseInt(_0x1b3c78(0x1e9))/0x9+parseInt(_0x1b3c78(0x1e3))/0xa*(parseInt(_0x1b3c78(0x1e0))/0xb)+parseInt(_0x1b3c78(0x1d7))/0xc;if(_0x2c6bcb===_0x561382)break;else _0x1df95c['push'](_0x1df95c['shift']());}catch(_0x571401){_0x1df95c['push'](_0x1df95c['shift']());}}}(a145_0x43e5,0xe601e));import a145_0x763727 from'path';import a145_0x4b6d0e from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';function a145_0x4e30(_0x154f74,_0x384987){_0x154f74=_0x154f74-0x1c0;const _0x43e5cc=a145_0x43e5();let _0x4e3090=_0x43e5cc[_0x154f74];return _0x4e3090;}import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{readConfig}from'../../../utils/config.js';import{getCliVersion}from'../../../utils/version.js';function a145_0x43e5(){const _0x31a857=['production','needsUpgrade','10yIvAzm','env','readFile','\x20\x20Installing\x20dependencies...','\x20model(s)','\x20\x20rabetbase\x20run\x20start\x0a','15431148mdajWl','Use\x20a\x20different\x20project\x20name.','\x20\x20√\x20Configuration\x20file\x20created','package.json','test','1wFLxTs','\x22\x20already\x20exists.','6LuQjEP','Cannot\x20create\x20project\x20in\x20current\x20directory.','Project\x20directory\x20\x22','...','W_OK','\x20\x20√\x20Code\x20formatted','stringify','301YlnFMA','10652142msYpmS','dirname','\x20api\x20pull`\x20manually\x20later.','length','access','\x0a√\x20Project\x20','\x20created\x20successfully!','trim','3745352cRnIOp','chdir','\x20\x20Pulling\x20API\x20configuration...','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','bun\x20--version','string','bun\x20run\x20format','validation','cwd','resolve','log','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','belowMinimum','345440hQPERs','74618544lKGUeR','164080lCzmjW','\x20\x20√\x20package.json\x20updated','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','*\x20Creating\x20project\x20','description','Project\x20name\x20contains\x20invalid\x20characters.','5PQLFGw','join','8752843eFgMMb'];a145_0x43e5=function(){return _0x31a857;};return a145_0x43e5();}import{CliErrors}from'../../../errors.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';const execAsync=promisify(exec);export async function createProjectNonInteractive(_0x419808,_0x580e68,_0x13794e,_0x40929c){const _0x52d436=a145_0x4e30,_0x8790da=await checkCliVersion();(_0x8790da[_0x52d436(0x1e2)]||_0x8790da[_0x52d436(0x1d5)])&&(printCliUpgradeWarning(_0x8790da),assertCliVersionSupported(_0x8790da));if(!_0x419808||_0x419808[_0x52d436(0x1c8)]()==='')throw CliErrors[_0x52d436(0x1d0)]('Project\x20name\x20cannot\x20be\x20empty.');const _0x197eb3=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x197eb3[_0x52d436(0x1ed)](_0x419808))throw CliErrors[_0x52d436(0x1d0)](_0x52d436(0x1dd),'Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters');if(_0x419808['length']>0x64)throw CliErrors['validation'](_0x52d436(0x1d4));const _0x103df2=a145_0x763727['resolve'](process[_0x52d436(0x1d1)](),_0x419808);if(existsSync(_0x103df2))throw CliErrors[_0x52d436(0x1d0)](_0x52d436(0x1f2)+_0x419808+_0x52d436(0x1ef),_0x52d436(0x1ea));try{const _0x20b81d=a145_0x763727[_0x52d436(0x1c2)](_0x103df2);await a145_0x4b6d0e[_0x52d436(0x1c5)](_0x20b81d,a145_0x4b6d0e['constants'][_0x52d436(0x1f4)]);}catch{throw CliErrors[_0x52d436(0x1d0)](_0x52d436(0x1f1),'Check\x20directory\x20permissions.');}try{console[_0x52d436(0x1d3)](_0x52d436(0x1db)+_0x419808+_0x52d436(0x1f3));const _0x53d9a7=getSubAppReactDemoTemplateDir();await copyDirectory(_0x53d9a7,_0x103df2),console[_0x52d436(0x1d3)]('\x20\x20√\x20Project\x20template\x20created'),await updatePackageJsonName(_0x419808),console[_0x52d436(0x1d3)](_0x52d436(0x1d9)),console[_0x52d436(0x1d3)](_0x52d436(0x1e6)),console[_0x52d436(0x1d3)]('\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)'),await formatCode(_0x103df2),console[_0x52d436(0x1d3)](_0x52d436(0x1f5)),await configureProject(_0x419808,_0x13794e,_0x580e68),console[_0x52d436(0x1d3)](_0x52d436(0x1eb)),_0x13794e&&await pullApiConfig(_0x103df2,_0x13794e,_0x580e68,_0x40929c),console[_0x52d436(0x1d3)](_0x52d436(0x1c6)+_0x419808+_0x52d436(0x1c7)),console[_0x52d436(0x1d3)]('\x0a\x20\x20cd\x20'+_0x419808),console[_0x52d436(0x1d3)](_0x52d436(0x1e8));}catch(_0x26d21a){try{existsSync(_0x103df2)&&await a145_0x4b6d0e['rm'](_0x103df2,{'recursive':!![],'force':!![]});}catch{}throw _0x26d21a;}}async function updatePackageJsonName(_0x7aa037){const _0x5ccc31=a145_0x4e30,_0x315817=a145_0x763727[_0x5ccc31(0x1d2)](process[_0x5ccc31(0x1d1)](),_0x7aa037),_0xb7ba00=a145_0x763727[_0x5ccc31(0x1df)](_0x315817,_0x5ccc31(0x1ec)),_0x2a1cc5=await a145_0x4b6d0e[_0x5ccc31(0x1e5)](_0xb7ba00,'utf-8'),_0x53eb46=JSON['parse'](_0x2a1cc5);_0x53eb46['name']=_0x7aa037,_0x53eb46[_0x5ccc31(0x1dc)]=_0x5ccc31(0x1cc),await a145_0x4b6d0e['writeFile'](_0xb7ba00,JSON[_0x5ccc31(0x1f6)](_0x53eb46,null,0x2)+'\x0a');}function detectPackageManager(){const _0x4730c0=a145_0x4e30;try{return execSync(_0x4730c0(0x1cd),{'stdio':'ignore'}),'bun';}catch{return'npm';}}async function formatCode(_0x5b144d){const _0x30e74a=a145_0x4e30;try{await execAsync(_0x30e74a(0x1cf),{'cwd':_0x5b144d});}catch{}}async function configureProject(_0xf20e49,_0x2f75eb,_0x5df627){const _0xa9d437=a145_0x4e30,_0x48879c=a145_0x763727[_0xa9d437(0x1d2)](process[_0xa9d437(0x1d1)](),_0xf20e49),_0x1056be=a145_0x763727[_0xa9d437(0x1df)](_0x48879c,NEW_CONFIG_NAME),_0x3ba381=readConfig(),_0x1d8442=typeof _0x3ba381[_0xa9d437(0x1e4)]===_0xa9d437(0x1ce)?_0x3ba381[_0xa9d437(0x1e4)]:undefined,_0x3d23eb={};for(const _0x552c97 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x3ba381[_0x552c97]!=null)_0x3d23eb[_0x552c97]=_0x3ba381[_0x552c97];}const _0x42b58a=buildCanonicalProjectConfig(_0x3d23eb,{'appCodes':_0x2f75eb?[_0x2f75eb]:[],'env':_0x5df627||_0x1d8442||_0xa9d437(0x1e1),'metadata':{'createdAt':new Date()['toLocaleString'](),'version':getCliVersion()}});writeConfigFile(_0x1056be,_0x42b58a);}async function pullApiConfig(_0x2938c3,_0x4d248d,_0x7b882a,_0x2b52b1){const _0x5dc7bd=a145_0x4e30,_0x143294=process[_0x5dc7bd(0x1d1)]();try{process[_0x5dc7bd(0x1ca)](_0x2938c3);const _0x4f16ae=_0x7b882a||'production';initEnv(_0x4f16ae),console['log'](_0x5dc7bd(0x1cb));const {configArray:_0x398220}=await fetchModelList(_0x4d248d,_0x2b52b1||''),_0x58aad3=await generateApiFile(_0x398220,'',_0x4d248d,!![],_0x4f16ae,DEFAULT_API_DIR);console[_0x5dc7bd(0x1d3)]('\x20\x20√\x20Pulled\x20'+_0x398220[_0x5dc7bd(0x1c4)]+'\x20dataset(s),\x20generated\x20'+_0x58aad3['modelCount']+_0x5dc7bd(0x1e7));}catch(_0x3eafe2){console['log'](_0x5dc7bd(0x1da)+CLI_BIN_NAME+_0x5dc7bd(0x1c3));}finally{process[_0x5dc7bd(0x1ca)](_0x143294);}}
@@ -1 +1 @@
1
- const a146_0x19aef7=a146_0x37f6;function a146_0x37f6(_0xe5ac7c,_0x4841f2){_0xe5ac7c=_0xe5ac7c-0xb2;const _0x16850b=a146_0x1685();let _0x37f6c9=_0x16850b[_0xe5ac7c];return _0x37f6c9;}function a146_0x1685(){const _0x10834d=['join','projects','dirname','2201938XvzYsV','3757790vCqszv','3444300TdWleG','7982112ikTvlj','templates','../../../../','1351302yaDwXf','3464GBIvpI','868729BOvYPE','31199RzFqIE','resolve','sub-app-react-demo'];a146_0x1685=function(){return _0x10834d;};return a146_0x1685();}(function(_0x5d846c,_0x149bc7){const _0x20abb7=a146_0x37f6,_0x5edb82=_0x5d846c();while(!![]){try{const _0x599995=-parseInt(_0x20abb7(0xba))/0x1+-parseInt(_0x20abb7(0xb2))/0x2+-parseInt(_0x20abb7(0xb8))/0x3+parseInt(_0x20abb7(0xb4))/0x4+-parseInt(_0x20abb7(0xb3))/0x5+parseInt(_0x20abb7(0xb5))/0x6+parseInt(_0x20abb7(0xbb))/0x7*(parseInt(_0x20abb7(0xb9))/0x8);if(_0x599995===_0x149bc7)break;else _0x5edb82['push'](_0x5edb82['shift']());}catch(_0x4550e3){_0x5edb82['push'](_0x5edb82['shift']());}}}(a146_0x1685,0xe7d72));import a146_0x5b5994 from'node:path';import{fileURLToPath}from'node:url';const __dirname=a146_0x5b5994[a146_0x19aef7(0xc0)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x4d2736=a146_0x19aef7;return a146_0x5b5994[_0x4d2736(0xbc)](__dirname,_0x4d2736(0xb7));}export function getSubAppReactDemoTemplateDir(){const _0x511afd=a146_0x19aef7;return a146_0x5b5994[_0x511afd(0xbe)](getRabetbaseCliPackageRoot(),_0x511afd(0xb6),_0x511afd(0xbf),_0x511afd(0xbd));}
1
+ const a146_0x527960=a146_0x467c;(function(_0x273e66,_0x49d14d){const _0xbdf46f=a146_0x467c,_0xe619ca=_0x273e66();while(!![]){try{const _0x3c9abb=parseInt(_0xbdf46f(0xc3))/0x1*(-parseInt(_0xbdf46f(0xd1))/0x2)+parseInt(_0xbdf46f(0xc6))/0x3*(-parseInt(_0xbdf46f(0xd0))/0x4)+-parseInt(_0xbdf46f(0xc8))/0x5+-parseInt(_0xbdf46f(0xc4))/0x6+-parseInt(_0xbdf46f(0xcc))/0x7*(-parseInt(_0xbdf46f(0xcb))/0x8)+parseInt(_0xbdf46f(0xcd))/0x9+parseInt(_0xbdf46f(0xce))/0xa;if(_0x3c9abb===_0x49d14d)break;else _0xe619ca['push'](_0xe619ca['shift']());}catch(_0x17fe36){_0xe619ca['push'](_0xe619ca['shift']());}}}(a146_0x1191,0x9dbcd));import a146_0x4ee2f2 from'node:path';import{fileURLToPath}from'node:url';function a146_0x1191(){const _0x2939f4=['../../../../','231SXQnss','dirname','1303105TAUQYm','sub-app-react-demo','resolve','50864cIKjGQ','1421ReerJC','1215720OVldnZ','19221000FoAHgC','projects','15524uCdHoX','3262RgUrmO','join','655AfkAdA','6443988PfKaJe'];a146_0x1191=function(){return _0x2939f4;};return a146_0x1191();}const __dirname=a146_0x4ee2f2[a146_0x527960(0xc7)](fileURLToPath(import.meta.url));function a146_0x467c(_0x124693,_0x5b13a0){_0x124693=_0x124693-0xc3;const _0x119139=a146_0x1191();let _0x467c95=_0x119139[_0x124693];return _0x467c95;}export function getRabetbaseCliPackageRoot(){const _0x1f0e48=a146_0x527960;return a146_0x4ee2f2[_0x1f0e48(0xca)](__dirname,_0x1f0e48(0xc5));}export function getSubAppReactDemoTemplateDir(){const _0x405ccd=a146_0x527960;return a146_0x4ee2f2[_0x405ccd(0xd2)](getRabetbaseCliPackageRoot(),'templates',_0x405ccd(0xcf),_0x405ccd(0xc9));}
@@ -1 +1 @@
1
- (function(_0x55e122,_0x279748){const _0x1f3d07=a147_0x32db,_0x21dc92=_0x55e122();while(!![]){try{const _0x45d6a2=parseInt(_0x1f3d07(0x1b4))/0x1*(-parseInt(_0x1f3d07(0x1ae))/0x2)+parseInt(_0x1f3d07(0x1b5))/0x3*(-parseInt(_0x1f3d07(0x1aa))/0x4)+parseInt(_0x1f3d07(0x1b1))/0x5+-parseInt(_0x1f3d07(0x1b2))/0x6+parseInt(_0x1f3d07(0x1ab))/0x7*(-parseInt(_0x1f3d07(0x1b7))/0x8)+-parseInt(_0x1f3d07(0x1b3))/0x9+parseInt(_0x1f3d07(0x1b0))/0xa;if(_0x45d6a2===_0x279748)break;else _0x21dc92['push'](_0x21dc92['shift']());}catch(_0x243a15){_0x21dc92['push'](_0x21dc92['shift']());}}}(a147_0x3445,0x3565a));import a147_0x51f137 from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a147_0x32db(_0xb2a620,_0xa55a49){_0xb2a620=_0xb2a620-0x1a8;const _0x3445ca=a147_0x3445();let _0x32db82=_0x3445ca[_0xb2a620];return _0x32db82;}import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';function a147_0x3445(){const _0x193bfc=['119256xgiBTu','cwd','开始复制项目模板','now','copy','error','3828DhYgSj','182TDsJfU','message','resolve','2NTBhoJ','info','11735530COjTrj','2026580pfoHIw','962082CtWCZg','2623266LlnlzM','173361NsVyzC','1089wlfESV','success'];a147_0x3445=function(){return _0x193bfc;};return a147_0x3445();}const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x1c66a3){const _0x39b563=a147_0x32db,_0x17995f=Date[_0x39b563(0x1ba)](),_0x3f0105=a147_0x51f137[_0x39b563(0x1ad)](process[_0x39b563(0x1b8)](),_0x1c66a3);try{logger[_0x39b563(0x1af)](_0x39b563(0x1a8),_0x39b563(0x1b9),{'projectCode':_0x1c66a3,'templateDir':templateDir}),await copyDirectory(templateDir,_0x3f0105);const _0x16c8e8=Date['now']()-_0x17995f;logger[_0x39b563(0x1b6)](_0x39b563(0x1a8),'项目模板复制完成',_0x16c8e8,{'projectCode':_0x1c66a3});}catch(_0x35a0c8){const _0x49612f=Date[_0x39b563(0x1ba)]()-_0x17995f;logger[_0x39b563(0x1a9)]('copy','项目模板复制失败',{'projectCode':_0x1c66a3,'error':_0x35a0c8 instanceof Error?_0x35a0c8[_0x39b563(0x1ac)]:String(_0x35a0c8),'duration':_0x49612f});throw _0x35a0c8;}return formatElapsed(_0x17995f);}
1
+ (function(_0x550e0e,_0x3c93c2){const _0x4815b4=a147_0x4c0a,_0x4835c0=_0x550e0e();while(!![]){try{const _0x4a069a=-parseInt(_0x4815b4(0x9e))/0x1*(parseInt(_0x4815b4(0x8f))/0x2)+parseInt(_0x4815b4(0x9c))/0x3+-parseInt(_0x4815b4(0x97))/0x4+-parseInt(_0x4815b4(0x93))/0x5+parseInt(_0x4815b4(0x8e))/0x6+parseInt(_0x4815b4(0x9b))/0x7*(-parseInt(_0x4815b4(0x96))/0x8)+parseInt(_0x4815b4(0x92))/0x9;if(_0x4a069a===_0x3c93c2)break;else _0x4835c0['push'](_0x4835c0['shift']());}catch(_0x35c471){_0x4835c0['push'](_0x4835c0['shift']());}}}(a147_0x391c,0x6f944));import a147_0x28ab13 from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();function a147_0x391c(){const _0x3b44da=['2586356DwQTBH','resolve','now','cwd','266tNayON','1772478TTAzHv','开始复制项目模板','6453AcQXXB','3295152xunUuQ','164CXMuXx','copy','项目模板复制完成','12669453DUoJVv','149570WgOOZN','success','message','186328zHSUiP'];a147_0x391c=function(){return _0x3b44da;};return a147_0x391c();}function a147_0x4c0a(_0x5d9508,_0x5a8100){_0x5d9508=_0x5d9508-0x8e;const _0x391c07=a147_0x391c();let _0x4c0ac8=_0x391c07[_0x5d9508];return _0x4c0ac8;}export async function copyProjectTemplate(_0x5ad9ee){const _0x5ea66e=a147_0x4c0a,_0x3c8f1b=Date[_0x5ea66e(0x99)](),_0x1de548=a147_0x28ab13[_0x5ea66e(0x98)](process[_0x5ea66e(0x9a)](),_0x5ad9ee);try{logger['info']('copy',_0x5ea66e(0x9d),{'projectCode':_0x5ad9ee,'templateDir':templateDir}),await copyDirectory(templateDir,_0x1de548);const _0x226083=Date[_0x5ea66e(0x99)]()-_0x3c8f1b;logger[_0x5ea66e(0x94)](_0x5ea66e(0x90),_0x5ea66e(0x91),_0x226083,{'projectCode':_0x5ad9ee});}catch(_0x364344){const _0x2a5574=Date[_0x5ea66e(0x99)]()-_0x3c8f1b;logger['error'](_0x5ea66e(0x90),'项目模板复制失败',{'projectCode':_0x5ad9ee,'error':_0x364344 instanceof Error?_0x364344[_0x5ea66e(0x95)]:String(_0x364344),'duration':_0x2a5574});throw _0x364344;}return formatElapsed(_0x3c8f1b);}
@@ -1 +1 @@
1
- (function(_0x4b8120,_0x44fc9c){const _0x35117a=a148_0x29c0,_0x235e30=_0x4b8120();while(!![]){try{const _0x50f8e9=parseInt(_0x35117a(0x169))/0x1*(parseInt(_0x35117a(0x161))/0x2)+parseInt(_0x35117a(0x16d))/0x3*(-parseInt(_0x35117a(0x15d))/0x4)+parseInt(_0x35117a(0x16c))/0x5*(-parseInt(_0x35117a(0x16b))/0x6)+-parseInt(_0x35117a(0x15b))/0x7+-parseInt(_0x35117a(0x165))/0x8+-parseInt(_0x35117a(0x167))/0x9*(parseInt(_0x35117a(0x166))/0xa)+parseInt(_0x35117a(0x16a))/0xb;if(_0x50f8e9===_0x44fc9c)break;else _0x235e30['push'](_0x235e30['shift']());}catch(_0x1ca032){_0x235e30['push'](_0x235e30['shift']());}}}(a148_0x4255,0xd4ba7));import a148_0x3d7a0b from'node:path';function a148_0x29c0(_0x324b24,_0x5683ed){_0x324b24=_0x324b24-0x159;const _0x42559e=a148_0x4255();let _0x29c0fb=_0x42559e[_0x324b24];return _0x29c0fb;}import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x4f2c8b){const _0x1ad56b=a148_0x29c0,_0x1e1b25=Date[_0x1ad56b(0x159)](),_0x354533=a148_0x3d7a0b[_0x1ad56b(0x16e)](process[_0x1ad56b(0x15a)](),_0x4f2c8b);try{logger[_0x1ad56b(0x162)](_0x1ad56b(0x15c),_0x1ad56b(0x15f),{'projectCode':_0x4f2c8b}),await execa(resolveNpmBin(_0x1ad56b(0x160)),[_0x1ad56b(0x163),'--write','.'],{'cwd':_0x354533});const _0x45ef38=Date[_0x1ad56b(0x159)]()-_0x1e1b25;logger[_0x1ad56b(0x15e)](_0x1ad56b(0x15c),'代码格式化完成',_0x45ef38,{'projectCode':_0x4f2c8b});}catch(_0x50a33c){const _0x4b5700=Date['now']()-_0x1e1b25;logger['error'](_0x1ad56b(0x15c),_0x1ad56b(0x164),{'projectCode':_0x4f2c8b,'error':_0x50a33c instanceof Error?_0x50a33c[_0x1ad56b(0x168)]:String(_0x50a33c),'duration':_0x4b5700});throw _0x50a33c;}return formatElapsed(_0x1e1b25);}function a148_0x4255(){const _0x217943=['31911iwrPuq','resolve','now','cwd','4247166jPzmWD','format','212jEHgfs','success','开始格式化代码','npx','6PrrWSB','info','prettier','代码格式化失败','934208AZxuKr','20JNuylz','649215fHiOTl','message','119204CfLRvH','33686400xQUKRu','6702792pDqbLC','5RYoxvc'];a148_0x4255=function(){return _0x217943;};return a148_0x4255();}
1
+ (function(_0x2639b4,_0x752275){const _0x173958=a148_0x3349,_0x1643b6=_0x2639b4();while(!![]){try{const _0x18d0e3=parseInt(_0x173958(0x96))/0x1+parseInt(_0x173958(0xa3))/0x2+-parseInt(_0x173958(0x98))/0x3*(-parseInt(_0x173958(0x9b))/0x4)+-parseInt(_0x173958(0xa4))/0x5*(parseInt(_0x173958(0xa1))/0x6)+parseInt(_0x173958(0x9f))/0x7+parseInt(_0x173958(0x97))/0x8+-parseInt(_0x173958(0xa5))/0x9;if(_0x18d0e3===_0x752275)break;else _0x1643b6['push'](_0x1643b6['shift']());}catch(_0x2b67a0){_0x1643b6['push'](_0x1643b6['shift']());}}}(a148_0x2250,0x19eeb));import a148_0x241d5a from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a148_0x3349(_0x37c6fc,_0x33c54d){_0x37c6fc=_0x37c6fc-0x94;const _0x225066=a148_0x2250();let _0x3349bd=_0x225066[_0x37c6fc];return _0x3349bd;}import{logger}from'../../../utils/logger.js';function a148_0x2250(){const _0x355b81=['npx','开始格式化代码','prettier','1234870dfRedi','resolve','6nujHry','now','52940eMAZfE','179890WJcBtI','4395015FQMcNJ','info','cwd','--write','format','message','185370xkSeWL','981784LUJstj','358677fTRdoW','error','代码格式化失败','4GjxOvw'];a148_0x2250=function(){return _0x355b81;};return a148_0x2250();}import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0xcf69a5){const _0x2101f7=a148_0x3349,_0x3f9606=Date[_0x2101f7(0xa2)](),_0x548632=a148_0x241d5a[_0x2101f7(0xa0)](process[_0x2101f7(0xa7)](),_0xcf69a5);try{logger[_0x2101f7(0xa6)](_0x2101f7(0x94),_0x2101f7(0x9d),{'projectCode':_0xcf69a5}),await execa(resolveNpmBin(_0x2101f7(0x9c)),[_0x2101f7(0x9e),_0x2101f7(0xa8),'.'],{'cwd':_0x548632});const _0x3b9bc7=Date[_0x2101f7(0xa2)]()-_0x3f9606;logger['success'](_0x2101f7(0x94),'代码格式化完成',_0x3b9bc7,{'projectCode':_0xcf69a5});}catch(_0x31f1e1){const _0x5bc00a=Date[_0x2101f7(0xa2)]()-_0x3f9606;logger[_0x2101f7(0x99)]('format',_0x2101f7(0x9a),{'projectCode':_0xcf69a5,'error':_0x31f1e1 instanceof Error?_0x31f1e1[_0x2101f7(0x95)]:String(_0x31f1e1),'duration':_0x5bc00a});throw _0x31f1e1;}return formatElapsed(_0x3f9606);}
@@ -1 +1 @@
1
- (function(_0x16d576,_0x332e3b){const _0xd5d326=a149_0x5e3f,_0x3cc406=_0x16d576();while(!![]){try{const _0x57fc57=parseInt(_0xd5d326(0x7d))/0x1+parseInt(_0xd5d326(0x84))/0x2+parseInt(_0xd5d326(0x86))/0x3*(-parseInt(_0xd5d326(0x79))/0x4)+parseInt(_0xd5d326(0x8c))/0x5+parseInt(_0xd5d326(0x87))/0x6*(-parseInt(_0xd5d326(0x83))/0x7)+parseInt(_0xd5d326(0x85))/0x8+-parseInt(_0xd5d326(0x8b))/0x9;if(_0x57fc57===_0x332e3b)break;else _0x3cc406['push'](_0x3cc406['shift']());}catch(_0x2394d7){_0x3cc406['push'](_0x3cc406['shift']());}}}(a149_0x5ca8,0x4cae4));function a149_0x5e3f(_0xcb543b,_0x310a52){_0xcb543b=_0xcb543b-0x79;const _0x5ca8ae=a149_0x5ca8();let _0x5e3fa3=_0x5ca8ae[_0xcb543b];return _0x5e3fa3;}import a149_0x4dfb7e from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';function a149_0x5ca8(){const _0xfdb4ec=['now','依赖安装失败','resolve','info','1211OEgzAw','762082VFGHje','4266552uflSLM','962391hnFfnZ','1518dddGlF','https://registry.npmmirror.com','npm','success','6179895EBAHhn','416075YtBUyv','4MfinWK','error','install','message','367730pWSGZv','cwd'];a149_0x5ca8=function(){return _0xfdb4ec;};return a149_0x5ca8();}export async function installDependencies(_0xe708d5){const _0x3c8d61=a149_0x5e3f,_0x5afa22=Date[_0x3c8d61(0x7f)](),_0x580fa6=a149_0x4dfb7e[_0x3c8d61(0x81)](process[_0x3c8d61(0x7e)](),_0xe708d5);try{logger[_0x3c8d61(0x82)](_0x3c8d61(0x7b),'开始安装依赖',{'projectCode':_0xe708d5,'registry':'https://registry.npmmirror.com'}),await execa(resolveNpmBin(_0x3c8d61(0x89)),[_0x3c8d61(0x7b),'--registry',_0x3c8d61(0x88)],{'cwd':_0x580fa6});const _0x539e58=Date[_0x3c8d61(0x7f)]()-_0x5afa22;logger[_0x3c8d61(0x8a)](_0x3c8d61(0x7b),'依赖安装完成',_0x539e58,{'projectCode':_0xe708d5});}catch(_0x31f920){const _0x1c1da0=Date[_0x3c8d61(0x7f)]()-_0x5afa22;logger[_0x3c8d61(0x7a)](_0x3c8d61(0x7b),_0x3c8d61(0x80),{'projectCode':_0xe708d5,'error':_0x31f920 instanceof Error?_0x31f920[_0x3c8d61(0x7c)]:String(_0x31f920),'duration':_0x1c1da0});throw _0x31f920;}return formatElapsed(_0x5afa22);}
1
+ function a149_0x31b3(_0x16149a,_0x26c370){_0x16149a=_0x16149a-0xa9;const _0x1ee343=a149_0x1ee3();let _0x31b357=_0x1ee343[_0x16149a];return _0x31b357;}(function(_0x174fac,_0x254f54){const _0xd87ef7=a149_0x31b3,_0xd99577=_0x174fac();while(!![]){try{const _0x589d07=-parseInt(_0xd87ef7(0xbe))/0x1*(-parseInt(_0xd87ef7(0xba))/0x2)+-parseInt(_0xd87ef7(0xb8))/0x3+parseInt(_0xd87ef7(0xb7))/0x4+parseInt(_0xd87ef7(0xb9))/0x5+-parseInt(_0xd87ef7(0xb1))/0x6*(-parseInt(_0xd87ef7(0xab))/0x7)+parseInt(_0xd87ef7(0xad))/0x8+-parseInt(_0xd87ef7(0xb4))/0x9;if(_0x589d07===_0x254f54)break;else _0xd99577['push'](_0xd99577['shift']());}catch(_0x4adc84){_0xd99577['push'](_0xd99577['shift']());}}}(a149_0x1ee3,0xe527b));import a149_0x4ad217 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a149_0x1ee3(){const _0x1f7b3a=['info','message','1111914ouKedT','依赖安装完成','--registry','19352862AOcamM','resolve','install','3853384IUGlZp','629532uWsOpt','2277030oOhmrF','1905334xajPMO','cwd','依赖安装失败','npm','1JdssaA','now','error','28LVVVaK','开始安装依赖','1488688aLGWSh','https://registry.npmmirror.com'];a149_0x1ee3=function(){return _0x1f7b3a;};return a149_0x1ee3();}import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x14a1b){const _0x431047=a149_0x31b3,_0x3d2844=Date[_0x431047(0xa9)](),_0x5ea88b=a149_0x4ad217[_0x431047(0xb5)](process[_0x431047(0xbb)](),_0x14a1b);try{logger[_0x431047(0xaf)](_0x431047(0xb6),_0x431047(0xac),{'projectCode':_0x14a1b,'registry':_0x431047(0xae)}),await execa(resolveNpmBin(_0x431047(0xbd)),[_0x431047(0xb6),_0x431047(0xb3),_0x431047(0xae)],{'cwd':_0x5ea88b});const _0x355b30=Date[_0x431047(0xa9)]()-_0x3d2844;logger['success'](_0x431047(0xb6),_0x431047(0xb2),_0x355b30,{'projectCode':_0x14a1b});}catch(_0x405c22){const _0x3c26b5=Date[_0x431047(0xa9)]()-_0x3d2844;logger[_0x431047(0xaa)](_0x431047(0xb6),_0x431047(0xbc),{'projectCode':_0x14a1b,'error':_0x405c22 instanceof Error?_0x405c22[_0x431047(0xb0)]:String(_0x405c22),'duration':_0x3c26b5});throw _0x405c22;}return formatElapsed(_0x3d2844);}
@@ -1 +1 @@
1
- function a150_0x3a62(_0x425368,_0x487558){_0x425368=_0x425368-0x1b7;const _0x18e272=a150_0x18e2();let _0x3a62ca=_0x18e272[_0x425368];return _0x3a62ca;}const a150_0x15dbf2=a150_0x3a62;(function(_0x1770dc,_0xf85967){const _0xcb0418=a150_0x3a62,_0x7ff10e=_0x1770dc();while(!![]){try{const _0x2aee5b=parseInt(_0xcb0418(0x1c9))/0x1+-parseInt(_0xcb0418(0x1cd))/0x2*(parseInt(_0xcb0418(0x1db))/0x3)+parseInt(_0xcb0418(0x1c6))/0x4*(parseInt(_0xcb0418(0x1d0))/0x5)+parseInt(_0xcb0418(0x1c8))/0x6*(parseInt(_0xcb0418(0x1dc))/0x7)+-parseInt(_0xcb0418(0x1d6))/0x8*(-parseInt(_0xcb0418(0x1cc))/0x9)+-parseInt(_0xcb0418(0x1c4))/0xa+-parseInt(_0xcb0418(0x1ca))/0xb;if(_0x2aee5b===_0xf85967)break;else _0x7ff10e['push'](_0x7ff10e['shift']());}catch(_0x3a4c08){_0x7ff10e['push'](_0x7ff10e['shift']());}}}(a150_0x18e2,0x792cb));function a150_0x18e2(){const _0x291d16=['create','string','upgrade','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','Create\x20a\x20new\x20project','Auto-confirm\x20prompts','Project\x20name','name','appcode','nonInteractive','../../commands/project/create/non-interactive.js','str','project','2534920jpwDNX','boolean','137828IUYOHh','trim','6qFWcVm','914075xLRiGA','8752645eLsNwb','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','9ojQPht','250meWOYf','Skip\x20confirmation\x20prompt','Target\x20environment','10YwNrKd','env','validation','bool','\x20workspace\x20init','cookie','6384272oyMrrm','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','Usage:\x20','yes','App\x20code\x20to\x20initialize','9717HLuypG','1185590OnDsQU','2026-07','args'];a150_0x18e2=function(){return _0x291d16;};return a150_0x18e2();}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{initConfig}from'../../commands/project/init.js';import{upgradeApp}from'../../commands/project/upgrade.js';const initFlags=[{'name':a150_0x15dbf2(0x1bf),'type':'string','description':a150_0x15dbf2(0x1da)},{'name':a150_0x15dbf2(0x1d1),'type':'string','description':a150_0x15dbf2(0x1cf)},{'name':'yes','type':a150_0x15dbf2(0x1c5),'description':a150_0x15dbf2(0x1bc),'default':![]}],createFlags=[{'name':a150_0x15dbf2(0x1be),'type':a150_0x15dbf2(0x1b8),'description':a150_0x15dbf2(0x1bd)},{'name':a150_0x15dbf2(0x1d1),'type':a150_0x15dbf2(0x1b8),'description':a150_0x15dbf2(0x1cf)},{'name':a150_0x15dbf2(0x1bf),'type':a150_0x15dbf2(0x1b8),'description':a150_0x15dbf2(0x1cb)}],upgradeFlags=[{'name':a150_0x15dbf2(0x1d9),'type':'boolean','description':a150_0x15dbf2(0x1ce),'default':![]}];export const projectDefinitions=[{'service':a150_0x15dbf2(0x1c3),'command':'init','description':'Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+a150_0x15dbf2(0x1d4),'since':a150_0x15dbf2(0x1dd)},'flags':initFlags,async 'execute'(_0x54d462){const _0x56058f=a150_0x15dbf2;return await initConfig({'appcode':_0x54d462['str'](_0x56058f(0x1bf))||undefined,'env':_0x54d462['str'](_0x56058f(0x1d1))||undefined,'autoYes':_0x54d462[_0x56058f(0x1d3)](_0x56058f(0x1d9))}),{'ok':!![]};}},{'service':a150_0x15dbf2(0x1c3),'command':a150_0x15dbf2(0x1b7),'description':a150_0x15dbf2(0x1bb),'risk':'write','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'project-name','description':'Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','required':![]}],'flags':createFlags,async 'execute'(_0x593eac){const _0x43db77=a150_0x15dbf2,{createApp:_0x14f92c}=await import('../../commands/project/create/main.js'),{createProjectNonInteractive:_0x5cfcaf}=await import(_0x43db77(0x1c1)),_0x15d62d=_0x593eac['str'](_0x43db77(0x1be))[_0x43db77(0x1c7)]()||_0x593eac[_0x43db77(0x1de)][0x0]?.[_0x43db77(0x1c7)](),_0x4a02bd=_0x593eac[_0x43db77(0x1c2)](_0x43db77(0x1d1))||undefined,_0x369f90=_0x593eac[_0x43db77(0x1c2)](_0x43db77(0x1bf))||undefined;if(_0x593eac[_0x43db77(0x1c0)]){if(!_0x15d62d)throw CliErrors[_0x43db77(0x1d2)]('Non-interactive\x20mode\x20requires\x20a\x20project\x20name.',_0x43db77(0x1d8)+CLI_BIN_NAME+_0x43db77(0x1ba));await _0x5cfcaf(_0x15d62d,_0x4a02bd,_0x369f90,_0x593eac[_0x43db77(0x1d5)]);}else await _0x14f92c({'projectCode':_0x15d62d,'appCode':_0x369f90,'env':_0x4a02bd,'cookie':_0x593eac[_0x43db77(0x1d5)]});return{'ok':!![]};}},{'service':'project','command':a150_0x15dbf2(0x1b9),'description':a150_0x15dbf2(0x1d7),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x408274){const _0x2dc49d=a150_0x15dbf2;return await upgradeApp(_0x408274[_0x2dc49d(0x1c0)],{'yes':_0x408274[_0x2dc49d(0x1d3)](_0x2dc49d(0x1d9))}),{'ok':!![]};}}];
1
+ const a150_0x1f9fc5=a150_0x5875;(function(_0x1c41c7,_0x418140){const _0xbcee93=a150_0x5875,_0x3553fb=_0x1c41c7();while(!![]){try{const _0xe06f20=-parseInt(_0xbcee93(0xee))/0x1+-parseInt(_0xbcee93(0x109))/0x2*(parseInt(_0xbcee93(0xf4))/0x3)+-parseInt(_0xbcee93(0x10d))/0x4*(parseInt(_0xbcee93(0x10b))/0x5)+parseInt(_0xbcee93(0xef))/0x6*(parseInt(_0xbcee93(0xf0))/0x7)+-parseInt(_0xbcee93(0x106))/0x8+-parseInt(_0xbcee93(0xf2))/0x9+parseInt(_0xbcee93(0x111))/0xa;if(_0xe06f20===_0x418140)break;else _0x3553fb['push'](_0x3553fb['shift']());}catch(_0x1ea628){_0x3553fb['push'](_0x3553fb['shift']());}}}(a150_0x1073,0x5bc6e));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{initConfig}from'../../commands/project/init.js';function a150_0x1073(){const _0x221431=['Skip\x20confirmation\x20prompt','10caXVit','App\x20code\x20to\x20initialize','785716pnueFr','Target\x20environment','boolean','yes','14688990AmpsXi','Project\x20name','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','124053ZBeCNg','6kLrmxj','3783227fyqccj','nonInteractive','3092661nvEWRo','str','36MOUBrf','Auto-confirm\x20prompts','project','name','init','Usage:\x20','args','string','../../commands/project/create/main.js','trim','env','Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','\x20workspace\x20init','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','project-name','write','cookie','bool','742800svUyTD','appcode','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','113342gZTPvR'];a150_0x1073=function(){return _0x221431;};return a150_0x1073();}function a150_0x5875(_0x2707f6,_0x1c7882){_0x2707f6=_0x2707f6-0xee;const _0x107346=a150_0x1073();let _0x5875e0=_0x107346[_0x2707f6];return _0x5875e0;}import{upgradeApp}from'../../commands/project/upgrade.js';const initFlags=[{'name':a150_0x1f9fc5(0x107),'type':a150_0x1f9fc5(0xfb),'description':a150_0x1f9fc5(0x10c)},{'name':a150_0x1f9fc5(0xfe),'type':a150_0x1f9fc5(0xfb),'description':'Target\x20environment'},{'name':a150_0x1f9fc5(0x110),'type':a150_0x1f9fc5(0x10f),'description':a150_0x1f9fc5(0xf5),'default':![]}],createFlags=[{'name':a150_0x1f9fc5(0xf7),'type':a150_0x1f9fc5(0xfb),'description':a150_0x1f9fc5(0x112)},{'name':a150_0x1f9fc5(0xfe),'type':a150_0x1f9fc5(0xfb),'description':a150_0x1f9fc5(0x10e)},{'name':'appcode','type':'string','description':'App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)'}],upgradeFlags=[{'name':a150_0x1f9fc5(0x110),'type':'boolean','description':a150_0x1f9fc5(0x10a),'default':![]}];export const projectDefinitions=[{'service':a150_0x1f9fc5(0xf6),'command':a150_0x1f9fc5(0xf8),'description':a150_0x1f9fc5(0xff),'risk':a150_0x1f9fc5(0x103),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+a150_0x1f9fc5(0x100),'since':'2026-07'},'flags':initFlags,async 'execute'(_0xb62e20){const _0x2b4f57=a150_0x1f9fc5;return await initConfig({'appcode':_0xb62e20[_0x2b4f57(0xf3)](_0x2b4f57(0x107))||undefined,'env':_0xb62e20[_0x2b4f57(0xf3)](_0x2b4f57(0xfe))||undefined,'autoYes':_0xb62e20[_0x2b4f57(0x105)](_0x2b4f57(0x110))}),{'ok':!![]};}},{'service':'project','command':'create','description':'Create\x20a\x20new\x20project','risk':'write','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a150_0x1f9fc5(0x102),'description':'Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','required':![]}],'flags':createFlags,async 'execute'(_0x26be07){const _0x2e63a9=a150_0x1f9fc5,{createApp:_0x7bd03c}=await import(_0x2e63a9(0xfc)),{createProjectNonInteractive:_0xa98dbe}=await import('../../commands/project/create/non-interactive.js'),_0x4a569e=_0x26be07[_0x2e63a9(0xf3)](_0x2e63a9(0xf7))['trim']()||_0x26be07[_0x2e63a9(0xfa)][0x0]?.[_0x2e63a9(0xfd)](),_0x2389af=_0x26be07[_0x2e63a9(0xf3)](_0x2e63a9(0xfe))||undefined,_0x40d506=_0x26be07['str'](_0x2e63a9(0x107))||undefined;if(_0x26be07[_0x2e63a9(0xf1)]){if(!_0x4a569e)throw CliErrors['validation'](_0x2e63a9(0x108),_0x2e63a9(0xf9)+CLI_BIN_NAME+_0x2e63a9(0x113));await _0xa98dbe(_0x4a569e,_0x2389af,_0x40d506,_0x26be07['cookie']);}else await _0x7bd03c({'projectCode':_0x4a569e,'appCode':_0x40d506,'env':_0x2389af,'cookie':_0x26be07[_0x2e63a9(0x104)]});return{'ok':!![]};}},{'service':a150_0x1f9fc5(0xf6),'command':'upgrade','description':a150_0x1f9fc5(0x101),'risk':a150_0x1f9fc5(0x103),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x37dd7e){const _0x2ce137=a150_0x1f9fc5;return await upgradeApp(_0x37dd7e[_0x2ce137(0xf1)],{'yes':_0x37dd7e[_0x2ce137(0x105)]('yes')}),{'ok':!![]};}}];