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

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(_0x53f142,_0x1df156){const _0x5aac1e=a135_0x397f,_0x2fc16d=_0x53f142();while(!![]){try{const _0xf72059=parseInt(_0x5aac1e(0x193))/0x1+-parseInt(_0x5aac1e(0x18d))/0x2+parseInt(_0x5aac1e(0x18f))/0x3+-parseInt(_0x5aac1e(0x195))/0x4+-parseInt(_0x5aac1e(0x191))/0x5*(parseInt(_0x5aac1e(0x192))/0x6)+parseInt(_0x5aac1e(0x190))/0x7*(parseInt(_0x5aac1e(0x194))/0x8)+parseInt(_0x5aac1e(0x18e))/0x9;if(_0xf72059===_0x1df156)break;else _0x2fc16d['push'](_0x2fc16d['shift']());}catch(_0x5254d5){_0x2fc16d['push'](_0x2fc16d['shift']());}}}(a135_0xd9b0,0x8f83d));import{permitPageGet}from'../../commands/permit/page-get.js';import{permitPageSet}from'../../commands/permit/page-set.js';import{permitRoleMenus}from'../../commands/permit/role-menus.js';function a135_0xd9b0(){const _0x38652a=['1238544MgFGvk','2348244BenFNZ','29715FcMAnI','60170FRxTpy','402VfXnrI','1140184pvdypQ','600RvXVEy','3910508ikeXwP','14362XZweOl'];a135_0xd9b0=function(){return _0x38652a;};return a135_0xd9b0();}function a135_0x397f(_0x568e9a,_0x2c95b4){_0x568e9a=_0x568e9a-0x18d;const _0xd9b050=a135_0xd9b0();let _0x397f7c=_0xd9b050[_0x568e9a];return _0x397f7c;}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(_0x37144c,_0x31e692){const _0x1abdd9=a135_0x3c78,_0x40123c=_0x37144c();while(!![]){try{const _0x55836f=parseInt(_0x1abdd9(0x1c3))/0x1+parseInt(_0x1abdd9(0x1c7))/0x2*(parseInt(_0x1abdd9(0x1cb))/0x3)+-parseInt(_0x1abdd9(0x1c5))/0x4*(parseInt(_0x1abdd9(0x1c6))/0x5)+parseInt(_0x1abdd9(0x1c4))/0x6*(parseInt(_0x1abdd9(0x1c8))/0x7)+-parseInt(_0x1abdd9(0x1ca))/0x8+parseInt(_0x1abdd9(0x1c9))/0x9+-parseInt(_0x1abdd9(0x1cc))/0xa;if(_0x55836f===_0x31e692)break;else _0x40123c['push'](_0x40123c['shift']());}catch(_0x51327f){_0x40123c['push'](_0x40123c['shift']());}}}(a135_0x2bc3,0x6e8cc));function a135_0x2bc3(){const _0x22a4a3=['3EyJhAi','8456330GehFad','816766hifimw','6prZcSZ','5636cyPLRI','445cNDlwR','284612RDsvMu','704333UsbnBG','4421754AWaxOO','1017208WSrTKc'];a135_0x2bc3=function(){return _0x22a4a3;};return a135_0x2bc3();}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';function a135_0x3c78(_0x2b6d3d,_0x553e69){_0x2b6d3d=_0x2b6d3d-0x1c3;const _0x2bc3a4=a135_0x2bc3();let _0x3c7898=_0x2bc3a4[_0x2b6d3d];return _0x3c7898;}export const permitDefinitions=[permitPageGet,permitPageSet,permitRoleMenus,permitRoleMenusSet,permitRoleApisSet];
@@ -1 +1 @@
1
- const a136_0x2bbb7e=a136_0x4dd1;(function(_0x1c5143,_0x1bcc80){const _0x31f091=a136_0x4dd1,_0x675fb1=_0x1c5143();while(!![]){try{const _0x41613f=-parseInt(_0x31f091(0x104))/0x1*(-parseInt(_0x31f091(0x10b))/0x2)+parseInt(_0x31f091(0x10a))/0x3*(parseInt(_0x31f091(0x10e))/0x4)+-parseInt(_0x31f091(0x109))/0x5*(-parseInt(_0x31f091(0x110))/0x6)+parseInt(_0x31f091(0x10d))/0x7+parseInt(_0x31f091(0x112))/0x8+-parseInt(_0x31f091(0x108))/0x9*(-parseInt(_0x31f091(0x105))/0xa)+-parseInt(_0x31f091(0x10f))/0xb*(parseInt(_0x31f091(0x114))/0xc);if(_0x41613f===_0x1bcc80)break;else _0x675fb1['push'](_0x675fb1['shift']());}catch(_0x29f4ba){_0x675fb1['push'](_0x675fb1['shift']());}}}(a136_0x392b,0xa88ab));function a136_0x4dd1(_0x5af8c0,_0x54e8c9){_0x5af8c0=_0x5af8c0-0x104;const _0x392b52=a136_0x392b();let _0x4dd1fd=_0x392b52[_0x5af8c0];return _0x4dd1fd;}import{getPagePermit}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a136_0x392b(){const _0x57b589=['page-get','1416TUhReM','1wvUnei','362810PTAWEh','Page\x20permit\x20for\x20menu\x20','num','153KTvScU','5tliDVa','21bWCIvD','92028uEqZIt','menu-id','1577247oMtPYC','179216BrcBYe','137467qhGfSe','281286OYHNVS','Show\x20the\x20page\x20permission\x20snapshot\x20for\x20a\x20menu','7330976juzTkJ'];a136_0x392b=function(){return _0x57b589;};return a136_0x392b();}import{MENU_ID_FLAG,projectPagePermit}from'../../commands/permit/shared.js';export const permitPageGet={'service':'permit','command':a136_0x2bbb7e(0x113),'description':a136_0x2bbb7e(0x111),'risk':'read','flags':[MENU_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x240b3e){const _0x1f44ae=a136_0x2bbb7e,_0x4bc4fd=_0x240b3e[_0x1f44ae(0x107)](_0x1f44ae(0x10c)),_0x38361c=await getPagePermit(_0x4bc4fd);return{'ok':!![],'data':{'page':projectPagePermit(_0x38361c)},'message':_0x1f44ae(0x106)+_0x4bc4fd};}};
1
+ const a136_0x5efed3=a136_0x51a6;(function(_0x8ec13,_0x23ecfb){const _0x3707f9=a136_0x51a6,_0x1442aa=_0x8ec13();while(!![]){try{const _0x3c5ece=-parseInt(_0x3707f9(0x174))/0x1*(parseInt(_0x3707f9(0x164))/0x2)+parseInt(_0x3707f9(0x16a))/0x3+parseInt(_0x3707f9(0x172))/0x4*(parseInt(_0x3707f9(0x16d))/0x5)+-parseInt(_0x3707f9(0x16b))/0x6*(parseInt(_0x3707f9(0x168))/0x7)+-parseInt(_0x3707f9(0x16c))/0x8*(-parseInt(_0x3707f9(0x175))/0x9)+-parseInt(_0x3707f9(0x163))/0xa+-parseInt(_0x3707f9(0x16e))/0xb*(parseInt(_0x3707f9(0x166))/0xc);if(_0x3c5ece===_0x23ecfb)break;else _0x1442aa['push'](_0x1442aa['shift']());}catch(_0x1f1501){_0x1442aa['push'](_0x1442aa['shift']());}}}(a136_0x1d58,0x8ca04));import{getPagePermit}from'../../core/api-client.js';function a136_0x51a6(_0x3e535b,_0x6b91f5){_0x3e535b=_0x3e535b-0x163;const _0x1d5848=a136_0x1d58();let _0x51a6a2=_0x1d5848[_0x3e535b];return _0x51a6a2;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{MENU_ID_FLAG,projectPagePermit}from'../../commands/permit/shared.js';export const permitPageGet={'service':a136_0x5efed3(0x16f),'command':a136_0x5efed3(0x165),'description':a136_0x5efed3(0x170),'risk':a136_0x5efed3(0x173),'flags':[MENU_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x993240){const _0x3cef40=a136_0x5efed3,_0x3acb10=_0x993240[_0x3cef40(0x167)](_0x3cef40(0x169)),_0x33637b=await getPagePermit(_0x3acb10);return{'ok':!![],'data':{'page':projectPagePermit(_0x33637b)},'message':_0x3cef40(0x171)+_0x3acb10};}};function a136_0x1d58(){const _0x1771cc=['30ssxYVn','72oCCzzU','220Utfund','11kROUrz','permit','Show\x20the\x20page\x20permission\x20snapshot\x20for\x20a\x20menu','Page\x20permit\x20for\x20menu\x20','25796WAQvmN','read','1fQRghU','448587baBVUV','1799010uTNztT','934294OSUzzj','page-get','536124heKTkg','num','685888ayTvFY','menu-id','3075918GWdWKg'];a136_0x1d58=function(){return _0x1771cc;};return a136_0x1d58();}
@@ -1 +1 @@
1
- const a137_0x36089e=a137_0x4aa8;(function(_0x284747,_0x37e66c){const _0x3777e1=a137_0x4aa8,_0x339f30=_0x284747();while(!![]){try{const _0x4e3058=-parseInt(_0x3777e1(0x1e3))/0x1*(-parseInt(_0x3777e1(0x1ef))/0x2)+-parseInt(_0x3777e1(0x1e6))/0x3*(-parseInt(_0x3777e1(0x1f5))/0x4)+parseInt(_0x3777e1(0x1f0))/0x5+parseInt(_0x3777e1(0x1ff))/0x6+parseInt(_0x3777e1(0x1f7))/0x7+-parseInt(_0x3777e1(0x1f9))/0x8+-parseInt(_0x3777e1(0x1f1))/0x9*(parseInt(_0x3777e1(0x1e2))/0xa);if(_0x4e3058===_0x37e66c)break;else _0x339f30['push'](_0x339f30['shift']());}catch(_0x3f866c){_0x339f30['push'](_0x339f30['shift']());}}}(a137_0x14bf,0x7e694));import{getPagePermit,savePagePermit}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a137_0x14bf(){const _0x3d49aa=['3mzzgid','key','num','Set\x20page\x20permissions\x20for\x20a\x20menu\x20(menu/create/update/delete/detail/export/row\x20roles);\x20requires\x20--yes','join','Only\x20slots\x20present\x20in\x20`permit\x20page-get`\x20can\x20be\x20set.','menuId','/smartapi/permit/page/save','Pass\x20at\x20least\x20one\x20of:\x20','186ATTDUW','2462305leeiGH','63VVTBYJ','rolePermit','flag','push','2817908azOdIv','This\x20page\x20has\x20no\x20\x22','3091963fuoBMc','label','4773168mPLyiz','map','allowSelf','selector','menu-id','appCode','4603752ISsbEN','high-risk-write','length','validation','2714170NtrmHb','6542BwOPvq','permit','Nothing\x20to\x20set.'];a137_0x14bf=function(){return _0x3d49aa;};return a137_0x14bf();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a137_0x4aa8(_0xf30daf,_0x46a366){_0xf30daf=_0xf30daf-0x1e0;const _0x14bf80=a137_0x14bf();let _0x4aa824=_0x14bf80[_0xf30daf];return _0x4aa824;}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=a137_0x36089e(0x1ed);function collectRequestedSlots(_0x2596ce){const _0x3ad693=a137_0x36089e,_0x3ae78e=[];for(const _0x4e15ec of PAGE_SLOT_SPECS){const _0x1f6e3f=_0x2596ce[_0x3ad693(0x1f3)](_0x4e15ec[_0x3ad693(0x1f3)]);if(_0x1f6e3f===undefined||_0x1f6e3f===null)continue;const _0x57c378=splitList(String(_0x1f6e3f));if(_0x57c378['length']===0x0)throw CliErrors[_0x3ad693(0x1e1)]('--'+_0x4e15ec['flag']+'\x20cannot\x20be\x20empty.','Pass\x20at\x20least\x20one\x20role,\x20or\x20omit\x20the\x20flag.\x20Clearing\x20permissions\x20is\x20not\x20supported\x20by\x20this\x20command.');_0x3ae78e[_0x3ad693(0x1f4)]({'spec':_0x4e15ec,'refs':_0x57c378});}return _0x3ae78e;}async function buildPlan(_0x5e0a4d,_0xc38e56){const _0x4e09f8=a137_0x36089e,_0xb4db2e=_0x5e0a4d[_0x4e09f8(0x1e8)](_0x4e09f8(0x1fd)),_0x3456b3=collectRequestedSlots(_0x5e0a4d);if(_0x3456b3[_0x4e09f8(0x1e0)]===0x0)throw CliErrors['validation'](_0x4e09f8(0x1e5),_0x4e09f8(0x1ee)+PAGE_SLOT_SPECS[_0x4e09f8(0x1fa)](_0xc1912f=>'--'+_0xc1912f[_0x4e09f8(0x1f3)])[_0x4e09f8(0x1ea)](',\x20')+'.');const _0x52ef2c=await getPagePermit(_0xb4db2e),_0x43f13f={},_0x5befaa={},_0x173a8f=[];for(const {spec:_0x3973cf,refs:_0x2d250d}of _0x3456b3){const _0x4c449d=_0x52ef2c[_0x3973cf[_0x4e09f8(0x1e7)]];if(!_0x4c449d)throw CliErrors['validation'](_0x4e09f8(0x1f6)+_0x3973cf[_0x4e09f8(0x1f8)]+'\x22\x20permission\x20slot\x20('+_0x3973cf[_0x4e09f8(0x1e7)]+').',_0x4e09f8(0x1eb));_0x43f13f[_0x3973cf['key']]=projectPageSlot(_0x4c449d);const _0x34dfdd=await resolvePermitRoles(_0x5e0a4d[_0x4e09f8(0x1fe)],_0x2d250d,{'allowSelf':_0x3973cf[_0x4e09f8(0x1fb)],'label':_0x3973cf[_0x4e09f8(0x1f8)]});_0x4c449d[_0x4e09f8(0x1f2)]=_0x34dfdd,_0x5befaa[_0x3973cf[_0x4e09f8(0x1e7)]]=projectPageSlot(_0x4c449d);}const _0x1198f9={'operation':'page-set','selector':{'appCode':_0x5e0a4d[_0x4e09f8(0x1fe)],'menuId':_0xb4db2e,'slots':_0x3456b3['map'](_0x5d8338=>_0x5d8338['spec']['key'])},'before':_0x43f13f,'after':_0x5befaa,'dryRun':_0xc38e56,'backend':{'method':'POST','path':SAVE_PATH},'warnings':_0x173a8f};return{'page':_0x52ef2c,'mutation':_0x1198f9};}export const permitPageSet={'service':a137_0x36089e(0x1e4),'command':'page-set','description':a137_0x36089e(0x1e9),'risk':a137_0x36089e(0x200),'flags':[MENU_ID_FLAG,...PAGE_SET_ROLE_FLAGS,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x240d55){const _0x4e450f=a137_0x36089e,_0xf5fa62=collectRequestedSlots(_0x240d55);if(_0xf5fa62['length']===0x0)throw CliErrors[_0x4e450f(0x1e1)](_0x4e450f(0x1e5),_0x4e450f(0x1ee)+PAGE_SLOT_SPECS['map'](_0xb04581=>'--'+_0xb04581['flag'])[_0x4e450f(0x1ea)](',\x20')+'.');},async 'dryRun'(_0x1c84e0){const {mutation:_0x23fead}=await buildPlan(_0x1c84e0,!![]);return asDryRunResult(_0x23fead,{'method':'POST','url':SAVE_PATH});},async 'execute'(_0x4f4f4f){const _0x310106=a137_0x36089e,{page:_0x14a2d2,mutation:_0x5b8f99}=await buildPlan(_0x4f4f4f,![]);return await savePagePermit(_0x14a2d2),{'ok':!![],'data':_0x5b8f99,'message':'Updated\x20page\x20permit\x20for\x20menu\x20'+_0x5b8f99[_0x310106(0x1fc)][_0x310106(0x1ec)]};}};
1
+ function a137_0x5361(){const _0x580f08=['979476iadxyB','\x22\x20permission\x20slot\x20(','202489wKbVBE','/smartapi/permit/page/save','key','join','Nothing\x20to\x20set.','4314VxyOGE','8AhyjFZ','allowSelf','3063890rfAhyL','num','spec','selector','6272973aCSEWJ','4727380YDrOmM','Set\x20page\x20permissions\x20for\x20a\x20menu\x20(menu/create/update/delete/detail/export/row\x20roles);\x20requires\x20--yes','flag','label','high-risk-write','2zNbxmy','187WgKaqT','length','3436agOegY','180AjJoxn','Updated\x20page\x20permit\x20for\x20menu\x20','page-set','map','839083tJhCqi','rolePermit','Pass\x20at\x20least\x20one\x20of:\x20','\x20cannot\x20be\x20empty.','Only\x20slots\x20present\x20in\x20`permit\x20page-get`\x20can\x20be\x20set.','validation','permit','push','appCode'];a137_0x5361=function(){return _0x580f08;};return a137_0x5361();}const a137_0xe38f74=a137_0x3590;(function(_0x5211b6,_0x54f66c){const _0xbc2ef9=a137_0x3590,_0x276600=_0x5211b6();while(!![]){try{const _0x40a679=-parseInt(_0xbc2ef9(0x1db))/0x1*(parseInt(_0xbc2ef9(0x1d3))/0x2)+parseInt(_0xbc2ef9(0x1c6))/0x3*(parseInt(_0xbc2ef9(0x1d6))/0x4)+parseInt(_0xbc2ef9(0x1c9))/0x5+parseInt(_0xbc2ef9(0x1d7))/0x6*(parseInt(_0xbc2ef9(0x1c1))/0x7)+parseInt(_0xbc2ef9(0x1c7))/0x8*(parseInt(_0xbc2ef9(0x1cd))/0x9)+-parseInt(_0xbc2ef9(0x1ce))/0xa+parseInt(_0xbc2ef9(0x1d4))/0xb*(-parseInt(_0xbc2ef9(0x1bf))/0xc);if(_0x40a679===_0x54f66c)break;else _0x276600['push'](_0x276600['shift']());}catch(_0x484160){_0x276600['push'](_0x276600['shift']());}}}(a137_0x5361,0xae2c7));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_0x3590(_0x3a7696,_0x55fe2){_0x3a7696=_0x3a7696-0x1bc;const _0x536176=a137_0x5361();let _0x3590d7=_0x536176[_0x3a7696];return _0x3590d7;}import{MENU_ID_FLAG,PAGE_SET_ROLE_FLAGS,PAGE_SLOT_SPECS,projectPageSlot,resolvePermitRoles,splitList}from'../../commands/permit/shared.js';const SAVE_PATH=a137_0xe38f74(0x1c2);function collectRequestedSlots(_0x468104){const _0x31e8a4=a137_0xe38f74,_0x4ad80d=[];for(const _0x161d8d of PAGE_SLOT_SPECS){const _0x7a9fa3=_0x468104['flag'](_0x161d8d[_0x31e8a4(0x1d0)]);if(_0x7a9fa3===undefined||_0x7a9fa3===null)continue;const _0x5a07bd=splitList(String(_0x7a9fa3));if(_0x5a07bd[_0x31e8a4(0x1d5)]===0x0)throw CliErrors['validation']('--'+_0x161d8d[_0x31e8a4(0x1d0)]+_0x31e8a4(0x1de),'Pass\x20at\x20least\x20one\x20role,\x20or\x20omit\x20the\x20flag.\x20Clearing\x20permissions\x20is\x20not\x20supported\x20by\x20this\x20command.');_0x4ad80d[_0x31e8a4(0x1bd)]({'spec':_0x161d8d,'refs':_0x5a07bd});}return _0x4ad80d;}async function buildPlan(_0x3da4ba,_0x34efb2){const _0x4b5ffb=a137_0xe38f74,_0x444d8a=_0x3da4ba[_0x4b5ffb(0x1ca)]('menu-id'),_0x3975bf=collectRequestedSlots(_0x3da4ba);if(_0x3975bf[_0x4b5ffb(0x1d5)]===0x0)throw CliErrors[_0x4b5ffb(0x1e0)](_0x4b5ffb(0x1c5),_0x4b5ffb(0x1dd)+PAGE_SLOT_SPECS[_0x4b5ffb(0x1da)](_0x34c9a6=>'--'+_0x34c9a6[_0x4b5ffb(0x1d0)])[_0x4b5ffb(0x1c4)](',\x20')+'.');const _0x40945c=await getPagePermit(_0x444d8a),_0x245991={},_0x34c60e={},_0x811ac8=[];for(const {spec:_0x4b2f65,refs:_0xfa824b}of _0x3975bf){const _0x1e20eb=_0x40945c[_0x4b2f65[_0x4b5ffb(0x1c3)]];if(!_0x1e20eb)throw CliErrors[_0x4b5ffb(0x1e0)]('This\x20page\x20has\x20no\x20\x22'+_0x4b2f65[_0x4b5ffb(0x1d1)]+_0x4b5ffb(0x1c0)+_0x4b2f65[_0x4b5ffb(0x1c3)]+').',_0x4b5ffb(0x1df));_0x245991[_0x4b2f65[_0x4b5ffb(0x1c3)]]=projectPageSlot(_0x1e20eb);const _0x39406a=await resolvePermitRoles(_0x3da4ba[_0x4b5ffb(0x1be)],_0xfa824b,{'allowSelf':_0x4b2f65[_0x4b5ffb(0x1c8)],'label':_0x4b2f65['label']});_0x1e20eb[_0x4b5ffb(0x1dc)]=_0x39406a,_0x34c60e[_0x4b2f65['key']]=projectPageSlot(_0x1e20eb);}const _0x21b9bf={'operation':_0x4b5ffb(0x1d9),'selector':{'appCode':_0x3da4ba[_0x4b5ffb(0x1be)],'menuId':_0x444d8a,'slots':_0x3975bf[_0x4b5ffb(0x1da)](_0x19946b=>_0x19946b[_0x4b5ffb(0x1cb)][_0x4b5ffb(0x1c3)])},'before':_0x245991,'after':_0x34c60e,'dryRun':_0x34efb2,'backend':{'method':'POST','path':SAVE_PATH},'warnings':_0x811ac8};return{'page':_0x40945c,'mutation':_0x21b9bf};}export const permitPageSet={'service':a137_0xe38f74(0x1bc),'command':'page-set','description':a137_0xe38f74(0x1cf),'risk':a137_0xe38f74(0x1d2),'flags':[MENU_ID_FLAG,...PAGE_SET_ROLE_FLAGS,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x30a826){const _0x5f17f1=a137_0xe38f74,_0x549acb=collectRequestedSlots(_0x30a826);if(_0x549acb['length']===0x0)throw CliErrors[_0x5f17f1(0x1e0)]('Nothing\x20to\x20set.','Pass\x20at\x20least\x20one\x20of:\x20'+PAGE_SLOT_SPECS['map'](_0xfa9490=>'--'+_0xfa9490['flag'])[_0x5f17f1(0x1c4)](',\x20')+'.');},async 'dryRun'(_0x15d00e){const {mutation:_0x4bbd62}=await buildPlan(_0x15d00e,!![]);return asDryRunResult(_0x4bbd62,{'method':'POST','url':SAVE_PATH});},async 'execute'(_0x21d5fd){const _0x38c69c=a137_0xe38f74,{page:_0x14d707,mutation:_0x2bb3f4}=await buildPlan(_0x21d5fd,![]);return await savePagePermit(_0x14d707),{'ok':!![],'data':_0x2bb3f4,'message':_0x38c69c(0x1d8)+_0x2bb3f4[_0x38c69c(0x1cc)]['menuId']};}};
@@ -1 +1 @@
1
- function a138_0x56af(_0x1e9be2,_0x15896b){_0x1e9be2=_0x1e9be2-0x12b;const _0x5988c3=a138_0x5988();let _0x56afb9=_0x5988c3[_0x1e9be2];return _0x56afb9;}const a138_0x9f1175=a138_0x56af;(function(_0x4b75d5,_0x45a241){const _0x10f882=a138_0x56af,_0x44c160=_0x4b75d5();while(!![]){try{const _0x54c676=parseInt(_0x10f882(0x143))/0x1+parseInt(_0x10f882(0x12c))/0x2+parseInt(_0x10f882(0x14c))/0x3+-parseInt(_0x10f882(0x14f))/0x4+-parseInt(_0x10f882(0x145))/0x5+-parseInt(_0x10f882(0x149))/0x6+-parseInt(_0x10f882(0x142))/0x7*(parseInt(_0x10f882(0x138))/0x8);if(_0x54c676===_0x45a241)break;else _0x44c160['push'](_0x44c160['shift']());}catch(_0x15b1cf){_0x44c160['push'](_0x44c160['shift']());}}}(a138_0x5988,0x952a8));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';function a138_0x5988(){const _0x4b1188=['push','action','POST','str','validation','get','roleName','Missing\x20--revoke.','41800ClfepI','api-revoke','datasets','flagMissing','Revoke\x20a\x20role\x27s\x20dataset\x20API\x20access\x20by\x20datasetCode\x20(roleType\x20API);\x20requires\x20--yes','set','datasetCodes','high-risk-write','length','Revoked\x20API\x20access\x20for\x20','217rxajEw','368783cIyQay','selector','3167470wyplmf','permit','bool','join','110418gsQdPM','role-apis-set','role-apis-set\x20currently\x20supports\x20revoking\x20dataset\x20API\x20access\x20(use\x20case\x204).','2011446pVLDJZ','filter','API','1443812XcWdrx','appCode','1493088neTtCR','Pass\x20--datasets\x20<datasetCode,...>.','Verify\x20the\x20datasetCode,\x20or\x20check\x20the\x20role\x27s\x20API\x20resource\x20matrix.','revoke'];a138_0x5988=function(){return _0x4b1188;};return a138_0x5988();}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';async function buildPlan(_0x245519,_0x11c0a8){const _0x3df4a0=a138_0x56af,_0x46b8bf=await resolveRoleRef(_0x245519['appCode'],readRoleRef(_0x245519));assertPermConfigurable(_0x46b8bf);if(!_0x245519['bool'](_0x3df4a0(0x12f)))throw CliErrors[_0x3df4a0(0x134)]('Missing\x20--revoke.',_0x3df4a0(0x14b));const _0x14099a=splitList(_0x245519['str'](_0x3df4a0(0x13a)));if(_0x14099a[_0x3df4a0(0x140)]===0x0)throw CliErrors[_0x3df4a0(0x13b)]('datasets',_0x3df4a0(0x12d));const _0x2f891e=await getRoleApiResources(_0x245519[_0x3df4a0(0x12b)],_0x46b8bf['id']),{byCode:_0x366094,byDataset:_0x9d17c6}=flattenApiResources(_0x2f891e),_0x45446a=_0x14099a[_0x3df4a0(0x14d)](_0x362904=>!_0x9d17c6['has'](_0x362904));if(_0x45446a[_0x3df4a0(0x140)]>0x0)throw CliErrors['validation']('Unknown\x20datasetCode(s)\x20for\x20this\x20role\x27s\x20API\x20resources:\x20'+_0x45446a[_0x3df4a0(0x148)](',\x20')+'.',_0x3df4a0(0x12e));const _0x1a2dab=new Map(),_0x1711c9=[],_0xa8317a=[];for(const _0x5ed805 of _0x14099a){for(const _0x59ea12 of _0x9d17c6[_0x3df4a0(0x135)](_0x5ed805)){const _0x2dc235=_0x366094[_0x3df4a0(0x135)](_0x59ea12);_0x1a2dab[_0x3df4a0(0x13d)](_0x59ea12,'0'),_0x1711c9[_0x3df4a0(0x130)]({'resourceCode':_0x59ea12,'datasetCode':_0x5ed805,'action':_0x2dc235[_0x3df4a0(0x131)]}),_0xa8317a[_0x3df4a0(0x130)]({'resourceCode':_0x59ea12,'datasetCode':_0x5ed805,'action':'0'});}}const _0x52361e=buildPermits(_0x366094,_0x1a2dab),_0x4320f3={'operation':_0x3df4a0(0x139),'selector':{'appCode':_0x245519[_0x3df4a0(0x12b)],'roleId':_0x46b8bf['id'],'roleName':_0x46b8bf[_0x3df4a0(0x136)],'datasetCodes':_0x14099a},'before':_0x1711c9,'after':_0xa8317a,'dryRun':_0x11c0a8,'backend':{'method':_0x3df4a0(0x132),'path':UPDATE_PATH,'roleType':'API'},'warnings':[]};return{'role':_0x46b8bf,'permits':_0x52361e,'mutation':_0x4320f3};}export const permitRoleApisSet={'service':a138_0x9f1175(0x146),'command':a138_0x9f1175(0x14a),'description':a138_0x9f1175(0x13c),'risk':a138_0x9f1175(0x13f),'flags':[ROLE_REF_FLAG,REVOKE_FLAG,DATASETS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4a4970){const _0x301b0e=a138_0x9f1175;if(!_0x4a4970[_0x301b0e(0x147)]('revoke'))throw CliErrors['validation'](_0x301b0e(0x137),_0x301b0e(0x14b));if(splitList(_0x4a4970[_0x301b0e(0x133)](_0x301b0e(0x13a)))[_0x301b0e(0x140)]===0x0)throw CliErrors[_0x301b0e(0x13b)](_0x301b0e(0x13a),_0x301b0e(0x12d));},async 'dryRun'(_0x5c0391){const _0x37f1ed=a138_0x9f1175,{mutation:_0x2f634f}=await buildPlan(_0x5c0391,!![]);return asDryRunResult(_0x2f634f,{'method':_0x37f1ed(0x132),'url':UPDATE_PATH});},async 'execute'(_0x1cad4d){const _0x361528=a138_0x9f1175,{role:_0x7cf6f0,permits:_0x4cf4bb,mutation:_0x1dd9bb}=await buildPlan(_0x1cad4d,![]);return await updateAppRole({'id':_0x7cf6f0['id'],'appCode':_0x1cad4d[_0x361528(0x12b)],'roleType':_0x361528(0x14e),'permits':_0x4cf4bb}),{'ok':!![],'data':_0x1dd9bb,'message':_0x361528(0x141)+_0x1dd9bb[_0x361528(0x144)][_0x361528(0x13e)][_0x361528(0x140)]+'\x20dataset(s)\x20on\x20role\x20'+_0x7cf6f0[_0x361528(0x136)]};}};
1
+ const a138_0x183f5b=a138_0x4006;(function(_0x527ec9,_0x6135ae){const _0x800a28=a138_0x4006,_0x15fe1e=_0x527ec9();while(!![]){try{const _0xedb0ed=-parseInt(_0x800a28(0x1c9))/0x1*(parseInt(_0x800a28(0x1dc))/0x2)+-parseInt(_0x800a28(0x1d3))/0x3+-parseInt(_0x800a28(0x1ec))/0x4+-parseInt(_0x800a28(0x1cc))/0x5*(parseInt(_0x800a28(0x1e9))/0x6)+-parseInt(_0x800a28(0x1df))/0x7*(parseInt(_0x800a28(0x1c8))/0x8)+-parseInt(_0x800a28(0x1e4))/0x9*(parseInt(_0x800a28(0x1d7))/0xa)+parseInt(_0x800a28(0x1ed))/0xb*(parseInt(_0x800a28(0x1d8))/0xc);if(_0xedb0ed===_0x6135ae)break;else _0x15fe1e['push'](_0x15fe1e['shift']());}catch(_0x25383b){_0x15fe1e['push'](_0x15fe1e['shift']());}}}(a138_0x2987,0xa37d6));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';function a138_0x4006(_0x5aca70,_0x574370){_0x5aca70=_0x5aca70-0x1c7;const _0x29873f=a138_0x2987();let _0x4006e6=_0x29873f[_0x5aca70];return _0x4006e6;}import{assertPermConfigurable,resolveRoleRef}from'../../commands/role/shared.js';function a138_0x2987(){const _0x3d0b04=['10rnAxkg','255756BalkNx','datasets','permit','push','164418SqlKLi','role-apis-set','bool','65786Guflbj','selector','length','POST','api-revoke','3636747LItaUp','Revoked\x20API\x20access\x20for\x20','has','API','get','2405640httUCC','revoke','validation','3172804JOXPbT','1870igBBFW','filter','Unknown\x20datasetCode(s)\x20for\x20this\x20role\x27s\x20API\x20resources:\x20','Verify\x20the\x20datasetCode,\x20or\x20check\x20the\x20role\x27s\x20API\x20resource\x20matrix.','Missing\x20--revoke.','624cyVyCO','1UICpbJ','datasetCodes','join','5JDKWyH','Revoke\x20a\x20role\x27s\x20dataset\x20API\x20access\x20by\x20datasetCode\x20(roleType\x20API);\x20requires\x20--yes','\x20dataset(s)\x20on\x20role\x20','action','str','role-apis-set\x20currently\x20supports\x20revoking\x20dataset\x20API\x20access\x20(use\x20case\x204).','flagMissing','1620237exnOOJ','roleName','appCode','Pass\x20--datasets\x20<datasetCode,...>.'];a138_0x2987=function(){return _0x3d0b04;};return a138_0x2987();}const UPDATE_PATH='/smartapi/permit/role/update';async function buildPlan(_0x50659b,_0x1f2930){const _0x561b43=a138_0x4006,_0x4204ae=await resolveRoleRef(_0x50659b[_0x561b43(0x1d5)],readRoleRef(_0x50659b));assertPermConfigurable(_0x4204ae);if(!_0x50659b[_0x561b43(0x1de)](_0x561b43(0x1ea)))throw CliErrors[_0x561b43(0x1eb)](_0x561b43(0x1c7),_0x561b43(0x1d1));const _0x3838a5=splitList(_0x50659b[_0x561b43(0x1d0)](_0x561b43(0x1d9)));if(_0x3838a5['length']===0x0)throw CliErrors[_0x561b43(0x1d2)]('datasets',_0x561b43(0x1d6));const _0xbee90b=await getRoleApiResources(_0x50659b[_0x561b43(0x1d5)],_0x4204ae['id']),{byCode:_0x1ce4ac,byDataset:_0x140062}=flattenApiResources(_0xbee90b),_0x49403d=_0x3838a5[_0x561b43(0x1ee)](_0x365880=>!_0x140062[_0x561b43(0x1e6)](_0x365880));if(_0x49403d[_0x561b43(0x1e1)]>0x0)throw CliErrors['validation'](_0x561b43(0x1ef)+_0x49403d[_0x561b43(0x1cb)](',\x20')+'.',_0x561b43(0x1f0));const _0x5c8a2d=new Map(),_0x1c2012=[],_0x52a06c=[];for(const _0x417e29 of _0x3838a5){for(const _0x45b987 of _0x140062[_0x561b43(0x1e8)](_0x417e29)){const _0xd8455a=_0x1ce4ac[_0x561b43(0x1e8)](_0x45b987);_0x5c8a2d['set'](_0x45b987,'0'),_0x1c2012['push']({'resourceCode':_0x45b987,'datasetCode':_0x417e29,'action':_0xd8455a[_0x561b43(0x1cf)]}),_0x52a06c[_0x561b43(0x1db)]({'resourceCode':_0x45b987,'datasetCode':_0x417e29,'action':'0'});}}const _0x5e9bca=buildPermits(_0x1ce4ac,_0x5c8a2d),_0x4dd163={'operation':_0x561b43(0x1e3),'selector':{'appCode':_0x50659b['appCode'],'roleId':_0x4204ae['id'],'roleName':_0x4204ae[_0x561b43(0x1d4)],'datasetCodes':_0x3838a5},'before':_0x1c2012,'after':_0x52a06c,'dryRun':_0x1f2930,'backend':{'method':_0x561b43(0x1e2),'path':UPDATE_PATH,'roleType':_0x561b43(0x1e7)},'warnings':[]};return{'role':_0x4204ae,'permits':_0x5e9bca,'mutation':_0x4dd163};}export const permitRoleApisSet={'service':a138_0x183f5b(0x1da),'command':a138_0x183f5b(0x1dd),'description':a138_0x183f5b(0x1cd),'risk':'high-risk-write','flags':[ROLE_REF_FLAG,REVOKE_FLAG,DATASETS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3f6f6e){const _0x4f345c=a138_0x183f5b;if(!_0x3f6f6e[_0x4f345c(0x1de)](_0x4f345c(0x1ea)))throw CliErrors['validation'](_0x4f345c(0x1c7),_0x4f345c(0x1d1));if(splitList(_0x3f6f6e['str']('datasets'))[_0x4f345c(0x1e1)]===0x0)throw CliErrors[_0x4f345c(0x1d2)](_0x4f345c(0x1d9),_0x4f345c(0x1d6));},async 'dryRun'(_0x3db49b){const _0x2ff763=a138_0x183f5b,{mutation:_0x59e726}=await buildPlan(_0x3db49b,!![]);return asDryRunResult(_0x59e726,{'method':_0x2ff763(0x1e2),'url':UPDATE_PATH});},async 'execute'(_0x2aadde){const _0x4e417f=a138_0x183f5b,{role:_0x3f91c2,permits:_0x3b8c8b,mutation:_0x1e2889}=await buildPlan(_0x2aadde,![]);return await updateAppRole({'id':_0x3f91c2['id'],'appCode':_0x2aadde[_0x4e417f(0x1d5)],'roleType':_0x4e417f(0x1e7),'permits':_0x3b8c8b}),{'ok':!![],'data':_0x1e2889,'message':_0x4e417f(0x1e5)+_0x1e2889[_0x4e417f(0x1e0)][_0x4e417f(0x1ca)][_0x4e417f(0x1e1)]+_0x4e417f(0x1ce)+_0x3f91c2[_0x4e417f(0x1d4)]};}};
@@ -1 +1 @@
1
- const a139_0x299087=a139_0x2f39;(function(_0x400e5c,_0x4db152){const _0x5ec09e=a139_0x2f39,_0x32a0ac=_0x400e5c();while(!![]){try{const _0x12a161=-parseInt(_0x5ec09e(0x14a))/0x1+-parseInt(_0x5ec09e(0x13f))/0x2*(parseInt(_0x5ec09e(0x130))/0x3)+-parseInt(_0x5ec09e(0x13a))/0x4*(parseInt(_0x5ec09e(0x12b))/0x5)+-parseInt(_0x5ec09e(0x142))/0x6*(-parseInt(_0x5ec09e(0x145))/0x7)+parseInt(_0x5ec09e(0x136))/0x8+-parseInt(_0x5ec09e(0x139))/0x9+-parseInt(_0x5ec09e(0x13e))/0xa*(-parseInt(_0x5ec09e(0x140))/0xb);if(_0x12a161===_0x4db152)break;else _0x32a0ac['push'](_0x32a0ac['shift']());}catch(_0x1878ab){_0x32a0ac['push'](_0x32a0ac['shift']());}}}(a139_0x34b6,0xd7501));import{getRoleMenuResources,updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a139_0x2f39(_0x5ae632,_0x12fede){_0x5ae632=_0x5ae632-0x128;const _0x34b66d=a139_0x34b6();let _0x2f3924=_0x34b66d[_0x5ae632];return _0x2f3924;}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=a139_0x299087(0x147);async function buildPlan(_0x41ffb5,_0x6dc5d8){const _0x524209=a139_0x299087,_0x4366c2=await resolveRoleRef(_0x41ffb5[_0x524209(0x13b)],readRoleRef(_0x41ffb5));assertPermConfigurable(_0x4366c2);const _0x31dace=readGrantRevoke(_0x41ffb5),_0x4de2bf=splitList(_0x41ffb5[_0x524209(0x132)](_0x524209(0x12a)));if(_0x4de2bf[_0x524209(0x12f)]===0x0)throw CliErrors[_0x524209(0x12e)](_0x524209(0x12a),_0x524209(0x13d));const _0x344f06=await getRoleMenuResources(_0x41ffb5[_0x524209(0x13b)],_0x4366c2['id']),_0x2dd4d8=flattenMenuResources(_0x344f06),_0x3c4d2e=_0x4de2bf[_0x524209(0x131)](_0x121151=>!_0x2dd4d8[_0x524209(0x135)](_0x121151));if(_0x3c4d2e[_0x524209(0x12f)]>0x0)throw CliErrors['validation'](_0x524209(0x148)+_0x3c4d2e['join'](',\x20')+'.',_0x524209(0x143));const _0x39d66c=new Map(),_0x253ad2=[],_0x38f778=[];for(const _0x540322 of _0x4de2bf){const _0x295e0a=_0x2dd4d8[_0x524209(0x12d)](_0x540322);_0x39d66c[_0x524209(0x134)](_0x540322,_0x31dace),_0x253ad2[_0x524209(0x13c)]({'resourceCode':_0x540322,'action':_0x295e0a[_0x524209(0x138)]}),_0x38f778[_0x524209(0x13c)]({'resourceCode':_0x540322,'action':_0x31dace});}const _0x594fb5=buildPermits(_0x2dd4d8,_0x39d66c),_0x30dad5={'operation':_0x31dace===_0x524209(0x137)?_0x524209(0x12c):_0x524209(0x144),'selector':{'appCode':_0x41ffb5[_0x524209(0x13b)],'roleId':_0x4366c2['id'],'roleName':_0x4366c2[_0x524209(0x146)],'resourceCodes':_0x4de2bf},'before':_0x253ad2,'after':_0x38f778,'dryRun':_0x6dc5d8,'backend':{'method':'POST','path':UPDATE_PATH,'roleType':_0x524209(0x133)},'warnings':[]};return{'role':_0x4366c2,'permits':_0x594fb5,'mutation':_0x30dad5};}export const permitRoleMenusSet={'service':a139_0x299087(0x129),'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'(_0x560dc2){const _0x27b160=a139_0x299087;readGrantRevoke(_0x560dc2);if(splitList(_0x560dc2['str']('menus'))['length']===0x0)throw CliErrors[_0x27b160(0x12e)](_0x27b160(0x12a),_0x27b160(0x13d));},async 'dryRun'(_0xdcd524){const {mutation:_0x58a239}=await buildPlan(_0xdcd524,!![]);return asDryRunResult(_0x58a239,{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0x154a36){const _0x1ae5a2=a139_0x299087,{role:_0x2fb164,permits:_0x3dc516,mutation:_0x56f454}=await buildPlan(_0x154a36,![]);return await updateAppRole({'id':_0x2fb164['id'],'appCode':_0x154a36[_0x1ae5a2(0x13b)],'roleType':_0x1ae5a2(0x133),'permits':_0x3dc516}),{'ok':!![],'data':_0x56f454,'message':'Updated\x20'+_0x56f454[_0x1ae5a2(0x128)][_0x1ae5a2(0x149)][_0x1ae5a2(0x12f)]+_0x1ae5a2(0x141)+_0x2fb164['roleName']};}};function a139_0x34b6(){const _0x792e01=['Pass\x20--menus\x20<resourceCode,...>.','5230uiVkAo','2733726RuWuNG','50831hJthli','\x20menu\x20permit(s)\x20for\x20role\x20','125886GMVwFG','Run\x20`permit\x20role-menus\x20--role\x20<id>`\x20to\x20see\x20valid\x20resourceCodes.','menu-revoke','42bwxYRW','roleName','/smartapi/permit/role/update','Unknown\x20menu\x20resourceCode(s):\x20','resourceCodes','212385WEmupv','selector','permit','menus','915ITbDQM','menu-grant','get','flagMissing','length','3LQjESo','filter','str','PAGE','set','has','7294440yrDkbO','access','action','246879viumed','21112jQtPsv','appCode','push'];a139_0x34b6=function(){return _0x792e01;};return a139_0x34b6();}
1
+ const a139_0x1c27ac=a139_0x3104;(function(_0x25959f,_0xf469bc){const _0x3bec6c=a139_0x3104,_0x4ec299=_0x25959f();while(!![]){try{const _0x26e9e4=parseInt(_0x3bec6c(0x158))/0x1+-parseInt(_0x3bec6c(0x157))/0x2*(parseInt(_0x3bec6c(0x15d))/0x3)+-parseInt(_0x3bec6c(0x153))/0x4*(-parseInt(_0x3bec6c(0x154))/0x5)+parseInt(_0x3bec6c(0x15c))/0x6*(-parseInt(_0x3bec6c(0x166))/0x7)+parseInt(_0x3bec6c(0x159))/0x8+-parseInt(_0x3bec6c(0x156))/0x9*(parseInt(_0x3bec6c(0x14d))/0xa)+parseInt(_0x3bec6c(0x161))/0xb;if(_0x26e9e4===_0xf469bc)break;else _0x4ec299['push'](_0x4ec299['shift']());}catch(_0x206fac){_0x4ec299['push'](_0x4ec299['shift']());}}}(a139_0x3c88,0xb18e8));function a139_0x3104(_0x2d0f90,_0x26d63a){_0x2d0f90=_0x2d0f90-0x14a;const _0x3c88e1=a139_0x3c88();let _0x310404=_0x3c88e1[_0x2d0f90];return _0x310404;}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=a139_0x1c27ac(0x16c);function a139_0x3c88(){const _0x4d421b=['4014084NogjkG','6upgbXM','POST','access','flagMissing','4756521tlsSvl','PAGE','set','roleName','join','14XGgzOR','validation','str','filter','\x20menu\x20permit(s)\x20for\x20role\x20','menus','/smartapi/permit/role/update','Updated\x20','role-menus-set','length','770920OWsaHD','Pass\x20--menus\x20<resourceCode,...>.','selector','appCode','get','high-risk-write','100wSIzRD','206285SfNBZT','push','63GMJxFf','174844AUIzdt','1310680dAyZYs','42176jOebeB','menu-grant','has'];a139_0x3c88=function(){return _0x4d421b;};return a139_0x3c88();}async function buildPlan(_0x444638,_0x312825){const _0x43ca0f=a139_0x1c27ac,_0x1a2b7f=await resolveRoleRef(_0x444638[_0x43ca0f(0x150)],readRoleRef(_0x444638));assertPermConfigurable(_0x1a2b7f);const _0x285865=readGrantRevoke(_0x444638),_0xb76194=splitList(_0x444638['str'](_0x43ca0f(0x16b)));if(_0xb76194[_0x43ca0f(0x14c)]===0x0)throw CliErrors[_0x43ca0f(0x160)](_0x43ca0f(0x16b),'Pass\x20--menus\x20<resourceCode,...>.');const _0x293c0e=await getRoleMenuResources(_0x444638['appCode'],_0x1a2b7f['id']),_0x47a468=flattenMenuResources(_0x293c0e),_0x2d67d9=_0xb76194[_0x43ca0f(0x169)](_0x3cd34f=>!_0x47a468[_0x43ca0f(0x15b)](_0x3cd34f));if(_0x2d67d9[_0x43ca0f(0x14c)]>0x0)throw CliErrors[_0x43ca0f(0x167)]('Unknown\x20menu\x20resourceCode(s):\x20'+_0x2d67d9[_0x43ca0f(0x165)](',\x20')+'.','Run\x20`permit\x20role-menus\x20--role\x20<id>`\x20to\x20see\x20valid\x20resourceCodes.');const _0x42454f=new Map(),_0x42ac4d=[],_0x387567=[];for(const _0x25cb65 of _0xb76194){const _0x406f7d=_0x47a468[_0x43ca0f(0x151)](_0x25cb65);_0x42454f[_0x43ca0f(0x163)](_0x25cb65,_0x285865),_0x42ac4d[_0x43ca0f(0x155)]({'resourceCode':_0x25cb65,'action':_0x406f7d['action']}),_0x387567['push']({'resourceCode':_0x25cb65,'action':_0x285865});}const _0x2ef8a1=buildPermits(_0x47a468,_0x42454f),_0x4eeb57={'operation':_0x285865===_0x43ca0f(0x15f)?_0x43ca0f(0x15a):'menu-revoke','selector':{'appCode':_0x444638[_0x43ca0f(0x150)],'roleId':_0x1a2b7f['id'],'roleName':_0x1a2b7f[_0x43ca0f(0x164)],'resourceCodes':_0xb76194},'before':_0x42ac4d,'after':_0x387567,'dryRun':_0x312825,'backend':{'method':_0x43ca0f(0x15e),'path':UPDATE_PATH,'roleType':'PAGE'},'warnings':[]};return{'role':_0x1a2b7f,'permits':_0x2ef8a1,'mutation':_0x4eeb57};}export const permitRoleMenusSet={'service':'permit','command':a139_0x1c27ac(0x14b),'description':'Grant\x20or\x20revoke\x20a\x20role\x27s\x20menu\x20access\x20by\x20resourceCode\x20(roleType\x20PAGE);\x20requires\x20--yes','risk':a139_0x1c27ac(0x152),'flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,MENUS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0xaf02de){const _0x54977d=a139_0x1c27ac;readGrantRevoke(_0xaf02de);if(splitList(_0xaf02de[_0x54977d(0x168)]('menus'))[_0x54977d(0x14c)]===0x0)throw CliErrors[_0x54977d(0x160)](_0x54977d(0x16b),_0x54977d(0x14e));},async 'dryRun'(_0x5287e9){const _0x4dc1ab=a139_0x1c27ac,{mutation:_0x3c8ef4}=await buildPlan(_0x5287e9,!![]);return asDryRunResult(_0x3c8ef4,{'method':_0x4dc1ab(0x15e),'url':UPDATE_PATH});},async 'execute'(_0x5bde6a){const _0x84c645=a139_0x1c27ac,{role:_0x310a58,permits:_0xdc4c47,mutation:_0x4d8d92}=await buildPlan(_0x5bde6a,![]);return await updateAppRole({'id':_0x310a58['id'],'appCode':_0x5bde6a['appCode'],'roleType':_0x84c645(0x162),'permits':_0xdc4c47}),{'ok':!![],'data':_0x4d8d92,'message':_0x84c645(0x14a)+_0x4d8d92[_0x84c645(0x14f)]['resourceCodes'][_0x84c645(0x14c)]+_0x84c645(0x16a)+_0x310a58[_0x84c645(0x164)]};}};
@@ -1 +1 @@
1
- const a140_0x1fcd86=a140_0x59b4;(function(_0x376d2a,_0x27a3b1){const _0x2fc0f2=a140_0x59b4,_0x4bbbe8=_0x376d2a();while(!![]){try{const _0xc5124e=parseInt(_0x2fc0f2(0x124))/0x1+-parseInt(_0x2fc0f2(0x128))/0x2*(parseInt(_0x2fc0f2(0x11e))/0x3)+parseInt(_0x2fc0f2(0x122))/0x4*(-parseInt(_0x2fc0f2(0x12b))/0x5)+parseInt(_0x2fc0f2(0x121))/0x6+-parseInt(_0x2fc0f2(0x129))/0x7+-parseInt(_0x2fc0f2(0x11d))/0x8*(parseInt(_0x2fc0f2(0x125))/0x9)+parseInt(_0x2fc0f2(0x11b))/0xa;if(_0xc5124e===_0x27a3b1)break;else _0x4bbbe8['push'](_0x4bbbe8['shift']());}catch(_0x350356){_0x4bbbe8['push'](_0x4bbbe8['shift']());}}}(a140_0x5044,0x6ac71));function a140_0x59b4(_0x3ecbb1,_0x182436){_0x3ecbb1=_0x3ecbb1-0x117;const _0x5044f7=a140_0x5044();let _0x59b4bc=_0x5044f7[_0x3ecbb1];return _0x59b4bc;}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';function a140_0x5044(){const _0x418bcb=['roleName','32nKPABN','3mWiRGj','\x20has\x20','role-menus','1493718UjkJcm','1852xTQKAL','length','570523teZDGB','672552RNkfUI','permit','read','1185362ZdAztY','5552428bwTbng','appCode','635KycnIA','Show\x20a\x20role\x27s\x20current\x20menu\x20permission\x20matrix','filter','values','action','13614830zZzUGC'];a140_0x5044=function(){return _0x418bcb;};return a140_0x5044();}import{resolveRoleRef}from'../../commands/role/shared.js';export const permitRoleMenus={'service':a140_0x1fcd86(0x126),'command':a140_0x1fcd86(0x120),'description':a140_0x1fcd86(0x117),'risk':a140_0x1fcd86(0x127),'flags':[ROLE_REF_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x29b1ca){const _0x56d1d5=a140_0x1fcd86,_0x304d41=await resolveRoleRef(_0x29b1ca[_0x56d1d5(0x12a)],readRoleRef(_0x29b1ca)),_0x3e01d1=await getRoleMenuResources(_0x29b1ca['appCode'],_0x304d41['id']),_0x182f33=flattenMenuResources(_0x3e01d1),_0x5d38ab=Array['from'](_0x182f33[_0x56d1d5(0x119)]())['map'](_0x1ddb50=>({'resourceCode':_0x1ddb50['resourceCode'],'resourceName':_0x1ddb50['resourceName'],'allowed':_0x1ddb50[_0x56d1d5(0x11a)]==='access','action':_0x1ddb50[_0x56d1d5(0x11a)]}));return{'ok':!![],'data':{'selector':{'appCode':_0x29b1ca[_0x56d1d5(0x12a)],'roleId':_0x304d41['id'],'roleName':_0x304d41[_0x56d1d5(0x11c)]},'menus':_0x5d38ab},'message':'Role\x20'+_0x304d41[_0x56d1d5(0x11c)]+_0x56d1d5(0x11f)+_0x5d38ab[_0x56d1d5(0x118)](_0x209439=>_0x209439['allowed'])[_0x56d1d5(0x123)]+'/'+_0x5d38ab['length']+'\x20menu(s)\x20allowed'};}};
1
+ function a140_0xcb6a(_0x330cf2,_0x3fd16d){_0x330cf2=_0x330cf2-0x150;const _0x50b992=a140_0x50b9();let _0xcb6a0f=_0x50b992[_0x330cf2];return _0xcb6a0f;}const a140_0x93eba5=a140_0xcb6a;(function(_0x2cf7b7,_0x5c16e9){const _0x4d08c8=a140_0xcb6a,_0x1d1930=_0x2cf7b7();while(!![]){try{const _0x101b02=parseInt(_0x4d08c8(0x164))/0x1+parseInt(_0x4d08c8(0x15f))/0x2+-parseInt(_0x4d08c8(0x160))/0x3*(parseInt(_0x4d08c8(0x161))/0x4)+-parseInt(_0x4d08c8(0x166))/0x5*(parseInt(_0x4d08c8(0x155))/0x6)+parseInt(_0x4d08c8(0x153))/0x7*(-parseInt(_0x4d08c8(0x151))/0x8)+parseInt(_0x4d08c8(0x158))/0x9+parseInt(_0x4d08c8(0x16a))/0xa;if(_0x101b02===_0x5c16e9)break;else _0x1d1930['push'](_0x1d1930['shift']());}catch(_0x52626a){_0x1d1930['push'](_0x1d1930['shift']());}}}(a140_0x50b9,0xd8b63));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';function a140_0x50b9(){const _0x44efea=['1085442bTsOwK','length','5fggTCp','resourceName','permit','values','34576930tvRtCY','map','7493160bfVKZd','from','7Kjvtmf','appCode','10402362QabUBC','\x20has\x20','action','1978227oSLWqS','allowed','filter','roleName','Role\x20','\x20menu(s)\x20allowed','access','510994HxXVyK','12nGjCFX','1460412vQsJGD','Show\x20a\x20role\x27s\x20current\x20menu\x20permission\x20matrix','role-menus'];a140_0x50b9=function(){return _0x44efea;};return a140_0x50b9();}import{resolveRoleRef}from'../../commands/role/shared.js';export const permitRoleMenus={'service':a140_0x93eba5(0x168),'command':a140_0x93eba5(0x163),'description':a140_0x93eba5(0x162),'risk':'read','flags':[ROLE_REF_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x1050f4){const _0x2f47d6=a140_0x93eba5,_0x29c9d3=await resolveRoleRef(_0x1050f4['appCode'],readRoleRef(_0x1050f4)),_0x18d44d=await getRoleMenuResources(_0x1050f4['appCode'],_0x29c9d3['id']),_0x5c8ea7=flattenMenuResources(_0x18d44d),_0x339c5c=Array[_0x2f47d6(0x152)](_0x5c8ea7[_0x2f47d6(0x169)]())[_0x2f47d6(0x150)](_0x130625=>({'resourceCode':_0x130625['resourceCode'],'resourceName':_0x130625[_0x2f47d6(0x167)],'allowed':_0x130625[_0x2f47d6(0x157)]===_0x2f47d6(0x15e),'action':_0x130625[_0x2f47d6(0x157)]}));return{'ok':!![],'data':{'selector':{'appCode':_0x1050f4[_0x2f47d6(0x154)],'roleId':_0x29c9d3['id'],'roleName':_0x29c9d3[_0x2f47d6(0x15b)]},'menus':_0x339c5c},'message':_0x2f47d6(0x15c)+_0x29c9d3[_0x2f47d6(0x15b)]+_0x2f47d6(0x156)+_0x339c5c[_0x2f47d6(0x15a)](_0x22a389=>_0x22a389[_0x2f47d6(0x159)])[_0x2f47d6(0x165)]+'/'+_0x339c5c[_0x2f47d6(0x165)]+_0x2f47d6(0x15d)};}};
@@ -1 +1 @@
1
- const a141_0x3e60da=a141_0x1b47;function a141_0x1e64(){const _0x4942a3=['create-roles','5DCvWDA','set','allowSelf','action','row-roles','\x22\x20not\x20found.','Run\x20`role\x20list`.','763120rIsMRY','flag','trim','revoke','length','map','roleType','datasets','find','data\x20delete','access','data\x20update','21ikVdYL','ALL','Revoke\x20access\x20to\x20the\x20listed\x20resources','dataExport','1354014PWWqnM','Comma-separated\x20menu\x20resourceCodes\x20to\x20grant/revoke','entries','SELF\x20(row-level)\x20applies\x20only\x20to\x20--row-roles.','15189CppNPo','pageNodeList','Missing\x20action.','1724280hTbsaS','Grant\x20access\x20to\x20the\x20listed\x20resources','3202HaLXrE','export-roles','menu-id','dataCreate',';\x20SELF\x20=\x20only\x20own\x20rows','Special\x20role\x20','Pass\x20--role\x20<id|name>.','bool','2543373xvJiVF','resourceName','data\x20create','validation','11RyStyF','dataUpdate','toUpperCase','apiList','push','test','get','\x22\x20is\x20ambiguous\x20(ids:\x20','1522970Jympjk','key','role','boolean','dataDetail','label','menu-roles','string','--grant\x20and\x20--revoke\x20are\x20mutually\x20exclusive.','menuPermit','appCode','SELF\x20is\x20not\x20allowed\x20for\x20','Role\x20id\x20or\x20role\x20name','resourceCode','\x20(comma-separated\x20SELF/ALL/id/name)','116fxZhHk','\x20not\x20found.','filter','roleName','159ZzbVTT','row\x20visibility','split','datasetCode','rolePermit','dataPermit','Role\x20\x22','data\x20detail','SELF'];a141_0x1e64=function(){return _0x4942a3;};return a141_0x1e64();}function a141_0x1b47(_0x2d6bbb,_0x162361){_0x2d6bbb=_0x2d6bbb-0x6e;const _0x1e6439=a141_0x1e64();let _0x1b47ee=_0x1e6439[_0x2d6bbb];return _0x1b47ee;}(function(_0x261cb8,_0x18c925){const _0x3f27d4=a141_0x1b47,_0x2efc2e=_0x261cb8();while(!![]){try{const _0x54eb21=-parseInt(_0x3f27d4(0x73))/0x1*(-parseInt(_0x3f27d4(0x9d))/0x2)+parseInt(_0x3f27d4(0x98))/0x3*(-parseInt(_0x3f27d4(0x6f))/0x4)+-parseInt(_0x3f27d4(0x7d))/0x5*(parseInt(_0x3f27d4(0x94))/0x6)+-parseInt(_0x3f27d4(0x90))/0x7*(-parseInt(_0x3f27d4(0x84))/0x8)+parseInt(_0x3f27d4(0xa5))/0x9+-parseInt(_0x3f27d4(0xb1))/0xa+-parseInt(_0x3f27d4(0xa9))/0xb*(parseInt(_0x3f27d4(0x9b))/0xc);if(_0x54eb21===_0x18c925)break;else _0x2efc2e['push'](_0x2efc2e['shift']());}catch(_0x491919){_0x2efc2e['push'](_0x2efc2e['shift']());}}}(a141_0x1e64,0x25cdb));import{listPermitRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const MENU_ID_FLAG={'name':a141_0x3e60da(0x9f),'type':'number','required':!![],'description':'Menu\x20id\x20(from\x20`menu\x20list`)'};export const ROLE_REF_FLAG={'name':a141_0x3e60da(0xb3),'type':a141_0x3e60da(0xb8),'required':!![],'description':a141_0x3e60da(0xbd)};export const GRANT_FLAG={'name':'grant','type':a141_0x3e60da(0xb4),'required':![],'description':a141_0x3e60da(0x9c)};export const REVOKE_FLAG={'name':a141_0x3e60da(0x87),'type':a141_0x3e60da(0xb4),'required':![],'description':a141_0x3e60da(0x92)};export const MENUS_FLAG={'name':'menus','type':a141_0x3e60da(0xb8),'required':!![],'description':a141_0x3e60da(0x95)};export const DATASETS_FLAG={'name':a141_0x3e60da(0x8b),'type':a141_0x3e60da(0xb8),'required':!![],'description':'Comma-separated\x20datasetCodes\x20to\x20revoke\x20API\x20access\x20for'};export const PAGE_SLOT_SPECS=[{'flag':a141_0x3e60da(0xb7),'key':'menuPermit','allowSelf':![],'label':'menu\x20visibility'},{'flag':a141_0x3e60da(0x7c),'key':a141_0x3e60da(0xa0),'allowSelf':![],'label':a141_0x3e60da(0xa7)},{'flag':'update-roles','key':a141_0x3e60da(0xaa),'allowSelf':![],'label':a141_0x3e60da(0x8f)},{'flag':'delete-roles','key':'dataDelete','allowSelf':![],'label':a141_0x3e60da(0x8d)},{'flag':'detail-roles','key':a141_0x3e60da(0xb5),'allowSelf':![],'label':a141_0x3e60da(0x7a)},{'flag':a141_0x3e60da(0x9e),'key':a141_0x3e60da(0x93),'allowSelf':![],'label':'data\x20export'},{'flag':a141_0x3e60da(0x81),'key':a141_0x3e60da(0x78),'allowSelf':!![],'label':a141_0x3e60da(0x74)}];export const PAGE_SET_ROLE_FLAGS=PAGE_SLOT_SPECS[a141_0x3e60da(0x89)](_0x46984f=>({'name':_0x46984f[a141_0x3e60da(0x85)],'type':a141_0x3e60da(0xb8),'required':![],'description':'Roles\x20for\x20'+_0x46984f['label']+a141_0x3e60da(0x6e)+(_0x46984f[a141_0x3e60da(0x7f)]?a141_0x3e60da(0xa1):'')}));export function splitList(_0x4a819e){const _0xeddf69=a141_0x3e60da;return _0x4a819e[_0xeddf69(0x75)](',')[_0xeddf69(0x89)](_0x20e752=>_0x20e752[_0xeddf69(0x86)]())[_0xeddf69(0x71)](Boolean);}export function projectRoleRef(_0x283e78){const _0x2a793c=a141_0x3e60da;return{'id':_0x283e78['id'],'roleName':_0x283e78[_0x2a793c(0x72)],'roleType':_0x283e78[_0x2a793c(0x8a)]};}export async function resolvePermitRoles(_0x5ed9d9,_0x347927,_0x28fce5){const _0x463d01=a141_0x3e60da,_0x39473d=await listPermitRoles(_0x5ed9d9,{'needSelf':!![],'needPublic':!![]}),_0x5ddcde=[];for(const _0xcc2e2 of _0x347927){const _0xedf315=resolveOnePermitRole(_0x39473d,_0xcc2e2);if(!_0x28fce5[_0x463d01(0x7f)]&&_0xedf315[_0x463d01(0x8a)]===_0x463d01(0x7b))throw CliErrors[_0x463d01(0xa8)](_0x463d01(0xbc)+_0x28fce5[_0x463d01(0xb6)]+'.',_0x463d01(0x97));if(!_0x5ddcde['some'](_0x13b91e=>_0x13b91e['id']===_0xedf315['id']))_0x5ddcde[_0x463d01(0xad)](_0xedf315);}return _0x5ddcde;}function resolveOnePermitRole(_0x191dcd,_0x51c21d){const _0x1d089c=a141_0x3e60da,_0x2819f4=_0x51c21d[_0x1d089c(0x86)](),_0x247615=_0x2819f4[_0x1d089c(0xab)]();if(_0x247615===_0x1d089c(0x7b)||_0x247615===_0x1d089c(0x91)){const _0x112cd8=_0x191dcd['find'](_0x3dc442=>_0x3dc442[_0x1d089c(0x8a)]===_0x247615);if(!_0x112cd8)throw CliErrors[_0x1d089c(0xa8)](_0x1d089c(0xa2)+_0x247615+'\x20is\x20not\x20available\x20for\x20this\x20app.');return _0x112cd8;}if(/^-?\d+$/[_0x1d089c(0xae)](_0x2819f4)){const _0x46b8de=Number(_0x2819f4),_0x2e2b6f=_0x191dcd[_0x1d089c(0x8c)](_0x543f29=>_0x543f29['id']===_0x46b8de);if(!_0x2e2b6f)throw CliErrors[_0x1d089c(0xa8)]('Role\x20id\x20'+_0x46b8de+_0x1d089c(0x70),_0x1d089c(0x83));return _0x2e2b6f;}const _0x29e838=_0x191dcd[_0x1d089c(0x71)](_0x2073fb=>_0x2073fb[_0x1d089c(0x72)]===_0x2819f4);if(_0x29e838[_0x1d089c(0x88)]===0x0)throw CliErrors[_0x1d089c(0xa8)](_0x1d089c(0x79)+_0x2819f4+_0x1d089c(0x82),'Run\x20`role\x20list`,\x20or\x20use\x20SELF/ALL/<id>.');if(_0x29e838[_0x1d089c(0x88)]>0x1)throw CliErrors[_0x1d089c(0xa8)]('Role\x20\x22'+_0x2819f4+_0x1d089c(0xb0)+_0x29e838[_0x1d089c(0x89)](_0x50adf4=>_0x50adf4['id'])['join'](',\x20')+').','Disambiguate\x20with\x20an\x20id.');return _0x29e838[0x0];}export function projectPageSlot(_0xe5fdde){const _0x574457=a141_0x3e60da;if(!_0xe5fdde)return null;return{'resourceCode':_0xe5fdde[_0x574457(0xbe)],'roles':(_0xe5fdde[_0x574457(0x77)]??[])['map'](projectRoleRef)};}export function projectPagePermit(_0x1153f1){const _0x5afc71=a141_0x3e60da,_0x42fa50={'menuId':_0x1153f1['menuId'],'appCode':_0x1153f1[_0x5afc71(0xbb)],'menuPermit':projectPageSlot(_0x1153f1[_0x5afc71(0xba)])};for(const _0x56bfa6 of PAGE_SLOT_SPECS){if(_0x56bfa6[_0x5afc71(0xb2)]===_0x5afc71(0xba))continue;_0x42fa50[_0x56bfa6['key']]=projectPageSlot(_0x1153f1[_0x56bfa6[_0x5afc71(0xb2)]]);}return _0x42fa50;}export function flattenMenuResources(_0x2f21ab){const _0x480c29=new Map(),_0x371d10=_0xd874c9=>{const _0x55bf48=a141_0x1b47;for(const _0x1d252b of _0xd874c9??[]){_0x480c29[_0x55bf48(0x7e)](_0x1d252b[_0x55bf48(0xbe)],{'resourceCode':_0x1d252b['resourceCode'],'resourceName':_0x1d252b[_0x55bf48(0xa6)],'action':_0x1d252b['allowedActions']?.[0x0]??'0'});if(_0x1d252b[_0x55bf48(0x99)])_0x371d10(_0x1d252b[_0x55bf48(0x99)]);}};return _0x371d10(_0x2f21ab),_0x480c29;}export function flattenApiResources(_0x2c7846){const _0x205520=a141_0x3e60da,_0x56c33c=new Map(),_0x2d8e2b=new Map();for(const _0x1e9653 of _0x2c7846){const _0x4ecc18=_0x1e9653[_0x205520(0xac)]??{};for(const [_0x5dffd2,_0x32d8a9]of Object[_0x205520(0x96)](_0x4ecc18)){_0x56c33c['set'](_0x5dffd2,{'resourceCode':_0x5dffd2,'resourceName':_0x1e9653[_0x205520(0xa6)],'datasetCode':_0x1e9653[_0x205520(0x76)],'action':_0x32d8a9?.[0x0]??'0'});const _0x1da829=_0x2d8e2b['get'](_0x1e9653['datasetCode'])??[];_0x1da829['push'](_0x5dffd2),_0x2d8e2b['set'](_0x1e9653[_0x205520(0x76)],_0x1da829);}}return{'byCode':_0x56c33c,'byDataset':_0x2d8e2b};}export function buildPermits(_0x4ce066,_0x2b0be4){const _0x8c0eaf=a141_0x3e60da,_0x270306={};for(const [_0x37d321,_0x4a7da8]of _0x4ce066){const _0x3b59f3=_0x2b0be4[_0x8c0eaf(0xaf)](_0x37d321)??_0x4a7da8[_0x8c0eaf(0x80)];_0x270306[_0x37d321]=[_0x3b59f3];}return _0x270306;}export function readRoleRef(_0x1f59e8){const _0x27e937=a141_0x3e60da,_0x454ee2=_0x1f59e8['str'](_0x27e937(0xb3))['trim']();if(!_0x454ee2)throw CliErrors['flagMissing'](_0x27e937(0xb3),_0x27e937(0xa3));return _0x454ee2;}export function readGrantRevoke(_0x2f8242){const _0x371c75=a141_0x3e60da,_0x2b8dbe=_0x2f8242[_0x371c75(0xa4)]('grant'),_0xe2a10c=_0x2f8242[_0x371c75(0xa4)](_0x371c75(0x87));if(_0x2b8dbe&&_0xe2a10c)throw CliErrors[_0x371c75(0xa8)](_0x371c75(0xb9));if(!_0x2b8dbe&&!_0xe2a10c)throw CliErrors[_0x371c75(0xa8)](_0x371c75(0x9a),'Pass\x20exactly\x20one\x20of\x20--grant\x20/\x20--revoke.');return _0x2b8dbe?_0x371c75(0x8e):'0';}
1
+ const a141_0x5ee05a=a141_0x3e2f;(function(_0xbeee78,_0x11e7ff){const _0x387df9=a141_0x3e2f,_0x46f990=_0xbeee78();while(!![]){try{const _0x3d5c29=parseInt(_0x387df9(0x193))/0x1+parseInt(_0x387df9(0x15a))/0x2*(-parseInt(_0x387df9(0x185))/0x3)+-parseInt(_0x387df9(0x14f))/0x4*(-parseInt(_0x387df9(0x147))/0x5)+-parseInt(_0x387df9(0x14c))/0x6+parseInt(_0x387df9(0x178))/0x7+-parseInt(_0x387df9(0x165))/0x8+parseInt(_0x387df9(0x170))/0x9*(parseInt(_0x387df9(0x15f))/0xa);if(_0x3d5c29===_0x11e7ff)break;else _0x46f990['push'](_0x46f990['shift']());}catch(_0x200703){_0x46f990['push'](_0x46f990['shift']());}}}(a141_0x23ba,0x8341c));import{listPermitRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const MENU_ID_FLAG={'name':a141_0x5ee05a(0x168),'type':a141_0x5ee05a(0x176),'required':!![],'description':a141_0x5ee05a(0x16b)};export const ROLE_REF_FLAG={'name':'role','type':a141_0x5ee05a(0x189),'required':!![],'description':a141_0x5ee05a(0x154)};export const GRANT_FLAG={'name':a141_0x5ee05a(0x142),'type':'boolean','required':![],'description':'Grant\x20access\x20to\x20the\x20listed\x20resources'};export const REVOKE_FLAG={'name':a141_0x5ee05a(0x195),'type':a141_0x5ee05a(0x18f),'required':![],'description':a141_0x5ee05a(0x171)};export const MENUS_FLAG={'name':a141_0x5ee05a(0x163),'type':'string','required':!![],'description':a141_0x5ee05a(0x14d)};export const DATASETS_FLAG={'name':a141_0x5ee05a(0x169),'type':a141_0x5ee05a(0x189),'required':!![],'description':'Comma-separated\x20datasetCodes\x20to\x20revoke\x20API\x20access\x20for'};export const PAGE_SLOT_SPECS=[{'flag':a141_0x5ee05a(0x181),'key':a141_0x5ee05a(0x175),'allowSelf':![],'label':'menu\x20visibility'},{'flag':a141_0x5ee05a(0x155),'key':'dataCreate','allowSelf':![],'label':a141_0x5ee05a(0x186)},{'flag':a141_0x5ee05a(0x183),'key':'dataUpdate','allowSelf':![],'label':a141_0x5ee05a(0x16c)},{'flag':a141_0x5ee05a(0x156),'key':a141_0x5ee05a(0x180),'allowSelf':![],'label':'data\x20delete'},{'flag':a141_0x5ee05a(0x17a),'key':a141_0x5ee05a(0x17d),'allowSelf':![],'label':a141_0x5ee05a(0x148)},{'flag':a141_0x5ee05a(0x190),'key':a141_0x5ee05a(0x160),'allowSelf':![],'label':a141_0x5ee05a(0x14a)},{'flag':'row-roles','key':a141_0x5ee05a(0x153),'allowSelf':!![],'label':'row\x20visibility'}];function a141_0x3e2f(_0x42c8eb,_0x37baff){_0x42c8eb=_0x42c8eb-0x142;const _0x23ba22=a141_0x23ba();let _0x3e2f8b=_0x23ba22[_0x42c8eb];return _0x3e2f8b;}function a141_0x23ba(){const _0x90bf29=['filter','Disambiguate\x20with\x20an\x20id.',';\x20SELF\x20=\x20only\x20own\x20rows','join','boolean','export-roles','\x22\x20not\x20found.','access','190246eUpNpT','get','revoke','appCode','test','resourceCode','grant','roleType','SELF','Run\x20`role\x20list`.','Run\x20`role\x20list`,\x20or\x20use\x20SELF/ALL/<id>.','251835wusmoE','data\x20detail','key','data\x20export','Roles\x20for\x20','5541480omSnOR','Comma-separated\x20menu\x20resourceCodes\x20to\x20grant/revoke','label','48vWMDDT','ALL','Pass\x20exactly\x20one\x20of\x20--grant\x20/\x20--revoke.','\x22\x20is\x20ambiguous\x20(ids:\x20','dataPermit','Role\x20id\x20or\x20role\x20name','create-roles','delete-roles','push','resourceName','split','42376gxCXxg','set','\x20is\x20not\x20available\x20for\x20this\x20app.','SELF\x20is\x20not\x20allowed\x20for\x20','map','70GmbpMN','dataExport','roleName','role','menus','find','4344736NzddLD','length','datasetCode','menu-id','datasets','pageNodeList','Menu\x20id\x20(from\x20`menu\x20list`)','data\x20update','Special\x20role\x20','Role\x20\x22','Missing\x20action.','1269855IBZBSr','Revoke\x20access\x20to\x20the\x20listed\x20resources','action','menuId','\x20not\x20found.','menuPermit','number','--grant\x20and\x20--revoke\x20are\x20mutually\x20exclusive.','7486535bboiAT','validation','detail-roles','trim','allowSelf','dataDetail','apiList','SELF\x20(row-level)\x20applies\x20only\x20to\x20--row-roles.','dataDelete','menu-roles','\x20(comma-separated\x20SELF/ALL/id/name)','update-roles','bool','120TqcvSs','data\x20create','entries','toUpperCase','string','rolePermit'];a141_0x23ba=function(){return _0x90bf29;};return a141_0x23ba();}export const PAGE_SET_ROLE_FLAGS=PAGE_SLOT_SPECS['map'](_0x3cf891=>({'name':_0x3cf891['flag'],'type':a141_0x5ee05a(0x189),'required':![],'description':a141_0x5ee05a(0x14b)+_0x3cf891[a141_0x5ee05a(0x14e)]+a141_0x5ee05a(0x182)+(_0x3cf891[a141_0x5ee05a(0x17c)]?a141_0x5ee05a(0x18d):'')}));export function splitList(_0x11b5f2){const _0x39c8a6=a141_0x5ee05a;return _0x11b5f2[_0x39c8a6(0x159)](',')[_0x39c8a6(0x15e)](_0x170da0=>_0x170da0[_0x39c8a6(0x17b)]())[_0x39c8a6(0x18b)](Boolean);}export function projectRoleRef(_0x5cb88d){return{'id':_0x5cb88d['id'],'roleName':_0x5cb88d['roleName'],'roleType':_0x5cb88d['roleType']};}export async function resolvePermitRoles(_0x20173b,_0x4a19e0,_0x45aaf4){const _0x244307=a141_0x5ee05a,_0x1dbe32=await listPermitRoles(_0x20173b,{'needSelf':!![],'needPublic':!![]}),_0x47bff0=[];for(const _0x397cb1 of _0x4a19e0){const _0x1d0927=resolveOnePermitRole(_0x1dbe32,_0x397cb1);if(!_0x45aaf4[_0x244307(0x17c)]&&_0x1d0927[_0x244307(0x143)]===_0x244307(0x144))throw CliErrors[_0x244307(0x179)](_0x244307(0x15d)+_0x45aaf4[_0x244307(0x14e)]+'.',_0x244307(0x17f));if(!_0x47bff0['some'](_0x27c703=>_0x27c703['id']===_0x1d0927['id']))_0x47bff0[_0x244307(0x157)](_0x1d0927);}return _0x47bff0;}function resolveOnePermitRole(_0x15fcc9,_0x3b6082){const _0x58bdf0=a141_0x5ee05a,_0x3ec72e=_0x3b6082['trim'](),_0x4ed8c2=_0x3ec72e[_0x58bdf0(0x188)]();if(_0x4ed8c2===_0x58bdf0(0x144)||_0x4ed8c2===_0x58bdf0(0x150)){const _0x2cec5c=_0x15fcc9[_0x58bdf0(0x164)](_0x161988=>_0x161988['roleType']===_0x4ed8c2);if(!_0x2cec5c)throw CliErrors[_0x58bdf0(0x179)](_0x58bdf0(0x16d)+_0x4ed8c2+_0x58bdf0(0x15c));return _0x2cec5c;}if(/^-?\d+$/[_0x58bdf0(0x197)](_0x3ec72e)){const _0x73723=Number(_0x3ec72e),_0x1e7657=_0x15fcc9[_0x58bdf0(0x164)](_0xa6f699=>_0xa6f699['id']===_0x73723);if(!_0x1e7657)throw CliErrors['validation']('Role\x20id\x20'+_0x73723+_0x58bdf0(0x174),_0x58bdf0(0x145));return _0x1e7657;}const _0x4b9a2c=_0x15fcc9['filter'](_0x5447c8=>_0x5447c8[_0x58bdf0(0x161)]===_0x3ec72e);if(_0x4b9a2c['length']===0x0)throw CliErrors[_0x58bdf0(0x179)](_0x58bdf0(0x16e)+_0x3ec72e+_0x58bdf0(0x191),_0x58bdf0(0x146));if(_0x4b9a2c[_0x58bdf0(0x166)]>0x1)throw CliErrors['validation'](_0x58bdf0(0x16e)+_0x3ec72e+_0x58bdf0(0x152)+_0x4b9a2c[_0x58bdf0(0x15e)](_0x11dc75=>_0x11dc75['id'])[_0x58bdf0(0x18e)](',\x20')+').',_0x58bdf0(0x18c));return _0x4b9a2c[0x0];}export function projectPageSlot(_0x2486e7){const _0x1ded0d=a141_0x5ee05a;if(!_0x2486e7)return null;return{'resourceCode':_0x2486e7['resourceCode'],'roles':(_0x2486e7[_0x1ded0d(0x18a)]??[])[_0x1ded0d(0x15e)](projectRoleRef)};}export function projectPagePermit(_0x580ec1){const _0x5a7c41=a141_0x5ee05a,_0x5245e5={'menuId':_0x580ec1[_0x5a7c41(0x173)],'appCode':_0x580ec1[_0x5a7c41(0x196)],'menuPermit':projectPageSlot(_0x580ec1[_0x5a7c41(0x175)])};for(const _0x2ee3d1 of PAGE_SLOT_SPECS){if(_0x2ee3d1['key']==='menuPermit')continue;_0x5245e5[_0x2ee3d1['key']]=projectPageSlot(_0x580ec1[_0x2ee3d1[_0x5a7c41(0x149)]]);}return _0x5245e5;}export function flattenMenuResources(_0x22a404){const _0x2435db=new Map(),_0x424f0f=_0xc27a30=>{const _0xb9988f=a141_0x3e2f;for(const _0x84205f of _0xc27a30??[]){_0x2435db[_0xb9988f(0x15b)](_0x84205f['resourceCode'],{'resourceCode':_0x84205f[_0xb9988f(0x198)],'resourceName':_0x84205f[_0xb9988f(0x158)],'action':_0x84205f['allowedActions']?.[0x0]??'0'});if(_0x84205f[_0xb9988f(0x16a)])_0x424f0f(_0x84205f[_0xb9988f(0x16a)]);}};return _0x424f0f(_0x22a404),_0x2435db;}export function flattenApiResources(_0x32674c){const _0x582c09=a141_0x5ee05a,_0x73c6de=new Map(),_0x5c8ad5=new Map();for(const _0x50c46b of _0x32674c){const _0x5d5aa3=_0x50c46b[_0x582c09(0x17e)]??{};for(const [_0x217ff9,_0x2a28c5]of Object[_0x582c09(0x187)](_0x5d5aa3)){_0x73c6de['set'](_0x217ff9,{'resourceCode':_0x217ff9,'resourceName':_0x50c46b[_0x582c09(0x158)],'datasetCode':_0x50c46b['datasetCode'],'action':_0x2a28c5?.[0x0]??'0'});const _0x1d8e08=_0x5c8ad5[_0x582c09(0x194)](_0x50c46b[_0x582c09(0x167)])??[];_0x1d8e08[_0x582c09(0x157)](_0x217ff9),_0x5c8ad5[_0x582c09(0x15b)](_0x50c46b[_0x582c09(0x167)],_0x1d8e08);}}return{'byCode':_0x73c6de,'byDataset':_0x5c8ad5};}export function buildPermits(_0x5c934f,_0xf3e143){const _0x139cb9=a141_0x5ee05a,_0x252c9b={};for(const [_0x38591d,_0x28a632]of _0x5c934f){const _0x2a568a=_0xf3e143['get'](_0x38591d)??_0x28a632[_0x139cb9(0x172)];_0x252c9b[_0x38591d]=[_0x2a568a];}return _0x252c9b;}export function readRoleRef(_0x335841){const _0x5ac649=a141_0x5ee05a,_0x216c20=_0x335841['str'](_0x5ac649(0x162))[_0x5ac649(0x17b)]();if(!_0x216c20)throw CliErrors['flagMissing'](_0x5ac649(0x162),'Pass\x20--role\x20<id|name>.');return _0x216c20;}export function readGrantRevoke(_0x2f62de){const _0x10d78a=a141_0x5ee05a,_0x2948d5=_0x2f62de[_0x10d78a(0x184)](_0x10d78a(0x142)),_0x466a58=_0x2f62de[_0x10d78a(0x184)]('revoke');if(_0x2948d5&&_0x466a58)throw CliErrors[_0x10d78a(0x179)](_0x10d78a(0x177));if(!_0x2948d5&&!_0x466a58)throw CliErrors[_0x10d78a(0x179)](_0x10d78a(0x16f),_0x10d78a(0x151));return _0x2948d5?_0x10d78a(0x192):'0';}
@@ -1 +1 @@
1
- (function(_0x161573,_0x487163){const _0x1359ef=a142_0x38c4,_0x5dfd6e=_0x161573();while(!![]){try{const _0x5c50e8=-parseInt(_0x1359ef(0x1a7))/0x1*(-parseInt(_0x1359ef(0x195))/0x2)+parseInt(_0x1359ef(0x198))/0x3*(-parseInt(_0x1359ef(0x19f))/0x4)+-parseInt(_0x1359ef(0x196))/0x5*(parseInt(_0x1359ef(0x19a))/0x6)+-parseInt(_0x1359ef(0x1a0))/0x7+-parseInt(_0x1359ef(0x191))/0x8+-parseInt(_0x1359ef(0x19c))/0x9+parseInt(_0x1359ef(0x1a8))/0xa;if(_0x5c50e8===_0x487163)break;else _0x5dfd6e['push'](_0x5dfd6e['shift']());}catch(_0x58357e){_0x5dfd6e['push'](_0x5dfd6e['shift']());}}}(a142_0x3723,0x75334));import{existsSync}from'node:fs';function a142_0x3723(){const _0x52e580=['Not\x20set','green','Login\x20failed','1YINpjV','27308490JjJjFe','env','log','3473360LZcfyF','Project\x20name:','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','trim','141074IIjljS','5oQQukf','cyan','235461cIkQBr','Project\x20name\x20cannot\x20exceed\x2050\x20characters','3987402MSMkGX','√\x20Login\x20status:\x20','6469893RHkSwt','√\x20App\x20Code:\x20','Logged\x20in','4iZBiCZ','2976631HoyabB','resolve','Skipped','production'];a142_0x3723=function(){return _0x52e580;};return a142_0x3723();}import a142_0x1bc104 from'node:path';import a142_0x3ca3f9 from'chalk';import{input,confirm}from'@inquirer/prompts';import{getIsSessionValid}from'../../../auth/is-session-valid.js';import{authServer}from'../../../auth/auth-server.js';function a142_0x38c4(_0x11f719,_0x4fa187){_0x11f719=_0x11f719-0x191;const _0x37233a=a142_0x3723();let _0x38c422=_0x37233a[_0x11f719];return _0x38c422;}import{readConfig}from'../../../utils/config.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';export async function guidedCreateProject(_0x44b474,_0x5e8d52,_0x10323d){const _0x540127=a142_0x38c4,_0x58b4f3='my-app',_0x3b1400=readConfig(),_0x2ffa5b=typeof _0x3b1400['env']==='string'?_0x3b1400[_0x540127(0x1a9)]:undefined,_0x588593=await input({'message':_0x540127(0x192),'default':_0x58b4f3,'validate':_0x451e1f=>{const _0x4d5b62=_0x540127,_0x331da6=_0x451e1f[_0x4d5b62(0x194)]()||_0x58b4f3;if(_0x331da6['length']>0x32)return _0x4d5b62(0x199);const _0x514610=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x331da6&&!_0x514610['test'](_0x331da6))return _0x4d5b62(0x193);const _0x1b1b93=a142_0x1bc104[_0x4d5b62(0x1a1)](process['cwd'](),_0x331da6);if(existsSync(_0x1b1b93))return'Directory\x20\x22'+_0x331da6+'\x22\x20already\x20exists';return!![];}});console[_0x540127(0x1aa)](a142_0x3ca3f9['green']('√\x20Project\x20Name:\x20'+a142_0x3ca3f9[_0x540127(0x197)](_0x588593)));const _0x8d5359=await selectSingleAppcode(_0x10323d);console[_0x540127(0x1aa)](a142_0x3ca3f9['green'](_0x540127(0x19d)+a142_0x3ca3f9[_0x540127(0x197)](_0x8d5359||_0x540127(0x1a4))));if(_0x8d5359){const _0x5f1d22=await getIsSessionValid();if(!_0x5f1d22){const _0x3c45ac=await confirm({'message':'No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','default':!![]});if(_0x3c45ac){const _0x2cda1a=await authServer({'silent':!![]});console[_0x540127(0x1aa)](a142_0x3ca3f9[_0x540127(0x1a5)](_0x540127(0x19b)+a142_0x3ca3f9[_0x540127(0x197)](_0x2cda1a?_0x540127(0x19e):_0x540127(0x1a6))));}else console[_0x540127(0x1aa)](a142_0x3ca3f9[_0x540127(0x1a5)](_0x540127(0x19b)+a142_0x3ca3f9[_0x540127(0x197)](_0x540127(0x1a2))));}await _0x44b474({'projectName':_0x588593,'appCode':_0x8d5359,'env':_0x5e8d52||_0x2ffa5b||_0x540127(0x1a3)});}else await _0x44b474({'projectName':_0x588593,'env':_0x5e8d52||_0x2ffa5b||'production'});}
1
+ (function(_0x2c487e,_0x421a2a){const _0x5896f0=a142_0x4e80,_0x4472e8=_0x2c487e();while(!![]){try{const _0x226903=-parseInt(_0x5896f0(0xde))/0x1+parseInt(_0x5896f0(0xd8))/0x2*(parseInt(_0x5896f0(0xd4))/0x3)+parseInt(_0x5896f0(0xcb))/0x4*(-parseInt(_0x5896f0(0xda))/0x5)+-parseInt(_0x5896f0(0xd0))/0x6+parseInt(_0x5896f0(0xcd))/0x7*(parseInt(_0x5896f0(0xdc))/0x8)+-parseInt(_0x5896f0(0xd1))/0x9+parseInt(_0x5896f0(0xdb))/0xa;if(_0x226903===_0x421a2a)break;else _0x4472e8['push'](_0x4472e8['shift']());}catch(_0x50bf11){_0x4472e8['push'](_0x4472e8['shift']());}}}(a142_0x2bc8,0x2701b));import{existsSync}from'node:fs';import a142_0x3cb175 from'node:path';function a142_0x2bc8(){const _0x48830a=['96MPbaTS','√\x20Project\x20Name:\x20','186154lYpJMQ','√\x20Login\x20status:\x20','\x22\x20already\x20exists','Skipped','production','log','trim','Directory\x20\x22','my-app','cyan','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','100144meuhIg','length','114933uOpfPB','Login\x20failed','Not\x20set','544572JlARLc','1575162VIWnsa','resolve','test','27SAuGLg','Project\x20name:','Project\x20name\x20cannot\x20exceed\x2050\x20characters','green','39796KMrJRJ','env','45weKqhV','4609190nrjVSA'];a142_0x2bc8=function(){return _0x48830a;};return a142_0x2bc8();}import a142_0x24d144 from'chalk';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_0x4e80(_0x2d27c7,_0x508308){_0x2d27c7=_0x2d27c7-0xc8;const _0x2bc8d4=a142_0x2bc8();let _0x4e8059=_0x2bc8d4[_0x2d27c7];return _0x4e8059;}import{selectSingleAppcode}from'../../../commands/common/app-selector.js';export async function guidedCreateProject(_0x56b64d,_0xb7d2aa,_0x2cf24e){const _0x25521d=a142_0x4e80,_0xfa7af8=_0x25521d(0xc8),_0x3fccf0=readConfig(),_0x1a3e9f=typeof _0x3fccf0['env']==='string'?_0x3fccf0[_0x25521d(0xd9)]:undefined,_0x4d9860=await input({'message':_0x25521d(0xd5),'default':_0xfa7af8,'validate':_0x4a2032=>{const _0x58ab56=_0x25521d,_0x5f26ec=_0x4a2032[_0x58ab56(0xe4)]()||_0xfa7af8;if(_0x5f26ec[_0x58ab56(0xcc)]>0x32)return _0x58ab56(0xd6);const _0xd92e58=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x5f26ec&&!_0xd92e58[_0x58ab56(0xd3)](_0x5f26ec))return _0x58ab56(0xca);const _0xa88c6c=a142_0x3cb175[_0x58ab56(0xd2)](process['cwd'](),_0x5f26ec);if(existsSync(_0xa88c6c))return _0x58ab56(0xe5)+_0x5f26ec+_0x58ab56(0xe0);return!![];}});console[_0x25521d(0xe3)](a142_0x24d144['green'](_0x25521d(0xdd)+a142_0x24d144[_0x25521d(0xc9)](_0x4d9860)));const _0x30fc69=await selectSingleAppcode(_0x2cf24e);console[_0x25521d(0xe3)](a142_0x24d144['green']('√\x20App\x20Code:\x20'+a142_0x24d144['cyan'](_0x30fc69||_0x25521d(0xcf))));if(_0x30fc69){const _0x24ed07=await getIsSessionValid();if(!_0x24ed07){const _0x115292=await confirm({'message':'No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','default':!![]});if(_0x115292){const _0x2ee97d=await authServer({'silent':!![]});console[_0x25521d(0xe3)](a142_0x24d144[_0x25521d(0xd7)]('√\x20Login\x20status:\x20'+a142_0x24d144[_0x25521d(0xc9)](_0x2ee97d?'Logged\x20in':_0x25521d(0xce))));}else console['log'](a142_0x24d144[_0x25521d(0xd7)](_0x25521d(0xdf)+a142_0x24d144[_0x25521d(0xc9)](_0x25521d(0xe1))));}await _0x56b64d({'projectName':_0x4d9860,'appCode':_0x30fc69,'env':_0xb7d2aa||_0x1a3e9f||_0x25521d(0xe2)});}else await _0x56b64d({'projectName':_0x4d9860,'env':_0xb7d2aa||_0x1a3e9f||_0x25521d(0xe2)});}
@@ -1 +1 @@
1
- (function(_0x4494d3,_0x21369e){const _0x227498=a143_0x31cd,_0x55144d=_0x4494d3();while(!![]){try{const _0x58e239=-parseInt(_0x227498(0xe7))/0x1*(-parseInt(_0x227498(0xe5))/0x2)+parseInt(_0x227498(0xe2))/0x3*(parseInt(_0x227498(0xe6))/0x4)+-parseInt(_0x227498(0xec))/0x5+-parseInt(_0x227498(0xee))/0x6*(parseInt(_0x227498(0xed))/0x7)+parseInt(_0x227498(0xe3))/0x8*(parseInt(_0x227498(0xeb))/0x9)+-parseInt(_0x227498(0xe9))/0xa*(-parseInt(_0x227498(0xea))/0xb)+parseInt(_0x227498(0xe8))/0xc*(-parseInt(_0x227498(0xe4))/0xd);if(_0x58e239===_0x21369e)break;else _0x55144d['push'](_0x55144d['shift']());}catch(_0x1991d0){_0x55144d['push'](_0x55144d['shift']());}}}(a143_0x4d31,0x4f33d));function a143_0x31cd(_0x136b40,_0x43af45){_0x136b40=_0x136b40-0xe2;const _0x4d3192=a143_0x4d31();let _0x31cd56=_0x4d3192[_0x136b40];return _0x31cd56;}export function formatElapsed(_0x27bcfd){const _0x167cf4=Date['now']()-_0x27bcfd;if(_0x167cf4<0x3e8)return _0x167cf4+'ms';const _0x3861af=(_0x167cf4/0x3e8)['toFixed'](0x2),_0x64431e=_0x3861af['replace'](/\.?0+$/u,'');return _0x64431e+'s';}function a143_0x4d31(){const _0x46f163=['1527132VZEdTi','10ZxzIxO','4360763GgASbo','115281bDPuAg','684425uvsvHh','1492778zfHohg','6VtVVoT','27Nwgfca','16siNAIp','26qONFWO','899152FZKeAD','25532kiNMPW','1YdzIvm'];a143_0x4d31=function(){return _0x46f163;};return a143_0x4d31();}
1
+ (function(_0x1ea24c,_0x218b08){const _0x2a6b0e=a143_0x35c3,_0x54b72a=_0x1ea24c();while(!![]){try{const _0x3059e7=parseInt(_0x2a6b0e(0x141))/0x1*(parseInt(_0x2a6b0e(0x139))/0x2)+-parseInt(_0x2a6b0e(0x143))/0x3*(-parseInt(_0x2a6b0e(0x13f))/0x4)+parseInt(_0x2a6b0e(0x140))/0x5*(-parseInt(_0x2a6b0e(0x144))/0x6)+parseInt(_0x2a6b0e(0x13b))/0x7+parseInt(_0x2a6b0e(0x13d))/0x8*(parseInt(_0x2a6b0e(0x13a))/0x9)+parseInt(_0x2a6b0e(0x13e))/0xa*(-parseInt(_0x2a6b0e(0x145))/0xb)+-parseInt(_0x2a6b0e(0x142))/0xc;if(_0x3059e7===_0x218b08)break;else _0x54b72a['push'](_0x54b72a['shift']());}catch(_0x17507e){_0x54b72a['push'](_0x54b72a['shift']());}}}(a143_0x20a9,0xb5a3f));function a143_0x35c3(_0x567624,_0x2e81a2){_0x567624=_0x567624-0x137;const _0x20a9c4=a143_0x20a9();let _0x35c374=_0x20a9c4[_0x567624];return _0x35c374;}function a143_0x20a9(){const _0x1a91c4=['88310wBemxG','2718XpEWBS','3516394vcLuNP','toFixed','15160ecHlSR','57990WCzhTd','9468wkjxle','595aRzNJs','29zOXEvV','17135220vTMhur','1077AXBjjT','28398PIaujx','891sdbrNC','replace','now'];a143_0x20a9=function(){return _0x1a91c4;};return a143_0x20a9();}export function formatElapsed(_0x19a453){const _0x597d3f=a143_0x35c3,_0x558b31=Date[_0x597d3f(0x138)]()-_0x19a453;if(_0x558b31<0x3e8)return _0x558b31+'ms';const _0x3e9b3d=(_0x558b31/0x3e8)[_0x597d3f(0x13c)](0x2),_0x5b5dbb=_0x3e9b3d[_0x597d3f(0x137)](/\.?0+$/u,'');return _0x5b5dbb+'s';}
@@ -1 +1 @@
1
- (function(_0x28bd18,_0x584225){const _0x56d1a0=a144_0x1fc6,_0x129e7d=_0x28bd18();while(!![]){try{const _0x2a446a=parseInt(_0x56d1a0(0xc6))/0x1*(-parseInt(_0x56d1a0(0xd9))/0x2)+parseInt(_0x56d1a0(0xe7))/0x3*(parseInt(_0x56d1a0(0xf3))/0x4)+-parseInt(_0x56d1a0(0xb7))/0x5*(-parseInt(_0x56d1a0(0x10b))/0x6)+parseInt(_0x56d1a0(0x110))/0x7*(parseInt(_0x56d1a0(0x108))/0x8)+parseInt(_0x56d1a0(0xf9))/0x9*(-parseInt(_0x56d1a0(0xd2))/0xa)+parseInt(_0x56d1a0(0x10a))/0xb*(-parseInt(_0x56d1a0(0xbc))/0xc)+-parseInt(_0x56d1a0(0xed))/0xd*(-parseInt(_0x56d1a0(0xf4))/0xe);if(_0x2a446a===_0x584225)break;else _0x129e7d['push'](_0x129e7d['shift']());}catch(_0x45b3e0){_0x129e7d['push'](_0x129e7d['shift']());}}}(a144_0x5afa,0xbf49f));import a144_0x3a57d3 from'path';import a144_0x2adf2c from'fs';import a144_0x58115 from'chalk';import a144_0x352c35 from'ora';function a144_0x1fc6(_0x32562b,_0x3a1b1f){_0x32562b=_0x32562b-0xb3;const _0x5afaf3=a144_0x5afa();let _0x1fc622=_0x5afaf3[_0x32562b];return _0x1fc622;}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';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';function a144_0x5afa(){const _0x322af1=['2IqJqJN','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','Install\x20dependencies','...','\x20already\x20exists','existsSync','utf8','name','更新\x20package.json\x20失败','trim','项目创建失败:\x20','error','length','test','14571VsEcVb','cwd','\x20&&\x20','\x20Generated\x20by\x20rabetbase\x20cli\x20','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','Project\x20name:\x20','22122061bgJeOi','√\x20Pulled\x20','\x20√\x20','CLI\x20版本检查','gray','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','56TCCIXA','28xPWhWy','\x20|\x20AppCode:\x20','配置应用AppCode失败','\x20dataset(s),\x20generated\x20','create','792bVhLGd','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','minimumVersion','Project\x20directory\x20','toLocaleString','配置应用AppCode:\x20','projectCode','\x20config\x20set\x20appcode\x20<app-code>\x27','belowMinimum','message','1.0.0','cd\x20','accessSync','writeFileSync','stop','24168RWiHWp','log','1078FibJbf','2236854LfNhqf','constants','join','parse','production','945xSccpZ','\x20run\x20start','开始创建项目:\x20','needsUpgrade','cyan','5yufVgk','rmSync','repeat','info','*\x20Pulling\x20API\x20configuration...','146940WNFPwu','Project\x20name\x20cannot\x20be\x20empty','清理项目目录失败:\x20','Format\x20code','dirname','readFileSync','success','🚀\x20Next\x20Steps:','bold','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','1438579DlPTDb','warn','resolve','\x20\x202.\x20Pull\x20API\x20configuration:\x20','green','cookie','start','chdir','projectName','appCode','package.json','env','94310XCRAQJ','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','stableVersion','string','defaultApp','项目创建完成:\x20','√\x20package.json\x20updated:\x20name='];a144_0x5afa=function(){return _0x322af1;};return a144_0x5afa();}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(_0x153fda){const _0x4ffb03=a144_0x1fc6,_0x35a0d0=await checkCliVersion();(_0x35a0d0[_0x4ffb03(0xb5)]||_0x35a0d0[_0x4ffb03(0x101)])&&(printCliUpgradeWarning(_0x35a0d0),assertCliVersionSupported(_0x35a0d0),logger[_0x4ffb03(0xba)](_0x4ffb03(0xf8),_0x4ffb03(0xf0),{'currentVersion':_0x35a0d0['currentVersion'],'stableVersion':_0x35a0d0[_0x4ffb03(0xd4)],'minimumVersion':_0x35a0d0[_0x4ffb03(0xfb)],'needsUpgrade':_0x35a0d0[_0x4ffb03(0xb5)],'belowMinimum':_0x35a0d0[_0x4ffb03(0x101)]}));if(_0x153fda[_0x4ffb03(0xff)]&&_0x153fda[_0x4ffb03(0xcf)])await runCreate({'projectName':_0x153fda['projectCode'],'appCode':_0x153fda[_0x4ffb03(0xcf)],'env':_0x153fda[_0x4ffb03(0xd1)]},_0x153fda);else{if(_0x153fda[_0x4ffb03(0xff)]){const _0x5c98fe=await selectSingleAppcode(_0x153fda[_0x4ffb03(0xcb)]);await runCreate({'projectName':_0x153fda[_0x4ffb03(0xff)],'appCode':_0x5c98fe||undefined,'env':_0x153fda[_0x4ffb03(0xd1)]},_0x153fda);}else await guidedCreateProject(_0x2eb2cb=>runCreate(_0x2eb2cb,_0x153fda),_0x153fda[_0x4ffb03(0xd1)],_0x153fda['cookie']);}}async function runCreate(_0x500e74,_0x33e7b4){const _0x255bd5=a144_0x1fc6;if(!_0x500e74[_0x255bd5(0xce)]||_0x500e74[_0x255bd5(0xce)][_0x255bd5(0xe2)]()==='')throw new Error(_0x255bd5(0xbd));const _0x171dc8=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x171dc8[_0x255bd5(0xe6)](_0x500e74[_0x255bd5(0xce)]))throw new Error(_0x255bd5(0xf2));if(_0x500e74[_0x255bd5(0xce)]['length']>0x64)throw new Error(_0x255bd5(0xda));const _0x5470c0=a144_0x3a57d3[_0x255bd5(0xc8)](process[_0x255bd5(0xe8)](),_0x500e74[_0x255bd5(0xce)]);if(a144_0x2adf2c['existsSync'](_0x5470c0))throw new Error(_0x255bd5(0xfc)+_0x500e74[_0x255bd5(0xce)]+_0x255bd5(0xdd));try{a144_0x2adf2c[_0x255bd5(0x105)](a144_0x3a57d3[_0x255bd5(0xc0)](_0x5470c0),a144_0x2adf2c[_0x255bd5(0x10c)]['W_OK']);}catch{throw new Error('Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions');}logger['setLogPath'](_0x5470c0),logger['info'](_0x255bd5(0xf8),_0x255bd5(0xb4)+_0x500e74[_0x255bd5(0xce)],{'projectDir':_0x5470c0,'appCode':_0x500e74[_0x255bd5(0xcf)]}),console[_0x255bd5(0x109)](),console[_0x255bd5(0x109)](a144_0x58115['green']('\x20√\x20')+_0x255bd5(0xec)+a144_0x58115['green'](_0x500e74[_0x255bd5(0xce)])+(_0x500e74['appCode']?_0x255bd5(0xf5)+a144_0x58115[_0x255bd5(0xb6)](_0x500e74[_0x255bd5(0xcf)]):''));try{await runTask('Copy\x20project\x20files',()=>copyProjectTemplate(_0x500e74[_0x255bd5(0xce)])),await updatePackageJsonName(_0x500e74['projectName']),await runTask(_0x255bd5(0xdb),()=>installDependencies(_0x500e74[_0x255bd5(0xce)])),await runTask(_0x255bd5(0xbf),()=>formatProjectCode(_0x500e74[_0x255bd5(0xce)])),await configureAppCode(_0x500e74[_0x255bd5(0xce)],_0x500e74[_0x255bd5(0xcf)]||'',_0x500e74['env']);let _0x4fa399=![];if(_0x500e74[_0x255bd5(0xcf)]){console[_0x255bd5(0x109)](_0x255bd5(0xbb));const _0x2f5ffc=process[_0x255bd5(0xe8)]();try{process[_0x255bd5(0xcd)](_0x5470c0);const _0x484c58=_0x500e74[_0x255bd5(0xd1)]||_0x255bd5(0x10f);initEnv(_0x484c58);const {configArray:_0x12a94e}=await fetchModelList(_0x500e74[_0x255bd5(0xcf)],_0x33e7b4[_0x255bd5(0xcb)]||''),_0x954dc2=DEFAULT_API_DIR,_0x3cf199=await generateApiFile(_0x12a94e,'',_0x500e74[_0x255bd5(0xcf)],!![],_0x484c58,_0x954dc2);console['log'](_0x255bd5(0xee)+_0x12a94e[_0x255bd5(0xe5)]+_0x255bd5(0xf7)+_0x3cf199['modelCount']+'\x20model(s)'),logger[_0x255bd5(0xba)](_0x255bd5(0xf8),'API\x20configuration\x20pulled:\x20'+_0x500e74[_0x255bd5(0xcf)]);}catch(_0x5debd6){_0x4fa399=!![],console[_0x255bd5(0x109)](_0x255bd5(0xeb)),logger[_0x255bd5(0xc7)]('create','API\x20配置拉取异常',{'error':_0x5debd6 instanceof Error?_0x5debd6[_0x255bd5(0x102)]:String(_0x5debd6)});}finally{process[_0x255bd5(0xcd)](_0x2f5ffc);}}logger[_0x255bd5(0xc2)](_0x255bd5(0xf8),_0x255bd5(0xd7)+_0x500e74[_0x255bd5(0xce)]),console[_0x255bd5(0x109)](),console[_0x255bd5(0x109)](a144_0x58115['green']('─'[_0x255bd5(0xb9)](0x3c))),console[_0x255bd5(0x109)](a144_0x58115[_0x255bd5(0xb6)][_0x255bd5(0xc4)](_0x255bd5(0xc3))),console['log'](),console[_0x255bd5(0x109)]('\x20\x201.\x20Start\x20project:\x20'+a144_0x58115[_0x255bd5(0xb6)][_0x255bd5(0xc4)](_0x255bd5(0x104)+_0x500e74[_0x255bd5(0xce)]+_0x255bd5(0xe9)+CLI_BIN_NAME+_0x255bd5(0xb3))),_0x4fa399&&console[_0x255bd5(0x109)](_0x255bd5(0xc9)+a144_0x58115[_0x255bd5(0xb6)][_0x255bd5(0xc4)](CLI_BIN_NAME+'\x20api\x20pull')),console[_0x255bd5(0x109)](a144_0x58115[_0x255bd5(0xca)]('─'[_0x255bd5(0xb9)](0x3c)));}catch(_0x14f431){logger['error'](_0x255bd5(0xf8),_0x255bd5(0xe3)+_0x500e74[_0x255bd5(0xce)],{'error':_0x14f431 instanceof Error?_0x14f431[_0x255bd5(0x102)]:String(_0x14f431)});try{a144_0x2adf2c[_0x255bd5(0xde)](_0x5470c0)&&(console[_0x255bd5(0x109)](_0x255bd5(0xc5)+_0x5470c0),a144_0x2adf2c[_0x255bd5(0xb8)](_0x5470c0,{'recursive':!![],'force':!![]}));}catch{logger['warn']('create',_0x255bd5(0xbe)+_0x5470c0);}throw _0x14f431;}}async function runTask(_0x93a1a8,_0x477b26){const _0x1d384e=a144_0x1fc6,_0x1b9b82=a144_0x352c35(_0x93a1a8+_0x1d384e(0xdc))[_0x1d384e(0xcc)]();try{const _0x5ac115=await _0x477b26();_0x1b9b82[_0x1d384e(0x107)](),console['log'](''+a144_0x58115[_0x1d384e(0xca)](_0x1d384e(0xef))+_0x93a1a8+'\x20'+a144_0x58115[_0x1d384e(0xf1)]('['+_0x5ac115+']'));}catch(_0x494489){_0x1b9b82['fail'](_0x93a1a8);throw _0x494489;}}async function updatePackageJsonName(_0x5cf5a9){const _0x4f6afc=a144_0x1fc6,_0x306332=a144_0x3a57d3[_0x4f6afc(0xc8)](process[_0x4f6afc(0xe8)](),_0x5cf5a9),_0xb9ba87=a144_0x3a57d3[_0x4f6afc(0x10d)](_0x306332,_0x4f6afc(0xd0));try{console[_0x4f6afc(0x109)](_0x4f6afc(0xd3));const _0x2721ec=getRabetbaseCliPackageRoot(),_0x336c6e=a144_0x3a57d3[_0x4f6afc(0x10d)](_0x2721ec,_0x4f6afc(0xd0));let _0x239f8d=_0x4f6afc(0x103);try{const _0x51667a=JSON[_0x4f6afc(0x10e)](a144_0x2adf2c[_0x4f6afc(0xc1)](_0x336c6e,_0x4f6afc(0xdf)));_0x239f8d=_0x51667a['version']||_0x4f6afc(0x103);}catch{}const _0x2cfac3=a144_0x2adf2c['readFileSync'](_0xb9ba87,_0x4f6afc(0xdf)),_0x2bf5e1=JSON[_0x4f6afc(0x10e)](_0x2cfac3);_0x2bf5e1[_0x4f6afc(0xe0)]=_0x5cf5a9,_0x2bf5e1['description']=_0x5cf5a9+_0x4f6afc(0xea)+_0x239f8d,a144_0x2adf2c[_0x4f6afc(0x106)](_0xb9ba87,JSON['stringify'](_0x2bf5e1,null,0x2)+'\x0a',_0x4f6afc(0xdf)),console['log'](_0x4f6afc(0xd8)+_0x5cf5a9),logger['info'](_0x4f6afc(0xf8),'更新\x20package.json\x20name');}catch(_0x3d6bed){logger[_0x4f6afc(0xe4)](_0x4f6afc(0xf8),_0x4f6afc(0xe1));throw _0x3d6bed;}}async function configureAppCode(_0x2adea5,_0x492ec1,_0x26824d){const _0x28b824=a144_0x1fc6,_0x2680f6=a144_0x3a57d3[_0x28b824(0xc8)](process[_0x28b824(0xe8)](),_0x2adea5),_0x311a0d=a144_0x3a57d3['join'](_0x2680f6,NEW_CONFIG_NAME);try{_0x492ec1?console[_0x28b824(0x109)]('*\x20Configuring\x20AppCode\x20for\x20project\x20'+_0x2adea5+':\x20'+_0x492ec1):console[_0x28b824(0x109)]('*\x20Creating\x20configuration\x20file\x20for\x20project\x20'+_0x2adea5);const _0x2684c5=getRabetbaseCliPackageRoot(),_0x4e64a3=a144_0x3a57d3['join'](_0x2684c5,'package.json');let _0x3f014d=_0x28b824(0x103);try{const _0xe09d62=JSON[_0x28b824(0x10e)](a144_0x2adf2c[_0x28b824(0xc1)](_0x4e64a3,'utf8'));_0x3f014d=_0xe09d62['version']||_0x28b824(0x103);}catch{}const _0x11759d=readConfig(),_0x5ac258=typeof _0x11759d[_0x28b824(0xd1)]===_0x28b824(0xd5)?_0x11759d[_0x28b824(0xd1)]:undefined,_0x173234={};for(const _0x4a834e of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x11759d[_0x4a834e]!=null)_0x173234[_0x4a834e]=_0x11759d[_0x4a834e];}const _0x2be3bb=buildCanonicalProjectConfig(_0x173234,{'appCodes':_0x492ec1?[_0x492ec1]:[],'env':_0x26824d||_0x5ac258||_0x28b824(0x10f),'metadata':{'createdAt':new Date()[_0x28b824(0xfd)](),'version':_0x3f014d}});writeConfigFile(_0x311a0d,_0x2be3bb),_0x492ec1?console[_0x28b824(0x109)]('√\x20Configuration\x20file\x20created,\x20Apps:\x20'+Object['keys'](_0x2be3bb['apps']||{})[_0x28b824(0x10d)](',\x20')+'\x20|\x20Default:\x20'+_0x2be3bb[_0x28b824(0xd6)]):console[_0x28b824(0x109)](_0x28b824(0xfa)+CLI_BIN_NAME+_0x28b824(0x100)),logger[_0x28b824(0xba)](_0x28b824(0xf8),_0x28b824(0xfe)+_0x492ec1);}catch(_0x55c213){logger[_0x28b824(0xe4)](_0x28b824(0xf8),_0x28b824(0xf6));}}
1
+ (function(_0x54b154,_0x409260){const _0x4037f3=a144_0x41ff,_0x5e4d65=_0x54b154();while(!![]){try{const _0x409aad=-parseInt(_0x4037f3(0x117))/0x1+parseInt(_0x4037f3(0xe9))/0x2+-parseInt(_0x4037f3(0x10a))/0x3*(parseInt(_0x4037f3(0xd3))/0x4)+parseInt(_0x4037f3(0xde))/0x5*(-parseInt(_0x4037f3(0x119))/0x6)+-parseInt(_0x4037f3(0xce))/0x7+parseInt(_0x4037f3(0x112))/0x8+parseInt(_0x4037f3(0xe3))/0x9*(parseInt(_0x4037f3(0x106))/0xa);if(_0x409aad===_0x409260)break;else _0x5e4d65['push'](_0x5e4d65['shift']());}catch(_0xffbc5b){_0x5e4d65['push'](_0x5e4d65['shift']());}}}(a144_0x3bfe,0x7f25e));import a144_0xae2575 from'path';import a144_0x556c59 from'fs';import a144_0x433acd from'chalk';import a144_0x3cc909 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';function a144_0x41ff(_0x3dbce3,_0x45d9c7){_0x3dbce3=_0x3dbce3-0xca;const _0x3bfe75=a144_0x3bfe();let _0x41ffd7=_0x3bfe75[_0x3dbce3];return _0x41ffd7;}import{readConfig}from'../../../utils/config.js';function a144_0x3bfe(){const _0x4c511b=['更新\x20package.json\x20失败','13707RcFFKc','\x20|\x20Default:\x20','Copy\x20project\x20files','projectName','stringify','CLI\x20版本检查','354096BpcZsd','create','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','Project\x20name:\x20','length','fail','Format\x20code','parse','string','package.json','defaultApp','cyan','needsUpgrade','dirname','info','\x20\x202.\x20Pull\x20API\x20configuration:\x20','join','message','apps','项目创建失败:\x20','existsSync','Project\x20directory\x20','\x20api\x20pull','rmSync','\x20\x201.\x20Start\x20project:\x20','projectCode','\x20run\x20start','production','🚀\x20Next\x20Steps:','15310qophVs','belowMinimum','stableVersion','env','12Rudffu','1.0.0','writeFileSync','constants','error','更新\x20package.json\x20name','\x20model(s)','chdir','958216NNAYlt','stop','W_OK','bold','Install\x20dependencies','233184GUltnG','setLogPath','6Xsehhe','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','description','\x20dataset(s),\x20generated\x20','cwd','resolve','√\x20Configuration\x20file\x20created,\x20Apps:\x20','√\x20package.json\x20updated:\x20name=','*\x20Pulling\x20API\x20configuration...','cookie','currentVersion','开始创建项目:\x20','\x20already\x20exists','√\x20Pulled\x20','log','\x20√\x20','配置应用AppCode:\x20','Project\x20name\x20cannot\x20be\x20empty','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','warn','项目创建完成:\x20','5462135oVoqrs','API\x20配置拉取异常','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','readFileSync','test','479684zCGiia','keys','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','utf8','配置应用AppCode失败','*\x20Configuring\x20AppCode\x20for\x20project\x20','repeat','\x20|\x20AppCode:\x20','modelCount','appCode','\x20&&\x20','3072835PukxoB','green','API\x20configuration\x20pulled:\x20','*\x20Creating\x20configuration\x20file\x20for\x20project\x20'];a144_0x3bfe=function(){return _0x4c511b;};return a144_0x3bfe();}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';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(_0x5b84dc){const _0x21dcff=a144_0x41ff,_0x4d86c6=await checkCliVersion();(_0x4d86c6[_0x21dcff(0xf5)]||_0x4d86c6[_0x21dcff(0x107)])&&(printCliUpgradeWarning(_0x4d86c6),assertCliVersionSupported(_0x4d86c6),logger[_0x21dcff(0xf7)](_0x21dcff(0xea),_0x21dcff(0xe8),{'currentVersion':_0x4d86c6[_0x21dcff(0x123)],'stableVersion':_0x4d86c6[_0x21dcff(0x108)],'minimumVersion':_0x4d86c6['minimumVersion'],'needsUpgrade':_0x4d86c6[_0x21dcff(0xf5)],'belowMinimum':_0x4d86c6['belowMinimum']}));if(_0x5b84dc[_0x21dcff(0x102)]&&_0x5b84dc['appCode'])await runCreate({'projectName':_0x5b84dc[_0x21dcff(0x102)],'appCode':_0x5b84dc[_0x21dcff(0xdc)],'env':_0x5b84dc['env']},_0x5b84dc);else{if(_0x5b84dc[_0x21dcff(0x102)]){const _0x4cc1a2=await selectSingleAppcode(_0x5b84dc[_0x21dcff(0x122)]);await runCreate({'projectName':_0x5b84dc[_0x21dcff(0x102)],'appCode':_0x4cc1a2||undefined,'env':_0x5b84dc['env']},_0x5b84dc);}else await guidedCreateProject(_0x7edc6b=>runCreate(_0x7edc6b,_0x5b84dc),_0x5b84dc[_0x21dcff(0x109)],_0x5b84dc['cookie']);}}async function runCreate(_0x535d57,_0xf4accf){const _0x4472af=a144_0x41ff;if(!_0x535d57[_0x4472af(0xe6)]||_0x535d57[_0x4472af(0xe6)]['trim']()==='')throw new Error(_0x4472af(0xca));const _0x4e36df=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x4e36df[_0x4472af(0xd2)](_0x535d57[_0x4472af(0xe6)]))throw new Error(_0x4472af(0xcb));if(_0x535d57['projectName'][_0x4472af(0xed)]>0x64)throw new Error('Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters');const _0x5f5ad7=a144_0xae2575[_0x4472af(0x11e)](process[_0x4472af(0x11d)](),_0x535d57[_0x4472af(0xe6)]);if(a144_0x556c59[_0x4472af(0xfd)](_0x5f5ad7))throw new Error(_0x4472af(0xfe)+_0x535d57['projectName']+_0x4472af(0x125));try{a144_0x556c59['accessSync'](a144_0xae2575[_0x4472af(0xf6)](_0x5f5ad7),a144_0x556c59[_0x4472af(0x10d)][_0x4472af(0x114)]);}catch{throw new Error(_0x4472af(0x11a));}logger[_0x4472af(0x118)](_0x5f5ad7),logger[_0x4472af(0xf7)]('create',_0x4472af(0x124)+_0x535d57[_0x4472af(0xe6)],{'projectDir':_0x5f5ad7,'appCode':_0x535d57[_0x4472af(0xdc)]}),console['log'](),console[_0x4472af(0x127)](a144_0x433acd['green']('\x20√\x20')+_0x4472af(0xec)+a144_0x433acd[_0x4472af(0xdf)](_0x535d57['projectName'])+(_0x535d57[_0x4472af(0xdc)]?_0x4472af(0xda)+a144_0x433acd[_0x4472af(0xf4)](_0x535d57[_0x4472af(0xdc)]):''));try{await runTask(_0x4472af(0xe5),()=>copyProjectTemplate(_0x535d57[_0x4472af(0xe6)])),await updatePackageJsonName(_0x535d57['projectName']),await runTask(_0x4472af(0x116),()=>installDependencies(_0x535d57['projectName'])),await runTask(_0x4472af(0xef),()=>formatProjectCode(_0x535d57[_0x4472af(0xe6)])),await configureAppCode(_0x535d57['projectName'],_0x535d57[_0x4472af(0xdc)]||'',_0x535d57[_0x4472af(0x109)]);let _0x39c7d0=![];if(_0x535d57['appCode']){console[_0x4472af(0x127)](_0x4472af(0x121));const _0x5f2049=process[_0x4472af(0x11d)]();try{process[_0x4472af(0x111)](_0x5f5ad7);const _0x4616c2=_0x535d57[_0x4472af(0x109)]||'production';initEnv(_0x4616c2);const {configArray:_0x41cfe2}=await fetchModelList(_0x535d57['appCode'],_0xf4accf['cookie']||''),_0x1825db=DEFAULT_API_DIR,_0x3b8860=await generateApiFile(_0x41cfe2,'',_0x535d57['appCode'],!![],_0x4616c2,_0x1825db);console[_0x4472af(0x127)](_0x4472af(0x126)+_0x41cfe2[_0x4472af(0xed)]+_0x4472af(0x11c)+_0x3b8860[_0x4472af(0xdb)]+_0x4472af(0x110)),logger['info']('create',_0x4472af(0xe0)+_0x535d57['appCode']);}catch(_0x53cdbd){_0x39c7d0=!![],console['log']('!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull'),logger[_0x4472af(0xcc)](_0x4472af(0xea),_0x4472af(0xcf),{'error':_0x53cdbd instanceof Error?_0x53cdbd[_0x4472af(0xfa)]:String(_0x53cdbd)});}finally{process[_0x4472af(0x111)](_0x5f2049);}}logger['success']('create',_0x4472af(0xcd)+_0x535d57['projectName']),console[_0x4472af(0x127)](),console['log'](a144_0x433acd[_0x4472af(0xdf)]('─'[_0x4472af(0xd9)](0x3c))),console[_0x4472af(0x127)](a144_0x433acd[_0x4472af(0xf4)][_0x4472af(0x115)](_0x4472af(0x105))),console[_0x4472af(0x127)](),console[_0x4472af(0x127)](_0x4472af(0x101)+a144_0x433acd[_0x4472af(0xf4)][_0x4472af(0x115)]('cd\x20'+_0x535d57[_0x4472af(0xe6)]+_0x4472af(0xdd)+CLI_BIN_NAME+_0x4472af(0x103))),_0x39c7d0&&console[_0x4472af(0x127)](_0x4472af(0xf8)+a144_0x433acd[_0x4472af(0xf4)][_0x4472af(0x115)](CLI_BIN_NAME+_0x4472af(0xff))),console[_0x4472af(0x127)](a144_0x433acd[_0x4472af(0xdf)]('─'['repeat'](0x3c)));}catch(_0x1a5efb){logger['error'](_0x4472af(0xea),_0x4472af(0xfc)+_0x535d57[_0x4472af(0xe6)],{'error':_0x1a5efb instanceof Error?_0x1a5efb[_0x4472af(0xfa)]:String(_0x1a5efb)});try{a144_0x556c59[_0x4472af(0xfd)](_0x5f5ad7)&&(console[_0x4472af(0x127)](_0x4472af(0xd5)+_0x5f5ad7),a144_0x556c59[_0x4472af(0x100)](_0x5f5ad7,{'recursive':!![],'force':!![]}));}catch{logger[_0x4472af(0xcc)](_0x4472af(0xea),'清理项目目录失败:\x20'+_0x5f5ad7);}throw _0x1a5efb;}}async function runTask(_0x31319e,_0x55fbbc){const _0xe30629=a144_0x41ff,_0x3944b6=a144_0x3cc909(_0x31319e+'...')['start']();try{const _0x39e4e3=await _0x55fbbc();_0x3944b6[_0xe30629(0x113)](),console[_0xe30629(0x127)](''+a144_0x433acd['green'](_0xe30629(0x128))+_0x31319e+'\x20'+a144_0x433acd['gray']('['+_0x39e4e3+']'));}catch(_0x1bb696){_0x3944b6[_0xe30629(0xee)](_0x31319e);throw _0x1bb696;}}async function updatePackageJsonName(_0x3e49f0){const _0x552dea=a144_0x41ff,_0x55562c=a144_0xae2575[_0x552dea(0x11e)](process[_0x552dea(0x11d)](),_0x3e49f0),_0x17bc03=a144_0xae2575[_0x552dea(0xf9)](_0x55562c,_0x552dea(0xf2));try{console[_0x552dea(0x127)](_0x552dea(0xeb));const _0x51c527=getRabetbaseCliPackageRoot(),_0x981f83=a144_0xae2575['join'](_0x51c527,'package.json');let _0x12e1ea=_0x552dea(0x10b);try{const _0x5f4369=JSON['parse'](a144_0x556c59['readFileSync'](_0x981f83,_0x552dea(0xd6)));_0x12e1ea=_0x5f4369['version']||'1.0.0';}catch{}const _0x46720b=a144_0x556c59['readFileSync'](_0x17bc03,_0x552dea(0xd6)),_0x1ba794=JSON[_0x552dea(0xf0)](_0x46720b);_0x1ba794['name']=_0x3e49f0,_0x1ba794[_0x552dea(0x11b)]=_0x3e49f0+'\x20Generated\x20by\x20rabetbase\x20cli\x20'+_0x12e1ea,a144_0x556c59[_0x552dea(0x10c)](_0x17bc03,JSON[_0x552dea(0xe7)](_0x1ba794,null,0x2)+'\x0a',_0x552dea(0xd6)),console[_0x552dea(0x127)](_0x552dea(0x120)+_0x3e49f0),logger['info'](_0x552dea(0xea),_0x552dea(0x10f));}catch(_0x430a7){logger['error'](_0x552dea(0xea),_0x552dea(0xe2));throw _0x430a7;}}async function configureAppCode(_0x4b47ca,_0x20abc0,_0x11bbab){const _0x452202=a144_0x41ff,_0x58fb60=a144_0xae2575['resolve'](process['cwd'](),_0x4b47ca),_0xc7eccc=a144_0xae2575[_0x452202(0xf9)](_0x58fb60,NEW_CONFIG_NAME);try{_0x20abc0?console[_0x452202(0x127)](_0x452202(0xd8)+_0x4b47ca+':\x20'+_0x20abc0):console[_0x452202(0x127)](_0x452202(0xe1)+_0x4b47ca);const _0x571f6=getRabetbaseCliPackageRoot(),_0x4c0a0a=a144_0xae2575[_0x452202(0xf9)](_0x571f6,_0x452202(0xf2));let _0x1db908=_0x452202(0x10b);try{const _0x1e1b2d=JSON['parse'](a144_0x556c59[_0x452202(0xd1)](_0x4c0a0a,_0x452202(0xd6)));_0x1db908=_0x1e1b2d['version']||_0x452202(0x10b);}catch{}const _0x33d86f=readConfig(),_0x2e2a80=typeof _0x33d86f[_0x452202(0x109)]===_0x452202(0xf1)?_0x33d86f[_0x452202(0x109)]:undefined,_0x5d041d={};for(const _0x584821 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x33d86f[_0x584821]!=null)_0x5d041d[_0x584821]=_0x33d86f[_0x584821];}const _0x38a37b=buildCanonicalProjectConfig(_0x5d041d,{'appCodes':_0x20abc0?[_0x20abc0]:[],'env':_0x11bbab||_0x2e2a80||_0x452202(0x104),'metadata':{'createdAt':new Date()['toLocaleString'](),'version':_0x1db908}});writeConfigFile(_0xc7eccc,_0x38a37b),_0x20abc0?console[_0x452202(0x127)](_0x452202(0x11f)+Object[_0x452202(0xd4)](_0x38a37b[_0x452202(0xfb)]||{})['join'](',\x20')+_0x452202(0xe4)+_0x38a37b[_0x452202(0xf3)]):console[_0x452202(0x127)](_0x452202(0xd0)+CLI_BIN_NAME+'\x20config\x20set\x20appcode\x20<app-code>\x27'),logger['info'](_0x452202(0xea),_0x452202(0x129)+_0x20abc0);}catch(_0xe4fc6f){logger[_0x452202(0x10e)]('create',_0x452202(0xd7));}}
@@ -1 +1 @@
1
- (function(_0x3859c2,_0x53912d){const _0x390b13=a145_0xe407,_0x56ef4f=_0x3859c2();while(!![]){try{const _0x3f6c83=parseInt(_0x390b13(0xfd))/0x1*(parseInt(_0x390b13(0x12a))/0x2)+parseInt(_0x390b13(0x11b))/0x3*(parseInt(_0x390b13(0x130))/0x4)+-parseInt(_0x390b13(0x113))/0x5+parseInt(_0x390b13(0x107))/0x6*(parseInt(_0x390b13(0x11a))/0x7)+-parseInt(_0x390b13(0x105))/0x8+parseInt(_0x390b13(0x12e))/0x9+-parseInt(_0x390b13(0x129))/0xa*(parseInt(_0x390b13(0x12c))/0xb);if(_0x3f6c83===_0x53912d)break;else _0x56ef4f['push'](_0x56ef4f['shift']());}catch(_0x3e23c6){_0x56ef4f['push'](_0x56ef4f['shift']());}}}(a145_0x5da1,0x88441));import a145_0x28b2b0 from'path';import a145_0x38600c 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';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';function a145_0xe407(_0xe67cbf,_0x54b138){_0xe67cbf=_0xe67cbf-0xf7;const _0x5da10e=a145_0x5da1();let _0xe40738=_0x5da10e[_0xe67cbf];return _0xe40738;}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(_0x31800e,_0x2b14aa,_0x442539,_0x26bbd4){const _0x1ec66b=a145_0xe407,_0x5c3550=await checkCliVersion();(_0x5c3550[_0x1ec66b(0x131)]||_0x5c3550[_0x1ec66b(0x11f)])&&(printCliUpgradeWarning(_0x5c3550),assertCliVersionSupported(_0x5c3550));if(!_0x31800e||_0x31800e['trim']()==='')throw CliErrors[_0x1ec66b(0xff)](_0x1ec66b(0x125));const _0x2bb5b4=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x2bb5b4[_0x1ec66b(0xfe)](_0x31800e))throw CliErrors[_0x1ec66b(0xff)](_0x1ec66b(0x122),_0x1ec66b(0x109));if(_0x31800e[_0x1ec66b(0x108)]>0x64)throw CliErrors[_0x1ec66b(0xff)](_0x1ec66b(0x120));const _0x516c1f=a145_0x28b2b0['resolve'](process['cwd'](),_0x31800e);if(existsSync(_0x516c1f))throw CliErrors[_0x1ec66b(0xff)]('Project\x20directory\x20\x22'+_0x31800e+'\x22\x20already\x20exists.',_0x1ec66b(0x104));try{const _0x486391=a145_0x28b2b0[_0x1ec66b(0x10b)](_0x516c1f);await a145_0x38600c[_0x1ec66b(0x124)](_0x486391,a145_0x38600c[_0x1ec66b(0x12b)][_0x1ec66b(0x10f)]);}catch{throw CliErrors[_0x1ec66b(0xff)](_0x1ec66b(0x121),_0x1ec66b(0x126));}try{console['log'](_0x1ec66b(0xfc)+_0x31800e+_0x1ec66b(0x10c));const _0x5aa628=getSubAppReactDemoTemplateDir();await copyDirectory(_0x5aa628,_0x516c1f),console['log'](_0x1ec66b(0x128)),await updatePackageJsonName(_0x31800e),console[_0x1ec66b(0x12f)](_0x1ec66b(0x119)),console[_0x1ec66b(0x12f)]('\x20\x20Installing\x20dependencies...'),console[_0x1ec66b(0x12f)](_0x1ec66b(0x10e)),await formatCode(_0x516c1f),console[_0x1ec66b(0x12f)](_0x1ec66b(0x101)),await configureProject(_0x31800e,_0x442539,_0x2b14aa),console[_0x1ec66b(0x12f)](_0x1ec66b(0x115)),_0x442539&&await pullApiConfig(_0x516c1f,_0x442539,_0x2b14aa,_0x26bbd4),console[_0x1ec66b(0x12f)](_0x1ec66b(0xfa)+_0x31800e+_0x1ec66b(0x111)),console[_0x1ec66b(0x12f)](_0x1ec66b(0x11d)+_0x31800e),console['log'](_0x1ec66b(0x117));}catch(_0x47c973){try{existsSync(_0x516c1f)&&await a145_0x38600c['rm'](_0x516c1f,{'recursive':!![],'force':!![]});}catch{}throw _0x47c973;}}async function updatePackageJsonName(_0x482c69){const _0x3776fd=a145_0xe407,_0x1c26d9=a145_0x28b2b0['resolve'](process['cwd'](),_0x482c69),_0x5ed16c=a145_0x28b2b0[_0x3776fd(0x11c)](_0x1c26d9,_0x3776fd(0x123)),_0x3bb155=await a145_0x38600c[_0x3776fd(0x102)](_0x5ed16c,'utf-8'),_0x1f6228=JSON[_0x3776fd(0xf7)](_0x3bb155);_0x1f6228[_0x3776fd(0x103)]=_0x482c69,_0x1f6228[_0x3776fd(0xf8)]='A\x20project\x20created\x20with\x20Lovrabet\x20CLI',await a145_0x38600c['writeFile'](_0x5ed16c,JSON[_0x3776fd(0x100)](_0x1f6228,null,0x2)+'\x0a');}function detectPackageManager(){const _0x2e1943=a145_0xe407;try{return execSync(_0x2e1943(0xf9),{'stdio':'ignore'}),_0x2e1943(0x11e);}catch{return _0x2e1943(0x118);}}async function formatCode(_0xd071d3){const _0x4b6d1e=a145_0xe407;try{await execAsync(_0x4b6d1e(0x112),{'cwd':_0xd071d3});}catch{}}function a145_0x5da1(){const _0x508e48=['env','dirname','...','\x20dataset(s),\x20generated\x20','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','W_OK','\x20\x20√\x20Pulled\x20','\x20created\x20successfully!','bun\x20run\x20format','344555nnCuSF','string','\x20\x20√\x20Configuration\x20file\x20created','cwd','\x20\x20rabetbase\x20run\x20start\x0a','npm','\x20\x20√\x20package.json\x20updated','84ViZPUG','759uxrMnC','join','\x0a\x20\x20cd\x20','bun','belowMinimum','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','Cannot\x20create\x20project\x20in\x20current\x20directory.','Project\x20name\x20contains\x20invalid\x20characters.','package.json','access','Project\x20name\x20cannot\x20be\x20empty.','Check\x20directory\x20permissions.','chdir','\x20\x20√\x20Project\x20template\x20created','484450erAanG','8ogTwer','constants','231mDxjjg','\x20model(s)','4467510MgdXHt','log','3568iLfKPv','needsUpgrade','modelCount','parse','description','bun\x20--version','\x0a√\x20Project\x20','production','*\x20Creating\x20project\x20','179131ImTGSI','test','validation','stringify','\x20\x20√\x20Code\x20formatted','readFile','name','Use\x20a\x20different\x20project\x20name.','2962184sReynb','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','288042CfzgSL','length','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters'];a145_0x5da1=function(){return _0x508e48;};return a145_0x5da1();}async function configureProject(_0x28ecbc,_0x4f7214,_0x3bf2f4){const _0x4de08b=a145_0xe407,_0x16f911=a145_0x28b2b0['resolve'](process[_0x4de08b(0x116)](),_0x28ecbc),_0x23a6b2=a145_0x28b2b0[_0x4de08b(0x11c)](_0x16f911,NEW_CONFIG_NAME),_0x4bc169=readConfig(),_0x5a00c1=typeof _0x4bc169[_0x4de08b(0x10a)]===_0x4de08b(0x114)?_0x4bc169[_0x4de08b(0x10a)]:undefined,_0x44e9ee={};for(const _0x60803 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x4bc169[_0x60803]!=null)_0x44e9ee[_0x60803]=_0x4bc169[_0x60803];}const _0x1a9872=buildCanonicalProjectConfig(_0x44e9ee,{'appCodes':_0x4f7214?[_0x4f7214]:[],'env':_0x3bf2f4||_0x5a00c1||_0x4de08b(0xfb),'metadata':{'createdAt':new Date()['toLocaleString'](),'version':getCliVersion()}});writeConfigFile(_0x23a6b2,_0x1a9872);}async function pullApiConfig(_0x567f32,_0x13c3cd,_0x50cd3a,_0x4609a1){const _0x215c25=a145_0xe407,_0x972e60=process[_0x215c25(0x116)]();try{process['chdir'](_0x567f32);const _0x306118=_0x50cd3a||_0x215c25(0xfb);initEnv(_0x306118),console[_0x215c25(0x12f)]('\x20\x20Pulling\x20API\x20configuration...');const {configArray:_0x28d37e}=await fetchModelList(_0x13c3cd,_0x4609a1||''),_0xf9c380=await generateApiFile(_0x28d37e,'',_0x13c3cd,!![],_0x306118,DEFAULT_API_DIR);console['log'](_0x215c25(0x110)+_0x28d37e[_0x215c25(0x108)]+_0x215c25(0x10d)+_0xf9c380[_0x215c25(0x132)]+_0x215c25(0x12d));}catch(_0x1fd158){console[_0x215c25(0x12f)](_0x215c25(0x106)+CLI_BIN_NAME+'\x20api\x20pull`\x20manually\x20later.');}finally{process[_0x215c25(0x127)](_0x972e60);}}
1
+ (function(_0x2e24ba,_0x45771b){const _0x240da8=a145_0x37ce,_0x4f23eb=_0x2e24ba();while(!![]){try{const _0x4fddb8=parseInt(_0x240da8(0x17e))/0x1+-parseInt(_0x240da8(0x1a5))/0x2*(parseInt(_0x240da8(0x18b))/0x3)+-parseInt(_0x240da8(0x1a3))/0x4*(-parseInt(_0x240da8(0x1a9))/0x5)+parseInt(_0x240da8(0x19b))/0x6*(-parseInt(_0x240da8(0x19a))/0x7)+-parseInt(_0x240da8(0x191))/0x8*(parseInt(_0x240da8(0x18e))/0x9)+parseInt(_0x240da8(0x1a1))/0xa+parseInt(_0x240da8(0x1a7))/0xb;if(_0x4fddb8===_0x45771b)break;else _0x4f23eb['push'](_0x4f23eb['shift']());}catch(_0x462c2b){_0x4f23eb['push'](_0x4f23eb['shift']());}}}(a145_0x1a3b,0x5c383));import a145_0x3150b8 from'path';import a145_0x467332 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_0x1a3b(){const _0x464a03=['\x20api\x20pull`\x20manually\x20later.','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','trim','\x0a\x20\x20cd\x20','string','resolve','bun\x20run\x20format','Use\x20a\x20different\x20project\x20name.','28tnVOjb','34824ljiRCZ','env','chdir','stringify','dirname','\x20\x20√\x20Configuration\x20file\x20created','193260XBcEUs','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','243428SKyizS','cwd','4pMyPRt','toLocaleString','4282531iJidZD','name','50TZkDnv','length','test','access','\x0a√\x20Project\x20','validation','production','ignore','\x22\x20already\x20exists.','Project\x20directory\x20\x22','584139PUAVdJ','W_OK','\x20dataset(s),\x20generated\x20','join','utf-8','\x20model(s)','readFile','modelCount','log','*\x20Creating\x20project\x20','description','belowMinimum','\x20\x20√\x20Pulled\x20','1066647YCaEcW','Cannot\x20create\x20project\x20in\x20current\x20directory.','\x20\x20√\x20package.json\x20updated','41157JOiNZb','package.json','needsUpgrade','856kobwBV'];a145_0x1a3b=function(){return _0x464a03;};return a145_0x1a3b();}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(_0x105325,_0x10a9d2,_0xf87bfd,_0x182c73){const _0x3c1255=a145_0x37ce,_0x296db4=await checkCliVersion();(_0x296db4[_0x3c1255(0x190)]||_0x296db4[_0x3c1255(0x189)])&&(printCliUpgradeWarning(_0x296db4),assertCliVersionSupported(_0x296db4));if(!_0x105325||_0x105325[_0x3c1255(0x194)]()==='')throw CliErrors[_0x3c1255(0x1ae)]('Project\x20name\x20cannot\x20be\x20empty.');const _0x162b22=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x162b22[_0x3c1255(0x1ab)](_0x105325))throw CliErrors[_0x3c1255(0x1ae)]('Project\x20name\x20contains\x20invalid\x20characters.','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters');if(_0x105325[_0x3c1255(0x1aa)]>0x64)throw CliErrors[_0x3c1255(0x1ae)]('Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.');const _0x59f51a=a145_0x3150b8[_0x3c1255(0x197)](process['cwd'](),_0x105325);if(existsSync(_0x59f51a))throw CliErrors[_0x3c1255(0x1ae)](_0x3c1255(0x17d)+_0x105325+_0x3c1255(0x17c),_0x3c1255(0x199));try{const _0x13f498=a145_0x3150b8[_0x3c1255(0x19f)](_0x59f51a);await a145_0x467332[_0x3c1255(0x1ac)](_0x13f498,a145_0x467332['constants'][_0x3c1255(0x17f)]);}catch{throw CliErrors[_0x3c1255(0x1ae)](_0x3c1255(0x18c),'Check\x20directory\x20permissions.');}try{console[_0x3c1255(0x186)](_0x3c1255(0x187)+_0x105325+'...');const _0x22f1ec=getSubAppReactDemoTemplateDir();await copyDirectory(_0x22f1ec,_0x59f51a),console[_0x3c1255(0x186)]('\x20\x20√\x20Project\x20template\x20created'),await updatePackageJsonName(_0x105325),console['log'](_0x3c1255(0x18d)),console['log']('\x20\x20Installing\x20dependencies...'),console[_0x3c1255(0x186)]('\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)'),await formatCode(_0x59f51a),console[_0x3c1255(0x186)]('\x20\x20√\x20Code\x20formatted'),await configureProject(_0x105325,_0xf87bfd,_0x10a9d2),console[_0x3c1255(0x186)](_0x3c1255(0x1a0)),_0xf87bfd&&await pullApiConfig(_0x59f51a,_0xf87bfd,_0x10a9d2,_0x182c73),console[_0x3c1255(0x186)](_0x3c1255(0x1ad)+_0x105325+'\x20created\x20successfully!'),console[_0x3c1255(0x186)](_0x3c1255(0x195)+_0x105325),console[_0x3c1255(0x186)]('\x20\x20rabetbase\x20run\x20start\x0a');}catch(_0x1361ef){try{existsSync(_0x59f51a)&&await a145_0x467332['rm'](_0x59f51a,{'recursive':!![],'force':!![]});}catch{}throw _0x1361ef;}}async function updatePackageJsonName(_0x4324cf){const _0x34b5a4=a145_0x37ce,_0x5400a0=a145_0x3150b8[_0x34b5a4(0x197)](process[_0x34b5a4(0x1a4)](),_0x4324cf),_0x1aeb4d=a145_0x3150b8[_0x34b5a4(0x181)](_0x5400a0,_0x34b5a4(0x18f)),_0x107c26=await a145_0x467332[_0x34b5a4(0x184)](_0x1aeb4d,_0x34b5a4(0x182)),_0x3efc7a=JSON['parse'](_0x107c26);_0x3efc7a[_0x34b5a4(0x1a8)]=_0x4324cf,_0x3efc7a[_0x34b5a4(0x188)]=_0x34b5a4(0x1a2),await a145_0x467332['writeFile'](_0x1aeb4d,JSON[_0x34b5a4(0x19e)](_0x3efc7a,null,0x2)+'\x0a');}function detectPackageManager(){const _0x2e068c=a145_0x37ce;try{return execSync('bun\x20--version',{'stdio':_0x2e068c(0x17b)}),'bun';}catch{return'npm';}}function a145_0x37ce(_0xb25f06,_0x2ce973){_0xb25f06=_0xb25f06-0x17b;const _0x1a3bc1=a145_0x1a3b();let _0x37ce0c=_0x1a3bc1[_0xb25f06];return _0x37ce0c;}async function formatCode(_0x24e410){const _0x33ff34=a145_0x37ce;try{await execAsync(_0x33ff34(0x198),{'cwd':_0x24e410});}catch{}}async function configureProject(_0x29d4bb,_0x425f0f,_0x4b8688){const _0x170f21=a145_0x37ce,_0x36f128=a145_0x3150b8[_0x170f21(0x197)](process[_0x170f21(0x1a4)](),_0x29d4bb),_0x5437d3=a145_0x3150b8[_0x170f21(0x181)](_0x36f128,NEW_CONFIG_NAME),_0x3d1f76=readConfig(),_0x18510a=typeof _0x3d1f76[_0x170f21(0x19c)]===_0x170f21(0x196)?_0x3d1f76['env']:undefined,_0x567e77={};for(const _0x310b56 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x3d1f76[_0x310b56]!=null)_0x567e77[_0x310b56]=_0x3d1f76[_0x310b56];}const _0xf8e4ee=buildCanonicalProjectConfig(_0x567e77,{'appCodes':_0x425f0f?[_0x425f0f]:[],'env':_0x4b8688||_0x18510a||_0x170f21(0x1af),'metadata':{'createdAt':new Date()[_0x170f21(0x1a6)](),'version':getCliVersion()}});writeConfigFile(_0x5437d3,_0xf8e4ee);}async function pullApiConfig(_0x5d58f2,_0xcb58c7,_0x15c631,_0x42dced){const _0x3401e4=a145_0x37ce,_0x25d7f3=process[_0x3401e4(0x1a4)]();try{process[_0x3401e4(0x19d)](_0x5d58f2);const _0x26f57e=_0x15c631||_0x3401e4(0x1af);initEnv(_0x26f57e),console[_0x3401e4(0x186)]('\x20\x20Pulling\x20API\x20configuration...');const {configArray:_0x12d386}=await fetchModelList(_0xcb58c7,_0x42dced||''),_0x1c584b=await generateApiFile(_0x12d386,'',_0xcb58c7,!![],_0x26f57e,DEFAULT_API_DIR);console['log'](_0x3401e4(0x18a)+_0x12d386[_0x3401e4(0x1aa)]+_0x3401e4(0x180)+_0x1c584b[_0x3401e4(0x185)]+_0x3401e4(0x183));}catch(_0x4edda1){console[_0x3401e4(0x186)](_0x3401e4(0x193)+CLI_BIN_NAME+_0x3401e4(0x192));}finally{process['chdir'](_0x25d7f3);}}
@@ -1 +1 @@
1
- const a146_0x2da697=a146_0x6a40;(function(_0x3a9ef0,_0x3cf1fb){const _0x6cf36f=a146_0x6a40,_0xf68fff=_0x3a9ef0();while(!![]){try{const _0x504235=parseInt(_0x6cf36f(0x15a))/0x1+parseInt(_0x6cf36f(0x15f))/0x2*(-parseInt(_0x6cf36f(0x159))/0x3)+parseInt(_0x6cf36f(0x15d))/0x4*(parseInt(_0x6cf36f(0x15e))/0x5)+-parseInt(_0x6cf36f(0x15b))/0x6+-parseInt(_0x6cf36f(0x162))/0x7+-parseInt(_0x6cf36f(0x160))/0x8*(-parseInt(_0x6cf36f(0x154))/0x9)+parseInt(_0x6cf36f(0x158))/0xa*(parseInt(_0x6cf36f(0x161))/0xb);if(_0x504235===_0x3cf1fb)break;else _0xf68fff['push'](_0xf68fff['shift']());}catch(_0x57cde1){_0xf68fff['push'](_0xf68fff['shift']());}}}(a146_0x426e,0x76a86));import a146_0x21625a from'node:path';function a146_0x6a40(_0x18ddd0,_0x20c9b5){_0x18ddd0=_0x18ddd0-0x153;const _0x426e77=a146_0x426e();let _0x6a40fb=_0x426e77[_0x18ddd0];return _0x6a40fb;}import{fileURLToPath}from'node:url';const __dirname=a146_0x21625a[a146_0x2da697(0x155)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x20efd5=a146_0x2da697;return a146_0x21625a['resolve'](__dirname,_0x20efd5(0x157));}function a146_0x426e(){const _0x166db7=['42143HPdTSQ','860478XhLNvJ','projects','892YsEjrl','5545rUHhLe','4szHhME','152ThFeFV','404536DRSJYI','4992610BdLQzv','join','359343ngblva','dirname','templates','../../../../','180NfoJDG','551049ozZLky'];a146_0x426e=function(){return _0x166db7;};return a146_0x426e();}export function getSubAppReactDemoTemplateDir(){const _0x46bb0a=a146_0x2da697;return a146_0x21625a[_0x46bb0a(0x153)](getRabetbaseCliPackageRoot(),_0x46bb0a(0x156),_0x46bb0a(0x15c),'sub-app-react-demo');}
1
+ const a146_0x2d27f3=a146_0x2abe;function a146_0x54e0(){const _0x55c978=['5793816pzoiPi','templates','1943522VSZnKK','2MXGnYO','5ijaLKE','1064606XznTco','sub-app-react-demo','108654miKVCF','dirname','1560228yXCtZS','resolve','../../../../','projects','32420430ZypCIK','join','2701032JmFZtN'];a146_0x54e0=function(){return _0x55c978;};return a146_0x54e0();}(function(_0x2a4281,_0x3f202b){const _0xcad578=a146_0x2abe,_0x42a8c6=_0x2a4281();while(!![]){try{const _0x1659ce=parseInt(_0xcad578(0x9d))/0x1*(-parseInt(_0xcad578(0x9f))/0x2)+parseInt(_0xcad578(0xa1))/0x3+-parseInt(_0xcad578(0x9a))/0x4+parseInt(_0xcad578(0x9e))/0x5*(parseInt(_0xcad578(0x93))/0x6)+-parseInt(_0xcad578(0x9c))/0x7+-parseInt(_0xcad578(0x99))/0x8+parseInt(_0xcad578(0x97))/0x9;if(_0x1659ce===_0x3f202b)break;else _0x42a8c6['push'](_0x42a8c6['shift']());}catch(_0x15db4d){_0x42a8c6['push'](_0x42a8c6['shift']());}}}(a146_0x54e0,0xbc08f));import a146_0x4138b1 from'node:path';import{fileURLToPath}from'node:url';function a146_0x2abe(_0x5bd966,_0x48d9dc){_0x5bd966=_0x5bd966-0x93;const _0x54e0a7=a146_0x54e0();let _0x2abe3d=_0x54e0a7[_0x5bd966];return _0x2abe3d;}const __dirname=a146_0x4138b1[a146_0x2d27f3(0xa2)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x1f7821=a146_0x2d27f3;return a146_0x4138b1[_0x1f7821(0x94)](__dirname,_0x1f7821(0x95));}export function getSubAppReactDemoTemplateDir(){const _0x21804e=a146_0x2d27f3;return a146_0x4138b1[_0x21804e(0x98)](getRabetbaseCliPackageRoot(),_0x21804e(0x9b),_0x21804e(0x96),_0x21804e(0xa0));}
@@ -1 +1 @@
1
- function a147_0x5e59(_0x4cc5b4,_0x4438d5){_0x4cc5b4=_0x4cc5b4-0x1a2;const _0x67776=a147_0x6777();let _0x5e59b8=_0x67776[_0x4cc5b4];return _0x5e59b8;}function a147_0x6777(){const _0x1d426d=['message','275548QiNMFU','copy','780534xrERZY','102697fjQXQt','2149679ftjSXW','项目模板复制失败','cwd','50dfRubj','error','info','3WFYcrw','230280izhMUi','784618cMwgYj','1715070dPtfnG','6lwlxoZ','resolve','now'];a147_0x6777=function(){return _0x1d426d;};return a147_0x6777();}(function(_0x4c97a0,_0x165a30){const _0x12ef3a=a147_0x5e59,_0x2c07b1=_0x4c97a0();while(!![]){try{const _0x53ff88=parseInt(_0x12ef3a(0x1a6))/0x1+parseInt(_0x12ef3a(0x1af))/0x2*(-parseInt(_0x12ef3a(0x1ad))/0x3)+parseInt(_0x12ef3a(0x1a3))/0x4+-parseInt(_0x12ef3a(0x1b0))/0x5*(parseInt(_0x12ef3a(0x1b1))/0x6)+parseInt(_0x12ef3a(0x1a7))/0x7+parseInt(_0x12ef3a(0x1ae))/0x8+parseInt(_0x12ef3a(0x1a5))/0x9*(parseInt(_0x12ef3a(0x1aa))/0xa);if(_0x53ff88===_0x165a30)break;else _0x2c07b1['push'](_0x2c07b1['shift']());}catch(_0x107de8){_0x2c07b1['push'](_0x2c07b1['shift']());}}}(a147_0x6777,0x323cd));import a147_0x14eff6 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();export async function copyProjectTemplate(_0x578e1c){const _0xd5e363=a147_0x5e59,_0x47e542=Date[_0xd5e363(0x1b3)](),_0x255212=a147_0x14eff6[_0xd5e363(0x1b2)](process[_0xd5e363(0x1a9)](),_0x578e1c);try{logger[_0xd5e363(0x1ac)]('copy','开始复制项目模板',{'projectCode':_0x578e1c,'templateDir':templateDir}),await copyDirectory(templateDir,_0x255212);const _0x540ad4=Date[_0xd5e363(0x1b3)]()-_0x47e542;logger['success'](_0xd5e363(0x1a4),'项目模板复制完成',_0x540ad4,{'projectCode':_0x578e1c});}catch(_0x12c17f){const _0x343ba5=Date['now']()-_0x47e542;logger[_0xd5e363(0x1ab)](_0xd5e363(0x1a4),_0xd5e363(0x1a8),{'projectCode':_0x578e1c,'error':_0x12c17f instanceof Error?_0x12c17f[_0xd5e363(0x1a2)]:String(_0x12c17f),'duration':_0x343ba5});throw _0x12c17f;}return formatElapsed(_0x47e542);}
1
+ (function(_0x4eb1cf,_0xbaf7e5){const _0x2a5535=a147_0x33e2,_0x2d6732=_0x4eb1cf();while(!![]){try{const _0x28bc29=parseInt(_0x2a5535(0xfe))/0x1*(parseInt(_0x2a5535(0xfa))/0x2)+parseInt(_0x2a5535(0xff))/0x3+-parseInt(_0x2a5535(0xf8))/0x4*(parseInt(_0x2a5535(0xf2))/0x5)+-parseInt(_0x2a5535(0xfc))/0x6+parseInt(_0x2a5535(0x100))/0x7*(-parseInt(_0x2a5535(0x103))/0x8)+parseInt(_0x2a5535(0xfb))/0x9+parseInt(_0x2a5535(0x105))/0xa;if(_0x28bc29===_0xbaf7e5)break;else _0x2d6732['push'](_0x2d6732['shift']());}catch(_0x270d16){_0x2d6732['push'](_0x2d6732['shift']());}}}(a147_0x15cd,0xb0bec));import a147_0x20186e from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a147_0x15cd(){const _0x2bfc83=['now','项目模板复制失败','resolve','message','info','352fJQYAl','cwd','2NVolGz','4712904geXccW','412374eiCPWM','项目模板复制完成','1194185ffmyNs','2675499ruLSzZ','434DYASjy','开始复制项目模板','error','158272hYmEoi','copy','4640270iYSZaL','59910MxLDeO'];a147_0x15cd=function(){return _0x2bfc83;};return a147_0x15cd();}import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';function a147_0x33e2(_0x56ed84,_0x29591d){_0x56ed84=_0x56ed84-0xf2;const _0x15cd3f=a147_0x15cd();let _0x33e285=_0x15cd3f[_0x56ed84];return _0x33e285;}const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x5a61a9){const _0x2c0020=a147_0x33e2,_0x48c38c=Date[_0x2c0020(0xf3)](),_0x5a0346=a147_0x20186e[_0x2c0020(0xf5)](process[_0x2c0020(0xf9)](),_0x5a61a9);try{logger[_0x2c0020(0xf7)](_0x2c0020(0x104),_0x2c0020(0x101),{'projectCode':_0x5a61a9,'templateDir':templateDir}),await copyDirectory(templateDir,_0x5a0346);const _0x57cfa3=Date[_0x2c0020(0xf3)]()-_0x48c38c;logger['success'](_0x2c0020(0x104),_0x2c0020(0xfd),_0x57cfa3,{'projectCode':_0x5a61a9});}catch(_0x2b1f50){const _0xdd5d0a=Date[_0x2c0020(0xf3)]()-_0x48c38c;logger[_0x2c0020(0x102)](_0x2c0020(0x104),_0x2c0020(0xf4),{'projectCode':_0x5a61a9,'error':_0x2b1f50 instanceof Error?_0x2b1f50[_0x2c0020(0xf6)]:String(_0x2b1f50),'duration':_0xdd5d0a});throw _0x2b1f50;}return formatElapsed(_0x48c38c);}
@@ -1 +1 @@
1
- function a148_0x23df(_0x4aa2b9,_0x162aae){_0x4aa2b9=_0x4aa2b9-0xb0;const _0x37b67a=a148_0x37b6();let _0x23df62=_0x37b67a[_0x4aa2b9];return _0x23df62;}(function(_0x87a488,_0x4056bf){const _0x52af18=a148_0x23df,_0xa237eb=_0x87a488();while(!![]){try{const _0x3b4d94=parseInt(_0x52af18(0xb0))/0x1*(parseInt(_0x52af18(0xb9))/0x2)+-parseInt(_0x52af18(0xc6))/0x3+-parseInt(_0x52af18(0xc5))/0x4*(-parseInt(_0x52af18(0xbd))/0x5)+parseInt(_0x52af18(0xb6))/0x6+-parseInt(_0x52af18(0xc1))/0x7*(-parseInt(_0x52af18(0xb3))/0x8)+parseInt(_0x52af18(0xc7))/0x9+parseInt(_0x52af18(0xb7))/0xa*(-parseInt(_0x52af18(0xc2))/0xb);if(_0x3b4d94===_0x4056bf)break;else _0xa237eb['push'](_0xa237eb['shift']());}catch(_0x5cc02e){_0xa237eb['push'](_0xa237eb['shift']());}}}(a148_0x37b6,0xa3fa5));function a148_0x37b6(){const _0xf5a659=['522332uQllvy','3771780EKTCMY','6522210MQKMIX','526065IlHAJy','resolve','info','856ATeQgc','npx','代码格式化失败','2824224JEEUUq','10BtUJhy','format','2aNgzAt','success','开始格式化代码','message','40PSbgNB','cwd','--write','代码格式化完成','42259PgfzNa','16314859bFfkxN','now','prettier'];a148_0x37b6=function(){return _0xf5a659;};return a148_0x37b6();}import a148_0x350b63 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';export async function formatProjectCode(_0x4009e6){const _0x1a95f4=a148_0x23df,_0x79b19e=Date[_0x1a95f4(0xc3)](),_0x5e7876=a148_0x350b63[_0x1a95f4(0xb1)](process[_0x1a95f4(0xbe)](),_0x4009e6);try{logger[_0x1a95f4(0xb2)]('format',_0x1a95f4(0xbb),{'projectCode':_0x4009e6}),await execa(resolveNpmBin(_0x1a95f4(0xb4)),[_0x1a95f4(0xc4),_0x1a95f4(0xbf),'.'],{'cwd':_0x5e7876});const _0x3527b4=Date[_0x1a95f4(0xc3)]()-_0x79b19e;logger[_0x1a95f4(0xba)](_0x1a95f4(0xb8),_0x1a95f4(0xc0),_0x3527b4,{'projectCode':_0x4009e6});}catch(_0x580fde){const _0x2b3cac=Date[_0x1a95f4(0xc3)]()-_0x79b19e;logger['error']('format',_0x1a95f4(0xb5),{'projectCode':_0x4009e6,'error':_0x580fde instanceof Error?_0x580fde[_0x1a95f4(0xbc)]:String(_0x580fde),'duration':_0x2b3cac});throw _0x580fde;}return formatElapsed(_0x79b19e);}
1
+ function a148_0x2965(){const _0x1c7176=['resolve','522810dSYQrq','2935656pIppzV','7wtoYLk','159fbwhdi','cwd','npx','format','now','339190GEZCms','842xHuRmL','代码格式化完成','--write','info','message','246102ENngjS','prettier','180848QbVKIS','1414926wOwQLk'];a148_0x2965=function(){return _0x1c7176;};return a148_0x2965();}(function(_0x509d7e,_0x4f4092){const _0x5e7c7d=a148_0x56d6,_0x1d4271=_0x509d7e();while(!![]){try{const _0x4a7516=parseInt(_0x5e7c7d(0x174))/0x1*(parseInt(_0x5e7c7d(0x17a))/0x2)+-parseInt(_0x5e7c7d(0x17f))/0x3+-parseInt(_0x5e7c7d(0x16e))/0x4+parseInt(_0x5e7c7d(0x179))/0x5+-parseInt(_0x5e7c7d(0x16f))/0x6+-parseInt(_0x5e7c7d(0x173))/0x7*(-parseInt(_0x5e7c7d(0x172))/0x8)+parseInt(_0x5e7c7d(0x171))/0x9;if(_0x4a7516===_0x4f4092)break;else _0x1d4271['push'](_0x1d4271['shift']());}catch(_0x53bf1a){_0x1d4271['push'](_0x1d4271['shift']());}}}(a148_0x2965,0x30095));function a148_0x56d6(_0x55c9bb,_0x48faec){_0x55c9bb=_0x55c9bb-0x16d;const _0x296590=a148_0x2965();let _0x56d682=_0x296590[_0x55c9bb];return _0x56d682;}import a148_0x262ba6 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';export async function formatProjectCode(_0x54d8f0){const _0x1f4aef=a148_0x56d6,_0x5eea18=Date['now'](),_0x56dabe=a148_0x262ba6[_0x1f4aef(0x170)](process[_0x1f4aef(0x175)](),_0x54d8f0);try{logger[_0x1f4aef(0x17d)](_0x1f4aef(0x177),'开始格式化代码',{'projectCode':_0x54d8f0}),await execa(resolveNpmBin(_0x1f4aef(0x176)),[_0x1f4aef(0x16d),_0x1f4aef(0x17c),'.'],{'cwd':_0x56dabe});const _0x19e757=Date[_0x1f4aef(0x178)]()-_0x5eea18;logger['success'](_0x1f4aef(0x177),_0x1f4aef(0x17b),_0x19e757,{'projectCode':_0x54d8f0});}catch(_0x1d3e34){const _0x250c44=Date[_0x1f4aef(0x178)]()-_0x5eea18;logger['error']('format','代码格式化失败',{'projectCode':_0x54d8f0,'error':_0x1d3e34 instanceof Error?_0x1d3e34[_0x1f4aef(0x17e)]:String(_0x1d3e34),'duration':_0x250c44});throw _0x1d3e34;}return formatElapsed(_0x5eea18);}
@@ -1 +1 @@
1
- (function(_0x45801a,_0x2dc86d){const _0x3854ca=a149_0x21c5,_0x1a3eac=_0x45801a();while(!![]){try{const _0x31e006=-parseInt(_0x3854ca(0xe2))/0x1+-parseInt(_0x3854ca(0xea))/0x2*(parseInt(_0x3854ca(0xe3))/0x3)+-parseInt(_0x3854ca(0xf2))/0x4*(parseInt(_0x3854ca(0xf3))/0x5)+-parseInt(_0x3854ca(0xe7))/0x6+parseInt(_0x3854ca(0xef))/0x7+parseInt(_0x3854ca(0xed))/0x8*(parseInt(_0x3854ca(0xe0))/0x9)+parseInt(_0x3854ca(0xec))/0xa;if(_0x31e006===_0x2dc86d)break;else _0x1a3eac['push'](_0x1a3eac['shift']());}catch(_0x574462){_0x1a3eac['push'](_0x1a3eac['shift']());}}}(a149_0x2001,0x7b858));import a149_0x2883e8 from'node:path';function a149_0x21c5(_0x5d6ee2,_0x42288f){_0x5d6ee2=_0x5d6ee2-0xde;const _0x2001cc=a149_0x2001();let _0x21c5ac=_0x2001cc[_0x5d6ee2];return _0x21c5ac;}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_0x2001(){const _0x466a89=['message','7029380BHIPSx','16BLKJQX','error','2350642ylflvM','now','install','20wPrmMY','537265xUQYba','npm','https://registry.npmmirror.com','4100994uGGXmc','依赖安装失败','417405CDEFNd','1410891rhghRs','依赖安装完成','cwd','resolve','114990SOjepR','--registry','info','2rxyCKq'];a149_0x2001=function(){return _0x466a89;};return a149_0x2001();}export async function installDependencies(_0xf2e784){const _0x21f742=a149_0x21c5,_0x519811=Date['now'](),_0x148435=a149_0x2883e8[_0x21f742(0xe6)](process[_0x21f742(0xe5)](),_0xf2e784);try{logger[_0x21f742(0xe9)](_0x21f742(0xf1),'开始安装依赖',{'projectCode':_0xf2e784,'registry':_0x21f742(0xdf)}),await execa(resolveNpmBin(_0x21f742(0xde)),[_0x21f742(0xf1),_0x21f742(0xe8),_0x21f742(0xdf)],{'cwd':_0x148435});const _0x2753cb=Date['now']()-_0x519811;logger['success']('install',_0x21f742(0xe4),_0x2753cb,{'projectCode':_0xf2e784});}catch(_0x2cb814){const _0x4e1323=Date[_0x21f742(0xf0)]()-_0x519811;logger[_0x21f742(0xee)](_0x21f742(0xf1),_0x21f742(0xe1),{'projectCode':_0xf2e784,'error':_0x2cb814 instanceof Error?_0x2cb814[_0x21f742(0xeb)]:String(_0x2cb814),'duration':_0x4e1323});throw _0x2cb814;}return formatElapsed(_0x519811);}
1
+ (function(_0x2503be,_0x524321){const _0x54d598=a149_0x424a,_0x3ad6c=_0x2503be();while(!![]){try{const _0x297b07=parseInt(_0x54d598(0x1e7))/0x1+-parseInt(_0x54d598(0x1f5))/0x2+parseInt(_0x54d598(0x1f3))/0x3+-parseInt(_0x54d598(0x1ec))/0x4+parseInt(_0x54d598(0x1f2))/0x5+parseInt(_0x54d598(0x1f1))/0x6+-parseInt(_0x54d598(0x1f6))/0x7;if(_0x297b07===_0x524321)break;else _0x3ad6c['push'](_0x3ad6c['shift']());}catch(_0x155f94){_0x3ad6c['push'](_0x3ad6c['shift']());}}}(a149_0x2565,0x9bdaf));import a149_0x50ae81 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a149_0x424a(_0x2034df,_0x50ee89){_0x2034df=_0x2034df-0x1e5;const _0x2565a4=a149_0x2565();let _0x424ad3=_0x2565a4[_0x2034df];return _0x424ad3;}function a149_0x2565(){const _0x165caa=['8066317lBsUiX','message','依赖安装完成','info','451339IYrRoH','install','--registry','开始安装依赖','success','1033520Uhompo','依赖安装失败','now','https://registry.npmmirror.com','npm','4641438yxjExQ','4650215ZRsBEQ','2638860VpFQVL','cwd','1970962fHYahQ'];a149_0x2565=function(){return _0x165caa;};return a149_0x2565();}import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x34bbaa){const _0xb36683=a149_0x424a,_0x262bb5=Date['now'](),_0x3db45d=a149_0x50ae81['resolve'](process[_0xb36683(0x1f4)](),_0x34bbaa);try{logger[_0xb36683(0x1e6)](_0xb36683(0x1e8),_0xb36683(0x1ea),{'projectCode':_0x34bbaa,'registry':_0xb36683(0x1ef)}),await execa(resolveNpmBin(_0xb36683(0x1f0)),['install',_0xb36683(0x1e9),_0xb36683(0x1ef)],{'cwd':_0x3db45d});const _0x2c061d=Date['now']()-_0x262bb5;logger[_0xb36683(0x1eb)](_0xb36683(0x1e8),_0xb36683(0x1e5),_0x2c061d,{'projectCode':_0x34bbaa});}catch(_0x1e1a2){const _0x39d153=Date[_0xb36683(0x1ee)]()-_0x262bb5;logger['error'](_0xb36683(0x1e8),_0xb36683(0x1ed),{'projectCode':_0x34bbaa,'error':_0x1e1a2 instanceof Error?_0x1e1a2[_0xb36683(0x1f7)]:String(_0x1e1a2),'duration':_0x39d153});throw _0x1e1a2;}return formatElapsed(_0x262bb5);}
@@ -1 +1 @@
1
- const a150_0x57cdad=a150_0x93cc;(function(_0x1a1c2b,_0x33f706){const _0x49604d=a150_0x93cc,_0x51acc0=_0x1a1c2b();while(!![]){try{const _0x4f42bb=parseInt(_0x49604d(0x75))/0x1*(-parseInt(_0x49604d(0x72))/0x2)+-parseInt(_0x49604d(0x8c))/0x3*(parseInt(_0x49604d(0x77))/0x4)+parseInt(_0x49604d(0x82))/0x5*(parseInt(_0x49604d(0x7c))/0x6)+-parseInt(_0x49604d(0x8f))/0x7+-parseInt(_0x49604d(0x92))/0x8*(parseInt(_0x49604d(0x90))/0x9)+-parseInt(_0x49604d(0x87))/0xa+-parseInt(_0x49604d(0x67))/0xb*(-parseInt(_0x49604d(0x8d))/0xc);if(_0x4f42bb===_0x33f706)break;else _0x51acc0['push'](_0x51acc0['shift']());}catch(_0x411751){_0x51acc0['push'](_0x51acc0['shift']());}}}(a150_0x1fc0,0xc69e6));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{initConfig}from'../../commands/project/init.js';function a150_0x1fc0(){const _0x44f833=['../../commands/project/create/non-interactive.js','upgrade','340JBFzss','boolean','Target\x20environment','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','string','3975250kjqyQn','create','str','appcode','write','21cAStAb','108StTNVU','yes','2892183EywsJv','207pxVMfK','Create\x20a\x20new\x20project','437704cuYkAL','env','4568069uRxeyK','init','App\x20code\x20to\x20initialize','trim','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','Usage:\x20','Skip\x20confirmation\x20prompt','project-name','\x20workspace\x20init','../../commands/project/create/main.js','name','130082YuHADu','project','nonInteractive','17cuZBKU','validation','512660zYEHxU','cookie','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','Project\x20name','2026-07','101292dDDJhy','bool','Auto-confirm\x20prompts','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)'];a150_0x1fc0=function(){return _0x44f833;};return a150_0x1fc0();}function a150_0x93cc(_0x11c6e6,_0x4cd856){_0x11c6e6=_0x11c6e6-0x67;const _0x1fc008=a150_0x1fc0();let _0x93cc37=_0x1fc008[_0x11c6e6];return _0x93cc37;}import{upgradeApp}from'../../commands/project/upgrade.js';const initFlags=[{'name':a150_0x57cdad(0x8a),'type':'string','description':a150_0x57cdad(0x69)},{'name':a150_0x57cdad(0x93),'type':a150_0x57cdad(0x86),'description':a150_0x57cdad(0x84)},{'name':'yes','type':'boolean','description':a150_0x57cdad(0x7e),'default':![]}],createFlags=[{'name':a150_0x57cdad(0x71),'type':a150_0x57cdad(0x86),'description':a150_0x57cdad(0x7a)},{'name':'env','type':'string','description':a150_0x57cdad(0x84)},{'name':'appcode','type':a150_0x57cdad(0x86),'description':a150_0x57cdad(0x7f)}],upgradeFlags=[{'name':a150_0x57cdad(0x8e),'type':a150_0x57cdad(0x83),'description':a150_0x57cdad(0x6d),'default':![]}];export const projectDefinitions=[{'service':a150_0x57cdad(0x73),'command':a150_0x57cdad(0x68),'description':'Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','risk':a150_0x57cdad(0x8b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+a150_0x57cdad(0x6f),'since':a150_0x57cdad(0x7b)},'flags':initFlags,async 'execute'(_0x106c2a){const _0x3f3cff=a150_0x57cdad;return await initConfig({'appcode':_0x106c2a[_0x3f3cff(0x89)](_0x3f3cff(0x8a))||undefined,'env':_0x106c2a['str'](_0x3f3cff(0x93))||undefined,'autoYes':_0x106c2a[_0x3f3cff(0x7d)](_0x3f3cff(0x8e))}),{'ok':!![]};}},{'service':a150_0x57cdad(0x73),'command':a150_0x57cdad(0x88),'description':a150_0x57cdad(0x91),'risk':'write','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a150_0x57cdad(0x6e),'description':a150_0x57cdad(0x6b),'required':![]}],'flags':createFlags,async 'execute'(_0x58b636){const _0x23c34c=a150_0x57cdad,{createApp:_0x4a8ccf}=await import(_0x23c34c(0x70)),{createProjectNonInteractive:_0x39d6fd}=await import(_0x23c34c(0x80)),_0x305411=_0x58b636[_0x23c34c(0x89)]('name')[_0x23c34c(0x6a)]()||_0x58b636['args'][0x0]?.[_0x23c34c(0x6a)](),_0x3c3f44=_0x58b636[_0x23c34c(0x89)](_0x23c34c(0x93))||undefined,_0xa6b6d8=_0x58b636[_0x23c34c(0x89)](_0x23c34c(0x8a))||undefined;if(_0x58b636[_0x23c34c(0x74)]){if(!_0x305411)throw CliErrors[_0x23c34c(0x76)](_0x23c34c(0x79),_0x23c34c(0x6c)+CLI_BIN_NAME+'\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]');await _0x39d6fd(_0x305411,_0x3c3f44,_0xa6b6d8,_0x58b636[_0x23c34c(0x78)]);}else await _0x4a8ccf({'projectCode':_0x305411,'appCode':_0xa6b6d8,'env':_0x3c3f44,'cookie':_0x58b636[_0x23c34c(0x78)]});return{'ok':!![]};}},{'service':a150_0x57cdad(0x73),'command':a150_0x57cdad(0x81),'description':a150_0x57cdad(0x85),'risk':a150_0x57cdad(0x8b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0xe30bce){const _0x5a734c=a150_0x57cdad;return await upgradeApp(_0xe30bce[_0x5a734c(0x74)],{'yes':_0xe30bce[_0x5a734c(0x7d)](_0x5a734c(0x8e))}),{'ok':!![]};}}];
1
+ const a150_0x2725de=a150_0x251a;(function(_0x3a58a8,_0x2b87fd){const _0x117655=a150_0x251a,_0x281f09=_0x3a58a8();while(!![]){try{const _0x5af72e=parseInt(_0x117655(0x1a5))/0x1*(-parseInt(_0x117655(0x1b3))/0x2)+parseInt(_0x117655(0x1a9))/0x3+-parseInt(_0x117655(0x1a7))/0x4*(parseInt(_0x117655(0x19e))/0x5)+parseInt(_0x117655(0x1a6))/0x6*(parseInt(_0x117655(0x1a2))/0x7)+parseInt(_0x117655(0x19b))/0x8*(parseInt(_0x117655(0x1ae))/0x9)+parseInt(_0x117655(0x1a1))/0xa+-parseInt(_0x117655(0x199))/0xb;if(_0x5af72e===_0x2b87fd)break;else _0x281f09['push'](_0x281f09['shift']());}catch(_0x2d43d1){_0x281f09['push'](_0x281f09['shift']());}}}(a150_0x4ed6,0x6b8e9));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{initConfig}from'../../commands/project/init.js';function a150_0x251a(_0x237bef,_0x1b08b6){_0x237bef=_0x237bef-0x194;const _0x4ed680=a150_0x4ed6();let _0x251af3=_0x4ed680[_0x237bef];return _0x251af3;}function a150_0x4ed6(){const _0x122f1b=['Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','660078sqPDFt','project','Auto-confirm\x20prompts','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','trim','6KVuwwM','string','Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','bool','env','project-name','upgrade','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','name','init','\x20workspace\x20init','../../commands/project/create/non-interactive.js','write','yes','App\x20code\x20to\x20initialize','args','10346699EwJRcP','boolean','24hsJsCG','create','Usage:\x20','176955QmQZlb','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','Skip\x20confirmation\x20prompt','4987330epaGEb','14jfqFEc','../../commands/project/create/main.js','2026-07','3344aSwWtx','2106042eREFHn','92qIxUjk','Project\x20name','2353242nCBnqC','str','appcode','cookie'];a150_0x4ed6=function(){return _0x122f1b;};return a150_0x4ed6();}import{upgradeApp}from'../../commands/project/upgrade.js';const initFlags=[{'name':a150_0x2725de(0x1ab),'type':'string','description':a150_0x2725de(0x197)},{'name':a150_0x2725de(0x1b7),'type':a150_0x2725de(0x1b4),'description':'Target\x20environment'},{'name':'yes','type':'boolean','description':a150_0x2725de(0x1b0),'default':![]}],createFlags=[{'name':a150_0x2725de(0x1bb),'type':a150_0x2725de(0x1b4),'description':a150_0x2725de(0x1a8)},{'name':'env','type':a150_0x2725de(0x1b4),'description':'Target\x20environment'},{'name':'appcode','type':a150_0x2725de(0x1b4),'description':a150_0x2725de(0x1b1)}],upgradeFlags=[{'name':a150_0x2725de(0x196),'type':a150_0x2725de(0x19a),'description':a150_0x2725de(0x1a0),'default':![]}];export const projectDefinitions=[{'service':a150_0x2725de(0x1af),'command':a150_0x2725de(0x1bc),'description':a150_0x2725de(0x1b5),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+a150_0x2725de(0x1bd),'since':a150_0x2725de(0x1a4)},'flags':initFlags,async 'execute'(_0x24ba97){const _0xc6efc5=a150_0x2725de;return await initConfig({'appcode':_0x24ba97[_0xc6efc5(0x1aa)](_0xc6efc5(0x1ab))||undefined,'env':_0x24ba97[_0xc6efc5(0x1aa)](_0xc6efc5(0x1b7))||undefined,'autoYes':_0x24ba97[_0xc6efc5(0x1b6)](_0xc6efc5(0x196))}),{'ok':!![]};}},{'service':'project','command':a150_0x2725de(0x19c),'description':'Create\x20a\x20new\x20project','risk':'write','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a150_0x2725de(0x1b8),'description':a150_0x2725de(0x19f),'required':![]}],'flags':createFlags,async 'execute'(_0x3d3cfe){const _0xe704df=a150_0x2725de,{createApp:_0x2b095b}=await import(_0xe704df(0x1a3)),{createProjectNonInteractive:_0x3ad812}=await import(_0xe704df(0x194)),_0xc18f04=_0x3d3cfe[_0xe704df(0x1aa)](_0xe704df(0x1bb))[_0xe704df(0x1b2)]()||_0x3d3cfe[_0xe704df(0x198)][0x0]?.[_0xe704df(0x1b2)](),_0x26f0e5=_0x3d3cfe[_0xe704df(0x1aa)](_0xe704df(0x1b7))||undefined,_0x2e7636=_0x3d3cfe[_0xe704df(0x1aa)](_0xe704df(0x1ab))||undefined;if(_0x3d3cfe['nonInteractive']){if(!_0xc18f04)throw CliErrors['validation'](_0xe704df(0x1ba),_0xe704df(0x19d)+CLI_BIN_NAME+'\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]');await _0x3ad812(_0xc18f04,_0x26f0e5,_0x2e7636,_0x3d3cfe['cookie']);}else await _0x2b095b({'projectCode':_0xc18f04,'appCode':_0x2e7636,'env':_0x26f0e5,'cookie':_0x3d3cfe[_0xe704df(0x1ac)]});return{'ok':!![]};}},{'service':a150_0x2725de(0x1af),'command':a150_0x2725de(0x1b9),'description':a150_0x2725de(0x1ad),'risk':a150_0x2725de(0x195),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x28407e){const _0x563955=a150_0x2725de;return await upgradeApp(_0x28407e['nonInteractive'],{'yes':_0x28407e[_0x563955(0x1b6)](_0x563955(0x196))}),{'ok':!![]};}}];