@lovrabet/rabetbase-cli 2.3.16-beta.6 → 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 (279) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/index.js +1 -1
  20. package/lib/commands/app/list.js +1 -1
  21. package/lib/commands/app/members-list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/shared.js +1 -1
  24. package/lib/commands/app-config/delete.js +1 -1
  25. package/lib/commands/app-config/get.js +1 -1
  26. package/lib/commands/app-config/index.js +1 -1
  27. package/lib/commands/app-config/list.js +1 -1
  28. package/lib/commands/app-config/set.js +1 -1
  29. package/lib/commands/app-config/shared.js +1 -1
  30. package/lib/commands/auth/index.js +1 -1
  31. package/lib/commands/bff/create.js +1 -1
  32. package/lib/commands/bff/delete.js +1 -1
  33. package/lib/commands/bff/detail.js +1 -1
  34. package/lib/commands/bff/index.js +1 -1
  35. package/lib/commands/bff/list.js +1 -1
  36. package/lib/commands/bff/pull.js +1 -1
  37. package/lib/commands/bff/push.js +1 -1
  38. package/lib/commands/bff/status.js +1 -1
  39. package/lib/commands/cli-skill/index.js +1 -1
  40. package/lib/commands/cli-update.js +1 -1
  41. package/lib/commands/codegen/index.js +1 -1
  42. package/lib/commands/codegen/sdk.js +1 -1
  43. package/lib/commands/codegen/sql.js +1 -1
  44. package/lib/commands/common/app-registry.js +1 -1
  45. package/lib/commands/common/app-selector.js +1 -1
  46. package/lib/commands/common/async-task.js +1 -1
  47. package/lib/commands/common/dry-run.js +1 -1
  48. package/lib/commands/common/flags.js +1 -1
  49. package/lib/commands/common/local-file.js +1 -1
  50. package/lib/commands/common/validate.js +1 -1
  51. package/lib/commands/config/get.js +1 -1
  52. package/lib/commands/config/index.js +1 -1
  53. package/lib/commands/config/list.js +1 -1
  54. package/lib/commands/config/set.js +1 -1
  55. package/lib/commands/config/shared.js +1 -1
  56. package/lib/commands/data/filter.js +1 -1
  57. package/lib/commands/data/getOne.js +1 -1
  58. package/lib/commands/data/index.js +1 -1
  59. package/lib/commands/data/shared.js +1 -1
  60. package/lib/commands/dataset/business-group-update.js +1 -1
  61. package/lib/commands/dataset/capability.js +1 -1
  62. package/lib/commands/dataset/delete.js +1 -1
  63. package/lib/commands/dataset/detail.js +1 -1
  64. package/lib/commands/dataset/extend-update.js +1 -1
  65. package/lib/commands/dataset/field-update.js +1 -1
  66. package/lib/commands/dataset/generate.js +1 -1
  67. package/lib/commands/dataset/index.js +1 -1
  68. package/lib/commands/dataset/list.js +1 -1
  69. package/lib/commands/dataset/operations.js +1 -1
  70. package/lib/commands/dataset/relation-audit.js +1 -1
  71. package/lib/commands/dataset/relation-create.js +1 -1
  72. package/lib/commands/dataset/relation-delete.js +1 -1
  73. package/lib/commands/dataset/relation-shared.js +1 -1
  74. package/lib/commands/dataset/relation-update.js +1 -1
  75. package/lib/commands/dataset/relations.js +1 -1
  76. package/lib/commands/dataset/rename.js +1 -1
  77. package/lib/commands/dataset/restore.js +1 -1
  78. package/lib/commands/db/analysis-batching.js +1 -1
  79. package/lib/commands/db/analyze-batch-plan.js +1 -1
  80. package/lib/commands/db/analyze-cancel.js +1 -1
  81. package/lib/commands/db/analyze-start.js +1 -1
  82. package/lib/commands/db/analyze-status.js +1 -1
  83. package/lib/commands/db/create.js +1 -1
  84. package/lib/commands/db/delete.js +1 -1
  85. package/lib/commands/db/detail.js +1 -1
  86. package/lib/commands/db/diff.js +1 -1
  87. package/lib/commands/db/index.js +1 -1
  88. package/lib/commands/db/list.js +1 -1
  89. package/lib/commands/db/shared.js +1 -1
  90. package/lib/commands/db/tables.js +1 -1
  91. package/lib/commands/db/test.js +1 -1
  92. package/lib/commands/db/update.js +1 -1
  93. package/lib/commands/doctor.js +1 -1
  94. package/lib/commands/file/index.js +1 -1
  95. package/lib/commands/init/index.js +1 -1
  96. package/lib/commands/issue/index.js +1 -1
  97. package/lib/commands/issue/nudge.js +1 -1
  98. package/lib/commands/issue/report.js +1 -1
  99. package/lib/commands/issue/shared.js +1 -1
  100. package/lib/commands/kb/create.js +1 -1
  101. package/lib/commands/kb/delete.js +1 -1
  102. package/lib/commands/kb/detail.js +1 -1
  103. package/lib/commands/kb/index.js +1 -1
  104. package/lib/commands/kb/list.js +1 -1
  105. package/lib/commands/kb/shared.js +1 -1
  106. package/lib/commands/kb/update.js +1 -1
  107. package/lib/commands/logs/index.js +1 -1
  108. package/lib/commands/menu/asset-update.js +1 -1
  109. package/lib/commands/menu/delete.js +1 -1
  110. package/lib/commands/menu/external-link-create.js +1 -1
  111. package/lib/commands/menu/external-link-update.js +1 -1
  112. package/lib/commands/menu/group-create.js +1 -1
  113. package/lib/commands/menu/group-update.js +1 -1
  114. package/lib/commands/menu/index.js +1 -1
  115. package/lib/commands/menu/list.js +1 -1
  116. package/lib/commands/menu/move.js +1 -1
  117. package/lib/commands/menu/regroup-start.js +1 -1
  118. package/lib/commands/menu/rename.js +1 -1
  119. package/lib/commands/menu/shared/compare-table.js +1 -1
  120. package/lib/commands/menu/shared/delete-plan.js +1 -1
  121. package/lib/commands/menu/shared/facts.js +1 -1
  122. package/lib/commands/menu/shared/index.js +1 -1
  123. package/lib/commands/menu/shared/inquirer.js +1 -1
  124. package/lib/commands/menu/shared/local-pages.js +1 -1
  125. package/lib/commands/menu/shared/logic.js +1 -1
  126. package/lib/commands/menu/shared/mutations.js +1 -1
  127. package/lib/commands/menu/shared/service.js +1 -1
  128. package/lib/commands/menu/shared/sync-core.js +1 -1
  129. package/lib/commands/menu/shared/update-core.js +1 -1
  130. package/lib/commands/menu/shared/valid-url.js +1 -1
  131. package/lib/commands/menu/sync.js +1 -1
  132. package/lib/commands/notification/config-list.js +1 -1
  133. package/lib/commands/notification/index.js +1 -1
  134. package/lib/commands/ocr/index.js +1 -1
  135. package/lib/commands/page/generate-start.js +1 -1
  136. package/lib/commands/page/generate-status.js +1 -1
  137. package/lib/commands/page/index.js +1 -1
  138. package/lib/commands/page/pull.js +1 -1
  139. package/lib/commands/page/push.js +1 -1
  140. package/lib/commands/page/relation-audit.js +1 -1
  141. package/lib/commands/page/restore.js +1 -1
  142. package/lib/commands/page/shared.js +1 -1
  143. package/lib/commands/page/standard-page-status.js +1 -1
  144. package/lib/commands/page/sync.js +1 -1
  145. package/lib/commands/permit/index.js +1 -1
  146. package/lib/commands/permit/page-get.js +1 -1
  147. package/lib/commands/permit/page-set.js +1 -1
  148. package/lib/commands/permit/role-apis-set.js +1 -1
  149. package/lib/commands/permit/role-menus-set.js +1 -1
  150. package/lib/commands/permit/role-menus.js +1 -1
  151. package/lib/commands/permit/shared.js +1 -1
  152. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  153. package/lib/commands/project/create/format-elapsed.js +1 -1
  154. package/lib/commands/project/create/main.js +1 -1
  155. package/lib/commands/project/create/non-interactive.js +1 -1
  156. package/lib/commands/project/create/project-template-path.js +1 -1
  157. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  158. package/lib/commands/project/create/use-format-code.js +1 -1
  159. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  160. package/lib/commands/project/index.js +1 -1
  161. package/lib/commands/project/upgrade.js +1 -1
  162. package/lib/commands/registry.js +1 -1
  163. package/lib/commands/role/create.js +1 -1
  164. package/lib/commands/role/delete.js +1 -1
  165. package/lib/commands/role/detail.js +1 -1
  166. package/lib/commands/role/index.js +1 -1
  167. package/lib/commands/role/list.js +1 -1
  168. package/lib/commands/role/shared.js +1 -1
  169. package/lib/commands/role/update.js +1 -1
  170. package/lib/commands/role/user-add.js +1 -1
  171. package/lib/commands/role/user-remove.js +1 -1
  172. package/lib/commands/role/user-resolve.js +1 -1
  173. package/lib/commands/run/index.js +1 -1
  174. package/lib/commands/schema.js +1 -1
  175. package/lib/commands/sql/create.js +1 -1
  176. package/lib/commands/sql/delete.js +1 -1
  177. package/lib/commands/sql/detail.js +1 -1
  178. package/lib/commands/sql/exec.js +1 -1
  179. package/lib/commands/sql/index.js +1 -1
  180. package/lib/commands/sql/list.js +1 -1
  181. package/lib/commands/sql/pull.js +1 -1
  182. package/lib/commands/sql/push.js +1 -1
  183. package/lib/commands/sql/shared.js +1 -1
  184. package/lib/commands/sql/status.js +1 -1
  185. package/lib/commands/sql/validate.js +1 -1
  186. package/lib/commands/task/index.js +1 -1
  187. package/lib/commands/task/status.js +1 -1
  188. package/lib/commands/tenant/index.js +1 -1
  189. package/lib/commands/tenant/members-list.js +1 -1
  190. package/lib/commands/tenant/shared.js +1 -1
  191. package/lib/commands/workspace/add.js +1 -1
  192. package/lib/commands/workspace/index.js +1 -1
  193. package/lib/commands/workspace/remove.js +1 -1
  194. package/lib/config/schema.js +1 -1
  195. package/lib/constant/cdn.js +1 -1
  196. package/lib/constant/cli.js +1 -1
  197. package/lib/constant/defaults.js +1 -1
  198. package/lib/constant/domain.js +1 -1
  199. package/lib/constant/env.js +1 -1
  200. package/lib/constant/output.js +1 -1
  201. package/lib/constant/paths.js +1 -1
  202. package/lib/constant/risk.js +1 -1
  203. package/lib/context/app-resolver.js +1 -1
  204. package/lib/context/auth-resolver.js +1 -1
  205. package/lib/context/config-loader.js +1 -1
  206. package/lib/context.d.ts +1 -1
  207. package/lib/context.js +1 -1
  208. package/lib/core/alias-resolver.js +1 -1
  209. package/lib/core/api-client.js +1 -1
  210. package/lib/core/bff/config.js +1 -1
  211. package/lib/core/bff/file-system.js +1 -1
  212. package/lib/core/bff/hash.js +1 -1
  213. package/lib/core/bff/lock.js +1 -1
  214. package/lib/core/bff/utils.js +1 -1
  215. package/lib/core/db-resolver.js +1 -1
  216. package/lib/core/page/file-system.js +1 -1
  217. package/lib/core/page/hash.js +1 -1
  218. package/lib/core/page/lock.js +1 -1
  219. package/lib/core/sql-index-auditor.js +1 -1
  220. package/lib/core/sql-sync/config.js +1 -1
  221. package/lib/core/sql-sync/file-system.js +1 -1
  222. package/lib/core/sql-sync/hash.js +1 -1
  223. package/lib/core/sql-sync/lock.js +1 -1
  224. package/lib/core/sql-sync/utils.js +1 -1
  225. package/lib/core/sql-validator.js +1 -1
  226. package/lib/errors.js +1 -1
  227. package/lib/framework/build-all-flags.js +1 -1
  228. package/lib/framework/error-output.js +1 -1
  229. package/lib/framework/explicit-yes.js +1 -1
  230. package/lib/framework/flags.js +1 -1
  231. package/lib/framework/help.js +1 -1
  232. package/lib/framework/index.js +1 -1
  233. package/lib/framework/output.js +1 -1
  234. package/lib/framework/response.js +1 -1
  235. package/lib/framework/runner-alias.js +1 -1
  236. package/lib/framework/runner.js +1 -1
  237. package/lib/framework/schema-export.js +1 -1
  238. package/lib/framework/types.js +1 -1
  239. package/lib/generated/build-info.d.ts +4 -4
  240. package/lib/generated/build-info.js +1 -1
  241. package/lib/help.js +1 -1
  242. package/lib/runtime/confirmation.js +1 -1
  243. package/lib/runtime/event.js +1 -1
  244. package/lib/runtime/index.js +1 -1
  245. package/lib/runtime/queue.js +1 -1
  246. package/lib/runtime/resolve.js +1 -1
  247. package/lib/skills/main.js +1 -1
  248. package/lib/skills/npx-skills-add.js +1 -1
  249. package/lib/skills/skill-presence.js +1 -1
  250. package/lib/telemetry/cli-command-trace.js +1 -1
  251. package/lib/telemetry/cli-help-trace.js +1 -1
  252. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  253. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  254. package/lib/telemetry/send-cli-trace-log.js +1 -1
  255. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  256. package/lib/utils/ai_config.js +1 -1
  257. package/lib/utils/apply-jq-filter.js +1 -1
  258. package/lib/utils/cdn-config.js +1 -1
  259. package/lib/utils/check-sdk-version.js +1 -1
  260. package/lib/utils/cli-version-check.js +1 -1
  261. package/lib/utils/cli-version-policy.js +1 -1
  262. package/lib/utils/config.js +1 -1
  263. package/lib/utils/copy-directory.js +1 -1
  264. package/lib/utils/entity-with-id.js +1 -1
  265. package/lib/utils/file-utils.js +1 -1
  266. package/lib/utils/guides-cdn.js +1 -1
  267. package/lib/utils/http-client.js +1 -1
  268. package/lib/utils/is-non-interactive.js +1 -1
  269. package/lib/utils/logger.js +1 -1
  270. package/lib/utils/params.js +1 -1
  271. package/lib/utils/platform.js +1 -1
  272. package/lib/utils/rules-cdn.js +1 -1
  273. package/lib/utils/sleep.js +1 -1
  274. package/lib/utils/template-replacer.js +1 -1
  275. package/lib/utils/update-notice.js +1 -1
  276. package/lib/utils/version.js +1 -1
  277. package/lib/utils/with-active-cookie.js +1 -1
  278. package/lib/utils/write-cli-side-channel.js +1 -1
  279. package/package.json +1 -1
@@ -1 +1 @@
1
- function a143_0x16ab(_0x5f4960,_0x273273){_0x5f4960=_0x5f4960-0x115;const _0x1b4a5d=a143_0x1b4a();let _0x16ab0f=_0x1b4a5d[_0x5f4960];return _0x16ab0f;}function a143_0x1b4a(){const _0x1ca50a=['38843409wDHjGh','/smartapi/lovrabet/dataset/','14CpDTYN','read','standard-page-status','code','relatedPages','3735528ByPsxZ','manualResolutionRequired','length','name','related-pages-fallback','2047504Qksnpw','10858275IVFqOc','nextAction','2SbLzhG','alias','297483TQKSro','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','Query\x20Smart\x20List\x20Page\x20facts\x20for\x20a\x20dataset','10ymMRjW','1120bBwDnG','status','1002219RpptVC','appCode','2225EhtdEA'];a143_0x1b4a=function(){return _0x1ca50a;};return a143_0x1b4a();}const a143_0x4c586d=a143_0x16ab;(function(_0x550e68,_0x5c56eb){const _0x434147=a143_0x16ab,_0xccd9b0=_0x550e68();while(!![]){try{const _0x3587d3=-parseInt(_0x434147(0x116))/0x1+parseInt(_0x434147(0x12e))/0x2*(parseInt(_0x434147(0x11c))/0x3)+-parseInt(_0x434147(0x11a))/0x4*(parseInt(_0x434147(0x11e))/0x5)+parseInt(_0x434147(0x126))/0x6*(-parseInt(_0x434147(0x121))/0x7)+-parseInt(_0x434147(0x12b))/0x8+-parseInt(_0x434147(0x12c))/0x9+-parseInt(_0x434147(0x119))/0xa*(-parseInt(_0x434147(0x11f))/0xb);if(_0x3587d3===_0x5c56eb)break;else _0xccd9b0['push'](_0xccd9b0['shift']());}catch(_0x679acc){_0xccd9b0['push'](_0xccd9b0['shift']());}}}(a143_0x1b4a,0xb3984));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessStandardPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadStandardPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';export const pageStandardPageStatus={'service':'page','command':a143_0x4c586d(0x123),'description':a143_0x4c586d(0x118),'risk':a143_0x4c586d(0x122),'defaultOutputFormat':'compress','flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a143_0x4c586d(0x115),'type':'string','description':a143_0x4c586d(0x117)}],async 'validate'(_0x1d3294){validateDatasetSelector(_0x1d3294);},async 'dryRun'(_0x18db9){const _0xd30033=a143_0x4c586d,_0x108430=await loadDatasetDetailForPage(_0x18db9);return{'method':'GET','url':_0xd30033(0x120)+_0x108430['code']+'/standard-page-status?appCode='+encodeURIComponent(_0x18db9[_0xd30033(0x11d)]),'description':serializeDryRunDescription({'dataset':{'id':_0x108430['id'],'code':_0x108430[_0xd30033(0x124)],'name':_0x108430[_0xd30033(0x129)]},'action':'query-standard-page-status'})};},async 'execute'(_0x120149){const _0x5c8541=a143_0x4c586d,_0x13367b=await loadDatasetDetailForPage(_0x120149),_0x42da68=await loadStandardPageStatusForGenerate(_0x120149,_0x13367b[_0x5c8541(0x124)]),_0x10f9f2=getUndeletedRelatedPages(_0x13367b),_0x568e34=assessStandardPageState(_0x13367b[_0x5c8541(0x124)],_0x42da68,{'fallbackUndeletedPages':_0x10f9f2});return{'ok':!![],'data':{'datasetCode':_0x13367b[_0x5c8541(0x124)],'precheckSource':_0x42da68?.['source']??_0x5c8541(0x12a),'status':_0x568e34[_0x5c8541(0x11b)],'manualResolutionRequired':_0x568e34[_0x5c8541(0x127)],'nextAction':_0x568e34[_0x5c8541(0x12d)],'standardPageStatus':_0x42da68,'relatedPages':{'total':_0x13367b[_0x5c8541(0x125)][_0x5c8541(0x128)],'undeletedCount':_0x10f9f2[_0x5c8541(0x128)]}}};}};
1
+ 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_0x1b53d3=a144_0x4220;(function(_0x2fe7b7,_0x2710e2){const _0x31f83=a144_0x4220,_0x18dd20=_0x2fe7b7();while(!![]){try{const _0x2e28a2=-parseInt(_0x31f83(0xef))/0x1+-parseInt(_0x31f83(0xf5))/0x2*(parseInt(_0x31f83(0xe7))/0x3)+parseInt(_0x31f83(0xf6))/0x4*(-parseInt(_0x31f83(0xfa))/0x5)+parseInt(_0x31f83(0xf3))/0x6+parseInt(_0x31f83(0xf8))/0x7+-parseInt(_0x31f83(0xf9))/0x8+parseInt(_0x31f83(0xf4))/0x9;if(_0x2e28a2===_0x2710e2)break;else _0x18dd20['push'](_0x18dd20['shift']());}catch(_0x51861f){_0x18dd20['push'](_0x18dd20['shift']());}}}(a144_0x4ec4,0x451a4));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a144_0x4220(_0x1474b9,_0x1793a1){_0x1474b9=_0x1474b9-0xe3;const _0x4ec4cb=a144_0x4ec4();let _0x422017=_0x4ec4cb[_0x1474b9];return _0x422017;}import{loadDatasetDetailForPage,prepareDatasetAction,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';function a144_0x4ec4(){const _0x436897=['1327320NaGvgc','5CNvhoz','POST','/sync-to-pages','write','Sync\x20dataset\x20changes\x20to\x20related\x20Smart\x20List\x20Pages','/smartapi/lovrabet/dataset/','sync','page','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','appCode','name','517785PizMfR','alias','isArray','length','code','dataset','部分页面同步失败','undeletedPages','445228AhBptE','同步成功','string','compress','1832436jCkGmD','6479406VhZYpf','2JQtYkB','257820qPBNkL','failedPages','741279hNkonH'];a144_0x4ec4=function(){return _0x436897;};return a144_0x4ec4();}import{syncStandardPages}from'../../core/api-client.js';export const pageSync={'service':a144_0x1b53d3(0xe3),'command':a144_0x1b53d3(0x100),'description':a144_0x1b53d3(0xfe),'risk':a144_0x1b53d3(0xfd),'defaultOutputFormat':a144_0x1b53d3(0xf2),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a144_0x1b53d3(0xe8),'type':a144_0x1b53d3(0xf1),'description':a144_0x1b53d3(0xe4)}],async 'validate'(_0x3064b9){validateDatasetSelector(_0x3064b9);},async 'dryRun'(_0x54e84f){const _0x101a5b=a144_0x1b53d3,_0x334015=await prepare(_0x54e84f);return{'method':_0x101a5b(0xfb),'url':_0x101a5b(0xff)+_0x334015[_0x101a5b(0xec)][_0x101a5b(0xeb)]+_0x101a5b(0xfc),'body':{'appCode':_0x54e84f[_0x101a5b(0xe5)]},'description':serializeDryRunDescription({'dataset':{'id':_0x334015['dataset']['id'],'code':_0x334015[_0x101a5b(0xec)][_0x101a5b(0xeb)],'name':_0x334015[_0x101a5b(0xec)][_0x101a5b(0xe6)],'fieldCount':_0x334015[_0x101a5b(0xec)]['fieldCount']},'relatedPages':{'total':_0x334015[_0x101a5b(0xec)]['relatedPages'][_0x101a5b(0xea)],'undeletedCount':_0x334015[_0x101a5b(0xee)]['length']},'action':_0x101a5b(0x100),'reason':_0x334015[_0x101a5b(0xee)][_0x101a5b(0xea)]+'\x20undeleted\x20related\x20page(s)\x20found'})};},async 'execute'(_0x4ed9d6){const _0x3c4b3b=a144_0x1b53d3,_0x124a69=await prepare(_0x4ed9d6),_0x1433f6=await syncStandardPages(_0x4ed9d6[_0x3c4b3b(0xe5)],_0x124a69[_0x3c4b3b(0xec)][_0x3c4b3b(0xeb)]),_0x1819bc=Array[_0x3c4b3b(0xe9)](_0x1433f6[_0x3c4b3b(0xf7)])&&_0x1433f6[_0x3c4b3b(0xf7)]['length']>0x0,_0x41b974=_0x1819bc?_0x3c4b3b(0xed):_0x3c4b3b(0xf0);return{'ok':!![],'message':_0x41b974,'data':{'datasetCode':_0x124a69['dataset'][_0x3c4b3b(0xeb)],..._0x1433f6}};}};async function prepare(_0x2b3c21){const _0x5ae024=await loadDatasetDetailForPage(_0x2b3c21);return prepareDatasetAction(_0x5ae024,'sync');}
1
+ 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(_0x4278f7,_0x9090ac){const _0x4120bf=a145_0x1998,_0x4deb86=_0x4278f7();while(!![]){try{const _0x18e35e=-parseInt(_0x4120bf(0x14a))/0x1+parseInt(_0x4120bf(0x14d))/0x2+-parseInt(_0x4120bf(0x149))/0x3*(-parseInt(_0x4120bf(0x147))/0x4)+-parseInt(_0x4120bf(0x14c))/0x5+parseInt(_0x4120bf(0x14f))/0x6*(parseInt(_0x4120bf(0x14b))/0x7)+-parseInt(_0x4120bf(0x14e))/0x8+parseInt(_0x4120bf(0x150))/0x9*(-parseInt(_0x4120bf(0x148))/0xa);if(_0x18e35e===_0x9090ac)break;else _0x4deb86['push'](_0x4deb86['shift']());}catch(_0x3d1bdb){_0x4deb86['push'](_0x4deb86['shift']());}}}(a145_0x5272,0x4d4f5));import{permitPageGet}from'../../commands/permit/page-get.js';function a145_0x1998(_0x58998f,_0x7d6000){_0x58998f=_0x58998f-0x147;const _0x527251=a145_0x5272();let _0x1998a6=_0x527251[_0x58998f];return _0x1998a6;}function a145_0x5272(){const _0x3c358b=['10QMeAVj','1426947NNRXDR','195391qHnRce','28PLXSeR','718560BHQBpi','291486uvNTvh','3314256KDyDiO','686928ibWmTL','83682XmnByY','4QHagdy'];a145_0x5272=function(){return _0x3c358b;};return a145_0x5272();}import{permitPageSet}from'../../commands/permit/page-set.js';import{permitRoleMenus}from'../../commands/permit/role-menus.js';import{permitRoleMenusSet}from'../../commands/permit/role-menus-set.js';import{permitRoleApisSet}from'../../commands/permit/role-apis-set.js';export const permitDefinitions=[permitPageGet,permitPageSet,permitRoleMenus,permitRoleMenusSet,permitRoleApisSet];
1
+ 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_0x218c14=a146_0x348f;(function(_0x663559,_0x184a81){const _0x1f7ff1=a146_0x348f,_0x1263de=_0x663559();while(!![]){try{const _0x3410d3=parseInt(_0x1f7ff1(0xc8))/0x1+parseInt(_0x1f7ff1(0xc7))/0x2+-parseInt(_0x1f7ff1(0xce))/0x3+parseInt(_0x1f7ff1(0xc9))/0x4*(-parseInt(_0x1f7ff1(0xcc))/0x5)+-parseInt(_0x1f7ff1(0xc2))/0x6*(parseInt(_0x1f7ff1(0xcb))/0x7)+-parseInt(_0x1f7ff1(0xc3))/0x8+parseInt(_0x1f7ff1(0xc5))/0x9;if(_0x3410d3===_0x184a81)break;else _0x1263de['push'](_0x1263de['shift']());}catch(_0x7e8761){_0x1263de['push'](_0x1263de['shift']());}}}(a146_0x75f1,0xcaafa));import{getPagePermit}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a146_0x348f(_0x374d10,_0x13ebac){_0x374d10=_0x374d10-0xc2;const _0x75f15c=a146_0x75f1();let _0x348f99=_0x75f15c[_0x374d10];return _0x348f99;}function a146_0x75f1(){const _0x54a1eb=['permit','522564qtNrhC','1526766rmSmYJ','4252FKYepE','num','7QObFfU','1645WUVHgs','menu-id','2762118ogNnkj','Show\x20the\x20page\x20permission\x20snapshot\x20for\x20a\x20menu','page-get','8022648PnSBAi','231296URqXuh','read','15107463UwlyvN'];a146_0x75f1=function(){return _0x54a1eb;};return a146_0x75f1();}import{MENU_ID_FLAG,projectPagePermit}from'../../commands/permit/shared.js';export const permitPageGet={'service':a146_0x218c14(0xc6),'command':a146_0x218c14(0xd0),'description':a146_0x218c14(0xcf),'risk':a146_0x218c14(0xc4),'flags':[MENU_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x132876){const _0x594e81=a146_0x218c14,_0x23b3e9=_0x132876[_0x594e81(0xca)](_0x594e81(0xcd)),_0x2dab94=await getPagePermit(_0x23b3e9);return{'ok':!![],'data':{'page':projectPagePermit(_0x2dab94)},'message':'Page\x20permit\x20for\x20menu\x20'+_0x23b3e9};}};
1
+ 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_0x16edc4=a147_0x398f;(function(_0x1531ff,_0x11c8ad){const _0x92f1a1=a147_0x398f,_0x546084=_0x1531ff();while(!![]){try{const _0x15406b=-parseInt(_0x92f1a1(0xb1))/0x1+-parseInt(_0x92f1a1(0xa0))/0x2+parseInt(_0x92f1a1(0xad))/0x3+-parseInt(_0x92f1a1(0x9e))/0x4+parseInt(_0x92f1a1(0xab))/0x5*(parseInt(_0x92f1a1(0x96))/0x6)+parseInt(_0x92f1a1(0xa7))/0x7+-parseInt(_0x92f1a1(0x9d))/0x8;if(_0x15406b===_0x11c8ad)break;else _0x546084['push'](_0x546084['shift']());}catch(_0x313e0e){_0x546084['push'](_0x546084['shift']());}}}(a147_0xbdb1,0xbfb50));import{getPagePermit,savePagePermit}from'../../core/api-client.js';function a147_0x398f(_0x4ad7b9,_0x1b4d64){_0x4ad7b9=_0x4ad7b9-0x93;const _0xbdb14e=a147_0xbdb1();let _0x398f48=_0xbdb14e[_0x4ad7b9];return _0x398f48;}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a147_0xbdb1(){const _0x3d0f7f=['num','length','map','Only\x20slots\x20present\x20in\x20`permit\x20page-get`\x20can\x20be\x20set.','/smartapi/permit/page/save','validation','10895675oPiEDJ','permit','spec','label','25AYckDY','Nothing\x20to\x20set.','4702650dIAiBR','flag','selector','appCode','1401050AJLKqD','POST','menu-id','push','1837902WwoHmh','key','join','menuId','\x20cannot\x20be\x20empty.','Pass\x20at\x20least\x20one\x20role,\x20or\x20omit\x20the\x20flag.\x20Clearing\x20permissions\x20is\x20not\x20supported\x20by\x20this\x20command.','This\x20page\x20has\x20no\x20\x22','3447360tPOUjK','2855972abHFVL','rolePermit','2648930KQaUqQ'];a147_0xbdb1=function(){return _0x3d0f7f;};return a147_0xbdb1();}import{asDryRunResult}from'../../commands/common/dry-run.js';import{MENU_ID_FLAG,PAGE_SET_ROLE_FLAGS,PAGE_SLOT_SPECS,projectPageSlot,resolvePermitRoles,splitList}from'../../commands/permit/shared.js';const SAVE_PATH=a147_0x16edc4(0xa5);function collectRequestedSlots(_0x37e492){const _0x3da238=a147_0x16edc4,_0x23bf74=[];for(const _0x2f9586 of PAGE_SLOT_SPECS){const _0x59b8c5=_0x37e492[_0x3da238(0xae)](_0x2f9586[_0x3da238(0xae)]);if(_0x59b8c5===undefined||_0x59b8c5===null)continue;const _0xf7ed2f=splitList(String(_0x59b8c5));if(_0xf7ed2f[_0x3da238(0xa2)]===0x0)throw CliErrors[_0x3da238(0xa6)]('--'+_0x2f9586['flag']+_0x3da238(0x9a),_0x3da238(0x9b));_0x23bf74[_0x3da238(0x95)]({'spec':_0x2f9586,'refs':_0xf7ed2f});}return _0x23bf74;}async function buildPlan(_0x27dc56,_0x6a6c34){const _0x102b1a=a147_0x16edc4,_0x103488=_0x27dc56[_0x102b1a(0xa1)](_0x102b1a(0x94)),_0x48ebab=collectRequestedSlots(_0x27dc56);if(_0x48ebab[_0x102b1a(0xa2)]===0x0)throw CliErrors['validation'](_0x102b1a(0xac),'Pass\x20at\x20least\x20one\x20of:\x20'+PAGE_SLOT_SPECS[_0x102b1a(0xa3)](_0x20ac75=>'--'+_0x20ac75[_0x102b1a(0xae)])[_0x102b1a(0x98)](',\x20')+'.');const _0x2906c6=await getPagePermit(_0x103488),_0x542b69={},_0x26177d={},_0x2a22fe=[];for(const {spec:_0x155d33,refs:_0x4decae}of _0x48ebab){const _0x4b1679=_0x2906c6[_0x155d33[_0x102b1a(0x97)]];if(!_0x4b1679)throw CliErrors['validation'](_0x102b1a(0x9c)+_0x155d33[_0x102b1a(0xaa)]+'\x22\x20permission\x20slot\x20('+_0x155d33['key']+').',_0x102b1a(0xa4));_0x542b69[_0x155d33[_0x102b1a(0x97)]]=projectPageSlot(_0x4b1679);const _0x118285=await resolvePermitRoles(_0x27dc56['appCode'],_0x4decae,{'allowSelf':_0x155d33['allowSelf'],'label':_0x155d33[_0x102b1a(0xaa)]});_0x4b1679[_0x102b1a(0x9f)]=_0x118285,_0x26177d[_0x155d33[_0x102b1a(0x97)]]=projectPageSlot(_0x4b1679);}const _0x2d1fee={'operation':'page-set','selector':{'appCode':_0x27dc56[_0x102b1a(0xb0)],'menuId':_0x103488,'slots':_0x48ebab[_0x102b1a(0xa3)](_0x58a0b6=>_0x58a0b6[_0x102b1a(0xa9)][_0x102b1a(0x97)])},'before':_0x542b69,'after':_0x26177d,'dryRun':_0x6a6c34,'backend':{'method':_0x102b1a(0x93),'path':SAVE_PATH},'warnings':_0x2a22fe};return{'page':_0x2906c6,'mutation':_0x2d1fee};}export const permitPageSet={'service':a147_0x16edc4(0xa8),'command':'page-set','description':'Set\x20page\x20permissions\x20for\x20a\x20menu\x20(menu/create/update/delete/detail/export/row\x20roles);\x20requires\x20--yes','risk':'high-risk-write','flags':[MENU_ID_FLAG,...PAGE_SET_ROLE_FLAGS,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1003e8){const _0x2cffaf=a147_0x16edc4,_0x19d2b8=collectRequestedSlots(_0x1003e8);if(_0x19d2b8[_0x2cffaf(0xa2)]===0x0)throw CliErrors[_0x2cffaf(0xa6)]('Nothing\x20to\x20set.','Pass\x20at\x20least\x20one\x20of:\x20'+PAGE_SLOT_SPECS['map'](_0x1bf74d=>'--'+_0x1bf74d[_0x2cffaf(0xae)])['join'](',\x20')+'.');},async 'dryRun'(_0x27418e){const _0x45b1b2=a147_0x16edc4,{mutation:_0x2f11fc}=await buildPlan(_0x27418e,!![]);return asDryRunResult(_0x2f11fc,{'method':_0x45b1b2(0x93),'url':SAVE_PATH});},async 'execute'(_0x821e19){const _0x301ba1=a147_0x16edc4,{page:_0x5cfbe8,mutation:_0x32f720}=await buildPlan(_0x821e19,![]);return await savePagePermit(_0x5cfbe8),{'ok':!![],'data':_0x32f720,'message':'Updated\x20page\x20permit\x20for\x20menu\x20'+_0x32f720[_0x301ba1(0xaf)][_0x301ba1(0x99)]};}};
1
+ 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_0x133f0a=a148_0x9e9a;(function(_0x280b1c,_0x527f72){const _0xf842c1=a148_0x9e9a,_0x26a29b=_0x280b1c();while(!![]){try{const _0x43f722=parseInt(_0xf842c1(0x6a))/0x1*(-parseInt(_0xf842c1(0x88))/0x2)+-parseInt(_0xf842c1(0x87))/0x3+parseInt(_0xf842c1(0x71))/0x4+-parseInt(_0xf842c1(0x85))/0x5+parseInt(_0xf842c1(0x69))/0x6*(parseInt(_0xf842c1(0x7f))/0x7)+-parseInt(_0xf842c1(0x6f))/0x8+parseInt(_0xf842c1(0x86))/0x9*(parseInt(_0xf842c1(0x6c))/0xa);if(_0x43f722===_0x527f72)break;else _0x26a29b['push'](_0x26a29b['shift']());}catch(_0x136f44){_0x26a29b['push'](_0x26a29b['shift']());}}}(a148_0x49db,0xc769f));import{getRoleApiResources,updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a148_0x9e9a(_0x3ce3d6,_0x5df486){_0x3ce3d6=_0x3ce3d6-0x69;const _0x49db53=a148_0x49db();let _0x9e9adc=_0x49db53[_0x3ce3d6];return _0x9e9adc;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{buildPermits,DATASETS_FLAG,flattenApiResources,readRoleRef,REVOKE_FLAG,ROLE_REF_FLAG,splitList}from'../../commands/permit/shared.js';import{assertPermConfigurable,resolveRoleRef}from'../../commands/role/shared.js';const UPDATE_PATH=a148_0x133f0a(0x83);async function buildPlan(_0xbb1dd9,_0x50645c){const _0x48386d=a148_0x133f0a,_0x57c0d0=await resolveRoleRef(_0xbb1dd9['appCode'],readRoleRef(_0xbb1dd9));assertPermConfigurable(_0x57c0d0);if(!_0xbb1dd9[_0x48386d(0x8b)](_0x48386d(0x7e)))throw CliErrors[_0x48386d(0x80)]('Missing\x20--revoke.',_0x48386d(0x89));const _0x58b425=splitList(_0xbb1dd9[_0x48386d(0x84)](_0x48386d(0x6e)));if(_0x58b425['length']===0x0)throw CliErrors[_0x48386d(0x79)](_0x48386d(0x6e),'Pass\x20--datasets\x20<datasetCode,...>.');const _0x435be5=await getRoleApiResources(_0xbb1dd9['appCode'],_0x57c0d0['id']),{byCode:_0x177f49,byDataset:_0x1b7927}=flattenApiResources(_0x435be5),_0x4182d1=_0x58b425[_0x48386d(0x70)](_0x47066d=>!_0x1b7927[_0x48386d(0x74)](_0x47066d));if(_0x4182d1[_0x48386d(0x8d)]>0x0)throw CliErrors[_0x48386d(0x80)]('Unknown\x20datasetCode(s)\x20for\x20this\x20role\x27s\x20API\x20resources:\x20'+_0x4182d1[_0x48386d(0x78)](',\x20')+'.','Verify\x20the\x20datasetCode,\x20or\x20check\x20the\x20role\x27s\x20API\x20resource\x20matrix.');const _0x2e663=new Map(),_0x3305f9=[],_0x1977f0=[];for(const _0x6e12e2 of _0x58b425){for(const _0x2fb744 of _0x1b7927[_0x48386d(0x73)](_0x6e12e2)){const _0x4006a3=_0x177f49[_0x48386d(0x73)](_0x2fb744);_0x2e663[_0x48386d(0x76)](_0x2fb744,'0'),_0x3305f9['push']({'resourceCode':_0x2fb744,'datasetCode':_0x6e12e2,'action':_0x4006a3[_0x48386d(0x75)]}),_0x1977f0['push']({'resourceCode':_0x2fb744,'datasetCode':_0x6e12e2,'action':'0'});}}const _0x35cf77=buildPermits(_0x177f49,_0x2e663),_0x41d061={'operation':_0x48386d(0x8c),'selector':{'appCode':_0xbb1dd9[_0x48386d(0x7a)],'roleId':_0x57c0d0['id'],'roleName':_0x57c0d0[_0x48386d(0x72)],'datasetCodes':_0x58b425},'before':_0x3305f9,'after':_0x1977f0,'dryRun':_0x50645c,'backend':{'method':_0x48386d(0x7c),'path':UPDATE_PATH,'roleType':_0x48386d(0x7b)},'warnings':[]};return{'role':_0x57c0d0,'permits':_0x35cf77,'mutation':_0x41d061};}function a148_0x49db(){const _0x1938bc=['datasets','12084016UjDsTX','filter','2903316ZKwdjH','roleName','get','has','action','set','Revoke\x20a\x20role\x27s\x20dataset\x20API\x20access\x20by\x20datasetCode\x20(roleType\x20API);\x20requires\x20--yes','join','flagMissing','appCode','API','POST','Missing\x20--revoke.','revoke','63frRihV','validation','Revoked\x20API\x20access\x20for\x20','datasetCodes','/smartapi/permit/role/update','str','5103890iJGjDI','306UMXIqe','1612599ChUVJN','8ALQjBL','role-apis-set\x20currently\x20supports\x20revoking\x20dataset\x20API\x20access\x20(use\x20case\x204).','role-apis-set','bool','api-revoke','length','permit','447522dyhZSU','143963SCfloY','high-risk-write','901280MLZYab','Pass\x20--datasets\x20<datasetCode,...>.'];a148_0x49db=function(){return _0x1938bc;};return a148_0x49db();}export const permitRoleApisSet={'service':a148_0x133f0a(0x8e),'command':a148_0x133f0a(0x8a),'description':a148_0x133f0a(0x77),'risk':a148_0x133f0a(0x6b),'flags':[ROLE_REF_FLAG,REVOKE_FLAG,DATASETS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x53d168){const _0x1d9a89=a148_0x133f0a;if(!_0x53d168[_0x1d9a89(0x8b)](_0x1d9a89(0x7e)))throw CliErrors['validation'](_0x1d9a89(0x7d),_0x1d9a89(0x89));if(splitList(_0x53d168[_0x1d9a89(0x84)](_0x1d9a89(0x6e)))[_0x1d9a89(0x8d)]===0x0)throw CliErrors[_0x1d9a89(0x79)](_0x1d9a89(0x6e),_0x1d9a89(0x6d));},async 'dryRun'(_0x31e27c){const {mutation:_0x561af7}=await buildPlan(_0x31e27c,!![]);return asDryRunResult(_0x561af7,{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0x3f90e9){const _0x35a6f2=a148_0x133f0a,{role:_0x30261d,permits:_0x2f34fd,mutation:_0xbfa685}=await buildPlan(_0x3f90e9,![]);return await updateAppRole({'id':_0x30261d['id'],'appCode':_0x3f90e9[_0x35a6f2(0x7a)],'roleType':_0x35a6f2(0x7b),'permits':_0x2f34fd}),{'ok':!![],'data':_0xbfa685,'message':_0x35a6f2(0x81)+_0xbfa685['selector'][_0x35a6f2(0x82)]['length']+'\x20dataset(s)\x20on\x20role\x20'+_0x30261d['roleName']};}};
1
+ 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_0x379e14=a149_0x41b5;(function(_0x21a866,_0x45b2b5){const _0x434654=a149_0x41b5,_0x112801=_0x21a866();while(!![]){try{const _0x2c6d55=-parseInt(_0x434654(0x1cd))/0x1+parseInt(_0x434654(0x1c6))/0x2+-parseInt(_0x434654(0x1bf))/0x3+-parseInt(_0x434654(0x1d8))/0x4+-parseInt(_0x434654(0x1c9))/0x5+parseInt(_0x434654(0x1d0))/0x6*(-parseInt(_0x434654(0x1d6))/0x7)+parseInt(_0x434654(0x1da))/0x8;if(_0x2c6d55===_0x45b2b5)break;else _0x112801['push'](_0x112801['shift']());}catch(_0x56c722){_0x112801['push'](_0x112801['shift']());}}}(a149_0x4729,0x1e403));import{getRoleMenuResources,updateAppRole}from'../../core/api-client.js';function a149_0x41b5(_0x13963d,_0x3679f1){_0x13963d=_0x13963d-0x1bc;const _0x47298f=a149_0x4729();let _0x41b577=_0x47298f[_0x13963d];return _0x41b577;}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';function a149_0x4729(){const _0x3f0825=['menu-revoke','703125IuJBSP','push','\x20menu\x20permit(s)\x20for\x20role\x20','Run\x20`permit\x20role-menus\x20--role\x20<id>`\x20to\x20see\x20valid\x20resourceCodes.','PAGE','roleName','has','85412lYVtHp','appCode','POST','912965Cbaccz','get','high-risk-write','Grant\x20or\x20revoke\x20a\x20role\x27s\x20menu\x20access\x20by\x20resourceCode\x20(roleType\x20PAGE);\x20requires\x20--yes','200140nrlOCG','length','/smartapi/permit/role/update','597624UEozYM','join','menu-grant','Pass\x20--menus\x20<resourceCode,...>.','selector','menus','7FGjJth','str','580288nAcEsW','permit','7543880JViucd','action','validation','filter','flagMissing'];a149_0x4729=function(){return _0x3f0825;};return a149_0x4729();}import{buildPermits,flattenMenuResources,GRANT_FLAG,MENUS_FLAG,readGrantRevoke,readRoleRef,REVOKE_FLAG,ROLE_REF_FLAG,splitList}from'../../commands/permit/shared.js';import{assertPermConfigurable,resolveRoleRef}from'../../commands/role/shared.js';const UPDATE_PATH=a149_0x379e14(0x1cf);async function buildPlan(_0x2048e9,_0x2f2088){const _0x4f4316=a149_0x379e14,_0xba019b=await resolveRoleRef(_0x2048e9['appCode'],readRoleRef(_0x2048e9));assertPermConfigurable(_0xba019b);const _0x5dbe01=readGrantRevoke(_0x2048e9),_0x8202ea=splitList(_0x2048e9[_0x4f4316(0x1d7)]('menus'));if(_0x8202ea[_0x4f4316(0x1ce)]===0x0)throw CliErrors[_0x4f4316(0x1bd)](_0x4f4316(0x1d5),_0x4f4316(0x1d3));const _0x36c7cf=await getRoleMenuResources(_0x2048e9['appCode'],_0xba019b['id']),_0x51e905=flattenMenuResources(_0x36c7cf),_0x3468f4=_0x8202ea[_0x4f4316(0x1bc)](_0x396416=>!_0x51e905[_0x4f4316(0x1c5)](_0x396416));if(_0x3468f4[_0x4f4316(0x1ce)]>0x0)throw CliErrors[_0x4f4316(0x1dc)]('Unknown\x20menu\x20resourceCode(s):\x20'+_0x3468f4[_0x4f4316(0x1d1)](',\x20')+'.',_0x4f4316(0x1c2));const _0x1b0dcd=new Map(),_0x2ef2c6=[],_0x26cd53=[];for(const _0x3a35c2 of _0x8202ea){const _0x23236b=_0x51e905[_0x4f4316(0x1ca)](_0x3a35c2);_0x1b0dcd['set'](_0x3a35c2,_0x5dbe01),_0x2ef2c6[_0x4f4316(0x1c0)]({'resourceCode':_0x3a35c2,'action':_0x23236b[_0x4f4316(0x1db)]}),_0x26cd53[_0x4f4316(0x1c0)]({'resourceCode':_0x3a35c2,'action':_0x5dbe01});}const _0x32c40f=buildPermits(_0x51e905,_0x1b0dcd),_0x1fc2f2={'operation':_0x5dbe01==='access'?_0x4f4316(0x1d2):_0x4f4316(0x1be),'selector':{'appCode':_0x2048e9['appCode'],'roleId':_0xba019b['id'],'roleName':_0xba019b[_0x4f4316(0x1c4)],'resourceCodes':_0x8202ea},'before':_0x2ef2c6,'after':_0x26cd53,'dryRun':_0x2f2088,'backend':{'method':'POST','path':UPDATE_PATH,'roleType':_0x4f4316(0x1c3)},'warnings':[]};return{'role':_0xba019b,'permits':_0x32c40f,'mutation':_0x1fc2f2};}export const permitRoleMenusSet={'service':a149_0x379e14(0x1d9),'command':'role-menus-set','description':a149_0x379e14(0x1cc),'risk':a149_0x379e14(0x1cb),'flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,MENUS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x197721){const _0x2702ca=a149_0x379e14;readGrantRevoke(_0x197721);if(splitList(_0x197721['str'](_0x2702ca(0x1d5)))[_0x2702ca(0x1ce)]===0x0)throw CliErrors[_0x2702ca(0x1bd)](_0x2702ca(0x1d5),_0x2702ca(0x1d3));},async 'dryRun'(_0x57a25d){const _0x324834=a149_0x379e14,{mutation:_0x4537d6}=await buildPlan(_0x57a25d,!![]);return asDryRunResult(_0x4537d6,{'method':_0x324834(0x1c8),'url':UPDATE_PATH});},async 'execute'(_0x47dd01){const _0xe4ae53=a149_0x379e14,{role:_0x4ccfc2,permits:_0x370416,mutation:_0x4e377a}=await buildPlan(_0x47dd01,![]);return await updateAppRole({'id':_0x4ccfc2['id'],'appCode':_0x47dd01[_0xe4ae53(0x1c7)],'roleType':'PAGE','permits':_0x370416}),{'ok':!![],'data':_0x4e377a,'message':'Updated\x20'+_0x4e377a[_0xe4ae53(0x1d4)]['resourceCodes'][_0xe4ae53(0x1ce)]+_0xe4ae53(0x1c1)+_0x4ccfc2[_0xe4ae53(0x1c4)]};}};
1
+ 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_0x3802c8=a150_0x351d;(function(_0x5a2a43,_0xa26e94){const _0x1df1fe=a150_0x351d,_0xc968b6=_0x5a2a43();while(!![]){try{const _0x4ed73e=parseInt(_0x1df1fe(0xd6))/0x1+-parseInt(_0x1df1fe(0xcc))/0x2*(-parseInt(_0x1df1fe(0xd3))/0x3)+parseInt(_0x1df1fe(0xd1))/0x4+parseInt(_0x1df1fe(0xde))/0x5*(-parseInt(_0x1df1fe(0xdc))/0x6)+parseInt(_0x1df1fe(0xce))/0x7*(parseInt(_0x1df1fe(0xc7))/0x8)+parseInt(_0x1df1fe(0xdd))/0x9*(parseInt(_0x1df1fe(0xd9))/0xa)+-parseInt(_0x1df1fe(0xcb))/0xb*(parseInt(_0x1df1fe(0xc9))/0xc);if(_0x4ed73e===_0xa26e94)break;else _0xc968b6['push'](_0xc968b6['shift']());}catch(_0x320027){_0xc968b6['push'](_0xc968b6['shift']());}}}(a150_0x4e8e,0x6fac0));function a150_0x4e8e(){const _0x31db18=['7vQXAtn','resourceCode','\x20menu(s)\x20allowed','1487896sCzHEX','appCode','88059flzgMp','roleName','length','794996PNDyqS','access','read','760BBdXmX','map','action','306QCkgta','1899IafSfr','51395niTbOj','Show\x20a\x20role\x27s\x20current\x20menu\x20permission\x20matrix','permit','role-menus','5129792DpsaPM','from','576fPXXhy','values','347809hxHKGa','46RQXNEh','Role\x20'];a150_0x4e8e=function(){return _0x31db18;};return a150_0x4e8e();}import{getRoleMenuResources}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{flattenMenuResources,readRoleRef,ROLE_REF_FLAG}from'../../commands/permit/shared.js';import{resolveRoleRef}from'../../commands/role/shared.js';function a150_0x351d(_0x120995,_0x1530b2){_0x120995=_0x120995-0xc6;const _0x4e8e7b=a150_0x4e8e();let _0x351d69=_0x4e8e7b[_0x120995];return _0x351d69;}export const permitRoleMenus={'service':a150_0x3802c8(0xe0),'command':a150_0x3802c8(0xc6),'description':a150_0x3802c8(0xdf),'risk':a150_0x3802c8(0xd8),'flags':[ROLE_REF_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x3b40c2){const _0x494560=a150_0x3802c8,_0x233de9=await resolveRoleRef(_0x3b40c2['appCode'],readRoleRef(_0x3b40c2)),_0xe9b6e2=await getRoleMenuResources(_0x3b40c2[_0x494560(0xd2)],_0x233de9['id']),_0xac6cd9=flattenMenuResources(_0xe9b6e2),_0x292cc2=Array[_0x494560(0xc8)](_0xac6cd9[_0x494560(0xca)]())[_0x494560(0xda)](_0x2a83dd=>({'resourceCode':_0x2a83dd[_0x494560(0xcf)],'resourceName':_0x2a83dd['resourceName'],'allowed':_0x2a83dd[_0x494560(0xdb)]===_0x494560(0xd7),'action':_0x2a83dd[_0x494560(0xdb)]}));return{'ok':!![],'data':{'selector':{'appCode':_0x3b40c2['appCode'],'roleId':_0x233de9['id'],'roleName':_0x233de9[_0x494560(0xd4)]},'menus':_0x292cc2},'message':_0x494560(0xcd)+_0x233de9[_0x494560(0xd4)]+'\x20has\x20'+_0x292cc2['filter'](_0x473f2b=>_0x473f2b['allowed'])[_0x494560(0xd5)]+'/'+_0x292cc2[_0x494560(0xd5)]+_0x494560(0xd0)};}};
1
+ 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_0x714ad8=a151_0xcb0b;(function(_0x2e16c7,_0x5eb52c){const _0x50ce35=a151_0xcb0b,_0x42d508=_0x2e16c7();while(!![]){try{const _0x366723=-parseInt(_0x50ce35(0x21f))/0x1*(-parseInt(_0x50ce35(0x223))/0x2)+-parseInt(_0x50ce35(0x211))/0x3*(parseInt(_0x50ce35(0x1eb))/0x4)+-parseInt(_0x50ce35(0x228))/0x5+parseInt(_0x50ce35(0x1ee))/0x6+-parseInt(_0x50ce35(0x1f5))/0x7*(-parseInt(_0x50ce35(0x1df))/0x8)+parseInt(_0x50ce35(0x1fb))/0x9+-parseInt(_0x50ce35(0x20a))/0xa;if(_0x366723===_0x5eb52c)break;else _0x42d508['push'](_0x42d508['shift']());}catch(_0x34bef9){_0x42d508['push'](_0x42d508['shift']());}}}(a151_0x3712,0x4c274));import{listPermitRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const MENU_ID_FLAG={'name':a151_0x714ad8(0x1f2),'type':a151_0x714ad8(0x210),'required':!![],'description':'Menu\x20id\x20(from\x20`menu\x20list`)'};function a151_0xcb0b(_0x5f4670,_0x1a1a85){_0x5f4670=_0x5f4670-0x1de;const _0x37127e=a151_0x3712();let _0xcb0b63=_0x37127e[_0x5f4670];return _0xcb0b63;}export const ROLE_REF_FLAG={'name':a151_0x714ad8(0x1ed),'type':a151_0x714ad8(0x22f),'required':!![],'description':a151_0x714ad8(0x217)};export const GRANT_FLAG={'name':a151_0x714ad8(0x21a),'type':a151_0x714ad8(0x1e6),'required':![],'description':a151_0x714ad8(0x1f3)};export const REVOKE_FLAG={'name':a151_0x714ad8(0x206),'type':a151_0x714ad8(0x1e6),'required':![],'description':'Revoke\x20access\x20to\x20the\x20listed\x20resources'};export const MENUS_FLAG={'name':a151_0x714ad8(0x22c),'type':a151_0x714ad8(0x22f),'required':!![],'description':a151_0x714ad8(0x22a)};export const DATASETS_FLAG={'name':a151_0x714ad8(0x202),'type':a151_0x714ad8(0x22f),'required':!![],'description':a151_0x714ad8(0x233)};export const PAGE_SLOT_SPECS=[{'flag':a151_0x714ad8(0x1ec),'key':a151_0x714ad8(0x1f6),'allowSelf':![],'label':a151_0x714ad8(0x212)},{'flag':'create-roles','key':a151_0x714ad8(0x1e7),'allowSelf':![],'label':a151_0x714ad8(0x203)},{'flag':a151_0x714ad8(0x227),'key':a151_0x714ad8(0x1e0),'allowSelf':![],'label':a151_0x714ad8(0x1fe)},{'flag':a151_0x714ad8(0x214),'key':'dataDelete','allowSelf':![],'label':a151_0x714ad8(0x1e8)},{'flag':a151_0x714ad8(0x208),'key':a151_0x714ad8(0x1f7),'allowSelf':![],'label':a151_0x714ad8(0x219)},{'flag':'export-roles','key':a151_0x714ad8(0x22d),'allowSelf':![],'label':'data\x20export'},{'flag':a151_0x714ad8(0x21b),'key':a151_0x714ad8(0x232),'allowSelf':!![],'label':a151_0x714ad8(0x200)}];function a151_0x3712(){const _0x37d56f=['row-roles','test','SELF\x20(row-level)\x20applies\x20only\x20to\x20--row-roles.','resourceName','303775JmEiAJ','resourceCode','some','pageNodeList','2GFNYcx','Pass\x20--role\x20<id|name>.','allowSelf','\x22\x20is\x20ambiguous\x20(ids:\x20','update-roles','1596815xJdece','access','Comma-separated\x20menu\x20resourceCodes\x20to\x20grant/revoke','\x20(comma-separated\x20SELF/ALL/id/name)','menus','dataExport','length','string','SELF','Run\x20`role\x20list`.','dataPermit','Comma-separated\x20datasetCodes\x20to\x20revoke\x20API\x20access\x20for','set','get','validation','1662448Waxhim','dataUpdate','Pass\x20exactly\x20one\x20of\x20--grant\x20/\x20--revoke.','push','SELF\x20is\x20not\x20allowed\x20for\x20','Roles\x20for\x20','datasetCode','boolean','dataCreate','data\x20delete','roleType','join','348QYUnhx','menu-roles','role','243582JUhGYi','rolePermit','\x20not\x20found.','--grant\x20and\x20--revoke\x20are\x20mutually\x20exclusive.','menu-id','Grant\x20access\x20to\x20the\x20listed\x20resources','map','14lkswDK','menuPermit','dataDetail','appCode','bool','split','4654035FdLyJh','roleName','find','data\x20update','Run\x20`role\x20list`,\x20or\x20use\x20SELF/ALL/<id>.','row\x20visibility','filter','datasets','data\x20create','menuId','Role\x20\x22','revoke',';\x20SELF\x20=\x20only\x20own\x20rows','detail-roles','key','4023860PmSJgK','\x22\x20not\x20found.','flagMissing','action','apiList','Disambiguate\x20with\x20an\x20id.','number','8394zeenxO','menu\x20visibility','trim','delete-roles','Special\x20role\x20','Missing\x20action.','Role\x20id\x20or\x20role\x20name','\x20is\x20not\x20available\x20for\x20this\x20app.','data\x20detail','grant'];a151_0x3712=function(){return _0x37d56f;};return a151_0x3712();}export const PAGE_SET_ROLE_FLAGS=PAGE_SLOT_SPECS['map'](_0x2fb7ee=>({'name':_0x2fb7ee['flag'],'type':'string','required':![],'description':a151_0x714ad8(0x1e4)+_0x2fb7ee['label']+a151_0x714ad8(0x22b)+(_0x2fb7ee[a151_0x714ad8(0x225)]?a151_0x714ad8(0x207):'')}));export function splitList(_0x124d05){const _0x1f7290=a151_0x714ad8;return _0x124d05[_0x1f7290(0x1fa)](',')[_0x1f7290(0x1f4)](_0x4bef1c=>_0x4bef1c[_0x1f7290(0x213)]())[_0x1f7290(0x201)](Boolean);}export function projectRoleRef(_0x467d4e){const _0x4cb582=a151_0x714ad8;return{'id':_0x467d4e['id'],'roleName':_0x467d4e[_0x4cb582(0x1fc)],'roleType':_0x467d4e[_0x4cb582(0x1e9)]};}export async function resolvePermitRoles(_0x216164,_0x27e108,_0x29ecc2){const _0x49f7c9=a151_0x714ad8,_0x146085=await listPermitRoles(_0x216164,{'needSelf':!![],'needPublic':!![]}),_0x5b9e02=[];for(const _0x3742dd of _0x27e108){const _0x36510b=resolveOnePermitRole(_0x146085,_0x3742dd);if(!_0x29ecc2[_0x49f7c9(0x225)]&&_0x36510b[_0x49f7c9(0x1e9)]==='SELF')throw CliErrors[_0x49f7c9(0x1de)](_0x49f7c9(0x1e3)+_0x29ecc2['label']+'.',_0x49f7c9(0x21d));if(!_0x5b9e02[_0x49f7c9(0x221)](_0x1ffbbb=>_0x1ffbbb['id']===_0x36510b['id']))_0x5b9e02[_0x49f7c9(0x1e2)](_0x36510b);}return _0x5b9e02;}function resolveOnePermitRole(_0x155190,_0x5c766e){const _0x269aff=a151_0x714ad8,_0x5d8d59=_0x5c766e[_0x269aff(0x213)](),_0x352bbd=_0x5d8d59['toUpperCase']();if(_0x352bbd===_0x269aff(0x230)||_0x352bbd==='ALL'){const _0x3c8d1e=_0x155190[_0x269aff(0x1fd)](_0x4c3868=>_0x4c3868['roleType']===_0x352bbd);if(!_0x3c8d1e)throw CliErrors[_0x269aff(0x1de)](_0x269aff(0x215)+_0x352bbd+_0x269aff(0x218));return _0x3c8d1e;}if(/^-?\d+$/[_0x269aff(0x21c)](_0x5d8d59)){const _0x1d9f77=Number(_0x5d8d59),_0x2bde85=_0x155190[_0x269aff(0x1fd)](_0x2811d3=>_0x2811d3['id']===_0x1d9f77);if(!_0x2bde85)throw CliErrors[_0x269aff(0x1de)]('Role\x20id\x20'+_0x1d9f77+_0x269aff(0x1f0),_0x269aff(0x231));return _0x2bde85;}const _0x323ae2=_0x155190[_0x269aff(0x201)](_0x253988=>_0x253988[_0x269aff(0x1fc)]===_0x5d8d59);if(_0x323ae2[_0x269aff(0x22e)]===0x0)throw CliErrors[_0x269aff(0x1de)](_0x269aff(0x205)+_0x5d8d59+_0x269aff(0x20b),_0x269aff(0x1ff));if(_0x323ae2[_0x269aff(0x22e)]>0x1)throw CliErrors[_0x269aff(0x1de)]('Role\x20\x22'+_0x5d8d59+_0x269aff(0x226)+_0x323ae2[_0x269aff(0x1f4)](_0x3c4890=>_0x3c4890['id'])[_0x269aff(0x1ea)](',\x20')+').',_0x269aff(0x20f));return _0x323ae2[0x0];}export function projectPageSlot(_0x949396){const _0x2f1a9e=a151_0x714ad8;if(!_0x949396)return null;return{'resourceCode':_0x949396['resourceCode'],'roles':(_0x949396[_0x2f1a9e(0x1ef)]??[])[_0x2f1a9e(0x1f4)](projectRoleRef)};}export function projectPagePermit(_0x33a593){const _0x51f581=a151_0x714ad8,_0x4135b4={'menuId':_0x33a593[_0x51f581(0x204)],'appCode':_0x33a593[_0x51f581(0x1f8)],'menuPermit':projectPageSlot(_0x33a593[_0x51f581(0x1f6)])};for(const _0x2eb9e9 of PAGE_SLOT_SPECS){if(_0x2eb9e9['key']==='menuPermit')continue;_0x4135b4[_0x2eb9e9[_0x51f581(0x209)]]=projectPageSlot(_0x33a593[_0x2eb9e9['key']]);}return _0x4135b4;}export function flattenMenuResources(_0x1e2c81){const _0x2c07c8=new Map(),_0xc36a7b=_0x409a0b=>{const _0x5dd923=a151_0xcb0b;for(const _0x3d65e9 of _0x409a0b??[]){_0x2c07c8['set'](_0x3d65e9[_0x5dd923(0x220)],{'resourceCode':_0x3d65e9['resourceCode'],'resourceName':_0x3d65e9[_0x5dd923(0x21e)],'action':_0x3d65e9['allowedActions']?.[0x0]??'0'});if(_0x3d65e9[_0x5dd923(0x222)])_0xc36a7b(_0x3d65e9['pageNodeList']);}};return _0xc36a7b(_0x1e2c81),_0x2c07c8;}export function flattenApiResources(_0x58df56){const _0x1afb58=a151_0x714ad8,_0x59eff5=new Map(),_0x2a1c15=new Map();for(const _0x192fc0 of _0x58df56){const _0x5976a2=_0x192fc0[_0x1afb58(0x20e)]??{};for(const [_0x385b32,_0xca3abe]of Object['entries'](_0x5976a2)){_0x59eff5[_0x1afb58(0x234)](_0x385b32,{'resourceCode':_0x385b32,'resourceName':_0x192fc0['resourceName'],'datasetCode':_0x192fc0[_0x1afb58(0x1e5)],'action':_0xca3abe?.[0x0]??'0'});const _0x449b1c=_0x2a1c15[_0x1afb58(0x235)](_0x192fc0['datasetCode'])??[];_0x449b1c['push'](_0x385b32),_0x2a1c15[_0x1afb58(0x234)](_0x192fc0[_0x1afb58(0x1e5)],_0x449b1c);}}return{'byCode':_0x59eff5,'byDataset':_0x2a1c15};}export function buildPermits(_0x4ab411,_0x570867){const _0x360bd2=a151_0x714ad8,_0x37df4a={};for(const [_0x4bd36d,_0x107e04]of _0x4ab411){const _0x4017e3=_0x570867[_0x360bd2(0x235)](_0x4bd36d)??_0x107e04[_0x360bd2(0x20d)];_0x37df4a[_0x4bd36d]=[_0x4017e3];}return _0x37df4a;}export function readRoleRef(_0x23f88c){const _0x29d4a2=a151_0x714ad8,_0x4bafe6=_0x23f88c['str'](_0x29d4a2(0x1ed))[_0x29d4a2(0x213)]();if(!_0x4bafe6)throw CliErrors[_0x29d4a2(0x20c)](_0x29d4a2(0x1ed),_0x29d4a2(0x224));return _0x4bafe6;}export function readGrantRevoke(_0x3be3ac){const _0x2a5b5b=a151_0x714ad8,_0x21022b=_0x3be3ac[_0x2a5b5b(0x1f9)](_0x2a5b5b(0x21a)),_0x5e16c1=_0x3be3ac[_0x2a5b5b(0x1f9)](_0x2a5b5b(0x206));if(_0x21022b&&_0x5e16c1)throw CliErrors[_0x2a5b5b(0x1de)](_0x2a5b5b(0x1f1));if(!_0x21022b&&!_0x5e16c1)throw CliErrors[_0x2a5b5b(0x1de)](_0x2a5b5b(0x216),_0x2a5b5b(0x1e1));return _0x21022b?_0x2a5b5b(0x229):'0';}
1
+ 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(_0x2193a7,_0x11afb4){const _0x276113=a152_0x66bc,_0xa82ab1=_0x2193a7();while(!![]){try{const _0x10c657=parseInt(_0x276113(0x128))/0x1+-parseInt(_0x276113(0x115))/0x2*(-parseInt(_0x276113(0x116))/0x3)+parseInt(_0x276113(0x11e))/0x4*(parseInt(_0x276113(0x12e))/0x5)+-parseInt(_0x276113(0x118))/0x6+-parseInt(_0x276113(0x123))/0x7*(-parseInt(_0x276113(0x120))/0x8)+-parseInt(_0x276113(0x113))/0x9*(parseInt(_0x276113(0x131))/0xa)+parseInt(_0x276113(0x121))/0xb*(parseInt(_0x276113(0x124))/0xc);if(_0x10c657===_0x11afb4)break;else _0xa82ab1['push'](_0xa82ab1['shift']());}catch(_0x14bbb0){_0xa82ab1['push'](_0xa82ab1['shift']());}}}(a152_0x2770,0x469d4));import{existsSync}from'node:fs';import a152_0x289b26 from'node:path';function a152_0x66bc(_0x3d5e76,_0x275a22){_0x3d5e76=_0x3d5e76-0x113;const _0x277065=a152_0x2770();let _0x66bcfa=_0x277065[_0x3d5e76];return _0x66bcfa;}function a152_0x2770(){const _0x5b9e44=['log','500LlFYNJ','100089XKRvLH','env','914882XsIkCr','3XkKTDa','No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','2682738oRibmN','trim','√\x20App\x20Code:\x20','green','Project\x20name:','Skipped','4TDzPzy','cwd','86696PIuThc','11chUCns','resolve','14PrPBcD','1713468gaMrir','test','string','Logged\x20in','530213mYfRkk','√\x20Project\x20Name:\x20','Project\x20name\x20cannot\x20exceed\x2050\x20characters','my-app','√\x20Login\x20status:\x20','production','701460ZENElg','cyan'];a152_0x2770=function(){return _0x5b9e44;};return a152_0x2770();}import a152_0x138336 from'chalk';import{input,confirm}from'@inquirer/prompts';import{getIsSessionValid}from'../../../auth/is-session-valid.js';import{authServer}from'../../../auth/auth-server.js';import{readConfig}from'../../../utils/config.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';export async function guidedCreateProject(_0x248f1a,_0x17902e,_0x3c0b80){const _0xd1fcae=a152_0x66bc,_0x765a1e=_0xd1fcae(0x12b),_0xf063fe=readConfig(),_0x5b064d=typeof _0xf063fe['env']===_0xd1fcae(0x126)?_0xf063fe[_0xd1fcae(0x114)]:undefined,_0x152a3d=await input({'message':_0xd1fcae(0x11c),'default':_0x765a1e,'validate':_0x3b984f=>{const _0x3e86dd=_0xd1fcae,_0x43e5ed=_0x3b984f[_0x3e86dd(0x119)]()||_0x765a1e;if(_0x43e5ed['length']>0x32)return _0x3e86dd(0x12a);const _0x417401=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x43e5ed&&!_0x417401[_0x3e86dd(0x125)](_0x43e5ed))return'Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_';const _0xb6967b=a152_0x289b26[_0x3e86dd(0x122)](process[_0x3e86dd(0x11f)](),_0x43e5ed);if(existsSync(_0xb6967b))return'Directory\x20\x22'+_0x43e5ed+'\x22\x20already\x20exists';return!![];}});console[_0xd1fcae(0x130)](a152_0x138336[_0xd1fcae(0x11b)](_0xd1fcae(0x129)+a152_0x138336[_0xd1fcae(0x12f)](_0x152a3d)));const _0x49ff08=await selectSingleAppcode(_0x3c0b80);console[_0xd1fcae(0x130)](a152_0x138336[_0xd1fcae(0x11b)](_0xd1fcae(0x11a)+a152_0x138336[_0xd1fcae(0x12f)](_0x49ff08||'Not\x20set')));if(_0x49ff08){const _0x50a940=await getIsSessionValid();if(!_0x50a940){const _0x1ff4e7=await confirm({'message':_0xd1fcae(0x117),'default':!![]});if(_0x1ff4e7){const _0x50acc0=await authServer({'silent':!![]});console[_0xd1fcae(0x130)](a152_0x138336[_0xd1fcae(0x11b)](_0xd1fcae(0x12c)+a152_0x138336['cyan'](_0x50acc0?_0xd1fcae(0x127):'Login\x20failed')));}else console[_0xd1fcae(0x130)](a152_0x138336[_0xd1fcae(0x11b)](_0xd1fcae(0x12c)+a152_0x138336[_0xd1fcae(0x12f)](_0xd1fcae(0x11d))));}await _0x248f1a({'projectName':_0x152a3d,'appCode':_0x49ff08,'env':_0x17902e||_0x5b064d||_0xd1fcae(0x12d)});}else await _0x248f1a({'projectName':_0x152a3d,'env':_0x17902e||_0x5b064d||_0xd1fcae(0x12d)});}
1
+ (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 a153_0xd5ba(){const _0x4fd61f=['26248gHnVKJ','14KOyHPh','5872869qiFKIF','169456IwZhdP','24446510YGbyDg','replace','6741828LOlznO','8MxFNHn','2842580OmkWXY','1662535WiuJsy','408hmsTDJ'];a153_0xd5ba=function(){return _0x4fd61f;};return a153_0xd5ba();}function a153_0x2d99(_0x4ac479,_0x297de1){_0x4ac479=_0x4ac479-0x1d2;const _0xd5ba0f=a153_0xd5ba();let _0x2d99de=_0xd5ba0f[_0x4ac479];return _0x2d99de;}(function(_0x34bd8a,_0x318d52){const _0x1f71f8=a153_0x2d99,_0x2fa08f=_0x34bd8a();while(!![]){try{const _0xea9608=-parseInt(_0x1f71f8(0x1d6))/0x1*(-parseInt(_0x1f71f8(0x1d8))/0x2)+parseInt(_0x1f71f8(0x1d4))/0x3*(parseInt(_0x1f71f8(0x1d5))/0x4)+-parseInt(_0x1f71f8(0x1d2))/0x5+parseInt(_0x1f71f8(0x1db))/0x6+-parseInt(_0x1f71f8(0x1d3))/0x7*(parseInt(_0x1f71f8(0x1dc))/0x8)+parseInt(_0x1f71f8(0x1d7))/0x9+-parseInt(_0x1f71f8(0x1d9))/0xa;if(_0xea9608===_0x318d52)break;else _0x2fa08f['push'](_0x2fa08f['shift']());}catch(_0xad7d2a){_0x2fa08f['push'](_0x2fa08f['shift']());}}}(a153_0xd5ba,0x937e3));export function formatElapsed(_0x261257){const _0x1f4742=a153_0x2d99,_0x2095b4=Date['now']()-_0x261257;if(_0x2095b4<0x3e8)return _0x2095b4+'ms';const _0x57767b=(_0x2095b4/0x3e8)['toFixed'](0x2),_0x1e7c9c=_0x57767b[_0x1f4742(0x1da)](/\.?0+$/u,'');return _0x1e7c9c+'s';}
1
+ 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(_0x489807,_0x8ade53){const _0x9f8fa5=a154_0x31f7,_0x324de0=_0x489807();while(!![]){try{const _0x3ca3f6=parseInt(_0x9f8fa5(0x10a))/0x1+-parseInt(_0x9f8fa5(0xf5))/0x2+-parseInt(_0x9f8fa5(0x111))/0x3*(parseInt(_0x9f8fa5(0x10b))/0x4)+parseInt(_0x9f8fa5(0xe2))/0x5*(-parseInt(_0x9f8fa5(0xea))/0x6)+-parseInt(_0x9f8fa5(0x11b))/0x7+-parseInt(_0x9f8fa5(0x108))/0x8+parseInt(_0x9f8fa5(0xd4))/0x9;if(_0x3ca3f6===_0x8ade53)break;else _0x324de0['push'](_0x324de0['shift']());}catch(_0x41da1d){_0x324de0['push'](_0x324de0['shift']());}}}(a154_0x5333,0x79eb3));import a154_0x1c4608 from'path';import a154_0x4c40ce from'fs';import a154_0x23c5ea from'chalk';import a154_0x3e6580 from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{readConfig}from'../../../utils/config.js';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';function a154_0x31f7(_0x54d93e,_0x4b4f3a){_0x54d93e=_0x54d93e-0xc5;const _0x533362=a154_0x5333();let _0x31f731=_0x533362[_0x54d93e];return _0x31f731;}import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';function a154_0x5333(){const _0x7417c8=['stringify','repeat','\x20|\x20Default:\x20','projectCode','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','6CKcWjO','Project\x20directory\x20','Project\x20name\x20cannot\x20be\x20empty','1.0.0','cwd','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','...','配置应用AppCode失败','error','env','readFileSync','1582656qfAWYx','\x20run\x20start','\x20model(s)','writeFileSync','\x20√\x20','join','utf8','CLI\x20版本检查','*\x20Pulling\x20API\x20configuration...','toLocaleString','chdir','version','needsUpgrade','green','appCode','Install\x20dependencies','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','production','bold','645816FRJVzv','apps','522368HyDViS','201844KAfqsx','package.json','keys','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','\x20|\x20AppCode:\x20','cyan','3PZjrgy','\x20api\x20pull','API\x20配置拉取异常','\x20already\x20exists','success','log','create','项目创建完成:\x20','stop','warn','5646648kLWCNp','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','项目创建失败:\x20','dirname','更新\x20package.json\x20name','description','setLogPath','start','🚀\x20Next\x20Steps:','Format\x20code','string','message','\x20Generated\x20by\x20rabetbase\x20cli\x20','\x20dataset(s),\x20generated\x20','\x20\x202.\x20Pull\x20API\x20configuration:\x20','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','existsSync','16688340zoBlWx','modelCount','parse','projectName','更新\x20package.json\x20失败','√\x20Configuration\x20file\x20created,\x20Apps:\x20','currentVersion','\x20config\x20set\x20appcode\x20<app-code>\x27','cookie','*\x20Configuring\x20AppCode\x20for\x20project\x20','resolve','belowMinimum','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','info','740345LXxWeI','length','配置应用AppCode:\x20'];a154_0x5333=function(){return _0x7417c8;};return a154_0x5333();}import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';import{logger}from'../../../utils/logger.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';export async function createApp(_0xc1f49b){const _0x1a4736=a154_0x31f7,_0x4dcf6e=await checkCliVersion();(_0x4dcf6e[_0x1a4736(0x101)]||_0x4dcf6e['belowMinimum'])&&(printCliUpgradeWarning(_0x4dcf6e),assertCliVersionSupported(_0x4dcf6e),logger['info'](_0x1a4736(0x117),_0x1a4736(0xfc),{'currentVersion':_0x4dcf6e[_0x1a4736(0xda)],'stableVersion':_0x4dcf6e['stableVersion'],'minimumVersion':_0x4dcf6e['minimumVersion'],'needsUpgrade':_0x4dcf6e[_0x1a4736(0x101)],'belowMinimum':_0x4dcf6e[_0x1a4736(0xdf)]}));if(_0xc1f49b[_0x1a4736(0xe8)]&&_0xc1f49b['appCode'])await runCreate({'projectName':_0xc1f49b['projectCode'],'appCode':_0xc1f49b[_0x1a4736(0x103)],'env':_0xc1f49b[_0x1a4736(0xf3)]},_0xc1f49b);else{if(_0xc1f49b[_0x1a4736(0xe8)]){const _0x208a8c=await selectSingleAppcode(_0xc1f49b[_0x1a4736(0xdc)]);await runCreate({'projectName':_0xc1f49b['projectCode'],'appCode':_0x208a8c||undefined,'env':_0xc1f49b[_0x1a4736(0xf3)]},_0xc1f49b);}else await guidedCreateProject(_0x2f7b14=>runCreate(_0x2f7b14,_0xc1f49b),_0xc1f49b[_0x1a4736(0xf3)],_0xc1f49b[_0x1a4736(0xdc)]);}}async function runCreate(_0x1388fe,_0x1f9fe5){const _0x4cb3e0=a154_0x31f7;if(!_0x1388fe[_0x4cb3e0(0xd7)]||_0x1388fe[_0x4cb3e0(0xd7)]['trim']()==='')throw new Error(_0x4cb3e0(0xec));const _0x5d558a=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x5d558a['test'](_0x1388fe[_0x4cb3e0(0xd7)]))throw new Error(_0x4cb3e0(0xd2));if(_0x1388fe[_0x4cb3e0(0xd7)][_0x4cb3e0(0xe3)]>0x64)throw new Error(_0x4cb3e0(0xef));const _0x1e1aef=a154_0x1c4608[_0x4cb3e0(0xde)](process['cwd'](),_0x1388fe[_0x4cb3e0(0xd7)]);if(a154_0x4c40ce[_0x4cb3e0(0xd3)](_0x1e1aef))throw new Error(_0x4cb3e0(0xeb)+_0x1388fe[_0x4cb3e0(0xd7)]+_0x4cb3e0(0x114));try{a154_0x4c40ce['accessSync'](a154_0x1c4608[_0x4cb3e0(0xc6)](_0x1e1aef),a154_0x4c40ce['constants']['W_OK']);}catch{throw new Error('Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions');}logger[_0x4cb3e0(0xc9)](_0x1e1aef),logger[_0x4cb3e0(0xe1)](_0x4cb3e0(0x117),'开始创建项目:\x20'+_0x1388fe[_0x4cb3e0(0xd7)],{'projectDir':_0x1e1aef,'appCode':_0x1388fe['appCode']}),console[_0x4cb3e0(0x116)](),console['log'](a154_0x23c5ea[_0x4cb3e0(0x102)](_0x4cb3e0(0xf9))+'Project\x20name:\x20'+a154_0x23c5ea[_0x4cb3e0(0x102)](_0x1388fe[_0x4cb3e0(0xd7)])+(_0x1388fe[_0x4cb3e0(0x103)]?_0x4cb3e0(0x10f)+a154_0x23c5ea[_0x4cb3e0(0x110)](_0x1388fe['appCode']):''));try{await runTask('Copy\x20project\x20files',()=>copyProjectTemplate(_0x1388fe[_0x4cb3e0(0xd7)])),await updatePackageJsonName(_0x1388fe[_0x4cb3e0(0xd7)]),await runTask(_0x4cb3e0(0x104),()=>installDependencies(_0x1388fe['projectName'])),await runTask(_0x4cb3e0(0xcc),()=>formatProjectCode(_0x1388fe[_0x4cb3e0(0xd7)])),await configureAppCode(_0x1388fe['projectName'],_0x1388fe[_0x4cb3e0(0x103)]||'',_0x1388fe[_0x4cb3e0(0xf3)]);let _0x46870e=![];if(_0x1388fe['appCode']){console['log'](_0x4cb3e0(0xfd));const _0x4d2345=process[_0x4cb3e0(0xee)]();try{process['chdir'](_0x1e1aef);const _0x33c793=_0x1388fe[_0x4cb3e0(0xf3)]||_0x4cb3e0(0x106);initEnv(_0x33c793);const {configArray:_0x4d2235}=await fetchModelList(_0x1388fe[_0x4cb3e0(0x103)],_0x1f9fe5[_0x4cb3e0(0xdc)]||''),_0x2cc289=DEFAULT_API_DIR,_0x226ea3=await generateApiFile(_0x4d2235,'',_0x1388fe[_0x4cb3e0(0x103)],!![],_0x33c793,_0x2cc289);console[_0x4cb3e0(0x116)]('√\x20Pulled\x20'+_0x4d2235[_0x4cb3e0(0xe3)]+_0x4cb3e0(0xd0)+_0x226ea3[_0x4cb3e0(0xd5)]+_0x4cb3e0(0xf7)),logger[_0x4cb3e0(0xe1)]('create','API\x20configuration\x20pulled:\x20'+_0x1388fe[_0x4cb3e0(0x103)]);}catch(_0x2e3af4){_0x46870e=!![],console[_0x4cb3e0(0x116)](_0x4cb3e0(0xe9)),logger[_0x4cb3e0(0x11a)](_0x4cb3e0(0x117),_0x4cb3e0(0x113),{'error':_0x2e3af4 instanceof Error?_0x2e3af4[_0x4cb3e0(0xce)]:String(_0x2e3af4)});}finally{process[_0x4cb3e0(0xff)](_0x4d2345);}}logger[_0x4cb3e0(0x115)](_0x4cb3e0(0x117),_0x4cb3e0(0x118)+_0x1388fe[_0x4cb3e0(0xd7)]),console[_0x4cb3e0(0x116)](),console[_0x4cb3e0(0x116)](a154_0x23c5ea['green']('─'[_0x4cb3e0(0xe6)](0x3c))),console[_0x4cb3e0(0x116)](a154_0x23c5ea[_0x4cb3e0(0x110)][_0x4cb3e0(0x107)](_0x4cb3e0(0xcb))),console[_0x4cb3e0(0x116)](),console[_0x4cb3e0(0x116)]('\x20\x201.\x20Start\x20project:\x20'+a154_0x23c5ea['cyan'][_0x4cb3e0(0x107)]('cd\x20'+_0x1388fe[_0x4cb3e0(0xd7)]+'\x20&&\x20'+CLI_BIN_NAME+_0x4cb3e0(0xf6))),_0x46870e&&console[_0x4cb3e0(0x116)](_0x4cb3e0(0xd1)+a154_0x23c5ea[_0x4cb3e0(0x110)][_0x4cb3e0(0x107)](CLI_BIN_NAME+_0x4cb3e0(0x112))),console[_0x4cb3e0(0x116)](a154_0x23c5ea[_0x4cb3e0(0x102)]('─'[_0x4cb3e0(0xe6)](0x3c)));}catch(_0x4b40e7){logger[_0x4cb3e0(0xf2)](_0x4cb3e0(0x117),_0x4cb3e0(0xc5)+_0x1388fe['projectName'],{'error':_0x4b40e7 instanceof Error?_0x4b40e7[_0x4cb3e0(0xce)]:String(_0x4b40e7)});try{a154_0x4c40ce['existsSync'](_0x1e1aef)&&(console[_0x4cb3e0(0x116)](_0x4cb3e0(0x105)+_0x1e1aef),a154_0x4c40ce['rmSync'](_0x1e1aef,{'recursive':!![],'force':!![]}));}catch{logger[_0x4cb3e0(0x11a)](_0x4cb3e0(0x117),'清理项目目录失败:\x20'+_0x1e1aef);}throw _0x4b40e7;}}async function runTask(_0x1fa2d6,_0x58d33f){const _0x5b9aa2=a154_0x31f7,_0x21827d=a154_0x3e6580(_0x1fa2d6+_0x5b9aa2(0xf0))[_0x5b9aa2(0xca)]();try{const _0x4ccd21=await _0x58d33f();_0x21827d[_0x5b9aa2(0x119)](),console['log'](''+a154_0x23c5ea[_0x5b9aa2(0x102)]('\x20√\x20')+_0x1fa2d6+'\x20'+a154_0x23c5ea['gray']('['+_0x4ccd21+']'));}catch(_0x20a9a5){_0x21827d['fail'](_0x1fa2d6);throw _0x20a9a5;}}async function updatePackageJsonName(_0x23ed8a){const _0x22e138=a154_0x31f7,_0x23b9c8=a154_0x1c4608[_0x22e138(0xde)](process[_0x22e138(0xee)](),_0x23ed8a),_0x349a56=a154_0x1c4608[_0x22e138(0xfa)](_0x23b9c8,_0x22e138(0x10c));try{console[_0x22e138(0x116)](_0x22e138(0x11c));const _0x139d03=getRabetbaseCliPackageRoot(),_0x4cf360=a154_0x1c4608[_0x22e138(0xfa)](_0x139d03,_0x22e138(0x10c));let _0x287f24=_0x22e138(0xed);try{const _0x1bac1f=JSON['parse'](a154_0x4c40ce[_0x22e138(0xf4)](_0x4cf360,'utf8'));_0x287f24=_0x1bac1f[_0x22e138(0x100)]||'1.0.0';}catch{}const _0x328762=a154_0x4c40ce[_0x22e138(0xf4)](_0x349a56,_0x22e138(0xfb)),_0x2783ab=JSON[_0x22e138(0xd6)](_0x328762);_0x2783ab['name']=_0x23ed8a,_0x2783ab[_0x22e138(0xc8)]=_0x23ed8a+_0x22e138(0xcf)+_0x287f24,a154_0x4c40ce[_0x22e138(0xf8)](_0x349a56,JSON[_0x22e138(0xe5)](_0x2783ab,null,0x2)+'\x0a',_0x22e138(0xfb)),console[_0x22e138(0x116)]('√\x20package.json\x20updated:\x20name='+_0x23ed8a),logger[_0x22e138(0xe1)]('create',_0x22e138(0xc7));}catch(_0x193d5a){logger[_0x22e138(0xf2)](_0x22e138(0x117),_0x22e138(0xd8));throw _0x193d5a;}}async function configureAppCode(_0x251052,_0x29ec47,_0x1a5b52){const _0x4dff74=a154_0x31f7,_0x3ecb12=a154_0x1c4608['resolve'](process[_0x4dff74(0xee)](),_0x251052),_0x3d7749=a154_0x1c4608[_0x4dff74(0xfa)](_0x3ecb12,NEW_CONFIG_NAME);try{_0x29ec47?console[_0x4dff74(0x116)](_0x4dff74(0xdd)+_0x251052+':\x20'+_0x29ec47):console['log'](_0x4dff74(0xe0)+_0x251052);const _0x23dfc3=getRabetbaseCliPackageRoot(),_0x4bca39=a154_0x1c4608['join'](_0x23dfc3,_0x4dff74(0x10c));let _0x13e953=_0x4dff74(0xed);try{const _0x1def39=JSON[_0x4dff74(0xd6)](a154_0x4c40ce[_0x4dff74(0xf4)](_0x4bca39,_0x4dff74(0xfb)));_0x13e953=_0x1def39[_0x4dff74(0x100)]||_0x4dff74(0xed);}catch{}const _0x101f37=readConfig(),_0x5c3bf2=typeof _0x101f37['env']===_0x4dff74(0xcd)?_0x101f37[_0x4dff74(0xf3)]:undefined,_0x19d9fd={};for(const _0x45a067 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x101f37[_0x45a067]!=null)_0x19d9fd[_0x45a067]=_0x101f37[_0x45a067];}const _0x2eaa75=buildCanonicalProjectConfig(_0x19d9fd,{'appCodes':_0x29ec47?[_0x29ec47]:[],'env':_0x1a5b52||_0x5c3bf2||_0x4dff74(0x106),'metadata':{'createdAt':new Date()[_0x4dff74(0xfe)](),'version':_0x13e953}});writeConfigFile(_0x3d7749,_0x2eaa75),_0x29ec47?console['log'](_0x4dff74(0xd9)+Object[_0x4dff74(0x10d)](_0x2eaa75[_0x4dff74(0x109)]||{})[_0x4dff74(0xfa)](',\x20')+_0x4dff74(0xe7)+_0x2eaa75['defaultApp']):console[_0x4dff74(0x116)](_0x4dff74(0x10e)+CLI_BIN_NAME+_0x4dff74(0xdb)),logger['info'](_0x4dff74(0x117),_0x4dff74(0xe4)+_0x29ec47);}catch(_0xc9835f){logger['error'](_0x4dff74(0x117),_0x4dff74(0xf1));}}
1
+ 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(_0x395b25,_0x339846){const _0x37fd9b=a155_0x4d9a,_0x19ef02=_0x395b25();while(!![]){try{const _0x49e2fd=-parseInt(_0x37fd9b(0x19f))/0x1+-parseInt(_0x37fd9b(0x19a))/0x2+parseInt(_0x37fd9b(0x1ba))/0x3*(parseInt(_0x37fd9b(0x197))/0x4)+-parseInt(_0x37fd9b(0x1a5))/0x5+-parseInt(_0x37fd9b(0x1ad))/0x6+parseInt(_0x37fd9b(0x1b5))/0x7+parseInt(_0x37fd9b(0x1b3))/0x8;if(_0x49e2fd===_0x339846)break;else _0x19ef02['push'](_0x19ef02['shift']());}catch(_0x292779){_0x19ef02['push'](_0x19ef02['shift']());}}}(a155_0x250c,0xf1b04));import a155_0x3bc7fd from'path';import a155_0x2ae80b from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';function a155_0x4d9a(_0x212fd4,_0x433c52){_0x212fd4=_0x212fd4-0x18a;const _0x250c95=a155_0x250c();let _0x4d9a13=_0x250c95[_0x212fd4];return _0x4d9a13;}import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{readConfig}from'../../../utils/config.js';import{getCliVersion}from'../../../utils/version.js';import{CliErrors}from'../../../errors.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';function a155_0x250c(){const _0x3c7f8a=['268945LAfcjy','toLocaleString','description','W_OK','bun\x20run\x20format','writeFile','\x0a\x20\x20cd\x20','Project\x20directory\x20\x22','7668996oLZwjx','ignore','modelCount','Cannot\x20create\x20project\x20in\x20current\x20directory.','\x20\x20√\x20Code\x20formatted','\x20dataset(s),\x20generated\x20','34509912DdScTl','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','3864287vOIGDt','cwd','readFile','\x20\x20√\x20Pulled\x20','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','2597355kkgrIl','length','test','bun','\x20api\x20pull`\x20manually\x20later.','constants','Use\x20a\x20different\x20project\x20name.','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','env','npm','name','join','bun\x20--version','...','access','Project\x20name\x20cannot\x20be\x20empty.','log','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','4tXzddz','validation','parse','3769168AWGWhx','*\x20Creating\x20project\x20','production','chdir','resolve','1525070kqqaxn','needsUpgrade','\x20\x20√\x20Project\x20template\x20created','stringify','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','\x22\x20already\x20exists.'];a155_0x250c=function(){return _0x3c7f8a;};return a155_0x250c();}import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';const execAsync=promisify(exec);export async function createProjectNonInteractive(_0x3cbcbc,_0xa5d811,_0x1091fd,_0x442f7a){const _0x1c60c8=a155_0x4d9a,_0x10443e=await checkCliVersion();(_0x10443e[_0x1c60c8(0x1a0)]||_0x10443e['belowMinimum'])&&(printCliUpgradeWarning(_0x10443e),assertCliVersionSupported(_0x10443e));if(!_0x3cbcbc||_0x3cbcbc['trim']()==='')throw CliErrors[_0x1c60c8(0x198)](_0x1c60c8(0x194));const _0x2abae2=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x2abae2[_0x1c60c8(0x1bc)](_0x3cbcbc))throw CliErrors['validation']('Project\x20name\x20contains\x20invalid\x20characters.',_0x1c60c8(0x1a3));if(_0x3cbcbc[_0x1c60c8(0x1bb)]>0x64)throw CliErrors[_0x1c60c8(0x198)](_0x1c60c8(0x196));const _0x5c668c=a155_0x3bc7fd[_0x1c60c8(0x19e)](process[_0x1c60c8(0x1b6)](),_0x3cbcbc);if(existsSync(_0x5c668c))throw CliErrors[_0x1c60c8(0x198)](_0x1c60c8(0x1ac)+_0x3cbcbc+_0x1c60c8(0x1a4),_0x1c60c8(0x18b));try{const _0x2f15d9=a155_0x3bc7fd['dirname'](_0x5c668c);await a155_0x2ae80b[_0x1c60c8(0x193)](_0x2f15d9,a155_0x2ae80b[_0x1c60c8(0x18a)][_0x1c60c8(0x1a8)]);}catch{throw CliErrors[_0x1c60c8(0x198)](_0x1c60c8(0x1b0),'Check\x20directory\x20permissions.');}try{console[_0x1c60c8(0x195)](_0x1c60c8(0x19b)+_0x3cbcbc+_0x1c60c8(0x192));const _0x56329d=getSubAppReactDemoTemplateDir();await copyDirectory(_0x56329d,_0x5c668c),console[_0x1c60c8(0x195)](_0x1c60c8(0x1a1)),await updatePackageJsonName(_0x3cbcbc),console['log']('\x20\x20√\x20package.json\x20updated'),console[_0x1c60c8(0x195)]('\x20\x20Installing\x20dependencies...'),console[_0x1c60c8(0x195)](_0x1c60c8(0x1b9)),await formatCode(_0x5c668c),console['log'](_0x1c60c8(0x1b1)),await configureProject(_0x3cbcbc,_0x1091fd,_0xa5d811),console[_0x1c60c8(0x195)]('\x20\x20√\x20Configuration\x20file\x20created'),_0x1091fd&&await pullApiConfig(_0x5c668c,_0x1091fd,_0xa5d811,_0x442f7a),console[_0x1c60c8(0x195)]('\x0a√\x20Project\x20'+_0x3cbcbc+'\x20created\x20successfully!'),console[_0x1c60c8(0x195)](_0x1c60c8(0x1ab)+_0x3cbcbc),console[_0x1c60c8(0x195)]('\x20\x20rabetbase\x20run\x20start\x0a');}catch(_0x245236){try{existsSync(_0x5c668c)&&await a155_0x2ae80b['rm'](_0x5c668c,{'recursive':!![],'force':!![]});}catch{}throw _0x245236;}}async function updatePackageJsonName(_0x29eb18){const _0xc56250=a155_0x4d9a,_0x373218=a155_0x3bc7fd[_0xc56250(0x19e)](process['cwd'](),_0x29eb18),_0x5012ca=a155_0x3bc7fd[_0xc56250(0x190)](_0x373218,'package.json'),_0x167c31=await a155_0x2ae80b[_0xc56250(0x1b7)](_0x5012ca,'utf-8'),_0x3ce19f=JSON[_0xc56250(0x199)](_0x167c31);_0x3ce19f[_0xc56250(0x18f)]=_0x29eb18,_0x3ce19f[_0xc56250(0x1a7)]=_0xc56250(0x18c),await a155_0x2ae80b[_0xc56250(0x1aa)](_0x5012ca,JSON[_0xc56250(0x1a2)](_0x3ce19f,null,0x2)+'\x0a');}function detectPackageManager(){const _0x3ab8a2=a155_0x4d9a;try{return execSync(_0x3ab8a2(0x191),{'stdio':_0x3ab8a2(0x1ae)}),_0x3ab8a2(0x1bd);}catch{return _0x3ab8a2(0x18e);}}async function formatCode(_0x1edd41){const _0x4e6855=a155_0x4d9a;try{await execAsync(_0x4e6855(0x1a9),{'cwd':_0x1edd41});}catch{}}async function configureProject(_0x5967f6,_0x27da72,_0x1a1ff3){const _0x4948f6=a155_0x4d9a,_0x33d532=a155_0x3bc7fd['resolve'](process['cwd'](),_0x5967f6),_0x16225b=a155_0x3bc7fd[_0x4948f6(0x190)](_0x33d532,NEW_CONFIG_NAME),_0x4d0e9d=readConfig(),_0xd50367=typeof _0x4d0e9d[_0x4948f6(0x18d)]==='string'?_0x4d0e9d['env']:undefined,_0x2a39de={};for(const _0x47721c of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x4d0e9d[_0x47721c]!=null)_0x2a39de[_0x47721c]=_0x4d0e9d[_0x47721c];}const _0x98c524=buildCanonicalProjectConfig(_0x2a39de,{'appCodes':_0x27da72?[_0x27da72]:[],'env':_0x1a1ff3||_0xd50367||_0x4948f6(0x19c),'metadata':{'createdAt':new Date()[_0x4948f6(0x1a6)](),'version':getCliVersion()}});writeConfigFile(_0x16225b,_0x98c524);}async function pullApiConfig(_0x22244c,_0x146a1c,_0xb0c541,_0x3db003){const _0x4826ca=a155_0x4d9a,_0x241bc1=process[_0x4826ca(0x1b6)]();try{process['chdir'](_0x22244c);const _0x4e95e5=_0xb0c541||'production';initEnv(_0x4e95e5),console[_0x4826ca(0x195)]('\x20\x20Pulling\x20API\x20configuration...');const {configArray:_0x407fd0}=await fetchModelList(_0x146a1c,_0x3db003||''),_0x23586f=await generateApiFile(_0x407fd0,'',_0x146a1c,!![],_0x4e95e5,DEFAULT_API_DIR);console['log'](_0x4826ca(0x1b8)+_0x407fd0[_0x4826ca(0x1bb)]+_0x4826ca(0x1b2)+_0x23586f[_0x4826ca(0x1af)]+'\x20model(s)');}catch(_0x37dd68){console[_0x4826ca(0x195)](_0x4826ca(0x1b4)+CLI_BIN_NAME+_0x4826ca(0x1be));}finally{process[_0x4826ca(0x19d)](_0x241bc1);}}
1
+ (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 a156_0x4139(){const _0x2c3161=['205920ziSvea','../../../../','10608633sBDVqg','templates','dirname','6602766HeLosv','24YiajGk','2448733cfuPbk','143558wAkIGT','24861dzMbgc','resolve','8nPFRyw','202805TzPnGv','join'];a156_0x4139=function(){return _0x2c3161;};return a156_0x4139();}const a156_0x4b4b9d=a156_0x32c3;(function(_0x111b4f,_0x5873d7){const _0x519b88=a156_0x32c3,_0x433c86=_0x111b4f();while(!![]){try{const _0x17414a=-parseInt(_0x519b88(0xcc))/0x1+-parseInt(_0x519b88(0xc6))/0x2+parseInt(_0x519b88(0xc7))/0x3+parseInt(_0x519b88(0xc9))/0x4*(parseInt(_0x519b88(0xca))/0x5)+-parseInt(_0x519b88(0xc3))/0x6+-parseInt(_0x519b88(0xc5))/0x7*(-parseInt(_0x519b88(0xc4))/0x8)+parseInt(_0x519b88(0xc0))/0x9;if(_0x17414a===_0x5873d7)break;else _0x433c86['push'](_0x433c86['shift']());}catch(_0x2292b6){_0x433c86['push'](_0x433c86['shift']());}}}(a156_0x4139,0xe55b3));function a156_0x32c3(_0x5cf0db,_0x3042b4){_0x5cf0db=_0x5cf0db-0xbf;const _0x413985=a156_0x4139();let _0x32c399=_0x413985[_0x5cf0db];return _0x32c399;}import a156_0x536f45 from'node:path';import{fileURLToPath}from'node:url';const __dirname=a156_0x536f45[a156_0x4b4b9d(0xc2)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x185e2f=a156_0x4b4b9d;return a156_0x536f45[_0x185e2f(0xc8)](__dirname,_0x185e2f(0xbf));}export function getSubAppReactDemoTemplateDir(){const _0x5c92cd=a156_0x4b4b9d;return a156_0x536f45[_0x5c92cd(0xcb)](getRabetbaseCliPackageRoot(),_0x5c92cd(0xc1),'projects','sub-app-react-demo');}
1
+ 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(_0x75b324,_0x40f7eb){const _0x57bc84=a157_0x22aa,_0x16cd3d=_0x75b324();while(!![]){try{const _0xdb6b3e=-parseInt(_0x57bc84(0x121))/0x1+-parseInt(_0x57bc84(0x11d))/0x2*(parseInt(_0x57bc84(0x12f))/0x3)+parseInt(_0x57bc84(0x125))/0x4*(parseInt(_0x57bc84(0x12e))/0x5)+parseInt(_0x57bc84(0x126))/0x6+parseInt(_0x57bc84(0x12d))/0x7*(-parseInt(_0x57bc84(0x130))/0x8)+parseInt(_0x57bc84(0x129))/0x9*(-parseInt(_0x57bc84(0x127))/0xa)+parseInt(_0x57bc84(0x124))/0xb;if(_0xdb6b3e===_0x40f7eb)break;else _0x16cd3d['push'](_0x16cd3d['shift']());}catch(_0x10b565){_0x16cd3d['push'](_0x16cd3d['shift']());}}}(a157_0x54dc,0xd3178));import a157_0x32d6dd from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';function a157_0x22aa(_0x117760,_0x30079c){_0x117760=_0x117760-0x11d;const _0x54dc29=a157_0x54dc();let _0x22aa59=_0x54dc29[_0x117760];return _0x22aa59;}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a157_0x54dc(){const _0x502900=['8567720qftDTl','error','9QIYecO','开始复制项目模板','info','now','7514619BzARpw','28915gUEPzh','3DqAffA','8uCiaKz','项目模板复制完成','1728516qSplac','resolve','项目模板复制失败','message','985459WvjUUr','copy','cwd','25125375ISkPtR','572xWVsoL','9201264ILJoZR'];a157_0x54dc=function(){return _0x502900;};return a157_0x54dc();}import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x1fe4a4){const _0x503ba3=a157_0x22aa,_0x52000b=Date[_0x503ba3(0x12c)](),_0x32d370=a157_0x32d6dd[_0x503ba3(0x11e)](process[_0x503ba3(0x123)](),_0x1fe4a4);try{logger[_0x503ba3(0x12b)]('copy',_0x503ba3(0x12a),{'projectCode':_0x1fe4a4,'templateDir':templateDir}),await copyDirectory(templateDir,_0x32d370);const _0x4c7be2=Date[_0x503ba3(0x12c)]()-_0x52000b;logger['success'](_0x503ba3(0x122),_0x503ba3(0x131),_0x4c7be2,{'projectCode':_0x1fe4a4});}catch(_0x53302f){const _0x3680ed=Date[_0x503ba3(0x12c)]()-_0x52000b;logger[_0x503ba3(0x128)](_0x503ba3(0x122),_0x503ba3(0x11f),{'projectCode':_0x1fe4a4,'error':_0x53302f instanceof Error?_0x53302f[_0x503ba3(0x120)]:String(_0x53302f),'duration':_0x3680ed});throw _0x53302f;}return formatElapsed(_0x52000b);}
1
+ (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 a158_0x5eef(){const _0xd7b869=['18599vnmvjb','cwd','281224wRdYTa','--write','代码格式化完成','11256odwWOS','resolve','代码格式化失败','success','format','message','63MuqINK','1632205esoYVS','610068DpqPWC','now','94380sWIyLa','175756ghTyTI','prettier','6RaEzgx','npx'];a158_0x5eef=function(){return _0xd7b869;};return a158_0x5eef();}(function(_0xa24776,_0x30f4fd){const _0x75b34=a158_0x36ba,_0x1f98d8=_0xa24776();while(!![]){try{const _0x211588=parseInt(_0x75b34(0xbf))/0x1+parseInt(_0x75b34(0xce))/0x2+parseInt(_0x75b34(0xcc))/0x3+parseInt(_0x75b34(0xc4))/0x4+-parseInt(_0x75b34(0xcb))/0x5*(parseInt(_0x75b34(0xbd))/0x6)+-parseInt(_0x75b34(0xbb))/0x7+parseInt(_0x75b34(0xc1))/0x8*(parseInt(_0x75b34(0xca))/0x9);if(_0x211588===_0x30f4fd)break;else _0x1f98d8['push'](_0x1f98d8['shift']());}catch(_0x356005){_0x1f98d8['push'](_0x1f98d8['shift']());}}}(a158_0x5eef,0x28a51));import a158_0x39804c from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a158_0x36ba(_0x25d251,_0x1025c4){_0x25d251=_0x25d251-0xbb;const _0x5eefe1=a158_0x5eef();let _0x36baff=_0x5eefe1[_0x25d251];return _0x36baff;}import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x265f6a){const _0x35ff74=a158_0x36ba,_0x3a948f=Date[_0x35ff74(0xcd)](),_0x1b29c2=a158_0x39804c[_0x35ff74(0xc5)](process[_0x35ff74(0xc0)](),_0x265f6a);try{logger['info'](_0x35ff74(0xc8),'开始格式化代码',{'projectCode':_0x265f6a}),await execa(resolveNpmBin(_0x35ff74(0xbe)),[_0x35ff74(0xbc),_0x35ff74(0xc2),'.'],{'cwd':_0x1b29c2});const _0x448f5d=Date['now']()-_0x3a948f;logger[_0x35ff74(0xc7)]('format',_0x35ff74(0xc3),_0x448f5d,{'projectCode':_0x265f6a});}catch(_0x1002e8){const _0x29123b=Date[_0x35ff74(0xcd)]()-_0x3a948f;logger['error']('format',_0x35ff74(0xc6),{'projectCode':_0x265f6a,'error':_0x1002e8 instanceof Error?_0x1002e8[_0x35ff74(0xc9)]:String(_0x1002e8),'duration':_0x29123b});throw _0x1002e8;}return formatElapsed(_0x3a948f);}
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);}