@lovrabet/rabetbase-cli 2.3.16-beta.5 → 2.3.16-beta.6

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 (279) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/index.js +1 -1
  20. package/lib/commands/app/list.js +1 -1
  21. package/lib/commands/app/members-list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/shared.js +1 -1
  24. package/lib/commands/app-config/delete.js +1 -1
  25. package/lib/commands/app-config/get.js +1 -1
  26. package/lib/commands/app-config/index.js +1 -1
  27. package/lib/commands/app-config/list.js +1 -1
  28. package/lib/commands/app-config/set.js +1 -1
  29. package/lib/commands/app-config/shared.js +1 -1
  30. package/lib/commands/auth/index.js +1 -1
  31. package/lib/commands/bff/create.js +1 -1
  32. package/lib/commands/bff/delete.js +1 -1
  33. package/lib/commands/bff/detail.js +1 -1
  34. package/lib/commands/bff/index.js +1 -1
  35. package/lib/commands/bff/list.js +1 -1
  36. package/lib/commands/bff/pull.js +1 -1
  37. package/lib/commands/bff/push.js +1 -1
  38. package/lib/commands/bff/status.js +1 -1
  39. package/lib/commands/cli-skill/index.js +1 -1
  40. package/lib/commands/cli-update.js +1 -1
  41. package/lib/commands/codegen/index.js +1 -1
  42. package/lib/commands/codegen/sdk.js +1 -1
  43. package/lib/commands/codegen/sql.js +1 -1
  44. package/lib/commands/common/app-registry.js +1 -1
  45. package/lib/commands/common/app-selector.js +1 -1
  46. package/lib/commands/common/async-task.js +1 -1
  47. package/lib/commands/common/dry-run.js +1 -1
  48. package/lib/commands/common/flags.js +1 -1
  49. package/lib/commands/common/local-file.js +1 -1
  50. package/lib/commands/common/validate.js +1 -1
  51. package/lib/commands/config/get.js +1 -1
  52. package/lib/commands/config/index.js +1 -1
  53. package/lib/commands/config/list.js +1 -1
  54. package/lib/commands/config/set.js +1 -1
  55. package/lib/commands/config/shared.js +1 -1
  56. package/lib/commands/data/filter.js +1 -1
  57. package/lib/commands/data/getOne.js +1 -1
  58. package/lib/commands/data/index.js +1 -1
  59. package/lib/commands/data/shared.js +1 -1
  60. package/lib/commands/dataset/business-group-update.js +1 -1
  61. package/lib/commands/dataset/capability.js +1 -1
  62. package/lib/commands/dataset/delete.js +1 -1
  63. package/lib/commands/dataset/detail.js +1 -1
  64. package/lib/commands/dataset/extend-update.js +1 -1
  65. package/lib/commands/dataset/field-update.js +1 -1
  66. package/lib/commands/dataset/generate.js +1 -1
  67. package/lib/commands/dataset/index.js +1 -1
  68. package/lib/commands/dataset/list.js +1 -1
  69. package/lib/commands/dataset/operations.js +1 -1
  70. package/lib/commands/dataset/relation-audit.js +1 -1
  71. package/lib/commands/dataset/relation-create.js +1 -1
  72. package/lib/commands/dataset/relation-delete.js +1 -1
  73. package/lib/commands/dataset/relation-shared.js +1 -1
  74. package/lib/commands/dataset/relation-update.js +1 -1
  75. package/lib/commands/dataset/relations.js +1 -1
  76. package/lib/commands/dataset/rename.js +1 -1
  77. package/lib/commands/dataset/restore.js +1 -1
  78. package/lib/commands/db/analysis-batching.js +1 -1
  79. package/lib/commands/db/analyze-batch-plan.js +1 -1
  80. package/lib/commands/db/analyze-cancel.js +1 -1
  81. package/lib/commands/db/analyze-start.js +1 -1
  82. package/lib/commands/db/analyze-status.js +1 -1
  83. package/lib/commands/db/create.js +1 -1
  84. package/lib/commands/db/delete.js +1 -1
  85. package/lib/commands/db/detail.js +1 -1
  86. package/lib/commands/db/diff.js +1 -1
  87. package/lib/commands/db/index.js +1 -1
  88. package/lib/commands/db/list.js +1 -1
  89. package/lib/commands/db/shared.js +1 -1
  90. package/lib/commands/db/tables.js +1 -1
  91. package/lib/commands/db/test.js +1 -1
  92. package/lib/commands/db/update.js +1 -1
  93. package/lib/commands/doctor.js +1 -1
  94. package/lib/commands/file/index.js +1 -1
  95. package/lib/commands/init/index.js +1 -1
  96. package/lib/commands/issue/index.js +1 -1
  97. package/lib/commands/issue/nudge.js +1 -1
  98. package/lib/commands/issue/report.js +1 -1
  99. package/lib/commands/issue/shared.js +1 -1
  100. package/lib/commands/kb/create.js +1 -1
  101. package/lib/commands/kb/delete.js +1 -1
  102. package/lib/commands/kb/detail.js +1 -1
  103. package/lib/commands/kb/index.js +1 -1
  104. package/lib/commands/kb/list.js +1 -1
  105. package/lib/commands/kb/shared.js +1 -1
  106. package/lib/commands/kb/update.js +1 -1
  107. package/lib/commands/logs/index.js +1 -1
  108. package/lib/commands/menu/asset-update.js +1 -1
  109. package/lib/commands/menu/delete.js +1 -1
  110. package/lib/commands/menu/external-link-create.js +1 -1
  111. package/lib/commands/menu/external-link-update.js +1 -1
  112. package/lib/commands/menu/group-create.js +1 -1
  113. package/lib/commands/menu/group-update.js +1 -1
  114. package/lib/commands/menu/index.js +1 -1
  115. package/lib/commands/menu/list.js +1 -1
  116. package/lib/commands/menu/move.js +1 -1
  117. package/lib/commands/menu/regroup-start.js +1 -1
  118. package/lib/commands/menu/rename.js +1 -1
  119. package/lib/commands/menu/shared/compare-table.js +1 -1
  120. package/lib/commands/menu/shared/delete-plan.js +1 -1
  121. package/lib/commands/menu/shared/facts.js +1 -1
  122. package/lib/commands/menu/shared/index.js +1 -1
  123. package/lib/commands/menu/shared/inquirer.js +1 -1
  124. package/lib/commands/menu/shared/local-pages.js +1 -1
  125. package/lib/commands/menu/shared/logic.js +1 -1
  126. package/lib/commands/menu/shared/mutations.js +1 -1
  127. package/lib/commands/menu/shared/service.js +1 -1
  128. package/lib/commands/menu/shared/sync-core.js +1 -1
  129. package/lib/commands/menu/shared/update-core.js +1 -1
  130. package/lib/commands/menu/shared/valid-url.js +1 -1
  131. package/lib/commands/menu/sync.js +1 -1
  132. package/lib/commands/notification/config-list.js +1 -1
  133. package/lib/commands/notification/index.js +1 -1
  134. package/lib/commands/ocr/index.js +1 -1
  135. package/lib/commands/page/generate-start.js +1 -1
  136. package/lib/commands/page/generate-status.js +1 -1
  137. package/lib/commands/page/index.js +1 -1
  138. package/lib/commands/page/pull.js +1 -1
  139. package/lib/commands/page/push.js +1 -1
  140. package/lib/commands/page/relation-audit.js +1 -1
  141. package/lib/commands/page/restore.js +1 -1
  142. package/lib/commands/page/shared.js +1 -1
  143. package/lib/commands/page/standard-page-status.js +1 -1
  144. package/lib/commands/page/sync.js +1 -1
  145. package/lib/commands/permit/index.js +1 -1
  146. package/lib/commands/permit/page-get.js +1 -1
  147. package/lib/commands/permit/page-set.js +1 -1
  148. package/lib/commands/permit/role-apis-set.js +1 -1
  149. package/lib/commands/permit/role-menus-set.js +1 -1
  150. package/lib/commands/permit/role-menus.js +1 -1
  151. package/lib/commands/permit/shared.js +1 -1
  152. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  153. package/lib/commands/project/create/format-elapsed.js +1 -1
  154. package/lib/commands/project/create/main.js +1 -1
  155. package/lib/commands/project/create/non-interactive.js +1 -1
  156. package/lib/commands/project/create/project-template-path.js +1 -1
  157. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  158. package/lib/commands/project/create/use-format-code.js +1 -1
  159. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  160. package/lib/commands/project/index.js +1 -1
  161. package/lib/commands/project/upgrade.js +1 -1
  162. package/lib/commands/registry.js +1 -1
  163. package/lib/commands/role/create.js +1 -1
  164. package/lib/commands/role/delete.js +1 -1
  165. package/lib/commands/role/detail.js +1 -1
  166. package/lib/commands/role/index.js +1 -1
  167. package/lib/commands/role/list.js +1 -1
  168. package/lib/commands/role/shared.js +1 -1
  169. package/lib/commands/role/update.js +1 -1
  170. package/lib/commands/role/user-add.js +1 -1
  171. package/lib/commands/role/user-remove.js +1 -1
  172. package/lib/commands/role/user-resolve.js +1 -1
  173. package/lib/commands/run/index.js +1 -1
  174. package/lib/commands/schema.js +1 -1
  175. package/lib/commands/sql/create.js +1 -1
  176. package/lib/commands/sql/delete.js +1 -1
  177. package/lib/commands/sql/detail.js +1 -1
  178. package/lib/commands/sql/exec.js +1 -1
  179. package/lib/commands/sql/index.js +1 -1
  180. package/lib/commands/sql/list.js +1 -1
  181. package/lib/commands/sql/pull.js +1 -1
  182. package/lib/commands/sql/push.js +1 -1
  183. package/lib/commands/sql/shared.js +1 -1
  184. package/lib/commands/sql/status.js +1 -1
  185. package/lib/commands/sql/validate.js +1 -1
  186. package/lib/commands/task/index.js +1 -1
  187. package/lib/commands/task/status.js +1 -1
  188. package/lib/commands/tenant/index.js +1 -1
  189. package/lib/commands/tenant/members-list.js +1 -1
  190. package/lib/commands/tenant/shared.js +1 -1
  191. package/lib/commands/workspace/add.js +1 -1
  192. package/lib/commands/workspace/index.js +1 -1
  193. package/lib/commands/workspace/remove.js +1 -1
  194. package/lib/config/schema.js +1 -1
  195. package/lib/constant/cdn.js +1 -1
  196. package/lib/constant/cli.js +1 -1
  197. package/lib/constant/defaults.js +1 -1
  198. package/lib/constant/domain.js +1 -1
  199. package/lib/constant/env.js +1 -1
  200. package/lib/constant/output.js +1 -1
  201. package/lib/constant/paths.js +1 -1
  202. package/lib/constant/risk.js +1 -1
  203. package/lib/context/app-resolver.js +1 -1
  204. package/lib/context/auth-resolver.js +1 -1
  205. package/lib/context/config-loader.js +1 -1
  206. package/lib/context.d.ts +1 -1
  207. package/lib/context.js +1 -1
  208. package/lib/core/alias-resolver.js +1 -1
  209. package/lib/core/api-client.js +1 -1
  210. package/lib/core/bff/config.js +1 -1
  211. package/lib/core/bff/file-system.js +1 -1
  212. package/lib/core/bff/hash.js +1 -1
  213. package/lib/core/bff/lock.js +1 -1
  214. package/lib/core/bff/utils.js +1 -1
  215. package/lib/core/db-resolver.js +1 -1
  216. package/lib/core/page/file-system.js +1 -1
  217. package/lib/core/page/hash.js +1 -1
  218. package/lib/core/page/lock.js +1 -1
  219. package/lib/core/sql-index-auditor.js +1 -1
  220. package/lib/core/sql-sync/config.js +1 -1
  221. package/lib/core/sql-sync/file-system.js +1 -1
  222. package/lib/core/sql-sync/hash.js +1 -1
  223. package/lib/core/sql-sync/lock.js +1 -1
  224. package/lib/core/sql-sync/utils.js +1 -1
  225. package/lib/core/sql-validator.js +1 -1
  226. package/lib/errors.js +1 -1
  227. package/lib/framework/build-all-flags.js +1 -1
  228. package/lib/framework/error-output.js +1 -1
  229. package/lib/framework/explicit-yes.js +1 -1
  230. package/lib/framework/flags.js +1 -1
  231. package/lib/framework/help.js +1 -1
  232. package/lib/framework/index.js +1 -1
  233. package/lib/framework/output.js +1 -1
  234. package/lib/framework/response.js +1 -1
  235. package/lib/framework/runner-alias.js +1 -1
  236. package/lib/framework/runner.js +1 -1
  237. package/lib/framework/schema-export.js +1 -1
  238. package/lib/framework/types.js +1 -1
  239. package/lib/generated/build-info.d.ts +4 -4
  240. package/lib/generated/build-info.js +1 -1
  241. package/lib/help.js +1 -1
  242. package/lib/runtime/confirmation.js +1 -1
  243. package/lib/runtime/event.js +1 -1
  244. package/lib/runtime/index.js +1 -1
  245. package/lib/runtime/queue.js +1 -1
  246. package/lib/runtime/resolve.js +1 -1
  247. package/lib/skills/main.js +1 -1
  248. package/lib/skills/npx-skills-add.js +1 -1
  249. package/lib/skills/skill-presence.js +1 -1
  250. package/lib/telemetry/cli-command-trace.js +1 -1
  251. package/lib/telemetry/cli-help-trace.js +1 -1
  252. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  253. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  254. package/lib/telemetry/send-cli-trace-log.js +1 -1
  255. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  256. package/lib/utils/ai_config.js +1 -1
  257. package/lib/utils/apply-jq-filter.js +1 -1
  258. package/lib/utils/cdn-config.js +1 -1
  259. package/lib/utils/check-sdk-version.js +1 -1
  260. package/lib/utils/cli-version-check.js +1 -1
  261. package/lib/utils/cli-version-policy.js +1 -1
  262. package/lib/utils/config.js +1 -1
  263. package/lib/utils/copy-directory.js +1 -1
  264. package/lib/utils/entity-with-id.js +1 -1
  265. package/lib/utils/file-utils.js +1 -1
  266. package/lib/utils/guides-cdn.js +1 -1
  267. package/lib/utils/http-client.js +1 -1
  268. package/lib/utils/is-non-interactive.js +1 -1
  269. package/lib/utils/logger.js +1 -1
  270. package/lib/utils/params.js +1 -1
  271. package/lib/utils/platform.js +1 -1
  272. package/lib/utils/rules-cdn.js +1 -1
  273. package/lib/utils/sleep.js +1 -1
  274. package/lib/utils/template-replacer.js +1 -1
  275. package/lib/utils/update-notice.js +1 -1
  276. package/lib/utils/version.js +1 -1
  277. package/lib/utils/with-active-cookie.js +1 -1
  278. package/lib/utils/write-cli-side-channel.js +1 -1
  279. package/package.json +1 -1
@@ -1 +1 @@
1
- const a143_0x2ba80d=a143_0x20f4;(function(_0x533b97,_0x1d7ec4){const _0x3e9c1d=a143_0x20f4,_0x253582=_0x533b97();while(!![]){try{const _0x3546ee=parseInt(_0x3e9c1d(0x1a4))/0x1+-parseInt(_0x3e9c1d(0x1aa))/0x2+parseInt(_0x3e9c1d(0x19d))/0x3*(-parseInt(_0x3e9c1d(0x1a6))/0x4)+-parseInt(_0x3e9c1d(0x1b8))/0x5+-parseInt(_0x3e9c1d(0x1b9))/0x6*(-parseInt(_0x3e9c1d(0x1b3))/0x7)+-parseInt(_0x3e9c1d(0x19b))/0x8*(-parseInt(_0x3e9c1d(0x1a3))/0x9)+-parseInt(_0x3e9c1d(0x1a8))/0xa;if(_0x3546ee===_0x1d7ec4)break;else _0x253582['push'](_0x253582['shift']());}catch(_0x14e0c8){_0x253582['push'](_0x253582['shift']());}}}(a143_0x567d,0xa8cf1));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessStandardPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadStandardPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';export const pageStandardPageStatus={'service':a143_0x2ba80d(0x1a5),'command':a143_0x2ba80d(0x1ad),'description':a143_0x2ba80d(0x19f),'risk':a143_0x2ba80d(0x1b6),'defaultOutputFormat':a143_0x2ba80d(0x1af),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a143_0x2ba80d(0x1a1),'type':a143_0x2ba80d(0x1a7),'description':a143_0x2ba80d(0x19c)}],async 'validate'(_0x1534e4){validateDatasetSelector(_0x1534e4);},async 'dryRun'(_0x2de42f){const _0x5f2d33=a143_0x2ba80d,_0x43ea1b=await loadDatasetDetailForPage(_0x2de42f);return{'method':_0x5f2d33(0x1a2),'url':_0x5f2d33(0x1ab)+_0x43ea1b[_0x5f2d33(0x1b2)]+_0x5f2d33(0x1a0)+encodeURIComponent(_0x2de42f[_0x5f2d33(0x1ae)]),'description':serializeDryRunDescription({'dataset':{'id':_0x43ea1b['id'],'code':_0x43ea1b[_0x5f2d33(0x1b2)],'name':_0x43ea1b[_0x5f2d33(0x19e)]},'action':_0x5f2d33(0x1b1)})};},async 'execute'(_0x3a5a4d){const _0x39d3d0=a143_0x2ba80d,_0x556c49=await loadDatasetDetailForPage(_0x3a5a4d),_0x31f39f=await loadStandardPageStatusForGenerate(_0x3a5a4d,_0x556c49['code']),_0x34cb49=getUndeletedRelatedPages(_0x556c49),_0x1bfbc8=assessStandardPageState(_0x556c49[_0x39d3d0(0x1b2)],_0x31f39f,{'fallbackUndeletedPages':_0x34cb49});return{'ok':!![],'data':{'datasetCode':_0x556c49[_0x39d3d0(0x1b2)],'precheckSource':_0x31f39f?.['source']??_0x39d3d0(0x1a9),'status':_0x1bfbc8[_0x39d3d0(0x1b0)],'manualResolutionRequired':_0x1bfbc8[_0x39d3d0(0x1b7)],'nextAction':_0x1bfbc8[_0x39d3d0(0x1ac)],'standardPageStatus':_0x31f39f,'relatedPages':{'total':_0x556c49[_0x39d3d0(0x1b5)][_0x39d3d0(0x1b4)],'undeletedCount':_0x34cb49[_0x39d3d0(0x1b4)]}}};}};function a143_0x20f4(_0x53803e,_0x4476b8){_0x53803e=_0x53803e-0x19b;const _0x567dd8=a143_0x567d();let _0x20f401=_0x567dd8[_0x53803e];return _0x20f401;}function a143_0x567d(){const _0x97e4e9=['14854Asmbll','length','relatedPages','read','manualResolutionRequired','739315TQInii','3738ppoYbB','8bPUmbz','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','1149fMoLhG','name','Query\x20Smart\x20List\x20Page\x20facts\x20for\x20a\x20dataset','/standard-page-status?appCode=','alias','GET','9778419zdBixh','255285yBPREC','page','7204KIJPBG','string','1910320ILOfgP','related-pages-fallback','1887326DlIMZd','/smartapi/lovrabet/dataset/','nextAction','standard-page-status','appCode','compress','status','query-standard-page-status','code'];a143_0x567d=function(){return _0x97e4e9;};return a143_0x567d();}
1
+ function a143_0x16ab(_0x5f4960,_0x273273){_0x5f4960=_0x5f4960-0x115;const _0x1b4a5d=a143_0x1b4a();let _0x16ab0f=_0x1b4a5d[_0x5f4960];return _0x16ab0f;}function a143_0x1b4a(){const _0x1ca50a=['38843409wDHjGh','/smartapi/lovrabet/dataset/','14CpDTYN','read','standard-page-status','code','relatedPages','3735528ByPsxZ','manualResolutionRequired','length','name','related-pages-fallback','2047504Qksnpw','10858275IVFqOc','nextAction','2SbLzhG','alias','297483TQKSro','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','Query\x20Smart\x20List\x20Page\x20facts\x20for\x20a\x20dataset','10ymMRjW','1120bBwDnG','status','1002219RpptVC','appCode','2225EhtdEA'];a143_0x1b4a=function(){return _0x1ca50a;};return a143_0x1b4a();}const a143_0x4c586d=a143_0x16ab;(function(_0x550e68,_0x5c56eb){const _0x434147=a143_0x16ab,_0xccd9b0=_0x550e68();while(!![]){try{const _0x3587d3=-parseInt(_0x434147(0x116))/0x1+parseInt(_0x434147(0x12e))/0x2*(parseInt(_0x434147(0x11c))/0x3)+-parseInt(_0x434147(0x11a))/0x4*(parseInt(_0x434147(0x11e))/0x5)+parseInt(_0x434147(0x126))/0x6*(-parseInt(_0x434147(0x121))/0x7)+-parseInt(_0x434147(0x12b))/0x8+-parseInt(_0x434147(0x12c))/0x9+-parseInt(_0x434147(0x119))/0xa*(-parseInt(_0x434147(0x11f))/0xb);if(_0x3587d3===_0x5c56eb)break;else _0xccd9b0['push'](_0xccd9b0['shift']());}catch(_0x679acc){_0xccd9b0['push'](_0xccd9b0['shift']());}}}(a143_0x1b4a,0xb3984));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessStandardPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadStandardPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';export const pageStandardPageStatus={'service':'page','command':a143_0x4c586d(0x123),'description':a143_0x4c586d(0x118),'risk':a143_0x4c586d(0x122),'defaultOutputFormat':'compress','flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a143_0x4c586d(0x115),'type':'string','description':a143_0x4c586d(0x117)}],async 'validate'(_0x1d3294){validateDatasetSelector(_0x1d3294);},async 'dryRun'(_0x18db9){const _0xd30033=a143_0x4c586d,_0x108430=await loadDatasetDetailForPage(_0x18db9);return{'method':'GET','url':_0xd30033(0x120)+_0x108430['code']+'/standard-page-status?appCode='+encodeURIComponent(_0x18db9[_0xd30033(0x11d)]),'description':serializeDryRunDescription({'dataset':{'id':_0x108430['id'],'code':_0x108430[_0xd30033(0x124)],'name':_0x108430[_0xd30033(0x129)]},'action':'query-standard-page-status'})};},async 'execute'(_0x120149){const _0x5c8541=a143_0x4c586d,_0x13367b=await loadDatasetDetailForPage(_0x120149),_0x42da68=await loadStandardPageStatusForGenerate(_0x120149,_0x13367b[_0x5c8541(0x124)]),_0x10f9f2=getUndeletedRelatedPages(_0x13367b),_0x568e34=assessStandardPageState(_0x13367b[_0x5c8541(0x124)],_0x42da68,{'fallbackUndeletedPages':_0x10f9f2});return{'ok':!![],'data':{'datasetCode':_0x13367b[_0x5c8541(0x124)],'precheckSource':_0x42da68?.['source']??_0x5c8541(0x12a),'status':_0x568e34[_0x5c8541(0x11b)],'manualResolutionRequired':_0x568e34[_0x5c8541(0x127)],'nextAction':_0x568e34[_0x5c8541(0x12d)],'standardPageStatus':_0x42da68,'relatedPages':{'total':_0x13367b[_0x5c8541(0x125)][_0x5c8541(0x128)],'undeletedCount':_0x10f9f2[_0x5c8541(0x128)]}}};}};
@@ -1 +1 @@
1
- const a144_0x2e6fbc=a144_0x25f3;(function(_0x5bb77b,_0x626b5a){const _0x12adf5=a144_0x25f3,_0x232c26=_0x5bb77b();while(!![]){try{const _0x39c670=parseInt(_0x12adf5(0xcf))/0x1*(-parseInt(_0x12adf5(0xeb))/0x2)+-parseInt(_0x12adf5(0xdc))/0x3*(-parseInt(_0x12adf5(0xe4))/0x4)+parseInt(_0x12adf5(0xd8))/0x5*(-parseInt(_0x12adf5(0xe3))/0x6)+parseInt(_0x12adf5(0xdd))/0x7*(parseInt(_0x12adf5(0xe2))/0x8)+parseInt(_0x12adf5(0xe9))/0x9*(-parseInt(_0x12adf5(0xd6))/0xa)+parseInt(_0x12adf5(0xda))/0xb*(-parseInt(_0x12adf5(0xe6))/0xc)+-parseInt(_0x12adf5(0xd1))/0xd*(-parseInt(_0x12adf5(0xea))/0xe);if(_0x39c670===_0x626b5a)break;else _0x232c26['push'](_0x232c26['shift']());}catch(_0x4ed6e6){_0x232c26['push'](_0x232c26['shift']());}}}(a144_0x2c1d,0x84230));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{loadDatasetDetailForPage,prepareDatasetAction,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';function a144_0x25f3(_0x5b9daa,_0x5ce636){_0x5b9daa=_0x5b9daa-0xcb;const _0x2c1dd6=a144_0x2c1d();let _0x25f393=_0x2c1dd6[_0x5b9daa];return _0x25f393;}import{syncStandardPages}from'../../core/api-client.js';export const pageSync={'service':a144_0x2e6fbc(0xdb),'command':a144_0x2e6fbc(0xd5),'description':a144_0x2e6fbc(0xe5),'risk':a144_0x2e6fbc(0xcb),'defaultOutputFormat':a144_0x2e6fbc(0xe7),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':'alias','type':'string','description':a144_0x2e6fbc(0xcd)}],async 'validate'(_0x526025){validateDatasetSelector(_0x526025);},async 'dryRun'(_0x3d4bfd){const _0xc3773c=a144_0x2e6fbc,_0x55a7e1=await prepare(_0x3d4bfd);return{'method':_0xc3773c(0xd0),'url':_0xc3773c(0xd2)+_0x55a7e1[_0xc3773c(0xd3)]['code']+'/sync-to-pages','body':{'appCode':_0x3d4bfd[_0xc3773c(0xce)]},'description':serializeDryRunDescription({'dataset':{'id':_0x55a7e1['dataset']['id'],'code':_0x55a7e1['dataset']['code'],'name':_0x55a7e1['dataset'][_0xc3773c(0xec)],'fieldCount':_0x55a7e1[_0xc3773c(0xd3)][_0xc3773c(0xde)]},'relatedPages':{'total':_0x55a7e1[_0xc3773c(0xd3)][_0xc3773c(0xd7)][_0xc3773c(0xdf)],'undeletedCount':_0x55a7e1[_0xc3773c(0xd4)][_0xc3773c(0xdf)]},'action':_0xc3773c(0xd5),'reason':_0x55a7e1[_0xc3773c(0xd4)][_0xc3773c(0xdf)]+_0xc3773c(0xd9)})};},async 'execute'(_0x1f0340){const _0x541e04=a144_0x2e6fbc,_0x2e7edf=await prepare(_0x1f0340),_0x3391a3=await syncStandardPages(_0x1f0340[_0x541e04(0xce)],_0x2e7edf['dataset'][_0x541e04(0xe1)]),_0x2394c5=Array['isArray'](_0x3391a3[_0x541e04(0xcc)])&&_0x3391a3['failedPages'][_0x541e04(0xdf)]>0x0,_0x335a32=_0x2394c5?_0x541e04(0xe0):_0x541e04(0xe8);return{'ok':!![],'message':_0x335a32,'data':{'datasetCode':_0x2e7edf[_0x541e04(0xd3)][_0x541e04(0xe1)],..._0x3391a3}};}};async function prepare(_0x49d5b1){const _0x2800b9=a144_0x2e6fbc,_0x3f531e=await loadDatasetDetailForPage(_0x49d5b1);return prepareDatasetAction(_0x3f531e,_0x2800b9(0xd5));}function a144_0x2c1d(){const _0x32335=['19596430EeDouQ','1529986nUJvyI','name','write','failedPages','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','appCode','1covuYj','POST','13JNVCKN','/smartapi/lovrabet/dataset/','dataset','undeletedPages','sync','140DksYKg','relatedPages','12695OfjnvX','\x20undeleted\x20related\x20page(s)\x20found','2583823edKnet','page','3thxHBB','8995SOxkTS','fieldCount','length','部分页面同步失败','code','2152YbVERd','258rTxQtK','3217552UuPGYo','Sync\x20dataset\x20changes\x20to\x20related\x20Smart\x20List\x20Pages','48BuFjPU','compress','同步成功','125244VIIeLC'];a144_0x2c1d=function(){return _0x32335;};return a144_0x2c1d();}
1
+ const a144_0x1b53d3=a144_0x4220;(function(_0x2fe7b7,_0x2710e2){const _0x31f83=a144_0x4220,_0x18dd20=_0x2fe7b7();while(!![]){try{const _0x2e28a2=-parseInt(_0x31f83(0xef))/0x1+-parseInt(_0x31f83(0xf5))/0x2*(parseInt(_0x31f83(0xe7))/0x3)+parseInt(_0x31f83(0xf6))/0x4*(-parseInt(_0x31f83(0xfa))/0x5)+parseInt(_0x31f83(0xf3))/0x6+parseInt(_0x31f83(0xf8))/0x7+-parseInt(_0x31f83(0xf9))/0x8+parseInt(_0x31f83(0xf4))/0x9;if(_0x2e28a2===_0x2710e2)break;else _0x18dd20['push'](_0x18dd20['shift']());}catch(_0x51861f){_0x18dd20['push'](_0x18dd20['shift']());}}}(a144_0x4ec4,0x451a4));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a144_0x4220(_0x1474b9,_0x1793a1){_0x1474b9=_0x1474b9-0xe3;const _0x4ec4cb=a144_0x4ec4();let _0x422017=_0x4ec4cb[_0x1474b9];return _0x422017;}import{loadDatasetDetailForPage,prepareDatasetAction,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';function a144_0x4ec4(){const _0x436897=['1327320NaGvgc','5CNvhoz','POST','/sync-to-pages','write','Sync\x20dataset\x20changes\x20to\x20related\x20Smart\x20List\x20Pages','/smartapi/lovrabet/dataset/','sync','page','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','appCode','name','517785PizMfR','alias','isArray','length','code','dataset','部分页面同步失败','undeletedPages','445228AhBptE','同步成功','string','compress','1832436jCkGmD','6479406VhZYpf','2JQtYkB','257820qPBNkL','failedPages','741279hNkonH'];a144_0x4ec4=function(){return _0x436897;};return a144_0x4ec4();}import{syncStandardPages}from'../../core/api-client.js';export const pageSync={'service':a144_0x1b53d3(0xe3),'command':a144_0x1b53d3(0x100),'description':a144_0x1b53d3(0xfe),'risk':a144_0x1b53d3(0xfd),'defaultOutputFormat':a144_0x1b53d3(0xf2),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a144_0x1b53d3(0xe8),'type':a144_0x1b53d3(0xf1),'description':a144_0x1b53d3(0xe4)}],async 'validate'(_0x3064b9){validateDatasetSelector(_0x3064b9);},async 'dryRun'(_0x54e84f){const _0x101a5b=a144_0x1b53d3,_0x334015=await prepare(_0x54e84f);return{'method':_0x101a5b(0xfb),'url':_0x101a5b(0xff)+_0x334015[_0x101a5b(0xec)][_0x101a5b(0xeb)]+_0x101a5b(0xfc),'body':{'appCode':_0x54e84f[_0x101a5b(0xe5)]},'description':serializeDryRunDescription({'dataset':{'id':_0x334015['dataset']['id'],'code':_0x334015[_0x101a5b(0xec)][_0x101a5b(0xeb)],'name':_0x334015[_0x101a5b(0xec)][_0x101a5b(0xe6)],'fieldCount':_0x334015[_0x101a5b(0xec)]['fieldCount']},'relatedPages':{'total':_0x334015[_0x101a5b(0xec)]['relatedPages'][_0x101a5b(0xea)],'undeletedCount':_0x334015[_0x101a5b(0xee)]['length']},'action':_0x101a5b(0x100),'reason':_0x334015[_0x101a5b(0xee)][_0x101a5b(0xea)]+'\x20undeleted\x20related\x20page(s)\x20found'})};},async 'execute'(_0x4ed9d6){const _0x3c4b3b=a144_0x1b53d3,_0x124a69=await prepare(_0x4ed9d6),_0x1433f6=await syncStandardPages(_0x4ed9d6[_0x3c4b3b(0xe5)],_0x124a69[_0x3c4b3b(0xec)][_0x3c4b3b(0xeb)]),_0x1819bc=Array[_0x3c4b3b(0xe9)](_0x1433f6[_0x3c4b3b(0xf7)])&&_0x1433f6[_0x3c4b3b(0xf7)]['length']>0x0,_0x41b974=_0x1819bc?_0x3c4b3b(0xed):_0x3c4b3b(0xf0);return{'ok':!![],'message':_0x41b974,'data':{'datasetCode':_0x124a69['dataset'][_0x3c4b3b(0xeb)],..._0x1433f6}};}};async function prepare(_0x2b3c21){const _0x5ae024=await loadDatasetDetailForPage(_0x2b3c21);return prepareDatasetAction(_0x5ae024,'sync');}
@@ -1 +1 @@
1
- function a145_0x5664(_0x3f0f75,_0x696694){_0x3f0f75=_0x3f0f75-0x14c;const _0x521516=a145_0x5215();let _0x56645f=_0x521516[_0x3f0f75];return _0x56645f;}function a145_0x5215(){const _0x306e9e=['11edAlZN','319571PRDIaS','3673520lTMWnh','6ckaFzf','4188768HfYLUR','1734USvnkQ','206yyHLCJ','48mhBvwC','467310TmfEnu','183272cWBQzv','4803129nUQCEy'];a145_0x5215=function(){return _0x306e9e;};return a145_0x5215();}(function(_0x5efd08,_0x5a2990){const _0xa00738=a145_0x5664,_0xac1c70=_0x5efd08();while(!![]){try{const _0x297034=parseInt(_0xa00738(0x14c))/0x1*(-parseInt(_0xa00738(0x14d))/0x2)+parseInt(_0xa00738(0x155))/0x3*(-parseInt(_0xa00738(0x150))/0x4)+-parseInt(_0xa00738(0x154))/0x5+-parseInt(_0xa00738(0x14e))/0x6*(-parseInt(_0xa00738(0x153))/0x7)+parseInt(_0xa00738(0x156))/0x8+parseInt(_0xa00738(0x151))/0x9+-parseInt(_0xa00738(0x14f))/0xa*(parseInt(_0xa00738(0x152))/0xb);if(_0x297034===_0x5a2990)break;else _0xac1c70['push'](_0xac1c70['shift']());}catch(_0x4b82c3){_0xac1c70['push'](_0xac1c70['shift']());}}}(a145_0x5215,0x5a88c));import{permitPageGet}from'../../commands/permit/page-get.js';import{permitPageSet}from'../../commands/permit/page-set.js';import{permitRoleMenus}from'../../commands/permit/role-menus.js';import{permitRoleMenusSet}from'../../commands/permit/role-menus-set.js';import{permitRoleApisSet}from'../../commands/permit/role-apis-set.js';export const permitDefinitions=[permitPageGet,permitPageSet,permitRoleMenus,permitRoleMenusSet,permitRoleApisSet];
1
+ (function(_0x4278f7,_0x9090ac){const _0x4120bf=a145_0x1998,_0x4deb86=_0x4278f7();while(!![]){try{const _0x18e35e=-parseInt(_0x4120bf(0x14a))/0x1+parseInt(_0x4120bf(0x14d))/0x2+-parseInt(_0x4120bf(0x149))/0x3*(-parseInt(_0x4120bf(0x147))/0x4)+-parseInt(_0x4120bf(0x14c))/0x5+parseInt(_0x4120bf(0x14f))/0x6*(parseInt(_0x4120bf(0x14b))/0x7)+-parseInt(_0x4120bf(0x14e))/0x8+parseInt(_0x4120bf(0x150))/0x9*(-parseInt(_0x4120bf(0x148))/0xa);if(_0x18e35e===_0x9090ac)break;else _0x4deb86['push'](_0x4deb86['shift']());}catch(_0x3d1bdb){_0x4deb86['push'](_0x4deb86['shift']());}}}(a145_0x5272,0x4d4f5));import{permitPageGet}from'../../commands/permit/page-get.js';function a145_0x1998(_0x58998f,_0x7d6000){_0x58998f=_0x58998f-0x147;const _0x527251=a145_0x5272();let _0x1998a6=_0x527251[_0x58998f];return _0x1998a6;}function a145_0x5272(){const _0x3c358b=['10QMeAVj','1426947NNRXDR','195391qHnRce','28PLXSeR','718560BHQBpi','291486uvNTvh','3314256KDyDiO','686928ibWmTL','83682XmnByY','4QHagdy'];a145_0x5272=function(){return _0x3c358b;};return a145_0x5272();}import{permitPageSet}from'../../commands/permit/page-set.js';import{permitRoleMenus}from'../../commands/permit/role-menus.js';import{permitRoleMenusSet}from'../../commands/permit/role-menus-set.js';import{permitRoleApisSet}from'../../commands/permit/role-apis-set.js';export const permitDefinitions=[permitPageGet,permitPageSet,permitRoleMenus,permitRoleMenusSet,permitRoleApisSet];
@@ -1 +1 @@
1
- const a146_0x4a2c88=a146_0x3931;(function(_0x94135b,_0x4edd1b){const _0x38a499=a146_0x3931,_0x7076e5=_0x94135b();while(!![]){try{const _0x72fa10=parseInt(_0x38a499(0xda))/0x1+parseInt(_0x38a499(0xd8))/0x2+parseInt(_0x38a499(0xd7))/0x3+parseInt(_0x38a499(0xd6))/0x4*(-parseInt(_0x38a499(0xd1))/0x5)+parseInt(_0x38a499(0xcd))/0x6+parseInt(_0x38a499(0xdb))/0x7*(-parseInt(_0x38a499(0xd0))/0x8)+parseInt(_0x38a499(0xd3))/0x9;if(_0x72fa10===_0x4edd1b)break;else _0x7076e5['push'](_0x7076e5['shift']());}catch(_0x3bf1cc){_0x7076e5['push'](_0x7076e5['shift']());}}}(a146_0xaceb,0x9c8db));function a146_0x3931(_0x3b0359,_0x570e29){_0x3b0359=_0x3b0359-0xcd;const _0xaceb61=a146_0xaceb();let _0x39312f=_0xaceb61[_0x3b0359];return _0x39312f;}import{getPagePermit}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{MENU_ID_FLAG,projectPagePermit}from'../../commands/permit/shared.js';export const permitPageGet={'service':a146_0x4a2c88(0xd4),'command':a146_0x4a2c88(0xd2),'description':a146_0x4a2c88(0xce),'risk':'read','flags':[MENU_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x4198dd){const _0x401857=a146_0x4a2c88,_0x13ea12=_0x4198dd[_0x401857(0xd5)](_0x401857(0xd9)),_0x59b72f=await getPagePermit(_0x13ea12);return{'ok':!![],'data':{'page':projectPagePermit(_0x59b72f)},'message':_0x401857(0xcf)+_0x13ea12};}};function a146_0xaceb(){const _0x42ec72=['20788fFqtCx','1035390lNKQGg','302066HyJKbI','menu-id','301413QanUur','28lCTIMe','7441200KTrQxC','Show\x20the\x20page\x20permission\x20snapshot\x20for\x20a\x20menu','Page\x20permit\x20for\x20menu\x20','506512IIFlbA','1195eXTdxK','page-get','889254qglPEC','permit','num'];a146_0xaceb=function(){return _0x42ec72;};return a146_0xaceb();}
1
+ const a146_0x218c14=a146_0x348f;(function(_0x663559,_0x184a81){const _0x1f7ff1=a146_0x348f,_0x1263de=_0x663559();while(!![]){try{const _0x3410d3=parseInt(_0x1f7ff1(0xc8))/0x1+parseInt(_0x1f7ff1(0xc7))/0x2+-parseInt(_0x1f7ff1(0xce))/0x3+parseInt(_0x1f7ff1(0xc9))/0x4*(-parseInt(_0x1f7ff1(0xcc))/0x5)+-parseInt(_0x1f7ff1(0xc2))/0x6*(parseInt(_0x1f7ff1(0xcb))/0x7)+-parseInt(_0x1f7ff1(0xc3))/0x8+parseInt(_0x1f7ff1(0xc5))/0x9;if(_0x3410d3===_0x184a81)break;else _0x1263de['push'](_0x1263de['shift']());}catch(_0x7e8761){_0x1263de['push'](_0x1263de['shift']());}}}(a146_0x75f1,0xcaafa));import{getPagePermit}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a146_0x348f(_0x374d10,_0x13ebac){_0x374d10=_0x374d10-0xc2;const _0x75f15c=a146_0x75f1();let _0x348f99=_0x75f15c[_0x374d10];return _0x348f99;}function a146_0x75f1(){const _0x54a1eb=['permit','522564qtNrhC','1526766rmSmYJ','4252FKYepE','num','7QObFfU','1645WUVHgs','menu-id','2762118ogNnkj','Show\x20the\x20page\x20permission\x20snapshot\x20for\x20a\x20menu','page-get','8022648PnSBAi','231296URqXuh','read','15107463UwlyvN'];a146_0x75f1=function(){return _0x54a1eb;};return a146_0x75f1();}import{MENU_ID_FLAG,projectPagePermit}from'../../commands/permit/shared.js';export const permitPageGet={'service':a146_0x218c14(0xc6),'command':a146_0x218c14(0xd0),'description':a146_0x218c14(0xcf),'risk':a146_0x218c14(0xc4),'flags':[MENU_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x132876){const _0x594e81=a146_0x218c14,_0x23b3e9=_0x132876[_0x594e81(0xca)](_0x594e81(0xcd)),_0x2dab94=await getPagePermit(_0x23b3e9);return{'ok':!![],'data':{'page':projectPagePermit(_0x2dab94)},'message':'Page\x20permit\x20for\x20menu\x20'+_0x23b3e9};}};
@@ -1 +1 @@
1
- const a147_0x1451b0=a147_0x41af;(function(_0x5c24e4,_0x2b1d16){const _0x13c898=a147_0x41af,_0x3d527f=_0x5c24e4();while(!![]){try{const _0x215678=parseInt(_0x13c898(0x116))/0x1*(-parseInt(_0x13c898(0x117))/0x2)+-parseInt(_0x13c898(0x10c))/0x3+-parseInt(_0x13c898(0x105))/0x4+-parseInt(_0x13c898(0x10d))/0x5*(-parseInt(_0x13c898(0x119))/0x6)+parseInt(_0x13c898(0x112))/0x7*(-parseInt(_0x13c898(0x109))/0x8)+-parseInt(_0x13c898(0x10b))/0x9+parseInt(_0x13c898(0x10a))/0xa;if(_0x215678===_0x2b1d16)break;else _0x3d527f['push'](_0x3d527f['shift']());}catch(_0x7eb74c){_0x3d527f['push'](_0x3d527f['shift']());}}}(a147_0x2d52,0xdb5cf));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=a147_0x1451b0(0x11a);function a147_0x2d52(){const _0x3bc40a=['flag','length','key','4648gYgvlC','57815270FJoDmQ','7861986Vulrvs','4585965rRlOYx','181565blJPME','Only\x20slots\x20present\x20in\x20`permit\x20page-get`\x20can\x20be\x20set.','\x22\x20permission\x20slot\x20(','Nothing\x20to\x20set.','Updated\x20page\x20permit\x20for\x20menu\x20','18697gSGQnh','rolePermit','POST','Set\x20page\x20permissions\x20for\x20a\x20menu\x20(menu/create/update/delete/detail/export/row\x20roles);\x20requires\x20--yes','2vrNZEF','158196ZzmqcX','high-risk-write','36UUWviF','/smartapi/permit/page/save','num','validation','Pass\x20at\x20least\x20one\x20role,\x20or\x20omit\x20the\x20flag.\x20Clearing\x20permissions\x20is\x20not\x20supported\x20by\x20this\x20command.','allowSelf','permit','menu-id','This\x20page\x20has\x20no\x20\x22','join','menuId','Pass\x20at\x20least\x20one\x20of:\x20','appCode','label','page-set','map','3954552NOgMBD'];a147_0x2d52=function(){return _0x3bc40a;};return a147_0x2d52();}function a147_0x41af(_0x3d445c,_0x59b2c0){_0x3d445c=_0x3d445c-0xfb;const _0x2d5221=a147_0x2d52();let _0x41af4c=_0x2d5221[_0x3d445c];return _0x41af4c;}function collectRequestedSlots(_0x535d3f){const _0x2b94f6=a147_0x1451b0,_0x124b52=[];for(const _0x2880d of PAGE_SLOT_SPECS){const _0x168664=_0x535d3f[_0x2b94f6(0x106)](_0x2880d[_0x2b94f6(0x106)]);if(_0x168664===undefined||_0x168664===null)continue;const _0x5b63ed=splitList(String(_0x168664));if(_0x5b63ed[_0x2b94f6(0x107)]===0x0)throw CliErrors[_0x2b94f6(0x11c)]('--'+_0x2880d[_0x2b94f6(0x106)]+'\x20cannot\x20be\x20empty.',_0x2b94f6(0x11d));_0x124b52['push']({'spec':_0x2880d,'refs':_0x5b63ed});}return _0x124b52;}async function buildPlan(_0x4015b7,_0x304c07){const _0x566fc3=a147_0x1451b0,_0x173cc9=_0x4015b7[_0x566fc3(0x11b)](_0x566fc3(0xfc)),_0x66ce44=collectRequestedSlots(_0x4015b7);if(_0x66ce44[_0x566fc3(0x107)]===0x0)throw CliErrors[_0x566fc3(0x11c)]('Nothing\x20to\x20set.','Pass\x20at\x20least\x20one\x20of:\x20'+PAGE_SLOT_SPECS[_0x566fc3(0x104)](_0x4d6283=>'--'+_0x4d6283[_0x566fc3(0x106)])[_0x566fc3(0xfe)](',\x20')+'.');const _0x36fe9d=await getPagePermit(_0x173cc9),_0x17481f={},_0xa6c695={},_0x50dcfc=[];for(const {spec:_0x1fd9ae,refs:_0x39a70f}of _0x66ce44){const _0x4735b8=_0x36fe9d[_0x1fd9ae[_0x566fc3(0x108)]];if(!_0x4735b8)throw CliErrors[_0x566fc3(0x11c)](_0x566fc3(0xfd)+_0x1fd9ae[_0x566fc3(0x102)]+_0x566fc3(0x10f)+_0x1fd9ae['key']+').',_0x566fc3(0x10e));_0x17481f[_0x1fd9ae[_0x566fc3(0x108)]]=projectPageSlot(_0x4735b8);const _0x3f4324=await resolvePermitRoles(_0x4015b7[_0x566fc3(0x101)],_0x39a70f,{'allowSelf':_0x1fd9ae[_0x566fc3(0x11e)],'label':_0x1fd9ae['label']});_0x4735b8[_0x566fc3(0x113)]=_0x3f4324,_0xa6c695[_0x1fd9ae[_0x566fc3(0x108)]]=projectPageSlot(_0x4735b8);}const _0x170ac9={'operation':'page-set','selector':{'appCode':_0x4015b7[_0x566fc3(0x101)],'menuId':_0x173cc9,'slots':_0x66ce44['map'](_0x25fdc8=>_0x25fdc8['spec'][_0x566fc3(0x108)])},'before':_0x17481f,'after':_0xa6c695,'dryRun':_0x304c07,'backend':{'method':_0x566fc3(0x114),'path':SAVE_PATH},'warnings':_0x50dcfc};return{'page':_0x36fe9d,'mutation':_0x170ac9};}export const permitPageSet={'service':a147_0x1451b0(0xfb),'command':a147_0x1451b0(0x103),'description':a147_0x1451b0(0x115),'risk':a147_0x1451b0(0x118),'flags':[MENU_ID_FLAG,...PAGE_SET_ROLE_FLAGS,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2b4db8){const _0x3df7fb=a147_0x1451b0,_0x388ca2=collectRequestedSlots(_0x2b4db8);if(_0x388ca2[_0x3df7fb(0x107)]===0x0)throw CliErrors[_0x3df7fb(0x11c)](_0x3df7fb(0x110),_0x3df7fb(0x100)+PAGE_SLOT_SPECS['map'](_0x1ce5e=>'--'+_0x1ce5e[_0x3df7fb(0x106)])[_0x3df7fb(0xfe)](',\x20')+'.');},async 'dryRun'(_0x41bd10){const _0x77a95f=a147_0x1451b0,{mutation:_0x1733d9}=await buildPlan(_0x41bd10,!![]);return asDryRunResult(_0x1733d9,{'method':_0x77a95f(0x114),'url':SAVE_PATH});},async 'execute'(_0x432790){const _0x2cfdc3=a147_0x1451b0,{page:_0x14ede4,mutation:_0x180e91}=await buildPlan(_0x432790,![]);return await savePagePermit(_0x14ede4),{'ok':!![],'data':_0x180e91,'message':_0x2cfdc3(0x111)+_0x180e91['selector'][_0x2cfdc3(0xff)]};}};
1
+ const a147_0x16edc4=a147_0x398f;(function(_0x1531ff,_0x11c8ad){const _0x92f1a1=a147_0x398f,_0x546084=_0x1531ff();while(!![]){try{const _0x15406b=-parseInt(_0x92f1a1(0xb1))/0x1+-parseInt(_0x92f1a1(0xa0))/0x2+parseInt(_0x92f1a1(0xad))/0x3+-parseInt(_0x92f1a1(0x9e))/0x4+parseInt(_0x92f1a1(0xab))/0x5*(parseInt(_0x92f1a1(0x96))/0x6)+parseInt(_0x92f1a1(0xa7))/0x7+-parseInt(_0x92f1a1(0x9d))/0x8;if(_0x15406b===_0x11c8ad)break;else _0x546084['push'](_0x546084['shift']());}catch(_0x313e0e){_0x546084['push'](_0x546084['shift']());}}}(a147_0xbdb1,0xbfb50));import{getPagePermit,savePagePermit}from'../../core/api-client.js';function a147_0x398f(_0x4ad7b9,_0x1b4d64){_0x4ad7b9=_0x4ad7b9-0x93;const _0xbdb14e=a147_0xbdb1();let _0x398f48=_0xbdb14e[_0x4ad7b9];return _0x398f48;}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a147_0xbdb1(){const _0x3d0f7f=['num','length','map','Only\x20slots\x20present\x20in\x20`permit\x20page-get`\x20can\x20be\x20set.','/smartapi/permit/page/save','validation','10895675oPiEDJ','permit','spec','label','25AYckDY','Nothing\x20to\x20set.','4702650dIAiBR','flag','selector','appCode','1401050AJLKqD','POST','menu-id','push','1837902WwoHmh','key','join','menuId','\x20cannot\x20be\x20empty.','Pass\x20at\x20least\x20one\x20role,\x20or\x20omit\x20the\x20flag.\x20Clearing\x20permissions\x20is\x20not\x20supported\x20by\x20this\x20command.','This\x20page\x20has\x20no\x20\x22','3447360tPOUjK','2855972abHFVL','rolePermit','2648930KQaUqQ'];a147_0xbdb1=function(){return _0x3d0f7f;};return a147_0xbdb1();}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=a147_0x16edc4(0xa5);function collectRequestedSlots(_0x37e492){const _0x3da238=a147_0x16edc4,_0x23bf74=[];for(const _0x2f9586 of PAGE_SLOT_SPECS){const _0x59b8c5=_0x37e492[_0x3da238(0xae)](_0x2f9586[_0x3da238(0xae)]);if(_0x59b8c5===undefined||_0x59b8c5===null)continue;const _0xf7ed2f=splitList(String(_0x59b8c5));if(_0xf7ed2f[_0x3da238(0xa2)]===0x0)throw CliErrors[_0x3da238(0xa6)]('--'+_0x2f9586['flag']+_0x3da238(0x9a),_0x3da238(0x9b));_0x23bf74[_0x3da238(0x95)]({'spec':_0x2f9586,'refs':_0xf7ed2f});}return _0x23bf74;}async function buildPlan(_0x27dc56,_0x6a6c34){const _0x102b1a=a147_0x16edc4,_0x103488=_0x27dc56[_0x102b1a(0xa1)](_0x102b1a(0x94)),_0x48ebab=collectRequestedSlots(_0x27dc56);if(_0x48ebab[_0x102b1a(0xa2)]===0x0)throw CliErrors['validation'](_0x102b1a(0xac),'Pass\x20at\x20least\x20one\x20of:\x20'+PAGE_SLOT_SPECS[_0x102b1a(0xa3)](_0x20ac75=>'--'+_0x20ac75[_0x102b1a(0xae)])[_0x102b1a(0x98)](',\x20')+'.');const _0x2906c6=await getPagePermit(_0x103488),_0x542b69={},_0x26177d={},_0x2a22fe=[];for(const {spec:_0x155d33,refs:_0x4decae}of _0x48ebab){const _0x4b1679=_0x2906c6[_0x155d33[_0x102b1a(0x97)]];if(!_0x4b1679)throw CliErrors['validation'](_0x102b1a(0x9c)+_0x155d33[_0x102b1a(0xaa)]+'\x22\x20permission\x20slot\x20('+_0x155d33['key']+').',_0x102b1a(0xa4));_0x542b69[_0x155d33[_0x102b1a(0x97)]]=projectPageSlot(_0x4b1679);const _0x118285=await resolvePermitRoles(_0x27dc56['appCode'],_0x4decae,{'allowSelf':_0x155d33['allowSelf'],'label':_0x155d33[_0x102b1a(0xaa)]});_0x4b1679[_0x102b1a(0x9f)]=_0x118285,_0x26177d[_0x155d33[_0x102b1a(0x97)]]=projectPageSlot(_0x4b1679);}const _0x2d1fee={'operation':'page-set','selector':{'appCode':_0x27dc56[_0x102b1a(0xb0)],'menuId':_0x103488,'slots':_0x48ebab[_0x102b1a(0xa3)](_0x58a0b6=>_0x58a0b6[_0x102b1a(0xa9)][_0x102b1a(0x97)])},'before':_0x542b69,'after':_0x26177d,'dryRun':_0x6a6c34,'backend':{'method':_0x102b1a(0x93),'path':SAVE_PATH},'warnings':_0x2a22fe};return{'page':_0x2906c6,'mutation':_0x2d1fee};}export const permitPageSet={'service':a147_0x16edc4(0xa8),'command':'page-set','description':'Set\x20page\x20permissions\x20for\x20a\x20menu\x20(menu/create/update/delete/detail/export/row\x20roles);\x20requires\x20--yes','risk':'high-risk-write','flags':[MENU_ID_FLAG,...PAGE_SET_ROLE_FLAGS,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1003e8){const _0x2cffaf=a147_0x16edc4,_0x19d2b8=collectRequestedSlots(_0x1003e8);if(_0x19d2b8[_0x2cffaf(0xa2)]===0x0)throw CliErrors[_0x2cffaf(0xa6)]('Nothing\x20to\x20set.','Pass\x20at\x20least\x20one\x20of:\x20'+PAGE_SLOT_SPECS['map'](_0x1bf74d=>'--'+_0x1bf74d[_0x2cffaf(0xae)])['join'](',\x20')+'.');},async 'dryRun'(_0x27418e){const _0x45b1b2=a147_0x16edc4,{mutation:_0x2f11fc}=await buildPlan(_0x27418e,!![]);return asDryRunResult(_0x2f11fc,{'method':_0x45b1b2(0x93),'url':SAVE_PATH});},async 'execute'(_0x821e19){const _0x301ba1=a147_0x16edc4,{page:_0x5cfbe8,mutation:_0x32f720}=await buildPlan(_0x821e19,![]);return await savePagePermit(_0x5cfbe8),{'ok':!![],'data':_0x32f720,'message':'Updated\x20page\x20permit\x20for\x20menu\x20'+_0x32f720[_0x301ba1(0xaf)][_0x301ba1(0x99)]};}};
@@ -1 +1 @@
1
- const a148_0x53d894=a148_0x2518;(function(_0x5891eb,_0x431020){const _0x38fc8d=a148_0x2518,_0x19a6df=_0x5891eb();while(!![]){try{const _0x226c9d=parseInt(_0x38fc8d(0x1b2))/0x1+-parseInt(_0x38fc8d(0x1a4))/0x2+-parseInt(_0x38fc8d(0x1ba))/0x3+-parseInt(_0x38fc8d(0x1b8))/0x4+-parseInt(_0x38fc8d(0x1be))/0x5*(parseInt(_0x38fc8d(0x1a7))/0x6)+-parseInt(_0x38fc8d(0x1a2))/0x7+parseInt(_0x38fc8d(0x1b0))/0x8;if(_0x226c9d===_0x431020)break;else _0x19a6df['push'](_0x19a6df['shift']());}catch(_0x5de953){_0x19a6df['push'](_0x19a6df['shift']());}}}(a148_0x5ee0,0x2d515));function a148_0x2518(_0x383a99,_0x359fbb){_0x383a99=_0x383a99-0x19e;const _0x5ee06d=a148_0x5ee0();let _0x2518ec=_0x5ee06d[_0x383a99];return _0x2518ec;}import{getRoleApiResources,updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{buildPermits,DATASETS_FLAG,flattenApiResources,readRoleRef,REVOKE_FLAG,ROLE_REF_FLAG,splitList}from'../../commands/permit/shared.js';import{assertPermConfigurable,resolveRoleRef}from'../../commands/role/shared.js';const UPDATE_PATH=a148_0x53d894(0x1bc);async function buildPlan(_0x1b5db2,_0x1fd807){const _0x56889b=a148_0x53d894,_0x4527d5=await resolveRoleRef(_0x1b5db2[_0x56889b(0x19f)],readRoleRef(_0x1b5db2));assertPermConfigurable(_0x4527d5);if(!_0x1b5db2[_0x56889b(0x1c0)](_0x56889b(0x1a6)))throw CliErrors[_0x56889b(0x1b5)](_0x56889b(0x1ac),_0x56889b(0x1bb));const _0x2a772b=splitList(_0x1b5db2[_0x56889b(0x1a5)]('datasets'));if(_0x2a772b[_0x56889b(0x1c2)]===0x0)throw CliErrors[_0x56889b(0x1bd)](_0x56889b(0x1ae),_0x56889b(0x1b9));const _0xe3c14=await getRoleApiResources(_0x1b5db2[_0x56889b(0x19f)],_0x4527d5['id']),{byCode:_0x150929,byDataset:_0x3f0e78}=flattenApiResources(_0xe3c14),_0x39a68e=_0x2a772b['filter'](_0x13e120=>!_0x3f0e78[_0x56889b(0x1a3)](_0x13e120));if(_0x39a68e[_0x56889b(0x1c2)]>0x0)throw CliErrors[_0x56889b(0x1b5)](_0x56889b(0x1a1)+_0x39a68e['join'](',\x20')+'.',_0x56889b(0x1b3));const _0x2e5fb9=new Map(),_0x37b0aa=[],_0x25a452=[];for(const _0x55dbcf of _0x2a772b){for(const _0x234f8f of _0x3f0e78[_0x56889b(0x1ad)](_0x55dbcf)){const _0x58d84c=_0x150929[_0x56889b(0x1ad)](_0x234f8f);_0x2e5fb9[_0x56889b(0x1a8)](_0x234f8f,'0'),_0x37b0aa[_0x56889b(0x1bf)]({'resourceCode':_0x234f8f,'datasetCode':_0x55dbcf,'action':_0x58d84c[_0x56889b(0x1ab)]}),_0x25a452[_0x56889b(0x1bf)]({'resourceCode':_0x234f8f,'datasetCode':_0x55dbcf,'action':'0'});}}const _0xba8b3b=buildPermits(_0x150929,_0x2e5fb9),_0x33e398={'operation':_0x56889b(0x1b1),'selector':{'appCode':_0x1b5db2[_0x56889b(0x19f)],'roleId':_0x4527d5['id'],'roleName':_0x4527d5[_0x56889b(0x1aa)],'datasetCodes':_0x2a772b},'before':_0x37b0aa,'after':_0x25a452,'dryRun':_0x1fd807,'backend':{'method':'POST','path':UPDATE_PATH,'roleType':_0x56889b(0x1a9)},'warnings':[]};return{'role':_0x4527d5,'permits':_0xba8b3b,'mutation':_0x33e398};}function a148_0x5ee0(){const _0x32654b=['/smartapi/permit/role/update','flagMissing','15iWLjXL','push','bool','Revoke\x20a\x20role\x27s\x20dataset\x20API\x20access\x20by\x20datasetCode\x20(roleType\x20API);\x20requires\x20--yes','length','datasetCodes','appCode','high-risk-write','Unknown\x20datasetCode(s)\x20for\x20this\x20role\x27s\x20API\x20resources:\x20','1685565CHwItZ','has','18160EIhrPj','str','revoke','59544NradNI','set','API','roleName','action','Missing\x20--revoke.','get','datasets','role-apis-set','5751104XinzYn','api-revoke','154782CyvGqa','Verify\x20the\x20datasetCode,\x20or\x20check\x20the\x20role\x27s\x20API\x20resource\x20matrix.','\x20dataset(s)\x20on\x20role\x20','validation','Revoked\x20API\x20access\x20for\x20','selector','1404984yqNNBl','Pass\x20--datasets\x20<datasetCode,...>.','171468ysizpA','role-apis-set\x20currently\x20supports\x20revoking\x20dataset\x20API\x20access\x20(use\x20case\x204).'];a148_0x5ee0=function(){return _0x32654b;};return a148_0x5ee0();}export const permitRoleApisSet={'service':'permit','command':a148_0x53d894(0x1af),'description':a148_0x53d894(0x1c1),'risk':a148_0x53d894(0x1a0),'flags':[ROLE_REF_FLAG,REVOKE_FLAG,DATASETS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3ff02f){const _0x4fb5f4=a148_0x53d894;if(!_0x3ff02f['bool'](_0x4fb5f4(0x1a6)))throw CliErrors[_0x4fb5f4(0x1b5)](_0x4fb5f4(0x1ac),_0x4fb5f4(0x1bb));if(splitList(_0x3ff02f[_0x4fb5f4(0x1a5)](_0x4fb5f4(0x1ae)))[_0x4fb5f4(0x1c2)]===0x0)throw CliErrors[_0x4fb5f4(0x1bd)](_0x4fb5f4(0x1ae),_0x4fb5f4(0x1b9));},async 'dryRun'(_0x15cd43){const {mutation:_0x383174}=await buildPlan(_0x15cd43,!![]);return asDryRunResult(_0x383174,{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0x440019){const _0x4f867f=a148_0x53d894,{role:_0xdbcbb9,permits:_0x17c4e4,mutation:_0x3ae9f8}=await buildPlan(_0x440019,![]);return await updateAppRole({'id':_0xdbcbb9['id'],'appCode':_0x440019[_0x4f867f(0x19f)],'roleType':_0x4f867f(0x1a9),'permits':_0x17c4e4}),{'ok':!![],'data':_0x3ae9f8,'message':_0x4f867f(0x1b6)+_0x3ae9f8[_0x4f867f(0x1b7)][_0x4f867f(0x19e)]['length']+_0x4f867f(0x1b4)+_0xdbcbb9[_0x4f867f(0x1aa)]};}};
1
+ const a148_0x133f0a=a148_0x9e9a;(function(_0x280b1c,_0x527f72){const _0xf842c1=a148_0x9e9a,_0x26a29b=_0x280b1c();while(!![]){try{const _0x43f722=parseInt(_0xf842c1(0x6a))/0x1*(-parseInt(_0xf842c1(0x88))/0x2)+-parseInt(_0xf842c1(0x87))/0x3+parseInt(_0xf842c1(0x71))/0x4+-parseInt(_0xf842c1(0x85))/0x5+parseInt(_0xf842c1(0x69))/0x6*(parseInt(_0xf842c1(0x7f))/0x7)+-parseInt(_0xf842c1(0x6f))/0x8+parseInt(_0xf842c1(0x86))/0x9*(parseInt(_0xf842c1(0x6c))/0xa);if(_0x43f722===_0x527f72)break;else _0x26a29b['push'](_0x26a29b['shift']());}catch(_0x136f44){_0x26a29b['push'](_0x26a29b['shift']());}}}(a148_0x49db,0xc769f));import{getRoleApiResources,updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a148_0x9e9a(_0x3ce3d6,_0x5df486){_0x3ce3d6=_0x3ce3d6-0x69;const _0x49db53=a148_0x49db();let _0x9e9adc=_0x49db53[_0x3ce3d6];return _0x9e9adc;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{buildPermits,DATASETS_FLAG,flattenApiResources,readRoleRef,REVOKE_FLAG,ROLE_REF_FLAG,splitList}from'../../commands/permit/shared.js';import{assertPermConfigurable,resolveRoleRef}from'../../commands/role/shared.js';const UPDATE_PATH=a148_0x133f0a(0x83);async function buildPlan(_0xbb1dd9,_0x50645c){const _0x48386d=a148_0x133f0a,_0x57c0d0=await resolveRoleRef(_0xbb1dd9['appCode'],readRoleRef(_0xbb1dd9));assertPermConfigurable(_0x57c0d0);if(!_0xbb1dd9[_0x48386d(0x8b)](_0x48386d(0x7e)))throw CliErrors[_0x48386d(0x80)]('Missing\x20--revoke.',_0x48386d(0x89));const _0x58b425=splitList(_0xbb1dd9[_0x48386d(0x84)](_0x48386d(0x6e)));if(_0x58b425['length']===0x0)throw CliErrors[_0x48386d(0x79)](_0x48386d(0x6e),'Pass\x20--datasets\x20<datasetCode,...>.');const _0x435be5=await getRoleApiResources(_0xbb1dd9['appCode'],_0x57c0d0['id']),{byCode:_0x177f49,byDataset:_0x1b7927}=flattenApiResources(_0x435be5),_0x4182d1=_0x58b425[_0x48386d(0x70)](_0x47066d=>!_0x1b7927[_0x48386d(0x74)](_0x47066d));if(_0x4182d1[_0x48386d(0x8d)]>0x0)throw CliErrors[_0x48386d(0x80)]('Unknown\x20datasetCode(s)\x20for\x20this\x20role\x27s\x20API\x20resources:\x20'+_0x4182d1[_0x48386d(0x78)](',\x20')+'.','Verify\x20the\x20datasetCode,\x20or\x20check\x20the\x20role\x27s\x20API\x20resource\x20matrix.');const _0x2e663=new Map(),_0x3305f9=[],_0x1977f0=[];for(const _0x6e12e2 of _0x58b425){for(const _0x2fb744 of _0x1b7927[_0x48386d(0x73)](_0x6e12e2)){const _0x4006a3=_0x177f49[_0x48386d(0x73)](_0x2fb744);_0x2e663[_0x48386d(0x76)](_0x2fb744,'0'),_0x3305f9['push']({'resourceCode':_0x2fb744,'datasetCode':_0x6e12e2,'action':_0x4006a3[_0x48386d(0x75)]}),_0x1977f0['push']({'resourceCode':_0x2fb744,'datasetCode':_0x6e12e2,'action':'0'});}}const _0x35cf77=buildPermits(_0x177f49,_0x2e663),_0x41d061={'operation':_0x48386d(0x8c),'selector':{'appCode':_0xbb1dd9[_0x48386d(0x7a)],'roleId':_0x57c0d0['id'],'roleName':_0x57c0d0[_0x48386d(0x72)],'datasetCodes':_0x58b425},'before':_0x3305f9,'after':_0x1977f0,'dryRun':_0x50645c,'backend':{'method':_0x48386d(0x7c),'path':UPDATE_PATH,'roleType':_0x48386d(0x7b)},'warnings':[]};return{'role':_0x57c0d0,'permits':_0x35cf77,'mutation':_0x41d061};}function a148_0x49db(){const _0x1938bc=['datasets','12084016UjDsTX','filter','2903316ZKwdjH','roleName','get','has','action','set','Revoke\x20a\x20role\x27s\x20dataset\x20API\x20access\x20by\x20datasetCode\x20(roleType\x20API);\x20requires\x20--yes','join','flagMissing','appCode','API','POST','Missing\x20--revoke.','revoke','63frRihV','validation','Revoked\x20API\x20access\x20for\x20','datasetCodes','/smartapi/permit/role/update','str','5103890iJGjDI','306UMXIqe','1612599ChUVJN','8ALQjBL','role-apis-set\x20currently\x20supports\x20revoking\x20dataset\x20API\x20access\x20(use\x20case\x204).','role-apis-set','bool','api-revoke','length','permit','447522dyhZSU','143963SCfloY','high-risk-write','901280MLZYab','Pass\x20--datasets\x20<datasetCode,...>.'];a148_0x49db=function(){return _0x1938bc;};return a148_0x49db();}export const permitRoleApisSet={'service':a148_0x133f0a(0x8e),'command':a148_0x133f0a(0x8a),'description':a148_0x133f0a(0x77),'risk':a148_0x133f0a(0x6b),'flags':[ROLE_REF_FLAG,REVOKE_FLAG,DATASETS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x53d168){const _0x1d9a89=a148_0x133f0a;if(!_0x53d168[_0x1d9a89(0x8b)](_0x1d9a89(0x7e)))throw CliErrors['validation'](_0x1d9a89(0x7d),_0x1d9a89(0x89));if(splitList(_0x53d168[_0x1d9a89(0x84)](_0x1d9a89(0x6e)))[_0x1d9a89(0x8d)]===0x0)throw CliErrors[_0x1d9a89(0x79)](_0x1d9a89(0x6e),_0x1d9a89(0x6d));},async 'dryRun'(_0x31e27c){const {mutation:_0x561af7}=await buildPlan(_0x31e27c,!![]);return asDryRunResult(_0x561af7,{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0x3f90e9){const _0x35a6f2=a148_0x133f0a,{role:_0x30261d,permits:_0x2f34fd,mutation:_0xbfa685}=await buildPlan(_0x3f90e9,![]);return await updateAppRole({'id':_0x30261d['id'],'appCode':_0x3f90e9[_0x35a6f2(0x7a)],'roleType':_0x35a6f2(0x7b),'permits':_0x2f34fd}),{'ok':!![],'data':_0xbfa685,'message':_0x35a6f2(0x81)+_0xbfa685['selector'][_0x35a6f2(0x82)]['length']+'\x20dataset(s)\x20on\x20role\x20'+_0x30261d['roleName']};}};
@@ -1 +1 @@
1
- const a149_0x4a8002=a149_0x3543;(function(_0x4af6b6,_0x8d9cc9){const _0x32c0c1=a149_0x3543,_0x4fce39=_0x4af6b6();while(!![]){try{const _0x4a1cf6=-parseInt(_0x32c0c1(0x187))/0x1+parseInt(_0x32c0c1(0x182))/0x2+parseInt(_0x32c0c1(0x17a))/0x3*(-parseInt(_0x32c0c1(0x16d))/0x4)+-parseInt(_0x32c0c1(0x16c))/0x5*(-parseInt(_0x32c0c1(0x18a))/0x6)+-parseInt(_0x32c0c1(0x174))/0x7*(parseInt(_0x32c0c1(0x17b))/0x8)+-parseInt(_0x32c0c1(0x181))/0x9+parseInt(_0x32c0c1(0x170))/0xa;if(_0x4a1cf6===_0x8d9cc9)break;else _0x4fce39['push'](_0x4fce39['shift']());}catch(_0x24e57e){_0x4fce39['push'](_0x4fce39['shift']());}}}(a149_0x4bba,0x31f6b));import{getRoleMenuResources,updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a149_0x4bba(){const _0x3ac2e3=['Pass\x20--menus\x20<resourceCode,...>.','action','389490MZAYGF','push','25XsYXtW','16FpQYFz','Updated\x20','str','7435940oLIfbP','Grant\x20or\x20revoke\x20a\x20role\x27s\x20menu\x20access\x20by\x20resourceCode\x20(roleType\x20PAGE);\x20requires\x20--yes','validation','join','623tLnuzq','get','appCode','menu-grant','PAGE','Run\x20`permit\x20role-menus\x20--role\x20<id>`\x20to\x20see\x20valid\x20resourceCodes.','108036jOXcPv','22856fsEJwe','menus','\x20menu\x20permit(s)\x20for\x20role\x20','POST','menu-revoke','length','2546991pZLIMR','111274tfItye','roleName','selector','flagMissing','role-menus-set','237835YRNYWM'];a149_0x4bba=function(){return _0x3ac2e3;};return a149_0x4bba();}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='/smartapi/permit/role/update';async function buildPlan(_0x4dff37,_0x36dfd5){const _0x3adc49=a149_0x3543,_0x1b1f10=await resolveRoleRef(_0x4dff37['appCode'],readRoleRef(_0x4dff37));assertPermConfigurable(_0x1b1f10);const _0x4aad59=readGrantRevoke(_0x4dff37),_0x496538=splitList(_0x4dff37[_0x3adc49(0x16f)](_0x3adc49(0x17c)));if(_0x496538[_0x3adc49(0x180)]===0x0)throw CliErrors[_0x3adc49(0x185)](_0x3adc49(0x17c),_0x3adc49(0x188));const _0x461fea=await getRoleMenuResources(_0x4dff37[_0x3adc49(0x176)],_0x1b1f10['id']),_0x2070bf=flattenMenuResources(_0x461fea),_0x10f8e8=_0x496538['filter'](_0x238481=>!_0x2070bf['has'](_0x238481));if(_0x10f8e8[_0x3adc49(0x180)]>0x0)throw CliErrors[_0x3adc49(0x172)]('Unknown\x20menu\x20resourceCode(s):\x20'+_0x10f8e8[_0x3adc49(0x173)](',\x20')+'.',_0x3adc49(0x179));const _0x5f109e=new Map(),_0x2f7dea=[],_0x2243ad=[];for(const _0x5b6138 of _0x496538){const _0x42cf75=_0x2070bf[_0x3adc49(0x175)](_0x5b6138);_0x5f109e['set'](_0x5b6138,_0x4aad59),_0x2f7dea[_0x3adc49(0x18b)]({'resourceCode':_0x5b6138,'action':_0x42cf75[_0x3adc49(0x189)]}),_0x2243ad[_0x3adc49(0x18b)]({'resourceCode':_0x5b6138,'action':_0x4aad59});}const _0x5572c0=buildPermits(_0x2070bf,_0x5f109e),_0x598c43={'operation':_0x4aad59==='access'?_0x3adc49(0x177):_0x3adc49(0x17f),'selector':{'appCode':_0x4dff37[_0x3adc49(0x176)],'roleId':_0x1b1f10['id'],'roleName':_0x1b1f10[_0x3adc49(0x183)],'resourceCodes':_0x496538},'before':_0x2f7dea,'after':_0x2243ad,'dryRun':_0x36dfd5,'backend':{'method':_0x3adc49(0x17e),'path':UPDATE_PATH,'roleType':'PAGE'},'warnings':[]};return{'role':_0x1b1f10,'permits':_0x5572c0,'mutation':_0x598c43};}function a149_0x3543(_0x25066c,_0x38b89b){_0x25066c=_0x25066c-0x16c;const _0x4bba4b=a149_0x4bba();let _0x354384=_0x4bba4b[_0x25066c];return _0x354384;}export const permitRoleMenusSet={'service':'permit','command':a149_0x4a8002(0x186),'description':a149_0x4a8002(0x171),'risk':'high-risk-write','flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,MENUS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3e609a){const _0x466651=a149_0x4a8002;readGrantRevoke(_0x3e609a);if(splitList(_0x3e609a[_0x466651(0x16f)](_0x466651(0x17c)))[_0x466651(0x180)]===0x0)throw CliErrors[_0x466651(0x185)](_0x466651(0x17c),_0x466651(0x188));},async 'dryRun'(_0x384ee2){const _0x5c481d=a149_0x4a8002,{mutation:_0x1163a7}=await buildPlan(_0x384ee2,!![]);return asDryRunResult(_0x1163a7,{'method':_0x5c481d(0x17e),'url':UPDATE_PATH});},async 'execute'(_0x5e631e){const _0x2f4246=a149_0x4a8002,{role:_0x13fdb9,permits:_0x3f1e37,mutation:_0x5b8f60}=await buildPlan(_0x5e631e,![]);return await updateAppRole({'id':_0x13fdb9['id'],'appCode':_0x5e631e[_0x2f4246(0x176)],'roleType':_0x2f4246(0x178),'permits':_0x3f1e37}),{'ok':!![],'data':_0x5b8f60,'message':_0x2f4246(0x16e)+_0x5b8f60[_0x2f4246(0x184)]['resourceCodes'][_0x2f4246(0x180)]+_0x2f4246(0x17d)+_0x13fdb9[_0x2f4246(0x183)]};}};
1
+ const a149_0x379e14=a149_0x41b5;(function(_0x21a866,_0x45b2b5){const _0x434654=a149_0x41b5,_0x112801=_0x21a866();while(!![]){try{const _0x2c6d55=-parseInt(_0x434654(0x1cd))/0x1+parseInt(_0x434654(0x1c6))/0x2+-parseInt(_0x434654(0x1bf))/0x3+-parseInt(_0x434654(0x1d8))/0x4+-parseInt(_0x434654(0x1c9))/0x5+parseInt(_0x434654(0x1d0))/0x6*(-parseInt(_0x434654(0x1d6))/0x7)+parseInt(_0x434654(0x1da))/0x8;if(_0x2c6d55===_0x45b2b5)break;else _0x112801['push'](_0x112801['shift']());}catch(_0x56c722){_0x112801['push'](_0x112801['shift']());}}}(a149_0x4729,0x1e403));import{getRoleMenuResources,updateAppRole}from'../../core/api-client.js';function a149_0x41b5(_0x13963d,_0x3679f1){_0x13963d=_0x13963d-0x1bc;const _0x47298f=a149_0x4729();let _0x41b577=_0x47298f[_0x13963d];return _0x41b577;}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';function a149_0x4729(){const _0x3f0825=['menu-revoke','703125IuJBSP','push','\x20menu\x20permit(s)\x20for\x20role\x20','Run\x20`permit\x20role-menus\x20--role\x20<id>`\x20to\x20see\x20valid\x20resourceCodes.','PAGE','roleName','has','85412lYVtHp','appCode','POST','912965Cbaccz','get','high-risk-write','Grant\x20or\x20revoke\x20a\x20role\x27s\x20menu\x20access\x20by\x20resourceCode\x20(roleType\x20PAGE);\x20requires\x20--yes','200140nrlOCG','length','/smartapi/permit/role/update','597624UEozYM','join','menu-grant','Pass\x20--menus\x20<resourceCode,...>.','selector','menus','7FGjJth','str','580288nAcEsW','permit','7543880JViucd','action','validation','filter','flagMissing'];a149_0x4729=function(){return _0x3f0825;};return a149_0x4729();}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=a149_0x379e14(0x1cf);async function buildPlan(_0x2048e9,_0x2f2088){const _0x4f4316=a149_0x379e14,_0xba019b=await resolveRoleRef(_0x2048e9['appCode'],readRoleRef(_0x2048e9));assertPermConfigurable(_0xba019b);const _0x5dbe01=readGrantRevoke(_0x2048e9),_0x8202ea=splitList(_0x2048e9[_0x4f4316(0x1d7)]('menus'));if(_0x8202ea[_0x4f4316(0x1ce)]===0x0)throw CliErrors[_0x4f4316(0x1bd)](_0x4f4316(0x1d5),_0x4f4316(0x1d3));const _0x36c7cf=await getRoleMenuResources(_0x2048e9['appCode'],_0xba019b['id']),_0x51e905=flattenMenuResources(_0x36c7cf),_0x3468f4=_0x8202ea[_0x4f4316(0x1bc)](_0x396416=>!_0x51e905[_0x4f4316(0x1c5)](_0x396416));if(_0x3468f4[_0x4f4316(0x1ce)]>0x0)throw CliErrors[_0x4f4316(0x1dc)]('Unknown\x20menu\x20resourceCode(s):\x20'+_0x3468f4[_0x4f4316(0x1d1)](',\x20')+'.',_0x4f4316(0x1c2));const _0x1b0dcd=new Map(),_0x2ef2c6=[],_0x26cd53=[];for(const _0x3a35c2 of _0x8202ea){const _0x23236b=_0x51e905[_0x4f4316(0x1ca)](_0x3a35c2);_0x1b0dcd['set'](_0x3a35c2,_0x5dbe01),_0x2ef2c6[_0x4f4316(0x1c0)]({'resourceCode':_0x3a35c2,'action':_0x23236b[_0x4f4316(0x1db)]}),_0x26cd53[_0x4f4316(0x1c0)]({'resourceCode':_0x3a35c2,'action':_0x5dbe01});}const _0x32c40f=buildPermits(_0x51e905,_0x1b0dcd),_0x1fc2f2={'operation':_0x5dbe01==='access'?_0x4f4316(0x1d2):_0x4f4316(0x1be),'selector':{'appCode':_0x2048e9['appCode'],'roleId':_0xba019b['id'],'roleName':_0xba019b[_0x4f4316(0x1c4)],'resourceCodes':_0x8202ea},'before':_0x2ef2c6,'after':_0x26cd53,'dryRun':_0x2f2088,'backend':{'method':'POST','path':UPDATE_PATH,'roleType':_0x4f4316(0x1c3)},'warnings':[]};return{'role':_0xba019b,'permits':_0x32c40f,'mutation':_0x1fc2f2};}export const permitRoleMenusSet={'service':a149_0x379e14(0x1d9),'command':'role-menus-set','description':a149_0x379e14(0x1cc),'risk':a149_0x379e14(0x1cb),'flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,MENUS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x197721){const _0x2702ca=a149_0x379e14;readGrantRevoke(_0x197721);if(splitList(_0x197721['str'](_0x2702ca(0x1d5)))[_0x2702ca(0x1ce)]===0x0)throw CliErrors[_0x2702ca(0x1bd)](_0x2702ca(0x1d5),_0x2702ca(0x1d3));},async 'dryRun'(_0x57a25d){const _0x324834=a149_0x379e14,{mutation:_0x4537d6}=await buildPlan(_0x57a25d,!![]);return asDryRunResult(_0x4537d6,{'method':_0x324834(0x1c8),'url':UPDATE_PATH});},async 'execute'(_0x47dd01){const _0xe4ae53=a149_0x379e14,{role:_0x4ccfc2,permits:_0x370416,mutation:_0x4e377a}=await buildPlan(_0x47dd01,![]);return await updateAppRole({'id':_0x4ccfc2['id'],'appCode':_0x47dd01[_0xe4ae53(0x1c7)],'roleType':'PAGE','permits':_0x370416}),{'ok':!![],'data':_0x4e377a,'message':'Updated\x20'+_0x4e377a[_0xe4ae53(0x1d4)]['resourceCodes'][_0xe4ae53(0x1ce)]+_0xe4ae53(0x1c1)+_0x4ccfc2[_0xe4ae53(0x1c4)]};}};
@@ -1 +1 @@
1
- const a150_0x265ac6=a150_0x1f32;(function(_0x2258f5,_0x342685){const _0x43561b=a150_0x1f32,_0x107919=_0x2258f5();while(!![]){try{const _0x2b8d02=parseInt(_0x43561b(0x15d))/0x1*(-parseInt(_0x43561b(0x162))/0x2)+-parseInt(_0x43561b(0x15c))/0x3*(parseInt(_0x43561b(0x176))/0x4)+parseInt(_0x43561b(0x179))/0x5*(-parseInt(_0x43561b(0x171))/0x6)+-parseInt(_0x43561b(0x165))/0x7*(-parseInt(_0x43561b(0x16d))/0x8)+parseInt(_0x43561b(0x163))/0x9+-parseInt(_0x43561b(0x174))/0xa+-parseInt(_0x43561b(0x161))/0xb*(-parseInt(_0x43561b(0x166))/0xc);if(_0x2b8d02===_0x342685)break;else _0x107919['push'](_0x107919['shift']());}catch(_0x20ddb8){_0x107919['push'](_0x107919['shift']());}}}(a150_0x4f45,0x4fc8b));function a150_0x1f32(_0x5a8666,_0x2c8520){_0x5a8666=_0x5a8666-0x15c;const _0x4f4591=a150_0x4f45();let _0x1f324d=_0x4f4591[_0x5a8666];return _0x1f324d;}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 a150_0x4f45(){const _0x50a60f=['644760lzMEzg','roleName','14098fKdLXO','17367540yisIod','length','read','from','permit','Role\x20','resourceCode','800MONIiq','values','allowed','access','54gEhpua','Show\x20a\x20role\x27s\x20current\x20menu\x20permission\x20matrix','action','1487110znpfvu','\x20menu(s)\x20allowed','4uqRZdA','map','role-menus','291955oakoPh','1725267byBRYl','20603qZgPLQ','\x20has\x20','appCode','filter','11jWCats','14OruPFO'];a150_0x4f45=function(){return _0x50a60f;};return a150_0x4f45();}import{resolveRoleRef}from'../../commands/role/shared.js';export const permitRoleMenus={'service':a150_0x265ac6(0x16a),'command':a150_0x265ac6(0x178),'description':a150_0x265ac6(0x172),'risk':a150_0x265ac6(0x168),'flags':[ROLE_REF_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x35fd22){const _0x4a6420=a150_0x265ac6,_0x3bef5c=await resolveRoleRef(_0x35fd22[_0x4a6420(0x15f)],readRoleRef(_0x35fd22)),_0x518510=await getRoleMenuResources(_0x35fd22[_0x4a6420(0x15f)],_0x3bef5c['id']),_0x14b1fe=flattenMenuResources(_0x518510),_0x15aada=Array[_0x4a6420(0x169)](_0x14b1fe[_0x4a6420(0x16e)]())[_0x4a6420(0x177)](_0x48acf7=>({'resourceCode':_0x48acf7[_0x4a6420(0x16c)],'resourceName':_0x48acf7['resourceName'],'allowed':_0x48acf7[_0x4a6420(0x173)]===_0x4a6420(0x170),'action':_0x48acf7[_0x4a6420(0x173)]}));return{'ok':!![],'data':{'selector':{'appCode':_0x35fd22[_0x4a6420(0x15f)],'roleId':_0x3bef5c['id'],'roleName':_0x3bef5c[_0x4a6420(0x164)]},'menus':_0x15aada},'message':_0x4a6420(0x16b)+_0x3bef5c[_0x4a6420(0x164)]+_0x4a6420(0x15e)+_0x15aada[_0x4a6420(0x160)](_0x3fe23a=>_0x3fe23a[_0x4a6420(0x16f)])[_0x4a6420(0x167)]+'/'+_0x15aada['length']+_0x4a6420(0x175)};}};
1
+ const a150_0x3802c8=a150_0x351d;(function(_0x5a2a43,_0xa26e94){const _0x1df1fe=a150_0x351d,_0xc968b6=_0x5a2a43();while(!![]){try{const _0x4ed73e=parseInt(_0x1df1fe(0xd6))/0x1+-parseInt(_0x1df1fe(0xcc))/0x2*(-parseInt(_0x1df1fe(0xd3))/0x3)+parseInt(_0x1df1fe(0xd1))/0x4+parseInt(_0x1df1fe(0xde))/0x5*(-parseInt(_0x1df1fe(0xdc))/0x6)+parseInt(_0x1df1fe(0xce))/0x7*(parseInt(_0x1df1fe(0xc7))/0x8)+parseInt(_0x1df1fe(0xdd))/0x9*(parseInt(_0x1df1fe(0xd9))/0xa)+-parseInt(_0x1df1fe(0xcb))/0xb*(parseInt(_0x1df1fe(0xc9))/0xc);if(_0x4ed73e===_0xa26e94)break;else _0xc968b6['push'](_0xc968b6['shift']());}catch(_0x320027){_0xc968b6['push'](_0xc968b6['shift']());}}}(a150_0x4e8e,0x6fac0));function a150_0x4e8e(){const _0x31db18=['7vQXAtn','resourceCode','\x20menu(s)\x20allowed','1487896sCzHEX','appCode','88059flzgMp','roleName','length','794996PNDyqS','access','read','760BBdXmX','map','action','306QCkgta','1899IafSfr','51395niTbOj','Show\x20a\x20role\x27s\x20current\x20menu\x20permission\x20matrix','permit','role-menus','5129792DpsaPM','from','576fPXXhy','values','347809hxHKGa','46RQXNEh','Role\x20'];a150_0x4e8e=function(){return _0x31db18;};return a150_0x4e8e();}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 a150_0x351d(_0x120995,_0x1530b2){_0x120995=_0x120995-0xc6;const _0x4e8e7b=a150_0x4e8e();let _0x351d69=_0x4e8e7b[_0x120995];return _0x351d69;}export const permitRoleMenus={'service':a150_0x3802c8(0xe0),'command':a150_0x3802c8(0xc6),'description':a150_0x3802c8(0xdf),'risk':a150_0x3802c8(0xd8),'flags':[ROLE_REF_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x3b40c2){const _0x494560=a150_0x3802c8,_0x233de9=await resolveRoleRef(_0x3b40c2['appCode'],readRoleRef(_0x3b40c2)),_0xe9b6e2=await getRoleMenuResources(_0x3b40c2[_0x494560(0xd2)],_0x233de9['id']),_0xac6cd9=flattenMenuResources(_0xe9b6e2),_0x292cc2=Array[_0x494560(0xc8)](_0xac6cd9[_0x494560(0xca)]())[_0x494560(0xda)](_0x2a83dd=>({'resourceCode':_0x2a83dd[_0x494560(0xcf)],'resourceName':_0x2a83dd['resourceName'],'allowed':_0x2a83dd[_0x494560(0xdb)]===_0x494560(0xd7),'action':_0x2a83dd[_0x494560(0xdb)]}));return{'ok':!![],'data':{'selector':{'appCode':_0x3b40c2['appCode'],'roleId':_0x233de9['id'],'roleName':_0x233de9[_0x494560(0xd4)]},'menus':_0x292cc2},'message':_0x494560(0xcd)+_0x233de9[_0x494560(0xd4)]+'\x20has\x20'+_0x292cc2['filter'](_0x473f2b=>_0x473f2b['allowed'])[_0x494560(0xd5)]+'/'+_0x292cc2[_0x494560(0xd5)]+_0x494560(0xd0)};}};
@@ -1 +1 @@
1
- const a151_0x3735ce=a151_0x22a1;(function(_0x50301b,_0x32d046){const _0x1761b0=a151_0x22a1,_0x18cc8e=_0x50301b();while(!![]){try{const _0x4208f9=parseInt(_0x1761b0(0x1ec))/0x1+parseInt(_0x1761b0(0x220))/0x2+parseInt(_0x1761b0(0x1e9))/0x3+parseInt(_0x1761b0(0x21c))/0x4*(-parseInt(_0x1761b0(0x21a))/0x5)+-parseInt(_0x1761b0(0x22c))/0x6*(parseInt(_0x1761b0(0x225))/0x7)+-parseInt(_0x1761b0(0x212))/0x8*(-parseInt(_0x1761b0(0x1f4))/0x9)+parseInt(_0x1761b0(0x22e))/0xa*(-parseInt(_0x1761b0(0x1e8))/0xb);if(_0x4208f9===_0x32d046)break;else _0x18cc8e['push'](_0x18cc8e['shift']());}catch(_0x35e811){_0x18cc8e['push'](_0x18cc8e['shift']());}}}(a151_0x1332,0x4dbd4));import{listPermitRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const MENU_ID_FLAG={'name':a151_0x3735ce(0x213),'type':a151_0x3735ce(0x1f6),'required':!![],'description':a151_0x3735ce(0x228)};function a151_0x22a1(_0x530b62,_0x2bc342){_0x530b62=_0x530b62-0x1e5;const _0x133211=a151_0x1332();let _0x22a1d3=_0x133211[_0x530b62];return _0x22a1d3;}export const ROLE_REF_FLAG={'name':'role','type':'string','required':!![],'description':a151_0x3735ce(0x201)};export const GRANT_FLAG={'name':a151_0x3735ce(0x1fa),'type':a151_0x3735ce(0x1e5),'required':![],'description':a151_0x3735ce(0x202)};export const REVOKE_FLAG={'name':a151_0x3735ce(0x230),'type':'boolean','required':![],'description':'Revoke\x20access\x20to\x20the\x20listed\x20resources'};export const MENUS_FLAG={'name':'menus','type':a151_0x3735ce(0x222),'required':!![],'description':'Comma-separated\x20menu\x20resourceCodes\x20to\x20grant/revoke'};export const DATASETS_FLAG={'name':a151_0x3735ce(0x20a),'type':a151_0x3735ce(0x222),'required':!![],'description':'Comma-separated\x20datasetCodes\x20to\x20revoke\x20API\x20access\x20for'};export const PAGE_SLOT_SPECS=[{'flag':a151_0x3735ce(0x231),'key':a151_0x3735ce(0x20d),'allowSelf':![],'label':a151_0x3735ce(0x22f)},{'flag':'create-roles','key':'dataCreate','allowSelf':![],'label':'data\x20create'},{'flag':a151_0x3735ce(0x1ee),'key':'dataUpdate','allowSelf':![],'label':a151_0x3735ce(0x238)},{'flag':a151_0x3735ce(0x1e6),'key':a151_0x3735ce(0x1f5),'allowSelf':![],'label':a151_0x3735ce(0x237)},{'flag':a151_0x3735ce(0x1f7),'key':a151_0x3735ce(0x1ed),'allowSelf':![],'label':a151_0x3735ce(0x22a)},{'flag':a151_0x3735ce(0x226),'key':a151_0x3735ce(0x235),'allowSelf':![],'label':a151_0x3735ce(0x20f)},{'flag':a151_0x3735ce(0x22d),'key':a151_0x3735ce(0x20e),'allowSelf':!![],'label':a151_0x3735ce(0x1fb)}];export const PAGE_SET_ROLE_FLAGS=PAGE_SLOT_SPECS['map'](_0x3d03c8=>({'name':_0x3d03c8['flag'],'type':a151_0x3735ce(0x222),'required':![],'description':a151_0x3735ce(0x21d)+_0x3d03c8[a151_0x3735ce(0x223)]+a151_0x3735ce(0x219)+(_0x3d03c8[a151_0x3735ce(0x206)]?a151_0x3735ce(0x1ea):'')}));export function splitList(_0xa7855b){const _0x25e192=a151_0x3735ce;return _0xa7855b[_0x25e192(0x203)](',')[_0x25e192(0x20b)](_0x1812a7=>_0x1812a7['trim']())[_0x25e192(0x233)](Boolean);}export function projectRoleRef(_0x116201){const _0x53a49d=a151_0x3735ce;return{'id':_0x116201['id'],'roleName':_0x116201[_0x53a49d(0x208)],'roleType':_0x116201[_0x53a49d(0x234)]};}export async function resolvePermitRoles(_0x348d0e,_0x19d023,_0x183bcd){const _0x3343b1=a151_0x3735ce,_0x977777=await listPermitRoles(_0x348d0e,{'needSelf':!![],'needPublic':!![]}),_0x75eab4=[];for(const _0x5ced18 of _0x19d023){const _0x53585d=resolveOnePermitRole(_0x977777,_0x5ced18);if(!_0x183bcd[_0x3343b1(0x206)]&&_0x53585d[_0x3343b1(0x234)]===_0x3343b1(0x229))throw CliErrors['validation'](_0x3343b1(0x1f2)+_0x183bcd['label']+'.',_0x3343b1(0x216));if(!_0x75eab4[_0x3343b1(0x1fe)](_0xab5a23=>_0xab5a23['id']===_0x53585d['id']))_0x75eab4[_0x3343b1(0x221)](_0x53585d);}return _0x75eab4;}function resolveOnePermitRole(_0x1e618c,_0x4ce6cd){const _0x515005=a151_0x3735ce,_0x1cb112=_0x4ce6cd[_0x515005(0x23a)](),_0x5d2fe2=_0x1cb112[_0x515005(0x1f1)]();if(_0x5d2fe2===_0x515005(0x229)||_0x5d2fe2===_0x515005(0x1e7)){const _0x5b7c26=_0x1e618c['find'](_0x33b4b4=>_0x33b4b4[_0x515005(0x234)]===_0x5d2fe2);if(!_0x5b7c26)throw CliErrors['validation'](_0x515005(0x1f3)+_0x5d2fe2+'\x20is\x20not\x20available\x20for\x20this\x20app.');return _0x5b7c26;}if(/^-?\d+$/[_0x515005(0x217)](_0x1cb112)){const _0x602681=Number(_0x1cb112),_0x289b0d=_0x1e618c[_0x515005(0x21e)](_0x221996=>_0x221996['id']===_0x602681);if(!_0x289b0d)throw CliErrors['validation'](_0x515005(0x200)+_0x602681+_0x515005(0x211),'Run\x20`role\x20list`.');return _0x289b0d;}const _0x7d535=_0x1e618c[_0x515005(0x233)](_0x3db82c=>_0x3db82c[_0x515005(0x208)]===_0x1cb112);if(_0x7d535[_0x515005(0x232)]===0x0)throw CliErrors[_0x515005(0x218)]('Role\x20\x22'+_0x1cb112+'\x22\x20not\x20found.',_0x515005(0x239));if(_0x7d535[_0x515005(0x232)]>0x1)throw CliErrors[_0x515005(0x218)](_0x515005(0x214)+_0x1cb112+'\x22\x20is\x20ambiguous\x20(ids:\x20'+_0x7d535['map'](_0x4245dc=>_0x4245dc['id'])['join'](',\x20')+').','Disambiguate\x20with\x20an\x20id.');return _0x7d535[0x0];}function a151_0x1332(){const _0x4a0901=['791095mLtvjU','datasetCode','8NKNAUf','Roles\x20for\x20','find','str','794240bpTPIv','push','string','label','Missing\x20action.','42RToBKt','export-roles','Pass\x20exactly\x20one\x20of\x20--grant\x20/\x20--revoke.','Menu\x20id\x20(from\x20`menu\x20list`)','SELF','data\x20detail','get','21786blWYOy','row-roles','50MJvlhk','menu\x20visibility','revoke','menu-roles','length','filter','roleType','dataExport','--grant\x20and\x20--revoke\x20are\x20mutually\x20exclusive.','data\x20delete','data\x20update','Run\x20`role\x20list`,\x20or\x20use\x20SELF/ALL/<id>.','trim','boolean','delete-roles','ALL','1301135VdlOor','799032ZQhezq',';\x20SELF\x20=\x20only\x20own\x20rows','allowedActions','558611fCQFHB','dataDetail','update-roles','rolePermit','appCode','toUpperCase','SELF\x20is\x20not\x20allowed\x20for\x20','Special\x20role\x20','18bFkYBf','dataDelete','number','detail-roles','resourceName','Pass\x20--role\x20<id|name>.','grant','row\x20visibility','set','role','some','bool','Role\x20id\x20','Role\x20id\x20or\x20role\x20name','Grant\x20access\x20to\x20the\x20listed\x20resources','split','resourceCode','menuId','allowSelf','key','roleName','pageNodeList','datasets','map','apiList','menuPermit','dataPermit','data\x20export','entries','\x20not\x20found.','103976DihuPW','menu-id','Role\x20\x22','action','SELF\x20(row-level)\x20applies\x20only\x20to\x20--row-roles.','test','validation','\x20(comma-separated\x20SELF/ALL/id/name)'];a151_0x1332=function(){return _0x4a0901;};return a151_0x1332();}export function projectPageSlot(_0x423209){const _0x2d9ece=a151_0x3735ce;if(!_0x423209)return null;return{'resourceCode':_0x423209[_0x2d9ece(0x204)],'roles':(_0x423209[_0x2d9ece(0x1ef)]??[])[_0x2d9ece(0x20b)](projectRoleRef)};}export function projectPagePermit(_0x57471a){const _0x5564b4=a151_0x3735ce,_0x362b0b={'menuId':_0x57471a[_0x5564b4(0x205)],'appCode':_0x57471a[_0x5564b4(0x1f0)],'menuPermit':projectPageSlot(_0x57471a[_0x5564b4(0x20d)])};for(const _0x402f80 of PAGE_SLOT_SPECS){if(_0x402f80['key']===_0x5564b4(0x20d))continue;_0x362b0b[_0x402f80[_0x5564b4(0x207)]]=projectPageSlot(_0x57471a[_0x402f80['key']]);}return _0x362b0b;}export function flattenMenuResources(_0x3c4e09){const _0x1a8774=new Map(),_0x32979e=_0xadc3d4=>{const _0x5f32cf=a151_0x22a1;for(const _0x5920f1 of _0xadc3d4??[]){_0x1a8774[_0x5f32cf(0x1fc)](_0x5920f1[_0x5f32cf(0x204)],{'resourceCode':_0x5920f1[_0x5f32cf(0x204)],'resourceName':_0x5920f1[_0x5f32cf(0x1f8)],'action':_0x5920f1[_0x5f32cf(0x1eb)]?.[0x0]??'0'});if(_0x5920f1[_0x5f32cf(0x209)])_0x32979e(_0x5920f1[_0x5f32cf(0x209)]);}};return _0x32979e(_0x3c4e09),_0x1a8774;}export function flattenApiResources(_0x125d55){const _0x596a9c=a151_0x3735ce,_0x35ef78=new Map(),_0x13b19d=new Map();for(const _0x478b27 of _0x125d55){const _0x5d7777=_0x478b27[_0x596a9c(0x20c)]??{};for(const [_0x1c3542,_0x3c10b7]of Object[_0x596a9c(0x210)](_0x5d7777)){_0x35ef78[_0x596a9c(0x1fc)](_0x1c3542,{'resourceCode':_0x1c3542,'resourceName':_0x478b27[_0x596a9c(0x1f8)],'datasetCode':_0x478b27[_0x596a9c(0x21b)],'action':_0x3c10b7?.[0x0]??'0'});const _0x4f0b3b=_0x13b19d[_0x596a9c(0x22b)](_0x478b27[_0x596a9c(0x21b)])??[];_0x4f0b3b[_0x596a9c(0x221)](_0x1c3542),_0x13b19d[_0x596a9c(0x1fc)](_0x478b27[_0x596a9c(0x21b)],_0x4f0b3b);}}return{'byCode':_0x35ef78,'byDataset':_0x13b19d};}export function buildPermits(_0x3cf96e,_0x27f6e9){const _0x38f4f0=a151_0x3735ce,_0xef4c78={};for(const [_0x344daa,_0x30a031]of _0x3cf96e){const _0xdf092=_0x27f6e9[_0x38f4f0(0x22b)](_0x344daa)??_0x30a031[_0x38f4f0(0x215)];_0xef4c78[_0x344daa]=[_0xdf092];}return _0xef4c78;}export function readRoleRef(_0x2303d3){const _0x1734c8=a151_0x3735ce,_0x2453ce=_0x2303d3[_0x1734c8(0x21f)]('role')[_0x1734c8(0x23a)]();if(!_0x2453ce)throw CliErrors['flagMissing'](_0x1734c8(0x1fd),_0x1734c8(0x1f9));return _0x2453ce;}export function readGrantRevoke(_0x4b8be4){const _0x3c2179=a151_0x3735ce,_0x438457=_0x4b8be4[_0x3c2179(0x1ff)](_0x3c2179(0x1fa)),_0x5bf688=_0x4b8be4[_0x3c2179(0x1ff)](_0x3c2179(0x230));if(_0x438457&&_0x5bf688)throw CliErrors[_0x3c2179(0x218)](_0x3c2179(0x236));if(!_0x438457&&!_0x5bf688)throw CliErrors[_0x3c2179(0x218)](_0x3c2179(0x224),_0x3c2179(0x227));return _0x438457?'access':'0';}
1
+ const a151_0x714ad8=a151_0xcb0b;(function(_0x2e16c7,_0x5eb52c){const _0x50ce35=a151_0xcb0b,_0x42d508=_0x2e16c7();while(!![]){try{const _0x366723=-parseInt(_0x50ce35(0x21f))/0x1*(-parseInt(_0x50ce35(0x223))/0x2)+-parseInt(_0x50ce35(0x211))/0x3*(parseInt(_0x50ce35(0x1eb))/0x4)+-parseInt(_0x50ce35(0x228))/0x5+parseInt(_0x50ce35(0x1ee))/0x6+-parseInt(_0x50ce35(0x1f5))/0x7*(-parseInt(_0x50ce35(0x1df))/0x8)+parseInt(_0x50ce35(0x1fb))/0x9+-parseInt(_0x50ce35(0x20a))/0xa;if(_0x366723===_0x5eb52c)break;else _0x42d508['push'](_0x42d508['shift']());}catch(_0x34bef9){_0x42d508['push'](_0x42d508['shift']());}}}(a151_0x3712,0x4c274));import{listPermitRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const MENU_ID_FLAG={'name':a151_0x714ad8(0x1f2),'type':a151_0x714ad8(0x210),'required':!![],'description':'Menu\x20id\x20(from\x20`menu\x20list`)'};function a151_0xcb0b(_0x5f4670,_0x1a1a85){_0x5f4670=_0x5f4670-0x1de;const _0x37127e=a151_0x3712();let _0xcb0b63=_0x37127e[_0x5f4670];return _0xcb0b63;}export const ROLE_REF_FLAG={'name':a151_0x714ad8(0x1ed),'type':a151_0x714ad8(0x22f),'required':!![],'description':a151_0x714ad8(0x217)};export const GRANT_FLAG={'name':a151_0x714ad8(0x21a),'type':a151_0x714ad8(0x1e6),'required':![],'description':a151_0x714ad8(0x1f3)};export const REVOKE_FLAG={'name':a151_0x714ad8(0x206),'type':a151_0x714ad8(0x1e6),'required':![],'description':'Revoke\x20access\x20to\x20the\x20listed\x20resources'};export const MENUS_FLAG={'name':a151_0x714ad8(0x22c),'type':a151_0x714ad8(0x22f),'required':!![],'description':a151_0x714ad8(0x22a)};export const DATASETS_FLAG={'name':a151_0x714ad8(0x202),'type':a151_0x714ad8(0x22f),'required':!![],'description':a151_0x714ad8(0x233)};export const PAGE_SLOT_SPECS=[{'flag':a151_0x714ad8(0x1ec),'key':a151_0x714ad8(0x1f6),'allowSelf':![],'label':a151_0x714ad8(0x212)},{'flag':'create-roles','key':a151_0x714ad8(0x1e7),'allowSelf':![],'label':a151_0x714ad8(0x203)},{'flag':a151_0x714ad8(0x227),'key':a151_0x714ad8(0x1e0),'allowSelf':![],'label':a151_0x714ad8(0x1fe)},{'flag':a151_0x714ad8(0x214),'key':'dataDelete','allowSelf':![],'label':a151_0x714ad8(0x1e8)},{'flag':a151_0x714ad8(0x208),'key':a151_0x714ad8(0x1f7),'allowSelf':![],'label':a151_0x714ad8(0x219)},{'flag':'export-roles','key':a151_0x714ad8(0x22d),'allowSelf':![],'label':'data\x20export'},{'flag':a151_0x714ad8(0x21b),'key':a151_0x714ad8(0x232),'allowSelf':!![],'label':a151_0x714ad8(0x200)}];function a151_0x3712(){const _0x37d56f=['row-roles','test','SELF\x20(row-level)\x20applies\x20only\x20to\x20--row-roles.','resourceName','303775JmEiAJ','resourceCode','some','pageNodeList','2GFNYcx','Pass\x20--role\x20<id|name>.','allowSelf','\x22\x20is\x20ambiguous\x20(ids:\x20','update-roles','1596815xJdece','access','Comma-separated\x20menu\x20resourceCodes\x20to\x20grant/revoke','\x20(comma-separated\x20SELF/ALL/id/name)','menus','dataExport','length','string','SELF','Run\x20`role\x20list`.','dataPermit','Comma-separated\x20datasetCodes\x20to\x20revoke\x20API\x20access\x20for','set','get','validation','1662448Waxhim','dataUpdate','Pass\x20exactly\x20one\x20of\x20--grant\x20/\x20--revoke.','push','SELF\x20is\x20not\x20allowed\x20for\x20','Roles\x20for\x20','datasetCode','boolean','dataCreate','data\x20delete','roleType','join','348QYUnhx','menu-roles','role','243582JUhGYi','rolePermit','\x20not\x20found.','--grant\x20and\x20--revoke\x20are\x20mutually\x20exclusive.','menu-id','Grant\x20access\x20to\x20the\x20listed\x20resources','map','14lkswDK','menuPermit','dataDetail','appCode','bool','split','4654035FdLyJh','roleName','find','data\x20update','Run\x20`role\x20list`,\x20or\x20use\x20SELF/ALL/<id>.','row\x20visibility','filter','datasets','data\x20create','menuId','Role\x20\x22','revoke',';\x20SELF\x20=\x20only\x20own\x20rows','detail-roles','key','4023860PmSJgK','\x22\x20not\x20found.','flagMissing','action','apiList','Disambiguate\x20with\x20an\x20id.','number','8394zeenxO','menu\x20visibility','trim','delete-roles','Special\x20role\x20','Missing\x20action.','Role\x20id\x20or\x20role\x20name','\x20is\x20not\x20available\x20for\x20this\x20app.','data\x20detail','grant'];a151_0x3712=function(){return _0x37d56f;};return a151_0x3712();}export const PAGE_SET_ROLE_FLAGS=PAGE_SLOT_SPECS['map'](_0x2fb7ee=>({'name':_0x2fb7ee['flag'],'type':'string','required':![],'description':a151_0x714ad8(0x1e4)+_0x2fb7ee['label']+a151_0x714ad8(0x22b)+(_0x2fb7ee[a151_0x714ad8(0x225)]?a151_0x714ad8(0x207):'')}));export function splitList(_0x124d05){const _0x1f7290=a151_0x714ad8;return _0x124d05[_0x1f7290(0x1fa)](',')[_0x1f7290(0x1f4)](_0x4bef1c=>_0x4bef1c[_0x1f7290(0x213)]())[_0x1f7290(0x201)](Boolean);}export function projectRoleRef(_0x467d4e){const _0x4cb582=a151_0x714ad8;return{'id':_0x467d4e['id'],'roleName':_0x467d4e[_0x4cb582(0x1fc)],'roleType':_0x467d4e[_0x4cb582(0x1e9)]};}export async function resolvePermitRoles(_0x216164,_0x27e108,_0x29ecc2){const _0x49f7c9=a151_0x714ad8,_0x146085=await listPermitRoles(_0x216164,{'needSelf':!![],'needPublic':!![]}),_0x5b9e02=[];for(const _0x3742dd of _0x27e108){const _0x36510b=resolveOnePermitRole(_0x146085,_0x3742dd);if(!_0x29ecc2[_0x49f7c9(0x225)]&&_0x36510b[_0x49f7c9(0x1e9)]==='SELF')throw CliErrors[_0x49f7c9(0x1de)](_0x49f7c9(0x1e3)+_0x29ecc2['label']+'.',_0x49f7c9(0x21d));if(!_0x5b9e02[_0x49f7c9(0x221)](_0x1ffbbb=>_0x1ffbbb['id']===_0x36510b['id']))_0x5b9e02[_0x49f7c9(0x1e2)](_0x36510b);}return _0x5b9e02;}function resolveOnePermitRole(_0x155190,_0x5c766e){const _0x269aff=a151_0x714ad8,_0x5d8d59=_0x5c766e[_0x269aff(0x213)](),_0x352bbd=_0x5d8d59['toUpperCase']();if(_0x352bbd===_0x269aff(0x230)||_0x352bbd==='ALL'){const _0x3c8d1e=_0x155190[_0x269aff(0x1fd)](_0x4c3868=>_0x4c3868['roleType']===_0x352bbd);if(!_0x3c8d1e)throw CliErrors[_0x269aff(0x1de)](_0x269aff(0x215)+_0x352bbd+_0x269aff(0x218));return _0x3c8d1e;}if(/^-?\d+$/[_0x269aff(0x21c)](_0x5d8d59)){const _0x1d9f77=Number(_0x5d8d59),_0x2bde85=_0x155190[_0x269aff(0x1fd)](_0x2811d3=>_0x2811d3['id']===_0x1d9f77);if(!_0x2bde85)throw CliErrors[_0x269aff(0x1de)]('Role\x20id\x20'+_0x1d9f77+_0x269aff(0x1f0),_0x269aff(0x231));return _0x2bde85;}const _0x323ae2=_0x155190[_0x269aff(0x201)](_0x253988=>_0x253988[_0x269aff(0x1fc)]===_0x5d8d59);if(_0x323ae2[_0x269aff(0x22e)]===0x0)throw CliErrors[_0x269aff(0x1de)](_0x269aff(0x205)+_0x5d8d59+_0x269aff(0x20b),_0x269aff(0x1ff));if(_0x323ae2[_0x269aff(0x22e)]>0x1)throw CliErrors[_0x269aff(0x1de)]('Role\x20\x22'+_0x5d8d59+_0x269aff(0x226)+_0x323ae2[_0x269aff(0x1f4)](_0x3c4890=>_0x3c4890['id'])[_0x269aff(0x1ea)](',\x20')+').',_0x269aff(0x20f));return _0x323ae2[0x0];}export function projectPageSlot(_0x949396){const _0x2f1a9e=a151_0x714ad8;if(!_0x949396)return null;return{'resourceCode':_0x949396['resourceCode'],'roles':(_0x949396[_0x2f1a9e(0x1ef)]??[])[_0x2f1a9e(0x1f4)](projectRoleRef)};}export function projectPagePermit(_0x33a593){const _0x51f581=a151_0x714ad8,_0x4135b4={'menuId':_0x33a593[_0x51f581(0x204)],'appCode':_0x33a593[_0x51f581(0x1f8)],'menuPermit':projectPageSlot(_0x33a593[_0x51f581(0x1f6)])};for(const _0x2eb9e9 of PAGE_SLOT_SPECS){if(_0x2eb9e9['key']==='menuPermit')continue;_0x4135b4[_0x2eb9e9[_0x51f581(0x209)]]=projectPageSlot(_0x33a593[_0x2eb9e9['key']]);}return _0x4135b4;}export function flattenMenuResources(_0x1e2c81){const _0x2c07c8=new Map(),_0xc36a7b=_0x409a0b=>{const _0x5dd923=a151_0xcb0b;for(const _0x3d65e9 of _0x409a0b??[]){_0x2c07c8['set'](_0x3d65e9[_0x5dd923(0x220)],{'resourceCode':_0x3d65e9['resourceCode'],'resourceName':_0x3d65e9[_0x5dd923(0x21e)],'action':_0x3d65e9['allowedActions']?.[0x0]??'0'});if(_0x3d65e9[_0x5dd923(0x222)])_0xc36a7b(_0x3d65e9['pageNodeList']);}};return _0xc36a7b(_0x1e2c81),_0x2c07c8;}export function flattenApiResources(_0x58df56){const _0x1afb58=a151_0x714ad8,_0x59eff5=new Map(),_0x2a1c15=new Map();for(const _0x192fc0 of _0x58df56){const _0x5976a2=_0x192fc0[_0x1afb58(0x20e)]??{};for(const [_0x385b32,_0xca3abe]of Object['entries'](_0x5976a2)){_0x59eff5[_0x1afb58(0x234)](_0x385b32,{'resourceCode':_0x385b32,'resourceName':_0x192fc0['resourceName'],'datasetCode':_0x192fc0[_0x1afb58(0x1e5)],'action':_0xca3abe?.[0x0]??'0'});const _0x449b1c=_0x2a1c15[_0x1afb58(0x235)](_0x192fc0['datasetCode'])??[];_0x449b1c['push'](_0x385b32),_0x2a1c15[_0x1afb58(0x234)](_0x192fc0[_0x1afb58(0x1e5)],_0x449b1c);}}return{'byCode':_0x59eff5,'byDataset':_0x2a1c15};}export function buildPermits(_0x4ab411,_0x570867){const _0x360bd2=a151_0x714ad8,_0x37df4a={};for(const [_0x4bd36d,_0x107e04]of _0x4ab411){const _0x4017e3=_0x570867[_0x360bd2(0x235)](_0x4bd36d)??_0x107e04[_0x360bd2(0x20d)];_0x37df4a[_0x4bd36d]=[_0x4017e3];}return _0x37df4a;}export function readRoleRef(_0x23f88c){const _0x29d4a2=a151_0x714ad8,_0x4bafe6=_0x23f88c['str'](_0x29d4a2(0x1ed))[_0x29d4a2(0x213)]();if(!_0x4bafe6)throw CliErrors[_0x29d4a2(0x20c)](_0x29d4a2(0x1ed),_0x29d4a2(0x224));return _0x4bafe6;}export function readGrantRevoke(_0x3be3ac){const _0x2a5b5b=a151_0x714ad8,_0x21022b=_0x3be3ac[_0x2a5b5b(0x1f9)](_0x2a5b5b(0x21a)),_0x5e16c1=_0x3be3ac[_0x2a5b5b(0x1f9)](_0x2a5b5b(0x206));if(_0x21022b&&_0x5e16c1)throw CliErrors[_0x2a5b5b(0x1de)](_0x2a5b5b(0x1f1));if(!_0x21022b&&!_0x5e16c1)throw CliErrors[_0x2a5b5b(0x1de)](_0x2a5b5b(0x216),_0x2a5b5b(0x1e1));return _0x21022b?_0x2a5b5b(0x229):'0';}
@@ -1 +1 @@
1
- (function(_0x5b8e13,_0x2ca79f){const _0x4b6c7d=a152_0x229c,_0x598905=_0x5b8e13();while(!![]){try{const _0x2b6421=parseInt(_0x4b6c7d(0x1bc))/0x1*(parseInt(_0x4b6c7d(0x1b2))/0x2)+parseInt(_0x4b6c7d(0x1af))/0x3*(parseInt(_0x4b6c7d(0x1a0))/0x4)+-parseInt(_0x4b6c7d(0x1bd))/0x5+-parseInt(_0x4b6c7d(0x1b0))/0x6+-parseInt(_0x4b6c7d(0x1a1))/0x7*(parseInt(_0x4b6c7d(0x1a6))/0x8)+parseInt(_0x4b6c7d(0x19c))/0x9*(parseInt(_0x4b6c7d(0x1a8))/0xa)+parseInt(_0x4b6c7d(0x1ab))/0xb*(parseInt(_0x4b6c7d(0x1a4))/0xc);if(_0x2b6421===_0x2ca79f)break;else _0x598905['push'](_0x598905['shift']());}catch(_0x110239){_0x598905['push'](_0x598905['shift']());}}}(a152_0x21ed,0x7514d));import{existsSync}from'node:fs';import a152_0x5ef929 from'node:path';import a152_0x141ae0 from'chalk';import{input,confirm}from'@inquirer/prompts';import{getIsSessionValid}from'../../../auth/is-session-valid.js';import{authServer}from'../../../auth/auth-server.js';import{readConfig}from'../../../utils/config.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';function a152_0x21ed(){const _0x7bbfff=['my-app','777212DrLcwf','91mRzPFa','Logged\x20in','env','75012pIgMBk','test','223144ibYOfd','green','1036580mRzdao','\x22\x20already\x20exists','No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','1661tstTME','length','Project\x20name\x20cannot\x20exceed\x2050\x20characters','Skipped','3ubPOjj','3491340WEKMpP','√\x20App\x20Code:\x20','486052fojsWt','Not\x20set','Directory\x20\x22','Project\x20name:','cyan','Login\x20failed','resolve','production','log','trim','1bdbGUJ','2895570VvwQKB','cwd','√\x20Login\x20status:\x20','54uaqzoq','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','string'];a152_0x21ed=function(){return _0x7bbfff;};return a152_0x21ed();}function a152_0x229c(_0x12e91a,_0xdf972d){_0x12e91a=_0x12e91a-0x19a;const _0x21edc7=a152_0x21ed();let _0x229c4c=_0x21edc7[_0x12e91a];return _0x229c4c;}export async function guidedCreateProject(_0x3a51b1,_0x236ecd,_0xa12f70){const _0x196e0d=a152_0x229c,_0x2dea6c=_0x196e0d(0x19f),_0xb51189=readConfig(),_0x3416c8=typeof _0xb51189[_0x196e0d(0x1a3)]===_0x196e0d(0x19e)?_0xb51189[_0x196e0d(0x1a3)]:undefined,_0x3a3e75=await input({'message':_0x196e0d(0x1b5),'default':_0x2dea6c,'validate':_0x3c852c=>{const _0x2d0fde=_0x196e0d,_0x47a651=_0x3c852c[_0x2d0fde(0x1bb)]()||_0x2dea6c;if(_0x47a651[_0x2d0fde(0x1ac)]>0x32)return _0x2d0fde(0x1ad);const _0x119615=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x47a651&&!_0x119615[_0x2d0fde(0x1a5)](_0x47a651))return _0x2d0fde(0x19d);const _0x4c4a5a=a152_0x5ef929[_0x2d0fde(0x1b8)](process[_0x2d0fde(0x19a)](),_0x47a651);if(existsSync(_0x4c4a5a))return _0x2d0fde(0x1b4)+_0x47a651+_0x2d0fde(0x1a9);return!![];}});console[_0x196e0d(0x1ba)](a152_0x141ae0[_0x196e0d(0x1a7)]('√\x20Project\x20Name:\x20'+a152_0x141ae0[_0x196e0d(0x1b6)](_0x3a3e75)));const _0x1ffc2f=await selectSingleAppcode(_0xa12f70);console[_0x196e0d(0x1ba)](a152_0x141ae0[_0x196e0d(0x1a7)](_0x196e0d(0x1b1)+a152_0x141ae0[_0x196e0d(0x1b6)](_0x1ffc2f||_0x196e0d(0x1b3))));if(_0x1ffc2f){const _0x8bb32a=await getIsSessionValid();if(!_0x8bb32a){const _0x114f18=await confirm({'message':_0x196e0d(0x1aa),'default':!![]});if(_0x114f18){const _0xea8fc8=await authServer({'silent':!![]});console['log'](a152_0x141ae0[_0x196e0d(0x1a7)](_0x196e0d(0x19b)+a152_0x141ae0[_0x196e0d(0x1b6)](_0xea8fc8?_0x196e0d(0x1a2):_0x196e0d(0x1b7))));}else console[_0x196e0d(0x1ba)](a152_0x141ae0[_0x196e0d(0x1a7)]('√\x20Login\x20status:\x20'+a152_0x141ae0[_0x196e0d(0x1b6)](_0x196e0d(0x1ae))));}await _0x3a51b1({'projectName':_0x3a3e75,'appCode':_0x1ffc2f,'env':_0x236ecd||_0x3416c8||_0x196e0d(0x1b9)});}else await _0x3a51b1({'projectName':_0x3a3e75,'env':_0x236ecd||_0x3416c8||_0x196e0d(0x1b9)});}
1
+ (function(_0x2193a7,_0x11afb4){const _0x276113=a152_0x66bc,_0xa82ab1=_0x2193a7();while(!![]){try{const _0x10c657=parseInt(_0x276113(0x128))/0x1+-parseInt(_0x276113(0x115))/0x2*(-parseInt(_0x276113(0x116))/0x3)+parseInt(_0x276113(0x11e))/0x4*(parseInt(_0x276113(0x12e))/0x5)+-parseInt(_0x276113(0x118))/0x6+-parseInt(_0x276113(0x123))/0x7*(-parseInt(_0x276113(0x120))/0x8)+-parseInt(_0x276113(0x113))/0x9*(parseInt(_0x276113(0x131))/0xa)+parseInt(_0x276113(0x121))/0xb*(parseInt(_0x276113(0x124))/0xc);if(_0x10c657===_0x11afb4)break;else _0xa82ab1['push'](_0xa82ab1['shift']());}catch(_0x14bbb0){_0xa82ab1['push'](_0xa82ab1['shift']());}}}(a152_0x2770,0x469d4));import{existsSync}from'node:fs';import a152_0x289b26 from'node:path';function a152_0x66bc(_0x3d5e76,_0x275a22){_0x3d5e76=_0x3d5e76-0x113;const _0x277065=a152_0x2770();let _0x66bcfa=_0x277065[_0x3d5e76];return _0x66bcfa;}function a152_0x2770(){const _0x5b9e44=['log','500LlFYNJ','100089XKRvLH','env','914882XsIkCr','3XkKTDa','No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','2682738oRibmN','trim','√\x20App\x20Code:\x20','green','Project\x20name:','Skipped','4TDzPzy','cwd','86696PIuThc','11chUCns','resolve','14PrPBcD','1713468gaMrir','test','string','Logged\x20in','530213mYfRkk','√\x20Project\x20Name:\x20','Project\x20name\x20cannot\x20exceed\x2050\x20characters','my-app','√\x20Login\x20status:\x20','production','701460ZENElg','cyan'];a152_0x2770=function(){return _0x5b9e44;};return a152_0x2770();}import a152_0x138336 from'chalk';import{input,confirm}from'@inquirer/prompts';import{getIsSessionValid}from'../../../auth/is-session-valid.js';import{authServer}from'../../../auth/auth-server.js';import{readConfig}from'../../../utils/config.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';export async function guidedCreateProject(_0x248f1a,_0x17902e,_0x3c0b80){const _0xd1fcae=a152_0x66bc,_0x765a1e=_0xd1fcae(0x12b),_0xf063fe=readConfig(),_0x5b064d=typeof _0xf063fe['env']===_0xd1fcae(0x126)?_0xf063fe[_0xd1fcae(0x114)]:undefined,_0x152a3d=await input({'message':_0xd1fcae(0x11c),'default':_0x765a1e,'validate':_0x3b984f=>{const _0x3e86dd=_0xd1fcae,_0x43e5ed=_0x3b984f[_0x3e86dd(0x119)]()||_0x765a1e;if(_0x43e5ed['length']>0x32)return _0x3e86dd(0x12a);const _0x417401=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x43e5ed&&!_0x417401[_0x3e86dd(0x125)](_0x43e5ed))return'Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_';const _0xb6967b=a152_0x289b26[_0x3e86dd(0x122)](process[_0x3e86dd(0x11f)](),_0x43e5ed);if(existsSync(_0xb6967b))return'Directory\x20\x22'+_0x43e5ed+'\x22\x20already\x20exists';return!![];}});console[_0xd1fcae(0x130)](a152_0x138336[_0xd1fcae(0x11b)](_0xd1fcae(0x129)+a152_0x138336[_0xd1fcae(0x12f)](_0x152a3d)));const _0x49ff08=await selectSingleAppcode(_0x3c0b80);console[_0xd1fcae(0x130)](a152_0x138336[_0xd1fcae(0x11b)](_0xd1fcae(0x11a)+a152_0x138336[_0xd1fcae(0x12f)](_0x49ff08||'Not\x20set')));if(_0x49ff08){const _0x50a940=await getIsSessionValid();if(!_0x50a940){const _0x1ff4e7=await confirm({'message':_0xd1fcae(0x117),'default':!![]});if(_0x1ff4e7){const _0x50acc0=await authServer({'silent':!![]});console[_0xd1fcae(0x130)](a152_0x138336[_0xd1fcae(0x11b)](_0xd1fcae(0x12c)+a152_0x138336['cyan'](_0x50acc0?_0xd1fcae(0x127):'Login\x20failed')));}else console[_0xd1fcae(0x130)](a152_0x138336[_0xd1fcae(0x11b)](_0xd1fcae(0x12c)+a152_0x138336[_0xd1fcae(0x12f)](_0xd1fcae(0x11d))));}await _0x248f1a({'projectName':_0x152a3d,'appCode':_0x49ff08,'env':_0x17902e||_0x5b064d||_0xd1fcae(0x12d)});}else await _0x248f1a({'projectName':_0x152a3d,'env':_0x17902e||_0x5b064d||_0xd1fcae(0x12d)});}
@@ -1 +1 @@
1
- (function(_0x261ebf,_0x4be1c6){const _0x3b6b25=a153_0x202f,_0x22981f=_0x261ebf();while(!![]){try{const _0x176b56=parseInt(_0x3b6b25(0x15e))/0x1*(parseInt(_0x3b6b25(0x162))/0x2)+-parseInt(_0x3b6b25(0x168))/0x3*(-parseInt(_0x3b6b25(0x165))/0x4)+parseInt(_0x3b6b25(0x161))/0x5*(-parseInt(_0x3b6b25(0x15f))/0x6)+-parseInt(_0x3b6b25(0x164))/0x7+parseInt(_0x3b6b25(0x163))/0x8*(-parseInt(_0x3b6b25(0x166))/0x9)+-parseInt(_0x3b6b25(0x167))/0xa+parseInt(_0x3b6b25(0x169))/0xb*(parseInt(_0x3b6b25(0x160))/0xc);if(_0x176b56===_0x4be1c6)break;else _0x22981f['push'](_0x22981f['shift']());}catch(_0x31b950){_0x22981f['push'](_0x22981f['shift']());}}}(a153_0x13a0,0xb23b1));function a153_0x202f(_0x45bf2f,_0x3beb81){_0x45bf2f=_0x45bf2f-0x15d;const _0x13a0ea=a153_0x13a0();let _0x202f7d=_0x13a0ea[_0x45bf2f];return _0x202f7d;}export function formatElapsed(_0x5e608b){const _0x4e8e04=a153_0x202f,_0x5ac916=Date[_0x4e8e04(0x15d)]()-_0x5e608b;if(_0x5ac916<0x3e8)return _0x5ac916+'ms';const _0x5c32f3=(_0x5ac916/0x3e8)['toFixed'](0x2),_0x3b5642=_0x5c32f3['replace'](/\.?0+$/u,'');return _0x3b5642+'s';}function a153_0x13a0(){const _0x4f5de6=['480oBQCXI','156BxmgCR','5085VekAaP','2NspBnE','1819784InIrZe','7969843cFZUJu','8ULcJGr','27SueHvT','7140210vWRtrL','1556493WcWTWq','1071466RLVqIA','now','1042442AsgcDQ'];a153_0x13a0=function(){return _0x4f5de6;};return a153_0x13a0();}
1
+ function a153_0xd5ba(){const _0x4fd61f=['26248gHnVKJ','14KOyHPh','5872869qiFKIF','169456IwZhdP','24446510YGbyDg','replace','6741828LOlznO','8MxFNHn','2842580OmkWXY','1662535WiuJsy','408hmsTDJ'];a153_0xd5ba=function(){return _0x4fd61f;};return a153_0xd5ba();}function a153_0x2d99(_0x4ac479,_0x297de1){_0x4ac479=_0x4ac479-0x1d2;const _0xd5ba0f=a153_0xd5ba();let _0x2d99de=_0xd5ba0f[_0x4ac479];return _0x2d99de;}(function(_0x34bd8a,_0x318d52){const _0x1f71f8=a153_0x2d99,_0x2fa08f=_0x34bd8a();while(!![]){try{const _0xea9608=-parseInt(_0x1f71f8(0x1d6))/0x1*(-parseInt(_0x1f71f8(0x1d8))/0x2)+parseInt(_0x1f71f8(0x1d4))/0x3*(parseInt(_0x1f71f8(0x1d5))/0x4)+-parseInt(_0x1f71f8(0x1d2))/0x5+parseInt(_0x1f71f8(0x1db))/0x6+-parseInt(_0x1f71f8(0x1d3))/0x7*(parseInt(_0x1f71f8(0x1dc))/0x8)+parseInt(_0x1f71f8(0x1d7))/0x9+-parseInt(_0x1f71f8(0x1d9))/0xa;if(_0xea9608===_0x318d52)break;else _0x2fa08f['push'](_0x2fa08f['shift']());}catch(_0xad7d2a){_0x2fa08f['push'](_0x2fa08f['shift']());}}}(a153_0xd5ba,0x937e3));export function formatElapsed(_0x261257){const _0x1f4742=a153_0x2d99,_0x2095b4=Date['now']()-_0x261257;if(_0x2095b4<0x3e8)return _0x2095b4+'ms';const _0x57767b=(_0x2095b4/0x3e8)['toFixed'](0x2),_0x1e7c9c=_0x57767b[_0x1f4742(0x1da)](/\.?0+$/u,'');return _0x1e7c9c+'s';}
@@ -1 +1 @@
1
- (function(_0x4449b9,_0x58cf80){const _0x3f5322=a154_0x4eec,_0x32c246=_0x4449b9();while(!![]){try{const _0x472397=parseInt(_0x3f5322(0x1e0))/0x1*(parseInt(_0x3f5322(0x1d2))/0x2)+-parseInt(_0x3f5322(0x1c8))/0x3*(-parseInt(_0x3f5322(0x1b4))/0x4)+-parseInt(_0x3f5322(0x1d8))/0x5+parseInt(_0x3f5322(0x1a1))/0x6+-parseInt(_0x3f5322(0x19d))/0x7+parseInt(_0x3f5322(0x1bd))/0x8+-parseInt(_0x3f5322(0x185))/0x9;if(_0x472397===_0x58cf80)break;else _0x32c246['push'](_0x32c246['shift']());}catch(_0x166864){_0x32c246['push'](_0x32c246['shift']());}}}(a154_0x166b,0x1cd51));import a154_0x30488c from'path';import a154_0x208f02 from'fs';import a154_0x271594 from'chalk';function a154_0x166b(){const _0x5105a1=['green','配置应用AppCode:\x20','resolve','39248gfDFHg','defaultApp','info','\x20Generated\x20by\x20rabetbase\x20cli\x20','production','580086QtbRqJ','gray','projectCode','更新\x20package.json\x20失败','cyan','accessSync','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','currentVersion','existsSync','constants','fail','API\x20配置拉取异常','env','更新\x20package.json\x20name','parse','error','length','√\x20package.json\x20updated:\x20name=','Project\x20directory\x20','1.0.0','log','项目创建完成:\x20','version','projectName','282499JqPbvX','W_OK','🚀\x20Next\x20Steps:','dirname','62016kjqkyy','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','\x20api\x20pull','join','\x20\x201.\x20Start\x20project:\x20','name','apps','repeat','modelCount','CLI\x20版本检查','appCode','\x20√\x20','stableVersion','description','...','cd\x20','\x20|\x20Default:\x20','message','*\x20Pulling\x20API\x20configuration...','8hfNdhC','\x20dataset(s),\x20generated\x20','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','needsUpgrade','cookie','minimumVersion','utf8','string','create','44696yUiqwq','rmSync','Copy\x20project\x20files','√\x20Pulled\x20','\x20already\x20exists','Project\x20name\x20cannot\x20be\x20empty','setLogPath','stop','清理项目目录失败:\x20','*\x20Configuring\x20AppCode\x20for\x20project\x20','test','270939XqArCq','stringify','readFileSync','success','chdir','bold','trim','keys','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','package.json','6KDsAhF','\x20run\x20start','belowMinimum','开始创建项目:\x20','cwd','\x20model(s)','456925VJcraB','Project\x20name:\x20','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','warn'];a154_0x166b=function(){return _0x5105a1;};return a154_0x166b();}import a154_0x536b75 from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{readConfig}from'../../../utils/config.js';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';import{logger}from'../../../utils/logger.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';export async function createApp(_0x552237){const _0x4140e8=a154_0x4eec,_0x468f3f=await checkCliVersion();(_0x468f3f[_0x4140e8(0x1b7)]||_0x468f3f[_0x4140e8(0x1d4)])&&(printCliUpgradeWarning(_0x468f3f),assertCliVersionSupported(_0x468f3f),logger[_0x4140e8(0x1e2)](_0x4140e8(0x1bc),_0x4140e8(0x1aa),{'currentVersion':_0x468f3f[_0x4140e8(0x18c)],'stableVersion':_0x468f3f[_0x4140e8(0x1ad)],'minimumVersion':_0x468f3f[_0x4140e8(0x1b9)],'needsUpgrade':_0x468f3f[_0x4140e8(0x1b7)],'belowMinimum':_0x468f3f[_0x4140e8(0x1d4)]}));if(_0x552237['projectCode']&&_0x552237['appCode'])await runCreate({'projectName':_0x552237[_0x4140e8(0x187)],'appCode':_0x552237[_0x4140e8(0x1ab)],'env':_0x552237['env']},_0x552237);else{if(_0x552237[_0x4140e8(0x187)]){const _0x5bc8da=await selectSingleAppcode(_0x552237[_0x4140e8(0x1b8)]);await runCreate({'projectName':_0x552237[_0x4140e8(0x187)],'appCode':_0x5bc8da||undefined,'env':_0x552237['env']},_0x552237);}else await guidedCreateProject(_0x3eb6f5=>runCreate(_0x3eb6f5,_0x552237),_0x552237[_0x4140e8(0x191)],_0x552237[_0x4140e8(0x1b8)]);}}async function runCreate(_0x2cb40c,_0x36efdf){const _0x159e98=a154_0x4eec;if(!_0x2cb40c[_0x159e98(0x19c)]||_0x2cb40c[_0x159e98(0x19c)][_0x159e98(0x1ce)]()==='')throw new Error(_0x159e98(0x1c2));const _0x1904d1=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x1904d1[_0x159e98(0x1c7)](_0x2cb40c['projectName']))throw new Error(_0x159e98(0x1d0));if(_0x2cb40c['projectName'][_0x159e98(0x195)]>0x64)throw new Error(_0x159e98(0x1b6));const _0x14c173=a154_0x30488c[_0x159e98(0x1df)](process[_0x159e98(0x1d6)](),_0x2cb40c[_0x159e98(0x19c)]);if(a154_0x208f02[_0x159e98(0x18d)](_0x14c173))throw new Error(_0x159e98(0x197)+_0x2cb40c[_0x159e98(0x19c)]+_0x159e98(0x1c1));try{a154_0x208f02[_0x159e98(0x18a)](a154_0x30488c[_0x159e98(0x1a0)](_0x14c173),a154_0x208f02[_0x159e98(0x18e)][_0x159e98(0x19e)]);}catch{throw new Error(_0x159e98(0x1db));}logger[_0x159e98(0x1c3)](_0x14c173),logger[_0x159e98(0x1e2)](_0x159e98(0x1bc),_0x159e98(0x1d5)+_0x2cb40c[_0x159e98(0x19c)],{'projectDir':_0x14c173,'appCode':_0x2cb40c[_0x159e98(0x1ab)]}),console[_0x159e98(0x199)](),console['log'](a154_0x271594['green']('\x20√\x20')+_0x159e98(0x1d9)+a154_0x271594[_0x159e98(0x1dd)](_0x2cb40c[_0x159e98(0x19c)])+(_0x2cb40c[_0x159e98(0x1ab)]?'\x20|\x20AppCode:\x20'+a154_0x271594['cyan'](_0x2cb40c[_0x159e98(0x1ab)]):''));try{await runTask(_0x159e98(0x1bf),()=>copyProjectTemplate(_0x2cb40c[_0x159e98(0x19c)])),await updatePackageJsonName(_0x2cb40c[_0x159e98(0x19c)]),await runTask('Install\x20dependencies',()=>installDependencies(_0x2cb40c[_0x159e98(0x19c)])),await runTask('Format\x20code',()=>formatProjectCode(_0x2cb40c['projectName'])),await configureAppCode(_0x2cb40c[_0x159e98(0x19c)],_0x2cb40c[_0x159e98(0x1ab)]||'',_0x2cb40c[_0x159e98(0x191)]);let _0x3038ea=![];if(_0x2cb40c[_0x159e98(0x1ab)]){console[_0x159e98(0x199)](_0x159e98(0x1b3));const _0x2d87d3=process[_0x159e98(0x1d6)]();try{process[_0x159e98(0x1cc)](_0x14c173);const _0x3200f7=_0x2cb40c[_0x159e98(0x191)]||_0x159e98(0x1e4);initEnv(_0x3200f7);const {configArray:_0x1b314f}=await fetchModelList(_0x2cb40c[_0x159e98(0x1ab)],_0x36efdf[_0x159e98(0x1b8)]||''),_0x1db400=DEFAULT_API_DIR,_0x256abb=await generateApiFile(_0x1b314f,'',_0x2cb40c[_0x159e98(0x1ab)],!![],_0x3200f7,_0x1db400);console['log'](_0x159e98(0x1c0)+_0x1b314f[_0x159e98(0x195)]+_0x159e98(0x1b5)+_0x256abb[_0x159e98(0x1a9)]+_0x159e98(0x1d7)),logger['info']('create','API\x20configuration\x20pulled:\x20'+_0x2cb40c[_0x159e98(0x1ab)]);}catch(_0x5879f5){_0x3038ea=!![],console['log'](_0x159e98(0x1da)),logger[_0x159e98(0x1dc)](_0x159e98(0x1bc),_0x159e98(0x190),{'error':_0x5879f5 instanceof Error?_0x5879f5['message']:String(_0x5879f5)});}finally{process[_0x159e98(0x1cc)](_0x2d87d3);}}logger[_0x159e98(0x1cb)]('create',_0x159e98(0x19a)+_0x2cb40c['projectName']),console[_0x159e98(0x199)](),console[_0x159e98(0x199)](a154_0x271594[_0x159e98(0x1dd)]('─'[_0x159e98(0x1a8)](0x3c))),console[_0x159e98(0x199)](a154_0x271594['cyan'][_0x159e98(0x1cd)](_0x159e98(0x19f))),console[_0x159e98(0x199)](),console[_0x159e98(0x199)](_0x159e98(0x1a5)+a154_0x271594['cyan']['bold'](_0x159e98(0x1b0)+_0x2cb40c[_0x159e98(0x19c)]+'\x20&&\x20'+CLI_BIN_NAME+_0x159e98(0x1d3))),_0x3038ea&&console[_0x159e98(0x199)]('\x20\x202.\x20Pull\x20API\x20configuration:\x20'+a154_0x271594[_0x159e98(0x189)][_0x159e98(0x1cd)](CLI_BIN_NAME+_0x159e98(0x1a3))),console[_0x159e98(0x199)](a154_0x271594[_0x159e98(0x1dd)]('─'[_0x159e98(0x1a8)](0x3c)));}catch(_0x5b726e){logger[_0x159e98(0x194)](_0x159e98(0x1bc),'项目创建失败:\x20'+_0x2cb40c[_0x159e98(0x19c)],{'error':_0x5b726e instanceof Error?_0x5b726e[_0x159e98(0x1b2)]:String(_0x5b726e)});try{a154_0x208f02['existsSync'](_0x14c173)&&(console[_0x159e98(0x199)](_0x159e98(0x18b)+_0x14c173),a154_0x208f02[_0x159e98(0x1be)](_0x14c173,{'recursive':!![],'force':!![]}));}catch{logger[_0x159e98(0x1dc)](_0x159e98(0x1bc),_0x159e98(0x1c5)+_0x14c173);}throw _0x5b726e;}}function a154_0x4eec(_0xeef159,_0xf4ba95){_0xeef159=_0xeef159-0x185;const _0x166bf1=a154_0x166b();let _0x4eec19=_0x166bf1[_0xeef159];return _0x4eec19;}async function runTask(_0x13762b,_0x1dbcea){const _0x2ed032=a154_0x4eec,_0x3ad87d=a154_0x536b75(_0x13762b+_0x2ed032(0x1af))['start']();try{const _0x3967fb=await _0x1dbcea();_0x3ad87d[_0x2ed032(0x1c4)](),console['log'](''+a154_0x271594['green'](_0x2ed032(0x1ac))+_0x13762b+'\x20'+a154_0x271594[_0x2ed032(0x186)]('['+_0x3967fb+']'));}catch(_0x5cabe1){_0x3ad87d[_0x2ed032(0x18f)](_0x13762b);throw _0x5cabe1;}}async function updatePackageJsonName(_0x5889d0){const _0x37b5d8=a154_0x4eec,_0x30698f=a154_0x30488c['resolve'](process['cwd'](),_0x5889d0),_0x2c3f7a=a154_0x30488c[_0x37b5d8(0x1a4)](_0x30698f,_0x37b5d8(0x1d1));try{console[_0x37b5d8(0x199)]('*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields');const _0x13b868=getRabetbaseCliPackageRoot(),_0x30d60b=a154_0x30488c['join'](_0x13b868,_0x37b5d8(0x1d1));let _0x11e31b='1.0.0';try{const _0x145960=JSON['parse'](a154_0x208f02[_0x37b5d8(0x1ca)](_0x30d60b,'utf8'));_0x11e31b=_0x145960[_0x37b5d8(0x19b)]||_0x37b5d8(0x198);}catch{}const _0x3dad00=a154_0x208f02[_0x37b5d8(0x1ca)](_0x2c3f7a,_0x37b5d8(0x1ba)),_0x7e385=JSON[_0x37b5d8(0x193)](_0x3dad00);_0x7e385[_0x37b5d8(0x1a6)]=_0x5889d0,_0x7e385[_0x37b5d8(0x1ae)]=_0x5889d0+_0x37b5d8(0x1e3)+_0x11e31b,a154_0x208f02['writeFileSync'](_0x2c3f7a,JSON[_0x37b5d8(0x1c9)](_0x7e385,null,0x2)+'\x0a',_0x37b5d8(0x1ba)),console[_0x37b5d8(0x199)](_0x37b5d8(0x196)+_0x5889d0),logger[_0x37b5d8(0x1e2)](_0x37b5d8(0x1bc),_0x37b5d8(0x192));}catch(_0x43158d){logger[_0x37b5d8(0x194)](_0x37b5d8(0x1bc),_0x37b5d8(0x188));throw _0x43158d;}}async function configureAppCode(_0x39a160,_0x2ba484,_0x2f3981){const _0x4fda52=a154_0x4eec,_0x2397d9=a154_0x30488c[_0x4fda52(0x1df)](process[_0x4fda52(0x1d6)](),_0x39a160),_0x22d55e=a154_0x30488c[_0x4fda52(0x1a4)](_0x2397d9,NEW_CONFIG_NAME);try{_0x2ba484?console[_0x4fda52(0x199)](_0x4fda52(0x1c6)+_0x39a160+':\x20'+_0x2ba484):console['log'](_0x4fda52(0x1a2)+_0x39a160);const _0x4aaf4d=getRabetbaseCliPackageRoot(),_0x4b4b1d=a154_0x30488c[_0x4fda52(0x1a4)](_0x4aaf4d,_0x4fda52(0x1d1));let _0x32f097=_0x4fda52(0x198);try{const _0x4dfa6b=JSON[_0x4fda52(0x193)](a154_0x208f02[_0x4fda52(0x1ca)](_0x4b4b1d,'utf8'));_0x32f097=_0x4dfa6b['version']||_0x4fda52(0x198);}catch{}const _0x304b86=readConfig(),_0x379b82=typeof _0x304b86['env']===_0x4fda52(0x1bb)?_0x304b86['env']:undefined,_0x11a379={};for(const _0x533e47 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x304b86[_0x533e47]!=null)_0x11a379[_0x533e47]=_0x304b86[_0x533e47];}const _0x4eec22=buildCanonicalProjectConfig(_0x11a379,{'appCodes':_0x2ba484?[_0x2ba484]:[],'env':_0x2f3981||_0x379b82||_0x4fda52(0x1e4),'metadata':{'createdAt':new Date()['toLocaleString'](),'version':_0x32f097}});writeConfigFile(_0x22d55e,_0x4eec22),_0x2ba484?console[_0x4fda52(0x199)]('√\x20Configuration\x20file\x20created,\x20Apps:\x20'+Object[_0x4fda52(0x1cf)](_0x4eec22[_0x4fda52(0x1a7)]||{})[_0x4fda52(0x1a4)](',\x20')+_0x4fda52(0x1b1)+_0x4eec22[_0x4fda52(0x1e1)]):console[_0x4fda52(0x199)]('√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27'+CLI_BIN_NAME+'\x20config\x20set\x20appcode\x20<app-code>\x27'),logger[_0x4fda52(0x1e2)](_0x4fda52(0x1bc),_0x4fda52(0x1de)+_0x2ba484);}catch(_0x2165ca){logger['error'](_0x4fda52(0x1bc),'配置应用AppCode失败');}}
1
+ (function(_0x489807,_0x8ade53){const _0x9f8fa5=a154_0x31f7,_0x324de0=_0x489807();while(!![]){try{const _0x3ca3f6=parseInt(_0x9f8fa5(0x10a))/0x1+-parseInt(_0x9f8fa5(0xf5))/0x2+-parseInt(_0x9f8fa5(0x111))/0x3*(parseInt(_0x9f8fa5(0x10b))/0x4)+parseInt(_0x9f8fa5(0xe2))/0x5*(-parseInt(_0x9f8fa5(0xea))/0x6)+-parseInt(_0x9f8fa5(0x11b))/0x7+-parseInt(_0x9f8fa5(0x108))/0x8+parseInt(_0x9f8fa5(0xd4))/0x9;if(_0x3ca3f6===_0x8ade53)break;else _0x324de0['push'](_0x324de0['shift']());}catch(_0x41da1d){_0x324de0['push'](_0x324de0['shift']());}}}(a154_0x5333,0x79eb3));import a154_0x1c4608 from'path';import a154_0x4c40ce from'fs';import a154_0x23c5ea from'chalk';import a154_0x3e6580 from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{readConfig}from'../../../utils/config.js';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';function a154_0x31f7(_0x54d93e,_0x4b4f3a){_0x54d93e=_0x54d93e-0xc5;const _0x533362=a154_0x5333();let _0x31f731=_0x533362[_0x54d93e];return _0x31f731;}import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';function a154_0x5333(){const _0x7417c8=['stringify','repeat','\x20|\x20Default:\x20','projectCode','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','6CKcWjO','Project\x20directory\x20','Project\x20name\x20cannot\x20be\x20empty','1.0.0','cwd','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','...','配置应用AppCode失败','error','env','readFileSync','1582656qfAWYx','\x20run\x20start','\x20model(s)','writeFileSync','\x20√\x20','join','utf8','CLI\x20版本检查','*\x20Pulling\x20API\x20configuration...','toLocaleString','chdir','version','needsUpgrade','green','appCode','Install\x20dependencies','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','production','bold','645816FRJVzv','apps','522368HyDViS','201844KAfqsx','package.json','keys','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','\x20|\x20AppCode:\x20','cyan','3PZjrgy','\x20api\x20pull','API\x20配置拉取异常','\x20already\x20exists','success','log','create','项目创建完成:\x20','stop','warn','5646648kLWCNp','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','项目创建失败:\x20','dirname','更新\x20package.json\x20name','description','setLogPath','start','🚀\x20Next\x20Steps:','Format\x20code','string','message','\x20Generated\x20by\x20rabetbase\x20cli\x20','\x20dataset(s),\x20generated\x20','\x20\x202.\x20Pull\x20API\x20configuration:\x20','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','existsSync','16688340zoBlWx','modelCount','parse','projectName','更新\x20package.json\x20失败','√\x20Configuration\x20file\x20created,\x20Apps:\x20','currentVersion','\x20config\x20set\x20appcode\x20<app-code>\x27','cookie','*\x20Configuring\x20AppCode\x20for\x20project\x20','resolve','belowMinimum','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','info','740345LXxWeI','length','配置应用AppCode:\x20'];a154_0x5333=function(){return _0x7417c8;};return a154_0x5333();}import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';import{logger}from'../../../utils/logger.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';export async function createApp(_0xc1f49b){const _0x1a4736=a154_0x31f7,_0x4dcf6e=await checkCliVersion();(_0x4dcf6e[_0x1a4736(0x101)]||_0x4dcf6e['belowMinimum'])&&(printCliUpgradeWarning(_0x4dcf6e),assertCliVersionSupported(_0x4dcf6e),logger['info'](_0x1a4736(0x117),_0x1a4736(0xfc),{'currentVersion':_0x4dcf6e[_0x1a4736(0xda)],'stableVersion':_0x4dcf6e['stableVersion'],'minimumVersion':_0x4dcf6e['minimumVersion'],'needsUpgrade':_0x4dcf6e[_0x1a4736(0x101)],'belowMinimum':_0x4dcf6e[_0x1a4736(0xdf)]}));if(_0xc1f49b[_0x1a4736(0xe8)]&&_0xc1f49b['appCode'])await runCreate({'projectName':_0xc1f49b['projectCode'],'appCode':_0xc1f49b[_0x1a4736(0x103)],'env':_0xc1f49b[_0x1a4736(0xf3)]},_0xc1f49b);else{if(_0xc1f49b[_0x1a4736(0xe8)]){const _0x208a8c=await selectSingleAppcode(_0xc1f49b[_0x1a4736(0xdc)]);await runCreate({'projectName':_0xc1f49b['projectCode'],'appCode':_0x208a8c||undefined,'env':_0xc1f49b[_0x1a4736(0xf3)]},_0xc1f49b);}else await guidedCreateProject(_0x2f7b14=>runCreate(_0x2f7b14,_0xc1f49b),_0xc1f49b[_0x1a4736(0xf3)],_0xc1f49b[_0x1a4736(0xdc)]);}}async function runCreate(_0x1388fe,_0x1f9fe5){const _0x4cb3e0=a154_0x31f7;if(!_0x1388fe[_0x4cb3e0(0xd7)]||_0x1388fe[_0x4cb3e0(0xd7)]['trim']()==='')throw new Error(_0x4cb3e0(0xec));const _0x5d558a=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x5d558a['test'](_0x1388fe[_0x4cb3e0(0xd7)]))throw new Error(_0x4cb3e0(0xd2));if(_0x1388fe[_0x4cb3e0(0xd7)][_0x4cb3e0(0xe3)]>0x64)throw new Error(_0x4cb3e0(0xef));const _0x1e1aef=a154_0x1c4608[_0x4cb3e0(0xde)](process['cwd'](),_0x1388fe[_0x4cb3e0(0xd7)]);if(a154_0x4c40ce[_0x4cb3e0(0xd3)](_0x1e1aef))throw new Error(_0x4cb3e0(0xeb)+_0x1388fe[_0x4cb3e0(0xd7)]+_0x4cb3e0(0x114));try{a154_0x4c40ce['accessSync'](a154_0x1c4608[_0x4cb3e0(0xc6)](_0x1e1aef),a154_0x4c40ce['constants']['W_OK']);}catch{throw new Error('Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions');}logger[_0x4cb3e0(0xc9)](_0x1e1aef),logger[_0x4cb3e0(0xe1)](_0x4cb3e0(0x117),'开始创建项目:\x20'+_0x1388fe[_0x4cb3e0(0xd7)],{'projectDir':_0x1e1aef,'appCode':_0x1388fe['appCode']}),console[_0x4cb3e0(0x116)](),console['log'](a154_0x23c5ea[_0x4cb3e0(0x102)](_0x4cb3e0(0xf9))+'Project\x20name:\x20'+a154_0x23c5ea[_0x4cb3e0(0x102)](_0x1388fe[_0x4cb3e0(0xd7)])+(_0x1388fe[_0x4cb3e0(0x103)]?_0x4cb3e0(0x10f)+a154_0x23c5ea[_0x4cb3e0(0x110)](_0x1388fe['appCode']):''));try{await runTask('Copy\x20project\x20files',()=>copyProjectTemplate(_0x1388fe[_0x4cb3e0(0xd7)])),await updatePackageJsonName(_0x1388fe[_0x4cb3e0(0xd7)]),await runTask(_0x4cb3e0(0x104),()=>installDependencies(_0x1388fe['projectName'])),await runTask(_0x4cb3e0(0xcc),()=>formatProjectCode(_0x1388fe[_0x4cb3e0(0xd7)])),await configureAppCode(_0x1388fe['projectName'],_0x1388fe[_0x4cb3e0(0x103)]||'',_0x1388fe[_0x4cb3e0(0xf3)]);let _0x46870e=![];if(_0x1388fe['appCode']){console['log'](_0x4cb3e0(0xfd));const _0x4d2345=process[_0x4cb3e0(0xee)]();try{process['chdir'](_0x1e1aef);const _0x33c793=_0x1388fe[_0x4cb3e0(0xf3)]||_0x4cb3e0(0x106);initEnv(_0x33c793);const {configArray:_0x4d2235}=await fetchModelList(_0x1388fe[_0x4cb3e0(0x103)],_0x1f9fe5[_0x4cb3e0(0xdc)]||''),_0x2cc289=DEFAULT_API_DIR,_0x226ea3=await generateApiFile(_0x4d2235,'',_0x1388fe[_0x4cb3e0(0x103)],!![],_0x33c793,_0x2cc289);console[_0x4cb3e0(0x116)]('√\x20Pulled\x20'+_0x4d2235[_0x4cb3e0(0xe3)]+_0x4cb3e0(0xd0)+_0x226ea3[_0x4cb3e0(0xd5)]+_0x4cb3e0(0xf7)),logger[_0x4cb3e0(0xe1)]('create','API\x20configuration\x20pulled:\x20'+_0x1388fe[_0x4cb3e0(0x103)]);}catch(_0x2e3af4){_0x46870e=!![],console[_0x4cb3e0(0x116)](_0x4cb3e0(0xe9)),logger[_0x4cb3e0(0x11a)](_0x4cb3e0(0x117),_0x4cb3e0(0x113),{'error':_0x2e3af4 instanceof Error?_0x2e3af4[_0x4cb3e0(0xce)]:String(_0x2e3af4)});}finally{process[_0x4cb3e0(0xff)](_0x4d2345);}}logger[_0x4cb3e0(0x115)](_0x4cb3e0(0x117),_0x4cb3e0(0x118)+_0x1388fe[_0x4cb3e0(0xd7)]),console[_0x4cb3e0(0x116)](),console[_0x4cb3e0(0x116)](a154_0x23c5ea['green']('─'[_0x4cb3e0(0xe6)](0x3c))),console[_0x4cb3e0(0x116)](a154_0x23c5ea[_0x4cb3e0(0x110)][_0x4cb3e0(0x107)](_0x4cb3e0(0xcb))),console[_0x4cb3e0(0x116)](),console[_0x4cb3e0(0x116)]('\x20\x201.\x20Start\x20project:\x20'+a154_0x23c5ea['cyan'][_0x4cb3e0(0x107)]('cd\x20'+_0x1388fe[_0x4cb3e0(0xd7)]+'\x20&&\x20'+CLI_BIN_NAME+_0x4cb3e0(0xf6))),_0x46870e&&console[_0x4cb3e0(0x116)](_0x4cb3e0(0xd1)+a154_0x23c5ea[_0x4cb3e0(0x110)][_0x4cb3e0(0x107)](CLI_BIN_NAME+_0x4cb3e0(0x112))),console[_0x4cb3e0(0x116)](a154_0x23c5ea[_0x4cb3e0(0x102)]('─'[_0x4cb3e0(0xe6)](0x3c)));}catch(_0x4b40e7){logger[_0x4cb3e0(0xf2)](_0x4cb3e0(0x117),_0x4cb3e0(0xc5)+_0x1388fe['projectName'],{'error':_0x4b40e7 instanceof Error?_0x4b40e7[_0x4cb3e0(0xce)]:String(_0x4b40e7)});try{a154_0x4c40ce['existsSync'](_0x1e1aef)&&(console[_0x4cb3e0(0x116)](_0x4cb3e0(0x105)+_0x1e1aef),a154_0x4c40ce['rmSync'](_0x1e1aef,{'recursive':!![],'force':!![]}));}catch{logger[_0x4cb3e0(0x11a)](_0x4cb3e0(0x117),'清理项目目录失败:\x20'+_0x1e1aef);}throw _0x4b40e7;}}async function runTask(_0x1fa2d6,_0x58d33f){const _0x5b9aa2=a154_0x31f7,_0x21827d=a154_0x3e6580(_0x1fa2d6+_0x5b9aa2(0xf0))[_0x5b9aa2(0xca)]();try{const _0x4ccd21=await _0x58d33f();_0x21827d[_0x5b9aa2(0x119)](),console['log'](''+a154_0x23c5ea[_0x5b9aa2(0x102)]('\x20√\x20')+_0x1fa2d6+'\x20'+a154_0x23c5ea['gray']('['+_0x4ccd21+']'));}catch(_0x20a9a5){_0x21827d['fail'](_0x1fa2d6);throw _0x20a9a5;}}async function updatePackageJsonName(_0x23ed8a){const _0x22e138=a154_0x31f7,_0x23b9c8=a154_0x1c4608[_0x22e138(0xde)](process[_0x22e138(0xee)](),_0x23ed8a),_0x349a56=a154_0x1c4608[_0x22e138(0xfa)](_0x23b9c8,_0x22e138(0x10c));try{console[_0x22e138(0x116)](_0x22e138(0x11c));const _0x139d03=getRabetbaseCliPackageRoot(),_0x4cf360=a154_0x1c4608[_0x22e138(0xfa)](_0x139d03,_0x22e138(0x10c));let _0x287f24=_0x22e138(0xed);try{const _0x1bac1f=JSON['parse'](a154_0x4c40ce[_0x22e138(0xf4)](_0x4cf360,'utf8'));_0x287f24=_0x1bac1f[_0x22e138(0x100)]||'1.0.0';}catch{}const _0x328762=a154_0x4c40ce[_0x22e138(0xf4)](_0x349a56,_0x22e138(0xfb)),_0x2783ab=JSON[_0x22e138(0xd6)](_0x328762);_0x2783ab['name']=_0x23ed8a,_0x2783ab[_0x22e138(0xc8)]=_0x23ed8a+_0x22e138(0xcf)+_0x287f24,a154_0x4c40ce[_0x22e138(0xf8)](_0x349a56,JSON[_0x22e138(0xe5)](_0x2783ab,null,0x2)+'\x0a',_0x22e138(0xfb)),console[_0x22e138(0x116)]('√\x20package.json\x20updated:\x20name='+_0x23ed8a),logger[_0x22e138(0xe1)]('create',_0x22e138(0xc7));}catch(_0x193d5a){logger[_0x22e138(0xf2)](_0x22e138(0x117),_0x22e138(0xd8));throw _0x193d5a;}}async function configureAppCode(_0x251052,_0x29ec47,_0x1a5b52){const _0x4dff74=a154_0x31f7,_0x3ecb12=a154_0x1c4608['resolve'](process[_0x4dff74(0xee)](),_0x251052),_0x3d7749=a154_0x1c4608[_0x4dff74(0xfa)](_0x3ecb12,NEW_CONFIG_NAME);try{_0x29ec47?console[_0x4dff74(0x116)](_0x4dff74(0xdd)+_0x251052+':\x20'+_0x29ec47):console['log'](_0x4dff74(0xe0)+_0x251052);const _0x23dfc3=getRabetbaseCliPackageRoot(),_0x4bca39=a154_0x1c4608['join'](_0x23dfc3,_0x4dff74(0x10c));let _0x13e953=_0x4dff74(0xed);try{const _0x1def39=JSON[_0x4dff74(0xd6)](a154_0x4c40ce[_0x4dff74(0xf4)](_0x4bca39,_0x4dff74(0xfb)));_0x13e953=_0x1def39[_0x4dff74(0x100)]||_0x4dff74(0xed);}catch{}const _0x101f37=readConfig(),_0x5c3bf2=typeof _0x101f37['env']===_0x4dff74(0xcd)?_0x101f37[_0x4dff74(0xf3)]:undefined,_0x19d9fd={};for(const _0x45a067 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x101f37[_0x45a067]!=null)_0x19d9fd[_0x45a067]=_0x101f37[_0x45a067];}const _0x2eaa75=buildCanonicalProjectConfig(_0x19d9fd,{'appCodes':_0x29ec47?[_0x29ec47]:[],'env':_0x1a5b52||_0x5c3bf2||_0x4dff74(0x106),'metadata':{'createdAt':new Date()[_0x4dff74(0xfe)](),'version':_0x13e953}});writeConfigFile(_0x3d7749,_0x2eaa75),_0x29ec47?console['log'](_0x4dff74(0xd9)+Object[_0x4dff74(0x10d)](_0x2eaa75[_0x4dff74(0x109)]||{})[_0x4dff74(0xfa)](',\x20')+_0x4dff74(0xe7)+_0x2eaa75['defaultApp']):console[_0x4dff74(0x116)](_0x4dff74(0x10e)+CLI_BIN_NAME+_0x4dff74(0xdb)),logger['info'](_0x4dff74(0x117),_0x4dff74(0xe4)+_0x29ec47);}catch(_0xc9835f){logger['error'](_0x4dff74(0x117),_0x4dff74(0xf1));}}
@@ -1 +1 @@
1
- function a155_0x3e28(_0x2ec4d7,_0x533f3b){_0x2ec4d7=_0x2ec4d7-0x177;const _0x58e535=a155_0x58e5();let _0x3e28c0=_0x58e535[_0x2ec4d7];return _0x3e28c0;}(function(_0x39a243,_0x1966dc){const _0x40209e=a155_0x3e28,_0x2cbf96=_0x39a243();while(!![]){try{const _0x1ccba2=parseInt(_0x40209e(0x19f))/0x1*(-parseInt(_0x40209e(0x17c))/0x2)+parseInt(_0x40209e(0x17b))/0x3+parseInt(_0x40209e(0x1a1))/0x4+parseInt(_0x40209e(0x1a9))/0x5+parseInt(_0x40209e(0x187))/0x6*(parseInt(_0x40209e(0x19d))/0x7)+parseInt(_0x40209e(0x1af))/0x8*(-parseInt(_0x40209e(0x198))/0x9)+-parseInt(_0x40209e(0x192))/0xa;if(_0x1ccba2===_0x1966dc)break;else _0x2cbf96['push'](_0x2cbf96['shift']());}catch(_0x355f75){_0x2cbf96['push'](_0x2cbf96['shift']());}}}(a155_0x58e5,0xc03eb));import a155_0x5cc30f from'path';import a155_0x27ee9a from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{readConfig}from'../../../utils/config.js';import{getCliVersion}from'../../../utils/version.js';import{CliErrors}from'../../../errors.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';const execAsync=promisify(exec);export async function createProjectNonInteractive(_0x592b06,_0x1c57d1,_0x315614,_0x1bbd73){const _0x15c4ea=a155_0x3e28,_0x2a5f95=await checkCliVersion();(_0x2a5f95[_0x15c4ea(0x1ad)]||_0x2a5f95[_0x15c4ea(0x18b)])&&(printCliUpgradeWarning(_0x2a5f95),assertCliVersionSupported(_0x2a5f95));if(!_0x592b06||_0x592b06[_0x15c4ea(0x1aa)]()==='')throw CliErrors[_0x15c4ea(0x17e)](_0x15c4ea(0x1b1));const _0x475fae=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x475fae['test'](_0x592b06))throw CliErrors[_0x15c4ea(0x17e)](_0x15c4ea(0x1a3),_0x15c4ea(0x183));if(_0x592b06[_0x15c4ea(0x181)]>0x64)throw CliErrors[_0x15c4ea(0x17e)](_0x15c4ea(0x177));const _0x41d8f2=a155_0x5cc30f[_0x15c4ea(0x179)](process[_0x15c4ea(0x195)](),_0x592b06);if(existsSync(_0x41d8f2))throw CliErrors[_0x15c4ea(0x17e)](_0x15c4ea(0x191)+_0x592b06+_0x15c4ea(0x1a8),_0x15c4ea(0x186));try{const _0x1a3fb8=a155_0x5cc30f[_0x15c4ea(0x1ac)](_0x41d8f2);await a155_0x27ee9a[_0x15c4ea(0x19e)](_0x1a3fb8,a155_0x27ee9a[_0x15c4ea(0x18f)][_0x15c4ea(0x19b)]);}catch{throw CliErrors['validation'](_0x15c4ea(0x1a2),'Check\x20directory\x20permissions.');}try{console[_0x15c4ea(0x17a)]('*\x20Creating\x20project\x20'+_0x592b06+_0x15c4ea(0x18e));const _0x19cabd=getSubAppReactDemoTemplateDir();await copyDirectory(_0x19cabd,_0x41d8f2),console[_0x15c4ea(0x17a)](_0x15c4ea(0x1a6)),await updatePackageJsonName(_0x592b06),console['log'](_0x15c4ea(0x19a)),console[_0x15c4ea(0x17a)](_0x15c4ea(0x189)),console[_0x15c4ea(0x17a)](_0x15c4ea(0x194)),await formatCode(_0x41d8f2),console['log']('\x20\x20√\x20Code\x20formatted'),await configureProject(_0x592b06,_0x315614,_0x1c57d1),console[_0x15c4ea(0x17a)]('\x20\x20√\x20Configuration\x20file\x20created'),_0x315614&&await pullApiConfig(_0x41d8f2,_0x315614,_0x1c57d1,_0x1bbd73),console[_0x15c4ea(0x17a)](_0x15c4ea(0x1ae)+_0x592b06+_0x15c4ea(0x18a)),console[_0x15c4ea(0x17a)]('\x0a\x20\x20cd\x20'+_0x592b06),console['log'](_0x15c4ea(0x1a5));}catch(_0x503127){try{existsSync(_0x41d8f2)&&await a155_0x27ee9a['rm'](_0x41d8f2,{'recursive':!![],'force':!![]});}catch{}throw _0x503127;}}async function updatePackageJsonName(_0x1a031d){const _0x378eb3=a155_0x3e28,_0x3b9ce7=a155_0x5cc30f[_0x378eb3(0x179)](process[_0x378eb3(0x195)](),_0x1a031d),_0x32f73d=a155_0x5cc30f[_0x378eb3(0x185)](_0x3b9ce7,_0x378eb3(0x180)),_0x4c7a87=await a155_0x27ee9a[_0x378eb3(0x184)](_0x32f73d,_0x378eb3(0x178)),_0x5099bb=JSON['parse'](_0x4c7a87);_0x5099bb[_0x378eb3(0x18d)]=_0x1a031d,_0x5099bb[_0x378eb3(0x193)]='A\x20project\x20created\x20with\x20Lovrabet\x20CLI',await a155_0x27ee9a[_0x378eb3(0x17d)](_0x32f73d,JSON[_0x378eb3(0x17f)](_0x5099bb,null,0x2)+'\x0a');}function detectPackageManager(){const _0xa1f524=a155_0x3e28;try{return execSync(_0xa1f524(0x18c),{'stdio':'ignore'}),_0xa1f524(0x1ab);}catch{return _0xa1f524(0x19c);}}async function formatCode(_0x1fe4a6){const _0x41ebb=a155_0x3e28;try{await execAsync(_0x41ebb(0x196),{'cwd':_0x1fe4a6});}catch{}}async function configureProject(_0x8be27f,_0xd7fbf8,_0x17310a){const _0x45d729=a155_0x3e28,_0x3fb0a0=a155_0x5cc30f[_0x45d729(0x179)](process[_0x45d729(0x195)](),_0x8be27f),_0x248bcf=a155_0x5cc30f[_0x45d729(0x185)](_0x3fb0a0,NEW_CONFIG_NAME),_0x5cc7ad=readConfig(),_0x45f063=typeof _0x5cc7ad['env']===_0x45d729(0x1a4)?_0x5cc7ad['env']:undefined,_0x52bf8e={};for(const _0x37d7ba of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x5cc7ad[_0x37d7ba]!=null)_0x52bf8e[_0x37d7ba]=_0x5cc7ad[_0x37d7ba];}const _0x3469c7=buildCanonicalProjectConfig(_0x52bf8e,{'appCodes':_0xd7fbf8?[_0xd7fbf8]:[],'env':_0x17310a||_0x45f063||_0x45d729(0x190),'metadata':{'createdAt':new Date()[_0x45d729(0x1a0)](),'version':getCliVersion()}});writeConfigFile(_0x248bcf,_0x3469c7);}async function pullApiConfig(_0x2fa054,_0x3845e7,_0x44b466,_0x5183e3){const _0xd89003=a155_0x3e28,_0x1a7fdc=process[_0xd89003(0x195)]();try{process['chdir'](_0x2fa054);const _0x13da94=_0x44b466||_0xd89003(0x190);initEnv(_0x13da94),console[_0xd89003(0x17a)](_0xd89003(0x1a7));const {configArray:_0x1c3173}=await fetchModelList(_0x3845e7,_0x5183e3||''),_0x3a4fe3=await generateApiFile(_0x1c3173,'',_0x3845e7,!![],_0x13da94,DEFAULT_API_DIR);console[_0xd89003(0x17a)](_0xd89003(0x199)+_0x1c3173[_0xd89003(0x181)]+'\x20dataset(s),\x20generated\x20'+_0x3a4fe3[_0xd89003(0x197)]+'\x20model(s)');}catch(_0x2028f4){console[_0xd89003(0x17a)](_0xd89003(0x1b0)+CLI_BIN_NAME+_0xd89003(0x182));}finally{process[_0xd89003(0x188)](_0x1a7fdc);}}function a155_0x58e5(){const _0x4be5e6=['needsUpgrade','\x0a√\x20Project\x20','24CqBdTv','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','Project\x20name\x20cannot\x20be\x20empty.','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','utf-8','resolve','log','2771292BTAXwr','2aSDFPa','writeFile','validation','stringify','package.json','length','\x20api\x20pull`\x20manually\x20later.','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','readFile','join','Use\x20a\x20different\x20project\x20name.','18azHtuf','chdir','\x20\x20Installing\x20dependencies...','\x20created\x20successfully!','belowMinimum','bun\x20--version','name','...','constants','production','Project\x20directory\x20\x22','4028450envbRX','description','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','cwd','bun\x20run\x20format','modelCount','4448403XGJYaz','\x20\x20√\x20Pulled\x20','\x20\x20√\x20package.json\x20updated','W_OK','npm','1944607IBWbEF','access','558758exxHjZ','toLocaleString','5270476foGRHC','Cannot\x20create\x20project\x20in\x20current\x20directory.','Project\x20name\x20contains\x20invalid\x20characters.','string','\x20\x20rabetbase\x20run\x20start\x0a','\x20\x20√\x20Project\x20template\x20created','\x20\x20Pulling\x20API\x20configuration...','\x22\x20already\x20exists.','785265btEwVk','trim','bun','dirname'];a155_0x58e5=function(){return _0x4be5e6;};return a155_0x58e5();}
1
+ (function(_0x395b25,_0x339846){const _0x37fd9b=a155_0x4d9a,_0x19ef02=_0x395b25();while(!![]){try{const _0x49e2fd=-parseInt(_0x37fd9b(0x19f))/0x1+-parseInt(_0x37fd9b(0x19a))/0x2+parseInt(_0x37fd9b(0x1ba))/0x3*(parseInt(_0x37fd9b(0x197))/0x4)+-parseInt(_0x37fd9b(0x1a5))/0x5+-parseInt(_0x37fd9b(0x1ad))/0x6+parseInt(_0x37fd9b(0x1b5))/0x7+parseInt(_0x37fd9b(0x1b3))/0x8;if(_0x49e2fd===_0x339846)break;else _0x19ef02['push'](_0x19ef02['shift']());}catch(_0x292779){_0x19ef02['push'](_0x19ef02['shift']());}}}(a155_0x250c,0xf1b04));import a155_0x3bc7fd from'path';import a155_0x2ae80b from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';function a155_0x4d9a(_0x212fd4,_0x433c52){_0x212fd4=_0x212fd4-0x18a;const _0x250c95=a155_0x250c();let _0x4d9a13=_0x250c95[_0x212fd4];return _0x4d9a13;}import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{readConfig}from'../../../utils/config.js';import{getCliVersion}from'../../../utils/version.js';import{CliErrors}from'../../../errors.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';function a155_0x250c(){const _0x3c7f8a=['268945LAfcjy','toLocaleString','description','W_OK','bun\x20run\x20format','writeFile','\x0a\x20\x20cd\x20','Project\x20directory\x20\x22','7668996oLZwjx','ignore','modelCount','Cannot\x20create\x20project\x20in\x20current\x20directory.','\x20\x20√\x20Code\x20formatted','\x20dataset(s),\x20generated\x20','34509912DdScTl','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','3864287vOIGDt','cwd','readFile','\x20\x20√\x20Pulled\x20','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','2597355kkgrIl','length','test','bun','\x20api\x20pull`\x20manually\x20later.','constants','Use\x20a\x20different\x20project\x20name.','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','env','npm','name','join','bun\x20--version','...','access','Project\x20name\x20cannot\x20be\x20empty.','log','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','4tXzddz','validation','parse','3769168AWGWhx','*\x20Creating\x20project\x20','production','chdir','resolve','1525070kqqaxn','needsUpgrade','\x20\x20√\x20Project\x20template\x20created','stringify','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','\x22\x20already\x20exists.'];a155_0x250c=function(){return _0x3c7f8a;};return a155_0x250c();}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(_0x3cbcbc,_0xa5d811,_0x1091fd,_0x442f7a){const _0x1c60c8=a155_0x4d9a,_0x10443e=await checkCliVersion();(_0x10443e[_0x1c60c8(0x1a0)]||_0x10443e['belowMinimum'])&&(printCliUpgradeWarning(_0x10443e),assertCliVersionSupported(_0x10443e));if(!_0x3cbcbc||_0x3cbcbc['trim']()==='')throw CliErrors[_0x1c60c8(0x198)](_0x1c60c8(0x194));const _0x2abae2=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x2abae2[_0x1c60c8(0x1bc)](_0x3cbcbc))throw CliErrors['validation']('Project\x20name\x20contains\x20invalid\x20characters.',_0x1c60c8(0x1a3));if(_0x3cbcbc[_0x1c60c8(0x1bb)]>0x64)throw CliErrors[_0x1c60c8(0x198)](_0x1c60c8(0x196));const _0x5c668c=a155_0x3bc7fd[_0x1c60c8(0x19e)](process[_0x1c60c8(0x1b6)](),_0x3cbcbc);if(existsSync(_0x5c668c))throw CliErrors[_0x1c60c8(0x198)](_0x1c60c8(0x1ac)+_0x3cbcbc+_0x1c60c8(0x1a4),_0x1c60c8(0x18b));try{const _0x2f15d9=a155_0x3bc7fd['dirname'](_0x5c668c);await a155_0x2ae80b[_0x1c60c8(0x193)](_0x2f15d9,a155_0x2ae80b[_0x1c60c8(0x18a)][_0x1c60c8(0x1a8)]);}catch{throw CliErrors[_0x1c60c8(0x198)](_0x1c60c8(0x1b0),'Check\x20directory\x20permissions.');}try{console[_0x1c60c8(0x195)](_0x1c60c8(0x19b)+_0x3cbcbc+_0x1c60c8(0x192));const _0x56329d=getSubAppReactDemoTemplateDir();await copyDirectory(_0x56329d,_0x5c668c),console[_0x1c60c8(0x195)](_0x1c60c8(0x1a1)),await updatePackageJsonName(_0x3cbcbc),console['log']('\x20\x20√\x20package.json\x20updated'),console[_0x1c60c8(0x195)]('\x20\x20Installing\x20dependencies...'),console[_0x1c60c8(0x195)](_0x1c60c8(0x1b9)),await formatCode(_0x5c668c),console['log'](_0x1c60c8(0x1b1)),await configureProject(_0x3cbcbc,_0x1091fd,_0xa5d811),console[_0x1c60c8(0x195)]('\x20\x20√\x20Configuration\x20file\x20created'),_0x1091fd&&await pullApiConfig(_0x5c668c,_0x1091fd,_0xa5d811,_0x442f7a),console[_0x1c60c8(0x195)]('\x0a√\x20Project\x20'+_0x3cbcbc+'\x20created\x20successfully!'),console[_0x1c60c8(0x195)](_0x1c60c8(0x1ab)+_0x3cbcbc),console[_0x1c60c8(0x195)]('\x20\x20rabetbase\x20run\x20start\x0a');}catch(_0x245236){try{existsSync(_0x5c668c)&&await a155_0x2ae80b['rm'](_0x5c668c,{'recursive':!![],'force':!![]});}catch{}throw _0x245236;}}async function updatePackageJsonName(_0x29eb18){const _0xc56250=a155_0x4d9a,_0x373218=a155_0x3bc7fd[_0xc56250(0x19e)](process['cwd'](),_0x29eb18),_0x5012ca=a155_0x3bc7fd[_0xc56250(0x190)](_0x373218,'package.json'),_0x167c31=await a155_0x2ae80b[_0xc56250(0x1b7)](_0x5012ca,'utf-8'),_0x3ce19f=JSON[_0xc56250(0x199)](_0x167c31);_0x3ce19f[_0xc56250(0x18f)]=_0x29eb18,_0x3ce19f[_0xc56250(0x1a7)]=_0xc56250(0x18c),await a155_0x2ae80b[_0xc56250(0x1aa)](_0x5012ca,JSON[_0xc56250(0x1a2)](_0x3ce19f,null,0x2)+'\x0a');}function detectPackageManager(){const _0x3ab8a2=a155_0x4d9a;try{return execSync(_0x3ab8a2(0x191),{'stdio':_0x3ab8a2(0x1ae)}),_0x3ab8a2(0x1bd);}catch{return _0x3ab8a2(0x18e);}}async function formatCode(_0x1edd41){const _0x4e6855=a155_0x4d9a;try{await execAsync(_0x4e6855(0x1a9),{'cwd':_0x1edd41});}catch{}}async function configureProject(_0x5967f6,_0x27da72,_0x1a1ff3){const _0x4948f6=a155_0x4d9a,_0x33d532=a155_0x3bc7fd['resolve'](process['cwd'](),_0x5967f6),_0x16225b=a155_0x3bc7fd[_0x4948f6(0x190)](_0x33d532,NEW_CONFIG_NAME),_0x4d0e9d=readConfig(),_0xd50367=typeof _0x4d0e9d[_0x4948f6(0x18d)]==='string'?_0x4d0e9d['env']:undefined,_0x2a39de={};for(const _0x47721c of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x4d0e9d[_0x47721c]!=null)_0x2a39de[_0x47721c]=_0x4d0e9d[_0x47721c];}const _0x98c524=buildCanonicalProjectConfig(_0x2a39de,{'appCodes':_0x27da72?[_0x27da72]:[],'env':_0x1a1ff3||_0xd50367||_0x4948f6(0x19c),'metadata':{'createdAt':new Date()[_0x4948f6(0x1a6)](),'version':getCliVersion()}});writeConfigFile(_0x16225b,_0x98c524);}async function pullApiConfig(_0x22244c,_0x146a1c,_0xb0c541,_0x3db003){const _0x4826ca=a155_0x4d9a,_0x241bc1=process[_0x4826ca(0x1b6)]();try{process['chdir'](_0x22244c);const _0x4e95e5=_0xb0c541||'production';initEnv(_0x4e95e5),console[_0x4826ca(0x195)]('\x20\x20Pulling\x20API\x20configuration...');const {configArray:_0x407fd0}=await fetchModelList(_0x146a1c,_0x3db003||''),_0x23586f=await generateApiFile(_0x407fd0,'',_0x146a1c,!![],_0x4e95e5,DEFAULT_API_DIR);console['log'](_0x4826ca(0x1b8)+_0x407fd0[_0x4826ca(0x1bb)]+_0x4826ca(0x1b2)+_0x23586f[_0x4826ca(0x1af)]+'\x20model(s)');}catch(_0x37dd68){console[_0x4826ca(0x195)](_0x4826ca(0x1b4)+CLI_BIN_NAME+_0x4826ca(0x1be));}finally{process[_0x4826ca(0x19d)](_0x241bc1);}}
@@ -1 +1 @@
1
- (function(_0x127d3d,_0x4ccb3b){const _0x1bb594=a156_0x5110,_0x1b6ed7=_0x127d3d();while(!![]){try{const _0x3bd001=parseInt(_0x1bb594(0xdd))/0x1+parseInt(_0x1bb594(0xdf))/0x2+parseInt(_0x1bb594(0xdc))/0x3+-parseInt(_0x1bb594(0xde))/0x4*(-parseInt(_0x1bb594(0xe3))/0x5)+-parseInt(_0x1bb594(0xe0))/0x6+-parseInt(_0x1bb594(0xdb))/0x7*(parseInt(_0x1bb594(0xd9))/0x8)+-parseInt(_0x1bb594(0xda))/0x9;if(_0x3bd001===_0x4ccb3b)break;else _0x1b6ed7['push'](_0x1b6ed7['shift']());}catch(_0x8ddea6){_0x1b6ed7['push'](_0x1b6ed7['shift']());}}}(a156_0x139a,0x780d5));import a156_0x17b0df from'node:path';function a156_0x5110(_0x143ebc,_0x1e3d0d){_0x143ebc=_0x143ebc-0xd9;const _0x139ae1=a156_0x139a();let _0x511026=_0x139ae1[_0x143ebc];return _0x511026;}function a156_0x139a(){const _0x17f5ab=['sub-app-react-demo','../../../../','639550JQNxEW','projects','resolve','5128hdETvK','7726644hQpzdZ','8701AorMSn','1642572LXzHzU','879029oXkxss','28CqwJjV','762044xFyipI','3335598GMKYQw'];a156_0x139a=function(){return _0x17f5ab;};return a156_0x139a();}import{fileURLToPath}from'node:url';const __dirname=a156_0x17b0df['dirname'](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x123257=a156_0x5110;return a156_0x17b0df[_0x123257(0xe5)](__dirname,_0x123257(0xe2));}export function getSubAppReactDemoTemplateDir(){const _0x48667e=a156_0x5110;return a156_0x17b0df['join'](getRabetbaseCliPackageRoot(),'templates',_0x48667e(0xe4),_0x48667e(0xe1));}
1
+ function a156_0x4139(){const _0x2c3161=['205920ziSvea','../../../../','10608633sBDVqg','templates','dirname','6602766HeLosv','24YiajGk','2448733cfuPbk','143558wAkIGT','24861dzMbgc','resolve','8nPFRyw','202805TzPnGv','join'];a156_0x4139=function(){return _0x2c3161;};return a156_0x4139();}const a156_0x4b4b9d=a156_0x32c3;(function(_0x111b4f,_0x5873d7){const _0x519b88=a156_0x32c3,_0x433c86=_0x111b4f();while(!![]){try{const _0x17414a=-parseInt(_0x519b88(0xcc))/0x1+-parseInt(_0x519b88(0xc6))/0x2+parseInt(_0x519b88(0xc7))/0x3+parseInt(_0x519b88(0xc9))/0x4*(parseInt(_0x519b88(0xca))/0x5)+-parseInt(_0x519b88(0xc3))/0x6+-parseInt(_0x519b88(0xc5))/0x7*(-parseInt(_0x519b88(0xc4))/0x8)+parseInt(_0x519b88(0xc0))/0x9;if(_0x17414a===_0x5873d7)break;else _0x433c86['push'](_0x433c86['shift']());}catch(_0x2292b6){_0x433c86['push'](_0x433c86['shift']());}}}(a156_0x4139,0xe55b3));function a156_0x32c3(_0x5cf0db,_0x3042b4){_0x5cf0db=_0x5cf0db-0xbf;const _0x413985=a156_0x4139();let _0x32c399=_0x413985[_0x5cf0db];return _0x32c399;}import a156_0x536f45 from'node:path';import{fileURLToPath}from'node:url';const __dirname=a156_0x536f45[a156_0x4b4b9d(0xc2)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x185e2f=a156_0x4b4b9d;return a156_0x536f45[_0x185e2f(0xc8)](__dirname,_0x185e2f(0xbf));}export function getSubAppReactDemoTemplateDir(){const _0x5c92cd=a156_0x4b4b9d;return a156_0x536f45[_0x5c92cd(0xcb)](getRabetbaseCliPackageRoot(),_0x5c92cd(0xc1),'projects','sub-app-react-demo');}
@@ -1 +1 @@
1
- (function(_0xe9205a,_0x3675ae){const _0x65e7e5=a157_0x479b,_0x181ef2=_0xe9205a();while(!![]){try{const _0x128f47=-parseInt(_0x65e7e5(0x8f))/0x1*(-parseInt(_0x65e7e5(0x88))/0x2)+-parseInt(_0x65e7e5(0x90))/0x3*(-parseInt(_0x65e7e5(0x94))/0x4)+parseInt(_0x65e7e5(0x86))/0x5+parseInt(_0x65e7e5(0x91))/0x6+parseInt(_0x65e7e5(0x8a))/0x7+parseInt(_0x65e7e5(0x93))/0x8+parseInt(_0x65e7e5(0x82))/0x9*(-parseInt(_0x65e7e5(0x85))/0xa);if(_0x128f47===_0x3675ae)break;else _0x181ef2['push'](_0x181ef2['shift']());}catch(_0x12c08f){_0x181ef2['push'](_0x181ef2['shift']());}}}(a157_0x379b,0x2468f));import a157_0x173cbd from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x3f676e){const _0x4d5258=a157_0x479b,_0x4344b5=Date[_0x4d5258(0x84)](),_0x323125=a157_0x173cbd[_0x4d5258(0x92)](process[_0x4d5258(0x95)](),_0x3f676e);try{logger[_0x4d5258(0x8b)]('copy',_0x4d5258(0x87),{'projectCode':_0x3f676e,'templateDir':templateDir}),await copyDirectory(templateDir,_0x323125);const _0x56aad8=Date[_0x4d5258(0x84)]()-_0x4344b5;logger[_0x4d5258(0x83)](_0x4d5258(0x8c),_0x4d5258(0x81),_0x56aad8,{'projectCode':_0x3f676e});}catch(_0x23e353){const _0x1bebf6=Date['now']()-_0x4344b5;logger[_0x4d5258(0x89)](_0x4d5258(0x8c),_0x4d5258(0x8d),{'projectCode':_0x3f676e,'error':_0x23e353 instanceof Error?_0x23e353[_0x4d5258(0x8e)]:String(_0x23e353),'duration':_0x1bebf6});throw _0x23e353;}return formatElapsed(_0x4344b5);}function a157_0x479b(_0x784afd,_0xd14afd){_0x784afd=_0x784afd-0x81;const _0x379b75=a157_0x379b();let _0x479bf9=_0x379b75[_0x784afd];return _0x479bf9;}function a157_0x379b(){const _0xde4dd1=['项目模板复制失败','message','337nvbOCc','2637Tmjcjt','161526wPrimj','resolve','348968AJHRLV','1092fqaqCl','cwd','项目模板复制完成','333qFJVTY','success','now','86740QDEMzs','400680KLfvwU','开始复制项目模板','120pqJAzj','error','414456ofmAzR','info','copy'];a157_0x379b=function(){return _0xde4dd1;};return a157_0x379b();}
1
+ (function(_0x75b324,_0x40f7eb){const _0x57bc84=a157_0x22aa,_0x16cd3d=_0x75b324();while(!![]){try{const _0xdb6b3e=-parseInt(_0x57bc84(0x121))/0x1+-parseInt(_0x57bc84(0x11d))/0x2*(parseInt(_0x57bc84(0x12f))/0x3)+parseInt(_0x57bc84(0x125))/0x4*(parseInt(_0x57bc84(0x12e))/0x5)+parseInt(_0x57bc84(0x126))/0x6+parseInt(_0x57bc84(0x12d))/0x7*(-parseInt(_0x57bc84(0x130))/0x8)+parseInt(_0x57bc84(0x129))/0x9*(-parseInt(_0x57bc84(0x127))/0xa)+parseInt(_0x57bc84(0x124))/0xb;if(_0xdb6b3e===_0x40f7eb)break;else _0x16cd3d['push'](_0x16cd3d['shift']());}catch(_0x10b565){_0x16cd3d['push'](_0x16cd3d['shift']());}}}(a157_0x54dc,0xd3178));import a157_0x32d6dd from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';function a157_0x22aa(_0x117760,_0x30079c){_0x117760=_0x117760-0x11d;const _0x54dc29=a157_0x54dc();let _0x22aa59=_0x54dc29[_0x117760];return _0x22aa59;}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a157_0x54dc(){const _0x502900=['8567720qftDTl','error','9QIYecO','开始复制项目模板','info','now','7514619BzARpw','28915gUEPzh','3DqAffA','8uCiaKz','项目模板复制完成','1728516qSplac','resolve','项目模板复制失败','message','985459WvjUUr','copy','cwd','25125375ISkPtR','572xWVsoL','9201264ILJoZR'];a157_0x54dc=function(){return _0x502900;};return a157_0x54dc();}import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x1fe4a4){const _0x503ba3=a157_0x22aa,_0x52000b=Date[_0x503ba3(0x12c)](),_0x32d370=a157_0x32d6dd[_0x503ba3(0x11e)](process[_0x503ba3(0x123)](),_0x1fe4a4);try{logger[_0x503ba3(0x12b)]('copy',_0x503ba3(0x12a),{'projectCode':_0x1fe4a4,'templateDir':templateDir}),await copyDirectory(templateDir,_0x32d370);const _0x4c7be2=Date[_0x503ba3(0x12c)]()-_0x52000b;logger['success'](_0x503ba3(0x122),_0x503ba3(0x131),_0x4c7be2,{'projectCode':_0x1fe4a4});}catch(_0x53302f){const _0x3680ed=Date[_0x503ba3(0x12c)]()-_0x52000b;logger[_0x503ba3(0x128)](_0x503ba3(0x122),_0x503ba3(0x11f),{'projectCode':_0x1fe4a4,'error':_0x53302f instanceof Error?_0x53302f[_0x503ba3(0x120)]:String(_0x53302f),'duration':_0x3680ed});throw _0x53302f;}return formatElapsed(_0x52000b);}
@@ -1 +1 @@
1
- (function(_0x3ea891,_0x397131){const _0x131870=a158_0x14f8,_0x49fb96=_0x3ea891();while(!![]){try{const _0x5c5f24=parseInt(_0x131870(0x145))/0x1+-parseInt(_0x131870(0x143))/0x2+-parseInt(_0x131870(0x142))/0x3*(parseInt(_0x131870(0x140))/0x4)+parseInt(_0x131870(0x14a))/0x5*(-parseInt(_0x131870(0x146))/0x6)+parseInt(_0x131870(0x148))/0x7+parseInt(_0x131870(0x149))/0x8*(-parseInt(_0x131870(0x13d))/0x9)+parseInt(_0x131870(0x13e))/0xa;if(_0x5c5f24===_0x397131)break;else _0x49fb96['push'](_0x49fb96['shift']());}catch(_0x1fda4f){_0x49fb96['push'](_0x49fb96['shift']());}}}(a158_0x4a81,0xe4d08));import a158_0x1abb12 from'node:path';import{execa}from'execa';function a158_0x14f8(_0x2676be,_0xc692a2){_0x2676be=_0x2676be-0x13c;const _0x4a81ea=a158_0x4a81();let _0x14f82a=_0x4a81ea[_0x2676be];return _0x14f82a;}function a158_0x4a81(){const _0x4e299c=['format','resolve','cwd','npx','代码格式化完成','13643739nsXBCd','39574150pLCvgr','now','65948AjUeKG','info','303wMmIWM','3625870KDIFcr','开始格式化代码','1413254RaUden','31644IHzdgW','message','10052924qlLuCS','8OODTwS','830GvULSn'];a158_0x4a81=function(){return _0x4e299c;};return a158_0x4a81();}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x3c44a8){const _0x570603=a158_0x14f8,_0x528b19=Date[_0x570603(0x13f)](),_0x18a2e3=a158_0x1abb12[_0x570603(0x14c)](process[_0x570603(0x14d)](),_0x3c44a8);try{logger[_0x570603(0x141)](_0x570603(0x14b),_0x570603(0x144),{'projectCode':_0x3c44a8}),await execa(resolveNpmBin(_0x570603(0x14e)),['prettier','--write','.'],{'cwd':_0x18a2e3});const _0x4b61e3=Date['now']()-_0x528b19;logger['success']('format',_0x570603(0x13c),_0x4b61e3,{'projectCode':_0x3c44a8});}catch(_0x526b33){const _0x4c76f3=Date['now']()-_0x528b19;logger['error'](_0x570603(0x14b),'代码格式化失败',{'projectCode':_0x3c44a8,'error':_0x526b33 instanceof Error?_0x526b33[_0x570603(0x147)]:String(_0x526b33),'duration':_0x4c76f3});throw _0x526b33;}return formatElapsed(_0x528b19);}
1
+ function a158_0x5eef(){const _0xd7b869=['18599vnmvjb','cwd','281224wRdYTa','--write','代码格式化完成','11256odwWOS','resolve','代码格式化失败','success','format','message','63MuqINK','1632205esoYVS','610068DpqPWC','now','94380sWIyLa','175756ghTyTI','prettier','6RaEzgx','npx'];a158_0x5eef=function(){return _0xd7b869;};return a158_0x5eef();}(function(_0xa24776,_0x30f4fd){const _0x75b34=a158_0x36ba,_0x1f98d8=_0xa24776();while(!![]){try{const _0x211588=parseInt(_0x75b34(0xbf))/0x1+parseInt(_0x75b34(0xce))/0x2+parseInt(_0x75b34(0xcc))/0x3+parseInt(_0x75b34(0xc4))/0x4+-parseInt(_0x75b34(0xcb))/0x5*(parseInt(_0x75b34(0xbd))/0x6)+-parseInt(_0x75b34(0xbb))/0x7+parseInt(_0x75b34(0xc1))/0x8*(parseInt(_0x75b34(0xca))/0x9);if(_0x211588===_0x30f4fd)break;else _0x1f98d8['push'](_0x1f98d8['shift']());}catch(_0x356005){_0x1f98d8['push'](_0x1f98d8['shift']());}}}(a158_0x5eef,0x28a51));import a158_0x39804c from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a158_0x36ba(_0x25d251,_0x1025c4){_0x25d251=_0x25d251-0xbb;const _0x5eefe1=a158_0x5eef();let _0x36baff=_0x5eefe1[_0x25d251];return _0x36baff;}import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x265f6a){const _0x35ff74=a158_0x36ba,_0x3a948f=Date[_0x35ff74(0xcd)](),_0x1b29c2=a158_0x39804c[_0x35ff74(0xc5)](process[_0x35ff74(0xc0)](),_0x265f6a);try{logger['info'](_0x35ff74(0xc8),'开始格式化代码',{'projectCode':_0x265f6a}),await execa(resolveNpmBin(_0x35ff74(0xbe)),[_0x35ff74(0xbc),_0x35ff74(0xc2),'.'],{'cwd':_0x1b29c2});const _0x448f5d=Date['now']()-_0x3a948f;logger[_0x35ff74(0xc7)]('format',_0x35ff74(0xc3),_0x448f5d,{'projectCode':_0x265f6a});}catch(_0x1002e8){const _0x29123b=Date[_0x35ff74(0xcd)]()-_0x3a948f;logger['error']('format',_0x35ff74(0xc6),{'projectCode':_0x265f6a,'error':_0x1002e8 instanceof Error?_0x1002e8[_0x35ff74(0xc9)]:String(_0x1002e8),'duration':_0x29123b});throw _0x1002e8;}return formatElapsed(_0x3a948f);}