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

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 (278) 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.js +1 -1
  207. package/lib/core/alias-resolver.js +1 -1
  208. package/lib/core/api-client.js +1 -1
  209. package/lib/core/bff/config.js +1 -1
  210. package/lib/core/bff/file-system.js +1 -1
  211. package/lib/core/bff/hash.js +1 -1
  212. package/lib/core/bff/lock.js +1 -1
  213. package/lib/core/bff/utils.js +1 -1
  214. package/lib/core/db-resolver.js +1 -1
  215. package/lib/core/page/file-system.js +1 -1
  216. package/lib/core/page/hash.js +1 -1
  217. package/lib/core/page/lock.js +1 -1
  218. package/lib/core/sql-index-auditor.js +1 -1
  219. package/lib/core/sql-sync/config.js +1 -1
  220. package/lib/core/sql-sync/file-system.js +1 -1
  221. package/lib/core/sql-sync/hash.js +1 -1
  222. package/lib/core/sql-sync/lock.js +1 -1
  223. package/lib/core/sql-sync/utils.js +1 -1
  224. package/lib/core/sql-validator.js +1 -1
  225. package/lib/errors.js +1 -1
  226. package/lib/framework/build-all-flags.js +1 -1
  227. package/lib/framework/error-output.js +1 -1
  228. package/lib/framework/explicit-yes.js +1 -1
  229. package/lib/framework/flags.js +1 -1
  230. package/lib/framework/help.js +1 -1
  231. package/lib/framework/index.js +1 -1
  232. package/lib/framework/output.js +1 -1
  233. package/lib/framework/response.js +1 -1
  234. package/lib/framework/runner-alias.js +1 -1
  235. package/lib/framework/runner.js +1 -1
  236. package/lib/framework/schema-export.js +1 -1
  237. package/lib/framework/types.js +1 -1
  238. package/lib/generated/build-info.d.ts +4 -4
  239. package/lib/generated/build-info.js +1 -1
  240. package/lib/help.js +1 -1
  241. package/lib/runtime/confirmation.js +1 -1
  242. package/lib/runtime/event.js +1 -1
  243. package/lib/runtime/index.js +1 -1
  244. package/lib/runtime/queue.js +1 -1
  245. package/lib/runtime/resolve.js +1 -1
  246. package/lib/skills/main.js +1 -1
  247. package/lib/skills/npx-skills-add.js +1 -1
  248. package/lib/skills/skill-presence.js +1 -1
  249. package/lib/telemetry/cli-command-trace.js +1 -1
  250. package/lib/telemetry/cli-help-trace.js +1 -1
  251. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  252. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  253. package/lib/telemetry/send-cli-trace-log.js +1 -1
  254. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  255. package/lib/utils/ai_config.js +1 -1
  256. package/lib/utils/apply-jq-filter.js +1 -1
  257. package/lib/utils/cdn-config.js +1 -1
  258. package/lib/utils/check-sdk-version.js +1 -1
  259. package/lib/utils/cli-version-check.js +1 -1
  260. package/lib/utils/cli-version-policy.js +1 -1
  261. package/lib/utils/config.js +1 -1
  262. package/lib/utils/copy-directory.js +1 -1
  263. package/lib/utils/entity-with-id.js +1 -1
  264. package/lib/utils/file-utils.js +1 -1
  265. package/lib/utils/guides-cdn.js +1 -1
  266. package/lib/utils/http-client.js +1 -1
  267. package/lib/utils/is-non-interactive.js +1 -1
  268. package/lib/utils/logger.js +1 -1
  269. package/lib/utils/params.js +1 -1
  270. package/lib/utils/platform.js +1 -1
  271. package/lib/utils/rules-cdn.js +1 -1
  272. package/lib/utils/sleep.js +1 -1
  273. package/lib/utils/template-replacer.js +1 -1
  274. package/lib/utils/update-notice.js +1 -1
  275. package/lib/utils/version.js +1 -1
  276. package/lib/utils/with-active-cookie.js +1 -1
  277. package/lib/utils/write-cli-side-channel.js +1 -1
  278. 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_0x3250(_0x185de7,_0x2b5212){_0x185de7=_0x185de7-0xd4;const _0x39723b=a143_0x3972();let _0x3250a9=_0x39723b[_0x185de7];return _0x3250a9;}const a143_0x4c4bea=a143_0x3250;(function(_0x2b586e,_0x3aa6ae){const _0x10e20e=a143_0x3250,_0xc59995=_0x2b586e();while(!![]){try{const _0x401639=parseInt(_0x10e20e(0xde))/0x1*(parseInt(_0x10e20e(0xd6))/0x2)+parseInt(_0x10e20e(0xef))/0x3*(-parseInt(_0x10e20e(0xed))/0x4)+-parseInt(_0x10e20e(0xe5))/0x5+parseInt(_0x10e20e(0xdb))/0x6+-parseInt(_0x10e20e(0xe3))/0x7+parseInt(_0x10e20e(0xee))/0x8+parseInt(_0x10e20e(0xd9))/0x9;if(_0x401639===_0x3aa6ae)break;else _0xc59995['push'](_0xc59995['shift']());}catch(_0x26d9cd){_0xc59995['push'](_0xc59995['shift']());}}}(a143_0x3972,0xf05a6));function a143_0x3972(){const _0x1f06e6=['related-pages-fallback','2IrFqxS','code','nextAction','20203011UxaPrB','Query\x20Smart\x20List\x20Page\x20facts\x20for\x20a\x20dataset','768678iqpaOo','/smartapi/lovrabet/dataset/','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','3366MDxJJu','query-standard-page-status','alias','manualResolutionRequired','string','2802562UnckAM','status','1528880mljrwP','/standard-page-status?appCode=','name','relatedPages','length','source','GET','standard-page-status','2100koGiGx','8807560hxaOQI','10209OYbeoh','read'];a143_0x3972=function(){return _0x1f06e6;};return a143_0x3972();}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_0x4c4bea(0xec),'description':a143_0x4c4bea(0xda),'risk':a143_0x4c4bea(0xd4),'defaultOutputFormat':'compress','flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a143_0x4c4bea(0xe0),'type':a143_0x4c4bea(0xe2),'description':a143_0x4c4bea(0xdd)}],async 'validate'(_0x4d0be5){validateDatasetSelector(_0x4d0be5);},async 'dryRun'(_0xcdf04b){const _0x344b99=a143_0x4c4bea,_0x328f50=await loadDatasetDetailForPage(_0xcdf04b);return{'method':_0x344b99(0xeb),'url':_0x344b99(0xdc)+_0x328f50['code']+_0x344b99(0xe6)+encodeURIComponent(_0xcdf04b['appCode']),'description':serializeDryRunDescription({'dataset':{'id':_0x328f50['id'],'code':_0x328f50[_0x344b99(0xd7)],'name':_0x328f50[_0x344b99(0xe7)]},'action':_0x344b99(0xdf)})};},async 'execute'(_0x151866){const _0x287d55=a143_0x4c4bea,_0x358745=await loadDatasetDetailForPage(_0x151866),_0x176153=await loadStandardPageStatusForGenerate(_0x151866,_0x358745['code']),_0x584d34=getUndeletedRelatedPages(_0x358745),_0x3904d6=assessStandardPageState(_0x358745[_0x287d55(0xd7)],_0x176153,{'fallbackUndeletedPages':_0x584d34});return{'ok':!![],'data':{'datasetCode':_0x358745['code'],'precheckSource':_0x176153?.[_0x287d55(0xea)]??_0x287d55(0xd5),'status':_0x3904d6[_0x287d55(0xe4)],'manualResolutionRequired':_0x3904d6[_0x287d55(0xe1)],'nextAction':_0x3904d6[_0x287d55(0xd8)],'standardPageStatus':_0x176153,'relatedPages':{'total':_0x358745[_0x287d55(0xe8)][_0x287d55(0xe9)],'undeletedCount':_0x584d34[_0x287d55(0xe9)]}}};}};
@@ -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_0x581aea=a144_0x39c1;(function(_0x4643bc,_0x5cda87){const _0x1533d7=a144_0x39c1,_0x4b59d5=_0x4643bc();while(!![]){try{const _0x46466a=parseInt(_0x1533d7(0xcf))/0x1+parseInt(_0x1533d7(0xc6))/0x2*(-parseInt(_0x1533d7(0xc9))/0x3)+parseInt(_0x1533d7(0xc4))/0x4*(-parseInt(_0x1533d7(0xcb))/0x5)+-parseInt(_0x1533d7(0xe2))/0x6*(-parseInt(_0x1533d7(0xdb))/0x7)+-parseInt(_0x1533d7(0xda))/0x8+parseInt(_0x1533d7(0xcc))/0x9+parseInt(_0x1533d7(0xe4))/0xa;if(_0x46466a===_0x5cda87)break;else _0x4b59d5['push'](_0x4b59d5['shift']());}catch(_0xe0c9bf){_0x4b59d5['push'](_0x4b59d5['shift']());}}}(a144_0x4bf6,0x3d71b));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{loadDatasetDetailForPage,prepareDatasetAction,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';import{syncStandardPages}from'../../core/api-client.js';function a144_0x39c1(_0xc3da96,_0x40e61a){_0xc3da96=_0xc3da96-0xc4;const _0x4bf6cd=a144_0x4bf6();let _0x39c198=_0x4bf6cd[_0xc3da96];return _0x39c198;}export const pageSync={'service':a144_0x581aea(0xd5),'command':a144_0x581aea(0xd9),'description':a144_0x581aea(0xd1),'risk':a144_0x581aea(0xd0),'defaultOutputFormat':a144_0x581aea(0xd4),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a144_0x581aea(0xe0),'type':a144_0x581aea(0xd8),'description':a144_0x581aea(0xe3)}],async 'validate'(_0x58073e){validateDatasetSelector(_0x58073e);},async 'dryRun'(_0x1c89d8){const _0x3d0992=a144_0x581aea,_0x4bc1ff=await prepare(_0x1c89d8);return{'method':_0x3d0992(0xd6),'url':_0x3d0992(0xca)+_0x4bc1ff[_0x3d0992(0xcd)][_0x3d0992(0xd7)]+'/sync-to-pages','body':{'appCode':_0x1c89d8[_0x3d0992(0xce)]},'description':serializeDryRunDescription({'dataset':{'id':_0x4bc1ff['dataset']['id'],'code':_0x4bc1ff[_0x3d0992(0xcd)]['code'],'name':_0x4bc1ff[_0x3d0992(0xcd)][_0x3d0992(0xd3)],'fieldCount':_0x4bc1ff[_0x3d0992(0xcd)][_0x3d0992(0xde)]},'relatedPages':{'total':_0x4bc1ff['dataset'][_0x3d0992(0xdd)][_0x3d0992(0xdf)],'undeletedCount':_0x4bc1ff[_0x3d0992(0xc8)][_0x3d0992(0xdf)]},'action':_0x3d0992(0xd9),'reason':_0x4bc1ff[_0x3d0992(0xc8)][_0x3d0992(0xdf)]+_0x3d0992(0xd2)})};},async 'execute'(_0x10d258){const _0x2caf7a=a144_0x581aea,_0x1c26f1=await prepare(_0x10d258),_0x13a58f=await syncStandardPages(_0x10d258[_0x2caf7a(0xce)],_0x1c26f1[_0x2caf7a(0xcd)][_0x2caf7a(0xd7)]),_0x2eb104=Array[_0x2caf7a(0xc7)](_0x13a58f[_0x2caf7a(0xe1)])&&_0x13a58f[_0x2caf7a(0xe1)][_0x2caf7a(0xdf)]>0x0,_0x3f4a8e=_0x2eb104?_0x2caf7a(0xdc):_0x2caf7a(0xc5);return{'ok':!![],'message':_0x3f4a8e,'data':{'datasetCode':_0x1c26f1['dataset'][_0x2caf7a(0xd7)],..._0x13a58f}};}};async function prepare(_0x51570f){const _0x1b2ec5=a144_0x581aea,_0x429ba7=await loadDatasetDetailForPage(_0x51570f);return prepareDatasetAction(_0x429ba7,_0x1b2ec5(0xd9));}function a144_0x4bf6(){const _0x15a776=['string','sync','3309560Dukuai','14ITDSLG','部分页面同步失败','relatedPages','fieldCount','length','alias','failedPages','795738qotpsg','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','6930810vBgoFN','4ZOuYza','同步成功','1704vixhjF','isArray','undeletedPages','573AkBoTM','/smartapi/lovrabet/dataset/','1436290DrewBZ','584613gquOgI','dataset','appCode','92076rUiOOA','write','Sync\x20dataset\x20changes\x20to\x20related\x20Smart\x20List\x20Pages','\x20undeleted\x20related\x20page(s)\x20found','name','compress','page','POST','code'];a144_0x4bf6=function(){return _0x15a776;};return a144_0x4bf6();}
@@ -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 a145_0xd044(){const _0x4fe615=['2836950oUfLri','32044SreUnK','475VISizJ','1497554GKSInn','1AuNeqs','111057rMBgDW','5211126WkqrSf','24OSSCZf','17466420VWkGSa','1975967RfcYtn'];a145_0xd044=function(){return _0x4fe615;};return a145_0xd044();}(function(_0x3e761c,_0x4a418a){const _0xb0024c=a145_0x31e3,_0x47f0fb=_0x3e761c();while(!![]){try{const _0x53a68e=-parseInt(_0xb0024c(0x1bc))/0x1*(-parseInt(_0xb0024c(0x1bb))/0x2)+-parseInt(_0xb0024c(0x1bd))/0x3+-parseInt(_0xb0024c(0x1b9))/0x4*(-parseInt(_0xb0024c(0x1ba))/0x5)+parseInt(_0xb0024c(0x1b8))/0x6+-parseInt(_0xb0024c(0x1b7))/0x7*(-parseInt(_0xb0024c(0x1b5))/0x8)+-parseInt(_0xb0024c(0x1be))/0x9+-parseInt(_0xb0024c(0x1b6))/0xa;if(_0x53a68e===_0x4a418a)break;else _0x47f0fb['push'](_0x47f0fb['shift']());}catch(_0x2ac08b){_0x47f0fb['push'](_0x47f0fb['shift']());}}}(a145_0xd044,0x71f7f));import{permitPageGet}from'../../commands/permit/page-get.js';import{permitPageSet}from'../../commands/permit/page-set.js';import{permitRoleMenus}from'../../commands/permit/role-menus.js';function a145_0x31e3(_0x4cf341,_0x4155cd){_0x4cf341=_0x4cf341-0x1b5;const _0xd04437=a145_0xd044();let _0x31e37f=_0xd04437[_0x4cf341];return _0x31e37f;}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
+ function a146_0x2f4f(){const _0x46b30f=['598585IPikYZ','num','19658cOQMQg','7852744JftmRK','read','menu-id','4093838EZBBeY','9422690DHdsGS','9ynFkqF','6hnPYyj','26564637QzoOdr','1278040duOuaN','12NQNSjH','permit','40CkpSQI','12zvLqba'];a146_0x2f4f=function(){return _0x46b30f;};return a146_0x2f4f();}function a146_0x542a(_0x1c2f10,_0x4d1f2d){_0x1c2f10=_0x1c2f10-0x98;const _0x2f4f78=a146_0x2f4f();let _0x542a87=_0x2f4f78[_0x1c2f10];return _0x542a87;}const a146_0x697704=a146_0x542a;(function(_0x3f8df6,_0x4f3eb1){const _0x3885d6=a146_0x542a,_0x10d5c2=_0x3f8df6();while(!![]){try{const _0x338354=parseInt(_0x3885d6(0xa2))/0x1*(-parseInt(_0x3885d6(0xa6))/0x2)+-parseInt(_0x3885d6(0x9d))/0x3*(parseInt(_0x3885d6(0x9f))/0x4)+parseInt(_0x3885d6(0xa4))/0x5*(-parseInt(_0x3885d6(0xa3))/0x6)+-parseInt(_0x3885d6(0x9a))/0x7+-parseInt(_0x3885d6(0xa7))/0x8*(parseInt(_0x3885d6(0x9c))/0x9)+parseInt(_0x3885d6(0x9b))/0xa+parseInt(_0x3885d6(0x9e))/0xb*(parseInt(_0x3885d6(0xa0))/0xc);if(_0x338354===_0x4f3eb1)break;else _0x10d5c2['push'](_0x10d5c2['shift']());}catch(_0x2436cb){_0x10d5c2['push'](_0x10d5c2['shift']());}}}(a146_0x2f4f,0x7ec1b));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_0x697704(0xa1),'command':'page-get','description':'Show\x20the\x20page\x20permission\x20snapshot\x20for\x20a\x20menu','risk':a146_0x697704(0x98),'flags':[MENU_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x3b8200){const _0x1e02db=a146_0x697704,_0x59432b=_0x3b8200[_0x1e02db(0xa5)](_0x1e02db(0x99)),_0x219ac6=await getPagePermit(_0x59432b);return{'ok':!![],'data':{'page':projectPagePermit(_0x219ac6)},'message':'Page\x20permit\x20for\x20menu\x20'+_0x59432b};}};
@@ -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_0x21155d=a147_0x4849;(function(_0x5174b6,_0x1d66f5){const _0x202c71=a147_0x4849,_0x46be52=_0x5174b6();while(!![]){try{const _0x2861c0=-parseInt(_0x202c71(0x1d3))/0x1*(parseInt(_0x202c71(0x1db))/0x2)+-parseInt(_0x202c71(0x1c8))/0x3*(-parseInt(_0x202c71(0x1e5))/0x4)+parseInt(_0x202c71(0x1e7))/0x5*(parseInt(_0x202c71(0x1d6))/0x6)+parseInt(_0x202c71(0x1e0))/0x7*(-parseInt(_0x202c71(0x1dc))/0x8)+parseInt(_0x202c71(0x1d1))/0x9*(parseInt(_0x202c71(0x1d4))/0xa)+-parseInt(_0x202c71(0x1d0))/0xb*(parseInt(_0x202c71(0x1de))/0xc)+parseInt(_0x202c71(0x1e3))/0xd*(parseInt(_0x202c71(0x1c6))/0xe);if(_0x2861c0===_0x1d66f5)break;else _0x46be52['push'](_0x46be52['shift']());}catch(_0x232727){_0x46be52['push'](_0x46be52['shift']());}}}(a147_0x47b6,0x274f5));import{getPagePermit,savePagePermit}from'../../core/api-client.js';function a147_0x4849(_0xf64415,_0x470b89){_0xf64415=_0xf64415-0x1c4;const _0x47b647=a147_0x47b6();let _0x484998=_0x47b647[_0xf64415];return _0x484998;}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{MENU_ID_FLAG,PAGE_SET_ROLE_FLAGS,PAGE_SLOT_SPECS,projectPageSlot,resolvePermitRoles,splitList}from'../../commands/permit/shared.js';function a147_0x47b6(){const _0x15920f=['join','validation','360776VftCGR','Pass\x20at\x20least\x20one\x20of:\x20','280wQubvy','Set\x20page\x20permissions\x20for\x20a\x20menu\x20(menu/create/update/delete/detail/export/row\x20roles);\x20requires\x20--yes','156290znsKLw','Only\x20slots\x20present\x20in\x20`permit\x20page-get`\x20can\x20be\x20set.','length','140oFPfXr','POST','3495ENEInT','flag','Updated\x20page\x20permit\x20for\x20menu\x20','This\x20page\x20has\x20no\x20\x22','selector','label','\x20cannot\x20be\x20empty.','menuId','1308967VfPQvh','23454szodVH','key','1WeZCTY','650vAAwXP','menu-id','18RGzKdy','Nothing\x20to\x20set.','push','page-set','map','531294axuIii','584LkGmpT','appCode','12VhIOXO','num','7343QrSRqQ'];a147_0x47b6=function(){return _0x15920f;};return a147_0x47b6();}const SAVE_PATH='/smartapi/permit/page/save';function collectRequestedSlots(_0x159e6c){const _0x5c6fc5=a147_0x4849,_0x418777=[];for(const _0x3e6e9e of PAGE_SLOT_SPECS){const _0xe8ccde=_0x159e6c[_0x5c6fc5(0x1c9)](_0x3e6e9e[_0x5c6fc5(0x1c9)]);if(_0xe8ccde===undefined||_0xe8ccde===null)continue;const _0x5d7af2=splitList(String(_0xe8ccde));if(_0x5d7af2[_0x5c6fc5(0x1c5)]===0x0)throw CliErrors['validation']('--'+_0x3e6e9e[_0x5c6fc5(0x1c9)]+_0x5c6fc5(0x1ce),'Pass\x20at\x20least\x20one\x20role,\x20or\x20omit\x20the\x20flag.\x20Clearing\x20permissions\x20is\x20not\x20supported\x20by\x20this\x20command.');_0x418777[_0x5c6fc5(0x1d8)]({'spec':_0x3e6e9e,'refs':_0x5d7af2});}return _0x418777;}async function buildPlan(_0x2ac23f,_0x4bd13a){const _0x7e9a69=a147_0x4849,_0x27aebf=_0x2ac23f[_0x7e9a69(0x1df)](_0x7e9a69(0x1d5)),_0x320f31=collectRequestedSlots(_0x2ac23f);if(_0x320f31['length']===0x0)throw CliErrors[_0x7e9a69(0x1e2)](_0x7e9a69(0x1d7),_0x7e9a69(0x1e4)+PAGE_SLOT_SPECS['map'](_0x3a497f=>'--'+_0x3a497f['flag'])[_0x7e9a69(0x1e1)](',\x20')+'.');const _0x2a1624=await getPagePermit(_0x27aebf),_0x4aa112={},_0x52975f={},_0x35298d=[];for(const {spec:_0x30ccf6,refs:_0x332f98}of _0x320f31){const _0x264bae=_0x2a1624[_0x30ccf6[_0x7e9a69(0x1d2)]];if(!_0x264bae)throw CliErrors[_0x7e9a69(0x1e2)](_0x7e9a69(0x1cb)+_0x30ccf6[_0x7e9a69(0x1cd)]+'\x22\x20permission\x20slot\x20('+_0x30ccf6[_0x7e9a69(0x1d2)]+').',_0x7e9a69(0x1c4));_0x4aa112[_0x30ccf6[_0x7e9a69(0x1d2)]]=projectPageSlot(_0x264bae);const _0x2b2304=await resolvePermitRoles(_0x2ac23f['appCode'],_0x332f98,{'allowSelf':_0x30ccf6['allowSelf'],'label':_0x30ccf6[_0x7e9a69(0x1cd)]});_0x264bae['rolePermit']=_0x2b2304,_0x52975f[_0x30ccf6[_0x7e9a69(0x1d2)]]=projectPageSlot(_0x264bae);}const _0x5429df={'operation':_0x7e9a69(0x1d9),'selector':{'appCode':_0x2ac23f[_0x7e9a69(0x1dd)],'menuId':_0x27aebf,'slots':_0x320f31[_0x7e9a69(0x1da)](_0x46f19f=>_0x46f19f['spec'][_0x7e9a69(0x1d2)])},'before':_0x4aa112,'after':_0x52975f,'dryRun':_0x4bd13a,'backend':{'method':_0x7e9a69(0x1c7),'path':SAVE_PATH},'warnings':_0x35298d};return{'page':_0x2a1624,'mutation':_0x5429df};}export const permitPageSet={'service':'permit','command':a147_0x21155d(0x1d9),'description':a147_0x21155d(0x1e6),'risk':'high-risk-write','flags':[MENU_ID_FLAG,...PAGE_SET_ROLE_FLAGS,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x54ac98){const _0x2a17b7=a147_0x21155d,_0x15ab4e=collectRequestedSlots(_0x54ac98);if(_0x15ab4e['length']===0x0)throw CliErrors[_0x2a17b7(0x1e2)]('Nothing\x20to\x20set.',_0x2a17b7(0x1e4)+PAGE_SLOT_SPECS['map'](_0x47d5d6=>'--'+_0x47d5d6['flag'])[_0x2a17b7(0x1e1)](',\x20')+'.');},async 'dryRun'(_0x417fc3){const _0x173ac5=a147_0x21155d,{mutation:_0x134a75}=await buildPlan(_0x417fc3,!![]);return asDryRunResult(_0x134a75,{'method':_0x173ac5(0x1c7),'url':SAVE_PATH});},async 'execute'(_0x324756){const _0xe15f53=a147_0x21155d,{page:_0x5139d2,mutation:_0x445d5c}=await buildPlan(_0x324756,![]);return await savePagePermit(_0x5139d2),{'ok':!![],'data':_0x445d5c,'message':_0xe15f53(0x1ca)+_0x445d5c[_0xe15f53(0x1cc)][_0xe15f53(0x1cf)]};}};
@@ -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_0x7913b7=a148_0x8d7c;(function(_0x5e2cfd,_0x2f3406){const _0x5d42da=a148_0x8d7c,_0xb72225=_0x5e2cfd();while(!![]){try{const _0xb1b92d=parseInt(_0x5d42da(0xdb))/0x1+parseInt(_0x5d42da(0xc7))/0x2*(-parseInt(_0x5d42da(0xc4))/0x3)+-parseInt(_0x5d42da(0xc2))/0x4*(parseInt(_0x5d42da(0xc9))/0x5)+-parseInt(_0x5d42da(0xd6))/0x6*(-parseInt(_0x5d42da(0xc8))/0x7)+-parseInt(_0x5d42da(0xd1))/0x8+-parseInt(_0x5d42da(0xea))/0x9*(-parseInt(_0x5d42da(0xe0))/0xa)+parseInt(_0x5d42da(0xd2))/0xb*(parseInt(_0x5d42da(0xd8))/0xc);if(_0xb1b92d===_0x2f3406)break;else _0xb72225['push'](_0xb72225['shift']());}catch(_0x432041){_0xb72225['push'](_0xb72225['shift']());}}}(a148_0x9077,0xd2fbf));import{getRoleApiResources,updateAppRole}from'../../core/api-client.js';function a148_0x9077(){const _0x1cb1eb=['datasets','Revoke\x20a\x20role\x27s\x20dataset\x20API\x20access\x20by\x20datasetCode\x20(roleType\x20API);\x20requires\x20--yes','Pass\x20--datasets\x20<datasetCode,...>.','9mHQhmd','role-apis-set\x20currently\x20supports\x20revoking\x20dataset\x20API\x20access\x20(use\x20case\x204).','datasetCodes','revoke','43164fAbhNn','validation','420225pJRiWo','push','high-risk-write','6BvKMAd','175721ZdqYGN','325duTnCX','action','selector','permit','get','bool','API','/smartapi/permit/role/update','3459416SoQPGj','110bONudp','has','length','POST','174atIpRS','role-apis-set','1299468VfbUYK','roleName','Revoked\x20API\x20access\x20for\x20','12356QKrRQf','appCode','\x20dataset(s)\x20on\x20role\x20','str','api-revoke','5950250ybePhD','join','set','Missing\x20--revoke.','Unknown\x20datasetCode(s)\x20for\x20this\x20role\x27s\x20API\x20resources:\x20','filter','flagMissing'];a148_0x9077=function(){return _0x1cb1eb;};return a148_0x9077();}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';function a148_0x8d7c(_0x585628,_0xc50baf){_0x585628=_0x585628-0xc2;const _0x907724=a148_0x9077();let _0x8d7c4d=_0x907724[_0x585628];return _0x8d7c4d;}const UPDATE_PATH=a148_0x7913b7(0xd0);async function buildPlan(_0x3b7f0e,_0x2a2dd7){const _0x142b50=a148_0x7913b7,_0x3b9efa=await resolveRoleRef(_0x3b7f0e['appCode'],readRoleRef(_0x3b7f0e));assertPermConfigurable(_0x3b9efa);if(!_0x3b7f0e[_0x142b50(0xce)](_0x142b50(0xed)))throw CliErrors[_0x142b50(0xc3)]('Missing\x20--revoke.',_0x142b50(0xeb));const _0x26ddc0=splitList(_0x3b7f0e[_0x142b50(0xde)](_0x142b50(0xe7)));if(_0x26ddc0[_0x142b50(0xd4)]===0x0)throw CliErrors['flagMissing'](_0x142b50(0xe7),'Pass\x20--datasets\x20<datasetCode,...>.');const _0x2642f9=await getRoleApiResources(_0x3b7f0e[_0x142b50(0xdc)],_0x3b9efa['id']),{byCode:_0x39201c,byDataset:_0x3e31b3}=flattenApiResources(_0x2642f9),_0x31641a=_0x26ddc0[_0x142b50(0xe5)](_0x3e62a0=>!_0x3e31b3[_0x142b50(0xd3)](_0x3e62a0));if(_0x31641a['length']>0x0)throw CliErrors[_0x142b50(0xc3)](_0x142b50(0xe4)+_0x31641a[_0x142b50(0xe1)](',\x20')+'.','Verify\x20the\x20datasetCode,\x20or\x20check\x20the\x20role\x27s\x20API\x20resource\x20matrix.');const _0x44522a=new Map(),_0x3980cf=[],_0x19e2e1=[];for(const _0xac83fa of _0x26ddc0){for(const _0x32f983 of _0x3e31b3[_0x142b50(0xcd)](_0xac83fa)){const _0x33f17d=_0x39201c[_0x142b50(0xcd)](_0x32f983);_0x44522a[_0x142b50(0xe2)](_0x32f983,'0'),_0x3980cf[_0x142b50(0xc5)]({'resourceCode':_0x32f983,'datasetCode':_0xac83fa,'action':_0x33f17d[_0x142b50(0xca)]}),_0x19e2e1[_0x142b50(0xc5)]({'resourceCode':_0x32f983,'datasetCode':_0xac83fa,'action':'0'});}}const _0x50fb6a=buildPermits(_0x39201c,_0x44522a),_0x1269b7={'operation':_0x142b50(0xdf),'selector':{'appCode':_0x3b7f0e[_0x142b50(0xdc)],'roleId':_0x3b9efa['id'],'roleName':_0x3b9efa['roleName'],'datasetCodes':_0x26ddc0},'before':_0x3980cf,'after':_0x19e2e1,'dryRun':_0x2a2dd7,'backend':{'method':_0x142b50(0xd5),'path':UPDATE_PATH,'roleType':_0x142b50(0xcf)},'warnings':[]};return{'role':_0x3b9efa,'permits':_0x50fb6a,'mutation':_0x1269b7};}export const permitRoleApisSet={'service':a148_0x7913b7(0xcc),'command':a148_0x7913b7(0xd7),'description':a148_0x7913b7(0xe8),'risk':a148_0x7913b7(0xc6),'flags':[ROLE_REF_FLAG,REVOKE_FLAG,DATASETS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1e2548){const _0x24f8ef=a148_0x7913b7;if(!_0x1e2548['bool'](_0x24f8ef(0xed)))throw CliErrors[_0x24f8ef(0xc3)](_0x24f8ef(0xe3),_0x24f8ef(0xeb));if(splitList(_0x1e2548[_0x24f8ef(0xde)](_0x24f8ef(0xe7)))[_0x24f8ef(0xd4)]===0x0)throw CliErrors[_0x24f8ef(0xe6)](_0x24f8ef(0xe7),_0x24f8ef(0xe9));},async 'dryRun'(_0x459b4b){const _0x4e5c0a=a148_0x7913b7,{mutation:_0x1c5efa}=await buildPlan(_0x459b4b,!![]);return asDryRunResult(_0x1c5efa,{'method':_0x4e5c0a(0xd5),'url':UPDATE_PATH});},async 'execute'(_0x2cb762){const _0x22cf7a=a148_0x7913b7,{role:_0x5af8a6,permits:_0x1232b0,mutation:_0x1e26aa}=await buildPlan(_0x2cb762,![]);return await updateAppRole({'id':_0x5af8a6['id'],'appCode':_0x2cb762[_0x22cf7a(0xdc)],'roleType':'API','permits':_0x1232b0}),{'ok':!![],'data':_0x1e26aa,'message':_0x22cf7a(0xda)+_0x1e26aa[_0x22cf7a(0xcb)][_0x22cf7a(0xec)][_0x22cf7a(0xd4)]+_0x22cf7a(0xdd)+_0x5af8a6[_0x22cf7a(0xd9)]};}};
@@ -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
+ function a149_0x1851(){const _0x1b7dc4=['9810934VQtzoM','filter','set','resourceCodes','has','PAGE','appCode','flagMissing','menus','4713624khuUhH','/smartapi/permit/role/update','get','252VjbhFp','permit','Unknown\x20menu\x20resourceCode(s):\x20','Pass\x20--menus\x20<resourceCode,...>.','length','4999108iheLtz','push','roleName','role-menus-set','32276OWcyxv','action','2015130JArxcf','menu-grant','Run\x20`permit\x20role-menus\x20--role\x20<id>`\x20to\x20see\x20valid\x20resourceCodes.','selector','27KDqgZD','POST','join','str','502168zzwmNs','86157TjZoQc'];a149_0x1851=function(){return _0x1b7dc4;};return a149_0x1851();}const a149_0x3be88e=a149_0x3677;(function(_0x436cff,_0x137655){const _0x471679=a149_0x3677,_0x4e18e9=_0x436cff();while(!![]){try{const _0x1ad580=-parseInt(_0x471679(0x17c))/0x1+parseInt(_0x471679(0x171))/0x2*(parseInt(_0x471679(0x177))/0x3)+-parseInt(_0x471679(0x16d))/0x4+-parseInt(_0x471679(0x173))/0x5+-parseInt(_0x471679(0x186))/0x6+parseInt(_0x471679(0x17d))/0x7+parseInt(_0x471679(0x17b))/0x8*(parseInt(_0x471679(0x189))/0x9);if(_0x1ad580===_0x137655)break;else _0x4e18e9['push'](_0x4e18e9['shift']());}catch(_0x2ce764){_0x4e18e9['push'](_0x4e18e9['shift']());}}}(a149_0x1851,0xbe634));import{getRoleMenuResources,updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';function a149_0x3677(_0x418203,_0x295ee8){_0x418203=_0x418203-0x16b;const _0x18518b=a149_0x1851();let _0x367775=_0x18518b[_0x418203];return _0x367775;}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_0x3be88e(0x187);async function buildPlan(_0x28e581,_0x16b143){const _0x1c49bc=a149_0x3be88e,_0x124e43=await resolveRoleRef(_0x28e581[_0x1c49bc(0x183)],readRoleRef(_0x28e581));assertPermConfigurable(_0x124e43);const _0x23f508=readGrantRevoke(_0x28e581),_0x230b87=splitList(_0x28e581[_0x1c49bc(0x17a)](_0x1c49bc(0x185)));if(_0x230b87[_0x1c49bc(0x16c)]===0x0)throw CliErrors[_0x1c49bc(0x184)]('menus','Pass\x20--menus\x20<resourceCode,...>.');const _0x18ebdc=await getRoleMenuResources(_0x28e581[_0x1c49bc(0x183)],_0x124e43['id']),_0x4806eb=flattenMenuResources(_0x18ebdc),_0x5ae522=_0x230b87[_0x1c49bc(0x17e)](_0x4427fc=>!_0x4806eb[_0x1c49bc(0x181)](_0x4427fc));if(_0x5ae522['length']>0x0)throw CliErrors['validation'](_0x1c49bc(0x18b)+_0x5ae522[_0x1c49bc(0x179)](',\x20')+'.',_0x1c49bc(0x175));const _0x52ba36=new Map(),_0x3f773c=[],_0x428e64=[];for(const _0x12943c of _0x230b87){const _0x20539d=_0x4806eb[_0x1c49bc(0x188)](_0x12943c);_0x52ba36[_0x1c49bc(0x17f)](_0x12943c,_0x23f508),_0x3f773c[_0x1c49bc(0x16e)]({'resourceCode':_0x12943c,'action':_0x20539d[_0x1c49bc(0x172)]}),_0x428e64[_0x1c49bc(0x16e)]({'resourceCode':_0x12943c,'action':_0x23f508});}const _0x4ea55a=buildPermits(_0x4806eb,_0x52ba36),_0x34a598={'operation':_0x23f508==='access'?_0x1c49bc(0x174):'menu-revoke','selector':{'appCode':_0x28e581[_0x1c49bc(0x183)],'roleId':_0x124e43['id'],'roleName':_0x124e43[_0x1c49bc(0x16f)],'resourceCodes':_0x230b87},'before':_0x3f773c,'after':_0x428e64,'dryRun':_0x16b143,'backend':{'method':_0x1c49bc(0x178),'path':UPDATE_PATH,'roleType':_0x1c49bc(0x182)},'warnings':[]};return{'role':_0x124e43,'permits':_0x4ea55a,'mutation':_0x34a598};}export const permitRoleMenusSet={'service':a149_0x3be88e(0x18a),'command':a149_0x3be88e(0x170),'description':'Grant\x20or\x20revoke\x20a\x20role\x27s\x20menu\x20access\x20by\x20resourceCode\x20(roleType\x20PAGE);\x20requires\x20--yes','risk':'high-risk-write','flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,MENUS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x38d432){const _0xcee44a=a149_0x3be88e;readGrantRevoke(_0x38d432);if(splitList(_0x38d432[_0xcee44a(0x17a)]('menus'))[_0xcee44a(0x16c)]===0x0)throw CliErrors[_0xcee44a(0x184)](_0xcee44a(0x185),_0xcee44a(0x16b));},async 'dryRun'(_0xcd90aa){const _0x382b36=a149_0x3be88e,{mutation:_0x21bec2}=await buildPlan(_0xcd90aa,!![]);return asDryRunResult(_0x21bec2,{'method':_0x382b36(0x178),'url':UPDATE_PATH});},async 'execute'(_0x588dda){const _0x1f1aaf=a149_0x3be88e,{role:_0x542298,permits:_0x1ba1c9,mutation:_0x228ccb}=await buildPlan(_0x588dda,![]);return await updateAppRole({'id':_0x542298['id'],'appCode':_0x588dda['appCode'],'roleType':_0x1f1aaf(0x182),'permits':_0x1ba1c9}),{'ok':!![],'data':_0x228ccb,'message':'Updated\x20'+_0x228ccb[_0x1f1aaf(0x176)][_0x1f1aaf(0x180)]['length']+'\x20menu\x20permit(s)\x20for\x20role\x20'+_0x542298[_0x1f1aaf(0x16f)]};}};
@@ -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_0x375165=a150_0x18ec;(function(_0x48db5d,_0x877e34){const _0x58dd37=a150_0x18ec,_0x58aed2=_0x48db5d();while(!![]){try{const _0x353cfd=-parseInt(_0x58dd37(0xf2))/0x1*(parseInt(_0x58dd37(0x10a))/0x2)+parseInt(_0x58dd37(0x105))/0x3*(parseInt(_0x58dd37(0xfe))/0x4)+-parseInt(_0x58dd37(0xfa))/0x5+-parseInt(_0x58dd37(0xf4))/0x6*(parseInt(_0x58dd37(0xf9))/0x7)+-parseInt(_0x58dd37(0xff))/0x8*(parseInt(_0x58dd37(0x104))/0x9)+parseInt(_0x58dd37(0x103))/0xa*(parseInt(_0x58dd37(0x10c))/0xb)+-parseInt(_0x58dd37(0x100))/0xc*(-parseInt(_0x58dd37(0xf3))/0xd);if(_0x353cfd===_0x877e34)break;else _0x58aed2['push'](_0x58aed2['shift']());}catch(_0x14287f){_0x58aed2['push'](_0x58aed2['shift']());}}}(a150_0x34bb,0xb916b));import{getRoleMenuResources}from'../../core/api-client.js';function a150_0x18ec(_0x36e7c9,_0x471e62){_0x36e7c9=_0x36e7c9-0xf2;const _0x34bb14=a150_0x34bb();let _0x18eccc=_0x34bb14[_0x36e7c9];return _0x18eccc;}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_0x34bb(){const _0x2635f1=['626370OXgTAz','appCode','access','length','read','7952ufqPxr','\x20menu(s)\x20allowed','1315765BDhnlI','resourceCode','281cyngWU','13inyOLh','807198YNsUis','roleName','action','allowed','map','14glUDoW','2749570ZyksKe','filter','role-menus','resourceName','4MuQYvw','6056mlIbaM','38374548sEzPck','Role\x20','values','30wENjAy','12735hJGYlR'];a150_0x34bb=function(){return _0x2635f1;};return a150_0x34bb();}export const permitRoleMenus={'service':'permit','command':a150_0x375165(0xfc),'description':'Show\x20a\x20role\x27s\x20current\x20menu\x20permission\x20matrix','risk':a150_0x375165(0x109),'flags':[ROLE_REF_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x4dc8e8){const _0x2937a0=a150_0x375165,_0x136817=await resolveRoleRef(_0x4dc8e8[_0x2937a0(0x106)],readRoleRef(_0x4dc8e8)),_0x5a34e7=await getRoleMenuResources(_0x4dc8e8[_0x2937a0(0x106)],_0x136817['id']),_0x4e5e8e=flattenMenuResources(_0x5a34e7),_0x268cf7=Array['from'](_0x4e5e8e[_0x2937a0(0x102)]())[_0x2937a0(0xf8)](_0x2e4c73=>({'resourceCode':_0x2e4c73[_0x2937a0(0x10d)],'resourceName':_0x2e4c73[_0x2937a0(0xfd)],'allowed':_0x2e4c73[_0x2937a0(0xf6)]===_0x2937a0(0x107),'action':_0x2e4c73[_0x2937a0(0xf6)]}));return{'ok':!![],'data':{'selector':{'appCode':_0x4dc8e8[_0x2937a0(0x106)],'roleId':_0x136817['id'],'roleName':_0x136817[_0x2937a0(0xf5)]},'menus':_0x268cf7},'message':_0x2937a0(0x101)+_0x136817[_0x2937a0(0xf5)]+'\x20has\x20'+_0x268cf7[_0x2937a0(0xfb)](_0x3e1a6=>_0x3e1a6[_0x2937a0(0xf7)])['length']+'/'+_0x268cf7[_0x2937a0(0x108)]+_0x2937a0(0x10b)};}};
@@ -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_0x5ace85=a151_0x33f6;(function(_0x1c5036,_0x5d1bd7){const _0x2aee85=a151_0x33f6,_0x17c067=_0x1c5036();while(!![]){try{const _0x502881=-parseInt(_0x2aee85(0x200))/0x1*(-parseInt(_0x2aee85(0x1ee))/0x2)+parseInt(_0x2aee85(0x236))/0x3*(parseInt(_0x2aee85(0x1f1))/0x4)+-parseInt(_0x2aee85(0x1e7))/0x5+-parseInt(_0x2aee85(0x1fa))/0x6*(parseInt(_0x2aee85(0x1fb))/0x7)+-parseInt(_0x2aee85(0x21c))/0x8+-parseInt(_0x2aee85(0x210))/0x9*(-parseInt(_0x2aee85(0x224))/0xa)+parseInt(_0x2aee85(0x1ec))/0xb;if(_0x502881===_0x5d1bd7)break;else _0x17c067['push'](_0x17c067['shift']());}catch(_0x40e416){_0x17c067['push'](_0x17c067['shift']());}}}(a151_0x405f,0x2dc10));import{listPermitRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const MENU_ID_FLAG={'name':a151_0x5ace85(0x21f),'type':'number','required':!![],'description':a151_0x5ace85(0x1e9)};export const ROLE_REF_FLAG={'name':a151_0x5ace85(0x20e),'type':a151_0x5ace85(0x233),'required':!![],'description':a151_0x5ace85(0x1fd)};export const GRANT_FLAG={'name':a151_0x5ace85(0x231),'type':a151_0x5ace85(0x22b),'required':![],'description':'Grant\x20access\x20to\x20the\x20listed\x20resources'};function a151_0x405f(){const _0x22cf0f=['631750bXTELd','Missing\x20action.','Menu\x20id\x20(from\x20`menu\x20list`)','validation','data\x20export','3292256RVSkhw','SELF','1384DqEubo','menu\x20visibility',';\x20SELF\x20=\x20only\x20own\x20rows','4272stTJKE','data\x20update','Comma-separated\x20datasetCodes\x20to\x20revoke\x20API\x20access\x20for','Run\x20`role\x20list`.','row\x20visibility','pageNodeList','resourceName','Pass\x20--role\x20<id|name>.','update-roles','16806jckeyb','637qmekGg','dataPermit','Role\x20id\x20or\x20role\x20name','Pass\x20exactly\x20one\x20of\x20--grant\x20/\x20--revoke.','\x20is\x20not\x20available\x20for\x20this\x20app.','80btFmMk','Revoke\x20access\x20to\x20the\x20listed\x20resources','label','find','menuPermit','allowSelf','entries','bool','toUpperCase','roleType','resourceCode','row-roles','map','Role\x20id\x20','role','split','603ezqwZb','Roles\x20for\x20','\x20(comma-separated\x20SELF/ALL/id/name)','rolePermit','set','push','detail-roles','SELF\x20is\x20not\x20allowed\x20for\x20','Run\x20`role\x20list`,\x20or\x20use\x20SELF/ALL/<id>.','data\x20create','dataDetail','Disambiguate\x20with\x20an\x20id.','2329712TVVEVZ','trim','SELF\x20(row-level)\x20applies\x20only\x20to\x20--row-roles.','menu-id','ALL','datasetCode','export-roles','length','31090sQFavp','delete-roles','\x22\x20not\x20found.','action','menuId','dataDelete','filter','boolean','dataUpdate','create-roles','data\x20delete','\x20not\x20found.','get','grant','access','string','Role\x20\x22','roleName','834SHjlbg','flagMissing','Comma-separated\x20menu\x20resourceCodes\x20to\x20grant/revoke','menus','Special\x20role\x20','dataCreate','allowedActions','flag','\x22\x20is\x20ambiguous\x20(ids:\x20','dataExport'];a151_0x405f=function(){return _0x22cf0f;};return a151_0x405f();}export const REVOKE_FLAG={'name':'revoke','type':a151_0x5ace85(0x22b),'required':![],'description':a151_0x5ace85(0x201)};export const MENUS_FLAG={'name':a151_0x5ace85(0x1e0),'type':a151_0x5ace85(0x233),'required':!![],'description':a151_0x5ace85(0x1df)};export const DATASETS_FLAG={'name':'datasets','type':a151_0x5ace85(0x233),'required':!![],'description':a151_0x5ace85(0x1f3)};export const PAGE_SLOT_SPECS=[{'flag':'menu-roles','key':a151_0x5ace85(0x204),'allowSelf':![],'label':a151_0x5ace85(0x1ef)},{'flag':a151_0x5ace85(0x22d),'key':a151_0x5ace85(0x1e2),'allowSelf':![],'label':a151_0x5ace85(0x219)},{'flag':a151_0x5ace85(0x1f9),'key':a151_0x5ace85(0x22c),'allowSelf':![],'label':a151_0x5ace85(0x1f2)},{'flag':a151_0x5ace85(0x225),'key':a151_0x5ace85(0x229),'allowSelf':![],'label':a151_0x5ace85(0x22e)},{'flag':a151_0x5ace85(0x216),'key':a151_0x5ace85(0x21a),'allowSelf':![],'label':'data\x20detail'},{'flag':a151_0x5ace85(0x222),'key':a151_0x5ace85(0x1e6),'allowSelf':![],'label':a151_0x5ace85(0x1eb)},{'flag':a151_0x5ace85(0x20b),'key':a151_0x5ace85(0x1fc),'allowSelf':!![],'label':a151_0x5ace85(0x1f5)}];export const PAGE_SET_ROLE_FLAGS=PAGE_SLOT_SPECS[a151_0x5ace85(0x20c)](_0x33ed80=>({'name':_0x33ed80[a151_0x5ace85(0x1e4)],'type':a151_0x5ace85(0x233),'required':![],'description':a151_0x5ace85(0x211)+_0x33ed80[a151_0x5ace85(0x202)]+a151_0x5ace85(0x212)+(_0x33ed80['allowSelf']?a151_0x5ace85(0x1f0):'')}));export function splitList(_0x325074){const _0x1619fb=a151_0x5ace85;return _0x325074[_0x1619fb(0x20f)](',')[_0x1619fb(0x20c)](_0x396e80=>_0x396e80[_0x1619fb(0x21d)]())[_0x1619fb(0x22a)](Boolean);}export function projectRoleRef(_0x454b82){const _0x18dd63=a151_0x5ace85;return{'id':_0x454b82['id'],'roleName':_0x454b82[_0x18dd63(0x235)],'roleType':_0x454b82[_0x18dd63(0x209)]};}export async function resolvePermitRoles(_0x42b16b,_0x4dcb65,_0x3de304){const _0x263856=a151_0x5ace85,_0x584421=await listPermitRoles(_0x42b16b,{'needSelf':!![],'needPublic':!![]}),_0x3d52ff=[];for(const _0x17d807 of _0x4dcb65){const _0x485d2e=resolveOnePermitRole(_0x584421,_0x17d807);if(!_0x3de304[_0x263856(0x205)]&&_0x485d2e[_0x263856(0x209)]===_0x263856(0x1ed))throw CliErrors[_0x263856(0x1ea)](_0x263856(0x217)+_0x3de304[_0x263856(0x202)]+'.',_0x263856(0x21e));if(!_0x3d52ff['some'](_0x4813f5=>_0x4813f5['id']===_0x485d2e['id']))_0x3d52ff[_0x263856(0x215)](_0x485d2e);}return _0x3d52ff;}function resolveOnePermitRole(_0x27a126,_0x1fe466){const _0x352c8d=a151_0x5ace85,_0x4ce5aa=_0x1fe466[_0x352c8d(0x21d)](),_0x41f525=_0x4ce5aa[_0x352c8d(0x208)]();if(_0x41f525==='SELF'||_0x41f525===_0x352c8d(0x220)){const _0x5ea09e=_0x27a126[_0x352c8d(0x203)](_0xebb36b=>_0xebb36b['roleType']===_0x41f525);if(!_0x5ea09e)throw CliErrors[_0x352c8d(0x1ea)](_0x352c8d(0x1e1)+_0x41f525+_0x352c8d(0x1ff));return _0x5ea09e;}if(/^-?\d+$/['test'](_0x4ce5aa)){const _0x5e65d2=Number(_0x4ce5aa),_0x2f02ac=_0x27a126[_0x352c8d(0x203)](_0x486bd5=>_0x486bd5['id']===_0x5e65d2);if(!_0x2f02ac)throw CliErrors['validation'](_0x352c8d(0x20d)+_0x5e65d2+_0x352c8d(0x22f),_0x352c8d(0x1f4));return _0x2f02ac;}const _0x1d3d18=_0x27a126['filter'](_0x28eac5=>_0x28eac5[_0x352c8d(0x235)]===_0x4ce5aa);if(_0x1d3d18['length']===0x0)throw CliErrors[_0x352c8d(0x1ea)]('Role\x20\x22'+_0x4ce5aa+_0x352c8d(0x226),_0x352c8d(0x218));if(_0x1d3d18[_0x352c8d(0x223)]>0x1)throw CliErrors[_0x352c8d(0x1ea)](_0x352c8d(0x234)+_0x4ce5aa+_0x352c8d(0x1e5)+_0x1d3d18[_0x352c8d(0x20c)](_0x44cf09=>_0x44cf09['id'])['join'](',\x20')+').',_0x352c8d(0x21b));return _0x1d3d18[0x0];}function a151_0x33f6(_0x16f0f3,_0x47d4cf){_0x16f0f3=_0x16f0f3-0x1df;const _0x405f46=a151_0x405f();let _0x33f6c5=_0x405f46[_0x16f0f3];return _0x33f6c5;}export function projectPageSlot(_0x12633f){const _0x42cc4c=a151_0x5ace85;if(!_0x12633f)return null;return{'resourceCode':_0x12633f[_0x42cc4c(0x20a)],'roles':(_0x12633f[_0x42cc4c(0x213)]??[])[_0x42cc4c(0x20c)](projectRoleRef)};}export function projectPagePermit(_0x499c45){const _0x5d5bc2=a151_0x5ace85,_0xf03c49={'menuId':_0x499c45[_0x5d5bc2(0x228)],'appCode':_0x499c45['appCode'],'menuPermit':projectPageSlot(_0x499c45['menuPermit'])};for(const _0x36cdbe of PAGE_SLOT_SPECS){if(_0x36cdbe['key']===_0x5d5bc2(0x204))continue;_0xf03c49[_0x36cdbe['key']]=projectPageSlot(_0x499c45[_0x36cdbe['key']]);}return _0xf03c49;}export function flattenMenuResources(_0x436aa1){const _0xb49a81=new Map(),_0x5e0cb8=_0x58e716=>{const _0x2aea77=a151_0x33f6;for(const _0x345c47 of _0x58e716??[]){_0xb49a81[_0x2aea77(0x214)](_0x345c47[_0x2aea77(0x20a)],{'resourceCode':_0x345c47[_0x2aea77(0x20a)],'resourceName':_0x345c47[_0x2aea77(0x1f7)],'action':_0x345c47[_0x2aea77(0x1e3)]?.[0x0]??'0'});if(_0x345c47[_0x2aea77(0x1f6)])_0x5e0cb8(_0x345c47[_0x2aea77(0x1f6)]);}};return _0x5e0cb8(_0x436aa1),_0xb49a81;}export function flattenApiResources(_0x4fcddc){const _0x48f913=a151_0x5ace85,_0x2ca96f=new Map(),_0x16c432=new Map();for(const _0x391a61 of _0x4fcddc){const _0x4afae2=_0x391a61['apiList']??{};for(const [_0x2b5a45,_0x3428e4]of Object[_0x48f913(0x206)](_0x4afae2)){_0x2ca96f['set'](_0x2b5a45,{'resourceCode':_0x2b5a45,'resourceName':_0x391a61[_0x48f913(0x1f7)],'datasetCode':_0x391a61['datasetCode'],'action':_0x3428e4?.[0x0]??'0'});const _0x2fb5ab=_0x16c432[_0x48f913(0x230)](_0x391a61[_0x48f913(0x221)])??[];_0x2fb5ab[_0x48f913(0x215)](_0x2b5a45),_0x16c432[_0x48f913(0x214)](_0x391a61[_0x48f913(0x221)],_0x2fb5ab);}}return{'byCode':_0x2ca96f,'byDataset':_0x16c432};}export function buildPermits(_0x4ce975,_0x3edde6){const _0x59950=a151_0x5ace85,_0x2e3bac={};for(const [_0x55e285,_0x3d4ec2]of _0x4ce975){const _0x4140d5=_0x3edde6[_0x59950(0x230)](_0x55e285)??_0x3d4ec2[_0x59950(0x227)];_0x2e3bac[_0x55e285]=[_0x4140d5];}return _0x2e3bac;}export function readRoleRef(_0x48f681){const _0x2a6433=a151_0x5ace85,_0x3ad985=_0x48f681['str'](_0x2a6433(0x20e))[_0x2a6433(0x21d)]();if(!_0x3ad985)throw CliErrors[_0x2a6433(0x237)](_0x2a6433(0x20e),_0x2a6433(0x1f8));return _0x3ad985;}export function readGrantRevoke(_0x407076){const _0x343b31=a151_0x5ace85,_0x2e2bff=_0x407076['bool'](_0x343b31(0x231)),_0x3a934d=_0x407076[_0x343b31(0x207)]('revoke');if(_0x2e2bff&&_0x3a934d)throw CliErrors[_0x343b31(0x1ea)]('--grant\x20and\x20--revoke\x20are\x20mutually\x20exclusive.');if(!_0x2e2bff&&!_0x3a934d)throw CliErrors[_0x343b31(0x1ea)](_0x343b31(0x1e8),_0x343b31(0x1fe));return _0x2e2bff?_0x343b31(0x232):'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(_0x2fcb32,_0x332529){const _0x30f48b=a152_0x5d3f,_0x7260cf=_0x2fcb32();while(!![]){try{const _0x34e8af=parseInt(_0x30f48b(0xc5))/0x1*(-parseInt(_0x30f48b(0xc1))/0x2)+parseInt(_0x30f48b(0xdb))/0x3*(-parseInt(_0x30f48b(0xcf))/0x4)+parseInt(_0x30f48b(0xc9))/0x5+-parseInt(_0x30f48b(0xbd))/0x6+-parseInt(_0x30f48b(0xd7))/0x7*(parseInt(_0x30f48b(0xdc))/0x8)+parseInt(_0x30f48b(0xca))/0x9*(-parseInt(_0x30f48b(0xd4))/0xa)+parseInt(_0x30f48b(0xd2))/0xb;if(_0x34e8af===_0x332529)break;else _0x7260cf['push'](_0x7260cf['shift']());}catch(_0x39a4b4){_0x7260cf['push'](_0x7260cf['shift']());}}}(a152_0x25ca,0xa3d99));import{existsSync}from'node:fs';function a152_0x5d3f(_0x50a831,_0x348005){_0x50a831=_0x50a831-0xbd;const _0x25cab1=a152_0x25ca();let _0x5d3fc0=_0x25cab1[_0x50a831];return _0x5d3fc0;}import a152_0x2c3817 from'node:path';import a152_0x14b680 from'chalk';import{input,confirm}from'@inquirer/prompts';function a152_0x25ca(){const _0x11e740=['Not\x20set','4OqUmcD','Logged\x20in','test','27236847iHAzSH','log','3640FlhVUH','No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','string','2067877fDlgQs','√\x20Login\x20status:\x20','my-app','resolve','1171119juMJJR','8rtuFoI','1343988yodqWa','Project\x20name\x20cannot\x20exceed\x2050\x20characters','env','Project\x20name:','484MDsTLQ','Directory\x20\x22','cyan','cwd','2951BsurbN','√\x20Project\x20Name:\x20','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','green','4061660ACyQHk','24561dGJCtC','production','\x22\x20already\x20exists','√\x20App\x20Code:\x20'];a152_0x25ca=function(){return _0x11e740;};return a152_0x25ca();}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(_0x1f25a5,_0xe09957,_0x3a21c0){const _0x3ba432=a152_0x5d3f,_0x1228bb=_0x3ba432(0xd9),_0x2aab83=readConfig(),_0x4fe431=typeof _0x2aab83[_0x3ba432(0xbf)]===_0x3ba432(0xd6)?_0x2aab83[_0x3ba432(0xbf)]:undefined,_0x568f9a=await input({'message':_0x3ba432(0xc0),'default':_0x1228bb,'validate':_0x5855c5=>{const _0x21f625=_0x3ba432,_0xc06f7b=_0x5855c5['trim']()||_0x1228bb;if(_0xc06f7b['length']>0x32)return _0x21f625(0xbe);const _0x594356=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0xc06f7b&&!_0x594356[_0x21f625(0xd1)](_0xc06f7b))return _0x21f625(0xc7);const _0x42f793=a152_0x2c3817[_0x21f625(0xda)](process[_0x21f625(0xc4)](),_0xc06f7b);if(existsSync(_0x42f793))return _0x21f625(0xc2)+_0xc06f7b+_0x21f625(0xcc);return!![];}});console[_0x3ba432(0xd3)](a152_0x14b680[_0x3ba432(0xc8)](_0x3ba432(0xc6)+a152_0x14b680[_0x3ba432(0xc3)](_0x568f9a)));const _0x26d741=await selectSingleAppcode(_0x3a21c0);console['log'](a152_0x14b680[_0x3ba432(0xc8)](_0x3ba432(0xcd)+a152_0x14b680[_0x3ba432(0xc3)](_0x26d741||_0x3ba432(0xce))));if(_0x26d741){const _0x22e384=await getIsSessionValid();if(!_0x22e384){const _0x11f4d6=await confirm({'message':_0x3ba432(0xd5),'default':!![]});if(_0x11f4d6){const _0x10a04c=await authServer({'silent':!![]});console[_0x3ba432(0xd3)](a152_0x14b680[_0x3ba432(0xc8)](_0x3ba432(0xd8)+a152_0x14b680[_0x3ba432(0xc3)](_0x10a04c?_0x3ba432(0xd0):'Login\x20failed')));}else console['log'](a152_0x14b680[_0x3ba432(0xc8)](_0x3ba432(0xd8)+a152_0x14b680[_0x3ba432(0xc3)]('Skipped')));}await _0x1f25a5({'projectName':_0x568f9a,'appCode':_0x26d741,'env':_0xe09957||_0x4fe431||_0x3ba432(0xcb)});}else await _0x1f25a5({'projectName':_0x568f9a,'env':_0xe09957||_0x4fe431||_0x3ba432(0xcb)});}
@@ -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_0x1a24(){const _0x15bd55=['toFixed','2026bWYfeu','1387245uSgRSB','275376RAuZRz','850772AmybJZ','57659YlelXH','66YlSPYu','replace','550592TqSaEF','583790HflGEm','now','59CpGgol','36TaeqFn'];a153_0x1a24=function(){return _0x15bd55;};return a153_0x1a24();}(function(_0x960799,_0x583d9d){const _0x3a3c98=a153_0x22cb,_0x5b6be6=_0x960799();while(!![]){try{const _0x17332d=parseInt(_0x3a3c98(0x116))/0x1*(-parseInt(_0x3a3c98(0x10c))/0x2)+-parseInt(_0x3a3c98(0x10e))/0x3+-parseInt(_0x3a3c98(0x10f))/0x4+parseInt(_0x3a3c98(0x10d))/0x5+parseInt(_0x3a3c98(0x111))/0x6*(parseInt(_0x3a3c98(0x110))/0x7)+-parseInt(_0x3a3c98(0x113))/0x8+parseInt(_0x3a3c98(0x10a))/0x9*(parseInt(_0x3a3c98(0x114))/0xa);if(_0x17332d===_0x583d9d)break;else _0x5b6be6['push'](_0x5b6be6['shift']());}catch(_0xd34cea){_0x5b6be6['push'](_0x5b6be6['shift']());}}}(a153_0x1a24,0x29230));function a153_0x22cb(_0x144d8f,_0x16ca5f){_0x144d8f=_0x144d8f-0x10a;const _0x1a2486=a153_0x1a24();let _0x22cbdf=_0x1a2486[_0x144d8f];return _0x22cbdf;}export function formatElapsed(_0x1437bb){const _0x8f0588=a153_0x22cb,_0x47eb33=Date[_0x8f0588(0x115)]()-_0x1437bb;if(_0x47eb33<0x3e8)return _0x47eb33+'ms';const _0x40505d=(_0x47eb33/0x3e8)[_0x8f0588(0x10b)](0x2),_0xf916be=_0x40505d[_0x8f0588(0x112)](/\.?0+$/u,'');return _0xf916be+'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 a154_0x3ce1(){const _0x67b658=['gray','√\x20Pulled\x20','434344eDjLAC','description','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','\x20√\x20','length','\x20\x201.\x20Start\x20project:\x20','env','*\x20Configuring\x20AppCode\x20for\x20project\x20','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','更新\x20package.json\x20name','projectName','package.json','Install\x20dependencies','36DGsjqA','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','项目创建失败:\x20','constants','test','currentVersion','清理项目目录失败:\x20','Project\x20name:\x20','API\x20配置拉取异常','error','stringify','配置应用AppCode:\x20','stableVersion','\x20|\x20AppCode:\x20','\x20run\x20start','Project\x20name\x20cannot\x20be\x20empty','stop','readFileSync','utf8','204ikIfWL','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','\x20&&\x20','fail','message','appCode','minimumVersion','cookie','\x20Generated\x20by\x20rabetbase\x20cli\x20','accessSync','bold','production','cyan','71810KMCToB','1.0.0','version','repeat','green','chdir','setLogPath','name','132DVWLPz','\x20config\x20set\x20appcode\x20<app-code>\x27','log','配置应用AppCode失败','keys','rmSync','\x20|\x20Default:\x20','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','existsSync','27792yQKfMT','defaultApp','\x20model(s)','info','开始创建项目:\x20','string','join','projectCode','W_OK','\x20api\x20pull','resolve','更新\x20package.json\x20失败','writeFileSync','parse','...','cwd','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','apps','warn','436316CXzPrU','create','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','\x20dataset(s),\x20generated\x20','Project\x20directory\x20','API\x20configuration\x20pulled:\x20','needsUpgrade','√\x20Configuration\x20file\x20created,\x20Apps:\x20','belowMinimum','6930450MSwKUb','\x20\x202.\x20Pull\x20API\x20configuration:\x20','145924bmsVKG','227668LfQHxr'];a154_0x3ce1=function(){return _0x67b658;};return a154_0x3ce1();}(function(_0x47b7fb,_0x2f6269){const _0xe5d29b=a154_0x2e91,_0x2db588=_0x47b7fb();while(!![]){try{const _0x3e637a=-parseInt(_0xe5d29b(0x1f6))/0x1+parseInt(_0xe5d29b(0x243))/0x2*(-parseInt(_0xe5d29b(0x23a))/0x3)+parseInt(_0xe5d29b(0x201))/0x4+-parseInt(_0xe5d29b(0x232))/0x5*(-parseInt(_0xe5d29b(0x225))/0x6)+-parseInt(_0xe5d29b(0x202))/0x7+-parseInt(_0xe5d29b(0x205))/0x8*(-parseInt(_0xe5d29b(0x212))/0x9)+parseInt(_0xe5d29b(0x1ff))/0xa;if(_0x3e637a===_0x2f6269)break;else _0x2db588['push'](_0x2db588['shift']());}catch(_0x2d1538){_0x2db588['push'](_0x2db588['shift']());}}}(a154_0x3ce1,0x569b6));import a154_0x17b4b0 from'path';import a154_0x30fc83 from'fs';import a154_0x170465 from'chalk';import a154_0x3aee1a 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(_0x238e07){const _0xe37168=a154_0x2e91,_0x37ec32=await checkCliVersion();(_0x37ec32['needsUpgrade']||_0x37ec32[_0xe37168(0x1fe)])&&(printCliUpgradeWarning(_0x37ec32),assertCliVersionSupported(_0x37ec32),logger[_0xe37168(0x246)](_0xe37168(0x1f7),'CLI\x20版本检查',{'currentVersion':_0x37ec32[_0xe37168(0x217)],'stableVersion':_0x37ec32[_0xe37168(0x21e)],'minimumVersion':_0x37ec32[_0xe37168(0x22b)],'needsUpgrade':_0x37ec32[_0xe37168(0x1fc)],'belowMinimum':_0x37ec32[_0xe37168(0x1fe)]}));if(_0x238e07[_0xe37168(0x24a)]&&_0x238e07[_0xe37168(0x22a)])await runCreate({'projectName':_0x238e07[_0xe37168(0x24a)],'appCode':_0x238e07['appCode'],'env':_0x238e07[_0xe37168(0x20b)]},_0x238e07);else{if(_0x238e07[_0xe37168(0x24a)]){const _0x2c4a35=await selectSingleAppcode(_0x238e07[_0xe37168(0x22c)]);await runCreate({'projectName':_0x238e07[_0xe37168(0x24a)],'appCode':_0x2c4a35||undefined,'env':_0x238e07[_0xe37168(0x20b)]},_0x238e07);}else await guidedCreateProject(_0x45c4ce=>runCreate(_0x45c4ce,_0x238e07),_0x238e07[_0xe37168(0x20b)],_0x238e07['cookie']);}}async function runCreate(_0x45d06f,_0x4bedaf){const _0x34c8be=a154_0x2e91;if(!_0x45d06f[_0x34c8be(0x20f)]||_0x45d06f[_0x34c8be(0x20f)]['trim']()==='')throw new Error(_0x34c8be(0x221));const _0x2f48c9=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x2f48c9[_0x34c8be(0x216)](_0x45d06f[_0x34c8be(0x20f)]))throw new Error(_0x34c8be(0x213));if(_0x45d06f[_0x34c8be(0x20f)][_0x34c8be(0x209)]>0x64)throw new Error(_0x34c8be(0x1f8));const _0x31ce65=a154_0x17b4b0['resolve'](process[_0x34c8be(0x1f2)](),_0x45d06f[_0x34c8be(0x20f)]);if(a154_0x30fc83['existsSync'](_0x31ce65))throw new Error(_0x34c8be(0x1fa)+_0x45d06f['projectName']+'\x20already\x20exists');try{a154_0x30fc83[_0x34c8be(0x22e)](a154_0x17b4b0['dirname'](_0x31ce65),a154_0x30fc83[_0x34c8be(0x215)][_0x34c8be(0x1eb)]);}catch{throw new Error('Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions');}logger[_0x34c8be(0x238)](_0x31ce65),logger['info'](_0x34c8be(0x1f7),_0x34c8be(0x247)+_0x45d06f[_0x34c8be(0x20f)],{'projectDir':_0x31ce65,'appCode':_0x45d06f[_0x34c8be(0x22a)]}),console[_0x34c8be(0x23c)](),console[_0x34c8be(0x23c)](a154_0x170465['green'](_0x34c8be(0x208))+_0x34c8be(0x219)+a154_0x170465[_0x34c8be(0x236)](_0x45d06f[_0x34c8be(0x20f)])+(_0x45d06f[_0x34c8be(0x22a)]?_0x34c8be(0x21f)+a154_0x170465[_0x34c8be(0x231)](_0x45d06f[_0x34c8be(0x22a)]):''));try{await runTask('Copy\x20project\x20files',()=>copyProjectTemplate(_0x45d06f['projectName'])),await updatePackageJsonName(_0x45d06f['projectName']),await runTask(_0x34c8be(0x211),()=>installDependencies(_0x45d06f[_0x34c8be(0x20f)])),await runTask('Format\x20code',()=>formatProjectCode(_0x45d06f[_0x34c8be(0x20f)])),await configureAppCode(_0x45d06f[_0x34c8be(0x20f)],_0x45d06f[_0x34c8be(0x22a)]||'',_0x45d06f['env']);let _0x6a82a9=![];if(_0x45d06f[_0x34c8be(0x22a)]){console['log']('*\x20Pulling\x20API\x20configuration...');const _0x428ea4=process[_0x34c8be(0x1f2)]();try{process[_0x34c8be(0x237)](_0x31ce65);const _0x2ae696=_0x45d06f[_0x34c8be(0x20b)]||_0x34c8be(0x230);initEnv(_0x2ae696);const {configArray:_0x10034b}=await fetchModelList(_0x45d06f[_0x34c8be(0x22a)],_0x4bedaf['cookie']||''),_0x3613bc=DEFAULT_API_DIR,_0x52fa79=await generateApiFile(_0x10034b,'',_0x45d06f[_0x34c8be(0x22a)],!![],_0x2ae696,_0x3613bc);console['log'](_0x34c8be(0x204)+_0x10034b[_0x34c8be(0x209)]+_0x34c8be(0x1f9)+_0x52fa79['modelCount']+_0x34c8be(0x245)),logger[_0x34c8be(0x246)](_0x34c8be(0x1f7),_0x34c8be(0x1fb)+_0x45d06f[_0x34c8be(0x22a)]);}catch(_0x23707c){_0x6a82a9=!![],console[_0x34c8be(0x23c)](_0x34c8be(0x207)),logger[_0x34c8be(0x1f5)](_0x34c8be(0x1f7),_0x34c8be(0x21a),{'error':_0x23707c instanceof Error?_0x23707c[_0x34c8be(0x229)]:String(_0x23707c)});}finally{process[_0x34c8be(0x237)](_0x428ea4);}}logger['success'](_0x34c8be(0x1f7),'项目创建完成:\x20'+_0x45d06f[_0x34c8be(0x20f)]),console['log'](),console['log'](a154_0x170465[_0x34c8be(0x236)]('─'[_0x34c8be(0x235)](0x3c))),console[_0x34c8be(0x23c)](a154_0x170465['cyan']['bold']('🚀\x20Next\x20Steps:')),console[_0x34c8be(0x23c)](),console['log'](_0x34c8be(0x20a)+a154_0x170465[_0x34c8be(0x231)][_0x34c8be(0x22f)]('cd\x20'+_0x45d06f[_0x34c8be(0x20f)]+_0x34c8be(0x227)+CLI_BIN_NAME+_0x34c8be(0x220))),_0x6a82a9&&console['log'](_0x34c8be(0x200)+a154_0x170465[_0x34c8be(0x231)][_0x34c8be(0x22f)](CLI_BIN_NAME+_0x34c8be(0x1ec))),console['log'](a154_0x170465['green']('─'[_0x34c8be(0x235)](0x3c)));}catch(_0x5eba62){logger[_0x34c8be(0x21b)]('create',_0x34c8be(0x214)+_0x45d06f[_0x34c8be(0x20f)],{'error':_0x5eba62 instanceof Error?_0x5eba62[_0x34c8be(0x229)]:String(_0x5eba62)});try{a154_0x30fc83[_0x34c8be(0x242)](_0x31ce65)&&(console['log'](_0x34c8be(0x241)+_0x31ce65),a154_0x30fc83[_0x34c8be(0x23f)](_0x31ce65,{'recursive':!![],'force':!![]}));}catch{logger[_0x34c8be(0x1f5)](_0x34c8be(0x1f7),_0x34c8be(0x218)+_0x31ce65);}throw _0x5eba62;}}async function runTask(_0x1dd5e6,_0x53f98c){const _0x460a17=a154_0x2e91,_0x4dd50a=a154_0x3aee1a(_0x1dd5e6+_0x460a17(0x1f1))['start']();try{const _0x289282=await _0x53f98c();_0x4dd50a[_0x460a17(0x222)](),console[_0x460a17(0x23c)](''+a154_0x170465['green'](_0x460a17(0x208))+_0x1dd5e6+'\x20'+a154_0x170465[_0x460a17(0x203)]('['+_0x289282+']'));}catch(_0x4275d5){_0x4dd50a[_0x460a17(0x228)](_0x1dd5e6);throw _0x4275d5;}}async function updatePackageJsonName(_0x207dfe){const _0xd01793=a154_0x2e91,_0x3c149e=a154_0x17b4b0['resolve'](process[_0xd01793(0x1f2)](),_0x207dfe),_0x40bfda=a154_0x17b4b0['join'](_0x3c149e,_0xd01793(0x210));try{console[_0xd01793(0x23c)](_0xd01793(0x226));const _0x268220=getRabetbaseCliPackageRoot(),_0x2f4c83=a154_0x17b4b0[_0xd01793(0x249)](_0x268220,_0xd01793(0x210));let _0x123f93=_0xd01793(0x233);try{const _0x547142=JSON[_0xd01793(0x1f0)](a154_0x30fc83[_0xd01793(0x223)](_0x2f4c83,'utf8'));_0x123f93=_0x547142[_0xd01793(0x234)]||_0xd01793(0x233);}catch{}const _0x163b39=a154_0x30fc83['readFileSync'](_0x40bfda,_0xd01793(0x224)),_0x1c4f2b=JSON[_0xd01793(0x1f0)](_0x163b39);_0x1c4f2b[_0xd01793(0x239)]=_0x207dfe,_0x1c4f2b[_0xd01793(0x206)]=_0x207dfe+_0xd01793(0x22d)+_0x123f93,a154_0x30fc83[_0xd01793(0x1ef)](_0x40bfda,JSON[_0xd01793(0x21c)](_0x1c4f2b,null,0x2)+'\x0a',_0xd01793(0x224)),console[_0xd01793(0x23c)]('√\x20package.json\x20updated:\x20name='+_0x207dfe),logger[_0xd01793(0x246)](_0xd01793(0x1f7),_0xd01793(0x20e));}catch(_0x119d04){logger[_0xd01793(0x21b)](_0xd01793(0x1f7),_0xd01793(0x1ee));throw _0x119d04;}}function a154_0x2e91(_0x977a97,_0x3563e5){_0x977a97=_0x977a97-0x1eb;const _0x3ce149=a154_0x3ce1();let _0x2e910d=_0x3ce149[_0x977a97];return _0x2e910d;}async function configureAppCode(_0x488642,_0x59598a,_0xec2f1f){const _0x231ebd=a154_0x2e91,_0x2c7ec4=a154_0x17b4b0[_0x231ebd(0x1ed)](process[_0x231ebd(0x1f2)](),_0x488642),_0xc621d6=a154_0x17b4b0[_0x231ebd(0x249)](_0x2c7ec4,NEW_CONFIG_NAME);try{_0x59598a?console[_0x231ebd(0x23c)](_0x231ebd(0x20c)+_0x488642+':\x20'+_0x59598a):console[_0x231ebd(0x23c)](_0x231ebd(0x20d)+_0x488642);const _0x2e8c19=getRabetbaseCliPackageRoot(),_0x1b3f50=a154_0x17b4b0[_0x231ebd(0x249)](_0x2e8c19,_0x231ebd(0x210));let _0x475cc0=_0x231ebd(0x233);try{const _0x5a8c10=JSON[_0x231ebd(0x1f0)](a154_0x30fc83['readFileSync'](_0x1b3f50,_0x231ebd(0x224)));_0x475cc0=_0x5a8c10['version']||_0x231ebd(0x233);}catch{}const _0x1aaa5b=readConfig(),_0x4ea3c9=typeof _0x1aaa5b['env']===_0x231ebd(0x248)?_0x1aaa5b[_0x231ebd(0x20b)]:undefined,_0x3641c2={};for(const _0x3d43e9 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x1aaa5b[_0x3d43e9]!=null)_0x3641c2[_0x3d43e9]=_0x1aaa5b[_0x3d43e9];}const _0x1ecbf6=buildCanonicalProjectConfig(_0x3641c2,{'appCodes':_0x59598a?[_0x59598a]:[],'env':_0xec2f1f||_0x4ea3c9||_0x231ebd(0x230),'metadata':{'createdAt':new Date()['toLocaleString'](),'version':_0x475cc0}});writeConfigFile(_0xc621d6,_0x1ecbf6),_0x59598a?console[_0x231ebd(0x23c)](_0x231ebd(0x1fd)+Object[_0x231ebd(0x23e)](_0x1ecbf6[_0x231ebd(0x1f4)]||{})[_0x231ebd(0x249)](',\x20')+_0x231ebd(0x240)+_0x1ecbf6[_0x231ebd(0x244)]):console[_0x231ebd(0x23c)](_0x231ebd(0x1f3)+CLI_BIN_NAME+_0x231ebd(0x23b)),logger[_0x231ebd(0x246)](_0x231ebd(0x1f7),_0x231ebd(0x21d)+_0x59598a);}catch(_0x516512){logger[_0x231ebd(0x21b)](_0x231ebd(0x1f7),_0x231ebd(0x23d));}}
@@ -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(_0x133fad,_0x5ced96){const _0x2ea296=a155_0x2aab,_0x38da9d=_0x133fad();while(!![]){try{const _0x4661b7=-parseInt(_0x2ea296(0x9f))/0x1+parseInt(_0x2ea296(0x9d))/0x2*(-parseInt(_0x2ea296(0xad))/0x3)+parseInt(_0x2ea296(0xaa))/0x4+-parseInt(_0x2ea296(0x78))/0x5*(-parseInt(_0x2ea296(0xa1))/0x6)+-parseInt(_0x2ea296(0xa6))/0x7+parseInt(_0x2ea296(0x8c))/0x8*(-parseInt(_0x2ea296(0x98))/0x9)+-parseInt(_0x2ea296(0x77))/0xa*(-parseInt(_0x2ea296(0x7c))/0xb);if(_0x4661b7===_0x5ced96)break;else _0x38da9d['push'](_0x38da9d['shift']());}catch(_0x34588e){_0x38da9d['push'](_0x38da9d['shift']());}}}(a155_0x2739,0x84c51));import a155_0x3ba32b from'path';import a155_0x18131d 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';function a155_0x2aab(_0x42fc82,_0x1c56f5){_0x42fc82=_0x42fc82-0x76;const _0x2739d5=a155_0x2739();let _0x2aabf2=_0x2739d5[_0x42fc82];return _0x2aabf2;}import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';const execAsync=promisify(exec);function a155_0x2739(){const _0x3b537a=['\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','\x0a\x20\x20cd\x20','\x20model(s)','trim','4TsjeUA','\x0a√\x20Project\x20','1010120IfUSph','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','344298YgqvzB','ignore','length','needsUpgrade','parse','2377487xKmujk','Project\x20name\x20cannot\x20be\x20empty.','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','modelCount','2955524lucPOx','env','toLocaleString','1075449POsFaS','dirname','6416170wtAoXb','85nnpHLL','\x20\x20√\x20Pulled\x20','writeFile','\x20\x20rabetbase\x20run\x20start\x0a','22JuiMBK','Check\x20directory\x20permissions.','test','chdir','*\x20Creating\x20project\x20','stringify','readFile','Cannot\x20create\x20project\x20in\x20current\x20directory.','\x20\x20√\x20package.json\x20updated','name','\x20created\x20successfully!','\x22\x20already\x20exists.','Project\x20directory\x20\x22','string','join','cwd','15032emvccD','belowMinimum','Use\x20a\x20different\x20project\x20name.','validation','resolve','bun\x20--version','production','\x20\x20√\x20Project\x20template\x20created','npm','package.json','\x20\x20√\x20Configuration\x20file\x20created','log','1854jlVete'];a155_0x2739=function(){return _0x3b537a;};return a155_0x2739();}export async function createProjectNonInteractive(_0x2860b0,_0x1d9de1,_0x5b6402,_0x96acb1){const _0x502f08=a155_0x2aab,_0x561740=await checkCliVersion();(_0x561740[_0x502f08(0xa4)]||_0x561740[_0x502f08(0x8d)])&&(printCliUpgradeWarning(_0x561740),assertCliVersionSupported(_0x561740));if(!_0x2860b0||_0x2860b0[_0x502f08(0x9c)]()==='')throw CliErrors['validation'](_0x502f08(0xa7));const _0x5a8951=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x5a8951[_0x502f08(0x7e)](_0x2860b0))throw CliErrors[_0x502f08(0x8f)]('Project\x20name\x20contains\x20invalid\x20characters.','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters');if(_0x2860b0[_0x502f08(0xa3)]>0x64)throw CliErrors[_0x502f08(0x8f)](_0x502f08(0xa8));const _0x2149ad=a155_0x3ba32b[_0x502f08(0x90)](process[_0x502f08(0x8b)](),_0x2860b0);if(existsSync(_0x2149ad))throw CliErrors['validation'](_0x502f08(0x88)+_0x2860b0+_0x502f08(0x87),_0x502f08(0x8e));try{const _0x491e80=a155_0x3ba32b[_0x502f08(0x76)](_0x2149ad);await a155_0x18131d['access'](_0x491e80,a155_0x18131d['constants']['W_OK']);}catch{throw CliErrors[_0x502f08(0x8f)](_0x502f08(0x83),_0x502f08(0x7d));}try{console[_0x502f08(0x97)](_0x502f08(0x80)+_0x2860b0+'...');const _0x32fd29=getSubAppReactDemoTemplateDir();await copyDirectory(_0x32fd29,_0x2149ad),console[_0x502f08(0x97)](_0x502f08(0x93)),await updatePackageJsonName(_0x2860b0),console['log'](_0x502f08(0x84)),console[_0x502f08(0x97)]('\x20\x20Installing\x20dependencies...'),console[_0x502f08(0x97)]('\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)'),await formatCode(_0x2149ad),console[_0x502f08(0x97)]('\x20\x20√\x20Code\x20formatted'),await configureProject(_0x2860b0,_0x5b6402,_0x1d9de1),console[_0x502f08(0x97)](_0x502f08(0x96)),_0x5b6402&&await pullApiConfig(_0x2149ad,_0x5b6402,_0x1d9de1,_0x96acb1),console['log'](_0x502f08(0x9e)+_0x2860b0+_0x502f08(0x86)),console[_0x502f08(0x97)](_0x502f08(0x9a)+_0x2860b0),console[_0x502f08(0x97)](_0x502f08(0x7b));}catch(_0x471b46){try{existsSync(_0x2149ad)&&await a155_0x18131d['rm'](_0x2149ad,{'recursive':!![],'force':!![]});}catch{}throw _0x471b46;}}async function updatePackageJsonName(_0x51aafd){const _0x5acdb2=a155_0x2aab,_0x1e54aa=a155_0x3ba32b[_0x5acdb2(0x90)](process['cwd'](),_0x51aafd),_0x550728=a155_0x3ba32b['join'](_0x1e54aa,_0x5acdb2(0x95)),_0x148d00=await a155_0x18131d[_0x5acdb2(0x82)](_0x550728,'utf-8'),_0x35b8e7=JSON[_0x5acdb2(0xa5)](_0x148d00);_0x35b8e7[_0x5acdb2(0x85)]=_0x51aafd,_0x35b8e7['description']=_0x5acdb2(0xa0),await a155_0x18131d[_0x5acdb2(0x7a)](_0x550728,JSON[_0x5acdb2(0x81)](_0x35b8e7,null,0x2)+'\x0a');}function detectPackageManager(){const _0x4ddb30=a155_0x2aab;try{return execSync(_0x4ddb30(0x91),{'stdio':_0x4ddb30(0xa2)}),'bun';}catch{return _0x4ddb30(0x94);}}async function formatCode(_0x273617){try{await execAsync('bun\x20run\x20format',{'cwd':_0x273617});}catch{}}async function configureProject(_0x1ecef0,_0x48c6e5,_0x28e6a9){const _0x57dea6=a155_0x2aab,_0x1af53e=a155_0x3ba32b[_0x57dea6(0x90)](process[_0x57dea6(0x8b)](),_0x1ecef0),_0x48a855=a155_0x3ba32b[_0x57dea6(0x8a)](_0x1af53e,NEW_CONFIG_NAME),_0x10985b=readConfig(),_0x2b434b=typeof _0x10985b[_0x57dea6(0xab)]===_0x57dea6(0x89)?_0x10985b[_0x57dea6(0xab)]:undefined,_0x4cce23={};for(const _0x103dd3 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x10985b[_0x103dd3]!=null)_0x4cce23[_0x103dd3]=_0x10985b[_0x103dd3];}const _0x261e84=buildCanonicalProjectConfig(_0x4cce23,{'appCodes':_0x48c6e5?[_0x48c6e5]:[],'env':_0x28e6a9||_0x2b434b||_0x57dea6(0x92),'metadata':{'createdAt':new Date()[_0x57dea6(0xac)](),'version':getCliVersion()}});writeConfigFile(_0x48a855,_0x261e84);}async function pullApiConfig(_0x4cff96,_0x5197ba,_0x6a64bd,_0x4c61ed){const _0xd3c5fc=a155_0x2aab,_0x26630e=process[_0xd3c5fc(0x8b)]();try{process[_0xd3c5fc(0x7f)](_0x4cff96);const _0x5ea57f=_0x6a64bd||_0xd3c5fc(0x92);initEnv(_0x5ea57f),console[_0xd3c5fc(0x97)]('\x20\x20Pulling\x20API\x20configuration...');const {configArray:_0x198dc6}=await fetchModelList(_0x5197ba,_0x4c61ed||''),_0x35f86d=await generateApiFile(_0x198dc6,'',_0x5197ba,!![],_0x5ea57f,DEFAULT_API_DIR);console[_0xd3c5fc(0x97)](_0xd3c5fc(0x79)+_0x198dc6[_0xd3c5fc(0xa3)]+'\x20dataset(s),\x20generated\x20'+_0x35f86d[_0xd3c5fc(0xa9)]+_0xd3c5fc(0x9b));}catch(_0x42aca6){console[_0xd3c5fc(0x97)](_0xd3c5fc(0x99)+CLI_BIN_NAME+'\x20api\x20pull`\x20manually\x20later.');}finally{process['chdir'](_0x26630e);}}
@@ -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
+ const a156_0x433557=a156_0x18c2;function a156_0x48bc(){const _0x4488d6=['1173716qlczJB','5945780SIiEkv','../../../../','resolve','454795JVVWRM','1906998ZCmasd','3702440MBDrOh','dirname','7497NABbuz','templates','29056ylxycw','2gshhRt','198VRjGmD'];a156_0x48bc=function(){return _0x4488d6;};return a156_0x48bc();}(function(_0x242300,_0x485e44){const _0x1c0288=a156_0x18c2,_0x33ffb8=_0x242300();while(!![]){try{const _0x5ea8e8=-parseInt(_0x1c0288(0x198))/0x1+-parseInt(_0x1c0288(0x192))/0x2*(parseInt(_0x1c0288(0x19c))/0x3)+parseInt(_0x1c0288(0x194))/0x4+parseInt(_0x1c0288(0x195))/0x5+parseInt(_0x1c0288(0x199))/0x6+-parseInt(_0x1c0288(0x19a))/0x7+-parseInt(_0x1c0288(0x191))/0x8*(parseInt(_0x1c0288(0x193))/0x9);if(_0x5ea8e8===_0x485e44)break;else _0x33ffb8['push'](_0x33ffb8['shift']());}catch(_0x1993ac){_0x33ffb8['push'](_0x33ffb8['shift']());}}}(a156_0x48bc,0xb345c));import a156_0x392a40 from'node:path';function a156_0x18c2(_0x4432d4,_0x44638c){_0x4432d4=_0x4432d4-0x190;const _0x48bc6c=a156_0x48bc();let _0x18c2e7=_0x48bc6c[_0x4432d4];return _0x18c2e7;}import{fileURLToPath}from'node:url';const __dirname=a156_0x392a40[a156_0x433557(0x19b)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x51554c=a156_0x433557;return a156_0x392a40[_0x51554c(0x197)](__dirname,_0x51554c(0x196));}export function getSubAppReactDemoTemplateDir(){const _0x3c7aad=a156_0x433557;return a156_0x392a40['join'](getRabetbaseCliPackageRoot(),_0x3c7aad(0x190),'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(_0x1d3864,_0x982409){const _0x588595=a157_0x2e4f,_0x25e4ef=_0x1d3864();while(!![]){try{const _0x8507e4=parseInt(_0x588595(0x1c6))/0x1+-parseInt(_0x588595(0x1c9))/0x2*(-parseInt(_0x588595(0x1ba))/0x3)+parseInt(_0x588595(0x1c0))/0x4*(parseInt(_0x588595(0x1bb))/0x5)+parseInt(_0x588595(0x1c5))/0x6*(parseInt(_0x588595(0x1b8))/0x7)+parseInt(_0x588595(0x1c7))/0x8+-parseInt(_0x588595(0x1b7))/0x9*(-parseInt(_0x588595(0x1c3))/0xa)+-parseInt(_0x588595(0x1b9))/0xb;if(_0x8507e4===_0x982409)break;else _0x25e4ef['push'](_0x25e4ef['shift']());}catch(_0x2def90){_0x25e4ef['push'](_0x25e4ef['shift']());}}}(a157_0x48f9,0x41aa2));import a157_0x31a4d6 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(_0x10fd74){const _0x3ff098=a157_0x2e4f,_0x550ebc=Date[_0x3ff098(0x1be)](),_0x45b7ce=a157_0x31a4d6[_0x3ff098(0x1bf)](process['cwd'](),_0x10fd74);try{logger[_0x3ff098(0x1bd)]('copy','开始复制项目模板',{'projectCode':_0x10fd74,'templateDir':templateDir}),await copyDirectory(templateDir,_0x45b7ce);const _0x402e2c=Date[_0x3ff098(0x1be)]()-_0x550ebc;logger[_0x3ff098(0x1bc)](_0x3ff098(0x1c2),'项目模板复制完成',_0x402e2c,{'projectCode':_0x10fd74});}catch(_0x1b11b7){const _0x3031a8=Date[_0x3ff098(0x1be)]()-_0x550ebc;logger[_0x3ff098(0x1c1)]('copy',_0x3ff098(0x1c8),{'projectCode':_0x10fd74,'error':_0x1b11b7 instanceof Error?_0x1b11b7[_0x3ff098(0x1c4)]:String(_0x1b11b7),'duration':_0x3031a8});throw _0x1b11b7;}return formatElapsed(_0x550ebc);}function a157_0x2e4f(_0x181751,_0x172240){_0x181751=_0x181751-0x1b7;const _0x48f9d1=a157_0x48f9();let _0x2e4fc1=_0x48f9d1[_0x181751];return _0x2e4fc1;}function a157_0x48f9(){const _0x4f1480=['526963BFWdoS','3094448KXzdRx','项目模板复制失败','7850jJREZR','9APqSZx','14Pwlswr','14946338PYSSvs','6FYFLZu','10RHBwxX','success','info','now','resolve','349340UdNYGX','error','copy','3904690DtWiPN','message','422886xNNocv'];a157_0x48f9=function(){return _0x4f1480;};return a157_0x48f9();}
@@ -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(_0x42b0c1,_0x58f94e){const _0x29d914=a158_0x2752,_0x510a59=_0x42b0c1();while(!![]){try{const _0x54d020=-parseInt(_0x29d914(0x7c))/0x1*(-parseInt(_0x29d914(0x73))/0x2)+-parseInt(_0x29d914(0x7e))/0x3+-parseInt(_0x29d914(0x82))/0x4+parseInt(_0x29d914(0x74))/0x5*(-parseInt(_0x29d914(0x88))/0x6)+parseInt(_0x29d914(0x89))/0x7*(parseInt(_0x29d914(0x85))/0x8)+parseInt(_0x29d914(0x87))/0x9*(parseInt(_0x29d914(0x79))/0xa)+parseInt(_0x29d914(0x84))/0xb;if(_0x54d020===_0x58f94e)break;else _0x510a59['push'](_0x510a59['shift']());}catch(_0x144d53){_0x510a59['push'](_0x510a59['shift']());}}}(a158_0x1d71,0x41858));import a158_0x1453f4 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a158_0x1d71(){const _0x34c80b=['2LTeJtA','30HCbcPy','开始格式化代码','resolve','prettier','npx','121960qmLSvF','代码格式化完成','now','154249VtyPNQ','format','740346gPzYUY','--write','info','error','740876hOuTOR','message','3041115nWVSoh','8ROXMLp','代码格式化失败','279dInCtS','324864iSQNrn','1515157uaFgRB','cwd','success'];a158_0x1d71=function(){return _0x34c80b;};return a158_0x1d71();}function a158_0x2752(_0x40743,_0x71fb1a){_0x40743=_0x40743-0x72;const _0x1d71df=a158_0x1d71();let _0x275251=_0x1d71df[_0x40743];return _0x275251;}import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x442137){const _0x271a0b=a158_0x2752,_0x138981=Date[_0x271a0b(0x7b)](),_0x5cedd0=a158_0x1453f4[_0x271a0b(0x76)](process[_0x271a0b(0x8a)](),_0x442137);try{logger[_0x271a0b(0x80)](_0x271a0b(0x7d),_0x271a0b(0x75),{'projectCode':_0x442137}),await execa(resolveNpmBin(_0x271a0b(0x78)),[_0x271a0b(0x77),_0x271a0b(0x7f),'.'],{'cwd':_0x5cedd0});const _0x234ef6=Date[_0x271a0b(0x7b)]()-_0x138981;logger[_0x271a0b(0x72)](_0x271a0b(0x7d),_0x271a0b(0x7a),_0x234ef6,{'projectCode':_0x442137});}catch(_0x459fb8){const _0x402c25=Date[_0x271a0b(0x7b)]()-_0x138981;logger[_0x271a0b(0x81)](_0x271a0b(0x7d),_0x271a0b(0x86),{'projectCode':_0x442137,'error':_0x459fb8 instanceof Error?_0x459fb8[_0x271a0b(0x83)]:String(_0x459fb8),'duration':_0x402c25});throw _0x459fb8;}return formatElapsed(_0x138981);}