@lovrabet/rabetbase-cli 2.3.16-beta.2 → 2.3.16-beta.4

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/README.md +1 -1
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.js +1 -1
  7. package/lib/auth/constant.js +1 -1
  8. package/lib/auth/get-cookie.js +1 -1
  9. package/lib/auth/get-session-user.js +1 -1
  10. package/lib/auth/is-session-valid.js +1 -1
  11. package/lib/auth/login-success-html.js +1 -1
  12. package/lib/auth/logout.js +1 -1
  13. package/lib/cli-flags.js +1 -1
  14. package/lib/cli.js +1 -1
  15. package/lib/commands/api/generate.js +1 -1
  16. package/lib/commands/api/index.js +1 -1
  17. package/lib/commands/api/list.js +1 -1
  18. package/lib/commands/api/pull.js +1 -1
  19. package/lib/commands/api/shared.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/members-list.js +1 -1
  23. package/lib/commands/app/remote-directory.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/get.js +1 -1
  53. package/lib/commands/config/index.js +1 -1
  54. package/lib/commands/config/list.js +1 -1
  55. package/lib/commands/config/set.js +1 -1
  56. package/lib/commands/config/shared.js +1 -1
  57. package/lib/commands/data/filter.js +1 -1
  58. package/lib/commands/data/getOne.js +1 -1
  59. package/lib/commands/data/index.js +1 -1
  60. package/lib/commands/data/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.js +1 -1
  62. package/lib/commands/dataset/capability.js +1 -1
  63. package/lib/commands/dataset/delete.js +1 -1
  64. package/lib/commands/dataset/detail.js +1 -1
  65. package/lib/commands/dataset/extend-update.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/db/analysis-batching.js +1 -1
  80. package/lib/commands/db/analyze-batch-plan.js +1 -1
  81. package/lib/commands/db/analyze-cancel.js +1 -1
  82. package/lib/commands/db/analyze-start.js +1 -1
  83. package/lib/commands/db/analyze-status.js +1 -1
  84. package/lib/commands/db/create.js +1 -1
  85. package/lib/commands/db/delete.js +1 -1
  86. package/lib/commands/db/detail.js +1 -1
  87. package/lib/commands/db/diff.js +1 -1
  88. package/lib/commands/db/index.js +1 -1
  89. package/lib/commands/db/list.js +1 -1
  90. package/lib/commands/db/shared.js +1 -1
  91. package/lib/commands/db/tables.js +1 -1
  92. package/lib/commands/db/test.js +1 -1
  93. package/lib/commands/db/update.js +1 -1
  94. package/lib/commands/doctor.js +1 -1
  95. package/lib/commands/file/index.js +1 -1
  96. package/lib/commands/init/index.js +1 -1
  97. package/lib/commands/issue/index.js +1 -1
  98. package/lib/commands/issue/nudge.js +1 -1
  99. package/lib/commands/issue/report.js +1 -1
  100. package/lib/commands/issue/shared.js +1 -1
  101. package/lib/commands/kb/create.js +1 -1
  102. package/lib/commands/kb/delete.js +1 -1
  103. package/lib/commands/kb/detail.js +1 -1
  104. package/lib/commands/kb/index.js +1 -1
  105. package/lib/commands/kb/list.js +1 -1
  106. package/lib/commands/kb/shared.js +1 -1
  107. package/lib/commands/kb/update.js +1 -1
  108. package/lib/commands/logs/index.js +1 -1
  109. package/lib/commands/menu/asset-update.js +1 -1
  110. package/lib/commands/menu/delete.js +1 -1
  111. package/lib/commands/menu/external-link-create.js +1 -1
  112. package/lib/commands/menu/external-link-update.js +1 -1
  113. package/lib/commands/menu/group-create.js +1 -1
  114. package/lib/commands/menu/group-update.js +1 -1
  115. package/lib/commands/menu/index.js +1 -1
  116. package/lib/commands/menu/list.js +1 -1
  117. package/lib/commands/menu/move.js +1 -1
  118. package/lib/commands/menu/regroup-start.js +1 -1
  119. package/lib/commands/menu/rename.js +1 -1
  120. package/lib/commands/menu/shared/compare-table.js +1 -1
  121. package/lib/commands/menu/shared/delete-plan.js +1 -1
  122. package/lib/commands/menu/shared/facts.js +1 -1
  123. package/lib/commands/menu/shared/index.js +1 -1
  124. package/lib/commands/menu/shared/inquirer.js +1 -1
  125. package/lib/commands/menu/shared/local-pages.js +1 -1
  126. package/lib/commands/menu/shared/logic.js +1 -1
  127. package/lib/commands/menu/shared/mutations.js +1 -1
  128. package/lib/commands/menu/shared/service.js +1 -1
  129. package/lib/commands/menu/shared/sync-core.js +1 -1
  130. package/lib/commands/menu/shared/update-core.js +1 -1
  131. package/lib/commands/menu/shared/valid-url.js +1 -1
  132. package/lib/commands/menu/sync.js +1 -1
  133. package/lib/commands/notification/config-list.js +1 -1
  134. package/lib/commands/notification/index.js +1 -1
  135. package/lib/commands/ocr/index.js +1 -1
  136. package/lib/commands/page/generate-start.js +1 -1
  137. package/lib/commands/page/generate-status.js +1 -1
  138. package/lib/commands/page/index.js +1 -1
  139. package/lib/commands/page/pull.js +1 -1
  140. package/lib/commands/page/push.js +1 -1
  141. package/lib/commands/page/relation-audit.js +1 -1
  142. package/lib/commands/page/restore.js +1 -1
  143. package/lib/commands/page/shared.js +1 -1
  144. package/lib/commands/page/standard-page-status.js +1 -1
  145. package/lib/commands/page/sync.js +1 -1
  146. package/lib/commands/permit/index.js +1 -1
  147. package/lib/commands/permit/page-get.js +1 -1
  148. package/lib/commands/permit/page-set.js +1 -1
  149. package/lib/commands/permit/role-apis-set.js +1 -1
  150. package/lib/commands/permit/role-menus-set.js +1 -1
  151. package/lib/commands/permit/role-menus.js +1 -1
  152. package/lib/commands/permit/shared.js +1 -1
  153. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  154. package/lib/commands/project/create/format-elapsed.js +1 -1
  155. package/lib/commands/project/create/main.js +1 -1
  156. package/lib/commands/project/create/non-interactive.js +1 -1
  157. package/lib/commands/project/create/project-template-path.js +1 -1
  158. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  159. package/lib/commands/project/create/use-format-code.js +1 -1
  160. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  161. package/lib/commands/project/index.js +1 -1
  162. package/lib/commands/project/upgrade.js +1 -1
  163. package/lib/commands/registry.js +1 -1
  164. package/lib/commands/role/create.js +1 -1
  165. package/lib/commands/role/delete.js +1 -1
  166. package/lib/commands/role/detail.js +1 -1
  167. package/lib/commands/role/index.js +1 -1
  168. package/lib/commands/role/list.js +1 -1
  169. package/lib/commands/role/shared.js +1 -1
  170. package/lib/commands/role/update.js +1 -1
  171. package/lib/commands/role/user-add.js +1 -1
  172. package/lib/commands/role/user-remove.js +1 -1
  173. package/lib/commands/role/user-resolve.js +1 -1
  174. package/lib/commands/run/index.js +1 -1
  175. package/lib/commands/schema.js +1 -1
  176. package/lib/commands/sql/create.js +1 -1
  177. package/lib/commands/sql/delete.js +1 -1
  178. package/lib/commands/sql/detail.js +1 -1
  179. package/lib/commands/sql/exec.js +1 -1
  180. package/lib/commands/sql/index.js +1 -1
  181. package/lib/commands/sql/list.js +1 -1
  182. package/lib/commands/sql/pull.js +1 -1
  183. package/lib/commands/sql/push.js +1 -1
  184. package/lib/commands/sql/shared.js +1 -1
  185. package/lib/commands/sql/status.js +1 -1
  186. package/lib/commands/sql/validate.js +1 -1
  187. package/lib/commands/task/index.js +1 -1
  188. package/lib/commands/task/status.js +1 -1
  189. package/lib/commands/tenant/index.js +1 -1
  190. package/lib/commands/tenant/members-list.js +1 -1
  191. package/lib/commands/tenant/shared.js +1 -1
  192. package/lib/commands/workspace/add.js +1 -1
  193. package/lib/commands/workspace/index.js +1 -1
  194. package/lib/commands/workspace/remove.js +1 -1
  195. package/lib/config/schema.js +1 -1
  196. package/lib/constant/cdn.js +1 -1
  197. package/lib/constant/cli.js +1 -1
  198. package/lib/constant/defaults.js +1 -1
  199. package/lib/constant/domain.js +1 -1
  200. package/lib/constant/env.js +1 -1
  201. package/lib/constant/output.js +1 -1
  202. package/lib/constant/paths.js +1 -1
  203. package/lib/constant/risk.js +1 -1
  204. package/lib/context/app-resolver.js +1 -1
  205. package/lib/context/auth-resolver.js +1 -1
  206. package/lib/context/config-loader.js +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.js +1 -1
  240. package/lib/help.js +1 -1
  241. package/lib/skills/main.js +1 -1
  242. package/lib/skills/npx-skills-add.js +1 -1
  243. package/lib/skills/skill-presence.js +1 -1
  244. package/lib/telemetry/cli-command-trace.js +1 -1
  245. package/lib/telemetry/cli-help-trace.js +1 -1
  246. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  247. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  248. package/lib/telemetry/send-cli-trace-log.js +1 -1
  249. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  250. package/lib/utils/ai_config.js +1 -1
  251. package/lib/utils/apply-jq-filter.js +1 -1
  252. package/lib/utils/cdn-config.js +1 -1
  253. package/lib/utils/check-sdk-version.js +1 -1
  254. package/lib/utils/cli-version-check.js +1 -1
  255. package/lib/utils/cli-version-policy.js +1 -1
  256. package/lib/utils/config.js +1 -1
  257. package/lib/utils/copy-directory.js +1 -1
  258. package/lib/utils/entity-with-id.js +1 -1
  259. package/lib/utils/file-utils.js +1 -1
  260. package/lib/utils/guides-cdn.js +1 -1
  261. package/lib/utils/http-client.js +1 -1
  262. package/lib/utils/is-non-interactive.js +1 -1
  263. package/lib/utils/logger.js +1 -1
  264. package/lib/utils/params.js +1 -1
  265. package/lib/utils/platform.js +1 -1
  266. package/lib/utils/rules-cdn.js +1 -1
  267. package/lib/utils/sleep.js +1 -1
  268. package/lib/utils/template-replacer.js +1 -1
  269. package/lib/utils/update-notice.js +1 -1
  270. package/lib/utils/version.js +1 -1
  271. package/lib/utils/with-active-cookie.js +1 -1
  272. package/lib/utils/write-cli-side-channel.js +1 -1
  273. package/package.json +1 -1
  274. package/templates/projects/sub-app-react-demo/CHANGELOG.md +1 -1
  275. package/templates/projects/sub-app-react-demo/README.md +1 -1
  276. package/templates/projects/sub-app-react-demo/docs/quick-start.md +1 -1
  277. package/templates/projects/sub-app-react-demo/src/pages/index.tsx +1 -1
  278. package/lib/commands/project/init.js +0 -1
  279. package/lib/commands/sql/save.js +0 -1
@@ -1 +1 @@
1
- const a143_0x31cbb2=a143_0x54a1;(function(_0x408890,_0x38fcc0){const _0x2954d8=a143_0x54a1,_0x11de70=_0x408890();while(!![]){try{const _0x46e3a8=parseInt(_0x2954d8(0x1d3))/0x1+parseInt(_0x2954d8(0x1c3))/0x2*(-parseInt(_0x2954d8(0x1d2))/0x3)+parseInt(_0x2954d8(0x1bd))/0x4+-parseInt(_0x2954d8(0x1cf))/0x5+-parseInt(_0x2954d8(0x1bf))/0x6+-parseInt(_0x2954d8(0x1c4))/0x7*(parseInt(_0x2954d8(0x1cc))/0x8)+parseInt(_0x2954d8(0x1c7))/0x9;if(_0x46e3a8===_0x38fcc0)break;else _0x11de70['push'](_0x11de70['shift']());}catch(_0x2ff525){_0x11de70['push'](_0x11de70['shift']());}}}(a143_0x3ed1,0x6780e));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessStandardPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadStandardPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';function a143_0x54a1(_0x3d63d6,_0x3a77cd){_0x3d63d6=_0x3d63d6-0x1ba;const _0x3ed173=a143_0x3ed1();let _0x54a17a=_0x3ed173[_0x3d63d6];return _0x54a17a;}function a143_0x3ed1(){const _0x48d386=['code','438OUIHpb','77lSYSUg','/smartapi/lovrabet/dataset/','nextAction','17562753XeKkow','appCode','name','read','length','526544iIHdpU','source','status','1948870vFxApY','manualResolutionRequired','query-standard-page-status','7545DaMilo','618844KXxIDh','/standard-page-status?appCode=','string','page','standard-page-status','alias','1196976IuYltf','GET','4685988kPzzgp','related-pages-fallback','relatedPages'];a143_0x3ed1=function(){return _0x48d386;};return a143_0x3ed1();}export const pageStandardPageStatus={'service':a143_0x31cbb2(0x1ba),'command':a143_0x31cbb2(0x1bb),'description':'Query\x20Smart\x20List\x20Page\x20facts\x20for\x20a\x20dataset','risk':a143_0x31cbb2(0x1ca),'defaultOutputFormat':'compress','flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a143_0x31cbb2(0x1bc),'type':a143_0x31cbb2(0x1d5),'description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'}],async 'validate'(_0x18389a){validateDatasetSelector(_0x18389a);},async 'dryRun'(_0x14be6f){const _0x446877=a143_0x31cbb2,_0x31051c=await loadDatasetDetailForPage(_0x14be6f);return{'method':_0x446877(0x1be),'url':_0x446877(0x1c5)+_0x31051c[_0x446877(0x1c2)]+_0x446877(0x1d4)+encodeURIComponent(_0x14be6f[_0x446877(0x1c8)]),'description':serializeDryRunDescription({'dataset':{'id':_0x31051c['id'],'code':_0x31051c[_0x446877(0x1c2)],'name':_0x31051c[_0x446877(0x1c9)]},'action':_0x446877(0x1d1)})};},async 'execute'(_0x116bcf){const _0x5d2078=a143_0x31cbb2,_0x4d10a3=await loadDatasetDetailForPage(_0x116bcf),_0x1be010=await loadStandardPageStatusForGenerate(_0x116bcf,_0x4d10a3[_0x5d2078(0x1c2)]),_0x287e70=getUndeletedRelatedPages(_0x4d10a3),_0x581ce7=assessStandardPageState(_0x4d10a3['code'],_0x1be010,{'fallbackUndeletedPages':_0x287e70});return{'ok':!![],'data':{'datasetCode':_0x4d10a3[_0x5d2078(0x1c2)],'precheckSource':_0x1be010?.[_0x5d2078(0x1cd)]??_0x5d2078(0x1c0),'status':_0x581ce7[_0x5d2078(0x1ce)],'manualResolutionRequired':_0x581ce7[_0x5d2078(0x1d0)],'nextAction':_0x581ce7[_0x5d2078(0x1c6)],'standardPageStatus':_0x1be010,'relatedPages':{'total':_0x4d10a3[_0x5d2078(0x1c1)]['length'],'undeletedCount':_0x287e70[_0x5d2078(0x1cb)]}}};}};
1
+ const a143_0x1c972b=a143_0x448a;(function(_0x550540,_0x170226){const _0xe7c736=a143_0x448a,_0x4ccad3=_0x550540();while(!![]){try{const _0x34f179=-parseInt(_0xe7c736(0x1e1))/0x1*(parseInt(_0xe7c736(0x1f6))/0x2)+parseInt(_0xe7c736(0x1e2))/0x3*(parseInt(_0xe7c736(0x1ef))/0x4)+parseInt(_0xe7c736(0x1e9))/0x5*(-parseInt(_0xe7c736(0x1e5))/0x6)+-parseInt(_0xe7c736(0x1ea))/0x7+parseInt(_0xe7c736(0x1f3))/0x8+-parseInt(_0xe7c736(0x1ec))/0x9+-parseInt(_0xe7c736(0x1e0))/0xa*(-parseInt(_0xe7c736(0x1e4))/0xb);if(_0x34f179===_0x170226)break;else _0x4ccad3['push'](_0x4ccad3['shift']());}catch(_0xa1fdca){_0x4ccad3['push'](_0x4ccad3['shift']());}}}(a143_0x30e5,0x51b16));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessStandardPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadStandardPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';export const pageStandardPageStatus={'service':a143_0x1c972b(0x1ee),'command':'standard-page-status','description':a143_0x1c972b(0x1e3),'risk':a143_0x1c972b(0x1fb),'defaultOutputFormat':a143_0x1c972b(0x1ed),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a143_0x1c972b(0x1fa),'type':a143_0x1c972b(0x1f1),'description':a143_0x1c972b(0x1f7)}],async 'validate'(_0xd8154f){validateDatasetSelector(_0xd8154f);},async 'dryRun'(_0x1e6a5f){const _0x3733ba=a143_0x1c972b,_0x3f03d7=await loadDatasetDetailForPage(_0x1e6a5f);return{'method':_0x3733ba(0x1f5),'url':_0x3733ba(0x1f9)+_0x3f03d7[_0x3733ba(0x1eb)]+'/standard-page-status?appCode='+encodeURIComponent(_0x1e6a5f['appCode']),'description':serializeDryRunDescription({'dataset':{'id':_0x3f03d7['id'],'code':_0x3f03d7[_0x3733ba(0x1eb)],'name':_0x3f03d7[_0x3733ba(0x1e6)]},'action':_0x3733ba(0x1df)})};},async 'execute'(_0x3d2ddf){const _0x40a3e8=a143_0x1c972b,_0x14b5fc=await loadDatasetDetailForPage(_0x3d2ddf),_0x5ad7fd=await loadStandardPageStatusForGenerate(_0x3d2ddf,_0x14b5fc[_0x40a3e8(0x1eb)]),_0x5baed7=getUndeletedRelatedPages(_0x14b5fc),_0x3313df=assessStandardPageState(_0x14b5fc[_0x40a3e8(0x1eb)],_0x5ad7fd,{'fallbackUndeletedPages':_0x5baed7});return{'ok':!![],'data':{'datasetCode':_0x14b5fc[_0x40a3e8(0x1eb)],'precheckSource':_0x5ad7fd?.[_0x40a3e8(0x1f2)]??_0x40a3e8(0x1f4),'status':_0x3313df['status'],'manualResolutionRequired':_0x3313df[_0x40a3e8(0x1e7)],'nextAction':_0x3313df[_0x40a3e8(0x1e8)],'standardPageStatus':_0x5ad7fd,'relatedPages':{'total':_0x14b5fc[_0x40a3e8(0x1f8)][_0x40a3e8(0x1f0)],'undeletedCount':_0x5baed7['length']}}};}};function a143_0x448a(_0x4ad3fe,_0x566cd2){_0x4ad3fe=_0x4ad3fe-0x1df;const _0x30e53e=a143_0x30e5();let _0x448afe=_0x30e53e[_0x4ad3fe];return _0x448afe;}function a143_0x30e5(){const _0x22bb75=['length','string','source','3722560MScaGm','related-pages-fallback','GET','44SmaJAG','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','relatedPages','/smartapi/lovrabet/dataset/','alias','read','query-standard-page-status','2330080peUhBT','14395uLrKER','99357CwbGrZ','Query\x20Smart\x20List\x20Page\x20facts\x20for\x20a\x20dataset','55OvWAJV','1620726rZDigG','name','manualResolutionRequired','nextAction','5QcZGXU','3083675yfzPVc','code','5694471LxowuI','compress','page','44DBQlgI'];a143_0x30e5=function(){return _0x22bb75;};return a143_0x30e5();}
@@ -1 +1 @@
1
- function a144_0x58bf(){const _0x49f707=['42rYNMUI','undeletedPages','failedPages','4869912ALxlsR','4IPOclm','relatedPages','string','dataset','\x20undeleted\x20related\x20page(s)\x20found','appCode','640368jdpLcc','/smartapi/lovrabet/dataset/','2638480ilIMdK','isArray','部分页面同步失败','18DCsXNF','compress','write','code','22IyExWB','10WVOXWd','POST','415257TOJPKU','1293909wSnAXU','length','1050234EgKJXZ','fieldCount','page','sync','481322mJuRSL','/sync-to-pages'];a144_0x58bf=function(){return _0x49f707;};return a144_0x58bf();}const a144_0x7bfc90=a144_0xfc48;(function(_0x15e047,_0x8d040b){const _0x472135=a144_0xfc48,_0x4a4341=_0x15e047();while(!![]){try{const _0x497180=-parseInt(_0x472135(0x8e))/0x1+-parseInt(_0x472135(0x76))/0x2+parseInt(_0x472135(0x8f))/0x3*(parseInt(_0x472135(0x7c))/0x4)+-parseInt(_0x472135(0x8c))/0x5*(parseInt(_0x472135(0x91))/0x6)+parseInt(_0x472135(0x78))/0x7*(-parseInt(_0x472135(0x82))/0x8)+-parseInt(_0x472135(0x87))/0x9*(-parseInt(_0x472135(0x84))/0xa)+-parseInt(_0x472135(0x8b))/0xb*(-parseInt(_0x472135(0x7b))/0xc);if(_0x497180===_0x8d040b)break;else _0x4a4341['push'](_0x4a4341['shift']());}catch(_0xd80caa){_0x4a4341['push'](_0x4a4341['shift']());}}}(a144_0x58bf,0x456db));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_0xfc48(_0x5cb02d,_0x22f1a8){_0x5cb02d=_0x5cb02d-0x73;const _0x58bf16=a144_0x58bf();let _0xfc48e1=_0x58bf16[_0x5cb02d];return _0xfc48e1;}export const pageSync={'service':a144_0x7bfc90(0x74),'command':a144_0x7bfc90(0x75),'description':'Sync\x20dataset\x20changes\x20to\x20related\x20Smart\x20List\x20Pages','risk':a144_0x7bfc90(0x89),'defaultOutputFormat':a144_0x7bfc90(0x88),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':'alias','type':a144_0x7bfc90(0x7e),'description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'}],async 'validate'(_0x267a8f){validateDatasetSelector(_0x267a8f);},async 'dryRun'(_0x1745f0){const _0x56e3e7=a144_0x7bfc90,_0x451d29=await prepare(_0x1745f0);return{'method':_0x56e3e7(0x8d),'url':_0x56e3e7(0x83)+_0x451d29[_0x56e3e7(0x7f)][_0x56e3e7(0x8a)]+_0x56e3e7(0x77),'body':{'appCode':_0x1745f0[_0x56e3e7(0x81)]},'description':serializeDryRunDescription({'dataset':{'id':_0x451d29['dataset']['id'],'code':_0x451d29[_0x56e3e7(0x7f)][_0x56e3e7(0x8a)],'name':_0x451d29[_0x56e3e7(0x7f)]['name'],'fieldCount':_0x451d29[_0x56e3e7(0x7f)][_0x56e3e7(0x73)]},'relatedPages':{'total':_0x451d29[_0x56e3e7(0x7f)][_0x56e3e7(0x7d)][_0x56e3e7(0x90)],'undeletedCount':_0x451d29[_0x56e3e7(0x79)]['length']},'action':'sync','reason':_0x451d29['undeletedPages'][_0x56e3e7(0x90)]+_0x56e3e7(0x80)})};},async 'execute'(_0x3c27a5){const _0x5ca8ee=a144_0x7bfc90,_0x4551ae=await prepare(_0x3c27a5),_0x396280=await syncStandardPages(_0x3c27a5[_0x5ca8ee(0x81)],_0x4551ae[_0x5ca8ee(0x7f)][_0x5ca8ee(0x8a)]),_0x3be65e=Array[_0x5ca8ee(0x85)](_0x396280[_0x5ca8ee(0x7a)])&&_0x396280[_0x5ca8ee(0x7a)][_0x5ca8ee(0x90)]>0x0,_0x2cc75f=_0x3be65e?_0x5ca8ee(0x86):'同步成功';return{'ok':!![],'message':_0x2cc75f,'data':{'datasetCode':_0x4551ae[_0x5ca8ee(0x7f)][_0x5ca8ee(0x8a)],..._0x396280}};}};async function prepare(_0x552ca3){const _0x4af294=a144_0x7bfc90,_0x34e616=await loadDatasetDetailForPage(_0x552ca3);return prepareDatasetAction(_0x34e616,_0x4af294(0x75));}
1
+ const a144_0x392ce6=a144_0x5620;(function(_0x29384b,_0x2a2288){const _0x706645=a144_0x5620,_0x55e385=_0x29384b();while(!![]){try{const _0x2f5cf8=parseInt(_0x706645(0xfe))/0x1*(parseInt(_0x706645(0x10b))/0x2)+-parseInt(_0x706645(0x118))/0x3+parseInt(_0x706645(0x102))/0x4*(-parseInt(_0x706645(0xfb))/0x5)+-parseInt(_0x706645(0x117))/0x6*(-parseInt(_0x706645(0x114))/0x7)+parseInt(_0x706645(0x116))/0x8*(-parseInt(_0x706645(0x112))/0x9)+-parseInt(_0x706645(0x10a))/0xa*(parseInt(_0x706645(0x10f))/0xb)+parseInt(_0x706645(0x110))/0xc*(parseInt(_0x706645(0x113))/0xd);if(_0x2f5cf8===_0x2a2288)break;else _0x55e385['push'](_0x55e385['shift']());}catch(_0x3473b4){_0x55e385['push'](_0x55e385['shift']());}}}(a144_0x4c71,0x38052));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{loadDatasetDetailForPage,prepareDatasetAction,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';function a144_0x5620(_0x193b11,_0x4ddf97){_0x193b11=_0x193b11-0xfa;const _0x4c711e=a144_0x4c71();let _0x5620b7=_0x4c711e[_0x193b11];return _0x5620b7;}import{syncStandardPages}from'../../core/api-client.js';export const pageSync={'service':a144_0x392ce6(0x10d),'command':'sync','description':'Sync\x20dataset\x20changes\x20to\x20related\x20Smart\x20List\x20Pages','risk':a144_0x392ce6(0x105),'defaultOutputFormat':a144_0x392ce6(0xff),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a144_0x392ce6(0x103),'type':'string','description':a144_0x392ce6(0x109)}],async 'validate'(_0x25d35f){validateDatasetSelector(_0x25d35f);},async 'dryRun'(_0x31f496){const _0x19f537=a144_0x392ce6,_0x49eb08=await prepare(_0x31f496);return{'method':'POST','url':_0x19f537(0x119)+_0x49eb08[_0x19f537(0x104)]['code']+_0x19f537(0x11a),'body':{'appCode':_0x31f496[_0x19f537(0x111)]},'description':serializeDryRunDescription({'dataset':{'id':_0x49eb08[_0x19f537(0x104)]['id'],'code':_0x49eb08[_0x19f537(0x104)][_0x19f537(0x10c)],'name':_0x49eb08[_0x19f537(0x104)][_0x19f537(0x101)],'fieldCount':_0x49eb08[_0x19f537(0x104)]['fieldCount']},'relatedPages':{'total':_0x49eb08[_0x19f537(0x104)][_0x19f537(0x107)][_0x19f537(0x108)],'undeletedCount':_0x49eb08[_0x19f537(0x100)][_0x19f537(0x108)]},'action':_0x19f537(0x115),'reason':_0x49eb08[_0x19f537(0x100)][_0x19f537(0x108)]+_0x19f537(0x106)})};},async 'execute'(_0x41494b){const _0x2ac440=a144_0x392ce6,_0xf2b400=await prepare(_0x41494b),_0x47a284=await syncStandardPages(_0x41494b['appCode'],_0xf2b400[_0x2ac440(0x104)]['code']),_0x4baccc=Array[_0x2ac440(0xfa)](_0x47a284[_0x2ac440(0xfd)])&&_0x47a284['failedPages'][_0x2ac440(0x108)]>0x0,_0x361ca1=_0x4baccc?_0x2ac440(0xfc):_0x2ac440(0x10e);return{'ok':!![],'message':_0x361ca1,'data':{'datasetCode':_0xf2b400[_0x2ac440(0x104)][_0x2ac440(0x10c)],..._0x47a284}};}};function a144_0x4c71(){const _0x1e577a=['1219012AAYnPu','alias','dataset','write','\x20undeleted\x20related\x20page(s)\x20found','relatedPages','length','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','498990HOlZnU','407806oYjZeu','code','page','同步成功','55mvheXI','10603140oIYvXP','appCode','45eRzZqD','13ZifwqS','908005Zlolnh','sync','353144zqACRU','12XQYqSS','1027521bXgbKE','/smartapi/lovrabet/dataset/','/sync-to-pages','isArray','5gcKrJk','部分页面同步失败','failedPages','1rNAtgI','compress','undeletedPages','name'];a144_0x4c71=function(){return _0x1e577a;};return a144_0x4c71();}async function prepare(_0x276012){const _0x254df8=await loadDatasetDetailForPage(_0x276012);return prepareDatasetAction(_0x254df8,'sync');}
@@ -1 +1 @@
1
- (function(_0x523c2b,_0x2d3b8a){const _0x46037e=a145_0x34b7,_0x5d5532=_0x523c2b();while(!![]){try{const _0x552827=-parseInt(_0x46037e(0xf6))/0x1*(-parseInt(_0x46037e(0xf5))/0x2)+parseInt(_0x46037e(0xf4))/0x3+parseInt(_0x46037e(0xf2))/0x4+parseInt(_0x46037e(0xf3))/0x5+-parseInt(_0x46037e(0xf7))/0x6*(parseInt(_0x46037e(0xf9))/0x7)+parseInt(_0x46037e(0xf1))/0x8+-parseInt(_0x46037e(0xf0))/0x9*(parseInt(_0x46037e(0xf8))/0xa);if(_0x552827===_0x2d3b8a)break;else _0x5d5532['push'](_0x5d5532['shift']());}catch(_0x346a23){_0x5d5532['push'](_0x5d5532['shift']());}}}(a145_0x2251,0x76296));import{permitPageGet}from'../../commands/permit/page-get.js';function a145_0x2251(){const _0x4ba26e=['903158GfBusn','11910aquqkq','4054970kzBnyr','2177FtpyKA','36chJLBm','5906896DBvMVX','815100uxTKso','2943710pLQpQQ','867828TCANrs','2LgiiFI'];a145_0x2251=function(){return _0x4ba26e;};return a145_0x2251();}import{permitPageSet}from'../../commands/permit/page-set.js';function a145_0x34b7(_0x56e7f4,_0x44135a){_0x56e7f4=_0x56e7f4-0xf0;const _0x2251c6=a145_0x2251();let _0x34b71d=_0x2251c6[_0x56e7f4];return _0x34b71d;}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(_0x26fc70,_0x41e9c1){const _0x2545cc=a145_0x4bf6,_0x527887=_0x26fc70();while(!![]){try{const _0x5f2b08=-parseInt(_0x2545cc(0x1d8))/0x1*(-parseInt(_0x2545cc(0x1d9))/0x2)+-parseInt(_0x2545cc(0x1da))/0x3*(parseInt(_0x2545cc(0x1d7))/0x4)+-parseInt(_0x2545cc(0x1dd))/0x5*(parseInt(_0x2545cc(0x1d5))/0x6)+-parseInt(_0x2545cc(0x1db))/0x7+parseInt(_0x2545cc(0x1d6))/0x8+parseInt(_0x2545cc(0x1dc))/0x9+parseInt(_0x2545cc(0x1d4))/0xa;if(_0x5f2b08===_0x41e9c1)break;else _0x527887['push'](_0x527887['shift']());}catch(_0x552091){_0x527887['push'](_0x527887['shift']());}}}(a145_0x4870,0x36184));import{permitPageGet}from'../../commands/permit/page-get.js';import{permitPageSet}from'../../commands/permit/page-set.js';import{permitRoleMenus}from'../../commands/permit/role-menus.js';import{permitRoleMenusSet}from'../../commands/permit/role-menus-set.js';import{permitRoleApisSet}from'../../commands/permit/role-apis-set.js';export const permitDefinitions=[permitPageGet,permitPageSet,permitRoleMenus,permitRoleMenusSet,permitRoleApisSet];function a145_0x4bf6(_0x410323,_0x4570c3){_0x410323=_0x410323-0x1d4;const _0x4870f1=a145_0x4870();let _0x4bf6d2=_0x4870f1[_0x410323];return _0x4bf6d2;}function a145_0x4870(){const _0xdda53c=['1306836IOYhgY','10975kqcora','181800RQxvVX','12cHFfZw','1190240RfVlCf','284CNSbel','3921MBuyDL','154gVhWDO','6087lbXfCa','1708420GbcvqK'];a145_0x4870=function(){return _0xdda53c;};return a145_0x4870();}
@@ -1 +1 @@
1
- function a146_0xb4e2(){const _0x36553e=['430351EBQVCM','4895740aGGGhF','931382ojShEa','1506JpTAbw','4sterxl','2022831thTnjr','menu-id','426078aESxSS','Page\x20permit\x20for\x20menu\x20','permit','page-get','4734715tgsFuA','16OiVuMb','8407utiVyF'];a146_0xb4e2=function(){return _0x36553e;};return a146_0xb4e2();}const a146_0x592c29=a146_0x2ba8;(function(_0x2cbee6,_0x58666b){const _0x112b65=a146_0x2ba8,_0x57e9fa=_0x2cbee6();while(!![]){try{const _0x5f3619=parseInt(_0x112b65(0x199))/0x1+-parseInt(_0x112b65(0x18d))/0x2+-parseInt(_0x112b65(0x190))/0x3*(parseInt(_0x112b65(0x18f))/0x4)+parseInt(_0x112b65(0x196))/0x5+-parseInt(_0x112b65(0x18e))/0x6*(parseInt(_0x112b65(0x198))/0x7)+-parseInt(_0x112b65(0x197))/0x8*(-parseInt(_0x112b65(0x192))/0x9)+parseInt(_0x112b65(0x18c))/0xa;if(_0x5f3619===_0x58666b)break;else _0x57e9fa['push'](_0x57e9fa['shift']());}catch(_0x2ed9eb){_0x57e9fa['push'](_0x57e9fa['shift']());}}}(a146_0xb4e2,0x7efc5));import{getPagePermit}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{MENU_ID_FLAG,projectPagePermit}from'../../commands/permit/shared.js';function a146_0x2ba8(_0x287875,_0x113cc3){_0x287875=_0x287875-0x18c;const _0xb4e263=a146_0xb4e2();let _0x2ba8ce=_0xb4e263[_0x287875];return _0x2ba8ce;}export const permitPageGet={'service':a146_0x592c29(0x194),'command':a146_0x592c29(0x195),'description':'Show\x20the\x20page\x20permission\x20snapshot\x20for\x20a\x20menu','risk':'read','flags':[MENU_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x17d42d){const _0x2fd7be=a146_0x592c29,_0x2bc7df=_0x17d42d['num'](_0x2fd7be(0x191)),_0x121a8e=await getPagePermit(_0x2bc7df);return{'ok':!![],'data':{'page':projectPagePermit(_0x121a8e)},'message':_0x2fd7be(0x193)+_0x2bc7df};}};
1
+ const a146_0x3fea11=a146_0x14d7;(function(_0x17986b,_0x4591cc){const _0x245d80=a146_0x14d7,_0x4ca289=_0x17986b();while(!![]){try{const _0x4eaf5c=-parseInt(_0x245d80(0xfc))/0x1*(parseInt(_0x245d80(0xf2))/0x2)+-parseInt(_0x245d80(0xfa))/0x3*(-parseInt(_0x245d80(0xf6))/0x4)+-parseInt(_0x245d80(0xf1))/0x5*(-parseInt(_0x245d80(0xf3))/0x6)+-parseInt(_0x245d80(0xf0))/0x7*(parseInt(_0x245d80(0xf8))/0x8)+-parseInt(_0x245d80(0xec))/0x9*(-parseInt(_0x245d80(0xef))/0xa)+-parseInt(_0x245d80(0xf9))/0xb+parseInt(_0x245d80(0xee))/0xc;if(_0x4eaf5c===_0x4591cc)break;else _0x4ca289['push'](_0x4ca289['shift']());}catch(_0x5865ab){_0x4ca289['push'](_0x4ca289['shift']());}}}(a146_0x41d2,0x71350));import{getPagePermit}from'../../core/api-client.js';function a146_0x41d2(){const _0x3b8b91=['5209416fHsrkc','2630lXcilF','1085AOWTAj','5bpYLye','18338sJdoTZ','4524918QxWbYv','menu-id','num','16992OhNrfj','Page\x20permit\x20for\x20menu\x20','45688FUhNVF','1498288GXzzaY','39plshRi','read','5kqfynw','permit','9837oHwyQz','page-get'];a146_0x41d2=function(){return _0x3b8b91;};return a146_0x41d2();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a146_0x14d7(_0x50d407,_0x1697c3){_0x50d407=_0x50d407-0xeb;const _0x41d26a=a146_0x41d2();let _0x14d7e5=_0x41d26a[_0x50d407];return _0x14d7e5;}import{MENU_ID_FLAG,projectPagePermit}from'../../commands/permit/shared.js';export const permitPageGet={'service':a146_0x3fea11(0xeb),'command':a146_0x3fea11(0xed),'description':'Show\x20the\x20page\x20permission\x20snapshot\x20for\x20a\x20menu','risk':a146_0x3fea11(0xfb),'flags':[MENU_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x4a6828){const _0x3b3d01=a146_0x3fea11,_0x425ecf=_0x4a6828[_0x3b3d01(0xf5)](_0x3b3d01(0xf4)),_0x4e19bc=await getPagePermit(_0x425ecf);return{'ok':!![],'data':{'page':projectPagePermit(_0x4e19bc)},'message':_0x3b3d01(0xf7)+_0x425ecf};}};
@@ -1 +1 @@
1
- const a147_0x15fcc4=a147_0x46ba;(function(_0x273f17,_0x17fd8b){const _0x484bb3=a147_0x46ba,_0x362ca6=_0x273f17();while(!![]){try{const _0x5818b9=parseInt(_0x484bb3(0xad))/0x1*(-parseInt(_0x484bb3(0xa7))/0x2)+-parseInt(_0x484bb3(0x90))/0x3*(parseInt(_0x484bb3(0xa6))/0x4)+parseInt(_0x484bb3(0x89))/0x5*(parseInt(_0x484bb3(0x8d))/0x6)+-parseInt(_0x484bb3(0x91))/0x7*(-parseInt(_0x484bb3(0x9f))/0x8)+parseInt(_0x484bb3(0xab))/0x9+-parseInt(_0x484bb3(0x9c))/0xa+-parseInt(_0x484bb3(0xa0))/0xb*(parseInt(_0x484bb3(0x95))/0xc);if(_0x5818b9===_0x17fd8b)break;else _0x362ca6['push'](_0x362ca6['shift']());}catch(_0x421342){_0x362ca6['push'](_0x362ca6['shift']());}}}(a147_0x3426,0xb9743));import{getPagePermit,savePagePermit}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a147_0x46ba(_0x7d5324,_0x318430){_0x7d5324=_0x7d5324-0x89;const _0x34263b=a147_0x3426();let _0x46baec=_0x34263b[_0x7d5324];return _0x46baec;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';function a147_0x3426(){const _0xda16b9=['Updated\x20page\x20permit\x20for\x20menu\x20','page-set','Pass\x20at\x20least\x20one\x20role,\x20or\x20omit\x20the\x20flag.\x20Clearing\x20permissions\x20is\x20not\x20supported\x20by\x20this\x20command.','4404goQrWW','34678uaAWeQ','rolePermit','push','permit','5085720CvjMwq','menu-id','17UOlSGQ','15LJcVIJ','/smartapi/permit/page/save','This\x20page\x20has\x20no\x20\x22','Nothing\x20to\x20set.','2489262cqnQVY','spec','menuId','1284kxezVq','7OfoWLt','appCode','POST','\x20cannot\x20be\x20empty.','12504xUlyqJ','map','key','join','flag','length','label','768400Xarebm','Pass\x20at\x20least\x20one\x20of:\x20','num','3801992cxaZRX','7205UHcxgy','Set\x20page\x20permissions\x20for\x20a\x20menu\x20(menu/create/update/delete/detail/export/row\x20roles);\x20requires\x20--yes','\x22\x20permission\x20slot\x20('];a147_0x3426=function(){return _0xda16b9;};return a147_0x3426();}import{MENU_ID_FLAG,PAGE_SET_ROLE_FLAGS,PAGE_SLOT_SPECS,projectPageSlot,resolvePermitRoles,splitList}from'../../commands/permit/shared.js';const SAVE_PATH=a147_0x15fcc4(0x8a);function collectRequestedSlots(_0x179fb4){const _0x1ae054=a147_0x15fcc4,_0x35a859=[];for(const _0x20fdea of PAGE_SLOT_SPECS){const _0x29c82b=_0x179fb4[_0x1ae054(0x99)](_0x20fdea[_0x1ae054(0x99)]);if(_0x29c82b===undefined||_0x29c82b===null)continue;const _0x4b7749=splitList(String(_0x29c82b));if(_0x4b7749[_0x1ae054(0x9a)]===0x0)throw CliErrors['validation']('--'+_0x20fdea[_0x1ae054(0x99)]+_0x1ae054(0x94),_0x1ae054(0xa5));_0x35a859[_0x1ae054(0xa9)]({'spec':_0x20fdea,'refs':_0x4b7749});}return _0x35a859;}async function buildPlan(_0x46346a,_0x16820a){const _0x53f5e1=a147_0x15fcc4,_0x35c53a=_0x46346a[_0x53f5e1(0x9e)](_0x53f5e1(0xac)),_0x491a10=collectRequestedSlots(_0x46346a);if(_0x491a10[_0x53f5e1(0x9a)]===0x0)throw CliErrors['validation'](_0x53f5e1(0x8c),'Pass\x20at\x20least\x20one\x20of:\x20'+PAGE_SLOT_SPECS[_0x53f5e1(0x96)](_0x330b95=>'--'+_0x330b95[_0x53f5e1(0x99)])[_0x53f5e1(0x98)](',\x20')+'.');const _0x184260=await getPagePermit(_0x35c53a),_0x24ef5e={},_0x17a81d={},_0x101c43=[];for(const {spec:_0x1ef39a,refs:_0x4d35d5}of _0x491a10){const _0x1f9e9e=_0x184260[_0x1ef39a[_0x53f5e1(0x97)]];if(!_0x1f9e9e)throw CliErrors['validation'](_0x53f5e1(0x8b)+_0x1ef39a[_0x53f5e1(0x9b)]+_0x53f5e1(0xa2)+_0x1ef39a[_0x53f5e1(0x97)]+').','Only\x20slots\x20present\x20in\x20`permit\x20page-get`\x20can\x20be\x20set.');_0x24ef5e[_0x1ef39a['key']]=projectPageSlot(_0x1f9e9e);const _0x238152=await resolvePermitRoles(_0x46346a[_0x53f5e1(0x92)],_0x4d35d5,{'allowSelf':_0x1ef39a['allowSelf'],'label':_0x1ef39a['label']});_0x1f9e9e[_0x53f5e1(0xa8)]=_0x238152,_0x17a81d[_0x1ef39a[_0x53f5e1(0x97)]]=projectPageSlot(_0x1f9e9e);}const _0x535913={'operation':_0x53f5e1(0xa4),'selector':{'appCode':_0x46346a[_0x53f5e1(0x92)],'menuId':_0x35c53a,'slots':_0x491a10['map'](_0x4a06b4=>_0x4a06b4[_0x53f5e1(0x8e)]['key'])},'before':_0x24ef5e,'after':_0x17a81d,'dryRun':_0x16820a,'backend':{'method':_0x53f5e1(0x93),'path':SAVE_PATH},'warnings':_0x101c43};return{'page':_0x184260,'mutation':_0x535913};}export const permitPageSet={'service':a147_0x15fcc4(0xaa),'command':a147_0x15fcc4(0xa4),'description':a147_0x15fcc4(0xa1),'risk':'high-risk-write','flags':[MENU_ID_FLAG,...PAGE_SET_ROLE_FLAGS,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x560e07){const _0x5d03aa=a147_0x15fcc4,_0x2c8f15=collectRequestedSlots(_0x560e07);if(_0x2c8f15[_0x5d03aa(0x9a)]===0x0)throw CliErrors['validation'](_0x5d03aa(0x8c),_0x5d03aa(0x9d)+PAGE_SLOT_SPECS[_0x5d03aa(0x96)](_0x5ddd38=>'--'+_0x5ddd38['flag'])[_0x5d03aa(0x98)](',\x20')+'.');},async 'dryRun'(_0x540147){const {mutation:_0x495bed}=await buildPlan(_0x540147,!![]);return asDryRunResult(_0x495bed,{'method':'POST','url':SAVE_PATH});},async 'execute'(_0x222bd6){const _0x15818a=a147_0x15fcc4,{page:_0x30e99d,mutation:_0x274459}=await buildPlan(_0x222bd6,![]);return await savePagePermit(_0x30e99d),{'ok':!![],'data':_0x274459,'message':_0x15818a(0xa3)+_0x274459['selector'][_0x15818a(0x8f)]};}};
1
+ function a147_0xd585(_0x179268,_0x10ce24){_0x179268=_0x179268-0xcc;const _0x1b2f31=a147_0x1b2f();let _0xd5854c=_0x1b2f31[_0x179268];return _0xd5854c;}const a147_0x387bd4=a147_0xd585;(function(_0x4910cb,_0x2d8b59){const _0x50d85f=a147_0xd585,_0x536fea=_0x4910cb();while(!![]){try{const _0x22c678=parseInt(_0x50d85f(0xcf))/0x1*(-parseInt(_0x50d85f(0xe4))/0x2)+-parseInt(_0x50d85f(0xd1))/0x3*(-parseInt(_0x50d85f(0xef))/0x4)+parseInt(_0x50d85f(0xdf))/0x5+-parseInt(_0x50d85f(0xe7))/0x6*(parseInt(_0x50d85f(0xd4))/0x7)+parseInt(_0x50d85f(0xe3))/0x8*(parseInt(_0x50d85f(0xd6))/0x9)+-parseInt(_0x50d85f(0xe6))/0xa*(parseInt(_0x50d85f(0xda))/0xb)+parseInt(_0x50d85f(0xd9))/0xc;if(_0x22c678===_0x2d8b59)break;else _0x536fea['push'](_0x536fea['shift']());}catch(_0x1dad6e){_0x536fea['push'](_0x536fea['shift']());}}}(a147_0x1b2f,0x8cc41));import{getPagePermit,savePagePermit}from'../../core/api-client.js';function a147_0x1b2f(){const _0x410c61=['spec','4jmNtvF','permit','\x22\x20permission\x20slot\x20(','appCode','num','165pgfkxC','page-set','580332VNMqIj','allowSelf','POST','14KcOhmR','Nothing\x20to\x20set.','693WZrkUR','Pass\x20at\x20least\x20one\x20role,\x20or\x20omit\x20the\x20flag.\x20Clearing\x20permissions\x20is\x20not\x20supported\x20by\x20this\x20command.','\x20cannot\x20be\x20empty.','4401936qyjPYg','22yVXQem','high-risk-write','label','Only\x20slots\x20present\x20in\x20`permit\x20page-get`\x20can\x20be\x20set.','flag','559840wvphGM','map','join','push','61760XJwaqt','2978vudisN','/smartapi/permit/page/save','838910dVhXQf','829908KrTUCi','key','Set\x20page\x20permissions\x20for\x20a\x20menu\x20(menu/create/update/delete/detail/export/row\x20roles);\x20requires\x20--yes','This\x20page\x20has\x20no\x20\x22','length','validation','Pass\x20at\x20least\x20one\x20of:\x20'];a147_0x1b2f=function(){return _0x410c61;};return a147_0x1b2f();}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{MENU_ID_FLAG,PAGE_SET_ROLE_FLAGS,PAGE_SLOT_SPECS,projectPageSlot,resolvePermitRoles,splitList}from'../../commands/permit/shared.js';const SAVE_PATH=a147_0x387bd4(0xe5);function collectRequestedSlots(_0x3cdb6d){const _0x5bbe28=a147_0x387bd4,_0x186c70=[];for(const _0x343e60 of PAGE_SLOT_SPECS){const _0x2489d9=_0x3cdb6d['flag'](_0x343e60[_0x5bbe28(0xde)]);if(_0x2489d9===undefined||_0x2489d9===null)continue;const _0x5b0633=splitList(String(_0x2489d9));if(_0x5b0633[_0x5bbe28(0xeb)]===0x0)throw CliErrors['validation']('--'+_0x343e60['flag']+_0x5bbe28(0xd8),_0x5bbe28(0xd7));_0x186c70[_0x5bbe28(0xe2)]({'spec':_0x343e60,'refs':_0x5b0633});}return _0x186c70;}async function buildPlan(_0x16df30,_0x4c8c1a){const _0x3dda94=a147_0x387bd4,_0x40ea93=_0x16df30[_0x3dda94(0xce)]('menu-id'),_0x258093=collectRequestedSlots(_0x16df30);if(_0x258093['length']===0x0)throw CliErrors[_0x3dda94(0xec)](_0x3dda94(0xd5),_0x3dda94(0xed)+PAGE_SLOT_SPECS[_0x3dda94(0xe0)](_0xf35be6=>'--'+_0xf35be6['flag'])['join'](',\x20')+'.');const _0x466332=await getPagePermit(_0x40ea93),_0x224eb7={},_0x56df5a={},_0x13abc3=[];for(const {spec:_0x3771f6,refs:_0x42d264}of _0x258093){const _0xf0f1dc=_0x466332[_0x3771f6[_0x3dda94(0xe8)]];if(!_0xf0f1dc)throw CliErrors['validation'](_0x3dda94(0xea)+_0x3771f6[_0x3dda94(0xdc)]+_0x3dda94(0xcc)+_0x3771f6[_0x3dda94(0xe8)]+').',_0x3dda94(0xdd));_0x224eb7[_0x3771f6['key']]=projectPageSlot(_0xf0f1dc);const _0x38f653=await resolvePermitRoles(_0x16df30[_0x3dda94(0xcd)],_0x42d264,{'allowSelf':_0x3771f6[_0x3dda94(0xd2)],'label':_0x3771f6[_0x3dda94(0xdc)]});_0xf0f1dc['rolePermit']=_0x38f653,_0x56df5a[_0x3771f6[_0x3dda94(0xe8)]]=projectPageSlot(_0xf0f1dc);}const _0x448457={'operation':'page-set','selector':{'appCode':_0x16df30[_0x3dda94(0xcd)],'menuId':_0x40ea93,'slots':_0x258093[_0x3dda94(0xe0)](_0x29f2c0=>_0x29f2c0[_0x3dda94(0xee)]['key'])},'before':_0x224eb7,'after':_0x56df5a,'dryRun':_0x4c8c1a,'backend':{'method':_0x3dda94(0xd3),'path':SAVE_PATH},'warnings':_0x13abc3};return{'page':_0x466332,'mutation':_0x448457};}export const permitPageSet={'service':a147_0x387bd4(0xf0),'command':a147_0x387bd4(0xd0),'description':a147_0x387bd4(0xe9),'risk':a147_0x387bd4(0xdb),'flags':[MENU_ID_FLAG,...PAGE_SET_ROLE_FLAGS,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x573c05){const _0x189fb4=a147_0x387bd4,_0x41e08d=collectRequestedSlots(_0x573c05);if(_0x41e08d[_0x189fb4(0xeb)]===0x0)throw CliErrors['validation'](_0x189fb4(0xd5),_0x189fb4(0xed)+PAGE_SLOT_SPECS['map'](_0xa7bbbc=>'--'+_0xa7bbbc[_0x189fb4(0xde)])[_0x189fb4(0xe1)](',\x20')+'.');},async 'dryRun'(_0x164b72){const {mutation:_0x1d914b}=await buildPlan(_0x164b72,!![]);return asDryRunResult(_0x1d914b,{'method':'POST','url':SAVE_PATH});},async 'execute'(_0x11cbd3){const {page:_0x3cc5df,mutation:_0x40fc87}=await buildPlan(_0x11cbd3,![]);return await savePagePermit(_0x3cc5df),{'ok':!![],'data':_0x40fc87,'message':'Updated\x20page\x20permit\x20for\x20menu\x20'+_0x40fc87['selector']['menuId']};}};
@@ -1 +1 @@
1
- const a148_0x140db9=a148_0x247e;(function(_0x42c537,_0x59bce8){const _0x4e0444=a148_0x247e,_0x3db430=_0x42c537();while(!![]){try{const _0x2e8043=parseInt(_0x4e0444(0x1c3))/0x1*(parseInt(_0x4e0444(0x1be))/0x2)+-parseInt(_0x4e0444(0x1af))/0x3+-parseInt(_0x4e0444(0x1b8))/0x4+-parseInt(_0x4e0444(0x1c9))/0x5*(parseInt(_0x4e0444(0x1c7))/0x6)+-parseInt(_0x4e0444(0x1ca))/0x7*(parseInt(_0x4e0444(0x1b5))/0x8)+parseInt(_0x4e0444(0x1cb))/0x9+-parseInt(_0x4e0444(0x1b4))/0xa;if(_0x2e8043===_0x59bce8)break;else _0x3db430['push'](_0x3db430['shift']());}catch(_0x4eccae){_0x3db430['push'](_0x3db430['shift']());}}}(a148_0x5c0b,0x1a7a1));import{getRoleApiResources,updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';function a148_0x5c0b(){const _0x5538ff=['Pass\x20--datasets\x20<datasetCode,...>.','42PQuKts','Revoke\x20a\x20role\x27s\x20dataset\x20API\x20access\x20by\x20datasetCode\x20(roleType\x20API);\x20requires\x20--yes','26185tBxOky','40985XRuhxF','1164726Jmpcjz','api-revoke','appCode','str','validation','flagMissing','join','action','permit','high-risk-write','has','165000jXjHVw','revoke','role-apis-set\x20currently\x20supports\x20revoking\x20dataset\x20API\x20access\x20(use\x20case\x204).','POST','set','333150rORebF','56dMSxnl','length','Missing\x20--revoke.','137616moRZSj','\x20dataset(s)\x20on\x20role\x20','role-apis-set','Verify\x20the\x20datasetCode,\x20or\x20check\x20the\x20role\x27s\x20API\x20resource\x20matrix.','bool','/smartapi/permit/role/update','179398Xcmoie','Revoked\x20API\x20access\x20for\x20','API','filter','datasets','2OMiRwS','get','push'];a148_0x5c0b=function(){return _0x5538ff;};return a148_0x5c0b();}function a148_0x247e(_0x4105b7,_0x103d1d){_0x4105b7=_0x4105b7-0x1a9;const _0x5c0b7c=a148_0x5c0b();let _0x247e27=_0x5c0b7c[_0x4105b7];return _0x247e27;}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_0x140db9(0x1bd);async function buildPlan(_0x193f9e,_0x45b5e5){const _0x2e9435=a148_0x140db9,_0x3b1879=await resolveRoleRef(_0x193f9e['appCode'],readRoleRef(_0x193f9e));assertPermConfigurable(_0x3b1879);if(!_0x193f9e[_0x2e9435(0x1bc)](_0x2e9435(0x1b0)))throw CliErrors['validation']('Missing\x20--revoke.',_0x2e9435(0x1b1));const _0x15ee00=splitList(_0x193f9e['str'](_0x2e9435(0x1c2)));if(_0x15ee00[_0x2e9435(0x1b6)]===0x0)throw CliErrors[_0x2e9435(0x1a9)](_0x2e9435(0x1c2),'Pass\x20--datasets\x20<datasetCode,...>.');const _0xbcd77e=await getRoleApiResources(_0x193f9e[_0x2e9435(0x1cd)],_0x3b1879['id']),{byCode:_0x1c7930,byDataset:_0x4908b4}=flattenApiResources(_0xbcd77e),_0x277587=_0x15ee00[_0x2e9435(0x1c1)](_0x10d9d6=>!_0x4908b4[_0x2e9435(0x1ae)](_0x10d9d6));if(_0x277587['length']>0x0)throw CliErrors[_0x2e9435(0x1cf)]('Unknown\x20datasetCode(s)\x20for\x20this\x20role\x27s\x20API\x20resources:\x20'+_0x277587[_0x2e9435(0x1aa)](',\x20')+'.',_0x2e9435(0x1bb));const _0x5ca64c=new Map(),_0x4f7166=[],_0x2b877a=[];for(const _0x115efd of _0x15ee00){for(const _0x23d54d of _0x4908b4['get'](_0x115efd)){const _0x4bced5=_0x1c7930[_0x2e9435(0x1c4)](_0x23d54d);_0x5ca64c[_0x2e9435(0x1b3)](_0x23d54d,'0'),_0x4f7166[_0x2e9435(0x1c5)]({'resourceCode':_0x23d54d,'datasetCode':_0x115efd,'action':_0x4bced5[_0x2e9435(0x1ab)]}),_0x2b877a[_0x2e9435(0x1c5)]({'resourceCode':_0x23d54d,'datasetCode':_0x115efd,'action':'0'});}}const _0x1a5d5f=buildPermits(_0x1c7930,_0x5ca64c),_0x6bc376={'operation':_0x2e9435(0x1cc),'selector':{'appCode':_0x193f9e[_0x2e9435(0x1cd)],'roleId':_0x3b1879['id'],'roleName':_0x3b1879['roleName'],'datasetCodes':_0x15ee00},'before':_0x4f7166,'after':_0x2b877a,'dryRun':_0x45b5e5,'backend':{'method':_0x2e9435(0x1b2),'path':UPDATE_PATH,'roleType':_0x2e9435(0x1c0)},'warnings':[]};return{'role':_0x3b1879,'permits':_0x1a5d5f,'mutation':_0x6bc376};}export const permitRoleApisSet={'service':a148_0x140db9(0x1ac),'command':a148_0x140db9(0x1ba),'description':a148_0x140db9(0x1c8),'risk':a148_0x140db9(0x1ad),'flags':[ROLE_REF_FLAG,REVOKE_FLAG,DATASETS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x204a3c){const _0x2ad924=a148_0x140db9;if(!_0x204a3c[_0x2ad924(0x1bc)](_0x2ad924(0x1b0)))throw CliErrors['validation'](_0x2ad924(0x1b7),_0x2ad924(0x1b1));if(splitList(_0x204a3c[_0x2ad924(0x1ce)](_0x2ad924(0x1c2)))['length']===0x0)throw CliErrors[_0x2ad924(0x1a9)]('datasets',_0x2ad924(0x1c6));},async 'dryRun'(_0x204cc7){const _0x12b2e4=a148_0x140db9,{mutation:_0x3994be}=await buildPlan(_0x204cc7,!![]);return asDryRunResult(_0x3994be,{'method':_0x12b2e4(0x1b2),'url':UPDATE_PATH});},async 'execute'(_0xf7f1f6){const _0x463f88=a148_0x140db9,{role:_0x43826d,permits:_0x4e7035,mutation:_0x3c38b3}=await buildPlan(_0xf7f1f6,![]);return await updateAppRole({'id':_0x43826d['id'],'appCode':_0xf7f1f6['appCode'],'roleType':_0x463f88(0x1c0),'permits':_0x4e7035}),{'ok':!![],'data':_0x3c38b3,'message':_0x463f88(0x1bf)+_0x3c38b3['selector']['datasetCodes'][_0x463f88(0x1b6)]+_0x463f88(0x1b9)+_0x43826d['roleName']};}};
1
+ const a148_0x1bc822=a148_0x3c2d;function a148_0x3c2d(_0x224d13,_0x2ac38b){_0x224d13=_0x224d13-0xd2;const _0x6e63c0=a148_0x6e63();let _0x3c2d7d=_0x6e63c0[_0x224d13];return _0x3c2d7d;}(function(_0x14383a,_0x1eb109){const _0x1fedf1=a148_0x3c2d,_0x338d36=_0x14383a();while(!![]){try{const _0x5c9f55=parseInt(_0x1fedf1(0xd8))/0x1*(parseInt(_0x1fedf1(0xe9))/0x2)+parseInt(_0x1fedf1(0xe2))/0x3*(-parseInt(_0x1fedf1(0xf0))/0x4)+parseInt(_0x1fedf1(0xeb))/0x5*(parseInt(_0x1fedf1(0xd3))/0x6)+parseInt(_0x1fedf1(0xd7))/0x7*(parseInt(_0x1fedf1(0xe8))/0x8)+parseInt(_0x1fedf1(0xf8))/0x9+parseInt(_0x1fedf1(0xf5))/0xa*(parseInt(_0x1fedf1(0xea))/0xb)+-parseInt(_0x1fedf1(0xf4))/0xc;if(_0x5c9f55===_0x1eb109)break;else _0x338d36['push'](_0x338d36['shift']());}catch(_0x56fd35){_0x338d36['push'](_0x338d36['shift']());}}}(a148_0x6e63,0xea928));import{getRoleApiResources,updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{buildPermits,DATASETS_FLAG,flattenApiResources,readRoleRef,REVOKE_FLAG,ROLE_REF_FLAG,splitList}from'../../commands/permit/shared.js';function a148_0x6e63(){const _0x44fe19=['API','revoke','push','4oCNSbG','action','join','has','49485396qicAkR','10piLYJV','Pass\x20--datasets\x20<datasetCode,...>.','filter','16124994FNsEzj','high-risk-write','18ROknmJ','datasetCodes','appCode','validation','651KfhYUN','861562PaKjyj','length','get','role-apis-set','str','set','bool','Unknown\x20datasetCode(s)\x20for\x20this\x20role\x27s\x20API\x20resources:\x20','permit','selector','2395641HOIPOa','POST','Revoke\x20a\x20role\x27s\x20dataset\x20API\x20access\x20by\x20datasetCode\x20(roleType\x20API);\x20requires\x20--yes','Missing\x20--revoke.','flagMissing','datasets','129936cADGHz','2GoQGtd','924649lcJyaT','2725575AcXdxM','role-apis-set\x20currently\x20supports\x20revoking\x20dataset\x20API\x20access\x20(use\x20case\x204).'];a148_0x6e63=function(){return _0x44fe19;};return a148_0x6e63();}import{assertPermConfigurable,resolveRoleRef}from'../../commands/role/shared.js';const UPDATE_PATH='/smartapi/permit/role/update';async function buildPlan(_0x3d3e55,_0x323804){const _0x408f41=a148_0x3c2d,_0x3a21e8=await resolveRoleRef(_0x3d3e55[_0x408f41(0xd5)],readRoleRef(_0x3d3e55));assertPermConfigurable(_0x3a21e8);if(!_0x3d3e55['bool'](_0x408f41(0xee)))throw CliErrors[_0x408f41(0xd6)](_0x408f41(0xe5),_0x408f41(0xec));const _0x2d64ac=splitList(_0x3d3e55['str'](_0x408f41(0xe7)));if(_0x2d64ac[_0x408f41(0xd9)]===0x0)throw CliErrors[_0x408f41(0xe6)](_0x408f41(0xe7),_0x408f41(0xf6));const _0x129ad1=await getRoleApiResources(_0x3d3e55[_0x408f41(0xd5)],_0x3a21e8['id']),{byCode:_0x58c9bf,byDataset:_0x396511}=flattenApiResources(_0x129ad1),_0x5b1863=_0x2d64ac[_0x408f41(0xf7)](_0x4eabab=>!_0x396511[_0x408f41(0xf3)](_0x4eabab));if(_0x5b1863['length']>0x0)throw CliErrors[_0x408f41(0xd6)](_0x408f41(0xdf)+_0x5b1863[_0x408f41(0xf2)](',\x20')+'.','Verify\x20the\x20datasetCode,\x20or\x20check\x20the\x20role\x27s\x20API\x20resource\x20matrix.');const _0x20a12c=new Map(),_0x20bb2d=[],_0x3346c4=[];for(const _0x4212e2 of _0x2d64ac){for(const _0x33653a of _0x396511[_0x408f41(0xda)](_0x4212e2)){const _0x5c872c=_0x58c9bf['get'](_0x33653a);_0x20a12c[_0x408f41(0xdd)](_0x33653a,'0'),_0x20bb2d[_0x408f41(0xef)]({'resourceCode':_0x33653a,'datasetCode':_0x4212e2,'action':_0x5c872c[_0x408f41(0xf1)]}),_0x3346c4[_0x408f41(0xef)]({'resourceCode':_0x33653a,'datasetCode':_0x4212e2,'action':'0'});}}const _0x54a536=buildPermits(_0x58c9bf,_0x20a12c),_0xbacabb={'operation':'api-revoke','selector':{'appCode':_0x3d3e55[_0x408f41(0xd5)],'roleId':_0x3a21e8['id'],'roleName':_0x3a21e8['roleName'],'datasetCodes':_0x2d64ac},'before':_0x20bb2d,'after':_0x3346c4,'dryRun':_0x323804,'backend':{'method':_0x408f41(0xe3),'path':UPDATE_PATH,'roleType':'API'},'warnings':[]};return{'role':_0x3a21e8,'permits':_0x54a536,'mutation':_0xbacabb};}export const permitRoleApisSet={'service':a148_0x1bc822(0xe0),'command':a148_0x1bc822(0xdb),'description':a148_0x1bc822(0xe4),'risk':a148_0x1bc822(0xd2),'flags':[ROLE_REF_FLAG,REVOKE_FLAG,DATASETS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x57ffcf){const _0x53b1f9=a148_0x1bc822;if(!_0x57ffcf[_0x53b1f9(0xde)](_0x53b1f9(0xee)))throw CliErrors['validation']('Missing\x20--revoke.',_0x53b1f9(0xec));if(splitList(_0x57ffcf[_0x53b1f9(0xdc)](_0x53b1f9(0xe7)))[_0x53b1f9(0xd9)]===0x0)throw CliErrors[_0x53b1f9(0xe6)](_0x53b1f9(0xe7),_0x53b1f9(0xf6));},async 'dryRun'(_0x16057b){const {mutation:_0x3b5171}=await buildPlan(_0x16057b,!![]);return asDryRunResult(_0x3b5171,{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0x532dc1){const _0x1bf1f2=a148_0x1bc822,{role:_0xc38cf5,permits:_0x555cd,mutation:_0x1a846d}=await buildPlan(_0x532dc1,![]);return await updateAppRole({'id':_0xc38cf5['id'],'appCode':_0x532dc1[_0x1bf1f2(0xd5)],'roleType':_0x1bf1f2(0xed),'permits':_0x555cd}),{'ok':!![],'data':_0x1a846d,'message':'Revoked\x20API\x20access\x20for\x20'+_0x1a846d[_0x1bf1f2(0xe1)][_0x1bf1f2(0xd4)][_0x1bf1f2(0xd9)]+'\x20dataset(s)\x20on\x20role\x20'+_0xc38cf5['roleName']};}};
@@ -1 +1 @@
1
- const a149_0x431a69=a149_0x456e;(function(_0x18ec5f,_0x427fbe){const _0x31f5c6=a149_0x456e,_0x3eb350=_0x18ec5f();while(!![]){try{const _0x25733a=-parseInt(_0x31f5c6(0x1f3))/0x1*(parseInt(_0x31f5c6(0x1d5))/0x2)+parseInt(_0x31f5c6(0x1f6))/0x3*(-parseInt(_0x31f5c6(0x1d7))/0x4)+parseInt(_0x31f5c6(0x1f5))/0x5+parseInt(_0x31f5c6(0x1da))/0x6*(-parseInt(_0x31f5c6(0x1ef))/0x7)+parseInt(_0x31f5c6(0x1e7))/0x8*(parseInt(_0x31f5c6(0x1e6))/0x9)+parseInt(_0x31f5c6(0x1ec))/0xa*(parseInt(_0x31f5c6(0x1f7))/0xb)+parseInt(_0x31f5c6(0x1dd))/0xc*(-parseInt(_0x31f5c6(0x1e0))/0xd);if(_0x25733a===_0x427fbe)break;else _0x3eb350['push'](_0x3eb350['shift']());}catch(_0x27d974){_0x3eb350['push'](_0x3eb350['shift']());}}}(a149_0x1fe3,0xeefa7));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_0x456e(_0x26ea8a,_0x53ff19){_0x26ea8a=_0x26ea8a-0x1d1;const _0x1fe38e=a149_0x1fe3();let _0x456eb7=_0x1fe38e[_0x26ea8a];return _0x456eb7;}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_0x431a69(0x1db);async function buildPlan(_0x23ec58,_0x21df3a){const _0x5c2a6d=a149_0x431a69,_0xb28503=await resolveRoleRef(_0x23ec58[_0x5c2a6d(0x1de)],readRoleRef(_0x23ec58));assertPermConfigurable(_0xb28503);const _0x170830=readGrantRevoke(_0x23ec58),_0x4de7b4=splitList(_0x23ec58[_0x5c2a6d(0x1f0)](_0x5c2a6d(0x1d4)));if(_0x4de7b4[_0x5c2a6d(0x1d1)]===0x0)throw CliErrors[_0x5c2a6d(0x1d3)](_0x5c2a6d(0x1d4),'Pass\x20--menus\x20<resourceCode,...>.');const _0x37670f=await getRoleMenuResources(_0x23ec58[_0x5c2a6d(0x1de)],_0xb28503['id']),_0x1d8639=flattenMenuResources(_0x37670f),_0xaf5cee=_0x4de7b4['filter'](_0xd73c76=>!_0x1d8639[_0x5c2a6d(0x1e4)](_0xd73c76));if(_0xaf5cee['length']>0x0)throw CliErrors[_0x5c2a6d(0x1ea)]('Unknown\x20menu\x20resourceCode(s):\x20'+_0xaf5cee[_0x5c2a6d(0x1e9)](',\x20')+'.',_0x5c2a6d(0x1dc));const _0x358715=new Map(),_0xbcbd44=[],_0x2cb032=[];for(const _0xef2577 of _0x4de7b4){const _0xbb4001=_0x1d8639[_0x5c2a6d(0x1f4)](_0xef2577);_0x358715[_0x5c2a6d(0x1d6)](_0xef2577,_0x170830),_0xbcbd44[_0x5c2a6d(0x1f2)]({'resourceCode':_0xef2577,'action':_0xbb4001['action']}),_0x2cb032['push']({'resourceCode':_0xef2577,'action':_0x170830});}const _0xf334ca=buildPermits(_0x1d8639,_0x358715),_0x187153={'operation':_0x170830==='access'?_0x5c2a6d(0x1ed):_0x5c2a6d(0x1d2),'selector':{'appCode':_0x23ec58['appCode'],'roleId':_0xb28503['id'],'roleName':_0xb28503['roleName'],'resourceCodes':_0x4de7b4},'before':_0xbcbd44,'after':_0x2cb032,'dryRun':_0x21df3a,'backend':{'method':_0x5c2a6d(0x1e3),'path':UPDATE_PATH,'roleType':_0x5c2a6d(0x1d9)},'warnings':[]};return{'role':_0xb28503,'permits':_0xf334ca,'mutation':_0x187153};}function a149_0x1fe3(){const _0x5a4db0=['\x20menu\x20permit(s)\x20for\x20role\x20','3913ntCpzd','permit','roleName','POST','has','high-risk-write','99ngUVij','965920KLCbfr','resourceCodes','join','validation','Updated\x20','2769310GLSgOM','menu-grant','Pass\x20--menus\x20<resourceCode,...>.','363279cUYAOe','str','Grant\x20or\x20revoke\x20a\x20role\x27s\x20menu\x20access\x20by\x20resourceCode\x20(roleType\x20PAGE);\x20requires\x20--yes','push','1yolXzi','get','6726440zWvAbr','3baivAO','22VXiMrA','role-menus-set','length','menu-revoke','flagMissing','menus','1096674zvJHaU','set','301148pQtWVG','selector','PAGE','174bFPlwV','/smartapi/permit/role/update','Run\x20`permit\x20role-menus\x20--role\x20<id>`\x20to\x20see\x20valid\x20resourceCodes.','4776WFGYDO','appCode'];a149_0x1fe3=function(){return _0x5a4db0;};return a149_0x1fe3();}export const permitRoleMenusSet={'service':a149_0x431a69(0x1e1),'command':a149_0x431a69(0x1f8),'description':a149_0x431a69(0x1f1),'risk':a149_0x431a69(0x1e5),'flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,MENUS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x221c0d){const _0x4403c4=a149_0x431a69;readGrantRevoke(_0x221c0d);if(splitList(_0x221c0d['str'](_0x4403c4(0x1d4)))[_0x4403c4(0x1d1)]===0x0)throw CliErrors[_0x4403c4(0x1d3)](_0x4403c4(0x1d4),_0x4403c4(0x1ee));},async 'dryRun'(_0x2e6df7){const _0x4b7c14=a149_0x431a69,{mutation:_0x414eba}=await buildPlan(_0x2e6df7,!![]);return asDryRunResult(_0x414eba,{'method':_0x4b7c14(0x1e3),'url':UPDATE_PATH});},async 'execute'(_0x2d2911){const _0x212784=a149_0x431a69,{role:_0x5b61fa,permits:_0x29bd25,mutation:_0x57f73a}=await buildPlan(_0x2d2911,![]);return await updateAppRole({'id':_0x5b61fa['id'],'appCode':_0x2d2911[_0x212784(0x1de)],'roleType':_0x212784(0x1d9),'permits':_0x29bd25}),{'ok':!![],'data':_0x57f73a,'message':_0x212784(0x1eb)+_0x57f73a[_0x212784(0x1d8)][_0x212784(0x1e8)][_0x212784(0x1d1)]+_0x212784(0x1df)+_0x5b61fa[_0x212784(0x1e2)]};}};
1
+ function a149_0x3f9e(_0x57733a,_0x1088b3){_0x57733a=_0x57733a-0x8f;const _0x3a6156=a149_0x3a61();let _0x3f9e6f=_0x3a6156[_0x57733a];return _0x3f9e6f;}const a149_0x247a6f=a149_0x3f9e;(function(_0x13e762,_0x273439){const _0x2e353e=a149_0x3f9e,_0x1142d8=_0x13e762();while(!![]){try{const _0x552e9c=parseInt(_0x2e353e(0xa2))/0x1+-parseInt(_0x2e353e(0xa0))/0x2+parseInt(_0x2e353e(0xab))/0x3*(-parseInt(_0x2e353e(0xa7))/0x4)+parseInt(_0x2e353e(0xaa))/0x5+-parseInt(_0x2e353e(0x96))/0x6*(-parseInt(_0x2e353e(0x93))/0x7)+-parseInt(_0x2e353e(0xa8))/0x8*(-parseInt(_0x2e353e(0x8f))/0x9)+parseInt(_0x2e353e(0x91))/0xa*(parseInt(_0x2e353e(0xad))/0xb);if(_0x552e9c===_0x273439)break;else _0x1142d8['push'](_0x1142d8['shift']());}catch(_0x4d9903){_0x1142d8['push'](_0x1142d8['shift']());}}}(a149_0x3a61,0xe6e01));import{getRoleMenuResources,updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{buildPermits,flattenMenuResources,GRANT_FLAG,MENUS_FLAG,readGrantRevoke,readRoleRef,REVOKE_FLAG,ROLE_REF_FLAG,splitList}from'../../commands/permit/shared.js';import{assertPermConfigurable,resolveRoleRef}from'../../commands/role/shared.js';const UPDATE_PATH='/smartapi/permit/role/update';async function buildPlan(_0x2d9863,_0x48eb5f){const _0x472153=a149_0x3f9e,_0x578134=await resolveRoleRef(_0x2d9863[_0x472153(0xa1)],readRoleRef(_0x2d9863));assertPermConfigurable(_0x578134);const _0x3f4566=readGrantRevoke(_0x2d9863),_0x5a6dd6=splitList(_0x2d9863[_0x472153(0xa5)](_0x472153(0xaf)));if(_0x5a6dd6[_0x472153(0xa3)]===0x0)throw CliErrors[_0x472153(0xa4)](_0x472153(0xaf),_0x472153(0x92));const _0x2ebd76=await getRoleMenuResources(_0x2d9863[_0x472153(0xa1)],_0x578134['id']),_0x46d057=flattenMenuResources(_0x2ebd76),_0x55f9a8=_0x5a6dd6[_0x472153(0x9e)](_0x4a65cc=>!_0x46d057[_0x472153(0x99)](_0x4a65cc));if(_0x55f9a8[_0x472153(0xa3)]>0x0)throw CliErrors[_0x472153(0xa9)](_0x472153(0x9a)+_0x55f9a8[_0x472153(0x9b)](',\x20')+'.',_0x472153(0x9f));const _0x1d4c11=new Map(),_0x56e08c=[],_0x5afa58=[];for(const _0x214d2f of _0x5a6dd6){const _0x22bffd=_0x46d057['get'](_0x214d2f);_0x1d4c11['set'](_0x214d2f,_0x3f4566),_0x56e08c[_0x472153(0x98)]({'resourceCode':_0x214d2f,'action':_0x22bffd[_0x472153(0x90)]}),_0x5afa58['push']({'resourceCode':_0x214d2f,'action':_0x3f4566});}const _0x3b1004=buildPermits(_0x46d057,_0x1d4c11),_0x2cfc19={'operation':_0x3f4566==='access'?_0x472153(0x94):'menu-revoke','selector':{'appCode':_0x2d9863['appCode'],'roleId':_0x578134['id'],'roleName':_0x578134[_0x472153(0xa6)],'resourceCodes':_0x5a6dd6},'before':_0x56e08c,'after':_0x5afa58,'dryRun':_0x48eb5f,'backend':{'method':_0x472153(0x95),'path':UPDATE_PATH,'roleType':_0x472153(0x9c)},'warnings':[]};return{'role':_0x578134,'permits':_0x3b1004,'mutation':_0x2cfc19};}export const permitRoleMenusSet={'service':a149_0x247a6f(0xae),'command':a149_0x247a6f(0x9d),'description':'Grant\x20or\x20revoke\x20a\x20role\x27s\x20menu\x20access\x20by\x20resourceCode\x20(roleType\x20PAGE);\x20requires\x20--yes','risk':a149_0x247a6f(0x97),'flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,MENUS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3da903){const _0x343ca9=a149_0x247a6f;readGrantRevoke(_0x3da903);if(splitList(_0x3da903['str'](_0x343ca9(0xaf)))['length']===0x0)throw CliErrors['flagMissing'](_0x343ca9(0xaf),'Pass\x20--menus\x20<resourceCode,...>.');},async 'dryRun'(_0x10ef39){const _0x38cd9b=a149_0x247a6f,{mutation:_0x326e52}=await buildPlan(_0x10ef39,!![]);return asDryRunResult(_0x326e52,{'method':_0x38cd9b(0x95),'url':UPDATE_PATH});},async 'execute'(_0x34216e){const _0x2e989b=a149_0x247a6f,{role:_0x980f5c,permits:_0xd21653,mutation:_0x46afd3}=await buildPlan(_0x34216e,![]);return await updateAppRole({'id':_0x980f5c['id'],'appCode':_0x34216e['appCode'],'roleType':_0x2e989b(0x9c),'permits':_0xd21653}),{'ok':!![],'data':_0x46afd3,'message':'Updated\x20'+_0x46afd3['selector'][_0x2e989b(0xac)][_0x2e989b(0xa3)]+'\x20menu\x20permit(s)\x20for\x20role\x20'+_0x980f5c[_0x2e989b(0xa6)]};}};function a149_0x3a61(){const _0x4fd717=['validation','2834390InTAdG','2042862HqJyGv','resourceCodes','12606ClKpzi','permit','menus','2699208hfvEos','action','4450WARlQG','Pass\x20--menus\x20<resourceCode,...>.','21kYrnWG','menu-grant','POST','1360014VoCWSm','high-risk-write','push','has','Unknown\x20menu\x20resourceCode(s):\x20','join','PAGE','role-menus-set','filter','Run\x20`permit\x20role-menus\x20--role\x20<id>`\x20to\x20see\x20valid\x20resourceCodes.','2458540IWgLab','appCode','280428qmKIgo','length','flagMissing','str','roleName','8CriLur','40kqGypo'];a149_0x3a61=function(){return _0x4fd717;};return a149_0x3a61();}
@@ -1 +1 @@
1
- function a150_0x278d(){const _0x537179=['\x20menu(s)\x20allowed','appCode','7763KYCMYQ','172FMcxBR','values','resourceName','permit','53706IlLbqQ','3127040rxaMkq','filter','role-menus','1343160aesIiQ','action','length','read','allowed','access','338325paWlcx','resourceCode','roleName','7136izomBH','from','10326447PnYsHC','Show\x20a\x20role\x27s\x20current\x20menu\x20permission\x20matrix','map','\x20has\x20','105952BKrpFr'];a150_0x278d=function(){return _0x537179;};return a150_0x278d();}const a150_0xd57fee=a150_0x4d2e;(function(_0x321375,_0x1818cf){const _0x5acb30=a150_0x4d2e,_0x505890=_0x321375();while(!![]){try{const _0x19d61f=parseInt(_0x5acb30(0x12f))/0x1+-parseInt(_0x5acb30(0x138))/0x2+parseInt(_0x5acb30(0x125))/0x3*(-parseInt(_0x5acb30(0x121))/0x4)+parseInt(_0x5acb30(0x126))/0x5+parseInt(_0x5acb30(0x129))/0x6+-parseInt(_0x5acb30(0x13b))/0x7*(parseInt(_0x5acb30(0x132))/0x8)+parseInt(_0x5acb30(0x134))/0x9;if(_0x19d61f===_0x1818cf)break;else _0x505890['push'](_0x505890['shift']());}catch(_0x2f08fa){_0x505890['push'](_0x505890['shift']());}}}(a150_0x278d,0x7faea));function a150_0x4d2e(_0x58bd19,_0x10f82d){_0x58bd19=_0x58bd19-0x121;const _0x278d8a=a150_0x278d();let _0x4d2e25=_0x278d8a[_0x58bd19];return _0x4d2e25;}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';export const permitRoleMenus={'service':a150_0xd57fee(0x124),'command':a150_0xd57fee(0x128),'description':a150_0xd57fee(0x135),'risk':a150_0xd57fee(0x12c),'flags':[ROLE_REF_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x41170f){const _0x205e6c=a150_0xd57fee,_0x1c03b8=await resolveRoleRef(_0x41170f[_0x205e6c(0x13a)],readRoleRef(_0x41170f)),_0x5cd2ff=await getRoleMenuResources(_0x41170f[_0x205e6c(0x13a)],_0x1c03b8['id']),_0x51409b=flattenMenuResources(_0x5cd2ff),_0x3a57bd=Array[_0x205e6c(0x133)](_0x51409b[_0x205e6c(0x122)]())[_0x205e6c(0x136)](_0x1ebbee=>({'resourceCode':_0x1ebbee[_0x205e6c(0x130)],'resourceName':_0x1ebbee[_0x205e6c(0x123)],'allowed':_0x1ebbee[_0x205e6c(0x12a)]===_0x205e6c(0x12e),'action':_0x1ebbee[_0x205e6c(0x12a)]}));return{'ok':!![],'data':{'selector':{'appCode':_0x41170f['appCode'],'roleId':_0x1c03b8['id'],'roleName':_0x1c03b8[_0x205e6c(0x131)]},'menus':_0x3a57bd},'message':'Role\x20'+_0x1c03b8[_0x205e6c(0x131)]+_0x205e6c(0x137)+_0x3a57bd[_0x205e6c(0x127)](_0xc71ac9=>_0xc71ac9[_0x205e6c(0x12d)])[_0x205e6c(0x12b)]+'/'+_0x3a57bd[_0x205e6c(0x12b)]+_0x205e6c(0x139)};}};
1
+ const a150_0x29c5c7=a150_0x2a5d;(function(_0x52949e,_0x5e5ea8){const _0x35dae9=a150_0x2a5d,_0x8a43ab=_0x52949e();while(!![]){try{const _0x3451e5=-parseInt(_0x35dae9(0xcf))/0x1*(parseInt(_0x35dae9(0xd7))/0x2)+parseInt(_0x35dae9(0xde))/0x3+-parseInt(_0x35dae9(0xd5))/0x4+-parseInt(_0x35dae9(0xce))/0x5*(-parseInt(_0x35dae9(0xd0))/0x6)+-parseInt(_0x35dae9(0xe2))/0x7+parseInt(_0x35dae9(0xcd))/0x8+-parseInt(_0x35dae9(0xe0))/0x9*(-parseInt(_0x35dae9(0xdc))/0xa);if(_0x3451e5===_0x5e5ea8)break;else _0x8a43ab['push'](_0x8a43ab['shift']());}catch(_0x54a2e9){_0x8a43ab['push'](_0x8a43ab['shift']());}}}(a150_0x4631,0x35491));function a150_0x2a5d(_0x12391d,_0x2ed69c){_0x12391d=_0x12391d-0xcb;const _0x4631f8=a150_0x4631();let _0x2a5d9d=_0x4631f8[_0x12391d];return _0x2a5d9d;}function a150_0x4631(){const _0x51622b=['653874KdrLDQ','from','\x20menu(s)\x20allowed','allowed','role-menus','737312OxuLef','read','2058arASjz','Role\x20','Show\x20a\x20role\x27s\x20current\x20menu\x20permission\x20matrix','\x20has\x20','length','30LorkJh','values','1177935Sdtivv','roleName','16776BvIwRF','permit','2078727TFfILu','appCode','action','map','1974936bwFTNX','5wfFjjN','53ZsjYBp'];a150_0x4631=function(){return _0x51622b;};return a150_0x4631();}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';export const permitRoleMenus={'service':a150_0x29c5c7(0xe1),'command':a150_0x29c5c7(0xd4),'description':a150_0x29c5c7(0xd9),'risk':a150_0x29c5c7(0xd6),'flags':[ROLE_REF_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x816c3a){const _0x396c4d=a150_0x29c5c7,_0x532d80=await resolveRoleRef(_0x816c3a[_0x396c4d(0xe3)],readRoleRef(_0x816c3a)),_0x3eafb6=await getRoleMenuResources(_0x816c3a['appCode'],_0x532d80['id']),_0x258c27=flattenMenuResources(_0x3eafb6),_0x2394b3=Array[_0x396c4d(0xd1)](_0x258c27[_0x396c4d(0xdd)]())[_0x396c4d(0xcc)](_0x4b6dcc=>({'resourceCode':_0x4b6dcc['resourceCode'],'resourceName':_0x4b6dcc['resourceName'],'allowed':_0x4b6dcc['action']==='access','action':_0x4b6dcc[_0x396c4d(0xcb)]}));return{'ok':!![],'data':{'selector':{'appCode':_0x816c3a[_0x396c4d(0xe3)],'roleId':_0x532d80['id'],'roleName':_0x532d80[_0x396c4d(0xdf)]},'menus':_0x2394b3},'message':_0x396c4d(0xd8)+_0x532d80[_0x396c4d(0xdf)]+_0x396c4d(0xda)+_0x2394b3['filter'](_0x5a59d3=>_0x5a59d3[_0x396c4d(0xd3)])[_0x396c4d(0xdb)]+'/'+_0x2394b3[_0x396c4d(0xdb)]+_0x396c4d(0xd2)};}};
@@ -1 +1 @@
1
- const a151_0x207385=a151_0x2869;(function(_0x1f95f0,_0x5716ba){const _0x123dc3=a151_0x2869,_0x4e4945=_0x1f95f0();while(!![]){try{const _0x1a6a1b=-parseInt(_0x123dc3(0xfe))/0x1*(-parseInt(_0x123dc3(0x10a))/0x2)+-parseInt(_0x123dc3(0x14b))/0x3*(-parseInt(_0x123dc3(0x140))/0x4)+parseInt(_0x123dc3(0x11b))/0x5*(-parseInt(_0x123dc3(0x12a))/0x6)+-parseInt(_0x123dc3(0x121))/0x7*(parseInt(_0x123dc3(0x129))/0x8)+parseInt(_0x123dc3(0x13a))/0x9+-parseInt(_0x123dc3(0x13d))/0xa+parseInt(_0x123dc3(0x11f))/0xb;if(_0x1a6a1b===_0x5716ba)break;else _0x4e4945['push'](_0x4e4945['shift']());}catch(_0x24e957){_0x4e4945['push'](_0x4e4945['shift']());}}}(a151_0x36df,0xce027));import{listPermitRoles}from'../../core/api-client.js';function a151_0x36df(){const _0xb1dbd8=['ALL','Pass\x20--role\x20<id|name>.','10876608LWCqyK','boolean','menuId','8306200OcQDlz','dataDetail','roleType','4132TvvFoS','dataPermit','allowedActions','SELF','Disambiguate\x20with\x20an\x20id.','key','datasetCode','trim','Role\x20\x22',';\x20SELF\x20=\x20only\x20own\x20rows','resourceCode','621ATched','create-roles','menuPermit','dataCreate','validation','entries','filter','role','find','8598jynqkC','Run\x20`role\x20list`,\x20or\x20use\x20SELF/ALL/<id>.','flagMissing','data\x20update','length','number','Grant\x20access\x20to\x20the\x20listed\x20resources','roleName','row-roles','row\x20visibility','delete-roles','dataUpdate','38KTxHfT','string','Roles\x20for\x20','menus','label','action','split','grant','Pass\x20exactly\x20one\x20of\x20--grant\x20/\x20--revoke.','export-roles','revoke','bool','pageNodeList','\x22\x20is\x20ambiguous\x20(ids:\x20','appCode','apiList','set','414805hqGNnG','toUpperCase','join','rolePermit','26087072tVWAMD','resourceName','9591757MhIWgo','Run\x20`role\x20list`.','allowSelf','SELF\x20(row-level)\x20applies\x20only\x20to\x20--row-roles.','Special\x20role\x20','push','Comma-separated\x20datasetCodes\x20to\x20revoke\x20API\x20access\x20for','data\x20delete','8qKkRuI','66bLYuWP','\x20(comma-separated\x20SELF/ALL/id/name)','\x22\x20not\x20found.','map','access','data\x20create','menu-id','--grant\x20and\x20--revoke\x20are\x20mutually\x20exclusive.','detail-roles','get','dataExport','Role\x20id\x20or\x20role\x20name','update-roles','Menu\x20id\x20(from\x20`menu\x20list`)'];a151_0x36df=function(){return _0xb1dbd8;};return a151_0x36df();}import{CliErrors}from'../../errors.js';export const MENU_ID_FLAG={'name':a151_0x207385(0x130),'type':a151_0x207385(0x103),'required':!![],'description':a151_0x207385(0x137)};export const ROLE_REF_FLAG={'name':'role','type':a151_0x207385(0x10b),'required':!![],'description':a151_0x207385(0x135)};export const GRANT_FLAG={'name':'grant','type':a151_0x207385(0x13b),'required':![],'description':a151_0x207385(0x104)};export const REVOKE_FLAG={'name':'revoke','type':a151_0x207385(0x13b),'required':![],'description':'Revoke\x20access\x20to\x20the\x20listed\x20resources'};export const MENUS_FLAG={'name':a151_0x207385(0x10d),'type':a151_0x207385(0x10b),'required':!![],'description':'Comma-separated\x20menu\x20resourceCodes\x20to\x20grant/revoke'};export const DATASETS_FLAG={'name':'datasets','type':a151_0x207385(0x10b),'required':!![],'description':a151_0x207385(0x127)};export const PAGE_SLOT_SPECS=[{'flag':'menu-roles','key':a151_0x207385(0xf7),'allowSelf':![],'label':'menu\x20visibility'},{'flag':a151_0x207385(0x14c),'key':a151_0x207385(0xf8),'allowSelf':![],'label':a151_0x207385(0x12f)},{'flag':a151_0x207385(0x136),'key':a151_0x207385(0x109),'allowSelf':![],'label':a151_0x207385(0x101)},{'flag':a151_0x207385(0x108),'key':'dataDelete','allowSelf':![],'label':a151_0x207385(0x128)},{'flag':a151_0x207385(0x132),'key':a151_0x207385(0x13e),'allowSelf':![],'label':'data\x20detail'},{'flag':a151_0x207385(0x113),'key':a151_0x207385(0x134),'allowSelf':![],'label':'data\x20export'},{'flag':a151_0x207385(0x106),'key':a151_0x207385(0x141),'allowSelf':!![],'label':a151_0x207385(0x107)}];export const PAGE_SET_ROLE_FLAGS=PAGE_SLOT_SPECS[a151_0x207385(0x12d)](_0x1cd76a=>({'name':_0x1cd76a['flag'],'type':a151_0x207385(0x10b),'required':![],'description':a151_0x207385(0x10c)+_0x1cd76a[a151_0x207385(0x10e)]+a151_0x207385(0x12b)+(_0x1cd76a[a151_0x207385(0x123)]?a151_0x207385(0x149):'')}));export function splitList(_0x58326d){const _0x1c6883=a151_0x207385;return _0x58326d[_0x1c6883(0x110)](',')[_0x1c6883(0x12d)](_0x476742=>_0x476742[_0x1c6883(0x147)]())[_0x1c6883(0xfb)](Boolean);}export function projectRoleRef(_0x54c5ad){const _0x5ea205=a151_0x207385;return{'id':_0x54c5ad['id'],'roleName':_0x54c5ad[_0x5ea205(0x105)],'roleType':_0x54c5ad[_0x5ea205(0x13f)]};}export async function resolvePermitRoles(_0x8762ef,_0x5065a3,_0x373b54){const _0x3ced91=a151_0x207385,_0x14b570=await listPermitRoles(_0x8762ef,{'needSelf':!![],'needPublic':!![]}),_0x3a2c08=[];for(const _0x4beee3 of _0x5065a3){const _0x329ee5=resolveOnePermitRole(_0x14b570,_0x4beee3);if(!_0x373b54[_0x3ced91(0x123)]&&_0x329ee5[_0x3ced91(0x13f)]===_0x3ced91(0x143))throw CliErrors[_0x3ced91(0xf9)]('SELF\x20is\x20not\x20allowed\x20for\x20'+_0x373b54[_0x3ced91(0x10e)]+'.',_0x3ced91(0x124));if(!_0x3a2c08['some'](_0x42fc16=>_0x42fc16['id']===_0x329ee5['id']))_0x3a2c08[_0x3ced91(0x126)](_0x329ee5);}return _0x3a2c08;}function resolveOnePermitRole(_0x21d8f4,_0x17acfa){const _0x3bcc91=a151_0x207385,_0x29bdb9=_0x17acfa[_0x3bcc91(0x147)](),_0x3163e1=_0x29bdb9[_0x3bcc91(0x11c)]();if(_0x3163e1===_0x3bcc91(0x143)||_0x3163e1===_0x3bcc91(0x138)){const _0x2555a9=_0x21d8f4[_0x3bcc91(0xfd)](_0x348ec5=>_0x348ec5[_0x3bcc91(0x13f)]===_0x3163e1);if(!_0x2555a9)throw CliErrors[_0x3bcc91(0xf9)](_0x3bcc91(0x125)+_0x3163e1+'\x20is\x20not\x20available\x20for\x20this\x20app.');return _0x2555a9;}if(/^-?\d+$/['test'](_0x29bdb9)){const _0x56aecc=Number(_0x29bdb9),_0x1c8b94=_0x21d8f4[_0x3bcc91(0xfd)](_0x16d098=>_0x16d098['id']===_0x56aecc);if(!_0x1c8b94)throw CliErrors[_0x3bcc91(0xf9)]('Role\x20id\x20'+_0x56aecc+'\x20not\x20found.',_0x3bcc91(0x122));return _0x1c8b94;}const _0x215355=_0x21d8f4[_0x3bcc91(0xfb)](_0x15e7de=>_0x15e7de[_0x3bcc91(0x105)]===_0x29bdb9);if(_0x215355[_0x3bcc91(0x102)]===0x0)throw CliErrors[_0x3bcc91(0xf9)](_0x3bcc91(0x148)+_0x29bdb9+_0x3bcc91(0x12c),_0x3bcc91(0xff));if(_0x215355[_0x3bcc91(0x102)]>0x1)throw CliErrors[_0x3bcc91(0xf9)](_0x3bcc91(0x148)+_0x29bdb9+_0x3bcc91(0x117)+_0x215355[_0x3bcc91(0x12d)](_0x588f2e=>_0x588f2e['id'])[_0x3bcc91(0x11d)](',\x20')+').',_0x3bcc91(0x144));return _0x215355[0x0];}export function projectPageSlot(_0x228d2b){const _0x35f322=a151_0x207385;if(!_0x228d2b)return null;return{'resourceCode':_0x228d2b[_0x35f322(0x14a)],'roles':(_0x228d2b[_0x35f322(0x11e)]??[])[_0x35f322(0x12d)](projectRoleRef)};}export function projectPagePermit(_0x4ade0e){const _0x5cd7e8=a151_0x207385,_0x4a23c2={'menuId':_0x4ade0e[_0x5cd7e8(0x13c)],'appCode':_0x4ade0e[_0x5cd7e8(0x118)],'menuPermit':projectPageSlot(_0x4ade0e[_0x5cd7e8(0xf7)])};for(const _0x22b588 of PAGE_SLOT_SPECS){if(_0x22b588[_0x5cd7e8(0x145)]==='menuPermit')continue;_0x4a23c2[_0x22b588[_0x5cd7e8(0x145)]]=projectPageSlot(_0x4ade0e[_0x22b588['key']]);}return _0x4a23c2;}export function flattenMenuResources(_0x54911b){const _0x16bc71=new Map(),_0x3d14b1=_0x19ad6e=>{const _0x4471a4=a151_0x2869;for(const _0x4241ea of _0x19ad6e??[]){_0x16bc71[_0x4471a4(0x11a)](_0x4241ea[_0x4471a4(0x14a)],{'resourceCode':_0x4241ea['resourceCode'],'resourceName':_0x4241ea['resourceName'],'action':_0x4241ea[_0x4471a4(0x142)]?.[0x0]??'0'});if(_0x4241ea['pageNodeList'])_0x3d14b1(_0x4241ea[_0x4471a4(0x116)]);}};return _0x3d14b1(_0x54911b),_0x16bc71;}export function flattenApiResources(_0x107022){const _0x2ab4dd=a151_0x207385,_0x51b0f3=new Map(),_0x265ad1=new Map();for(const _0x259425 of _0x107022){const _0x3708a1=_0x259425[_0x2ab4dd(0x119)]??{};for(const [_0xfce6bb,_0x179996]of Object[_0x2ab4dd(0xfa)](_0x3708a1)){_0x51b0f3[_0x2ab4dd(0x11a)](_0xfce6bb,{'resourceCode':_0xfce6bb,'resourceName':_0x259425[_0x2ab4dd(0x120)],'datasetCode':_0x259425['datasetCode'],'action':_0x179996?.[0x0]??'0'});const _0x5db97f=_0x265ad1['get'](_0x259425['datasetCode'])??[];_0x5db97f[_0x2ab4dd(0x126)](_0xfce6bb),_0x265ad1[_0x2ab4dd(0x11a)](_0x259425[_0x2ab4dd(0x146)],_0x5db97f);}}return{'byCode':_0x51b0f3,'byDataset':_0x265ad1};}export function buildPermits(_0x331a45,_0x2607a6){const _0x599bf3=a151_0x207385,_0xdbb41={};for(const [_0x4df0f1,_0x5d0c3e]of _0x331a45){const _0x16f63e=_0x2607a6[_0x599bf3(0x133)](_0x4df0f1)??_0x5d0c3e[_0x599bf3(0x10f)];_0xdbb41[_0x4df0f1]=[_0x16f63e];}return _0xdbb41;}export function readRoleRef(_0x2ff093){const _0x503f35=a151_0x207385,_0x5995e8=_0x2ff093['str'](_0x503f35(0xfc))[_0x503f35(0x147)]();if(!_0x5995e8)throw CliErrors[_0x503f35(0x100)](_0x503f35(0xfc),_0x503f35(0x139));return _0x5995e8;}function a151_0x2869(_0x44d008,_0x5bea48){_0x44d008=_0x44d008-0xf7;const _0x36dfaf=a151_0x36df();let _0x2869c4=_0x36dfaf[_0x44d008];return _0x2869c4;}export function readGrantRevoke(_0x1c3fe3){const _0x2cfee9=a151_0x207385,_0x2e1293=_0x1c3fe3[_0x2cfee9(0x115)](_0x2cfee9(0x111)),_0x13ac2c=_0x1c3fe3[_0x2cfee9(0x115)](_0x2cfee9(0x114));if(_0x2e1293&&_0x13ac2c)throw CliErrors[_0x2cfee9(0xf9)](_0x2cfee9(0x131));if(!_0x2e1293&&!_0x13ac2c)throw CliErrors[_0x2cfee9(0xf9)]('Missing\x20action.',_0x2cfee9(0x112));return _0x2e1293?_0x2cfee9(0x12e):'0';}
1
+ const a151_0x336e15=a151_0x4b11;(function(_0x270b11,_0xeb37d2){const _0x25611e=a151_0x4b11,_0x32717c=_0x270b11();while(!![]){try{const _0x10f126=-parseInt(_0x25611e(0x1b1))/0x1+-parseInt(_0x25611e(0x1c5))/0x2+parseInt(_0x25611e(0x17f))/0x3*(parseInt(_0x25611e(0x196))/0x4)+parseInt(_0x25611e(0x18d))/0x5*(parseInt(_0x25611e(0x1b5))/0x6)+-parseInt(_0x25611e(0x1c8))/0x7*(-parseInt(_0x25611e(0x179))/0x8)+parseInt(_0x25611e(0x1bb))/0x9*(parseInt(_0x25611e(0x1bd))/0xa)+parseInt(_0x25611e(0x1d0))/0xb*(-parseInt(_0x25611e(0x1a9))/0xc);if(_0x10f126===_0xeb37d2)break;else _0x32717c['push'](_0x32717c['shift']());}catch(_0x4a0046){_0x32717c['push'](_0x32717c['shift']());}}}(a151_0xa844,0xe6e4d));import{listPermitRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const MENU_ID_FLAG={'name':a151_0x336e15(0x181),'type':a151_0x336e15(0x1cc),'required':!![],'description':a151_0x336e15(0x18c)};export const ROLE_REF_FLAG={'name':a151_0x336e15(0x18e),'type':a151_0x336e15(0x19c),'required':!![],'description':a151_0x336e15(0x17a)};export const GRANT_FLAG={'name':'grant','type':a151_0x336e15(0x1c1),'required':![],'description':a151_0x336e15(0x191)};export const REVOKE_FLAG={'name':a151_0x336e15(0x1ce),'type':'boolean','required':![],'description':a151_0x336e15(0x1b2)};export const MENUS_FLAG={'name':a151_0x336e15(0x197),'type':a151_0x336e15(0x19c),'required':!![],'description':a151_0x336e15(0x1ad)};export const DATASETS_FLAG={'name':a151_0x336e15(0x1b7),'type':a151_0x336e15(0x19c),'required':!![],'description':a151_0x336e15(0x1ab)};export const PAGE_SLOT_SPECS=[{'flag':a151_0x336e15(0x18b),'key':'menuPermit','allowSelf':![],'label':a151_0x336e15(0x1b8)},{'flag':'create-roles','key':a151_0x336e15(0x19e),'allowSelf':![],'label':a151_0x336e15(0x1ca)},{'flag':a151_0x336e15(0x183),'key':'dataUpdate','allowSelf':![],'label':a151_0x336e15(0x1a3)},{'flag':a151_0x336e15(0x178),'key':a151_0x336e15(0x19b),'allowSelf':![],'label':a151_0x336e15(0x195)},{'flag':a151_0x336e15(0x19a),'key':'dataDetail','allowSelf':![],'label':'data\x20detail'},{'flag':'export-roles','key':a151_0x336e15(0x18f),'allowSelf':![],'label':a151_0x336e15(0x186)},{'flag':a151_0x336e15(0x1a7),'key':a151_0x336e15(0x1c3),'allowSelf':!![],'label':a151_0x336e15(0x1a4)}];export const PAGE_SET_ROLE_FLAGS=PAGE_SLOT_SPECS[a151_0x336e15(0x1a0)](_0x1580ee=>({'name':_0x1580ee[a151_0x336e15(0x177)],'type':a151_0x336e15(0x19c),'required':![],'description':a151_0x336e15(0x1a1)+_0x1580ee[a151_0x336e15(0x1a2)]+a151_0x336e15(0x1a8)+(_0x1580ee['allowSelf']?a151_0x336e15(0x17b):'')}));export function splitList(_0x4c69ff){const _0x1b4d5f=a151_0x336e15;return _0x4c69ff['split'](',')['map'](_0x273df4=>_0x273df4[_0x1b4d5f(0x180)]())[_0x1b4d5f(0x188)](Boolean);}export function projectRoleRef(_0x5bd7d8){return{'id':_0x5bd7d8['id'],'roleName':_0x5bd7d8['roleName'],'roleType':_0x5bd7d8['roleType']};}export async function resolvePermitRoles(_0x12ede8,_0x5968cb,_0x217c2c){const _0xde2225=a151_0x336e15,_0xf466a5=await listPermitRoles(_0x12ede8,{'needSelf':!![],'needPublic':!![]}),_0x1df45d=[];for(const _0x3a854e of _0x5968cb){const _0x4b3d90=resolveOnePermitRole(_0xf466a5,_0x3a854e);if(!_0x217c2c['allowSelf']&&_0x4b3d90['roleType']==='SELF')throw CliErrors[_0xde2225(0x1bf)](_0xde2225(0x1cb)+_0x217c2c[_0xde2225(0x1a2)]+'.','SELF\x20(row-level)\x20applies\x20only\x20to\x20--row-roles.');if(!_0x1df45d['some'](_0x567f8e=>_0x567f8e['id']===_0x4b3d90['id']))_0x1df45d['push'](_0x4b3d90);}return _0x1df45d;}function a151_0x4b11(_0x3eebac,_0xc4028f){_0x3eebac=_0x3eebac-0x177;const _0xa8448e=a151_0xa844();let _0x4b11b2=_0xa8448e[_0x3eebac];return _0x4b11b2;}function resolveOnePermitRole(_0x3c4621,_0x43ce62){const _0x582a33=a151_0x336e15,_0x462f96=_0x43ce62['trim'](),_0xe4aa00=_0x462f96[_0x582a33(0x17d)]();if(_0xe4aa00==='SELF'||_0xe4aa00===_0x582a33(0x1ac)){const _0x57ad4f=_0x3c4621[_0x582a33(0x1c7)](_0x169e63=>_0x169e63[_0x582a33(0x1b6)]===_0xe4aa00);if(!_0x57ad4f)throw CliErrors[_0x582a33(0x1bf)](_0x582a33(0x199)+_0xe4aa00+_0x582a33(0x194));return _0x57ad4f;}if(/^-?\d+$/[_0x582a33(0x185)](_0x462f96)){const _0x3c6077=Number(_0x462f96),_0x2a9e05=_0x3c4621[_0x582a33(0x1c7)](_0x57935a=>_0x57935a['id']===_0x3c6077);if(!_0x2a9e05)throw CliErrors[_0x582a33(0x1bf)](_0x582a33(0x1a6)+_0x3c6077+_0x582a33(0x1cd),'Run\x20`role\x20list`.');return _0x2a9e05;}const _0x2ea9bf=_0x3c4621[_0x582a33(0x188)](_0x14d49e=>_0x14d49e[_0x582a33(0x182)]===_0x462f96);if(_0x2ea9bf[_0x582a33(0x1cf)]===0x0)throw CliErrors[_0x582a33(0x1bf)](_0x582a33(0x1c6)+_0x462f96+_0x582a33(0x1c0),_0x582a33(0x1c4));if(_0x2ea9bf[_0x582a33(0x1cf)]>0x1)throw CliErrors[_0x582a33(0x1bf)]('Role\x20\x22'+_0x462f96+_0x582a33(0x1c9)+_0x2ea9bf['map'](_0x1127ff=>_0x1127ff['id'])[_0x582a33(0x1b4)](',\x20')+').','Disambiguate\x20with\x20an\x20id.');return _0x2ea9bf[0x0];}export function projectPageSlot(_0x135a0f){const _0x5d3563=a151_0x336e15;if(!_0x135a0f)return null;return{'resourceCode':_0x135a0f[_0x5d3563(0x18a)],'roles':(_0x135a0f['rolePermit']??[])[_0x5d3563(0x1a0)](projectRoleRef)};}export function projectPagePermit(_0xd4b537){const _0x13fecd=a151_0x336e15,_0x2c4514={'menuId':_0xd4b537[_0x13fecd(0x190)],'appCode':_0xd4b537[_0x13fecd(0x1b0)],'menuPermit':projectPageSlot(_0xd4b537[_0x13fecd(0x184)])};for(const _0x4dc8b2 of PAGE_SLOT_SPECS){if(_0x4dc8b2[_0x13fecd(0x19d)]===_0x13fecd(0x184))continue;_0x2c4514[_0x4dc8b2[_0x13fecd(0x19d)]]=projectPageSlot(_0xd4b537[_0x4dc8b2[_0x13fecd(0x19d)]]);}return _0x2c4514;}function a151_0xa844(){const _0x391c46=['dataCreate','action','map','Roles\x20for\x20','label','data\x20update','row\x20visibility','pageNodeList','Role\x20id\x20','row-roles','\x20(comma-separated\x20SELF/ALL/id/name)','12gHbpXI','resourceName','Comma-separated\x20datasetCodes\x20to\x20revoke\x20API\x20access\x20for','ALL','Comma-separated\x20menu\x20resourceCodes\x20to\x20grant/revoke','flagMissing','datasetCode','appCode','406244MhvudG','Revoke\x20access\x20to\x20the\x20listed\x20resources','Pass\x20--role\x20<id|name>.','join','102SCECxg','roleType','datasets','menu\x20visibility','set','apiList','139644yRfJfy','grant','330YKMEeU','allowedActions','validation','\x22\x20not\x20found.','boolean','bool','dataPermit','Run\x20`role\x20list`,\x20or\x20use\x20SELF/ALL/<id>.','1378428MKWLbP','Role\x20\x22','find','14091VWXUOA','\x22\x20is\x20ambiguous\x20(ids:\x20','data\x20create','SELF\x20is\x20not\x20allowed\x20for\x20','number','\x20not\x20found.','revoke','length','22315953KlgvcY','flag','delete-roles','3904zEoPUN','Role\x20id\x20or\x20role\x20name',';\x20SELF\x20=\x20only\x20own\x20rows','get','toUpperCase','entries','164283xdxUeN','trim','menu-id','roleName','update-roles','menuPermit','test','data\x20export','Missing\x20action.','filter','str','resourceCode','menu-roles','Menu\x20id\x20(from\x20`menu\x20list`)','419285nIFnHD','role','dataExport','menuId','Grant\x20access\x20to\x20the\x20listed\x20resources','Pass\x20exactly\x20one\x20of\x20--grant\x20/\x20--revoke.','--grant\x20and\x20--revoke\x20are\x20mutually\x20exclusive.','\x20is\x20not\x20available\x20for\x20this\x20app.','data\x20delete','84RZxflm','menus','access','Special\x20role\x20','detail-roles','dataDelete','string','key'];a151_0xa844=function(){return _0x391c46;};return a151_0xa844();}export function flattenMenuResources(_0x580554){const _0x4be453=new Map(),_0x4c7f65=_0x4a2f9b=>{const _0x14b63b=a151_0x4b11;for(const _0x276479 of _0x4a2f9b??[]){_0x4be453[_0x14b63b(0x1b9)](_0x276479['resourceCode'],{'resourceCode':_0x276479[_0x14b63b(0x18a)],'resourceName':_0x276479['resourceName'],'action':_0x276479[_0x14b63b(0x1be)]?.[0x0]??'0'});if(_0x276479[_0x14b63b(0x1a5)])_0x4c7f65(_0x276479[_0x14b63b(0x1a5)]);}};return _0x4c7f65(_0x580554),_0x4be453;}export function flattenApiResources(_0x487d62){const _0x395a51=a151_0x336e15,_0x25fad5=new Map(),_0x2d8cd1=new Map();for(const _0x204b40 of _0x487d62){const _0xa43fb4=_0x204b40[_0x395a51(0x1ba)]??{};for(const [_0x1c4e40,_0x357bf5]of Object[_0x395a51(0x17e)](_0xa43fb4)){_0x25fad5[_0x395a51(0x1b9)](_0x1c4e40,{'resourceCode':_0x1c4e40,'resourceName':_0x204b40[_0x395a51(0x1aa)],'datasetCode':_0x204b40[_0x395a51(0x1af)],'action':_0x357bf5?.[0x0]??'0'});const _0x1a4ac6=_0x2d8cd1[_0x395a51(0x17c)](_0x204b40['datasetCode'])??[];_0x1a4ac6['push'](_0x1c4e40),_0x2d8cd1[_0x395a51(0x1b9)](_0x204b40[_0x395a51(0x1af)],_0x1a4ac6);}}return{'byCode':_0x25fad5,'byDataset':_0x2d8cd1};}export function buildPermits(_0x32a3fe,_0x9c2c3f){const _0x492be4=a151_0x336e15,_0x5894d8={};for(const [_0x2d2794,_0x1a8b46]of _0x32a3fe){const _0xfebdd8=_0x9c2c3f[_0x492be4(0x17c)](_0x2d2794)??_0x1a8b46[_0x492be4(0x19f)];_0x5894d8[_0x2d2794]=[_0xfebdd8];}return _0x5894d8;}export function readRoleRef(_0x2efb3b){const _0xa386e9=a151_0x336e15,_0x2d0c0d=_0x2efb3b[_0xa386e9(0x189)]('role')[_0xa386e9(0x180)]();if(!_0x2d0c0d)throw CliErrors[_0xa386e9(0x1ae)](_0xa386e9(0x18e),_0xa386e9(0x1b3));return _0x2d0c0d;}export function readGrantRevoke(_0x40a51c){const _0xf248bf=a151_0x336e15,_0x39721a=_0x40a51c[_0xf248bf(0x1c2)](_0xf248bf(0x1bc)),_0x4e5c42=_0x40a51c['bool'](_0xf248bf(0x1ce));if(_0x39721a&&_0x4e5c42)throw CliErrors[_0xf248bf(0x1bf)](_0xf248bf(0x193));if(!_0x39721a&&!_0x4e5c42)throw CliErrors['validation'](_0xf248bf(0x187),_0xf248bf(0x192));return _0x39721a?_0xf248bf(0x198):'0';}
@@ -1 +1 @@
1
- (function(_0x44272a,_0x150a47){const _0xfdd3ea=a152_0x4601,_0x2e8a76=_0x44272a();while(!![]){try{const _0x2c26d5=parseInt(_0xfdd3ea(0xfd))/0x1+parseInt(_0xfdd3ea(0xf9))/0x2+-parseInt(_0xfdd3ea(0x104))/0x3*(parseInt(_0xfdd3ea(0xf3))/0x4)+-parseInt(_0xfdd3ea(0x107))/0x5*(-parseInt(_0xfdd3ea(0x103))/0x6)+parseInt(_0xfdd3ea(0xfb))/0x7+parseInt(_0xfdd3ea(0xf4))/0x8*(-parseInt(_0xfdd3ea(0xff))/0x9)+-parseInt(_0xfdd3ea(0x105))/0xa*(parseInt(_0xfdd3ea(0x109))/0xb);if(_0x2c26d5===_0x150a47)break;else _0x2e8a76['push'](_0x2e8a76['shift']());}catch(_0x7ce1e7){_0x2e8a76['push'](_0x2e8a76['shift']());}}}(a152_0xb0c5,0xcd588));import{existsSync}from'node:fs';function a152_0x4601(_0x4b1dc8,_0x16f918){_0x4b1dc8=_0x4b1dc8-0xf1;const _0xb0c5b5=a152_0xb0c5();let _0x460150=_0xb0c5b5[_0x4b1dc8];return _0x460150;}function a152_0xb0c5(){const _0x44f256=['28EPOuvb','304FJGxjF','√\x20Project\x20Name:\x20','env','length','log','2300238PRBghV','Skipped','2964241EEZKUU','Directory\x20\x22','1523293telMDB','my-app','199701cHTOuw','No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','resolve','√\x20Login\x20status:\x20','6isCqtT','310653KNQTcG','10bIROFy','trim','3021610iEdLbI','cwd','14212682EVKsPW','Project\x20name:','Login\x20failed','Logged\x20in','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','green','Not\x20set','cyan'];a152_0xb0c5=function(){return _0x44f256;};return a152_0xb0c5();}import a152_0x10b956 from'node:path';import a152_0x393c88 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(_0x4a6e30,_0x108329,_0x44deb7){const _0xa2689c=a152_0x4601,_0x8428c2=_0xa2689c(0xfe),_0x39b06a=readConfig(),_0x3f1f90=typeof _0x39b06a[_0xa2689c(0xf6)]==='string'?_0x39b06a[_0xa2689c(0xf6)]:undefined,_0x3a7fd3=await input({'message':_0xa2689c(0x10a),'default':_0x8428c2,'validate':_0x485058=>{const _0x34da37=_0xa2689c,_0x327392=_0x485058[_0x34da37(0x106)]()||_0x8428c2;if(_0x327392[_0x34da37(0xf7)]>0x32)return'Project\x20name\x20cannot\x20exceed\x2050\x20characters';const _0x34556f=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x327392&&!_0x34556f['test'](_0x327392))return _0x34da37(0x10d);const _0x1e1ca1=a152_0x10b956[_0x34da37(0x101)](process[_0x34da37(0x108)](),_0x327392);if(existsSync(_0x1e1ca1))return _0x34da37(0xfc)+_0x327392+'\x22\x20already\x20exists';return!![];}});console[_0xa2689c(0xf8)](a152_0x393c88[_0xa2689c(0x10e)](_0xa2689c(0xf5)+a152_0x393c88['cyan'](_0x3a7fd3)));const _0x3f6512=await selectSingleAppcode(_0x44deb7);console[_0xa2689c(0xf8)](a152_0x393c88['green']('√\x20App\x20Code:\x20'+a152_0x393c88[_0xa2689c(0xf2)](_0x3f6512||_0xa2689c(0xf1))));if(_0x3f6512){const _0x40191a=await getIsSessionValid();if(!_0x40191a){const _0x35872d=await confirm({'message':_0xa2689c(0x100),'default':!![]});if(_0x35872d){const _0x3295e2=await authServer({'silent':!![]});console[_0xa2689c(0xf8)](a152_0x393c88[_0xa2689c(0x10e)](_0xa2689c(0x102)+a152_0x393c88['cyan'](_0x3295e2?_0xa2689c(0x10c):_0xa2689c(0x10b))));}else console[_0xa2689c(0xf8)](a152_0x393c88[_0xa2689c(0x10e)](_0xa2689c(0x102)+a152_0x393c88[_0xa2689c(0xf2)](_0xa2689c(0xfa))));}await _0x4a6e30({'projectName':_0x3a7fd3,'appCode':_0x3f6512,'env':_0x108329||_0x3f1f90||'production'});}else await _0x4a6e30({'projectName':_0x3a7fd3,'env':_0x108329||_0x3f1f90||'production'});}
1
+ (function(_0x50b78c,_0x204239){const _0x16289b=a152_0x53a1,_0x8d8585=_0x50b78c();while(!![]){try{const _0xe87d0f=-parseInt(_0x16289b(0x209))/0x1+parseInt(_0x16289b(0x1f4))/0x2*(parseInt(_0x16289b(0x1ed))/0x3)+-parseInt(_0x16289b(0x1f5))/0x4+-parseInt(_0x16289b(0x200))/0x5*(-parseInt(_0x16289b(0x1ec))/0x6)+-parseInt(_0x16289b(0x20c))/0x7+parseInt(_0x16289b(0x206))/0x8*(-parseInt(_0x16289b(0x207))/0x9)+parseInt(_0x16289b(0x202))/0xa*(parseInt(_0x16289b(0x1f3))/0xb);if(_0xe87d0f===_0x204239)break;else _0x8d8585['push'](_0x8d8585['shift']());}catch(_0x4e6c07){_0x8d8585['push'](_0x8d8585['shift']());}}}(a152_0x5c70,0x1fa7c));import{existsSync}from'node:fs';import a152_0x17e19c from'node:path';import a152_0x24c42f from'chalk';import{input,confirm}from'@inquirer/prompts';import{getIsSessionValid}from'../../../auth/is-session-valid.js';function a152_0x5c70(){const _0x564366=['No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','Directory\x20\x22','test','10mYpZqK','my-app','10TSKUaa','Skipped','Project\x20name:','length','48qWXXYJ','85167KYSFni','resolve','59695ueovhM','Project\x20name\x20cannot\x20exceed\x2050\x20characters','green','135261AzAoJf','Not\x20set','58044daPIwB','15ebjpsO','√\x20Login\x20status:\x20','Logged\x20in','Login\x20failed','cwd','log','4841111HmHMkX','23860RqFVQi','1014572ZwWMAm','production','√\x20App\x20Code:\x20','cyan','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','string','\x22\x20already\x20exists','env'];a152_0x5c70=function(){return _0x564366;};return a152_0x5c70();}import{authServer}from'../../../auth/auth-server.js';import{readConfig}from'../../../utils/config.js';function a152_0x53a1(_0x287863,_0x39ab52){_0x287863=_0x287863-0x1ec;const _0x5c70a9=a152_0x5c70();let _0x53a145=_0x5c70a9[_0x287863];return _0x53a145;}import{selectSingleAppcode}from'../../../commands/common/app-selector.js';export async function guidedCreateProject(_0x386df5,_0x50c7a9,_0x3063ff){const _0x4210ac=a152_0x53a1,_0x1656ea=_0x4210ac(0x201),_0x179b46=readConfig(),_0x49b68e=typeof _0x179b46['env']===_0x4210ac(0x1fa)?_0x179b46[_0x4210ac(0x1fc)]:undefined,_0x67581=await input({'message':_0x4210ac(0x204),'default':_0x1656ea,'validate':_0x51284f=>{const _0x33401d=_0x4210ac,_0x249841=_0x51284f['trim']()||_0x1656ea;if(_0x249841[_0x33401d(0x205)]>0x32)return _0x33401d(0x20a);const _0x396483=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x249841&&!_0x396483[_0x33401d(0x1ff)](_0x249841))return _0x33401d(0x1f9);const _0x1e70f7=a152_0x17e19c[_0x33401d(0x208)](process[_0x33401d(0x1f1)](),_0x249841);if(existsSync(_0x1e70f7))return _0x33401d(0x1fe)+_0x249841+_0x33401d(0x1fb);return!![];}});console[_0x4210ac(0x1f2)](a152_0x24c42f[_0x4210ac(0x20b)]('√\x20Project\x20Name:\x20'+a152_0x24c42f[_0x4210ac(0x1f8)](_0x67581)));const _0x3f7c5c=await selectSingleAppcode(_0x3063ff);console['log'](a152_0x24c42f[_0x4210ac(0x20b)](_0x4210ac(0x1f7)+a152_0x24c42f[_0x4210ac(0x1f8)](_0x3f7c5c||_0x4210ac(0x20d))));if(_0x3f7c5c){const _0x2ce32e=await getIsSessionValid();if(!_0x2ce32e){const _0x31a555=await confirm({'message':_0x4210ac(0x1fd),'default':!![]});if(_0x31a555){const _0x543513=await authServer({'silent':!![]});console[_0x4210ac(0x1f2)](a152_0x24c42f[_0x4210ac(0x20b)](_0x4210ac(0x1ee)+a152_0x24c42f[_0x4210ac(0x1f8)](_0x543513?_0x4210ac(0x1ef):_0x4210ac(0x1f0))));}else console['log'](a152_0x24c42f[_0x4210ac(0x20b)](_0x4210ac(0x1ee)+a152_0x24c42f[_0x4210ac(0x1f8)](_0x4210ac(0x203))));}await _0x386df5({'projectName':_0x67581,'appCode':_0x3f7c5c,'env':_0x50c7a9||_0x49b68e||'production'});}else await _0x386df5({'projectName':_0x67581,'env':_0x50c7a9||_0x49b68e||_0x4210ac(0x1f6)});}
@@ -1 +1 @@
1
- function a153_0x2b9e(_0x12c708,_0x43d6a4){_0x12c708=_0x12c708-0x1eb;const _0x34834e=a153_0x3483();let _0x2b9ebf=_0x34834e[_0x12c708];return _0x2b9ebf;}function a153_0x3483(){const _0x3b2025=['4248090goydgA','1254470Qsxohv','28OyfZsN','8JodqOh','214050YtSweM','186fmjpOK','11693QfHerm','42381BrMPvf','now','48330YEAEDB','503836dQCyzu','3abkmxr'];a153_0x3483=function(){return _0x3b2025;};return a153_0x3483();}(function(_0x550e2f,_0x540eb1){const _0x4b8893=a153_0x2b9e,_0x37d947=_0x550e2f();while(!![]){try{const _0x12fb6f=-parseInt(_0x4b8893(0x1f0))/0x1*(-parseInt(_0x4b8893(0x1ec))/0x2)+parseInt(_0x4b8893(0x1f5))/0x3*(parseInt(_0x4b8893(0x1f4))/0x4)+-parseInt(_0x4b8893(0x1f3))/0x5*(parseInt(_0x4b8893(0x1ef))/0x6)+parseInt(_0x4b8893(0x1eb))/0x7*(-parseInt(_0x4b8893(0x1ed))/0x8)+-parseInt(_0x4b8893(0x1f1))/0x9+-parseInt(_0x4b8893(0x1ee))/0xa+parseInt(_0x4b8893(0x1f6))/0xb;if(_0x12fb6f===_0x540eb1)break;else _0x37d947['push'](_0x37d947['shift']());}catch(_0x33b49f){_0x37d947['push'](_0x37d947['shift']());}}}(a153_0x3483,0x29b81));export function formatElapsed(_0x31c6df){const _0xf43f0=a153_0x2b9e,_0x102d83=Date[_0xf43f0(0x1f2)]()-_0x31c6df;if(_0x102d83<0x3e8)return _0x102d83+'ms';const _0x302dbd=(_0x102d83/0x3e8)['toFixed'](0x2),_0x2e8ccd=_0x302dbd['replace'](/\.?0+$/u,'');return _0x2e8ccd+'s';}
1
+ function a153_0x2e9e(_0x60b9d,_0x573845){_0x60b9d=_0x60b9d-0xbe;const _0x3e8b42=a153_0x3e8b();let _0x2e9e6d=_0x3e8b42[_0x60b9d];return _0x2e9e6d;}(function(_0x3af756,_0x178435){const _0x3a8ac7=a153_0x2e9e,_0x2da2fb=_0x3af756();while(!![]){try{const _0x435d05=-parseInt(_0x3a8ac7(0xc2))/0x1+-parseInt(_0x3a8ac7(0xc9))/0x2*(parseInt(_0x3a8ac7(0xc3))/0x3)+-parseInt(_0x3a8ac7(0xc6))/0x4+-parseInt(_0x3a8ac7(0xc1))/0x5+parseInt(_0x3a8ac7(0xc4))/0x6+parseInt(_0x3a8ac7(0xc5))/0x7*(parseInt(_0x3a8ac7(0xca))/0x8)+parseInt(_0x3a8ac7(0xbf))/0x9*(parseInt(_0x3a8ac7(0xc0))/0xa);if(_0x435d05===_0x178435)break;else _0x2da2fb['push'](_0x2da2fb['shift']());}catch(_0x1a7044){_0x2da2fb['push'](_0x2da2fb['shift']());}}}(a153_0x3e8b,0x1dc99));export function formatElapsed(_0x1e72a7){const _0x54e08d=a153_0x2e9e,_0x47448b=Date[_0x54e08d(0xc8)]()-_0x1e72a7;if(_0x47448b<0x3e8)return _0x47448b+'ms';const _0x4806e9=(_0x47448b/0x3e8)[_0x54e08d(0xc7)](0x2),_0x1281f4=_0x4806e9[_0x54e08d(0xbe)](/\.?0+$/u,'');return _0x1281f4+'s';}function a153_0x3e8b(){const _0x225eb3=['now','670JnbnUP','8vviviz','replace','3396303nyZDVr','10IYHjal','1154035EctZgG','48138zNESyT','1311fEjRqU','1225140pijcPa','469987EtOjiT','405396ZOIiRH','toFixed'];a153_0x3e8b=function(){return _0x225eb3;};return a153_0x3e8b();}
@@ -1 +1 @@
1
- (function(_0x504621,_0x4f3e69){const _0x59914b=a154_0x41a3,_0x332cbd=_0x504621();while(!![]){try{const _0x4b6deb=-parseInt(_0x59914b(0xa9))/0x1*(parseInt(_0x59914b(0xcb))/0x2)+-parseInt(_0x59914b(0xb0))/0x3*(-parseInt(_0x59914b(0xcd))/0x4)+parseInt(_0x59914b(0xc8))/0x5+parseInt(_0x59914b(0xe1))/0x6*(parseInt(_0x59914b(0xa6))/0x7)+parseInt(_0x59914b(0xc4))/0x8+-parseInt(_0x59914b(0xbf))/0x9+parseInt(_0x59914b(0xb6))/0xa*(-parseInt(_0x59914b(0xe5))/0xb);if(_0x4b6deb===_0x4f3e69)break;else _0x332cbd['push'](_0x332cbd['shift']());}catch(_0x4c4c4f){_0x332cbd['push'](_0x332cbd['shift']());}}}(a154_0xd14c,0x9d810));import a154_0x146989 from'path';import a154_0x506a51 from'fs';import a154_0x18d149 from'chalk';import a154_0x2b0851 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';function a154_0x41a3(_0x5a2752,_0x311745){_0x5a2752=_0x5a2752-0x85;const _0xd14c68=a154_0xd14c();let _0x41a3a8=_0xd14c68[_0x5a2752];return _0x41a3a8;}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(_0x2f952e){const _0x180390=a154_0x41a3,_0xd034ac=await checkCliVersion();(_0xd034ac[_0x180390(0xaf)]||_0xd034ac[_0x180390(0xe3)])&&(printCliUpgradeWarning(_0xd034ac),assertCliVersionSupported(_0xd034ac),logger[_0x180390(0xbe)]('create',_0x180390(0xcf),{'currentVersion':_0xd034ac[_0x180390(0xa5)],'stableVersion':_0xd034ac['stableVersion'],'minimumVersion':_0xd034ac[_0x180390(0xc5)],'needsUpgrade':_0xd034ac[_0x180390(0xaf)],'belowMinimum':_0xd034ac[_0x180390(0xe3)]}));if(_0x2f952e[_0x180390(0xb7)]&&_0x2f952e['appCode'])await runCreate({'projectName':_0x2f952e[_0x180390(0xb7)],'appCode':_0x2f952e[_0x180390(0xa8)],'env':_0x2f952e[_0x180390(0xb4)]},_0x2f952e);else{if(_0x2f952e[_0x180390(0xb7)]){const _0x100bcb=await selectSingleAppcode(_0x2f952e[_0x180390(0x98)]);await runCreate({'projectName':_0x2f952e[_0x180390(0xb7)],'appCode':_0x100bcb||undefined,'env':_0x2f952e[_0x180390(0xb4)]},_0x2f952e);}else await guidedCreateProject(_0x56c384=>runCreate(_0x56c384,_0x2f952e),_0x2f952e[_0x180390(0xb4)],_0x2f952e[_0x180390(0x98)]);}}function a154_0xd14c(){const _0x25c0ba=['\x20already\x20exists','Project\x20name\x20cannot\x20be\x20empty','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','√\x20package.json\x20updated:\x20name=','production','modelCount','\x20&&\x20','√\x20Pulled\x20','\x20\x202.\x20Pull\x20API\x20configuration:\x20','fail','\x20|\x20AppCode:\x20','constants','Project\x20name:\x20','length','existsSync','\x20√\x20','defaultApp','cookie','1.0.0','Install\x20dependencies','success','\x20api\x20pull','accessSync','🚀\x20Next\x20Steps:','setLogPath','join','API\x20configuration\x20pulled:\x20','W_OK','\x20config\x20set\x20appcode\x20<app-code>\x27','API\x20配置拉取异常','currentVersion','2037973PcuGvX','配置应用AppCode:\x20','appCode','1xSgHEB','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','message','chdir','readFileSync','Format\x20code','needsUpgrade','555498vRrSBE','writeFileSync','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','keys','env','name','190700YKcMCK','projectCode','Project\x20directory\x20','配置应用AppCode失败','项目创建完成:\x20','gray','\x20Generated\x20by\x20rabetbase\x20cli\x20','toLocaleString','info','11578851QUhOHT','...','projectName','cd\x20','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','8890328szNDoo','minimumVersion','package.json','utf8','1548070IiDTAK','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','cwd','50426HPuTXT','start','16WIwHHp','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','CLI\x20版本检查','log','error','\x20|\x20Default:\x20','create','version','warn','*\x20Configuring\x20AppCode\x20for\x20project\x20','dirname','repeat','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','resolve','*\x20Pulling\x20API\x20configuration...','cyan','\x20model(s)','bold','√\x20Configuration\x20file\x20created,\x20Apps:\x20','Copy\x20project\x20files','6AbnIoj','parse','belowMinimum','\x20run\x20start','286OIEyEO','green','stop'];a154_0xd14c=function(){return _0x25c0ba;};return a154_0xd14c();}async function runCreate(_0x5ccf87,_0x10cf26){const _0x4dcf6a=a154_0x41a3;if(!_0x5ccf87[_0x4dcf6a(0xc1)]||_0x5ccf87[_0x4dcf6a(0xc1)]['trim']()==='')throw new Error(_0x4dcf6a(0x88));const _0x30e36f=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x30e36f['test'](_0x5ccf87[_0x4dcf6a(0xc1)]))throw new Error(_0x4dcf6a(0xc9));if(_0x5ccf87[_0x4dcf6a(0xc1)]['length']>0x64)throw new Error('Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters');const _0x5e478a=a154_0x146989[_0x4dcf6a(0xda)](process[_0x4dcf6a(0xca)](),_0x5ccf87[_0x4dcf6a(0xc1)]);if(a154_0x506a51['existsSync'](_0x5e478a))throw new Error(_0x4dcf6a(0xb8)+_0x5ccf87[_0x4dcf6a(0xc1)]+_0x4dcf6a(0x87));try{a154_0x506a51[_0x4dcf6a(0x9d)](a154_0x146989[_0x4dcf6a(0xd7)](_0x5e478a),a154_0x506a51[_0x4dcf6a(0x92)][_0x4dcf6a(0xa2)]);}catch{throw new Error(_0x4dcf6a(0xce));}logger[_0x4dcf6a(0x9f)](_0x5e478a),logger[_0x4dcf6a(0xbe)](_0x4dcf6a(0xd3),'开始创建项目:\x20'+_0x5ccf87[_0x4dcf6a(0xc1)],{'projectDir':_0x5e478a,'appCode':_0x5ccf87[_0x4dcf6a(0xa8)]}),console['log'](),console['log'](a154_0x18d149[_0x4dcf6a(0x85)](_0x4dcf6a(0x96))+_0x4dcf6a(0x93)+a154_0x18d149[_0x4dcf6a(0x85)](_0x5ccf87[_0x4dcf6a(0xc1)])+(_0x5ccf87['appCode']?_0x4dcf6a(0x91)+a154_0x18d149[_0x4dcf6a(0xdc)](_0x5ccf87[_0x4dcf6a(0xa8)]):''));try{await runTask(_0x4dcf6a(0xe0),()=>copyProjectTemplate(_0x5ccf87[_0x4dcf6a(0xc1)])),await updatePackageJsonName(_0x5ccf87[_0x4dcf6a(0xc1)]),await runTask(_0x4dcf6a(0x9a),()=>installDependencies(_0x5ccf87[_0x4dcf6a(0xc1)])),await runTask(_0x4dcf6a(0xae),()=>formatProjectCode(_0x5ccf87['projectName'])),await configureAppCode(_0x5ccf87[_0x4dcf6a(0xc1)],_0x5ccf87[_0x4dcf6a(0xa8)]||'',_0x5ccf87[_0x4dcf6a(0xb4)]);let _0x3a22fe=![];if(_0x5ccf87[_0x4dcf6a(0xa8)]){console[_0x4dcf6a(0xd0)](_0x4dcf6a(0xdb));const _0x5c5cf4=process[_0x4dcf6a(0xca)]();try{process[_0x4dcf6a(0xac)](_0x5e478a);const _0xdd068c=_0x5ccf87[_0x4dcf6a(0xb4)]||_0x4dcf6a(0x8b);initEnv(_0xdd068c);const {configArray:_0x35becd}=await fetchModelList(_0x5ccf87[_0x4dcf6a(0xa8)],_0x10cf26[_0x4dcf6a(0x98)]||''),_0x48ddc5=DEFAULT_API_DIR,_0x7e9915=await generateApiFile(_0x35becd,'',_0x5ccf87[_0x4dcf6a(0xa8)],!![],_0xdd068c,_0x48ddc5);console[_0x4dcf6a(0xd0)](_0x4dcf6a(0x8e)+_0x35becd[_0x4dcf6a(0x94)]+'\x20dataset(s),\x20generated\x20'+_0x7e9915[_0x4dcf6a(0x8c)]+_0x4dcf6a(0xdd)),logger[_0x4dcf6a(0xbe)](_0x4dcf6a(0xd3),_0x4dcf6a(0xa1)+_0x5ccf87[_0x4dcf6a(0xa8)]);}catch(_0xad3697){_0x3a22fe=!![],console[_0x4dcf6a(0xd0)](_0x4dcf6a(0xaa)),logger['warn'](_0x4dcf6a(0xd3),_0x4dcf6a(0xa4),{'error':_0xad3697 instanceof Error?_0xad3697[_0x4dcf6a(0xab)]:String(_0xad3697)});}finally{process[_0x4dcf6a(0xac)](_0x5c5cf4);}}logger[_0x4dcf6a(0x9b)](_0x4dcf6a(0xd3),_0x4dcf6a(0xba)+_0x5ccf87[_0x4dcf6a(0xc1)]),console[_0x4dcf6a(0xd0)](),console['log'](a154_0x18d149[_0x4dcf6a(0x85)]('─'[_0x4dcf6a(0xd8)](0x3c))),console['log'](a154_0x18d149[_0x4dcf6a(0xdc)][_0x4dcf6a(0xde)](_0x4dcf6a(0x9e))),console[_0x4dcf6a(0xd0)](),console[_0x4dcf6a(0xd0)]('\x20\x201.\x20Start\x20project:\x20'+a154_0x18d149[_0x4dcf6a(0xdc)][_0x4dcf6a(0xde)](_0x4dcf6a(0xc2)+_0x5ccf87[_0x4dcf6a(0xc1)]+_0x4dcf6a(0x8d)+CLI_BIN_NAME+_0x4dcf6a(0xe4))),_0x3a22fe&&console[_0x4dcf6a(0xd0)](_0x4dcf6a(0x8f)+a154_0x18d149[_0x4dcf6a(0xdc)]['bold'](CLI_BIN_NAME+_0x4dcf6a(0x9c))),console['log'](a154_0x18d149['green']('─'[_0x4dcf6a(0xd8)](0x3c)));}catch(_0x1a758a){logger[_0x4dcf6a(0xd1)](_0x4dcf6a(0xd3),'项目创建失败:\x20'+_0x5ccf87[_0x4dcf6a(0xc1)],{'error':_0x1a758a instanceof Error?_0x1a758a[_0x4dcf6a(0xab)]:String(_0x1a758a)});try{a154_0x506a51[_0x4dcf6a(0x95)](_0x5e478a)&&(console[_0x4dcf6a(0xd0)](_0x4dcf6a(0xc3)+_0x5e478a),a154_0x506a51['rmSync'](_0x5e478a,{'recursive':!![],'force':!![]}));}catch{logger[_0x4dcf6a(0xd5)]('create','清理项目目录失败:\x20'+_0x5e478a);}throw _0x1a758a;}}async function runTask(_0x3bf40f,_0x40cb67){const _0x195855=a154_0x41a3,_0x477845=a154_0x2b0851(_0x3bf40f+_0x195855(0xc0))[_0x195855(0xcc)]();try{const _0x333db8=await _0x40cb67();_0x477845[_0x195855(0x86)](),console[_0x195855(0xd0)](''+a154_0x18d149['green'](_0x195855(0x96))+_0x3bf40f+'\x20'+a154_0x18d149[_0x195855(0xbb)]('['+_0x333db8+']'));}catch(_0x52ef50){_0x477845[_0x195855(0x90)](_0x3bf40f);throw _0x52ef50;}}async function updatePackageJsonName(_0x1f0038){const _0x194d84=a154_0x41a3,_0x444593=a154_0x146989[_0x194d84(0xda)](process[_0x194d84(0xca)](),_0x1f0038),_0x58154f=a154_0x146989[_0x194d84(0xa0)](_0x444593,_0x194d84(0xc6));try{console['log'](_0x194d84(0xd9));const _0x231020=getRabetbaseCliPackageRoot(),_0x58d054=a154_0x146989[_0x194d84(0xa0)](_0x231020,_0x194d84(0xc6));let _0x11a4af=_0x194d84(0x99);try{const _0x27af8f=JSON['parse'](a154_0x506a51[_0x194d84(0xad)](_0x58d054,_0x194d84(0xc7)));_0x11a4af=_0x27af8f[_0x194d84(0xd4)]||_0x194d84(0x99);}catch{}const _0x2369b9=a154_0x506a51[_0x194d84(0xad)](_0x58154f,_0x194d84(0xc7)),_0x456ab4=JSON['parse'](_0x2369b9);_0x456ab4[_0x194d84(0xb5)]=_0x1f0038,_0x456ab4['description']=_0x1f0038+_0x194d84(0xbc)+_0x11a4af,a154_0x506a51[_0x194d84(0xb1)](_0x58154f,JSON['stringify'](_0x456ab4,null,0x2)+'\x0a',_0x194d84(0xc7)),console[_0x194d84(0xd0)](_0x194d84(0x8a)+_0x1f0038),logger[_0x194d84(0xbe)](_0x194d84(0xd3),'更新\x20package.json\x20name');}catch(_0x33ef47){logger['error']('create','更新\x20package.json\x20失败');throw _0x33ef47;}}async function configureAppCode(_0x4376fe,_0x4da28c,_0x29a0c6){const _0x43bdea=a154_0x41a3,_0x1a03c8=a154_0x146989[_0x43bdea(0xda)](process[_0x43bdea(0xca)](),_0x4376fe),_0x400a90=a154_0x146989[_0x43bdea(0xa0)](_0x1a03c8,NEW_CONFIG_NAME);try{_0x4da28c?console[_0x43bdea(0xd0)](_0x43bdea(0xd6)+_0x4376fe+':\x20'+_0x4da28c):console[_0x43bdea(0xd0)](_0x43bdea(0xb2)+_0x4376fe);const _0x445eb2=getRabetbaseCliPackageRoot(),_0x1b9541=a154_0x146989['join'](_0x445eb2,_0x43bdea(0xc6));let _0x2a8f85=_0x43bdea(0x99);try{const _0x3aa2ff=JSON[_0x43bdea(0xe2)](a154_0x506a51['readFileSync'](_0x1b9541,_0x43bdea(0xc7)));_0x2a8f85=_0x3aa2ff[_0x43bdea(0xd4)]||_0x43bdea(0x99);}catch{}const _0x3c2751=readConfig(),_0x288e86=typeof _0x3c2751[_0x43bdea(0xb4)]==='string'?_0x3c2751[_0x43bdea(0xb4)]:undefined,_0x5a38ac={};for(const _0x21e85e of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x3c2751[_0x21e85e]!=null)_0x5a38ac[_0x21e85e]=_0x3c2751[_0x21e85e];}const _0xe5da45=buildCanonicalProjectConfig(_0x5a38ac,{'appCodes':_0x4da28c?[_0x4da28c]:[],'env':_0x29a0c6||_0x288e86||_0x43bdea(0x8b),'metadata':{'createdAt':new Date()[_0x43bdea(0xbd)](),'version':_0x2a8f85}});writeConfigFile(_0x400a90,_0xe5da45),_0x4da28c?console['log'](_0x43bdea(0xdf)+Object[_0x43bdea(0xb3)](_0xe5da45['apps']||{})[_0x43bdea(0xa0)](',\x20')+_0x43bdea(0xd2)+_0xe5da45[_0x43bdea(0x97)]):console[_0x43bdea(0xd0)](_0x43bdea(0x89)+CLI_BIN_NAME+_0x43bdea(0xa3)),logger[_0x43bdea(0xbe)](_0x43bdea(0xd3),_0x43bdea(0xa7)+_0x4da28c);}catch(_0x413bf0){logger[_0x43bdea(0xd1)](_0x43bdea(0xd3),_0x43bdea(0xb9));}}
1
+ (function(_0x35f8c3,_0x21ac80){const _0x40715b=a154_0x127c,_0x8dbf17=_0x35f8c3();while(!![]){try{const _0x5afe27=-parseInt(_0x40715b(0x174))/0x1+parseInt(_0x40715b(0x193))/0x2+-parseInt(_0x40715b(0x1bc))/0x3+-parseInt(_0x40715b(0x1a7))/0x4+parseInt(_0x40715b(0x1cf))/0x5*(parseInt(_0x40715b(0x195))/0x6)+-parseInt(_0x40715b(0x1c4))/0x7*(-parseInt(_0x40715b(0x1bf))/0x8)+parseInt(_0x40715b(0x196))/0x9*(parseInt(_0x40715b(0x1ba))/0xa);if(_0x5afe27===_0x21ac80)break;else _0x8dbf17['push'](_0x8dbf17['shift']());}catch(_0x16625b){_0x8dbf17['push'](_0x8dbf17['shift']());}}}(a154_0x46f4,0x4d9cc));import a154_0x359673 from'path';import a154_0x2ebb38 from'fs';import a154_0x25b015 from'chalk';import a154_0xc62288 from'ora';function a154_0x127c(_0x3e6afd,_0x59a31a){_0x3e6afd=_0x3e6afd-0x16f;const _0x46f401=a154_0x46f4();let _0x127c1b=_0x46f401[_0x3e6afd];return _0x127c1b;}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(_0x57b57d){const _0x5563f8=a154_0x127c,_0x1c029f=await checkCliVersion();(_0x1c029f[_0x5563f8(0x175)]||_0x1c029f[_0x5563f8(0x176)])&&(printCliUpgradeWarning(_0x1c029f),assertCliVersionSupported(_0x1c029f),logger['info'](_0x5563f8(0x192),_0x5563f8(0x1c0),{'currentVersion':_0x1c029f[_0x5563f8(0x1b6)],'stableVersion':_0x1c029f[_0x5563f8(0x1b8)],'minimumVersion':_0x1c029f[_0x5563f8(0x1ae)],'needsUpgrade':_0x1c029f[_0x5563f8(0x175)],'belowMinimum':_0x1c029f[_0x5563f8(0x176)]}));if(_0x57b57d[_0x5563f8(0x180)]&&_0x57b57d['appCode'])await runCreate({'projectName':_0x57b57d[_0x5563f8(0x180)],'appCode':_0x57b57d[_0x5563f8(0x191)],'env':_0x57b57d[_0x5563f8(0x1c3)]},_0x57b57d);else{if(_0x57b57d['projectCode']){const _0xbff859=await selectSingleAppcode(_0x57b57d[_0x5563f8(0x19a)]);await runCreate({'projectName':_0x57b57d[_0x5563f8(0x180)],'appCode':_0xbff859||undefined,'env':_0x57b57d['env']},_0x57b57d);}else await guidedCreateProject(_0x46d48c=>runCreate(_0x46d48c,_0x57b57d),_0x57b57d[_0x5563f8(0x1c3)],_0x57b57d[_0x5563f8(0x19a)]);}}async function runCreate(_0x25012a,_0x45c374){const _0x238db5=a154_0x127c;if(!_0x25012a[_0x238db5(0x1c6)]||_0x25012a[_0x238db5(0x1c6)][_0x238db5(0x1a1)]()==='')throw new Error(_0x238db5(0x1b4));const _0x1deaaa=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x1deaaa[_0x238db5(0x1c1)](_0x25012a[_0x238db5(0x1c6)]))throw new Error(_0x238db5(0x18c));if(_0x25012a[_0x238db5(0x1c6)][_0x238db5(0x183)]>0x64)throw new Error('Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters');const _0x290371=a154_0x359673[_0x238db5(0x1ac)](process[_0x238db5(0x197)](),_0x25012a[_0x238db5(0x1c6)]);if(a154_0x2ebb38[_0x238db5(0x190)](_0x290371))throw new Error(_0x238db5(0x1bb)+_0x25012a[_0x238db5(0x1c6)]+_0x238db5(0x17d));try{a154_0x2ebb38[_0x238db5(0x1c2)](a154_0x359673[_0x238db5(0x1c7)](_0x290371),a154_0x2ebb38[_0x238db5(0x1a5)][_0x238db5(0x1d2)]);}catch{throw new Error(_0x238db5(0x181));}logger[_0x238db5(0x1b2)](_0x290371),logger[_0x238db5(0x172)](_0x238db5(0x192),_0x238db5(0x178)+_0x25012a[_0x238db5(0x1c6)],{'projectDir':_0x290371,'appCode':_0x25012a[_0x238db5(0x191)]}),console[_0x238db5(0x19b)](),console[_0x238db5(0x19b)](a154_0x25b015[_0x238db5(0x1ca)](_0x238db5(0x173))+_0x238db5(0x19d)+a154_0x25b015[_0x238db5(0x1ca)](_0x25012a['projectName'])+(_0x25012a[_0x238db5(0x191)]?_0x238db5(0x1cb)+a154_0x25b015[_0x238db5(0x186)](_0x25012a['appCode']):''));try{await runTask(_0x238db5(0x1b1),()=>copyProjectTemplate(_0x25012a[_0x238db5(0x1c6)])),await updatePackageJsonName(_0x25012a['projectName']),await runTask(_0x238db5(0x1cc),()=>installDependencies(_0x25012a[_0x238db5(0x1c6)])),await runTask(_0x238db5(0x1b3),()=>formatProjectCode(_0x25012a[_0x238db5(0x1c6)])),await configureAppCode(_0x25012a['projectName'],_0x25012a['appCode']||'',_0x25012a[_0x238db5(0x1c3)]);let _0x1222d8=![];if(_0x25012a[_0x238db5(0x191)]){console['log'](_0x238db5(0x1a6));const _0x3f41c7=process[_0x238db5(0x197)]();try{process[_0x238db5(0x1a9)](_0x290371);const _0x2698ec=_0x25012a[_0x238db5(0x1c3)]||_0x238db5(0x1d1);initEnv(_0x2698ec);const {configArray:_0x1fae43}=await fetchModelList(_0x25012a[_0x238db5(0x191)],_0x45c374[_0x238db5(0x19a)]||''),_0x106d1e=DEFAULT_API_DIR,_0x21ed1e=await generateApiFile(_0x1fae43,'',_0x25012a[_0x238db5(0x191)],!![],_0x2698ec,_0x106d1e);console[_0x238db5(0x19b)](_0x238db5(0x184)+_0x1fae43['length']+'\x20dataset(s),\x20generated\x20'+_0x21ed1e['modelCount']+_0x238db5(0x1d3)),logger[_0x238db5(0x172)](_0x238db5(0x192),_0x238db5(0x17e)+_0x25012a[_0x238db5(0x191)]);}catch(_0x14514e){_0x1222d8=!![],console[_0x238db5(0x19b)](_0x238db5(0x189)),logger[_0x238db5(0x170)](_0x238db5(0x192),_0x238db5(0x17a),{'error':_0x14514e instanceof Error?_0x14514e[_0x238db5(0x1c8)]:String(_0x14514e)});}finally{process['chdir'](_0x3f41c7);}}logger[_0x238db5(0x1b7)](_0x238db5(0x192),_0x238db5(0x1d4)+_0x25012a[_0x238db5(0x1c6)]),console[_0x238db5(0x19b)](),console[_0x238db5(0x19b)](a154_0x25b015[_0x238db5(0x1ca)]('─'[_0x238db5(0x1aa)](0x3c))),console['log'](a154_0x25b015[_0x238db5(0x186)][_0x238db5(0x194)](_0x238db5(0x1a0))),console[_0x238db5(0x19b)](),console[_0x238db5(0x19b)](_0x238db5(0x199)+a154_0x25b015[_0x238db5(0x186)]['bold'](_0x238db5(0x182)+_0x25012a[_0x238db5(0x1c6)]+_0x238db5(0x1af)+CLI_BIN_NAME+_0x238db5(0x1a3))),_0x1222d8&&console[_0x238db5(0x19b)](_0x238db5(0x1ad)+a154_0x25b015['cyan'][_0x238db5(0x194)](CLI_BIN_NAME+'\x20api\x20pull')),console['log'](a154_0x25b015[_0x238db5(0x1ca)]('─'['repeat'](0x3c)));}catch(_0x33c5e8){logger[_0x238db5(0x18b)](_0x238db5(0x192),'项目创建失败:\x20'+_0x25012a[_0x238db5(0x1c6)],{'error':_0x33c5e8 instanceof Error?_0x33c5e8['message']:String(_0x33c5e8)});try{a154_0x2ebb38[_0x238db5(0x190)](_0x290371)&&(console['log'](_0x238db5(0x1ce)+_0x290371),a154_0x2ebb38[_0x238db5(0x177)](_0x290371,{'recursive':!![],'force':!![]}));}catch{logger[_0x238db5(0x170)](_0x238db5(0x192),_0x238db5(0x16f)+_0x290371);}throw _0x33c5e8;}}async function runTask(_0x48a47b,_0x2f6b98){const _0x1f9dee=a154_0x127c,_0x18367c=a154_0xc62288(_0x48a47b+_0x1f9dee(0x1c9))[_0x1f9dee(0x179)]();try{const _0xaf4697=await _0x2f6b98();_0x18367c['stop'](),console['log'](''+a154_0x25b015[_0x1f9dee(0x1ca)](_0x1f9dee(0x173))+_0x48a47b+'\x20'+a154_0x25b015[_0x1f9dee(0x1c5)]('['+_0xaf4697+']'));}catch(_0x5c7e1d){_0x18367c[_0x1f9dee(0x1ab)](_0x48a47b);throw _0x5c7e1d;}}async function updatePackageJsonName(_0x4a9714){const _0x37042b=a154_0x127c,_0x265968=a154_0x359673[_0x37042b(0x1ac)](process['cwd'](),_0x4a9714),_0x106a6b=a154_0x359673[_0x37042b(0x18e)](_0x265968,_0x37042b(0x1bd));try{console[_0x37042b(0x19b)](_0x37042b(0x1be));const _0x533453=getRabetbaseCliPackageRoot(),_0x2c0ca1=a154_0x359673[_0x37042b(0x18e)](_0x533453,'package.json');let _0x4416b8='1.0.0';try{const _0x5821dd=JSON[_0x37042b(0x171)](a154_0x2ebb38[_0x37042b(0x1a8)](_0x2c0ca1,_0x37042b(0x198)));_0x4416b8=_0x5821dd['version']||_0x37042b(0x18d);}catch{}const _0x105f9d=a154_0x2ebb38[_0x37042b(0x1a8)](_0x106a6b,_0x37042b(0x198)),_0x6bdac4=JSON[_0x37042b(0x171)](_0x105f9d);_0x6bdac4[_0x37042b(0x1b0)]=_0x4a9714,_0x6bdac4[_0x37042b(0x18a)]=_0x4a9714+_0x37042b(0x1cd)+_0x4416b8,a154_0x2ebb38[_0x37042b(0x1a4)](_0x106a6b,JSON[_0x37042b(0x17f)](_0x6bdac4,null,0x2)+'\x0a','utf8'),console[_0x37042b(0x19b)](_0x37042b(0x1b5)+_0x4a9714),logger[_0x37042b(0x172)](_0x37042b(0x192),'更新\x20package.json\x20name');}catch(_0x47b698){logger[_0x37042b(0x18b)]('create',_0x37042b(0x19c));throw _0x47b698;}}async function configureAppCode(_0x55537b,_0x3663cf,_0x104e8c){const _0x2496d3=a154_0x127c,_0x477b88=a154_0x359673['resolve'](process[_0x2496d3(0x197)](),_0x55537b),_0x525348=a154_0x359673['join'](_0x477b88,NEW_CONFIG_NAME);try{_0x3663cf?console[_0x2496d3(0x19b)]('*\x20Configuring\x20AppCode\x20for\x20project\x20'+_0x55537b+':\x20'+_0x3663cf):console['log'](_0x2496d3(0x187)+_0x55537b);const _0x2c0c1f=getRabetbaseCliPackageRoot(),_0x520cc1=a154_0x359673[_0x2496d3(0x18e)](_0x2c0c1f,'package.json');let _0x2749ca=_0x2496d3(0x18d);try{const _0x5da8a8=JSON[_0x2496d3(0x171)](a154_0x2ebb38[_0x2496d3(0x1a8)](_0x520cc1,'utf8'));_0x2749ca=_0x5da8a8[_0x2496d3(0x19f)]||_0x2496d3(0x18d);}catch{}const _0x9ab26b=readConfig(),_0x31963f=typeof _0x9ab26b[_0x2496d3(0x1c3)]===_0x2496d3(0x17b)?_0x9ab26b['env']:undefined,_0x50ae48={};for(const _0xb26ec6 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x9ab26b[_0xb26ec6]!=null)_0x50ae48[_0xb26ec6]=_0x9ab26b[_0xb26ec6];}const _0x492654=buildCanonicalProjectConfig(_0x50ae48,{'appCodes':_0x3663cf?[_0x3663cf]:[],'env':_0x104e8c||_0x31963f||_0x2496d3(0x1d1),'metadata':{'createdAt':new Date()[_0x2496d3(0x17c)](),'version':_0x2749ca}});writeConfigFile(_0x525348,_0x492654),_0x3663cf?console[_0x2496d3(0x19b)](_0x2496d3(0x188)+Object[_0x2496d3(0x19e)](_0x492654[_0x2496d3(0x1b9)]||{})['join'](',\x20')+_0x2496d3(0x185)+_0x492654[_0x2496d3(0x1d0)]):console[_0x2496d3(0x19b)](_0x2496d3(0x1a2)+CLI_BIN_NAME+'\x20config\x20set\x20appcode\x20<app-code>\x27'),logger['info'](_0x2496d3(0x192),'配置应用AppCode:\x20'+_0x3663cf);}catch(_0x548e00){logger[_0x2496d3(0x18b)](_0x2496d3(0x192),_0x2496d3(0x18f));}}function a154_0x46f4(){const _0x521fb8=['trim','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','\x20run\x20start','writeFileSync','constants','*\x20Pulling\x20API\x20configuration...','721536IdZMSw','readFileSync','chdir','repeat','fail','resolve','\x20\x202.\x20Pull\x20API\x20configuration:\x20','minimumVersion','\x20&&\x20','name','Copy\x20project\x20files','setLogPath','Format\x20code','Project\x20name\x20cannot\x20be\x20empty','√\x20package.json\x20updated:\x20name=','currentVersion','success','stableVersion','apps','80YhsEkU','Project\x20directory\x20','1421976zsRARG','package.json','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','8QmQozE','CLI\x20版本检查','test','accessSync','env','3224431dLpbUq','gray','projectName','dirname','message','...','green','\x20|\x20AppCode:\x20','Install\x20dependencies','\x20Generated\x20by\x20rabetbase\x20cli\x20','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','30mIzwXS','defaultApp','production','W_OK','\x20model(s)','项目创建完成:\x20','清理项目目录失败:\x20','warn','parse','info','\x20√\x20','499036OLSZQU','needsUpgrade','belowMinimum','rmSync','开始创建项目:\x20','start','API\x20配置拉取异常','string','toLocaleString','\x20already\x20exists','API\x20configuration\x20pulled:\x20','stringify','projectCode','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','cd\x20','length','√\x20Pulled\x20','\x20|\x20Default:\x20','cyan','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','√\x20Configuration\x20file\x20created,\x20Apps:\x20','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','description','error','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','1.0.0','join','配置应用AppCode失败','existsSync','appCode','create','229270UCjtNg','bold','609972MuuSSv','321831dkysEt','cwd','utf8','\x20\x201.\x20Start\x20project:\x20','cookie','log','更新\x20package.json\x20失败','Project\x20name:\x20','keys','version','🚀\x20Next\x20Steps:'];a154_0x46f4=function(){return _0x521fb8;};return a154_0x46f4();}
@@ -1 +1 @@
1
- (function(_0x1abac6,_0x547970){const _0xd93187=a155_0x2db8,_0x2ae7de=_0x1abac6();while(!![]){try{const _0x133fca=-parseInt(_0xd93187(0x129))/0x1*(parseInt(_0xd93187(0x126))/0x2)+-parseInt(_0xd93187(0x12d))/0x3*(parseInt(_0xd93187(0x138))/0x4)+parseInt(_0xd93187(0x141))/0x5*(parseInt(_0xd93187(0x120))/0x6)+-parseInt(_0xd93187(0x14c))/0x7+parseInt(_0xd93187(0x11e))/0x8*(parseInt(_0xd93187(0x133))/0x9)+-parseInt(_0xd93187(0x139))/0xa+parseInt(_0xd93187(0x122))/0xb;if(_0x133fca===_0x547970)break;else _0x2ae7de['push'](_0x2ae7de['shift']());}catch(_0x5001b4){_0x2ae7de['push'](_0x2ae7de['shift']());}}}(a155_0x2513,0xcf1a4));import a155_0x9a620b from'path';import a155_0x52e829 from'fs/promises';function a155_0x2db8(_0x5a05ac,_0x18e863){_0x5a05ac=_0x5a05ac-0x11a;const _0x2513d9=a155_0x2513();let _0x2db8d3=_0x2513d9[_0x5a05ac];return _0x2db8d3;}import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{readConfig}from'../../../utils/config.js';import{getCliVersion}from'../../../utils/version.js';import{CliErrors}from'../../../errors.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';const execAsync=promisify(exec);export async function createProjectNonInteractive(_0xd9bff2,_0x36d950,_0x1deba5,_0x485135){const _0x408832=a155_0x2db8,_0x5bbaa9=await checkCliVersion();(_0x5bbaa9[_0x408832(0x146)]||_0x5bbaa9['belowMinimum'])&&(printCliUpgradeWarning(_0x5bbaa9),assertCliVersionSupported(_0x5bbaa9));if(!_0xd9bff2||_0xd9bff2[_0x408832(0x14e)]()==='')throw CliErrors[_0x408832(0x12c)]('Project\x20name\x20cannot\x20be\x20empty.');const _0x564c13=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x564c13['test'](_0xd9bff2))throw CliErrors[_0x408832(0x12c)]('Project\x20name\x20contains\x20invalid\x20characters.','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters');if(_0xd9bff2[_0x408832(0x145)]>0x64)throw CliErrors[_0x408832(0x12c)]('Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.');const _0x339f42=a155_0x9a620b[_0x408832(0x14d)](process[_0x408832(0x12f)](),_0xd9bff2);if(existsSync(_0x339f42))throw CliErrors['validation'](_0x408832(0x136)+_0xd9bff2+_0x408832(0x131),'Use\x20a\x20different\x20project\x20name.');try{const _0x2cb35e=a155_0x9a620b['dirname'](_0x339f42);await a155_0x52e829[_0x408832(0x144)](_0x2cb35e,a155_0x52e829[_0x408832(0x13b)][_0x408832(0x127)]);}catch{throw CliErrors[_0x408832(0x12c)](_0x408832(0x12b),_0x408832(0x137));}try{console[_0x408832(0x12e)](_0x408832(0x11d)+_0xd9bff2+'...');const _0x9b2e08=getSubAppReactDemoTemplateDir();await copyDirectory(_0x9b2e08,_0x339f42),console['log'](_0x408832(0x130)),await updatePackageJsonName(_0xd9bff2),console[_0x408832(0x12e)](_0x408832(0x150)),console[_0x408832(0x12e)](_0x408832(0x121)),console['log'](_0x408832(0x13f)),await formatCode(_0x339f42),console['log'](_0x408832(0x11a)),await configureProject(_0xd9bff2,_0x1deba5,_0x36d950),console[_0x408832(0x12e)](_0x408832(0x149)),_0x1deba5&&await pullApiConfig(_0x339f42,_0x1deba5,_0x36d950,_0x485135),console[_0x408832(0x12e)](_0x408832(0x125)+_0xd9bff2+_0x408832(0x132)),console[_0x408832(0x12e)](_0x408832(0x124)+_0xd9bff2),console[_0x408832(0x12e)]('\x20\x20rabetbase\x20run\x20start\x0a');}catch(_0x5e1d89){try{existsSync(_0x339f42)&&await a155_0x52e829['rm'](_0x339f42,{'recursive':!![],'force':!![]});}catch{}throw _0x5e1d89;}}async function updatePackageJsonName(_0x3c6e9e){const _0x3f30a1=a155_0x2db8,_0x202f3e=a155_0x9a620b['resolve'](process[_0x3f30a1(0x12f)](),_0x3c6e9e),_0x5819ec=a155_0x9a620b['join'](_0x202f3e,'package.json'),_0x4f1c12=await a155_0x52e829[_0x3f30a1(0x11b)](_0x5819ec,_0x3f30a1(0x148)),_0x2ef25e=JSON['parse'](_0x4f1c12);_0x2ef25e['name']=_0x3c6e9e,_0x2ef25e['description']='A\x20project\x20created\x20with\x20Lovrabet\x20CLI',await a155_0x52e829[_0x3f30a1(0x12a)](_0x5819ec,JSON[_0x3f30a1(0x11f)](_0x2ef25e,null,0x2)+'\x0a');}function detectPackageManager(){const _0x1e8c3c=a155_0x2db8;try{return execSync(_0x1e8c3c(0x142),{'stdio':'ignore'}),_0x1e8c3c(0x14b);}catch{return _0x1e8c3c(0x13a);}}async function formatCode(_0x6fad34){try{await execAsync('bun\x20run\x20format',{'cwd':_0x6fad34});}catch{}}function a155_0x2513(){const _0x5bb8f8=['\x20\x20√\x20Pulled\x20','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','\x20model(s)','8113260tkPSOD','bun\x20--version','\x20api\x20pull`\x20manually\x20later.','access','length','needsUpgrade','env','utf-8','\x20\x20√\x20Configuration\x20file\x20created','chdir','bun','8590918AEfPuS','resolve','trim','modelCount','\x20\x20√\x20package.json\x20updated','\x20\x20√\x20Code\x20formatted','readFile','production','*\x20Creating\x20project\x20','9235640GRnTwm','stringify','6kQvZCw','\x20\x20Installing\x20dependencies...','20120683MwgHMg','\x20\x20Pulling\x20API\x20configuration...','\x0a\x20\x20cd\x20','\x0a√\x20Project\x20','319120SMGbhk','W_OK','join','1YOEFde','writeFile','Cannot\x20create\x20project\x20in\x20current\x20directory.','validation','3226614iDGLAE','log','cwd','\x20\x20√\x20Project\x20template\x20created','\x22\x20already\x20exists.','\x20created\x20successfully!','9JAMKCf','toLocaleString','string','Project\x20directory\x20\x22','Check\x20directory\x20permissions.','4LJbXNy','12955960Yfcpxc','npm','constants','\x20dataset(s),\x20generated\x20','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`'];a155_0x2513=function(){return _0x5bb8f8;};return a155_0x2513();}async function configureProject(_0x375956,_0x12274a,_0xea7650){const _0x524d5b=a155_0x2db8,_0x2277d0=a155_0x9a620b[_0x524d5b(0x14d)](process[_0x524d5b(0x12f)](),_0x375956),_0xa34faa=a155_0x9a620b[_0x524d5b(0x128)](_0x2277d0,NEW_CONFIG_NAME),_0x4b6a2c=readConfig(),_0x27b351=typeof _0x4b6a2c[_0x524d5b(0x147)]===_0x524d5b(0x135)?_0x4b6a2c[_0x524d5b(0x147)]:undefined,_0x5849eb={};for(const _0xadcefb of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x4b6a2c[_0xadcefb]!=null)_0x5849eb[_0xadcefb]=_0x4b6a2c[_0xadcefb];}const _0x43ef38=buildCanonicalProjectConfig(_0x5849eb,{'appCodes':_0x12274a?[_0x12274a]:[],'env':_0xea7650||_0x27b351||_0x524d5b(0x11c),'metadata':{'createdAt':new Date()[_0x524d5b(0x134)](),'version':getCliVersion()}});writeConfigFile(_0xa34faa,_0x43ef38);}async function pullApiConfig(_0x496e98,_0x109b15,_0xca4709,_0xf25f4f){const _0x4a9b09=a155_0x2db8,_0x12f24f=process[_0x4a9b09(0x12f)]();try{process[_0x4a9b09(0x14a)](_0x496e98);const _0x2efa3a=_0xca4709||_0x4a9b09(0x11c);initEnv(_0x2efa3a),console[_0x4a9b09(0x12e)](_0x4a9b09(0x123));const {configArray:_0x52022f}=await fetchModelList(_0x109b15,_0xf25f4f||''),_0x59fd93=await generateApiFile(_0x52022f,'',_0x109b15,!![],_0x2efa3a,DEFAULT_API_DIR);console['log'](_0x4a9b09(0x13e)+_0x52022f[_0x4a9b09(0x145)]+_0x4a9b09(0x13c)+_0x59fd93[_0x4a9b09(0x14f)]+_0x4a9b09(0x140));}catch(_0x3f6735){console[_0x4a9b09(0x12e)](_0x4a9b09(0x13d)+CLI_BIN_NAME+_0x4a9b09(0x143));}finally{process['chdir'](_0x12f24f);}}
1
+ (function(_0x5bd049,_0x5afc59){const _0x200de7=a155_0x2af8,_0x45ba78=_0x5bd049();while(!![]){try{const _0x4ce4cf=-parseInt(_0x200de7(0x11f))/0x1*(-parseInt(_0x200de7(0x13b))/0x2)+parseInt(_0x200de7(0x12b))/0x3+parseInt(_0x200de7(0x149))/0x4*(parseInt(_0x200de7(0x142))/0x5)+-parseInt(_0x200de7(0x143))/0x6*(-parseInt(_0x200de7(0x12a))/0x7)+parseInt(_0x200de7(0x13c))/0x8+-parseInt(_0x200de7(0x120))/0x9*(-parseInt(_0x200de7(0x116))/0xa)+-parseInt(_0x200de7(0x13a))/0xb;if(_0x4ce4cf===_0x5afc59)break;else _0x45ba78['push'](_0x45ba78['shift']());}catch(_0x2c04e2){_0x45ba78['push'](_0x45ba78['shift']());}}}(a155_0x26a1,0x199c4));import a155_0x3d2eca from'path';import a155_0x108a0a 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';function a155_0x26a1(){const _0x5cb937=['writeFile','\x0a\x20\x20cd\x20','readFile','string','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','trim','5006122DlYZYB','198HdUczW','817792DQePvr','belowMinimum','*\x20Creating\x20project\x20','W_OK','description','length','290aHzHLz','6PQeZVL','...','Cannot\x20create\x20project\x20in\x20current\x20directory.','\x20\x20Pulling\x20API\x20configuration...','\x0a√\x20Project\x20','Project\x20directory\x20\x22','4220lxemTR','\x22\x20already\x20exists.','\x20api\x20pull`\x20manually\x20later.','ignore','test','needsUpgrade','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','\x20\x20√\x20Pulled\x20','join','Check\x20directory\x20permissions.','\x20\x20rabetbase\x20run\x20start\x0a','10NGUIGa','parse','log','npm','\x20\x20√\x20Project\x20template\x20created','bun','\x20\x20Installing\x20dependencies...','modelCount','bun\x20run\x20format','13GHYZwl','554157HOQOUP','production','access','\x20\x20√\x20package.json\x20updated','resolve','\x20created\x20successfully!','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','\x20\x20√\x20Configuration\x20file\x20created','bun\x20--version','Project\x20name\x20contains\x20invalid\x20characters.','1329846yakgIS','431250boureS','\x20dataset(s),\x20generated\x20','validation','package.json','chdir','dirname','Use\x20a\x20different\x20project\x20name.','cwd','toLocaleString'];a155_0x26a1=function(){return _0x5cb937;};return a155_0x26a1();}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';function a155_0x2af8(_0x119073,_0x3e9813){_0x119073=_0x119073-0x10c;const _0x26a1ce=a155_0x26a1();let _0x2af821=_0x26a1ce[_0x119073];return _0x2af821;}import{CliErrors}from'../../../errors.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';const execAsync=promisify(exec);export async function createProjectNonInteractive(_0x3618e9,_0x86e5f1,_0x4567a3,_0x5e7783){const _0x44ca26=a155_0x2af8,_0x2f9ca9=await checkCliVersion();(_0x2f9ca9[_0x44ca26(0x110)]||_0x2f9ca9[_0x44ca26(0x13d)])&&(printCliUpgradeWarning(_0x2f9ca9),assertCliVersionSupported(_0x2f9ca9));if(!_0x3618e9||_0x3618e9[_0x44ca26(0x139)]()==='')throw CliErrors['validation']('Project\x20name\x20cannot\x20be\x20empty.');const _0x513e8e=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x513e8e[_0x44ca26(0x10f)](_0x3618e9))throw CliErrors[_0x44ca26(0x12d)](_0x44ca26(0x129),_0x44ca26(0x138));if(_0x3618e9[_0x44ca26(0x141)]>0x64)throw CliErrors[_0x44ca26(0x12d)](_0x44ca26(0x126));const _0x5f4b24=a155_0x3d2eca['resolve'](process[_0x44ca26(0x132)](),_0x3618e9);if(existsSync(_0x5f4b24))throw CliErrors['validation'](_0x44ca26(0x148)+_0x3618e9+_0x44ca26(0x10c),_0x44ca26(0x131));try{const _0x40a41f=a155_0x3d2eca[_0x44ca26(0x130)](_0x5f4b24);await a155_0x108a0a[_0x44ca26(0x122)](_0x40a41f,a155_0x108a0a['constants'][_0x44ca26(0x13f)]);}catch{throw CliErrors[_0x44ca26(0x12d)](_0x44ca26(0x145),_0x44ca26(0x114));}try{console['log'](_0x44ca26(0x13e)+_0x3618e9+_0x44ca26(0x144));const _0x46835d=getSubAppReactDemoTemplateDir();await copyDirectory(_0x46835d,_0x5f4b24),console[_0x44ca26(0x118)](_0x44ca26(0x11a)),await updatePackageJsonName(_0x3618e9),console[_0x44ca26(0x118)](_0x44ca26(0x123)),console[_0x44ca26(0x118)](_0x44ca26(0x11c)),console['log']('\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)'),await formatCode(_0x5f4b24),console[_0x44ca26(0x118)]('\x20\x20√\x20Code\x20formatted'),await configureProject(_0x3618e9,_0x4567a3,_0x86e5f1),console[_0x44ca26(0x118)](_0x44ca26(0x127)),_0x4567a3&&await pullApiConfig(_0x5f4b24,_0x4567a3,_0x86e5f1,_0x5e7783),console[_0x44ca26(0x118)](_0x44ca26(0x147)+_0x3618e9+_0x44ca26(0x125)),console[_0x44ca26(0x118)](_0x44ca26(0x135)+_0x3618e9),console[_0x44ca26(0x118)](_0x44ca26(0x115));}catch(_0x45c7ef){try{existsSync(_0x5f4b24)&&await a155_0x108a0a['rm'](_0x5f4b24,{'recursive':!![],'force':!![]});}catch{}throw _0x45c7ef;}}async function updatePackageJsonName(_0x4f0241){const _0x3aa607=a155_0x2af8,_0x4b80b4=a155_0x3d2eca['resolve'](process[_0x3aa607(0x132)](),_0x4f0241),_0x3a29d9=a155_0x3d2eca['join'](_0x4b80b4,_0x3aa607(0x12e)),_0x43fdc7=await a155_0x108a0a[_0x3aa607(0x136)](_0x3a29d9,'utf-8'),_0x57e86d=JSON[_0x3aa607(0x117)](_0x43fdc7);_0x57e86d['name']=_0x4f0241,_0x57e86d[_0x3aa607(0x140)]='A\x20project\x20created\x20with\x20Lovrabet\x20CLI',await a155_0x108a0a[_0x3aa607(0x134)](_0x3a29d9,JSON['stringify'](_0x57e86d,null,0x2)+'\x0a');}function detectPackageManager(){const _0x38a9a0=a155_0x2af8;try{return execSync(_0x38a9a0(0x128),{'stdio':_0x38a9a0(0x10e)}),_0x38a9a0(0x11b);}catch{return _0x38a9a0(0x119);}}async function formatCode(_0xb6c172){const _0x6630a1=a155_0x2af8;try{await execAsync(_0x6630a1(0x11e),{'cwd':_0xb6c172});}catch{}}async function configureProject(_0x4c852c,_0x51d9e0,_0x286fff){const _0x32564c=a155_0x2af8,_0x46d256=a155_0x3d2eca[_0x32564c(0x124)](process[_0x32564c(0x132)](),_0x4c852c),_0xd00453=a155_0x3d2eca[_0x32564c(0x113)](_0x46d256,NEW_CONFIG_NAME),_0x176d10=readConfig(),_0x5c8d53=typeof _0x176d10['env']===_0x32564c(0x137)?_0x176d10['env']:undefined,_0x516e8d={};for(const _0x1b2d67 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x176d10[_0x1b2d67]!=null)_0x516e8d[_0x1b2d67]=_0x176d10[_0x1b2d67];}const _0x2fed5c=buildCanonicalProjectConfig(_0x516e8d,{'appCodes':_0x51d9e0?[_0x51d9e0]:[],'env':_0x286fff||_0x5c8d53||_0x32564c(0x121),'metadata':{'createdAt':new Date()[_0x32564c(0x133)](),'version':getCliVersion()}});writeConfigFile(_0xd00453,_0x2fed5c);}async function pullApiConfig(_0x7969c0,_0x58e817,_0x4bc345,_0x5309a8){const _0x3af761=a155_0x2af8,_0x330047=process[_0x3af761(0x132)]();try{process[_0x3af761(0x12f)](_0x7969c0);const _0x6018ec=_0x4bc345||_0x3af761(0x121);initEnv(_0x6018ec),console[_0x3af761(0x118)](_0x3af761(0x146));const {configArray:_0x2fb828}=await fetchModelList(_0x58e817,_0x5309a8||''),_0x3ecc18=await generateApiFile(_0x2fb828,'',_0x58e817,!![],_0x6018ec,DEFAULT_API_DIR);console['log'](_0x3af761(0x112)+_0x2fb828[_0x3af761(0x141)]+_0x3af761(0x12c)+_0x3ecc18[_0x3af761(0x11d)]+'\x20model(s)');}catch(_0xa17fa3){console[_0x3af761(0x118)](_0x3af761(0x111)+CLI_BIN_NAME+_0x3af761(0x10d));}finally{process[_0x3af761(0x12f)](_0x330047);}}
@@ -1 +1 @@
1
- function a156_0x4caf(){const _0x426d97=['30zPsuHh','99pLBrSZ','4685bQRLaH','1508TQyrUF','26gLoEOe','1548351kDWezM','join','43314imSXam','301EKuyzj','427068cxUVNk','projects','resolve','../../../../','6728192giSMSd','904297mYrkNN','templates','69933ZtviNg','dirname'];a156_0x4caf=function(){return _0x426d97;};return a156_0x4caf();}function a156_0x1350(_0xe991b4,_0x5e41b9){_0xe991b4=_0xe991b4-0x196;const _0x4caf19=a156_0x4caf();let _0x1350d1=_0x4caf19[_0xe991b4];return _0x1350d1;}const a156_0x2ce924=a156_0x1350;(function(_0x2c0460,_0xc55757){const _0x1ec19f=a156_0x1350,_0x2993ca=_0x2c0460();while(!![]){try{const _0x44b3bf=parseInt(_0x1ec19f(0x19d))/0x1+-parseInt(_0x1ec19f(0x1a5))/0x2*(-parseInt(_0x1ec19f(0x19f))/0x3)+-parseInt(_0x1ec19f(0x1a4))/0x4*(parseInt(_0x1ec19f(0x1a3))/0x5)+-parseInt(_0x1ec19f(0x196))/0x6*(parseInt(_0x1ec19f(0x197))/0x7)+parseInt(_0x1ec19f(0x19c))/0x8+parseInt(_0x1ec19f(0x1a6))/0x9*(-parseInt(_0x1ec19f(0x1a1))/0xa)+parseInt(_0x1ec19f(0x1a2))/0xb*(-parseInt(_0x1ec19f(0x198))/0xc);if(_0x44b3bf===_0xc55757)break;else _0x2993ca['push'](_0x2993ca['shift']());}catch(_0x743930){_0x2993ca['push'](_0x2993ca['shift']());}}}(a156_0x4caf,0x85db8));import a156_0x389629 from'node:path';import{fileURLToPath}from'node:url';const __dirname=a156_0x389629[a156_0x2ce924(0x1a0)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0xdcae47=a156_0x2ce924;return a156_0x389629[_0xdcae47(0x19a)](__dirname,_0xdcae47(0x19b));}export function getSubAppReactDemoTemplateDir(){const _0x3c224e=a156_0x2ce924;return a156_0x389629[_0x3c224e(0x1a7)](getRabetbaseCliPackageRoot(),_0x3c224e(0x19e),_0x3c224e(0x199),'sub-app-react-demo');}
1
+ function a156_0xd36d(_0x3422c8,_0x86cb99){_0x3422c8=_0x3422c8-0xb8;const _0x103f0f=a156_0x103f();let _0xd36d92=_0x103f0f[_0x3422c8];return _0xd36d92;}(function(_0x263c37,_0x34765a){const _0x5e8761=a156_0xd36d,_0xdf5134=_0x263c37();while(!![]){try{const _0x59f3e9=-parseInt(_0x5e8761(0xbf))/0x1*(parseInt(_0x5e8761(0xc1))/0x2)+parseInt(_0x5e8761(0xc3))/0x3+parseInt(_0x5e8761(0xbc))/0x4+-parseInt(_0x5e8761(0xbd))/0x5*(parseInt(_0x5e8761(0xbe))/0x6)+-parseInt(_0x5e8761(0xc4))/0x7*(parseInt(_0x5e8761(0xc2))/0x8)+-parseInt(_0x5e8761(0xc7))/0x9*(parseInt(_0x5e8761(0xc0))/0xa)+-parseInt(_0x5e8761(0xc6))/0xb*(-parseInt(_0x5e8761(0xbb))/0xc);if(_0x59f3e9===_0x34765a)break;else _0xdf5134['push'](_0xdf5134['shift']());}catch(_0x458561){_0xdf5134['push'](_0xdf5134['shift']());}}}(a156_0x103f,0xd487d));import a156_0x504195 from'node:path';function a156_0x103f(){const _0x42d640=['30983412JBVAHv','68856LHxBCh','14095vbcgxW','1578PnzYWn','37585luIBrO','2823910Bjowyf','18lGcnpz','72oMUsPo','3191877ueoBrz','673372KBWjLQ','resolve','11WheqzY','27znluXZ','sub-app-react-demo','../../../../','join','projects'];a156_0x103f=function(){return _0x42d640;};return a156_0x103f();}import{fileURLToPath}from'node:url';const __dirname=a156_0x504195['dirname'](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x3a2b2e=a156_0xd36d;return a156_0x504195[_0x3a2b2e(0xc5)](__dirname,_0x3a2b2e(0xb8));}export function getSubAppReactDemoTemplateDir(){const _0x475613=a156_0xd36d;return a156_0x504195[_0x475613(0xb9)](getRabetbaseCliPackageRoot(),'templates',_0x475613(0xba),_0x475613(0xc8));}
@@ -1 +1 @@
1
- (function(_0x25ab31,_0x5d1c5e){const _0x3b2c01=a157_0x6a10,_0x416765=_0x25ab31();while(!![]){try{const _0x43bd4d=parseInt(_0x3b2c01(0x137))/0x1*(-parseInt(_0x3b2c01(0x130))/0x2)+-parseInt(_0x3b2c01(0x13b))/0x3*(-parseInt(_0x3b2c01(0x138))/0x4)+-parseInt(_0x3b2c01(0x13d))/0x5*(-parseInt(_0x3b2c01(0x13a))/0x6)+parseInt(_0x3b2c01(0x13c))/0x7+parseInt(_0x3b2c01(0x135))/0x8*(-parseInt(_0x3b2c01(0x12c))/0x9)+-parseInt(_0x3b2c01(0x12b))/0xa*(parseInt(_0x3b2c01(0x133))/0xb)+parseInt(_0x3b2c01(0x139))/0xc;if(_0x43bd4d===_0x5d1c5e)break;else _0x416765['push'](_0x416765['shift']());}catch(_0x99f554){_0x416765['push'](_0x416765['shift']());}}}(a157_0x1fb1,0xab96a));import a157_0xc3aa4c from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a157_0x1fb1(){const _0x427989=['copy','info','28rKadBa','now','success','3201WhBtHN','开始复制项目模板','16312fDqNcp','resolve','84701uLQslD','28BlRIDx','25474944MvVRVE','888zAYfap','362841VFjEeQ','4525619CmFqaE','24620rcGWLT','cwd','39070CaTpWd','5823RSwUAv','项目模板复制完成'];a157_0x1fb1=function(){return _0x427989;};return a157_0x1fb1();}import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';function a157_0x6a10(_0x438af3,_0x704609){_0x438af3=_0x438af3-0x12b;const _0x1fb1b1=a157_0x1fb1();let _0x6a1077=_0x1fb1b1[_0x438af3];return _0x6a1077;}const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x4d1453){const _0x1a58c1=a157_0x6a10,_0x12ebe3=Date[_0x1a58c1(0x131)](),_0x259111=a157_0xc3aa4c[_0x1a58c1(0x136)](process[_0x1a58c1(0x13e)](),_0x4d1453);try{logger[_0x1a58c1(0x12f)](_0x1a58c1(0x12e),_0x1a58c1(0x134),{'projectCode':_0x4d1453,'templateDir':templateDir}),await copyDirectory(templateDir,_0x259111);const _0x139518=Date[_0x1a58c1(0x131)]()-_0x12ebe3;logger[_0x1a58c1(0x132)]('copy',_0x1a58c1(0x12d),_0x139518,{'projectCode':_0x4d1453});}catch(_0x405394){const _0x219bbb=Date[_0x1a58c1(0x131)]()-_0x12ebe3;logger['error'](_0x1a58c1(0x12e),'项目模板复制失败',{'projectCode':_0x4d1453,'error':_0x405394 instanceof Error?_0x405394['message']:String(_0x405394),'duration':_0x219bbb});throw _0x405394;}return formatElapsed(_0x12ebe3);}
1
+ function a157_0x3d56(_0x597835,_0x14b193){_0x597835=_0x597835-0x198;const _0x2f8eae=a157_0x2f8e();let _0x3d56ab=_0x2f8eae[_0x597835];return _0x3d56ab;}(function(_0x23cde5,_0xcd815a){const _0x252db3=a157_0x3d56,_0x2eff79=_0x23cde5();while(!![]){try{const _0x16cea7=-parseInt(_0x252db3(0x19f))/0x1+-parseInt(_0x252db3(0x19b))/0x2+-parseInt(_0x252db3(0x1a7))/0x3+parseInt(_0x252db3(0x198))/0x4*(-parseInt(_0x252db3(0x19a))/0x5)+-parseInt(_0x252db3(0x1a0))/0x6+-parseInt(_0x252db3(0x1a3))/0x7*(-parseInt(_0x252db3(0x1a8))/0x8)+parseInt(_0x252db3(0x19e))/0x9;if(_0x16cea7===_0xcd815a)break;else _0x2eff79['push'](_0x2eff79['shift']());}catch(_0x512965){_0x2eff79['push'](_0x2eff79['shift']());}}}(a157_0x2f8e,0x80efb));function a157_0x2f8e(){const _0x4d7839=['3699480gjoMVV','success','cwd','2513vinaFc','开始复制项目模板','项目模板复制完成','message','233862DiFwqW','14256DXEbcy','8XXSFKL','now','2564975SJpgNx','698730OGdqIV','error','copy','24016365SzGOTl','710211jeEVKw'];a157_0x2f8e=function(){return _0x4d7839;};return a157_0x2f8e();}import a157_0x3e9092 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(_0x5a1e6f){const _0x58d681=a157_0x3d56,_0x2b56b6=Date[_0x58d681(0x199)](),_0x47254e=a157_0x3e9092['resolve'](process[_0x58d681(0x1a2)](),_0x5a1e6f);try{logger['info']('copy',_0x58d681(0x1a4),{'projectCode':_0x5a1e6f,'templateDir':templateDir}),await copyDirectory(templateDir,_0x47254e);const _0x9fb3df=Date['now']()-_0x2b56b6;logger[_0x58d681(0x1a1)](_0x58d681(0x19d),_0x58d681(0x1a5),_0x9fb3df,{'projectCode':_0x5a1e6f});}catch(_0x56a435){const _0x224d2b=Date['now']()-_0x2b56b6;logger[_0x58d681(0x19c)](_0x58d681(0x19d),'项目模板复制失败',{'projectCode':_0x5a1e6f,'error':_0x56a435 instanceof Error?_0x56a435[_0x58d681(0x1a6)]:String(_0x56a435),'duration':_0x224d2b});throw _0x56a435;}return formatElapsed(_0x2b56b6);}
@@ -1 +1 @@
1
- (function(_0x195e6f,_0x5a28dc){const _0xe56cc1=a158_0x35e4,_0x4dd502=_0x195e6f();while(!![]){try{const _0x257fa5=-parseInt(_0xe56cc1(0x148))/0x1+parseInt(_0xe56cc1(0x143))/0x2+parseInt(_0xe56cc1(0x13e))/0x3+-parseInt(_0xe56cc1(0x13c))/0x4*(-parseInt(_0xe56cc1(0x13f))/0x5)+-parseInt(_0xe56cc1(0x14a))/0x6*(-parseInt(_0xe56cc1(0x13d))/0x7)+parseInt(_0xe56cc1(0x142))/0x8*(parseInt(_0xe56cc1(0x141))/0x9)+-parseInt(_0xe56cc1(0x146))/0xa*(parseInt(_0xe56cc1(0x147))/0xb);if(_0x257fa5===_0x5a28dc)break;else _0x4dd502['push'](_0x4dd502['shift']());}catch(_0x503a7f){_0x4dd502['push'](_0x4dd502['shift']());}}}(a158_0x2a75,0xf3345));function a158_0x35e4(_0x13f348,_0x3b2a5e){_0x13f348=_0x13f348-0x138;const _0x2a7596=a158_0x2a75();let _0x35e486=_0x2a7596[_0x13f348];return _0x35e486;}import a158_0x7402b4 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a158_0x2a75(){const _0xbb736d=['567590iMuuws','693GMYePT','1247896xVhGkf','代码格式化完成','7917654NFTlci','info','--write','now','开始格式化代码','format','295148HggEdJ','7SjLkvI','4586190ycXggt','10NsjHFO','代码格式化失败','96822OaeokM','704QPTFcm','3754522ohxeEy','error','cwd'];a158_0x2a75=function(){return _0xbb736d;};return a158_0x2a75();}import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x8ed22a){const _0xbf5e25=a158_0x35e4,_0x3585a7=Date[_0xbf5e25(0x139)](),_0x4e277c=a158_0x7402b4['resolve'](process[_0xbf5e25(0x145)](),_0x8ed22a);try{logger[_0xbf5e25(0x14b)](_0xbf5e25(0x13b),_0xbf5e25(0x13a),{'projectCode':_0x8ed22a}),await execa(resolveNpmBin('npx'),['prettier',_0xbf5e25(0x138),'.'],{'cwd':_0x4e277c});const _0x575e11=Date[_0xbf5e25(0x139)]()-_0x3585a7;logger['success'](_0xbf5e25(0x13b),_0xbf5e25(0x149),_0x575e11,{'projectCode':_0x8ed22a});}catch(_0x3a75eb){const _0x507408=Date[_0xbf5e25(0x139)]()-_0x3585a7;logger[_0xbf5e25(0x144)](_0xbf5e25(0x13b),_0xbf5e25(0x140),{'projectCode':_0x8ed22a,'error':_0x3a75eb instanceof Error?_0x3a75eb['message']:String(_0x3a75eb),'duration':_0x507408});throw _0x3a75eb;}return formatElapsed(_0x3585a7);}
1
+ (function(_0x1edfec,_0x23baf1){const _0x3de3da=a158_0x5e47,_0x17f9ae=_0x1edfec();while(!![]){try{const _0x408096=parseInt(_0x3de3da(0x108))/0x1*(parseInt(_0x3de3da(0x106))/0x2)+-parseInt(_0x3de3da(0x10a))/0x3*(-parseInt(_0x3de3da(0xfb))/0x4)+-parseInt(_0x3de3da(0xfc))/0x5+parseInt(_0x3de3da(0x105))/0x6*(parseInt(_0x3de3da(0x104))/0x7)+parseInt(_0x3de3da(0x107))/0x8*(parseInt(_0x3de3da(0xff))/0x9)+-parseInt(_0x3de3da(0xfd))/0xa+parseInt(_0x3de3da(0x102))/0xb*(-parseInt(_0x3de3da(0xfe))/0xc);if(_0x408096===_0x23baf1)break;else _0x17f9ae['push'](_0x17f9ae['shift']());}catch(_0x522172){_0x17f9ae['push'](_0x17f9ae['shift']());}}}(a158_0x3d73,0x46527));import a158_0x3ffc49 from'node:path';function a158_0x5e47(_0x388dee,_0x5519c4){_0x388dee=_0x388dee-0xf9;const _0x3d7348=a158_0x3d73();let _0x5e4797=_0x3d7348[_0x388dee];return _0x5e4797;}import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x140476){const _0x123b5c=a158_0x5e47,_0x270521=Date[_0x123b5c(0xfa)](),_0x36288c=a158_0x3ffc49['resolve'](process['cwd'](),_0x140476);try{logger[_0x123b5c(0x10c)](_0x123b5c(0x10b),'开始格式化代码',{'projectCode':_0x140476}),await execa(resolveNpmBin('npx'),[_0x123b5c(0xf9),_0x123b5c(0x101),'.'],{'cwd':_0x36288c});const _0x2127c4=Date[_0x123b5c(0xfa)]()-_0x270521;logger['success'](_0x123b5c(0x10b),_0x123b5c(0x109),_0x2127c4,{'projectCode':_0x140476});}catch(_0x4cc535){const _0x4a87a9=Date[_0x123b5c(0xfa)]()-_0x270521;logger[_0x123b5c(0x103)](_0x123b5c(0x10b),_0x123b5c(0x100),{'projectCode':_0x140476,'error':_0x4cc535 instanceof Error?_0x4cc535[_0x123b5c(0x10d)]:String(_0x4cc535),'duration':_0x4a87a9});throw _0x4cc535;}return formatElapsed(_0x270521);}function a158_0x3d73(){const _0x44315b=['3VHKCBR','format','info','message','prettier','now','2293336gxBZWx','1219065fZyZWz','1214450uPPcvu','60uAvbis','9xPeosL','代码格式化失败','--write','2095819wFyldF','error','590723HGALuF','30wXdDhX','26WzldiQ','1254040hYFrCu','34916XxxCEK','代码格式化完成'];a158_0x3d73=function(){return _0x44315b;};return a158_0x3d73();}