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

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 a135_0x1e14(){const _0x55df0c=['24eFvpDt','401499XsfLaQ','8JseOKa','2BIAaAV','7068017RtaTNU','3744564lbKbJD','277283kKUnFb','5TLTYdR','3484680RpWiVB','1299soPqrE','1228bErTnZ','2757528asVtvF'];a135_0x1e14=function(){return _0x55df0c;};return a135_0x1e14();}(function(_0x9ff440,_0x20d063){const _0x2811fa=a135_0x4310,_0x4e743e=_0x9ff440();while(!![]){try{const _0x59f0c0=parseInt(_0x2811fa(0x148))/0x1*(parseInt(_0x2811fa(0x145))/0x2)+-parseInt(_0x2811fa(0x14b))/0x3*(-parseInt(_0x2811fa(0x14c))/0x4)+parseInt(_0x2811fa(0x149))/0x5*(parseInt(_0x2811fa(0x147))/0x6)+parseInt(_0x2811fa(0x14f))/0x7*(-parseInt(_0x2811fa(0x144))/0x8)+parseInt(_0x2811fa(0x14d))/0x9+parseInt(_0x2811fa(0x14a))/0xa+-parseInt(_0x2811fa(0x146))/0xb*(parseInt(_0x2811fa(0x14e))/0xc);if(_0x59f0c0===_0x20d063)break;else _0x4e743e['push'](_0x4e743e['shift']());}catch(_0x7754b0){_0x4e743e['push'](_0x4e743e['shift']());}}}(a135_0x1e14,0x54a5d));import{permitPageGet}from'../../commands/permit/page-get.js';function a135_0x4310(_0x1c29cf,_0x209e25){_0x1c29cf=_0x1c29cf-0x144;const _0x1e149e=a135_0x1e14();let _0x4310d9=_0x1e149e[_0x1c29cf];return _0x4310d9;}import{permitPageSet}from'../../commands/permit/page-set.js';import{permitRoleMenus}from'../../commands/permit/role-menus.js';import{permitRoleMenusSet}from'../../commands/permit/role-menus-set.js';import{permitRoleApisSet}from'../../commands/permit/role-apis-set.js';export const permitDefinitions=[permitPageGet,permitPageSet,permitRoleMenus,permitRoleMenusSet,permitRoleApisSet];
1
+ function a135_0xa650(){const _0x6ce73a=['271478VaeeQf','10ZIgLFw','3tabCbH','79601mLagkq','1656928BqRnmU','388XKzxiV','13670Hlvqga','852922Kqycwf','1866141mPkqhY','1332066qRRUcD'];a135_0xa650=function(){return _0x6ce73a;};return a135_0xa650();}(function(_0x45339d,_0x336fa8){const _0x1b1132=a135_0x9277,_0x4c974f=_0x45339d();while(!![]){try{const _0x325b74=parseInt(_0x1b1132(0xc4))/0x1+parseInt(_0x1b1132(0xc1))/0x2*(parseInt(_0x1b1132(0xc3))/0x3)+-parseInt(_0x1b1132(0xc6))/0x4*(-parseInt(_0x1b1132(0xc7))/0x5)+-parseInt(_0x1b1132(0xc0))/0x6+-parseInt(_0x1b1132(0xc8))/0x7+-parseInt(_0x1b1132(0xc5))/0x8+parseInt(_0x1b1132(0xc9))/0x9*(parseInt(_0x1b1132(0xc2))/0xa);if(_0x325b74===_0x336fa8)break;else _0x4c974f['push'](_0x4c974f['shift']());}catch(_0x34d7ba){_0x4c974f['push'](_0x4c974f['shift']());}}}(a135_0xa650,0x216d2));function a135_0x9277(_0x107b78,_0x12d9af){_0x107b78=_0x107b78-0xc0;const _0xa6502a=a135_0xa650();let _0x9277e9=_0xa6502a[_0x107b78];return _0x9277e9;}import{permitPageGet}from'../../commands/permit/page-get.js';import{permitPageSet}from'../../commands/permit/page-set.js';import{permitRoleMenus}from'../../commands/permit/role-menus.js';import{permitRoleMenusSet}from'../../commands/permit/role-menus-set.js';import{permitRoleApisSet}from'../../commands/permit/role-apis-set.js';export const permitDefinitions=[permitPageGet,permitPageSet,permitRoleMenus,permitRoleMenusSet,permitRoleApisSet];
@@ -1 +1 @@
1
- function a136_0x1a8b(_0x37f982,_0x23139d){_0x37f982=_0x37f982-0x8f;const _0x28db88=a136_0x28db();let _0x1a8b60=_0x28db88[_0x37f982];return _0x1a8b60;}function a136_0x28db(){const _0x462c9e=['Show\x20the\x20page\x20permission\x20snapshot\x20for\x20a\x20menu','687582mvIRQo','1167490wdSoWf','16OgVXum','read','3783945KntZew','694431oTzguR','page-get','243957UBcdtn','20REWmeX','2492UTkuAk','num','1VlUqIj','213650IrEzPX','45DegARo','menu-id'];a136_0x28db=function(){return _0x462c9e;};return a136_0x28db();}const a136_0x26b7d1=a136_0x1a8b;(function(_0x1d342d,_0x160909){const _0xff3949=a136_0x1a8b,_0x40d3b8=_0x1d342d();while(!![]){try{const _0x15b587=parseInt(_0xff3949(0x94))/0x1*(-parseInt(_0xff3949(0x95))/0x2)+-parseInt(_0xff3949(0x96))/0x3*(parseInt(_0xff3949(0x92))/0x4)+parseInt(_0xff3949(0x9a))/0x5+-parseInt(_0xff3949(0x99))/0x6+-parseInt(_0xff3949(0x90))/0x7*(parseInt(_0xff3949(0x9b))/0x8)+parseInt(_0xff3949(0x9e))/0x9*(-parseInt(_0xff3949(0x91))/0xa)+parseInt(_0xff3949(0x9d))/0xb;if(_0x15b587===_0x160909)break;else _0x40d3b8['push'](_0x40d3b8['shift']());}catch(_0x565b31){_0x40d3b8['push'](_0x40d3b8['shift']());}}}(a136_0x28db,0x1df52));import{getPagePermit}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{MENU_ID_FLAG,projectPagePermit}from'../../commands/permit/shared.js';export const permitPageGet={'service':'permit','command':a136_0x26b7d1(0x8f),'description':a136_0x26b7d1(0x98),'risk':a136_0x26b7d1(0x9c),'flags':[MENU_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x1529ff){const _0x5cc199=a136_0x26b7d1,_0x32ea07=_0x1529ff[_0x5cc199(0x93)](_0x5cc199(0x97)),_0x1f9f5e=await getPagePermit(_0x32ea07);return{'ok':!![],'data':{'page':projectPagePermit(_0x1f9f5e)},'message':'Page\x20permit\x20for\x20menu\x20'+_0x32ea07};}};
1
+ function a136_0x54d1(){const _0x9f947d=['2277654GooNny','331634JkOsTC','157928ZlsISX','2400607cNMCIj','296hSIIQG','115qZTSOl','Show\x20the\x20page\x20permission\x20snapshot\x20for\x20a\x20menu','Page\x20permit\x20for\x20menu\x20','permit','read','40qUNoaK','6xZQLPE','page-get','34482cioLlC','num','7452333SEhWxo','400870hQXQgm'];a136_0x54d1=function(){return _0x9f947d;};return a136_0x54d1();}const a136_0x256cb1=a136_0x4a25;(function(_0x5484c3,_0x3c03e6){const _0xd269c2=a136_0x4a25,_0x47737e=_0x5484c3();while(!![]){try{const _0x263f5e=-parseInt(_0xd269c2(0x10e))/0x1+parseInt(_0xd269c2(0x110))/0x2*(-parseInt(_0xd269c2(0x109))/0x3)+-parseInt(_0xd269c2(0x111))/0x4*(-parseInt(_0xd269c2(0x103))/0x5)+parseInt(_0xd269c2(0x10f))/0x6+-parseInt(_0xd269c2(0x10b))/0x7*(-parseInt(_0xd269c2(0x102))/0x8)+parseInt(_0xd269c2(0x10d))/0x9+-parseInt(_0xd269c2(0x108))/0xa*(parseInt(_0xd269c2(0x112))/0xb);if(_0x263f5e===_0x3c03e6)break;else _0x47737e['push'](_0x47737e['shift']());}catch(_0x4ead29){_0x47737e['push'](_0x47737e['shift']());}}}(a136_0x54d1,0xa913e));import{getPagePermit}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{MENU_ID_FLAG,projectPagePermit}from'../../commands/permit/shared.js';function a136_0x4a25(_0x520a01,_0x167329){_0x520a01=_0x520a01-0x102;const _0x54d146=a136_0x54d1();let _0x4a254a=_0x54d146[_0x520a01];return _0x4a254a;}export const permitPageGet={'service':a136_0x256cb1(0x106),'command':a136_0x256cb1(0x10a),'description':a136_0x256cb1(0x104),'risk':a136_0x256cb1(0x107),'flags':[MENU_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0xf5ab61){const _0x20bb74=a136_0x256cb1,_0x52a25c=_0xf5ab61[_0x20bb74(0x10c)]('menu-id'),_0x52e00a=await getPagePermit(_0x52a25c);return{'ok':!![],'data':{'page':projectPagePermit(_0x52e00a)},'message':_0x20bb74(0x105)+_0x52a25c};}};
@@ -1 +1 @@
1
- const a137_0x42ea2b=a137_0x1f0a;(function(_0x3316b6,_0x4a360b){const _0x149b13=a137_0x1f0a,_0x53557c=_0x3316b6();while(!![]){try{const _0x8c295a=parseInt(_0x149b13(0x177))/0x1+-parseInt(_0x149b13(0x183))/0x2*(parseInt(_0x149b13(0x16a))/0x3)+parseInt(_0x149b13(0x16c))/0x4*(parseInt(_0x149b13(0x165))/0x5)+parseInt(_0x149b13(0x179))/0x6*(-parseInt(_0x149b13(0x178))/0x7)+parseInt(_0x149b13(0x175))/0x8*(parseInt(_0x149b13(0x17e))/0x9)+parseInt(_0x149b13(0x187))/0xa*(-parseInt(_0x149b13(0x173))/0xb)+parseInt(_0x149b13(0x169))/0xc*(parseInt(_0x149b13(0x16e))/0xd);if(_0x8c295a===_0x4a360b)break;else _0x53557c['push'](_0x53557c['shift']());}catch(_0x24ea17){_0x53557c['push'](_0x53557c['shift']());}}}(a137_0x17b9,0x475ea));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_0x17b9(){const _0x25ac9a=['45TlNfpq','appCode','menu-id','selector','1770168kBecSU','326355yWOvRm','label','41056vORKQB','menuId','39kpTKIw','permit','allowSelf','validation','Set\x20page\x20permissions\x20for\x20a\x20menu\x20(menu/create/update/delete/detail/export/row\x20roles);\x20requires\x20--yes','1058574UgEmrW','Pass\x20at\x20least\x20one\x20of:\x20','8mwPAbb','Pass\x20at\x20least\x20one\x20role,\x20or\x20omit\x20the\x20flag.\x20Clearing\x20permissions\x20is\x20not\x20supported\x20by\x20this\x20command.','536490yMGrNe','1043JNzcEE','22350ULkDED','\x20cannot\x20be\x20empty.','Nothing\x20to\x20set.','POST','join','1673865PGsvTF','flag','This\x20page\x20has\x20no\x20\x22','high-risk-write','Only\x20slots\x20present\x20in\x20`permit\x20page-get`\x20can\x20be\x20set.','4XeBmii','push','length','page-set','20DTrKXf','num','\x22\x20permission\x20slot\x20(','key','rolePermit','Updated\x20page\x20permit\x20for\x20menu\x20'];a137_0x17b9=function(){return _0x25ac9a;};return a137_0x17b9();}import{MENU_ID_FLAG,PAGE_SET_ROLE_FLAGS,PAGE_SLOT_SPECS,projectPageSlot,resolvePermitRoles,splitList}from'../../commands/permit/shared.js';const SAVE_PATH='/smartapi/permit/page/save';function collectRequestedSlots(_0x576dc7){const _0x4d6e80=a137_0x1f0a,_0x25e848=[];for(const _0xf3f868 of PAGE_SLOT_SPECS){const _0x326c8b=_0x576dc7[_0x4d6e80(0x17f)](_0xf3f868[_0x4d6e80(0x17f)]);if(_0x326c8b===undefined||_0x326c8b===null)continue;const _0x5eaf41=splitList(String(_0x326c8b));if(_0x5eaf41[_0x4d6e80(0x185)]===0x0)throw CliErrors[_0x4d6e80(0x171)]('--'+_0xf3f868['flag']+_0x4d6e80(0x17a),_0x4d6e80(0x176));_0x25e848[_0x4d6e80(0x184)]({'spec':_0xf3f868,'refs':_0x5eaf41});}return _0x25e848;}function a137_0x1f0a(_0x252b8b,_0x29d24c){_0x252b8b=_0x252b8b-0x165;const _0x17b9a1=a137_0x17b9();let _0x1f0a13=_0x17b9a1[_0x252b8b];return _0x1f0a13;}async function buildPlan(_0x4ebf10,_0x19aece){const _0x445a44=a137_0x1f0a,_0x421026=_0x4ebf10[_0x445a44(0x188)](_0x445a44(0x167)),_0x2381b6=collectRequestedSlots(_0x4ebf10);if(_0x2381b6[_0x445a44(0x185)]===0x0)throw CliErrors[_0x445a44(0x171)]('Nothing\x20to\x20set.',_0x445a44(0x174)+PAGE_SLOT_SPECS['map'](_0x34de41=>'--'+_0x34de41['flag'])['join'](',\x20')+'.');const _0x416c57=await getPagePermit(_0x421026),_0x555a2c={},_0x15d681={},_0x30dc17=[];for(const {spec:_0x19b8d3,refs:_0x44e4e9}of _0x2381b6){const _0x5e6b72=_0x416c57[_0x19b8d3['key']];if(!_0x5e6b72)throw CliErrors[_0x445a44(0x171)](_0x445a44(0x180)+_0x19b8d3[_0x445a44(0x16b)]+_0x445a44(0x189)+_0x19b8d3[_0x445a44(0x18a)]+').',_0x445a44(0x182));_0x555a2c[_0x19b8d3['key']]=projectPageSlot(_0x5e6b72);const _0xe4e28c=await resolvePermitRoles(_0x4ebf10[_0x445a44(0x166)],_0x44e4e9,{'allowSelf':_0x19b8d3[_0x445a44(0x170)],'label':_0x19b8d3['label']});_0x5e6b72[_0x445a44(0x18b)]=_0xe4e28c,_0x15d681[_0x19b8d3[_0x445a44(0x18a)]]=projectPageSlot(_0x5e6b72);}const _0x5dbaa3={'operation':_0x445a44(0x186),'selector':{'appCode':_0x4ebf10[_0x445a44(0x166)],'menuId':_0x421026,'slots':_0x2381b6['map'](_0x2bb088=>_0x2bb088['spec'][_0x445a44(0x18a)])},'before':_0x555a2c,'after':_0x15d681,'dryRun':_0x19aece,'backend':{'method':_0x445a44(0x17c),'path':SAVE_PATH},'warnings':_0x30dc17};return{'page':_0x416c57,'mutation':_0x5dbaa3};}export const permitPageSet={'service':a137_0x42ea2b(0x16f),'command':a137_0x42ea2b(0x186),'description':a137_0x42ea2b(0x172),'risk':a137_0x42ea2b(0x181),'flags':[MENU_ID_FLAG,...PAGE_SET_ROLE_FLAGS,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x47660d){const _0x58dd82=a137_0x42ea2b,_0x4d5cf4=collectRequestedSlots(_0x47660d);if(_0x4d5cf4[_0x58dd82(0x185)]===0x0)throw CliErrors[_0x58dd82(0x171)](_0x58dd82(0x17b),_0x58dd82(0x174)+PAGE_SLOT_SPECS['map'](_0x5d149b=>'--'+_0x5d149b[_0x58dd82(0x17f)])[_0x58dd82(0x17d)](',\x20')+'.');},async 'dryRun'(_0xf5b0bc){const _0x5692e7=a137_0x42ea2b,{mutation:_0x5d5ba9}=await buildPlan(_0xf5b0bc,!![]);return asDryRunResult(_0x5d5ba9,{'method':_0x5692e7(0x17c),'url':SAVE_PATH});},async 'execute'(_0x1cb56c){const _0x1b36ca=a137_0x42ea2b,{page:_0x2df0f2,mutation:_0x18b092}=await buildPlan(_0x1cb56c,![]);return await savePagePermit(_0x2df0f2),{'ok':!![],'data':_0x18b092,'message':_0x1b36ca(0x18c)+_0x18b092[_0x1b36ca(0x168)][_0x1b36ca(0x16d)]};}};
1
+ const a137_0x226175=a137_0xb189;(function(_0x3f0c6e,_0x565da5){const _0x3ad72d=a137_0xb189,_0x54ed34=_0x3f0c6e();while(!![]){try{const _0x54affb=-parseInt(_0x3ad72d(0x110))/0x1+parseInt(_0x3ad72d(0xfc))/0x2+parseInt(_0x3ad72d(0x10e))/0x3*(parseInt(_0x3ad72d(0xf9))/0x4)+parseInt(_0x3ad72d(0x116))/0x5*(-parseInt(_0x3ad72d(0x112))/0x6)+parseInt(_0x3ad72d(0x105))/0x7+-parseInt(_0x3ad72d(0xfb))/0x8*(-parseInt(_0x3ad72d(0x111))/0x9)+-parseInt(_0x3ad72d(0x10d))/0xa;if(_0x54affb===_0x565da5)break;else _0x54ed34['push'](_0x54ed34['shift']());}catch(_0x56a669){_0x54ed34['push'](_0x54ed34['shift']());}}}(a137_0x4b50,0x99d04));import{getPagePermit,savePagePermit}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a137_0xb189(_0x23d4b1,_0x13db28){_0x23d4b1=_0x23d4b1-0xf9;const _0x4b50ff=a137_0x4b50();let _0xb189c3=_0x4b50ff[_0x23d4b1];return _0xb189c3;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{MENU_ID_FLAG,PAGE_SET_ROLE_FLAGS,PAGE_SLOT_SPECS,projectPageSlot,resolvePermitRoles,splitList}from'../../commands/permit/shared.js';const SAVE_PATH='/smartapi/permit/page/save';function collectRequestedSlots(_0x3f92ab){const _0xc2903d=a137_0xb189,_0x48e9cc=[];for(const _0x48e5e9 of PAGE_SLOT_SPECS){const _0xa022ab=_0x3f92ab[_0xc2903d(0x109)](_0x48e5e9[_0xc2903d(0x109)]);if(_0xa022ab===undefined||_0xa022ab===null)continue;const _0x20afe6=splitList(String(_0xa022ab));if(_0x20afe6[_0xc2903d(0x103)]===0x0)throw CliErrors[_0xc2903d(0xfa)]('--'+_0x48e5e9[_0xc2903d(0x109)]+_0xc2903d(0x10a),_0xc2903d(0x10c));_0x48e9cc[_0xc2903d(0x117)]({'spec':_0x48e5e9,'refs':_0x20afe6});}return _0x48e9cc;}async function buildPlan(_0x423aae,_0x2b3914){const _0x1d7b30=a137_0xb189,_0x4a6bce=_0x423aae['num'](_0x1d7b30(0xfd)),_0x34aa3f=collectRequestedSlots(_0x423aae);if(_0x34aa3f[_0x1d7b30(0x103)]===0x0)throw CliErrors['validation'](_0x1d7b30(0x10b),_0x1d7b30(0x104)+PAGE_SLOT_SPECS['map'](_0x1dfd3c=>'--'+_0x1dfd3c['flag'])[_0x1d7b30(0x114)](',\x20')+'.');const _0x25059a=await getPagePermit(_0x4a6bce),_0x32669b={},_0x245c8e={},_0x4fc525=[];for(const {spec:_0x52d164,refs:_0x152cd7}of _0x34aa3f){const _0x1603ab=_0x25059a[_0x52d164[_0x1d7b30(0x11a)]];if(!_0x1603ab)throw CliErrors[_0x1d7b30(0xfa)](_0x1d7b30(0x102)+_0x52d164[_0x1d7b30(0xff)]+_0x1d7b30(0x113)+_0x52d164['key']+').',_0x1d7b30(0x11b));_0x32669b[_0x52d164[_0x1d7b30(0x11a)]]=projectPageSlot(_0x1603ab);const _0x54cd4a=await resolvePermitRoles(_0x423aae[_0x1d7b30(0x100)],_0x152cd7,{'allowSelf':_0x52d164[_0x1d7b30(0x106)],'label':_0x52d164['label']});_0x1603ab[_0x1d7b30(0x118)]=_0x54cd4a,_0x245c8e[_0x52d164[_0x1d7b30(0x11a)]]=projectPageSlot(_0x1603ab);}const _0x5344ca={'operation':_0x1d7b30(0xfe),'selector':{'appCode':_0x423aae['appCode'],'menuId':_0x4a6bce,'slots':_0x34aa3f[_0x1d7b30(0x11c)](_0x56341d=>_0x56341d['spec'][_0x1d7b30(0x11a)])},'before':_0x32669b,'after':_0x245c8e,'dryRun':_0x2b3914,'backend':{'method':_0x1d7b30(0x10f),'path':SAVE_PATH},'warnings':_0x4fc525};return{'page':_0x25059a,'mutation':_0x5344ca};}export const permitPageSet={'service':a137_0x226175(0x108),'command':a137_0x226175(0xfe),'description':a137_0x226175(0x107),'risk':a137_0x226175(0x115),'flags':[MENU_ID_FLAG,...PAGE_SET_ROLE_FLAGS,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x22fdb8){const _0x5a0f16=a137_0x226175,_0x407bf0=collectRequestedSlots(_0x22fdb8);if(_0x407bf0[_0x5a0f16(0x103)]===0x0)throw CliErrors['validation'](_0x5a0f16(0x10b),_0x5a0f16(0x104)+PAGE_SLOT_SPECS[_0x5a0f16(0x11c)](_0x1eefb4=>'--'+_0x1eefb4[_0x5a0f16(0x109)])[_0x5a0f16(0x114)](',\x20')+'.');},async 'dryRun'(_0x3fe07e){const _0x5c1265=a137_0x226175,{mutation:_0x164f73}=await buildPlan(_0x3fe07e,!![]);return asDryRunResult(_0x164f73,{'method':_0x5c1265(0x10f),'url':SAVE_PATH});},async 'execute'(_0x3010b6){const _0x55d9a5=a137_0x226175,{page:_0x4c700a,mutation:_0x3cc4fc}=await buildPlan(_0x3010b6,![]);return await savePagePermit(_0x4c700a),{'ok':!![],'data':_0x3cc4fc,'message':_0x55d9a5(0x119)+_0x3cc4fc['selector'][_0x55d9a5(0x101)]};}};function a137_0x4b50(){const _0x559189=['Only\x20slots\x20present\x20in\x20`permit\x20page-get`\x20can\x20be\x20set.','map','4GfeaDW','validation','16aInYqo','2164342niTHYL','menu-id','page-set','label','appCode','menuId','This\x20page\x20has\x20no\x20\x22','length','Pass\x20at\x20least\x20one\x20of:\x20','6891759JnDvEw','allowSelf','Set\x20page\x20permissions\x20for\x20a\x20menu\x20(menu/create/update/delete/detail/export/row\x20roles);\x20requires\x20--yes','permit','flag','\x20cannot\x20be\x20empty.','Nothing\x20to\x20set.','Pass\x20at\x20least\x20one\x20role,\x20or\x20omit\x20the\x20flag.\x20Clearing\x20permissions\x20is\x20not\x20supported\x20by\x20this\x20command.','13816310QFEqDb','3131607aSEtkm','POST','658033vTKzNO','2610423UOREMG','18tdYrzR','\x22\x20permission\x20slot\x20(','join','high-risk-write','1701645ltMBhY','push','rolePermit','Updated\x20page\x20permit\x20for\x20menu\x20','key'];a137_0x4b50=function(){return _0x559189;};return a137_0x4b50();}
@@ -1 +1 @@
1
- const a138_0x3a3107=a138_0x51f6;(function(_0x39029e,_0x370f51){const _0x390307=a138_0x51f6,_0x37f199=_0x39029e();while(!![]){try{const _0x7dd3d0=parseInt(_0x390307(0x1fb))/0x1*(parseInt(_0x390307(0x203))/0x2)+-parseInt(_0x390307(0x200))/0x3+-parseInt(_0x390307(0x1fa))/0x4+parseInt(_0x390307(0x20d))/0x5+-parseInt(_0x390307(0x1f7))/0x6+-parseInt(_0x390307(0x20c))/0x7*(parseInt(_0x390307(0x202))/0x8)+parseInt(_0x390307(0x1f1))/0x9;if(_0x7dd3d0===_0x370f51)break;else _0x37f199['push'](_0x37f199['shift']());}catch(_0x2719fe){_0x37f199['push'](_0x37f199['shift']());}}}(a138_0x4a67,0x7c578));import{getRoleApiResources,updateAppRole}from'../../core/api-client.js';function a138_0x4a67(){const _0xcd822b=['validation','api-revoke','datasets','17194806jfmGke','bool','appCode','set','/smartapi/permit/role/update','API','2900484xImsmi','Pass\x20--datasets\x20<datasetCode,...>.','revoke','637660MaiNcD','15404JrCsoa','role-apis-set\x20currently\x20supports\x20revoking\x20dataset\x20API\x20access\x20(use\x20case\x204).','flagMissing','action','has','2569836swuuKp','Missing\x20--revoke.','3859144lpTjfp','64vnALKF','length','Revoked\x20API\x20access\x20for\x20','join','Unknown\x20datasetCode(s)\x20for\x20this\x20role\x27s\x20API\x20resources:\x20','POST','filter','push','get','7KpKAgf','438380IYnbCg','high-risk-write','datasetCodes'];a138_0x4a67=function(){return _0xcd822b;};return a138_0x4a67();}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_0x51f6(_0x5c3ad6,_0x222820){_0x5c3ad6=_0x5c3ad6-0x1f1;const _0x4a6784=a138_0x4a67();let _0x51f66c=_0x4a6784[_0x5c3ad6];return _0x51f66c;}import{assertPermConfigurable,resolveRoleRef}from'../../commands/role/shared.js';const UPDATE_PATH=a138_0x3a3107(0x1f5);async function buildPlan(_0x33b232,_0x58d7c8){const _0x1321a5=a138_0x3a3107,_0x729deb=await resolveRoleRef(_0x33b232[_0x1321a5(0x1f3)],readRoleRef(_0x33b232));assertPermConfigurable(_0x729deb);if(!_0x33b232[_0x1321a5(0x1f2)](_0x1321a5(0x1f9)))throw CliErrors[_0x1321a5(0x210)](_0x1321a5(0x201),_0x1321a5(0x1fc));const _0x52bb9c=splitList(_0x33b232['str'](_0x1321a5(0x212)));if(_0x52bb9c[_0x1321a5(0x204)]===0x0)throw CliErrors[_0x1321a5(0x1fd)](_0x1321a5(0x212),_0x1321a5(0x1f8));const _0x2f87a4=await getRoleApiResources(_0x33b232['appCode'],_0x729deb['id']),{byCode:_0x281a5c,byDataset:_0x1114c5}=flattenApiResources(_0x2f87a4),_0x55b759=_0x52bb9c[_0x1321a5(0x209)](_0x43db87=>!_0x1114c5[_0x1321a5(0x1ff)](_0x43db87));if(_0x55b759['length']>0x0)throw CliErrors[_0x1321a5(0x210)](_0x1321a5(0x207)+_0x55b759[_0x1321a5(0x206)](',\x20')+'.','Verify\x20the\x20datasetCode,\x20or\x20check\x20the\x20role\x27s\x20API\x20resource\x20matrix.');const _0xa17bc4=new Map(),_0x481ce3=[],_0x4f1915=[];for(const _0x3554f6 of _0x52bb9c){for(const _0x39b967 of _0x1114c5[_0x1321a5(0x20b)](_0x3554f6)){const _0x3c8289=_0x281a5c['get'](_0x39b967);_0xa17bc4[_0x1321a5(0x1f4)](_0x39b967,'0'),_0x481ce3['push']({'resourceCode':_0x39b967,'datasetCode':_0x3554f6,'action':_0x3c8289[_0x1321a5(0x1fe)]}),_0x4f1915[_0x1321a5(0x20a)]({'resourceCode':_0x39b967,'datasetCode':_0x3554f6,'action':'0'});}}const _0x4b5454=buildPermits(_0x281a5c,_0xa17bc4),_0x5ba8f0={'operation':_0x1321a5(0x211),'selector':{'appCode':_0x33b232[_0x1321a5(0x1f3)],'roleId':_0x729deb['id'],'roleName':_0x729deb['roleName'],'datasetCodes':_0x52bb9c},'before':_0x481ce3,'after':_0x4f1915,'dryRun':_0x58d7c8,'backend':{'method':'POST','path':UPDATE_PATH,'roleType':_0x1321a5(0x1f6)},'warnings':[]};return{'role':_0x729deb,'permits':_0x4b5454,'mutation':_0x5ba8f0};}export const permitRoleApisSet={'service':'permit','command':'role-apis-set','description':'Revoke\x20a\x20role\x27s\x20dataset\x20API\x20access\x20by\x20datasetCode\x20(roleType\x20API);\x20requires\x20--yes','risk':a138_0x3a3107(0x20e),'flags':[ROLE_REF_FLAG,REVOKE_FLAG,DATASETS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5f0014){const _0x53eeb5=a138_0x3a3107;if(!_0x5f0014[_0x53eeb5(0x1f2)](_0x53eeb5(0x1f9)))throw CliErrors[_0x53eeb5(0x210)]('Missing\x20--revoke.','role-apis-set\x20currently\x20supports\x20revoking\x20dataset\x20API\x20access\x20(use\x20case\x204).');if(splitList(_0x5f0014['str'](_0x53eeb5(0x212)))[_0x53eeb5(0x204)]===0x0)throw CliErrors[_0x53eeb5(0x1fd)](_0x53eeb5(0x212),_0x53eeb5(0x1f8));},async 'dryRun'(_0x4ed20d){const _0x614897=a138_0x3a3107,{mutation:_0x3a7c94}=await buildPlan(_0x4ed20d,!![]);return asDryRunResult(_0x3a7c94,{'method':_0x614897(0x208),'url':UPDATE_PATH});},async 'execute'(_0x365a42){const _0x2bd9e1=a138_0x3a3107,{role:_0x325f7b,permits:_0x512b94,mutation:_0x4a99b3}=await buildPlan(_0x365a42,![]);return await updateAppRole({'id':_0x325f7b['id'],'appCode':_0x365a42[_0x2bd9e1(0x1f3)],'roleType':_0x2bd9e1(0x1f6),'permits':_0x512b94}),{'ok':!![],'data':_0x4a99b3,'message':_0x2bd9e1(0x205)+_0x4a99b3['selector'][_0x2bd9e1(0x20f)]['length']+'\x20dataset(s)\x20on\x20role\x20'+_0x325f7b['roleName']};}};
1
+ const a138_0x4a6ced=a138_0x4d7d;(function(_0x34b851,_0x5a4933){const _0x47bbb7=a138_0x4d7d,_0x271276=_0x34b851();while(!![]){try{const _0x4d57dc=-parseInt(_0x47bbb7(0x8b))/0x1+-parseInt(_0x47bbb7(0x96))/0x2*(-parseInt(_0x47bbb7(0xa2))/0x3)+-parseInt(_0x47bbb7(0xa8))/0x4+-parseInt(_0x47bbb7(0xa6))/0x5*(parseInt(_0x47bbb7(0x9b))/0x6)+-parseInt(_0x47bbb7(0xa3))/0x7*(-parseInt(_0x47bbb7(0x99))/0x8)+-parseInt(_0x47bbb7(0x8c))/0x9*(-parseInt(_0x47bbb7(0xa5))/0xa)+parseInt(_0x47bbb7(0x8a))/0xb;if(_0x4d57dc===_0x5a4933)break;else _0x271276['push'](_0x271276['shift']());}catch(_0x409ed6){_0x271276['push'](_0x271276['shift']());}}}(a138_0x2849,0x2ab19));import{getRoleApiResources,updateAppRole}from'../../core/api-client.js';function a138_0x2849(){const _0x3ca255=['api-revoke','high-risk-write','Revoke\x20a\x20role\x27s\x20dataset\x20API\x20access\x20by\x20datasetCode\x20(roleType\x20API);\x20requires\x20--yes','214330HNDxdY','filter','bool','520FhltHH','permit','49062iVIomF','action','API','role-apis-set','Verify\x20the\x20datasetCode,\x20or\x20check\x20the\x20role\x27s\x20API\x20resource\x20matrix.','Missing\x20--revoke.','join','3NLwvcu','22057UHRQNw','Unknown\x20datasetCode(s)\x20for\x20this\x20role\x27s\x20API\x20resources:\x20','10hyzojm','115eWlEzp','has','422936FZGhOp','revoke','set','roleName','appCode','flagMissing','POST','Pass\x20--datasets\x20<datasetCode,...>.','\x20dataset(s)\x20on\x20role\x20','validation','2215620rJDYvn','250109uIIeha','1848483qkOFXa','push','role-apis-set\x20currently\x20supports\x20revoking\x20dataset\x20API\x20access\x20(use\x20case\x204).','datasetCodes','datasets','length','get'];a138_0x2849=function(){return _0x3ca255;};return a138_0x2849();}import{CliErrors}from'../../errors.js';function a138_0x4d7d(_0x3a314a,_0x203a96){_0x3a314a=_0x3a314a-0x89;const _0x2849a1=a138_0x2849();let _0x4d7d4b=_0x2849a1[_0x3a314a];return _0x4d7d4b;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{buildPermits,DATASETS_FLAG,flattenApiResources,readRoleRef,REVOKE_FLAG,ROLE_REF_FLAG,splitList}from'../../commands/permit/shared.js';import{assertPermConfigurable,resolveRoleRef}from'../../commands/role/shared.js';const UPDATE_PATH='/smartapi/permit/role/update';async function buildPlan(_0x2a2804,_0x43f132){const _0x268bd5=a138_0x4d7d,_0x4357ef=await resolveRoleRef(_0x2a2804['appCode'],readRoleRef(_0x2a2804));assertPermConfigurable(_0x4357ef);if(!_0x2a2804[_0x268bd5(0x98)](_0x268bd5(0xa9)))throw CliErrors[_0x268bd5(0x89)](_0x268bd5(0xa0),_0x268bd5(0x8e));const _0x48ee0f=splitList(_0x2a2804['str'](_0x268bd5(0x90)));if(_0x48ee0f['length']===0x0)throw CliErrors['flagMissing'](_0x268bd5(0x90),_0x268bd5(0xaf));const _0x63c4e4=await getRoleApiResources(_0x2a2804[_0x268bd5(0xac)],_0x4357ef['id']),{byCode:_0x23082a,byDataset:_0x1b94eb}=flattenApiResources(_0x63c4e4),_0x515a2f=_0x48ee0f[_0x268bd5(0x97)](_0x4321a0=>!_0x1b94eb[_0x268bd5(0xa7)](_0x4321a0));if(_0x515a2f['length']>0x0)throw CliErrors[_0x268bd5(0x89)](_0x268bd5(0xa4)+_0x515a2f[_0x268bd5(0xa1)](',\x20')+'.',_0x268bd5(0x9f));const _0x4b3360=new Map(),_0x4338bd=[],_0x4cbb10=[];for(const _0x553662 of _0x48ee0f){for(const _0x38a4ee of _0x1b94eb[_0x268bd5(0x92)](_0x553662)){const _0x4638fd=_0x23082a[_0x268bd5(0x92)](_0x38a4ee);_0x4b3360[_0x268bd5(0xaa)](_0x38a4ee,'0'),_0x4338bd['push']({'resourceCode':_0x38a4ee,'datasetCode':_0x553662,'action':_0x4638fd[_0x268bd5(0x9c)]}),_0x4cbb10[_0x268bd5(0x8d)]({'resourceCode':_0x38a4ee,'datasetCode':_0x553662,'action':'0'});}}const _0x266ca8=buildPermits(_0x23082a,_0x4b3360),_0x492161={'operation':_0x268bd5(0x93),'selector':{'appCode':_0x2a2804[_0x268bd5(0xac)],'roleId':_0x4357ef['id'],'roleName':_0x4357ef[_0x268bd5(0xab)],'datasetCodes':_0x48ee0f},'before':_0x4338bd,'after':_0x4cbb10,'dryRun':_0x43f132,'backend':{'method':_0x268bd5(0xae),'path':UPDATE_PATH,'roleType':_0x268bd5(0x9d)},'warnings':[]};return{'role':_0x4357ef,'permits':_0x266ca8,'mutation':_0x492161};}export const permitRoleApisSet={'service':a138_0x4a6ced(0x9a),'command':a138_0x4a6ced(0x9e),'description':a138_0x4a6ced(0x95),'risk':a138_0x4a6ced(0x94),'flags':[ROLE_REF_FLAG,REVOKE_FLAG,DATASETS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x582cab){const _0xe78b6=a138_0x4a6ced;if(!_0x582cab[_0xe78b6(0x98)]('revoke'))throw CliErrors[_0xe78b6(0x89)](_0xe78b6(0xa0),_0xe78b6(0x8e));if(splitList(_0x582cab['str'](_0xe78b6(0x90)))['length']===0x0)throw CliErrors[_0xe78b6(0xad)](_0xe78b6(0x90),'Pass\x20--datasets\x20<datasetCode,...>.');},async 'dryRun'(_0x35293e){const _0x53686d=a138_0x4a6ced,{mutation:_0x56a556}=await buildPlan(_0x35293e,!![]);return asDryRunResult(_0x56a556,{'method':_0x53686d(0xae),'url':UPDATE_PATH});},async 'execute'(_0x349a9d){const _0x4757c0=a138_0x4a6ced,{role:_0x57e81d,permits:_0xcef1ed,mutation:_0x23213d}=await buildPlan(_0x349a9d,![]);return await updateAppRole({'id':_0x57e81d['id'],'appCode':_0x349a9d['appCode'],'roleType':_0x4757c0(0x9d),'permits':_0xcef1ed}),{'ok':!![],'data':_0x23213d,'message':'Revoked\x20API\x20access\x20for\x20'+_0x23213d['selector'][_0x4757c0(0x8f)][_0x4757c0(0x91)]+_0x4757c0(0xb0)+_0x57e81d[_0x4757c0(0xab)]};}};
@@ -1 +1 @@
1
- const a139_0x36fe16=a139_0x42af;(function(_0x7c37b5,_0x1e3ca2){const _0xdc0925=a139_0x42af,_0x5e2fbb=_0x7c37b5();while(!![]){try{const _0x70a7e3=parseInt(_0xdc0925(0x10c))/0x1*(parseInt(_0xdc0925(0x128))/0x2)+-parseInt(_0xdc0925(0x105))/0x3+parseInt(_0xdc0925(0x10e))/0x4*(parseInt(_0xdc0925(0x12b))/0x5)+parseInt(_0xdc0925(0x127))/0x6+parseInt(_0xdc0925(0x125))/0x7*(-parseInt(_0xdc0925(0x121))/0x8)+parseInt(_0xdc0925(0x11e))/0x9+-parseInt(_0xdc0925(0x106))/0xa*(-parseInt(_0xdc0925(0x11b))/0xb);if(_0x70a7e3===_0x1e3ca2)break;else _0x5e2fbb['push'](_0x5e2fbb['shift']());}catch(_0xee02df){_0x5e2fbb['push'](_0x5e2fbb['shift']());}}}(a139_0x2faf,0x5d8b4));import{getRoleMenuResources,updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a139_0x42af(_0x5aa18e,_0x24289f){_0x5aa18e=_0x5aa18e-0x105;const _0x2faff9=a139_0x2faf();let _0x42afef=_0x2faff9[_0x5aa18e];return _0x42afef;}import{asDryRunResult}from'../../commands/common/dry-run.js';function a139_0x2faf(){const _0x94e077=['2247168Ioxrdu','1180OSzYJh','role-menus-set','menus','resourceCodes','appCode','validation','587TpawSq','push','284syoZep','permit','Pass\x20--menus\x20<resourceCode,...>.','selector','PAGE','flagMissing','length','action','high-risk-write','set','str','access','/smartapi/permit/role/update','12463OhjIMn','\x20menu\x20permit(s)\x20for\x20role\x20','menu-grant','934299sbVtcJ','roleName','Grant\x20or\x20revoke\x20a\x20role\x27s\x20menu\x20access\x20by\x20resourceCode\x20(roleType\x20PAGE);\x20requires\x20--yes','12664oiaVYB','POST','Run\x20`permit\x20role-menus\x20--role\x20<id>`\x20to\x20see\x20valid\x20resourceCodes.','menu-revoke','679CcfKwa','join','2417556RQMskT','390UAAQkI','Unknown\x20menu\x20resourceCode(s):\x20','get','37385TBOAwv','Updated\x20'];a139_0x2faf=function(){return _0x94e077;};return a139_0x2faf();}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_0x36fe16(0x11a);async function buildPlan(_0xa65e1b,_0x3c462b){const _0x42453f=a139_0x36fe16,_0x2e0705=await resolveRoleRef(_0xa65e1b[_0x42453f(0x10a)],readRoleRef(_0xa65e1b));assertPermConfigurable(_0x2e0705);const _0x2d52eb=readGrantRevoke(_0xa65e1b),_0x4e8fc=splitList(_0xa65e1b[_0x42453f(0x118)](_0x42453f(0x108)));if(_0x4e8fc[_0x42453f(0x114)]===0x0)throw CliErrors[_0x42453f(0x113)]('menus','Pass\x20--menus\x20<resourceCode,...>.');const _0x403549=await getRoleMenuResources(_0xa65e1b[_0x42453f(0x10a)],_0x2e0705['id']),_0x166d24=flattenMenuResources(_0x403549),_0x136f6a=_0x4e8fc['filter'](_0x48c05b=>!_0x166d24['has'](_0x48c05b));if(_0x136f6a[_0x42453f(0x114)]>0x0)throw CliErrors[_0x42453f(0x10b)](_0x42453f(0x129)+_0x136f6a[_0x42453f(0x126)](',\x20')+'.',_0x42453f(0x123));const _0x4199cf=new Map(),_0x4861ab=[],_0x14a184=[];for(const _0x13b936 of _0x4e8fc){const _0x213f80=_0x166d24[_0x42453f(0x12a)](_0x13b936);_0x4199cf[_0x42453f(0x117)](_0x13b936,_0x2d52eb),_0x4861ab[_0x42453f(0x10d)]({'resourceCode':_0x13b936,'action':_0x213f80[_0x42453f(0x115)]}),_0x14a184[_0x42453f(0x10d)]({'resourceCode':_0x13b936,'action':_0x2d52eb});}const _0x598f42=buildPermits(_0x166d24,_0x4199cf),_0x2b427b={'operation':_0x2d52eb===_0x42453f(0x119)?_0x42453f(0x11d):_0x42453f(0x124),'selector':{'appCode':_0xa65e1b[_0x42453f(0x10a)],'roleId':_0x2e0705['id'],'roleName':_0x2e0705[_0x42453f(0x11f)],'resourceCodes':_0x4e8fc},'before':_0x4861ab,'after':_0x14a184,'dryRun':_0x3c462b,'backend':{'method':_0x42453f(0x122),'path':UPDATE_PATH,'roleType':_0x42453f(0x112)},'warnings':[]};return{'role':_0x2e0705,'permits':_0x598f42,'mutation':_0x2b427b};}export const permitRoleMenusSet={'service':a139_0x36fe16(0x10f),'command':a139_0x36fe16(0x107),'description':a139_0x36fe16(0x120),'risk':a139_0x36fe16(0x116),'flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,MENUS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x14cf82){const _0x2457fc=a139_0x36fe16;readGrantRevoke(_0x14cf82);if(splitList(_0x14cf82[_0x2457fc(0x118)](_0x2457fc(0x108)))[_0x2457fc(0x114)]===0x0)throw CliErrors[_0x2457fc(0x113)](_0x2457fc(0x108),_0x2457fc(0x110));},async 'dryRun'(_0x39b570){const _0x50405b=a139_0x36fe16,{mutation:_0x52b4ac}=await buildPlan(_0x39b570,!![]);return asDryRunResult(_0x52b4ac,{'method':_0x50405b(0x122),'url':UPDATE_PATH});},async 'execute'(_0x358cb4){const _0xec18d7=a139_0x36fe16,{role:_0x479f14,permits:_0x257252,mutation:_0x12fb2e}=await buildPlan(_0x358cb4,![]);return await updateAppRole({'id':_0x479f14['id'],'appCode':_0x358cb4['appCode'],'roleType':_0xec18d7(0x112),'permits':_0x257252}),{'ok':!![],'data':_0x12fb2e,'message':_0xec18d7(0x12c)+_0x12fb2e[_0xec18d7(0x111)][_0xec18d7(0x109)]['length']+_0xec18d7(0x11c)+_0x479f14[_0xec18d7(0x11f)]};}};
1
+ const a139_0x1fbd14=a139_0x24dd;function a139_0x24dd(_0x18d3e6,_0x547a6c){_0x18d3e6=_0x18d3e6-0x161;const _0x375814=a139_0x3758();let _0x24dd5f=_0x375814[_0x18d3e6];return _0x24dd5f;}(function(_0x2b0591,_0x280734){const _0x1faf2c=a139_0x24dd,_0x5c1bc7=_0x2b0591();while(!![]){try{const _0x568496=-parseInt(_0x1faf2c(0x17b))/0x1*(-parseInt(_0x1faf2c(0x182))/0x2)+-parseInt(_0x1faf2c(0x17c))/0x3+-parseInt(_0x1faf2c(0x17e))/0x4*(parseInt(_0x1faf2c(0x17f))/0x5)+-parseInt(_0x1faf2c(0x174))/0x6+parseInt(_0x1faf2c(0x184))/0x7+-parseInt(_0x1faf2c(0x161))/0x8+parseInt(_0x1faf2c(0x164))/0x9;if(_0x568496===_0x280734)break;else _0x5c1bc7['push'](_0x5c1bc7['shift']());}catch(_0x396ac1){_0x5c1bc7['push'](_0x5c1bc7['shift']());}}}(a139_0x3758,0xa75cf));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_0x1fbd14(0x169);function a139_0x3758(){const _0x1d51f8=['resourceCodes','20ghLwGk','length','4013814HPkAak','Updated\x20','selector','2859472WqPXsF','menus','action','2183526LwHYfW','Grant\x20or\x20revoke\x20a\x20role\x27s\x20menu\x20access\x20by\x20resourceCode\x20(roleType\x20PAGE);\x20requires\x20--yes','menu-revoke','roleName','\x20menu\x20permit(s)\x20for\x20role\x20','/smartapi/permit/role/update','Run\x20`permit\x20role-menus\x20--role\x20<id>`\x20to\x20see\x20valid\x20resourceCodes.','high-risk-write','set','PAGE','str','POST','menu-grant','get','push','appCode','4619262fsSVOc','role-menus-set','Pass\x20--menus\x20<resourceCode,...>.','validation','has','join','filter','134879ZrPVaG','895536GwdXen','flagMissing','213856exgFhB','5QEzicl','Unknown\x20menu\x20resourceCode(s):\x20'];a139_0x3758=function(){return _0x1d51f8;};return a139_0x3758();}async function buildPlan(_0x276916,_0x391c31){const _0x49f74a=a139_0x1fbd14,_0x1134af=await resolveRoleRef(_0x276916[_0x49f74a(0x173)],readRoleRef(_0x276916));assertPermConfigurable(_0x1134af);const _0x1142a2=readGrantRevoke(_0x276916),_0x188ee7=splitList(_0x276916[_0x49f74a(0x16e)](_0x49f74a(0x162)));if(_0x188ee7[_0x49f74a(0x183)]===0x0)throw CliErrors[_0x49f74a(0x17d)](_0x49f74a(0x162),_0x49f74a(0x176));const _0x973e04=await getRoleMenuResources(_0x276916[_0x49f74a(0x173)],_0x1134af['id']),_0xbbaed7=flattenMenuResources(_0x973e04),_0xd23de5=_0x188ee7[_0x49f74a(0x17a)](_0x4b9834=>!_0xbbaed7[_0x49f74a(0x178)](_0x4b9834));if(_0xd23de5[_0x49f74a(0x183)]>0x0)throw CliErrors[_0x49f74a(0x177)](_0x49f74a(0x180)+_0xd23de5[_0x49f74a(0x179)](',\x20')+'.',_0x49f74a(0x16a));const _0x4d33e7=new Map(),_0x4a1337=[],_0x249113=[];for(const _0x1ad252 of _0x188ee7){const _0x3cb4ea=_0xbbaed7[_0x49f74a(0x171)](_0x1ad252);_0x4d33e7[_0x49f74a(0x16c)](_0x1ad252,_0x1142a2),_0x4a1337[_0x49f74a(0x172)]({'resourceCode':_0x1ad252,'action':_0x3cb4ea[_0x49f74a(0x163)]}),_0x249113['push']({'resourceCode':_0x1ad252,'action':_0x1142a2});}const _0x42ce8f=buildPermits(_0xbbaed7,_0x4d33e7),_0x283d9f={'operation':_0x1142a2==='access'?_0x49f74a(0x170):_0x49f74a(0x166),'selector':{'appCode':_0x276916['appCode'],'roleId':_0x1134af['id'],'roleName':_0x1134af[_0x49f74a(0x167)],'resourceCodes':_0x188ee7},'before':_0x4a1337,'after':_0x249113,'dryRun':_0x391c31,'backend':{'method':_0x49f74a(0x16f),'path':UPDATE_PATH,'roleType':'PAGE'},'warnings':[]};return{'role':_0x1134af,'permits':_0x42ce8f,'mutation':_0x283d9f};}export const permitRoleMenusSet={'service':'permit','command':a139_0x1fbd14(0x175),'description':a139_0x1fbd14(0x165),'risk':a139_0x1fbd14(0x16b),'flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,MENUS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2eeef3){const _0x36e7dc=a139_0x1fbd14;readGrantRevoke(_0x2eeef3);if(splitList(_0x2eeef3['str']('menus'))[_0x36e7dc(0x183)]===0x0)throw CliErrors[_0x36e7dc(0x17d)](_0x36e7dc(0x162),_0x36e7dc(0x176));},async 'dryRun'(_0x3a33f0){const _0x1294fe=a139_0x1fbd14,{mutation:_0x43b13e}=await buildPlan(_0x3a33f0,!![]);return asDryRunResult(_0x43b13e,{'method':_0x1294fe(0x16f),'url':UPDATE_PATH});},async 'execute'(_0x3a81ae){const _0x457184=a139_0x1fbd14,{role:_0x4f962d,permits:_0x17e0e5,mutation:_0xb9b230}=await buildPlan(_0x3a81ae,![]);return await updateAppRole({'id':_0x4f962d['id'],'appCode':_0x3a81ae[_0x457184(0x173)],'roleType':_0x457184(0x16d),'permits':_0x17e0e5}),{'ok':!![],'data':_0xb9b230,'message':_0x457184(0x185)+_0xb9b230[_0x457184(0x186)][_0x457184(0x181)][_0x457184(0x183)]+_0x457184(0x168)+_0x4f962d[_0x457184(0x167)]};}};
@@ -1 +1 @@
1
- const a140_0x307d99=a140_0x12f8;(function(_0x39ee0f,_0x48b757){const _0x5df738=a140_0x12f8,_0x3b83b1=_0x39ee0f();while(!![]){try{const _0x37aba3=-parseInt(_0x5df738(0xa5))/0x1*(parseInt(_0x5df738(0xbc))/0x2)+parseInt(_0x5df738(0xbd))/0x3*(-parseInt(_0x5df738(0xae))/0x4)+parseInt(_0x5df738(0xba))/0x5*(-parseInt(_0x5df738(0xab))/0x6)+parseInt(_0x5df738(0xaf))/0x7*(parseInt(_0x5df738(0xbb))/0x8)+parseInt(_0x5df738(0xb9))/0x9+parseInt(_0x5df738(0xaa))/0xa*(-parseInt(_0x5df738(0xb3))/0xb)+parseInt(_0x5df738(0xbe))/0xc;if(_0x37aba3===_0x48b757)break;else _0x3b83b1['push'](_0x3b83b1['shift']());}catch(_0xdaebec){_0x3b83b1['push'](_0x3b83b1['shift']());}}}(a140_0x5be9,0xc4257));import{getRoleMenuResources}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{flattenMenuResources,readRoleRef,ROLE_REF_FLAG}from'../../commands/permit/shared.js';import{resolveRoleRef}from'../../commands/role/shared.js';export const permitRoleMenus={'service':a140_0x307d99(0xb0),'command':a140_0x307d99(0xa9),'description':'Show\x20a\x20role\x27s\x20current\x20menu\x20permission\x20matrix','risk':a140_0x307d99(0xad),'flags':[ROLE_REF_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x47b707){const _0x331b19=a140_0x307d99,_0x3c5611=await resolveRoleRef(_0x47b707[_0x331b19(0xb2)],readRoleRef(_0x47b707)),_0x53a7de=await getRoleMenuResources(_0x47b707[_0x331b19(0xb2)],_0x3c5611['id']),_0xd83b51=flattenMenuResources(_0x53a7de),_0x48e31c=Array[_0x331b19(0xa7)](_0xd83b51[_0x331b19(0xb5)]())[_0x331b19(0xb6)](_0x519e44=>({'resourceCode':_0x519e44['resourceCode'],'resourceName':_0x519e44[_0x331b19(0xb4)],'allowed':_0x519e44[_0x331b19(0xb7)]===_0x331b19(0xb8),'action':_0x519e44[_0x331b19(0xb7)]}));return{'ok':!![],'data':{'selector':{'appCode':_0x47b707[_0x331b19(0xb2)],'roleId':_0x3c5611['id'],'roleName':_0x3c5611[_0x331b19(0xa6)]},'menus':_0x48e31c},'message':_0x331b19(0xac)+_0x3c5611['roleName']+'\x20has\x20'+_0x48e31c['filter'](_0x55597d=>_0x55597d[_0x331b19(0xa8)])[_0x331b19(0xb1)]+'/'+_0x48e31c[_0x331b19(0xb1)]+'\x20menu(s)\x20allowed'};}};function a140_0x12f8(_0x45af17,_0x4ac100){_0x45af17=_0x45af17-0xa5;const _0x5be961=a140_0x5be9();let _0x12f88d=_0x5be961[_0x45af17];return _0x12f88d;}function a140_0x5be9(){const _0x3b8db8=['role-menus','1530QUQzNW','338568EUVdqF','Role\x20','read','8cVqrzB','9947UtSIlZ','permit','length','appCode','106469QnZGSf','resourceName','values','map','action','access','2506896oKcxNK','5lhXGHF','4288tRwsBD','2971858pAOcnI','1204914xupvPp','43076820pplQwT','1nadAXz','roleName','from','allowed'];a140_0x5be9=function(){return _0x3b8db8;};return a140_0x5be9();}
1
+ function a140_0x2336(_0x112a6b,_0x52e802){_0x112a6b=_0x112a6b-0x15e;const _0x3a9c4e=a140_0x3a9c();let _0x2336e2=_0x3a9c4e[_0x112a6b];return _0x2336e2;}const a140_0x28e406=a140_0x2336;(function(_0x27d1f3,_0x4471fb){const _0x3c8bb2=a140_0x2336,_0x3c3dbd=_0x27d1f3();while(!![]){try{const _0x4b7b32=-parseInt(_0x3c8bb2(0x15f))/0x1+parseInt(_0x3c8bb2(0x16c))/0x2+-parseInt(_0x3c8bb2(0x167))/0x3*(-parseInt(_0x3c8bb2(0x16d))/0x4)+parseInt(_0x3c8bb2(0x160))/0x5+parseInt(_0x3c8bb2(0x168))/0x6+-parseInt(_0x3c8bb2(0x16b))/0x7+parseInt(_0x3c8bb2(0x172))/0x8*(parseInt(_0x3c8bb2(0x173))/0x9);if(_0x4b7b32===_0x4471fb)break;else _0x3c3dbd['push'](_0x3c3dbd['shift']());}catch(_0x2c5114){_0x3c3dbd['push'](_0x3c3dbd['shift']());}}}(a140_0x3a9c,0xc17c5));import{getRoleMenuResources}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{flattenMenuResources,readRoleRef,ROLE_REF_FLAG}from'../../commands/permit/shared.js';import{resolveRoleRef}from'../../commands/role/shared.js';export const permitRoleMenus={'service':a140_0x28e406(0x161),'command':a140_0x28e406(0x165),'description':a140_0x28e406(0x171),'risk':a140_0x28e406(0x164),'flags':[ROLE_REF_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x1ade4e){const _0x115c9a=a140_0x28e406,_0x2cb010=await resolveRoleRef(_0x1ade4e['appCode'],readRoleRef(_0x1ade4e)),_0x5580dd=await getRoleMenuResources(_0x1ade4e[_0x115c9a(0x174)],_0x2cb010['id']),_0x38e9dd=flattenMenuResources(_0x5580dd),_0x1f4f0e=Array[_0x115c9a(0x166)](_0x38e9dd[_0x115c9a(0x16a)]())['map'](_0x34946f=>({'resourceCode':_0x34946f[_0x115c9a(0x163)],'resourceName':_0x34946f[_0x115c9a(0x15e)],'allowed':_0x34946f[_0x115c9a(0x170)]==='access','action':_0x34946f[_0x115c9a(0x170)]}));return{'ok':!![],'data':{'selector':{'appCode':_0x1ade4e['appCode'],'roleId':_0x2cb010['id'],'roleName':_0x2cb010[_0x115c9a(0x169)]},'menus':_0x1f4f0e},'message':_0x115c9a(0x162)+_0x2cb010[_0x115c9a(0x169)]+_0x115c9a(0x175)+_0x1f4f0e['filter'](_0x40e681=>_0x40e681['allowed'])[_0x115c9a(0x16f)]+'/'+_0x1f4f0e[_0x115c9a(0x16f)]+_0x115c9a(0x16e)};}};function a140_0x3a9c(){const _0x38d34b=['from','249PuJoON','350040GnYPFH','roleName','values','1002960QUglpI','1875056YUkiDw','39748QUrdHU','\x20menu(s)\x20allowed','length','action','Show\x20a\x20role\x27s\x20current\x20menu\x20permission\x20matrix','272752sDMcnF','27bDUOtA','appCode','\x20has\x20','resourceName','1538551ITWXBw','2757135MNJKHv','permit','Role\x20','resourceCode','read','role-menus'];a140_0x3a9c=function(){return _0x38d34b;};return a140_0x3a9c();}
@@ -1 +1 @@
1
- const a141_0x10eef8=a141_0x3512;(function(_0x6ac9be,_0x2c7547){const _0x354682=a141_0x3512,_0x558456=_0x6ac9be();while(!![]){try{const _0x2a531c=parseInt(_0x354682(0x140))/0x1*(-parseInt(_0x354682(0x101))/0x2)+-parseInt(_0x354682(0x135))/0x3+-parseInt(_0x354682(0x12e))/0x4+parseInt(_0x354682(0x13e))/0x5+-parseInt(_0x354682(0x124))/0x6+parseInt(_0x354682(0x12b))/0x7*(-parseInt(_0x354682(0x13c))/0x8)+-parseInt(_0x354682(0xff))/0x9*(-parseInt(_0x354682(0x102))/0xa);if(_0x2a531c===_0x2c7547)break;else _0x558456['push'](_0x558456['shift']());}catch(_0x41fec0){_0x558456['push'](_0x558456['shift']());}}}(a141_0xb81f,0xf2cbb));import{listPermitRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const MENU_ID_FLAG={'name':a141_0x10eef8(0x11d),'type':a141_0x10eef8(0x14a),'required':!![],'description':a141_0x10eef8(0xf7)};export const ROLE_REF_FLAG={'name':a141_0x10eef8(0x106),'type':a141_0x10eef8(0x109),'required':!![],'description':a141_0x10eef8(0x107)};export const GRANT_FLAG={'name':a141_0x10eef8(0x121),'type':a141_0x10eef8(0x116),'required':![],'description':a141_0x10eef8(0x13d)};export const REVOKE_FLAG={'name':a141_0x10eef8(0x117),'type':a141_0x10eef8(0x116),'required':![],'description':'Revoke\x20access\x20to\x20the\x20listed\x20resources'};export const MENUS_FLAG={'name':'menus','type':a141_0x10eef8(0x109),'required':!![],'description':a141_0x10eef8(0x126)};export const DATASETS_FLAG={'name':a141_0x10eef8(0x10a),'type':a141_0x10eef8(0x109),'required':!![],'description':a141_0x10eef8(0x11f)};export const PAGE_SLOT_SPECS=[{'flag':a141_0x10eef8(0x108),'key':a141_0x10eef8(0x142),'allowSelf':![],'label':'menu\x20visibility'},{'flag':a141_0x10eef8(0xf6),'key':'dataCreate','allowSelf':![],'label':a141_0x10eef8(0x10f)},{'flag':a141_0x10eef8(0x134),'key':'dataUpdate','allowSelf':![],'label':a141_0x10eef8(0x110)},{'flag':a141_0x10eef8(0xf8),'key':a141_0x10eef8(0x139),'allowSelf':![],'label':'data\x20delete'},{'flag':a141_0x10eef8(0x138),'key':'dataDetail','allowSelf':![],'label':'data\x20detail'},{'flag':a141_0x10eef8(0xf9),'key':a141_0x10eef8(0x13a),'allowSelf':![],'label':a141_0x10eef8(0xfe)},{'flag':a141_0x10eef8(0x148),'key':a141_0x10eef8(0x10e),'allowSelf':!![],'label':a141_0x10eef8(0x123)}];function a141_0x3512(_0x54401f,_0x291d40){_0x54401f=_0x54401f-0xf5;const _0xb81f51=a141_0xb81f();let _0x351224=_0xb81f51[_0x54401f];return _0x351224;}export const PAGE_SET_ROLE_FLAGS=PAGE_SLOT_SPECS[a141_0x10eef8(0x136)](_0x2b5b99=>({'name':_0x2b5b99[a141_0x10eef8(0x141)],'type':a141_0x10eef8(0x109),'required':![],'description':a141_0x10eef8(0x120)+_0x2b5b99['label']+a141_0x10eef8(0xfc)+(_0x2b5b99[a141_0x10eef8(0xf5)]?a141_0x10eef8(0x11e):'')}));export function splitList(_0xe61d58){const _0xa1d432=a141_0x10eef8;return _0xe61d58['split'](',')[_0xa1d432(0x136)](_0xa734b7=>_0xa734b7['trim']())[_0xa1d432(0x12c)](Boolean);}function a141_0xb81f(){const _0x494490=['datasetCode','menu-id',';\x20SELF\x20=\x20only\x20own\x20rows','Comma-separated\x20datasetCodes\x20to\x20revoke\x20API\x20access\x20for','Roles\x20for\x20','grant','roleType','row\x20visibility','283650NglcWB','Disambiguate\x20with\x20an\x20id.','Comma-separated\x20menu\x20resourceCodes\x20to\x20grant/revoke','pageNodeList','validation','SELF','toUpperCase','44163Ythgho','filter','set','5283504iyqcxU','Role\x20\x22','trim','test','key','appCode','update-roles','4791684wgARrx','map','rolePermit','detail-roles','dataDelete','dataExport','allowedActions','728NUinZQ','Grant\x20access\x20to\x20the\x20listed\x20resources','5654080jJcgoN','SELF\x20(row-level)\x20applies\x20only\x20to\x20--row-roles.','845140dwcikK','flag','menuPermit','roleName','join','Role\x20id\x20','Run\x20`role\x20list`.','Pass\x20exactly\x20one\x20of\x20--grant\x20/\x20--revoke.','row-roles','find','number','allowSelf','create-roles','Menu\x20id\x20(from\x20`menu\x20list`)','delete-roles','export-roles','length','\x22\x20not\x20found.','\x20(comma-separated\x20SELF/ALL/id/name)','some','data\x20export','228951neUPTl','push','2KTOPvX','1670UwqhBc','\x22\x20is\x20ambiguous\x20(ids:\x20','flagMissing','resourceCode','role','Role\x20id\x20or\x20role\x20name','menu-roles','string','datasets','Special\x20role\x20','label','bool','dataPermit','data\x20create','data\x20update','resourceName','str','SELF\x20is\x20not\x20allowed\x20for\x20','get','access','boolean','revoke','--grant\x20and\x20--revoke\x20are\x20mutually\x20exclusive.','Run\x20`role\x20list`,\x20or\x20use\x20SELF/ALL/<id>.','apiList','\x20is\x20not\x20available\x20for\x20this\x20app.'];a141_0xb81f=function(){return _0x494490;};return a141_0xb81f();}export function projectRoleRef(_0x23b2a4){const _0x514758=a141_0x10eef8;return{'id':_0x23b2a4['id'],'roleName':_0x23b2a4[_0x514758(0x143)],'roleType':_0x23b2a4[_0x514758(0x122)]};}export async function resolvePermitRoles(_0x17018c,_0x3ccfe0,_0x4cb51c){const _0x52cf96=a141_0x10eef8,_0x2a51bc=await listPermitRoles(_0x17018c,{'needSelf':!![],'needPublic':!![]}),_0x2da0b3=[];for(const _0x11e75d of _0x3ccfe0){const _0x4ef5c5=resolveOnePermitRole(_0x2a51bc,_0x11e75d);if(!_0x4cb51c['allowSelf']&&_0x4ef5c5[_0x52cf96(0x122)]===_0x52cf96(0x129))throw CliErrors[_0x52cf96(0x128)](_0x52cf96(0x113)+_0x4cb51c[_0x52cf96(0x10c)]+'.',_0x52cf96(0x13f));if(!_0x2da0b3[_0x52cf96(0xfd)](_0x199a8f=>_0x199a8f['id']===_0x4ef5c5['id']))_0x2da0b3[_0x52cf96(0x100)](_0x4ef5c5);}return _0x2da0b3;}function resolveOnePermitRole(_0x223380,_0x87df1d){const _0x69301f=a141_0x10eef8,_0x3d09ed=_0x87df1d[_0x69301f(0x130)](),_0x3e71eb=_0x3d09ed[_0x69301f(0x12a)]();if(_0x3e71eb===_0x69301f(0x129)||_0x3e71eb==='ALL'){const _0x351946=_0x223380['find'](_0x48f537=>_0x48f537[_0x69301f(0x122)]===_0x3e71eb);if(!_0x351946)throw CliErrors[_0x69301f(0x128)](_0x69301f(0x10b)+_0x3e71eb+_0x69301f(0x11b));return _0x351946;}if(/^-?\d+$/[_0x69301f(0x131)](_0x3d09ed)){const _0x4957b9=Number(_0x3d09ed),_0x75df74=_0x223380[_0x69301f(0x149)](_0x58b18a=>_0x58b18a['id']===_0x4957b9);if(!_0x75df74)throw CliErrors[_0x69301f(0x128)](_0x69301f(0x145)+_0x4957b9+'\x20not\x20found.',_0x69301f(0x146));return _0x75df74;}const _0x13ed72=_0x223380[_0x69301f(0x12c)](_0x11d6c0=>_0x11d6c0[_0x69301f(0x143)]===_0x3d09ed);if(_0x13ed72['length']===0x0)throw CliErrors['validation'](_0x69301f(0x12f)+_0x3d09ed+_0x69301f(0xfb),_0x69301f(0x119));if(_0x13ed72[_0x69301f(0xfa)]>0x1)throw CliErrors[_0x69301f(0x128)](_0x69301f(0x12f)+_0x3d09ed+_0x69301f(0x103)+_0x13ed72['map'](_0x29f33e=>_0x29f33e['id'])[_0x69301f(0x144)](',\x20')+').',_0x69301f(0x125));return _0x13ed72[0x0];}export function projectPageSlot(_0x31aff5){const _0x47d624=a141_0x10eef8;if(!_0x31aff5)return null;return{'resourceCode':_0x31aff5['resourceCode'],'roles':(_0x31aff5[_0x47d624(0x137)]??[])[_0x47d624(0x136)](projectRoleRef)};}export function projectPagePermit(_0x43bd72){const _0xe87797=a141_0x10eef8,_0x2778b3={'menuId':_0x43bd72['menuId'],'appCode':_0x43bd72[_0xe87797(0x133)],'menuPermit':projectPageSlot(_0x43bd72['menuPermit'])};for(const _0x13e0da of PAGE_SLOT_SPECS){if(_0x13e0da[_0xe87797(0x132)]===_0xe87797(0x142))continue;_0x2778b3[_0x13e0da[_0xe87797(0x132)]]=projectPageSlot(_0x43bd72[_0x13e0da[_0xe87797(0x132)]]);}return _0x2778b3;}export function flattenMenuResources(_0x3966d1){const _0x12f75b=new Map(),_0x412297=_0x295c54=>{const _0x2e211d=a141_0x3512;for(const _0x36cee6 of _0x295c54??[]){_0x12f75b[_0x2e211d(0x12d)](_0x36cee6[_0x2e211d(0x105)],{'resourceCode':_0x36cee6[_0x2e211d(0x105)],'resourceName':_0x36cee6[_0x2e211d(0x111)],'action':_0x36cee6[_0x2e211d(0x13b)]?.[0x0]??'0'});if(_0x36cee6[_0x2e211d(0x127)])_0x412297(_0x36cee6['pageNodeList']);}};return _0x412297(_0x3966d1),_0x12f75b;}export function flattenApiResources(_0x1126dd){const _0x4d6c90=a141_0x10eef8,_0x414c77=new Map(),_0x4bc2ab=new Map();for(const _0x5460a5 of _0x1126dd){const _0x48e02e=_0x5460a5[_0x4d6c90(0x11a)]??{};for(const [_0xb9d880,_0x3ef9f9]of Object['entries'](_0x48e02e)){_0x414c77[_0x4d6c90(0x12d)](_0xb9d880,{'resourceCode':_0xb9d880,'resourceName':_0x5460a5['resourceName'],'datasetCode':_0x5460a5[_0x4d6c90(0x11c)],'action':_0x3ef9f9?.[0x0]??'0'});const _0x47fca2=_0x4bc2ab[_0x4d6c90(0x114)](_0x5460a5[_0x4d6c90(0x11c)])??[];_0x47fca2[_0x4d6c90(0x100)](_0xb9d880),_0x4bc2ab[_0x4d6c90(0x12d)](_0x5460a5[_0x4d6c90(0x11c)],_0x47fca2);}}return{'byCode':_0x414c77,'byDataset':_0x4bc2ab};}export function buildPermits(_0x47c3ff,_0x23afed){const _0x1397f4={};for(const [_0x58d116,_0x271318]of _0x47c3ff){const _0x4edf5a=_0x23afed['get'](_0x58d116)??_0x271318['action'];_0x1397f4[_0x58d116]=[_0x4edf5a];}return _0x1397f4;}export function readRoleRef(_0x2730e7){const _0xd62c81=a141_0x10eef8,_0x5ceca3=_0x2730e7[_0xd62c81(0x112)](_0xd62c81(0x106))[_0xd62c81(0x130)]();if(!_0x5ceca3)throw CliErrors[_0xd62c81(0x104)]('role','Pass\x20--role\x20<id|name>.');return _0x5ceca3;}export function readGrantRevoke(_0x32bbf1){const _0x34a9eb=a141_0x10eef8,_0x1ad797=_0x32bbf1[_0x34a9eb(0x10d)]('grant'),_0x518c90=_0x32bbf1[_0x34a9eb(0x10d)](_0x34a9eb(0x117));if(_0x1ad797&&_0x518c90)throw CliErrors[_0x34a9eb(0x128)](_0x34a9eb(0x118));if(!_0x1ad797&&!_0x518c90)throw CliErrors[_0x34a9eb(0x128)]('Missing\x20action.',_0x34a9eb(0x147));return _0x1ad797?_0x34a9eb(0x115):'0';}
1
+ const a141_0x5a51db=a141_0x50a2;(function(_0x30437a,_0x332df7){const _0xd8e4d0=a141_0x50a2,_0x2e715f=_0x30437a();while(!![]){try{const _0x2d2ad6=-parseInt(_0xd8e4d0(0x186))/0x1*(parseInt(_0xd8e4d0(0x190))/0x2)+parseInt(_0xd8e4d0(0x1bd))/0x3+-parseInt(_0xd8e4d0(0x17e))/0x4*(-parseInt(_0xd8e4d0(0x1a1))/0x5)+-parseInt(_0xd8e4d0(0x1b7))/0x6+parseInt(_0xd8e4d0(0x17c))/0x7*(parseInt(_0xd8e4d0(0x176))/0x8)+parseInt(_0xd8e4d0(0x177))/0x9+parseInt(_0xd8e4d0(0x1c4))/0xa*(-parseInt(_0xd8e4d0(0x1c0))/0xb);if(_0x2d2ad6===_0x332df7)break;else _0x2e715f['push'](_0x2e715f['shift']());}catch(_0x2aa269){_0x2e715f['push'](_0x2e715f['shift']());}}}(a141_0x1c20,0x636d8));import{listPermitRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const MENU_ID_FLAG={'name':'menu-id','type':a141_0x5a51db(0x191),'required':!![],'description':a141_0x5a51db(0x1c6)};export const ROLE_REF_FLAG={'name':a141_0x5a51db(0x1ac),'type':a141_0x5a51db(0x1b4),'required':!![],'description':a141_0x5a51db(0x1b9)};export const GRANT_FLAG={'name':'grant','type':a141_0x5a51db(0x1c1),'required':![],'description':a141_0x5a51db(0x1a7)};export const REVOKE_FLAG={'name':'revoke','type':a141_0x5a51db(0x1c1),'required':![],'description':'Revoke\x20access\x20to\x20the\x20listed\x20resources'};export const MENUS_FLAG={'name':'menus','type':'string','required':!![],'description':'Comma-separated\x20menu\x20resourceCodes\x20to\x20grant/revoke'};export const DATASETS_FLAG={'name':a141_0x5a51db(0x171),'type':'string','required':!![],'description':a141_0x5a51db(0x19f)};export const PAGE_SLOT_SPECS=[{'flag':a141_0x5a51db(0x173),'key':'menuPermit','allowSelf':![],'label':a141_0x5a51db(0x19b)},{'flag':a141_0x5a51db(0x18d),'key':'dataCreate','allowSelf':![],'label':a141_0x5a51db(0x192)},{'flag':a141_0x5a51db(0x189),'key':a141_0x5a51db(0x179),'allowSelf':![],'label':a141_0x5a51db(0x199)},{'flag':a141_0x5a51db(0x1b2),'key':a141_0x5a51db(0x197),'allowSelf':![],'label':a141_0x5a51db(0x1b0)},{'flag':a141_0x5a51db(0x1ae),'key':'dataDetail','allowSelf':![],'label':'data\x20detail'},{'flag':a141_0x5a51db(0x1bf),'key':a141_0x5a51db(0x18c),'allowSelf':![],'label':a141_0x5a51db(0x1a4)},{'flag':a141_0x5a51db(0x19d),'key':a141_0x5a51db(0x195),'allowSelf':!![],'label':a141_0x5a51db(0x1c5)}];function a141_0x1c20(){const _0x591209=['7mAprhg','flag','2280436cEjssH','Role\x20id\x20','menuPermit','Pass\x20--role\x20<id|name>.','Roles\x20for\x20','revoke','Missing\x20action.','resourceName','1rokjal','allowSelf','map','update-roles','split','resourceCode','dataExport','create-roles','\x22\x20not\x20found.','roleName','832154XIpWLH','number','data\x20create','allowedActions','push','dataPermit','access','dataDelete','grant','data\x20update','get','menu\x20visibility','length','row-roles','set','Comma-separated\x20datasetCodes\x20to\x20revoke\x20API\x20access\x20for','Disambiguate\x20with\x20an\x20id.','5mdfTnu','roleType','Special\x20role\x20','data\x20export','datasetCode','menuId','Grant\x20access\x20to\x20the\x20listed\x20resources','--grant\x20and\x20--revoke\x20are\x20mutually\x20exclusive.','filter','apiList','ALL','role','toUpperCase','detail-roles','pageNodeList','data\x20delete','SELF\x20is\x20not\x20allowed\x20for\x20','delete-roles','validation','string','Run\x20`role\x20list`.','label','4635006jLwaRx','SELF','Role\x20id\x20or\x20role\x20name','test','Run\x20`role\x20list`,\x20or\x20use\x20SELF/ALL/<id>.','Pass\x20exactly\x20one\x20of\x20--grant\x20/\x20--revoke.','2099037BYxedP','appCode','export-roles','1434037UhtxWt','boolean','str','rolePermit','40xfZQwv','row\x20visibility','Menu\x20id\x20(from\x20`menu\x20list`)',';\x20SELF\x20=\x20only\x20own\x20rows','bool','entries','trim','\x20is\x20not\x20available\x20for\x20this\x20app.','datasets','flagMissing','menu-roles','key','\x20not\x20found.','5267680NpgRLy','1701486DeQHEl','SELF\x20(row-level)\x20applies\x20only\x20to\x20--row-roles.','dataUpdate','some','find'];a141_0x1c20=function(){return _0x591209;};return a141_0x1c20();}export const PAGE_SET_ROLE_FLAGS=PAGE_SLOT_SPECS[a141_0x5a51db(0x188)](_0x42e35d=>({'name':_0x42e35d[a141_0x5a51db(0x17d)],'type':'string','required':![],'description':a141_0x5a51db(0x182)+_0x42e35d[a141_0x5a51db(0x1b6)]+'\x20(comma-separated\x20SELF/ALL/id/name)'+(_0x42e35d[a141_0x5a51db(0x187)]?a141_0x5a51db(0x1c7):'')}));export function splitList(_0x35170f){const _0x44746b=a141_0x5a51db;return _0x35170f[_0x44746b(0x18a)](',')[_0x44746b(0x188)](_0x5b7cb3=>_0x5b7cb3[_0x44746b(0x16f)]())[_0x44746b(0x1a9)](Boolean);}export function projectRoleRef(_0x78d60d){const _0x45cd0b=a141_0x5a51db;return{'id':_0x78d60d['id'],'roleName':_0x78d60d[_0x45cd0b(0x18f)],'roleType':_0x78d60d[_0x45cd0b(0x1a2)]};}export async function resolvePermitRoles(_0x2ee21d,_0x11bcfd,_0x5c0de3){const _0x150574=a141_0x5a51db,_0x2d829c=await listPermitRoles(_0x2ee21d,{'needSelf':!![],'needPublic':!![]}),_0x2159b0=[];for(const _0xbc3e96 of _0x11bcfd){const _0x119de4=resolveOnePermitRole(_0x2d829c,_0xbc3e96);if(!_0x5c0de3[_0x150574(0x187)]&&_0x119de4[_0x150574(0x1a2)]===_0x150574(0x1b8))throw CliErrors[_0x150574(0x1b3)](_0x150574(0x1b1)+_0x5c0de3[_0x150574(0x1b6)]+'.',_0x150574(0x178));if(!_0x2159b0[_0x150574(0x17a)](_0x2f2cf9=>_0x2f2cf9['id']===_0x119de4['id']))_0x2159b0['push'](_0x119de4);}return _0x2159b0;}function resolveOnePermitRole(_0x1af0f3,_0x30ad1f){const _0x347f0a=a141_0x5a51db,_0xdb8c24=_0x30ad1f['trim'](),_0x289d54=_0xdb8c24[_0x347f0a(0x1ad)]();if(_0x289d54===_0x347f0a(0x1b8)||_0x289d54===_0x347f0a(0x1ab)){const _0x573c52=_0x1af0f3[_0x347f0a(0x17b)](_0x3dfbee=>_0x3dfbee[_0x347f0a(0x1a2)]===_0x289d54);if(!_0x573c52)throw CliErrors[_0x347f0a(0x1b3)](_0x347f0a(0x1a3)+_0x289d54+_0x347f0a(0x170));return _0x573c52;}if(/^-?\d+$/[_0x347f0a(0x1ba)](_0xdb8c24)){const _0x83d1a1=Number(_0xdb8c24),_0x505e57=_0x1af0f3['find'](_0x82fd24=>_0x82fd24['id']===_0x83d1a1);if(!_0x505e57)throw CliErrors[_0x347f0a(0x1b3)](_0x347f0a(0x17f)+_0x83d1a1+_0x347f0a(0x175),_0x347f0a(0x1b5));return _0x505e57;}const _0x5dbe53=_0x1af0f3[_0x347f0a(0x1a9)](_0x3fa08a=>_0x3fa08a[_0x347f0a(0x18f)]===_0xdb8c24);if(_0x5dbe53[_0x347f0a(0x19c)]===0x0)throw CliErrors[_0x347f0a(0x1b3)]('Role\x20\x22'+_0xdb8c24+_0x347f0a(0x18e),_0x347f0a(0x1bb));if(_0x5dbe53[_0x347f0a(0x19c)]>0x1)throw CliErrors[_0x347f0a(0x1b3)]('Role\x20\x22'+_0xdb8c24+'\x22\x20is\x20ambiguous\x20(ids:\x20'+_0x5dbe53[_0x347f0a(0x188)](_0x43fb96=>_0x43fb96['id'])['join'](',\x20')+').',_0x347f0a(0x1a0));return _0x5dbe53[0x0];}export function projectPageSlot(_0x8f3a88){const _0x41c1d1=a141_0x5a51db;if(!_0x8f3a88)return null;return{'resourceCode':_0x8f3a88['resourceCode'],'roles':(_0x8f3a88[_0x41c1d1(0x1c3)]??[])[_0x41c1d1(0x188)](projectRoleRef)};}export function projectPagePermit(_0x1d81af){const _0x24a6df=a141_0x5a51db,_0x21ade7={'menuId':_0x1d81af[_0x24a6df(0x1a6)],'appCode':_0x1d81af[_0x24a6df(0x1be)],'menuPermit':projectPageSlot(_0x1d81af[_0x24a6df(0x180)])};for(const _0x6e6ca6 of PAGE_SLOT_SPECS){if(_0x6e6ca6[_0x24a6df(0x174)]===_0x24a6df(0x180))continue;_0x21ade7[_0x6e6ca6[_0x24a6df(0x174)]]=projectPageSlot(_0x1d81af[_0x6e6ca6['key']]);}return _0x21ade7;}export function flattenMenuResources(_0xf5bd78){const _0x592156=new Map(),_0x438a3b=_0x18ceaf=>{const _0x51ce63=a141_0x50a2;for(const _0x496c60 of _0x18ceaf??[]){_0x592156[_0x51ce63(0x19e)](_0x496c60['resourceCode'],{'resourceCode':_0x496c60[_0x51ce63(0x18b)],'resourceName':_0x496c60[_0x51ce63(0x185)],'action':_0x496c60[_0x51ce63(0x193)]?.[0x0]??'0'});if(_0x496c60[_0x51ce63(0x1af)])_0x438a3b(_0x496c60[_0x51ce63(0x1af)]);}};return _0x438a3b(_0xf5bd78),_0x592156;}export function flattenApiResources(_0x30e902){const _0x23c803=a141_0x5a51db,_0x56d44c=new Map(),_0x11d5ad=new Map();for(const _0x500b1a of _0x30e902){const _0xd727a6=_0x500b1a[_0x23c803(0x1aa)]??{};for(const [_0x4dc51b,_0x3d1649]of Object[_0x23c803(0x16e)](_0xd727a6)){_0x56d44c[_0x23c803(0x19e)](_0x4dc51b,{'resourceCode':_0x4dc51b,'resourceName':_0x500b1a[_0x23c803(0x185)],'datasetCode':_0x500b1a['datasetCode'],'action':_0x3d1649?.[0x0]??'0'});const _0x545bde=_0x11d5ad[_0x23c803(0x19a)](_0x500b1a[_0x23c803(0x1a5)])??[];_0x545bde[_0x23c803(0x194)](_0x4dc51b),_0x11d5ad[_0x23c803(0x19e)](_0x500b1a[_0x23c803(0x1a5)],_0x545bde);}}return{'byCode':_0x56d44c,'byDataset':_0x11d5ad};}export function buildPermits(_0x26418b,_0x7a7b88){const _0x3b7aba={};for(const [_0x84a9e6,_0x380e5a]of _0x26418b){const _0xd6530d=_0x7a7b88['get'](_0x84a9e6)??_0x380e5a['action'];_0x3b7aba[_0x84a9e6]=[_0xd6530d];}return _0x3b7aba;}function a141_0x50a2(_0x55665d,_0x31e248){_0x55665d=_0x55665d-0x16e;const _0x1c209e=a141_0x1c20();let _0x50a2df=_0x1c209e[_0x55665d];return _0x50a2df;}export function readRoleRef(_0x5e3231){const _0xcccbaa=a141_0x5a51db,_0x58e089=_0x5e3231[_0xcccbaa(0x1c2)]('role')['trim']();if(!_0x58e089)throw CliErrors[_0xcccbaa(0x172)](_0xcccbaa(0x1ac),_0xcccbaa(0x181));return _0x58e089;}export function readGrantRevoke(_0x4b90ed){const _0x1531e9=a141_0x5a51db,_0x214b16=_0x4b90ed[_0x1531e9(0x1c8)](_0x1531e9(0x198)),_0x1f8274=_0x4b90ed[_0x1531e9(0x1c8)](_0x1531e9(0x183));if(_0x214b16&&_0x1f8274)throw CliErrors[_0x1531e9(0x1b3)](_0x1531e9(0x1a8));if(!_0x214b16&&!_0x1f8274)throw CliErrors[_0x1531e9(0x1b3)](_0x1531e9(0x184),_0x1531e9(0x1bc));return _0x214b16?_0x1531e9(0x196):'0';}
@@ -1 +1 @@
1
- (function(_0x2bf154,_0xf36968){const _0x47f5c9=a142_0x3d8d,_0x36f24f=_0x2bf154();while(!![]){try{const _0x1d501d=parseInt(_0x47f5c9(0x1cf))/0x1+parseInt(_0x47f5c9(0x1cd))/0x2+-parseInt(_0x47f5c9(0x1db))/0x3+-parseInt(_0x47f5c9(0x1c7))/0x4+-parseInt(_0x47f5c9(0x1c6))/0x5+parseInt(_0x47f5c9(0x1d6))/0x6*(parseInt(_0x47f5c9(0x1c1))/0x7)+parseInt(_0x47f5c9(0x1d0))/0x8;if(_0x1d501d===_0xf36968)break;else _0x36f24f['push'](_0x36f24f['shift']());}catch(_0x3adefc){_0x36f24f['push'](_0x36f24f['shift']());}}}(a142_0x2686,0xdfb5c));import{existsSync}from'node:fs';import a142_0x8f4841 from'node:path';import a142_0x187cfb from'chalk';function a142_0x2686(){const _0x5c4fef=['1819074kdXAtv','Project\x20name:','resolve','7zLBdbH','test','env','√\x20App\x20Code:\x20','No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','8131880IopNqV','6493304rYaRgo','Not\x20set','log','Login\x20failed','green','production','837040rMoPPD','string','112483uiklev','21956104LMuVdN','cyan','√\x20Project\x20Name:\x20','cwd','my-app','Logged\x20in','8981160GBDuUt','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','length','Project\x20name\x20cannot\x20exceed\x2050\x20characters','\x22\x20already\x20exists'];a142_0x2686=function(){return _0x5c4fef;};return a142_0x2686();}function a142_0x3d8d(_0x561889,_0x737bb4){_0x561889=_0x561889-0x1c1;const _0x268644=a142_0x2686();let _0x3d8d82=_0x268644[_0x561889];return _0x3d8d82;}import{input,confirm}from'@inquirer/prompts';import{getIsSessionValid}from'../../../auth/is-session-valid.js';import{authServer}from'../../../auth/auth-server.js';import{readConfig}from'../../../utils/config.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';export async function guidedCreateProject(_0x31e86e,_0x4671ee,_0x19dced){const _0x24c795=a142_0x3d8d,_0xd3f98e=_0x24c795(0x1d4),_0x448664=readConfig(),_0x52b775=typeof _0x448664['env']===_0x24c795(0x1ce)?_0x448664[_0x24c795(0x1c3)]:undefined,_0x130fb2=await input({'message':_0x24c795(0x1dc),'default':_0xd3f98e,'validate':_0x3ac88a=>{const _0x45a916=_0x24c795,_0x418407=_0x3ac88a['trim']()||_0xd3f98e;if(_0x418407[_0x45a916(0x1d8)]>0x32)return _0x45a916(0x1d9);const _0x533d45=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x418407&&!_0x533d45[_0x45a916(0x1c2)](_0x418407))return _0x45a916(0x1d7);const _0x507569=a142_0x8f4841[_0x45a916(0x1dd)](process[_0x45a916(0x1d3)](),_0x418407);if(existsSync(_0x507569))return'Directory\x20\x22'+_0x418407+_0x45a916(0x1da);return!![];}});console[_0x24c795(0x1c9)](a142_0x187cfb[_0x24c795(0x1cb)](_0x24c795(0x1d2)+a142_0x187cfb['cyan'](_0x130fb2)));const _0x35e6ce=await selectSingleAppcode(_0x19dced);console[_0x24c795(0x1c9)](a142_0x187cfb[_0x24c795(0x1cb)](_0x24c795(0x1c4)+a142_0x187cfb[_0x24c795(0x1d1)](_0x35e6ce||_0x24c795(0x1c8))));if(_0x35e6ce){const _0x2b3f1a=await getIsSessionValid();if(!_0x2b3f1a){const _0x491224=await confirm({'message':_0x24c795(0x1c5),'default':!![]});if(_0x491224){const _0x52f4a5=await authServer({'silent':!![]});console['log'](a142_0x187cfb[_0x24c795(0x1cb)]('√\x20Login\x20status:\x20'+a142_0x187cfb[_0x24c795(0x1d1)](_0x52f4a5?_0x24c795(0x1d5):_0x24c795(0x1ca))));}else console['log'](a142_0x187cfb[_0x24c795(0x1cb)]('√\x20Login\x20status:\x20'+a142_0x187cfb[_0x24c795(0x1d1)]('Skipped')));}await _0x31e86e({'projectName':_0x130fb2,'appCode':_0x35e6ce,'env':_0x4671ee||_0x52b775||_0x24c795(0x1cc)});}else await _0x31e86e({'projectName':_0x130fb2,'env':_0x4671ee||_0x52b775||_0x24c795(0x1cc)});}
1
+ (function(_0x2aa2db,_0x26f0d5){const _0x379f91=a142_0x2c7e,_0x3663a5=_0x2aa2db();while(!![]){try{const _0x1addfb=parseInt(_0x379f91(0x1b5))/0x1+-parseInt(_0x379f91(0x1bc))/0x2*(parseInt(_0x379f91(0x1c1))/0x3)+-parseInt(_0x379f91(0x1c0))/0x4+parseInt(_0x379f91(0x1cc))/0x5*(-parseInt(_0x379f91(0x1b8))/0x6)+parseInt(_0x379f91(0x1b4))/0x7+-parseInt(_0x379f91(0x1b1))/0x8+-parseInt(_0x379f91(0x1bb))/0x9*(-parseInt(_0x379f91(0x1c2))/0xa);if(_0x1addfb===_0x26f0d5)break;else _0x3663a5['push'](_0x3663a5['shift']());}catch(_0x9d53ec){_0x3663a5['push'](_0x3663a5['shift']());}}}(a142_0x5905,0xf18bf));function a142_0x2c7e(_0x4f60e7,_0x19c78f){_0x4f60e7=_0x4f60e7-0x1b0;const _0x5905d3=a142_0x5905();let _0x2c7e1b=_0x5905d3[_0x4f60e7];return _0x2c7e1b;}import{existsSync}from'node:fs';import a142_0x18a755 from'node:path';import a142_0x51f8ff 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';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';export async function guidedCreateProject(_0x3b25e5,_0x514511,_0x2b85e6){const _0x51e7ef=a142_0x2c7e,_0x11a2fe=_0x51e7ef(0x1c5),_0x280c8b=readConfig(),_0x25d3af=typeof _0x280c8b[_0x51e7ef(0x1c8)]===_0x51e7ef(0x1ca)?_0x280c8b[_0x51e7ef(0x1c8)]:undefined,_0x27ca6a=await input({'message':_0x51e7ef(0x1be),'default':_0x11a2fe,'validate':_0x2ca37c=>{const _0x48edef=_0x51e7ef,_0x47a09b=_0x2ca37c['trim']()||_0x11a2fe;if(_0x47a09b[_0x48edef(0x1b9)]>0x32)return _0x48edef(0x1b0);const _0x4ae92f=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x47a09b&&!_0x4ae92f['test'](_0x47a09b))return _0x48edef(0x1b7);const _0x321db4=a142_0x18a755[_0x48edef(0x1c6)](process[_0x48edef(0x1b6)](),_0x47a09b);if(existsSync(_0x321db4))return _0x48edef(0x1c3)+_0x47a09b+_0x48edef(0x1b2);return!![];}});console[_0x51e7ef(0x1bf)](a142_0x51f8ff[_0x51e7ef(0x1ba)]('√\x20Project\x20Name:\x20'+a142_0x51f8ff[_0x51e7ef(0x1bd)](_0x27ca6a)));const _0x27a12f=await selectSingleAppcode(_0x2b85e6);console[_0x51e7ef(0x1bf)](a142_0x51f8ff[_0x51e7ef(0x1ba)](_0x51e7ef(0x1cb)+a142_0x51f8ff[_0x51e7ef(0x1bd)](_0x27a12f||_0x51e7ef(0x1cd))));if(_0x27a12f){const _0x3ab756=await getIsSessionValid();if(!_0x3ab756){const _0x4e2dc3=await confirm({'message':'No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','default':!![]});if(_0x4e2dc3){const _0x56e4fc=await authServer({'silent':!![]});console[_0x51e7ef(0x1bf)](a142_0x51f8ff[_0x51e7ef(0x1ba)](_0x51e7ef(0x1c9)+a142_0x51f8ff[_0x51e7ef(0x1bd)](_0x56e4fc?_0x51e7ef(0x1c7):_0x51e7ef(0x1b3))));}else console[_0x51e7ef(0x1bf)](a142_0x51f8ff[_0x51e7ef(0x1ba)]('√\x20Login\x20status:\x20'+a142_0x51f8ff['cyan']('Skipped')));}await _0x3b25e5({'projectName':_0x27ca6a,'appCode':_0x27a12f,'env':_0x514511||_0x25d3af||_0x51e7ef(0x1c4)});}else await _0x3b25e5({'projectName':_0x27ca6a,'env':_0x514511||_0x25d3af||_0x51e7ef(0x1c4)});}function a142_0x5905(){const _0x1dc29d=['Project\x20name:','log','5459212cVAuDb','3iqwVui','2320ruJvMc','Directory\x20\x22','production','my-app','resolve','Logged\x20in','env','√\x20Login\x20status:\x20','string','√\x20App\x20Code:\x20','10eyddJq','Not\x20set','Project\x20name\x20cannot\x20exceed\x2050\x20characters','1721264JFyegQ','\x22\x20already\x20exists','Login\x20failed','13251483bjpJAY','1284826KVwbSF','cwd','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','4905558KgDkBV','length','green','56061jyZojS','837002tsQrfC','cyan'];a142_0x5905=function(){return _0x1dc29d;};return a142_0x5905();}
@@ -1 +1 @@
1
- function a143_0xbcbf(_0x5da6f2,_0x5327b4){_0x5da6f2=_0x5da6f2-0x1b2;const _0xc3b58a=a143_0xc3b5();let _0xbcbf3c=_0xc3b58a[_0x5da6f2];return _0xbcbf3c;}(function(_0x35dd6f,_0x213883){const _0x450203=a143_0xbcbf,_0x322fe5=_0x35dd6f();while(!![]){try{const _0x2d7af6=parseInt(_0x450203(0x1b4))/0x1+-parseInt(_0x450203(0x1b6))/0x2+parseInt(_0x450203(0x1b9))/0x3*(-parseInt(_0x450203(0x1b2))/0x4)+parseInt(_0x450203(0x1be))/0x5*(-parseInt(_0x450203(0x1bd))/0x6)+-parseInt(_0x450203(0x1b5))/0x7*(parseInt(_0x450203(0x1bc))/0x8)+-parseInt(_0x450203(0x1ba))/0x9*(parseInt(_0x450203(0x1bb))/0xa)+parseInt(_0x450203(0x1b7))/0xb;if(_0x2d7af6===_0x213883)break;else _0x322fe5['push'](_0x322fe5['shift']());}catch(_0x11ac56){_0x322fe5['push'](_0x322fe5['shift']());}}}(a143_0xc3b5,0x85431));export function formatElapsed(_0x36d5e7){const _0x569fe1=a143_0xbcbf,_0x52bf07=Date[_0x569fe1(0x1b8)]()-_0x36d5e7;if(_0x52bf07<0x3e8)return _0x52bf07+'ms';const _0x45bc17=(_0x52bf07/0x3e8)['toFixed'](0x2),_0x53ff32=_0x45bc17[_0x569fe1(0x1b3)](/\.?0+$/u,'');return _0x53ff32+'s';}function a143_0xc3b5(){const _0x9a008d=['6261006QhznXP','5fuiTyP','124doseuW','replace','294765nlXyFb','357VMIBlk','204612NhxGUG','34660395uIvjRZ','now','94293bheNTv','2660652IoXGRp','20jiqzTK','29560YXKDWE'];a143_0xc3b5=function(){return _0x9a008d;};return a143_0xc3b5();}
1
+ function a143_0x164e(_0x1e3233,_0x54af0f){_0x1e3233=_0x1e3233-0x15f;const _0x345a15=a143_0x345a();let _0x164eab=_0x345a15[_0x1e3233];return _0x164eab;}(function(_0x4aa6df,_0x59651d){const _0xdd19f2=a143_0x164e,_0x4a59dd=_0x4aa6df();while(!![]){try{const _0x258863=-parseInt(_0xdd19f2(0x16b))/0x1+-parseInt(_0xdd19f2(0x15f))/0x2*(-parseInt(_0xdd19f2(0x168))/0x3)+parseInt(_0xdd19f2(0x16a))/0x4*(parseInt(_0xdd19f2(0x163))/0x5)+-parseInt(_0xdd19f2(0x164))/0x6+-parseInt(_0xdd19f2(0x165))/0x7+-parseInt(_0xdd19f2(0x167))/0x8*(-parseInt(_0xdd19f2(0x166))/0x9)+-parseInt(_0xdd19f2(0x160))/0xa*(-parseInt(_0xdd19f2(0x161))/0xb);if(_0x258863===_0x59651d)break;else _0x4a59dd['push'](_0x4a59dd['shift']());}catch(_0x4de177){_0x4a59dd['push'](_0x4a59dd['shift']());}}}(a143_0x345a,0x38cb2));function a143_0x345a(){const _0x2802d4=['now','11512AuOhiE','85592pKSWxD','87826uUGdRt','70VrFLSr','290972uLEkHQ','replace','20zVvmhw','1992270tgTNaX','2807126RLSBuQ','45aeJgjU','664760ALSvLc','30IQIzEM'];a143_0x345a=function(){return _0x2802d4;};return a143_0x345a();}export function formatElapsed(_0x1770cd){const _0x15ee83=a143_0x164e,_0x3e5106=Date[_0x15ee83(0x169)]()-_0x1770cd;if(_0x3e5106<0x3e8)return _0x3e5106+'ms';const _0x1f2f6c=(_0x3e5106/0x3e8)['toFixed'](0x2),_0x261faf=_0x1f2f6c[_0x15ee83(0x162)](/\.?0+$/u,'');return _0x261faf+'s';}
@@ -1 +1 @@
1
- (function(_0x293d2d,_0x13a56d){const _0x57c380=a144_0x3cd1,_0x5602f4=_0x293d2d();while(!![]){try{const _0x44db98=-parseInt(_0x57c380(0xf6))/0x1+-parseInt(_0x57c380(0xf8))/0x2*(parseInt(_0x57c380(0x112))/0x3)+-parseInt(_0x57c380(0x114))/0x4+-parseInt(_0x57c380(0xfa))/0x5*(-parseInt(_0x57c380(0x12c))/0x6)+-parseInt(_0x57c380(0x118))/0x7*(parseInt(_0x57c380(0x126))/0x8)+parseInt(_0x57c380(0x107))/0x9*(-parseInt(_0x57c380(0xde))/0xa)+parseInt(_0x57c380(0x106))/0xb;if(_0x44db98===_0x13a56d)break;else _0x5602f4['push'](_0x5602f4['shift']());}catch(_0x13f33e){_0x5602f4['push'](_0x5602f4['shift']());}}}(a144_0x4a0d,0x4b81c));function a144_0x4a0d(){const _0x2aa772=['package.json','Project\x20directory\x20','🚀\x20Next\x20Steps:','Project\x20name\x20cannot\x20be\x20empty','1930QesKoV','description','*\x20Configuring\x20AppCode\x20for\x20project\x20','开始创建项目:\x20','info','readFileSync','rmSync','dirname','API\x20configuration\x20pulled:\x20','fail','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','green','currentVersion','cwd','\x20run\x20start','create','projectCode','bold','\x20|\x20Default:\x20','\x20already\x20exists','defaultApp','CLI\x20版本检查','log','463437naFjXw','更新\x20package.json\x20失败','42726XmdwoE','version','5Nrvpuc','gray','modelCount','cookie','Project\x20name:\x20','\x20config\x20set\x20appcode\x20<app-code>\x27','\x20\x202.\x20Pull\x20API\x20configuration:\x20','更新\x20package.json\x20name','utf8','accessSync','项目创建失败:\x20','API\x20配置拉取异常','18648036WuhXUm','4887fphNKU','belowMinimum','√\x20Pulled\x20','\x20&&\x20','stringify','minimumVersion','length','toLocaleString','Install\x20dependencies','join','repeat','75VWttfg','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','1200724FGefUQ','Format\x20code','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','appCode','21gSBvFM','chdir','projectName','constants','\x20dataset(s),\x20generated\x20','string','resolve','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','\x20\x201.\x20Start\x20project:\x20','\x20model(s)','warn','cyan','\x20√\x20','message','373992zDUtwb','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','production','1.0.0','\x20api\x20pull','success','940434ewTPoF','test','existsSync','*\x20Pulling\x20API\x20configuration...','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','cd\x20','start','needsUpgrade','√\x20Configuration\x20file\x20created,\x20Apps:\x20','error','env','parse','stop','\x20|\x20AppCode:\x20'];a144_0x4a0d=function(){return _0x2aa772;};return a144_0x4a0d();}import a144_0x3c4032 from'path';import a144_0x46a771 from'fs';import a144_0x359e50 from'chalk';function a144_0x3cd1(_0x365bb8,_0x23776b){_0x365bb8=_0x365bb8-0xce;const _0x4a0d7b=a144_0x4a0d();let _0x3cd18c=_0x4a0d7b[_0x365bb8];return _0x3cd18c;}import a144_0xbd034 from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{readConfig}from'../../../utils/config.js';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';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(_0x636bd5){const _0x431417=a144_0x3cd1,_0x4dca94=await checkCliVersion();(_0x4dca94[_0x431417(0xd3)]||_0x4dca94[_0x431417(0x108)])&&(printCliUpgradeWarning(_0x4dca94),assertCliVersionSupported(_0x4dca94),logger[_0x431417(0xe2)](_0x431417(0xee),_0x431417(0xf4),{'currentVersion':_0x4dca94[_0x431417(0xeb)],'stableVersion':_0x4dca94['stableVersion'],'minimumVersion':_0x4dca94[_0x431417(0x10c)],'needsUpgrade':_0x4dca94['needsUpgrade'],'belowMinimum':_0x4dca94[_0x431417(0x108)]}));if(_0x636bd5['projectCode']&&_0x636bd5[_0x431417(0x117)])await runCreate({'projectName':_0x636bd5[_0x431417(0xef)],'appCode':_0x636bd5['appCode'],'env':_0x636bd5['env']},_0x636bd5);else{if(_0x636bd5['projectCode']){const _0x38dca5=await selectSingleAppcode(_0x636bd5['cookie']);await runCreate({'projectName':_0x636bd5['projectCode'],'appCode':_0x38dca5||undefined,'env':_0x636bd5['env']},_0x636bd5);}else await guidedCreateProject(_0x1023d2=>runCreate(_0x1023d2,_0x636bd5),_0x636bd5['env'],_0x636bd5['cookie']);}}async function runCreate(_0x567d88,_0x212c1e){const _0x28f3b7=a144_0x3cd1;if(!_0x567d88[_0x28f3b7(0x11a)]||_0x567d88['projectName']['trim']()==='')throw new Error(_0x28f3b7(0xdd));const _0x34efdf=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x34efdf[_0x28f3b7(0x12d)](_0x567d88[_0x28f3b7(0x11a)]))throw new Error(_0x28f3b7(0x127));if(_0x567d88['projectName'][_0x28f3b7(0x10d)]>0x64)throw new Error(_0x28f3b7(0x113));const _0x7823ef=a144_0x3c4032[_0x28f3b7(0x11e)](process[_0x28f3b7(0xec)](),_0x567d88[_0x28f3b7(0x11a)]);if(a144_0x46a771[_0x28f3b7(0xce)](_0x7823ef))throw new Error(_0x28f3b7(0xdb)+_0x567d88[_0x28f3b7(0x11a)]+_0x28f3b7(0xf2));try{a144_0x46a771[_0x28f3b7(0x103)](a144_0x3c4032[_0x28f3b7(0xe5)](_0x7823ef),a144_0x46a771[_0x28f3b7(0x11b)]['W_OK']);}catch{throw new Error(_0x28f3b7(0xe9));}logger['setLogPath'](_0x7823ef),logger['info'](_0x28f3b7(0xee),_0x28f3b7(0xe1)+_0x567d88[_0x28f3b7(0x11a)],{'projectDir':_0x7823ef,'appCode':_0x567d88['appCode']}),console[_0x28f3b7(0xf5)](),console[_0x28f3b7(0xf5)](a144_0x359e50['green'](_0x28f3b7(0x124))+_0x28f3b7(0xfe)+a144_0x359e50['green'](_0x567d88[_0x28f3b7(0x11a)])+(_0x567d88[_0x28f3b7(0x117)]?_0x28f3b7(0xd9)+a144_0x359e50[_0x28f3b7(0x123)](_0x567d88[_0x28f3b7(0x117)]):''));try{await runTask('Copy\x20project\x20files',()=>copyProjectTemplate(_0x567d88['projectName'])),await updatePackageJsonName(_0x567d88['projectName']),await runTask(_0x28f3b7(0x10f),()=>installDependencies(_0x567d88['projectName'])),await runTask(_0x28f3b7(0x115),()=>formatProjectCode(_0x567d88['projectName'])),await configureAppCode(_0x567d88[_0x28f3b7(0x11a)],_0x567d88[_0x28f3b7(0x117)]||'',_0x567d88['env']);let _0x49583b=![];if(_0x567d88[_0x28f3b7(0x117)]){console['log'](_0x28f3b7(0xcf));const _0x9a5942=process['cwd']();try{process[_0x28f3b7(0x119)](_0x7823ef);const _0x431920=_0x567d88['env']||'production';initEnv(_0x431920);const {configArray:_0x50fa21}=await fetchModelList(_0x567d88[_0x28f3b7(0x117)],_0x212c1e[_0x28f3b7(0xfd)]||''),_0x3e06f4=DEFAULT_API_DIR,_0x394717=await generateApiFile(_0x50fa21,'',_0x567d88[_0x28f3b7(0x117)],!![],_0x431920,_0x3e06f4);console['log'](_0x28f3b7(0x109)+_0x50fa21[_0x28f3b7(0x10d)]+_0x28f3b7(0x11c)+_0x394717[_0x28f3b7(0xfc)]+_0x28f3b7(0x121)),logger[_0x28f3b7(0xe2)](_0x28f3b7(0xee),_0x28f3b7(0xe6)+_0x567d88[_0x28f3b7(0x117)]);}catch(_0x10018a){_0x49583b=!![],console['log'](_0x28f3b7(0xe8)),logger[_0x28f3b7(0x122)]('create',_0x28f3b7(0x105),{'error':_0x10018a instanceof Error?_0x10018a[_0x28f3b7(0x125)]:String(_0x10018a)});}finally{process['chdir'](_0x9a5942);}}logger[_0x28f3b7(0x12b)](_0x28f3b7(0xee),'项目创建完成:\x20'+_0x567d88[_0x28f3b7(0x11a)]),console[_0x28f3b7(0xf5)](),console['log'](a144_0x359e50['green']('─'[_0x28f3b7(0x111)](0x3c))),console[_0x28f3b7(0xf5)](a144_0x359e50['cyan']['bold'](_0x28f3b7(0xdc))),console['log'](),console[_0x28f3b7(0xf5)](_0x28f3b7(0x120)+a144_0x359e50[_0x28f3b7(0x123)][_0x28f3b7(0xf0)](_0x28f3b7(0xd1)+_0x567d88[_0x28f3b7(0x11a)]+_0x28f3b7(0x10a)+CLI_BIN_NAME+_0x28f3b7(0xed))),_0x49583b&&console[_0x28f3b7(0xf5)](_0x28f3b7(0x100)+a144_0x359e50[_0x28f3b7(0x123)][_0x28f3b7(0xf0)](CLI_BIN_NAME+_0x28f3b7(0x12a))),console[_0x28f3b7(0xf5)](a144_0x359e50[_0x28f3b7(0xea)]('─'[_0x28f3b7(0x111)](0x3c)));}catch(_0x273ea4){logger['error'](_0x28f3b7(0xee),_0x28f3b7(0x104)+_0x567d88['projectName'],{'error':_0x273ea4 instanceof Error?_0x273ea4[_0x28f3b7(0x125)]:String(_0x273ea4)});try{a144_0x46a771[_0x28f3b7(0xce)](_0x7823ef)&&(console[_0x28f3b7(0xf5)](_0x28f3b7(0x116)+_0x7823ef),a144_0x46a771[_0x28f3b7(0xe4)](_0x7823ef,{'recursive':!![],'force':!![]}));}catch{logger['warn'](_0x28f3b7(0xee),'清理项目目录失败:\x20'+_0x7823ef);}throw _0x273ea4;}}async function runTask(_0x3983bb,_0x3499b5){const _0x2fad7b=a144_0x3cd1,_0x280440=a144_0xbd034(_0x3983bb+'...')[_0x2fad7b(0xd2)]();try{const _0x5e973c=await _0x3499b5();_0x280440[_0x2fad7b(0xd8)](),console[_0x2fad7b(0xf5)](''+a144_0x359e50[_0x2fad7b(0xea)](_0x2fad7b(0x124))+_0x3983bb+'\x20'+a144_0x359e50[_0x2fad7b(0xfb)]('['+_0x5e973c+']'));}catch(_0x38b146){_0x280440[_0x2fad7b(0xe7)](_0x3983bb);throw _0x38b146;}}async function updatePackageJsonName(_0xa5685f){const _0x35a34a=a144_0x3cd1,_0x209627=a144_0x3c4032[_0x35a34a(0x11e)](process[_0x35a34a(0xec)](),_0xa5685f),_0x253536=a144_0x3c4032[_0x35a34a(0x110)](_0x209627,'package.json');try{console['log'](_0x35a34a(0x11f));const _0x3e0bf8=getRabetbaseCliPackageRoot(),_0x4a9cbb=a144_0x3c4032[_0x35a34a(0x110)](_0x3e0bf8,_0x35a34a(0xda));let _0x3a6330='1.0.0';try{const _0x1fe266=JSON['parse'](a144_0x46a771[_0x35a34a(0xe3)](_0x4a9cbb,_0x35a34a(0x102)));_0x3a6330=_0x1fe266[_0x35a34a(0xf9)]||'1.0.0';}catch{}const _0x207371=a144_0x46a771[_0x35a34a(0xe3)](_0x253536,'utf8'),_0x2334fe=JSON[_0x35a34a(0xd7)](_0x207371);_0x2334fe['name']=_0xa5685f,_0x2334fe[_0x35a34a(0xdf)]=_0xa5685f+'\x20Generated\x20by\x20rabetbase\x20cli\x20'+_0x3a6330,a144_0x46a771['writeFileSync'](_0x253536,JSON[_0x35a34a(0x10b)](_0x2334fe,null,0x2)+'\x0a',_0x35a34a(0x102)),console['log']('√\x20package.json\x20updated:\x20name='+_0xa5685f),logger[_0x35a34a(0xe2)]('create',_0x35a34a(0x101));}catch(_0x524d83){logger[_0x35a34a(0xd5)](_0x35a34a(0xee),_0x35a34a(0xf7));throw _0x524d83;}}async function configureAppCode(_0x14a32d,_0x22d8d2,_0xe10fa0){const _0xc165fa=a144_0x3cd1,_0x247fad=a144_0x3c4032[_0xc165fa(0x11e)](process[_0xc165fa(0xec)](),_0x14a32d),_0x3894e8=a144_0x3c4032[_0xc165fa(0x110)](_0x247fad,NEW_CONFIG_NAME);try{_0x22d8d2?console[_0xc165fa(0xf5)](_0xc165fa(0xe0)+_0x14a32d+':\x20'+_0x22d8d2):console[_0xc165fa(0xf5)]('*\x20Creating\x20configuration\x20file\x20for\x20project\x20'+_0x14a32d);const _0x239ac0=getRabetbaseCliPackageRoot(),_0x55527f=a144_0x3c4032[_0xc165fa(0x110)](_0x239ac0,'package.json');let _0x1e5a34=_0xc165fa(0x129);try{const _0x45aa07=JSON[_0xc165fa(0xd7)](a144_0x46a771[_0xc165fa(0xe3)](_0x55527f,'utf8'));_0x1e5a34=_0x45aa07[_0xc165fa(0xf9)]||_0xc165fa(0x129);}catch{}const _0x4713a3=readConfig(),_0x3cedf8=typeof _0x4713a3[_0xc165fa(0xd6)]===_0xc165fa(0x11d)?_0x4713a3[_0xc165fa(0xd6)]:undefined,_0x59dcb5={};for(const _0x171615 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x4713a3[_0x171615]!=null)_0x59dcb5[_0x171615]=_0x4713a3[_0x171615];}const _0x4d97a8=buildCanonicalProjectConfig(_0x59dcb5,{'appCodes':_0x22d8d2?[_0x22d8d2]:[],'env':_0xe10fa0||_0x3cedf8||_0xc165fa(0x128),'metadata':{'createdAt':new Date()[_0xc165fa(0x10e)](),'version':_0x1e5a34}});writeConfigFile(_0x3894e8,_0x4d97a8),_0x22d8d2?console[_0xc165fa(0xf5)](_0xc165fa(0xd4)+Object['keys'](_0x4d97a8['apps']||{})[_0xc165fa(0x110)](',\x20')+_0xc165fa(0xf1)+_0x4d97a8[_0xc165fa(0xf3)]):console[_0xc165fa(0xf5)](_0xc165fa(0xd0)+CLI_BIN_NAME+_0xc165fa(0xff)),logger[_0xc165fa(0xe2)](_0xc165fa(0xee),'配置应用AppCode:\x20'+_0x22d8d2);}catch(_0x289aed){logger[_0xc165fa(0xd5)]('create','配置应用AppCode失败');}}
1
+ (function(_0x574933,_0x5b8b5a){const _0x4fd49b=a144_0x5342,_0xd1d1c3=_0x574933();while(!![]){try{const _0x46fa90=-parseInt(_0x4fd49b(0x1df))/0x1*(parseInt(_0x4fd49b(0x1ab))/0x2)+-parseInt(_0x4fd49b(0x1d0))/0x3*(-parseInt(_0x4fd49b(0x1f4))/0x4)+parseInt(_0x4fd49b(0x1a7))/0x5+-parseInt(_0x4fd49b(0x1e9))/0x6*(-parseInt(_0x4fd49b(0x1a9))/0x7)+-parseInt(_0x4fd49b(0x1eb))/0x8+parseInt(_0x4fd49b(0x1fe))/0x9*(-parseInt(_0x4fd49b(0x1dc))/0xa)+parseInt(_0x4fd49b(0x1f3))/0xb;if(_0x46fa90===_0x5b8b5a)break;else _0xd1d1c3['push'](_0xd1d1c3['shift']());}catch(_0x54db6c){_0xd1d1c3['push'](_0xd1d1c3['shift']());}}}(a144_0x10d6,0xf35b3));import a144_0x5b5b8c from'path';import a144_0x1be16f from'fs';import a144_0x5b15e5 from'chalk';import a144_0xb52b27 from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{readConfig}from'../../../utils/config.js';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';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_0x10d6(){const _0x599137=['bold','message','√\x20Configuration\x20file\x20created,\x20Apps:\x20','API\x20configuration\x20pulled:\x20','green','readFileSync','配置应用AppCode:\x20','3639kOaotm','*\x20Pulling\x20API\x20configuration...','log','success','writeFileSync','resolve','env','cd\x20','cyan','\x20run\x20start','join','stop','40NEwcRe','\x20api\x20pull','\x20\x201.\x20Start\x20project:\x20','701ztyDZv','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','needsUpgrade','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','cookie','constants','modelCount','warn','stringify','清理项目目录失败:\x20','21636lwvWkt','create','12973144KWqKRd','√\x20Pulled\x20','rmSync','toLocaleString','production','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','\x20config\x20set\x20appcode\x20<app-code>\x27','开始创建项目:\x20','7936973JUPQfZ','5384iDINwB','配置应用AppCode失败','info','\x20already\x20exists','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','package.json','version','\x20Generated\x20by\x20rabetbase\x20cli\x20','更新\x20package.json\x20失败','Project\x20name\x20cannot\x20be\x20empty','558153ugpvcG','√\x20package.json\x20updated:\x20name=','projectName','1.0.0','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','appCode','string','1536600KyGIAG','utf8','1183LZooLh','\x20dataset(s),\x20generated\x20','1154eoGtEQ','repeat','trim','fail','\x20|\x20AppCode:\x20','dirname','parse','项目创建完成:\x20','\x20|\x20Default:\x20','\x20model(s)','accessSync','currentVersion','existsSync','error','belowMinimum','更新\x20package.json\x20name','项目创建失败:\x20','cwd','apps','length','description','\x20√\x20','*\x20Configuring\x20AppCode\x20for\x20project\x20','projectCode','Copy\x20project\x20files','chdir','stableVersion','Format\x20code','W_OK','...'];a144_0x10d6=function(){return _0x599137;};return a144_0x10d6();}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(_0x5b5b17){const _0x5c2c08=a144_0x5342,_0x453ecc=await checkCliVersion();(_0x453ecc[_0x5c2c08(0x1e1)]||_0x453ecc[_0x5c2c08(0x1b9)])&&(printCliUpgradeWarning(_0x453ecc),assertCliVersionSupported(_0x453ecc),logger[_0x5c2c08(0x1f6)](_0x5c2c08(0x1ea),'CLI\x20版本检查',{'currentVersion':_0x453ecc[_0x5c2c08(0x1b6)],'stableVersion':_0x453ecc[_0x5c2c08(0x1c5)],'minimumVersion':_0x453ecc['minimumVersion'],'needsUpgrade':_0x453ecc[_0x5c2c08(0x1e1)],'belowMinimum':_0x453ecc[_0x5c2c08(0x1b9)]}));if(_0x5b5b17[_0x5c2c08(0x1c2)]&&_0x5b5b17[_0x5c2c08(0x1a5)])await runCreate({'projectName':_0x5b5b17[_0x5c2c08(0x1c2)],'appCode':_0x5b5b17[_0x5c2c08(0x1a5)],'env':_0x5b5b17[_0x5c2c08(0x1d6)]},_0x5b5b17);else{if(_0x5b5b17[_0x5c2c08(0x1c2)]){const _0xa91339=await selectSingleAppcode(_0x5b5b17[_0x5c2c08(0x1e3)]);await runCreate({'projectName':_0x5b5b17[_0x5c2c08(0x1c2)],'appCode':_0xa91339||undefined,'env':_0x5b5b17[_0x5c2c08(0x1d6)]},_0x5b5b17);}else await guidedCreateProject(_0x5946d1=>runCreate(_0x5946d1,_0x5b5b17),_0x5b5b17['env'],_0x5b5b17['cookie']);}}async function runCreate(_0x5b6684,_0x51dbb2){const _0x4fc16a=a144_0x5342;if(!_0x5b6684[_0x4fc16a(0x200)]||_0x5b6684[_0x4fc16a(0x200)][_0x4fc16a(0x1ad)]()==='')throw new Error(_0x4fc16a(0x1fd));const _0x890b8f=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x890b8f['test'](_0x5b6684[_0x4fc16a(0x200)]))throw new Error('Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters');if(_0x5b6684[_0x4fc16a(0x200)][_0x4fc16a(0x1be)]>0x64)throw new Error(_0x4fc16a(0x1f0));const _0x31d034=a144_0x5b5b8c[_0x4fc16a(0x1d5)](process[_0x4fc16a(0x1bc)](),_0x5b6684['projectName']);if(a144_0x1be16f[_0x4fc16a(0x1b7)](_0x31d034))throw new Error('Project\x20directory\x20'+_0x5b6684[_0x4fc16a(0x200)]+_0x4fc16a(0x1f7));try{a144_0x1be16f[_0x4fc16a(0x1b5)](a144_0x5b5b8c[_0x4fc16a(0x1b0)](_0x31d034),a144_0x1be16f[_0x4fc16a(0x1e4)][_0x4fc16a(0x1c7)]);}catch{throw new Error(_0x4fc16a(0x1e0));}logger['setLogPath'](_0x31d034),logger[_0x4fc16a(0x1f6)]('create',_0x4fc16a(0x1f2)+_0x5b6684[_0x4fc16a(0x200)],{'projectDir':_0x31d034,'appCode':_0x5b6684[_0x4fc16a(0x1a5)]}),console[_0x4fc16a(0x1d2)](),console[_0x4fc16a(0x1d2)](a144_0x5b15e5[_0x4fc16a(0x1cd)](_0x4fc16a(0x1c0))+'Project\x20name:\x20'+a144_0x5b15e5['green'](_0x5b6684['projectName'])+(_0x5b6684['appCode']?_0x4fc16a(0x1af)+a144_0x5b15e5[_0x4fc16a(0x1d8)](_0x5b6684[_0x4fc16a(0x1a5)]):''));try{await runTask(_0x4fc16a(0x1c3),()=>copyProjectTemplate(_0x5b6684[_0x4fc16a(0x200)])),await updatePackageJsonName(_0x5b6684[_0x4fc16a(0x200)]),await runTask('Install\x20dependencies',()=>installDependencies(_0x5b6684[_0x4fc16a(0x200)])),await runTask(_0x4fc16a(0x1c6),()=>formatProjectCode(_0x5b6684[_0x4fc16a(0x200)])),await configureAppCode(_0x5b6684[_0x4fc16a(0x200)],_0x5b6684[_0x4fc16a(0x1a5)]||'',_0x5b6684['env']);let _0x18ebc4=![];if(_0x5b6684['appCode']){console['log'](_0x4fc16a(0x1d1));const _0x1aa258=process[_0x4fc16a(0x1bc)]();try{process[_0x4fc16a(0x1c4)](_0x31d034);const _0x4a4bae=_0x5b6684[_0x4fc16a(0x1d6)]||_0x4fc16a(0x1ef);initEnv(_0x4a4bae);const {configArray:_0x577a69}=await fetchModelList(_0x5b6684[_0x4fc16a(0x1a5)],_0x51dbb2[_0x4fc16a(0x1e3)]||''),_0x43c1a3=DEFAULT_API_DIR,_0x257bc0=await generateApiFile(_0x577a69,'',_0x5b6684[_0x4fc16a(0x1a5)],!![],_0x4a4bae,_0x43c1a3);console[_0x4fc16a(0x1d2)](_0x4fc16a(0x1ec)+_0x577a69['length']+_0x4fc16a(0x1aa)+_0x257bc0[_0x4fc16a(0x1e5)]+_0x4fc16a(0x1b4)),logger[_0x4fc16a(0x1f6)]('create',_0x4fc16a(0x1cc)+_0x5b6684[_0x4fc16a(0x1a5)]);}catch(_0x37af60){_0x18ebc4=!![],console[_0x4fc16a(0x1d2)]('!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull'),logger[_0x4fc16a(0x1e6)](_0x4fc16a(0x1ea),'API\x20配置拉取异常',{'error':_0x37af60 instanceof Error?_0x37af60[_0x4fc16a(0x1ca)]:String(_0x37af60)});}finally{process[_0x4fc16a(0x1c4)](_0x1aa258);}}logger[_0x4fc16a(0x1d3)](_0x4fc16a(0x1ea),_0x4fc16a(0x1b2)+_0x5b6684[_0x4fc16a(0x200)]),console[_0x4fc16a(0x1d2)](),console[_0x4fc16a(0x1d2)](a144_0x5b15e5[_0x4fc16a(0x1cd)]('─'['repeat'](0x3c))),console[_0x4fc16a(0x1d2)](a144_0x5b15e5[_0x4fc16a(0x1d8)][_0x4fc16a(0x1c9)]('🚀\x20Next\x20Steps:')),console[_0x4fc16a(0x1d2)](),console[_0x4fc16a(0x1d2)](_0x4fc16a(0x1de)+a144_0x5b15e5[_0x4fc16a(0x1d8)][_0x4fc16a(0x1c9)](_0x4fc16a(0x1d7)+_0x5b6684['projectName']+'\x20&&\x20'+CLI_BIN_NAME+_0x4fc16a(0x1d9))),_0x18ebc4&&console['log']('\x20\x202.\x20Pull\x20API\x20configuration:\x20'+a144_0x5b15e5[_0x4fc16a(0x1d8)][_0x4fc16a(0x1c9)](CLI_BIN_NAME+_0x4fc16a(0x1dd))),console['log'](a144_0x5b15e5[_0x4fc16a(0x1cd)]('─'[_0x4fc16a(0x1ac)](0x3c)));}catch(_0xc316ee){logger[_0x4fc16a(0x1b8)](_0x4fc16a(0x1ea),_0x4fc16a(0x1bb)+_0x5b6684[_0x4fc16a(0x200)],{'error':_0xc316ee instanceof Error?_0xc316ee[_0x4fc16a(0x1ca)]:String(_0xc316ee)});try{a144_0x1be16f[_0x4fc16a(0x1b7)](_0x31d034)&&(console['log'](_0x4fc16a(0x1e2)+_0x31d034),a144_0x1be16f[_0x4fc16a(0x1ed)](_0x31d034,{'recursive':!![],'force':!![]}));}catch{logger['warn'](_0x4fc16a(0x1ea),_0x4fc16a(0x1e8)+_0x31d034);}throw _0xc316ee;}}async function runTask(_0x20d27c,_0x21506c){const _0x325e49=a144_0x5342,_0x3abf14=a144_0xb52b27(_0x20d27c+_0x325e49(0x1c8))['start']();try{const _0xf04088=await _0x21506c();_0x3abf14[_0x325e49(0x1db)](),console[_0x325e49(0x1d2)](''+a144_0x5b15e5[_0x325e49(0x1cd)]('\x20√\x20')+_0x20d27c+'\x20'+a144_0x5b15e5['gray']('['+_0xf04088+']'));}catch(_0x2db4c0){_0x3abf14[_0x325e49(0x1ae)](_0x20d27c);throw _0x2db4c0;}}function a144_0x5342(_0x3e2542,_0xb7d420){_0x3e2542=_0x3e2542-0x1a3;const _0x10d678=a144_0x10d6();let _0x534240=_0x10d678[_0x3e2542];return _0x534240;}async function updatePackageJsonName(_0x4ebbed){const _0x24a7db=a144_0x5342,_0x363429=a144_0x5b5b8c['resolve'](process[_0x24a7db(0x1bc)](),_0x4ebbed),_0x436277=a144_0x5b5b8c[_0x24a7db(0x1da)](_0x363429,_0x24a7db(0x1f9));try{console[_0x24a7db(0x1d2)]('*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields');const _0x2a9b45=getRabetbaseCliPackageRoot(),_0x2ad307=a144_0x5b5b8c[_0x24a7db(0x1da)](_0x2a9b45,_0x24a7db(0x1f9));let _0x1645e2='1.0.0';try{const _0x514084=JSON[_0x24a7db(0x1b1)](a144_0x1be16f[_0x24a7db(0x1ce)](_0x2ad307,_0x24a7db(0x1a8)));_0x1645e2=_0x514084['version']||_0x24a7db(0x1a3);}catch{}const _0x38c592=a144_0x1be16f[_0x24a7db(0x1ce)](_0x436277,_0x24a7db(0x1a8)),_0xdaa805=JSON[_0x24a7db(0x1b1)](_0x38c592);_0xdaa805['name']=_0x4ebbed,_0xdaa805[_0x24a7db(0x1bf)]=_0x4ebbed+_0x24a7db(0x1fb)+_0x1645e2,a144_0x1be16f[_0x24a7db(0x1d4)](_0x436277,JSON[_0x24a7db(0x1e7)](_0xdaa805,null,0x2)+'\x0a',_0x24a7db(0x1a8)),console[_0x24a7db(0x1d2)](_0x24a7db(0x1ff)+_0x4ebbed),logger[_0x24a7db(0x1f6)](_0x24a7db(0x1ea),_0x24a7db(0x1ba));}catch(_0x19b7fc){logger[_0x24a7db(0x1b8)](_0x24a7db(0x1ea),_0x24a7db(0x1fc));throw _0x19b7fc;}}async function configureAppCode(_0x331972,_0x1a736e,_0x1581c9){const _0x374890=a144_0x5342,_0x59dd0b=a144_0x5b5b8c[_0x374890(0x1d5)](process[_0x374890(0x1bc)](),_0x331972),_0x5b83ea=a144_0x5b5b8c['join'](_0x59dd0b,NEW_CONFIG_NAME);try{_0x1a736e?console[_0x374890(0x1d2)](_0x374890(0x1c1)+_0x331972+':\x20'+_0x1a736e):console[_0x374890(0x1d2)](_0x374890(0x1a4)+_0x331972);const _0x88d990=getRabetbaseCliPackageRoot(),_0x2f35dd=a144_0x5b5b8c[_0x374890(0x1da)](_0x88d990,_0x374890(0x1f9));let _0xf2725c=_0x374890(0x1a3);try{const _0x372175=JSON[_0x374890(0x1b1)](a144_0x1be16f[_0x374890(0x1ce)](_0x2f35dd,_0x374890(0x1a8)));_0xf2725c=_0x372175[_0x374890(0x1fa)]||'1.0.0';}catch{}const _0x163940=readConfig(),_0x15a9e1=typeof _0x163940[_0x374890(0x1d6)]===_0x374890(0x1a6)?_0x163940[_0x374890(0x1d6)]:undefined,_0x1ba429={};for(const _0x22ffc9 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x163940[_0x22ffc9]!=null)_0x1ba429[_0x22ffc9]=_0x163940[_0x22ffc9];}const _0x37fc9b=buildCanonicalProjectConfig(_0x1ba429,{'appCodes':_0x1a736e?[_0x1a736e]:[],'env':_0x1581c9||_0x15a9e1||_0x374890(0x1ef),'metadata':{'createdAt':new Date()[_0x374890(0x1ee)](),'version':_0xf2725c}});writeConfigFile(_0x5b83ea,_0x37fc9b),_0x1a736e?console[_0x374890(0x1d2)](_0x374890(0x1cb)+Object['keys'](_0x37fc9b[_0x374890(0x1bd)]||{})[_0x374890(0x1da)](',\x20')+_0x374890(0x1b3)+_0x37fc9b['defaultApp']):console['log'](_0x374890(0x1f8)+CLI_BIN_NAME+_0x374890(0x1f1)),logger[_0x374890(0x1f6)](_0x374890(0x1ea),_0x374890(0x1cf)+_0x1a736e);}catch(_0x5de106){logger[_0x374890(0x1b8)](_0x374890(0x1ea),_0x374890(0x1f5));}}
@@ -1 +1 @@
1
- (function(_0x37394d,_0x293f3f){const _0x437fb2=a145_0x2484,_0x35112a=_0x37394d();while(!![]){try{const _0x3cb264=parseInt(_0x437fb2(0x79))/0x1+-parseInt(_0x437fb2(0x9b))/0x2+parseInt(_0x437fb2(0x99))/0x3+parseInt(_0x437fb2(0x90))/0x4+-parseInt(_0x437fb2(0xa1))/0x5+-parseInt(_0x437fb2(0x89))/0x6+-parseInt(_0x437fb2(0x73))/0x7;if(_0x3cb264===_0x293f3f)break;else _0x35112a['push'](_0x35112a['shift']());}catch(_0x3863e6){_0x35112a['push'](_0x35112a['shift']());}}}(a145_0x4f43,0x449f5));function a145_0x4f43(){const _0x4bf6c1=['\x20\x20Installing\x20dependencies...','\x0a\x20\x20cd\x20','*\x20Creating\x20project\x20','bun\x20--version','1109156gvGixu','\x20created\x20successfully!','env','belowMinimum','\x20\x20√\x20Configuration\x20file\x20created','test','\x20\x20rabetbase\x20run\x20start\x0a','join','\x22\x20already\x20exists.','1343193IGWZRO','parse','815504agNMaK','access','\x20\x20√\x20Pulled\x20','Use\x20a\x20different\x20project\x20name.','dirname','\x20\x20√\x20package.json\x20updated','1028710kzGRRP','validation','\x20\x20√\x20Code\x20formatted','Project\x20directory\x20\x22','description','Check\x20directory\x20permissions.','needsUpgrade','name','modelCount','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','1315027RxtGta','trim','writeFile','W_OK','length','\x20model(s)','533803WtwGTf','bun\x20run\x20format','log','\x20dataset(s),\x20generated\x20','bun','\x20api\x20pull`\x20manually\x20later.','production','utf-8','cwd','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','\x20\x20Pulling\x20API\x20configuration...','chdir','constants','npm','ignore','\x20\x20√\x20Project\x20template\x20created','1058346XUiiAE','resolve','package.json'];a145_0x4f43=function(){return _0x4bf6c1;};return a145_0x4f43();}import a145_0x207977 from'path';function a145_0x2484(_0x2f9e9f,_0x5ced21){_0x2f9e9f=_0x2f9e9f-0x6f;const _0x4f436a=a145_0x4f43();let _0x2484a4=_0x4f436a[_0x2f9e9f];return _0x2484a4;}import a145_0x45ebc2 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';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(_0x34cfad,_0xb88516,_0x2e4480,_0xce8433){const _0x3be9bf=a145_0x2484,_0x40f0ae=await checkCliVersion();(_0x40f0ae[_0x3be9bf(0xa7)]||_0x40f0ae[_0x3be9bf(0x93)])&&(printCliUpgradeWarning(_0x40f0ae),assertCliVersionSupported(_0x40f0ae));if(!_0x34cfad||_0x34cfad[_0x3be9bf(0x74)]()==='')throw CliErrors[_0x3be9bf(0xa2)]('Project\x20name\x20cannot\x20be\x20empty.');const _0x1bbddd=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x1bbddd[_0x3be9bf(0x95)](_0x34cfad))throw CliErrors[_0x3be9bf(0xa2)]('Project\x20name\x20contains\x20invalid\x20characters.','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters');if(_0x34cfad[_0x3be9bf(0x77)]>0x64)throw CliErrors[_0x3be9bf(0xa2)](_0x3be9bf(0x72));const _0x3343f1=a145_0x207977[_0x3be9bf(0x8a)](process[_0x3be9bf(0x81)](),_0x34cfad);if(existsSync(_0x3343f1))throw CliErrors[_0x3be9bf(0xa2)](_0x3be9bf(0xa4)+_0x34cfad+_0x3be9bf(0x98),_0x3be9bf(0x9e));try{const _0x2982c0=a145_0x207977[_0x3be9bf(0x9f)](_0x3343f1);await a145_0x45ebc2[_0x3be9bf(0x9c)](_0x2982c0,a145_0x45ebc2[_0x3be9bf(0x85)][_0x3be9bf(0x76)]);}catch{throw CliErrors[_0x3be9bf(0xa2)]('Cannot\x20create\x20project\x20in\x20current\x20directory.',_0x3be9bf(0xa6));}try{console[_0x3be9bf(0x7b)](_0x3be9bf(0x8e)+_0x34cfad+'...');const _0x46c59b=getSubAppReactDemoTemplateDir();await copyDirectory(_0x46c59b,_0x3343f1),console[_0x3be9bf(0x7b)](_0x3be9bf(0x88)),await updatePackageJsonName(_0x34cfad),console[_0x3be9bf(0x7b)](_0x3be9bf(0xa0)),console[_0x3be9bf(0x7b)](_0x3be9bf(0x8c)),console[_0x3be9bf(0x7b)]('\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)'),await formatCode(_0x3343f1),console[_0x3be9bf(0x7b)](_0x3be9bf(0xa3)),await configureProject(_0x34cfad,_0x2e4480,_0xb88516),console[_0x3be9bf(0x7b)](_0x3be9bf(0x94)),_0x2e4480&&await pullApiConfig(_0x3343f1,_0x2e4480,_0xb88516,_0xce8433),console['log']('\x0a√\x20Project\x20'+_0x34cfad+_0x3be9bf(0x91)),console['log'](_0x3be9bf(0x8d)+_0x34cfad),console['log'](_0x3be9bf(0x96));}catch(_0x172739){try{existsSync(_0x3343f1)&&await a145_0x45ebc2['rm'](_0x3343f1,{'recursive':!![],'force':!![]});}catch{}throw _0x172739;}}async function updatePackageJsonName(_0x201787){const _0x29edd4=a145_0x2484,_0x12baf6=a145_0x207977['resolve'](process[_0x29edd4(0x81)](),_0x201787),_0x241b5d=a145_0x207977[_0x29edd4(0x97)](_0x12baf6,_0x29edd4(0x8b)),_0x5b4895=await a145_0x45ebc2['readFile'](_0x241b5d,_0x29edd4(0x80)),_0x35f260=JSON[_0x29edd4(0x9a)](_0x5b4895);_0x35f260[_0x29edd4(0x6f)]=_0x201787,_0x35f260[_0x29edd4(0xa5)]=_0x29edd4(0x82),await a145_0x45ebc2[_0x29edd4(0x75)](_0x241b5d,JSON['stringify'](_0x35f260,null,0x2)+'\x0a');}function detectPackageManager(){const _0x1a92a0=a145_0x2484;try{return execSync(_0x1a92a0(0x8f),{'stdio':_0x1a92a0(0x87)}),_0x1a92a0(0x7d);}catch{return _0x1a92a0(0x86);}}async function formatCode(_0x4bb51a){const _0x552d1d=a145_0x2484;try{await execAsync(_0x552d1d(0x7a),{'cwd':_0x4bb51a});}catch{}}async function configureProject(_0x2005bc,_0x48b659,_0x59ea3b){const _0x1484b0=a145_0x2484,_0x2e3eca=a145_0x207977['resolve'](process[_0x1484b0(0x81)](),_0x2005bc),_0x309a2b=a145_0x207977[_0x1484b0(0x97)](_0x2e3eca,NEW_CONFIG_NAME),_0x222eee=readConfig(),_0x122be7=typeof _0x222eee[_0x1484b0(0x92)]==='string'?_0x222eee[_0x1484b0(0x92)]:undefined,_0x191821={};for(const _0x2211a7 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x222eee[_0x2211a7]!=null)_0x191821[_0x2211a7]=_0x222eee[_0x2211a7];}const _0x344f55=buildCanonicalProjectConfig(_0x191821,{'appCodes':_0x48b659?[_0x48b659]:[],'env':_0x59ea3b||_0x122be7||_0x1484b0(0x7f),'metadata':{'createdAt':new Date()['toLocaleString'](),'version':getCliVersion()}});writeConfigFile(_0x309a2b,_0x344f55);}async function pullApiConfig(_0x201b51,_0x23b2d6,_0x2a84b8,_0x693285){const _0x218249=a145_0x2484,_0x532fbf=process[_0x218249(0x81)]();try{process[_0x218249(0x84)](_0x201b51);const _0xc9d96a=_0x2a84b8||_0x218249(0x7f);initEnv(_0xc9d96a),console[_0x218249(0x7b)](_0x218249(0x83));const {configArray:_0x36583d}=await fetchModelList(_0x23b2d6,_0x693285||''),_0x3f0651=await generateApiFile(_0x36583d,'',_0x23b2d6,!![],_0xc9d96a,DEFAULT_API_DIR);console[_0x218249(0x7b)](_0x218249(0x9d)+_0x36583d[_0x218249(0x77)]+_0x218249(0x7c)+_0x3f0651[_0x218249(0x70)]+_0x218249(0x78));}catch(_0x4d9ef6){console[_0x218249(0x7b)](_0x218249(0x71)+CLI_BIN_NAME+_0x218249(0x7e));}finally{process[_0x218249(0x84)](_0x532fbf);}}
1
+ (function(_0x196d1a,_0x220168){const _0x3831da=a145_0x5738,_0x2f61a5=_0x196d1a();while(!![]){try{const _0x241871=parseInt(_0x3831da(0x149))/0x1+parseInt(_0x3831da(0x150))/0x2+parseInt(_0x3831da(0x14f))/0x3*(-parseInt(_0x3831da(0x158))/0x4)+parseInt(_0x3831da(0x130))/0x5+parseInt(_0x3831da(0x142))/0x6+parseInt(_0x3831da(0x15c))/0x7+-parseInt(_0x3831da(0x157))/0x8;if(_0x241871===_0x220168)break;else _0x2f61a5['push'](_0x2f61a5['shift']());}catch(_0x443f3c){_0x2f61a5['push'](_0x2f61a5['shift']());}}}(a145_0x3565,0x1cb22));import a145_0x273473 from'path';import a145_0x107fa9 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';function a145_0x5738(_0x4e6f12,_0xb22611){_0x4e6f12=_0x4e6f12-0x123;const _0x356543=a145_0x3565();let _0x57383b=_0x356543[_0x4e6f12];return _0x57383b;}import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{readConfig}from'../../../utils/config.js';import{getCliVersion}from'../../../utils/version.js';import{CliErrors}from'../../../errors.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';function a145_0x3565(){const _0x564d4d=['*\x20Creating\x20project\x20','access','bun\x20run\x20format','\x20\x20√\x20Project\x20template\x20created','\x20created\x20successfully!','bun\x20--version','parse','\x20model(s)','readFile','log','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','\x20\x20√\x20package.json\x20updated','\x20\x20Installing\x20dependencies...','name','455635VmdmRZ','Check\x20directory\x20permissions.','Use\x20a\x20different\x20project\x20name.','description','npm','join','test','ignore','Project\x20name\x20contains\x20invalid\x20characters.','needsUpgrade','env','resolve','Cannot\x20create\x20project\x20in\x20current\x20directory.','string','constants','production','\x20dataset(s),\x20generated\x20','length','544662JCmtfk','trim','belowMinimum','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','writeFile','Project\x20name\x20cannot\x20be\x20empty.','88565QHdbGr','\x22\x20already\x20exists.','toLocaleString','stringify','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','chdir','139962vmPFzo','70722ceZFQb','\x20\x20Pulling\x20API\x20configuration...','W_OK','cwd','\x0a√\x20Project\x20','validation','\x20\x20√\x20Configuration\x20file\x20created','1488216IoYuXI','16dPcwgR','bun','\x20\x20√\x20Pulled\x20','utf-8','1290457cWIWxe','\x20api\x20pull`\x20manually\x20later.','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters'];a145_0x3565=function(){return _0x564d4d;};return a145_0x3565();}const execAsync=promisify(exec);export async function createProjectNonInteractive(_0x33845e,_0x42657b,_0x5622e9,_0x3709fa){const _0x240dc9=a145_0x5738,_0x540e5e=await checkCliVersion();(_0x540e5e[_0x240dc9(0x139)]||_0x540e5e[_0x240dc9(0x144)])&&(printCliUpgradeWarning(_0x540e5e),assertCliVersionSupported(_0x540e5e));if(!_0x33845e||_0x33845e[_0x240dc9(0x143)]()==='')throw CliErrors[_0x240dc9(0x155)](_0x240dc9(0x148));const _0x71ef61=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x71ef61[_0x240dc9(0x136)](_0x33845e))throw CliErrors['validation'](_0x240dc9(0x138),_0x240dc9(0x15e));if(_0x33845e[_0x240dc9(0x141)]>0x64)throw CliErrors[_0x240dc9(0x155)](_0x240dc9(0x146));const _0x2ff391=a145_0x273473[_0x240dc9(0x13b)](process[_0x240dc9(0x153)](),_0x33845e);if(existsSync(_0x2ff391))throw CliErrors[_0x240dc9(0x155)]('Project\x20directory\x20\x22'+_0x33845e+_0x240dc9(0x14a),_0x240dc9(0x132));try{const _0x359148=a145_0x273473['dirname'](_0x2ff391);await a145_0x107fa9[_0x240dc9(0x123)](_0x359148,a145_0x107fa9[_0x240dc9(0x13e)][_0x240dc9(0x152)]);}catch{throw CliErrors[_0x240dc9(0x155)](_0x240dc9(0x13c),_0x240dc9(0x131));}try{console[_0x240dc9(0x12b)](_0x240dc9(0x15f)+_0x33845e+'...');const _0x104a7e=getSubAppReactDemoTemplateDir();await copyDirectory(_0x104a7e,_0x2ff391),console[_0x240dc9(0x12b)](_0x240dc9(0x125)),await updatePackageJsonName(_0x33845e),console[_0x240dc9(0x12b)](_0x240dc9(0x12d)),console[_0x240dc9(0x12b)](_0x240dc9(0x12e)),console['log'](_0x240dc9(0x12c)),await formatCode(_0x2ff391),console[_0x240dc9(0x12b)]('\x20\x20√\x20Code\x20formatted'),await configureProject(_0x33845e,_0x5622e9,_0x42657b),console[_0x240dc9(0x12b)](_0x240dc9(0x156)),_0x5622e9&&await pullApiConfig(_0x2ff391,_0x5622e9,_0x42657b,_0x3709fa),console[_0x240dc9(0x12b)](_0x240dc9(0x154)+_0x33845e+_0x240dc9(0x126)),console['log']('\x0a\x20\x20cd\x20'+_0x33845e),console[_0x240dc9(0x12b)]('\x20\x20rabetbase\x20run\x20start\x0a');}catch(_0x118366){try{existsSync(_0x2ff391)&&await a145_0x107fa9['rm'](_0x2ff391,{'recursive':!![],'force':!![]});}catch{}throw _0x118366;}}async function updatePackageJsonName(_0x50441e){const _0x4a6313=a145_0x5738,_0x43b222=a145_0x273473[_0x4a6313(0x13b)](process[_0x4a6313(0x153)](),_0x50441e),_0x27d56d=a145_0x273473['join'](_0x43b222,'package.json'),_0x305a74=await a145_0x107fa9[_0x4a6313(0x12a)](_0x27d56d,_0x4a6313(0x15b)),_0x4a3d09=JSON[_0x4a6313(0x128)](_0x305a74);_0x4a3d09[_0x4a6313(0x12f)]=_0x50441e,_0x4a3d09[_0x4a6313(0x133)]=_0x4a6313(0x14d),await a145_0x107fa9[_0x4a6313(0x147)](_0x27d56d,JSON[_0x4a6313(0x14c)](_0x4a3d09,null,0x2)+'\x0a');}function detectPackageManager(){const _0x3ad731=a145_0x5738;try{return execSync(_0x3ad731(0x127),{'stdio':_0x3ad731(0x137)}),_0x3ad731(0x159);}catch{return _0x3ad731(0x134);}}async function formatCode(_0x4dff56){const _0x124134=a145_0x5738;try{await execAsync(_0x124134(0x124),{'cwd':_0x4dff56});}catch{}}async function configureProject(_0x1fe05d,_0x9f265a,_0x5eacfa){const _0x37942a=a145_0x5738,_0x2962f0=a145_0x273473[_0x37942a(0x13b)](process[_0x37942a(0x153)](),_0x1fe05d),_0x5c1e40=a145_0x273473[_0x37942a(0x135)](_0x2962f0,NEW_CONFIG_NAME),_0x56f8ef=readConfig(),_0x3f4b81=typeof _0x56f8ef[_0x37942a(0x13a)]===_0x37942a(0x13d)?_0x56f8ef[_0x37942a(0x13a)]:undefined,_0xfd5c4e={};for(const _0x505b5b of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x56f8ef[_0x505b5b]!=null)_0xfd5c4e[_0x505b5b]=_0x56f8ef[_0x505b5b];}const _0x4219c2=buildCanonicalProjectConfig(_0xfd5c4e,{'appCodes':_0x9f265a?[_0x9f265a]:[],'env':_0x5eacfa||_0x3f4b81||_0x37942a(0x13f),'metadata':{'createdAt':new Date()[_0x37942a(0x14b)](),'version':getCliVersion()}});writeConfigFile(_0x5c1e40,_0x4219c2);}async function pullApiConfig(_0x38fe1b,_0x278150,_0x5df1f1,_0x45a02c){const _0x1aeca2=a145_0x5738,_0x2bc184=process[_0x1aeca2(0x153)]();try{process['chdir'](_0x38fe1b);const _0x3317aa=_0x5df1f1||'production';initEnv(_0x3317aa),console['log'](_0x1aeca2(0x151));const {configArray:_0x464886}=await fetchModelList(_0x278150,_0x45a02c||''),_0x21b787=await generateApiFile(_0x464886,'',_0x278150,!![],_0x3317aa,DEFAULT_API_DIR);console[_0x1aeca2(0x12b)](_0x1aeca2(0x15a)+_0x464886['length']+_0x1aeca2(0x140)+_0x21b787['modelCount']+_0x1aeca2(0x129));}catch(_0x425288){console[_0x1aeca2(0x12b)](_0x1aeca2(0x145)+CLI_BIN_NAME+_0x1aeca2(0x15d));}finally{process[_0x1aeca2(0x14e)](_0x2bc184);}}
@@ -1 +1 @@
1
- const a146_0x12fc40=a146_0x3e4e;function a146_0x3e4e(_0xfc162e,_0x2b3ba6){_0xfc162e=_0xfc162e-0x13d;const _0x31e6b0=a146_0x31e6();let _0x3e4e0a=_0x31e6b0[_0xfc162e];return _0x3e4e0a;}(function(_0x1a9276,_0x3c379a){const _0x297001=a146_0x3e4e,_0x11b5d4=_0x1a9276();while(!![]){try{const _0x7e383f=parseInt(_0x297001(0x14b))/0x1+parseInt(_0x297001(0x140))/0x2+parseInt(_0x297001(0x143))/0x3*(-parseInt(_0x297001(0x141))/0x4)+parseInt(_0x297001(0x13f))/0x5*(-parseInt(_0x297001(0x13d))/0x6)+parseInt(_0x297001(0x13e))/0x7*(parseInt(_0x297001(0x142))/0x8)+-parseInt(_0x297001(0x144))/0x9+-parseInt(_0x297001(0x14c))/0xa*(-parseInt(_0x297001(0x14a))/0xb);if(_0x7e383f===_0x3c379a)break;else _0x11b5d4['push'](_0x11b5d4['shift']());}catch(_0x5d94cf){_0x11b5d4['push'](_0x11b5d4['shift']());}}}(a146_0x31e6,0xe559e));import a146_0x1c2d5f from'node:path';import{fileURLToPath}from'node:url';const __dirname=a146_0x1c2d5f[a146_0x12fc40(0x149)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x505382=a146_0x12fc40;return a146_0x1c2d5f['resolve'](__dirname,_0x505382(0x148));}function a146_0x31e6(){const _0x21fd12=['40jyzmKS','3qpcTZu','11770767GgvKIi','join','templates','projects','../../../../','dirname','17052695PKYjBO','488428BglEzh','10VlBoRP','6256038rgHmJY','1546279OtLfOs','5GeoSLE','613274NKNxsV','639348MVuHGZ'];a146_0x31e6=function(){return _0x21fd12;};return a146_0x31e6();}export function getSubAppReactDemoTemplateDir(){const _0x1ce859=a146_0x12fc40;return a146_0x1c2d5f[_0x1ce859(0x145)](getRabetbaseCliPackageRoot(),_0x1ce859(0x146),_0x1ce859(0x147),'sub-app-react-demo');}
1
+ function a146_0x3734(){const _0x1d0aad=['join','sub-app-react-demo','4549520DDlXEu','59885DUOgaV','1814174UsOsba','30iOjJeS','824862ToTNmC','2718848dprrWa','1452aZURGs','templates','7482699ZuazYu','7575DPSVvw','../../../../'];a146_0x3734=function(){return _0x1d0aad;};return a146_0x3734();}(function(_0xf14d62,_0x4eb0f1){const _0x1addad=a146_0x440d,_0x379979=_0xf14d62();while(!![]){try{const _0x1665a7=parseInt(_0x1addad(0x14d))/0x1+parseInt(_0x1addad(0x14b))/0x2+parseInt(_0x1addad(0x145))/0x3*(-parseInt(_0x1addad(0x142))/0x4)+parseInt(_0x1addad(0x149))/0x5+-parseInt(_0x1addad(0x14c))/0x6*(-parseInt(_0x1addad(0x14a))/0x7)+-parseInt(_0x1addad(0x141))/0x8+-parseInt(_0x1addad(0x144))/0x9;if(_0x1665a7===_0x4eb0f1)break;else _0x379979['push'](_0x379979['shift']());}catch(_0x27ba7b){_0x379979['push'](_0x379979['shift']());}}}(a146_0x3734,0x91b32));import a146_0x919a4b from'node:path';function a146_0x440d(_0x3261ea,_0x553f22){_0x3261ea=_0x3261ea-0x141;const _0x3734ac=a146_0x3734();let _0x440dcc=_0x3734ac[_0x3261ea];return _0x440dcc;}import{fileURLToPath}from'node:url';const __dirname=a146_0x919a4b['dirname'](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x59f2b3=a146_0x440d;return a146_0x919a4b['resolve'](__dirname,_0x59f2b3(0x146));}export function getSubAppReactDemoTemplateDir(){const _0x4cf7db=a146_0x440d;return a146_0x919a4b[_0x4cf7db(0x147)](getRabetbaseCliPackageRoot(),_0x4cf7db(0x143),'projects',_0x4cf7db(0x148));}
@@ -1 +1 @@
1
- (function(_0x3ef672,_0x5969e2){const _0x27b3b9=a147_0x4d92,_0x24b7f4=_0x3ef672();while(!![]){try{const _0x2148b1=-parseInt(_0x27b3b9(0x198))/0x1+-parseInt(_0x27b3b9(0x18f))/0x2*(parseInt(_0x27b3b9(0x18e))/0x3)+parseInt(_0x27b3b9(0x193))/0x4+parseInt(_0x27b3b9(0x18d))/0x5*(parseInt(_0x27b3b9(0x192))/0x6)+parseInt(_0x27b3b9(0x196))/0x7*(parseInt(_0x27b3b9(0x18c))/0x8)+-parseInt(_0x27b3b9(0x19b))/0x9*(parseInt(_0x27b3b9(0x194))/0xa)+parseInt(_0x27b3b9(0x18b))/0xb*(parseInt(_0x27b3b9(0x19c))/0xc);if(_0x2148b1===_0x5969e2)break;else _0x24b7f4['push'](_0x24b7f4['shift']());}catch(_0x1d3ba4){_0x24b7f4['push'](_0x24b7f4['shift']());}}}(a147_0x1044,0x7a530));import a147_0x5d2895 from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a147_0x4d92(_0x1b2611,_0x2d820a){_0x1b2611=_0x1b2611-0x189;const _0x104486=a147_0x1044();let _0x4d922c=_0x104486[_0x1b2611];return _0x4d922c;}import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();function a147_0x1044(){const _0x48e6ea=['3fBoQeh','1891262UOmsFn','info','copy','947478yEutyO','2051680BRnXxC','10GVYcQf','项目模板复制失败','45066DuJemI','项目模板复制完成','577314RcGdBC','success','error','650772JfjCCI','72jJZEiT','now','resolve','889438xXggxd','776gFUQRh','15cEHCUE'];a147_0x1044=function(){return _0x48e6ea;};return a147_0x1044();}export async function copyProjectTemplate(_0x4dc5b0){const _0xd3b9ca=a147_0x4d92,_0x21b45b=Date['now'](),_0x22cf73=a147_0x5d2895[_0xd3b9ca(0x18a)](process['cwd'](),_0x4dc5b0);try{logger[_0xd3b9ca(0x190)](_0xd3b9ca(0x191),'开始复制项目模板',{'projectCode':_0x4dc5b0,'templateDir':templateDir}),await copyDirectory(templateDir,_0x22cf73);const _0x1cb944=Date[_0xd3b9ca(0x189)]()-_0x21b45b;logger[_0xd3b9ca(0x199)]('copy',_0xd3b9ca(0x197),_0x1cb944,{'projectCode':_0x4dc5b0});}catch(_0x5d647a){const _0x1c9f07=Date[_0xd3b9ca(0x189)]()-_0x21b45b;logger[_0xd3b9ca(0x19a)](_0xd3b9ca(0x191),_0xd3b9ca(0x195),{'projectCode':_0x4dc5b0,'error':_0x5d647a instanceof Error?_0x5d647a['message']:String(_0x5d647a),'duration':_0x1c9f07});throw _0x5d647a;}return formatElapsed(_0x21b45b);}
1
+ (function(_0x90efe4,_0x55fc96){const _0x1865b8=a147_0x3a2c,_0x540b20=_0x90efe4();while(!![]){try{const _0x5a4149=-parseInt(_0x1865b8(0xa7))/0x1+parseInt(_0x1865b8(0x9e))/0x2*(parseInt(_0x1865b8(0xa5))/0x3)+parseInt(_0x1865b8(0xa1))/0x4*(-parseInt(_0x1865b8(0xa0))/0x5)+parseInt(_0x1865b8(0xa6))/0x6*(-parseInt(_0x1865b8(0x9f))/0x7)+-parseInt(_0x1865b8(0xa3))/0x8+-parseInt(_0x1865b8(0xab))/0x9*(-parseInt(_0x1865b8(0xa9))/0xa)+parseInt(_0x1865b8(0xaa))/0xb;if(_0x5a4149===_0x55fc96)break;else _0x540b20['push'](_0x540b20['shift']());}catch(_0x5540a1){_0x540b20['push'](_0x540b20['shift']());}}}(a147_0x40b5,0x2a0db));import a147_0x1db64c from'node:path';function a147_0x3a2c(_0xfa7ff8,_0x58f731){_0xfa7ff8=_0xfa7ff8-0x9d;const _0x40b5d2=a147_0x40b5();let _0x3a2cf0=_0x40b5d2[_0xfa7ff8];return _0x3a2cf0;}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(_0x4d0942){const _0x5411f7=a147_0x3a2c,_0x505c6f=Date[_0x5411f7(0xae)](),_0x2e2dbf=a147_0x1db64c[_0x5411f7(0x9d)](process[_0x5411f7(0xac)](),_0x4d0942);try{logger['info']('copy',_0x5411f7(0xad),{'projectCode':_0x4d0942,'templateDir':templateDir}),await copyDirectory(templateDir,_0x2e2dbf);const _0x24ff90=Date['now']()-_0x505c6f;logger['success'](_0x5411f7(0xa4),_0x5411f7(0xa2),_0x24ff90,{'projectCode':_0x4d0942});}catch(_0xbaef06){const _0x107c63=Date[_0x5411f7(0xae)]()-_0x505c6f;logger[_0x5411f7(0xa8)](_0x5411f7(0xa4),'项目模板复制失败',{'projectCode':_0x4d0942,'error':_0xbaef06 instanceof Error?_0xbaef06['message']:String(_0xbaef06),'duration':_0x107c63});throw _0xbaef06;}return formatElapsed(_0x505c6f);}function a147_0x40b5(){const _0x1dc414=['开始复制项目模板','now','resolve','505826seMdya','34762kuFxcD','339695TNSWVJ','16jfRcKQ','项目模板复制完成','634344JSjunP','copy','3Foxwed','264dYUkME','132589KjGQpT','error','80xUXrSw','6340488tsgeQv','50706JkmLHj','cwd'];a147_0x40b5=function(){return _0x1dc414;};return a147_0x40b5();}
@@ -1 +1 @@
1
- (function(_0xbf509f,_0x1376b9){const _0x27098b=a148_0xec35,_0x1edaf1=_0xbf509f();while(!![]){try{const _0x330d6f=-parseInt(_0x27098b(0xc4))/0x1*(-parseInt(_0x27098b(0xb6))/0x2)+parseInt(_0x27098b(0xbd))/0x3*(-parseInt(_0x27098b(0xca))/0x4)+parseInt(_0x27098b(0xb4))/0x5*(parseInt(_0x27098b(0xc3))/0x6)+-parseInt(_0x27098b(0xc5))/0x7*(parseInt(_0x27098b(0xb5))/0x8)+parseInt(_0x27098b(0xbb))/0x9*(-parseInt(_0x27098b(0xb7))/0xa)+parseInt(_0x27098b(0xb3))/0xb+parseInt(_0x27098b(0xc7))/0xc;if(_0x330d6f===_0x1376b9)break;else _0x1edaf1['push'](_0x1edaf1['shift']());}catch(_0x28407b){_0x1edaf1['push'](_0x1edaf1['shift']());}}}(a148_0x246b,0x6e06d));function a148_0xec35(_0x11b990,_0x16d568){_0x11b990=_0x11b990-0xb3;const _0x246bf8=a148_0x246b();let _0xec35e3=_0x246bf8[_0x11b990];return _0xec35e3;}import a148_0x3f893e from'node:path';function a148_0x246b(){const _0x4437eb=['prettier','now','2639205ntYaTK','info','10089toSFlc','开始格式化代码','success','message','resolve','--write','6KMCARf','171206YBosra','7EGOynt','npx','25005060TjrAbR','error','cwd','468ihNMba','2607341xkQAJa','379720mZutIN','6752488HRlrXq','2gRtzCL','30zKGvdL','format'];a148_0x246b=function(){return _0x4437eb;};return a148_0x246b();}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(_0xea9754){const _0x58e5fd=a148_0xec35,_0x228772=Date[_0x58e5fd(0xba)](),_0x27bc6a=a148_0x3f893e[_0x58e5fd(0xc1)](process[_0x58e5fd(0xc9)](),_0xea9754);try{logger[_0x58e5fd(0xbc)](_0x58e5fd(0xb8),_0x58e5fd(0xbe),{'projectCode':_0xea9754}),await execa(resolveNpmBin(_0x58e5fd(0xc6)),[_0x58e5fd(0xb9),_0x58e5fd(0xc2),'.'],{'cwd':_0x27bc6a});const _0x16204a=Date[_0x58e5fd(0xba)]()-_0x228772;logger[_0x58e5fd(0xbf)]('format','代码格式化完成',_0x16204a,{'projectCode':_0xea9754});}catch(_0x57549a){const _0x41dc68=Date[_0x58e5fd(0xba)]()-_0x228772;logger[_0x58e5fd(0xc8)](_0x58e5fd(0xb8),'代码格式化失败',{'projectCode':_0xea9754,'error':_0x57549a instanceof Error?_0x57549a[_0x58e5fd(0xc0)]:String(_0x57549a),'duration':_0x41dc68});throw _0x57549a;}return formatElapsed(_0x228772);}
1
+ (function(_0x1ec87f,_0x168f08){const _0x3053f4=a148_0x3974,_0x479cf6=_0x1ec87f();while(!![]){try{const _0xcf34f8=parseInt(_0x3053f4(0xaa))/0x1+-parseInt(_0x3053f4(0xa6))/0x2+-parseInt(_0x3053f4(0xb3))/0x3+-parseInt(_0x3053f4(0xb1))/0x4+parseInt(_0x3053f4(0xab))/0x5+parseInt(_0x3053f4(0xac))/0x6+-parseInt(_0x3053f4(0xb9))/0x7*(-parseInt(_0x3053f4(0xa5))/0x8);if(_0xcf34f8===_0x168f08)break;else _0x479cf6['push'](_0x479cf6['shift']());}catch(_0x2050b8){_0x479cf6['push'](_0x479cf6['shift']());}}}(a148_0x2386,0x7e65a));function a148_0x3974(_0x4976c8,_0x3f4844){_0x4976c8=_0x4976c8-0xa4;const _0x2386d2=a148_0x2386();let _0x39745a=_0x2386d2[_0x4976c8];return _0x39745a;}import a148_0x23ffa4 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';function a148_0x2386(){const _0x4bb110=['cwd','代码格式化失败','代码格式化完成','1855756gGqFHG','success','2513229BfTHHi','message','now','--write','resolve','error','18305nhGkpK','prettier','5808turupR','1670410yyZYPo','npx','format','info','560250fDqxJX','941195FfyUJb','45780bwMrnk','开始格式化代码'];a148_0x2386=function(){return _0x4bb110;};return a148_0x2386();}export async function formatProjectCode(_0x2fc823){const _0x47fe62=a148_0x3974,_0x190dad=Date[_0x47fe62(0xb5)](),_0x59270a=a148_0x23ffa4[_0x47fe62(0xb7)](process[_0x47fe62(0xae)](),_0x2fc823);try{logger[_0x47fe62(0xa9)](_0x47fe62(0xa8),_0x47fe62(0xad),{'projectCode':_0x2fc823}),await execa(resolveNpmBin(_0x47fe62(0xa7)),[_0x47fe62(0xa4),_0x47fe62(0xb6),'.'],{'cwd':_0x59270a});const _0x2f1272=Date[_0x47fe62(0xb5)]()-_0x190dad;logger[_0x47fe62(0xb2)](_0x47fe62(0xa8),_0x47fe62(0xb0),_0x2f1272,{'projectCode':_0x2fc823});}catch(_0x638b52){const _0xd052a2=Date[_0x47fe62(0xb5)]()-_0x190dad;logger[_0x47fe62(0xb8)]('format',_0x47fe62(0xaf),{'projectCode':_0x2fc823,'error':_0x638b52 instanceof Error?_0x638b52[_0x47fe62(0xb4)]:String(_0x638b52),'duration':_0xd052a2});throw _0x638b52;}return formatElapsed(_0x190dad);}
@@ -1 +1 @@
1
- function a149_0x35f5(_0x429f85,_0x45a28d){_0x429f85=_0x429f85-0x17a;const _0x40ce2f=a149_0x40ce();let _0x35f574=_0x40ce2f[_0x429f85];return _0x35f574;}(function(_0x11fd23,_0x3fca2a){const _0x2787ea=a149_0x35f5,_0x1569f0=_0x11fd23();while(!![]){try{const _0x2dee68=parseInt(_0x2787ea(0x17b))/0x1+-parseInt(_0x2787ea(0x189))/0x2*(parseInt(_0x2787ea(0x185))/0x3)+-parseInt(_0x2787ea(0x17d))/0x4+parseInt(_0x2787ea(0x188))/0x5+-parseInt(_0x2787ea(0x18c))/0x6+-parseInt(_0x2787ea(0x17c))/0x7*(parseInt(_0x2787ea(0x18e))/0x8)+parseInt(_0x2787ea(0x17a))/0x9;if(_0x2dee68===_0x3fca2a)break;else _0x1569f0['push'](_0x1569f0['shift']());}catch(_0x37fd43){_0x1569f0['push'](_0x1569f0['shift']());}}}(a149_0x40ce,0x93f3b));import a149_0x4b4908 from'node:path';import{execa}from'execa';function a149_0x40ce(){const _0x41acbb=['1942644gKVIOa','now','npm','resolve','https://registry.npmmirror.com','install','success','cwd','525DCjTkf','message','开始安装依赖','816150iQDoEd','9762qrSBhf','依赖安装失败','--registry','309186hXLrrX','info','3235448xinhDR','11211174uuBxYR','992893QmyLBg','7sgXeDn'];a149_0x40ce=function(){return _0x41acbb;};return a149_0x40ce();}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0xa2b3bb){const _0x3aeff6=a149_0x35f5,_0x16c8e6=Date[_0x3aeff6(0x17e)](),_0x4ca5df=a149_0x4b4908[_0x3aeff6(0x180)](process[_0x3aeff6(0x184)](),_0xa2b3bb);try{logger[_0x3aeff6(0x18d)](_0x3aeff6(0x182),_0x3aeff6(0x187),{'projectCode':_0xa2b3bb,'registry':_0x3aeff6(0x181)}),await execa(resolveNpmBin(_0x3aeff6(0x17f)),[_0x3aeff6(0x182),_0x3aeff6(0x18b),_0x3aeff6(0x181)],{'cwd':_0x4ca5df});const _0x3fbada=Date[_0x3aeff6(0x17e)]()-_0x16c8e6;logger[_0x3aeff6(0x183)](_0x3aeff6(0x182),'依赖安装完成',_0x3fbada,{'projectCode':_0xa2b3bb});}catch(_0x3a471a){const _0x2a67e4=Date[_0x3aeff6(0x17e)]()-_0x16c8e6;logger['error'](_0x3aeff6(0x182),_0x3aeff6(0x18a),{'projectCode':_0xa2b3bb,'error':_0x3a471a instanceof Error?_0x3a471a[_0x3aeff6(0x186)]:String(_0x3a471a),'duration':_0x2a67e4});throw _0x3a471a;}return formatElapsed(_0x16c8e6);}
1
+ function a149_0x1756(){const _0x135339=['message','10EjlDSR','8274cqmuEL','1696961YJGeGn','开始安装依赖','info','npm','288860HRiZTu','依赖安装失败','依赖安装完成','1005273OrHJpr','error','1653504MJWsOI','--registry','https://registry.npmmirror.com','733260ZFGqBh','install','success','121966lhagLF','now'];a149_0x1756=function(){return _0x135339;};return a149_0x1756();}(function(_0x3bcd97,_0x52667e){const _0x3a0dc7=a149_0x24f4,_0xda2def=_0x3bcd97();while(!![]){try{const _0x2fef74=parseInt(_0x3a0dc7(0x18c))/0x1+parseInt(_0x3a0dc7(0x181))/0x2+-parseInt(_0x3a0dc7(0x184))/0x3+-parseInt(_0x3a0dc7(0x189))/0x4+-parseInt(_0x3a0dc7(0x18f))/0x5*(-parseInt(_0x3a0dc7(0x190))/0x6)+parseInt(_0x3a0dc7(0x17d))/0x7+parseInt(_0x3a0dc7(0x186))/0x8;if(_0x2fef74===_0x52667e)break;else _0xda2def['push'](_0xda2def['shift']());}catch(_0x572118){_0xda2def['push'](_0xda2def['shift']());}}}(a149_0x1756,0x30cb3));import a149_0x4d17e1 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';function a149_0x24f4(_0x57d36a,_0x43ec90){_0x57d36a=_0x57d36a-0x17d;const _0x1756a0=a149_0x1756();let _0x24f46d=_0x1756a0[_0x57d36a];return _0x24f46d;}export async function installDependencies(_0x5345d1){const _0x12062f=a149_0x24f4,_0x25f1b7=Date[_0x12062f(0x18d)](),_0x9151de=a149_0x4d17e1['resolve'](process['cwd'](),_0x5345d1);try{logger[_0x12062f(0x17f)](_0x12062f(0x18a),_0x12062f(0x17e),{'projectCode':_0x5345d1,'registry':_0x12062f(0x188)}),await execa(resolveNpmBin(_0x12062f(0x180)),['install',_0x12062f(0x187),_0x12062f(0x188)],{'cwd':_0x9151de});const _0x123783=Date[_0x12062f(0x18d)]()-_0x25f1b7;logger[_0x12062f(0x18b)](_0x12062f(0x18a),_0x12062f(0x183),_0x123783,{'projectCode':_0x5345d1});}catch(_0x517df9){const _0x20c565=Date[_0x12062f(0x18d)]()-_0x25f1b7;logger[_0x12062f(0x185)]('install',_0x12062f(0x182),{'projectCode':_0x5345d1,'error':_0x517df9 instanceof Error?_0x517df9[_0x12062f(0x18e)]:String(_0x517df9),'duration':_0x20c565});throw _0x517df9;}return formatElapsed(_0x25f1b7);}
@@ -1 +1 @@
1
- const a150_0x97f2de=a150_0x84e0;(function(_0xcd4331,_0x1293b2){const _0x142806=a150_0x84e0,_0x1524b9=_0xcd4331();while(!![]){try{const _0x9b73b8=parseInt(_0x142806(0x1b2))/0x1*(-parseInt(_0x142806(0x1bd))/0x2)+parseInt(_0x142806(0x1c4))/0x3*(parseInt(_0x142806(0x1b9))/0x4)+-parseInt(_0x142806(0x1bb))/0x5*(-parseInt(_0x142806(0x1d6))/0x6)+parseInt(_0x142806(0x1ca))/0x7*(parseInt(_0x142806(0x1c2))/0x8)+parseInt(_0x142806(0x1c8))/0x9+-parseInt(_0x142806(0x1b1))/0xa*(-parseInt(_0x142806(0x1c0))/0xb)+-parseInt(_0x142806(0x1d8))/0xc*(parseInt(_0x142806(0x1c3))/0xd);if(_0x9b73b8===_0x1293b2)break;else _0x1524b9['push'](_0x1524b9['shift']());}catch(_0x1fb317){_0x1524b9['push'](_0x1524b9['shift']());}}}(a150_0x1aab,0xc8e82));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{initConfig}from'../../commands/project/init.js';import{upgradeApp}from'../../commands/project/upgrade.js';const initFlags=[{'name':a150_0x97f2de(0x1d4),'type':a150_0x97f2de(0x1db),'description':a150_0x97f2de(0x1cc)},{'name':a150_0x97f2de(0x1ae),'type':'string','description':a150_0x97f2de(0x1c7)},{'name':a150_0x97f2de(0x1b8),'type':a150_0x97f2de(0x1b6),'description':a150_0x97f2de(0x1d3),'default':![]}],createFlags=[{'name':a150_0x97f2de(0x1b0),'type':a150_0x97f2de(0x1db),'description':a150_0x97f2de(0x1d7)},{'name':'env','type':a150_0x97f2de(0x1db),'description':a150_0x97f2de(0x1c7)},{'name':a150_0x97f2de(0x1d4),'type':a150_0x97f2de(0x1db),'description':a150_0x97f2de(0x1da)}],upgradeFlags=[{'name':'yes','type':a150_0x97f2de(0x1b6),'description':a150_0x97f2de(0x1b3),'default':![]}];function a150_0x84e0(_0x2cf804,_0x2587eb){_0x2cf804=_0x2cf804-0x1ad;const _0x1aab2a=a150_0x1aab();let _0x84e005=_0x1aab2a[_0x2cf804];return _0x84e005;}export const projectDefinitions=[{'service':a150_0x97f2de(0x1be),'command':a150_0x97f2de(0x1d1),'description':a150_0x97f2de(0x1c5),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+a150_0x97f2de(0x1d5),'since':a150_0x97f2de(0x1c1)},'flags':initFlags,async 'execute'(_0xefed39){const _0x28e188=a150_0x97f2de;return await initConfig({'appcode':_0xefed39[_0x28e188(0x1cf)](_0x28e188(0x1d4))||undefined,'env':_0xefed39[_0x28e188(0x1cf)](_0x28e188(0x1ae))||undefined,'autoYes':_0xefed39[_0x28e188(0x1ad)](_0x28e188(0x1b8))}),{'ok':!![]};}},{'service':a150_0x97f2de(0x1be),'command':a150_0x97f2de(0x1c6),'description':a150_0x97f2de(0x1d0),'risk':a150_0x97f2de(0x1cb),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'project-name','description':a150_0x97f2de(0x1b7),'required':![]}],'flags':createFlags,async 'execute'(_0x2ebbf8){const _0x35df79=a150_0x97f2de,{createApp:_0x493a6c}=await import(_0x35df79(0x1c9)),{createProjectNonInteractive:_0x1e23dd}=await import('../../commands/project/create/non-interactive.js'),_0x12b014=_0x2ebbf8[_0x35df79(0x1cf)](_0x35df79(0x1b0))[_0x35df79(0x1d2)]()||_0x2ebbf8[_0x35df79(0x1ce)][0x0]?.[_0x35df79(0x1d2)](),_0x4e652f=_0x2ebbf8[_0x35df79(0x1cf)](_0x35df79(0x1ae))||undefined,_0x2891dc=_0x2ebbf8[_0x35df79(0x1cf)](_0x35df79(0x1d4))||undefined;if(_0x2ebbf8[_0x35df79(0x1bf)]){if(!_0x12b014)throw CliErrors[_0x35df79(0x1bc)](_0x35df79(0x1b5),_0x35df79(0x1ba)+CLI_BIN_NAME+_0x35df79(0x1cd));await _0x1e23dd(_0x12b014,_0x4e652f,_0x2891dc,_0x2ebbf8[_0x35df79(0x1af)]);}else await _0x493a6c({'projectCode':_0x12b014,'appCode':_0x2891dc,'env':_0x4e652f,'cookie':_0x2ebbf8[_0x35df79(0x1af)]});return{'ok':!![]};}},{'service':a150_0x97f2de(0x1be),'command':a150_0x97f2de(0x1b4),'description':a150_0x97f2de(0x1d9),'risk':a150_0x97f2de(0x1cb),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0xd49635){const _0x13b9bd=a150_0x97f2de;return await upgradeApp(_0xd49635[_0x13b9bd(0x1bf)],{'yes':_0xd49635[_0x13b9bd(0x1ad)](_0x13b9bd(0x1b8))}),{'ok':!![]};}}];function a150_0x1aab(){const _0x1d14a5=['21MgZJiy','write','App\x20code\x20to\x20initialize','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','args','str','Create\x20a\x20new\x20project','init','trim','Auto-confirm\x20prompts','appcode','\x20workspace\x20init','4043400UFBgRO','Project\x20name','2917272NIsmeI','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','string','bool','env','cookie','name','24660RGfcDh','3361VnYUUq','Skip\x20confirmation\x20prompt','upgrade','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','boolean','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','yes','442996wVRZCE','Usage:\x20','10wbMXek','validation','636FFYoea','project','nonInteractive','6963xdAqvp','2026-07','3931864TOaPiK','169GLjGQC','6zCdNvC','Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','create','Target\x20environment','4026285VASWHY','../../commands/project/create/main.js'];a150_0x1aab=function(){return _0x1d14a5;};return a150_0x1aab();}
1
+ function a150_0x31d9(){const _0x6e4065=['Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','27895570RPLIFj','trim','write','../../commands/project/create/main.js','206187nOrRmo','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','Usage:\x20','string','str','2026-07','9VARLiL','../../commands/project/create/non-interactive.js','nonInteractive','project','1674184KAIenz','bool','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','596033BQyAmP','cookie','6gYHZKa','Target\x20environment','upgrade','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','project-name','env','App\x20code\x20to\x20initialize','Auto-confirm\x20prompts','args','Create\x20a\x20new\x20project','name','4031699kgjWPa','appcode','6292780NLaejO','yes','2WXSQGt','2378760SIDkZl','boolean','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','Project\x20name'];a150_0x31d9=function(){return _0x6e4065;};return a150_0x31d9();}const a150_0x365a1a=a150_0xbdd1;(function(_0x8f3eaa,_0x280415){const _0xb291bf=a150_0xbdd1,_0x12bac8=_0x8f3eaa();while(!![]){try{const _0x3b0b3e=parseInt(_0xb291bf(0x1ee))/0x1*(-parseInt(_0xb291bf(0x1d7))/0x2)+-parseInt(_0xb291bf(0x1e1))/0x3+-parseInt(_0xb291bf(0x1d8))/0x4+-parseInt(_0xb291bf(0x1d5))/0x5+-parseInt(_0xb291bf(0x1f0))/0x6*(-parseInt(_0xb291bf(0x1fb))/0x7)+-parseInt(_0xb291bf(0x1eb))/0x8*(parseInt(_0xb291bf(0x1e7))/0x9)+parseInt(_0xb291bf(0x1dd))/0xa;if(_0x3b0b3e===_0x280415)break;else _0x12bac8['push'](_0x12bac8['shift']());}catch(_0x2acf51){_0x12bac8['push'](_0x12bac8['shift']());}}}(a150_0x31d9,0x9bd19));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{initConfig}from'../../commands/project/init.js';function a150_0xbdd1(_0x15ef4b,_0x44afab){_0x15ef4b=_0x15ef4b-0x1d4;const _0x31d921=a150_0x31d9();let _0xbdd1f6=_0x31d921[_0x15ef4b];return _0xbdd1f6;}import{upgradeApp}from'../../commands/project/upgrade.js';const initFlags=[{'name':a150_0x365a1a(0x1d4),'type':a150_0x365a1a(0x1e4),'description':a150_0x365a1a(0x1f6)},{'name':a150_0x365a1a(0x1f5),'type':a150_0x365a1a(0x1e4),'description':a150_0x365a1a(0x1f1)},{'name':a150_0x365a1a(0x1d6),'type':'boolean','description':a150_0x365a1a(0x1f7),'default':![]}],createFlags=[{'name':'name','type':a150_0x365a1a(0x1e4),'description':a150_0x365a1a(0x1db)},{'name':'env','type':a150_0x365a1a(0x1e4),'description':a150_0x365a1a(0x1f1)},{'name':'appcode','type':a150_0x365a1a(0x1e4),'description':a150_0x365a1a(0x1ed)}],upgradeFlags=[{'name':a150_0x365a1a(0x1d6),'type':a150_0x365a1a(0x1d9),'description':'Skip\x20confirmation\x20prompt','default':![]}];export const projectDefinitions=[{'service':a150_0x365a1a(0x1ea),'command':'init','description':'Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+'\x20workspace\x20init','since':a150_0x365a1a(0x1e6)},'flags':initFlags,async 'execute'(_0x4d0dac){const _0x223bb4=a150_0x365a1a;return await initConfig({'appcode':_0x4d0dac[_0x223bb4(0x1e5)](_0x223bb4(0x1d4))||undefined,'env':_0x4d0dac[_0x223bb4(0x1e5)]('env')||undefined,'autoYes':_0x4d0dac[_0x223bb4(0x1ec)](_0x223bb4(0x1d6))}),{'ok':!![]};}},{'service':a150_0x365a1a(0x1ea),'command':'create','description':a150_0x365a1a(0x1f9),'risk':a150_0x365a1a(0x1df),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a150_0x365a1a(0x1f4),'description':a150_0x365a1a(0x1da),'required':![]}],'flags':createFlags,async 'execute'(_0x51832c){const _0x55aa56=a150_0x365a1a,{createApp:_0x162034}=await import(_0x55aa56(0x1e0)),{createProjectNonInteractive:_0x98ca80}=await import(_0x55aa56(0x1e8)),_0x47e6f7=_0x51832c[_0x55aa56(0x1e5)](_0x55aa56(0x1fa))[_0x55aa56(0x1de)]()||_0x51832c[_0x55aa56(0x1f8)][0x0]?.['trim'](),_0x331247=_0x51832c[_0x55aa56(0x1e5)](_0x55aa56(0x1f5))||undefined,_0x218c80=_0x51832c[_0x55aa56(0x1e5)](_0x55aa56(0x1d4))||undefined;if(_0x51832c[_0x55aa56(0x1e9)]){if(!_0x47e6f7)throw CliErrors['validation'](_0x55aa56(0x1dc),_0x55aa56(0x1e3)+CLI_BIN_NAME+_0x55aa56(0x1e2));await _0x98ca80(_0x47e6f7,_0x331247,_0x218c80,_0x51832c[_0x55aa56(0x1ef)]);}else await _0x162034({'projectCode':_0x47e6f7,'appCode':_0x218c80,'env':_0x331247,'cookie':_0x51832c[_0x55aa56(0x1ef)]});return{'ok':!![]};}},{'service':a150_0x365a1a(0x1ea),'command':a150_0x365a1a(0x1f2),'description':a150_0x365a1a(0x1f3),'risk':a150_0x365a1a(0x1df),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0xcf58d2){const _0x12a9e2=a150_0x365a1a;return await upgradeApp(_0xcf58d2['nonInteractive'],{'yes':_0xcf58d2[_0x12a9e2(0x1ec)](_0x12a9e2(0x1d6))}),{'ok':!![]};}}];