@lovrabet/rabetbase-cli 2.3.9-beta.2 → 2.3.9

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 (258) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/add.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -0
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/get.js +1 -1
  53. package/lib/commands/config/index.js +1 -1
  54. package/lib/commands/config/list.js +1 -1
  55. package/lib/commands/config/set.js +1 -1
  56. package/lib/commands/config/shared.js +1 -1
  57. package/lib/commands/data/filter.js +1 -1
  58. package/lib/commands/data/getOne.js +1 -1
  59. package/lib/commands/data/index.js +1 -1
  60. package/lib/commands/data/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.js +1 -1
  62. package/lib/commands/dataset/capability.js +1 -1
  63. package/lib/commands/dataset/delete.js +1 -1
  64. package/lib/commands/dataset/detail.js +1 -1
  65. package/lib/commands/dataset/extend-update.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/db/analysis-batching.js +1 -1
  80. package/lib/commands/db/analyze-batch-plan.js +1 -1
  81. package/lib/commands/db/analyze-cancel.js +1 -1
  82. package/lib/commands/db/analyze-start.js +1 -1
  83. package/lib/commands/db/analyze-status.js +1 -1
  84. package/lib/commands/db/create.js +1 -1
  85. package/lib/commands/db/delete.js +1 -1
  86. package/lib/commands/db/detail.js +1 -1
  87. package/lib/commands/db/diff.js +1 -1
  88. package/lib/commands/db/index.js +1 -1
  89. package/lib/commands/db/list.js +1 -1
  90. package/lib/commands/db/shared.js +1 -1
  91. package/lib/commands/db/tables.js +1 -1
  92. package/lib/commands/db/test.js +1 -1
  93. package/lib/commands/db/update.js +1 -1
  94. package/lib/commands/doctor.js +1 -1
  95. package/lib/commands/file/index.js +1 -1
  96. package/lib/commands/init/index.js +1 -1
  97. package/lib/commands/issue/index.js +1 -1
  98. package/lib/commands/issue/nudge.js +1 -1
  99. package/lib/commands/issue/report.js +1 -1
  100. package/lib/commands/issue/shared.js +1 -1
  101. package/lib/commands/logs/index.js +1 -1
  102. package/lib/commands/menu/delete.js +1 -0
  103. package/lib/commands/menu/group-create.js +1 -0
  104. package/lib/commands/menu/group-update.js +1 -0
  105. package/lib/commands/menu/index.js +1 -1
  106. package/lib/commands/menu/list.js +1 -1
  107. package/lib/commands/menu/regroup-start.js +1 -0
  108. package/lib/commands/menu/shared/compare-table.js +1 -1
  109. package/lib/commands/menu/shared/delete-plan.js +1 -0
  110. package/lib/commands/menu/shared/facts.js +1 -0
  111. package/lib/commands/menu/shared/index.js +1 -1
  112. package/lib/commands/menu/shared/inquirer.js +1 -1
  113. package/lib/commands/menu/shared/local-pages.js +1 -1
  114. package/lib/commands/menu/shared/logic.js +1 -1
  115. package/lib/commands/menu/shared/mutations.js +1 -0
  116. package/lib/commands/menu/shared/service.js +1 -1
  117. package/lib/commands/menu/shared/sync-core.js +1 -1
  118. package/lib/commands/menu/shared/update-core.js +1 -1
  119. package/lib/commands/menu/shared/valid-url.js +1 -1
  120. package/lib/commands/menu/sync.js +1 -1
  121. package/lib/commands/menu/update.js +1 -1
  122. package/lib/commands/notification/config-list.js +1 -1
  123. package/lib/commands/notification/index.js +1 -1
  124. package/lib/commands/page/generate-start.js +1 -1
  125. package/lib/commands/page/generate-status.js +1 -1
  126. package/lib/commands/page/index.js +1 -1
  127. package/lib/commands/page/pull.js +1 -1
  128. package/lib/commands/page/push.js +1 -1
  129. package/lib/commands/page/relation-audit.js +1 -1
  130. package/lib/commands/page/shared.js +1 -1
  131. package/lib/commands/page/standard-page-status.js +1 -1
  132. package/lib/commands/page/sync.js +1 -1
  133. package/lib/commands/permit/index.js +1 -1
  134. package/lib/commands/permit/page-get.js +1 -1
  135. package/lib/commands/permit/page-set.js +1 -1
  136. package/lib/commands/permit/role-apis-set.js +1 -1
  137. package/lib/commands/permit/role-menus-set.js +1 -1
  138. package/lib/commands/permit/role-menus.js +1 -1
  139. package/lib/commands/permit/shared.js +1 -1
  140. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  141. package/lib/commands/project/create/format-elapsed.js +1 -1
  142. package/lib/commands/project/create/main.js +1 -1
  143. package/lib/commands/project/create/non-interactive.js +1 -1
  144. package/lib/commands/project/create/project-template-path.js +1 -1
  145. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  146. package/lib/commands/project/create/use-format-code.js +1 -1
  147. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  148. package/lib/commands/project/index.js +1 -1
  149. package/lib/commands/project/init.js +1 -1
  150. package/lib/commands/project/upgrade.js +1 -1
  151. package/lib/commands/registry.js +1 -1
  152. package/lib/commands/role/create.js +1 -1
  153. package/lib/commands/role/delete.js +1 -1
  154. package/lib/commands/role/detail.js +1 -1
  155. package/lib/commands/role/index.js +1 -1
  156. package/lib/commands/role/list.js +1 -1
  157. package/lib/commands/role/shared.js +1 -1
  158. package/lib/commands/role/update.js +1 -1
  159. package/lib/commands/role/user-add.js +1 -1
  160. package/lib/commands/role/user-remove.js +1 -1
  161. package/lib/commands/role/user-resolve.js +1 -1
  162. package/lib/commands/run/index.js +1 -1
  163. package/lib/commands/schema.js +1 -1
  164. package/lib/commands/sql/create.js +1 -1
  165. package/lib/commands/sql/delete.js +1 -1
  166. package/lib/commands/sql/detail.js +1 -1
  167. package/lib/commands/sql/exec.js +1 -1
  168. package/lib/commands/sql/index.js +1 -1
  169. package/lib/commands/sql/list.js +1 -1
  170. package/lib/commands/sql/pull.js +1 -1
  171. package/lib/commands/sql/push.js +1 -1
  172. package/lib/commands/sql/save.js +1 -1
  173. package/lib/commands/sql/shared.js +1 -1
  174. package/lib/commands/sql/status.js +1 -1
  175. package/lib/commands/sql/validate.js +1 -1
  176. package/lib/commands/task/index.js +1 -0
  177. package/lib/commands/task/status.js +1 -0
  178. package/lib/commands/workspace/add.js +1 -1
  179. package/lib/commands/workspace/index.js +1 -1
  180. package/lib/commands/workspace/remove.js +1 -1
  181. package/lib/config/schema.js +1 -1
  182. package/lib/constant/cdn.js +1 -1
  183. package/lib/constant/cli.js +1 -1
  184. package/lib/constant/defaults.js +1 -1
  185. package/lib/constant/domain.js +1 -1
  186. package/lib/constant/env.js +1 -1
  187. package/lib/constant/output.js +1 -1
  188. package/lib/constant/paths.js +1 -1
  189. package/lib/constant/risk.js +1 -1
  190. package/lib/context/app-resolver.js +1 -1
  191. package/lib/context/auth-resolver.js +1 -1
  192. package/lib/context/config-loader.js +1 -1
  193. package/lib/context.js +1 -1
  194. package/lib/core/alias-resolver.js +1 -1
  195. package/lib/core/api-client.js +1 -1
  196. package/lib/core/bff/config.js +1 -1
  197. package/lib/core/bff/file-system.js +1 -1
  198. package/lib/core/bff/hash.js +1 -1
  199. package/lib/core/bff/lock.js +1 -1
  200. package/lib/core/bff/utils.js +1 -1
  201. package/lib/core/db-resolver.js +1 -1
  202. package/lib/core/page/file-system.js +1 -1
  203. package/lib/core/page/hash.js +1 -1
  204. package/lib/core/page/lock.js +1 -1
  205. package/lib/core/sql-index-auditor.js +1 -0
  206. package/lib/core/sql-sync/config.js +1 -1
  207. package/lib/core/sql-sync/file-system.js +1 -1
  208. package/lib/core/sql-sync/hash.js +1 -1
  209. package/lib/core/sql-sync/lock.js +1 -1
  210. package/lib/core/sql-sync/utils.js +1 -1
  211. package/lib/core/sql-validator.js +1 -1
  212. package/lib/errors.js +1 -1
  213. package/lib/framework/build-all-flags.js +1 -1
  214. package/lib/framework/error-output.js +1 -0
  215. package/lib/framework/explicit-yes.js +1 -0
  216. package/lib/framework/flags.js +1 -1
  217. package/lib/framework/help.js +1 -1
  218. package/lib/framework/index.js +1 -1
  219. package/lib/framework/output.js +1 -1
  220. package/lib/framework/response.js +1 -1
  221. package/lib/framework/runner-alias.js +1 -1
  222. package/lib/framework/runner.js +1 -1
  223. package/lib/framework/schema-export.js +1 -1
  224. package/lib/framework/types.js +1 -1
  225. package/lib/generated/build-info.js +1 -1
  226. package/lib/help.js +1 -1
  227. package/lib/skills/main.js +1 -1
  228. package/lib/skills/npx-skills-add.js +1 -1
  229. package/lib/telemetry/cli-command-trace.js +1 -1
  230. package/lib/telemetry/cli-help-trace.js +1 -1
  231. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  232. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  233. package/lib/telemetry/send-cli-trace-log.js +1 -1
  234. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  235. package/lib/utils/ai_config.js +1 -1
  236. package/lib/utils/apply-jq-filter.js +1 -1
  237. package/lib/utils/cdn-config.js +1 -1
  238. package/lib/utils/check-sdk-version.js +1 -1
  239. package/lib/utils/cli-version-check.js +1 -1
  240. package/lib/utils/cli-version-policy.js +1 -1
  241. package/lib/utils/config.js +1 -1
  242. package/lib/utils/copy-directory.js +1 -1
  243. package/lib/utils/entity-with-id.js +1 -1
  244. package/lib/utils/file-utils.js +1 -1
  245. package/lib/utils/guides-cdn.js +1 -1
  246. package/lib/utils/http-client.js +1 -1
  247. package/lib/utils/is-non-interactive.js +1 -1
  248. package/lib/utils/logger.js +1 -1
  249. package/lib/utils/params.js +1 -1
  250. package/lib/utils/platform.js +1 -1
  251. package/lib/utils/rules-cdn.js +1 -1
  252. package/lib/utils/sleep.js +1 -1
  253. package/lib/utils/template-replacer.js +1 -1
  254. package/lib/utils/update-notice.js +1 -1
  255. package/lib/utils/version.js +1 -1
  256. package/lib/utils/with-active-cookie.js +1 -1
  257. package/lib/utils/write-cli-side-channel.js +1 -1
  258. package/package.json +1 -1
@@ -1 +1 @@
1
- const a124_0x57eb9d=a124_0x35bb;(function(_0x45f01e,_0x4ffec9){const _0x3e3378=a124_0x35bb,_0x20be1d=_0x45f01e();while(!![]){try{const _0x52da6a=-parseInt(_0x3e3378(0x12c))/0x1+parseInt(_0x3e3378(0x135))/0x2*(parseInt(_0x3e3378(0x125))/0x3)+parseInt(_0x3e3378(0x11f))/0x4*(-parseInt(_0x3e3378(0x128))/0x5)+parseInt(_0x3e3378(0x12a))/0x6+-parseInt(_0x3e3378(0x136))/0x7*(-parseInt(_0x3e3378(0x12d))/0x8)+parseInt(_0x3e3378(0x13e))/0x9*(parseInt(_0x3e3378(0x120))/0xa)+-parseInt(_0x3e3378(0x131))/0xb;if(_0x52da6a===_0x4ffec9)break;else _0x20be1d['push'](_0x20be1d['shift']());}catch(_0x25ac28){_0x20be1d['push'](_0x20be1d['shift']());}}}(a124_0x3b65,0xeca6d));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a124_0x35bb(_0x31b9da,_0xedf887){_0x31b9da=_0x31b9da-0x11f;const _0x3b6541=a124_0x3b65();let _0x35bbfe=_0x3b6541[_0x31b9da];return _0x35bbfe;}import{loadDatasetDetailForPage,prepareDatasetAction,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';import{syncStandardPages}from'../../core/api-client.js';export const pageSync={'service':a124_0x57eb9d(0x127),'command':a124_0x57eb9d(0x138),'description':a124_0x57eb9d(0x13c),'risk':a124_0x57eb9d(0x133),'defaultOutputFormat':a124_0x57eb9d(0x13a),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a124_0x57eb9d(0x137),'type':'string','description':a124_0x57eb9d(0x139)}],async 'validate'(_0x28a22f){validateDatasetSelector(_0x28a22f);},async 'dryRun'(_0x1e5bd9){const _0x3a103b=a124_0x57eb9d,_0xfb4e6f=await prepare(_0x1e5bd9);return{'method':'POST','url':_0x3a103b(0x12f)+_0xfb4e6f['dataset'][_0x3a103b(0x132)]+_0x3a103b(0x121),'body':{'appCode':_0x1e5bd9[_0x3a103b(0x13b)]},'description':serializeDryRunDescription({'dataset':{'id':_0xfb4e6f[_0x3a103b(0x134)]['id'],'code':_0xfb4e6f['dataset'][_0x3a103b(0x132)],'name':_0xfb4e6f[_0x3a103b(0x134)][_0x3a103b(0x122)],'fieldCount':_0xfb4e6f[_0x3a103b(0x134)][_0x3a103b(0x12b)]},'relatedPages':{'total':_0xfb4e6f[_0x3a103b(0x134)][_0x3a103b(0x12e)][_0x3a103b(0x126)],'undeletedCount':_0xfb4e6f['undeletedPages']['length']},'action':'sync','reason':_0xfb4e6f[_0x3a103b(0x129)][_0x3a103b(0x126)]+_0x3a103b(0x124)})};},async 'execute'(_0x978bb5){const _0x863a63=a124_0x57eb9d,_0x43aa5e=await prepare(_0x978bb5),_0x4df0ee=await syncStandardPages(_0x978bb5[_0x863a63(0x13b)],_0x43aa5e['dataset'][_0x863a63(0x132)]),_0x39332b=Array['isArray'](_0x4df0ee[_0x863a63(0x13d)])&&_0x4df0ee[_0x863a63(0x13d)]['length']>0x0,_0x231ce4=_0x39332b?_0x863a63(0x130):_0x863a63(0x123);return{'ok':!![],'message':_0x231ce4,'data':{'datasetCode':_0x43aa5e['dataset'][_0x863a63(0x132)],..._0x4df0ee}};}};function a124_0x3b65(){const _0x347798=['9lhXMEf','8AuhxNH','196330GDSwFa','/sync-to-pages','name','同步成功','\x20undeleted\x20related\x20page(s)\x20found','6cOLvtM','length','page','4597550HptMdS','undeletedPages','10893684NyRndZ','fieldCount','77239dJJExm','10594936zCjBAT','relatedPages','/smartapi/lovrabet/dataset/','部分页面同步失败','23318482WyUKsV','code','write','dataset','1845832YQZZJk','7ONifmh','alias','sync','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','compress','appCode','Sync\x20dataset\x20changes\x20to\x20related\x20Smart\x20List\x20Pages','failedPages'];a124_0x3b65=function(){return _0x347798;};return a124_0x3b65();}async function prepare(_0x1b4238){const _0x462c65=a124_0x57eb9d,_0x56e1d1=await loadDatasetDetailForPage(_0x1b4238);return prepareDatasetAction(_0x56e1d1,_0x462c65(0x138));}
1
+ const a132_0x3ba3dc=a132_0x9499;(function(_0x10f0db,_0x25af95){const _0x4d30b7=a132_0x9499,_0x3312a0=_0x10f0db();while(!![]){try{const _0x2415fb=parseInt(_0x4d30b7(0x1cd))/0x1*(parseInt(_0x4d30b7(0x1bc))/0x2)+-parseInt(_0x4d30b7(0x1d4))/0x3+-parseInt(_0x4d30b7(0x1b7))/0x4*(parseInt(_0x4d30b7(0x1bb))/0x5)+-parseInt(_0x4d30b7(0x1cb))/0x6*(-parseInt(_0x4d30b7(0x1ce))/0x7)+parseInt(_0x4d30b7(0x1c9))/0x8*(parseInt(_0x4d30b7(0x1d0))/0x9)+-parseInt(_0x4d30b7(0x1c2))/0xa*(-parseInt(_0x4d30b7(0x1d2))/0xb)+-parseInt(_0x4d30b7(0x1d5))/0xc*(parseInt(_0x4d30b7(0x1d1))/0xd);if(_0x2415fb===_0x25af95)break;else _0x3312a0['push'](_0x3312a0['shift']());}catch(_0x58fb5a){_0x3312a0['push'](_0x3312a0['shift']());}}}(a132_0x358a,0xe7662));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a132_0x358a(){const _0x418239=['compress','19420pvygHk','/smartapi/lovrabet/dataset/','code','alias','length','page','sync','2551608ZhFRbh','同步成功','1790442DEKWHs','isArray','1NlaRcP','21QhIyDc','undeletedPages','9MKMWUR','2109796erpEqd','4477bsZRcM','dataset','1471857wTVoqu','84WYOxNe','\x20undeleted\x20related\x20page(s)\x20found','failedPages','string','200YhNBTE','fieldCount','name','appCode','102415gSSDOu','3188114RUKuDc','Sync\x20dataset\x20changes\x20to\x20related\x20Smart\x20List\x20Pages','relatedPages','/sync-to-pages','部分页面同步失败'];a132_0x358a=function(){return _0x418239;};return a132_0x358a();}function a132_0x9499(_0x3c5cf6,_0x47d0ad){_0x3c5cf6=_0x3c5cf6-0x1b7;const _0x358a75=a132_0x358a();let _0x94999b=_0x358a75[_0x3c5cf6];return _0x94999b;}import{loadDatasetDetailForPage,prepareDatasetAction,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';import{syncStandardPages}from'../../core/api-client.js';export const pageSync={'service':a132_0x3ba3dc(0x1c7),'command':a132_0x3ba3dc(0x1c8),'description':a132_0x3ba3dc(0x1bd),'risk':'write','defaultOutputFormat':a132_0x3ba3dc(0x1c1),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a132_0x3ba3dc(0x1c5),'type':a132_0x3ba3dc(0x1d8),'description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'}],async 'validate'(_0x4dca95){validateDatasetSelector(_0x4dca95);},async 'dryRun'(_0x4655dd){const _0x2af828=a132_0x3ba3dc,_0x1acf77=await prepare(_0x4655dd);return{'method':'POST','url':_0x2af828(0x1c3)+_0x1acf77[_0x2af828(0x1d3)][_0x2af828(0x1c4)]+_0x2af828(0x1bf),'body':{'appCode':_0x4655dd[_0x2af828(0x1ba)]},'description':serializeDryRunDescription({'dataset':{'id':_0x1acf77[_0x2af828(0x1d3)]['id'],'code':_0x1acf77[_0x2af828(0x1d3)][_0x2af828(0x1c4)],'name':_0x1acf77[_0x2af828(0x1d3)][_0x2af828(0x1b9)],'fieldCount':_0x1acf77[_0x2af828(0x1d3)][_0x2af828(0x1b8)]},'relatedPages':{'total':_0x1acf77['dataset'][_0x2af828(0x1be)][_0x2af828(0x1c6)],'undeletedCount':_0x1acf77['undeletedPages'][_0x2af828(0x1c6)]},'action':_0x2af828(0x1c8),'reason':_0x1acf77[_0x2af828(0x1cf)]['length']+_0x2af828(0x1d6)})};},async 'execute'(_0x4ab5dd){const _0x4665e0=a132_0x3ba3dc,_0x250c6c=await prepare(_0x4ab5dd),_0x1215b4=await syncStandardPages(_0x4ab5dd[_0x4665e0(0x1ba)],_0x250c6c[_0x4665e0(0x1d3)][_0x4665e0(0x1c4)]),_0x128b2d=Array[_0x4665e0(0x1cc)](_0x1215b4['failedPages'])&&_0x1215b4[_0x4665e0(0x1d7)][_0x4665e0(0x1c6)]>0x0,_0x40957c=_0x128b2d?_0x4665e0(0x1c0):_0x4665e0(0x1ca);return{'ok':!![],'message':_0x40957c,'data':{'datasetCode':_0x250c6c['dataset'][_0x4665e0(0x1c4)],..._0x1215b4}};}};async function prepare(_0x5182a3){const _0x30d065=a132_0x3ba3dc,_0x42f954=await loadDatasetDetailForPage(_0x5182a3);return prepareDatasetAction(_0x42f954,_0x30d065(0x1c8));}
@@ -1 +1 @@
1
- (function(_0x533f9a,_0x56db24){const _0x11dec3=a125_0x1b22,_0x23869d=_0x533f9a();while(!![]){try{const _0x35da3b=parseInt(_0x11dec3(0x16f))/0x1+parseInt(_0x11dec3(0x176))/0x2+parseInt(_0x11dec3(0x173))/0x3+-parseInt(_0x11dec3(0x175))/0x4+parseInt(_0x11dec3(0x170))/0x5*(parseInt(_0x11dec3(0x178))/0x6)+parseInt(_0x11dec3(0x174))/0x7*(parseInt(_0x11dec3(0x177))/0x8)+parseInt(_0x11dec3(0x171))/0x9*(-parseInt(_0x11dec3(0x172))/0xa);if(_0x35da3b===_0x56db24)break;else _0x23869d['push'](_0x23869d['shift']());}catch(_0x10d318){_0x23869d['push'](_0x23869d['shift']());}}}(a125_0x5271,0x18835));import{permitPageGet}from'../../commands/permit/page-get.js';import{permitPageSet}from'../../commands/permit/page-set.js';import{permitRoleMenus}from'../../commands/permit/role-menus.js';function a125_0x1b22(_0x1edadd,_0x11f41c){_0x1edadd=_0x1edadd-0x16f;const _0x527155=a125_0x5271();let _0x1b228b=_0x527155[_0x1edadd];return _0x1b228b;}import{permitRoleMenusSet}from'../../commands/permit/role-menus-set.js';function a125_0x5271(){const _0x5c3353=['10oSVRBf','211497LTzUaD','7JKeEKy','18572dAttvG','162812dVLMrM','1120040bbUiqr','2064ngFbLn','101999QLZngW','1390njhUhz','3460437BEqumL'];a125_0x5271=function(){return _0x5c3353;};return a125_0x5271();}import{permitRoleApisSet}from'../../commands/permit/role-apis-set.js';export const permitDefinitions=[permitPageGet,permitPageSet,permitRoleMenus,permitRoleMenusSet,permitRoleApisSet];
1
+ (function(_0x1f738c,_0x5ee69b){const _0x3d7f5d=a133_0x3425,_0x2817d1=_0x1f738c();while(!![]){try{const _0x200efa=-parseInt(_0x3d7f5d(0x14d))/0x1*(parseInt(_0x3d7f5d(0x151))/0x2)+parseInt(_0x3d7f5d(0x158))/0x3*(parseInt(_0x3d7f5d(0x156))/0x4)+-parseInt(_0x3d7f5d(0x154))/0x5*(-parseInt(_0x3d7f5d(0x155))/0x6)+parseInt(_0x3d7f5d(0x150))/0x7+parseInt(_0x3d7f5d(0x14e))/0x8*(parseInt(_0x3d7f5d(0x153))/0x9)+parseInt(_0x3d7f5d(0x152))/0xa*(parseInt(_0x3d7f5d(0x14f))/0xb)+-parseInt(_0x3d7f5d(0x157))/0xc;if(_0x200efa===_0x5ee69b)break;else _0x2817d1['push'](_0x2817d1['shift']());}catch(_0x152a74){_0x2817d1['push'](_0x2817d1['shift']());}}}(a133_0x1e0d,0x9a647));import{permitPageGet}from'../../commands/permit/page-get.js';import{permitPageSet}from'../../commands/permit/page-set.js';function a133_0x3425(_0x4843fe,_0x1af6d8){_0x4843fe=_0x4843fe-0x14d;const _0x1e0da2=a133_0x1e0d();let _0x3425f9=_0x1e0da2[_0x4843fe];return _0x3425f9;}import{permitRoleMenus}from'../../commands/permit/role-menus.js';function a133_0x1e0d(){const _0x5a9a44=['3SklzpR','1bryoWk','2319184mnDjgk','11AtNROE','3810450PnhclZ','1379464sKtfMs','5683190xqluQK','9DWyQQI','4789495qHgltB','6cdhqmt','4084604jnOYXi','24713928wpwWCN'];a133_0x1e0d=function(){return _0x5a9a44;};return a133_0x1e0d();}import{permitRoleMenusSet}from'../../commands/permit/role-menus-set.js';import{permitRoleApisSet}from'../../commands/permit/role-apis-set.js';export const permitDefinitions=[permitPageGet,permitPageSet,permitRoleMenus,permitRoleMenusSet,permitRoleApisSet];
@@ -1 +1 @@
1
- const a126_0x265f5c=a126_0x2979;function a126_0x2979(_0x300409,_0x51df0b){_0x300409=_0x300409-0x75;const _0xa7f4df=a126_0xa7f4();let _0x29799a=_0xa7f4df[_0x300409];return _0x29799a;}(function(_0x5a375f,_0x27d3a0){const _0x324e0a=a126_0x2979,_0x334974=_0x5a375f();while(!![]){try{const _0x3b8cf6=parseInt(_0x324e0a(0x83))/0x1+-parseInt(_0x324e0a(0x7c))/0x2+parseInt(_0x324e0a(0x7f))/0x3+parseInt(_0x324e0a(0x82))/0x4*(-parseInt(_0x324e0a(0x78))/0x5)+-parseInt(_0x324e0a(0x79))/0x6+-parseInt(_0x324e0a(0x7a))/0x7+parseInt(_0x324e0a(0x84))/0x8*(parseInt(_0x324e0a(0x76))/0x9);if(_0x3b8cf6===_0x27d3a0)break;else _0x334974['push'](_0x334974['shift']());}catch(_0x10c2e1){_0x334974['push'](_0x334974['shift']());}}}(a126_0xa7f4,0x4624b));import{getPagePermit}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{MENU_ID_FLAG,projectPagePermit}from'../../commands/permit/shared.js';function a126_0xa7f4(){const _0x34246f=['2891368gyDrGi','Show\x20the\x20page\x20permission\x20snapshot\x20for\x20a\x20menu','18tKVFLa','permit','106125aonhvu','1984746VDpbjD','3259788ZSHzlq','read','473594UXrswu','Page\x20permit\x20for\x20menu\x20','num','1577883laVweP','page-get','menu-id','16iHpceD','156676HZxDLw'];a126_0xa7f4=function(){return _0x34246f;};return a126_0xa7f4();}export const permitPageGet={'service':a126_0x265f5c(0x77),'command':a126_0x265f5c(0x80),'description':a126_0x265f5c(0x75),'risk':a126_0x265f5c(0x7b),'flags':[MENU_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0xa31a69){const _0x347ae7=a126_0x265f5c,_0x1e4035=_0xa31a69[_0x347ae7(0x7e)](_0x347ae7(0x81)),_0x723531=await getPagePermit(_0x1e4035);return{'ok':!![],'data':{'page':projectPagePermit(_0x723531)},'message':_0x347ae7(0x7d)+_0x1e4035};}};
1
+ const a134_0x1189a3=a134_0x21f5;(function(_0x47b681,_0x599d38){const _0x1340bd=a134_0x21f5,_0x497b38=_0x47b681();while(!![]){try{const _0x183690=-parseInt(_0x1340bd(0xc9))/0x1*(-parseInt(_0x1340bd(0xce))/0x2)+-parseInt(_0x1340bd(0xc6))/0x3*(parseInt(_0x1340bd(0xc5))/0x4)+parseInt(_0x1340bd(0xc7))/0x5*(parseInt(_0x1340bd(0xc4))/0x6)+parseInt(_0x1340bd(0xc0))/0x7*(-parseInt(_0x1340bd(0xc2))/0x8)+-parseInt(_0x1340bd(0xc1))/0x9*(parseInt(_0x1340bd(0xca))/0xa)+parseInt(_0x1340bd(0xcb))/0xb+parseInt(_0x1340bd(0xc3))/0xc*(parseInt(_0x1340bd(0xbf))/0xd);if(_0x183690===_0x599d38)break;else _0x497b38['push'](_0x497b38['shift']());}catch(_0xb0aa87){_0x497b38['push'](_0x497b38['shift']());}}}(a134_0x5308,0xd1c45));import{getPagePermit}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{MENU_ID_FLAG,projectPagePermit}from'../../commands/permit/shared.js';function a134_0x21f5(_0x52cea5,_0x29b4cd){_0x52cea5=_0x52cea5-0xbf;const _0x53087c=a134_0x5308();let _0x21f57f=_0x53087c[_0x52cea5];return _0x21f57f;}export const permitPageGet={'service':a134_0x1189a3(0xcd),'command':'page-get','description':a134_0x1189a3(0xc8),'risk':'read','flags':[MENU_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x465a36){const _0x58a73b=a134_0x1189a3,_0x293f86=_0x465a36['num']('menu-id'),_0x2cf6e9=await getPagePermit(_0x293f86);return{'ok':!![],'data':{'page':projectPagePermit(_0x2cf6e9)},'message':_0x58a73b(0xcc)+_0x293f86};}};function a134_0x5308(){const _0x1f2fee=['Show\x20the\x20page\x20permission\x20snapshot\x20for\x20a\x20menu','2yEuaTc','3917530HKTBUR','1582174hSDqHN','Page\x20permit\x20for\x20menu\x20','permit','1420770pjUSAB','1847079HTKgSi','35VILKAz','18rhaUqN','2045128CWhxaU','48GhjEPw','102852CLjjYC','184QiJBaU','51462hvvtBH','460layhLD'];a134_0x5308=function(){return _0x1f2fee;};return a134_0x5308();}
@@ -1 +1 @@
1
- const a127_0x450f76=a127_0x4079;(function(_0x3308bf,_0x333628){const _0x16d02d=a127_0x4079,_0x55cacf=_0x3308bf();while(!![]){try{const _0x431301=-parseInt(_0x16d02d(0x199))/0x1+parseInt(_0x16d02d(0x1b5))/0x2+parseInt(_0x16d02d(0x1b0))/0x3+-parseInt(_0x16d02d(0x1b1))/0x4*(-parseInt(_0x16d02d(0x1a9))/0x5)+parseInt(_0x16d02d(0x19e))/0x6*(parseInt(_0x16d02d(0x1ad))/0x7)+-parseInt(_0x16d02d(0x1a0))/0x8*(parseInt(_0x16d02d(0x1ae))/0x9)+parseInt(_0x16d02d(0x1b8))/0xa*(-parseInt(_0x16d02d(0x1a6))/0xb);if(_0x431301===_0x333628)break;else _0x55cacf['push'](_0x55cacf['shift']());}catch(_0x5a9773){_0x55cacf['push'](_0x55cacf['shift']());}}}(a127_0x1d8b,0xcdd89));function a127_0x4079(_0x1812b8,_0x2f795b){_0x1812b8=_0x1812b8-0x194;const _0x1d8bd1=a127_0x1d8b();let _0x40790f=_0x1d8bd1[_0x1812b8];return _0x40790f;}import{getPagePermit,savePagePermit}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{MENU_ID_FLAG,PAGE_SET_ROLE_FLAGS,PAGE_SLOT_SPECS,projectPageSlot,resolvePermitRoles,splitList}from'../../commands/permit/shared.js';const SAVE_PATH='/smartapi/permit/page/save';function collectRequestedSlots(_0x3a50e3){const _0x340e72=a127_0x4079,_0x12336c=[];for(const _0x279c2d of PAGE_SLOT_SPECS){const _0x285585=_0x3a50e3[_0x340e72(0x1af)](_0x279c2d[_0x340e72(0x1af)]);if(_0x285585===undefined||_0x285585===null)continue;const _0x468502=splitList(String(_0x285585));if(_0x468502[_0x340e72(0x1a8)]===0x0)throw CliErrors[_0x340e72(0x1b7)]('--'+_0x279c2d[_0x340e72(0x1af)]+'\x20cannot\x20be\x20empty.',_0x340e72(0x1b4));_0x12336c[_0x340e72(0x1ac)]({'spec':_0x279c2d,'refs':_0x468502});}return _0x12336c;}async function buildPlan(_0x11c612,_0x14cdf1){const _0x2fad3b=a127_0x4079,_0xda15c8=_0x11c612['num'](_0x2fad3b(0x19c)),_0x3d9144=collectRequestedSlots(_0x11c612);if(_0x3d9144[_0x2fad3b(0x1a8)]===0x0)throw CliErrors[_0x2fad3b(0x1b7)]('Nothing\x20to\x20set.','Pass\x20at\x20least\x20one\x20of:\x20'+PAGE_SLOT_SPECS['map'](_0x40d54e=>'--'+_0x40d54e['flag'])[_0x2fad3b(0x197)](',\x20')+'.');const _0x39d918=await getPagePermit(_0xda15c8),_0x31c388={},_0x15ef1f={},_0x5c6c8a=[];for(const {spec:_0x3cb5da,refs:_0x16dc74}of _0x3d9144){const _0x2f691f=_0x39d918[_0x3cb5da[_0x2fad3b(0x196)]];if(!_0x2f691f)throw CliErrors[_0x2fad3b(0x1b7)](_0x2fad3b(0x1a4)+_0x3cb5da[_0x2fad3b(0x1aa)]+_0x2fad3b(0x1ab)+_0x3cb5da['key']+').',_0x2fad3b(0x1a2));_0x31c388[_0x3cb5da[_0x2fad3b(0x196)]]=projectPageSlot(_0x2f691f);const _0x3bdfc3=await resolvePermitRoles(_0x11c612[_0x2fad3b(0x1b6)],_0x16dc74,{'allowSelf':_0x3cb5da[_0x2fad3b(0x19b)],'label':_0x3cb5da[_0x2fad3b(0x1aa)]});_0x2f691f[_0x2fad3b(0x198)]=_0x3bdfc3,_0x15ef1f[_0x3cb5da['key']]=projectPageSlot(_0x2f691f);}const _0x242ec4={'operation':_0x2fad3b(0x195),'selector':{'appCode':_0x11c612[_0x2fad3b(0x1b6)],'menuId':_0xda15c8,'slots':_0x3d9144[_0x2fad3b(0x19d)](_0x1ee4e9=>_0x1ee4e9[_0x2fad3b(0x1a3)][_0x2fad3b(0x196)])},'before':_0x31c388,'after':_0x15ef1f,'dryRun':_0x14cdf1,'backend':{'method':_0x2fad3b(0x1a5),'path':SAVE_PATH},'warnings':_0x5c6c8a};return{'page':_0x39d918,'mutation':_0x242ec4};}function a127_0x1d8b(){const _0x52256b=['692396xiTmCD','Nothing\x20to\x20set.','selector','Pass\x20at\x20least\x20one\x20role,\x20or\x20omit\x20the\x20flag.\x20Clearing\x20permissions\x20is\x20not\x20supported\x20by\x20this\x20command.','1193492UfFldC','appCode','validation','2714940YBfaqk','Set\x20page\x20permissions\x20for\x20a\x20menu\x20(menu/create/update/delete/detail/export/row\x20roles);\x20requires\x20--yes','high-risk-write','page-set','key','join','rolePermit','340426FIlYDL','permit','allowSelf','menu-id','map','6JyeQsn','menuId','296VxsSCw','Updated\x20page\x20permit\x20for\x20menu\x20','Only\x20slots\x20present\x20in\x20`permit\x20page-get`\x20can\x20be\x20set.','spec','This\x20page\x20has\x20no\x20\x22','POST','66emJCMB','Pass\x20at\x20least\x20one\x20of:\x20','length','45SQdvaM','label','\x22\x20permission\x20slot\x20(','push','4149208DUHNhp','277560ywiOWR','flag','3618702pijrcu'];a127_0x1d8b=function(){return _0x52256b;};return a127_0x1d8b();}export const permitPageSet={'service':a127_0x450f76(0x19a),'command':a127_0x450f76(0x195),'description':a127_0x450f76(0x1b9),'risk':a127_0x450f76(0x194),'flags':[MENU_ID_FLAG,...PAGE_SET_ROLE_FLAGS,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x801a0f){const _0x327e8a=a127_0x450f76,_0x4fdcec=collectRequestedSlots(_0x801a0f);if(_0x4fdcec['length']===0x0)throw CliErrors[_0x327e8a(0x1b7)](_0x327e8a(0x1b2),_0x327e8a(0x1a7)+PAGE_SLOT_SPECS[_0x327e8a(0x19d)](_0x105ad5=>'--'+_0x105ad5[_0x327e8a(0x1af)])[_0x327e8a(0x197)](',\x20')+'.');},async 'dryRun'(_0x12ab5a){const _0x2ed8a0=a127_0x450f76,{mutation:_0x31de9f}=await buildPlan(_0x12ab5a,!![]);return asDryRunResult(_0x31de9f,{'method':_0x2ed8a0(0x1a5),'url':SAVE_PATH});},async 'execute'(_0x192ff3){const _0x2cebfe=a127_0x450f76,{page:_0x45635d,mutation:_0x2f74ef}=await buildPlan(_0x192ff3,![]);return await savePagePermit(_0x45635d),{'ok':!![],'data':_0x2f74ef,'message':_0x2cebfe(0x1a1)+_0x2f74ef[_0x2cebfe(0x1b3)][_0x2cebfe(0x19f)]};}};
1
+ const a135_0x4e1758=a135_0x48e9;(function(_0x3a3411,_0x30eaeb){const _0xfbe412=a135_0x48e9,_0x431a69=_0x3a3411();while(!![]){try{const _0x13144d=parseInt(_0xfbe412(0x14f))/0x1*(parseInt(_0xfbe412(0x13c))/0x2)+parseInt(_0xfbe412(0x13d))/0x3*(parseInt(_0xfbe412(0x14e))/0x4)+parseInt(_0xfbe412(0x155))/0x5*(-parseInt(_0xfbe412(0x15c))/0x6)+parseInt(_0xfbe412(0x146))/0x7*(-parseInt(_0xfbe412(0x13a))/0x8)+-parseInt(_0xfbe412(0x143))/0x9*(-parseInt(_0xfbe412(0x14c))/0xa)+parseInt(_0xfbe412(0x152))/0xb*(-parseInt(_0xfbe412(0x154))/0xc)+parseInt(_0xfbe412(0x153))/0xd;if(_0x13144d===_0x30eaeb)break;else _0x431a69['push'](_0x431a69['shift']());}catch(_0x1bd485){_0x431a69['push'](_0x431a69['shift']());}}}(a135_0x505f,0x513a4));import{getPagePermit,savePagePermit}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{MENU_ID_FLAG,PAGE_SET_ROLE_FLAGS,PAGE_SLOT_SPECS,projectPageSlot,resolvePermitRoles,splitList}from'../../commands/permit/shared.js';function a135_0x505f(){const _0xdd3c98=['POST','page-set','/smartapi/permit/page/save','menu-id','1200wpQyGD','map','6484YHZLnC','350769ZIDbJS','spec','high-risk-write','6920331nIJVRC','3949660MMgyvp','12DXqIfn','5KIXMQw','Set\x20page\x20permissions\x20for\x20a\x20menu\x20(menu/create/update/delete/detail/export/row\x20roles);\x20requires\x20--yes','Only\x20slots\x20present\x20in\x20`permit\x20page-get`\x20can\x20be\x20set.','key','selector','length','num','123384BRMmMR','This\x20page\x20has\x20no\x20\x22','49112gmMjjO','appCode','2gckNiD','399mgmrbu','label','push','rolePermit','Nothing\x20to\x20set.','\x22\x20permission\x20slot\x20(','22689cVvtZh','join','validation','217nmOPDo','flag'];a135_0x505f=function(){return _0xdd3c98;};return a135_0x505f();}const SAVE_PATH=a135_0x4e1758(0x14a);function collectRequestedSlots(_0x4a9f85){const _0x404b46=a135_0x4e1758,_0x18fe7a=[];for(const _0x9d48a4 of PAGE_SLOT_SPECS){const _0x52a125=_0x4a9f85[_0x404b46(0x147)](_0x9d48a4['flag']);if(_0x52a125===undefined||_0x52a125===null)continue;const _0x54e08c=splitList(String(_0x52a125));if(_0x54e08c[_0x404b46(0x15a)]===0x0)throw CliErrors[_0x404b46(0x145)]('--'+_0x9d48a4[_0x404b46(0x147)]+'\x20cannot\x20be\x20empty.','Pass\x20at\x20least\x20one\x20role,\x20or\x20omit\x20the\x20flag.\x20Clearing\x20permissions\x20is\x20not\x20supported\x20by\x20this\x20command.');_0x18fe7a[_0x404b46(0x13f)]({'spec':_0x9d48a4,'refs':_0x54e08c});}return _0x18fe7a;}function a135_0x48e9(_0x23943b,_0x1fbb56){_0x23943b=_0x23943b-0x13a;const _0x505fbc=a135_0x505f();let _0x48e9e8=_0x505fbc[_0x23943b];return _0x48e9e8;}async function buildPlan(_0x211933,_0x28b240){const _0x3dafe2=a135_0x4e1758,_0x4816fd=_0x211933[_0x3dafe2(0x15b)](_0x3dafe2(0x14b)),_0x4a8d65=collectRequestedSlots(_0x211933);if(_0x4a8d65[_0x3dafe2(0x15a)]===0x0)throw CliErrors[_0x3dafe2(0x145)](_0x3dafe2(0x141),'Pass\x20at\x20least\x20one\x20of:\x20'+PAGE_SLOT_SPECS[_0x3dafe2(0x14d)](_0x256559=>'--'+_0x256559['flag'])[_0x3dafe2(0x144)](',\x20')+'.');const _0x157644=await getPagePermit(_0x4816fd),_0x34a8ee={},_0x128969={},_0x9cd5d5=[];for(const {spec:_0x2d1e49,refs:_0x3d95bd}of _0x4a8d65){const _0x31c953=_0x157644[_0x2d1e49[_0x3dafe2(0x158)]];if(!_0x31c953)throw CliErrors[_0x3dafe2(0x145)](_0x3dafe2(0x15d)+_0x2d1e49[_0x3dafe2(0x13e)]+_0x3dafe2(0x142)+_0x2d1e49['key']+').',_0x3dafe2(0x157));_0x34a8ee[_0x2d1e49[_0x3dafe2(0x158)]]=projectPageSlot(_0x31c953);const _0x1b6841=await resolvePermitRoles(_0x211933[_0x3dafe2(0x13b)],_0x3d95bd,{'allowSelf':_0x2d1e49['allowSelf'],'label':_0x2d1e49['label']});_0x31c953[_0x3dafe2(0x140)]=_0x1b6841,_0x128969[_0x2d1e49[_0x3dafe2(0x158)]]=projectPageSlot(_0x31c953);}const _0x5e6277={'operation':_0x3dafe2(0x149),'selector':{'appCode':_0x211933[_0x3dafe2(0x13b)],'menuId':_0x4816fd,'slots':_0x4a8d65['map'](_0x1e6a42=>_0x1e6a42[_0x3dafe2(0x150)][_0x3dafe2(0x158)])},'before':_0x34a8ee,'after':_0x128969,'dryRun':_0x28b240,'backend':{'method':_0x3dafe2(0x148),'path':SAVE_PATH},'warnings':_0x9cd5d5};return{'page':_0x157644,'mutation':_0x5e6277};}export const permitPageSet={'service':'permit','command':a135_0x4e1758(0x149),'description':a135_0x4e1758(0x156),'risk':a135_0x4e1758(0x151),'flags':[MENU_ID_FLAG,...PAGE_SET_ROLE_FLAGS,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x450ec6){const _0x58b149=a135_0x4e1758,_0x1145c6=collectRequestedSlots(_0x450ec6);if(_0x1145c6[_0x58b149(0x15a)]===0x0)throw CliErrors[_0x58b149(0x145)](_0x58b149(0x141),'Pass\x20at\x20least\x20one\x20of:\x20'+PAGE_SLOT_SPECS['map'](_0x590866=>'--'+_0x590866[_0x58b149(0x147)])['join'](',\x20')+'.');},async 'dryRun'(_0x40a9c9){const {mutation:_0xeccca9}=await buildPlan(_0x40a9c9,!![]);return asDryRunResult(_0xeccca9,{'method':'POST','url':SAVE_PATH});},async 'execute'(_0x55f80e){const _0x56c8b4=a135_0x4e1758,{page:_0x1df297,mutation:_0x2e20f1}=await buildPlan(_0x55f80e,![]);return await savePagePermit(_0x1df297),{'ok':!![],'data':_0x2e20f1,'message':'Updated\x20page\x20permit\x20for\x20menu\x20'+_0x2e20f1[_0x56c8b4(0x159)]['menuId']};}};
@@ -1 +1 @@
1
- const a128_0x47e0bb=a128_0x9a2a;(function(_0x381a88,_0x3d282c){const _0x5f1b38=a128_0x9a2a,_0x5a6664=_0x381a88();while(!![]){try{const _0x45fcca=parseInt(_0x5f1b38(0xb5))/0x1*(parseInt(_0x5f1b38(0x99))/0x2)+-parseInt(_0x5f1b38(0xab))/0x3*(parseInt(_0x5f1b38(0x97))/0x4)+-parseInt(_0x5f1b38(0x9f))/0x5*(parseInt(_0x5f1b38(0xac))/0x6)+-parseInt(_0x5f1b38(0xa1))/0x7*(-parseInt(_0x5f1b38(0x9b))/0x8)+-parseInt(_0x5f1b38(0x9e))/0x9*(parseInt(_0x5f1b38(0x93))/0xa)+-parseInt(_0x5f1b38(0xa0))/0xb+parseInt(_0x5f1b38(0xb4))/0xc*(parseInt(_0x5f1b38(0xa6))/0xd);if(_0x45fcca===_0x3d282c)break;else _0x5a6664['push'](_0x5a6664['shift']());}catch(_0x4908a3){_0x5a6664['push'](_0x5a6664['shift']());}}}(a128_0xed0a,0x22a8e));function a128_0xed0a(){const _0x441b9d=['has','set','48KVVLak','3721BFNDFH','revoke','flagMissing','role-apis-set\x20currently\x20supports\x20revoking\x20dataset\x20API\x20access\x20(use\x20case\x204).','join','Missing\x20--revoke.','validation','512570GxiaZF','bool','str','Pass\x20--datasets\x20<datasetCode,...>.','4HCgXjP','high-risk-write','26LFahHz','datasets','104RPVoev','Revoke\x20a\x20role\x27s\x20dataset\x20API\x20access\x20by\x20datasetCode\x20(roleType\x20API);\x20requires\x20--yes','datasetCodes','9NeTuSb','403605ysKUEz','947496UzDOak','8281SiSAKk','roleName','POST','selector','length','1847924qBVYnX','action','permit','push','get','574629lwvSMK','12UyEBOm','appCode','API','api-revoke','Unknown\x20datasetCode(s)\x20for\x20this\x20role\x27s\x20API\x20resources:\x20','Revoked\x20API\x20access\x20for\x20'];a128_0xed0a=function(){return _0x441b9d;};return a128_0xed0a();}import{getRoleApiResources,updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';function a128_0x9a2a(_0x41243f,_0x3d58ad){_0x41243f=_0x41243f-0x92;const _0xed0a85=a128_0xed0a();let _0x9a2af9=_0xed0a85[_0x41243f];return _0x9a2af9;}import{buildPermits,DATASETS_FLAG,flattenApiResources,readRoleRef,REVOKE_FLAG,ROLE_REF_FLAG,splitList}from'../../commands/permit/shared.js';import{assertPermConfigurable,resolveRoleRef}from'../../commands/role/shared.js';const UPDATE_PATH='/smartapi/permit/role/update';async function buildPlan(_0xc81573,_0x1041e9){const _0xc35c39=a128_0x9a2a,_0x57fa2f=await resolveRoleRef(_0xc81573[_0xc35c39(0xad)],readRoleRef(_0xc81573));assertPermConfigurable(_0x57fa2f);if(!_0xc81573[_0xc35c39(0x94)](_0xc35c39(0xb6)))throw CliErrors[_0xc35c39(0x92)](_0xc35c39(0xba),_0xc35c39(0xb8));const _0x198db8=splitList(_0xc81573['str'](_0xc35c39(0x9a)));if(_0x198db8[_0xc35c39(0xa5)]===0x0)throw CliErrors[_0xc35c39(0xb7)]('datasets',_0xc35c39(0x96));const _0x214ddb=await getRoleApiResources(_0xc81573[_0xc35c39(0xad)],_0x57fa2f['id']),{byCode:_0x3d1274,byDataset:_0x1afedb}=flattenApiResources(_0x214ddb),_0x5a9f13=_0x198db8['filter'](_0x3f1608=>!_0x1afedb[_0xc35c39(0xb2)](_0x3f1608));if(_0x5a9f13[_0xc35c39(0xa5)]>0x0)throw CliErrors['validation'](_0xc35c39(0xb0)+_0x5a9f13[_0xc35c39(0xb9)](',\x20')+'.','Verify\x20the\x20datasetCode,\x20or\x20check\x20the\x20role\x27s\x20API\x20resource\x20matrix.');const _0x451eee=new Map(),_0x513bae=[],_0x4f6cb2=[];for(const _0xf4727f of _0x198db8){for(const _0x5478dc of _0x1afedb[_0xc35c39(0xaa)](_0xf4727f)){const _0x12bb2a=_0x3d1274[_0xc35c39(0xaa)](_0x5478dc);_0x451eee[_0xc35c39(0xb3)](_0x5478dc,'0'),_0x513bae['push']({'resourceCode':_0x5478dc,'datasetCode':_0xf4727f,'action':_0x12bb2a[_0xc35c39(0xa7)]}),_0x4f6cb2[_0xc35c39(0xa9)]({'resourceCode':_0x5478dc,'datasetCode':_0xf4727f,'action':'0'});}}const _0xceac41=buildPermits(_0x3d1274,_0x451eee),_0x24e84d={'operation':_0xc35c39(0xaf),'selector':{'appCode':_0xc81573[_0xc35c39(0xad)],'roleId':_0x57fa2f['id'],'roleName':_0x57fa2f[_0xc35c39(0xa2)],'datasetCodes':_0x198db8},'before':_0x513bae,'after':_0x4f6cb2,'dryRun':_0x1041e9,'backend':{'method':_0xc35c39(0xa3),'path':UPDATE_PATH,'roleType':_0xc35c39(0xae)},'warnings':[]};return{'role':_0x57fa2f,'permits':_0xceac41,'mutation':_0x24e84d};}export const permitRoleApisSet={'service':a128_0x47e0bb(0xa8),'command':'role-apis-set','description':a128_0x47e0bb(0x9c),'risk':a128_0x47e0bb(0x98),'flags':[ROLE_REF_FLAG,REVOKE_FLAG,DATASETS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x36aedb){const _0x20bdca=a128_0x47e0bb;if(!_0x36aedb[_0x20bdca(0x94)](_0x20bdca(0xb6)))throw CliErrors[_0x20bdca(0x92)](_0x20bdca(0xba),_0x20bdca(0xb8));if(splitList(_0x36aedb[_0x20bdca(0x95)](_0x20bdca(0x9a)))[_0x20bdca(0xa5)]===0x0)throw CliErrors[_0x20bdca(0xb7)](_0x20bdca(0x9a),_0x20bdca(0x96));},async 'dryRun'(_0x5f1394){const _0x127f2f=a128_0x47e0bb,{mutation:_0xcbae2}=await buildPlan(_0x5f1394,!![]);return asDryRunResult(_0xcbae2,{'method':_0x127f2f(0xa3),'url':UPDATE_PATH});},async 'execute'(_0x2945da){const _0x4f22a4=a128_0x47e0bb,{role:_0x384ce1,permits:_0x55c965,mutation:_0x5c96a2}=await buildPlan(_0x2945da,![]);return await updateAppRole({'id':_0x384ce1['id'],'appCode':_0x2945da[_0x4f22a4(0xad)],'roleType':_0x4f22a4(0xae),'permits':_0x55c965}),{'ok':!![],'data':_0x5c96a2,'message':_0x4f22a4(0xb1)+_0x5c96a2[_0x4f22a4(0xa4)][_0x4f22a4(0x9d)][_0x4f22a4(0xa5)]+'\x20dataset(s)\x20on\x20role\x20'+_0x384ce1['roleName']};}};
1
+ const a136_0x961d7=a136_0x4f28;(function(_0x3ab034,_0x1c91ac){const _0x299162=a136_0x4f28,_0x3ae69d=_0x3ab034();while(!![]){try{const _0x27d99e=parseInt(_0x299162(0xee))/0x1+-parseInt(_0x299162(0xec))/0x2+parseInt(_0x299162(0xfa))/0x3*(parseInt(_0x299162(0xe0))/0x4)+parseInt(_0x299162(0xdc))/0x5+parseInt(_0x299162(0xf2))/0x6*(-parseInt(_0x299162(0xdd))/0x7)+-parseInt(_0x299162(0xdb))/0x8+parseInt(_0x299162(0xf6))/0x9;if(_0x27d99e===_0x1c91ac)break;else _0x3ae69d['push'](_0x3ae69d['shift']());}catch(_0x5db6e8){_0x3ae69d['push'](_0x3ae69d['shift']());}}}(a136_0xe1b2,0xb2388));import{getRoleApiResources,updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a136_0xe1b2(){const _0x2b6f2b=['role-apis-set\x20currently\x20supports\x20revoking\x20dataset\x20API\x20access\x20(use\x20case\x204).','Missing\x20--revoke.','get','high-risk-write','permit','Revoke\x20a\x20role\x27s\x20dataset\x20API\x20access\x20by\x20datasetCode\x20(roleType\x20API);\x20requires\x20--yes','POST','length','str','1273478QzisFS','roleName','1219747jjNetY','action','Verify\x20the\x20datasetCode,\x20or\x20check\x20the\x20role\x27s\x20API\x20resource\x20matrix.','API','180jcxgKj','Unknown\x20datasetCode(s)\x20for\x20this\x20role\x27s\x20API\x20resources:\x20','has','set','16578009lwkxho','\x20dataset(s)\x20on\x20role\x20','filter','validation','93018vslnCd','appCode','flagMissing','Revoked\x20API\x20access\x20for\x20','datasets','selector','join','7587008wxUtyd','2508505DUhEwx','312984WymWHp','bool','revoke','12doLwVR','role-apis-set','push'];a136_0xe1b2=function(){return _0x2b6f2b;};return a136_0xe1b2();}import{asDryRunResult}from'../../commands/common/dry-run.js';import{buildPermits,DATASETS_FLAG,flattenApiResources,readRoleRef,REVOKE_FLAG,ROLE_REF_FLAG,splitList}from'../../commands/permit/shared.js';import{assertPermConfigurable,resolveRoleRef}from'../../commands/role/shared.js';const UPDATE_PATH='/smartapi/permit/role/update';async function buildPlan(_0x13b74a,_0xc0ae6e){const _0x6bbddf=a136_0x4f28,_0x5135cc=await resolveRoleRef(_0x13b74a['appCode'],readRoleRef(_0x13b74a));assertPermConfigurable(_0x5135cc);if(!_0x13b74a[_0x6bbddf(0xde)](_0x6bbddf(0xdf)))throw CliErrors[_0x6bbddf(0xf9)](_0x6bbddf(0xe4),_0x6bbddf(0xe3));const _0x3f475d=splitList(_0x13b74a[_0x6bbddf(0xeb)](_0x6bbddf(0xfe)));if(_0x3f475d[_0x6bbddf(0xea)]===0x0)throw CliErrors['flagMissing']('datasets','Pass\x20--datasets\x20<datasetCode,...>.');const _0x43d246=await getRoleApiResources(_0x13b74a[_0x6bbddf(0xfb)],_0x5135cc['id']),{byCode:_0xb104a6,byDataset:_0x102338}=flattenApiResources(_0x43d246),_0x4f04ed=_0x3f475d[_0x6bbddf(0xf8)](_0x26590b=>!_0x102338[_0x6bbddf(0xf4)](_0x26590b));if(_0x4f04ed[_0x6bbddf(0xea)]>0x0)throw CliErrors[_0x6bbddf(0xf9)](_0x6bbddf(0xf3)+_0x4f04ed[_0x6bbddf(0xda)](',\x20')+'.',_0x6bbddf(0xf0));const _0x44576d=new Map(),_0x12b9ef=[],_0x42cb48=[];for(const _0x521e80 of _0x3f475d){for(const _0x11592a of _0x102338[_0x6bbddf(0xe5)](_0x521e80)){const _0x4b091a=_0xb104a6[_0x6bbddf(0xe5)](_0x11592a);_0x44576d[_0x6bbddf(0xf5)](_0x11592a,'0'),_0x12b9ef['push']({'resourceCode':_0x11592a,'datasetCode':_0x521e80,'action':_0x4b091a[_0x6bbddf(0xef)]}),_0x42cb48[_0x6bbddf(0xe2)]({'resourceCode':_0x11592a,'datasetCode':_0x521e80,'action':'0'});}}const _0x4f910f=buildPermits(_0xb104a6,_0x44576d),_0x2d4e8f={'operation':'api-revoke','selector':{'appCode':_0x13b74a[_0x6bbddf(0xfb)],'roleId':_0x5135cc['id'],'roleName':_0x5135cc[_0x6bbddf(0xed)],'datasetCodes':_0x3f475d},'before':_0x12b9ef,'after':_0x42cb48,'dryRun':_0xc0ae6e,'backend':{'method':_0x6bbddf(0xe9),'path':UPDATE_PATH,'roleType':_0x6bbddf(0xf1)},'warnings':[]};return{'role':_0x5135cc,'permits':_0x4f910f,'mutation':_0x2d4e8f};}function a136_0x4f28(_0x4caad7,_0x223821){_0x4caad7=_0x4caad7-0xda;const _0xe1b24a=a136_0xe1b2();let _0x4f2893=_0xe1b24a[_0x4caad7];return _0x4f2893;}export const permitRoleApisSet={'service':a136_0x961d7(0xe7),'command':a136_0x961d7(0xe1),'description':a136_0x961d7(0xe8),'risk':a136_0x961d7(0xe6),'flags':[ROLE_REF_FLAG,REVOKE_FLAG,DATASETS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x999606){const _0x730fdb=a136_0x961d7;if(!_0x999606[_0x730fdb(0xde)](_0x730fdb(0xdf)))throw CliErrors[_0x730fdb(0xf9)](_0x730fdb(0xe4),_0x730fdb(0xe3));if(splitList(_0x999606[_0x730fdb(0xeb)](_0x730fdb(0xfe)))['length']===0x0)throw CliErrors[_0x730fdb(0xfc)]('datasets','Pass\x20--datasets\x20<datasetCode,...>.');},async 'dryRun'(_0x6866e4){const {mutation:_0x19f602}=await buildPlan(_0x6866e4,!![]);return asDryRunResult(_0x19f602,{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0x3d5fed){const _0x5c98a3=a136_0x961d7,{role:_0x4be395,permits:_0xa30a10,mutation:_0x5b7e46}=await buildPlan(_0x3d5fed,![]);return await updateAppRole({'id':_0x4be395['id'],'appCode':_0x3d5fed[_0x5c98a3(0xfb)],'roleType':_0x5c98a3(0xf1),'permits':_0xa30a10}),{'ok':!![],'data':_0x5b7e46,'message':_0x5c98a3(0xfd)+_0x5b7e46[_0x5c98a3(0xff)]['datasetCodes'][_0x5c98a3(0xea)]+_0x5c98a3(0xf7)+_0x4be395[_0x5c98a3(0xed)]};}};
@@ -1 +1 @@
1
- function a129_0x2b42(_0x2d0f01,_0x15d7df){_0x2d0f01=_0x2d0f01-0x1ba;const _0x31c74f=a129_0x31c7();let _0x2b4202=_0x31c74f[_0x2d0f01];return _0x2b4202;}const a129_0x337475=a129_0x2b42;(function(_0x2b8dd0,_0x30b53f){const _0x378504=a129_0x2b42,_0x5b496e=_0x2b8dd0();while(!![]){try{const _0x1bd56e=parseInt(_0x378504(0x1d6))/0x1+-parseInt(_0x378504(0x1cd))/0x2+parseInt(_0x378504(0x1bc))/0x3*(parseInt(_0x378504(0x1d1))/0x4)+-parseInt(_0x378504(0x1c9))/0x5+-parseInt(_0x378504(0x1d5))/0x6+-parseInt(_0x378504(0x1bb))/0x7*(parseInt(_0x378504(0x1bf))/0x8)+parseInt(_0x378504(0x1ba))/0x9;if(_0x1bd56e===_0x30b53f)break;else _0x5b496e['push'](_0x5b496e['shift']());}catch(_0x17211a){_0x5b496e['push'](_0x5b496e['shift']());}}}(a129_0x31c7,0x60374));function a129_0x31c7(){const _0x2f8819=['length','14520015WIwrbr','7hyyxPj','6945mgKVXe','Updated\x20','flagMissing','898232hyQXXc','access','roleName','Pass\x20--menus\x20<resourceCode,...>.','/smartapi/permit/role/update','resourceCodes','Run\x20`permit\x20role-menus\x20--role\x20<id>`\x20to\x20see\x20valid\x20resourceCodes.','filter','get','push','3830660qTPmQc','PAGE','menu-revoke','appCode','579888FEUhRF','join','action','role-menus-set','88beRbuB','Grant\x20or\x20revoke\x20a\x20role\x27s\x20menu\x20access\x20by\x20resourceCode\x20(roleType\x20PAGE);\x20requires\x20--yes','\x20menu\x20permit(s)\x20for\x20role\x20','menus','3543042oXnCHg','488697SoBpCD','Unknown\x20menu\x20resourceCode(s):\x20','menu-grant','has'];a129_0x31c7=function(){return _0x2f8819;};return a129_0x31c7();}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=a129_0x337475(0x1c3);async function buildPlan(_0x55d1cb,_0x1ac4e9){const _0x5822e8=a129_0x337475,_0x1306ac=await resolveRoleRef(_0x55d1cb[_0x5822e8(0x1cc)],readRoleRef(_0x55d1cb));assertPermConfigurable(_0x1306ac);const _0x4cc03d=readGrantRevoke(_0x55d1cb),_0x1f6974=splitList(_0x55d1cb['str'](_0x5822e8(0x1d4)));if(_0x1f6974[_0x5822e8(0x1da)]===0x0)throw CliErrors[_0x5822e8(0x1be)](_0x5822e8(0x1d4),_0x5822e8(0x1c2));const _0x32a04f=await getRoleMenuResources(_0x55d1cb[_0x5822e8(0x1cc)],_0x1306ac['id']),_0x1ff711=flattenMenuResources(_0x32a04f),_0xd0e50e=_0x1f6974[_0x5822e8(0x1c6)](_0x534ffc=>!_0x1ff711[_0x5822e8(0x1d9)](_0x534ffc));if(_0xd0e50e[_0x5822e8(0x1da)]>0x0)throw CliErrors['validation'](_0x5822e8(0x1d7)+_0xd0e50e[_0x5822e8(0x1ce)](',\x20')+'.',_0x5822e8(0x1c5));const _0xf17ba2=new Map(),_0x534945=[],_0x403175=[];for(const _0x2bbbba of _0x1f6974){const _0x5989fd=_0x1ff711[_0x5822e8(0x1c7)](_0x2bbbba);_0xf17ba2['set'](_0x2bbbba,_0x4cc03d),_0x534945[_0x5822e8(0x1c8)]({'resourceCode':_0x2bbbba,'action':_0x5989fd[_0x5822e8(0x1cf)]}),_0x403175[_0x5822e8(0x1c8)]({'resourceCode':_0x2bbbba,'action':_0x4cc03d});}const _0x5b99af=buildPermits(_0x1ff711,_0xf17ba2),_0x4bb1ba={'operation':_0x4cc03d===_0x5822e8(0x1c0)?_0x5822e8(0x1d8):_0x5822e8(0x1cb),'selector':{'appCode':_0x55d1cb[_0x5822e8(0x1cc)],'roleId':_0x1306ac['id'],'roleName':_0x1306ac[_0x5822e8(0x1c1)],'resourceCodes':_0x1f6974},'before':_0x534945,'after':_0x403175,'dryRun':_0x1ac4e9,'backend':{'method':'POST','path':UPDATE_PATH,'roleType':'PAGE'},'warnings':[]};return{'role':_0x1306ac,'permits':_0x5b99af,'mutation':_0x4bb1ba};}export const permitRoleMenusSet={'service':'permit','command':a129_0x337475(0x1d0),'description':a129_0x337475(0x1d2),'risk':'high-risk-write','flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,MENUS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0xee0e3f){const _0x5aec47=a129_0x337475;readGrantRevoke(_0xee0e3f);if(splitList(_0xee0e3f['str']('menus'))[_0x5aec47(0x1da)]===0x0)throw CliErrors[_0x5aec47(0x1be)](_0x5aec47(0x1d4),_0x5aec47(0x1c2));},async 'dryRun'(_0x39693a){const {mutation:_0x3e2874}=await buildPlan(_0x39693a,!![]);return asDryRunResult(_0x3e2874,{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0x2b8bfe){const _0x47a54b=a129_0x337475,{role:_0x26c675,permits:_0x343071,mutation:_0x15d98b}=await buildPlan(_0x2b8bfe,![]);return await updateAppRole({'id':_0x26c675['id'],'appCode':_0x2b8bfe['appCode'],'roleType':_0x47a54b(0x1ca),'permits':_0x343071}),{'ok':!![],'data':_0x15d98b,'message':_0x47a54b(0x1bd)+_0x15d98b['selector'][_0x47a54b(0x1c4)][_0x47a54b(0x1da)]+_0x47a54b(0x1d3)+_0x26c675[_0x47a54b(0x1c1)]};}};
1
+ const a137_0x40f8e9=a137_0x5287;(function(_0x596fc9,_0xdc4706){const _0x372115=a137_0x5287,_0x2cf57c=_0x596fc9();while(!![]){try{const _0x220dbd=parseInt(_0x372115(0x19c))/0x1+-parseInt(_0x372115(0x19e))/0x2*(parseInt(_0x372115(0x17e))/0x3)+parseInt(_0x372115(0x189))/0x4+-parseInt(_0x372115(0x19b))/0x5*(-parseInt(_0x372115(0x17b))/0x6)+-parseInt(_0x372115(0x188))/0x7*(-parseInt(_0x372115(0x18a))/0x8)+-parseInt(_0x372115(0x180))/0x9*(-parseInt(_0x372115(0x192))/0xa)+-parseInt(_0x372115(0x190))/0xb;if(_0x220dbd===_0xdc4706)break;else _0x2cf57c['push'](_0x2cf57c['shift']());}catch(_0x5258ac){_0x2cf57c['push'](_0x2cf57c['shift']());}}}(a137_0x3bd9,0x19cec));import{getRoleMenuResources,updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a137_0x5287(_0x4ed761,_0x3ac8ce){_0x4ed761=_0x4ed761-0x17b;const _0x3bd9c0=a137_0x3bd9();let _0x5287b3=_0x3bd9c0[_0x4ed761];return _0x5287b3;}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=a137_0x40f8e9(0x17f);async function buildPlan(_0x1f0a7a,_0x5e7e8){const _0x28db47=a137_0x40f8e9,_0x4d946c=await resolveRoleRef(_0x1f0a7a[_0x28db47(0x193)],readRoleRef(_0x1f0a7a));assertPermConfigurable(_0x4d946c);const _0x34688b=readGrantRevoke(_0x1f0a7a),_0x4314ff=splitList(_0x1f0a7a['str']('menus'));if(_0x4314ff['length']===0x0)throw CliErrors[_0x28db47(0x18c)](_0x28db47(0x17d),'Pass\x20--menus\x20<resourceCode,...>.');const _0x17e65c=await getRoleMenuResources(_0x1f0a7a[_0x28db47(0x193)],_0x4d946c['id']),_0x5992e2=flattenMenuResources(_0x17e65c),_0x584d0e=_0x4314ff[_0x28db47(0x17c)](_0x2cda6f=>!_0x5992e2[_0x28db47(0x195)](_0x2cda6f));if(_0x584d0e['length']>0x0)throw CliErrors[_0x28db47(0x181)](_0x28db47(0x19f)+_0x584d0e['join'](',\x20')+'.',_0x28db47(0x18e));const _0x26261b=new Map(),_0x29cc82=[],_0x2692fe=[];for(const _0x561830 of _0x4314ff){const _0x2e686c=_0x5992e2[_0x28db47(0x18d)](_0x561830);_0x26261b['set'](_0x561830,_0x34688b),_0x29cc82[_0x28db47(0x182)]({'resourceCode':_0x561830,'action':_0x2e686c[_0x28db47(0x19a)]}),_0x2692fe[_0x28db47(0x182)]({'resourceCode':_0x561830,'action':_0x34688b});}const _0x2b368f=buildPermits(_0x5992e2,_0x26261b),_0x153a64={'operation':_0x34688b===_0x28db47(0x184)?_0x28db47(0x186):_0x28db47(0x18f),'selector':{'appCode':_0x1f0a7a[_0x28db47(0x193)],'roleId':_0x4d946c['id'],'roleName':_0x4d946c[_0x28db47(0x191)],'resourceCodes':_0x4314ff},'before':_0x29cc82,'after':_0x2692fe,'dryRun':_0x5e7e8,'backend':{'method':_0x28db47(0x185),'path':UPDATE_PATH,'roleType':_0x28db47(0x187)},'warnings':[]};return{'role':_0x4d946c,'permits':_0x2b368f,'mutation':_0x153a64};}export const permitRoleMenusSet={'service':a137_0x40f8e9(0x19d),'command':a137_0x40f8e9(0x18b),'description':a137_0x40f8e9(0x198),'risk':'high-risk-write','flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,MENUS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x59dbf7){const _0x5379dc=a137_0x40f8e9;readGrantRevoke(_0x59dbf7);if(splitList(_0x59dbf7['str'](_0x5379dc(0x17d)))[_0x5379dc(0x199)]===0x0)throw CliErrors[_0x5379dc(0x18c)](_0x5379dc(0x17d),_0x5379dc(0x196));},async 'dryRun'(_0x265427){const _0x330156=a137_0x40f8e9,{mutation:_0x17f5b4}=await buildPlan(_0x265427,!![]);return asDryRunResult(_0x17f5b4,{'method':_0x330156(0x185),'url':UPDATE_PATH});},async 'execute'(_0x33f4df){const _0x66b34a=a137_0x40f8e9,{role:_0x3cc572,permits:_0x2cee14,mutation:_0xb9e97}=await buildPlan(_0x33f4df,![]);return await updateAppRole({'id':_0x3cc572['id'],'appCode':_0x33f4df[_0x66b34a(0x193)],'roleType':_0x66b34a(0x187),'permits':_0x2cee14}),{'ok':!![],'data':_0xb9e97,'message':_0x66b34a(0x197)+_0xb9e97['selector'][_0x66b34a(0x183)][_0x66b34a(0x199)]+_0x66b34a(0x194)+_0x3cc572[_0x66b34a(0x191)]};}};function a137_0x3bd9(){const _0x231d46=['validation','push','resourceCodes','access','POST','menu-grant','PAGE','7OkgNzt','189992WAiHRw','135176zdYmzD','role-menus-set','flagMissing','get','Run\x20`permit\x20role-menus\x20--role\x20<id>`\x20to\x20see\x20valid\x20resourceCodes.','menu-revoke','4214430DFKaDM','roleName','50uZaLCS','appCode','\x20menu\x20permit(s)\x20for\x20role\x20','has','Pass\x20--menus\x20<resourceCode,...>.','Updated\x20','Grant\x20or\x20revoke\x20a\x20role\x27s\x20menu\x20access\x20by\x20resourceCode\x20(roleType\x20PAGE);\x20requires\x20--yes','length','action','5jKkhHm','118357IaaOxv','permit','978BgOgeA','Unknown\x20menu\x20resourceCode(s):\x20','1062162pqVQHI','filter','menus','117csWhYx','/smartapi/permit/role/update','266634boszEt'];a137_0x3bd9=function(){return _0x231d46;};return a137_0x3bd9();}
@@ -1 +1 @@
1
- function a130_0x5caf(){const _0x202526=['611AuLJln','action','values','24msHfyH','resourceCode','role-menus','2686076PTNRFL','\x20menu(s)\x20allowed','allowed','resourceName','Role\x20','2037700EIqMFq','502546GfSWkM','access','1894gpwoBd','Show\x20a\x20role\x27s\x20current\x20menu\x20permission\x20matrix','132zhPFEa','roleName','length','1161228iLxIRw','3920139cTeewR','appCode','from','12652270ZGEXQt','\x20has\x20','10ukOGmm','3XTQjwG'];a130_0x5caf=function(){return _0x202526;};return a130_0x5caf();}const a130_0x5a2e42=a130_0x41dd;(function(_0x3431d6,_0x3365b1){const _0x5c0cab=a130_0x41dd,_0x12029b=_0x3431d6();while(!![]){try{const _0x5c7778=parseInt(_0x5c0cab(0xf0))/0x1*(-parseInt(_0x5c0cab(0xe3))/0x2)+parseInt(_0x5c0cab(0xef))/0x3*(-parseInt(_0x5c0cab(0xdb))/0x4)+-parseInt(_0x5c0cab(0xee))/0x5*(-parseInt(_0x5c0cab(0xe8))/0x6)+-parseInt(_0x5c0cab(0xe0))/0x7+parseInt(_0x5c0cab(0xd8))/0x8*(parseInt(_0x5c0cab(0xe9))/0x9)+parseInt(_0x5c0cab(0xec))/0xa+parseInt(_0x5c0cab(0xe1))/0xb*(-parseInt(_0x5c0cab(0xe5))/0xc);if(_0x5c7778===_0x3365b1)break;else _0x12029b['push'](_0x12029b['shift']());}catch(_0x2af539){_0x12029b['push'](_0x12029b['shift']());}}}(a130_0x5caf,0xdf722));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 a130_0x41dd(_0x381347,_0x49e398){_0x381347=_0x381347-0xd7;const _0x5caf74=a130_0x5caf();let _0x41dd5a=_0x5caf74[_0x381347];return _0x41dd5a;}export const permitRoleMenus={'service':'permit','command':a130_0x5a2e42(0xda),'description':a130_0x5a2e42(0xe4),'risk':'read','flags':[ROLE_REF_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x3a51c){const _0x2aef0f=a130_0x5a2e42,_0x540323=await resolveRoleRef(_0x3a51c[_0x2aef0f(0xea)],readRoleRef(_0x3a51c)),_0x2d00a0=await getRoleMenuResources(_0x3a51c[_0x2aef0f(0xea)],_0x540323['id']),_0x4e6190=flattenMenuResources(_0x2d00a0),_0x446666=Array[_0x2aef0f(0xeb)](_0x4e6190[_0x2aef0f(0xd7)]())['map'](_0x5b3ce8=>({'resourceCode':_0x5b3ce8[_0x2aef0f(0xd9)],'resourceName':_0x5b3ce8[_0x2aef0f(0xde)],'allowed':_0x5b3ce8[_0x2aef0f(0xf1)]===_0x2aef0f(0xe2),'action':_0x5b3ce8[_0x2aef0f(0xf1)]}));return{'ok':!![],'data':{'selector':{'appCode':_0x3a51c[_0x2aef0f(0xea)],'roleId':_0x540323['id'],'roleName':_0x540323[_0x2aef0f(0xe6)]},'menus':_0x446666},'message':_0x2aef0f(0xdf)+_0x540323[_0x2aef0f(0xe6)]+_0x2aef0f(0xed)+_0x446666['filter'](_0xa6d8cc=>_0xa6d8cc[_0x2aef0f(0xdd)])[_0x2aef0f(0xe7)]+'/'+_0x446666[_0x2aef0f(0xe7)]+_0x2aef0f(0xdc)};}};
1
+ const a138_0x4fa62c=a138_0x3b99;(function(_0x70432e,_0x53393a){const _0x459552=a138_0x3b99,_0x18d3b6=_0x70432e();while(!![]){try{const _0x2ce3bf=parseInt(_0x459552(0xa3))/0x1*(-parseInt(_0x459552(0xa4))/0x2)+-parseInt(_0x459552(0x9d))/0x3+parseInt(_0x459552(0xa9))/0x4+parseInt(_0x459552(0xa8))/0x5+parseInt(_0x459552(0x96))/0x6*(parseInt(_0x459552(0xaa))/0x7)+parseInt(_0x459552(0xa5))/0x8+-parseInt(_0x459552(0x93))/0x9;if(_0x2ce3bf===_0x53393a)break;else _0x18d3b6['push'](_0x18d3b6['shift']());}catch(_0x95f670){_0x18d3b6['push'](_0x18d3b6['shift']());}}}(a138_0x3732,0x4b98d));import{getRoleMenuResources}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{flattenMenuResources,readRoleRef,ROLE_REF_FLAG}from'../../commands/permit/shared.js';function a138_0x3b99(_0x296f7e,_0x5f41bd){_0x296f7e=_0x296f7e-0x93;const _0x3732d2=a138_0x3732();let _0x3b994f=_0x3732d2[_0x296f7e];return _0x3b994f;}import{resolveRoleRef}from'../../commands/role/shared.js';function a138_0x3732(){const _0x3f73f8=['resourceCode','2255005aEohvh','1208784nfbSAh','1585647vaqKxo','4290480dPBWDA','filter','from','12zircSK','length','access','\x20has\x20','roleName','action','Show\x20a\x20role\x27s\x20current\x20menu\x20permission\x20matrix','922329iqPPRJ','Role\x20','appCode','read','\x20menu(s)\x20allowed','map','54596UhBBcu','6IOhmQc','410856DEFYAu','allowed'];a138_0x3732=function(){return _0x3f73f8;};return a138_0x3732();}export const permitRoleMenus={'service':'permit','command':'role-menus','description':a138_0x4fa62c(0x9c),'risk':a138_0x4fa62c(0xa0),'flags':[ROLE_REF_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x15ff4a){const _0x4b1729=a138_0x4fa62c,_0x74d2ad=await resolveRoleRef(_0x15ff4a[_0x4b1729(0x9f)],readRoleRef(_0x15ff4a)),_0x1f7661=await getRoleMenuResources(_0x15ff4a[_0x4b1729(0x9f)],_0x74d2ad['id']),_0x583ac0=flattenMenuResources(_0x1f7661),_0x199b78=Array[_0x4b1729(0x95)](_0x583ac0['values']())[_0x4b1729(0xa2)](_0x186e90=>({'resourceCode':_0x186e90[_0x4b1729(0xa7)],'resourceName':_0x186e90['resourceName'],'allowed':_0x186e90[_0x4b1729(0x9b)]===_0x4b1729(0x98),'action':_0x186e90[_0x4b1729(0x9b)]}));return{'ok':!![],'data':{'selector':{'appCode':_0x15ff4a['appCode'],'roleId':_0x74d2ad['id'],'roleName':_0x74d2ad[_0x4b1729(0x9a)]},'menus':_0x199b78},'message':_0x4b1729(0x9e)+_0x74d2ad[_0x4b1729(0x9a)]+_0x4b1729(0x99)+_0x199b78[_0x4b1729(0x94)](_0x34cc59=>_0x34cc59[_0x4b1729(0xa6)])['length']+'/'+_0x199b78[_0x4b1729(0x97)]+_0x4b1729(0xa1)};}};
@@ -1 +1 @@
1
- const a131_0xf5b26b=a131_0x3100;(function(_0x4cb7e4,_0x3a0a8e){const _0x2b1001=a131_0x3100,_0x2c7708=_0x4cb7e4();while(!![]){try{const _0x1269fb=parseInt(_0x2b1001(0xc0))/0x1*(parseInt(_0x2b1001(0xbe))/0x2)+-parseInt(_0x2b1001(0xba))/0x3+parseInt(_0x2b1001(0xb0))/0x4*(-parseInt(_0x2b1001(0xa1))/0x5)+parseInt(_0x2b1001(0xb4))/0x6+-parseInt(_0x2b1001(0xd0))/0x7+parseInt(_0x2b1001(0xcd))/0x8*(-parseInt(_0x2b1001(0xc3))/0x9)+parseInt(_0x2b1001(0xad))/0xa;if(_0x1269fb===_0x3a0a8e)break;else _0x2c7708['push'](_0x2c7708['shift']());}catch(_0x5dc4c9){_0x2c7708['push'](_0x2c7708['shift']());}}}(a131_0x2bb2,0x5b348));import{listPermitRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const MENU_ID_FLAG={'name':'menu-id','type':a131_0xf5b26b(0xc7),'required':!![],'description':'Menu\x20id\x20(from\x20`menu\x20list`)'};export const ROLE_REF_FLAG={'name':a131_0xf5b26b(0xcf),'type':a131_0xf5b26b(0xde),'required':!![],'description':a131_0xf5b26b(0x9e)};export const GRANT_FLAG={'name':a131_0xf5b26b(0xdb),'type':'boolean','required':![],'description':a131_0xf5b26b(0xb2)};export const REVOKE_FLAG={'name':a131_0xf5b26b(0xd6),'type':a131_0xf5b26b(0xe9),'required':![],'description':'Revoke\x20access\x20to\x20the\x20listed\x20resources'};export const MENUS_FLAG={'name':a131_0xf5b26b(0xb8),'type':a131_0xf5b26b(0xde),'required':!![],'description':a131_0xf5b26b(0xe1)};export const DATASETS_FLAG={'name':a131_0xf5b26b(0xe7),'type':a131_0xf5b26b(0xde),'required':!![],'description':a131_0xf5b26b(0xea)};export const PAGE_SLOT_SPECS=[{'flag':a131_0xf5b26b(0xb7),'key':a131_0xf5b26b(0xbf),'allowSelf':![],'label':'menu\x20visibility'},{'flag':'create-roles','key':a131_0xf5b26b(0xac),'allowSelf':![],'label':a131_0xf5b26b(0xe4)},{'flag':a131_0xf5b26b(0xa6),'key':a131_0xf5b26b(0xa7),'allowSelf':![],'label':'data\x20update'},{'flag':'delete-roles','key':a131_0xf5b26b(0xd4),'allowSelf':![],'label':a131_0xf5b26b(0xb9)},{'flag':a131_0xf5b26b(0xd1),'key':a131_0xf5b26b(0xed),'allowSelf':![],'label':a131_0xf5b26b(0xae)},{'flag':a131_0xf5b26b(0xaf),'key':'dataExport','allowSelf':![],'label':'data\x20export'},{'flag':'row-roles','key':a131_0xf5b26b(0xaa),'allowSelf':!![],'label':a131_0xf5b26b(0xdd)}];export const PAGE_SET_ROLE_FLAGS=PAGE_SLOT_SPECS[a131_0xf5b26b(0xd5)](_0x538606=>({'name':_0x538606[a131_0xf5b26b(0xe2)],'type':a131_0xf5b26b(0xde),'required':![],'description':a131_0xf5b26b(0xd7)+_0x538606[a131_0xf5b26b(0xb6)]+a131_0xf5b26b(0xc9)+(_0x538606[a131_0xf5b26b(0xda)]?a131_0xf5b26b(0xeb):'')}));export function splitList(_0x14ac66){const _0x1377de=a131_0xf5b26b;return _0x14ac66['split'](',')['map'](_0x2f72a7=>_0x2f72a7[_0x1377de(0xb1)]())[_0x1377de(0xa8)](Boolean);}export function projectRoleRef(_0x24d9e4){const _0x13d546=a131_0xf5b26b;return{'id':_0x24d9e4['id'],'roleName':_0x24d9e4[_0x13d546(0xa4)],'roleType':_0x24d9e4[_0x13d546(0xc8)]};}export async function resolvePermitRoles(_0x1548de,_0x3f1384,_0x209f1f){const _0x52e29c=a131_0xf5b26b,_0x103aac=await listPermitRoles(_0x1548de,{'needSelf':!![],'needPublic':!![]}),_0xbe930e=[];for(const _0x3581e1 of _0x3f1384){const _0x32e30b=resolveOnePermitRole(_0x103aac,_0x3581e1);if(!_0x209f1f[_0x52e29c(0xda)]&&_0x32e30b[_0x52e29c(0xc8)]===_0x52e29c(0xa2))throw CliErrors['validation'](_0x52e29c(0xe6)+_0x209f1f[_0x52e29c(0xb6)]+'.',_0x52e29c(0xe0));if(!_0xbe930e[_0x52e29c(0xdc)](_0xfacc8f=>_0xfacc8f['id']===_0x32e30b['id']))_0xbe930e[_0x52e29c(0xbc)](_0x32e30b);}return _0xbe930e;}function resolveOnePermitRole(_0x1006ed,_0x4293c7){const _0x4479b5=a131_0xf5b26b,_0x50ede4=_0x4293c7[_0x4479b5(0xb1)](),_0x4553ca=_0x50ede4[_0x4479b5(0xce)]();if(_0x4553ca===_0x4479b5(0xa2)||_0x4553ca===_0x4479b5(0xa0)){const _0x47c4e8=_0x1006ed[_0x4479b5(0xe5)](_0x1deb53=>_0x1deb53[_0x4479b5(0xc8)]===_0x4553ca);if(!_0x47c4e8)throw CliErrors[_0x4479b5(0xbd)]('Special\x20role\x20'+_0x4553ca+_0x4479b5(0xb5));return _0x47c4e8;}if(/^-?\d+$/[_0x4479b5(0xcb)](_0x50ede4)){const _0x397749=Number(_0x50ede4),_0x404586=_0x1006ed['find'](_0x5bb40a=>_0x5bb40a['id']===_0x397749);if(!_0x404586)throw CliErrors[_0x4479b5(0xbd)](_0x4479b5(0x9f)+_0x397749+'\x20not\x20found.','Run\x20`role\x20list`.');return _0x404586;}const _0x2b169d=_0x1006ed[_0x4479b5(0xa8)](_0x592e1b=>_0x592e1b['roleName']===_0x50ede4);if(_0x2b169d[_0x4479b5(0xcc)]===0x0)throw CliErrors[_0x4479b5(0xbd)](_0x4479b5(0xbb)+_0x50ede4+_0x4479b5(0xa9),_0x4479b5(0xd9));if(_0x2b169d[_0x4479b5(0xcc)]>0x1)throw CliErrors[_0x4479b5(0xbd)](_0x4479b5(0xbb)+_0x50ede4+'\x22\x20is\x20ambiguous\x20(ids:\x20'+_0x2b169d[_0x4479b5(0xd5)](_0x311b61=>_0x311b61['id'])['join'](',\x20')+').','Disambiguate\x20with\x20an\x20id.');return _0x2b169d[0x0];}function a131_0x2bb2(){const _0x278d53=['Role\x20id\x20or\x20role\x20name','Role\x20id\x20','ALL','855uimPgj','SELF','entries','roleName','str','update-roles','dataUpdate','filter','\x22\x20not\x20found.','dataPermit','Missing\x20action.','dataCreate','21838440uhZRWP','data\x20detail','export-roles','13876bGNjtp','trim','Grant\x20access\x20to\x20the\x20listed\x20resources','key','99594LWepEE','\x20is\x20not\x20available\x20for\x20this\x20app.','label','menu-roles','menus','data\x20delete','1676790NkuOlY','Role\x20\x22','push','validation','7822WzEScQ','menuPermit','47dDLQbH','flagMissing','Pass\x20exactly\x20one\x20of\x20--grant\x20/\x20--revoke.','3219570BfAoor','resourceCode','get','action','number','roleType','\x20(comma-separated\x20SELF/ALL/id/name)','datasetCode','test','length','8xSgLqK','toUpperCase','role','3505775EQxwMT','detail-roles','Pass\x20--role\x20<id|name>.','resourceName','dataDelete','map','revoke','Roles\x20for\x20','--grant\x20and\x20--revoke\x20are\x20mutually\x20exclusive.','Run\x20`role\x20list`,\x20or\x20use\x20SELF/ALL/<id>.','allowSelf','grant','some','row\x20visibility','string','allowedActions','SELF\x20(row-level)\x20applies\x20only\x20to\x20--row-roles.','Comma-separated\x20menu\x20resourceCodes\x20to\x20grant/revoke','flag','pageNodeList','data\x20create','find','SELF\x20is\x20not\x20allowed\x20for\x20','datasets','menuId','boolean','Comma-separated\x20datasetCodes\x20to\x20revoke\x20API\x20access\x20for',';\x20SELF\x20=\x20only\x20own\x20rows','set','dataDetail'];a131_0x2bb2=function(){return _0x278d53;};return a131_0x2bb2();}function a131_0x3100(_0x20aea8,_0x4156ee){_0x20aea8=_0x20aea8-0x9e;const _0x2bb2ec=a131_0x2bb2();let _0x3100d3=_0x2bb2ec[_0x20aea8];return _0x3100d3;}export function projectPageSlot(_0x4c4868){const _0x2f9629=a131_0xf5b26b;if(!_0x4c4868)return null;return{'resourceCode':_0x4c4868[_0x2f9629(0xc4)],'roles':(_0x4c4868['rolePermit']??[])[_0x2f9629(0xd5)](projectRoleRef)};}export function projectPagePermit(_0x5b9fae){const _0x3df3fa=a131_0xf5b26b,_0x49e0e6={'menuId':_0x5b9fae[_0x3df3fa(0xe8)],'appCode':_0x5b9fae['appCode'],'menuPermit':projectPageSlot(_0x5b9fae[_0x3df3fa(0xbf)])};for(const _0x314675 of PAGE_SLOT_SPECS){if(_0x314675[_0x3df3fa(0xb3)]===_0x3df3fa(0xbf))continue;_0x49e0e6[_0x314675[_0x3df3fa(0xb3)]]=projectPageSlot(_0x5b9fae[_0x314675[_0x3df3fa(0xb3)]]);}return _0x49e0e6;}export function flattenMenuResources(_0x53735c){const _0x503a73=new Map(),_0x37f2bb=_0x19f74c=>{const _0x37e94b=a131_0x3100;for(const _0x36318d of _0x19f74c??[]){_0x503a73['set'](_0x36318d[_0x37e94b(0xc4)],{'resourceCode':_0x36318d['resourceCode'],'resourceName':_0x36318d[_0x37e94b(0xd3)],'action':_0x36318d[_0x37e94b(0xdf)]?.[0x0]??'0'});if(_0x36318d[_0x37e94b(0xe3)])_0x37f2bb(_0x36318d[_0x37e94b(0xe3)]);}};return _0x37f2bb(_0x53735c),_0x503a73;}export function flattenApiResources(_0x46ae16){const _0x477552=a131_0xf5b26b,_0xd00ab7=new Map(),_0x38544a=new Map();for(const _0x38c78e of _0x46ae16){const _0x3e0e90=_0x38c78e['apiList']??{};for(const [_0x178282,_0x144e6a]of Object[_0x477552(0xa3)](_0x3e0e90)){_0xd00ab7[_0x477552(0xec)](_0x178282,{'resourceCode':_0x178282,'resourceName':_0x38c78e['resourceName'],'datasetCode':_0x38c78e[_0x477552(0xca)],'action':_0x144e6a?.[0x0]??'0'});const _0xaf8dcc=_0x38544a[_0x477552(0xc5)](_0x38c78e[_0x477552(0xca)])??[];_0xaf8dcc['push'](_0x178282),_0x38544a['set'](_0x38c78e[_0x477552(0xca)],_0xaf8dcc);}}return{'byCode':_0xd00ab7,'byDataset':_0x38544a};}export function buildPermits(_0x58b871,_0x5125af){const _0x31ebcc=a131_0xf5b26b,_0x2bae97={};for(const [_0x282aa9,_0x48905f]of _0x58b871){const _0x30a781=_0x5125af[_0x31ebcc(0xc5)](_0x282aa9)??_0x48905f[_0x31ebcc(0xc6)];_0x2bae97[_0x282aa9]=[_0x30a781];}return _0x2bae97;}export function readRoleRef(_0x4856f1){const _0x4373a0=a131_0xf5b26b,_0x442258=_0x4856f1[_0x4373a0(0xa5)](_0x4373a0(0xcf))[_0x4373a0(0xb1)]();if(!_0x442258)throw CliErrors[_0x4373a0(0xc1)]('role',_0x4373a0(0xd2));return _0x442258;}export function readGrantRevoke(_0xde1deb){const _0x71635a=a131_0xf5b26b,_0x37e49e=_0xde1deb['bool'](_0x71635a(0xdb)),_0x1c1739=_0xde1deb['bool']('revoke');if(_0x37e49e&&_0x1c1739)throw CliErrors[_0x71635a(0xbd)](_0x71635a(0xd8));if(!_0x37e49e&&!_0x1c1739)throw CliErrors[_0x71635a(0xbd)](_0x71635a(0xab),_0x71635a(0xc2));return _0x37e49e?'access':'0';}
1
+ const a139_0x132a8c=a139_0x9be5;(function(_0x212423,_0x1dd80e){const _0x10d460=a139_0x9be5,_0x119592=_0x212423();while(!![]){try{const _0x4e5bc9=-parseInt(_0x10d460(0x186))/0x1+parseInt(_0x10d460(0x162))/0x2*(-parseInt(_0x10d460(0x16d))/0x3)+-parseInt(_0x10d460(0x1a2))/0x4+parseInt(_0x10d460(0x1a6))/0x5+parseInt(_0x10d460(0x17b))/0x6+parseInt(_0x10d460(0x16e))/0x7*(parseInt(_0x10d460(0x15f))/0x8)+-parseInt(_0x10d460(0x173))/0x9*(-parseInt(_0x10d460(0x18d))/0xa);if(_0x4e5bc9===_0x1dd80e)break;else _0x119592['push'](_0x119592['shift']());}catch(_0x185979){_0x119592['push'](_0x119592['shift']());}}}(a139_0x288a,0x29931));import{listPermitRoles}from'../../core/api-client.js';function a139_0x9be5(_0x1e5d07,_0x36baa1){_0x1e5d07=_0x1e5d07-0x15d;const _0x288af8=a139_0x288a();let _0x9be578=_0x288af8[_0x1e5d07];return _0x9be578;}import{CliErrors}from'../../errors.js';function a139_0x288a(){const _0x3e5835=['apiList','306388gdyPTO','ALL','menu-id','find','--grant\x20and\x20--revoke\x20are\x20mutually\x20exclusive.','str','Run\x20`role\x20list`.','10pXJGsg','validation','data\x20update','detail-roles','SELF\x20(row-level)\x20applies\x20only\x20to\x20--row-roles.','bool','trim','dataCreate','rolePermit','Role\x20\x22',';\x20SELF\x20=\x20only\x20own\x20rows','data\x20delete','\x22\x20not\x20found.','pageNodeList','Pass\x20--role\x20<id|name>.','test','Grant\x20access\x20to\x20the\x20listed\x20resources','dataUpdate','split','flag','key','817696yqZNNx','map','row-roles','length','1368835AifqPF','role','menuPermit','roleType','Comma-separated\x20datasetCodes\x20to\x20revoke\x20API\x20access\x20for','menu\x20visibility','Menu\x20id\x20(from\x20`menu\x20list`)','access','SELF','menu-roles','number','resourceCode','dataPermit','Special\x20role\x20','8DCqhwp','datasets','create-roles','36454NcOdex','revoke','datasetCode','set','Comma-separated\x20menu\x20resourceCodes\x20to\x20grant/revoke','\x20not\x20found.','Role\x20id\x20','label','Disambiguate\x20with\x20an\x20id.','action','toUpperCase','51jnUdgX','437983oGMScj','resourceName','boolean','string','delete-roles','5075208xsBkHL','SELF\x20is\x20not\x20allowed\x20for\x20','update-roles','grant','allowedActions','appCode','export-roles','filter','544272izKHcU','menuId','Missing\x20action.','Role\x20id\x20or\x20role\x20name','entries','roleName','data\x20create','dataExport','dataDetail','get'];a139_0x288a=function(){return _0x3e5835;};return a139_0x288a();}export const MENU_ID_FLAG={'name':a139_0x132a8c(0x188),'type':a139_0x132a8c(0x1b0),'required':!![],'description':a139_0x132a8c(0x1ac)};export const ROLE_REF_FLAG={'name':'role','type':a139_0x132a8c(0x171),'required':!![],'description':a139_0x132a8c(0x17e)};export const GRANT_FLAG={'name':a139_0x132a8c(0x176),'type':'boolean','required':![],'description':a139_0x132a8c(0x19d)};export const REVOKE_FLAG={'name':'revoke','type':a139_0x132a8c(0x170),'required':![],'description':'Revoke\x20access\x20to\x20the\x20listed\x20resources'};export const MENUS_FLAG={'name':'menus','type':a139_0x132a8c(0x171),'required':!![],'description':a139_0x132a8c(0x166)};export const DATASETS_FLAG={'name':a139_0x132a8c(0x160),'type':a139_0x132a8c(0x171),'required':!![],'description':a139_0x132a8c(0x1aa)};export const PAGE_SLOT_SPECS=[{'flag':a139_0x132a8c(0x1af),'key':a139_0x132a8c(0x1a8),'allowSelf':![],'label':a139_0x132a8c(0x1ab)},{'flag':a139_0x132a8c(0x161),'key':a139_0x132a8c(0x194),'allowSelf':![],'label':a139_0x132a8c(0x181)},{'flag':a139_0x132a8c(0x175),'key':a139_0x132a8c(0x19e),'allowSelf':![],'label':a139_0x132a8c(0x18f)},{'flag':a139_0x132a8c(0x172),'key':'dataDelete','allowSelf':![],'label':a139_0x132a8c(0x198)},{'flag':a139_0x132a8c(0x190),'key':a139_0x132a8c(0x183),'allowSelf':![],'label':'data\x20detail'},{'flag':a139_0x132a8c(0x179),'key':a139_0x132a8c(0x182),'allowSelf':![],'label':'data\x20export'},{'flag':a139_0x132a8c(0x1a4),'key':a139_0x132a8c(0x15d),'allowSelf':!![],'label':'row\x20visibility'}];export const PAGE_SET_ROLE_FLAGS=PAGE_SLOT_SPECS[a139_0x132a8c(0x1a3)](_0x15dfcc=>({'name':_0x15dfcc[a139_0x132a8c(0x1a0)],'type':a139_0x132a8c(0x171),'required':![],'description':'Roles\x20for\x20'+_0x15dfcc[a139_0x132a8c(0x169)]+'\x20(comma-separated\x20SELF/ALL/id/name)'+(_0x15dfcc['allowSelf']?a139_0x132a8c(0x197):'')}));export function splitList(_0x5c049d){const _0x38fc2d=a139_0x132a8c;return _0x5c049d[_0x38fc2d(0x19f)](',')[_0x38fc2d(0x1a3)](_0x443646=>_0x443646['trim']())[_0x38fc2d(0x17a)](Boolean);}export function projectRoleRef(_0xbec2d1){const _0x5bc6d7=a139_0x132a8c;return{'id':_0xbec2d1['id'],'roleName':_0xbec2d1[_0x5bc6d7(0x180)],'roleType':_0xbec2d1['roleType']};}export async function resolvePermitRoles(_0x321e4c,_0x3a8b1a,_0x4c0f1c){const _0x44616f=a139_0x132a8c,_0x562f40=await listPermitRoles(_0x321e4c,{'needSelf':!![],'needPublic':!![]}),_0x4d3d59=[];for(const _0x5e6aed of _0x3a8b1a){const _0x1b37e5=resolveOnePermitRole(_0x562f40,_0x5e6aed);if(!_0x4c0f1c['allowSelf']&&_0x1b37e5['roleType']===_0x44616f(0x1ae))throw CliErrors[_0x44616f(0x18e)](_0x44616f(0x174)+_0x4c0f1c['label']+'.',_0x44616f(0x191));if(!_0x4d3d59['some'](_0x3baac7=>_0x3baac7['id']===_0x1b37e5['id']))_0x4d3d59['push'](_0x1b37e5);}return _0x4d3d59;}function resolveOnePermitRole(_0x20c12d,_0x1dd911){const _0x83aa8d=a139_0x132a8c,_0x42eb4a=_0x1dd911[_0x83aa8d(0x193)](),_0x1736e5=_0x42eb4a[_0x83aa8d(0x16c)]();if(_0x1736e5===_0x83aa8d(0x1ae)||_0x1736e5===_0x83aa8d(0x187)){const _0x2d3f1e=_0x20c12d[_0x83aa8d(0x189)](_0x5450de=>_0x5450de[_0x83aa8d(0x1a9)]===_0x1736e5);if(!_0x2d3f1e)throw CliErrors['validation'](_0x83aa8d(0x15e)+_0x1736e5+'\x20is\x20not\x20available\x20for\x20this\x20app.');return _0x2d3f1e;}if(/^-?\d+$/[_0x83aa8d(0x19c)](_0x42eb4a)){const _0x4c0c69=Number(_0x42eb4a),_0x29d8a0=_0x20c12d['find'](_0x3fc1ff=>_0x3fc1ff['id']===_0x4c0c69);if(!_0x29d8a0)throw CliErrors[_0x83aa8d(0x18e)](_0x83aa8d(0x168)+_0x4c0c69+_0x83aa8d(0x167),_0x83aa8d(0x18c));return _0x29d8a0;}const _0x3e054a=_0x20c12d['filter'](_0x345a77=>_0x345a77[_0x83aa8d(0x180)]===_0x42eb4a);if(_0x3e054a[_0x83aa8d(0x1a5)]===0x0)throw CliErrors[_0x83aa8d(0x18e)](_0x83aa8d(0x196)+_0x42eb4a+_0x83aa8d(0x199),'Run\x20`role\x20list`,\x20or\x20use\x20SELF/ALL/<id>.');if(_0x3e054a[_0x83aa8d(0x1a5)]>0x1)throw CliErrors[_0x83aa8d(0x18e)]('Role\x20\x22'+_0x42eb4a+'\x22\x20is\x20ambiguous\x20(ids:\x20'+_0x3e054a[_0x83aa8d(0x1a3)](_0x128c92=>_0x128c92['id'])['join'](',\x20')+').',_0x83aa8d(0x16a));return _0x3e054a[0x0];}export function projectPageSlot(_0x471481){const _0x3ca6dd=a139_0x132a8c;if(!_0x471481)return null;return{'resourceCode':_0x471481[_0x3ca6dd(0x1b1)],'roles':(_0x471481[_0x3ca6dd(0x195)]??[])[_0x3ca6dd(0x1a3)](projectRoleRef)};}export function projectPagePermit(_0x47f66e){const _0xd1f568=a139_0x132a8c,_0x4a807e={'menuId':_0x47f66e[_0xd1f568(0x17c)],'appCode':_0x47f66e[_0xd1f568(0x178)],'menuPermit':projectPageSlot(_0x47f66e['menuPermit'])};for(const _0x1bab09 of PAGE_SLOT_SPECS){if(_0x1bab09[_0xd1f568(0x1a1)]==='menuPermit')continue;_0x4a807e[_0x1bab09[_0xd1f568(0x1a1)]]=projectPageSlot(_0x47f66e[_0x1bab09[_0xd1f568(0x1a1)]]);}return _0x4a807e;}export function flattenMenuResources(_0x4b8655){const _0x3c6d52=new Map(),_0x73145d=_0x1001aa=>{const _0x4a07e1=a139_0x9be5;for(const _0x15b996 of _0x1001aa??[]){_0x3c6d52[_0x4a07e1(0x165)](_0x15b996[_0x4a07e1(0x1b1)],{'resourceCode':_0x15b996[_0x4a07e1(0x1b1)],'resourceName':_0x15b996[_0x4a07e1(0x16f)],'action':_0x15b996[_0x4a07e1(0x177)]?.[0x0]??'0'});if(_0x15b996['pageNodeList'])_0x73145d(_0x15b996[_0x4a07e1(0x19a)]);}};return _0x73145d(_0x4b8655),_0x3c6d52;}export function flattenApiResources(_0x5da6ae){const _0x393306=a139_0x132a8c,_0x1cbe11=new Map(),_0x358adf=new Map();for(const _0x23800a of _0x5da6ae){const _0x452b94=_0x23800a[_0x393306(0x185)]??{};for(const [_0x417827,_0x2b6301]of Object[_0x393306(0x17f)](_0x452b94)){_0x1cbe11[_0x393306(0x165)](_0x417827,{'resourceCode':_0x417827,'resourceName':_0x23800a[_0x393306(0x16f)],'datasetCode':_0x23800a['datasetCode'],'action':_0x2b6301?.[0x0]??'0'});const _0x570b34=_0x358adf[_0x393306(0x184)](_0x23800a[_0x393306(0x164)])??[];_0x570b34['push'](_0x417827),_0x358adf['set'](_0x23800a[_0x393306(0x164)],_0x570b34);}}return{'byCode':_0x1cbe11,'byDataset':_0x358adf};}export function buildPermits(_0xbef186,_0x28cc41){const _0x5ba8a6=a139_0x132a8c,_0x258d60={};for(const [_0x12bdc2,_0x5a8658]of _0xbef186){const _0x24c57a=_0x28cc41[_0x5ba8a6(0x184)](_0x12bdc2)??_0x5a8658[_0x5ba8a6(0x16b)];_0x258d60[_0x12bdc2]=[_0x24c57a];}return _0x258d60;}export function readRoleRef(_0x3c8a98){const _0x32ac66=a139_0x132a8c,_0x47e389=_0x3c8a98[_0x32ac66(0x18b)](_0x32ac66(0x1a7))[_0x32ac66(0x193)]();if(!_0x47e389)throw CliErrors['flagMissing']('role',_0x32ac66(0x19b));return _0x47e389;}export function readGrantRevoke(_0x58d5ec){const _0x143891=a139_0x132a8c,_0x5be499=_0x58d5ec[_0x143891(0x192)]('grant'),_0x247760=_0x58d5ec[_0x143891(0x192)](_0x143891(0x163));if(_0x5be499&&_0x247760)throw CliErrors['validation'](_0x143891(0x18a));if(!_0x5be499&&!_0x247760)throw CliErrors[_0x143891(0x18e)](_0x143891(0x17d),'Pass\x20exactly\x20one\x20of\x20--grant\x20/\x20--revoke.');return _0x5be499?_0x143891(0x1ad):'0';}
@@ -1 +1 @@
1
- (function(_0x4a5f27,_0x2a79a4){const _0x3c639d=a132_0x19d2,_0x104989=_0x4a5f27();while(!![]){try{const _0x5a4ce4=-parseInt(_0x3c639d(0x139))/0x1*(-parseInt(_0x3c639d(0x12c))/0x2)+-parseInt(_0x3c639d(0x13b))/0x3*(-parseInt(_0x3c639d(0x120))/0x4)+parseInt(_0x3c639d(0x122))/0x5+parseInt(_0x3c639d(0x12b))/0x6+parseInt(_0x3c639d(0x129))/0x7+-parseInt(_0x3c639d(0x131))/0x8*(-parseInt(_0x3c639d(0x137))/0x9)+-parseInt(_0x3c639d(0x12d))/0xa;if(_0x5a4ce4===_0x2a79a4)break;else _0x104989['push'](_0x104989['shift']());}catch(_0x177df3){_0x104989['push'](_0x104989['shift']());}}}(a132_0x1eab,0xa5404));import{existsSync}from'node:fs';import a132_0x536d52 from'node:path';import a132_0x3f6e0a from'chalk';function a132_0x19d2(_0x12a6e1,_0x25a630){_0x12a6e1=_0x12a6e1-0x120;const _0x1eabff=a132_0x1eab();let _0x19d2de=_0x1eabff[_0x12a6e1];return _0x19d2de;}import{input,confirm}from'@inquirer/prompts';import{getIsSessionValid}from'../../../auth/is-session-valid.js';function a132_0x1eab(){const _0x90971f=['1167740tIgNrW','test','3934986kxcfJm','2SkETTX','20815860wxHbjt','\x22\x20already\x20exists','Skipped','string','1032onqAeE','Login\x20failed','Project\x20name:','my-app','production','√\x20App\x20Code:\x20','14913sxCvTz','green','1183349TROHee','log','123fQaEdr','50744IroDuo','√\x20Login\x20status:\x20','92875sVuGKL','cyan','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','Not\x20set','trim','env','length'];a132_0x1eab=function(){return _0x90971f;};return a132_0x1eab();}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(_0x572000,_0x48e1d3,_0x2e8962){const _0x241662=a132_0x19d2,_0x490e3f=_0x241662(0x134),_0x1e838a=readConfig(),_0x4e6525=typeof _0x1e838a[_0x241662(0x127)]===_0x241662(0x130)?_0x1e838a[_0x241662(0x127)]:undefined,_0x2f1a8b=await input({'message':_0x241662(0x133),'default':_0x490e3f,'validate':_0x4716e6=>{const _0x272de7=_0x241662,_0x126da7=_0x4716e6[_0x272de7(0x126)]()||_0x490e3f;if(_0x126da7[_0x272de7(0x128)]>0x32)return'Project\x20name\x20cannot\x20exceed\x2050\x20characters';const _0x4d58dc=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x126da7&&!_0x4d58dc[_0x272de7(0x12a)](_0x126da7))return _0x272de7(0x124);const _0x361342=a132_0x536d52['resolve'](process['cwd'](),_0x126da7);if(existsSync(_0x361342))return'Directory\x20\x22'+_0x126da7+_0x272de7(0x12e);return!![];}});console['log'](a132_0x3f6e0a[_0x241662(0x138)]('√\x20Project\x20Name:\x20'+a132_0x3f6e0a[_0x241662(0x123)](_0x2f1a8b)));const _0x2e5425=await selectSingleAppcode(_0x2e8962);console[_0x241662(0x13a)](a132_0x3f6e0a[_0x241662(0x138)](_0x241662(0x136)+a132_0x3f6e0a['cyan'](_0x2e5425||_0x241662(0x125))));if(_0x2e5425){const _0x5e6155=await getIsSessionValid();if(!_0x5e6155){const _0x1f3849=await confirm({'message':'No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','default':!![]});if(_0x1f3849){const _0xef7859=await authServer({'silent':!![]});console[_0x241662(0x13a)](a132_0x3f6e0a[_0x241662(0x138)](_0x241662(0x121)+a132_0x3f6e0a[_0x241662(0x123)](_0xef7859?'Logged\x20in':_0x241662(0x132))));}else console[_0x241662(0x13a)](a132_0x3f6e0a[_0x241662(0x138)](_0x241662(0x121)+a132_0x3f6e0a[_0x241662(0x123)](_0x241662(0x12f))));}await _0x572000({'projectName':_0x2f1a8b,'appCode':_0x2e5425,'env':_0x48e1d3||_0x4e6525||_0x241662(0x135)});}else await _0x572000({'projectName':_0x2f1a8b,'env':_0x48e1d3||_0x4e6525||_0x241662(0x135)});}
1
+ (function(_0x4b7d77,_0x394867){const _0x4fbf39=a140_0x26fb,_0x15231f=_0x4b7d77();while(!![]){try{const _0x4950b2=-parseInt(_0x4fbf39(0x181))/0x1+-parseInt(_0x4fbf39(0x17f))/0x2+-parseInt(_0x4fbf39(0x188))/0x3*(-parseInt(_0x4fbf39(0x18b))/0x4)+-parseInt(_0x4fbf39(0x17e))/0x5+-parseInt(_0x4fbf39(0x183))/0x6*(-parseInt(_0x4fbf39(0x18a))/0x7)+-parseInt(_0x4fbf39(0x185))/0x8+parseInt(_0x4fbf39(0x179))/0x9*(parseInt(_0x4fbf39(0x171))/0xa);if(_0x4950b2===_0x394867)break;else _0x15231f['push'](_0x15231f['shift']());}catch(_0x86c77c){_0x15231f['push'](_0x15231f['shift']());}}}(a140_0x19a5,0x5206b));import{existsSync}from'node:fs';import a140_0x33a9b8 from'node:path';import a140_0x23802b from'chalk';import{input,confirm}from'@inquirer/prompts';import{getIsSessionValid}from'../../../auth/is-session-valid.js';function a140_0x19a5(){const _0x3fdc3c=['No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','1586564MVxUuC','37048bEvbWi','test','resolve','Project\x20name:','Directory\x20\x22','√\x20Project\x20Name:\x20','10bGSgyt','trim','length','√\x20App\x20Code:\x20','Project\x20name\x20cannot\x20exceed\x2050\x20characters','my-app','Login\x20failed','cyan','9465174IQnSLZ','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','production','Skipped','Not\x20set','2660930HXFgyf','63676VVjgUh','√\x20Login\x20status:\x20','448880ARmnOS','log','12qGMsOs','env','1693432SCwTva','cwd','green','18NNbeGB'];a140_0x19a5=function(){return _0x3fdc3c;};return a140_0x19a5();}import{authServer}from'../../../auth/auth-server.js';import{readConfig}from'../../../utils/config.js';function a140_0x26fb(_0x2a6a4f,_0x178a41){_0x2a6a4f=_0x2a6a4f-0x171;const _0x19a5f3=a140_0x19a5();let _0x26fbec=_0x19a5f3[_0x2a6a4f];return _0x26fbec;}import{selectSingleAppcode}from'../../../commands/common/app-selector.js';export async function guidedCreateProject(_0x418164,_0x165665,_0x6f7a1){const _0x1790f5=a140_0x26fb,_0x3521d5=_0x1790f5(0x176),_0x3ec7e8=readConfig(),_0x72d472=typeof _0x3ec7e8[_0x1790f5(0x184)]==='string'?_0x3ec7e8[_0x1790f5(0x184)]:undefined,_0x70c89d=await input({'message':_0x1790f5(0x18e),'default':_0x3521d5,'validate':_0x4c92ef=>{const _0x46b7cc=_0x1790f5,_0x5cd811=_0x4c92ef[_0x46b7cc(0x172)]()||_0x3521d5;if(_0x5cd811[_0x46b7cc(0x173)]>0x32)return _0x46b7cc(0x175);const _0x640c4a=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x5cd811&&!_0x640c4a[_0x46b7cc(0x18c)](_0x5cd811))return _0x46b7cc(0x17a);const _0x5b3b64=a140_0x33a9b8[_0x46b7cc(0x18d)](process[_0x46b7cc(0x186)](),_0x5cd811);if(existsSync(_0x5b3b64))return _0x46b7cc(0x18f)+_0x5cd811+'\x22\x20already\x20exists';return!![];}});console[_0x1790f5(0x182)](a140_0x23802b['green'](_0x1790f5(0x190)+a140_0x23802b[_0x1790f5(0x178)](_0x70c89d)));const _0xd84084=await selectSingleAppcode(_0x6f7a1);console[_0x1790f5(0x182)](a140_0x23802b[_0x1790f5(0x187)](_0x1790f5(0x174)+a140_0x23802b[_0x1790f5(0x178)](_0xd84084||_0x1790f5(0x17d))));if(_0xd84084){const _0x1994a4=await getIsSessionValid();if(!_0x1994a4){const _0x2f7e78=await confirm({'message':_0x1790f5(0x189),'default':!![]});if(_0x2f7e78){const _0x4fab87=await authServer({'silent':!![]});console['log'](a140_0x23802b[_0x1790f5(0x187)]('√\x20Login\x20status:\x20'+a140_0x23802b[_0x1790f5(0x178)](_0x4fab87?'Logged\x20in':_0x1790f5(0x177))));}else console['log'](a140_0x23802b[_0x1790f5(0x187)](_0x1790f5(0x180)+a140_0x23802b[_0x1790f5(0x178)](_0x1790f5(0x17c))));}await _0x418164({'projectName':_0x70c89d,'appCode':_0xd84084,'env':_0x165665||_0x72d472||'production'});}else await _0x418164({'projectName':_0x70c89d,'env':_0x165665||_0x72d472||_0x1790f5(0x17b)});}
@@ -1 +1 @@
1
- function a133_0x26e8(_0x529474,_0x2b20fd){_0x529474=_0x529474-0x90;const _0x316642=a133_0x3166();let _0x26e894=_0x316642[_0x529474];return _0x26e894;}(function(_0x20107d,_0x3fce92){const _0x55e0ab=a133_0x26e8,_0x1ae556=_0x20107d();while(!![]){try{const _0x3a865f=-parseInt(_0x55e0ab(0x90))/0x1+parseInt(_0x55e0ab(0x94))/0x2*(-parseInt(_0x55e0ab(0x9c))/0x3)+parseInt(_0x55e0ab(0x96))/0x4*(parseInt(_0x55e0ab(0x91))/0x5)+-parseInt(_0x55e0ab(0x99))/0x6+parseInt(_0x55e0ab(0x92))/0x7+parseInt(_0x55e0ab(0x98))/0x8+parseInt(_0x55e0ab(0x9b))/0x9*(parseInt(_0x55e0ab(0x93))/0xa);if(_0x3a865f===_0x3fce92)break;else _0x1ae556['push'](_0x1ae556['shift']());}catch(_0x4258f0){_0x1ae556['push'](_0x1ae556['shift']());}}}(a133_0x3166,0x34027));export function formatElapsed(_0x5d4e07){const _0x3f6fb7=a133_0x26e8,_0x275946=Date[_0x3f6fb7(0x97)]()-_0x5d4e07;if(_0x275946<0x3e8)return _0x275946+'ms';const _0x495f8a=(_0x275946/0x3e8)[_0x3f6fb7(0x9a)](0x2),_0x55c366=_0x495f8a[_0x3f6fb7(0x95)](/\.?0+$/u,'');return _0x55c366+'s';}function a133_0x3166(){const _0x16a311=['1452392EJJzzd','544506xJJAEW','toFixed','144nejDfj','3njPyqU','193308aGPmFV','517555AQNjoX','2435678svzlwH','127880RJxezo','681064OHhFIs','replace','4fkoAgM','now'];a133_0x3166=function(){return _0x16a311;};return a133_0x3166();}
1
+ (function(_0x5793cf,_0x12b57f){const _0x39eb1c=a141_0x34f4,_0x173c74=_0x5793cf();while(!![]){try{const _0x1c4f09=parseInt(_0x39eb1c(0x92))/0x1+-parseInt(_0x39eb1c(0x8c))/0x2*(parseInt(_0x39eb1c(0x8b))/0x3)+-parseInt(_0x39eb1c(0x89))/0x4*(-parseInt(_0x39eb1c(0x88))/0x5)+parseInt(_0x39eb1c(0x8a))/0x6+-parseInt(_0x39eb1c(0x93))/0x7*(-parseInt(_0x39eb1c(0x95))/0x8)+-parseInt(_0x39eb1c(0x90))/0x9*(parseInt(_0x39eb1c(0x8e))/0xa)+-parseInt(_0x39eb1c(0x91))/0xb*(parseInt(_0x39eb1c(0x8f))/0xc);if(_0x1c4f09===_0x12b57f)break;else _0x173c74['push'](_0x173c74['shift']());}catch(_0x25b599){_0x173c74['push'](_0x173c74['shift']());}}}(a141_0x3446,0xd0676));export function formatElapsed(_0x22919f){const _0x1c8ba6=a141_0x34f4,_0x2b2278=Date[_0x1c8ba6(0x8d)]()-_0x22919f;if(_0x2b2278<0x3e8)return _0x2b2278+'ms';const _0x373c98=(_0x2b2278/0x3e8)[_0x1c8ba6(0x94)](0x2),_0x25a317=_0x373c98['replace'](/\.?0+$/u,'');return _0x25a317+'s';}function a141_0x34f4(_0x227cab,_0x2f2d6b){_0x227cab=_0x227cab-0x88;const _0x34463a=a141_0x3446();let _0x34f4fa=_0x34463a[_0x227cab];return _0x34f4fa;}function a141_0x3446(){const _0x232a03=['25wroYJn','906532tEnpBA','9738174IAwFcl','28494MmMIia','130VMnnHM','now','20SVlmsw','12aJjhqp','4235571YpAoUI','32883004xaIYBC','1635941NYVtue','3941pJuolI','toFixed','14344pkjfYe'];a141_0x3446=function(){return _0x232a03;};return a141_0x3446();}
@@ -1 +1 @@
1
- (function(_0x2ba51d,_0x488b42){const _0xb0f4b0=a134_0x23ef,_0x717eef=_0x2ba51d();while(!![]){try{const _0x550cf6=parseInt(_0xb0f4b0(0x200))/0x1*(parseInt(_0xb0f4b0(0x1ec))/0x2)+parseInt(_0xb0f4b0(0x22a))/0x3*(parseInt(_0xb0f4b0(0x1e0))/0x4)+parseInt(_0xb0f4b0(0x22d))/0x5+-parseInt(_0xb0f4b0(0x21a))/0x6+-parseInt(_0xb0f4b0(0x1e3))/0x7*(-parseInt(_0xb0f4b0(0x214))/0x8)+-parseInt(_0xb0f4b0(0x1fe))/0x9+-parseInt(_0xb0f4b0(0x1fa))/0xa*(parseInt(_0xb0f4b0(0x222))/0xb);if(_0x550cf6===_0x488b42)break;else _0x717eef['push'](_0x717eef['shift']());}catch(_0x3aa210){_0x717eef['push'](_0x717eef['shift']());}}}(a134_0x2037,0x68ab3));import a134_0x54649b from'path';import a134_0x43768b from'fs';function a134_0x23ef(_0xfb2aaa,_0xd0d476){_0xfb2aaa=_0xfb2aaa-0x1cc;const _0x2037aa=a134_0x2037();let _0x23ef13=_0x2037aa[_0xfb2aaa];return _0x23ef13;}import a134_0x414975 from'chalk';import a134_0x16be23 from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{readConfig}from'../../../utils/config.js';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';import{logger}from'../../../utils/logger.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';function a134_0x2037(){const _0x394800=['projectName','create','\x20model(s)','cwd','更新\x20package.json\x20name','4nwCIsV','cyan','parse','174475coBmsq','production','清理项目目录失败:\x20','stringify','√\x20Configuration\x20file\x20created,\x20Apps:\x20','existsSync','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','repeat','trim','2906MxygXC','🚀\x20Next\x20Steps:','env','error','API\x20配置拉取异常','warn','bold','package.json','fail','readFileSync','Install\x20dependencies','W_OK','needsUpgrade','配置应用AppCode失败','20FjoTAy','更新\x20package.json\x20失败','Project\x20directory\x20','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','9900CeRcyr','toLocaleString','562rawqvW','\x20|\x20Default:\x20','\x20dataset(s),\x20generated\x20','apps','stableVersion','\x20\x201.\x20Start\x20project:\x20','Format\x20code','resolve','*\x20Pulling\x20API\x20configuration...','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','success','\x20run\x20start','*\x20Configuring\x20AppCode\x20for\x20project\x20','belowMinimum','modelCount','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','join','projectCode','CLI\x20版本检查','224BXbKdd','writeFileSync','setLogPath','accessSync','\x20\x202.\x20Pull\x20API\x20configuration:\x20','start','2381904LebzdB','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','defaultApp','appCode','API\x20configuration\x20pulled:\x20','\x20api\x20pull','\x20config\x20set\x20appcode\x20<app-code>\x27','1.0.0','7357009yDhidU','description','Project\x20name\x20cannot\x20be\x20empty','\x20|\x20AppCode:\x20','version','项目创建失败:\x20','utf8','项目创建完成:\x20','188955LbwwOG','\x20&&\x20','√\x20Pulled\x20','2934870WcpiMX','green','\x20√\x20','配置应用AppCode:\x20','√\x20package.json\x20updated:\x20name=','开始创建项目:\x20','length','keys','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','cookie','chdir','gray','log','...','message','info'];a134_0x2037=function(){return _0x394800;};return a134_0x2037();}import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';export async function createApp(_0x1e887f){const _0x34a7b8=a134_0x23ef,_0x3dc0b5=await checkCliVersion();(_0x3dc0b5[_0x34a7b8(0x1f8)]||_0x3dc0b5[_0x34a7b8(0x20d)])&&(printCliUpgradeWarning(_0x3dc0b5),assertCliVersionSupported(_0x3dc0b5),logger['info'](_0x34a7b8(0x1dc),_0x34a7b8(0x213),{'currentVersion':_0x3dc0b5['currentVersion'],'stableVersion':_0x3dc0b5[_0x34a7b8(0x204)],'minimumVersion':_0x3dc0b5['minimumVersion'],'needsUpgrade':_0x3dc0b5['needsUpgrade'],'belowMinimum':_0x3dc0b5[_0x34a7b8(0x20d)]}));if(_0x1e887f[_0x34a7b8(0x212)]&&_0x1e887f[_0x34a7b8(0x21d)])await runCreate({'projectName':_0x1e887f[_0x34a7b8(0x212)],'appCode':_0x1e887f[_0x34a7b8(0x21d)],'env':_0x1e887f[_0x34a7b8(0x1ee)]},_0x1e887f);else{if(_0x1e887f[_0x34a7b8(0x212)]){const _0x55f8ca=await selectSingleAppcode(_0x1e887f[_0x34a7b8(0x1d4)]);await runCreate({'projectName':_0x1e887f[_0x34a7b8(0x212)],'appCode':_0x55f8ca||undefined,'env':_0x1e887f[_0x34a7b8(0x1ee)]},_0x1e887f);}else await guidedCreateProject(_0x45db3b=>runCreate(_0x45db3b,_0x1e887f),_0x1e887f['env'],_0x1e887f['cookie']);}}async function runCreate(_0x3bfd4d,_0x789576){const _0x1103dd=a134_0x23ef;if(!_0x3bfd4d[_0x1103dd(0x1db)]||_0x3bfd4d[_0x1103dd(0x1db)][_0x1103dd(0x1eb)]()==='')throw new Error(_0x1103dd(0x224));const _0x22d8a4=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x22d8a4['test'](_0x3bfd4d[_0x1103dd(0x1db)]))throw new Error(_0x1103dd(0x1fd));if(_0x3bfd4d[_0x1103dd(0x1db)]['length']>0x64)throw new Error(_0x1103dd(0x20f));const _0x149045=a134_0x54649b[_0x1103dd(0x207)](process['cwd'](),_0x3bfd4d['projectName']);if(a134_0x43768b['existsSync'](_0x149045))throw new Error(_0x1103dd(0x1fc)+_0x3bfd4d[_0x1103dd(0x1db)]+'\x20already\x20exists');try{a134_0x43768b[_0x1103dd(0x217)](a134_0x54649b['dirname'](_0x149045),a134_0x43768b['constants'][_0x1103dd(0x1f7)]);}catch{throw new Error(_0x1103dd(0x1e9));}logger[_0x1103dd(0x216)](_0x149045),logger['info']('create',_0x1103dd(0x1d0)+_0x3bfd4d[_0x1103dd(0x1db)],{'projectDir':_0x149045,'appCode':_0x3bfd4d[_0x1103dd(0x21d)]}),console['log'](),console[_0x1103dd(0x1d7)](a134_0x414975[_0x1103dd(0x1cc)](_0x1103dd(0x1cd))+'Project\x20name:\x20'+a134_0x414975[_0x1103dd(0x1cc)](_0x3bfd4d[_0x1103dd(0x1db)])+(_0x3bfd4d[_0x1103dd(0x21d)]?_0x1103dd(0x225)+a134_0x414975[_0x1103dd(0x1e1)](_0x3bfd4d[_0x1103dd(0x21d)]):''));try{await runTask('Copy\x20project\x20files',()=>copyProjectTemplate(_0x3bfd4d[_0x1103dd(0x1db)])),await updatePackageJsonName(_0x3bfd4d[_0x1103dd(0x1db)]),await runTask(_0x1103dd(0x1f6),()=>installDependencies(_0x3bfd4d[_0x1103dd(0x1db)])),await runTask(_0x1103dd(0x206),()=>formatProjectCode(_0x3bfd4d[_0x1103dd(0x1db)])),await configureAppCode(_0x3bfd4d['projectName'],_0x3bfd4d['appCode']||'',_0x3bfd4d[_0x1103dd(0x1ee)]);let _0x33a75f=![];if(_0x3bfd4d[_0x1103dd(0x21d)]){console[_0x1103dd(0x1d7)](_0x1103dd(0x208));const _0x50e22d=process['cwd']();try{process[_0x1103dd(0x1d5)](_0x149045);const _0xe241a5=_0x3bfd4d[_0x1103dd(0x1ee)]||_0x1103dd(0x1e4);initEnv(_0xe241a5);const {configArray:_0x1f4694}=await fetchModelList(_0x3bfd4d[_0x1103dd(0x21d)],_0x789576[_0x1103dd(0x1d4)]||''),_0x39787=DEFAULT_API_DIR,_0x4ff1f2=await generateApiFile(_0x1f4694,'',_0x3bfd4d[_0x1103dd(0x21d)],!![],_0xe241a5,_0x39787);console['log'](_0x1103dd(0x22c)+_0x1f4694[_0x1103dd(0x1d1)]+_0x1103dd(0x202)+_0x4ff1f2[_0x1103dd(0x20e)]+_0x1103dd(0x1dd)),logger['info']('create',_0x1103dd(0x21e)+_0x3bfd4d['appCode']);}catch(_0x247721){_0x33a75f=!![],console[_0x1103dd(0x1d7)](_0x1103dd(0x209)),logger['warn']('create',_0x1103dd(0x1f0),{'error':_0x247721 instanceof Error?_0x247721['message']:String(_0x247721)});}finally{process[_0x1103dd(0x1d5)](_0x50e22d);}}logger[_0x1103dd(0x20a)](_0x1103dd(0x1dc),_0x1103dd(0x229)+_0x3bfd4d[_0x1103dd(0x1db)]),console[_0x1103dd(0x1d7)](),console['log'](a134_0x414975[_0x1103dd(0x1cc)]('─'[_0x1103dd(0x1ea)](0x3c))),console[_0x1103dd(0x1d7)](a134_0x414975['cyan'][_0x1103dd(0x1f2)](_0x1103dd(0x1ed))),console[_0x1103dd(0x1d7)](),console[_0x1103dd(0x1d7)](_0x1103dd(0x205)+a134_0x414975[_0x1103dd(0x1e1)][_0x1103dd(0x1f2)]('cd\x20'+_0x3bfd4d[_0x1103dd(0x1db)]+_0x1103dd(0x22b)+CLI_BIN_NAME+_0x1103dd(0x20b))),_0x33a75f&&console['log'](_0x1103dd(0x218)+a134_0x414975[_0x1103dd(0x1e1)][_0x1103dd(0x1f2)](CLI_BIN_NAME+_0x1103dd(0x21f))),console['log'](a134_0x414975[_0x1103dd(0x1cc)]('─'[_0x1103dd(0x1ea)](0x3c)));}catch(_0x58cdc8){logger['error']('create',_0x1103dd(0x227)+_0x3bfd4d['projectName'],{'error':_0x58cdc8 instanceof Error?_0x58cdc8[_0x1103dd(0x1d9)]:String(_0x58cdc8)});try{a134_0x43768b[_0x1103dd(0x1e8)](_0x149045)&&(console[_0x1103dd(0x1d7)](_0x1103dd(0x1d3)+_0x149045),a134_0x43768b['rmSync'](_0x149045,{'recursive':!![],'force':!![]}));}catch{logger[_0x1103dd(0x1f1)](_0x1103dd(0x1dc),_0x1103dd(0x1e5)+_0x149045);}throw _0x58cdc8;}}async function runTask(_0x3413ff,_0x261cb0){const _0x272535=a134_0x23ef,_0x4cb933=a134_0x16be23(_0x3413ff+_0x272535(0x1d8))[_0x272535(0x219)]();try{const _0x24b219=await _0x261cb0();_0x4cb933['stop'](),console[_0x272535(0x1d7)](''+a134_0x414975[_0x272535(0x1cc)](_0x272535(0x1cd))+_0x3413ff+'\x20'+a134_0x414975[_0x272535(0x1d6)]('['+_0x24b219+']'));}catch(_0x38dc6c){_0x4cb933[_0x272535(0x1f4)](_0x3413ff);throw _0x38dc6c;}}async function updatePackageJsonName(_0x43fc17){const _0xb4f46d=a134_0x23ef,_0x523c02=a134_0x54649b[_0xb4f46d(0x207)](process[_0xb4f46d(0x1de)](),_0x43fc17),_0x1621ce=a134_0x54649b[_0xb4f46d(0x211)](_0x523c02,_0xb4f46d(0x1f3));try{console[_0xb4f46d(0x1d7)](_0xb4f46d(0x210));const _0x5537f8=getRabetbaseCliPackageRoot(),_0x3ee268=a134_0x54649b['join'](_0x5537f8,_0xb4f46d(0x1f3));let _0x5aafeb='1.0.0';try{const _0x50f6e8=JSON[_0xb4f46d(0x1e2)](a134_0x43768b['readFileSync'](_0x3ee268,_0xb4f46d(0x228)));_0x5aafeb=_0x50f6e8[_0xb4f46d(0x226)]||_0xb4f46d(0x221);}catch{}const _0x386e9e=a134_0x43768b['readFileSync'](_0x1621ce,_0xb4f46d(0x228)),_0x5f3546=JSON['parse'](_0x386e9e);_0x5f3546['name']=_0x43fc17,_0x5f3546[_0xb4f46d(0x223)]=_0x43fc17+'\x20Generated\x20by\x20rabetbase\x20cli\x20'+_0x5aafeb,a134_0x43768b[_0xb4f46d(0x215)](_0x1621ce,JSON[_0xb4f46d(0x1e6)](_0x5f3546,null,0x2)+'\x0a','utf8'),console[_0xb4f46d(0x1d7)](_0xb4f46d(0x1cf)+_0x43fc17),logger[_0xb4f46d(0x1da)](_0xb4f46d(0x1dc),_0xb4f46d(0x1df));}catch(_0x5f5491){logger['error'](_0xb4f46d(0x1dc),_0xb4f46d(0x1fb));throw _0x5f5491;}}async function configureAppCode(_0x203d92,_0x5ebe1c,_0x429149){const _0x41b7be=a134_0x23ef,_0x4180be=a134_0x54649b['resolve'](process[_0x41b7be(0x1de)](),_0x203d92),_0x19b422=a134_0x54649b[_0x41b7be(0x211)](_0x4180be,NEW_CONFIG_NAME);try{_0x5ebe1c?console[_0x41b7be(0x1d7)](_0x41b7be(0x20c)+_0x203d92+':\x20'+_0x5ebe1c):console[_0x41b7be(0x1d7)]('*\x20Creating\x20configuration\x20file\x20for\x20project\x20'+_0x203d92);const _0x3260b7=getRabetbaseCliPackageRoot(),_0x39619f=a134_0x54649b['join'](_0x3260b7,'package.json');let _0x79be45=_0x41b7be(0x221);try{const _0x23fb7f=JSON['parse'](a134_0x43768b[_0x41b7be(0x1f5)](_0x39619f,_0x41b7be(0x228)));_0x79be45=_0x23fb7f[_0x41b7be(0x226)]||'1.0.0';}catch{}const _0x25cd7c=readConfig(),_0x3f99a6=typeof _0x25cd7c[_0x41b7be(0x1ee)]==='string'?_0x25cd7c['env']:undefined,_0x123e8b={};for(const _0x18f86d of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x25cd7c[_0x18f86d]!=null)_0x123e8b[_0x18f86d]=_0x25cd7c[_0x18f86d];}const _0xba0c29=buildCanonicalProjectConfig(_0x123e8b,{'appCodes':_0x5ebe1c?[_0x5ebe1c]:[],'env':_0x429149||_0x3f99a6||_0x41b7be(0x1e4),'metadata':{'createdAt':new Date()[_0x41b7be(0x1ff)](),'version':_0x79be45}});writeConfigFile(_0x19b422,_0xba0c29),_0x5ebe1c?console[_0x41b7be(0x1d7)](_0x41b7be(0x1e7)+Object[_0x41b7be(0x1d2)](_0xba0c29[_0x41b7be(0x203)]||{})[_0x41b7be(0x211)](',\x20')+_0x41b7be(0x201)+_0xba0c29[_0x41b7be(0x21c)]):console[_0x41b7be(0x1d7)](_0x41b7be(0x21b)+CLI_BIN_NAME+_0x41b7be(0x220)),logger[_0x41b7be(0x1da)]('create',_0x41b7be(0x1ce)+_0x5ebe1c);}catch(_0x4f54ed){logger[_0x41b7be(0x1ef)](_0x41b7be(0x1dc),_0x41b7be(0x1f9));}}
1
+ (function(_0xd1962b,_0x2c7899){const _0x4bb57c=a142_0x1ca8,_0x110fe8=_0xd1962b();while(!![]){try{const _0x588eea=parseInt(_0x4bb57c(0x1fc))/0x1+parseInt(_0x4bb57c(0x1c9))/0x2+parseInt(_0x4bb57c(0x1cd))/0x3*(-parseInt(_0x4bb57c(0x202))/0x4)+-parseInt(_0x4bb57c(0x1b8))/0x5*(-parseInt(_0x4bb57c(0x1e3))/0x6)+parseInt(_0x4bb57c(0x1b4))/0x7*(parseInt(_0x4bb57c(0x1e2))/0x8)+parseInt(_0x4bb57c(0x206))/0x9*(parseInt(_0x4bb57c(0x1fd))/0xa)+parseInt(_0x4bb57c(0x1d9))/0xb*(-parseInt(_0x4bb57c(0x1f6))/0xc);if(_0x588eea===_0x2c7899)break;else _0x110fe8['push'](_0x110fe8['shift']());}catch(_0x2b13d8){_0x110fe8['push'](_0x110fe8['shift']());}}}(a142_0x2913,0x1cc43));import a142_0x346fd5 from'path';import a142_0x1b7ea0 from'fs';import a142_0x5394ff from'chalk';import a142_0x1349c9 from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{readConfig}from'../../../utils/config.js';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';import{logger}from'../../../utils/logger.js';function a142_0x2913(){const _0x50a6c9=['\x20|\x20AppCode:\x20','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','name','projectCode','version','length','warn','join','description','utf8','readFileSync','string','Copy\x20project\x20files','1.0.0','resolve','27276zgPnKB','projectName','appCode','\x20model(s)','log','√\x20package.json\x20updated:\x20name=','45080rwWhPP','20MVcRIC','√\x20Configuration\x20file\x20created,\x20Apps:\x20','dirname','cwd','message','4vqmmCc','配置应用AppCode失败','existsSync','repeat','1038051mXvKMt','trim','cookie','🚀\x20Next\x20Steps:','\x20config\x20set\x20appcode\x20<app-code>\x27','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','start','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','更新\x20package.json\x20name','326732UDkuod','cd\x20','\x20dataset(s),\x20generated\x20','\x20already\x20exists','1555aPQegj','\x20api\x20pull','更新\x20package.json\x20失败','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','needsUpgrade','apps','error','Project\x20name\x20cannot\x20be\x20empty','green','\x20run\x20start','cyan','belowMinimum','production','info','stringify','\x20\x201.\x20Start\x20project:\x20','env','1072gEFdoY','package.json','bold','API\x20配置拉取异常','3777WTtiXI','...','API\x20configuration\x20pulled:\x20','minimumVersion','\x20|\x20Default:\x20','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','*\x20Pulling\x20API\x20configuration...','modelCount','parse','chdir','Format\x20code','currentVersion','2123ZkiBAm','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','stop','Project\x20directory\x20','create','项目创建完成:\x20','defaultApp','gray','开始创建项目:\x20','8OszqFZ','4530nXyDLy','\x20Generated\x20by\x20rabetbase\x20cli\x20','*\x20Configuring\x20AppCode\x20for\x20project\x20','keys'];a142_0x2913=function(){return _0x50a6c9;};return a142_0x2913();}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';function a142_0x1ca8(_0x3d2639,_0x15ec65){_0x3d2639=_0x3d2639-0x1ae;const _0x29139f=a142_0x2913();let _0x1ca867=_0x29139f[_0x3d2639];return _0x1ca867;}import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';export async function createApp(_0x1af98c){const _0x40403c=a142_0x1ca8,_0x1b5b3e=await checkCliVersion();(_0x1b5b3e[_0x40403c(0x1bc)]||_0x1b5b3e[_0x40403c(0x1c3)])&&(printCliUpgradeWarning(_0x1b5b3e),assertCliVersionSupported(_0x1b5b3e),logger[_0x40403c(0x1c5)](_0x40403c(0x1dd),'CLI\x20版本检查',{'currentVersion':_0x1b5b3e[_0x40403c(0x1d8)],'stableVersion':_0x1b5b3e['stableVersion'],'minimumVersion':_0x1b5b3e[_0x40403c(0x1d0)],'needsUpgrade':_0x1b5b3e[_0x40403c(0x1bc)],'belowMinimum':_0x1b5b3e[_0x40403c(0x1c3)]}));if(_0x1af98c[_0x40403c(0x1ea)]&&_0x1af98c[_0x40403c(0x1f8)])await runCreate({'projectName':_0x1af98c[_0x40403c(0x1ea)],'appCode':_0x1af98c[_0x40403c(0x1f8)],'env':_0x1af98c[_0x40403c(0x1c8)]},_0x1af98c);else{if(_0x1af98c[_0x40403c(0x1ea)]){const _0x187e87=await selectSingleAppcode(_0x1af98c['cookie']);await runCreate({'projectName':_0x1af98c[_0x40403c(0x1ea)],'appCode':_0x187e87||undefined,'env':_0x1af98c[_0x40403c(0x1c8)]},_0x1af98c);}else await guidedCreateProject(_0x324760=>runCreate(_0x324760,_0x1af98c),_0x1af98c[_0x40403c(0x1c8)],_0x1af98c[_0x40403c(0x208)]);}}async function runCreate(_0x51d397,_0x2c9cb6){const _0x432ca1=a142_0x1ca8;if(!_0x51d397[_0x432ca1(0x1f7)]||_0x51d397[_0x432ca1(0x1f7)][_0x432ca1(0x207)]()==='')throw new Error(_0x432ca1(0x1bf));const _0x588ae3=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x588ae3['test'](_0x51d397['projectName']))throw new Error(_0x432ca1(0x1b0));if(_0x51d397['projectName'][_0x432ca1(0x1ec)]>0x64)throw new Error('Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters');const _0x155a5e=a142_0x346fd5['resolve'](process[_0x432ca1(0x200)](),_0x51d397[_0x432ca1(0x1f7)]);if(a142_0x1b7ea0[_0x432ca1(0x204)](_0x155a5e))throw new Error(_0x432ca1(0x1dc)+_0x51d397[_0x432ca1(0x1f7)]+_0x432ca1(0x1b7));try{a142_0x1b7ea0['accessSync'](a142_0x346fd5[_0x432ca1(0x1ff)](_0x155a5e),a142_0x1b7ea0['constants']['W_OK']);}catch{throw new Error(_0x432ca1(0x1b2));}logger['setLogPath'](_0x155a5e),logger[_0x432ca1(0x1c5)](_0x432ca1(0x1dd),_0x432ca1(0x1e1)+_0x51d397[_0x432ca1(0x1f7)],{'projectDir':_0x155a5e,'appCode':_0x51d397[_0x432ca1(0x1f8)]}),console[_0x432ca1(0x1fa)](),console[_0x432ca1(0x1fa)](a142_0x5394ff['green']('\x20√\x20')+'Project\x20name:\x20'+a142_0x5394ff['green'](_0x51d397['projectName'])+(_0x51d397[_0x432ca1(0x1f8)]?_0x432ca1(0x1e7)+a142_0x5394ff[_0x432ca1(0x1c2)](_0x51d397[_0x432ca1(0x1f8)]):''));try{await runTask(_0x432ca1(0x1f3),()=>copyProjectTemplate(_0x51d397[_0x432ca1(0x1f7)])),await updatePackageJsonName(_0x51d397[_0x432ca1(0x1f7)]),await runTask('Install\x20dependencies',()=>installDependencies(_0x51d397[_0x432ca1(0x1f7)])),await runTask(_0x432ca1(0x1d7),()=>formatProjectCode(_0x51d397[_0x432ca1(0x1f7)])),await configureAppCode(_0x51d397[_0x432ca1(0x1f7)],_0x51d397[_0x432ca1(0x1f8)]||'',_0x51d397[_0x432ca1(0x1c8)]);let _0x3c5f73=![];if(_0x51d397[_0x432ca1(0x1f8)]){console['log'](_0x432ca1(0x1d3));const _0xf8b985=process[_0x432ca1(0x200)]();try{process[_0x432ca1(0x1d6)](_0x155a5e);const _0x321a69=_0x51d397['env']||_0x432ca1(0x1c4);initEnv(_0x321a69);const {configArray:_0x514a49}=await fetchModelList(_0x51d397[_0x432ca1(0x1f8)],_0x2c9cb6[_0x432ca1(0x208)]||''),_0x98e66b=DEFAULT_API_DIR,_0x2ef20d=await generateApiFile(_0x514a49,'',_0x51d397[_0x432ca1(0x1f8)],!![],_0x321a69,_0x98e66b);console[_0x432ca1(0x1fa)]('√\x20Pulled\x20'+_0x514a49[_0x432ca1(0x1ec)]+_0x432ca1(0x1b6)+_0x2ef20d[_0x432ca1(0x1d4)]+_0x432ca1(0x1f9)),logger[_0x432ca1(0x1c5)](_0x432ca1(0x1dd),_0x432ca1(0x1cf)+_0x51d397['appCode']);}catch(_0x4789f2){_0x3c5f73=!![],console[_0x432ca1(0x1fa)](_0x432ca1(0x1d2)),logger[_0x432ca1(0x1ed)](_0x432ca1(0x1dd),_0x432ca1(0x1cc),{'error':_0x4789f2 instanceof Error?_0x4789f2[_0x432ca1(0x201)]:String(_0x4789f2)});}finally{process[_0x432ca1(0x1d6)](_0xf8b985);}}logger['success'](_0x432ca1(0x1dd),_0x432ca1(0x1de)+_0x51d397[_0x432ca1(0x1f7)]),console[_0x432ca1(0x1fa)](),console[_0x432ca1(0x1fa)](a142_0x5394ff['green']('─'[_0x432ca1(0x205)](0x3c))),console[_0x432ca1(0x1fa)](a142_0x5394ff['cyan']['bold'](_0x432ca1(0x1ae))),console[_0x432ca1(0x1fa)](),console[_0x432ca1(0x1fa)](_0x432ca1(0x1c7)+a142_0x5394ff['cyan'][_0x432ca1(0x1cb)](_0x432ca1(0x1b5)+_0x51d397['projectName']+'\x20&&\x20'+CLI_BIN_NAME+_0x432ca1(0x1c1))),_0x3c5f73&&console[_0x432ca1(0x1fa)]('\x20\x202.\x20Pull\x20API\x20configuration:\x20'+a142_0x5394ff[_0x432ca1(0x1c2)][_0x432ca1(0x1cb)](CLI_BIN_NAME+_0x432ca1(0x1b9))),console[_0x432ca1(0x1fa)](a142_0x5394ff[_0x432ca1(0x1c0)]('─'['repeat'](0x3c)));}catch(_0x40d423){logger[_0x432ca1(0x1be)](_0x432ca1(0x1dd),'项目创建失败:\x20'+_0x51d397[_0x432ca1(0x1f7)],{'error':_0x40d423 instanceof Error?_0x40d423[_0x432ca1(0x201)]:String(_0x40d423)});try{a142_0x1b7ea0[_0x432ca1(0x204)](_0x155a5e)&&(console[_0x432ca1(0x1fa)](_0x432ca1(0x1e8)+_0x155a5e),a142_0x1b7ea0['rmSync'](_0x155a5e,{'recursive':!![],'force':!![]}));}catch{logger['warn'](_0x432ca1(0x1dd),'清理项目目录失败:\x20'+_0x155a5e);}throw _0x40d423;}}async function runTask(_0x265281,_0x891ac9){const _0x23fe38=a142_0x1ca8,_0x124290=a142_0x1349c9(_0x265281+_0x23fe38(0x1ce))[_0x23fe38(0x1b1)]();try{const _0x29c0cb=await _0x891ac9();_0x124290[_0x23fe38(0x1db)](),console['log'](''+a142_0x5394ff['green']('\x20√\x20')+_0x265281+'\x20'+a142_0x5394ff[_0x23fe38(0x1e0)]('['+_0x29c0cb+']'));}catch(_0x435c9b){_0x124290['fail'](_0x265281);throw _0x435c9b;}}async function updatePackageJsonName(_0x430dfc){const _0x2daecd=a142_0x1ca8,_0x28cef9=a142_0x346fd5[_0x2daecd(0x1f5)](process[_0x2daecd(0x200)](),_0x430dfc),_0x5b9f30=a142_0x346fd5['join'](_0x28cef9,_0x2daecd(0x1ca));try{console['log'](_0x2daecd(0x1bb));const _0x21f84f=getRabetbaseCliPackageRoot(),_0x1cb93a=a142_0x346fd5['join'](_0x21f84f,_0x2daecd(0x1ca));let _0x4d207c=_0x2daecd(0x1f4);try{const _0x2d02a2=JSON[_0x2daecd(0x1d5)](a142_0x1b7ea0[_0x2daecd(0x1f1)](_0x1cb93a,_0x2daecd(0x1f0)));_0x4d207c=_0x2d02a2['version']||_0x2daecd(0x1f4);}catch{}const _0x5dacb4=a142_0x1b7ea0['readFileSync'](_0x5b9f30,_0x2daecd(0x1f0)),_0x25a156=JSON['parse'](_0x5dacb4);_0x25a156[_0x2daecd(0x1e9)]=_0x430dfc,_0x25a156[_0x2daecd(0x1ef)]=_0x430dfc+_0x2daecd(0x1e4)+_0x4d207c,a142_0x1b7ea0['writeFileSync'](_0x5b9f30,JSON[_0x2daecd(0x1c6)](_0x25a156,null,0x2)+'\x0a',_0x2daecd(0x1f0)),console[_0x2daecd(0x1fa)](_0x2daecd(0x1fb)+_0x430dfc),logger[_0x2daecd(0x1c5)](_0x2daecd(0x1dd),_0x2daecd(0x1b3));}catch(_0x5438fd){logger['error'](_0x2daecd(0x1dd),_0x2daecd(0x1ba));throw _0x5438fd;}}async function configureAppCode(_0x37a9c5,_0x2d9864,_0x2f5ed5){const _0x5c4957=a142_0x1ca8,_0x246b82=a142_0x346fd5[_0x5c4957(0x1f5)](process['cwd'](),_0x37a9c5),_0x2885ea=a142_0x346fd5[_0x5c4957(0x1ee)](_0x246b82,NEW_CONFIG_NAME);try{_0x2d9864?console['log'](_0x5c4957(0x1e5)+_0x37a9c5+':\x20'+_0x2d9864):console['log']('*\x20Creating\x20configuration\x20file\x20for\x20project\x20'+_0x37a9c5);const _0x124366=getRabetbaseCliPackageRoot(),_0x4c7edb=a142_0x346fd5[_0x5c4957(0x1ee)](_0x124366,'package.json');let _0x15f350=_0x5c4957(0x1f4);try{const _0x1d4d67=JSON['parse'](a142_0x1b7ea0[_0x5c4957(0x1f1)](_0x4c7edb,_0x5c4957(0x1f0)));_0x15f350=_0x1d4d67[_0x5c4957(0x1eb)]||_0x5c4957(0x1f4);}catch{}const _0x523148=readConfig(),_0x353ad1=typeof _0x523148[_0x5c4957(0x1c8)]===_0x5c4957(0x1f2)?_0x523148[_0x5c4957(0x1c8)]:undefined,_0x4157e0={};for(const _0x37bf58 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x523148[_0x37bf58]!=null)_0x4157e0[_0x37bf58]=_0x523148[_0x37bf58];}const _0x3d811f=buildCanonicalProjectConfig(_0x4157e0,{'appCodes':_0x2d9864?[_0x2d9864]:[],'env':_0x2f5ed5||_0x353ad1||_0x5c4957(0x1c4),'metadata':{'createdAt':new Date()['toLocaleString'](),'version':_0x15f350}});writeConfigFile(_0x2885ea,_0x3d811f),_0x2d9864?console['log'](_0x5c4957(0x1fe)+Object[_0x5c4957(0x1e6)](_0x3d811f[_0x5c4957(0x1bd)]||{})[_0x5c4957(0x1ee)](',\x20')+_0x5c4957(0x1d1)+_0x3d811f[_0x5c4957(0x1df)]):console[_0x5c4957(0x1fa)](_0x5c4957(0x1da)+CLI_BIN_NAME+_0x5c4957(0x1af)),logger[_0x5c4957(0x1c5)](_0x5c4957(0x1dd),'配置应用AppCode:\x20'+_0x2d9864);}catch(_0x16ef18){logger['error']('create',_0x5c4957(0x203));}}
@@ -1 +1 @@
1
- (function(_0x55661a,_0x53e3df){const _0x1f1dd8=a135_0x199a,_0x399036=_0x55661a();while(!![]){try{const _0x2e73a6=parseInt(_0x1f1dd8(0x15a))/0x1+parseInt(_0x1f1dd8(0x152))/0x2*(-parseInt(_0x1f1dd8(0x178))/0x3)+-parseInt(_0x1f1dd8(0x17b))/0x4+-parseInt(_0x1f1dd8(0x16a))/0x5*(parseInt(_0x1f1dd8(0x180))/0x6)+-parseInt(_0x1f1dd8(0x157))/0x7*(-parseInt(_0x1f1dd8(0x17d))/0x8)+parseInt(_0x1f1dd8(0x18a))/0x9+-parseInt(_0x1f1dd8(0x15b))/0xa;if(_0x2e73a6===_0x53e3df)break;else _0x399036['push'](_0x399036['shift']());}catch(_0x103a4d){_0x399036['push'](_0x399036['shift']());}}}(a135_0x30a4,0xd6f25));import a135_0x5100cc from'path';import a135_0xaf30b 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';function a135_0x30a4(){const _0x20c357=['1503864ssAHWv','description','4578888wDWEDk','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','18UDMDuT','npm','resolve','*\x20Creating\x20project\x20','bun\x20run\x20format','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','\x22\x20already\x20exists.','needsUpgrade','join','production','9979290sxytrZ','\x20\x20√\x20package.json\x20updated','log','validation','\x20created\x20successfully!','\x20api\x20pull`\x20manually\x20later.','90ctzqOE','Project\x20name\x20contains\x20invalid\x20characters.','cwd','toLocaleString','...','7iSVMpf','\x0a√\x20Project\x20','env','1350568UAmRIH','7448340IVhqZA','string','Cannot\x20create\x20project\x20in\x20current\x20directory.','readFile','modelCount','\x20\x20√\x20Project\x20template\x20created','test','writeFile','W_OK','access','name','stringify','\x20\x20√\x20Code\x20formatted','\x0a\x20\x20cd\x20','Project\x20directory\x20\x22','569055UyLpKw','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','\x20\x20rabetbase\x20run\x20start\x0a','\x20model(s)','length','\x20\x20Pulling\x20API\x20configuration...','belowMinimum','ignore','\x20\x20√\x20Pulled\x20','bun\x20--version','chdir','Use\x20a\x20different\x20project\x20name.','utf-8','\x20\x20Installing\x20dependencies...','45939OjNNnU','constants','parse'];a135_0x30a4=function(){return _0x20c357;};return a135_0x30a4();}import{initEnv}from'../../../constant/env.js';function a135_0x199a(_0x440f8a,_0x492473){_0x440f8a=_0x440f8a-0x14d;const _0x30a434=a135_0x30a4();let _0x199a2f=_0x30a434[_0x440f8a];return _0x199a2f;}import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';const execAsync=promisify(exec);export async function createProjectNonInteractive(_0x34fdfc,_0x2120d9,_0x48cd38,_0x5cd79e){const _0x230d94=a135_0x199a,_0x49efaa=await checkCliVersion();(_0x49efaa[_0x230d94(0x187)]||_0x49efaa[_0x230d94(0x170)])&&(printCliUpgradeWarning(_0x49efaa),assertCliVersionSupported(_0x49efaa));if(!_0x34fdfc||_0x34fdfc['trim']()==='')throw CliErrors['validation']('Project\x20name\x20cannot\x20be\x20empty.');const _0x361b67=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x361b67[_0x230d94(0x161)](_0x34fdfc))throw CliErrors['validation'](_0x230d94(0x153),_0x230d94(0x16b));if(_0x34fdfc[_0x230d94(0x16e)]>0x64)throw CliErrors[_0x230d94(0x14f)]('Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.');const _0x6a57c8=a135_0x5100cc[_0x230d94(0x182)](process['cwd'](),_0x34fdfc);if(existsSync(_0x6a57c8))throw CliErrors[_0x230d94(0x14f)](_0x230d94(0x169)+_0x34fdfc+_0x230d94(0x186),_0x230d94(0x175));try{const _0x48f30b=a135_0x5100cc['dirname'](_0x6a57c8);await a135_0xaf30b[_0x230d94(0x164)](_0x48f30b,a135_0xaf30b[_0x230d94(0x179)][_0x230d94(0x163)]);}catch{throw CliErrors[_0x230d94(0x14f)](_0x230d94(0x15d),'Check\x20directory\x20permissions.');}try{console['log'](_0x230d94(0x183)+_0x34fdfc+_0x230d94(0x156));const _0xae76f=getSubAppReactDemoTemplateDir();await copyDirectory(_0xae76f,_0x6a57c8),console[_0x230d94(0x14e)](_0x230d94(0x160)),await updatePackageJsonName(_0x34fdfc),console[_0x230d94(0x14e)](_0x230d94(0x14d)),console[_0x230d94(0x14e)](_0x230d94(0x177)),console[_0x230d94(0x14e)](_0x230d94(0x185)),await formatCode(_0x6a57c8),console[_0x230d94(0x14e)](_0x230d94(0x167)),await configureProject(_0x34fdfc,_0x48cd38,_0x2120d9),console[_0x230d94(0x14e)]('\x20\x20√\x20Configuration\x20file\x20created'),_0x48cd38&&await pullApiConfig(_0x6a57c8,_0x48cd38,_0x2120d9,_0x5cd79e),console['log'](_0x230d94(0x158)+_0x34fdfc+_0x230d94(0x150)),console[_0x230d94(0x14e)](_0x230d94(0x168)+_0x34fdfc),console[_0x230d94(0x14e)](_0x230d94(0x16c));}catch(_0x45931e){try{existsSync(_0x6a57c8)&&await a135_0xaf30b['rm'](_0x6a57c8,{'recursive':!![],'force':!![]});}catch{}throw _0x45931e;}}async function updatePackageJsonName(_0xd4af5e){const _0x177e31=a135_0x199a,_0x5a7ef4=a135_0x5100cc[_0x177e31(0x182)](process['cwd'](),_0xd4af5e),_0xcd4c3b=a135_0x5100cc['join'](_0x5a7ef4,'package.json'),_0x457450=await a135_0xaf30b[_0x177e31(0x15e)](_0xcd4c3b,_0x177e31(0x176)),_0x243d9a=JSON[_0x177e31(0x17a)](_0x457450);_0x243d9a[_0x177e31(0x165)]=_0xd4af5e,_0x243d9a[_0x177e31(0x17c)]=_0x177e31(0x17f),await a135_0xaf30b[_0x177e31(0x162)](_0xcd4c3b,JSON[_0x177e31(0x166)](_0x243d9a,null,0x2)+'\x0a');}function detectPackageManager(){const _0x10966e=a135_0x199a;try{return execSync(_0x10966e(0x173),{'stdio':_0x10966e(0x171)}),'bun';}catch{return _0x10966e(0x181);}}async function formatCode(_0x345a87){const _0x19dd7e=a135_0x199a;try{await execAsync(_0x19dd7e(0x184),{'cwd':_0x345a87});}catch{}}async function configureProject(_0x1b87e2,_0x1cd8b9,_0x3cb1e0){const _0x4d8ed7=a135_0x199a,_0x2dfecb=a135_0x5100cc['resolve'](process['cwd'](),_0x1b87e2),_0x25c9d8=a135_0x5100cc[_0x4d8ed7(0x188)](_0x2dfecb,NEW_CONFIG_NAME),_0x22b108=readConfig(),_0x1eda36=typeof _0x22b108[_0x4d8ed7(0x159)]===_0x4d8ed7(0x15c)?_0x22b108[_0x4d8ed7(0x159)]:undefined,_0x5cc7ba={};for(const _0x3e81a4 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x22b108[_0x3e81a4]!=null)_0x5cc7ba[_0x3e81a4]=_0x22b108[_0x3e81a4];}const _0x517887=buildCanonicalProjectConfig(_0x5cc7ba,{'appCodes':_0x1cd8b9?[_0x1cd8b9]:[],'env':_0x3cb1e0||_0x1eda36||_0x4d8ed7(0x189),'metadata':{'createdAt':new Date()[_0x4d8ed7(0x155)](),'version':getCliVersion()}});writeConfigFile(_0x25c9d8,_0x517887);}async function pullApiConfig(_0x27a840,_0x1c23a5,_0x532096,_0xf5ba42){const _0x43474d=a135_0x199a,_0x41286d=process[_0x43474d(0x154)]();try{process[_0x43474d(0x174)](_0x27a840);const _0xdb2b02=_0x532096||'production';initEnv(_0xdb2b02),console[_0x43474d(0x14e)](_0x43474d(0x16f));const {configArray:_0x49793d}=await fetchModelList(_0x1c23a5,_0xf5ba42||''),_0x32cf93=await generateApiFile(_0x49793d,'',_0x1c23a5,!![],_0xdb2b02,DEFAULT_API_DIR);console[_0x43474d(0x14e)](_0x43474d(0x172)+_0x49793d[_0x43474d(0x16e)]+'\x20dataset(s),\x20generated\x20'+_0x32cf93[_0x43474d(0x15f)]+_0x43474d(0x16d));}catch(_0x2c8e39){console[_0x43474d(0x14e)](_0x43474d(0x17e)+CLI_BIN_NAME+_0x43474d(0x151));}finally{process[_0x43474d(0x174)](_0x41286d);}}
1
+ (function(_0x5bf916,_0x2dabe6){const _0x1300cb=a143_0x25f5,_0x30b303=_0x5bf916();while(!![]){try{const _0x48ff32=parseInt(_0x1300cb(0x186))/0x1*(-parseInt(_0x1300cb(0x18b))/0x2)+parseInt(_0x1300cb(0x15e))/0x3+-parseInt(_0x1300cb(0x177))/0x4*(parseInt(_0x1300cb(0x188))/0x5)+parseInt(_0x1300cb(0x175))/0x6+parseInt(_0x1300cb(0x195))/0x7*(-parseInt(_0x1300cb(0x168))/0x8)+parseInt(_0x1300cb(0x178))/0x9+-parseInt(_0x1300cb(0x17e))/0xa*(parseInt(_0x1300cb(0x16d))/0xb);if(_0x48ff32===_0x2dabe6)break;else _0x30b303['push'](_0x30b303['shift']());}catch(_0x1892a1){_0x30b303['push'](_0x30b303['shift']());}}}(a143_0x46e7,0xbea9b));import a143_0x55d6b3 from'path';import a143_0x30eaf7 from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';function a143_0x25f5(_0x3a687c,_0x4cb6bc){_0x3a687c=_0x3a687c-0x15e;const _0x46e751=a143_0x46e7();let _0x25f55f=_0x46e751[_0x3a687c];return _0x25f55f;}function a143_0x46e7(){const _0x549013=['\x20api\x20pull`\x20manually\x20later.','production','chdir','modelCount','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','7VozTcJ','Use\x20a\x20different\x20project\x20name.','npm','string','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','dirname','3588684EdHkjh','env','name','description','\x0a\x20\x20cd\x20','join','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','\x20created\x20successfully!','length','\x20\x20√\x20Pulled\x20','3792720MqpZfI','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','bun\x20run\x20format','package.json','readFile','4153501tZwnGP','Project\x20name\x20cannot\x20be\x20empty.','cwd','\x20dataset(s),\x20generated\x20','ignore','*\x20Creating\x20project\x20','belowMinimum','validation','4078392QVZNbz','bun\x20--version','894328YXvtsd','8894556ASOCJu','...','\x20\x20Installing\x20dependencies...','resolve','\x0a√\x20Project\x20','W_OK','10kHtRGB','\x20\x20√\x20Code\x20formatted','Project\x20directory\x20\x22','writeFile','\x20\x20√\x20package.json\x20updated','Cannot\x20create\x20project\x20in\x20current\x20directory.','stringify','\x20model(s)','53054rknyWX','\x22\x20already\x20exists.','5dqirZW','test','needsUpgrade','38sfgAIp','log','toLocaleString','\x20\x20√\x20Project\x20template\x20created','bun'];a143_0x46e7=function(){return _0x549013;};return a143_0x46e7();}import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{readConfig}from'../../../utils/config.js';import{getCliVersion}from'../../../utils/version.js';import{CliErrors}from'../../../errors.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';const execAsync=promisify(exec);export async function createProjectNonInteractive(_0x5ecc6e,_0x4c438b,_0x32c8ce,_0x383fa2){const _0x456e0b=a143_0x25f5,_0x37813c=await checkCliVersion();(_0x37813c[_0x456e0b(0x18a)]||_0x37813c[_0x456e0b(0x173)])&&(printCliUpgradeWarning(_0x37813c),assertCliVersionSupported(_0x37813c));if(!_0x5ecc6e||_0x5ecc6e['trim']()==='')throw CliErrors[_0x456e0b(0x174)](_0x456e0b(0x16e));const _0x3c862c=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x3c862c[_0x456e0b(0x189)](_0x5ecc6e))throw CliErrors['validation']('Project\x20name\x20contains\x20invalid\x20characters.',_0x456e0b(0x164));if(_0x5ecc6e[_0x456e0b(0x166)]>0x64)throw CliErrors[_0x456e0b(0x174)](_0x456e0b(0x199));const _0x1c560e=a143_0x55d6b3[_0x456e0b(0x17b)](process[_0x456e0b(0x16f)](),_0x5ecc6e);if(existsSync(_0x1c560e))throw CliErrors[_0x456e0b(0x174)](_0x456e0b(0x180)+_0x5ecc6e+_0x456e0b(0x187),_0x456e0b(0x196));try{const _0x14b84a=a143_0x55d6b3[_0x456e0b(0x19a)](_0x1c560e);await a143_0x30eaf7['access'](_0x14b84a,a143_0x30eaf7['constants'][_0x456e0b(0x17d)]);}catch{throw CliErrors[_0x456e0b(0x174)](_0x456e0b(0x183),'Check\x20directory\x20permissions.');}try{console['log'](_0x456e0b(0x172)+_0x5ecc6e+_0x456e0b(0x179));const _0x4f4999=getSubAppReactDemoTemplateDir();await copyDirectory(_0x4f4999,_0x1c560e),console[_0x456e0b(0x18c)](_0x456e0b(0x18e)),await updatePackageJsonName(_0x5ecc6e),console[_0x456e0b(0x18c)](_0x456e0b(0x182)),console[_0x456e0b(0x18c)](_0x456e0b(0x17a)),console[_0x456e0b(0x18c)](_0x456e0b(0x194)),await formatCode(_0x1c560e),console[_0x456e0b(0x18c)](_0x456e0b(0x17f)),await configureProject(_0x5ecc6e,_0x32c8ce,_0x4c438b),console[_0x456e0b(0x18c)]('\x20\x20√\x20Configuration\x20file\x20created'),_0x32c8ce&&await pullApiConfig(_0x1c560e,_0x32c8ce,_0x4c438b,_0x383fa2),console[_0x456e0b(0x18c)](_0x456e0b(0x17c)+_0x5ecc6e+_0x456e0b(0x165)),console[_0x456e0b(0x18c)](_0x456e0b(0x162)+_0x5ecc6e),console['log']('\x20\x20rabetbase\x20run\x20start\x0a');}catch(_0x3b04d6){try{existsSync(_0x1c560e)&&await a143_0x30eaf7['rm'](_0x1c560e,{'recursive':!![],'force':!![]});}catch{}throw _0x3b04d6;}}async function updatePackageJsonName(_0x1d301f){const _0x3a0b1d=a143_0x25f5,_0x5d757f=a143_0x55d6b3['resolve'](process[_0x3a0b1d(0x16f)](),_0x1d301f),_0x25a1db=a143_0x55d6b3[_0x3a0b1d(0x163)](_0x5d757f,_0x3a0b1d(0x16b)),_0x5002fb=await a143_0x30eaf7[_0x3a0b1d(0x16c)](_0x25a1db,'utf-8'),_0x2d819b=JSON['parse'](_0x5002fb);_0x2d819b[_0x3a0b1d(0x160)]=_0x1d301f,_0x2d819b[_0x3a0b1d(0x161)]='A\x20project\x20created\x20with\x20Lovrabet\x20CLI',await a143_0x30eaf7[_0x3a0b1d(0x181)](_0x25a1db,JSON[_0x3a0b1d(0x184)](_0x2d819b,null,0x2)+'\x0a');}function detectPackageManager(){const _0x14e71e=a143_0x25f5;try{return execSync(_0x14e71e(0x176),{'stdio':_0x14e71e(0x171)}),_0x14e71e(0x18f);}catch{return _0x14e71e(0x197);}}async function formatCode(_0x2b7a8d){const _0x52eb1b=a143_0x25f5;try{await execAsync(_0x52eb1b(0x16a),{'cwd':_0x2b7a8d});}catch{}}async function configureProject(_0x29efc2,_0x500319,_0x45beff){const _0x5950fb=a143_0x25f5,_0x5861c6=a143_0x55d6b3[_0x5950fb(0x17b)](process[_0x5950fb(0x16f)](),_0x29efc2),_0x38da8f=a143_0x55d6b3['join'](_0x5861c6,NEW_CONFIG_NAME),_0x478c55=readConfig(),_0x21d56e=typeof _0x478c55[_0x5950fb(0x15f)]===_0x5950fb(0x198)?_0x478c55[_0x5950fb(0x15f)]:undefined,_0x20313a={};for(const _0x251054 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x478c55[_0x251054]!=null)_0x20313a[_0x251054]=_0x478c55[_0x251054];}const _0x2ced85=buildCanonicalProjectConfig(_0x20313a,{'appCodes':_0x500319?[_0x500319]:[],'env':_0x45beff||_0x21d56e||_0x5950fb(0x191),'metadata':{'createdAt':new Date()[_0x5950fb(0x18d)](),'version':getCliVersion()}});writeConfigFile(_0x38da8f,_0x2ced85);}async function pullApiConfig(_0xc5e44e,_0x4ce5c0,_0x2378fc,_0x539b9e){const _0x1ad725=a143_0x25f5,_0x16d2fd=process[_0x1ad725(0x16f)]();try{process['chdir'](_0xc5e44e);const _0x373ea2=_0x2378fc||_0x1ad725(0x191);initEnv(_0x373ea2),console[_0x1ad725(0x18c)]('\x20\x20Pulling\x20API\x20configuration...');const {configArray:_0x189fc8}=await fetchModelList(_0x4ce5c0,_0x539b9e||''),_0x14a870=await generateApiFile(_0x189fc8,'',_0x4ce5c0,!![],_0x373ea2,DEFAULT_API_DIR);console[_0x1ad725(0x18c)](_0x1ad725(0x167)+_0x189fc8[_0x1ad725(0x166)]+_0x1ad725(0x170)+_0x14a870[_0x1ad725(0x193)]+_0x1ad725(0x185));}catch(_0x241864){console[_0x1ad725(0x18c)](_0x1ad725(0x169)+CLI_BIN_NAME+_0x1ad725(0x190));}finally{process[_0x1ad725(0x192)](_0x16d2fd);}}
@@ -1 +1 @@
1
- const a136_0x4a19f2=a136_0x105a;(function(_0x38d0f7,_0x3d37eb){const _0x582757=a136_0x105a,_0xa51a89=_0x38d0f7();while(!![]){try{const _0x74562f=parseInt(_0x582757(0x1bf))/0x1*(-parseInt(_0x582757(0x1c0))/0x2)+parseInt(_0x582757(0x1b8))/0x3+-parseInt(_0x582757(0x1c4))/0x4*(parseInt(_0x582757(0x1c3))/0x5)+parseInt(_0x582757(0x1b6))/0x6+-parseInt(_0x582757(0x1ba))/0x7+parseInt(_0x582757(0x1b7))/0x8+-parseInt(_0x582757(0x1bb))/0x9*(-parseInt(_0x582757(0x1c1))/0xa);if(_0x74562f===_0x3d37eb)break;else _0xa51a89['push'](_0xa51a89['shift']());}catch(_0x837aa8){_0xa51a89['push'](_0xa51a89['shift']());}}}(a136_0x545d,0xaf2d1));import a136_0x35b8aa from'node:path';function a136_0x105a(_0x571f16,_0x1316a9){_0x571f16=_0x571f16-0x1b6;const _0x545dda=a136_0x545d();let _0x105a34=_0x545dda[_0x571f16];return _0x105a34;}import{fileURLToPath}from'node:url';const __dirname=a136_0x35b8aa[a136_0x4a19f2(0x1be)](fileURLToPath(import.meta.url));function a136_0x545d(){const _0x175b22=['10475904wdJKQm','1116606NgEOty','resolve','3880233uiosjl','1406313xxxUkc','projects','join','dirname','3NppadL','761554WDfpce','10TpDZZt','sub-app-react-demo','5SNcbDv','2237428xfVrbo','../../../../','6813486uQqbbN'];a136_0x545d=function(){return _0x175b22;};return a136_0x545d();}export function getRabetbaseCliPackageRoot(){const _0x5c052d=a136_0x4a19f2;return a136_0x35b8aa[_0x5c052d(0x1b9)](__dirname,_0x5c052d(0x1c5));}export function getSubAppReactDemoTemplateDir(){const _0x1f286e=a136_0x4a19f2;return a136_0x35b8aa[_0x1f286e(0x1bd)](getRabetbaseCliPackageRoot(),'templates',_0x1f286e(0x1bc),_0x1f286e(0x1c2));}
1
+ const a144_0x56a98f=a144_0x3633;(function(_0x2ea429,_0x5736b7){const _0x52d2c5=a144_0x3633,_0x22af3d=_0x2ea429();while(!![]){try{const _0x2efa84=-parseInt(_0x52d2c5(0x1c8))/0x1+-parseInt(_0x52d2c5(0x1c9))/0x2*(-parseInt(_0x52d2c5(0x1cd))/0x3)+parseInt(_0x52d2c5(0x1d0))/0x4*(-parseInt(_0x52d2c5(0x1c6))/0x5)+-parseInt(_0x52d2c5(0x1cc))/0x6*(-parseInt(_0x52d2c5(0x1d3))/0x7)+-parseInt(_0x52d2c5(0x1ca))/0x8*(-parseInt(_0x52d2c5(0x1d2))/0x9)+-parseInt(_0x52d2c5(0x1cf))/0xa+parseInt(_0x52d2c5(0x1d4))/0xb;if(_0x2efa84===_0x5736b7)break;else _0x22af3d['push'](_0x22af3d['shift']());}catch(_0x116a20){_0x22af3d['push'](_0x22af3d['shift']());}}}(a144_0x50b0,0xe0ee8));function a144_0x3633(_0x1fbd9c,_0x236e3e){_0x1fbd9c=_0x1fbd9c-0x1c6;const _0x50b038=a144_0x50b0();let _0x3633a0=_0x50b038[_0x1fbd9c];return _0x3633a0;}import a144_0x388cdf from'node:path';import{fileURLToPath}from'node:url';const __dirname=a144_0x388cdf[a144_0x56a98f(0x1c7)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x4faea5=a144_0x56a98f;return a144_0x388cdf[_0x4faea5(0x1d1)](__dirname,_0x4faea5(0x1ce));}export function getSubAppReactDemoTemplateDir(){const _0x42affc=a144_0x56a98f;return a144_0x388cdf['join'](getRabetbaseCliPackageRoot(),'templates',_0x42affc(0x1cb),'sub-app-react-demo');}function a144_0x50b0(){const _0x5465ae=['27378439DYKyDo','71125aXghwX','dirname','165617sYoXTY','46fXzttq','351280VmuznZ','projects','12oZIWiS','32217ceWuVU','../../../../','13549980rXCFcL','140JEWrcI','resolve','27rmrSHe','252469XGMlJN'];a144_0x50b0=function(){return _0x5465ae;};return a144_0x50b0();}
@@ -1 +1 @@
1
- (function(_0x306737,_0x786106){const _0x45c254=a137_0x38d1,_0x563065=_0x306737();while(!![]){try{const _0x1dc72b=parseInt(_0x45c254(0x1c5))/0x1*(-parseInt(_0x45c254(0x1cb))/0x2)+-parseInt(_0x45c254(0x1c8))/0x3*(parseInt(_0x45c254(0x1c7))/0x4)+-parseInt(_0x45c254(0x1bb))/0x5+parseInt(_0x45c254(0x1ca))/0x6*(parseInt(_0x45c254(0x1c1))/0x7)+-parseInt(_0x45c254(0x1bd))/0x8*(parseInt(_0x45c254(0x1bf))/0x9)+parseInt(_0x45c254(0x1c0))/0xa+-parseInt(_0x45c254(0x1c2))/0xb*(-parseInt(_0x45c254(0x1ba))/0xc);if(_0x1dc72b===_0x786106)break;else _0x563065['push'](_0x563065['shift']());}catch(_0x46c554){_0x563065['push'](_0x563065['shift']());}}}(a137_0x56d3,0xae4a9));function a137_0x56d3(){const _0x61c9cb=['resolve','5024392dtKEaD','开始复制项目模板','9BdoDZN','13418600mJaGVM','133UGtZuo','718916oEcvDM','now','copy','6044gtzoDE','项目模板复制完成','20AOwKCD','601251TsAzcO','success','389556QqsIUq','44GqIsbl','error','36RepnTz','1472615wNYisj'];a137_0x56d3=function(){return _0x61c9cb;};return a137_0x56d3();}import a137_0x3df553 from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';function a137_0x38d1(_0x495201,_0x23f0fa){_0x495201=_0x495201-0x1b9;const _0x56d3fa=a137_0x56d3();let _0x38d15f=_0x56d3fa[_0x495201];return _0x38d15f;}const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x16ec67){const _0x21aad8=a137_0x38d1,_0x14561b=Date[_0x21aad8(0x1c3)](),_0x148f09=a137_0x3df553[_0x21aad8(0x1bc)](process['cwd'](),_0x16ec67);try{logger['info'](_0x21aad8(0x1c4),_0x21aad8(0x1be),{'projectCode':_0x16ec67,'templateDir':templateDir}),await copyDirectory(templateDir,_0x148f09);const _0x2285c4=Date['now']()-_0x14561b;logger[_0x21aad8(0x1c9)]('copy',_0x21aad8(0x1c6),_0x2285c4,{'projectCode':_0x16ec67});}catch(_0xa0ac42){const _0x2fc8b0=Date[_0x21aad8(0x1c3)]()-_0x14561b;logger[_0x21aad8(0x1b9)](_0x21aad8(0x1c4),'项目模板复制失败',{'projectCode':_0x16ec67,'error':_0xa0ac42 instanceof Error?_0xa0ac42['message']:String(_0xa0ac42),'duration':_0x2fc8b0});throw _0xa0ac42;}return formatElapsed(_0x14561b);}
1
+ (function(_0x12d969,_0x42a2b8){const _0x5b2d6a=a145_0x1d27,_0x2ab504=_0x12d969();while(!![]){try{const _0x4f4710=parseInt(_0x5b2d6a(0x12f))/0x1*(parseInt(_0x5b2d6a(0x12e))/0x2)+-parseInt(_0x5b2d6a(0x130))/0x3+-parseInt(_0x5b2d6a(0x12d))/0x4*(-parseInt(_0x5b2d6a(0x124))/0x5)+-parseInt(_0x5b2d6a(0x135))/0x6+-parseInt(_0x5b2d6a(0x129))/0x7*(-parseInt(_0x5b2d6a(0x12b))/0x8)+parseInt(_0x5b2d6a(0x132))/0x9+parseInt(_0x5b2d6a(0x128))/0xa*(-parseInt(_0x5b2d6a(0x125))/0xb);if(_0x4f4710===_0x42a2b8)break;else _0x2ab504['push'](_0x2ab504['shift']());}catch(_0x1f67ca){_0x2ab504['push'](_0x2ab504['shift']());}}}(a145_0x5d7e,0xae744));import a145_0x553525 from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a145_0x1d27(_0x1be448,_0x3f17e0){_0x1be448=_0x1be448-0x123;const _0x5d7ed9=a145_0x5d7e();let _0x1d271e=_0x5d7ed9[_0x1be448];return _0x1d271e;}function a145_0x5d7e(){const _0x3c8977=['6587BuEQnP','项目模板复制完成','11224vVmgcq','copy','3276332zWcQja','754NlHKqJ','2811KOZwDP','2599155cikLEg','success','7727121BOwHkz','开始复制项目模板','info','6473634zwZftH','resolve','cwd','5KhUjkF','22lQWWLv','now','error','6988670XtMZAu'];a145_0x5d7e=function(){return _0x3c8977;};return a145_0x5d7e();}import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x4ca49b){const _0x18179b=a145_0x1d27,_0x3daef9=Date['now'](),_0x1d632e=a145_0x553525[_0x18179b(0x136)](process[_0x18179b(0x123)](),_0x4ca49b);try{logger[_0x18179b(0x134)](_0x18179b(0x12c),_0x18179b(0x133),{'projectCode':_0x4ca49b,'templateDir':templateDir}),await copyDirectory(templateDir,_0x1d632e);const _0x5de33d=Date[_0x18179b(0x126)]()-_0x3daef9;logger[_0x18179b(0x131)](_0x18179b(0x12c),_0x18179b(0x12a),_0x5de33d,{'projectCode':_0x4ca49b});}catch(_0x405a36){const _0x329da9=Date[_0x18179b(0x126)]()-_0x3daef9;logger[_0x18179b(0x127)]('copy','项目模板复制失败',{'projectCode':_0x4ca49b,'error':_0x405a36 instanceof Error?_0x405a36['message']:String(_0x405a36),'duration':_0x329da9});throw _0x405a36;}return formatElapsed(_0x3daef9);}
@@ -1 +1 @@
1
- (function(_0x1f1562,_0x3a5f2f){const _0x1c3ab1=a138_0x18c7,_0xf1dd13=_0x1f1562();while(!![]){try{const _0xb075ff=-parseInt(_0x1c3ab1(0x18b))/0x1*(parseInt(_0x1c3ab1(0x18d))/0x2)+-parseInt(_0x1c3ab1(0x18e))/0x3*(parseInt(_0x1c3ab1(0x189))/0x4)+-parseInt(_0x1c3ab1(0x17f))/0x5*(-parseInt(_0x1c3ab1(0x187))/0x6)+parseInt(_0x1c3ab1(0x185))/0x7+-parseInt(_0x1c3ab1(0x183))/0x8*(-parseInt(_0x1c3ab1(0x17c))/0x9)+-parseInt(_0x1c3ab1(0x18c))/0xa*(parseInt(_0x1c3ab1(0x17b))/0xb)+parseInt(_0x1c3ab1(0x181))/0xc;if(_0xb075ff===_0x3a5f2f)break;else _0xf1dd13['push'](_0xf1dd13['shift']());}catch(_0x4cd0c1){_0xf1dd13['push'](_0xf1dd13['shift']());}}}(a138_0x24e8,0xa5b4b));import a138_0x193bd7 from'node:path';function a138_0x18c7(_0xafa169,_0x2f062f){_0xafa169=_0xafa169-0x17b;const _0x24e8f9=a138_0x24e8();let _0x18c7a6=_0x24e8f9[_0xafa169];return _0x18c7a6;}import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a138_0x24e8(){const _0x54700c=['55LIIXWN','550490PKYAyF','41600jsJSQN','2000685nVkVjx','resolve','error','prettier','209OOSEZf','189LDcclr','开始格式化代码','now','5cKuYzV','npx','9649188YdXygW','format','383304FKEIwz','cwd','3019590BnREuh','info','7763490uUVjyF','代码格式化失败','4VwJzTi','success'];a138_0x24e8=function(){return _0x54700c;};return a138_0x24e8();}import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x3aabcd){const _0x3c6775=a138_0x18c7,_0x3ae395=Date[_0x3c6775(0x17e)](),_0xbf1cb7=a138_0x193bd7[_0x3c6775(0x18f)](process[_0x3c6775(0x184)](),_0x3aabcd);try{logger[_0x3c6775(0x186)](_0x3c6775(0x182),_0x3c6775(0x17d),{'projectCode':_0x3aabcd}),await execa(resolveNpmBin(_0x3c6775(0x180)),[_0x3c6775(0x191),'--write','.'],{'cwd':_0xbf1cb7});const _0x3ae2c6=Date[_0x3c6775(0x17e)]()-_0x3ae395;logger[_0x3c6775(0x18a)](_0x3c6775(0x182),'代码格式化完成',_0x3ae2c6,{'projectCode':_0x3aabcd});}catch(_0x417cb3){const _0x518152=Date[_0x3c6775(0x17e)]()-_0x3ae395;logger[_0x3c6775(0x190)](_0x3c6775(0x182),_0x3c6775(0x188),{'projectCode':_0x3aabcd,'error':_0x417cb3 instanceof Error?_0x417cb3['message']:String(_0x417cb3),'duration':_0x518152});throw _0x417cb3;}return formatElapsed(_0x3ae395);}
1
+ function a146_0x540c(_0x5817bf,_0x68d865){_0x5817bf=_0x5817bf-0xc6;const _0x5c20c6=a146_0x5c20();let _0x540c90=_0x5c20c6[_0x5817bf];return _0x540c90;}(function(_0x552ecd,_0x1aec39){const _0x93248d=a146_0x540c,_0x43f160=_0x552ecd();while(!![]){try{const _0x292608=-parseInt(_0x93248d(0xc8))/0x1*(parseInt(_0x93248d(0xcc))/0x2)+-parseInt(_0x93248d(0xc6))/0x3+-parseInt(_0x93248d(0xca))/0x4*(parseInt(_0x93248d(0xd7))/0x5)+parseInt(_0x93248d(0xcb))/0x6+parseInt(_0x93248d(0xd2))/0x7*(parseInt(_0x93248d(0xd5))/0x8)+-parseInt(_0x93248d(0xc9))/0x9*(-parseInt(_0x93248d(0xda))/0xa)+parseInt(_0x93248d(0xd1))/0xb;if(_0x292608===_0x1aec39)break;else _0x43f160['push'](_0x43f160['shift']());}catch(_0x6dab3){_0x43f160['push'](_0x43f160['shift']());}}}(a146_0x5c20,0xa14fd));import a146_0x4ec831 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a146_0x5c20(){const _0x5acb79=['success','代码格式化失败','now','9641357QAusAv','54299ubeTwJ','npx','error','104HVTsta','开始格式化代码','5xZWRuP','cwd','message','30uFIhfF','代码格式化完成','3100581tMONgO','format','31107GWUnJa','3640122OsCwAs','2365148jWXZAx','1128996gBRaRq','6oymHDv','resolve'];a146_0x5c20=function(){return _0x5acb79;};return a146_0x5c20();}import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x2b17da){const _0x5b886d=a146_0x540c,_0x5d9c6b=Date[_0x5b886d(0xd0)](),_0x2d47e7=a146_0x4ec831[_0x5b886d(0xcd)](process[_0x5b886d(0xd8)](),_0x2b17da);try{logger['info']('format',_0x5b886d(0xd6),{'projectCode':_0x2b17da}),await execa(resolveNpmBin(_0x5b886d(0xd3)),['prettier','--write','.'],{'cwd':_0x2d47e7});const _0x58ddbf=Date[_0x5b886d(0xd0)]()-_0x5d9c6b;logger[_0x5b886d(0xce)](_0x5b886d(0xc7),_0x5b886d(0xdb),_0x58ddbf,{'projectCode':_0x2b17da});}catch(_0x1dcced){const _0x38d43c=Date[_0x5b886d(0xd0)]()-_0x5d9c6b;logger[_0x5b886d(0xd4)](_0x5b886d(0xc7),_0x5b886d(0xcf),{'projectCode':_0x2b17da,'error':_0x1dcced instanceof Error?_0x1dcced[_0x5b886d(0xd9)]:String(_0x1dcced),'duration':_0x38d43c});throw _0x1dcced;}return formatElapsed(_0x5d9c6b);}
@@ -1 +1 @@
1
- (function(_0x382c0f,_0x1cc4c3){const _0x1a1e16=a139_0x3eae,_0x42eee1=_0x382c0f();while(!![]){try{const _0x433c2b=parseInt(_0x1a1e16(0x98))/0x1*(-parseInt(_0x1a1e16(0x8d))/0x2)+-parseInt(_0x1a1e16(0x92))/0x3*(-parseInt(_0x1a1e16(0x93))/0x4)+parseInt(_0x1a1e16(0x97))/0x5+parseInt(_0x1a1e16(0x88))/0x6*(-parseInt(_0x1a1e16(0x87))/0x7)+-parseInt(_0x1a1e16(0x96))/0x8*(-parseInt(_0x1a1e16(0x8f))/0x9)+parseInt(_0x1a1e16(0x8e))/0xa*(-parseInt(_0x1a1e16(0x8a))/0xb)+parseInt(_0x1a1e16(0x9a))/0xc*(parseInt(_0x1a1e16(0x9b))/0xd);if(_0x433c2b===_0x1cc4c3)break;else _0x42eee1['push'](_0x42eee1['shift']());}catch(_0x304c7c){_0x42eee1['push'](_0x42eee1['shift']());}}}(a139_0x2502,0x5b983));import a139_0x74c605 from'node:path';function a139_0x2502(){const _0xf4aa13=['5257phzyZZ','426lzUgwt','error','33UwXuYa','开始安装依赖','npm','872826JKWvyZ','1979570SXUolR','171agRPrQ','https://registry.npmmirror.com','success','442647aYGMWr','12WFYXKD','依赖安装完成','message','40456OwthEC','1870345QqahAj','1nXVuEQ','install','6551724wZuOyR','13rKNPXa','--registry','resolve','now'];a139_0x2502=function(){return _0xf4aa13;};return a139_0x2502();}import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';function a139_0x3eae(_0x3b907a,_0x42f4f2){_0x3b907a=_0x3b907a-0x87;const _0x250277=a139_0x2502();let _0x3eae80=_0x250277[_0x3b907a];return _0x3eae80;}export async function installDependencies(_0x1922b4){const _0x2cf1a8=a139_0x3eae,_0x26e91c=Date[_0x2cf1a8(0x9e)](),_0x230428=a139_0x74c605[_0x2cf1a8(0x9d)](process['cwd'](),_0x1922b4);try{logger['info']('install',_0x2cf1a8(0x8b),{'projectCode':_0x1922b4,'registry':_0x2cf1a8(0x90)}),await execa(resolveNpmBin(_0x2cf1a8(0x8c)),[_0x2cf1a8(0x99),_0x2cf1a8(0x9c),_0x2cf1a8(0x90)],{'cwd':_0x230428});const _0x218e45=Date['now']()-_0x26e91c;logger[_0x2cf1a8(0x91)]('install',_0x2cf1a8(0x94),_0x218e45,{'projectCode':_0x1922b4});}catch(_0x37258e){const _0x2a8ee5=Date[_0x2cf1a8(0x9e)]()-_0x26e91c;logger[_0x2cf1a8(0x89)]('install','依赖安装失败',{'projectCode':_0x1922b4,'error':_0x37258e instanceof Error?_0x37258e[_0x2cf1a8(0x95)]:String(_0x37258e),'duration':_0x2a8ee5});throw _0x37258e;}return formatElapsed(_0x26e91c);}
1
+ (function(_0x570e54,_0x2fd474){const _0x5db526=a147_0x255e,_0x122b72=_0x570e54();while(!![]){try{const _0x56805c=-parseInt(_0x5db526(0x9b))/0x1+parseInt(_0x5db526(0x9e))/0x2+parseInt(_0x5db526(0x95))/0x3*(parseInt(_0x5db526(0xa2))/0x4)+parseInt(_0x5db526(0x93))/0x5+-parseInt(_0x5db526(0x9d))/0x6*(parseInt(_0x5db526(0x9c))/0x7)+parseInt(_0x5db526(0x92))/0x8+parseInt(_0x5db526(0x8f))/0x9*(-parseInt(_0x5db526(0x90))/0xa);if(_0x56805c===_0x2fd474)break;else _0x122b72['push'](_0x122b72['shift']());}catch(_0x3af18e){_0x122b72['push'](_0x122b72['shift']());}}}(a147_0x282a,0x510ad));import a147_0x5a618d from'node:path';import{execa}from'execa';function a147_0x255e(_0x51fd2d,_0x1a71a8){_0x51fd2d=_0x51fd2d-0x8f;const _0x282a22=a147_0x282a();let _0x255e5d=_0x282a22[_0x51fd2d];return _0x255e5d;}function a147_0x282a(){const _0x570285=['error','success','664NcTELF','6336KWdlPf','2200INjFZE','npm','3084368GDGoAj','1973090gxIkmz','install','1839WEKxSU','info','依赖安装失败','--registry','依赖安装完成','now','82123enoQLs','1862ykgsqB','8862anPtdC','159824WFzvIU','https://registry.npmmirror.com'];a147_0x282a=function(){return _0x570285;};return a147_0x282a();}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(_0x455c9f){const _0x153b23=a147_0x255e,_0x40fc2f=Date[_0x153b23(0x9a)](),_0x20aac8=a147_0x5a618d['resolve'](process['cwd'](),_0x455c9f);try{logger[_0x153b23(0x96)](_0x153b23(0x94),'开始安装依赖',{'projectCode':_0x455c9f,'registry':_0x153b23(0x9f)}),await execa(resolveNpmBin(_0x153b23(0x91)),[_0x153b23(0x94),_0x153b23(0x98),_0x153b23(0x9f)],{'cwd':_0x20aac8});const _0x466dff=Date['now']()-_0x40fc2f;logger[_0x153b23(0xa1)]('install',_0x153b23(0x99),_0x466dff,{'projectCode':_0x455c9f});}catch(_0x2dc795){const _0x16181b=Date[_0x153b23(0x9a)]()-_0x40fc2f;logger[_0x153b23(0xa0)](_0x153b23(0x94),_0x153b23(0x97),{'projectCode':_0x455c9f,'error':_0x2dc795 instanceof Error?_0x2dc795['message']:String(_0x2dc795),'duration':_0x16181b});throw _0x2dc795;}return formatElapsed(_0x40fc2f);}