@lovrabet/rabetbase-cli 2.4.2 → 2.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (294) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/index.js +1 -1
  20. package/lib/commands/app/list.js +1 -1
  21. package/lib/commands/app/members-list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/shared.js +1 -1
  24. package/lib/commands/app-config/delete.js +1 -1
  25. package/lib/commands/app-config/get.js +1 -1
  26. package/lib/commands/app-config/index.js +1 -1
  27. package/lib/commands/app-config/list.js +1 -1
  28. package/lib/commands/app-config/set.js +1 -1
  29. package/lib/commands/app-config/shared.js +1 -1
  30. package/lib/commands/auth/index.js +1 -1
  31. package/lib/commands/bff/create.js +1 -1
  32. package/lib/commands/bff/delete.js +1 -1
  33. package/lib/commands/bff/detail.js +1 -1
  34. package/lib/commands/bff/index.js +1 -1
  35. package/lib/commands/bff/list.js +1 -1
  36. package/lib/commands/bff/pull.js +1 -1
  37. package/lib/commands/bff/push.js +1 -1
  38. package/lib/commands/bff/status.js +1 -1
  39. package/lib/commands/cli-skill/index.js +1 -1
  40. package/lib/commands/cli-update.js +1 -1
  41. package/lib/commands/codegen/index.js +1 -1
  42. package/lib/commands/codegen/sdk.js +1 -1
  43. package/lib/commands/codegen/sql.js +1 -1
  44. package/lib/commands/common/app-registry.js +1 -1
  45. package/lib/commands/common/app-selector.js +1 -1
  46. package/lib/commands/common/async-task.js +1 -1
  47. package/lib/commands/common/dry-run.js +1 -1
  48. package/lib/commands/common/flags.js +1 -1
  49. package/lib/commands/common/local-file.js +1 -1
  50. package/lib/commands/common/validate.js +1 -1
  51. package/lib/commands/config/get.js +1 -1
  52. package/lib/commands/config/index.js +1 -1
  53. package/lib/commands/config/list.js +1 -1
  54. package/lib/commands/config/set.js +1 -1
  55. package/lib/commands/config/shared.js +1 -1
  56. package/lib/commands/data/filter.js +1 -1
  57. package/lib/commands/data/getOne.js +1 -1
  58. package/lib/commands/data/index.js +1 -1
  59. package/lib/commands/data/shared.js +1 -1
  60. package/lib/commands/dataset/business-group-update.js +1 -1
  61. package/lib/commands/dataset/capability.js +1 -1
  62. package/lib/commands/dataset/delete.js +1 -1
  63. package/lib/commands/dataset/detail.js +1 -1
  64. package/lib/commands/dataset/extend-update.js +1 -1
  65. package/lib/commands/dataset/field-update.js +1 -1
  66. package/lib/commands/dataset/generate.js +1 -1
  67. package/lib/commands/dataset/index.js +1 -1
  68. package/lib/commands/dataset/list.js +1 -1
  69. package/lib/commands/dataset/operations.js +1 -1
  70. package/lib/commands/dataset/relation-audit.js +1 -1
  71. package/lib/commands/dataset/relation-create.js +1 -1
  72. package/lib/commands/dataset/relation-delete.js +1 -1
  73. package/lib/commands/dataset/relation-shared.js +1 -1
  74. package/lib/commands/dataset/relation-update.js +1 -1
  75. package/lib/commands/dataset/relations.js +1 -1
  76. package/lib/commands/dataset/rename.js +1 -1
  77. package/lib/commands/dataset/restore.js +1 -1
  78. package/lib/commands/db/analysis-batching.js +1 -1
  79. package/lib/commands/db/analyze-batch-plan.js +1 -1
  80. package/lib/commands/db/analyze-cancel.js +1 -1
  81. package/lib/commands/db/analyze-start.js +1 -1
  82. package/lib/commands/db/analyze-status.js +1 -1
  83. package/lib/commands/db/create.js +1 -1
  84. package/lib/commands/db/delete.js +1 -1
  85. package/lib/commands/db/detail.js +1 -1
  86. package/lib/commands/db/diff.js +1 -1
  87. package/lib/commands/db/index.js +1 -1
  88. package/lib/commands/db/list.js +1 -1
  89. package/lib/commands/db/shared.js +1 -1
  90. package/lib/commands/db/tables.js +1 -1
  91. package/lib/commands/db/test.js +1 -1
  92. package/lib/commands/db/update.js +1 -1
  93. package/lib/commands/doctor.js +1 -1
  94. package/lib/commands/file/index.js +1 -1
  95. package/lib/commands/init/index.js +1 -1
  96. package/lib/commands/issue/index.js +1 -1
  97. package/lib/commands/issue/nudge.js +1 -1
  98. package/lib/commands/issue/report.js +1 -1
  99. package/lib/commands/issue/shared.js +1 -1
  100. package/lib/commands/kb/create.js +1 -1
  101. package/lib/commands/kb/delete.js +1 -1
  102. package/lib/commands/kb/detail.js +1 -1
  103. package/lib/commands/kb/index.js +1 -1
  104. package/lib/commands/kb/list.js +1 -1
  105. package/lib/commands/kb/shared.js +1 -1
  106. package/lib/commands/kb/update.js +1 -1
  107. package/lib/commands/logs/index.js +1 -1
  108. package/lib/commands/menu/asset-update.js +1 -1
  109. package/lib/commands/menu/delete.js +1 -1
  110. package/lib/commands/menu/external-link-create.js +1 -1
  111. package/lib/commands/menu/external-link-update.js +1 -1
  112. package/lib/commands/menu/group-create.js +1 -1
  113. package/lib/commands/menu/group-update.js +1 -1
  114. package/lib/commands/menu/index.js +1 -1
  115. package/lib/commands/menu/list.js +1 -1
  116. package/lib/commands/menu/move.js +1 -1
  117. package/lib/commands/menu/regroup-start.js +1 -1
  118. package/lib/commands/menu/rename.js +1 -1
  119. package/lib/commands/menu/shared/compare-table.js +1 -1
  120. package/lib/commands/menu/shared/delete-plan.js +1 -1
  121. package/lib/commands/menu/shared/facts.js +1 -1
  122. package/lib/commands/menu/shared/index.js +1 -1
  123. package/lib/commands/menu/shared/inquirer.js +1 -1
  124. package/lib/commands/menu/shared/local-pages.js +1 -1
  125. package/lib/commands/menu/shared/logic.js +1 -1
  126. package/lib/commands/menu/shared/mutations.js +1 -1
  127. package/lib/commands/menu/shared/service.js +1 -1
  128. package/lib/commands/menu/shared/sync-core.js +1 -1
  129. package/lib/commands/menu/shared/update-core.js +1 -1
  130. package/lib/commands/menu/shared/valid-url.js +1 -1
  131. package/lib/commands/menu/sync.js +1 -1
  132. package/lib/commands/notification/config-list.js +1 -1
  133. package/lib/commands/notification/index.js +1 -1
  134. package/lib/commands/ocr/index.js +1 -1
  135. package/lib/commands/page/generate-start.js +1 -1
  136. package/lib/commands/page/generate-status.js +1 -1
  137. package/lib/commands/page/index.js +1 -1
  138. package/lib/commands/page/pull.js +1 -1
  139. package/lib/commands/page/push.js +1 -1
  140. package/lib/commands/page/react/create.js +1 -1
  141. package/lib/commands/page/react/detail.js +1 -1
  142. package/lib/commands/page/react/list.js +1 -1
  143. package/lib/commands/page/react/publish.js +1 -1
  144. package/lib/commands/page/react/shared.js +1 -1
  145. package/lib/commands/page/react/syntax.js +1 -1
  146. package/lib/commands/page/react/template.js +1 -1
  147. package/lib/commands/page/react/update.js +1 -1
  148. package/lib/commands/page/relation-audit.js +1 -1
  149. package/lib/commands/page/restore.js +1 -1
  150. package/lib/commands/page/shared.js +1 -1
  151. package/lib/commands/page/standard-page-status.js +1 -1
  152. package/lib/commands/page/sync.js +1 -1
  153. package/lib/commands/permit/index.js +1 -1
  154. package/lib/commands/permit/page-get.js +1 -1
  155. package/lib/commands/permit/page-set.js +1 -1
  156. package/lib/commands/permit/role-apis-set.js +1 -1
  157. package/lib/commands/permit/role-menus-set.js +1 -1
  158. package/lib/commands/permit/role-menus.js +1 -1
  159. package/lib/commands/permit/shared.js +1 -1
  160. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  161. package/lib/commands/project/create/format-elapsed.js +1 -1
  162. package/lib/commands/project/create/main.js +1 -1
  163. package/lib/commands/project/create/non-interactive.js +1 -1
  164. package/lib/commands/project/create/project-template-path.js +1 -1
  165. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  166. package/lib/commands/project/create/use-format-code.js +1 -1
  167. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  168. package/lib/commands/project/index.js +1 -1
  169. package/lib/commands/project/upgrade.js +1 -1
  170. package/lib/commands/registry.js +1 -1
  171. package/lib/commands/role/create.js +1 -1
  172. package/lib/commands/role/delete.js +1 -1
  173. package/lib/commands/role/detail.js +1 -1
  174. package/lib/commands/role/index.js +1 -1
  175. package/lib/commands/role/list.js +1 -1
  176. package/lib/commands/role/shared.js +1 -1
  177. package/lib/commands/role/update.js +1 -1
  178. package/lib/commands/role/user-add.js +1 -1
  179. package/lib/commands/role/user-remove.js +1 -1
  180. package/lib/commands/role/user-resolve.js +1 -1
  181. package/lib/commands/run/index.js +1 -1
  182. package/lib/commands/schema.js +1 -1
  183. package/lib/commands/sql/create.js +1 -1
  184. package/lib/commands/sql/delete.js +1 -1
  185. package/lib/commands/sql/detail.js +1 -1
  186. package/lib/commands/sql/exec.js +1 -1
  187. package/lib/commands/sql/index.js +1 -1
  188. package/lib/commands/sql/list.js +1 -1
  189. package/lib/commands/sql/pull.js +1 -1
  190. package/lib/commands/sql/push.js +1 -1
  191. package/lib/commands/sql/shared.js +1 -1
  192. package/lib/commands/sql/status.js +1 -1
  193. package/lib/commands/sql/validate.js +1 -1
  194. package/lib/commands/task/index.js +1 -1
  195. package/lib/commands/task/status.js +1 -1
  196. package/lib/commands/tenant/index.js +1 -1
  197. package/lib/commands/tenant/members-list.js +1 -1
  198. package/lib/commands/tenant/shared.js +1 -1
  199. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  200. package/lib/commands/user-account/index.js +1 -1
  201. package/lib/commands/workspace/add.js +1 -1
  202. package/lib/commands/workspace/index.js +1 -1
  203. package/lib/commands/workspace/remove.js +1 -1
  204. package/lib/config/schema.js +1 -1
  205. package/lib/constant/cdn.js +1 -1
  206. package/lib/constant/cli.js +1 -1
  207. package/lib/constant/defaults.js +1 -1
  208. package/lib/constant/domain.js +1 -1
  209. package/lib/constant/env.js +1 -1
  210. package/lib/constant/output.js +1 -1
  211. package/lib/constant/paths.js +1 -1
  212. package/lib/constant/risk.js +1 -1
  213. package/lib/context/app-resolver.js +1 -1
  214. package/lib/context/auth-resolver.js +1 -1
  215. package/lib/context/config-loader.js +1 -1
  216. package/lib/context.js +1 -1
  217. package/lib/core/alias-resolver.js +1 -1
  218. package/lib/core/api-client.js +1 -1
  219. package/lib/core/bff/config.js +1 -1
  220. package/lib/core/bff/file-system.js +1 -1
  221. package/lib/core/bff/hash.js +1 -1
  222. package/lib/core/bff/lock.js +1 -1
  223. package/lib/core/bff/utils.js +1 -1
  224. package/lib/core/db-resolver.js +1 -1
  225. package/lib/core/page/file-system.js +1 -1
  226. package/lib/core/page/hash.js +1 -1
  227. package/lib/core/page/lock.js +1 -1
  228. package/lib/core/sql-index-auditor.js +1 -1
  229. package/lib/core/sql-sync/config.js +1 -1
  230. package/lib/core/sql-sync/file-system.js +1 -1
  231. package/lib/core/sql-sync/hash.js +1 -1
  232. package/lib/core/sql-sync/lock.js +1 -1
  233. package/lib/core/sql-sync/utils.js +1 -1
  234. package/lib/core/sql-validator.js +1 -1
  235. package/lib/errors.js +1 -1
  236. package/lib/framework/build-all-flags.js +1 -1
  237. package/lib/framework/error-output.js +1 -1
  238. package/lib/framework/explicit-yes.js +1 -1
  239. package/lib/framework/flags.js +1 -1
  240. package/lib/framework/help.js +1 -1
  241. package/lib/framework/index.js +1 -1
  242. package/lib/framework/output.js +1 -1
  243. package/lib/framework/response.js +1 -1
  244. package/lib/framework/runner-alias.js +1 -1
  245. package/lib/framework/runner.js +1 -1
  246. package/lib/framework/schema-export.js +1 -1
  247. package/lib/framework/types.js +1 -1
  248. package/lib/generated/build-info.d.ts +4 -4
  249. package/lib/generated/build-info.js +1 -1
  250. package/lib/help.js +1 -1
  251. package/lib/postinstall.js +1 -1
  252. package/lib/runtime/confirmation.js +1 -1
  253. package/lib/runtime/event.js +1 -1
  254. package/lib/runtime/index.js +1 -1
  255. package/lib/runtime/queue.js +1 -1
  256. package/lib/runtime/resolve.js +1 -1
  257. package/lib/skills/builtin-skill.js +1 -1
  258. package/lib/skills/main.js +1 -1
  259. package/lib/skills/npx-skills-add.js +1 -1
  260. package/lib/skills/skill-presence.js +1 -1
  261. package/lib/telemetry/cli-command-trace.js +1 -1
  262. package/lib/telemetry/cli-help-trace.js +1 -1
  263. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  264. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  265. package/lib/telemetry/send-cli-trace-log.js +1 -1
  266. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  267. package/lib/utils/ai_config.js +1 -1
  268. package/lib/utils/apply-jq-filter.js +1 -1
  269. package/lib/utils/cdn-config.js +1 -1
  270. package/lib/utils/check-sdk-version.js +1 -1
  271. package/lib/utils/cli-version-check.js +1 -1
  272. package/lib/utils/cli-version-policy.js +1 -1
  273. package/lib/utils/config.js +1 -1
  274. package/lib/utils/copy-directory.js +1 -1
  275. package/lib/utils/entity-with-id.js +1 -1
  276. package/lib/utils/file-utils.js +1 -1
  277. package/lib/utils/guides-cdn.js +1 -1
  278. package/lib/utils/http-client.js +1 -1
  279. package/lib/utils/is-non-interactive.js +1 -1
  280. package/lib/utils/logger.js +1 -1
  281. package/lib/utils/params.js +1 -1
  282. package/lib/utils/platform.js +1 -1
  283. package/lib/utils/rules-cdn.js +1 -1
  284. package/lib/utils/sleep.js +1 -1
  285. package/lib/utils/template-replacer.js +1 -1
  286. package/lib/utils/update-notice.js +1 -1
  287. package/lib/utils/version.js +1 -1
  288. package/lib/utils/with-active-cookie.js +1 -1
  289. package/lib/utils/write-cli-side-channel.js +1 -1
  290. package/package.json +8 -4
  291. package/skills/rabetbase/SKILL.md +1 -1
  292. package/skills/rabetbase/guides/react-custom-page-workflow.md +9 -3
  293. package/skills/rabetbase/knowledge/react-page/generation-standards.md +13 -2
  294. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- const a156_0x93d30d=a156_0x52a2;(function(_0x1734be,_0x31042e){const _0x49a17d=a156_0x52a2,_0x471273=_0x1734be();while(!![]){try{const _0x34f1c1=-parseInt(_0x49a17d(0x1cf))/0x1+-parseInt(_0x49a17d(0x1d6))/0x2+parseInt(_0x49a17d(0x1dc))/0x3*(parseInt(_0x49a17d(0x1c3))/0x4)+-parseInt(_0x49a17d(0x1ba))/0x5*(-parseInt(_0x49a17d(0x1be))/0x6)+parseInt(_0x49a17d(0x1c4))/0x7+parseInt(_0x49a17d(0x1da))/0x8*(parseInt(_0x49a17d(0x1b7))/0x9)+parseInt(_0x49a17d(0x1cc))/0xa;if(_0x34f1c1===_0x31042e)break;else _0x471273['push'](_0x471273['shift']());}catch(_0x5110f9){_0x471273['push'](_0x471273['shift']());}}}(a156_0x5373,0x2f390));import{getRoleApiResources,updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a156_0x52a2(_0x4f35c5,_0x1f74eb){_0x4f35c5=_0x4f35c5-0x1b7;const _0x537307=a156_0x5373();let _0x52a23f=_0x537307[_0x4f35c5];return _0x52a23f;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a156_0x5373(){const _0x18d9ab=['has','Revoked\x20API\x20access\x20for\x20','330743WfgXLc','action','get','datasets','revoke','POST','flagMissing','737036sfiZHD','roleName','\x20dataset(s)\x20on\x20role\x20','join','232mIKcAf','length','434865QSGSoh','str','validation','96597KphVSC','/smartapi/permit/role/update','Pass\x20--datasets\x20<datasetCode,...>.','1490TUkRPg','API','api-revoke','bool','1182xlOAzS','selector','role-apis-set\x20currently\x20supports\x20revoking\x20dataset\x20API\x20access\x20(use\x20case\x204).','filter','set','4xmtAeT','349461xlIJrt','role-apis-set','permit','Unknown\x20datasetCode(s)\x20for\x20this\x20role\x27s\x20API\x20resources:\x20','push','appCode','Missing\x20--revoke.','Revoke\x20a\x20role\x27s\x20dataset\x20API\x20access\x20by\x20datasetCode\x20(roleType\x20API);\x20requires\x20--yes','3278440mlyqNB'];a156_0x5373=function(){return _0x18d9ab;};return a156_0x5373();}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=a156_0x93d30d(0x1b8);async function buildPlan(_0x749f9e,_0xf1d2c2){const _0x6048b5=a156_0x93d30d,_0x1d6830=await resolveRoleRef(_0x749f9e[_0x6048b5(0x1c9)],readRoleRef(_0x749f9e));assertPermConfigurable(_0x1d6830);if(!_0x749f9e['bool'](_0x6048b5(0x1d3)))throw CliErrors['validation'](_0x6048b5(0x1ca),_0x6048b5(0x1c0));const _0x33a97b=splitList(_0x749f9e[_0x6048b5(0x1dd)](_0x6048b5(0x1d2)));if(_0x33a97b[_0x6048b5(0x1db)]===0x0)throw CliErrors[_0x6048b5(0x1d5)](_0x6048b5(0x1d2),_0x6048b5(0x1b9));const _0x2eee97=await getRoleApiResources(_0x749f9e[_0x6048b5(0x1c9)],_0x1d6830['id']),{byCode:_0x1456db,byDataset:_0x3e7d1e}=flattenApiResources(_0x2eee97),_0x40915b=_0x33a97b[_0x6048b5(0x1c1)](_0x200b2b=>!_0x3e7d1e[_0x6048b5(0x1cd)](_0x200b2b));if(_0x40915b[_0x6048b5(0x1db)]>0x0)throw CliErrors[_0x6048b5(0x1de)](_0x6048b5(0x1c7)+_0x40915b[_0x6048b5(0x1d9)](',\x20')+'.','Verify\x20the\x20datasetCode,\x20or\x20check\x20the\x20role\x27s\x20API\x20resource\x20matrix.');const _0x142655=new Map(),_0x2629c5=[],_0x1bfbda=[];for(const _0x391fac of _0x33a97b){for(const _0x2c0308 of _0x3e7d1e[_0x6048b5(0x1d1)](_0x391fac)){const _0x3a62b2=_0x1456db[_0x6048b5(0x1d1)](_0x2c0308);_0x142655[_0x6048b5(0x1c2)](_0x2c0308,'0'),_0x2629c5[_0x6048b5(0x1c8)]({'resourceCode':_0x2c0308,'datasetCode':_0x391fac,'action':_0x3a62b2[_0x6048b5(0x1d0)]}),_0x1bfbda[_0x6048b5(0x1c8)]({'resourceCode':_0x2c0308,'datasetCode':_0x391fac,'action':'0'});}}const _0x3319f6=buildPermits(_0x1456db,_0x142655),_0x55b0fa={'operation':_0x6048b5(0x1bc),'selector':{'appCode':_0x749f9e[_0x6048b5(0x1c9)],'roleId':_0x1d6830['id'],'roleName':_0x1d6830[_0x6048b5(0x1d7)],'datasetCodes':_0x33a97b},'before':_0x2629c5,'after':_0x1bfbda,'dryRun':_0xf1d2c2,'backend':{'method':'POST','path':UPDATE_PATH,'roleType':_0x6048b5(0x1bb)},'warnings':[]};return{'role':_0x1d6830,'permits':_0x3319f6,'mutation':_0x55b0fa};}export const permitRoleApisSet={'service':a156_0x93d30d(0x1c6),'command':a156_0x93d30d(0x1c5),'description':a156_0x93d30d(0x1cb),'risk':'high-risk-write','flags':[ROLE_REF_FLAG,REVOKE_FLAG,DATASETS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4f3bfc){const _0x458b76=a156_0x93d30d;if(!_0x4f3bfc[_0x458b76(0x1bd)](_0x458b76(0x1d3)))throw CliErrors['validation'](_0x458b76(0x1ca),_0x458b76(0x1c0));if(splitList(_0x4f3bfc[_0x458b76(0x1dd)](_0x458b76(0x1d2)))[_0x458b76(0x1db)]===0x0)throw CliErrors[_0x458b76(0x1d5)](_0x458b76(0x1d2),'Pass\x20--datasets\x20<datasetCode,...>.');},async 'dryRun'(_0x41995b){const _0x31108e=a156_0x93d30d,{mutation:_0x4070ae}=await buildPlan(_0x41995b,!![]);return asDryRunResult(_0x4070ae,{'method':_0x31108e(0x1d4),'url':UPDATE_PATH});},async 'execute'(_0x16d78b){const _0x4d0157=a156_0x93d30d,{role:_0xe189a0,permits:_0x56e6a7,mutation:_0x4ced8b}=await buildPlan(_0x16d78b,![]);return await updateAppRole({'id':_0xe189a0['id'],'appCode':_0x16d78b[_0x4d0157(0x1c9)],'roleType':_0x4d0157(0x1bb),'permits':_0x56e6a7}),{'ok':!![],'data':_0x4ced8b,'message':_0x4d0157(0x1ce)+_0x4ced8b[_0x4d0157(0x1bf)]['datasetCodes'][_0x4d0157(0x1db)]+_0x4d0157(0x1d8)+_0xe189a0[_0x4d0157(0x1d7)]};}};
1
+ const a156_0x5cf349=a156_0x362b;(function(_0x4cd257,_0x35c401){const _0x229fcf=a156_0x362b,_0x4a4c42=_0x4cd257();while(!![]){try{const _0x426694=-parseInt(_0x229fcf(0x1c2))/0x1+parseInt(_0x229fcf(0x1ba))/0x2+parseInt(_0x229fcf(0x1ca))/0x3*(parseInt(_0x229fcf(0x1d0))/0x4)+parseInt(_0x229fcf(0x1c3))/0x5*(-parseInt(_0x229fcf(0x1ac))/0x6)+-parseInt(_0x229fcf(0x1bc))/0x7*(parseInt(_0x229fcf(0x1b7))/0x8)+parseInt(_0x229fcf(0x1b6))/0x9+parseInt(_0x229fcf(0x1af))/0xa;if(_0x426694===_0x35c401)break;else _0x4a4c42['push'](_0x4a4c42['shift']());}catch(_0x12c15b){_0x4a4c42['push'](_0x4a4c42['shift']());}}}(a156_0x4b21,0x3bf6b));import{getRoleApiResources,updateAppRole}from'../../core/api-client.js';function a156_0x362b(_0xebe6f8,_0x3ba43a){_0xebe6f8=_0xebe6f8-0x1aa;const _0x4b2158=a156_0x4b21();let _0x362ba8=_0x4b2158[_0xebe6f8];return _0x362ba8;}function a156_0x4b21(){const _0x5e75b6=['selector','str','Missing\x20--revoke.','Verify\x20the\x20datasetCode,\x20or\x20check\x20the\x20role\x27s\x20API\x20resource\x20matrix.','Revoke\x20a\x20role\x27s\x20dataset\x20API\x20access\x20by\x20datasetCode\x20(roleType\x20API);\x20requires\x20--yes','352458YliujY','3000UNrBuX','bool','get','745736bKofuh','Pass\x20--datasets\x20<datasetCode,...>.','4592cDnhmr','length','filter','push','permit','join','323448IqQqkG','35WPWOVb','flagMissing','POST','action','datasets','/smartapi/permit/role/update','roleName','1518McfRgh','Unknown\x20datasetCode(s)\x20for\x20this\x20role\x27s\x20API\x20resources:\x20','appCode','\x20dataset(s)\x20on\x20role\x20','role-apis-set','high-risk-write','3512DidlSb','validation','API','117132dbLZgr','set','role-apis-set\x20currently\x20supports\x20revoking\x20dataset\x20API\x20access\x20(use\x20case\x204).','954150osiEQn','revoke'];a156_0x4b21=function(){return _0x5e75b6;};return a156_0x4b21();}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{buildPermits,DATASETS_FLAG,flattenApiResources,readRoleRef,REVOKE_FLAG,ROLE_REF_FLAG,splitList}from'../../commands/permit/shared.js';import{assertPermConfigurable,resolveRoleRef}from'../../commands/role/shared.js';const UPDATE_PATH=a156_0x5cf349(0x1c8);async function buildPlan(_0x31ffd3,_0x4204bc){const _0x38677d=a156_0x5cf349,_0x19fb55=await resolveRoleRef(_0x31ffd3['appCode'],readRoleRef(_0x31ffd3));assertPermConfigurable(_0x19fb55);if(!_0x31ffd3['bool'](_0x38677d(0x1b0)))throw CliErrors['validation'](_0x38677d(0x1b3),_0x38677d(0x1ae));const _0xba7087=splitList(_0x31ffd3[_0x38677d(0x1b2)](_0x38677d(0x1c7)));if(_0xba7087[_0x38677d(0x1bd)]===0x0)throw CliErrors[_0x38677d(0x1c4)](_0x38677d(0x1c7),_0x38677d(0x1bb));const _0x1dc3f3=await getRoleApiResources(_0x31ffd3[_0x38677d(0x1cc)],_0x19fb55['id']),{byCode:_0x160948,byDataset:_0x2d4385}=flattenApiResources(_0x1dc3f3),_0x6338ee=_0xba7087[_0x38677d(0x1be)](_0x5189ed=>!_0x2d4385['has'](_0x5189ed));if(_0x6338ee[_0x38677d(0x1bd)]>0x0)throw CliErrors[_0x38677d(0x1aa)](_0x38677d(0x1cb)+_0x6338ee[_0x38677d(0x1c1)](',\x20')+'.',_0x38677d(0x1b4));const _0x10a3b7=new Map(),_0x236e93=[],_0x164200=[];for(const _0x46f137 of _0xba7087){for(const _0x338137 of _0x2d4385[_0x38677d(0x1b9)](_0x46f137)){const _0xe8cb68=_0x160948[_0x38677d(0x1b9)](_0x338137);_0x10a3b7[_0x38677d(0x1ad)](_0x338137,'0'),_0x236e93[_0x38677d(0x1bf)]({'resourceCode':_0x338137,'datasetCode':_0x46f137,'action':_0xe8cb68[_0x38677d(0x1c6)]}),_0x164200['push']({'resourceCode':_0x338137,'datasetCode':_0x46f137,'action':'0'});}}const _0x34d22c=buildPermits(_0x160948,_0x10a3b7),_0x10d573={'operation':'api-revoke','selector':{'appCode':_0x31ffd3[_0x38677d(0x1cc)],'roleId':_0x19fb55['id'],'roleName':_0x19fb55['roleName'],'datasetCodes':_0xba7087},'before':_0x236e93,'after':_0x164200,'dryRun':_0x4204bc,'backend':{'method':_0x38677d(0x1c5),'path':UPDATE_PATH,'roleType':_0x38677d(0x1ab)},'warnings':[]};return{'role':_0x19fb55,'permits':_0x34d22c,'mutation':_0x10d573};}export const permitRoleApisSet={'service':a156_0x5cf349(0x1c0),'command':a156_0x5cf349(0x1ce),'description':a156_0x5cf349(0x1b5),'risk':a156_0x5cf349(0x1cf),'flags':[ROLE_REF_FLAG,REVOKE_FLAG,DATASETS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x6719b1){const _0xdc9805=a156_0x5cf349;if(!_0x6719b1[_0xdc9805(0x1b8)](_0xdc9805(0x1b0)))throw CliErrors[_0xdc9805(0x1aa)]('Missing\x20--revoke.',_0xdc9805(0x1ae));if(splitList(_0x6719b1[_0xdc9805(0x1b2)]('datasets'))[_0xdc9805(0x1bd)]===0x0)throw CliErrors['flagMissing'](_0xdc9805(0x1c7),_0xdc9805(0x1bb));},async 'dryRun'(_0x389d4c){const _0x903c35=a156_0x5cf349,{mutation:_0x246b65}=await buildPlan(_0x389d4c,!![]);return asDryRunResult(_0x246b65,{'method':_0x903c35(0x1c5),'url':UPDATE_PATH});},async 'execute'(_0x123a42){const _0x158042=a156_0x5cf349,{role:_0x256be9,permits:_0x56e241,mutation:_0x38ac86}=await buildPlan(_0x123a42,![]);return await updateAppRole({'id':_0x256be9['id'],'appCode':_0x123a42['appCode'],'roleType':_0x158042(0x1ab),'permits':_0x56e241}),{'ok':!![],'data':_0x38ac86,'message':'Revoked\x20API\x20access\x20for\x20'+_0x38ac86[_0x158042(0x1b1)]['datasetCodes'][_0x158042(0x1bd)]+_0x158042(0x1cd)+_0x256be9[_0x158042(0x1c9)]};}};
@@ -1 +1 @@
1
- const a157_0x1fb3b1=a157_0x43e1;function a157_0x43e1(_0x3b50cd,_0x2dd493){_0x3b50cd=_0x3b50cd-0x165;const _0x19e5d4=a157_0x19e5();let _0x43e124=_0x19e5d4[_0x3b50cd];return _0x43e124;}(function(_0x1e4d54,_0x2cbbfe){const _0x467521=a157_0x43e1,_0x42d3aa=_0x1e4d54();while(!![]){try{const _0x3c55d0=-parseInt(_0x467521(0x17c))/0x1+parseInt(_0x467521(0x170))/0x2+-parseInt(_0x467521(0x17a))/0x3*(-parseInt(_0x467521(0x185))/0x4)+-parseInt(_0x467521(0x175))/0x5*(-parseInt(_0x467521(0x16b))/0x6)+parseInt(_0x467521(0x173))/0x7*(parseInt(_0x467521(0x165))/0x8)+-parseInt(_0x467521(0x17e))/0x9+-parseInt(_0x467521(0x16d))/0xa;if(_0x3c55d0===_0x2cbbfe)break;else _0x42d3aa['push'](_0x42d3aa['shift']());}catch(_0x3b6d6e){_0x42d3aa['push'](_0x42d3aa['shift']());}}}(a157_0x19e5,0xd6889));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';function a157_0x19e5(){const _0x53bd2c=['join','7168vdyeqP','PAGE','5CoWtfB','appCode','POST','/smartapi/permit/role/update','Unknown\x20menu\x20resourceCode(s):\x20','10371ggxelB','roleName','529239hXtxsL','role-menus-set','8249643LDNvae','Grant\x20or\x20revoke\x20a\x20role\x27s\x20menu\x20access\x20by\x20resourceCode\x20(roleType\x20PAGE);\x20requires\x20--yes','Pass\x20--menus\x20<resourceCode,...>.','filter','\x20menu\x20permit(s)\x20for\x20role\x20','get','str','2020DDVmxh','1280liMvhX','has','validation','access','menus','Updated\x20','7195242kXRSlA','length','11173500qXJCLp','push','Run\x20`permit\x20role-menus\x20--role\x20<id>`\x20to\x20see\x20valid\x20resourceCodes.','666226mKNpxO','selector'];a157_0x19e5=function(){return _0x53bd2c;};return a157_0x19e5();}import{assertPermConfigurable,resolveRoleRef}from'../../commands/role/shared.js';const UPDATE_PATH=a157_0x1fb3b1(0x178);async function buildPlan(_0x1bc089,_0x4d0752){const _0x3e820c=a157_0x1fb3b1,_0x410c31=await resolveRoleRef(_0x1bc089['appCode'],readRoleRef(_0x1bc089));assertPermConfigurable(_0x410c31);const _0x3a29b6=readGrantRevoke(_0x1bc089),_0x8a7ea6=splitList(_0x1bc089['str'](_0x3e820c(0x169)));if(_0x8a7ea6[_0x3e820c(0x16c)]===0x0)throw CliErrors['flagMissing'](_0x3e820c(0x169),_0x3e820c(0x180));const _0x183033=await getRoleMenuResources(_0x1bc089['appCode'],_0x410c31['id']),_0x83e1e8=flattenMenuResources(_0x183033),_0x1236b7=_0x8a7ea6[_0x3e820c(0x181)](_0x26d63c=>!_0x83e1e8[_0x3e820c(0x166)](_0x26d63c));if(_0x1236b7['length']>0x0)throw CliErrors[_0x3e820c(0x167)](_0x3e820c(0x179)+_0x1236b7[_0x3e820c(0x172)](',\x20')+'.',_0x3e820c(0x16f));const _0x269fcd=new Map(),_0x5de69b=[],_0x437fed=[];for(const _0x4c0f12 of _0x8a7ea6){const _0x1486e9=_0x83e1e8[_0x3e820c(0x183)](_0x4c0f12);_0x269fcd['set'](_0x4c0f12,_0x3a29b6),_0x5de69b['push']({'resourceCode':_0x4c0f12,'action':_0x1486e9['action']}),_0x437fed[_0x3e820c(0x16e)]({'resourceCode':_0x4c0f12,'action':_0x3a29b6});}const _0x48d1d=buildPermits(_0x83e1e8,_0x269fcd),_0x46156f={'operation':_0x3a29b6===_0x3e820c(0x168)?'menu-grant':'menu-revoke','selector':{'appCode':_0x1bc089[_0x3e820c(0x176)],'roleId':_0x410c31['id'],'roleName':_0x410c31[_0x3e820c(0x17b)],'resourceCodes':_0x8a7ea6},'before':_0x5de69b,'after':_0x437fed,'dryRun':_0x4d0752,'backend':{'method':_0x3e820c(0x177),'path':UPDATE_PATH,'roleType':_0x3e820c(0x174)},'warnings':[]};return{'role':_0x410c31,'permits':_0x48d1d,'mutation':_0x46156f};}export const permitRoleMenusSet={'service':'permit','command':a157_0x1fb3b1(0x17d),'description':a157_0x1fb3b1(0x17f),'risk':'high-risk-write','flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,MENUS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x404de9){const _0x569b15=a157_0x1fb3b1;readGrantRevoke(_0x404de9);if(splitList(_0x404de9[_0x569b15(0x184)](_0x569b15(0x169)))['length']===0x0)throw CliErrors['flagMissing']('menus',_0x569b15(0x180));},async 'dryRun'(_0x367eca){const _0x17f4da=a157_0x1fb3b1,{mutation:_0x3174a2}=await buildPlan(_0x367eca,!![]);return asDryRunResult(_0x3174a2,{'method':_0x17f4da(0x177),'url':UPDATE_PATH});},async 'execute'(_0xf97a17){const _0x32f4d3=a157_0x1fb3b1,{role:_0x2be1d8,permits:_0x13df62,mutation:_0x412fef}=await buildPlan(_0xf97a17,![]);return await updateAppRole({'id':_0x2be1d8['id'],'appCode':_0xf97a17[_0x32f4d3(0x176)],'roleType':_0x32f4d3(0x174),'permits':_0x13df62}),{'ok':!![],'data':_0x412fef,'message':_0x32f4d3(0x16a)+_0x412fef[_0x32f4d3(0x171)]['resourceCodes'][_0x32f4d3(0x16c)]+_0x32f4d3(0x182)+_0x2be1d8['roleName']};}};
1
+ function a157_0x88c0(_0x38440b,_0x44e342){_0x38440b=_0x38440b-0x1a3;const _0x34529b=a157_0x3452();let _0x88c010=_0x34529b[_0x38440b];return _0x88c010;}const a157_0x46473a=a157_0x88c0;(function(_0x301fd5,_0x2a2150){const _0x2b45bd=a157_0x88c0,_0x504325=_0x301fd5();while(!![]){try{const _0x291dc6=parseInt(_0x2b45bd(0x1b3))/0x1*(-parseInt(_0x2b45bd(0x1b2))/0x2)+-parseInt(_0x2b45bd(0x1a9))/0x3*(-parseInt(_0x2b45bd(0x1b6))/0x4)+-parseInt(_0x2b45bd(0x1bb))/0x5+parseInt(_0x2b45bd(0x1ba))/0x6+parseInt(_0x2b45bd(0x1ae))/0x7*(parseInt(_0x2b45bd(0x1bc))/0x8)+parseInt(_0x2b45bd(0x1a6))/0x9*(parseInt(_0x2b45bd(0x1a4))/0xa)+parseInt(_0x2b45bd(0x1bf))/0xb;if(_0x291dc6===_0x2a2150)break;else _0x504325['push'](_0x504325['shift']());}catch(_0x596d21){_0x504325['push'](_0x504325['shift']());}}}(a157_0x3452,0xed1b0));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=a157_0x46473a(0x1af);async function buildPlan(_0x198a9a,_0x4ef081){const _0x1fd4eb=a157_0x46473a,_0x139d5b=await resolveRoleRef(_0x198a9a[_0x1fd4eb(0x1a5)],readRoleRef(_0x198a9a));assertPermConfigurable(_0x139d5b);const _0x22f658=readGrantRevoke(_0x198a9a),_0x32ce24=splitList(_0x198a9a[_0x1fd4eb(0x1b8)]('menus'));if(_0x32ce24['length']===0x0)throw CliErrors[_0x1fd4eb(0x1aa)](_0x1fd4eb(0x1ab),'Pass\x20--menus\x20<resourceCode,...>.');const _0x4c3cf5=await getRoleMenuResources(_0x198a9a[_0x1fd4eb(0x1a5)],_0x139d5b['id']),_0x1dc0ba=flattenMenuResources(_0x4c3cf5),_0x27d1=_0x32ce24[_0x1fd4eb(0x1b7)](_0x2c8573=>!_0x1dc0ba[_0x1fd4eb(0x1a3)](_0x2c8573));if(_0x27d1[_0x1fd4eb(0x1a7)]>0x0)throw CliErrors['validation']('Unknown\x20menu\x20resourceCode(s):\x20'+_0x27d1[_0x1fd4eb(0x1ad)](',\x20')+'.',_0x1fd4eb(0x1a8));const _0x26ef4a=new Map(),_0xcdf196=[],_0x4ed77a=[];for(const _0xf04ec4 of _0x32ce24){const _0x45cf87=_0x1dc0ba['get'](_0xf04ec4);_0x26ef4a['set'](_0xf04ec4,_0x22f658),_0xcdf196['push']({'resourceCode':_0xf04ec4,'action':_0x45cf87[_0x1fd4eb(0x1c3)]}),_0x4ed77a[_0x1fd4eb(0x1b0)]({'resourceCode':_0xf04ec4,'action':_0x22f658});}const _0x57f197=buildPermits(_0x1dc0ba,_0x26ef4a),_0x3fd3ed={'operation':_0x22f658===_0x1fd4eb(0x1b4)?'menu-grant':'menu-revoke','selector':{'appCode':_0x198a9a[_0x1fd4eb(0x1a5)],'roleId':_0x139d5b['id'],'roleName':_0x139d5b[_0x1fd4eb(0x1b1)],'resourceCodes':_0x32ce24},'before':_0xcdf196,'after':_0x4ed77a,'dryRun':_0x4ef081,'backend':{'method':_0x1fd4eb(0x1c2),'path':UPDATE_PATH,'roleType':'PAGE'},'warnings':[]};return{'role':_0x139d5b,'permits':_0x57f197,'mutation':_0x3fd3ed};}export const permitRoleMenusSet={'service':'permit','command':a157_0x46473a(0x1ac),'description':a157_0x46473a(0x1be),'risk':'high-risk-write','flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,MENUS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3d1614){const _0x267942=a157_0x46473a;readGrantRevoke(_0x3d1614);if(splitList(_0x3d1614['str'](_0x267942(0x1ab)))[_0x267942(0x1a7)]===0x0)throw CliErrors['flagMissing']('menus','Pass\x20--menus\x20<resourceCode,...>.');},async 'dryRun'(_0x3e5743){const _0x60bc89=a157_0x46473a,{mutation:_0x373d56}=await buildPlan(_0x3e5743,!![]);return asDryRunResult(_0x373d56,{'method':_0x60bc89(0x1c2),'url':UPDATE_PATH});},async 'execute'(_0x15de14){const _0x1ee9e3=a157_0x46473a,{role:_0x47b3e7,permits:_0x45564c,mutation:_0x26aa18}=await buildPlan(_0x15de14,![]);return await updateAppRole({'id':_0x47b3e7['id'],'appCode':_0x15de14[_0x1ee9e3(0x1a5)],'roleType':_0x1ee9e3(0x1bd),'permits':_0x45564c}),{'ok':!![],'data':_0x26aa18,'message':_0x1ee9e3(0x1b5)+_0x26aa18[_0x1ee9e3(0x1b9)][_0x1ee9e3(0x1c0)][_0x1ee9e3(0x1a7)]+_0x1ee9e3(0x1c1)+_0x47b3e7['roleName']};}};function a157_0x3452(){const _0x27c18c=['str','selector','3287064kXMsvu','7083155DxAqMx','8hBhzPw','PAGE','Grant\x20or\x20revoke\x20a\x20role\x27s\x20menu\x20access\x20by\x20resourceCode\x20(roleType\x20PAGE);\x20requires\x20--yes','5623992PUHFWl','resourceCodes','\x20menu\x20permit(s)\x20for\x20role\x20','POST','action','has','22390rlySPd','appCode','6093BcYtbS','length','Run\x20`permit\x20role-menus\x20--role\x20<id>`\x20to\x20see\x20valid\x20resourceCodes.','1442454eCEklA','flagMissing','menus','role-menus-set','join','5585713aehSlp','/smartapi/permit/role/update','push','roleName','2931762JEtMDc','1NfnWcY','access','Updated\x20','4FDLucL','filter'];a157_0x3452=function(){return _0x27c18c;};return a157_0x3452();}
@@ -1 +1 @@
1
- function a158_0x326d(){const _0x32fada=['allowed','467264tqtEkH','read','resourceName','1037330wMwqJt','values','Role\x20','303240WbgbNR','298026yhpGKv','from','roleName','9plJzVm','45WBHzmx','appCode','role-menus','permit','access','length','1485930uZyyBN','\x20has\x20','1505571iTJpys','action','315stbDEl','map','86736WVvNtW','\x20menu(s)\x20allowed'];a158_0x326d=function(){return _0x32fada;};return a158_0x326d();}const a158_0x18aaec=a158_0x408c;(function(_0x260f68,_0x5a8026){const _0x37fca4=a158_0x408c,_0x3e9768=_0x260f68();while(!![]){try{const _0x391db3=parseInt(_0x37fca4(0xe4))/0x1+-parseInt(_0x37fca4(0xe7))/0x2+parseInt(_0x37fca4(0xdd))/0x3+-parseInt(_0x37fca4(0xd0))/0x4+-parseInt(_0x37fca4(0xd5))/0x5*(parseInt(_0x37fca4(0xd1))/0x6)+parseInt(_0x37fca4(0xdf))/0x7*(parseInt(_0x37fca4(0xe1))/0x8)+-parseInt(_0x37fca4(0xd4))/0x9*(parseInt(_0x37fca4(0xdb))/0xa);if(_0x391db3===_0x5a8026)break;else _0x3e9768['push'](_0x3e9768['shift']());}catch(_0x2d8ffd){_0x3e9768['push'](_0x3e9768['shift']());}}}(a158_0x326d,0x41298));import{getRoleMenuResources}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{flattenMenuResources,readRoleRef,ROLE_REF_FLAG}from'../../commands/permit/shared.js';import{resolveRoleRef}from'../../commands/role/shared.js';function a158_0x408c(_0x298754,_0x727b1f){_0x298754=_0x298754-0xce;const _0x326d21=a158_0x326d();let _0x408cda=_0x326d21[_0x298754];return _0x408cda;}export const permitRoleMenus={'service':a158_0x18aaec(0xd8),'command':a158_0x18aaec(0xd7),'description':'Show\x20a\x20role\x27s\x20current\x20menu\x20permission\x20matrix','risk':a158_0x18aaec(0xe5),'flags':[ROLE_REF_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x3280bd){const _0x43b654=a158_0x18aaec,_0x285018=await resolveRoleRef(_0x3280bd['appCode'],readRoleRef(_0x3280bd)),_0x131c38=await getRoleMenuResources(_0x3280bd[_0x43b654(0xd6)],_0x285018['id']),_0x277ad8=flattenMenuResources(_0x131c38),_0x3b42dd=Array[_0x43b654(0xd2)](_0x277ad8[_0x43b654(0xce)]())[_0x43b654(0xe0)](_0x2e4ab6=>({'resourceCode':_0x2e4ab6['resourceCode'],'resourceName':_0x2e4ab6[_0x43b654(0xe6)],'allowed':_0x2e4ab6[_0x43b654(0xde)]===_0x43b654(0xd9),'action':_0x2e4ab6[_0x43b654(0xde)]}));return{'ok':!![],'data':{'selector':{'appCode':_0x3280bd[_0x43b654(0xd6)],'roleId':_0x285018['id'],'roleName':_0x285018[_0x43b654(0xd3)]},'menus':_0x3b42dd},'message':_0x43b654(0xcf)+_0x285018[_0x43b654(0xd3)]+_0x43b654(0xdc)+_0x3b42dd['filter'](_0x1a480b=>_0x1a480b[_0x43b654(0xe3)])[_0x43b654(0xda)]+'/'+_0x3b42dd[_0x43b654(0xda)]+_0x43b654(0xe2)};}};
1
+ const a158_0x1a919f=a158_0x19f8;(function(_0x435fe1,_0x1af6d3){const _0x2e23b0=a158_0x19f8,_0x339f08=_0x435fe1();while(!![]){try{const _0x29c516=parseInt(_0x2e23b0(0xae))/0x1*(parseInt(_0x2e23b0(0xb0))/0x2)+parseInt(_0x2e23b0(0xbe))/0x3+parseInt(_0x2e23b0(0xb1))/0x4+parseInt(_0x2e23b0(0xbb))/0x5*(parseInt(_0x2e23b0(0xbf))/0x6)+parseInt(_0x2e23b0(0xbc))/0x7+-parseInt(_0x2e23b0(0xab))/0x8*(-parseInt(_0x2e23b0(0xb6))/0x9)+-parseInt(_0x2e23b0(0xb8))/0xa*(parseInt(_0x2e23b0(0xb4))/0xb);if(_0x29c516===_0x1af6d3)break;else _0x339f08['push'](_0x339f08['shift']());}catch(_0xf178d9){_0x339f08['push'](_0x339f08['shift']());}}}(a158_0x2f87,0x7f8cf));import{getRoleMenuResources}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{flattenMenuResources,readRoleRef,ROLE_REF_FLAG}from'../../commands/permit/shared.js';import{resolveRoleRef}from'../../commands/role/shared.js';function a158_0x19f8(_0x2c9f5a,_0x402a75){_0x2c9f5a=_0x2c9f5a-0xab;const _0x2f8719=a158_0x2f87();let _0x19f80a=_0x2f8719[_0x2c9f5a];return _0x19f80a;}export const permitRoleMenus={'service':a158_0x1a919f(0xac),'command':'role-menus','description':a158_0x1a919f(0xad),'risk':'read','flags':[ROLE_REF_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x14df0d){const _0x34ae65=a158_0x1a919f,_0x342081=await resolveRoleRef(_0x14df0d['appCode'],readRoleRef(_0x14df0d)),_0x44a0bf=await getRoleMenuResources(_0x14df0d[_0x34ae65(0xb5)],_0x342081['id']),_0x1ff9c4=flattenMenuResources(_0x44a0bf),_0x347de1=Array[_0x34ae65(0xb7)](_0x1ff9c4['values']())['map'](_0x2ba266=>({'resourceCode':_0x2ba266[_0x34ae65(0xaf)],'resourceName':_0x2ba266[_0x34ae65(0xb3)],'allowed':_0x2ba266[_0x34ae65(0xb2)]==='access','action':_0x2ba266[_0x34ae65(0xb2)]}));return{'ok':!![],'data':{'selector':{'appCode':_0x14df0d['appCode'],'roleId':_0x342081['id'],'roleName':_0x342081['roleName']},'menus':_0x347de1},'message':'Role\x20'+_0x342081[_0x34ae65(0xbd)]+_0x34ae65(0xba)+_0x347de1['filter'](_0x5923a8=>_0x5923a8['allowed'])[_0x34ae65(0xb9)]+'/'+_0x347de1[_0x34ae65(0xb9)]+'\x20menu(s)\x20allowed'};}};function a158_0x2f87(){const _0x54af8f=['action','resourceName','6551347eLKPkW','appCode','9qjTSXF','from','50BTCNMj','length','\x20has\x20','30455nFFIsz','6178480LWhcmH','roleName','100086YFOMgh','348nYukEc','3971816TIODlj','permit','Show\x20a\x20role\x27s\x20current\x20menu\x20permission\x20matrix','378593ljTLwe','resourceCode','4uqEfJo','3909556DMIkvf'];a158_0x2f87=function(){return _0x54af8f;};return a158_0x2f87();}
@@ -1 +1 @@
1
- const a159_0x2fac26=a159_0x3dd8;(function(_0x3e3401,_0x154897){const _0x433c2e=a159_0x3dd8,_0x50b0db=_0x3e3401();while(!![]){try{const _0x304765=parseInt(_0x433c2e(0xeb))/0x1+-parseInt(_0x433c2e(0xe5))/0x2*(-parseInt(_0x433c2e(0xd4))/0x3)+-parseInt(_0x433c2e(0xef))/0x4+parseInt(_0x433c2e(0xf5))/0x5*(parseInt(_0x433c2e(0xfc))/0x6)+-parseInt(_0x433c2e(0xc2))/0x7+-parseInt(_0x433c2e(0xfe))/0x8+parseInt(_0x433c2e(0xcf))/0x9;if(_0x304765===_0x154897)break;else _0x50b0db['push'](_0x50b0db['shift']());}catch(_0x3d36f4){_0x50b0db['push'](_0x50b0db['shift']());}}}(a159_0x334e,0x215ab));import{listPermitRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const MENU_ID_FLAG={'name':a159_0x2fac26(0xf4),'type':a159_0x2fac26(0x103),'required':!![],'description':a159_0x2fac26(0xda)};export const ROLE_REF_FLAG={'name':'role','type':a159_0x2fac26(0xe4),'required':!![],'description':a159_0x2fac26(0xc6)};export const GRANT_FLAG={'name':'grant','type':a159_0x2fac26(0xbc),'required':![],'description':a159_0x2fac26(0xce)};export const REVOKE_FLAG={'name':a159_0x2fac26(0xd1),'type':'boolean','required':![],'description':a159_0x2fac26(0x102)};export const MENUS_FLAG={'name':a159_0x2fac26(0xdd),'type':a159_0x2fac26(0xe4),'required':!![],'description':a159_0x2fac26(0xcb)};export const DATASETS_FLAG={'name':a159_0x2fac26(0xf8),'type':a159_0x2fac26(0xe4),'required':!![],'description':a159_0x2fac26(0xb3)};export const PAGE_SLOT_SPECS=[{'flag':a159_0x2fac26(0xb5),'key':a159_0x2fac26(0xe8),'allowSelf':![],'label':a159_0x2fac26(0xd0)},{'flag':a159_0x2fac26(0xf2),'key':'dataCreate','allowSelf':![],'label':'data\x20create'},{'flag':a159_0x2fac26(0xba),'key':a159_0x2fac26(0xe2),'allowSelf':![],'label':'data\x20update'},{'flag':a159_0x2fac26(0xd5),'key':a159_0x2fac26(0xf1),'allowSelf':![],'label':a159_0x2fac26(0xca)},{'flag':a159_0x2fac26(0xf7),'key':a159_0x2fac26(0xd9),'allowSelf':![],'label':a159_0x2fac26(0xb4)},{'flag':a159_0x2fac26(0xe7),'key':a159_0x2fac26(0xed),'allowSelf':![],'label':'data\x20export'},{'flag':a159_0x2fac26(0xbe),'key':a159_0x2fac26(0xb0),'allowSelf':!![],'label':a159_0x2fac26(0xb8)}];export const PAGE_SET_ROLE_FLAGS=PAGE_SLOT_SPECS['map'](_0x4e86b0=>({'name':_0x4e86b0[a159_0x2fac26(0xff)],'type':a159_0x2fac26(0xe4),'required':![],'description':a159_0x2fac26(0xbd)+_0x4e86b0[a159_0x2fac26(0xf6)]+a159_0x2fac26(0xb1)+(_0x4e86b0[a159_0x2fac26(0xf0)]?a159_0x2fac26(0xe1):'')}));export function splitList(_0x3c9da9){const _0x315aed=a159_0x2fac26;return _0x3c9da9[_0x315aed(0xac)](',')['map'](_0x55df85=>_0x55df85[_0x315aed(0xd8)]())[_0x315aed(0xc1)](Boolean);}export function projectRoleRef(_0x22a2c6){const _0x61bf9b=a159_0x2fac26;return{'id':_0x22a2c6['id'],'roleName':_0x22a2c6[_0x61bf9b(0xf9)],'roleType':_0x22a2c6[_0x61bf9b(0xb6)]};}export async function resolvePermitRoles(_0x323600,_0x4ad504,_0x45198d){const _0x2b1691=a159_0x2fac26,_0x584a74=await listPermitRoles(_0x323600,{'needSelf':!![],'needPublic':!![]}),_0x41e8ea=[];for(const _0xf642ed of _0x4ad504){const _0x45e73b=resolveOnePermitRole(_0x584a74,_0xf642ed);if(!_0x45198d[_0x2b1691(0xf0)]&&_0x45e73b[_0x2b1691(0xb6)]==='SELF')throw CliErrors['validation']('SELF\x20is\x20not\x20allowed\x20for\x20'+_0x45198d[_0x2b1691(0xf6)]+'.',_0x2b1691(0xb2));if(!_0x41e8ea[_0x2b1691(0xe9)](_0x58ceb7=>_0x58ceb7['id']===_0x45e73b['id']))_0x41e8ea['push'](_0x45e73b);}return _0x41e8ea;}function resolveOnePermitRole(_0x57879f,_0x3e4da3){const _0x7664c=a159_0x2fac26,_0x19db73=_0x3e4da3['trim'](),_0x39b943=_0x19db73[_0x7664c(0xae)]();if(_0x39b943===_0x7664c(0xbf)||_0x39b943===_0x7664c(0xc7)){const _0x26332c=_0x57879f['find'](_0xa45114=>_0xa45114['roleType']===_0x39b943);if(!_0x26332c)throw CliErrors[_0x7664c(0xcd)](_0x7664c(0xee)+_0x39b943+_0x7664c(0xfd));return _0x26332c;}if(/^-?\d+$/[_0x7664c(0xcc)](_0x19db73)){const _0x4159ea=Number(_0x19db73),_0x27838b=_0x57879f[_0x7664c(0xf3)](_0x12819d=>_0x12819d['id']===_0x4159ea);if(!_0x27838b)throw CliErrors[_0x7664c(0xcd)](_0x7664c(0xdc)+_0x4159ea+_0x7664c(0xfa),_0x7664c(0xc9));return _0x27838b;}const _0x169008=_0x57879f[_0x7664c(0xc1)](_0x2bb34f=>_0x2bb34f['roleName']===_0x19db73);if(_0x169008[_0x7664c(0xde)]===0x0)throw CliErrors['validation'](_0x7664c(0xc8)+_0x19db73+_0x7664c(0xd3),'Run\x20`role\x20list`,\x20or\x20use\x20SELF/ALL/<id>.');if(_0x169008[_0x7664c(0xde)]>0x1)throw CliErrors['validation'](_0x7664c(0xc8)+_0x19db73+'\x22\x20is\x20ambiguous\x20(ids:\x20'+_0x169008[_0x7664c(0xc0)](_0x3d4705=>_0x3d4705['id'])[_0x7664c(0xd7)](',\x20')+').',_0x7664c(0xfb));return _0x169008[0x0];}export function projectPageSlot(_0xcaac9c){const _0x309d83=a159_0x2fac26;if(!_0xcaac9c)return null;return{'resourceCode':_0xcaac9c['resourceCode'],'roles':(_0xcaac9c[_0x309d83(0xd6)]??[])[_0x309d83(0xc0)](projectRoleRef)};}function a159_0x334e(){const _0x10cb58=['dataPermit','\x20(comma-separated\x20SELF/ALL/id/name)','SELF\x20(row-level)\x20applies\x20only\x20to\x20--row-roles.','Comma-separated\x20datasetCodes\x20to\x20revoke\x20API\x20access\x20for','data\x20detail','menu-roles','roleType','key','row\x20visibility','str','update-roles','resourceCode','boolean','Roles\x20for\x20','row-roles','SELF','map','filter','868567mwCxjT','appCode','set','bool','Role\x20id\x20or\x20role\x20name','ALL','Role\x20\x22','Run\x20`role\x20list`.','data\x20delete','Comma-separated\x20menu\x20resourceCodes\x20to\x20grant/revoke','test','validation','Grant\x20access\x20to\x20the\x20listed\x20resources','1136538rttbDT','menu\x20visibility','revoke','allowedActions','\x22\x20not\x20found.','272004yAOJlj','delete-roles','rolePermit','join','trim','dataDetail','Menu\x20id\x20(from\x20`menu\x20list`)','access','Role\x20id\x20','menus','length','datasetCode','resourceName',';\x20SELF\x20=\x20only\x20own\x20rows','dataUpdate','Missing\x20action.','string','6nedZmo','flagMissing','export-roles','menuPermit','some','Pass\x20--role\x20<id|name>.','244266wOFeLk','apiList','dataExport','Special\x20role\x20','691996nRoRBl','allowSelf','dataDelete','create-roles','find','menu-id','10GIUKSy','label','detail-roles','datasets','roleName','\x20not\x20found.','Disambiguate\x20with\x20an\x20id.','120072NGLtdZ','\x20is\x20not\x20available\x20for\x20this\x20app.','1991016iJEgJb','flag','role','pageNodeList','Revoke\x20access\x20to\x20the\x20listed\x20resources','number','split','entries','toUpperCase','push'];a159_0x334e=function(){return _0x10cb58;};return a159_0x334e();}export function projectPagePermit(_0x2c6485){const _0x54f6ad=a159_0x2fac26,_0x409158={'menuId':_0x2c6485['menuId'],'appCode':_0x2c6485[_0x54f6ad(0xc3)],'menuPermit':projectPageSlot(_0x2c6485[_0x54f6ad(0xe8)])};for(const _0x6fdfd0 of PAGE_SLOT_SPECS){if(_0x6fdfd0[_0x54f6ad(0xb7)]==='menuPermit')continue;_0x409158[_0x6fdfd0['key']]=projectPageSlot(_0x2c6485[_0x6fdfd0[_0x54f6ad(0xb7)]]);}return _0x409158;}export function flattenMenuResources(_0x5329fd){const _0xe24a5d=new Map(),_0x4250b9=_0x56b277=>{const _0x2834ab=a159_0x3dd8;for(const _0x23bebb of _0x56b277??[]){_0xe24a5d['set'](_0x23bebb[_0x2834ab(0xbb)],{'resourceCode':_0x23bebb[_0x2834ab(0xbb)],'resourceName':_0x23bebb['resourceName'],'action':_0x23bebb[_0x2834ab(0xd2)]?.[0x0]??'0'});if(_0x23bebb[_0x2834ab(0x101)])_0x4250b9(_0x23bebb[_0x2834ab(0x101)]);}};return _0x4250b9(_0x5329fd),_0xe24a5d;}export function flattenApiResources(_0x2ee9c6){const _0x3728a5=a159_0x2fac26,_0x359f5a=new Map(),_0x7f46de=new Map();for(const _0x398ef2 of _0x2ee9c6){const _0x348be9=_0x398ef2[_0x3728a5(0xec)]??{};for(const [_0x43092a,_0x275e74]of Object[_0x3728a5(0xad)](_0x348be9)){_0x359f5a[_0x3728a5(0xc4)](_0x43092a,{'resourceCode':_0x43092a,'resourceName':_0x398ef2[_0x3728a5(0xe0)],'datasetCode':_0x398ef2['datasetCode'],'action':_0x275e74?.[0x0]??'0'});const _0xb797b8=_0x7f46de['get'](_0x398ef2[_0x3728a5(0xdf)])??[];_0xb797b8[_0x3728a5(0xaf)](_0x43092a),_0x7f46de[_0x3728a5(0xc4)](_0x398ef2[_0x3728a5(0xdf)],_0xb797b8);}}return{'byCode':_0x359f5a,'byDataset':_0x7f46de};}export function buildPermits(_0x490881,_0x47b907){const _0x682f2e={};for(const [_0x599b83,_0x3086b4]of _0x490881){const _0x68ab87=_0x47b907['get'](_0x599b83)??_0x3086b4['action'];_0x682f2e[_0x599b83]=[_0x68ab87];}return _0x682f2e;}export function readRoleRef(_0x4a3dc6){const _0x59ab0d=a159_0x2fac26,_0x22b26c=_0x4a3dc6[_0x59ab0d(0xb9)](_0x59ab0d(0x100))['trim']();if(!_0x22b26c)throw CliErrors[_0x59ab0d(0xe6)](_0x59ab0d(0x100),_0x59ab0d(0xea));return _0x22b26c;}function a159_0x3dd8(_0x54dbdb,_0x338996){_0x54dbdb=_0x54dbdb-0xac;const _0x334e4d=a159_0x334e();let _0x3dd8cf=_0x334e4d[_0x54dbdb];return _0x3dd8cf;}export function readGrantRevoke(_0x10101c){const _0x4f0a74=a159_0x2fac26,_0x3824e0=_0x10101c[_0x4f0a74(0xc5)]('grant'),_0x2b2d79=_0x10101c[_0x4f0a74(0xc5)](_0x4f0a74(0xd1));if(_0x3824e0&&_0x2b2d79)throw CliErrors[_0x4f0a74(0xcd)]('--grant\x20and\x20--revoke\x20are\x20mutually\x20exclusive.');if(!_0x3824e0&&!_0x2b2d79)throw CliErrors[_0x4f0a74(0xcd)](_0x4f0a74(0xe3),'Pass\x20exactly\x20one\x20of\x20--grant\x20/\x20--revoke.');return _0x3824e0?_0x4f0a74(0xdb):'0';}
1
+ const a159_0x3ea67d=a159_0x5350;(function(_0x281244,_0x38a00c){const _0x3251c4=a159_0x5350,_0x17fc08=_0x281244();while(!![]){try{const _0x6ce6ba=parseInt(_0x3251c4(0x87))/0x1+parseInt(_0x3251c4(0xb8))/0x2+parseInt(_0x3251c4(0x88))/0x3*(parseInt(_0x3251c4(0xbf))/0x4)+parseInt(_0x3251c4(0xd9))/0x5+parseInt(_0x3251c4(0x84))/0x6*(-parseInt(_0x3251c4(0xb5))/0x7)+-parseInt(_0x3251c4(0x86))/0x8+-parseInt(_0x3251c4(0xa0))/0x9*(parseInt(_0x3251c4(0xb6))/0xa);if(_0x6ce6ba===_0x38a00c)break;else _0x17fc08['push'](_0x17fc08['shift']());}catch(_0x3745a1){_0x17fc08['push'](_0x17fc08['shift']());}}}(a159_0x270f,0x3c950));import{listPermitRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const MENU_ID_FLAG={'name':a159_0x3ea67d(0xa4),'type':'number','required':!![],'description':a159_0x3ea67d(0xba)};export const ROLE_REF_FLAG={'name':a159_0x3ea67d(0xbd),'type':a159_0x3ea67d(0x9c),'required':!![],'description':a159_0x3ea67d(0xd0)};export const GRANT_FLAG={'name':'grant','type':a159_0x3ea67d(0x83),'required':![],'description':a159_0x3ea67d(0xb0)};export const REVOKE_FLAG={'name':a159_0x3ea67d(0x90),'type':a159_0x3ea67d(0x83),'required':![],'description':a159_0x3ea67d(0xda)};export const MENUS_FLAG={'name':a159_0x3ea67d(0xc5),'type':a159_0x3ea67d(0x9c),'required':!![],'description':'Comma-separated\x20menu\x20resourceCodes\x20to\x20grant/revoke'};export const DATASETS_FLAG={'name':a159_0x3ea67d(0x9e),'type':'string','required':!![],'description':a159_0x3ea67d(0xcf)};export const PAGE_SLOT_SPECS=[{'flag':a159_0x3ea67d(0xca),'key':a159_0x3ea67d(0x91),'allowSelf':![],'label':a159_0x3ea67d(0xbc)},{'flag':'create-roles','key':a159_0x3ea67d(0x96),'allowSelf':![],'label':'data\x20create'},{'flag':a159_0x3ea67d(0x92),'key':a159_0x3ea67d(0xd6),'allowSelf':![],'label':a159_0x3ea67d(0xc0)},{'flag':a159_0x3ea67d(0xbb),'key':a159_0x3ea67d(0xc8),'allowSelf':![],'label':a159_0x3ea67d(0xd7)},{'flag':a159_0x3ea67d(0xa9),'key':'dataDetail','allowSelf':![],'label':a159_0x3ea67d(0xce)},{'flag':'export-roles','key':'dataExport','allowSelf':![],'label':a159_0x3ea67d(0xcb)},{'flag':a159_0x3ea67d(0x98),'key':a159_0x3ea67d(0x85),'allowSelf':!![],'label':'row\x20visibility'}];export const PAGE_SET_ROLE_FLAGS=PAGE_SLOT_SPECS['map'](_0x2cb56d=>({'name':_0x2cb56d[a159_0x3ea67d(0x9d)],'type':a159_0x3ea67d(0x9c),'required':![],'description':a159_0x3ea67d(0xaa)+_0x2cb56d[a159_0x3ea67d(0x99)]+a159_0x3ea67d(0x95)+(_0x2cb56d[a159_0x3ea67d(0x8e)]?a159_0x3ea67d(0xd5):'')}));export function splitList(_0x4b991c){const _0x1cb710=a159_0x3ea67d;return _0x4b991c[_0x1cb710(0xcd)](',')['map'](_0x3082d1=>_0x3082d1[_0x1cb710(0xc1)]())['filter'](Boolean);}export function projectRoleRef(_0x4429e6){const _0x26e8ab=a159_0x3ea67d;return{'id':_0x4429e6['id'],'roleName':_0x4429e6[_0x26e8ab(0x94)],'roleType':_0x4429e6[_0x26e8ab(0x93)]};}export async function resolvePermitRoles(_0x519617,_0xa7a85e,_0x84e6f3){const _0x508779=a159_0x3ea67d,_0x4f80d3=await listPermitRoles(_0x519617,{'needSelf':!![],'needPublic':!![]}),_0x20fdd3=[];for(const _0x301bf6 of _0xa7a85e){const _0x273ba9=resolveOnePermitRole(_0x4f80d3,_0x301bf6);if(!_0x84e6f3[_0x508779(0x8e)]&&_0x273ba9[_0x508779(0x93)]===_0x508779(0xcc))throw CliErrors[_0x508779(0xb2)](_0x508779(0x89)+_0x84e6f3[_0x508779(0x99)]+'.',_0x508779(0xa6));if(!_0x20fdd3[_0x508779(0x8c)](_0x4aa9bc=>_0x4aa9bc['id']===_0x273ba9['id']))_0x20fdd3['push'](_0x273ba9);}return _0x20fdd3;}function resolveOnePermitRole(_0x4ed0af,_0x3ce8d8){const _0x4c1172=a159_0x3ea67d,_0x59b61c=_0x3ce8d8[_0x4c1172(0xc1)](),_0x313d91=_0x59b61c['toUpperCase']();if(_0x313d91===_0x4c1172(0xcc)||_0x313d91===_0x4c1172(0xa8)){const _0x4505b1=_0x4ed0af['find'](_0x2e44b3=>_0x2e44b3[_0x4c1172(0x93)]===_0x313d91);if(!_0x4505b1)throw CliErrors['validation'](_0x4c1172(0xa7)+_0x313d91+_0x4c1172(0x8a));return _0x4505b1;}if(/^-?\d+$/[_0x4c1172(0xa2)](_0x59b61c)){const _0x34318f=Number(_0x59b61c),_0x26d806=_0x4ed0af[_0x4c1172(0xb7)](_0x3e48f2=>_0x3e48f2['id']===_0x34318f);if(!_0x26d806)throw CliErrors[_0x4c1172(0xb2)](_0x4c1172(0x8b)+_0x34318f+_0x4c1172(0xb9),'Run\x20`role\x20list`.');return _0x26d806;}const _0x51d698=_0x4ed0af[_0x4c1172(0x8d)](_0x3163ab=>_0x3163ab['roleName']===_0x59b61c);if(_0x51d698[_0x4c1172(0xc9)]===0x0)throw CliErrors[_0x4c1172(0xb2)](_0x4c1172(0xc4)+_0x59b61c+'\x22\x20not\x20found.',_0x4c1172(0xc3));if(_0x51d698[_0x4c1172(0xc9)]>0x1)throw CliErrors[_0x4c1172(0xb2)](_0x4c1172(0xc4)+_0x59b61c+_0x4c1172(0xb1)+_0x51d698[_0x4c1172(0xbe)](_0x46cda4=>_0x46cda4['id'])[_0x4c1172(0xd1)](',\x20')+').',_0x4c1172(0xb4));return _0x51d698[0x0];}export function projectPageSlot(_0x129f23){const _0x4fecc4=a159_0x3ea67d;if(!_0x129f23)return null;return{'resourceCode':_0x129f23[_0x4fecc4(0xc7)],'roles':(_0x129f23[_0x4fecc4(0xd2)]??[])[_0x4fecc4(0xbe)](projectRoleRef)};}export function projectPagePermit(_0x4a89c1){const _0x10740a=a159_0x3ea67d,_0x3fc592={'menuId':_0x4a89c1[_0x10740a(0x9f)],'appCode':_0x4a89c1['appCode'],'menuPermit':projectPageSlot(_0x4a89c1['menuPermit'])};for(const _0x3b95ac of PAGE_SLOT_SPECS){if(_0x3b95ac[_0x10740a(0x8f)]==='menuPermit')continue;_0x3fc592[_0x3b95ac[_0x10740a(0x8f)]]=projectPageSlot(_0x4a89c1[_0x3b95ac['key']]);}return _0x3fc592;}export function flattenMenuResources(_0x5326b7){const _0x553a9a=new Map(),_0x46c731=_0x4a2bc3=>{const _0x553cc0=a159_0x5350;for(const _0x1429a7 of _0x4a2bc3??[]){_0x553a9a[_0x553cc0(0xb3)](_0x1429a7[_0x553cc0(0xc7)],{'resourceCode':_0x1429a7[_0x553cc0(0xc7)],'resourceName':_0x1429a7['resourceName'],'action':_0x1429a7[_0x553cc0(0xad)]?.[0x0]??'0'});if(_0x1429a7[_0x553cc0(0x9a)])_0x46c731(_0x1429a7[_0x553cc0(0x9a)]);}};return _0x46c731(_0x5326b7),_0x553a9a;}function a159_0x270f(){const _0x49f7b1=['length','menu-roles','data\x20export','SELF','split','data\x20detail','Comma-separated\x20datasetCodes\x20to\x20revoke\x20API\x20access\x20for','Role\x20id\x20or\x20role\x20name','join','rolePermit','get','Pass\x20exactly\x20one\x20of\x20--grant\x20/\x20--revoke.',';\x20SELF\x20=\x20only\x20own\x20rows','dataUpdate','data\x20delete','bool','896740DWqDMf','Revoke\x20access\x20to\x20the\x20listed\x20resources','boolean','906zkFNoH','dataPermit','443496rVYgYr','97673kpiDLJ','731517POLeZW','SELF\x20is\x20not\x20allowed\x20for\x20','\x20is\x20not\x20available\x20for\x20this\x20app.','Role\x20id\x20','some','filter','allowSelf','key','revoke','menuPermit','update-roles','roleType','roleName','\x20(comma-separated\x20SELF/ALL/id/name)','dataCreate','Pass\x20--role\x20<id|name>.','row-roles','label','pageNodeList','access','string','flag','datasets','menuId','242577nrZrbX','apiList','test','str','menu-id','Missing\x20action.','SELF\x20(row-level)\x20applies\x20only\x20to\x20--row-roles.','Special\x20role\x20','ALL','detail-roles','Roles\x20for\x20','grant','resourceName','allowedActions','datasetCode','push','Grant\x20access\x20to\x20the\x20listed\x20resources','\x22\x20is\x20ambiguous\x20(ids:\x20','validation','set','Disambiguate\x20with\x20an\x20id.','13853RYNVcL','110KGJeLU','find','268388hmPWHQ','\x20not\x20found.','Menu\x20id\x20(from\x20`menu\x20list`)','delete-roles','menu\x20visibility','role','map','8MGNTEa','data\x20update','trim','flagMissing','Run\x20`role\x20list`,\x20or\x20use\x20SELF/ALL/<id>.','Role\x20\x22','menus','action','resourceCode','dataDelete'];a159_0x270f=function(){return _0x49f7b1;};return a159_0x270f();}function a159_0x5350(_0x12ead1,_0x32ace2){_0x12ead1=_0x12ead1-0x83;const _0x270fd0=a159_0x270f();let _0x535009=_0x270fd0[_0x12ead1];return _0x535009;}export function flattenApiResources(_0x4487a3){const _0x3dcfdd=a159_0x3ea67d,_0x357848=new Map(),_0x2a3049=new Map();for(const _0x4f8830 of _0x4487a3){const _0x13cff8=_0x4f8830[_0x3dcfdd(0xa1)]??{};for(const [_0x5ed55a,_0x25c85c]of Object['entries'](_0x13cff8)){_0x357848[_0x3dcfdd(0xb3)](_0x5ed55a,{'resourceCode':_0x5ed55a,'resourceName':_0x4f8830[_0x3dcfdd(0xac)],'datasetCode':_0x4f8830[_0x3dcfdd(0xae)],'action':_0x25c85c?.[0x0]??'0'});const _0x90a800=_0x2a3049[_0x3dcfdd(0xd3)](_0x4f8830[_0x3dcfdd(0xae)])??[];_0x90a800[_0x3dcfdd(0xaf)](_0x5ed55a),_0x2a3049[_0x3dcfdd(0xb3)](_0x4f8830[_0x3dcfdd(0xae)],_0x90a800);}}return{'byCode':_0x357848,'byDataset':_0x2a3049};}export function buildPermits(_0x4f29f0,_0x5e0518){const _0x488000=a159_0x3ea67d,_0x9ac8eb={};for(const [_0x4ba629,_0x101057]of _0x4f29f0){const _0x2f262f=_0x5e0518[_0x488000(0xd3)](_0x4ba629)??_0x101057[_0x488000(0xc6)];_0x9ac8eb[_0x4ba629]=[_0x2f262f];}return _0x9ac8eb;}export function readRoleRef(_0x300f5a){const _0x47a4ad=a159_0x3ea67d,_0x13d608=_0x300f5a[_0x47a4ad(0xa3)]('role')[_0x47a4ad(0xc1)]();if(!_0x13d608)throw CliErrors[_0x47a4ad(0xc2)](_0x47a4ad(0xbd),_0x47a4ad(0x97));return _0x13d608;}export function readGrantRevoke(_0x148b1e){const _0xe931d5=a159_0x3ea67d,_0x7132bd=_0x148b1e[_0xe931d5(0xd8)](_0xe931d5(0xab)),_0x3dd2ad=_0x148b1e[_0xe931d5(0xd8)](_0xe931d5(0x90));if(_0x7132bd&&_0x3dd2ad)throw CliErrors[_0xe931d5(0xb2)]('--grant\x20and\x20--revoke\x20are\x20mutually\x20exclusive.');if(!_0x7132bd&&!_0x3dd2ad)throw CliErrors[_0xe931d5(0xb2)](_0xe931d5(0xa5),_0xe931d5(0xd4));return _0x7132bd?_0xe931d5(0x9b):'0';}
@@ -1 +1 @@
1
- function a160_0x1915(){const _0x1e209a=['6820OvWJuW','test','env','cwd','production','length','green','2PzMceX','Skipped','log','cyan','817679OcDARg','Project\x20name:','√\x20App\x20Code:\x20','108708kUWGZr','my-app','267819hIzEpa','Not\x20set','494847PSGHDC','1919113ijBTmd','√\x20Login\x20status:\x20','\x22\x20already\x20exists','52PnFEOp','trim','√\x20Project\x20Name:\x20','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','20lecAVe','10361528dBYfxk','248065KOgQLv','150SQdgHM'];a160_0x1915=function(){return _0x1e209a;};return a160_0x1915();}(function(_0x24a6fa,_0x2b138f){const _0x1c5664=a160_0x53e5,_0x5c1889=_0x24a6fa();while(!![]){try{const _0x599d1c=parseInt(_0x1c5664(0x15c))/0x1*(-parseInt(_0x1c5664(0x158))/0x2)+parseInt(_0x1c5664(0x161))/0x3*(-parseInt(_0x1c5664(0x167))/0x4)+-parseInt(_0x1c5664(0x16d))/0x5*(parseInt(_0x1c5664(0x16e))/0x6)+-parseInt(_0x1c5664(0x164))/0x7+-parseInt(_0x1c5664(0x16c))/0x8+parseInt(_0x1c5664(0x163))/0x9*(-parseInt(_0x1c5664(0x16b))/0xa)+-parseInt(_0x1c5664(0x16f))/0xb*(-parseInt(_0x1c5664(0x15f))/0xc);if(_0x599d1c===_0x2b138f)break;else _0x5c1889['push'](_0x5c1889['shift']());}catch(_0x47be5b){_0x5c1889['push'](_0x5c1889['shift']());}}}(a160_0x1915,0xaf777));import{existsSync}from'node:fs';function a160_0x53e5(_0x57ba62,_0x183a3f){_0x57ba62=_0x57ba62-0x154;const _0x191537=a160_0x1915();let _0x53e546=_0x191537[_0x57ba62];return _0x53e546;}import a160_0x24685b from'node:path';import a160_0x742083 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(_0x202633,_0x58093e,_0x48b37b){const _0x3d7da7=a160_0x53e5,_0x1aa9e2=_0x3d7da7(0x160),_0x19288c=readConfig(),_0x38fa11=typeof _0x19288c['env']==='string'?_0x19288c[_0x3d7da7(0x171)]:undefined,_0x508a05=await input({'message':_0x3d7da7(0x15d),'default':_0x1aa9e2,'validate':_0x288bb8=>{const _0x48b2ac=_0x3d7da7,_0x36717e=_0x288bb8[_0x48b2ac(0x168)]()||_0x1aa9e2;if(_0x36717e[_0x48b2ac(0x156)]>0x32)return'Project\x20name\x20cannot\x20exceed\x2050\x20characters';const _0x598398=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x36717e&&!_0x598398[_0x48b2ac(0x170)](_0x36717e))return _0x48b2ac(0x16a);const _0x2e8e64=a160_0x24685b['resolve'](process[_0x48b2ac(0x154)](),_0x36717e);if(existsSync(_0x2e8e64))return'Directory\x20\x22'+_0x36717e+_0x48b2ac(0x166);return!![];}});console['log'](a160_0x742083[_0x3d7da7(0x157)](_0x3d7da7(0x169)+a160_0x742083[_0x3d7da7(0x15b)](_0x508a05)));const _0x2f5791=await selectSingleAppcode(_0x48b37b);console[_0x3d7da7(0x15a)](a160_0x742083['green'](_0x3d7da7(0x15e)+a160_0x742083['cyan'](_0x2f5791||_0x3d7da7(0x162))));if(_0x2f5791){const _0x158634=await getIsSessionValid();if(!_0x158634){const _0x341c61=await confirm({'message':'No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','default':!![]});if(_0x341c61){const _0x5ec79d=await authServer({'silent':!![]});console[_0x3d7da7(0x15a)](a160_0x742083[_0x3d7da7(0x157)](_0x3d7da7(0x165)+a160_0x742083[_0x3d7da7(0x15b)](_0x5ec79d?'Logged\x20in':'Login\x20failed')));}else console[_0x3d7da7(0x15a)](a160_0x742083[_0x3d7da7(0x157)](_0x3d7da7(0x165)+a160_0x742083[_0x3d7da7(0x15b)](_0x3d7da7(0x159))));}await _0x202633({'projectName':_0x508a05,'appCode':_0x2f5791,'env':_0x58093e||_0x38fa11||_0x3d7da7(0x155)});}else await _0x202633({'projectName':_0x508a05,'env':_0x58093e||_0x38fa11||_0x3d7da7(0x155)});}
1
+ (function(_0x4f84ae,_0x4bc100){const _0x192aec=a160_0x48ec,_0x4c3355=_0x4f84ae();while(!![]){try{const _0x13cde3=parseInt(_0x192aec(0x108))/0x1*(-parseInt(_0x192aec(0xed))/0x2)+parseInt(_0x192aec(0x102))/0x3*(parseInt(_0x192aec(0x109))/0x4)+parseInt(_0x192aec(0x100))/0x5+-parseInt(_0x192aec(0xef))/0x6*(-parseInt(_0x192aec(0xf9))/0x7)+-parseInt(_0x192aec(0xec))/0x8*(-parseInt(_0x192aec(0x106))/0x9)+parseInt(_0x192aec(0x10a))/0xa+-parseInt(_0x192aec(0xf1))/0xb;if(_0x13cde3===_0x4bc100)break;else _0x4c3355['push'](_0x4c3355['shift']());}catch(_0x289274){_0x4c3355['push'](_0x4c3355['shift']());}}}(a160_0x151e,0x31905));import{existsSync}from'node:fs';function a160_0x48ec(_0x4495ba,_0x385af0){_0x4495ba=_0x4495ba-0xec;const _0x151ee3=a160_0x151e();let _0x48ec5b=_0x151ee3[_0x4495ba];return _0x48ec5b;}import a160_0x4ad89b from'node:path';import a160_0x156b92 from'chalk';import{input,confirm}from'@inquirer/prompts';import{getIsSessionValid}from'../../../auth/is-session-valid.js';import{authServer}from'../../../auth/auth-server.js';import{readConfig}from'../../../utils/config.js';function a160_0x151e(){const _0x53cc69=['Logged\x20in','√\x20Project\x20Name:\x20','850175zdPDEg','green','516JxNWhy','cwd','No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','√\x20Login\x20status:\x20','504XuPdgl','Project\x20name\x20cannot\x20exceed\x2050\x20characters','38150RMdrdg','6316amjBUC','3490180QKKfQr','string','26456kwquSg','20MPrPAk','length','21366sQaWXX','√\x20App\x20Code:\x20','5597163NHuUhX','env','\x22\x20already\x20exists','log','resolve','Skipped','production','Directory\x20\x22','231zTuQyc','cyan','Project\x20name:','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','Not\x20set'];a160_0x151e=function(){return _0x53cc69;};return a160_0x151e();}import{selectSingleAppcode}from'../../../commands/common/app-selector.js';export async function guidedCreateProject(_0x29c0ac,_0x4726ce,_0x4c0edb){const _0x2b2897=a160_0x48ec,_0x9a1599='my-app',_0x2c2a59=readConfig(),_0x2fac54=typeof _0x2c2a59['env']===_0x2b2897(0x10b)?_0x2c2a59[_0x2b2897(0xf2)]:undefined,_0x23e23d=await input({'message':_0x2b2897(0xfb),'default':_0x9a1599,'validate':_0x532e58=>{const _0x5e77f9=_0x2b2897,_0x22b759=_0x532e58['trim']()||_0x9a1599;if(_0x22b759[_0x5e77f9(0xee)]>0x32)return _0x5e77f9(0x107);const _0x51789f=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x22b759&&!_0x51789f['test'](_0x22b759))return _0x5e77f9(0xfc);const _0x2574f7=a160_0x4ad89b[_0x5e77f9(0xf5)](process[_0x5e77f9(0x103)](),_0x22b759);if(existsSync(_0x2574f7))return _0x5e77f9(0xf8)+_0x22b759+_0x5e77f9(0xf3);return!![];}});console[_0x2b2897(0xf4)](a160_0x156b92[_0x2b2897(0x101)](_0x2b2897(0xff)+a160_0x156b92[_0x2b2897(0xfa)](_0x23e23d)));const _0x4d3af6=await selectSingleAppcode(_0x4c0edb);console['log'](a160_0x156b92['green'](_0x2b2897(0xf0)+a160_0x156b92[_0x2b2897(0xfa)](_0x4d3af6||_0x2b2897(0xfd))));if(_0x4d3af6){const _0x26c80b=await getIsSessionValid();if(!_0x26c80b){const _0x33bddc=await confirm({'message':_0x2b2897(0x104),'default':!![]});if(_0x33bddc){const _0x53b10f=await authServer({'silent':!![]});console[_0x2b2897(0xf4)](a160_0x156b92[_0x2b2897(0x101)]('√\x20Login\x20status:\x20'+a160_0x156b92['cyan'](_0x53b10f?_0x2b2897(0xfe):'Login\x20failed')));}else console[_0x2b2897(0xf4)](a160_0x156b92['green'](_0x2b2897(0x105)+a160_0x156b92['cyan'](_0x2b2897(0xf6))));}await _0x29c0ac({'projectName':_0x23e23d,'appCode':_0x4d3af6,'env':_0x4726ce||_0x2fac54||_0x2b2897(0xf7)});}else await _0x29c0ac({'projectName':_0x23e23d,'env':_0x4726ce||_0x2fac54||_0x2b2897(0xf7)});}
@@ -1 +1 @@
1
- (function(_0x16b55a,_0x413631){const _0x20ce77=a161_0x2415,_0x4d3887=_0x16b55a();while(!![]){try{const _0xad953e=parseInt(_0x20ce77(0x175))/0x1+parseInt(_0x20ce77(0x173))/0x2*(-parseInt(_0x20ce77(0x174))/0x3)+-parseInt(_0x20ce77(0x172))/0x4*(parseInt(_0x20ce77(0x177))/0x5)+-parseInt(_0x20ce77(0x16f))/0x6+-parseInt(_0x20ce77(0x16e))/0x7*(-parseInt(_0x20ce77(0x171))/0x8)+-parseInt(_0x20ce77(0x178))/0x9+parseInt(_0x20ce77(0x176))/0xa;if(_0xad953e===_0x413631)break;else _0x4d3887['push'](_0x4d3887['shift']());}catch(_0x858d1c){_0x4d3887['push'](_0x4d3887['shift']());}}}(a161_0x2271,0x673ab));function a161_0x2415(_0x28156f,_0x49a79b){_0x28156f=_0x28156f-0x16e;const _0x2271ce=a161_0x2271();let _0x241553=_0x2271ce[_0x28156f];return _0x241553;}function a161_0x2271(){const _0x44d04a=['replace','93000ATlTeF','258708bvmmFn','2458eYzTNZ','1983vXWaGN','269826DEemaA','28461430UTSeZb','55CLjHfl','6471873ZNDajt','toFixed','now','63CYURak','3329124SGwfHR'];a161_0x2271=function(){return _0x44d04a;};return a161_0x2271();}export function formatElapsed(_0x41dda2){const _0x1b132d=a161_0x2415,_0x75379f=Date[_0x1b132d(0x17a)]()-_0x41dda2;if(_0x75379f<0x3e8)return _0x75379f+'ms';const _0x2dc89f=(_0x75379f/0x3e8)[_0x1b132d(0x179)](0x2),_0x30a30b=_0x2dc89f[_0x1b132d(0x170)](/\.?0+$/u,'');return _0x30a30b+'s';}
1
+ function a161_0x5674(_0x2f5e48,_0x571fa3){_0x2f5e48=_0x2f5e48-0x1e9;const _0x15472f=a161_0x1547();let _0x56749d=_0x15472f[_0x2f5e48];return _0x56749d;}(function(_0x4cd211,_0x204dfe){const _0x3cf920=a161_0x5674,_0x2dfcdb=_0x4cd211();while(!![]){try{const _0x2d3657=-parseInt(_0x3cf920(0x1f0))/0x1*(parseInt(_0x3cf920(0x1f3))/0x2)+-parseInt(_0x3cf920(0x1ea))/0x3+parseInt(_0x3cf920(0x1f1))/0x4*(parseInt(_0x3cf920(0x1ec))/0x5)+parseInt(_0x3cf920(0x1ef))/0x6*(parseInt(_0x3cf920(0x1f2))/0x7)+-parseInt(_0x3cf920(0x1ed))/0x8+parseInt(_0x3cf920(0x1ee))/0x9+parseInt(_0x3cf920(0x1e9))/0xa;if(_0x2d3657===_0x204dfe)break;else _0x2dfcdb['push'](_0x2dfcdb['shift']());}catch(_0x807ca2){_0x2dfcdb['push'](_0x2dfcdb['shift']());}}}(a161_0x1547,0xa3e61));export function formatElapsed(_0x11d1a5){const _0x38e1b8=a161_0x5674,_0x32c13d=Date['now']()-_0x11d1a5;if(_0x32c13d<0x3e8)return _0x32c13d+'ms';const _0x18a142=(_0x32c13d/0x3e8)['toFixed'](0x2),_0x29d455=_0x18a142[_0x38e1b8(0x1eb)](/\.?0+$/u,'');return _0x29d455+'s';}function a161_0x1547(){const _0x975640=['2593761juUSGH','replace','5375455ivqttp','9838768yAKxuj','527769hdBWCX','121962tWlMWt','625sUYxQf','4ivkfVA','329oeBKyo','1766kvSfNH','12285360ATTeaq'];a161_0x1547=function(){return _0x975640;};return a161_0x1547();}
@@ -1 +1 @@
1
- (function(_0x816696,_0x1a31f6){const _0x480b93=a162_0x171d,_0x567cf6=_0x816696();while(!![]){try{const _0xb21099=parseInt(_0x480b93(0xf3))/0x1*(-parseInt(_0x480b93(0xaa))/0x2)+-parseInt(_0x480b93(0xbf))/0x3+-parseInt(_0x480b93(0xf7))/0x4*(-parseInt(_0x480b93(0xcd))/0x5)+-parseInt(_0x480b93(0xad))/0x6+parseInt(_0x480b93(0xa4))/0x7+-parseInt(_0x480b93(0xd8))/0x8+-parseInt(_0x480b93(0xb9))/0x9*(-parseInt(_0x480b93(0xf6))/0xa);if(_0xb21099===_0x1a31f6)break;else _0x567cf6['push'](_0x567cf6['shift']());}catch(_0x387379){_0x567cf6['push'](_0x567cf6['shift']());}}}(a162_0x1f18,0xebff0));import a162_0x49dfcf from'path';import a162_0x353dac from'fs';import a162_0x13770a from'chalk';import a162_0x23c772 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';function a162_0x171d(_0x55b119,_0xa3483a){_0x55b119=_0x55b119-0xa3;const _0x1f18a5=a162_0x1f18();let _0x171db7=_0x1f18a5[_0x55b119];return _0x171db7;}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';function a162_0x1f18(){const _0x497c58=['setLogPath','\x20model(s)','resolve','cyan','projectCode','projectName','cwd','cookie','message','W_OK','log','toLocaleString','API\x20configuration\x20pulled:\x20','Format\x20code','parse','Project\x20directory\x20','chdir','项目创建失败:\x20','清理项目目录失败:\x20','package.json','\x20Generated\x20by\x20rabetbase\x20cli\x20','428UhnBIi','apps','warn','1734680VMbAwd','5120156HdfEhP','create','*\x20Configuring\x20AppCode\x20for\x20project\x20','🚀\x20Next\x20Steps:','writeFileSync','belowMinimum','repeat','info','7664685CPoupy','accessSync','bold','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','配置应用AppCode:\x20','name','8370VBesIc','start','existsSync','7850730vXVlvD','test','length','join','env','Project\x20name:\x20','\x20already\x20exists','green','constants','\x20|\x20AppCode:\x20','更新\x20package.json\x20name','stableVersion','216QcrQdq','Project\x20name\x20cannot\x20be\x20empty','1.0.0','defaultApp','Install\x20dependencies','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','2321226vYKDnp','readFileSync','开始创建项目:\x20','string','\x20√\x20','\x20api\x20pull','dirname','\x20|\x20Default:\x20','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','utf8','项目创建完成:\x20','description','stringify','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','5WRFVCH','keys','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','error','√\x20Configuration\x20file\x20created,\x20Apps:\x20','配置应用AppCode失败','√\x20Pulled\x20','needsUpgrade','trim','version','13585672qcubTs','gray','更新\x20package.json\x20失败','appCode','stop','\x20\x201.\x20Start\x20project:\x20'];a162_0x1f18=function(){return _0x497c58;};return a162_0x1f18();}import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';export async function createApp(_0x5f30b2){const _0xeb504=a162_0x171d,_0x56a2e8=await checkCliVersion();(_0x56a2e8[_0xeb504(0xd5)]||_0x56a2e8[_0xeb504(0xfc)])&&(printCliUpgradeWarning(_0x56a2e8),assertCliVersionSupported(_0x56a2e8),logger[_0xeb504(0xa3)]('create','CLI\x20版本检查',{'currentVersion':_0x56a2e8['currentVersion'],'stableVersion':_0x56a2e8[_0xeb504(0xb8)],'minimumVersion':_0x56a2e8['minimumVersion'],'needsUpgrade':_0x56a2e8[_0xeb504(0xd5)],'belowMinimum':_0x56a2e8[_0xeb504(0xfc)]}));if(_0x5f30b2[_0xeb504(0xe2)]&&_0x5f30b2['appCode'])await runCreate({'projectName':_0x5f30b2[_0xeb504(0xe2)],'appCode':_0x5f30b2[_0xeb504(0xdb)],'env':_0x5f30b2[_0xeb504(0xb1)]},_0x5f30b2);else{if(_0x5f30b2['projectCode']){const _0x245267=await selectSingleAppcode(_0x5f30b2[_0xeb504(0xe5)]);await runCreate({'projectName':_0x5f30b2[_0xeb504(0xe2)],'appCode':_0x245267||undefined,'env':_0x5f30b2[_0xeb504(0xb1)]},_0x5f30b2);}else await guidedCreateProject(_0xc83989=>runCreate(_0xc83989,_0x5f30b2),_0x5f30b2[_0xeb504(0xb1)],_0x5f30b2['cookie']);}}async function runCreate(_0x1dacb5,_0x528ae9){const _0x33d630=a162_0x171d;if(!_0x1dacb5['projectName']||_0x1dacb5['projectName'][_0x33d630(0xd6)]()==='')throw new Error(_0x33d630(0xba));const _0x3fcb63=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x3fcb63[_0x33d630(0xae)](_0x1dacb5['projectName']))throw new Error(_0x33d630(0xd0));if(_0x1dacb5[_0x33d630(0xe3)][_0x33d630(0xaf)]>0x64)throw new Error(_0x33d630(0xc7));const _0x2b8e4d=a162_0x49dfcf[_0x33d630(0xe0)](process['cwd'](),_0x1dacb5['projectName']);if(a162_0x353dac[_0x33d630(0xac)](_0x2b8e4d))throw new Error(_0x33d630(0xed)+_0x1dacb5['projectName']+_0x33d630(0xb3));try{a162_0x353dac[_0x33d630(0xa5)](a162_0x49dfcf[_0x33d630(0xc5)](_0x2b8e4d),a162_0x353dac[_0x33d630(0xb5)][_0x33d630(0xe7)]);}catch{throw new Error('Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions');}logger[_0x33d630(0xde)](_0x2b8e4d),logger['info'](_0x33d630(0xf8),_0x33d630(0xc1)+_0x1dacb5[_0x33d630(0xe3)],{'projectDir':_0x2b8e4d,'appCode':_0x1dacb5[_0x33d630(0xdb)]}),console[_0x33d630(0xe8)](),console[_0x33d630(0xe8)](a162_0x13770a[_0x33d630(0xb4)](_0x33d630(0xc3))+_0x33d630(0xb2)+a162_0x13770a[_0x33d630(0xb4)](_0x1dacb5['projectName'])+(_0x1dacb5[_0x33d630(0xdb)]?_0x33d630(0xb6)+a162_0x13770a['cyan'](_0x1dacb5[_0x33d630(0xdb)]):''));try{await runTask('Copy\x20project\x20files',()=>copyProjectTemplate(_0x1dacb5[_0x33d630(0xe3)])),await updatePackageJsonName(_0x1dacb5[_0x33d630(0xe3)]),await runTask(_0x33d630(0xbd),()=>installDependencies(_0x1dacb5[_0x33d630(0xe3)])),await runTask(_0x33d630(0xeb),()=>formatProjectCode(_0x1dacb5[_0x33d630(0xe3)])),await configureAppCode(_0x1dacb5[_0x33d630(0xe3)],_0x1dacb5[_0x33d630(0xdb)]||'',_0x1dacb5[_0x33d630(0xb1)]);let _0x54b3ac=![];if(_0x1dacb5[_0x33d630(0xdb)]){console[_0x33d630(0xe8)]('*\x20Pulling\x20API\x20configuration...');const _0x3acc63=process[_0x33d630(0xe4)]();try{process[_0x33d630(0xee)](_0x2b8e4d);const _0x544872=_0x1dacb5['env']||'production';initEnv(_0x544872);const {configArray:_0x265e67}=await fetchModelList(_0x1dacb5[_0x33d630(0xdb)],_0x528ae9[_0x33d630(0xe5)]||''),_0x4035f8=DEFAULT_API_DIR,_0x3ee977=await generateApiFile(_0x265e67,'',_0x1dacb5[_0x33d630(0xdb)],!![],_0x544872,_0x4035f8);console['log'](_0x33d630(0xd4)+_0x265e67['length']+'\x20dataset(s),\x20generated\x20'+_0x3ee977['modelCount']+_0x33d630(0xdf)),logger['info'](_0x33d630(0xf8),_0x33d630(0xea)+_0x1dacb5['appCode']);}catch(_0x58f098){_0x54b3ac=!![],console[_0x33d630(0xe8)](_0x33d630(0xa7)),logger[_0x33d630(0xf5)]('create','API\x20配置拉取异常',{'error':_0x58f098 instanceof Error?_0x58f098[_0x33d630(0xe6)]:String(_0x58f098)});}finally{process[_0x33d630(0xee)](_0x3acc63);}}logger['success'](_0x33d630(0xf8),_0x33d630(0xc9)+_0x1dacb5[_0x33d630(0xe3)]),console[_0x33d630(0xe8)](),console[_0x33d630(0xe8)](a162_0x13770a[_0x33d630(0xb4)]('─'[_0x33d630(0xfd)](0x3c))),console[_0x33d630(0xe8)](a162_0x13770a[_0x33d630(0xe1)][_0x33d630(0xa6)](_0x33d630(0xfa))),console[_0x33d630(0xe8)](),console[_0x33d630(0xe8)](_0x33d630(0xdd)+a162_0x13770a['cyan'][_0x33d630(0xa6)]('cd\x20'+_0x1dacb5[_0x33d630(0xe3)]+'\x20&&\x20'+CLI_BIN_NAME+'\x20run\x20start')),_0x54b3ac&&console['log']('\x20\x202.\x20Pull\x20API\x20configuration:\x20'+a162_0x13770a[_0x33d630(0xe1)][_0x33d630(0xa6)](CLI_BIN_NAME+_0x33d630(0xc4))),console[_0x33d630(0xe8)](a162_0x13770a[_0x33d630(0xb4)]('─'[_0x33d630(0xfd)](0x3c)));}catch(_0x114c6e){logger[_0x33d630(0xd1)](_0x33d630(0xf8),_0x33d630(0xef)+_0x1dacb5['projectName'],{'error':_0x114c6e instanceof Error?_0x114c6e[_0x33d630(0xe6)]:String(_0x114c6e)});try{a162_0x353dac[_0x33d630(0xac)](_0x2b8e4d)&&(console[_0x33d630(0xe8)](_0x33d630(0xcf)+_0x2b8e4d),a162_0x353dac['rmSync'](_0x2b8e4d,{'recursive':!![],'force':!![]}));}catch{logger[_0x33d630(0xf5)](_0x33d630(0xf8),_0x33d630(0xf0)+_0x2b8e4d);}throw _0x114c6e;}}async function runTask(_0x27e955,_0x322a03){const _0x49b1a7=a162_0x171d,_0x5bab8d=a162_0x23c772(_0x27e955+'...')[_0x49b1a7(0xab)]();try{const _0xac0dca=await _0x322a03();_0x5bab8d[_0x49b1a7(0xdc)](),console[_0x49b1a7(0xe8)](''+a162_0x13770a[_0x49b1a7(0xb4)]('\x20√\x20')+_0x27e955+'\x20'+a162_0x13770a[_0x49b1a7(0xd9)]('['+_0xac0dca+']'));}catch(_0x245e9e){_0x5bab8d['fail'](_0x27e955);throw _0x245e9e;}}async function updatePackageJsonName(_0x2cc262){const _0x4d033a=a162_0x171d,_0xc91c23=a162_0x49dfcf[_0x4d033a(0xe0)](process[_0x4d033a(0xe4)](),_0x2cc262),_0x1d3ae7=a162_0x49dfcf[_0x4d033a(0xb0)](_0xc91c23,_0x4d033a(0xf1));try{console[_0x4d033a(0xe8)](_0x4d033a(0xcc));const _0x326868=getRabetbaseCliPackageRoot(),_0x697db3=a162_0x49dfcf['join'](_0x326868,_0x4d033a(0xf1));let _0x7a5053=_0x4d033a(0xbb);try{const _0xa23fb3=JSON['parse'](a162_0x353dac[_0x4d033a(0xc0)](_0x697db3,_0x4d033a(0xc8)));_0x7a5053=_0xa23fb3['version']||_0x4d033a(0xbb);}catch{}const _0xb78976=a162_0x353dac[_0x4d033a(0xc0)](_0x1d3ae7,'utf8'),_0x554eeb=JSON[_0x4d033a(0xec)](_0xb78976);_0x554eeb[_0x4d033a(0xa9)]=_0x2cc262,_0x554eeb[_0x4d033a(0xca)]=_0x2cc262+_0x4d033a(0xf2)+_0x7a5053,a162_0x353dac[_0x4d033a(0xfb)](_0x1d3ae7,JSON[_0x4d033a(0xcb)](_0x554eeb,null,0x2)+'\x0a','utf8'),console[_0x4d033a(0xe8)]('√\x20package.json\x20updated:\x20name='+_0x2cc262),logger[_0x4d033a(0xa3)](_0x4d033a(0xf8),_0x4d033a(0xb7));}catch(_0x1d715f){logger['error']('create',_0x4d033a(0xda));throw _0x1d715f;}}async function configureAppCode(_0x5cf76d,_0x1bde6,_0x25e71a){const _0x1ad105=a162_0x171d,_0x445461=a162_0x49dfcf[_0x1ad105(0xe0)](process[_0x1ad105(0xe4)](),_0x5cf76d),_0x3e82cf=a162_0x49dfcf[_0x1ad105(0xb0)](_0x445461,NEW_CONFIG_NAME);try{_0x1bde6?console[_0x1ad105(0xe8)](_0x1ad105(0xf9)+_0x5cf76d+':\x20'+_0x1bde6):console['log']('*\x20Creating\x20configuration\x20file\x20for\x20project\x20'+_0x5cf76d);const _0xaa8069=getRabetbaseCliPackageRoot(),_0x763eee=a162_0x49dfcf[_0x1ad105(0xb0)](_0xaa8069,_0x1ad105(0xf1));let _0x605b8f=_0x1ad105(0xbb);try{const _0x212bcd=JSON['parse'](a162_0x353dac['readFileSync'](_0x763eee,_0x1ad105(0xc8)));_0x605b8f=_0x212bcd[_0x1ad105(0xd7)]||_0x1ad105(0xbb);}catch{}const _0x2b37a9=readConfig(),_0x424adf=typeof _0x2b37a9['env']===_0x1ad105(0xc2)?_0x2b37a9[_0x1ad105(0xb1)]:undefined,_0x264446={};for(const _0x39328f of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x2b37a9[_0x39328f]!=null)_0x264446[_0x39328f]=_0x2b37a9[_0x39328f];}const _0x40f0e7=buildCanonicalProjectConfig(_0x264446,{'appCodes':_0x1bde6?[_0x1bde6]:[],'env':_0x25e71a||_0x424adf||'production','metadata':{'createdAt':new Date()[_0x1ad105(0xe9)](),'version':_0x605b8f}});writeConfigFile(_0x3e82cf,_0x40f0e7),_0x1bde6?console[_0x1ad105(0xe8)](_0x1ad105(0xd2)+Object[_0x1ad105(0xce)](_0x40f0e7[_0x1ad105(0xf4)]||{})['join'](',\x20')+_0x1ad105(0xc6)+_0x40f0e7[_0x1ad105(0xbc)]):console[_0x1ad105(0xe8)](_0x1ad105(0xbe)+CLI_BIN_NAME+'\x20config\x20set\x20appcode\x20<app-code>\x27'),logger[_0x1ad105(0xa3)]('create',_0x1ad105(0xa8)+_0x1bde6);}catch(_0x58d522){logger['error'](_0x1ad105(0xf8),_0x1ad105(0xd3));}}
1
+ (function(_0x53fd2d,_0x108c03){const _0x578661=a162_0x44a1,_0x51e41a=_0x53fd2d();while(!![]){try{const _0x1d71da=parseInt(_0x578661(0x151))/0x1*(parseInt(_0x578661(0x168))/0x2)+-parseInt(_0x578661(0x138))/0x3*(parseInt(_0x578661(0x12f))/0x4)+-parseInt(_0x578661(0x130))/0x5*(-parseInt(_0x578661(0x157))/0x6)+parseInt(_0x578661(0x17a))/0x7*(-parseInt(_0x578661(0x15e))/0x8)+parseInt(_0x578661(0x139))/0x9*(parseInt(_0x578661(0x158))/0xa)+parseInt(_0x578661(0x177))/0xb*(parseInt(_0x578661(0x170))/0xc)+-parseInt(_0x578661(0x126))/0xd*(parseInt(_0x578661(0x156))/0xe);if(_0x1d71da===_0x108c03)break;else _0x51e41a['push'](_0x51e41a['shift']());}catch(_0x228762){_0x51e41a['push'](_0x51e41a['shift']());}}}(a162_0x1242,0x1bb5b));import a162_0x2d010c from'path';import a162_0x30089b from'fs';import a162_0x1363af from'chalk';import a162_0x4b9ee7 from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{readConfig}from'../../../utils/config.js';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';function a162_0x44a1(_0x178f13,_0x386596){_0x178f13=_0x178f13-0x11a;const _0x1242f6=a162_0x1242();let _0x44a19e=_0x1242f6[_0x178f13];return _0x44a19e;}import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';import{logger}from'../../../utils/logger.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';export async function createApp(_0x57a24b){const _0x3a7fd1=a162_0x44a1,_0x541a40=await checkCliVersion();(_0x541a40['needsUpgrade']||_0x541a40['belowMinimum'])&&(printCliUpgradeWarning(_0x541a40),assertCliVersionSupported(_0x541a40),logger[_0x3a7fd1(0x124)]('create',_0x3a7fd1(0x125),{'currentVersion':_0x541a40[_0x3a7fd1(0x136)],'stableVersion':_0x541a40[_0x3a7fd1(0x178)],'minimumVersion':_0x541a40['minimumVersion'],'needsUpgrade':_0x541a40['needsUpgrade'],'belowMinimum':_0x541a40['belowMinimum']}));if(_0x57a24b[_0x3a7fd1(0x134)]&&_0x57a24b[_0x3a7fd1(0x160)])await runCreate({'projectName':_0x57a24b['projectCode'],'appCode':_0x57a24b[_0x3a7fd1(0x160)],'env':_0x57a24b[_0x3a7fd1(0x149)]},_0x57a24b);else{if(_0x57a24b['projectCode']){const _0x584a4a=await selectSingleAppcode(_0x57a24b[_0x3a7fd1(0x16e)]);await runCreate({'projectName':_0x57a24b[_0x3a7fd1(0x134)],'appCode':_0x584a4a||undefined,'env':_0x57a24b[_0x3a7fd1(0x149)]},_0x57a24b);}else await guidedCreateProject(_0x47f519=>runCreate(_0x47f519,_0x57a24b),_0x57a24b[_0x3a7fd1(0x149)],_0x57a24b[_0x3a7fd1(0x16e)]);}}async function runCreate(_0x2a714f,_0x2afd91){const _0xb3569d=a162_0x44a1;if(!_0x2a714f[_0xb3569d(0x140)]||_0x2a714f[_0xb3569d(0x140)][_0xb3569d(0x13a)]()==='')throw new Error(_0xb3569d(0x11a));const _0x3e5266=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x3e5266[_0xb3569d(0x135)](_0x2a714f[_0xb3569d(0x140)]))throw new Error(_0xb3569d(0x131));if(_0x2a714f[_0xb3569d(0x140)][_0xb3569d(0x13d)]>0x64)throw new Error(_0xb3569d(0x166));const _0xa658dc=a162_0x2d010c[_0xb3569d(0x171)](process[_0xb3569d(0x146)](),_0x2a714f[_0xb3569d(0x140)]);if(a162_0x30089b[_0xb3569d(0x13f)](_0xa658dc))throw new Error('Project\x20directory\x20'+_0x2a714f[_0xb3569d(0x140)]+_0xb3569d(0x137));try{a162_0x30089b[_0xb3569d(0x153)](a162_0x2d010c[_0xb3569d(0x121)](_0xa658dc),a162_0x30089b[_0xb3569d(0x15b)][_0xb3569d(0x11e)]);}catch{throw new Error(_0xb3569d(0x12d));}logger[_0xb3569d(0x172)](_0xa658dc),logger[_0xb3569d(0x124)](_0xb3569d(0x12c),_0xb3569d(0x175)+_0x2a714f[_0xb3569d(0x140)],{'projectDir':_0xa658dc,'appCode':_0x2a714f[_0xb3569d(0x160)]}),console['log'](),console[_0xb3569d(0x143)](a162_0x1363af['green'](_0xb3569d(0x12a))+_0xb3569d(0x155)+a162_0x1363af['green'](_0x2a714f[_0xb3569d(0x140)])+(_0x2a714f[_0xb3569d(0x160)]?'\x20|\x20AppCode:\x20'+a162_0x1363af[_0xb3569d(0x11c)](_0x2a714f[_0xb3569d(0x160)]):''));try{await runTask('Copy\x20project\x20files',()=>copyProjectTemplate(_0x2a714f[_0xb3569d(0x140)])),await updatePackageJsonName(_0x2a714f[_0xb3569d(0x140)]),await runTask(_0xb3569d(0x14e),()=>installDependencies(_0x2a714f['projectName'])),await runTask(_0xb3569d(0x13c),()=>formatProjectCode(_0x2a714f[_0xb3569d(0x140)])),await configureAppCode(_0x2a714f[_0xb3569d(0x140)],_0x2a714f[_0xb3569d(0x160)]||'',_0x2a714f[_0xb3569d(0x149)]);let _0x3019ad=![];if(_0x2a714f[_0xb3569d(0x160)]){console['log'](_0xb3569d(0x14a));const _0x354bd0=process[_0xb3569d(0x146)]();try{process[_0xb3569d(0x16a)](_0xa658dc);const _0x538328=_0x2a714f[_0xb3569d(0x149)]||_0xb3569d(0x174);initEnv(_0x538328);const {configArray:_0x538d33}=await fetchModelList(_0x2a714f[_0xb3569d(0x160)],_0x2afd91[_0xb3569d(0x16e)]||''),_0xf50104=DEFAULT_API_DIR,_0x3268cf=await generateApiFile(_0x538d33,'',_0x2a714f[_0xb3569d(0x160)],!![],_0x538328,_0xf50104);console[_0xb3569d(0x143)](_0xb3569d(0x145)+_0x538d33[_0xb3569d(0x13d)]+_0xb3569d(0x141)+_0x3268cf[_0xb3569d(0x150)]+_0xb3569d(0x15a)),logger[_0xb3569d(0x124)](_0xb3569d(0x12c),_0xb3569d(0x133)+_0x2a714f[_0xb3569d(0x160)]);}catch(_0x2160b3){_0x3019ad=!![],console['log'](_0xb3569d(0x17d)),logger['warn']('create',_0xb3569d(0x129),{'error':_0x2160b3 instanceof Error?_0x2160b3['message']:String(_0x2160b3)});}finally{process[_0xb3569d(0x16a)](_0x354bd0);}}logger[_0xb3569d(0x123)](_0xb3569d(0x12c),'项目创建完成:\x20'+_0x2a714f[_0xb3569d(0x140)]),console[_0xb3569d(0x143)](),console[_0xb3569d(0x143)](a162_0x1363af[_0xb3569d(0x14f)]('─'[_0xb3569d(0x16b)](0x3c))),console[_0xb3569d(0x143)](a162_0x1363af[_0xb3569d(0x11c)][_0xb3569d(0x162)](_0xb3569d(0x15c))),console[_0xb3569d(0x143)](),console['log'](_0xb3569d(0x127)+a162_0x1363af[_0xb3569d(0x11c)][_0xb3569d(0x162)](_0xb3569d(0x12b)+_0x2a714f[_0xb3569d(0x140)]+_0xb3569d(0x161)+CLI_BIN_NAME+'\x20run\x20start')),_0x3019ad&&console['log'](_0xb3569d(0x120)+a162_0x1363af['cyan']['bold'](CLI_BIN_NAME+_0xb3569d(0x11b))),console[_0xb3569d(0x143)](a162_0x1363af[_0xb3569d(0x14f)]('─'[_0xb3569d(0x16b)](0x3c)));}catch(_0xaf5887){logger[_0xb3569d(0x15f)](_0xb3569d(0x12c),_0xb3569d(0x16d)+_0x2a714f[_0xb3569d(0x140)],{'error':_0xaf5887 instanceof Error?_0xaf5887['message']:String(_0xaf5887)});try{a162_0x30089b['existsSync'](_0xa658dc)&&(console[_0xb3569d(0x143)](_0xb3569d(0x14c)+_0xa658dc),a162_0x30089b[_0xb3569d(0x169)](_0xa658dc,{'recursive':!![],'force':!![]}));}catch{logger['warn']('create',_0xb3569d(0x13b)+_0xa658dc);}throw _0xaf5887;}}async function runTask(_0x15eb10,_0xc83a93){const _0x368fb2=a162_0x44a1,_0x111c46=a162_0x4b9ee7(_0x15eb10+'...')['start']();try{const _0x517c1a=await _0xc83a93();_0x111c46[_0x368fb2(0x14b)](),console[_0x368fb2(0x143)](''+a162_0x1363af[_0x368fb2(0x14f)](_0x368fb2(0x12a))+_0x15eb10+'\x20'+a162_0x1363af[_0x368fb2(0x165)]('['+_0x517c1a+']'));}catch(_0x31bf22){_0x111c46[_0x368fb2(0x167)](_0x15eb10);throw _0x31bf22;}}async function updatePackageJsonName(_0x2e377d){const _0x4f2331=a162_0x44a1,_0x2621ce=a162_0x2d010c['resolve'](process['cwd'](),_0x2e377d),_0x527d53=a162_0x2d010c[_0x4f2331(0x12e)](_0x2621ce,'package.json');try{console[_0x4f2331(0x143)](_0x4f2331(0x128));const _0x471fe8=getRabetbaseCliPackageRoot(),_0x2791ff=a162_0x2d010c[_0x4f2331(0x12e)](_0x471fe8,_0x4f2331(0x147));let _0x499127=_0x4f2331(0x148);try{const _0xb7c96b=JSON[_0x4f2331(0x17b)](a162_0x30089b['readFileSync'](_0x2791ff,_0x4f2331(0x132)));_0x499127=_0xb7c96b[_0x4f2331(0x144)]||_0x4f2331(0x148);}catch{}const _0x1a7f73=a162_0x30089b['readFileSync'](_0x527d53,_0x4f2331(0x132)),_0x1ef9db=JSON['parse'](_0x1a7f73);_0x1ef9db['name']=_0x2e377d,_0x1ef9db[_0x4f2331(0x179)]=_0x2e377d+_0x4f2331(0x122)+_0x499127,a162_0x30089b['writeFileSync'](_0x527d53,JSON[_0x4f2331(0x16f)](_0x1ef9db,null,0x2)+'\x0a',_0x4f2331(0x132)),console[_0x4f2331(0x143)](_0x4f2331(0x159)+_0x2e377d),logger[_0x4f2331(0x124)](_0x4f2331(0x12c),'更新\x20package.json\x20name');}catch(_0x1b4ee4){logger['error']('create',_0x4f2331(0x173));throw _0x1b4ee4;}}async function configureAppCode(_0x4b9287,_0x44c3e6,_0x3eeab9){const _0x828da=a162_0x44a1,_0x3da33f=a162_0x2d010c[_0x828da(0x171)](process[_0x828da(0x146)](),_0x4b9287),_0x3e7dbe=a162_0x2d010c[_0x828da(0x12e)](_0x3da33f,NEW_CONFIG_NAME);try{_0x44c3e6?console['log'](_0x828da(0x164)+_0x4b9287+':\x20'+_0x44c3e6):console['log']('*\x20Creating\x20configuration\x20file\x20for\x20project\x20'+_0x4b9287);const _0x3b085f=getRabetbaseCliPackageRoot(),_0x18ca75=a162_0x2d010c[_0x828da(0x12e)](_0x3b085f,'package.json');let _0x729d5=_0x828da(0x148);try{const _0xdd2656=JSON[_0x828da(0x17b)](a162_0x30089b[_0x828da(0x13e)](_0x18ca75,'utf8'));_0x729d5=_0xdd2656[_0x828da(0x144)]||_0x828da(0x148);}catch{}const _0x6d2170=readConfig(),_0x1ee105=typeof _0x6d2170[_0x828da(0x149)]===_0x828da(0x154)?_0x6d2170[_0x828da(0x149)]:undefined,_0x932c9={};for(const _0x38179f of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x6d2170[_0x38179f]!=null)_0x932c9[_0x38179f]=_0x6d2170[_0x38179f];}const _0x22f167=buildCanonicalProjectConfig(_0x932c9,{'appCodes':_0x44c3e6?[_0x44c3e6]:[],'env':_0x3eeab9||_0x1ee105||_0x828da(0x174),'metadata':{'createdAt':new Date()[_0x828da(0x152)](),'version':_0x729d5}});writeConfigFile(_0x3e7dbe,_0x22f167),_0x44c3e6?console['log'](_0x828da(0x11d)+Object[_0x828da(0x176)](_0x22f167[_0x828da(0x163)]||{})['join'](',\x20')+_0x828da(0x142)+_0x22f167[_0x828da(0x16c)]):console[_0x828da(0x143)](_0x828da(0x11f)+CLI_BIN_NAME+_0x828da(0x14d)),logger[_0x828da(0x124)](_0x828da(0x12c),_0x828da(0x17c)+_0x44c3e6);}catch(_0x53450f){logger[_0x828da(0x15f)](_0x828da(0x12c),_0x828da(0x15d));}}function a162_0x1242(){const _0x5ce11b=['Format\x20code','length','readFileSync','existsSync','projectName','\x20dataset(s),\x20generated\x20','\x20|\x20Default:\x20','log','version','√\x20Pulled\x20','cwd','package.json','1.0.0','env','*\x20Pulling\x20API\x20configuration...','stop','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','\x20config\x20set\x20appcode\x20<app-code>\x27','Install\x20dependencies','green','modelCount','3Lhsuls','toLocaleString','accessSync','string','Project\x20name:\x20','60606eAQniC','331332MbPUqL','379550YBEOpk','√\x20package.json\x20updated:\x20name=','\x20model(s)','constants','🚀\x20Next\x20Steps:','配置应用AppCode失败','152CTVPGv','error','appCode','\x20&&\x20','bold','apps','*\x20Configuring\x20AppCode\x20for\x20project\x20','gray','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','fail','4514xEzsFP','rmSync','chdir','repeat','defaultApp','项目创建失败:\x20','cookie','stringify','80364GLIjHE','resolve','setLogPath','更新\x20package.json\x20失败','production','开始创建项目:\x20','keys','341SCVRhi','stableVersion','description','46984hRLUDU','parse','配置应用AppCode:\x20','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','Project\x20name\x20cannot\x20be\x20empty','\x20api\x20pull','cyan','√\x20Configuration\x20file\x20created,\x20Apps:\x20','W_OK','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','\x20\x202.\x20Pull\x20API\x20configuration:\x20','dirname','\x20Generated\x20by\x20rabetbase\x20cli\x20','success','info','CLI\x20版本检查','637luwwlT','\x20\x201.\x20Start\x20project:\x20','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','API\x20配置拉取异常','\x20√\x20','cd\x20','create','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','join','52JzUkwW','5RnzwMv','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','utf8','API\x20configuration\x20pulled:\x20','projectCode','test','currentVersion','\x20already\x20exists','1437tTrIHn','45MNAwaB','trim','清理项目目录失败:\x20'];a162_0x1242=function(){return _0x5ce11b;};return a162_0x1242();}
@@ -1 +1 @@
1
- (function(_0x372669,_0x215cea){const _0x4a7afc=a163_0x26b7,_0x3c045e=_0x372669();while(!![]){try{const _0x2e6d4d=parseInt(_0x4a7afc(0x156))/0x1+-parseInt(_0x4a7afc(0x135))/0x2*(-parseInt(_0x4a7afc(0x13e))/0x3)+-parseInt(_0x4a7afc(0x139))/0x4+-parseInt(_0x4a7afc(0x165))/0x5*(-parseInt(_0x4a7afc(0x13d))/0x6)+-parseInt(_0x4a7afc(0x166))/0x7*(-parseInt(_0x4a7afc(0x164))/0x8)+parseInt(_0x4a7afc(0x14d))/0x9*(parseInt(_0x4a7afc(0x149))/0xa)+-parseInt(_0x4a7afc(0x15e))/0xb;if(_0x2e6d4d===_0x215cea)break;else _0x3c045e['push'](_0x3c045e['shift']());}catch(_0x2d6ad6){_0x3c045e['push'](_0x3c045e['shift']());}}}(a163_0xd104,0xd0923));import a163_0x13972d from'path';function a163_0xd104(){const _0x3a36c1=['\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','43440SHfDXS','\x20\x20rabetbase\x20run\x20start\x0a','\x20dataset(s),\x20generated\x20','writeFile','666CTZJrL','bun\x20run\x20format','\x20\x20Pulling\x20API\x20configuration...','\x20\x20Installing\x20dependencies...','\x22\x20already\x20exists.','npm','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','\x20api\x20pull`\x20manually\x20later.','\x0a\x20\x20cd\x20','1416227EIJfWg','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','env','*\x20Creating\x20project\x20','Project\x20name\x20cannot\x20be\x20empty.','dirname','parse','\x20created\x20successfully!','43545040RtoXNK','log','Check\x20directory\x20permissions.','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','bun','\x20\x20√\x20Pulled\x20','145480ZrinUN','15jMMZpa','259vAbYOq','length','\x20\x20√\x20Code\x20formatted','constants','belowMinimum','join','\x20\x20√\x20package.json\x20updated','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','validation','access','readFile','2354812RfUZXW','production','stringify','package.json','1579900LJkRat','\x0a√\x20Project\x20','cwd','utf-8','3239976kDNOyx','3fHAUeL','bun\x20--version','Project\x20directory\x20\x22','needsUpgrade','\x20model(s)','trim','...','Project\x20name\x20contains\x20invalid\x20characters.','toLocaleString','resolve'];a163_0xd104=function(){return _0x3a36c1;};return a163_0xd104();}import a163_0x5443a9 from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{readConfig}from'../../../utils/config.js';import{getCliVersion}from'../../../utils/version.js';import{CliErrors}from'../../../errors.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';function a163_0x26b7(_0x5475b9,_0x26ccdf){_0x5475b9=_0x5475b9-0x130;const _0xd104dc=a163_0xd104();let _0x26b7fa=_0xd104dc[_0x5475b9];return _0x26b7fa;}const execAsync=promisify(exec);export async function createProjectNonInteractive(_0x24628f,_0x1b4ae9,_0x1f9ef9,_0x53b3e3){const _0x308b85=a163_0x26b7,_0xf710c0=await checkCliVersion();(_0xf710c0[_0x308b85(0x141)]||_0xf710c0[_0x308b85(0x16a)])&&(printCliUpgradeWarning(_0xf710c0),assertCliVersionSupported(_0xf710c0));if(!_0x24628f||_0x24628f[_0x308b85(0x143)]()==='')throw CliErrors[_0x308b85(0x132)](_0x308b85(0x15a));const _0x25c1a3=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x25c1a3['test'](_0x24628f))throw CliErrors[_0x308b85(0x132)](_0x308b85(0x145),_0x308b85(0x161));if(_0x24628f[_0x308b85(0x167)]>0x64)throw CliErrors[_0x308b85(0x132)](_0x308b85(0x131));const _0x3bf46c=a163_0x13972d[_0x308b85(0x147)](process[_0x308b85(0x13b)](),_0x24628f);if(existsSync(_0x3bf46c))throw CliErrors[_0x308b85(0x132)](_0x308b85(0x140)+_0x24628f+_0x308b85(0x151),'Use\x20a\x20different\x20project\x20name.');try{const _0x1d7924=a163_0x13972d[_0x308b85(0x15b)](_0x3bf46c);await a163_0x5443a9[_0x308b85(0x133)](_0x1d7924,a163_0x5443a9[_0x308b85(0x169)]['W_OK']);}catch{throw CliErrors[_0x308b85(0x132)]('Cannot\x20create\x20project\x20in\x20current\x20directory.',_0x308b85(0x160));}try{console[_0x308b85(0x15f)](_0x308b85(0x159)+_0x24628f+_0x308b85(0x144));const _0x3d6748=getSubAppReactDemoTemplateDir();await copyDirectory(_0x3d6748,_0x3bf46c),console[_0x308b85(0x15f)]('\x20\x20√\x20Project\x20template\x20created'),await updatePackageJsonName(_0x24628f),console['log'](_0x308b85(0x130)),console[_0x308b85(0x15f)](_0x308b85(0x150)),console[_0x308b85(0x15f)](_0x308b85(0x157)),await formatCode(_0x3bf46c),console[_0x308b85(0x15f)](_0x308b85(0x168)),await configureProject(_0x24628f,_0x1f9ef9,_0x1b4ae9),console[_0x308b85(0x15f)]('\x20\x20√\x20Configuration\x20file\x20created'),_0x1f9ef9&&await pullApiConfig(_0x3bf46c,_0x1f9ef9,_0x1b4ae9,_0x53b3e3),console[_0x308b85(0x15f)](_0x308b85(0x13a)+_0x24628f+_0x308b85(0x15d)),console[_0x308b85(0x15f)](_0x308b85(0x155)+_0x24628f),console[_0x308b85(0x15f)](_0x308b85(0x14a));}catch(_0x2e1767){try{existsSync(_0x3bf46c)&&await a163_0x5443a9['rm'](_0x3bf46c,{'recursive':!![],'force':!![]});}catch{}throw _0x2e1767;}}async function updatePackageJsonName(_0xdd3a46){const _0x23436e=a163_0x26b7,_0xa29b62=a163_0x13972d[_0x23436e(0x147)](process[_0x23436e(0x13b)](),_0xdd3a46),_0xb5ec7=a163_0x13972d[_0x23436e(0x16b)](_0xa29b62,_0x23436e(0x138)),_0x4666e5=await a163_0x5443a9[_0x23436e(0x134)](_0xb5ec7,_0x23436e(0x13c)),_0x49f060=JSON[_0x23436e(0x15c)](_0x4666e5);_0x49f060['name']=_0xdd3a46,_0x49f060['description']=_0x23436e(0x153),await a163_0x5443a9[_0x23436e(0x14c)](_0xb5ec7,JSON[_0x23436e(0x137)](_0x49f060,null,0x2)+'\x0a');}function detectPackageManager(){const _0xea8873=a163_0x26b7;try{return execSync(_0xea8873(0x13f),{'stdio':'ignore'}),_0xea8873(0x162);}catch{return _0xea8873(0x152);}}async function formatCode(_0x1af35e){const _0xcc87a2=a163_0x26b7;try{await execAsync(_0xcc87a2(0x14e),{'cwd':_0x1af35e});}catch{}}async function configureProject(_0x259440,_0x29af4f,_0x52816e){const _0x55f31f=a163_0x26b7,_0x3837f0=a163_0x13972d['resolve'](process[_0x55f31f(0x13b)](),_0x259440),_0x31bd54=a163_0x13972d[_0x55f31f(0x16b)](_0x3837f0,NEW_CONFIG_NAME),_0x3bd5b4=readConfig(),_0x14b9c9=typeof _0x3bd5b4[_0x55f31f(0x158)]==='string'?_0x3bd5b4[_0x55f31f(0x158)]:undefined,_0x3df54b={};for(const _0x421155 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x3bd5b4[_0x421155]!=null)_0x3df54b[_0x421155]=_0x3bd5b4[_0x421155];}const _0x120213=buildCanonicalProjectConfig(_0x3df54b,{'appCodes':_0x29af4f?[_0x29af4f]:[],'env':_0x52816e||_0x14b9c9||'production','metadata':{'createdAt':new Date()[_0x55f31f(0x146)](),'version':getCliVersion()}});writeConfigFile(_0x31bd54,_0x120213);}async function pullApiConfig(_0x5eb321,_0x2dfdfc,_0x3fe2d8,_0x32f5df){const _0x403d42=a163_0x26b7,_0x500d87=process['cwd']();try{process['chdir'](_0x5eb321);const _0x1ea648=_0x3fe2d8||_0x403d42(0x136);initEnv(_0x1ea648),console[_0x403d42(0x15f)](_0x403d42(0x14f));const {configArray:_0x25ebc4}=await fetchModelList(_0x2dfdfc,_0x32f5df||''),_0x3503c0=await generateApiFile(_0x25ebc4,'',_0x2dfdfc,!![],_0x1ea648,DEFAULT_API_DIR);console[_0x403d42(0x15f)](_0x403d42(0x163)+_0x25ebc4['length']+_0x403d42(0x14b)+_0x3503c0['modelCount']+_0x403d42(0x142));}catch(_0x196849){console[_0x403d42(0x15f)](_0x403d42(0x148)+CLI_BIN_NAME+_0x403d42(0x154));}finally{process['chdir'](_0x500d87);}}
1
+ (function(_0x588482,_0x5d07cc){const _0x4970b3=a163_0x372d,_0x3fa07d=_0x588482();while(!![]){try{const _0x480b38=parseInt(_0x4970b3(0x114))/0x1+-parseInt(_0x4970b3(0x10f))/0x2*(parseInt(_0x4970b3(0x110))/0x3)+parseInt(_0x4970b3(0x102))/0x4+-parseInt(_0x4970b3(0x112))/0x5+-parseInt(_0x4970b3(0x120))/0x6*(-parseInt(_0x4970b3(0xfe))/0x7)+-parseInt(_0x4970b3(0x122))/0x8+-parseInt(_0x4970b3(0x105))/0x9*(-parseInt(_0x4970b3(0x128))/0xa);if(_0x480b38===_0x5d07cc)break;else _0x3fa07d['push'](_0x3fa07d['shift']());}catch(_0x57913d){_0x3fa07d['push'](_0x3fa07d['shift']());}}}(a163_0x269d,0x4775f));import a163_0x66cbc7 from'path';import a163_0x2c993f from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';function a163_0x372d(_0x7c6a28,_0x431ab3){_0x7c6a28=_0x7c6a28-0xfb;const _0x269dcc=a163_0x269d();let _0x372d5c=_0x269dcc[_0x7c6a28];return _0x372d5c;}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 a163_0x269d(){const _0x70097e=['length','301578VFiSPD','Cannot\x20create\x20project\x20in\x20current\x20directory.','3920704nUvntQ','writeFile','Project\x20directory\x20\x22','\x22\x20already\x20exists.','utf-8','modelCount','3466170nORPcM','ignore','\x20\x20rabetbase\x20run\x20start\x0a','validation','\x20api\x20pull`\x20manually\x20later.','bun\x20run\x20format','join','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','belowMinimum','Check\x20directory\x20permissions.','\x20\x20Installing\x20dependencies...','35YsBOwN','description','npm','Project\x20name\x20cannot\x20be\x20empty.','1108180kfptyb','...','\x20\x20√\x20Code\x20formatted','9nOeRJO','resolve','\x20\x20√\x20Configuration\x20file\x20created','chdir','dirname','trim','\x0a\x20\x20cd\x20','production','*\x20Creating\x20project\x20','constants','12142FBOMje','3VjAddd','\x20\x20√\x20Pulled\x20','1189010WVdIrR','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','151687aQlESM','env','\x20\x20√\x20Project\x20template\x20created','string','cwd','bun\x20--version','Project\x20name\x20contains\x20invalid\x20characters.','name','log','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','\x20model(s)'];a163_0x269d=function(){return _0x70097e;};return a163_0x269d();}const execAsync=promisify(exec);export async function createProjectNonInteractive(_0x575354,_0x201454,_0x3c9511,_0x54659b){const _0x4c4fef=a163_0x372d,_0xcda2b4=await checkCliVersion();(_0xcda2b4['needsUpgrade']||_0xcda2b4[_0x4c4fef(0xfb)])&&(printCliUpgradeWarning(_0xcda2b4),assertCliVersionSupported(_0xcda2b4));if(!_0x575354||_0x575354[_0x4c4fef(0x10a)]()==='')throw CliErrors[_0x4c4fef(0x12b)](_0x4c4fef(0x101));const _0x488ac0=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x488ac0['test'](_0x575354))throw CliErrors[_0x4c4fef(0x12b)](_0x4c4fef(0x11a),_0x4c4fef(0x11d));if(_0x575354['length']>0x64)throw CliErrors[_0x4c4fef(0x12b)](_0x4c4fef(0x113));const _0x22b9ff=a163_0x66cbc7[_0x4c4fef(0x106)](process[_0x4c4fef(0x118)](),_0x575354);if(existsSync(_0x22b9ff))throw CliErrors[_0x4c4fef(0x12b)](_0x4c4fef(0x124)+_0x575354+_0x4c4fef(0x125),'Use\x20a\x20different\x20project\x20name.');try{const _0x11d25a=a163_0x66cbc7[_0x4c4fef(0x109)](_0x22b9ff);await a163_0x2c993f['access'](_0x11d25a,a163_0x2c993f[_0x4c4fef(0x10e)]['W_OK']);}catch{throw CliErrors[_0x4c4fef(0x12b)](_0x4c4fef(0x121),_0x4c4fef(0xfc));}try{console[_0x4c4fef(0x11c)](_0x4c4fef(0x10d)+_0x575354+_0x4c4fef(0x103));const _0x5bbcc8=getSubAppReactDemoTemplateDir();await copyDirectory(_0x5bbcc8,_0x22b9ff),console[_0x4c4fef(0x11c)](_0x4c4fef(0x116)),await updatePackageJsonName(_0x575354),console[_0x4c4fef(0x11c)]('\x20\x20√\x20package.json\x20updated'),console[_0x4c4fef(0x11c)](_0x4c4fef(0xfd)),console[_0x4c4fef(0x11c)]('\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)'),await formatCode(_0x22b9ff),console[_0x4c4fef(0x11c)](_0x4c4fef(0x104)),await configureProject(_0x575354,_0x3c9511,_0x201454),console[_0x4c4fef(0x11c)](_0x4c4fef(0x107)),_0x3c9511&&await pullApiConfig(_0x22b9ff,_0x3c9511,_0x201454,_0x54659b),console[_0x4c4fef(0x11c)]('\x0a√\x20Project\x20'+_0x575354+'\x20created\x20successfully!'),console[_0x4c4fef(0x11c)](_0x4c4fef(0x10b)+_0x575354),console[_0x4c4fef(0x11c)](_0x4c4fef(0x12a));}catch(_0x76291c){try{existsSync(_0x22b9ff)&&await a163_0x2c993f['rm'](_0x22b9ff,{'recursive':!![],'force':!![]});}catch{}throw _0x76291c;}}async function updatePackageJsonName(_0x5d9981){const _0x573386=a163_0x372d,_0x1d4627=a163_0x66cbc7[_0x573386(0x106)](process[_0x573386(0x118)](),_0x5d9981),_0x5b075f=a163_0x66cbc7[_0x573386(0x12e)](_0x1d4627,'package.json'),_0x27fc4e=await a163_0x2c993f['readFile'](_0x5b075f,_0x573386(0x126)),_0x20624d=JSON['parse'](_0x27fc4e);_0x20624d[_0x573386(0x11b)]=_0x5d9981,_0x20624d[_0x573386(0xff)]=_0x573386(0x12f),await a163_0x2c993f[_0x573386(0x123)](_0x5b075f,JSON['stringify'](_0x20624d,null,0x2)+'\x0a');}function detectPackageManager(){const _0x4d2f1a=a163_0x372d;try{return execSync(_0x4d2f1a(0x119),{'stdio':_0x4d2f1a(0x129)}),'bun';}catch{return _0x4d2f1a(0x100);}}async function formatCode(_0x1ef99e){const _0xdf5901=a163_0x372d;try{await execAsync(_0xdf5901(0x12d),{'cwd':_0x1ef99e});}catch{}}async function configureProject(_0x44d301,_0x3fee08,_0x3b39c1){const _0x4960d7=a163_0x372d,_0x1fb1c3=a163_0x66cbc7['resolve'](process[_0x4960d7(0x118)](),_0x44d301),_0x7b1daf=a163_0x66cbc7[_0x4960d7(0x12e)](_0x1fb1c3,NEW_CONFIG_NAME),_0x503603=readConfig(),_0xa51a8b=typeof _0x503603[_0x4960d7(0x115)]===_0x4960d7(0x117)?_0x503603[_0x4960d7(0x115)]:undefined,_0x18eee1={};for(const _0x582dcb of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x503603[_0x582dcb]!=null)_0x18eee1[_0x582dcb]=_0x503603[_0x582dcb];}const _0x24372b=buildCanonicalProjectConfig(_0x18eee1,{'appCodes':_0x3fee08?[_0x3fee08]:[],'env':_0x3b39c1||_0xa51a8b||_0x4960d7(0x10c),'metadata':{'createdAt':new Date()['toLocaleString'](),'version':getCliVersion()}});writeConfigFile(_0x7b1daf,_0x24372b);}async function pullApiConfig(_0x4cb708,_0x4dff74,_0x3754e4,_0x267dcc){const _0x371d85=a163_0x372d,_0x4dbca7=process['cwd']();try{process[_0x371d85(0x108)](_0x4cb708);const _0x180528=_0x3754e4||'production';initEnv(_0x180528),console[_0x371d85(0x11c)]('\x20\x20Pulling\x20API\x20configuration...');const {configArray:_0x3e1c0b}=await fetchModelList(_0x4dff74,_0x267dcc||''),_0x53ca10=await generateApiFile(_0x3e1c0b,'',_0x4dff74,!![],_0x180528,DEFAULT_API_DIR);console[_0x371d85(0x11c)](_0x371d85(0x111)+_0x3e1c0b[_0x371d85(0x11f)]+'\x20dataset(s),\x20generated\x20'+_0x53ca10[_0x371d85(0x127)]+_0x371d85(0x11e));}catch(_0x198663){console[_0x371d85(0x11c)]('\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`'+CLI_BIN_NAME+_0x371d85(0x12c));}finally{process[_0x371d85(0x108)](_0x4dbca7);}}
@@ -1 +1 @@
1
- const a164_0x5297d2=a164_0x3cdf;(function(_0x2373db,_0x3509fb){const _0x1126b7=a164_0x3cdf,_0x5ce08b=_0x2373db();while(!![]){try{const _0x329a84=parseInt(_0x1126b7(0x1b7))/0x1+parseInt(_0x1126b7(0x1c1))/0x2+-parseInt(_0x1126b7(0x1bf))/0x3+-parseInt(_0x1126b7(0x1b9))/0x4*(-parseInt(_0x1126b7(0x1bc))/0x5)+-parseInt(_0x1126b7(0x1c2))/0x6*(-parseInt(_0x1126b7(0x1be))/0x7)+-parseInt(_0x1126b7(0x1bd))/0x8+parseInt(_0x1126b7(0x1b6))/0x9*(-parseInt(_0x1126b7(0x1bb))/0xa);if(_0x329a84===_0x3509fb)break;else _0x5ce08b['push'](_0x5ce08b['shift']());}catch(_0x2b704c){_0x5ce08b['push'](_0x5ce08b['shift']());}}}(a164_0xcbe0,0x9201d));import a164_0x4d8162 from'node:path';import{fileURLToPath}from'node:url';const __dirname=a164_0x4d8162[a164_0x5297d2(0x1b5)](fileURLToPath(import.meta.url));function a164_0x3cdf(_0x2a62f6,_0x2c1ddb){_0x2a62f6=_0x2a62f6-0x1b4;const _0xcbe035=a164_0xcbe0();let _0x3cdf4d=_0xcbe035[_0x2a62f6];return _0x3cdf4d;}export function getRabetbaseCliPackageRoot(){const _0x50cb7f=a164_0x5297d2;return a164_0x4d8162['resolve'](__dirname,_0x50cb7f(0x1c0));}function a164_0xcbe0(){const _0x51eada=['3492966RaEAqF','../../../../','806466oGkhRF','1273710BrWQRZ','projects','dirname','36dgfxiD','910952jbTwcF','sub-app-react-demo','4tEIvSp','templates','1917040tVzPEo','3702890DIWLJW','2997760wxqXaZ','28nYOftm'];a164_0xcbe0=function(){return _0x51eada;};return a164_0xcbe0();}export function getSubAppReactDemoTemplateDir(){const _0x56ae28=a164_0x5297d2;return a164_0x4d8162['join'](getRabetbaseCliPackageRoot(),_0x56ae28(0x1ba),_0x56ae28(0x1b4),_0x56ae28(0x1b8));}
1
+ const a164_0x5540a7=a164_0x45d3;(function(_0x192ded,_0x26f936){const _0x4fec92=a164_0x45d3,_0x37806f=_0x192ded();while(!![]){try{const _0x5f5a06=-parseInt(_0x4fec92(0x1ee))/0x1+parseInt(_0x4fec92(0x1ea))/0x2*(-parseInt(_0x4fec92(0x1f3))/0x3)+-parseInt(_0x4fec92(0x1e8))/0x4*(-parseInt(_0x4fec92(0x1f1))/0x5)+-parseInt(_0x4fec92(0x1f4))/0x6+-parseInt(_0x4fec92(0x1f2))/0x7*(-parseInt(_0x4fec92(0x1f5))/0x8)+parseInt(_0x4fec92(0x1ed))/0x9*(-parseInt(_0x4fec92(0x1f8))/0xa)+parseInt(_0x4fec92(0x1f6))/0xb;if(_0x5f5a06===_0x26f936)break;else _0x37806f['push'](_0x37806f['shift']());}catch(_0x2784b0){_0x37806f['push'](_0x37806f['shift']());}}}(a164_0x110d,0x3b1c1));function a164_0x110d(){const _0xbb8cae=['projects','174422ZAMYwD','sub-app-react-demo','resolve','7731KYqwgQ','160646YmPDMB','dirname','../../../../','5BEsgXN','378fkkHEN','3CXmKUK','2440398soHJtW','61104KoVNfG','4129609eFITSp','templates','2350BBWPnd','1242788ybvtcJ'];a164_0x110d=function(){return _0xbb8cae;};return a164_0x110d();}import a164_0x15f38a from'node:path';function a164_0x45d3(_0x457979,_0x5f4ff2){_0x457979=_0x457979-0x1e8;const _0x110d8b=a164_0x110d();let _0x45d3cc=_0x110d8b[_0x457979];return _0x45d3cc;}import{fileURLToPath}from'node:url';const __dirname=a164_0x15f38a[a164_0x5540a7(0x1ef)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x3924f1=a164_0x5540a7;return a164_0x15f38a[_0x3924f1(0x1ec)](__dirname,_0x3924f1(0x1f0));}export function getSubAppReactDemoTemplateDir(){const _0x56738b=a164_0x5540a7;return a164_0x15f38a['join'](getRabetbaseCliPackageRoot(),_0x56738b(0x1f7),_0x56738b(0x1e9),_0x56738b(0x1eb));}
@@ -1 +1 @@
1
- (function(_0x524e17,_0x46a67a){const _0x11044c=a165_0x28b1,_0x2ef11f=_0x524e17();while(!![]){try{const _0xacb01f=parseInt(_0x11044c(0x115))/0x1*(-parseInt(_0x11044c(0x106))/0x2)+-parseInt(_0x11044c(0x111))/0x3*(-parseInt(_0x11044c(0x116))/0x4)+-parseInt(_0x11044c(0x108))/0x5+parseInt(_0x11044c(0x11c))/0x6*(parseInt(_0x11044c(0x113))/0x7)+parseInt(_0x11044c(0x109))/0x8*(parseInt(_0x11044c(0x11a))/0x9)+-parseInt(_0x11044c(0x10e))/0xa*(-parseInt(_0x11044c(0x10d))/0xb)+parseInt(_0x11044c(0x10b))/0xc*(-parseInt(_0x11044c(0x10f))/0xd);if(_0xacb01f===_0x46a67a)break;else _0x2ef11f['push'](_0x2ef11f['shift']());}catch(_0x28921d){_0x2ef11f['push'](_0x2ef11f['shift']());}}}(a165_0x44b3,0x5dcb0));import a165_0x2dbe4f from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a165_0x28b1(_0x2a6710,_0x311dc3){_0x2a6710=_0x2a6710-0x106;const _0x44b37f=a165_0x44b3();let _0x28b18f=_0x44b37f[_0x2a6710];return _0x28b18f;}import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x2dba4c){const _0x4f15f9=a165_0x28b1,_0x1b50c9=Date[_0x4f15f9(0x107)](),_0x4def30=a165_0x2dbe4f[_0x4f15f9(0x10a)](process[_0x4f15f9(0x112)](),_0x2dba4c);try{logger[_0x4f15f9(0x119)](_0x4f15f9(0x110),_0x4f15f9(0x118),{'projectCode':_0x2dba4c,'templateDir':templateDir}),await copyDirectory(templateDir,_0x4def30);const _0x3457df=Date[_0x4f15f9(0x107)]()-_0x1b50c9;logger[_0x4f15f9(0x114)]('copy',_0x4f15f9(0x10c),_0x3457df,{'projectCode':_0x2dba4c});}catch(_0x3e4d5f){const _0x4ca748=Date['now']()-_0x1b50c9;logger['error'](_0x4f15f9(0x110),_0x4f15f9(0x117),{'projectCode':_0x2dba4c,'error':_0x3e4d5f instanceof Error?_0x3e4d5f[_0x4f15f9(0x11b)]:String(_0x3e4d5f),'duration':_0x4ca748});throw _0x3e4d5f;}return formatElapsed(_0x1b50c9);}function a165_0x44b3(){const _0x1dfa4b=['info','18kDcVbq','message','1236csDxVj','73518NSyXuJ','now','1597630ZRNWSu','1076784NZCXCV','resolve','4188fHEXjl','项目模板复制完成','858QQgXiR','14510ToiwJd','15223RetcKp','copy','430179nkSdRY','cwd','16310fuOlTN','success','1KsLFHS','8IzZnHn','项目模板复制失败','开始复制项目模板'];a165_0x44b3=function(){return _0x1dfa4b;};return a165_0x44b3();}
1
+ (function(_0x6b490f,_0x4282f2){const _0x2becbd=a165_0x154f,_0x287926=_0x6b490f();while(!![]){try{const _0x38c99e=-parseInt(_0x2becbd(0x1a2))/0x1*(-parseInt(_0x2becbd(0x197))/0x2)+-parseInt(_0x2becbd(0x1a4))/0x3+parseInt(_0x2becbd(0x19b))/0x4+parseInt(_0x2becbd(0x198))/0x5+parseInt(_0x2becbd(0x1a0))/0x6+parseInt(_0x2becbd(0x19f))/0x7*(parseInt(_0x2becbd(0x1a5))/0x8)+parseInt(_0x2becbd(0x19d))/0x9*(-parseInt(_0x2becbd(0x1a9))/0xa);if(_0x38c99e===_0x4282f2)break;else _0x287926['push'](_0x287926['shift']());}catch(_0x30c643){_0x287926['push'](_0x287926['shift']());}}}(a165_0x2e41,0xe7dde));import a165_0x240746 from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';function a165_0x154f(_0x327e79,_0x403e9d){_0x327e79=_0x327e79-0x196;const _0x2e4197=a165_0x2e41();let _0x154fc8=_0x2e4197[_0x327e79];return _0x154fc8;}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();function a165_0x2e41(){const _0x11f387=['resolve','18dzGlos','error','11406297OiiqDu','9341964GyTtNi','项目模板复制失败','16349iKoCsh','copy','3541515vRlzdl','8CcOSfz','success','now','message','19958280ZkDnsE','info','cwd','14RuDITb','7371230XRElRi','开始复制项目模板','项目模板复制完成','5386932xLdQup'];a165_0x2e41=function(){return _0x11f387;};return a165_0x2e41();}export async function copyProjectTemplate(_0x1b2980){const _0x316613=a165_0x154f,_0x45bb51=Date[_0x316613(0x1a7)](),_0x572073=a165_0x240746[_0x316613(0x19c)](process[_0x316613(0x196)](),_0x1b2980);try{logger[_0x316613(0x1aa)](_0x316613(0x1a3),_0x316613(0x199),{'projectCode':_0x1b2980,'templateDir':templateDir}),await copyDirectory(templateDir,_0x572073);const _0x131564=Date[_0x316613(0x1a7)]()-_0x45bb51;logger[_0x316613(0x1a6)](_0x316613(0x1a3),_0x316613(0x19a),_0x131564,{'projectCode':_0x1b2980});}catch(_0x2c2a8b){const _0x143fed=Date['now']()-_0x45bb51;logger[_0x316613(0x19e)](_0x316613(0x1a3),_0x316613(0x1a1),{'projectCode':_0x1b2980,'error':_0x2c2a8b instanceof Error?_0x2c2a8b[_0x316613(0x1a8)]:String(_0x2c2a8b),'duration':_0x143fed});throw _0x2c2a8b;}return formatElapsed(_0x45bb51);}
@@ -1 +1 @@
1
- (function(_0x454ab4,_0x16fe90){const _0x247ee4=a166_0xab24,_0xb8e65c=_0x454ab4();while(!![]){try{const _0x496da0=-parseInt(_0x247ee4(0x13a))/0x1*(-parseInt(_0x247ee4(0x131))/0x2)+parseInt(_0x247ee4(0x137))/0x3+-parseInt(_0x247ee4(0x13c))/0x4*(-parseInt(_0x247ee4(0x12b))/0x5)+parseInt(_0x247ee4(0x132))/0x6*(parseInt(_0x247ee4(0x13f))/0x7)+-parseInt(_0x247ee4(0x12d))/0x8*(-parseInt(_0x247ee4(0x139))/0x9)+parseInt(_0x247ee4(0x12c))/0xa+-parseInt(_0x247ee4(0x12f))/0xb;if(_0x496da0===_0x16fe90)break;else _0xb8e65c['push'](_0xb8e65c['shift']());}catch(_0xe6879a){_0xb8e65c['push'](_0xb8e65c['shift']());}}}(a166_0x5b4d,0x96f36));import a166_0x5b6e96 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a166_0x5b4d(){const _0x389d25=['1592jdQrjE','--write','31908503wjlGLu','success','1661742Ibgvvf','72xjPtoA','format','now','message','开始格式化代码','2301537xovFDq','npx','17541loVFjb','1qmXAAK','resolve','4852508uXSqTm','代码格式化完成','prettier','185052FxxIaq','info','5nMQNeK','28070qyePHH'];a166_0x5b4d=function(){return _0x389d25;};return a166_0x5b4d();}import{resolveNpmBin}from'../../../utils/platform.js';function a166_0xab24(_0x1c88c7,_0x17b533){_0x1c88c7=_0x1c88c7-0x12a;const _0x5b4d1a=a166_0x5b4d();let _0xab24a1=_0x5b4d1a[_0x1c88c7];return _0xab24a1;}export async function formatProjectCode(_0x50c03a){const _0xa5d501=a166_0xab24,_0x104489=Date[_0xa5d501(0x134)](),_0x3e8454=a166_0x5b6e96[_0xa5d501(0x13b)](process['cwd'](),_0x50c03a);try{logger[_0xa5d501(0x12a)](_0xa5d501(0x133),_0xa5d501(0x136),{'projectCode':_0x50c03a}),await execa(resolveNpmBin(_0xa5d501(0x138)),[_0xa5d501(0x13e),_0xa5d501(0x12e),'.'],{'cwd':_0x3e8454});const _0xa8630e=Date['now']()-_0x104489;logger[_0xa5d501(0x130)](_0xa5d501(0x133),_0xa5d501(0x13d),_0xa8630e,{'projectCode':_0x50c03a});}catch(_0x33809b){const _0x1455cb=Date[_0xa5d501(0x134)]()-_0x104489;logger['error'](_0xa5d501(0x133),'代码格式化失败',{'projectCode':_0x50c03a,'error':_0x33809b instanceof Error?_0x33809b[_0xa5d501(0x135)]:String(_0x33809b),'duration':_0x1455cb});throw _0x33809b;}return formatElapsed(_0x104489);}
1
+ (function(_0xe31e3d,_0x4caf57){const _0x28466b=a166_0x39fa,_0x274cc4=_0xe31e3d();while(!![]){try{const _0x5505ee=parseInt(_0x28466b(0x131))/0x1+-parseInt(_0x28466b(0x142))/0x2*(-parseInt(_0x28466b(0x13e))/0x3)+parseInt(_0x28466b(0x139))/0x4+-parseInt(_0x28466b(0x13a))/0x5*(parseInt(_0x28466b(0x134))/0x6)+-parseInt(_0x28466b(0x141))/0x7*(-parseInt(_0x28466b(0x132))/0x8)+parseInt(_0x28466b(0x13c))/0x9+-parseInt(_0x28466b(0x136))/0xa*(parseInt(_0x28466b(0x133))/0xb);if(_0x5505ee===_0x4caf57)break;else _0x274cc4['push'](_0x274cc4['shift']());}catch(_0x2f2a16){_0x274cc4['push'](_0x274cc4['shift']());}}}(a166_0x1bfb,0xd7466));import a166_0x202a7b from'node:path';function a166_0x1bfb(){const _0x42c391=['1172ZwROnd','error','resolve','686783qgxfdJ','136760RZDWaw','11VfoEGl','24kxtuQP','format','12727240ZfltTm','message','代码格式化失败','305032hrGjLn','1360715fVAsXp','开始格式化代码','6444558gkZnGD','prettier','3867VxcOJE','now','success','413fswyey'];a166_0x1bfb=function(){return _0x42c391;};return a166_0x1bfb();}import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a166_0x39fa(_0x5bbadf,_0x5301aa){_0x5bbadf=_0x5bbadf-0x12f;const _0x1bfbc3=a166_0x1bfb();let _0x39faef=_0x1bfbc3[_0x5bbadf];return _0x39faef;}import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x8c5d52){const _0x322bfe=a166_0x39fa,_0x549dd5=Date['now'](),_0x3e084e=a166_0x202a7b[_0x322bfe(0x130)](process['cwd'](),_0x8c5d52);try{logger['info']('format',_0x322bfe(0x13b),{'projectCode':_0x8c5d52}),await execa(resolveNpmBin('npx'),[_0x322bfe(0x13d),'--write','.'],{'cwd':_0x3e084e});const _0x55e741=Date[_0x322bfe(0x13f)]()-_0x549dd5;logger[_0x322bfe(0x140)](_0x322bfe(0x135),'代码格式化完成',_0x55e741,{'projectCode':_0x8c5d52});}catch(_0x2eba31){const _0x470c85=Date[_0x322bfe(0x13f)]()-_0x549dd5;logger[_0x322bfe(0x12f)](_0x322bfe(0x135),_0x322bfe(0x138),{'projectCode':_0x8c5d52,'error':_0x2eba31 instanceof Error?_0x2eba31[_0x322bfe(0x137)]:String(_0x2eba31),'duration':_0x470c85});throw _0x2eba31;}return formatElapsed(_0x549dd5);}
@@ -1 +1 @@
1
- function a167_0xcaeb(_0x43be0a,_0x3e395b){_0x43be0a=_0x43be0a-0x1f3;const _0x571335=a167_0x5713();let _0xcaebc1=_0x571335[_0x43be0a];return _0xcaebc1;}(function(_0x4177bc,_0x12b514){const _0x27ab35=a167_0xcaeb,_0x5ac226=_0x4177bc();while(!![]){try{const _0x33b759=-parseInt(_0x27ab35(0x202))/0x1*(-parseInt(_0x27ab35(0x1f5))/0x2)+-parseInt(_0x27ab35(0x1f8))/0x3+parseInt(_0x27ab35(0x1fa))/0x4+-parseInt(_0x27ab35(0x1ff))/0x5+parseInt(_0x27ab35(0x204))/0x6+parseInt(_0x27ab35(0x1f4))/0x7+parseInt(_0x27ab35(0x205))/0x8*(-parseInt(_0x27ab35(0x1fe))/0x9);if(_0x33b759===_0x12b514)break;else _0x5ac226['push'](_0x5ac226['shift']());}catch(_0x46dd0b){_0x5ac226['push'](_0x5ac226['shift']());}}}(a167_0x5713,0xf1a5f));import a167_0x3b4e5f 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 installDependencies(_0x4098a7){const _0x593800=a167_0xcaeb,_0x5da557=Date[_0x593800(0x1f3)](),_0x208988=a167_0x3b4e5f[_0x593800(0x1f9)](process['cwd'](),_0x4098a7);try{logger[_0x593800(0x200)]('install',_0x593800(0x1fc),{'projectCode':_0x4098a7,'registry':_0x593800(0x1f6)}),await execa(resolveNpmBin(_0x593800(0x1fd)),[_0x593800(0x201),_0x593800(0x207),_0x593800(0x1f6)],{'cwd':_0x208988});const _0x2ed702=Date[_0x593800(0x1f3)]()-_0x5da557;logger[_0x593800(0x206)](_0x593800(0x201),'依赖安装完成',_0x2ed702,{'projectCode':_0x4098a7});}catch(_0x45c58d){const _0x1f69e5=Date['now']()-_0x5da557;logger[_0x593800(0x1fb)](_0x593800(0x201),_0x593800(0x203),{'projectCode':_0x4098a7,'error':_0x45c58d instanceof Error?_0x45c58d[_0x593800(0x1f7)]:String(_0x45c58d),'duration':_0x1f69e5});throw _0x45c58d;}return formatElapsed(_0x5da557);}function a167_0x5713(){const _0x11eb78=['33134eMgirA','https://registry.npmmirror.com','message','463134NycpST','resolve','2063204Gvnfaf','error','开始安装依赖','npm','2086947WqlQrr','990880bVkHlj','info','install','119CmMhkl','依赖安装失败','9544788yIUlLI','112dZAcrW','success','--registry','now','3574445LWXbZx'];a167_0x5713=function(){return _0x11eb78;};return a167_0x5713();}
1
+ (function(_0x2907ce,_0x433585){const _0x94337f=a167_0x4196,_0x2f8473=_0x2907ce();while(!![]){try{const _0x422913=parseInt(_0x94337f(0xab))/0x1+parseInt(_0x94337f(0xbd))/0x2*(-parseInt(_0x94337f(0xac))/0x3)+-parseInt(_0x94337f(0xb4))/0x4+-parseInt(_0x94337f(0xb7))/0x5*(parseInt(_0x94337f(0xad))/0x6)+parseInt(_0x94337f(0xae))/0x7*(parseInt(_0x94337f(0xbb))/0x8)+parseInt(_0x94337f(0xb9))/0x9+parseInt(_0x94337f(0xb8))/0xa;if(_0x422913===_0x433585)break;else _0x2f8473['push'](_0x2f8473['shift']());}catch(_0x4c4cb2){_0x2f8473['push'](_0x2f8473['shift']());}}}(a167_0x9cd5,0x7b971));import a167_0x3dbf80 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a167_0x4196(_0x5fbf87,_0x4cd888){_0x5fbf87=_0x5fbf87-0xab;const _0x9cd5cb=a167_0x9cd5();let _0x4196f4=_0x9cd5cb[_0x5fbf87];return _0x4196f4;}import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';function a167_0x9cd5(){const _0x2bad43=['4941144GxbRnx','依赖安装完成','88ZXdhXN','message','8ViKZrZ','install','440811VtkCWo','660957ghsxdk','102OihNOX','428561rncVvP','now','success','cwd','https://registry.npmmirror.com','开始安装依赖','595444bUatJG','--registry','info','182935eLXCIk','4950610poytty'];a167_0x9cd5=function(){return _0x2bad43;};return a167_0x9cd5();}export async function installDependencies(_0x264a3f){const _0x332017=a167_0x4196,_0x47825b=Date[_0x332017(0xaf)](),_0x52c948=a167_0x3dbf80['resolve'](process[_0x332017(0xb1)](),_0x264a3f);try{logger[_0x332017(0xb6)](_0x332017(0xbe),_0x332017(0xb3),{'projectCode':_0x264a3f,'registry':_0x332017(0xb2)}),await execa(resolveNpmBin('npm'),[_0x332017(0xbe),_0x332017(0xb5),_0x332017(0xb2)],{'cwd':_0x52c948});const _0x2bc12b=Date[_0x332017(0xaf)]()-_0x47825b;logger[_0x332017(0xb0)]('install',_0x332017(0xba),_0x2bc12b,{'projectCode':_0x264a3f});}catch(_0x3de4e3){const _0x2115ca=Date[_0x332017(0xaf)]()-_0x47825b;logger['error'](_0x332017(0xbe),'依赖安装失败',{'projectCode':_0x264a3f,'error':_0x3de4e3 instanceof Error?_0x3de4e3[_0x332017(0xbc)]:String(_0x3de4e3),'duration':_0x2115ca});throw _0x3de4e3;}return formatElapsed(_0x47825b);}
@@ -1 +1 @@
1
- const a168_0x200555=a168_0x1990;(function(_0x55c799,_0x116510){const _0x35e836=a168_0x1990,_0x313d91=_0x55c799();while(!![]){try{const _0x1a089c=parseInt(_0x35e836(0x18b))/0x1+-parseInt(_0x35e836(0x17d))/0x2*(-parseInt(_0x35e836(0x177))/0x3)+parseInt(_0x35e836(0x189))/0x4+-parseInt(_0x35e836(0x18c))/0x5+parseInt(_0x35e836(0x192))/0x6+parseInt(_0x35e836(0x175))/0x7+-parseInt(_0x35e836(0x183))/0x8;if(_0x1a089c===_0x116510)break;else _0x313d91['push'](_0x313d91['shift']());}catch(_0x3d56b5){_0x313d91['push'](_0x313d91['shift']());}}}(a168_0x44b6,0x63f71));import{CliErrors}from'../../errors.js';function a168_0x1990(_0x3c6136,_0x202b42){_0x3c6136=_0x3c6136-0x174;const _0x44b6c9=a168_0x44b6();let _0x1990ca=_0x44b6c9[_0x3c6136];return _0x1990ca;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{upgradeApp}from'../../commands/project/upgrade.js';const createFlags=[{'name':a168_0x200555(0x17f),'type':a168_0x200555(0x185),'description':'Project\x20name'},{'name':'env','type':'string','description':a168_0x200555(0x18d)},{'name':a168_0x200555(0x17c),'type':a168_0x200555(0x185),'description':a168_0x200555(0x193)}],upgradeFlags=[{'name':a168_0x200555(0x181),'type':a168_0x200555(0x174),'description':a168_0x200555(0x190),'default':![]}];function a168_0x44b6(){const _0x3c4118=['Target\x20environment','project','Create\x20a\x20new\x20project','Skip\x20confirmation\x20prompt','args','4563978fvlNdP','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','boolean','1219057PeBUVm','cookie','255CeOSRw','str','trim','validation','nonInteractive','appcode','8548CUpzjz','../../commands/project/create/main.js','name','write','yes','create','7779056yAONOV','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','string','bool','project-name','../../commands/project/create/non-interactive.js','105036DkcFoA','Usage:\x20','269342inGTov','1059330aHztyg'];a168_0x44b6=function(){return _0x3c4118;};return a168_0x44b6();}export const projectDefinitions=[{'service':a168_0x200555(0x18e),'command':a168_0x200555(0x182),'description':a168_0x200555(0x18f),'risk':a168_0x200555(0x180),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a168_0x200555(0x187),'description':'Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','required':![]}],'flags':createFlags,async 'execute'(_0x81da7d){const _0x1989c8=a168_0x200555,{createApp:_0x1455c3}=await import(_0x1989c8(0x17e)),{createProjectNonInteractive:_0x128623}=await import(_0x1989c8(0x188)),_0x301d21=_0x81da7d[_0x1989c8(0x178)](_0x1989c8(0x17f))['trim']()||_0x81da7d[_0x1989c8(0x191)][0x0]?.[_0x1989c8(0x179)](),_0x282e3c=_0x81da7d[_0x1989c8(0x178)]('env')||undefined,_0x1c9661=_0x81da7d['str'](_0x1989c8(0x17c))||undefined;if(_0x81da7d[_0x1989c8(0x17b)]){if(!_0x301d21)throw CliErrors[_0x1989c8(0x17a)]('Non-interactive\x20mode\x20requires\x20a\x20project\x20name.',_0x1989c8(0x18a)+CLI_BIN_NAME+_0x1989c8(0x184));await _0x128623(_0x301d21,_0x282e3c,_0x1c9661,_0x81da7d[_0x1989c8(0x176)]);}else await _0x1455c3({'projectCode':_0x301d21,'appCode':_0x1c9661,'env':_0x282e3c,'cookie':_0x81da7d['cookie']});return{'ok':!![]};}},{'service':a168_0x200555(0x18e),'command':'upgrade','description':'Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','risk':a168_0x200555(0x180),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x48abfd){const _0xe12567=a168_0x200555;return await upgradeApp(_0x48abfd[_0xe12567(0x17b)],{'yes':_0x48abfd[_0xe12567(0x186)](_0xe12567(0x181))}),{'ok':!![]};}}];
1
+ const a168_0x4da4cc=a168_0x5798;(function(_0x478a19,_0x133689){const _0x410e7e=a168_0x5798,_0x1f9c04=_0x478a19();while(!![]){try{const _0x4967b7=parseInt(_0x410e7e(0x193))/0x1*(parseInt(_0x410e7e(0x185))/0x2)+-parseInt(_0x410e7e(0x18f))/0x3+-parseInt(_0x410e7e(0x182))/0x4*(-parseInt(_0x410e7e(0x18d))/0x5)+parseInt(_0x410e7e(0x199))/0x6*(-parseInt(_0x410e7e(0x19e))/0x7)+-parseInt(_0x410e7e(0x1a0))/0x8+-parseInt(_0x410e7e(0x186))/0x9*(parseInt(_0x410e7e(0x19c))/0xa)+parseInt(_0x410e7e(0x197))/0xb*(parseInt(_0x410e7e(0x19b))/0xc);if(_0x4967b7===_0x133689)break;else _0x1f9c04['push'](_0x1f9c04['shift']());}catch(_0xa7adc6){_0x1f9c04['push'](_0x1f9c04['shift']());}}}(a168_0x5b94,0x2a6e2));function a168_0x5798(_0x43b1ec,_0x5c5662){_0x43b1ec=_0x43b1ec-0x17f;const _0x5b94c1=a168_0x5b94();let _0x579829=_0x5b94c1[_0x43b1ec];return _0x579829;}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{upgradeApp}from'../../commands/project/upgrade.js';const createFlags=[{'name':a168_0x4da4cc(0x188),'type':'string','description':a168_0x4da4cc(0x191)},{'name':'env','type':'string','description':a168_0x4da4cc(0x17f)},{'name':a168_0x4da4cc(0x196),'type':a168_0x4da4cc(0x19f),'description':'App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)'}],upgradeFlags=[{'name':'yes','type':a168_0x4da4cc(0x189),'description':'Skip\x20confirmation\x20prompt','default':![]}];export const projectDefinitions=[{'service':'project','command':'create','description':a168_0x4da4cc(0x18e),'risk':a168_0x4da4cc(0x18b),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'project-name','description':a168_0x4da4cc(0x19d),'required':![]}],'flags':createFlags,async 'execute'(_0x137ebe){const _0x56641b=a168_0x4da4cc,{createApp:_0x5225ce}=await import(_0x56641b(0x192)),{createProjectNonInteractive:_0x40ee0e}=await import(_0x56641b(0x183)),_0x449d87=_0x137ebe['str'](_0x56641b(0x188))[_0x56641b(0x19a)]()||_0x137ebe['args'][0x0]?.[_0x56641b(0x19a)](),_0xfe287f=_0x137ebe[_0x56641b(0x18a)]('env')||undefined,_0x2c9a8d=_0x137ebe['str'](_0x56641b(0x196))||undefined;if(_0x137ebe[_0x56641b(0x190)]){if(!_0x449d87)throw CliErrors[_0x56641b(0x195)](_0x56641b(0x187),_0x56641b(0x194)+CLI_BIN_NAME+_0x56641b(0x18c));await _0x40ee0e(_0x449d87,_0xfe287f,_0x2c9a8d,_0x137ebe['cookie']);}else await _0x5225ce({'projectCode':_0x449d87,'appCode':_0x2c9a8d,'env':_0xfe287f,'cookie':_0x137ebe[_0x56641b(0x181)]});return{'ok':!![]};}},{'service':a168_0x4da4cc(0x184),'command':a168_0x4da4cc(0x1a1),'description':'Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','risk':a168_0x4da4cc(0x18b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x2df9a7){const _0x5d2bb9=a168_0x4da4cc;return await upgradeApp(_0x2df9a7[_0x5d2bb9(0x190)],{'yes':_0x2df9a7[_0x5d2bb9(0x198)](_0x5d2bb9(0x180))}),{'ok':!![]};}}];function a168_0x5b94(){const _0x3fe8f7=['5047rkPWnD','string','123552SvcDGj','upgrade','Target\x20environment','yes','cookie','212CdRwoy','../../commands/project/create/non-interactive.js','project','76FXEQkz','47340WkHeWv','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','name','boolean','str','write','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','30255xIjZzR','Create\x20a\x20new\x20project','178809UrsauE','nonInteractive','Project\x20name','../../commands/project/create/main.js','5838fZiFil','Usage:\x20','validation','appcode','11LznLUk','bool','2226CyynRb','trim','64140LkDqNg','60RbJFRi','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)'];a168_0x5b94=function(){return _0x3fe8f7;};return a168_0x5b94();}