@lovrabet/rabetbase-cli 2.3.11 → 2.3.12

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_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
+ (function(_0x53f142,_0x1df156){const _0x5aac1e=a135_0x397f,_0x2fc16d=_0x53f142();while(!![]){try{const _0xf72059=parseInt(_0x5aac1e(0x193))/0x1+-parseInt(_0x5aac1e(0x18d))/0x2+parseInt(_0x5aac1e(0x18f))/0x3+-parseInt(_0x5aac1e(0x195))/0x4+-parseInt(_0x5aac1e(0x191))/0x5*(parseInt(_0x5aac1e(0x192))/0x6)+parseInt(_0x5aac1e(0x190))/0x7*(parseInt(_0x5aac1e(0x194))/0x8)+parseInt(_0x5aac1e(0x18e))/0x9;if(_0xf72059===_0x1df156)break;else _0x2fc16d['push'](_0x2fc16d['shift']());}catch(_0x5254d5){_0x2fc16d['push'](_0x2fc16d['shift']());}}}(a135_0xd9b0,0x8f83d));import{permitPageGet}from'../../commands/permit/page-get.js';import{permitPageSet}from'../../commands/permit/page-set.js';import{permitRoleMenus}from'../../commands/permit/role-menus.js';function a135_0xd9b0(){const _0x38652a=['1238544MgFGvk','2348244BenFNZ','29715FcMAnI','60170FRxTpy','402VfXnrI','1140184pvdypQ','600RvXVEy','3910508ikeXwP','14362XZweOl'];a135_0xd9b0=function(){return _0x38652a;};return a135_0xd9b0();}function a135_0x397f(_0x568e9a,_0x2c95b4){_0x568e9a=_0x568e9a-0x18d;const _0xd9b050=a135_0xd9b0();let _0x397f7c=_0xd9b050[_0x568e9a];return _0x397f7c;}import{permitRoleMenusSet}from'../../commands/permit/role-menus-set.js';import{permitRoleApisSet}from'../../commands/permit/role-apis-set.js';export const permitDefinitions=[permitPageGet,permitPageSet,permitRoleMenus,permitRoleMenusSet,permitRoleApisSet];
@@ -1 +1 @@
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
+ const a136_0x2bbb7e=a136_0x4dd1;(function(_0x1c5143,_0x1bcc80){const _0x31f091=a136_0x4dd1,_0x675fb1=_0x1c5143();while(!![]){try{const _0x41613f=-parseInt(_0x31f091(0x104))/0x1*(-parseInt(_0x31f091(0x10b))/0x2)+parseInt(_0x31f091(0x10a))/0x3*(parseInt(_0x31f091(0x10e))/0x4)+-parseInt(_0x31f091(0x109))/0x5*(-parseInt(_0x31f091(0x110))/0x6)+parseInt(_0x31f091(0x10d))/0x7+parseInt(_0x31f091(0x112))/0x8+-parseInt(_0x31f091(0x108))/0x9*(-parseInt(_0x31f091(0x105))/0xa)+-parseInt(_0x31f091(0x10f))/0xb*(parseInt(_0x31f091(0x114))/0xc);if(_0x41613f===_0x1bcc80)break;else _0x675fb1['push'](_0x675fb1['shift']());}catch(_0x29f4ba){_0x675fb1['push'](_0x675fb1['shift']());}}}(a136_0x392b,0xa88ab));function a136_0x4dd1(_0x5af8c0,_0x54e8c9){_0x5af8c0=_0x5af8c0-0x104;const _0x392b52=a136_0x392b();let _0x4dd1fd=_0x392b52[_0x5af8c0];return _0x4dd1fd;}import{getPagePermit}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a136_0x392b(){const _0x57b589=['page-get','1416TUhReM','1wvUnei','362810PTAWEh','Page\x20permit\x20for\x20menu\x20','num','153KTvScU','5tliDVa','21bWCIvD','92028uEqZIt','menu-id','1577247oMtPYC','179216BrcBYe','137467qhGfSe','281286OYHNVS','Show\x20the\x20page\x20permission\x20snapshot\x20for\x20a\x20menu','7330976juzTkJ'];a136_0x392b=function(){return _0x57b589;};return a136_0x392b();}import{MENU_ID_FLAG,projectPagePermit}from'../../commands/permit/shared.js';export const permitPageGet={'service':'permit','command':a136_0x2bbb7e(0x113),'description':a136_0x2bbb7e(0x111),'risk':'read','flags':[MENU_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x240b3e){const _0x1f44ae=a136_0x2bbb7e,_0x4bc4fd=_0x240b3e[_0x1f44ae(0x107)](_0x1f44ae(0x10c)),_0x38361c=await getPagePermit(_0x4bc4fd);return{'ok':!![],'data':{'page':projectPagePermit(_0x38361c)},'message':_0x1f44ae(0x106)+_0x4bc4fd};}};
@@ -1 +1 @@
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
+ const a137_0x36089e=a137_0x4aa8;(function(_0x284747,_0x37e66c){const _0x3777e1=a137_0x4aa8,_0x339f30=_0x284747();while(!![]){try{const _0x4e3058=-parseInt(_0x3777e1(0x1e3))/0x1*(-parseInt(_0x3777e1(0x1ef))/0x2)+-parseInt(_0x3777e1(0x1e6))/0x3*(-parseInt(_0x3777e1(0x1f5))/0x4)+parseInt(_0x3777e1(0x1f0))/0x5+parseInt(_0x3777e1(0x1ff))/0x6+parseInt(_0x3777e1(0x1f7))/0x7+-parseInt(_0x3777e1(0x1f9))/0x8+-parseInt(_0x3777e1(0x1f1))/0x9*(parseInt(_0x3777e1(0x1e2))/0xa);if(_0x4e3058===_0x37e66c)break;else _0x339f30['push'](_0x339f30['shift']());}catch(_0x3f866c){_0x339f30['push'](_0x339f30['shift']());}}}(a137_0x14bf,0x7e694));import{getPagePermit,savePagePermit}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a137_0x14bf(){const _0x3d49aa=['3mzzgid','key','num','Set\x20page\x20permissions\x20for\x20a\x20menu\x20(menu/create/update/delete/detail/export/row\x20roles);\x20requires\x20--yes','join','Only\x20slots\x20present\x20in\x20`permit\x20page-get`\x20can\x20be\x20set.','menuId','/smartapi/permit/page/save','Pass\x20at\x20least\x20one\x20of:\x20','186ATTDUW','2462305leeiGH','63VVTBYJ','rolePermit','flag','push','2817908azOdIv','This\x20page\x20has\x20no\x20\x22','3091963fuoBMc','label','4773168mPLyiz','map','allowSelf','selector','menu-id','appCode','4603752ISsbEN','high-risk-write','length','validation','2714170NtrmHb','6542BwOPvq','permit','Nothing\x20to\x20set.'];a137_0x14bf=function(){return _0x3d49aa;};return a137_0x14bf();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a137_0x4aa8(_0xf30daf,_0x46a366){_0xf30daf=_0xf30daf-0x1e0;const _0x14bf80=a137_0x14bf();let _0x4aa824=_0x14bf80[_0xf30daf];return _0x4aa824;}import{asDryRunResult}from'../../commands/common/dry-run.js';import{MENU_ID_FLAG,PAGE_SET_ROLE_FLAGS,PAGE_SLOT_SPECS,projectPageSlot,resolvePermitRoles,splitList}from'../../commands/permit/shared.js';const SAVE_PATH=a137_0x36089e(0x1ed);function collectRequestedSlots(_0x2596ce){const _0x3ad693=a137_0x36089e,_0x3ae78e=[];for(const _0x4e15ec of PAGE_SLOT_SPECS){const _0x1f6e3f=_0x2596ce[_0x3ad693(0x1f3)](_0x4e15ec[_0x3ad693(0x1f3)]);if(_0x1f6e3f===undefined||_0x1f6e3f===null)continue;const _0x57c378=splitList(String(_0x1f6e3f));if(_0x57c378['length']===0x0)throw CliErrors[_0x3ad693(0x1e1)]('--'+_0x4e15ec['flag']+'\x20cannot\x20be\x20empty.','Pass\x20at\x20least\x20one\x20role,\x20or\x20omit\x20the\x20flag.\x20Clearing\x20permissions\x20is\x20not\x20supported\x20by\x20this\x20command.');_0x3ae78e[_0x3ad693(0x1f4)]({'spec':_0x4e15ec,'refs':_0x57c378});}return _0x3ae78e;}async function buildPlan(_0x5e0a4d,_0xc38e56){const _0x4e09f8=a137_0x36089e,_0xb4db2e=_0x5e0a4d[_0x4e09f8(0x1e8)](_0x4e09f8(0x1fd)),_0x3456b3=collectRequestedSlots(_0x5e0a4d);if(_0x3456b3[_0x4e09f8(0x1e0)]===0x0)throw CliErrors['validation'](_0x4e09f8(0x1e5),_0x4e09f8(0x1ee)+PAGE_SLOT_SPECS[_0x4e09f8(0x1fa)](_0xc1912f=>'--'+_0xc1912f[_0x4e09f8(0x1f3)])[_0x4e09f8(0x1ea)](',\x20')+'.');const _0x52ef2c=await getPagePermit(_0xb4db2e),_0x43f13f={},_0x5befaa={},_0x173a8f=[];for(const {spec:_0x3973cf,refs:_0x2d250d}of _0x3456b3){const _0x4c449d=_0x52ef2c[_0x3973cf[_0x4e09f8(0x1e7)]];if(!_0x4c449d)throw CliErrors['validation'](_0x4e09f8(0x1f6)+_0x3973cf[_0x4e09f8(0x1f8)]+'\x22\x20permission\x20slot\x20('+_0x3973cf[_0x4e09f8(0x1e7)]+').',_0x4e09f8(0x1eb));_0x43f13f[_0x3973cf['key']]=projectPageSlot(_0x4c449d);const _0x34dfdd=await resolvePermitRoles(_0x5e0a4d[_0x4e09f8(0x1fe)],_0x2d250d,{'allowSelf':_0x3973cf[_0x4e09f8(0x1fb)],'label':_0x3973cf[_0x4e09f8(0x1f8)]});_0x4c449d[_0x4e09f8(0x1f2)]=_0x34dfdd,_0x5befaa[_0x3973cf[_0x4e09f8(0x1e7)]]=projectPageSlot(_0x4c449d);}const _0x1198f9={'operation':'page-set','selector':{'appCode':_0x5e0a4d[_0x4e09f8(0x1fe)],'menuId':_0xb4db2e,'slots':_0x3456b3['map'](_0x5d8338=>_0x5d8338['spec']['key'])},'before':_0x43f13f,'after':_0x5befaa,'dryRun':_0xc38e56,'backend':{'method':'POST','path':SAVE_PATH},'warnings':_0x173a8f};return{'page':_0x52ef2c,'mutation':_0x1198f9};}export const permitPageSet={'service':a137_0x36089e(0x1e4),'command':'page-set','description':a137_0x36089e(0x1e9),'risk':a137_0x36089e(0x200),'flags':[MENU_ID_FLAG,...PAGE_SET_ROLE_FLAGS,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x240d55){const _0x4e450f=a137_0x36089e,_0xf5fa62=collectRequestedSlots(_0x240d55);if(_0xf5fa62['length']===0x0)throw CliErrors[_0x4e450f(0x1e1)](_0x4e450f(0x1e5),_0x4e450f(0x1ee)+PAGE_SLOT_SPECS['map'](_0xb04581=>'--'+_0xb04581['flag'])[_0x4e450f(0x1ea)](',\x20')+'.');},async 'dryRun'(_0x1c84e0){const {mutation:_0x23fead}=await buildPlan(_0x1c84e0,!![]);return asDryRunResult(_0x23fead,{'method':'POST','url':SAVE_PATH});},async 'execute'(_0x4f4f4f){const _0x310106=a137_0x36089e,{page:_0x14a2d2,mutation:_0x5b8f99}=await buildPlan(_0x4f4f4f,![]);return await savePagePermit(_0x14a2d2),{'ok':!![],'data':_0x5b8f99,'message':'Updated\x20page\x20permit\x20for\x20menu\x20'+_0x5b8f99[_0x310106(0x1fc)][_0x310106(0x1ec)]};}};
@@ -1 +1 @@
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
+ function a138_0x56af(_0x1e9be2,_0x15896b){_0x1e9be2=_0x1e9be2-0x12b;const _0x5988c3=a138_0x5988();let _0x56afb9=_0x5988c3[_0x1e9be2];return _0x56afb9;}const a138_0x9f1175=a138_0x56af;(function(_0x4b75d5,_0x45a241){const _0x10f882=a138_0x56af,_0x44c160=_0x4b75d5();while(!![]){try{const _0x54c676=parseInt(_0x10f882(0x143))/0x1+parseInt(_0x10f882(0x12c))/0x2+parseInt(_0x10f882(0x14c))/0x3+-parseInt(_0x10f882(0x14f))/0x4+-parseInt(_0x10f882(0x145))/0x5+-parseInt(_0x10f882(0x149))/0x6+-parseInt(_0x10f882(0x142))/0x7*(parseInt(_0x10f882(0x138))/0x8);if(_0x54c676===_0x45a241)break;else _0x44c160['push'](_0x44c160['shift']());}catch(_0x15b1cf){_0x44c160['push'](_0x44c160['shift']());}}}(a138_0x5988,0x952a8));import{getRoleApiResources,updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';function a138_0x5988(){const _0x4b1188=['push','action','POST','str','validation','get','roleName','Missing\x20--revoke.','41800ClfepI','api-revoke','datasets','flagMissing','Revoke\x20a\x20role\x27s\x20dataset\x20API\x20access\x20by\x20datasetCode\x20(roleType\x20API);\x20requires\x20--yes','set','datasetCodes','high-risk-write','length','Revoked\x20API\x20access\x20for\x20','217rxajEw','368783cIyQay','selector','3167470wyplmf','permit','bool','join','110418gsQdPM','role-apis-set','role-apis-set\x20currently\x20supports\x20revoking\x20dataset\x20API\x20access\x20(use\x20case\x204).','2011446pVLDJZ','filter','API','1443812XcWdrx','appCode','1493088neTtCR','Pass\x20--datasets\x20<datasetCode,...>.','Verify\x20the\x20datasetCode,\x20or\x20check\x20the\x20role\x27s\x20API\x20resource\x20matrix.','revoke'];a138_0x5988=function(){return _0x4b1188;};return a138_0x5988();}import{buildPermits,DATASETS_FLAG,flattenApiResources,readRoleRef,REVOKE_FLAG,ROLE_REF_FLAG,splitList}from'../../commands/permit/shared.js';import{assertPermConfigurable,resolveRoleRef}from'../../commands/role/shared.js';const UPDATE_PATH='/smartapi/permit/role/update';async function buildPlan(_0x245519,_0x11c0a8){const _0x3df4a0=a138_0x56af,_0x46b8bf=await resolveRoleRef(_0x245519['appCode'],readRoleRef(_0x245519));assertPermConfigurable(_0x46b8bf);if(!_0x245519['bool'](_0x3df4a0(0x12f)))throw CliErrors[_0x3df4a0(0x134)]('Missing\x20--revoke.',_0x3df4a0(0x14b));const _0x14099a=splitList(_0x245519['str'](_0x3df4a0(0x13a)));if(_0x14099a[_0x3df4a0(0x140)]===0x0)throw CliErrors[_0x3df4a0(0x13b)]('datasets',_0x3df4a0(0x12d));const _0x2f891e=await getRoleApiResources(_0x245519[_0x3df4a0(0x12b)],_0x46b8bf['id']),{byCode:_0x366094,byDataset:_0x9d17c6}=flattenApiResources(_0x2f891e),_0x45446a=_0x14099a[_0x3df4a0(0x14d)](_0x362904=>!_0x9d17c6['has'](_0x362904));if(_0x45446a[_0x3df4a0(0x140)]>0x0)throw CliErrors['validation']('Unknown\x20datasetCode(s)\x20for\x20this\x20role\x27s\x20API\x20resources:\x20'+_0x45446a[_0x3df4a0(0x148)](',\x20')+'.',_0x3df4a0(0x12e));const _0x1a2dab=new Map(),_0x1711c9=[],_0xa8317a=[];for(const _0x5ed805 of _0x14099a){for(const _0x59ea12 of _0x9d17c6[_0x3df4a0(0x135)](_0x5ed805)){const _0x2dc235=_0x366094[_0x3df4a0(0x135)](_0x59ea12);_0x1a2dab[_0x3df4a0(0x13d)](_0x59ea12,'0'),_0x1711c9[_0x3df4a0(0x130)]({'resourceCode':_0x59ea12,'datasetCode':_0x5ed805,'action':_0x2dc235[_0x3df4a0(0x131)]}),_0xa8317a[_0x3df4a0(0x130)]({'resourceCode':_0x59ea12,'datasetCode':_0x5ed805,'action':'0'});}}const _0x52361e=buildPermits(_0x366094,_0x1a2dab),_0x4320f3={'operation':_0x3df4a0(0x139),'selector':{'appCode':_0x245519[_0x3df4a0(0x12b)],'roleId':_0x46b8bf['id'],'roleName':_0x46b8bf[_0x3df4a0(0x136)],'datasetCodes':_0x14099a},'before':_0x1711c9,'after':_0xa8317a,'dryRun':_0x11c0a8,'backend':{'method':_0x3df4a0(0x132),'path':UPDATE_PATH,'roleType':'API'},'warnings':[]};return{'role':_0x46b8bf,'permits':_0x52361e,'mutation':_0x4320f3};}export const permitRoleApisSet={'service':a138_0x9f1175(0x146),'command':a138_0x9f1175(0x14a),'description':a138_0x9f1175(0x13c),'risk':a138_0x9f1175(0x13f),'flags':[ROLE_REF_FLAG,REVOKE_FLAG,DATASETS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4a4970){const _0x301b0e=a138_0x9f1175;if(!_0x4a4970[_0x301b0e(0x147)]('revoke'))throw CliErrors['validation'](_0x301b0e(0x137),_0x301b0e(0x14b));if(splitList(_0x4a4970[_0x301b0e(0x133)](_0x301b0e(0x13a)))[_0x301b0e(0x140)]===0x0)throw CliErrors[_0x301b0e(0x13b)](_0x301b0e(0x13a),_0x301b0e(0x12d));},async 'dryRun'(_0x5c0391){const _0x37f1ed=a138_0x9f1175,{mutation:_0x2f634f}=await buildPlan(_0x5c0391,!![]);return asDryRunResult(_0x2f634f,{'method':_0x37f1ed(0x132),'url':UPDATE_PATH});},async 'execute'(_0x1cad4d){const _0x361528=a138_0x9f1175,{role:_0x7cf6f0,permits:_0x4cf4bb,mutation:_0x1dd9bb}=await buildPlan(_0x1cad4d,![]);return await updateAppRole({'id':_0x7cf6f0['id'],'appCode':_0x1cad4d[_0x361528(0x12b)],'roleType':_0x361528(0x14e),'permits':_0x4cf4bb}),{'ok':!![],'data':_0x1dd9bb,'message':_0x361528(0x141)+_0x1dd9bb[_0x361528(0x144)][_0x361528(0x13e)][_0x361528(0x140)]+'\x20dataset(s)\x20on\x20role\x20'+_0x7cf6f0[_0x361528(0x136)]};}};
@@ -1 +1 @@
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
+ const a139_0x299087=a139_0x2f39;(function(_0x400e5c,_0x4db152){const _0x5ec09e=a139_0x2f39,_0x32a0ac=_0x400e5c();while(!![]){try{const _0x12a161=-parseInt(_0x5ec09e(0x14a))/0x1+-parseInt(_0x5ec09e(0x13f))/0x2*(parseInt(_0x5ec09e(0x130))/0x3)+-parseInt(_0x5ec09e(0x13a))/0x4*(parseInt(_0x5ec09e(0x12b))/0x5)+-parseInt(_0x5ec09e(0x142))/0x6*(-parseInt(_0x5ec09e(0x145))/0x7)+parseInt(_0x5ec09e(0x136))/0x8+-parseInt(_0x5ec09e(0x139))/0x9+-parseInt(_0x5ec09e(0x13e))/0xa*(-parseInt(_0x5ec09e(0x140))/0xb);if(_0x12a161===_0x4db152)break;else _0x32a0ac['push'](_0x32a0ac['shift']());}catch(_0x1878ab){_0x32a0ac['push'](_0x32a0ac['shift']());}}}(a139_0x34b6,0xd7501));import{getRoleMenuResources,updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a139_0x2f39(_0x5ae632,_0x12fede){_0x5ae632=_0x5ae632-0x128;const _0x34b66d=a139_0x34b6();let _0x2f3924=_0x34b66d[_0x5ae632];return _0x2f3924;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{buildPermits,flattenMenuResources,GRANT_FLAG,MENUS_FLAG,readGrantRevoke,readRoleRef,REVOKE_FLAG,ROLE_REF_FLAG,splitList}from'../../commands/permit/shared.js';import{assertPermConfigurable,resolveRoleRef}from'../../commands/role/shared.js';const UPDATE_PATH=a139_0x299087(0x147);async function buildPlan(_0x41ffb5,_0x6dc5d8){const _0x524209=a139_0x299087,_0x4366c2=await resolveRoleRef(_0x41ffb5[_0x524209(0x13b)],readRoleRef(_0x41ffb5));assertPermConfigurable(_0x4366c2);const _0x31dace=readGrantRevoke(_0x41ffb5),_0x4de2bf=splitList(_0x41ffb5[_0x524209(0x132)](_0x524209(0x12a)));if(_0x4de2bf[_0x524209(0x12f)]===0x0)throw CliErrors[_0x524209(0x12e)](_0x524209(0x12a),_0x524209(0x13d));const _0x344f06=await getRoleMenuResources(_0x41ffb5[_0x524209(0x13b)],_0x4366c2['id']),_0x2dd4d8=flattenMenuResources(_0x344f06),_0x3c4d2e=_0x4de2bf[_0x524209(0x131)](_0x121151=>!_0x2dd4d8[_0x524209(0x135)](_0x121151));if(_0x3c4d2e[_0x524209(0x12f)]>0x0)throw CliErrors['validation'](_0x524209(0x148)+_0x3c4d2e['join'](',\x20')+'.',_0x524209(0x143));const _0x39d66c=new Map(),_0x253ad2=[],_0x38f778=[];for(const _0x540322 of _0x4de2bf){const _0x295e0a=_0x2dd4d8[_0x524209(0x12d)](_0x540322);_0x39d66c[_0x524209(0x134)](_0x540322,_0x31dace),_0x253ad2[_0x524209(0x13c)]({'resourceCode':_0x540322,'action':_0x295e0a[_0x524209(0x138)]}),_0x38f778[_0x524209(0x13c)]({'resourceCode':_0x540322,'action':_0x31dace});}const _0x594fb5=buildPermits(_0x2dd4d8,_0x39d66c),_0x30dad5={'operation':_0x31dace===_0x524209(0x137)?_0x524209(0x12c):_0x524209(0x144),'selector':{'appCode':_0x41ffb5[_0x524209(0x13b)],'roleId':_0x4366c2['id'],'roleName':_0x4366c2[_0x524209(0x146)],'resourceCodes':_0x4de2bf},'before':_0x253ad2,'after':_0x38f778,'dryRun':_0x6dc5d8,'backend':{'method':'POST','path':UPDATE_PATH,'roleType':_0x524209(0x133)},'warnings':[]};return{'role':_0x4366c2,'permits':_0x594fb5,'mutation':_0x30dad5};}export const permitRoleMenusSet={'service':a139_0x299087(0x129),'command':'role-menus-set','description':'Grant\x20or\x20revoke\x20a\x20role\x27s\x20menu\x20access\x20by\x20resourceCode\x20(roleType\x20PAGE);\x20requires\x20--yes','risk':'high-risk-write','flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,MENUS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x560dc2){const _0x27b160=a139_0x299087;readGrantRevoke(_0x560dc2);if(splitList(_0x560dc2['str']('menus'))['length']===0x0)throw CliErrors[_0x27b160(0x12e)](_0x27b160(0x12a),_0x27b160(0x13d));},async 'dryRun'(_0xdcd524){const {mutation:_0x58a239}=await buildPlan(_0xdcd524,!![]);return asDryRunResult(_0x58a239,{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0x154a36){const _0x1ae5a2=a139_0x299087,{role:_0x2fb164,permits:_0x3dc516,mutation:_0x56f454}=await buildPlan(_0x154a36,![]);return await updateAppRole({'id':_0x2fb164['id'],'appCode':_0x154a36[_0x1ae5a2(0x13b)],'roleType':_0x1ae5a2(0x133),'permits':_0x3dc516}),{'ok':!![],'data':_0x56f454,'message':'Updated\x20'+_0x56f454[_0x1ae5a2(0x128)][_0x1ae5a2(0x149)][_0x1ae5a2(0x12f)]+_0x1ae5a2(0x141)+_0x2fb164['roleName']};}};function a139_0x34b6(){const _0x792e01=['Pass\x20--menus\x20<resourceCode,...>.','5230uiVkAo','2733726RuWuNG','50831hJthli','\x20menu\x20permit(s)\x20for\x20role\x20','125886GMVwFG','Run\x20`permit\x20role-menus\x20--role\x20<id>`\x20to\x20see\x20valid\x20resourceCodes.','menu-revoke','42bwxYRW','roleName','/smartapi/permit/role/update','Unknown\x20menu\x20resourceCode(s):\x20','resourceCodes','212385WEmupv','selector','permit','menus','915ITbDQM','menu-grant','get','flagMissing','length','3LQjESo','filter','str','PAGE','set','has','7294440yrDkbO','access','action','246879viumed','21112jQtPsv','appCode','push'];a139_0x34b6=function(){return _0x792e01;};return a139_0x34b6();}
@@ -1 +1 @@
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
+ const a140_0x1fcd86=a140_0x59b4;(function(_0x376d2a,_0x27a3b1){const _0x2fc0f2=a140_0x59b4,_0x4bbbe8=_0x376d2a();while(!![]){try{const _0xc5124e=parseInt(_0x2fc0f2(0x124))/0x1+-parseInt(_0x2fc0f2(0x128))/0x2*(parseInt(_0x2fc0f2(0x11e))/0x3)+parseInt(_0x2fc0f2(0x122))/0x4*(-parseInt(_0x2fc0f2(0x12b))/0x5)+parseInt(_0x2fc0f2(0x121))/0x6+-parseInt(_0x2fc0f2(0x129))/0x7+-parseInt(_0x2fc0f2(0x11d))/0x8*(parseInt(_0x2fc0f2(0x125))/0x9)+parseInt(_0x2fc0f2(0x11b))/0xa;if(_0xc5124e===_0x27a3b1)break;else _0x4bbbe8['push'](_0x4bbbe8['shift']());}catch(_0x350356){_0x4bbbe8['push'](_0x4bbbe8['shift']());}}}(a140_0x5044,0x6ac71));function a140_0x59b4(_0x3ecbb1,_0x182436){_0x3ecbb1=_0x3ecbb1-0x117;const _0x5044f7=a140_0x5044();let _0x59b4bc=_0x5044f7[_0x3ecbb1];return _0x59b4bc;}import{getRoleMenuResources}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{flattenMenuResources,readRoleRef,ROLE_REF_FLAG}from'../../commands/permit/shared.js';function a140_0x5044(){const _0x418bcb=['roleName','32nKPABN','3mWiRGj','\x20has\x20','role-menus','1493718UjkJcm','1852xTQKAL','length','570523teZDGB','672552RNkfUI','permit','read','1185362ZdAztY','5552428bwTbng','appCode','635KycnIA','Show\x20a\x20role\x27s\x20current\x20menu\x20permission\x20matrix','filter','values','action','13614830zZzUGC'];a140_0x5044=function(){return _0x418bcb;};return a140_0x5044();}import{resolveRoleRef}from'../../commands/role/shared.js';export const permitRoleMenus={'service':a140_0x1fcd86(0x126),'command':a140_0x1fcd86(0x120),'description':a140_0x1fcd86(0x117),'risk':a140_0x1fcd86(0x127),'flags':[ROLE_REF_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x29b1ca){const _0x56d1d5=a140_0x1fcd86,_0x304d41=await resolveRoleRef(_0x29b1ca[_0x56d1d5(0x12a)],readRoleRef(_0x29b1ca)),_0x3e01d1=await getRoleMenuResources(_0x29b1ca['appCode'],_0x304d41['id']),_0x182f33=flattenMenuResources(_0x3e01d1),_0x5d38ab=Array['from'](_0x182f33[_0x56d1d5(0x119)]())['map'](_0x1ddb50=>({'resourceCode':_0x1ddb50['resourceCode'],'resourceName':_0x1ddb50['resourceName'],'allowed':_0x1ddb50[_0x56d1d5(0x11a)]==='access','action':_0x1ddb50[_0x56d1d5(0x11a)]}));return{'ok':!![],'data':{'selector':{'appCode':_0x29b1ca[_0x56d1d5(0x12a)],'roleId':_0x304d41['id'],'roleName':_0x304d41[_0x56d1d5(0x11c)]},'menus':_0x5d38ab},'message':'Role\x20'+_0x304d41[_0x56d1d5(0x11c)]+_0x56d1d5(0x11f)+_0x5d38ab[_0x56d1d5(0x118)](_0x209439=>_0x209439['allowed'])[_0x56d1d5(0x123)]+'/'+_0x5d38ab['length']+'\x20menu(s)\x20allowed'};}};
@@ -1 +1 @@
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
+ const a141_0x3e60da=a141_0x1b47;function a141_0x1e64(){const _0x4942a3=['create-roles','5DCvWDA','set','allowSelf','action','row-roles','\x22\x20not\x20found.','Run\x20`role\x20list`.','763120rIsMRY','flag','trim','revoke','length','map','roleType','datasets','find','data\x20delete','access','data\x20update','21ikVdYL','ALL','Revoke\x20access\x20to\x20the\x20listed\x20resources','dataExport','1354014PWWqnM','Comma-separated\x20menu\x20resourceCodes\x20to\x20grant/revoke','entries','SELF\x20(row-level)\x20applies\x20only\x20to\x20--row-roles.','15189CppNPo','pageNodeList','Missing\x20action.','1724280hTbsaS','Grant\x20access\x20to\x20the\x20listed\x20resources','3202HaLXrE','export-roles','menu-id','dataCreate',';\x20SELF\x20=\x20only\x20own\x20rows','Special\x20role\x20','Pass\x20--role\x20<id|name>.','bool','2543373xvJiVF','resourceName','data\x20create','validation','11RyStyF','dataUpdate','toUpperCase','apiList','push','test','get','\x22\x20is\x20ambiguous\x20(ids:\x20','1522970Jympjk','key','role','boolean','dataDetail','label','menu-roles','string','--grant\x20and\x20--revoke\x20are\x20mutually\x20exclusive.','menuPermit','appCode','SELF\x20is\x20not\x20allowed\x20for\x20','Role\x20id\x20or\x20role\x20name','resourceCode','\x20(comma-separated\x20SELF/ALL/id/name)','116fxZhHk','\x20not\x20found.','filter','roleName','159ZzbVTT','row\x20visibility','split','datasetCode','rolePermit','dataPermit','Role\x20\x22','data\x20detail','SELF'];a141_0x1e64=function(){return _0x4942a3;};return a141_0x1e64();}function a141_0x1b47(_0x2d6bbb,_0x162361){_0x2d6bbb=_0x2d6bbb-0x6e;const _0x1e6439=a141_0x1e64();let _0x1b47ee=_0x1e6439[_0x2d6bbb];return _0x1b47ee;}(function(_0x261cb8,_0x18c925){const _0x3f27d4=a141_0x1b47,_0x2efc2e=_0x261cb8();while(!![]){try{const _0x54eb21=-parseInt(_0x3f27d4(0x73))/0x1*(-parseInt(_0x3f27d4(0x9d))/0x2)+parseInt(_0x3f27d4(0x98))/0x3*(-parseInt(_0x3f27d4(0x6f))/0x4)+-parseInt(_0x3f27d4(0x7d))/0x5*(parseInt(_0x3f27d4(0x94))/0x6)+-parseInt(_0x3f27d4(0x90))/0x7*(-parseInt(_0x3f27d4(0x84))/0x8)+parseInt(_0x3f27d4(0xa5))/0x9+-parseInt(_0x3f27d4(0xb1))/0xa+-parseInt(_0x3f27d4(0xa9))/0xb*(parseInt(_0x3f27d4(0x9b))/0xc);if(_0x54eb21===_0x18c925)break;else _0x2efc2e['push'](_0x2efc2e['shift']());}catch(_0x491919){_0x2efc2e['push'](_0x2efc2e['shift']());}}}(a141_0x1e64,0x25cdb));import{listPermitRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const MENU_ID_FLAG={'name':a141_0x3e60da(0x9f),'type':'number','required':!![],'description':'Menu\x20id\x20(from\x20`menu\x20list`)'};export const ROLE_REF_FLAG={'name':a141_0x3e60da(0xb3),'type':a141_0x3e60da(0xb8),'required':!![],'description':a141_0x3e60da(0xbd)};export const GRANT_FLAG={'name':'grant','type':a141_0x3e60da(0xb4),'required':![],'description':a141_0x3e60da(0x9c)};export const REVOKE_FLAG={'name':a141_0x3e60da(0x87),'type':a141_0x3e60da(0xb4),'required':![],'description':a141_0x3e60da(0x92)};export const MENUS_FLAG={'name':'menus','type':a141_0x3e60da(0xb8),'required':!![],'description':a141_0x3e60da(0x95)};export const DATASETS_FLAG={'name':a141_0x3e60da(0x8b),'type':a141_0x3e60da(0xb8),'required':!![],'description':'Comma-separated\x20datasetCodes\x20to\x20revoke\x20API\x20access\x20for'};export const PAGE_SLOT_SPECS=[{'flag':a141_0x3e60da(0xb7),'key':'menuPermit','allowSelf':![],'label':'menu\x20visibility'},{'flag':a141_0x3e60da(0x7c),'key':a141_0x3e60da(0xa0),'allowSelf':![],'label':a141_0x3e60da(0xa7)},{'flag':'update-roles','key':a141_0x3e60da(0xaa),'allowSelf':![],'label':a141_0x3e60da(0x8f)},{'flag':'delete-roles','key':'dataDelete','allowSelf':![],'label':a141_0x3e60da(0x8d)},{'flag':'detail-roles','key':a141_0x3e60da(0xb5),'allowSelf':![],'label':a141_0x3e60da(0x7a)},{'flag':a141_0x3e60da(0x9e),'key':a141_0x3e60da(0x93),'allowSelf':![],'label':'data\x20export'},{'flag':a141_0x3e60da(0x81),'key':a141_0x3e60da(0x78),'allowSelf':!![],'label':a141_0x3e60da(0x74)}];export const PAGE_SET_ROLE_FLAGS=PAGE_SLOT_SPECS[a141_0x3e60da(0x89)](_0x46984f=>({'name':_0x46984f[a141_0x3e60da(0x85)],'type':a141_0x3e60da(0xb8),'required':![],'description':'Roles\x20for\x20'+_0x46984f['label']+a141_0x3e60da(0x6e)+(_0x46984f[a141_0x3e60da(0x7f)]?a141_0x3e60da(0xa1):'')}));export function splitList(_0x4a819e){const _0xeddf69=a141_0x3e60da;return _0x4a819e[_0xeddf69(0x75)](',')[_0xeddf69(0x89)](_0x20e752=>_0x20e752[_0xeddf69(0x86)]())[_0xeddf69(0x71)](Boolean);}export function projectRoleRef(_0x283e78){const _0x2a793c=a141_0x3e60da;return{'id':_0x283e78['id'],'roleName':_0x283e78[_0x2a793c(0x72)],'roleType':_0x283e78[_0x2a793c(0x8a)]};}export async function resolvePermitRoles(_0x5ed9d9,_0x347927,_0x28fce5){const _0x463d01=a141_0x3e60da,_0x39473d=await listPermitRoles(_0x5ed9d9,{'needSelf':!![],'needPublic':!![]}),_0x5ddcde=[];for(const _0xcc2e2 of _0x347927){const _0xedf315=resolveOnePermitRole(_0x39473d,_0xcc2e2);if(!_0x28fce5[_0x463d01(0x7f)]&&_0xedf315[_0x463d01(0x8a)]===_0x463d01(0x7b))throw CliErrors[_0x463d01(0xa8)](_0x463d01(0xbc)+_0x28fce5[_0x463d01(0xb6)]+'.',_0x463d01(0x97));if(!_0x5ddcde['some'](_0x13b91e=>_0x13b91e['id']===_0xedf315['id']))_0x5ddcde[_0x463d01(0xad)](_0xedf315);}return _0x5ddcde;}function resolveOnePermitRole(_0x191dcd,_0x51c21d){const _0x1d089c=a141_0x3e60da,_0x2819f4=_0x51c21d[_0x1d089c(0x86)](),_0x247615=_0x2819f4[_0x1d089c(0xab)]();if(_0x247615===_0x1d089c(0x7b)||_0x247615===_0x1d089c(0x91)){const _0x112cd8=_0x191dcd['find'](_0x3dc442=>_0x3dc442[_0x1d089c(0x8a)]===_0x247615);if(!_0x112cd8)throw CliErrors[_0x1d089c(0xa8)](_0x1d089c(0xa2)+_0x247615+'\x20is\x20not\x20available\x20for\x20this\x20app.');return _0x112cd8;}if(/^-?\d+$/[_0x1d089c(0xae)](_0x2819f4)){const _0x46b8de=Number(_0x2819f4),_0x2e2b6f=_0x191dcd[_0x1d089c(0x8c)](_0x543f29=>_0x543f29['id']===_0x46b8de);if(!_0x2e2b6f)throw CliErrors[_0x1d089c(0xa8)]('Role\x20id\x20'+_0x46b8de+_0x1d089c(0x70),_0x1d089c(0x83));return _0x2e2b6f;}const _0x29e838=_0x191dcd[_0x1d089c(0x71)](_0x2073fb=>_0x2073fb[_0x1d089c(0x72)]===_0x2819f4);if(_0x29e838[_0x1d089c(0x88)]===0x0)throw CliErrors[_0x1d089c(0xa8)](_0x1d089c(0x79)+_0x2819f4+_0x1d089c(0x82),'Run\x20`role\x20list`,\x20or\x20use\x20SELF/ALL/<id>.');if(_0x29e838[_0x1d089c(0x88)]>0x1)throw CliErrors[_0x1d089c(0xa8)]('Role\x20\x22'+_0x2819f4+_0x1d089c(0xb0)+_0x29e838[_0x1d089c(0x89)](_0x50adf4=>_0x50adf4['id'])['join'](',\x20')+').','Disambiguate\x20with\x20an\x20id.');return _0x29e838[0x0];}export function projectPageSlot(_0xe5fdde){const _0x574457=a141_0x3e60da;if(!_0xe5fdde)return null;return{'resourceCode':_0xe5fdde[_0x574457(0xbe)],'roles':(_0xe5fdde[_0x574457(0x77)]??[])['map'](projectRoleRef)};}export function projectPagePermit(_0x1153f1){const _0x5afc71=a141_0x3e60da,_0x42fa50={'menuId':_0x1153f1['menuId'],'appCode':_0x1153f1[_0x5afc71(0xbb)],'menuPermit':projectPageSlot(_0x1153f1[_0x5afc71(0xba)])};for(const _0x56bfa6 of PAGE_SLOT_SPECS){if(_0x56bfa6[_0x5afc71(0xb2)]===_0x5afc71(0xba))continue;_0x42fa50[_0x56bfa6['key']]=projectPageSlot(_0x1153f1[_0x56bfa6[_0x5afc71(0xb2)]]);}return _0x42fa50;}export function flattenMenuResources(_0x2f21ab){const _0x480c29=new Map(),_0x371d10=_0xd874c9=>{const _0x55bf48=a141_0x1b47;for(const _0x1d252b of _0xd874c9??[]){_0x480c29[_0x55bf48(0x7e)](_0x1d252b[_0x55bf48(0xbe)],{'resourceCode':_0x1d252b['resourceCode'],'resourceName':_0x1d252b[_0x55bf48(0xa6)],'action':_0x1d252b['allowedActions']?.[0x0]??'0'});if(_0x1d252b[_0x55bf48(0x99)])_0x371d10(_0x1d252b[_0x55bf48(0x99)]);}};return _0x371d10(_0x2f21ab),_0x480c29;}export function flattenApiResources(_0x2c7846){const _0x205520=a141_0x3e60da,_0x56c33c=new Map(),_0x2d8e2b=new Map();for(const _0x1e9653 of _0x2c7846){const _0x4ecc18=_0x1e9653[_0x205520(0xac)]??{};for(const [_0x5dffd2,_0x32d8a9]of Object[_0x205520(0x96)](_0x4ecc18)){_0x56c33c['set'](_0x5dffd2,{'resourceCode':_0x5dffd2,'resourceName':_0x1e9653[_0x205520(0xa6)],'datasetCode':_0x1e9653[_0x205520(0x76)],'action':_0x32d8a9?.[0x0]??'0'});const _0x1da829=_0x2d8e2b['get'](_0x1e9653['datasetCode'])??[];_0x1da829['push'](_0x5dffd2),_0x2d8e2b['set'](_0x1e9653[_0x205520(0x76)],_0x1da829);}}return{'byCode':_0x56c33c,'byDataset':_0x2d8e2b};}export function buildPermits(_0x4ce066,_0x2b0be4){const _0x8c0eaf=a141_0x3e60da,_0x270306={};for(const [_0x37d321,_0x4a7da8]of _0x4ce066){const _0x3b59f3=_0x2b0be4[_0x8c0eaf(0xaf)](_0x37d321)??_0x4a7da8[_0x8c0eaf(0x80)];_0x270306[_0x37d321]=[_0x3b59f3];}return _0x270306;}export function readRoleRef(_0x1f59e8){const _0x27e937=a141_0x3e60da,_0x454ee2=_0x1f59e8['str'](_0x27e937(0xb3))['trim']();if(!_0x454ee2)throw CliErrors['flagMissing'](_0x27e937(0xb3),_0x27e937(0xa3));return _0x454ee2;}export function readGrantRevoke(_0x2f8242){const _0x371c75=a141_0x3e60da,_0x2b8dbe=_0x2f8242[_0x371c75(0xa4)]('grant'),_0xe2a10c=_0x2f8242[_0x371c75(0xa4)](_0x371c75(0x87));if(_0x2b8dbe&&_0xe2a10c)throw CliErrors[_0x371c75(0xa8)](_0x371c75(0xb9));if(!_0x2b8dbe&&!_0xe2a10c)throw CliErrors[_0x371c75(0xa8)](_0x371c75(0x9a),'Pass\x20exactly\x20one\x20of\x20--grant\x20/\x20--revoke.');return _0x2b8dbe?_0x371c75(0x8e):'0';}
@@ -1 +1 @@
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
+ (function(_0x161573,_0x487163){const _0x1359ef=a142_0x38c4,_0x5dfd6e=_0x161573();while(!![]){try{const _0x5c50e8=-parseInt(_0x1359ef(0x1a7))/0x1*(-parseInt(_0x1359ef(0x195))/0x2)+parseInt(_0x1359ef(0x198))/0x3*(-parseInt(_0x1359ef(0x19f))/0x4)+-parseInt(_0x1359ef(0x196))/0x5*(parseInt(_0x1359ef(0x19a))/0x6)+-parseInt(_0x1359ef(0x1a0))/0x7+-parseInt(_0x1359ef(0x191))/0x8+-parseInt(_0x1359ef(0x19c))/0x9+parseInt(_0x1359ef(0x1a8))/0xa;if(_0x5c50e8===_0x487163)break;else _0x5dfd6e['push'](_0x5dfd6e['shift']());}catch(_0x58357e){_0x5dfd6e['push'](_0x5dfd6e['shift']());}}}(a142_0x3723,0x75334));import{existsSync}from'node:fs';function a142_0x3723(){const _0x52e580=['Not\x20set','green','Login\x20failed','1YINpjV','27308490JjJjFe','env','log','3473360LZcfyF','Project\x20name:','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','trim','141074IIjljS','5oQQukf','cyan','235461cIkQBr','Project\x20name\x20cannot\x20exceed\x2050\x20characters','3987402MSMkGX','√\x20Login\x20status:\x20','6469893RHkSwt','√\x20App\x20Code:\x20','Logged\x20in','4iZBiCZ','2976631HoyabB','resolve','Skipped','production'];a142_0x3723=function(){return _0x52e580;};return a142_0x3723();}import a142_0x1bc104 from'node:path';import a142_0x3ca3f9 from'chalk';import{input,confirm}from'@inquirer/prompts';import{getIsSessionValid}from'../../../auth/is-session-valid.js';import{authServer}from'../../../auth/auth-server.js';function a142_0x38c4(_0x11f719,_0x4fa187){_0x11f719=_0x11f719-0x191;const _0x37233a=a142_0x3723();let _0x38c422=_0x37233a[_0x11f719];return _0x38c422;}import{readConfig}from'../../../utils/config.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';export async function guidedCreateProject(_0x44b474,_0x5e8d52,_0x10323d){const _0x540127=a142_0x38c4,_0x58b4f3='my-app',_0x3b1400=readConfig(),_0x2ffa5b=typeof _0x3b1400['env']==='string'?_0x3b1400[_0x540127(0x1a9)]:undefined,_0x588593=await input({'message':_0x540127(0x192),'default':_0x58b4f3,'validate':_0x451e1f=>{const _0x4d5b62=_0x540127,_0x331da6=_0x451e1f[_0x4d5b62(0x194)]()||_0x58b4f3;if(_0x331da6['length']>0x32)return _0x4d5b62(0x199);const _0x514610=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x331da6&&!_0x514610['test'](_0x331da6))return _0x4d5b62(0x193);const _0x1b1b93=a142_0x1bc104[_0x4d5b62(0x1a1)](process['cwd'](),_0x331da6);if(existsSync(_0x1b1b93))return'Directory\x20\x22'+_0x331da6+'\x22\x20already\x20exists';return!![];}});console[_0x540127(0x1aa)](a142_0x3ca3f9['green']('√\x20Project\x20Name:\x20'+a142_0x3ca3f9[_0x540127(0x197)](_0x588593)));const _0x8d5359=await selectSingleAppcode(_0x10323d);console[_0x540127(0x1aa)](a142_0x3ca3f9['green'](_0x540127(0x19d)+a142_0x3ca3f9[_0x540127(0x197)](_0x8d5359||_0x540127(0x1a4))));if(_0x8d5359){const _0x5f1d22=await getIsSessionValid();if(!_0x5f1d22){const _0x3c45ac=await confirm({'message':'No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','default':!![]});if(_0x3c45ac){const _0x2cda1a=await authServer({'silent':!![]});console[_0x540127(0x1aa)](a142_0x3ca3f9[_0x540127(0x1a5)](_0x540127(0x19b)+a142_0x3ca3f9[_0x540127(0x197)](_0x2cda1a?_0x540127(0x19e):_0x540127(0x1a6))));}else console[_0x540127(0x1aa)](a142_0x3ca3f9[_0x540127(0x1a5)](_0x540127(0x19b)+a142_0x3ca3f9[_0x540127(0x197)](_0x540127(0x1a2))));}await _0x44b474({'projectName':_0x588593,'appCode':_0x8d5359,'env':_0x5e8d52||_0x2ffa5b||_0x540127(0x1a3)});}else await _0x44b474({'projectName':_0x588593,'env':_0x5e8d52||_0x2ffa5b||'production'});}
@@ -1 +1 @@
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
+ (function(_0x4494d3,_0x21369e){const _0x227498=a143_0x31cd,_0x55144d=_0x4494d3();while(!![]){try{const _0x58e239=-parseInt(_0x227498(0xe7))/0x1*(-parseInt(_0x227498(0xe5))/0x2)+parseInt(_0x227498(0xe2))/0x3*(parseInt(_0x227498(0xe6))/0x4)+-parseInt(_0x227498(0xec))/0x5+-parseInt(_0x227498(0xee))/0x6*(parseInt(_0x227498(0xed))/0x7)+parseInt(_0x227498(0xe3))/0x8*(parseInt(_0x227498(0xeb))/0x9)+-parseInt(_0x227498(0xe9))/0xa*(-parseInt(_0x227498(0xea))/0xb)+parseInt(_0x227498(0xe8))/0xc*(-parseInt(_0x227498(0xe4))/0xd);if(_0x58e239===_0x21369e)break;else _0x55144d['push'](_0x55144d['shift']());}catch(_0x1991d0){_0x55144d['push'](_0x55144d['shift']());}}}(a143_0x4d31,0x4f33d));function a143_0x31cd(_0x136b40,_0x43af45){_0x136b40=_0x136b40-0xe2;const _0x4d3192=a143_0x4d31();let _0x31cd56=_0x4d3192[_0x136b40];return _0x31cd56;}export function formatElapsed(_0x27bcfd){const _0x167cf4=Date['now']()-_0x27bcfd;if(_0x167cf4<0x3e8)return _0x167cf4+'ms';const _0x3861af=(_0x167cf4/0x3e8)['toFixed'](0x2),_0x64431e=_0x3861af['replace'](/\.?0+$/u,'');return _0x64431e+'s';}function a143_0x4d31(){const _0x46f163=['1527132VZEdTi','10ZxzIxO','4360763GgASbo','115281bDPuAg','684425uvsvHh','1492778zfHohg','6VtVVoT','27Nwgfca','16siNAIp','26qONFWO','899152FZKeAD','25532kiNMPW','1YdzIvm'];a143_0x4d31=function(){return _0x46f163;};return a143_0x4d31();}
@@ -1 +1 @@
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
+ (function(_0x28bd18,_0x584225){const _0x56d1a0=a144_0x1fc6,_0x129e7d=_0x28bd18();while(!![]){try{const _0x2a446a=parseInt(_0x56d1a0(0xc6))/0x1*(-parseInt(_0x56d1a0(0xd9))/0x2)+parseInt(_0x56d1a0(0xe7))/0x3*(parseInt(_0x56d1a0(0xf3))/0x4)+-parseInt(_0x56d1a0(0xb7))/0x5*(-parseInt(_0x56d1a0(0x10b))/0x6)+parseInt(_0x56d1a0(0x110))/0x7*(parseInt(_0x56d1a0(0x108))/0x8)+parseInt(_0x56d1a0(0xf9))/0x9*(-parseInt(_0x56d1a0(0xd2))/0xa)+parseInt(_0x56d1a0(0x10a))/0xb*(-parseInt(_0x56d1a0(0xbc))/0xc)+-parseInt(_0x56d1a0(0xed))/0xd*(-parseInt(_0x56d1a0(0xf4))/0xe);if(_0x2a446a===_0x584225)break;else _0x129e7d['push'](_0x129e7d['shift']());}catch(_0x45b3e0){_0x129e7d['push'](_0x129e7d['shift']());}}}(a144_0x5afa,0xbf49f));import a144_0x3a57d3 from'path';import a144_0x2adf2c from'fs';import a144_0x58115 from'chalk';import a144_0x352c35 from'ora';function a144_0x1fc6(_0x32562b,_0x3a1b1f){_0x32562b=_0x32562b-0xb3;const _0x5afaf3=a144_0x5afa();let _0x1fc622=_0x5afaf3[_0x32562b];return _0x1fc622;}import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{readConfig}from'../../../utils/config.js';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';import{logger}from'../../../utils/logger.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';function a144_0x5afa(){const _0x322af1=['2IqJqJN','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','Install\x20dependencies','...','\x20already\x20exists','existsSync','utf8','name','更新\x20package.json\x20失败','trim','项目创建失败:\x20','error','length','test','14571VsEcVb','cwd','\x20&&\x20','\x20Generated\x20by\x20rabetbase\x20cli\x20','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','Project\x20name:\x20','22122061bgJeOi','√\x20Pulled\x20','\x20√\x20','CLI\x20版本检查','gray','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','56TCCIXA','28xPWhWy','\x20|\x20AppCode:\x20','配置应用AppCode失败','\x20dataset(s),\x20generated\x20','create','792bVhLGd','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','minimumVersion','Project\x20directory\x20','toLocaleString','配置应用AppCode:\x20','projectCode','\x20config\x20set\x20appcode\x20<app-code>\x27','belowMinimum','message','1.0.0','cd\x20','accessSync','writeFileSync','stop','24168RWiHWp','log','1078FibJbf','2236854LfNhqf','constants','join','parse','production','945xSccpZ','\x20run\x20start','开始创建项目:\x20','needsUpgrade','cyan','5yufVgk','rmSync','repeat','info','*\x20Pulling\x20API\x20configuration...','146940WNFPwu','Project\x20name\x20cannot\x20be\x20empty','清理项目目录失败:\x20','Format\x20code','dirname','readFileSync','success','🚀\x20Next\x20Steps:','bold','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','1438579DlPTDb','warn','resolve','\x20\x202.\x20Pull\x20API\x20configuration:\x20','green','cookie','start','chdir','projectName','appCode','package.json','env','94310XCRAQJ','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','stableVersion','string','defaultApp','项目创建完成:\x20','√\x20package.json\x20updated:\x20name='];a144_0x5afa=function(){return _0x322af1;};return a144_0x5afa();}import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';export async function createApp(_0x153fda){const _0x4ffb03=a144_0x1fc6,_0x35a0d0=await checkCliVersion();(_0x35a0d0[_0x4ffb03(0xb5)]||_0x35a0d0[_0x4ffb03(0x101)])&&(printCliUpgradeWarning(_0x35a0d0),assertCliVersionSupported(_0x35a0d0),logger[_0x4ffb03(0xba)](_0x4ffb03(0xf8),_0x4ffb03(0xf0),{'currentVersion':_0x35a0d0['currentVersion'],'stableVersion':_0x35a0d0[_0x4ffb03(0xd4)],'minimumVersion':_0x35a0d0[_0x4ffb03(0xfb)],'needsUpgrade':_0x35a0d0[_0x4ffb03(0xb5)],'belowMinimum':_0x35a0d0[_0x4ffb03(0x101)]}));if(_0x153fda[_0x4ffb03(0xff)]&&_0x153fda[_0x4ffb03(0xcf)])await runCreate({'projectName':_0x153fda['projectCode'],'appCode':_0x153fda[_0x4ffb03(0xcf)],'env':_0x153fda[_0x4ffb03(0xd1)]},_0x153fda);else{if(_0x153fda[_0x4ffb03(0xff)]){const _0x5c98fe=await selectSingleAppcode(_0x153fda[_0x4ffb03(0xcb)]);await runCreate({'projectName':_0x153fda[_0x4ffb03(0xff)],'appCode':_0x5c98fe||undefined,'env':_0x153fda[_0x4ffb03(0xd1)]},_0x153fda);}else await guidedCreateProject(_0x2eb2cb=>runCreate(_0x2eb2cb,_0x153fda),_0x153fda[_0x4ffb03(0xd1)],_0x153fda['cookie']);}}async function runCreate(_0x500e74,_0x33e7b4){const _0x255bd5=a144_0x1fc6;if(!_0x500e74[_0x255bd5(0xce)]||_0x500e74[_0x255bd5(0xce)][_0x255bd5(0xe2)]()==='')throw new Error(_0x255bd5(0xbd));const _0x171dc8=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x171dc8[_0x255bd5(0xe6)](_0x500e74[_0x255bd5(0xce)]))throw new Error(_0x255bd5(0xf2));if(_0x500e74[_0x255bd5(0xce)]['length']>0x64)throw new Error(_0x255bd5(0xda));const _0x5470c0=a144_0x3a57d3[_0x255bd5(0xc8)](process[_0x255bd5(0xe8)](),_0x500e74[_0x255bd5(0xce)]);if(a144_0x2adf2c['existsSync'](_0x5470c0))throw new Error(_0x255bd5(0xfc)+_0x500e74[_0x255bd5(0xce)]+_0x255bd5(0xdd));try{a144_0x2adf2c[_0x255bd5(0x105)](a144_0x3a57d3[_0x255bd5(0xc0)](_0x5470c0),a144_0x2adf2c[_0x255bd5(0x10c)]['W_OK']);}catch{throw new Error('Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions');}logger['setLogPath'](_0x5470c0),logger['info'](_0x255bd5(0xf8),_0x255bd5(0xb4)+_0x500e74[_0x255bd5(0xce)],{'projectDir':_0x5470c0,'appCode':_0x500e74[_0x255bd5(0xcf)]}),console[_0x255bd5(0x109)](),console[_0x255bd5(0x109)](a144_0x58115['green']('\x20√\x20')+_0x255bd5(0xec)+a144_0x58115['green'](_0x500e74[_0x255bd5(0xce)])+(_0x500e74['appCode']?_0x255bd5(0xf5)+a144_0x58115[_0x255bd5(0xb6)](_0x500e74[_0x255bd5(0xcf)]):''));try{await runTask('Copy\x20project\x20files',()=>copyProjectTemplate(_0x500e74[_0x255bd5(0xce)])),await updatePackageJsonName(_0x500e74['projectName']),await runTask(_0x255bd5(0xdb),()=>installDependencies(_0x500e74[_0x255bd5(0xce)])),await runTask(_0x255bd5(0xbf),()=>formatProjectCode(_0x500e74[_0x255bd5(0xce)])),await configureAppCode(_0x500e74[_0x255bd5(0xce)],_0x500e74[_0x255bd5(0xcf)]||'',_0x500e74['env']);let _0x4fa399=![];if(_0x500e74[_0x255bd5(0xcf)]){console[_0x255bd5(0x109)](_0x255bd5(0xbb));const _0x2f5ffc=process[_0x255bd5(0xe8)]();try{process[_0x255bd5(0xcd)](_0x5470c0);const _0x484c58=_0x500e74[_0x255bd5(0xd1)]||_0x255bd5(0x10f);initEnv(_0x484c58);const {configArray:_0x12a94e}=await fetchModelList(_0x500e74[_0x255bd5(0xcf)],_0x33e7b4[_0x255bd5(0xcb)]||''),_0x954dc2=DEFAULT_API_DIR,_0x3cf199=await generateApiFile(_0x12a94e,'',_0x500e74[_0x255bd5(0xcf)],!![],_0x484c58,_0x954dc2);console['log'](_0x255bd5(0xee)+_0x12a94e[_0x255bd5(0xe5)]+_0x255bd5(0xf7)+_0x3cf199['modelCount']+'\x20model(s)'),logger[_0x255bd5(0xba)](_0x255bd5(0xf8),'API\x20configuration\x20pulled:\x20'+_0x500e74[_0x255bd5(0xcf)]);}catch(_0x5debd6){_0x4fa399=!![],console[_0x255bd5(0x109)](_0x255bd5(0xeb)),logger[_0x255bd5(0xc7)]('create','API\x20配置拉取异常',{'error':_0x5debd6 instanceof Error?_0x5debd6[_0x255bd5(0x102)]:String(_0x5debd6)});}finally{process[_0x255bd5(0xcd)](_0x2f5ffc);}}logger[_0x255bd5(0xc2)](_0x255bd5(0xf8),_0x255bd5(0xd7)+_0x500e74[_0x255bd5(0xce)]),console[_0x255bd5(0x109)](),console[_0x255bd5(0x109)](a144_0x58115['green']('─'[_0x255bd5(0xb9)](0x3c))),console[_0x255bd5(0x109)](a144_0x58115[_0x255bd5(0xb6)][_0x255bd5(0xc4)](_0x255bd5(0xc3))),console['log'](),console[_0x255bd5(0x109)]('\x20\x201.\x20Start\x20project:\x20'+a144_0x58115[_0x255bd5(0xb6)][_0x255bd5(0xc4)](_0x255bd5(0x104)+_0x500e74[_0x255bd5(0xce)]+_0x255bd5(0xe9)+CLI_BIN_NAME+_0x255bd5(0xb3))),_0x4fa399&&console[_0x255bd5(0x109)](_0x255bd5(0xc9)+a144_0x58115[_0x255bd5(0xb6)][_0x255bd5(0xc4)](CLI_BIN_NAME+'\x20api\x20pull')),console[_0x255bd5(0x109)](a144_0x58115[_0x255bd5(0xca)]('─'[_0x255bd5(0xb9)](0x3c)));}catch(_0x14f431){logger['error'](_0x255bd5(0xf8),_0x255bd5(0xe3)+_0x500e74[_0x255bd5(0xce)],{'error':_0x14f431 instanceof Error?_0x14f431[_0x255bd5(0x102)]:String(_0x14f431)});try{a144_0x2adf2c[_0x255bd5(0xde)](_0x5470c0)&&(console[_0x255bd5(0x109)](_0x255bd5(0xc5)+_0x5470c0),a144_0x2adf2c[_0x255bd5(0xb8)](_0x5470c0,{'recursive':!![],'force':!![]}));}catch{logger['warn']('create',_0x255bd5(0xbe)+_0x5470c0);}throw _0x14f431;}}async function runTask(_0x93a1a8,_0x477b26){const _0x1d384e=a144_0x1fc6,_0x1b9b82=a144_0x352c35(_0x93a1a8+_0x1d384e(0xdc))[_0x1d384e(0xcc)]();try{const _0x5ac115=await _0x477b26();_0x1b9b82[_0x1d384e(0x107)](),console['log'](''+a144_0x58115[_0x1d384e(0xca)](_0x1d384e(0xef))+_0x93a1a8+'\x20'+a144_0x58115[_0x1d384e(0xf1)]('['+_0x5ac115+']'));}catch(_0x494489){_0x1b9b82['fail'](_0x93a1a8);throw _0x494489;}}async function updatePackageJsonName(_0x5cf5a9){const _0x4f6afc=a144_0x1fc6,_0x306332=a144_0x3a57d3[_0x4f6afc(0xc8)](process[_0x4f6afc(0xe8)](),_0x5cf5a9),_0xb9ba87=a144_0x3a57d3[_0x4f6afc(0x10d)](_0x306332,_0x4f6afc(0xd0));try{console[_0x4f6afc(0x109)](_0x4f6afc(0xd3));const _0x2721ec=getRabetbaseCliPackageRoot(),_0x336c6e=a144_0x3a57d3[_0x4f6afc(0x10d)](_0x2721ec,_0x4f6afc(0xd0));let _0x239f8d=_0x4f6afc(0x103);try{const _0x51667a=JSON[_0x4f6afc(0x10e)](a144_0x2adf2c[_0x4f6afc(0xc1)](_0x336c6e,_0x4f6afc(0xdf)));_0x239f8d=_0x51667a['version']||_0x4f6afc(0x103);}catch{}const _0x2cfac3=a144_0x2adf2c['readFileSync'](_0xb9ba87,_0x4f6afc(0xdf)),_0x2bf5e1=JSON[_0x4f6afc(0x10e)](_0x2cfac3);_0x2bf5e1[_0x4f6afc(0xe0)]=_0x5cf5a9,_0x2bf5e1['description']=_0x5cf5a9+_0x4f6afc(0xea)+_0x239f8d,a144_0x2adf2c[_0x4f6afc(0x106)](_0xb9ba87,JSON['stringify'](_0x2bf5e1,null,0x2)+'\x0a',_0x4f6afc(0xdf)),console['log'](_0x4f6afc(0xd8)+_0x5cf5a9),logger['info'](_0x4f6afc(0xf8),'更新\x20package.json\x20name');}catch(_0x3d6bed){logger[_0x4f6afc(0xe4)](_0x4f6afc(0xf8),_0x4f6afc(0xe1));throw _0x3d6bed;}}async function configureAppCode(_0x2adea5,_0x492ec1,_0x26824d){const _0x28b824=a144_0x1fc6,_0x2680f6=a144_0x3a57d3[_0x28b824(0xc8)](process[_0x28b824(0xe8)](),_0x2adea5),_0x311a0d=a144_0x3a57d3['join'](_0x2680f6,NEW_CONFIG_NAME);try{_0x492ec1?console[_0x28b824(0x109)]('*\x20Configuring\x20AppCode\x20for\x20project\x20'+_0x2adea5+':\x20'+_0x492ec1):console[_0x28b824(0x109)]('*\x20Creating\x20configuration\x20file\x20for\x20project\x20'+_0x2adea5);const _0x2684c5=getRabetbaseCliPackageRoot(),_0x4e64a3=a144_0x3a57d3['join'](_0x2684c5,'package.json');let _0x3f014d=_0x28b824(0x103);try{const _0xe09d62=JSON[_0x28b824(0x10e)](a144_0x2adf2c[_0x28b824(0xc1)](_0x4e64a3,'utf8'));_0x3f014d=_0xe09d62['version']||_0x28b824(0x103);}catch{}const _0x11759d=readConfig(),_0x5ac258=typeof _0x11759d[_0x28b824(0xd1)]===_0x28b824(0xd5)?_0x11759d[_0x28b824(0xd1)]:undefined,_0x173234={};for(const _0x4a834e of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x11759d[_0x4a834e]!=null)_0x173234[_0x4a834e]=_0x11759d[_0x4a834e];}const _0x2be3bb=buildCanonicalProjectConfig(_0x173234,{'appCodes':_0x492ec1?[_0x492ec1]:[],'env':_0x26824d||_0x5ac258||_0x28b824(0x10f),'metadata':{'createdAt':new Date()[_0x28b824(0xfd)](),'version':_0x3f014d}});writeConfigFile(_0x311a0d,_0x2be3bb),_0x492ec1?console[_0x28b824(0x109)]('√\x20Configuration\x20file\x20created,\x20Apps:\x20'+Object['keys'](_0x2be3bb['apps']||{})[_0x28b824(0x10d)](',\x20')+'\x20|\x20Default:\x20'+_0x2be3bb[_0x28b824(0xd6)]):console[_0x28b824(0x109)](_0x28b824(0xfa)+CLI_BIN_NAME+_0x28b824(0x100)),logger[_0x28b824(0xba)](_0x28b824(0xf8),_0x28b824(0xfe)+_0x492ec1);}catch(_0x55c213){logger[_0x28b824(0xe4)](_0x28b824(0xf8),_0x28b824(0xf6));}}
@@ -1 +1 @@
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
+ (function(_0x3859c2,_0x53912d){const _0x390b13=a145_0xe407,_0x56ef4f=_0x3859c2();while(!![]){try{const _0x3f6c83=parseInt(_0x390b13(0xfd))/0x1*(parseInt(_0x390b13(0x12a))/0x2)+parseInt(_0x390b13(0x11b))/0x3*(parseInt(_0x390b13(0x130))/0x4)+-parseInt(_0x390b13(0x113))/0x5+parseInt(_0x390b13(0x107))/0x6*(parseInt(_0x390b13(0x11a))/0x7)+-parseInt(_0x390b13(0x105))/0x8+parseInt(_0x390b13(0x12e))/0x9+-parseInt(_0x390b13(0x129))/0xa*(parseInt(_0x390b13(0x12c))/0xb);if(_0x3f6c83===_0x53912d)break;else _0x56ef4f['push'](_0x56ef4f['shift']());}catch(_0x3e23c6){_0x56ef4f['push'](_0x56ef4f['shift']());}}}(a145_0x5da1,0x88441));import a145_0x28b2b0 from'path';import a145_0x38600c from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';function a145_0xe407(_0xe67cbf,_0x54b138){_0xe67cbf=_0xe67cbf-0xf7;const _0x5da10e=a145_0x5da1();let _0xe40738=_0x5da10e[_0xe67cbf];return _0xe40738;}import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{readConfig}from'../../../utils/config.js';import{getCliVersion}from'../../../utils/version.js';import{CliErrors}from'../../../errors.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';const execAsync=promisify(exec);export async function createProjectNonInteractive(_0x31800e,_0x2b14aa,_0x442539,_0x26bbd4){const _0x1ec66b=a145_0xe407,_0x5c3550=await checkCliVersion();(_0x5c3550[_0x1ec66b(0x131)]||_0x5c3550[_0x1ec66b(0x11f)])&&(printCliUpgradeWarning(_0x5c3550),assertCliVersionSupported(_0x5c3550));if(!_0x31800e||_0x31800e['trim']()==='')throw CliErrors[_0x1ec66b(0xff)](_0x1ec66b(0x125));const _0x2bb5b4=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x2bb5b4[_0x1ec66b(0xfe)](_0x31800e))throw CliErrors[_0x1ec66b(0xff)](_0x1ec66b(0x122),_0x1ec66b(0x109));if(_0x31800e[_0x1ec66b(0x108)]>0x64)throw CliErrors[_0x1ec66b(0xff)](_0x1ec66b(0x120));const _0x516c1f=a145_0x28b2b0['resolve'](process['cwd'](),_0x31800e);if(existsSync(_0x516c1f))throw CliErrors[_0x1ec66b(0xff)]('Project\x20directory\x20\x22'+_0x31800e+'\x22\x20already\x20exists.',_0x1ec66b(0x104));try{const _0x486391=a145_0x28b2b0[_0x1ec66b(0x10b)](_0x516c1f);await a145_0x38600c[_0x1ec66b(0x124)](_0x486391,a145_0x38600c[_0x1ec66b(0x12b)][_0x1ec66b(0x10f)]);}catch{throw CliErrors[_0x1ec66b(0xff)](_0x1ec66b(0x121),_0x1ec66b(0x126));}try{console['log'](_0x1ec66b(0xfc)+_0x31800e+_0x1ec66b(0x10c));const _0x5aa628=getSubAppReactDemoTemplateDir();await copyDirectory(_0x5aa628,_0x516c1f),console['log'](_0x1ec66b(0x128)),await updatePackageJsonName(_0x31800e),console[_0x1ec66b(0x12f)](_0x1ec66b(0x119)),console[_0x1ec66b(0x12f)]('\x20\x20Installing\x20dependencies...'),console[_0x1ec66b(0x12f)](_0x1ec66b(0x10e)),await formatCode(_0x516c1f),console[_0x1ec66b(0x12f)](_0x1ec66b(0x101)),await configureProject(_0x31800e,_0x442539,_0x2b14aa),console[_0x1ec66b(0x12f)](_0x1ec66b(0x115)),_0x442539&&await pullApiConfig(_0x516c1f,_0x442539,_0x2b14aa,_0x26bbd4),console[_0x1ec66b(0x12f)](_0x1ec66b(0xfa)+_0x31800e+_0x1ec66b(0x111)),console[_0x1ec66b(0x12f)](_0x1ec66b(0x11d)+_0x31800e),console['log'](_0x1ec66b(0x117));}catch(_0x47c973){try{existsSync(_0x516c1f)&&await a145_0x38600c['rm'](_0x516c1f,{'recursive':!![],'force':!![]});}catch{}throw _0x47c973;}}async function updatePackageJsonName(_0x482c69){const _0x3776fd=a145_0xe407,_0x1c26d9=a145_0x28b2b0['resolve'](process['cwd'](),_0x482c69),_0x5ed16c=a145_0x28b2b0[_0x3776fd(0x11c)](_0x1c26d9,_0x3776fd(0x123)),_0x3bb155=await a145_0x38600c[_0x3776fd(0x102)](_0x5ed16c,'utf-8'),_0x1f6228=JSON[_0x3776fd(0xf7)](_0x3bb155);_0x1f6228[_0x3776fd(0x103)]=_0x482c69,_0x1f6228[_0x3776fd(0xf8)]='A\x20project\x20created\x20with\x20Lovrabet\x20CLI',await a145_0x38600c['writeFile'](_0x5ed16c,JSON[_0x3776fd(0x100)](_0x1f6228,null,0x2)+'\x0a');}function detectPackageManager(){const _0x2e1943=a145_0xe407;try{return execSync(_0x2e1943(0xf9),{'stdio':'ignore'}),_0x2e1943(0x11e);}catch{return _0x2e1943(0x118);}}async function formatCode(_0xd071d3){const _0x4b6d1e=a145_0xe407;try{await execAsync(_0x4b6d1e(0x112),{'cwd':_0xd071d3});}catch{}}function a145_0x5da1(){const _0x508e48=['env','dirname','...','\x20dataset(s),\x20generated\x20','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','W_OK','\x20\x20√\x20Pulled\x20','\x20created\x20successfully!','bun\x20run\x20format','344555nnCuSF','string','\x20\x20√\x20Configuration\x20file\x20created','cwd','\x20\x20rabetbase\x20run\x20start\x0a','npm','\x20\x20√\x20package.json\x20updated','84ViZPUG','759uxrMnC','join','\x0a\x20\x20cd\x20','bun','belowMinimum','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','Cannot\x20create\x20project\x20in\x20current\x20directory.','Project\x20name\x20contains\x20invalid\x20characters.','package.json','access','Project\x20name\x20cannot\x20be\x20empty.','Check\x20directory\x20permissions.','chdir','\x20\x20√\x20Project\x20template\x20created','484450erAanG','8ogTwer','constants','231mDxjjg','\x20model(s)','4467510MgdXHt','log','3568iLfKPv','needsUpgrade','modelCount','parse','description','bun\x20--version','\x0a√\x20Project\x20','production','*\x20Creating\x20project\x20','179131ImTGSI','test','validation','stringify','\x20\x20√\x20Code\x20formatted','readFile','name','Use\x20a\x20different\x20project\x20name.','2962184sReynb','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','288042CfzgSL','length','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters'];a145_0x5da1=function(){return _0x508e48;};return a145_0x5da1();}async function configureProject(_0x28ecbc,_0x4f7214,_0x3bf2f4){const _0x4de08b=a145_0xe407,_0x16f911=a145_0x28b2b0['resolve'](process[_0x4de08b(0x116)](),_0x28ecbc),_0x23a6b2=a145_0x28b2b0[_0x4de08b(0x11c)](_0x16f911,NEW_CONFIG_NAME),_0x4bc169=readConfig(),_0x5a00c1=typeof _0x4bc169[_0x4de08b(0x10a)]===_0x4de08b(0x114)?_0x4bc169[_0x4de08b(0x10a)]:undefined,_0x44e9ee={};for(const _0x60803 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x4bc169[_0x60803]!=null)_0x44e9ee[_0x60803]=_0x4bc169[_0x60803];}const _0x1a9872=buildCanonicalProjectConfig(_0x44e9ee,{'appCodes':_0x4f7214?[_0x4f7214]:[],'env':_0x3bf2f4||_0x5a00c1||_0x4de08b(0xfb),'metadata':{'createdAt':new Date()['toLocaleString'](),'version':getCliVersion()}});writeConfigFile(_0x23a6b2,_0x1a9872);}async function pullApiConfig(_0x567f32,_0x13c3cd,_0x50cd3a,_0x4609a1){const _0x215c25=a145_0xe407,_0x972e60=process[_0x215c25(0x116)]();try{process['chdir'](_0x567f32);const _0x306118=_0x50cd3a||_0x215c25(0xfb);initEnv(_0x306118),console[_0x215c25(0x12f)]('\x20\x20Pulling\x20API\x20configuration...');const {configArray:_0x28d37e}=await fetchModelList(_0x13c3cd,_0x4609a1||''),_0xf9c380=await generateApiFile(_0x28d37e,'',_0x13c3cd,!![],_0x306118,DEFAULT_API_DIR);console['log'](_0x215c25(0x110)+_0x28d37e[_0x215c25(0x108)]+_0x215c25(0x10d)+_0xf9c380[_0x215c25(0x132)]+_0x215c25(0x12d));}catch(_0x1fd158){console[_0x215c25(0x12f)](_0x215c25(0x106)+CLI_BIN_NAME+'\x20api\x20pull`\x20manually\x20later.');}finally{process[_0x215c25(0x127)](_0x972e60);}}
@@ -1 +1 @@
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
+ const a146_0x2da697=a146_0x6a40;(function(_0x3a9ef0,_0x3cf1fb){const _0x6cf36f=a146_0x6a40,_0xf68fff=_0x3a9ef0();while(!![]){try{const _0x504235=parseInt(_0x6cf36f(0x15a))/0x1+parseInt(_0x6cf36f(0x15f))/0x2*(-parseInt(_0x6cf36f(0x159))/0x3)+parseInt(_0x6cf36f(0x15d))/0x4*(parseInt(_0x6cf36f(0x15e))/0x5)+-parseInt(_0x6cf36f(0x15b))/0x6+-parseInt(_0x6cf36f(0x162))/0x7+-parseInt(_0x6cf36f(0x160))/0x8*(-parseInt(_0x6cf36f(0x154))/0x9)+parseInt(_0x6cf36f(0x158))/0xa*(parseInt(_0x6cf36f(0x161))/0xb);if(_0x504235===_0x3cf1fb)break;else _0xf68fff['push'](_0xf68fff['shift']());}catch(_0x57cde1){_0xf68fff['push'](_0xf68fff['shift']());}}}(a146_0x426e,0x76a86));import a146_0x21625a from'node:path';function a146_0x6a40(_0x18ddd0,_0x20c9b5){_0x18ddd0=_0x18ddd0-0x153;const _0x426e77=a146_0x426e();let _0x6a40fb=_0x426e77[_0x18ddd0];return _0x6a40fb;}import{fileURLToPath}from'node:url';const __dirname=a146_0x21625a[a146_0x2da697(0x155)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x20efd5=a146_0x2da697;return a146_0x21625a['resolve'](__dirname,_0x20efd5(0x157));}function a146_0x426e(){const _0x166db7=['42143HPdTSQ','860478XhLNvJ','projects','892YsEjrl','5545rUHhLe','4szHhME','152ThFeFV','404536DRSJYI','4992610BdLQzv','join','359343ngblva','dirname','templates','../../../../','180NfoJDG','551049ozZLky'];a146_0x426e=function(){return _0x166db7;};return a146_0x426e();}export function getSubAppReactDemoTemplateDir(){const _0x46bb0a=a146_0x2da697;return a146_0x21625a[_0x46bb0a(0x153)](getRabetbaseCliPackageRoot(),_0x46bb0a(0x156),_0x46bb0a(0x15c),'sub-app-react-demo');}
@@ -1 +1 @@
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
+ function a147_0x5e59(_0x4cc5b4,_0x4438d5){_0x4cc5b4=_0x4cc5b4-0x1a2;const _0x67776=a147_0x6777();let _0x5e59b8=_0x67776[_0x4cc5b4];return _0x5e59b8;}function a147_0x6777(){const _0x1d426d=['message','275548QiNMFU','copy','780534xrERZY','102697fjQXQt','2149679ftjSXW','项目模板复制失败','cwd','50dfRubj','error','info','3WFYcrw','230280izhMUi','784618cMwgYj','1715070dPtfnG','6lwlxoZ','resolve','now'];a147_0x6777=function(){return _0x1d426d;};return a147_0x6777();}(function(_0x4c97a0,_0x165a30){const _0x12ef3a=a147_0x5e59,_0x2c07b1=_0x4c97a0();while(!![]){try{const _0x53ff88=parseInt(_0x12ef3a(0x1a6))/0x1+parseInt(_0x12ef3a(0x1af))/0x2*(-parseInt(_0x12ef3a(0x1ad))/0x3)+parseInt(_0x12ef3a(0x1a3))/0x4+-parseInt(_0x12ef3a(0x1b0))/0x5*(parseInt(_0x12ef3a(0x1b1))/0x6)+parseInt(_0x12ef3a(0x1a7))/0x7+parseInt(_0x12ef3a(0x1ae))/0x8+parseInt(_0x12ef3a(0x1a5))/0x9*(parseInt(_0x12ef3a(0x1aa))/0xa);if(_0x53ff88===_0x165a30)break;else _0x2c07b1['push'](_0x2c07b1['shift']());}catch(_0x107de8){_0x2c07b1['push'](_0x2c07b1['shift']());}}}(a147_0x6777,0x323cd));import a147_0x14eff6 from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x578e1c){const _0xd5e363=a147_0x5e59,_0x47e542=Date[_0xd5e363(0x1b3)](),_0x255212=a147_0x14eff6[_0xd5e363(0x1b2)](process[_0xd5e363(0x1a9)](),_0x578e1c);try{logger[_0xd5e363(0x1ac)]('copy','开始复制项目模板',{'projectCode':_0x578e1c,'templateDir':templateDir}),await copyDirectory(templateDir,_0x255212);const _0x540ad4=Date[_0xd5e363(0x1b3)]()-_0x47e542;logger['success'](_0xd5e363(0x1a4),'项目模板复制完成',_0x540ad4,{'projectCode':_0x578e1c});}catch(_0x12c17f){const _0x343ba5=Date['now']()-_0x47e542;logger[_0xd5e363(0x1ab)](_0xd5e363(0x1a4),_0xd5e363(0x1a8),{'projectCode':_0x578e1c,'error':_0x12c17f instanceof Error?_0x12c17f[_0xd5e363(0x1a2)]:String(_0x12c17f),'duration':_0x343ba5});throw _0x12c17f;}return formatElapsed(_0x47e542);}
@@ -1 +1 @@
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
+ function a148_0x23df(_0x4aa2b9,_0x162aae){_0x4aa2b9=_0x4aa2b9-0xb0;const _0x37b67a=a148_0x37b6();let _0x23df62=_0x37b67a[_0x4aa2b9];return _0x23df62;}(function(_0x87a488,_0x4056bf){const _0x52af18=a148_0x23df,_0xa237eb=_0x87a488();while(!![]){try{const _0x3b4d94=parseInt(_0x52af18(0xb0))/0x1*(parseInt(_0x52af18(0xb9))/0x2)+-parseInt(_0x52af18(0xc6))/0x3+-parseInt(_0x52af18(0xc5))/0x4*(-parseInt(_0x52af18(0xbd))/0x5)+parseInt(_0x52af18(0xb6))/0x6+-parseInt(_0x52af18(0xc1))/0x7*(-parseInt(_0x52af18(0xb3))/0x8)+parseInt(_0x52af18(0xc7))/0x9+parseInt(_0x52af18(0xb7))/0xa*(-parseInt(_0x52af18(0xc2))/0xb);if(_0x3b4d94===_0x4056bf)break;else _0xa237eb['push'](_0xa237eb['shift']());}catch(_0x5cc02e){_0xa237eb['push'](_0xa237eb['shift']());}}}(a148_0x37b6,0xa3fa5));function a148_0x37b6(){const _0xf5a659=['522332uQllvy','3771780EKTCMY','6522210MQKMIX','526065IlHAJy','resolve','info','856ATeQgc','npx','代码格式化失败','2824224JEEUUq','10BtUJhy','format','2aNgzAt','success','开始格式化代码','message','40PSbgNB','cwd','--write','代码格式化完成','42259PgfzNa','16314859bFfkxN','now','prettier'];a148_0x37b6=function(){return _0xf5a659;};return a148_0x37b6();}import a148_0x350b63 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x4009e6){const _0x1a95f4=a148_0x23df,_0x79b19e=Date[_0x1a95f4(0xc3)](),_0x5e7876=a148_0x350b63[_0x1a95f4(0xb1)](process[_0x1a95f4(0xbe)](),_0x4009e6);try{logger[_0x1a95f4(0xb2)]('format',_0x1a95f4(0xbb),{'projectCode':_0x4009e6}),await execa(resolveNpmBin(_0x1a95f4(0xb4)),[_0x1a95f4(0xc4),_0x1a95f4(0xbf),'.'],{'cwd':_0x5e7876});const _0x3527b4=Date[_0x1a95f4(0xc3)]()-_0x79b19e;logger[_0x1a95f4(0xba)](_0x1a95f4(0xb8),_0x1a95f4(0xc0),_0x3527b4,{'projectCode':_0x4009e6});}catch(_0x580fde){const _0x2b3cac=Date[_0x1a95f4(0xc3)]()-_0x79b19e;logger['error']('format',_0x1a95f4(0xb5),{'projectCode':_0x4009e6,'error':_0x580fde instanceof Error?_0x580fde[_0x1a95f4(0xbc)]:String(_0x580fde),'duration':_0x2b3cac});throw _0x580fde;}return formatElapsed(_0x79b19e);}
@@ -1 +1 @@
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
+ (function(_0x45801a,_0x2dc86d){const _0x3854ca=a149_0x21c5,_0x1a3eac=_0x45801a();while(!![]){try{const _0x31e006=-parseInt(_0x3854ca(0xe2))/0x1+-parseInt(_0x3854ca(0xea))/0x2*(parseInt(_0x3854ca(0xe3))/0x3)+-parseInt(_0x3854ca(0xf2))/0x4*(parseInt(_0x3854ca(0xf3))/0x5)+-parseInt(_0x3854ca(0xe7))/0x6+parseInt(_0x3854ca(0xef))/0x7+parseInt(_0x3854ca(0xed))/0x8*(parseInt(_0x3854ca(0xe0))/0x9)+parseInt(_0x3854ca(0xec))/0xa;if(_0x31e006===_0x2dc86d)break;else _0x1a3eac['push'](_0x1a3eac['shift']());}catch(_0x574462){_0x1a3eac['push'](_0x1a3eac['shift']());}}}(a149_0x2001,0x7b858));import a149_0x2883e8 from'node:path';function a149_0x21c5(_0x5d6ee2,_0x42288f){_0x5d6ee2=_0x5d6ee2-0xde;const _0x2001cc=a149_0x2001();let _0x21c5ac=_0x2001cc[_0x5d6ee2];return _0x21c5ac;}import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';function a149_0x2001(){const _0x466a89=['message','7029380BHIPSx','16BLKJQX','error','2350642ylflvM','now','install','20wPrmMY','537265xUQYba','npm','https://registry.npmmirror.com','4100994uGGXmc','依赖安装失败','417405CDEFNd','1410891rhghRs','依赖安装完成','cwd','resolve','114990SOjepR','--registry','info','2rxyCKq'];a149_0x2001=function(){return _0x466a89;};return a149_0x2001();}export async function installDependencies(_0xf2e784){const _0x21f742=a149_0x21c5,_0x519811=Date['now'](),_0x148435=a149_0x2883e8[_0x21f742(0xe6)](process[_0x21f742(0xe5)](),_0xf2e784);try{logger[_0x21f742(0xe9)](_0x21f742(0xf1),'开始安装依赖',{'projectCode':_0xf2e784,'registry':_0x21f742(0xdf)}),await execa(resolveNpmBin(_0x21f742(0xde)),[_0x21f742(0xf1),_0x21f742(0xe8),_0x21f742(0xdf)],{'cwd':_0x148435});const _0x2753cb=Date['now']()-_0x519811;logger['success']('install',_0x21f742(0xe4),_0x2753cb,{'projectCode':_0xf2e784});}catch(_0x2cb814){const _0x4e1323=Date[_0x21f742(0xf0)]()-_0x519811;logger[_0x21f742(0xee)](_0x21f742(0xf1),_0x21f742(0xe1),{'projectCode':_0xf2e784,'error':_0x2cb814 instanceof Error?_0x2cb814[_0x21f742(0xeb)]:String(_0x2cb814),'duration':_0x4e1323});throw _0x2cb814;}return formatElapsed(_0x519811);}
@@ -1 +1 @@
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':!![]};}}];
1
+ const a150_0x57cdad=a150_0x93cc;(function(_0x1a1c2b,_0x33f706){const _0x49604d=a150_0x93cc,_0x51acc0=_0x1a1c2b();while(!![]){try{const _0x4f42bb=parseInt(_0x49604d(0x75))/0x1*(-parseInt(_0x49604d(0x72))/0x2)+-parseInt(_0x49604d(0x8c))/0x3*(parseInt(_0x49604d(0x77))/0x4)+parseInt(_0x49604d(0x82))/0x5*(parseInt(_0x49604d(0x7c))/0x6)+-parseInt(_0x49604d(0x8f))/0x7+-parseInt(_0x49604d(0x92))/0x8*(parseInt(_0x49604d(0x90))/0x9)+-parseInt(_0x49604d(0x87))/0xa+-parseInt(_0x49604d(0x67))/0xb*(-parseInt(_0x49604d(0x8d))/0xc);if(_0x4f42bb===_0x33f706)break;else _0x51acc0['push'](_0x51acc0['shift']());}catch(_0x411751){_0x51acc0['push'](_0x51acc0['shift']());}}}(a150_0x1fc0,0xc69e6));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{initConfig}from'../../commands/project/init.js';function a150_0x1fc0(){const _0x44f833=['../../commands/project/create/non-interactive.js','upgrade','340JBFzss','boolean','Target\x20environment','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','string','3975250kjqyQn','create','str','appcode','write','21cAStAb','108StTNVU','yes','2892183EywsJv','207pxVMfK','Create\x20a\x20new\x20project','437704cuYkAL','env','4568069uRxeyK','init','App\x20code\x20to\x20initialize','trim','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','Usage:\x20','Skip\x20confirmation\x20prompt','project-name','\x20workspace\x20init','../../commands/project/create/main.js','name','130082YuHADu','project','nonInteractive','17cuZBKU','validation','512660zYEHxU','cookie','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','Project\x20name','2026-07','101292dDDJhy','bool','Auto-confirm\x20prompts','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)'];a150_0x1fc0=function(){return _0x44f833;};return a150_0x1fc0();}function a150_0x93cc(_0x11c6e6,_0x4cd856){_0x11c6e6=_0x11c6e6-0x67;const _0x1fc008=a150_0x1fc0();let _0x93cc37=_0x1fc008[_0x11c6e6];return _0x93cc37;}import{upgradeApp}from'../../commands/project/upgrade.js';const initFlags=[{'name':a150_0x57cdad(0x8a),'type':'string','description':a150_0x57cdad(0x69)},{'name':a150_0x57cdad(0x93),'type':a150_0x57cdad(0x86),'description':a150_0x57cdad(0x84)},{'name':'yes','type':'boolean','description':a150_0x57cdad(0x7e),'default':![]}],createFlags=[{'name':a150_0x57cdad(0x71),'type':a150_0x57cdad(0x86),'description':a150_0x57cdad(0x7a)},{'name':'env','type':'string','description':a150_0x57cdad(0x84)},{'name':'appcode','type':a150_0x57cdad(0x86),'description':a150_0x57cdad(0x7f)}],upgradeFlags=[{'name':a150_0x57cdad(0x8e),'type':a150_0x57cdad(0x83),'description':a150_0x57cdad(0x6d),'default':![]}];export const projectDefinitions=[{'service':a150_0x57cdad(0x73),'command':a150_0x57cdad(0x68),'description':'Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','risk':a150_0x57cdad(0x8b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+a150_0x57cdad(0x6f),'since':a150_0x57cdad(0x7b)},'flags':initFlags,async 'execute'(_0x106c2a){const _0x3f3cff=a150_0x57cdad;return await initConfig({'appcode':_0x106c2a[_0x3f3cff(0x89)](_0x3f3cff(0x8a))||undefined,'env':_0x106c2a['str'](_0x3f3cff(0x93))||undefined,'autoYes':_0x106c2a[_0x3f3cff(0x7d)](_0x3f3cff(0x8e))}),{'ok':!![]};}},{'service':a150_0x57cdad(0x73),'command':a150_0x57cdad(0x88),'description':a150_0x57cdad(0x91),'risk':'write','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a150_0x57cdad(0x6e),'description':a150_0x57cdad(0x6b),'required':![]}],'flags':createFlags,async 'execute'(_0x58b636){const _0x23c34c=a150_0x57cdad,{createApp:_0x4a8ccf}=await import(_0x23c34c(0x70)),{createProjectNonInteractive:_0x39d6fd}=await import(_0x23c34c(0x80)),_0x305411=_0x58b636[_0x23c34c(0x89)]('name')[_0x23c34c(0x6a)]()||_0x58b636['args'][0x0]?.[_0x23c34c(0x6a)](),_0x3c3f44=_0x58b636[_0x23c34c(0x89)](_0x23c34c(0x93))||undefined,_0xa6b6d8=_0x58b636[_0x23c34c(0x89)](_0x23c34c(0x8a))||undefined;if(_0x58b636[_0x23c34c(0x74)]){if(!_0x305411)throw CliErrors[_0x23c34c(0x76)](_0x23c34c(0x79),_0x23c34c(0x6c)+CLI_BIN_NAME+'\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]');await _0x39d6fd(_0x305411,_0x3c3f44,_0xa6b6d8,_0x58b636[_0x23c34c(0x78)]);}else await _0x4a8ccf({'projectCode':_0x305411,'appCode':_0xa6b6d8,'env':_0x3c3f44,'cookie':_0x58b636[_0x23c34c(0x78)]});return{'ok':!![]};}},{'service':a150_0x57cdad(0x73),'command':a150_0x57cdad(0x81),'description':a150_0x57cdad(0x85),'risk':a150_0x57cdad(0x8b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0xe30bce){const _0x5a734c=a150_0x57cdad;return await upgradeApp(_0xe30bce[_0x5a734c(0x74)],{'yes':_0xe30bce[_0x5a734c(0x7d)](_0x5a734c(0x8e))}),{'ok':!![]};}}];