@lovrabet/rabetbase-cli 2.3.13-beta.3 → 2.3.13

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 (261) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/add.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -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/logs/index.js +1 -1
  102. package/lib/commands/menu/asset-update.js +1 -1
  103. package/lib/commands/menu/delete.js +1 -1
  104. package/lib/commands/menu/external-link-create.js +1 -1
  105. package/lib/commands/menu/external-link-update.js +1 -1
  106. package/lib/commands/menu/group-create.js +1 -1
  107. package/lib/commands/menu/group-update.js +1 -1
  108. package/lib/commands/menu/index.js +1 -1
  109. package/lib/commands/menu/list.js +1 -1
  110. package/lib/commands/menu/move.js +1 -1
  111. package/lib/commands/menu/regroup-start.js +1 -1
  112. package/lib/commands/menu/shared/compare-table.js +1 -1
  113. package/lib/commands/menu/shared/delete-plan.js +1 -1
  114. package/lib/commands/menu/shared/facts.js +1 -1
  115. package/lib/commands/menu/shared/index.js +1 -1
  116. package/lib/commands/menu/shared/inquirer.js +1 -1
  117. package/lib/commands/menu/shared/local-pages.js +1 -1
  118. package/lib/commands/menu/shared/logic.js +1 -1
  119. package/lib/commands/menu/shared/mutations.js +1 -1
  120. package/lib/commands/menu/shared/service.js +1 -1
  121. package/lib/commands/menu/shared/sync-core.js +1 -1
  122. package/lib/commands/menu/shared/update-core.js +1 -1
  123. package/lib/commands/menu/shared/valid-url.js +1 -1
  124. package/lib/commands/menu/sync.js +1 -1
  125. package/lib/commands/notification/config-list.js +1 -1
  126. package/lib/commands/notification/index.js +1 -1
  127. package/lib/commands/page/generate-start.js +1 -1
  128. package/lib/commands/page/generate-status.js +1 -1
  129. package/lib/commands/page/index.js +1 -1
  130. package/lib/commands/page/pull.js +1 -1
  131. package/lib/commands/page/push.js +1 -1
  132. package/lib/commands/page/relation-audit.js +1 -1
  133. package/lib/commands/page/shared.js +1 -1
  134. package/lib/commands/page/standard-page-status.js +1 -1
  135. package/lib/commands/page/sync.js +1 -1
  136. package/lib/commands/permit/index.js +1 -1
  137. package/lib/commands/permit/page-get.js +1 -1
  138. package/lib/commands/permit/page-set.js +1 -1
  139. package/lib/commands/permit/role-apis-set.js +1 -1
  140. package/lib/commands/permit/role-menus-set.js +1 -1
  141. package/lib/commands/permit/role-menus.js +1 -1
  142. package/lib/commands/permit/shared.js +1 -1
  143. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  144. package/lib/commands/project/create/format-elapsed.js +1 -1
  145. package/lib/commands/project/create/main.js +1 -1
  146. package/lib/commands/project/create/non-interactive.js +1 -1
  147. package/lib/commands/project/create/project-template-path.js +1 -1
  148. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  149. package/lib/commands/project/create/use-format-code.js +1 -1
  150. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  151. package/lib/commands/project/index.js +1 -1
  152. package/lib/commands/project/init.js +1 -1
  153. package/lib/commands/project/upgrade.js +1 -1
  154. package/lib/commands/registry.js +1 -1
  155. package/lib/commands/role/create.js +1 -1
  156. package/lib/commands/role/delete.js +1 -1
  157. package/lib/commands/role/detail.js +1 -1
  158. package/lib/commands/role/index.js +1 -1
  159. package/lib/commands/role/list.js +1 -1
  160. package/lib/commands/role/shared.js +1 -1
  161. package/lib/commands/role/update.js +1 -1
  162. package/lib/commands/role/user-add.js +1 -1
  163. package/lib/commands/role/user-remove.js +1 -1
  164. package/lib/commands/role/user-resolve.js +1 -1
  165. package/lib/commands/run/index.js +1 -1
  166. package/lib/commands/schema.js +1 -1
  167. package/lib/commands/sql/create.js +1 -1
  168. package/lib/commands/sql/delete.js +1 -1
  169. package/lib/commands/sql/detail.js +1 -1
  170. package/lib/commands/sql/exec.js +1 -1
  171. package/lib/commands/sql/index.js +1 -1
  172. package/lib/commands/sql/list.js +1 -1
  173. package/lib/commands/sql/pull.js +1 -1
  174. package/lib/commands/sql/push.js +1 -1
  175. package/lib/commands/sql/save.js +1 -1
  176. package/lib/commands/sql/shared.js +1 -1
  177. package/lib/commands/sql/status.js +1 -1
  178. package/lib/commands/sql/validate.js +1 -1
  179. package/lib/commands/task/index.js +1 -1
  180. package/lib/commands/task/status.js +1 -1
  181. package/lib/commands/workspace/add.js +1 -1
  182. package/lib/commands/workspace/index.js +1 -1
  183. package/lib/commands/workspace/remove.js +1 -1
  184. package/lib/config/schema.js +1 -1
  185. package/lib/constant/cdn.js +1 -1
  186. package/lib/constant/cli.js +1 -1
  187. package/lib/constant/defaults.js +1 -1
  188. package/lib/constant/domain.js +1 -1
  189. package/lib/constant/env.js +1 -1
  190. package/lib/constant/output.js +1 -1
  191. package/lib/constant/paths.js +1 -1
  192. package/lib/constant/risk.js +1 -1
  193. package/lib/context/app-resolver.js +1 -1
  194. package/lib/context/auth-resolver.js +1 -1
  195. package/lib/context/config-loader.js +1 -1
  196. package/lib/context.js +1 -1
  197. package/lib/core/alias-resolver.js +1 -1
  198. package/lib/core/api-client.js +1 -1
  199. package/lib/core/bff/config.js +1 -1
  200. package/lib/core/bff/file-system.js +1 -1
  201. package/lib/core/bff/hash.js +1 -1
  202. package/lib/core/bff/lock.js +1 -1
  203. package/lib/core/bff/utils.js +1 -1
  204. package/lib/core/db-resolver.js +1 -1
  205. package/lib/core/page/file-system.js +1 -1
  206. package/lib/core/page/hash.js +1 -1
  207. package/lib/core/page/lock.js +1 -1
  208. package/lib/core/sql-index-auditor.js +1 -1
  209. package/lib/core/sql-sync/config.js +1 -1
  210. package/lib/core/sql-sync/file-system.js +1 -1
  211. package/lib/core/sql-sync/hash.js +1 -1
  212. package/lib/core/sql-sync/lock.js +1 -1
  213. package/lib/core/sql-sync/utils.js +1 -1
  214. package/lib/core/sql-validator.js +1 -1
  215. package/lib/errors.js +1 -1
  216. package/lib/framework/build-all-flags.js +1 -1
  217. package/lib/framework/error-output.js +1 -1
  218. package/lib/framework/explicit-yes.js +1 -1
  219. package/lib/framework/flags.js +1 -1
  220. package/lib/framework/help.js +1 -1
  221. package/lib/framework/index.js +1 -1
  222. package/lib/framework/output.js +1 -1
  223. package/lib/framework/response.js +1 -1
  224. package/lib/framework/runner-alias.js +1 -1
  225. package/lib/framework/runner.js +1 -1
  226. package/lib/framework/schema-export.js +1 -1
  227. package/lib/framework/types.js +1 -1
  228. package/lib/generated/build-info.js +1 -1
  229. package/lib/help.js +1 -1
  230. package/lib/skills/main.js +1 -1
  231. package/lib/skills/npx-skills-add.js +1 -1
  232. package/lib/telemetry/cli-command-trace.js +1 -1
  233. package/lib/telemetry/cli-help-trace.js +1 -1
  234. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  235. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  236. package/lib/telemetry/send-cli-trace-log.js +1 -1
  237. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  238. package/lib/utils/ai_config.js +1 -1
  239. package/lib/utils/apply-jq-filter.js +1 -1
  240. package/lib/utils/cdn-config.js +1 -1
  241. package/lib/utils/check-sdk-version.js +1 -1
  242. package/lib/utils/cli-version-check.js +1 -1
  243. package/lib/utils/cli-version-policy.js +1 -1
  244. package/lib/utils/config.js +1 -1
  245. package/lib/utils/copy-directory.js +1 -1
  246. package/lib/utils/entity-with-id.js +1 -1
  247. package/lib/utils/file-utils.js +1 -1
  248. package/lib/utils/guides-cdn.js +1 -1
  249. package/lib/utils/http-client.js +1 -1
  250. package/lib/utils/is-non-interactive.js +1 -1
  251. package/lib/utils/logger.js +1 -1
  252. package/lib/utils/params.js +1 -1
  253. package/lib/utils/platform.js +1 -1
  254. package/lib/utils/rules-cdn.js +1 -1
  255. package/lib/utils/sleep.js +1 -1
  256. package/lib/utils/template-replacer.js +1 -1
  257. package/lib/utils/update-notice.js +1 -1
  258. package/lib/utils/version.js +1 -1
  259. package/lib/utils/with-active-cookie.js +1 -1
  260. package/lib/utils/write-cli-side-channel.js +1 -1
  261. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x2ec799,_0x324ad1){const _0x5ccb6=a133_0x1462,_0xf64445=_0x2ec799();while(!![]){try{const _0x4cb156=parseInt(_0x5ccb6(0xe4))/0x1+parseInt(_0x5ccb6(0x144))/0x2*(-parseInt(_0x5ccb6(0xef))/0x3)+parseInt(_0x5ccb6(0x14a))/0x4+-parseInt(_0x5ccb6(0x13e))/0x5*(parseInt(_0x5ccb6(0x11f))/0x6)+parseInt(_0x5ccb6(0x10f))/0x7*(parseInt(_0x5ccb6(0x15b))/0x8)+-parseInt(_0x5ccb6(0x106))/0x9*(-parseInt(_0x5ccb6(0x156))/0xa)+parseInt(_0x5ccb6(0x136))/0xb;if(_0x4cb156===_0x324ad1)break;else _0xf64445['push'](_0xf64445['shift']());}catch(_0x399108){_0xf64445['push'](_0xf64445['shift']());}}}(a133_0x8d45,0x988f6));function a133_0x1462(_0x10ade8,_0x51ea64){_0x10ade8=_0x10ade8-0xdc;const _0x8d4534=a133_0x8d45();let _0x1462b4=_0x8d4534[_0x10ade8];return _0x1462b4;}import{randomUUID}from'node:crypto';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getDatasetDetail,getPageDetail,tryGetStandardPageStatus}from'../../core/api-client.js';function a133_0x8d45(){const _0x122438=['sync','menuPages','datasetIds','\x22,\x20not\x20current\x20app\x20\x22','object','push','apiDir','CANCELING','\x22,\x20but\x20no\x20Smart\x20List\x20Pages\x20were\x20found\x20during\x20reconcile.','operation-id','properties','RETRYING','filter','dataset','length','run_generate_start','Multiple\x20page\x20groups\x20found\x20for\x20this\x20dataset.','\x20workspace\x20use\x20--app\x20<name>`\x20or\x20pass\x20--appcode.','SUCCESS','boolean','config','--version-tag\x20is\x20only\x20supported\x20with\x20--datasetcode\x20or\x20--alias.','6676494CcMSZE','UNKNOWN','Switch\x20app\x20with\x20`','blocked_complete_plus_residual_sets','generate','relatedPageInfoList','\x22\x20has\x20incomplete\x20Smart\x20List\x20Page\x20sets.','versionTag','65435kWpSBm','name','generated_complete_set','datasetcode','completeSets','\x22\x20not\x20found.\x20','2171258BWEGxv','modelCode','appCode','flag','\x20--operation-id\x20','Page\x20\x22','1756192UEZUsi','residualPages','Smart\x20List\x20Page\x20generation\x20is\x20pending\x20for\x20dataset\x20\x22','status','\x22\x20already\x20has\x20undeleted\x20related\x20pages.','str','isArray','Smart\x20List\x20Page\x20generation\x20failed\x20for\x20dataset\x20\x22','__EMPTY__','validation','operation_pending','query_operation_status','2736540zsRInX','\x20--format\x20json','standard-page-status','trim','manual_resolution_required','3551192IqgBhl','PENDING','code','menuVisible','pageVersion','blocked_multiple_complete_sets','\x22\x20belongs\x20to\x20app\x20\x22','relatedPages','pageSets','Use\x20`--version-tag\x20<tag>`.\x20Available\x20groups:\x20','419265FkrnbB','keys','fallbackUndeletedPages','FAILED','Run\x20`','\x20--appcode\x20','already_exists_complete_set','\x22\x20has\x20no\x20undeleted\x20related\x20pages.','operationId','CANCELLED','\x22,\x20but\x20Smart\x20List\x20Page\x20facts\x20are\x20unavailable.','3vHlDfR','version-tag','unknown_reconcile_failed','number','clientOperationId','client-operation-id','get','string','page-','set','\x22\x20now\x20has\x20one\x20complete\x20Smart\x20List\x20Page\x20set.','\x20page\x20sync\x20--datasetcode\x20','pageId','`\x20instead.','type','unknown','\x22\x20already\x20has\x20one\x20complete\x20Smart\x20List\x20Page\x20set.','fields','menuPath','datasetCode','map','isFinite','join','18mXtwsL','complete','title','\x22\x20has\x20undeleted\x20related\x20pages\x20under\x20legacy\x20fallback\x20precheck.','Operation\x20finished\x20for\x20dataset\x20\x22','<empty>','\x20api\x20pull`\x20first,\x20or\x20pass\x20--datasetcode\x20directly.','totalSets','hasMenu','7vPwzaK','alias','`\x20first,\x20then\x20poll\x20`','pages','no_standard_pages_found','\x22\x20returned\x20unsupported\x20operation\x20status\x20\x22','\x22\x20has\x20no\x20Smart\x20List\x20Pages\x20yet.','One\x20of\x20--id\x20or\x20--datasetcode/--alias\x20is\x20required.','\x20page\x20generate-status\x20--datasetcode\x20','One\x20of\x20--datasetcode\x20or\x20--alias\x20is\x20required.','deleted','datasetId','\x20page\x20standard-page-status\x20--datasetcode\x20','incompleteSets','Dataset\x20\x22','Query\x20the\x20page\x20facts\x20first\x20and\x20resolve\x20manually\x20before\x20retrying\x20generate.','342HQhfYz'];a133_0x8d45=function(){return _0x122438;};return a133_0x8d45();}import{loadAliasMap,resolveAlias}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{CliErrors}from'../../errors.js';export function getPageIdFlag(_0xd2c002){const _0x41a465=a133_0x1462,_0x56bf67=_0xd2c002[_0x41a465(0x147)]('id');if(typeof _0x56bf67==='number'&&Number[_0x41a465(0x104)](_0x56bf67)&&_0x56bf67>0x0)return _0x56bf67;return undefined;}export function validateDatasetSelector(_0x27f478){const _0x229ed8=a133_0x1462,_0x163396=Boolean(_0x27f478['str'](_0x229ed8(0x141))),_0x1b07db=Boolean(_0x27f478[_0x229ed8(0x14f)](_0x229ed8(0x110)));if(_0x163396&&_0x1b07db)throw CliErrors[_0x229ed8(0x153)]('Use\x20either\x20--datasetcode\x20or\x20--alias,\x20not\x20both.');if(!_0x163396&&!_0x1b07db)throw CliErrors['validation'](_0x229ed8(0x118));}export function validateGenerateOperationSelector(_0x349e8c){const _0x4148e5=a133_0x1462,_0x19a17a=Boolean(_0x349e8c[_0x4148e5(0x14f)](_0x4148e5(0x129))),_0x5ae2d8=Boolean(_0x349e8c[_0x4148e5(0x14f)](_0x4148e5(0xf4)));if(_0x19a17a&&_0x5ae2d8)throw CliErrors[_0x4148e5(0x153)]('Use\x20either\x20--operation-id\x20or\x20--client-operation-id,\x20not\x20both.');if(!_0x19a17a&&!_0x5ae2d8)throw CliErrors[_0x4148e5(0x153)]('One\x20of\x20--operation-id\x20or\x20--client-operation-id\x20is\x20required.');}export function validatePageTargetSelector(_0x4a8c52){const _0x167809=a133_0x1462,_0x10face=getPageIdFlag(_0x4a8c52)!==undefined,_0x45bf0f=Boolean(_0x4a8c52['str'](_0x167809(0x141))||_0x4a8c52[_0x167809(0x14f)](_0x167809(0x110)));if(_0x10face&&_0x45bf0f)throw CliErrors[_0x167809(0x153)]('Use\x20either\x20--id\x20or\x20--datasetcode/--alias,\x20not\x20both.');if(!_0x10face&&!_0x45bf0f)throw CliErrors[_0x167809(0x153)](_0x167809(0x116));if(_0x4a8c52[_0x167809(0x14f)](_0x167809(0xf0))&&!_0x45bf0f)throw CliErrors[_0x167809(0x153)](_0x167809(0x135));}export function resolveDatasetCode(_0x4f108d){const _0x409271=a133_0x1462;validateDatasetSelector(_0x4f108d);const _0x31af01=_0x4f108d[_0x409271(0x14f)](_0x409271(0x141));if(_0x31af01)return _0x31af01;const _0x4a32a5=_0x4f108d[_0x409271(0x14f)]('alias'),_0x521f4f=resolveApiFilePath(_0x4f108d['apiDir'],_0x4f108d[_0x409271(0x146)]),_0x2b6adf=resolveAlias(_0x4f108d[_0x409271(0x126)],_0x4a32a5,undefined,_0x521f4f);if(_0x2b6adf)return _0x2b6adf;const _0x52a9f5=loadAliasMap(_0x4f108d['apiDir'],undefined,_0x521f4f),_0x202133=_0x52a9f5['length']>0x0?'Available\x20aliases:\x20'+_0x52a9f5[_0x409271(0x103)](_0x10db7e=>_0x10db7e[_0x409271(0x110)])[_0x409271(0x105)](',\x20'):_0x409271(0xe8)+CLI_BIN_NAME+_0x409271(0x10c);throw CliErrors['validation']('Alias\x20\x22'+_0x4a32a5+_0x409271(0x143)+_0x202133);}export async function loadDatasetDetailForPage(_0x5af3c6){const _0x1d3d18=a133_0x1462,_0x22a9dc=resolveDatasetCode(_0x5af3c6),_0x39bd4c=await getDatasetDetail(_0x22a9dc),_0x10fa2b=normalizeDatasetDetail(_0x39bd4c,_0x22a9dc);return ensureAppOwnership(_0x5af3c6['appCode'],_0x10fa2b['appCode'],_0x1d3d18(0x11d)+_0x10fa2b[_0x1d3d18(0xdc)]+'\x22\x20belongs\x20to\x20app\x20\x22'+_0x10fa2b[_0x1d3d18(0x146)]+_0x1d3d18(0x123)+_0x5af3c6[_0x1d3d18(0x146)]+'\x22.'),_0x10fa2b;}export async function loadPageDetailForPage(_0x2a59ea,_0x26ff98){const _0x570623=a133_0x1462,_0x19258e=await getPageDetail(_0x26ff98),_0x5ba92b=normalizePageDetail(_0x19258e);return ensureAppOwnership(_0x2a59ea[_0x570623(0x146)],_0x5ba92b[_0x570623(0x146)],_0x570623(0x149)+_0x26ff98+_0x570623(0xe0)+_0x5ba92b[_0x570623(0x146)]+_0x570623(0x123)+_0x2a59ea[_0x570623(0x146)]+'\x22.'),_0x5ba92b;}export function getUndeletedRelatedPages(_0x2f7852){const _0x4e5c89=a133_0x1462;return _0x2f7852[_0x4e5c89(0xe1)][_0x4e5c89(0x12c)](_0x2abadf=>!_0x2abadf[_0x4e5c89(0x119)]);}export function buildPageGenerateOperationStatusQueryCommand(_0x337df3,_0x1bb9da){const _0x59d2b2=a133_0x1462,_0x50727a=_0x1bb9da?.['appCode']&&_0x1bb9da[_0x59d2b2(0x146)]['trim']()!==''?_0x59d2b2(0xe9)+_0x1bb9da[_0x59d2b2(0x146)]:'',_0x170a00=_0x1bb9da?.[_0x59d2b2(0xec)]&&_0x1bb9da['operationId'][_0x59d2b2(0x159)]()!==''?_0x59d2b2(0x148)+_0x1bb9da['operationId']:_0x1bb9da?.['clientOperationId']&&_0x1bb9da[_0x59d2b2(0xf3)]['trim']()!==''?'\x20--client-operation-id\x20'+_0x1bb9da[_0x59d2b2(0xf3)]:'';return CLI_BIN_NAME+_0x59d2b2(0x117)+_0x337df3+_0x50727a+_0x170a00+_0x59d2b2(0x157);}export function createPageGenerateClientOperationId(){return'page-generate-'+randomUUID();}export function buildStandardPageStatusQueryCommand(_0x3eacf8,_0x7e7d4){const _0x38ea1e=a133_0x1462,_0x4b9bd0=_0x7e7d4&&_0x7e7d4[_0x38ea1e(0x159)]()!==''?'\x20--appcode\x20'+_0x7e7d4:'';return CLI_BIN_NAME+_0x38ea1e(0x11b)+_0x3eacf8+_0x4b9bd0+_0x38ea1e(0x157);}export function prepareDatasetAction(_0x1d2624,_0x5a4dfb){const _0x1a6883=a133_0x1462,_0x27fc8c=getUndeletedRelatedPages(_0x1d2624);if(_0x5a4dfb===_0x1a6883(0x13a)&&_0x27fc8c[_0x1a6883(0x12e)]>0x0)throw CliErrors['validation'](_0x1a6883(0x11d)+_0x1d2624[_0x1a6883(0xdc)]+_0x1a6883(0x14e),_0x1a6883(0xe8)+CLI_BIN_NAME+_0x1a6883(0xfa)+_0x1d2624[_0x1a6883(0xdc)]+_0x1a6883(0xfc));if(_0x5a4dfb===_0x1a6883(0x120)&&_0x27fc8c[_0x1a6883(0x12e)]===0x0)throw CliErrors[_0x1a6883(0x153)]('Dataset\x20\x22'+_0x1d2624[_0x1a6883(0xdc)]+_0x1a6883(0xeb),'Run\x20`'+CLI_BIN_NAME+'\x20page\x20generate-start\x20--datasetcode\x20'+_0x1d2624['code']+_0x1a6883(0x111)+CLI_BIN_NAME+_0x1a6883(0x117)+_0x1d2624[_0x1a6883(0xdc)]+'\x20--operation-id\x20<id>`\x20until\x20it\x20reaches\x20a\x20terminal\x20state.');return{'dataset':_0x1d2624,'undeletedPages':_0x27fc8c};}export function prepareGenerateDatasetAction(_0x50e030,_0x54424f){const _0x3e2370=a133_0x1462,_0x105085=getUndeletedRelatedPages(_0x50e030);if(!_0x54424f){if(_0x105085[_0x3e2370(0x12e)]>0x0)throw CliErrors['validation'](_0x3e2370(0x11d)+_0x50e030['code']+_0x3e2370(0x14e),_0x3e2370(0xe8)+CLI_BIN_NAME+'\x20page\x20sync\x20--datasetcode\x20'+_0x50e030[_0x3e2370(0xdc)]+_0x3e2370(0xfc));return{'dataset':_0x50e030,'undeletedPages':_0x105085,'standardPageStatus':null};}const _0x52a28f=_0x54424f[_0x3e2370(0x142)],_0x4d5558=_0x54424f['incompleteSets'],_0x519845=_0x54424f[_0x3e2370(0x14b)][_0x3e2370(0x12e)];if(_0x52a28f===0x0&&_0x4d5558===0x0&&_0x519845===0x0)return{'dataset':_0x50e030,'undeletedPages':_0x105085,'standardPageStatus':_0x54424f};if(_0x52a28f===0x1&&_0x4d5558===0x0&&_0x519845===0x0)throw CliErrors['validation'](_0x3e2370(0x11d)+_0x50e030[_0x3e2370(0xdc)]+_0x3e2370(0xff),_0x3e2370(0xe8)+CLI_BIN_NAME+_0x3e2370(0xfa)+_0x50e030['code']+_0x3e2370(0xfc));throw CliErrors['validation'](_0x3e2370(0x11d)+_0x50e030['code']+'\x22\x20has\x20multiple\x20or\x20incomplete\x20Smart\x20List\x20Page\x20sets.',_0x3e2370(0x11e));}export function assessStandardPageState(_0x1ebe52,_0x46456b,_0x1c3b50){const _0x2e2337=a133_0x1462,_0x280d4e=_0x1c3b50?.['successStatus']??_0x2e2337(0xea),_0x52312b=_0x1c3b50?.[_0x2e2337(0xe6)]??[];if(!_0x46456b){if(_0x52312b[_0x2e2337(0x12e)]>0x0)return{'status':'blocked_incomplete_sets','allowGenerate':![],'manualResolutionRequired':!![],'message':_0x2e2337(0x11d)+_0x1ebe52+_0x2e2337(0x109),'nextAction':'manual_resolution_required'};return{'status':_0x2e2337(0x113),'allowGenerate':!![],'manualResolutionRequired':![],'message':'Dataset\x20\x22'+_0x1ebe52+_0x2e2337(0x115),'nextAction':'run_generate_start'};}const _0x3ea0a9=_0x46456b[_0x2e2337(0x142)],_0x331d83=_0x46456b[_0x2e2337(0x11c)],_0x5614ff=_0x46456b['residualPages']['length'];if(_0x3ea0a9===0x0&&_0x331d83===0x0&&_0x5614ff===0x0)return{'status':_0x2e2337(0x113),'allowGenerate':!![],'manualResolutionRequired':![],'message':_0x2e2337(0x11d)+_0x1ebe52+_0x2e2337(0x115),'nextAction':_0x2e2337(0x12f)};if(_0x3ea0a9>0x1)return{'status':_0x2e2337(0xdf),'allowGenerate':![],'manualResolutionRequired':!![],'message':_0x2e2337(0x11d)+_0x1ebe52+'\x22\x20has\x20multiple\x20complete\x20Smart\x20List\x20Page\x20sets.','nextAction':_0x2e2337(0x15a)};if(_0x331d83>0x0)return{'status':'blocked_incomplete_sets','allowGenerate':![],'manualResolutionRequired':!![],'message':_0x2e2337(0x11d)+_0x1ebe52+_0x2e2337(0x13c),'nextAction':'manual_resolution_required'};if(_0x3ea0a9===0x1&&_0x5614ff>0x0)return{'status':_0x2e2337(0x139),'allowGenerate':![],'manualResolutionRequired':!![],'message':_0x2e2337(0x11d)+_0x1ebe52+'\x22\x20has\x20one\x20complete\x20set\x20plus\x20residual\x20pages.','nextAction':'manual_resolution_required'};if(_0x3ea0a9===0x1)return{'status':_0x280d4e,'allowGenerate':![],'manualResolutionRequired':![],'message':_0x280d4e===_0x2e2337(0x140)?_0x2e2337(0x11d)+_0x1ebe52+_0x2e2337(0xf9):'Dataset\x20\x22'+_0x1ebe52+_0x2e2337(0xff),'nextAction':_0x280d4e===_0x2e2337(0x140)?undefined:'run_sync'};return{'status':_0x2e2337(0xf1),'allowGenerate':![],'manualResolutionRequired':![],'message':_0x2e2337(0x11d)+_0x1ebe52+'\x22\x20returned\x20an\x20unsupported\x20Smart\x20List\x20Page\x20state.','nextAction':'query_operation_status'};}export function assessGenerateOperationState(_0x14d7d5,_0x5bcc3e,_0x5a632f){const _0x5f2e93=a133_0x1462,_0x5114bc=String(_0x5bcc3e||'')[_0x5f2e93(0x159)]()['toUpperCase']();if(_0x5114bc===_0x5f2e93(0x15c))return{'status':_0x5f2e93(0x154),'manualResolutionRequired':![],'message':_0x5f2e93(0x14c)+_0x14d7d5+'\x22.','nextAction':_0x5f2e93(0x155)};if(_0x5114bc==='RUNNING'||_0x5114bc===_0x5f2e93(0x12b)||_0x5114bc===_0x5f2e93(0x127))return{'status':'operation_running','manualResolutionRequired':![],'message':'Smart\x20List\x20Page\x20generation\x20is\x20running\x20for\x20dataset\x20\x22'+_0x14d7d5+'\x22.','nextAction':_0x5f2e93(0x155)};if(_0x5114bc===_0x5f2e93(0x132)||_0x5114bc==='PARTIAL_SUCCESS'){if(!_0x5a632f)return{'status':_0x5f2e93(0xf1),'manualResolutionRequired':![],'message':_0x5f2e93(0x10a)+_0x14d7d5+_0x5f2e93(0xee),'nextAction':_0x5f2e93(0x155)};const _0x4a011b=assessStandardPageState(_0x14d7d5,_0x5a632f,{'successStatus':_0x5f2e93(0x140)});if(_0x4a011b[_0x5f2e93(0x14d)]===_0x5f2e93(0x113))return{'status':_0x5f2e93(0xf1),'manualResolutionRequired':![],'message':_0x5f2e93(0x10a)+_0x14d7d5+_0x5f2e93(0x128),'nextAction':_0x5f2e93(0x155)};return _0x4a011b;}if(_0x5114bc===_0x5f2e93(0xe7)||_0x5114bc===_0x5f2e93(0xed)||_0x5114bc==='')return{'status':'operation_failed','manualResolutionRequired':![],'message':_0x5f2e93(0x151)+_0x14d7d5+'\x22.','nextAction':_0x5f2e93(0x155)};return{'status':_0x5f2e93(0xf1),'manualResolutionRequired':![],'message':_0x5f2e93(0x11d)+_0x14d7d5+_0x5f2e93(0x114)+_0x5114bc+'\x22.','nextAction':_0x5f2e93(0x155)};}export function normalizePageDetail(_0x230db6){const _0x211787=a133_0x1462;return{'pageId':Number(_0x230db6['pageId']),'appCode':_0x230db6['appCode'],'name':_0x230db6[_0x211787(0x13f)]||_0x211787(0xf7)+_0x230db6[_0x211787(0xfb)],'code':_0x230db6['code']||'','type':_0x230db6[_0x211787(0xfd)]?String(_0x230db6['type']):_0x211787(0x137),'datasetIds':Array['isArray'](_0x230db6[_0x211787(0x122)])?_0x230db6[_0x211787(0x122)]['map'](_0x1c17ba=>Number(_0x1c17ba))[_0x211787(0x12c)](_0x32b44f=>Number[_0x211787(0x104)](_0x32b44f)):[],'pageVersion':_0x230db6[_0x211787(0x134)]&&typeof _0x230db6['config'][_0x211787(0xde)]===_0x211787(0xf2)?_0x230db6[_0x211787(0x134)][_0x211787(0xde)]:null,'versionTag':_0x230db6[_0x211787(0x134)]&&typeof _0x230db6[_0x211787(0x134)]['versionTag']==='string'&&_0x230db6[_0x211787(0x134)][_0x211787(0x13d)][_0x211787(0x159)]()!==''?_0x230db6[_0x211787(0x134)][_0x211787(0x13d)]:null,'relatedPages':normalizeRelatedPages(_0x230db6[_0x211787(0x13b)]),'raw':_0x230db6};}export function serializeDryRunDescription(_0x4a1489){return JSON['stringify'](_0x4a1489,null,0x2);}export async function loadStandardPageStatusForGenerate(_0xb30cd0,_0x44281b){const _0x34ee9e=a133_0x1462,_0x2aacf3=await tryGetStandardPageStatus(_0xb30cd0[_0x34ee9e(0x146)],_0x44281b);if(!_0x2aacf3)return null;return normalizeStandardPageStatus(_0x2aacf3,_0x44281b);}export function selectVersionTagGroup(_0x54151e,_0xcf5f27,_0x32e7a4){const _0x50075c=a133_0x1462,_0x2cbeca=new Map();for(const _0x3fa16d of _0x54151e){const _0x3aae38=normalizeVersionTag(_0xcf5f27(_0x3fa16d)),_0x289c55=_0x2cbeca['get'](_0x3aae38)??[];_0x289c55[_0x50075c(0x125)](_0x3fa16d),_0x2cbeca[_0x50075c(0xf8)](_0x3aae38,_0x289c55);}const _0x124cb8=Array['from'](_0x2cbeca[_0x50075c(0xe5)]());if(_0x124cb8[_0x50075c(0x12e)]<=0x1&&!_0x32e7a4)return{'items':_0x54151e,'availableTags':_0x124cb8};if(_0x32e7a4){const _0x4f24fa=normalizeVersionTag(_0x32e7a4),_0xbbcb3d=_0x2cbeca[_0x50075c(0xf5)](_0x4f24fa);if(!_0xbbcb3d)throw CliErrors['validation']('Version\x20tag\x20\x22'+_0x32e7a4+'\x22\x20not\x20found.',buildVersionTagHint(_0x124cb8));return{'items':_0xbbcb3d,'availableTags':_0x124cb8};}throw CliErrors[_0x50075c(0x153)](_0x50075c(0x130),buildVersionTagHint(_0x124cb8));}function normalizeDatasetDetail(_0x218243,_0x2b0ce7){const _0xdd59e=a133_0x1462,_0x4ece60=Array[_0xdd59e(0x150)](_0x218243['fields'])?_0x218243[_0xdd59e(0x100)]:Array[_0xdd59e(0x150)](_0x218243[_0xdd59e(0x12a)])?_0x218243[_0xdd59e(0x12a)]:[];return{'id':Number(_0x218243['id']??_0x218243['modelId']??0x0),'code':String(_0x218243[_0xdd59e(0xdc)]||_0x218243[_0xdd59e(0x145)]||_0x2b0ce7),'name':String(_0x218243[_0xdd59e(0x13f)]||_0x2b0ce7),'appCode':_0x218243['appCode']||_0x218243[_0xdd59e(0x12d)]?.[_0xdd59e(0x146)],'fieldCount':_0x4ece60[_0xdd59e(0x12e)],'relatedPages':normalizeRelatedPages(_0x218243['relatedPageInfoList']),'raw':_0x218243};}function normalizeStandardPageStatus(_0x125e60,_0x4b14c2){const _0x282424=a133_0x1462,_0x34174d=_0x15affc=>({'pageId':Number(_0x15affc[_0x282424(0xfb)]??_0x15affc['id']??0x0),'title':String(_0x15affc[_0x282424(0x108)]||_0x15affc['name']||_0x282424(0xf7)+(_0x15affc['pageId']??_0x15affc['id']??_0x282424(0xfe))),'type':_0x15affc[_0x282424(0xfd)]?String(_0x15affc[_0x282424(0xfd)]):_0x282424(0x137),'deleted':_0x15affc[_0x282424(0x119)]===!![],'hasMenu':_0x15affc[_0x282424(0x10e)]===!![],'menuVisible':typeof _0x15affc[_0x282424(0xdd)]===_0x282424(0x133)?_0x15affc['menuVisible']:null,'menuPath':typeof _0x15affc[_0x282424(0x101)]===_0x282424(0xf6)&&_0x15affc[_0x282424(0x101)]['trim']()!==''?_0x15affc[_0x282424(0x101)]:null}),_0x5499e2=Array['isArray'](_0x125e60[_0x282424(0xe2)])?_0x125e60[_0x282424(0xe2)]['map'](_0x3d6808=>({'versionTag':typeof _0x3d6808[_0x282424(0x13d)]===_0x282424(0xf6)&&_0x3d6808[_0x282424(0x13d)]['trim']()!==''?_0x3d6808[_0x282424(0x13d)]:null,'complete':_0x3d6808[_0x282424(0x107)]===!![],'pages':Array[_0x282424(0x150)](_0x3d6808[_0x282424(0x112)])?_0x3d6808[_0x282424(0x112)][_0x282424(0x103)](_0x34174d):[]})):[];return{'datasetId':typeof _0x125e60['datasetId']===_0x282424(0xf2)&&Number[_0x282424(0x104)](_0x125e60[_0x282424(0x11a)])?_0x125e60[_0x282424(0x11a)]:null,'datasetCode':typeof _0x125e60[_0x282424(0x102)]===_0x282424(0xf6)&&_0x125e60[_0x282424(0x102)][_0x282424(0x159)]()!==''?_0x125e60[_0x282424(0x102)]:_0x4b14c2,'pageSets':_0x5499e2,'totalSets':typeof _0x125e60[_0x282424(0x10d)]===_0x282424(0xf2)&&Number[_0x282424(0x104)](_0x125e60[_0x282424(0x10d)])?_0x125e60[_0x282424(0x10d)]:_0x5499e2['length'],'completeSets':typeof _0x125e60[_0x282424(0x142)]===_0x282424(0xf2)&&Number[_0x282424(0x104)](_0x125e60[_0x282424(0x142)])?_0x125e60[_0x282424(0x142)]:_0x5499e2[_0x282424(0x12c)](_0x5832c5=>_0x5832c5[_0x282424(0x107)])[_0x282424(0x12e)],'incompleteSets':typeof _0x125e60[_0x282424(0x11c)]===_0x282424(0xf2)&&Number[_0x282424(0x104)](_0x125e60[_0x282424(0x11c)])?_0x125e60['incompleteSets']:_0x5499e2['filter'](_0x46b722=>!_0x46b722['complete']&&_0x46b722['pages']['length']>0x0)[_0x282424(0x12e)],'residualPages':Array[_0x282424(0x150)](_0x125e60[_0x282424(0x14b)])?_0x125e60[_0x282424(0x14b)][_0x282424(0x103)](_0x34174d):[],'menuPages':Array[_0x282424(0x150)](_0x125e60[_0x282424(0x121)])?_0x125e60[_0x282424(0x121)][_0x282424(0x103)](_0x34174d):[],'source':_0x282424(0x158)};}function normalizeRelatedPages(_0xda098f){const _0x52c43e=a133_0x1462;if(!Array[_0x52c43e(0x150)](_0xda098f))return[];return _0xda098f[_0x52c43e(0x12c)](_0x42d8a9=>_0x42d8a9&&typeof _0x42d8a9===_0x52c43e(0x124))[_0x52c43e(0x103)](_0x106913=>({'id':Number(_0x106913['id']),'type':_0x106913[_0x52c43e(0xfd)]?String(_0x106913[_0x52c43e(0xfd)]):'UNKNOWN','code':_0x106913['code']||undefined,'title':_0x106913[_0x52c43e(0x108)]||_0x106913[_0x52c43e(0x13f)]||_0x52c43e(0xf7)+_0x106913['id'],'deleted':_0x106913[_0x52c43e(0x119)]===!![]}))['filter'](_0x39916c=>Number[_0x52c43e(0x104)](_0x39916c['id']));}function ensureAppOwnership(_0x8c14ae,_0x959475,_0x25a17d){const _0x1f6894=a133_0x1462;if(!_0x959475)return;if(_0x959475!==_0x8c14ae)throw CliErrors[_0x1f6894(0x153)](_0x25a17d,_0x1f6894(0x138)+CLI_BIN_NAME+_0x1f6894(0x131));}function normalizeVersionTag(_0x2466aa){const _0x15c189=a133_0x1462;return _0x2466aa&&_0x2466aa['trim']()!==''?_0x2466aa:_0x15c189(0x152);}function buildVersionTagHint(_0x5e7f14){const _0x4175a5=a133_0x1462,_0x18acb4=_0x5e7f14[_0x4175a5(0x103)](_0x515790=>_0x515790===_0x4175a5(0x152)?_0x4175a5(0x10b):_0x515790)[_0x4175a5(0x105)](',\x20');return _0x4175a5(0xe3)+_0x18acb4;}
1
+ (function(_0x21808b,_0x213519){const _0x4e698f=a133_0x35c0,_0x4a5222=_0x21808b();while(!![]){try{const _0x54bf02=parseInt(_0x4e698f(0x107))/0x1*(parseInt(_0x4e698f(0xa4))/0x2)+-parseInt(_0x4e698f(0xb8))/0x3+-parseInt(_0x4e698f(0xdb))/0x4+-parseInt(_0x4e698f(0x99))/0x5*(-parseInt(_0x4e698f(0xe2))/0x6)+-parseInt(_0x4e698f(0xe6))/0x7*(-parseInt(_0x4e698f(0x96))/0x8)+-parseInt(_0x4e698f(0x10f))/0x9*(-parseInt(_0x4e698f(0xc6))/0xa)+-parseInt(_0x4e698f(0xd4))/0xb*(parseInt(_0x4e698f(0x95))/0xc);if(_0x54bf02===_0x213519)break;else _0x4a5222['push'](_0x4a5222['shift']());}catch(_0x2fc4ee){_0x4a5222['push'](_0x4a5222['shift']());}}}(a133_0x1240,0x9f32e));function a133_0x35c0(_0x2a3931,_0x3af0b6){_0x2a3931=_0x2a3931-0x91;const _0x124077=a133_0x1240();let _0x35c051=_0x124077[_0x2a3931];return _0x35c051;}import{randomUUID}from'node:crypto';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getDatasetDetail,getPageDetail,tryGetStandardPageStatus}from'../../core/api-client.js';import{loadAliasMap,resolveAlias}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{CliErrors}from'../../errors.js';export function getPageIdFlag(_0x2c1b94){const _0x88d5c9=a133_0x35c0,_0x7185fb=_0x2c1b94['flag']('id');if(typeof _0x7185fb===_0x88d5c9(0xea)&&Number[_0x88d5c9(0x103)](_0x7185fb)&&_0x7185fb>0x0)return _0x7185fb;return undefined;}export function validateDatasetSelector(_0x47b254){const _0x215dc5=a133_0x35c0,_0x8aaf3a=Boolean(_0x47b254[_0x215dc5(0xdd)]('datasetcode')),_0x1e8a6d=Boolean(_0x47b254[_0x215dc5(0xdd)](_0x215dc5(0xfa)));if(_0x8aaf3a&&_0x1e8a6d)throw CliErrors[_0x215dc5(0xa9)]('Use\x20either\x20--datasetcode\x20or\x20--alias,\x20not\x20both.');if(!_0x8aaf3a&&!_0x1e8a6d)throw CliErrors[_0x215dc5(0xa9)](_0x215dc5(0x9e));}export function validateGenerateOperationSelector(_0xa1ff6e){const _0x28ee4f=a133_0x35c0,_0x331a54=Boolean(_0xa1ff6e[_0x28ee4f(0xdd)](_0x28ee4f(0xa7))),_0x30f5ee=Boolean(_0xa1ff6e[_0x28ee4f(0xdd)](_0x28ee4f(0xe3)));if(_0x331a54&&_0x30f5ee)throw CliErrors['validation'](_0x28ee4f(0x110));if(!_0x331a54&&!_0x30f5ee)throw CliErrors[_0x28ee4f(0xa9)](_0x28ee4f(0xc0));}function a133_0x1240(){const _0x2d593e=['pages','\x20page\x20generate-start\x20--datasetcode\x20','generated_complete_set','\x22\x20has\x20undeleted\x20related\x20pages\x20under\x20legacy\x20fallback\x20precheck.','Use\x20either\x20--id\x20or\x20--datasetcode/--alias,\x20not\x20both.','1692950lPmPvz','\x22\x20returned\x20an\x20unsupported\x20Smart\x20List\x20Page\x20state.','blocked_multiple_complete_sets','__EMPTY__','UNKNOWN','apiDir','status','Smart\x20List\x20Page\x20generation\x20is\x20pending\x20for\x20dataset\x20\x22','\x22,\x20not\x20current\x20app\x20\x22','\x22\x20already\x20has\x20one\x20complete\x20Smart\x20List\x20Page\x20set.','hasMenu','\x20--appcode\x20','appCode','no_standard_pages_found','766337ORNUkk','trim','get','--version-tag\x20is\x20only\x20supported\x20with\x20--datasetcode\x20or\x20--alias.','\x22\x20returned\x20unsupported\x20operation\x20status\x20\x22','sync','code','674836REKAJh','\x22\x20has\x20multiple\x20or\x20incomplete\x20Smart\x20List\x20Page\x20sets.','str','standard-page-status','\x22\x20now\x20has\x20one\x20complete\x20Smart\x20List\x20Page\x20set.','\x20page\x20sync\x20--datasetcode\x20','datasetIds','5675250SilUrv','client-operation-id','datasetcode','page-generate-','2772HZIFRM','operation_failed','menuPath','run_generate_start','number','isArray','title','operation_running','query_operation_status','completeSets','operation_pending','relatedPages','<empty>','already_exists_complete_set','Switch\x20app\x20with\x20`','\x22,\x20but\x20no\x20Smart\x20List\x20Pages\x20were\x20found\x20during\x20reconcile.','keys','type','\x22\x20belongs\x20to\x20app\x20\x22','set','alias','\x20--format\x20json','filter','\x22\x20already\x20has\x20undeleted\x20related\x20pages.','push','FAILED','menuPages','manual_resolution_required','clientOperationId','isFinite','unknown_reconcile_failed','generate','\x20--client-operation-id\x20','3ppBMAn','Run\x20`','unknown','name','incompleteSets','version-tag','relatedPageInfoList','Use\x20`--version-tag\x20<tag>`.\x20Available\x20groups:\x20','27DFwyiX','Use\x20either\x20--operation-id\x20or\x20--client-operation-id,\x20not\x20both.','datasetCode','map','Version\x20tag\x20\x22','config','pageId','96LIiaoF','1824mBCVae','object','pageVersion','5idyRgZ','`\x20first,\x20then\x20poll\x20`','Smart\x20List\x20Page\x20generation\x20is\x20running\x20for\x20dataset\x20\x22','fields','\x22\x20has\x20no\x20Smart\x20List\x20Pages\x20yet.','One\x20of\x20--datasetcode\x20or\x20--alias\x20is\x20required.','blocked_incomplete_sets','modelId','stringify','string','\x22\x20has\x20incomplete\x20Smart\x20List\x20Page\x20sets.','693952wgIJbx','\x22\x20has\x20multiple\x20complete\x20Smart\x20List\x20Page\x20sets.','\x20--operation-id\x20','operation-id','Smart\x20List\x20Page\x20generation\x20failed\x20for\x20dataset\x20\x22','validation','\x20--operation-id\x20<id>`\x20until\x20it\x20reaches\x20a\x20terminal\x20state.','Page\x20\x22','\x22\x20has\x20one\x20complete\x20set\x20plus\x20residual\x20pages.','pageSets','residualPages','`\x20instead.','versionTag','Dataset\x20\x22','boolean','totalSets','complete','length','Operation\x20finished\x20for\x20dataset\x20\x22','RUNNING','3620559CmwOCo','\x22\x20has\x20no\x20undeleted\x20related\x20pages.','from','join','deleted','\x20api\x20pull`\x20first,\x20or\x20pass\x20--datasetcode\x20directly.','operationId','\x20workspace\x20use\x20--app\x20<name>`\x20or\x20pass\x20--appcode.','One\x20of\x20--operation-id\x20or\x20--client-operation-id\x20is\x20required.'];a133_0x1240=function(){return _0x2d593e;};return a133_0x1240();}export function validatePageTargetSelector(_0x34a449){const _0x5295a3=a133_0x35c0,_0x4577a6=getPageIdFlag(_0x34a449)!==undefined,_0xcb17a6=Boolean(_0x34a449[_0x5295a3(0xdd)](_0x5295a3(0xe4))||_0x34a449[_0x5295a3(0xdd)](_0x5295a3(0xfa)));if(_0x4577a6&&_0xcb17a6)throw CliErrors[_0x5295a3(0xa9)](_0x5295a3(0xc5));if(!_0x4577a6&&!_0xcb17a6)throw CliErrors[_0x5295a3(0xa9)]('One\x20of\x20--id\x20or\x20--datasetcode/--alias\x20is\x20required.');if(_0x34a449[_0x5295a3(0xdd)](_0x5295a3(0x10c))&&!_0xcb17a6)throw CliErrors[_0x5295a3(0xa9)](_0x5295a3(0xd7));}export function resolveDatasetCode(_0x15b37f){const _0x52fe60=a133_0x35c0;validateDatasetSelector(_0x15b37f);const _0x3d742b=_0x15b37f['str'](_0x52fe60(0xe4));if(_0x3d742b)return _0x3d742b;const _0x152fd6=_0x15b37f[_0x52fe60(0xdd)](_0x52fe60(0xfa)),_0x52185b=resolveApiFilePath(_0x15b37f[_0x52fe60(0xcb)],_0x15b37f[_0x52fe60(0xd2)]),_0x2e6af3=resolveAlias(_0x15b37f[_0x52fe60(0xcb)],_0x152fd6,undefined,_0x52185b);if(_0x2e6af3)return _0x2e6af3;const _0x14cf5e=loadAliasMap(_0x15b37f[_0x52fe60(0xcb)],undefined,_0x52185b),_0x14fd35=_0x14cf5e['length']>0x0?'Available\x20aliases:\x20'+_0x14cf5e['map'](_0x560087=>_0x560087[_0x52fe60(0xfa)])['join'](',\x20'):_0x52fe60(0x108)+CLI_BIN_NAME+_0x52fe60(0xbd);throw CliErrors['validation']('Alias\x20\x22'+_0x152fd6+'\x22\x20not\x20found.\x20'+_0x14fd35);}export async function loadDatasetDetailForPage(_0x511a7c){const _0x302860=a133_0x35c0,_0x3f3536=resolveDatasetCode(_0x511a7c),_0x1f5252=await getDatasetDetail(_0x3f3536),_0x41aaca=normalizeDatasetDetail(_0x1f5252,_0x3f3536);return ensureAppOwnership(_0x511a7c[_0x302860(0xd2)],_0x41aaca[_0x302860(0xd2)],'Dataset\x20\x22'+_0x41aaca[_0x302860(0xda)]+_0x302860(0xf8)+_0x41aaca[_0x302860(0xd2)]+_0x302860(0xce)+_0x511a7c[_0x302860(0xd2)]+'\x22.'),_0x41aaca;}export async function loadPageDetailForPage(_0xb3eb17,_0x2d6a3f){const _0x3ee460=a133_0x35c0,_0x1fcfa6=await getPageDetail(_0x2d6a3f),_0x6ee096=normalizePageDetail(_0x1fcfa6);return ensureAppOwnership(_0xb3eb17[_0x3ee460(0xd2)],_0x6ee096[_0x3ee460(0xd2)],_0x3ee460(0xab)+_0x2d6a3f+_0x3ee460(0xf8)+_0x6ee096['appCode']+_0x3ee460(0xce)+_0xb3eb17[_0x3ee460(0xd2)]+'\x22.'),_0x6ee096;}export function getUndeletedRelatedPages(_0x1fd5c9){const _0x18ab3b=a133_0x35c0;return _0x1fd5c9[_0x18ab3b(0xf1)][_0x18ab3b(0xfc)](_0x55b381=>!_0x55b381[_0x18ab3b(0xbc)]);}export function buildPageGenerateOperationStatusQueryCommand(_0x701822,_0x1e5b78){const _0x33073b=a133_0x35c0,_0x3d07da=_0x1e5b78?.[_0x33073b(0xd2)]&&_0x1e5b78[_0x33073b(0xd2)][_0x33073b(0xd5)]()!==''?'\x20--appcode\x20'+_0x1e5b78['appCode']:'',_0x359b01=_0x1e5b78?.['operationId']&&_0x1e5b78[_0x33073b(0xbe)]['trim']()!==''?_0x33073b(0xa6)+_0x1e5b78[_0x33073b(0xbe)]:_0x1e5b78?.[_0x33073b(0x102)]&&_0x1e5b78['clientOperationId']['trim']()!==''?_0x33073b(0x106)+_0x1e5b78[_0x33073b(0x102)]:'';return CLI_BIN_NAME+'\x20page\x20generate-status\x20--datasetcode\x20'+_0x701822+_0x3d07da+_0x359b01+_0x33073b(0xfb);}export function createPageGenerateClientOperationId(){const _0x3f9461=a133_0x35c0;return _0x3f9461(0xe5)+randomUUID();}export function buildStandardPageStatusQueryCommand(_0x2f2393,_0x10f373){const _0x508be9=a133_0x35c0,_0x31d5f6=_0x10f373&&_0x10f373[_0x508be9(0xd5)]()!==''?_0x508be9(0xd1)+_0x10f373:'';return CLI_BIN_NAME+'\x20page\x20standard-page-status\x20--datasetcode\x20'+_0x2f2393+_0x31d5f6+_0x508be9(0xfb);}export function prepareDatasetAction(_0x2265c0,_0x48bd33){const _0x5afabb=a133_0x35c0,_0x58b936=getUndeletedRelatedPages(_0x2265c0);if(_0x48bd33===_0x5afabb(0x105)&&_0x58b936[_0x5afabb(0xb5)]>0x0)throw CliErrors[_0x5afabb(0xa9)](_0x5afabb(0xb1)+_0x2265c0[_0x5afabb(0xda)]+_0x5afabb(0xfd),_0x5afabb(0x108)+CLI_BIN_NAME+_0x5afabb(0xe0)+_0x2265c0[_0x5afabb(0xda)]+'`\x20instead.');if(_0x48bd33===_0x5afabb(0xd9)&&_0x58b936[_0x5afabb(0xb5)]===0x0)throw CliErrors[_0x5afabb(0xa9)](_0x5afabb(0xb1)+_0x2265c0[_0x5afabb(0xda)]+_0x5afabb(0xb9),_0x5afabb(0x108)+CLI_BIN_NAME+_0x5afabb(0xc2)+_0x2265c0['code']+_0x5afabb(0x9a)+CLI_BIN_NAME+'\x20page\x20generate-status\x20--datasetcode\x20'+_0x2265c0[_0x5afabb(0xda)]+_0x5afabb(0xaa));return{'dataset':_0x2265c0,'undeletedPages':_0x58b936};}export function prepareGenerateDatasetAction(_0x4a42f2,_0x41ffdd){const _0x3ce5ff=a133_0x35c0,_0x5d1528=getUndeletedRelatedPages(_0x4a42f2);if(!_0x41ffdd){if(_0x5d1528['length']>0x0)throw CliErrors[_0x3ce5ff(0xa9)](_0x3ce5ff(0xb1)+_0x4a42f2[_0x3ce5ff(0xda)]+_0x3ce5ff(0xfd),_0x3ce5ff(0x108)+CLI_BIN_NAME+_0x3ce5ff(0xe0)+_0x4a42f2[_0x3ce5ff(0xda)]+'`\x20instead.');return{'dataset':_0x4a42f2,'undeletedPages':_0x5d1528,'standardPageStatus':null};}const _0x2b1680=_0x41ffdd[_0x3ce5ff(0xef)],_0x40e760=_0x41ffdd[_0x3ce5ff(0x10b)],_0x3a743d=_0x41ffdd[_0x3ce5ff(0xae)]['length'];if(_0x2b1680===0x0&&_0x40e760===0x0&&_0x3a743d===0x0)return{'dataset':_0x4a42f2,'undeletedPages':_0x5d1528,'standardPageStatus':_0x41ffdd};if(_0x2b1680===0x1&&_0x40e760===0x0&&_0x3a743d===0x0)throw CliErrors[_0x3ce5ff(0xa9)](_0x3ce5ff(0xb1)+_0x4a42f2[_0x3ce5ff(0xda)]+_0x3ce5ff(0xcf),_0x3ce5ff(0x108)+CLI_BIN_NAME+'\x20page\x20sync\x20--datasetcode\x20'+_0x4a42f2[_0x3ce5ff(0xda)]+_0x3ce5ff(0xaf));throw CliErrors[_0x3ce5ff(0xa9)](_0x3ce5ff(0xb1)+_0x4a42f2['code']+_0x3ce5ff(0xdc),'Query\x20the\x20page\x20facts\x20first\x20and\x20resolve\x20manually\x20before\x20retrying\x20generate.');}export function assessStandardPageState(_0x4916c9,_0x46893b,_0x10d55f){const _0x1cec89=a133_0x35c0,_0x5db62a=_0x10d55f?.['successStatus']??_0x1cec89(0xf3),_0x566986=_0x10d55f?.['fallbackUndeletedPages']??[];if(!_0x46893b){if(_0x566986['length']>0x0)return{'status':_0x1cec89(0x9f),'allowGenerate':![],'manualResolutionRequired':!![],'message':_0x1cec89(0xb1)+_0x4916c9+_0x1cec89(0xc4),'nextAction':'manual_resolution_required'};return{'status':_0x1cec89(0xd3),'allowGenerate':!![],'manualResolutionRequired':![],'message':_0x1cec89(0xb1)+_0x4916c9+_0x1cec89(0x9d),'nextAction':_0x1cec89(0xe9)};}const _0x333d17=_0x46893b[_0x1cec89(0xef)],_0x417619=_0x46893b[_0x1cec89(0x10b)],_0x8156ea=_0x46893b[_0x1cec89(0xae)]['length'];if(_0x333d17===0x0&&_0x417619===0x0&&_0x8156ea===0x0)return{'status':_0x1cec89(0xd3),'allowGenerate':!![],'manualResolutionRequired':![],'message':'Dataset\x20\x22'+_0x4916c9+_0x1cec89(0x9d),'nextAction':'run_generate_start'};if(_0x333d17>0x1)return{'status':_0x1cec89(0xc8),'allowGenerate':![],'manualResolutionRequired':!![],'message':_0x1cec89(0xb1)+_0x4916c9+_0x1cec89(0xa5),'nextAction':'manual_resolution_required'};if(_0x417619>0x0)return{'status':'blocked_incomplete_sets','allowGenerate':![],'manualResolutionRequired':!![],'message':_0x1cec89(0xb1)+_0x4916c9+_0x1cec89(0xa3),'nextAction':_0x1cec89(0x101)};if(_0x333d17===0x1&&_0x8156ea>0x0)return{'status':'blocked_complete_plus_residual_sets','allowGenerate':![],'manualResolutionRequired':!![],'message':_0x1cec89(0xb1)+_0x4916c9+_0x1cec89(0xac),'nextAction':_0x1cec89(0x101)};if(_0x333d17===0x1)return{'status':_0x5db62a,'allowGenerate':![],'manualResolutionRequired':![],'message':_0x5db62a==='generated_complete_set'?_0x1cec89(0xb1)+_0x4916c9+_0x1cec89(0xdf):_0x1cec89(0xb1)+_0x4916c9+_0x1cec89(0xcf),'nextAction':_0x5db62a==='generated_complete_set'?undefined:'run_sync'};return{'status':_0x1cec89(0x104),'allowGenerate':![],'manualResolutionRequired':![],'message':'Dataset\x20\x22'+_0x4916c9+_0x1cec89(0xc7),'nextAction':'query_operation_status'};}export function assessGenerateOperationState(_0x2398a7,_0x2b0bf8,_0x213356){const _0x455f9b=a133_0x35c0,_0x765ae0=String(_0x2b0bf8||'')[_0x455f9b(0xd5)]()['toUpperCase']();if(_0x765ae0==='PENDING')return{'status':_0x455f9b(0xf0),'manualResolutionRequired':![],'message':_0x455f9b(0xcd)+_0x2398a7+'\x22.','nextAction':_0x455f9b(0xee)};if(_0x765ae0===_0x455f9b(0xb7)||_0x765ae0==='RETRYING'||_0x765ae0==='CANCELING')return{'status':_0x455f9b(0xed),'manualResolutionRequired':![],'message':_0x455f9b(0x9b)+_0x2398a7+'\x22.','nextAction':_0x455f9b(0xee)};if(_0x765ae0==='SUCCESS'||_0x765ae0==='PARTIAL_SUCCESS'){if(!_0x213356)return{'status':_0x455f9b(0x104),'manualResolutionRequired':![],'message':_0x455f9b(0xb6)+_0x2398a7+'\x22,\x20but\x20Smart\x20List\x20Page\x20facts\x20are\x20unavailable.','nextAction':'query_operation_status'};const _0x1ce363=assessStandardPageState(_0x2398a7,_0x213356,{'successStatus':_0x455f9b(0xc3)});if(_0x1ce363[_0x455f9b(0xcc)]==='no_standard_pages_found')return{'status':_0x455f9b(0x104),'manualResolutionRequired':![],'message':_0x455f9b(0xb6)+_0x2398a7+_0x455f9b(0xf5),'nextAction':_0x455f9b(0xee)};return _0x1ce363;}if(_0x765ae0===_0x455f9b(0xff)||_0x765ae0==='CANCELLED'||_0x765ae0==='')return{'status':_0x455f9b(0xe7),'manualResolutionRequired':![],'message':_0x455f9b(0xa8)+_0x2398a7+'\x22.','nextAction':_0x455f9b(0xee)};return{'status':'unknown_reconcile_failed','manualResolutionRequired':![],'message':_0x455f9b(0xb1)+_0x2398a7+_0x455f9b(0xd8)+_0x765ae0+'\x22.','nextAction':'query_operation_status'};}export function normalizePageDetail(_0x274a5a){const _0x397e1f=a133_0x35c0;return{'pageId':Number(_0x274a5a[_0x397e1f(0x94)]),'appCode':_0x274a5a[_0x397e1f(0xd2)],'name':_0x274a5a['name']||'page-'+_0x274a5a[_0x397e1f(0x94)],'code':_0x274a5a[_0x397e1f(0xda)]||'','type':_0x274a5a[_0x397e1f(0xf7)]?String(_0x274a5a[_0x397e1f(0xf7)]):_0x397e1f(0xca),'datasetIds':Array[_0x397e1f(0xeb)](_0x274a5a[_0x397e1f(0xe1)])?_0x274a5a[_0x397e1f(0xe1)][_0x397e1f(0x91)](_0x161a90=>Number(_0x161a90))[_0x397e1f(0xfc)](_0x24203a=>Number['isFinite'](_0x24203a)):[],'pageVersion':_0x274a5a[_0x397e1f(0x93)]&&typeof _0x274a5a[_0x397e1f(0x93)][_0x397e1f(0x98)]===_0x397e1f(0xea)?_0x274a5a[_0x397e1f(0x93)]['pageVersion']:null,'versionTag':_0x274a5a[_0x397e1f(0x93)]&&typeof _0x274a5a[_0x397e1f(0x93)]['versionTag']==='string'&&_0x274a5a['config'][_0x397e1f(0xb0)][_0x397e1f(0xd5)]()!==''?_0x274a5a[_0x397e1f(0x93)][_0x397e1f(0xb0)]:null,'relatedPages':normalizeRelatedPages(_0x274a5a[_0x397e1f(0x10d)]),'raw':_0x274a5a};}export function serializeDryRunDescription(_0x1d7ac5){const _0x1349f8=a133_0x35c0;return JSON[_0x1349f8(0xa1)](_0x1d7ac5,null,0x2);}export async function loadStandardPageStatusForGenerate(_0x12794d,_0x59b9f3){const _0x3d09ee=a133_0x35c0,_0x585954=await tryGetStandardPageStatus(_0x12794d[_0x3d09ee(0xd2)],_0x59b9f3);if(!_0x585954)return null;return normalizeStandardPageStatus(_0x585954,_0x59b9f3);}export function selectVersionTagGroup(_0x3efa04,_0xf0d9b9,_0x36e441){const _0x256c5f=a133_0x35c0,_0x1b6dab=new Map();for(const _0x5d86ec of _0x3efa04){const _0x23d8a1=normalizeVersionTag(_0xf0d9b9(_0x5d86ec)),_0x2d868d=_0x1b6dab[_0x256c5f(0xd6)](_0x23d8a1)??[];_0x2d868d[_0x256c5f(0xfe)](_0x5d86ec),_0x1b6dab[_0x256c5f(0xf9)](_0x23d8a1,_0x2d868d);}const _0x4255cf=Array[_0x256c5f(0xba)](_0x1b6dab[_0x256c5f(0xf6)]());if(_0x4255cf[_0x256c5f(0xb5)]<=0x1&&!_0x36e441)return{'items':_0x3efa04,'availableTags':_0x4255cf};if(_0x36e441){const _0x51626e=normalizeVersionTag(_0x36e441),_0x1abc7b=_0x1b6dab[_0x256c5f(0xd6)](_0x51626e);if(!_0x1abc7b)throw CliErrors[_0x256c5f(0xa9)](_0x256c5f(0x92)+_0x36e441+'\x22\x20not\x20found.',buildVersionTagHint(_0x4255cf));return{'items':_0x1abc7b,'availableTags':_0x4255cf};}throw CliErrors['validation']('Multiple\x20page\x20groups\x20found\x20for\x20this\x20dataset.',buildVersionTagHint(_0x4255cf));}function normalizeDatasetDetail(_0x2e2638,_0x53c018){const _0x3cf7e0=a133_0x35c0,_0x24ee9b=Array[_0x3cf7e0(0xeb)](_0x2e2638[_0x3cf7e0(0x9c)])?_0x2e2638[_0x3cf7e0(0x9c)]:Array[_0x3cf7e0(0xeb)](_0x2e2638['properties'])?_0x2e2638['properties']:[];return{'id':Number(_0x2e2638['id']??_0x2e2638[_0x3cf7e0(0xa0)]??0x0),'code':String(_0x2e2638[_0x3cf7e0(0xda)]||_0x2e2638['modelCode']||_0x53c018),'name':String(_0x2e2638['name']||_0x53c018),'appCode':_0x2e2638[_0x3cf7e0(0xd2)]||_0x2e2638['dataset']?.[_0x3cf7e0(0xd2)],'fieldCount':_0x24ee9b[_0x3cf7e0(0xb5)],'relatedPages':normalizeRelatedPages(_0x2e2638[_0x3cf7e0(0x10d)]),'raw':_0x2e2638};}function normalizeStandardPageStatus(_0x3f7bd4,_0x1e9ecb){const _0x51bbfb=a133_0x35c0,_0x34d543=_0x539c1a=>({'pageId':Number(_0x539c1a[_0x51bbfb(0x94)]??_0x539c1a['id']??0x0),'title':String(_0x539c1a[_0x51bbfb(0xec)]||_0x539c1a[_0x51bbfb(0x10a)]||'page-'+(_0x539c1a[_0x51bbfb(0x94)]??_0x539c1a['id']??_0x51bbfb(0x109))),'type':_0x539c1a[_0x51bbfb(0xf7)]?String(_0x539c1a[_0x51bbfb(0xf7)]):_0x51bbfb(0xca),'deleted':_0x539c1a[_0x51bbfb(0xbc)]===!![],'hasMenu':_0x539c1a[_0x51bbfb(0xd0)]===!![],'menuVisible':typeof _0x539c1a['menuVisible']===_0x51bbfb(0xb2)?_0x539c1a['menuVisible']:null,'menuPath':typeof _0x539c1a[_0x51bbfb(0xe8)]===_0x51bbfb(0xa2)&&_0x539c1a[_0x51bbfb(0xe8)][_0x51bbfb(0xd5)]()!==''?_0x539c1a[_0x51bbfb(0xe8)]:null}),_0xf1afa8=Array[_0x51bbfb(0xeb)](_0x3f7bd4[_0x51bbfb(0xad)])?_0x3f7bd4['pageSets'][_0x51bbfb(0x91)](_0x1b4560=>({'versionTag':typeof _0x1b4560[_0x51bbfb(0xb0)]===_0x51bbfb(0xa2)&&_0x1b4560[_0x51bbfb(0xb0)][_0x51bbfb(0xd5)]()!==''?_0x1b4560[_0x51bbfb(0xb0)]:null,'complete':_0x1b4560[_0x51bbfb(0xb4)]===!![],'pages':Array[_0x51bbfb(0xeb)](_0x1b4560['pages'])?_0x1b4560[_0x51bbfb(0xc1)]['map'](_0x34d543):[]})):[];return{'datasetId':typeof _0x3f7bd4['datasetId']==='number'&&Number[_0x51bbfb(0x103)](_0x3f7bd4['datasetId'])?_0x3f7bd4['datasetId']:null,'datasetCode':typeof _0x3f7bd4['datasetCode']===_0x51bbfb(0xa2)&&_0x3f7bd4[_0x51bbfb(0x111)][_0x51bbfb(0xd5)]()!==''?_0x3f7bd4[_0x51bbfb(0x111)]:_0x1e9ecb,'pageSets':_0xf1afa8,'totalSets':typeof _0x3f7bd4[_0x51bbfb(0xb3)]===_0x51bbfb(0xea)&&Number[_0x51bbfb(0x103)](_0x3f7bd4[_0x51bbfb(0xb3)])?_0x3f7bd4['totalSets']:_0xf1afa8['length'],'completeSets':typeof _0x3f7bd4[_0x51bbfb(0xef)]===_0x51bbfb(0xea)&&Number['isFinite'](_0x3f7bd4[_0x51bbfb(0xef)])?_0x3f7bd4['completeSets']:_0xf1afa8[_0x51bbfb(0xfc)](_0x32d70a=>_0x32d70a[_0x51bbfb(0xb4)])[_0x51bbfb(0xb5)],'incompleteSets':typeof _0x3f7bd4[_0x51bbfb(0x10b)]===_0x51bbfb(0xea)&&Number[_0x51bbfb(0x103)](_0x3f7bd4[_0x51bbfb(0x10b)])?_0x3f7bd4['incompleteSets']:_0xf1afa8[_0x51bbfb(0xfc)](_0x1eec27=>!_0x1eec27[_0x51bbfb(0xb4)]&&_0x1eec27[_0x51bbfb(0xc1)][_0x51bbfb(0xb5)]>0x0)[_0x51bbfb(0xb5)],'residualPages':Array[_0x51bbfb(0xeb)](_0x3f7bd4[_0x51bbfb(0xae)])?_0x3f7bd4[_0x51bbfb(0xae)][_0x51bbfb(0x91)](_0x34d543):[],'menuPages':Array[_0x51bbfb(0xeb)](_0x3f7bd4['menuPages'])?_0x3f7bd4[_0x51bbfb(0x100)][_0x51bbfb(0x91)](_0x34d543):[],'source':_0x51bbfb(0xde)};}function normalizeRelatedPages(_0x59cd4b){const _0x2889a1=a133_0x35c0;if(!Array[_0x2889a1(0xeb)](_0x59cd4b))return[];return _0x59cd4b[_0x2889a1(0xfc)](_0x3e000e=>_0x3e000e&&typeof _0x3e000e===_0x2889a1(0x97))['map'](_0x22bb94=>({'id':Number(_0x22bb94['id']),'type':_0x22bb94[_0x2889a1(0xf7)]?String(_0x22bb94['type']):_0x2889a1(0xca),'code':_0x22bb94[_0x2889a1(0xda)]||undefined,'title':_0x22bb94['title']||_0x22bb94[_0x2889a1(0x10a)]||'page-'+_0x22bb94['id'],'deleted':_0x22bb94[_0x2889a1(0xbc)]===!![]}))[_0x2889a1(0xfc)](_0x4901a4=>Number[_0x2889a1(0x103)](_0x4901a4['id']));}function ensureAppOwnership(_0x538e4c,_0x30f4bd,_0x2a5df9){const _0x49a600=a133_0x35c0;if(!_0x30f4bd)return;if(_0x30f4bd!==_0x538e4c)throw CliErrors[_0x49a600(0xa9)](_0x2a5df9,_0x49a600(0xf4)+CLI_BIN_NAME+_0x49a600(0xbf));}function normalizeVersionTag(_0x5295a1){const _0x4f3e0f=a133_0x35c0;return _0x5295a1&&_0x5295a1[_0x4f3e0f(0xd5)]()!==''?_0x5295a1:_0x4f3e0f(0xc9);}function buildVersionTagHint(_0x355809){const _0x153a76=a133_0x35c0,_0x3b1428=_0x355809[_0x153a76(0x91)](_0x4951ac=>_0x4951ac===_0x153a76(0xc9)?_0x153a76(0xf2):_0x4951ac)[_0x153a76(0xbb)](',\x20');return _0x153a76(0x10e)+_0x3b1428;}
@@ -1 +1 @@
1
- function a134_0x5f4f(_0x39f7d0,_0x48217a){_0x39f7d0=_0x39f7d0-0x173;const _0x30359e=a134_0x3035();let _0x5f4faf=_0x30359e[_0x39f7d0];return _0x5f4faf;}const a134_0x272761=a134_0x5f4f;(function(_0x490f6d,_0x30b69a){const _0x337d9b=a134_0x5f4f,_0x4771f=_0x490f6d();while(!![]){try{const _0x298ff5=parseInt(_0x337d9b(0x18f))/0x1*(parseInt(_0x337d9b(0x189))/0x2)+-parseInt(_0x337d9b(0x186))/0x3*(parseInt(_0x337d9b(0x176))/0x4)+parseInt(_0x337d9b(0x191))/0x5+-parseInt(_0x337d9b(0x181))/0x6+-parseInt(_0x337d9b(0x188))/0x7*(parseInt(_0x337d9b(0x175))/0x8)+-parseInt(_0x337d9b(0x17c))/0x9+parseInt(_0x337d9b(0x18e))/0xa*(parseInt(_0x337d9b(0x182))/0xb);if(_0x298ff5===_0x30b69a)break;else _0x4771f['push'](_0x4771f['shift']());}catch(_0x2398d0){_0x4771f['push'](_0x4771f['shift']());}}}(a134_0x3035,0xb4227));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a134_0x3035(){const _0x5bc211=['manualResolutionRequired','status','standard-page-status','8013894gZooBC','22oACrUS','string','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','/standard-page-status?appCode=','723qRgvij','query-standard-page-status','7721ozrFuI','274NPStia','nextAction','/smartapi/lovrabet/dataset/','related-pages-fallback','Query\x20Smart\x20List\x20Page\x20facts\x20for\x20a\x20dataset','22938140zaVbey','2735WbtLqa','name','131720JSLUJj','code','page','9392mHmekm','5932mcTwhl','source','GET','length','appCode','compress','11365758jLyqvm','alias'];a134_0x3035=function(){return _0x5bc211;};return a134_0x3035();}import{assessStandardPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadStandardPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';export const pageStandardPageStatus={'service':a134_0x272761(0x174),'command':a134_0x272761(0x180),'description':a134_0x272761(0x18d),'risk':'read','defaultOutputFormat':a134_0x272761(0x17b),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a134_0x272761(0x17d),'type':a134_0x272761(0x183),'description':a134_0x272761(0x184)}],async 'validate'(_0x4247d3){validateDatasetSelector(_0x4247d3);},async 'dryRun'(_0x25f633){const _0x15b163=a134_0x272761,_0x5d0ba0=await loadDatasetDetailForPage(_0x25f633);return{'method':_0x15b163(0x178),'url':_0x15b163(0x18b)+_0x5d0ba0[_0x15b163(0x173)]+_0x15b163(0x185)+encodeURIComponent(_0x25f633[_0x15b163(0x17a)]),'description':serializeDryRunDescription({'dataset':{'id':_0x5d0ba0['id'],'code':_0x5d0ba0[_0x15b163(0x173)],'name':_0x5d0ba0[_0x15b163(0x190)]},'action':_0x15b163(0x187)})};},async 'execute'(_0x3778bd){const _0x20234d=a134_0x272761,_0x514104=await loadDatasetDetailForPage(_0x3778bd),_0x5d574f=await loadStandardPageStatusForGenerate(_0x3778bd,_0x514104[_0x20234d(0x173)]),_0x557f95=getUndeletedRelatedPages(_0x514104),_0xa15d68=assessStandardPageState(_0x514104[_0x20234d(0x173)],_0x5d574f,{'fallbackUndeletedPages':_0x557f95});return{'ok':!![],'data':{'datasetCode':_0x514104[_0x20234d(0x173)],'precheckSource':_0x5d574f?.[_0x20234d(0x177)]??_0x20234d(0x18c),'status':_0xa15d68[_0x20234d(0x17f)],'manualResolutionRequired':_0xa15d68[_0x20234d(0x17e)],'nextAction':_0xa15d68[_0x20234d(0x18a)],'standardPageStatus':_0x5d574f,'relatedPages':{'total':_0x514104['relatedPages'][_0x20234d(0x179)],'undeletedCount':_0x557f95[_0x20234d(0x179)]}}};}};
1
+ const a134_0x33e32d=a134_0x14cc;function a134_0x38c2(){const _0x4ca90a=['/standard-page-status?appCode=','read','related-pages-fallback','1140468DxKqEL','manualResolutionRequired','3817569dGiMzZ','appCode','GET','219674NvhxXX','68205iNRHmd','alias','Query\x20Smart\x20List\x20Page\x20facts\x20for\x20a\x20dataset','3610332qtywLy','4KDNHWy','/smartapi/lovrabet/dataset/','length','1183410wkXDSk','78KrKbFE','query-standard-page-status','3316296fzkEti','compress','code','nextAction','status','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','name'];a134_0x38c2=function(){return _0x4ca90a;};return a134_0x38c2();}function a134_0x14cc(_0x2caf72,_0x496e59){_0x2caf72=_0x2caf72-0x1a1;const _0x38c246=a134_0x38c2();let _0x14cc13=_0x38c246[_0x2caf72];return _0x14cc13;}(function(_0x4c99bb,_0x41a1f3){const _0x3c0cca=a134_0x14cc,_0x477099=_0x4c99bb();while(!![]){try{const _0x2bcf50=parseInt(_0x3c0cca(0x1a4))/0x1+parseInt(_0x3c0cca(0x1b9))/0x2+-parseInt(_0x3c0cca(0x1ac))/0x3*(parseInt(_0x3c0cca(0x1a9))/0x4)+parseInt(_0x3c0cca(0x1a5))/0x5*(parseInt(_0x3c0cca(0x1ad))/0x6)+parseInt(_0x3c0cca(0x1a1))/0x7+-parseInt(_0x3c0cca(0x1af))/0x8+-parseInt(_0x3c0cca(0x1a8))/0x9;if(_0x2bcf50===_0x41a1f3)break;else _0x477099['push'](_0x477099['shift']());}catch(_0x148d0b){_0x477099['push'](_0x477099['shift']());}}}(a134_0x38c2,0x49d75));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessStandardPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadStandardPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';export const pageStandardPageStatus={'service':'page','command':'standard-page-status','description':a134_0x33e32d(0x1a7),'risk':a134_0x33e32d(0x1b7),'defaultOutputFormat':a134_0x33e32d(0x1b0),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a134_0x33e32d(0x1a6),'type':'string','description':a134_0x33e32d(0x1b4)}],async 'validate'(_0x2c76f7){validateDatasetSelector(_0x2c76f7);},async 'dryRun'(_0x5abfe2){const _0x3b2ca4=a134_0x33e32d,_0x19a328=await loadDatasetDetailForPage(_0x5abfe2);return{'method':_0x3b2ca4(0x1a3),'url':_0x3b2ca4(0x1aa)+_0x19a328[_0x3b2ca4(0x1b1)]+_0x3b2ca4(0x1b6)+encodeURIComponent(_0x5abfe2[_0x3b2ca4(0x1a2)]),'description':serializeDryRunDescription({'dataset':{'id':_0x19a328['id'],'code':_0x19a328[_0x3b2ca4(0x1b1)],'name':_0x19a328[_0x3b2ca4(0x1b5)]},'action':_0x3b2ca4(0x1ae)})};},async 'execute'(_0x1301c7){const _0x2a4b55=a134_0x33e32d,_0x3c1305=await loadDatasetDetailForPage(_0x1301c7),_0x4da979=await loadStandardPageStatusForGenerate(_0x1301c7,_0x3c1305['code']),_0xe1009=getUndeletedRelatedPages(_0x3c1305),_0x40dbc4=assessStandardPageState(_0x3c1305[_0x2a4b55(0x1b1)],_0x4da979,{'fallbackUndeletedPages':_0xe1009});return{'ok':!![],'data':{'datasetCode':_0x3c1305[_0x2a4b55(0x1b1)],'precheckSource':_0x4da979?.['source']??_0x2a4b55(0x1b8),'status':_0x40dbc4[_0x2a4b55(0x1b3)],'manualResolutionRequired':_0x40dbc4[_0x2a4b55(0x1ba)],'nextAction':_0x40dbc4[_0x2a4b55(0x1b2)],'standardPageStatus':_0x4da979,'relatedPages':{'total':_0x3c1305['relatedPages'][_0x2a4b55(0x1ab)],'undeletedCount':_0xe1009[_0x2a4b55(0x1ab)]}}};}};
@@ -1 +1 @@
1
- const a135_0x6768b4=a135_0x1d26;(function(_0x376726,_0xd8ac5){const _0x3483fe=a135_0x1d26,_0x5dab8f=_0x376726();while(!![]){try{const _0x2fcd02=parseInt(_0x3483fe(0x1ab))/0x1*(parseInt(_0x3483fe(0x1c5))/0x2)+-parseInt(_0x3483fe(0x1ad))/0x3*(-parseInt(_0x3483fe(0x1b6))/0x4)+-parseInt(_0x3483fe(0x1b7))/0x5+parseInt(_0x3483fe(0x1c0))/0x6+parseInt(_0x3483fe(0x1bb))/0x7*(parseInt(_0x3483fe(0x1b2))/0x8)+parseInt(_0x3483fe(0x1af))/0x9*(parseInt(_0x3483fe(0x1aa))/0xa)+parseInt(_0x3483fe(0x1c3))/0xb*(-parseInt(_0x3483fe(0x1c6))/0xc);if(_0x2fcd02===_0xd8ac5)break;else _0x5dab8f['push'](_0x5dab8f['shift']());}catch(_0x5a104c){_0x5dab8f['push'](_0x5dab8f['shift']());}}}(a135_0x18d1,0x773e0));function a135_0x1d26(_0x2ab882,_0x1b7714){_0x2ab882=_0x2ab882-0x1aa;const _0x18d1e3=a135_0x18d1();let _0x1d2651=_0x18d1e3[_0x2ab882];return _0x1d2651;}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 a135_0x18d1(){const _0x5c8580=['369220OAaoXC','3zRSjLR','undeletedPages','267azGkOJ','compress','225YajNyf','sync','length','56vYayax','/sync-to-pages','fieldCount','POST','24756uoWWiA','3103735lwXOzs','code','isArray','appCode','711627uztAsb','failedPages','page','部分页面同步失败','relatedPages','2228358htvJWW','write','Sync\x20dataset\x20changes\x20to\x20related\x20Smart\x20List\x20Pages','143NVsdjE','string','289582eKwEEB','1737324EuisLD','dataset'];a135_0x18d1=function(){return _0x5c8580;};return a135_0x18d1();}export const pageSync={'service':a135_0x6768b4(0x1bd),'command':a135_0x6768b4(0x1b0),'description':a135_0x6768b4(0x1c2),'risk':a135_0x6768b4(0x1c1),'defaultOutputFormat':a135_0x6768b4(0x1ae),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':'alias','type':a135_0x6768b4(0x1c4),'description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'}],async 'validate'(_0x3f4a1d){validateDatasetSelector(_0x3f4a1d);},async 'dryRun'(_0x5b4cef){const _0xa3a9d6=a135_0x6768b4,_0xa39dfd=await prepare(_0x5b4cef);return{'method':_0xa3a9d6(0x1b5),'url':'/smartapi/lovrabet/dataset/'+_0xa39dfd[_0xa3a9d6(0x1c7)][_0xa3a9d6(0x1b8)]+_0xa3a9d6(0x1b3),'body':{'appCode':_0x5b4cef['appCode']},'description':serializeDryRunDescription({'dataset':{'id':_0xa39dfd[_0xa3a9d6(0x1c7)]['id'],'code':_0xa39dfd[_0xa3a9d6(0x1c7)][_0xa3a9d6(0x1b8)],'name':_0xa39dfd['dataset']['name'],'fieldCount':_0xa39dfd[_0xa3a9d6(0x1c7)][_0xa3a9d6(0x1b4)]},'relatedPages':{'total':_0xa39dfd['dataset'][_0xa3a9d6(0x1bf)]['length'],'undeletedCount':_0xa39dfd[_0xa3a9d6(0x1ac)]['length']},'action':_0xa3a9d6(0x1b0),'reason':_0xa39dfd[_0xa3a9d6(0x1ac)]['length']+'\x20undeleted\x20related\x20page(s)\x20found'})};},async 'execute'(_0x1bcd37){const _0x2bb724=a135_0x6768b4,_0x266fae=await prepare(_0x1bcd37),_0x187014=await syncStandardPages(_0x1bcd37[_0x2bb724(0x1ba)],_0x266fae[_0x2bb724(0x1c7)][_0x2bb724(0x1b8)]),_0xd90e04=Array[_0x2bb724(0x1b9)](_0x187014['failedPages'])&&_0x187014[_0x2bb724(0x1bc)][_0x2bb724(0x1b1)]>0x0,_0x124bca=_0xd90e04?_0x2bb724(0x1be):'同步成功';return{'ok':!![],'message':_0x124bca,'data':{'datasetCode':_0x266fae[_0x2bb724(0x1c7)]['code'],..._0x187014}};}};async function prepare(_0x41dbe4){const _0x31d98b=a135_0x6768b4,_0x49be63=await loadDatasetDetailForPage(_0x41dbe4);return prepareDatasetAction(_0x49be63,_0x31d98b(0x1b0));}
1
+ const a135_0x628276=a135_0x54bc;(function(_0x3deaf0,_0x990343){const _0x110736=a135_0x54bc,_0x5deded=_0x3deaf0();while(!![]){try{const _0x41c73b=parseInt(_0x110736(0xbf))/0x1*(parseInt(_0x110736(0xc6))/0x2)+parseInt(_0x110736(0xcb))/0x3*(-parseInt(_0x110736(0xaf))/0x4)+-parseInt(_0x110736(0xc7))/0x5+parseInt(_0x110736(0xb9))/0x6*(-parseInt(_0x110736(0xc8))/0x7)+-parseInt(_0x110736(0xb3))/0x8*(parseInt(_0x110736(0xca))/0x9)+parseInt(_0x110736(0xcc))/0xa+-parseInt(_0x110736(0xbb))/0xb*(-parseInt(_0x110736(0xae))/0xc);if(_0x41c73b===_0x990343)break;else _0x5deded['push'](_0x5deded['shift']());}catch(_0x3ce1b5){_0x5deded['push'](_0x5deded['shift']());}}}(a135_0x9bda,0xd44e7));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';export const pageSync={'service':a135_0x628276(0xb8),'command':'sync','description':a135_0x628276(0xc4),'risk':a135_0x628276(0xce),'defaultOutputFormat':a135_0x628276(0xc9),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a135_0x628276(0xb4),'type':a135_0x628276(0xbe),'description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'}],async 'validate'(_0x295189){validateDatasetSelector(_0x295189);},async 'dryRun'(_0x34272a){const _0x3868e2=a135_0x628276,_0x4df5f6=await prepare(_0x34272a);return{'method':_0x3868e2(0xb0),'url':_0x3868e2(0xcf)+_0x4df5f6['dataset'][_0x3868e2(0xc1)]+'/sync-to-pages','body':{'appCode':_0x34272a['appCode']},'description':serializeDryRunDescription({'dataset':{'id':_0x4df5f6[_0x3868e2(0xcd)]['id'],'code':_0x4df5f6[_0x3868e2(0xcd)][_0x3868e2(0xc1)],'name':_0x4df5f6[_0x3868e2(0xcd)][_0x3868e2(0xb2)],'fieldCount':_0x4df5f6[_0x3868e2(0xcd)][_0x3868e2(0xc0)]},'relatedPages':{'total':_0x4df5f6[_0x3868e2(0xcd)][_0x3868e2(0xba)][_0x3868e2(0xbd)],'undeletedCount':_0x4df5f6[_0x3868e2(0xc3)][_0x3868e2(0xbd)]},'action':'sync','reason':_0x4df5f6['undeletedPages'][_0x3868e2(0xbd)]+_0x3868e2(0xb7)})};},async 'execute'(_0x403560){const _0x59e5e8=a135_0x628276,_0x12b67d=await prepare(_0x403560),_0x35ff72=await syncStandardPages(_0x403560[_0x59e5e8(0xc2)],_0x12b67d[_0x59e5e8(0xcd)][_0x59e5e8(0xc1)]),_0x3ee7d6=Array[_0x59e5e8(0xbc)](_0x35ff72[_0x59e5e8(0xb5)])&&_0x35ff72['failedPages'][_0x59e5e8(0xbd)]>0x0,_0x32169d=_0x3ee7d6?_0x59e5e8(0xb1):_0x59e5e8(0xb6);return{'ok':!![],'message':_0x32169d,'data':{'datasetCode':_0x12b67d['dataset'][_0x59e5e8(0xc1)],..._0x35ff72}};}};async function prepare(_0x295f19){const _0x37d1f6=a135_0x628276,_0x2744bf=await loadDatasetDetailForPage(_0x295f19);return prepareDatasetAction(_0x2744bf,_0x37d1f6(0xc5));}function a135_0x54bc(_0x387ae6,_0x2fb20a){_0x387ae6=_0x387ae6-0xae;const _0x9bdab3=a135_0x9bda();let _0x54bc7f=_0x9bdab3[_0x387ae6];return _0x54bc7f;}function a135_0x9bda(){const _0x20ef69=['POST','部分页面同步失败','name','52592GxEmFL','alias','failedPages','同步成功','\x20undeleted\x20related\x20page(s)\x20found','page','6JVIhJt','relatedPages','3619ahBITX','isArray','length','string','9269QoUtQl','fieldCount','code','appCode','undeletedPages','Sync\x20dataset\x20changes\x20to\x20related\x20Smart\x20List\x20Pages','sync','26DUjxxy','363315qPDHoC','9781338GCRoNL','compress','1611TUwSgy','39ZYMDXD','2202450MBCVQw','dataset','write','/smartapi/lovrabet/dataset/','121116GDXdsh','44612XrjZXi'];a135_0x9bda=function(){return _0x20ef69;};return a135_0x9bda();}
@@ -1 +1 @@
1
- function a136_0x1d85(_0x47b8b1,_0x5d0358){_0x47b8b1=_0x47b8b1-0x1dc;const _0x294dbb=a136_0x294d();let _0x1d85f6=_0x294dbb[_0x47b8b1];return _0x1d85f6;}(function(_0x3182b3,_0x1a3ae9){const _0x285a18=a136_0x1d85,_0x369db6=_0x3182b3();while(!![]){try{const _0x2f86c3=-parseInt(_0x285a18(0x1e0))/0x1+-parseInt(_0x285a18(0x1e5))/0x2*(-parseInt(_0x285a18(0x1e4))/0x3)+parseInt(_0x285a18(0x1dd))/0x4*(-parseInt(_0x285a18(0x1de))/0x5)+-parseInt(_0x285a18(0x1e3))/0x6+parseInt(_0x285a18(0x1dc))/0x7+-parseInt(_0x285a18(0x1df))/0x8*(-parseInt(_0x285a18(0x1e6))/0x9)+parseInt(_0x285a18(0x1e1))/0xa*(parseInt(_0x285a18(0x1e2))/0xb);if(_0x2f86c3===_0x1a3ae9)break;else _0x369db6['push'](_0x369db6['shift']());}catch(_0x302fbe){_0x369db6['push'](_0x369db6['shift']());}}}(a136_0x294d,0x7a76a));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';function a136_0x294d(){const _0x30ba0b=['27PvECJM','2184126gyZlnW','12knYaqJ','352595dDYckr','1237312OPPCns','761792lWOEsK','3148430YqGPyf','44hOPUvX','4004754UfxHvn','12kETnAo','53518SSXzzz'];a136_0x294d=function(){return _0x30ba0b;};return a136_0x294d();}import{permitRoleApisSet}from'../../commands/permit/role-apis-set.js';export const permitDefinitions=[permitPageGet,permitPageSet,permitRoleMenus,permitRoleMenusSet,permitRoleApisSet];
1
+ (function(_0x3d10c1,_0x34567c){const _0xb4772a=a136_0x3bf4,_0x508cd8=_0x3d10c1();while(!![]){try{const _0x2a5b65=parseInt(_0xb4772a(0x1d4))/0x1*(-parseInt(_0xb4772a(0x1d0))/0x2)+-parseInt(_0xb4772a(0x1d3))/0x3+parseInt(_0xb4772a(0x1d1))/0x4+-parseInt(_0xb4772a(0x1cd))/0x5*(-parseInt(_0xb4772a(0x1ce))/0x6)+parseInt(_0xb4772a(0x1d5))/0x7+parseInt(_0xb4772a(0x1cf))/0x8*(-parseInt(_0xb4772a(0x1d2))/0x9)+parseInt(_0xb4772a(0x1d6))/0xa;if(_0x2a5b65===_0x34567c)break;else _0x508cd8['push'](_0x508cd8['shift']());}catch(_0x1d7604){_0x508cd8['push'](_0x508cd8['shift']());}}}(a136_0x5c56,0xc31f4));import{permitPageGet}from'../../commands/permit/page-get.js';import{permitPageSet}from'../../commands/permit/page-set.js';function a136_0x3bf4(_0x2a891a,_0x247cd8){_0x2a891a=_0x2a891a-0x1cd;const _0x5c5667=a136_0x5c56();let _0x3bf43f=_0x5c5667[_0x2a891a];return _0x3bf43f;}import{permitRoleMenus}from'../../commands/permit/role-menus.js';function a136_0x5c56(){const _0x191639=['509246tofVUW','655668LJdGwo','333noKFbQ','4605537dTklmK','5XHAyhb','9204608bvqiXX','13458420MpOHyD','15oMjzkw','2388354TiGXkC','88944LxoEQK'];a136_0x5c56=function(){return _0x191639;};return a136_0x5c56();}import{permitRoleMenusSet}from'../../commands/permit/role-menus-set.js';import{permitRoleApisSet}from'../../commands/permit/role-apis-set.js';export const permitDefinitions=[permitPageGet,permitPageSet,permitRoleMenus,permitRoleMenusSet,permitRoleApisSet];
@@ -1 +1 @@
1
- const a137_0x3fecbd=a137_0x5856;(function(_0x120e48,_0x427d66){const _0x44c88b=a137_0x5856,_0x125b15=_0x120e48();while(!![]){try{const _0x54d694=parseInt(_0x44c88b(0x1f5))/0x1+parseInt(_0x44c88b(0x200))/0x2*(-parseInt(_0x44c88b(0x1f3))/0x3)+parseInt(_0x44c88b(0x1f7))/0x4*(parseInt(_0x44c88b(0x201))/0x5)+parseInt(_0x44c88b(0x1f6))/0x6*(parseInt(_0x44c88b(0x1fe))/0x7)+parseInt(_0x44c88b(0x1fa))/0x8+-parseInt(_0x44c88b(0x1f4))/0x9+-parseInt(_0x44c88b(0x1fb))/0xa;if(_0x54d694===_0x427d66)break;else _0x125b15['push'](_0x125b15['shift']());}catch(_0x18ed3e){_0x125b15['push'](_0x125b15['shift']());}}}(a137_0x43c7,0x94ed7));import{getPagePermit}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a137_0x43c7(){const _0x1dcfb3=['num','329cWXMDO','permit','1753292alsGQo','393380MxOzIW','Show\x20the\x20page\x20permission\x20snapshot\x20for\x20a\x20menu','menu-id','3GLAMdj','5586579XDdtpj','1059778UIjNCw','80526vCqpXr','12bhPzmy','read','page-get','8535664NEdCkG','8861670oLyCdw','Page\x20permit\x20for\x20menu\x20'];a137_0x43c7=function(){return _0x1dcfb3;};return a137_0x43c7();}function a137_0x5856(_0x5918ef,_0x5e96ec){_0x5918ef=_0x5918ef-0x1f1;const _0x43c7e3=a137_0x43c7();let _0x5856a3=_0x43c7e3[_0x5918ef];return _0x5856a3;}import{MENU_ID_FLAG,projectPagePermit}from'../../commands/permit/shared.js';export const permitPageGet={'service':a137_0x3fecbd(0x1ff),'command':a137_0x3fecbd(0x1f9),'description':a137_0x3fecbd(0x1f1),'risk':a137_0x3fecbd(0x1f8),'flags':[MENU_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x357c7b){const _0x5ef3c0=a137_0x3fecbd,_0x346e09=_0x357c7b[_0x5ef3c0(0x1fd)](_0x5ef3c0(0x1f2)),_0x4ab8ed=await getPagePermit(_0x346e09);return{'ok':!![],'data':{'page':projectPagePermit(_0x4ab8ed)},'message':_0x5ef3c0(0x1fc)+_0x346e09};}};
1
+ function a137_0x6233(){const _0x305cfd=['3367314eQsfgU','4vNDuEV','5gnJnpK','28YNaxyE','permit','445506yvmRHt','Show\x20the\x20page\x20permission\x20snapshot\x20for\x20a\x20menu','239265lbkuBa','681639zKTYbm','read','menu-id','27050595zKIHCM','410txuzSZ','192843IbdGbz','11030976PGdUxW','page-get'];a137_0x6233=function(){return _0x305cfd;};return a137_0x6233();}function a137_0x3271(_0x36085d,_0x37657c){_0x36085d=_0x36085d-0x1c9;const _0x6233a0=a137_0x6233();let _0x327134=_0x6233a0[_0x36085d];return _0x327134;}const a137_0x4b45fa=a137_0x3271;(function(_0x37586c,_0x707329){const _0x28cafd=a137_0x3271,_0x26a8a8=_0x37586c();while(!![]){try{const _0x59c698=-parseInt(_0x28cafd(0x1d6))/0x1*(-parseInt(_0x28cafd(0x1ca))/0x2)+-parseInt(_0x28cafd(0x1d2))/0x3*(-parseInt(_0x28cafd(0x1d8))/0x4)+parseInt(_0x28cafd(0x1d7))/0x5*(-parseInt(_0x28cafd(0x1d5))/0x6)+parseInt(_0x28cafd(0x1cd))/0x7+-parseInt(_0x28cafd(0x1d3))/0x8+-parseInt(_0x28cafd(0x1cc))/0x9*(parseInt(_0x28cafd(0x1d1))/0xa)+parseInt(_0x28cafd(0x1d0))/0xb;if(_0x59c698===_0x707329)break;else _0x26a8a8['push'](_0x26a8a8['shift']());}catch(_0x1abf73){_0x26a8a8['push'](_0x26a8a8['shift']());}}}(a137_0x6233,0xd3c61));import{getPagePermit}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{MENU_ID_FLAG,projectPagePermit}from'../../commands/permit/shared.js';export const permitPageGet={'service':a137_0x4b45fa(0x1c9),'command':a137_0x4b45fa(0x1d4),'description':a137_0x4b45fa(0x1cb),'risk':a137_0x4b45fa(0x1ce),'flags':[MENU_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0xa84a51){const _0x4159cd=a137_0x4b45fa,_0x2d06ca=_0xa84a51['num'](_0x4159cd(0x1cf)),_0x2db548=await getPagePermit(_0x2d06ca);return{'ok':!![],'data':{'page':projectPagePermit(_0x2db548)},'message':'Page\x20permit\x20for\x20menu\x20'+_0x2d06ca};}};
@@ -1 +1 @@
1
- const a138_0x4c0f7a=a138_0x586c;(function(_0x530501,_0x34bf0e){const _0x35babb=a138_0x586c,_0x20b438=_0x530501();while(!![]){try{const _0x17bd98=-parseInt(_0x35babb(0x14c))/0x1+parseInt(_0x35babb(0x15c))/0x2+parseInt(_0x35babb(0x159))/0x3*(-parseInt(_0x35babb(0x142))/0x4)+parseInt(_0x35babb(0x14a))/0x5*(-parseInt(_0x35babb(0x158))/0x6)+-parseInt(_0x35babb(0x146))/0x7+-parseInt(_0x35babb(0x160))/0x8*(parseInt(_0x35babb(0x154))/0x9)+parseInt(_0x35babb(0x145))/0xa;if(_0x17bd98===_0x34bf0e)break;else _0x20b438['push'](_0x20b438['shift']());}catch(_0x8596fa){_0x20b438['push'](_0x20b438['shift']());}}}(a138_0x5b47,0x72c32));import{getPagePermit,savePagePermit}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{MENU_ID_FLAG,PAGE_SET_ROLE_FLAGS,PAGE_SLOT_SPECS,projectPageSlot,resolvePermitRoles,splitList}from'../../commands/permit/shared.js';function a138_0x5b47(){const _0xa6df27=['menu-id','length','Only\x20slots\x20present\x20in\x20`permit\x20page-get`\x20can\x20be\x20set.','map','\x22\x20permission\x20slot\x20(','1810524MLzXKb','label','POST','17952980VWdIty','6405868MrjoJa','Pass\x20at\x20least\x20one\x20of:\x20','This\x20page\x20has\x20no\x20\x22','Updated\x20page\x20permit\x20for\x20menu\x20','1010430bLQjxo','high-risk-write','19063QbSjFU','Set\x20page\x20permissions\x20for\x20a\x20menu\x20(menu/create/update/delete/detail/export/row\x20roles);\x20requires\x20--yes','/smartapi/permit/page/save','key','validation','page-set','allowSelf','rolePermit','3636TDhsMc','Nothing\x20to\x20set.','Pass\x20at\x20least\x20one\x20role,\x20or\x20omit\x20the\x20flag.\x20Clearing\x20permissions\x20is\x20not\x20supported\x20by\x20this\x20command.','num','6JWAuDm','3sunNkS','\x20cannot\x20be\x20empty.','flag','739040FbjUnE','appCode','spec','join','2096Ygmscg'];a138_0x5b47=function(){return _0xa6df27;};return a138_0x5b47();}const SAVE_PATH=a138_0x4c0f7a(0x14e);function collectRequestedSlots(_0x2dcb33){const _0x10bd36=a138_0x4c0f7a,_0x3956a9=[];for(const _0x154e5f of PAGE_SLOT_SPECS){const _0x49c514=_0x2dcb33[_0x10bd36(0x15b)](_0x154e5f[_0x10bd36(0x15b)]);if(_0x49c514===undefined||_0x49c514===null)continue;const _0x5c93ef=splitList(String(_0x49c514));if(_0x5c93ef[_0x10bd36(0x13e)]===0x0)throw CliErrors[_0x10bd36(0x150)]('--'+_0x154e5f[_0x10bd36(0x15b)]+_0x10bd36(0x15a),_0x10bd36(0x156));_0x3956a9['push']({'spec':_0x154e5f,'refs':_0x5c93ef});}return _0x3956a9;}async function buildPlan(_0x18adbc,_0x5ec285){const _0x2e70a7=a138_0x4c0f7a,_0x595007=_0x18adbc[_0x2e70a7(0x157)](_0x2e70a7(0x161)),_0x8f54b2=collectRequestedSlots(_0x18adbc);if(_0x8f54b2[_0x2e70a7(0x13e)]===0x0)throw CliErrors[_0x2e70a7(0x150)](_0x2e70a7(0x155),'Pass\x20at\x20least\x20one\x20of:\x20'+PAGE_SLOT_SPECS[_0x2e70a7(0x140)](_0x21d80b=>'--'+_0x21d80b[_0x2e70a7(0x15b)])[_0x2e70a7(0x15f)](',\x20')+'.');const _0x24a88d=await getPagePermit(_0x595007),_0x454a5c={},_0x31e059={},_0x3a68db=[];for(const {spec:_0x37facf,refs:_0x175a29}of _0x8f54b2){const _0x5747a1=_0x24a88d[_0x37facf[_0x2e70a7(0x14f)]];if(!_0x5747a1)throw CliErrors['validation'](_0x2e70a7(0x148)+_0x37facf[_0x2e70a7(0x143)]+_0x2e70a7(0x141)+_0x37facf[_0x2e70a7(0x14f)]+').',_0x2e70a7(0x13f));_0x454a5c[_0x37facf[_0x2e70a7(0x14f)]]=projectPageSlot(_0x5747a1);const _0x47cbb6=await resolvePermitRoles(_0x18adbc[_0x2e70a7(0x15d)],_0x175a29,{'allowSelf':_0x37facf[_0x2e70a7(0x152)],'label':_0x37facf['label']});_0x5747a1[_0x2e70a7(0x153)]=_0x47cbb6,_0x31e059[_0x37facf[_0x2e70a7(0x14f)]]=projectPageSlot(_0x5747a1);}const _0x3ab36e={'operation':_0x2e70a7(0x151),'selector':{'appCode':_0x18adbc[_0x2e70a7(0x15d)],'menuId':_0x595007,'slots':_0x8f54b2[_0x2e70a7(0x140)](_0x2606d9=>_0x2606d9[_0x2e70a7(0x15e)]['key'])},'before':_0x454a5c,'after':_0x31e059,'dryRun':_0x5ec285,'backend':{'method':'POST','path':SAVE_PATH},'warnings':_0x3a68db};return{'page':_0x24a88d,'mutation':_0x3ab36e};}function a138_0x586c(_0x1d63ff,_0x58821b){_0x1d63ff=_0x1d63ff-0x13e;const _0x5b4775=a138_0x5b47();let _0x586c38=_0x5b4775[_0x1d63ff];return _0x586c38;}export const permitPageSet={'service':'permit','command':'page-set','description':a138_0x4c0f7a(0x14d),'risk':a138_0x4c0f7a(0x14b),'flags':[MENU_ID_FLAG,...PAGE_SET_ROLE_FLAGS,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4d4ae6){const _0x499570=a138_0x4c0f7a,_0x31618a=collectRequestedSlots(_0x4d4ae6);if(_0x31618a['length']===0x0)throw CliErrors[_0x499570(0x150)](_0x499570(0x155),_0x499570(0x147)+PAGE_SLOT_SPECS[_0x499570(0x140)](_0x25ce9c=>'--'+_0x25ce9c['flag'])[_0x499570(0x15f)](',\x20')+'.');},async 'dryRun'(_0x524a27){const _0x3e4d6f=a138_0x4c0f7a,{mutation:_0x4b71ce}=await buildPlan(_0x524a27,!![]);return asDryRunResult(_0x4b71ce,{'method':_0x3e4d6f(0x144),'url':SAVE_PATH});},async 'execute'(_0x26df82){const _0xc57ae4=a138_0x4c0f7a,{page:_0x340fd1,mutation:_0x38f39b}=await buildPlan(_0x26df82,![]);return await savePagePermit(_0x340fd1),{'ok':!![],'data':_0x38f39b,'message':_0xc57ae4(0x149)+_0x38f39b['selector']['menuId']};}};
1
+ const a138_0x2cfb30=a138_0x2254;(function(_0x13f2ec,_0x2e17d4){const _0x108607=a138_0x2254,_0x309182=_0x13f2ec();while(!![]){try{const _0x359c1d=-parseInt(_0x108607(0x6c))/0x1*(-parseInt(_0x108607(0x73))/0x2)+-parseInt(_0x108607(0x7b))/0x3+-parseInt(_0x108607(0x7f))/0x4*(-parseInt(_0x108607(0x79))/0x5)+-parseInt(_0x108607(0x6e))/0x6*(parseInt(_0x108607(0x7a))/0x7)+-parseInt(_0x108607(0x75))/0x8+parseInt(_0x108607(0x87))/0x9+parseInt(_0x108607(0x6b))/0xa*(parseInt(_0x108607(0x7e))/0xb);if(_0x359c1d===_0x2e17d4)break;else _0x309182['push'](_0x309182['shift']());}catch(_0x4a7019){_0x309182['push'](_0x309182['shift']());}}}(a138_0xe9bf,0x627ec));import{getPagePermit,savePagePermit}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a138_0x2254(_0x4465ad,_0x471606){_0x4465ad=_0x4465ad-0x66;const _0xe9bf83=a138_0xe9bf();let _0x2254e2=_0xe9bf83[_0x4465ad];return _0x2254e2;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a138_0xe9bf(){const _0x496da3=['927661eeJULl','1418775AjtPCz','validation','This\x20page\x20has\x20no\x20\x22','165CoEDTy','164TMSJpn','push','length','Only\x20slots\x20present\x20in\x20`permit\x20page-get`\x20can\x20be\x20set.','Pass\x20at\x20least\x20one\x20of:\x20','menu-id','allowSelf','\x20cannot\x20be\x20empty.','188631KvVdAq','permit','Set\x20page\x20permissions\x20for\x20a\x20menu\x20(menu/create/update/delete/detail/export/row\x20roles);\x20requires\x20--yes','appCode','Nothing\x20to\x20set.','Updated\x20page\x20permit\x20for\x20menu\x20','404450ThNUwP','182193lRpXex','join','6CjOyfL','label','map','high-risk-write','selector','2hIhOoD','num','3244560VwZUzX','flag','Pass\x20at\x20least\x20one\x20role,\x20or\x20omit\x20the\x20flag.\x20Clearing\x20permissions\x20is\x20not\x20supported\x20by\x20this\x20command.','key','73735CVokJN'];a138_0xe9bf=function(){return _0x496da3;};return a138_0xe9bf();}import{asDryRunResult}from'../../commands/common/dry-run.js';import{MENU_ID_FLAG,PAGE_SET_ROLE_FLAGS,PAGE_SLOT_SPECS,projectPageSlot,resolvePermitRoles,splitList}from'../../commands/permit/shared.js';const SAVE_PATH='/smartapi/permit/page/save';function collectRequestedSlots(_0x3ba30f){const _0x14718b=a138_0x2254,_0xced93c=[];for(const _0x3999f4 of PAGE_SLOT_SPECS){const _0x38f90b=_0x3ba30f[_0x14718b(0x76)](_0x3999f4[_0x14718b(0x76)]);if(_0x38f90b===undefined||_0x38f90b===null)continue;const _0xb02e03=splitList(String(_0x38f90b));if(_0xb02e03[_0x14718b(0x81)]===0x0)throw CliErrors[_0x14718b(0x7c)]('--'+_0x3999f4[_0x14718b(0x76)]+_0x14718b(0x86),_0x14718b(0x77));_0xced93c[_0x14718b(0x80)]({'spec':_0x3999f4,'refs':_0xb02e03});}return _0xced93c;}async function buildPlan(_0x28b57b,_0x3f3fad){const _0x36347e=a138_0x2254,_0x1a6543=_0x28b57b[_0x36347e(0x74)](_0x36347e(0x84)),_0x2ac4eb=collectRequestedSlots(_0x28b57b);if(_0x2ac4eb['length']===0x0)throw CliErrors[_0x36347e(0x7c)]('Nothing\x20to\x20set.',_0x36347e(0x83)+PAGE_SLOT_SPECS[_0x36347e(0x70)](_0x1f8e1f=>'--'+_0x1f8e1f[_0x36347e(0x76)])[_0x36347e(0x6d)](',\x20')+'.');const _0x254e49=await getPagePermit(_0x1a6543),_0x128fff={},_0xe3c035={},_0x33256c=[];for(const {spec:_0x8f07b4,refs:_0x149f62}of _0x2ac4eb){const _0x253e9b=_0x254e49[_0x8f07b4[_0x36347e(0x78)]];if(!_0x253e9b)throw CliErrors[_0x36347e(0x7c)](_0x36347e(0x7d)+_0x8f07b4[_0x36347e(0x6f)]+'\x22\x20permission\x20slot\x20('+_0x8f07b4[_0x36347e(0x78)]+').',_0x36347e(0x82));_0x128fff[_0x8f07b4['key']]=projectPageSlot(_0x253e9b);const _0x4ddfdd=await resolvePermitRoles(_0x28b57b[_0x36347e(0x68)],_0x149f62,{'allowSelf':_0x8f07b4[_0x36347e(0x85)],'label':_0x8f07b4[_0x36347e(0x6f)]});_0x253e9b['rolePermit']=_0x4ddfdd,_0xe3c035[_0x8f07b4[_0x36347e(0x78)]]=projectPageSlot(_0x253e9b);}const _0x204271={'operation':'page-set','selector':{'appCode':_0x28b57b['appCode'],'menuId':_0x1a6543,'slots':_0x2ac4eb['map'](_0x5795e0=>_0x5795e0['spec'][_0x36347e(0x78)])},'before':_0x128fff,'after':_0xe3c035,'dryRun':_0x3f3fad,'backend':{'method':'POST','path':SAVE_PATH},'warnings':_0x33256c};return{'page':_0x254e49,'mutation':_0x204271};}export const permitPageSet={'service':a138_0x2cfb30(0x66),'command':'page-set','description':a138_0x2cfb30(0x67),'risk':a138_0x2cfb30(0x71),'flags':[MENU_ID_FLAG,...PAGE_SET_ROLE_FLAGS,APPCODE_FLAG_OPTIONAL],async 'validate'(_0xe2b8a0){const _0x20ec80=a138_0x2cfb30,_0x4cd380=collectRequestedSlots(_0xe2b8a0);if(_0x4cd380[_0x20ec80(0x81)]===0x0)throw CliErrors[_0x20ec80(0x7c)](_0x20ec80(0x69),'Pass\x20at\x20least\x20one\x20of:\x20'+PAGE_SLOT_SPECS[_0x20ec80(0x70)](_0x2bae07=>'--'+_0x2bae07[_0x20ec80(0x76)])[_0x20ec80(0x6d)](',\x20')+'.');},async 'dryRun'(_0x35d198){const {mutation:_0xf4b1eb}=await buildPlan(_0x35d198,!![]);return asDryRunResult(_0xf4b1eb,{'method':'POST','url':SAVE_PATH});},async 'execute'(_0x2d03b8){const _0x2a02e3=a138_0x2cfb30,{page:_0x565852,mutation:_0x27f961}=await buildPlan(_0x2d03b8,![]);return await savePagePermit(_0x565852),{'ok':!![],'data':_0x27f961,'message':_0x2a02e3(0x6a)+_0x27f961[_0x2a02e3(0x72)]['menuId']};}};
@@ -1 +1 @@
1
- const a139_0x2e6584=a139_0x5aa6;(function(_0x1a22ca,_0x34ed6e){const _0x1be721=a139_0x5aa6,_0x50d45d=_0x1a22ca();while(!![]){try{const _0x50d51e=parseInt(_0x1be721(0xf1))/0x1*(-parseInt(_0x1be721(0xdf))/0x2)+parseInt(_0x1be721(0xec))/0x3+-parseInt(_0x1be721(0xe5))/0x4*(parseInt(_0x1be721(0xe1))/0x5)+parseInt(_0x1be721(0xfb))/0x6*(parseInt(_0x1be721(0xdd))/0x7)+parseInt(_0x1be721(0xf8))/0x8+parseInt(_0x1be721(0xdc))/0x9+-parseInt(_0x1be721(0xe3))/0xa;if(_0x50d51e===_0x34ed6e)break;else _0x50d45d['push'](_0x50d45d['shift']());}catch(_0x3657ca){_0x50d45d['push'](_0x50d45d['shift']());}}}(a139_0x1efc,0x3566a));import{getRoleApiResources,updateAppRole}from'../../core/api-client.js';function a139_0x1efc(){const _0x2df74b=['flagMissing','datasets','6tWtjHn','datasetCodes','str','revoke','Revoked\x20API\x20access\x20for\x20','Verify\x20the\x20datasetCode,\x20or\x20check\x20the\x20role\x27s\x20API\x20resource\x20matrix.','permit','validation','high-risk-write','180945dnxMym','1320298BpUgMX','roleName','2WrTUIG','bool','45RaIfGf','action','1407780LFmLSX','appCode','111128gVuFym','join','length','has','set','get','/smartapi/permit/role/update','735651GMIWhW','role-apis-set','\x20dataset(s)\x20on\x20role\x20','role-apis-set\x20currently\x20supports\x20revoking\x20dataset\x20API\x20access\x20(use\x20case\x204).','Revoke\x20a\x20role\x27s\x20dataset\x20API\x20access\x20by\x20datasetCode\x20(roleType\x20API);\x20requires\x20--yes','85747WUMDin','push','POST','Pass\x20--datasets\x20<datasetCode,...>.','api-revoke','Missing\x20--revoke.','API','1930856KWCbcc'];a139_0x1efc=function(){return _0x2df74b;};return a139_0x1efc();}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 a139_0x5aa6(_0x37ee8d,_0x420759){_0x37ee8d=_0x37ee8d-0xd9;const _0x1efce4=a139_0x1efc();let _0x5aa623=_0x1efce4[_0x37ee8d];return _0x5aa623;}import{assertPermConfigurable,resolveRoleRef}from'../../commands/role/shared.js';const UPDATE_PATH=a139_0x2e6584(0xeb);async function buildPlan(_0x3cd6f9,_0x43376a){const _0x18bdf8=a139_0x2e6584,_0x2675a5=await resolveRoleRef(_0x3cd6f9[_0x18bdf8(0xe4)],readRoleRef(_0x3cd6f9));assertPermConfigurable(_0x2675a5);if(!_0x3cd6f9[_0x18bdf8(0xe0)]('revoke'))throw CliErrors[_0x18bdf8(0xda)](_0x18bdf8(0xf6),_0x18bdf8(0xef));const _0x4e03e4=splitList(_0x3cd6f9[_0x18bdf8(0xfd)](_0x18bdf8(0xfa)));if(_0x4e03e4[_0x18bdf8(0xe7)]===0x0)throw CliErrors[_0x18bdf8(0xf9)](_0x18bdf8(0xfa),_0x18bdf8(0xf4));const _0x6f899c=await getRoleApiResources(_0x3cd6f9['appCode'],_0x2675a5['id']),{byCode:_0x48b282,byDataset:_0x590113}=flattenApiResources(_0x6f899c),_0x2f3e9b=_0x4e03e4['filter'](_0x10a23e=>!_0x590113[_0x18bdf8(0xe8)](_0x10a23e));if(_0x2f3e9b[_0x18bdf8(0xe7)]>0x0)throw CliErrors[_0x18bdf8(0xda)]('Unknown\x20datasetCode(s)\x20for\x20this\x20role\x27s\x20API\x20resources:\x20'+_0x2f3e9b[_0x18bdf8(0xe6)](',\x20')+'.',_0x18bdf8(0x100));const _0x3cd7d4=new Map(),_0x324b2=[],_0x1609ba=[];for(const _0x511281 of _0x4e03e4){for(const _0x4aef2d of _0x590113[_0x18bdf8(0xea)](_0x511281)){const _0xeaba2e=_0x48b282['get'](_0x4aef2d);_0x3cd7d4[_0x18bdf8(0xe9)](_0x4aef2d,'0'),_0x324b2[_0x18bdf8(0xf2)]({'resourceCode':_0x4aef2d,'datasetCode':_0x511281,'action':_0xeaba2e[_0x18bdf8(0xe2)]}),_0x1609ba[_0x18bdf8(0xf2)]({'resourceCode':_0x4aef2d,'datasetCode':_0x511281,'action':'0'});}}const _0x3ddbc9=buildPermits(_0x48b282,_0x3cd7d4),_0x52b20e={'operation':_0x18bdf8(0xf5),'selector':{'appCode':_0x3cd6f9[_0x18bdf8(0xe4)],'roleId':_0x2675a5['id'],'roleName':_0x2675a5[_0x18bdf8(0xde)],'datasetCodes':_0x4e03e4},'before':_0x324b2,'after':_0x1609ba,'dryRun':_0x43376a,'backend':{'method':_0x18bdf8(0xf3),'path':UPDATE_PATH,'roleType':_0x18bdf8(0xf7)},'warnings':[]};return{'role':_0x2675a5,'permits':_0x3ddbc9,'mutation':_0x52b20e};}export const permitRoleApisSet={'service':a139_0x2e6584(0xd9),'command':a139_0x2e6584(0xed),'description':a139_0x2e6584(0xf0),'risk':a139_0x2e6584(0xdb),'flags':[ROLE_REF_FLAG,REVOKE_FLAG,DATASETS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x51b6ce){const _0xfe42ac=a139_0x2e6584;if(!_0x51b6ce[_0xfe42ac(0xe0)](_0xfe42ac(0xfe)))throw CliErrors[_0xfe42ac(0xda)](_0xfe42ac(0xf6),_0xfe42ac(0xef));if(splitList(_0x51b6ce['str'](_0xfe42ac(0xfa)))[_0xfe42ac(0xe7)]===0x0)throw CliErrors['flagMissing']('datasets',_0xfe42ac(0xf4));},async 'dryRun'(_0xbc9782){const _0x2c448=a139_0x2e6584,{mutation:_0x55f911}=await buildPlan(_0xbc9782,!![]);return asDryRunResult(_0x55f911,{'method':_0x2c448(0xf3),'url':UPDATE_PATH});},async 'execute'(_0x299e38){const _0x1edec4=a139_0x2e6584,{role:_0x4792cb,permits:_0xf1f9f2,mutation:_0x48a174}=await buildPlan(_0x299e38,![]);return await updateAppRole({'id':_0x4792cb['id'],'appCode':_0x299e38[_0x1edec4(0xe4)],'roleType':_0x1edec4(0xf7),'permits':_0xf1f9f2}),{'ok':!![],'data':_0x48a174,'message':_0x1edec4(0xff)+_0x48a174['selector'][_0x1edec4(0xfc)][_0x1edec4(0xe7)]+_0x1edec4(0xee)+_0x4792cb['roleName']};}};
1
+ const a139_0x343b49=a139_0x5b97;(function(_0x306f2b,_0x9951a0){const _0x5963bd=a139_0x5b97,_0x1a8d87=_0x306f2b();while(!![]){try{const _0x24496b=-parseInt(_0x5963bd(0x8a))/0x1*(-parseInt(_0x5963bd(0x9a))/0x2)+-parseInt(_0x5963bd(0x8b))/0x3*(parseInt(_0x5963bd(0xa4))/0x4)+parseInt(_0x5963bd(0xab))/0x5*(parseInt(_0x5963bd(0xa2))/0x6)+parseInt(_0x5963bd(0x96))/0x7+-parseInt(_0x5963bd(0x9f))/0x8+-parseInt(_0x5963bd(0x8c))/0x9+-parseInt(_0x5963bd(0x92))/0xa*(parseInt(_0x5963bd(0x9d))/0xb);if(_0x24496b===_0x9951a0)break;else _0x1a8d87['push'](_0x1a8d87['shift']());}catch(_0x5694b5){_0x1a8d87['push'](_0x1a8d87['shift']());}}}(a139_0x5392,0xf383f));import{getRoleApiResources,updateAppRole}from'../../core/api-client.js';function a139_0x5392(){const _0x31b279=['role-apis-set','68RXIQhV','push','roleName','role-apis-set\x20currently\x20supports\x20revoking\x20dataset\x20API\x20access\x20(use\x20case\x204).','datasets','action','has','10fFQUPx','revoke','Revoked\x20API\x20access\x20for\x20','appCode','Unknown\x20datasetCode(s)\x20for\x20this\x20role\x27s\x20API\x20resources:\x20','bool','2hOvWtP','147252yYZMwW','2850777tbcsGh','validation','Pass\x20--datasets\x20<datasetCode,...>.','selector','Missing\x20--revoke.','join','14260NzmRhp','api-revoke','filter','str','10737090XEXMiT','set','permit','\x20dataset(s)\x20on\x20role\x20','929278UhYWpF','POST','API','385KeIwGM','length','14743120lqXOYp','get','Revoke\x20a\x20role\x27s\x20dataset\x20API\x20access\x20by\x20datasetCode\x20(roleType\x20API);\x20requires\x20--yes','4734816RXUsdZ'];a139_0x5392=function(){return _0x31b279;};return a139_0x5392();}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 a139_0x5b97(_0x72b05c,_0x11514f){_0x72b05c=_0x72b05c-0x85;const _0x5392c0=a139_0x5392();let _0x5b9735=_0x5392c0[_0x72b05c];return _0x5b9735;}import{assertPermConfigurable,resolveRoleRef}from'../../commands/role/shared.js';const UPDATE_PATH='/smartapi/permit/role/update';async function buildPlan(_0x18ae5a,_0x25eec3){const _0x2f561a=a139_0x5b97,_0x19777d=await resolveRoleRef(_0x18ae5a[_0x2f561a(0x87)],readRoleRef(_0x18ae5a));assertPermConfigurable(_0x19777d);if(!_0x18ae5a[_0x2f561a(0x89)](_0x2f561a(0x85)))throw CliErrors['validation']('Missing\x20--revoke.',_0x2f561a(0xa7));const _0x1fd00e=splitList(_0x18ae5a[_0x2f561a(0x95)](_0x2f561a(0xa8)));if(_0x1fd00e[_0x2f561a(0x9e)]===0x0)throw CliErrors['flagMissing'](_0x2f561a(0xa8),_0x2f561a(0x8e));const _0x9aa527=await getRoleApiResources(_0x18ae5a[_0x2f561a(0x87)],_0x19777d['id']),{byCode:_0x353398,byDataset:_0x11aae1}=flattenApiResources(_0x9aa527),_0x213cbf=_0x1fd00e[_0x2f561a(0x94)](_0x56e986=>!_0x11aae1[_0x2f561a(0xaa)](_0x56e986));if(_0x213cbf[_0x2f561a(0x9e)]>0x0)throw CliErrors[_0x2f561a(0x8d)](_0x2f561a(0x88)+_0x213cbf[_0x2f561a(0x91)](',\x20')+'.','Verify\x20the\x20datasetCode,\x20or\x20check\x20the\x20role\x27s\x20API\x20resource\x20matrix.');const _0x13bed7=new Map(),_0x497a18=[],_0x480b31=[];for(const _0x4dec0a of _0x1fd00e){for(const _0x528621 of _0x11aae1[_0x2f561a(0xa0)](_0x4dec0a)){const _0x27cbdf=_0x353398['get'](_0x528621);_0x13bed7[_0x2f561a(0x97)](_0x528621,'0'),_0x497a18[_0x2f561a(0xa5)]({'resourceCode':_0x528621,'datasetCode':_0x4dec0a,'action':_0x27cbdf[_0x2f561a(0xa9)]}),_0x480b31['push']({'resourceCode':_0x528621,'datasetCode':_0x4dec0a,'action':'0'});}}const _0x555520=buildPermits(_0x353398,_0x13bed7),_0x4cfaea={'operation':_0x2f561a(0x93),'selector':{'appCode':_0x18ae5a[_0x2f561a(0x87)],'roleId':_0x19777d['id'],'roleName':_0x19777d['roleName'],'datasetCodes':_0x1fd00e},'before':_0x497a18,'after':_0x480b31,'dryRun':_0x25eec3,'backend':{'method':_0x2f561a(0x9b),'path':UPDATE_PATH,'roleType':_0x2f561a(0x9c)},'warnings':[]};return{'role':_0x19777d,'permits':_0x555520,'mutation':_0x4cfaea};}export const permitRoleApisSet={'service':a139_0x343b49(0x98),'command':a139_0x343b49(0xa3),'description':a139_0x343b49(0xa1),'risk':'high-risk-write','flags':[ROLE_REF_FLAG,REVOKE_FLAG,DATASETS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5f4285){const _0x31deed=a139_0x343b49;if(!_0x5f4285['bool'](_0x31deed(0x85)))throw CliErrors[_0x31deed(0x8d)](_0x31deed(0x90),_0x31deed(0xa7));if(splitList(_0x5f4285['str'](_0x31deed(0xa8)))[_0x31deed(0x9e)]===0x0)throw CliErrors['flagMissing']('datasets',_0x31deed(0x8e));},async 'dryRun'(_0x1dcdf3){const _0x33d30f=a139_0x343b49,{mutation:_0x366235}=await buildPlan(_0x1dcdf3,!![]);return asDryRunResult(_0x366235,{'method':_0x33d30f(0x9b),'url':UPDATE_PATH});},async 'execute'(_0x22e35d){const _0xb3623a=a139_0x343b49,{role:_0x803eee,permits:_0x371dd8,mutation:_0x1adf9b}=await buildPlan(_0x22e35d,![]);return await updateAppRole({'id':_0x803eee['id'],'appCode':_0x22e35d[_0xb3623a(0x87)],'roleType':_0xb3623a(0x9c),'permits':_0x371dd8}),{'ok':!![],'data':_0x1adf9b,'message':_0xb3623a(0x86)+_0x1adf9b[_0xb3623a(0x8f)]['datasetCodes'][_0xb3623a(0x9e)]+_0xb3623a(0x99)+_0x803eee[_0xb3623a(0xa6)]};}};
@@ -1 +1 @@
1
- const a140_0x432d7a=a140_0x273f;(function(_0x1d310b,_0x220e56){const _0x125a2b=a140_0x273f,_0x262098=_0x1d310b();while(!![]){try{const _0x3f0de8=parseInt(_0x125a2b(0x147))/0x1+-parseInt(_0x125a2b(0x135))/0x2+parseInt(_0x125a2b(0x14f))/0x3*(parseInt(_0x125a2b(0x138))/0x4)+parseInt(_0x125a2b(0x130))/0x5*(parseInt(_0x125a2b(0x149))/0x6)+parseInt(_0x125a2b(0x144))/0x7*(-parseInt(_0x125a2b(0x13b))/0x8)+-parseInt(_0x125a2b(0x136))/0x9+parseInt(_0x125a2b(0x14e))/0xa*(parseInt(_0x125a2b(0x148))/0xb);if(_0x3f0de8===_0x220e56)break;else _0x262098['push'](_0x262098['shift']());}catch(_0x567763){_0x262098['push'](_0x262098['shift']());}}}(a140_0x54b7,0x8cb32));import{getRoleMenuResources,updateAppRole}from'../../core/api-client.js';function a140_0x54b7(){const _0x2a2039=['high-risk-write','menu-grant','/smartapi/permit/role/update','action','1407350jPybjL','1145655aYGPJZ','POST','5108465MBAjHR','menu-revoke','Grant\x20or\x20revoke\x20a\x20role\x27s\x20menu\x20access\x20by\x20resourceCode\x20(roleType\x20PAGE);\x20requires\x20--yes','resourceCodes','validation','538506ZPSNGs','5600421xEBlPy','access','4PFxKKo','Pass\x20--menus\x20<resourceCode,...>.','selector','8BFiCLK','menus','Updated\x20','appCode','push','length','roleName','PAGE','join','1223467ecItbh','Unknown\x20menu\x20resourceCode(s):\x20','flagMissing','98296SZcmdH','11eOZfXx','6pEvxEM'];a140_0x54b7=function(){return _0x2a2039;};return a140_0x54b7();}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';function a140_0x273f(_0x45c8c8,_0x530507){_0x45c8c8=_0x45c8c8-0x130;const _0x54b7ae=a140_0x54b7();let _0x273f67=_0x54b7ae[_0x45c8c8];return _0x273f67;}import{assertPermConfigurable,resolveRoleRef}from'../../commands/role/shared.js';const UPDATE_PATH=a140_0x432d7a(0x14c);async function buildPlan(_0x57ddd7,_0x52cd7d){const _0x16d543=a140_0x432d7a,_0xe6b79e=await resolveRoleRef(_0x57ddd7[_0x16d543(0x13e)],readRoleRef(_0x57ddd7));assertPermConfigurable(_0xe6b79e);const _0x2be139=readGrantRevoke(_0x57ddd7),_0x43ee30=splitList(_0x57ddd7['str'](_0x16d543(0x13c)));if(_0x43ee30[_0x16d543(0x140)]===0x0)throw CliErrors[_0x16d543(0x146)](_0x16d543(0x13c),'Pass\x20--menus\x20<resourceCode,...>.');const _0x469ebb=await getRoleMenuResources(_0x57ddd7['appCode'],_0xe6b79e['id']),_0x468708=flattenMenuResources(_0x469ebb),_0x50bd78=_0x43ee30['filter'](_0xc1fe59=>!_0x468708['has'](_0xc1fe59));if(_0x50bd78['length']>0x0)throw CliErrors[_0x16d543(0x134)](_0x16d543(0x145)+_0x50bd78[_0x16d543(0x143)](',\x20')+'.','Run\x20`permit\x20role-menus\x20--role\x20<id>`\x20to\x20see\x20valid\x20resourceCodes.');const _0x3f4697=new Map(),_0x226eb1=[],_0x36463c=[];for(const _0x1b161b of _0x43ee30){const _0x41272a=_0x468708['get'](_0x1b161b);_0x3f4697['set'](_0x1b161b,_0x2be139),_0x226eb1[_0x16d543(0x13f)]({'resourceCode':_0x1b161b,'action':_0x41272a[_0x16d543(0x14d)]}),_0x36463c['push']({'resourceCode':_0x1b161b,'action':_0x2be139});}const _0x35ebbf=buildPermits(_0x468708,_0x3f4697),_0x1c44e7={'operation':_0x2be139===_0x16d543(0x137)?_0x16d543(0x14b):_0x16d543(0x131),'selector':{'appCode':_0x57ddd7[_0x16d543(0x13e)],'roleId':_0xe6b79e['id'],'roleName':_0xe6b79e[_0x16d543(0x141)],'resourceCodes':_0x43ee30},'before':_0x226eb1,'after':_0x36463c,'dryRun':_0x52cd7d,'backend':{'method':'POST','path':UPDATE_PATH,'roleType':_0x16d543(0x142)},'warnings':[]};return{'role':_0xe6b79e,'permits':_0x35ebbf,'mutation':_0x1c44e7};}export const permitRoleMenusSet={'service':'permit','command':'role-menus-set','description':a140_0x432d7a(0x132),'risk':a140_0x432d7a(0x14a),'flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,MENUS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x54a47a){const _0xaa41f2=a140_0x432d7a;readGrantRevoke(_0x54a47a);if(splitList(_0x54a47a['str']('menus'))[_0xaa41f2(0x140)]===0x0)throw CliErrors[_0xaa41f2(0x146)](_0xaa41f2(0x13c),_0xaa41f2(0x139));},async 'dryRun'(_0x535ff0){const _0x4c51c6=a140_0x432d7a,{mutation:_0x34dc25}=await buildPlan(_0x535ff0,!![]);return asDryRunResult(_0x34dc25,{'method':_0x4c51c6(0x150),'url':UPDATE_PATH});},async 'execute'(_0x9baf64){const _0x137246=a140_0x432d7a,{role:_0x430573,permits:_0x431718,mutation:_0x255173}=await buildPlan(_0x9baf64,![]);return await updateAppRole({'id':_0x430573['id'],'appCode':_0x9baf64[_0x137246(0x13e)],'roleType':_0x137246(0x142),'permits':_0x431718}),{'ok':!![],'data':_0x255173,'message':_0x137246(0x13d)+_0x255173[_0x137246(0x13a)][_0x137246(0x133)][_0x137246(0x140)]+'\x20menu\x20permit(s)\x20for\x20role\x20'+_0x430573[_0x137246(0x141)]};}};
1
+ function a140_0xea2e(){const _0xaf791e=['3014490CkUONw','2810647apCHjj','resourceCodes','menus','permit','str','55WKPZHA','2411464WQspCW','PAGE','filter','role-menus-set','Grant\x20or\x20revoke\x20a\x20role\x27s\x20menu\x20access\x20by\x20resourceCode\x20(roleType\x20PAGE);\x20requires\x20--yes','menu-grant','access','flagMissing','Pass\x20--menus\x20<resourceCode,...>.','push','set','has','menu-revoke','high-risk-write','17464diETWr','appCode','POST','roleName','2355445jRiQOo','851848FOOgrx','Unknown\x20menu\x20resourceCode(s):\x20','/smartapi/permit/role/update','381912DAsIwZ','Run\x20`permit\x20role-menus\x20--role\x20<id>`\x20to\x20see\x20valid\x20resourceCodes.','selector','length','validation','join','get','Updated\x20'];a140_0xea2e=function(){return _0xaf791e;};return a140_0xea2e();}const a140_0x56af82=a140_0x5b1e;(function(_0x31c4f7,_0x31ac4c){const _0x2c86ac=a140_0x5b1e,_0x21cd67=_0x31c4f7();while(!![]){try{const _0x46e8e8=parseInt(_0x2c86ac(0x103))/0x1*(parseInt(_0x2c86ac(0xed))/0x2)+-parseInt(_0x2c86ac(0xf5))/0x3+parseInt(_0x2c86ac(0xf2))/0x4+-parseInt(_0x2c86ac(0xf1))/0x5+-parseInt(_0x2c86ac(0xfd))/0x6+parseInt(_0x2c86ac(0xfe))/0x7+parseInt(_0x2c86ac(0x104))/0x8;if(_0x46e8e8===_0x31ac4c)break;else _0x21cd67['push'](_0x21cd67['shift']());}catch(_0x32bcbd){_0x21cd67['push'](_0x21cd67['shift']());}}}(a140_0xea2e,0x481c8));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 a140_0x5b1e(_0x48beb1,_0x52e6da){_0x48beb1=_0x48beb1-0xed;const _0xea2e2e=a140_0xea2e();let _0x5b1e29=_0xea2e2e[_0x48beb1];return _0x5b1e29;}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=a140_0x56af82(0xf4);async function buildPlan(_0x3ac117,_0xc8ed95){const _0x6181e8=a140_0x56af82,_0x5f3be3=await resolveRoleRef(_0x3ac117['appCode'],readRoleRef(_0x3ac117));assertPermConfigurable(_0x5f3be3);const _0x2fe1c5=readGrantRevoke(_0x3ac117),_0x3b02cf=splitList(_0x3ac117[_0x6181e8(0x102)](_0x6181e8(0x100)));if(_0x3b02cf[_0x6181e8(0xf8)]===0x0)throw CliErrors[_0x6181e8(0x10b)](_0x6181e8(0x100),_0x6181e8(0x10c));const _0x1a08c1=await getRoleMenuResources(_0x3ac117[_0x6181e8(0xee)],_0x5f3be3['id']),_0x1ff80e=flattenMenuResources(_0x1a08c1),_0x402290=_0x3b02cf[_0x6181e8(0x106)](_0x1f311=>!_0x1ff80e[_0x6181e8(0x10f)](_0x1f311));if(_0x402290[_0x6181e8(0xf8)]>0x0)throw CliErrors[_0x6181e8(0xf9)](_0x6181e8(0xf3)+_0x402290[_0x6181e8(0xfa)](',\x20')+'.',_0x6181e8(0xf6));const _0x3f4df8=new Map(),_0x585f87=[],_0x21423a=[];for(const _0x4a2454 of _0x3b02cf){const _0x2a03aa=_0x1ff80e[_0x6181e8(0xfb)](_0x4a2454);_0x3f4df8[_0x6181e8(0x10e)](_0x4a2454,_0x2fe1c5),_0x585f87['push']({'resourceCode':_0x4a2454,'action':_0x2a03aa['action']}),_0x21423a[_0x6181e8(0x10d)]({'resourceCode':_0x4a2454,'action':_0x2fe1c5});}const _0x690f8b=buildPermits(_0x1ff80e,_0x3f4df8),_0x205488={'operation':_0x2fe1c5===_0x6181e8(0x10a)?_0x6181e8(0x109):_0x6181e8(0x110),'selector':{'appCode':_0x3ac117['appCode'],'roleId':_0x5f3be3['id'],'roleName':_0x5f3be3[_0x6181e8(0xf0)],'resourceCodes':_0x3b02cf},'before':_0x585f87,'after':_0x21423a,'dryRun':_0xc8ed95,'backend':{'method':_0x6181e8(0xef),'path':UPDATE_PATH,'roleType':_0x6181e8(0x105)},'warnings':[]};return{'role':_0x5f3be3,'permits':_0x690f8b,'mutation':_0x205488};}export const permitRoleMenusSet={'service':a140_0x56af82(0x101),'command':a140_0x56af82(0x107),'description':a140_0x56af82(0x108),'risk':a140_0x56af82(0x111),'flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,MENUS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x52070b){const _0x534020=a140_0x56af82;readGrantRevoke(_0x52070b);if(splitList(_0x52070b[_0x534020(0x102)](_0x534020(0x100)))[_0x534020(0xf8)]===0x0)throw CliErrors[_0x534020(0x10b)]('menus',_0x534020(0x10c));},async 'dryRun'(_0x4c615c){const _0x520b80=a140_0x56af82,{mutation:_0x34a9c9}=await buildPlan(_0x4c615c,!![]);return asDryRunResult(_0x34a9c9,{'method':_0x520b80(0xef),'url':UPDATE_PATH});},async 'execute'(_0x354e87){const _0x4eeaf1=a140_0x56af82,{role:_0x1dbdcf,permits:_0x2c3244,mutation:_0x14634e}=await buildPlan(_0x354e87,![]);return await updateAppRole({'id':_0x1dbdcf['id'],'appCode':_0x354e87['appCode'],'roleType':_0x4eeaf1(0x105),'permits':_0x2c3244}),{'ok':!![],'data':_0x14634e,'message':_0x4eeaf1(0xfc)+_0x14634e[_0x4eeaf1(0xf7)][_0x4eeaf1(0xff)][_0x4eeaf1(0xf8)]+'\x20menu\x20permit(s)\x20for\x20role\x20'+_0x1dbdcf[_0x4eeaf1(0xf0)]};}};
@@ -1 +1 @@
1
- const a141_0x3d310f=a141_0x528d;(function(_0xb73bee,_0x2c83a6){const _0x149d5b=a141_0x528d,_0x3f080d=_0xb73bee();while(!![]){try{const _0x4a079a=-parseInt(_0x149d5b(0x1bc))/0x1+-parseInt(_0x149d5b(0x1b7))/0x2+-parseInt(_0x149d5b(0x1bb))/0x3*(-parseInt(_0x149d5b(0x1bd))/0x4)+parseInt(_0x149d5b(0x1b9))/0x5*(-parseInt(_0x149d5b(0x1c5))/0x6)+-parseInt(_0x149d5b(0x1b1))/0x7*(parseInt(_0x149d5b(0x1c1))/0x8)+parseInt(_0x149d5b(0x1b0))/0x9*(-parseInt(_0x149d5b(0x1b5))/0xa)+parseInt(_0x149d5b(0x1c4))/0xb;if(_0x4a079a===_0x2c83a6)break;else _0x3f080d['push'](_0x3f080d['shift']());}catch(_0x42c65b){_0x3f080d['push'](_0x3f080d['shift']());}}}(a141_0x2f09,0x73063));function a141_0x2f09(){const _0x590a3a=['\x20menu(s)\x20allowed','read','36695923QZegxd','1117878aZyohl','Show\x20a\x20role\x27s\x20current\x20menu\x20permission\x20matrix','length','permit','action','9lQFUFb','5220453mgrFOc','values','map','from','7847210ZIuWBX','appCode','991324zbCqAk','roleName','10zDXiDa','resourceCode','3uAaFdD','766871VVTDVe','1203220nycGbm','resourceName','access','filter','8XsCRjP'];a141_0x2f09=function(){return _0x590a3a;};return a141_0x2f09();}import{getRoleMenuResources}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{flattenMenuResources,readRoleRef,ROLE_REF_FLAG}from'../../commands/permit/shared.js';import{resolveRoleRef}from'../../commands/role/shared.js';function a141_0x528d(_0x2e01c9,_0x5a4fd0){_0x2e01c9=_0x2e01c9-0x1af;const _0x2f098f=a141_0x2f09();let _0x528d5a=_0x2f098f[_0x2e01c9];return _0x528d5a;}export const permitRoleMenus={'service':a141_0x3d310f(0x1c8),'command':'role-menus','description':a141_0x3d310f(0x1c6),'risk':a141_0x3d310f(0x1c3),'flags':[ROLE_REF_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x10ad29){const _0x354469=a141_0x3d310f,_0x5159b9=await resolveRoleRef(_0x10ad29[_0x354469(0x1b6)],readRoleRef(_0x10ad29)),_0x4b2d5c=await getRoleMenuResources(_0x10ad29[_0x354469(0x1b6)],_0x5159b9['id']),_0x46ac60=flattenMenuResources(_0x4b2d5c),_0x4110ac=Array[_0x354469(0x1b4)](_0x46ac60[_0x354469(0x1b2)]())[_0x354469(0x1b3)](_0x10995b=>({'resourceCode':_0x10995b[_0x354469(0x1ba)],'resourceName':_0x10995b[_0x354469(0x1be)],'allowed':_0x10995b[_0x354469(0x1af)]===_0x354469(0x1bf),'action':_0x10995b[_0x354469(0x1af)]}));return{'ok':!![],'data':{'selector':{'appCode':_0x10ad29[_0x354469(0x1b6)],'roleId':_0x5159b9['id'],'roleName':_0x5159b9[_0x354469(0x1b8)]},'menus':_0x4110ac},'message':'Role\x20'+_0x5159b9[_0x354469(0x1b8)]+'\x20has\x20'+_0x4110ac[_0x354469(0x1c0)](_0x260e05=>_0x260e05['allowed'])['length']+'/'+_0x4110ac[_0x354469(0x1c7)]+_0x354469(0x1c2)};}};
1
+ function a141_0x2292(_0x3cd2dc,_0x17b77b){_0x3cd2dc=_0x3cd2dc-0x1b4;const _0x4cbd60=a141_0x4cbd();let _0x229223=_0x4cbd60[_0x3cd2dc];return _0x229223;}const a141_0x59a6d6=a141_0x2292;(function(_0x48d531,_0xc121d){const _0x4e4bf5=a141_0x2292,_0x3330d2=_0x48d531();while(!![]){try{const _0x1b4905=-parseInt(_0x4e4bf5(0x1c4))/0x1+parseInt(_0x4e4bf5(0x1c7))/0x2*(-parseInt(_0x4e4bf5(0x1bb))/0x3)+parseInt(_0x4e4bf5(0x1c9))/0x4*(-parseInt(_0x4e4bf5(0x1b8))/0x5)+-parseInt(_0x4e4bf5(0x1c5))/0x6+-parseInt(_0x4e4bf5(0x1c6))/0x7+-parseInt(_0x4e4bf5(0x1c8))/0x8*(-parseInt(_0x4e4bf5(0x1bd))/0x9)+parseInt(_0x4e4bf5(0x1b7))/0xa*(parseInt(_0x4e4bf5(0x1be))/0xb);if(_0x1b4905===_0xc121d)break;else _0x3330d2['push'](_0x3330d2['shift']());}catch(_0x3d27b8){_0x3330d2['push'](_0x3330d2['shift']());}}}(a141_0x4cbd,0x3d53d));import{getRoleMenuResources}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a141_0x4cbd(){const _0x361999=['access','\x20menu(s)\x20allowed','appCode','Show\x20a\x20role\x27s\x20current\x20menu\x20permission\x20matrix','from','18384ZXUyqu','2482254JxKyJj','1482985SIJMXq','66644pMqGkP','7376EEdTbw','8oxTeCg','map','roleName','permit','length','Role\x20','role-menus','18050fLfZDd','1140325UvQbJN','allowed','action','21EReILp','values','4878QyDpAc','6611qCunqY'];a141_0x4cbd=function(){return _0x361999;};return a141_0x4cbd();}import{flattenMenuResources,readRoleRef,ROLE_REF_FLAG}from'../../commands/permit/shared.js';import{resolveRoleRef}from'../../commands/role/shared.js';export const permitRoleMenus={'service':a141_0x59a6d6(0x1cc),'command':a141_0x59a6d6(0x1b6),'description':a141_0x59a6d6(0x1c2),'risk':'read','flags':[ROLE_REF_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x2c0fe4){const _0x5543cb=a141_0x59a6d6,_0x6e8ffa=await resolveRoleRef(_0x2c0fe4[_0x5543cb(0x1c1)],readRoleRef(_0x2c0fe4)),_0x173391=await getRoleMenuResources(_0x2c0fe4[_0x5543cb(0x1c1)],_0x6e8ffa['id']),_0x23004e=flattenMenuResources(_0x173391),_0x5799c2=Array[_0x5543cb(0x1c3)](_0x23004e[_0x5543cb(0x1bc)]())[_0x5543cb(0x1ca)](_0x5cc8b3=>({'resourceCode':_0x5cc8b3['resourceCode'],'resourceName':_0x5cc8b3['resourceName'],'allowed':_0x5cc8b3['action']===_0x5543cb(0x1bf),'action':_0x5cc8b3[_0x5543cb(0x1ba)]}));return{'ok':!![],'data':{'selector':{'appCode':_0x2c0fe4[_0x5543cb(0x1c1)],'roleId':_0x6e8ffa['id'],'roleName':_0x6e8ffa[_0x5543cb(0x1cb)]},'menus':_0x5799c2},'message':_0x5543cb(0x1b5)+_0x6e8ffa['roleName']+'\x20has\x20'+_0x5799c2['filter'](_0x21bd26=>_0x21bd26[_0x5543cb(0x1b9)])[_0x5543cb(0x1b4)]+'/'+_0x5799c2[_0x5543cb(0x1b4)]+_0x5543cb(0x1c0)};}};
@@ -1 +1 @@
1
- const a142_0x4cb0e3=a142_0x245b;(function(_0x367754,_0x1827e7){const _0x2bb1c4=a142_0x245b,_0x214387=_0x367754();while(!![]){try{const _0x14dc20=-parseInt(_0x2bb1c4(0x12b))/0x1*(parseInt(_0x2bb1c4(0x121))/0x2)+-parseInt(_0x2bb1c4(0x115))/0x3*(parseInt(_0x2bb1c4(0x114))/0x4)+-parseInt(_0x2bb1c4(0x149))/0x5*(-parseInt(_0x2bb1c4(0x10a))/0x6)+-parseInt(_0x2bb1c4(0x160))/0x7*(parseInt(_0x2bb1c4(0x145))/0x8)+parseInt(_0x2bb1c4(0x125))/0x9*(-parseInt(_0x2bb1c4(0x157))/0xa)+-parseInt(_0x2bb1c4(0x155))/0xb+parseInt(_0x2bb1c4(0x158))/0xc;if(_0x14dc20===_0x1827e7)break;else _0x214387['push'](_0x214387['shift']());}catch(_0x37be14){_0x214387['push'](_0x214387['shift']());}}}(a142_0x5979,0x349fe));import{listPermitRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const MENU_ID_FLAG={'name':a142_0x4cb0e3(0x15e),'type':a142_0x4cb0e3(0x162),'required':!![],'description':'Menu\x20id\x20(from\x20`menu\x20list`)'};export const ROLE_REF_FLAG={'name':a142_0x4cb0e3(0x11e),'type':a142_0x4cb0e3(0x13f),'required':!![],'description':a142_0x4cb0e3(0x12c)};export const GRANT_FLAG={'name':a142_0x4cb0e3(0x123),'type':a142_0x4cb0e3(0x132),'required':![],'description':a142_0x4cb0e3(0x164)};export const REVOKE_FLAG={'name':a142_0x4cb0e3(0x15c),'type':a142_0x4cb0e3(0x132),'required':![],'description':a142_0x4cb0e3(0x12d)};export const MENUS_FLAG={'name':a142_0x4cb0e3(0x127),'type':a142_0x4cb0e3(0x13f),'required':!![],'description':a142_0x4cb0e3(0x124)};export const DATASETS_FLAG={'name':'datasets','type':a142_0x4cb0e3(0x13f),'required':!![],'description':a142_0x4cb0e3(0x140)};export const PAGE_SLOT_SPECS=[{'flag':a142_0x4cb0e3(0x138),'key':a142_0x4cb0e3(0x147),'allowSelf':![],'label':'menu\x20visibility'},{'flag':a142_0x4cb0e3(0x116),'key':a142_0x4cb0e3(0x142),'allowSelf':![],'label':'data\x20create'},{'flag':a142_0x4cb0e3(0x146),'key':'dataUpdate','allowSelf':![],'label':a142_0x4cb0e3(0x137)},{'flag':a142_0x4cb0e3(0x150),'key':a142_0x4cb0e3(0x130),'allowSelf':![],'label':a142_0x4cb0e3(0x159)},{'flag':a142_0x4cb0e3(0x13a),'key':a142_0x4cb0e3(0x120),'allowSelf':![],'label':a142_0x4cb0e3(0x10f)},{'flag':a142_0x4cb0e3(0x112),'key':a142_0x4cb0e3(0x11c),'allowSelf':![],'label':a142_0x4cb0e3(0x10b)},{'flag':a142_0x4cb0e3(0x12f),'key':a142_0x4cb0e3(0x14c),'allowSelf':!![],'label':a142_0x4cb0e3(0x13c)}];export const PAGE_SET_ROLE_FLAGS=PAGE_SLOT_SPECS[a142_0x4cb0e3(0x14f)](_0x5e662f=>({'name':_0x5e662f[a142_0x4cb0e3(0x10e)],'type':a142_0x4cb0e3(0x13f),'required':![],'description':a142_0x4cb0e3(0x151)+_0x5e662f[a142_0x4cb0e3(0x117)]+a142_0x4cb0e3(0x10d)+(_0x5e662f[a142_0x4cb0e3(0x11b)]?a142_0x4cb0e3(0x14b):'')}));export function splitList(_0x104906){const _0x3dd832=a142_0x4cb0e3;return _0x104906[_0x3dd832(0x14d)](',')['map'](_0x122198=>_0x122198[_0x3dd832(0x13b)]())[_0x3dd832(0x15d)](Boolean);}export function projectRoleRef(_0x485d11){const _0x514b53=a142_0x4cb0e3;return{'id':_0x485d11['id'],'roleName':_0x485d11[_0x514b53(0x129)],'roleType':_0x485d11[_0x514b53(0x134)]};}export async function resolvePermitRoles(_0x46e96b,_0x130e93,_0xac81ee){const _0x43f685=a142_0x4cb0e3,_0x35251f=await listPermitRoles(_0x46e96b,{'needSelf':!![],'needPublic':!![]}),_0x2b9e4a=[];for(const _0x3ebfdd of _0x130e93){const _0x3b1d57=resolveOnePermitRole(_0x35251f,_0x3ebfdd);if(!_0xac81ee['allowSelf']&&_0x3b1d57[_0x43f685(0x134)]===_0x43f685(0x12a))throw CliErrors['validation']('SELF\x20is\x20not\x20allowed\x20for\x20'+_0xac81ee[_0x43f685(0x117)]+'.',_0x43f685(0x128));if(!_0x2b9e4a[_0x43f685(0x135)](_0x56924d=>_0x56924d['id']===_0x3b1d57['id']))_0x2b9e4a[_0x43f685(0x136)](_0x3b1d57);}return _0x2b9e4a;}function a142_0x5979(){const _0x485483=['resourceName','str','Missing\x20action.','allowSelf','dataExport','toUpperCase','role','menuId','dataDetail','2lDeCLy','\x22\x20is\x20ambiguous\x20(ids:\x20','grant','Comma-separated\x20menu\x20resourceCodes\x20to\x20grant/revoke','504801GMXJtQ','rolePermit','menus','SELF\x20(row-level)\x20applies\x20only\x20to\x20--row-roles.','roleName','SELF','48411UBnjhv','Role\x20id\x20or\x20role\x20name','Revoke\x20access\x20to\x20the\x20listed\x20resources','flagMissing','row-roles','dataDelete','bool','boolean','length','roleType','some','push','data\x20update','menu-roles','Role\x20\x22','detail-roles','trim','row\x20visibility','Run\x20`role\x20list`.','validation','string','Comma-separated\x20datasetCodes\x20to\x20revoke\x20API\x20access\x20for','Disambiguate\x20with\x20an\x20id.','dataCreate','join','Run\x20`role\x20list`,\x20or\x20use\x20SELF/ALL/<id>.','1448ENWTmt','update-roles','menuPermit','access','404750OTNXTv','pageNodeList',';\x20SELF\x20=\x20only\x20own\x20rows','dataPermit','split','resourceCode','map','delete-roles','Roles\x20for\x20','Special\x20role\x20','action','entries','3779127SpjdsU','datasetCode','50XvIbBB','11911572YSIaNS','data\x20delete','find','key','revoke','filter','menu-id','set','5173yIdUbk','apiList','number','\x20is\x20not\x20available\x20for\x20this\x20app.','Grant\x20access\x20to\x20the\x20listed\x20resources','6XJFgiz','data\x20export','Pass\x20exactly\x20one\x20of\x20--grant\x20/\x20--revoke.','\x20(comma-separated\x20SELF/ALL/id/name)','flag','data\x20detail','Role\x20id\x20','--grant\x20and\x20--revoke\x20are\x20mutually\x20exclusive.','export-roles','\x20not\x20found.','207436orBpKh','3Aicwus','create-roles','label'];a142_0x5979=function(){return _0x485483;};return a142_0x5979();}function resolveOnePermitRole(_0x16420f,_0x36fb42){const _0x425db3=a142_0x4cb0e3,_0x186020=_0x36fb42[_0x425db3(0x13b)](),_0x1e1d29=_0x186020[_0x425db3(0x11d)]();if(_0x1e1d29===_0x425db3(0x12a)||_0x1e1d29==='ALL'){const _0x15f9d2=_0x16420f[_0x425db3(0x15a)](_0x44c60d=>_0x44c60d[_0x425db3(0x134)]===_0x1e1d29);if(!_0x15f9d2)throw CliErrors[_0x425db3(0x13e)](_0x425db3(0x152)+_0x1e1d29+_0x425db3(0x163));return _0x15f9d2;}if(/^-?\d+$/['test'](_0x186020)){const _0x1e2d24=Number(_0x186020),_0x596574=_0x16420f['find'](_0x20cb29=>_0x20cb29['id']===_0x1e2d24);if(!_0x596574)throw CliErrors['validation'](_0x425db3(0x110)+_0x1e2d24+_0x425db3(0x113),_0x425db3(0x13d));return _0x596574;}const _0xf92fbe=_0x16420f['filter'](_0x309e8d=>_0x309e8d['roleName']===_0x186020);if(_0xf92fbe[_0x425db3(0x133)]===0x0)throw CliErrors['validation'](_0x425db3(0x139)+_0x186020+'\x22\x20not\x20found.',_0x425db3(0x144));if(_0xf92fbe[_0x425db3(0x133)]>0x1)throw CliErrors[_0x425db3(0x13e)](_0x425db3(0x139)+_0x186020+_0x425db3(0x122)+_0xf92fbe['map'](_0x2daef0=>_0x2daef0['id'])[_0x425db3(0x143)](',\x20')+').',_0x425db3(0x141));return _0xf92fbe[0x0];}export function projectPageSlot(_0x9f52ea){const _0x54476d=a142_0x4cb0e3;if(!_0x9f52ea)return null;return{'resourceCode':_0x9f52ea['resourceCode'],'roles':(_0x9f52ea[_0x54476d(0x126)]??[])[_0x54476d(0x14f)](projectRoleRef)};}export function projectPagePermit(_0xb49c52){const _0x2f8604=a142_0x4cb0e3,_0x1f63d7={'menuId':_0xb49c52[_0x2f8604(0x11f)],'appCode':_0xb49c52['appCode'],'menuPermit':projectPageSlot(_0xb49c52[_0x2f8604(0x147)])};for(const _0xead38b of PAGE_SLOT_SPECS){if(_0xead38b['key']===_0x2f8604(0x147))continue;_0x1f63d7[_0xead38b['key']]=projectPageSlot(_0xb49c52[_0xead38b[_0x2f8604(0x15b)]]);}return _0x1f63d7;}export function flattenMenuResources(_0x31c184){const _0x295cfc=new Map(),_0x26ca8b=_0xf2d058=>{const _0x224a6a=a142_0x245b;for(const _0x5c12c7 of _0xf2d058??[]){_0x295cfc[_0x224a6a(0x15f)](_0x5c12c7['resourceCode'],{'resourceCode':_0x5c12c7[_0x224a6a(0x14e)],'resourceName':_0x5c12c7[_0x224a6a(0x118)],'action':_0x5c12c7['allowedActions']?.[0x0]??'0'});if(_0x5c12c7['pageNodeList'])_0x26ca8b(_0x5c12c7[_0x224a6a(0x14a)]);}};return _0x26ca8b(_0x31c184),_0x295cfc;}export function flattenApiResources(_0x53f736){const _0x243786=a142_0x4cb0e3,_0x4524bd=new Map(),_0x163eb6=new Map();for(const _0x44e05f of _0x53f736){const _0x1ced38=_0x44e05f[_0x243786(0x161)]??{};for(const [_0x256645,_0x4e8ed3]of Object[_0x243786(0x154)](_0x1ced38)){_0x4524bd['set'](_0x256645,{'resourceCode':_0x256645,'resourceName':_0x44e05f['resourceName'],'datasetCode':_0x44e05f[_0x243786(0x156)],'action':_0x4e8ed3?.[0x0]??'0'});const _0x598c15=_0x163eb6['get'](_0x44e05f['datasetCode'])??[];_0x598c15[_0x243786(0x136)](_0x256645),_0x163eb6[_0x243786(0x15f)](_0x44e05f['datasetCode'],_0x598c15);}}return{'byCode':_0x4524bd,'byDataset':_0x163eb6};}export function buildPermits(_0x291c47,_0x497faf){const _0x484425=a142_0x4cb0e3,_0x426adb={};for(const [_0x350836,_0x5c7ddc]of _0x291c47){const _0x3e9482=_0x497faf['get'](_0x350836)??_0x5c7ddc[_0x484425(0x153)];_0x426adb[_0x350836]=[_0x3e9482];}return _0x426adb;}function a142_0x245b(_0x1a3c2b,_0x444560){_0x1a3c2b=_0x1a3c2b-0x10a;const _0x59796c=a142_0x5979();let _0x245b06=_0x59796c[_0x1a3c2b];return _0x245b06;}export function readRoleRef(_0x2d5f44){const _0x4cd8be=a142_0x4cb0e3,_0xe2ca95=_0x2d5f44[_0x4cd8be(0x119)](_0x4cd8be(0x11e))[_0x4cd8be(0x13b)]();if(!_0xe2ca95)throw CliErrors[_0x4cd8be(0x12e)]('role','Pass\x20--role\x20<id|name>.');return _0xe2ca95;}export function readGrantRevoke(_0x25761e){const _0x36ceab=a142_0x4cb0e3,_0x126f6a=_0x25761e[_0x36ceab(0x131)](_0x36ceab(0x123)),_0x5cbbf7=_0x25761e[_0x36ceab(0x131)]('revoke');if(_0x126f6a&&_0x5cbbf7)throw CliErrors[_0x36ceab(0x13e)](_0x36ceab(0x111));if(!_0x126f6a&&!_0x5cbbf7)throw CliErrors[_0x36ceab(0x13e)](_0x36ceab(0x11a),_0x36ceab(0x10c));return _0x126f6a?_0x36ceab(0x148):'0';}
1
+ const a142_0x5d5b95=a142_0x29a8;(function(_0x3edf61,_0x187fa0){const _0x2443c4=a142_0x29a8,_0x25104e=_0x3edf61();while(!![]){try{const _0x5e6501=-parseInt(_0x2443c4(0x1be))/0x1*(parseInt(_0x2443c4(0x1e8))/0x2)+-parseInt(_0x2443c4(0x1e7))/0x3*(parseInt(_0x2443c4(0x1ba))/0x4)+parseInt(_0x2443c4(0x1d7))/0x5*(-parseInt(_0x2443c4(0x1bc))/0x6)+-parseInt(_0x2443c4(0x1b6))/0x7+-parseInt(_0x2443c4(0x1f9))/0x8*(parseInt(_0x2443c4(0x1c8))/0x9)+-parseInt(_0x2443c4(0x1d0))/0xa+parseInt(_0x2443c4(0x1df))/0xb*(parseInt(_0x2443c4(0x1f6))/0xc);if(_0x5e6501===_0x187fa0)break;else _0x25104e['push'](_0x25104e['shift']());}catch(_0x5cbfe8){_0x25104e['push'](_0x25104e['shift']());}}}(a142_0x4e24,0x6d6e2));import{listPermitRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const MENU_ID_FLAG={'name':'menu-id','type':'number','required':!![],'description':'Menu\x20id\x20(from\x20`menu\x20list`)'};export const ROLE_REF_FLAG={'name':'role','type':a142_0x5d5b95(0x1f2),'required':!![],'description':'Role\x20id\x20or\x20role\x20name'};export const GRANT_FLAG={'name':a142_0x5d5b95(0x1e3),'type':a142_0x5d5b95(0x1d2),'required':![],'description':'Grant\x20access\x20to\x20the\x20listed\x20resources'};export const REVOKE_FLAG={'name':a142_0x5d5b95(0x1d8),'type':a142_0x5d5b95(0x1d2),'required':![],'description':a142_0x5d5b95(0x1cb)};export const MENUS_FLAG={'name':a142_0x5d5b95(0x1fb),'type':a142_0x5d5b95(0x1f2),'required':!![],'description':'Comma-separated\x20menu\x20resourceCodes\x20to\x20grant/revoke'};export const DATASETS_FLAG={'name':a142_0x5d5b95(0x1b9),'type':a142_0x5d5b95(0x1f2),'required':!![],'description':a142_0x5d5b95(0x1ac)};export const PAGE_SLOT_SPECS=[{'flag':'menu-roles','key':a142_0x5d5b95(0x1e2),'allowSelf':![],'label':a142_0x5d5b95(0x1c9)},{'flag':'create-roles','key':a142_0x5d5b95(0x1e0),'allowSelf':![],'label':a142_0x5d5b95(0x1fc)},{'flag':a142_0x5d5b95(0x1f4),'key':'dataUpdate','allowSelf':![],'label':a142_0x5d5b95(0x1f7)},{'flag':a142_0x5d5b95(0x1e5),'key':a142_0x5d5b95(0x1da),'allowSelf':![],'label':'data\x20delete'},{'flag':a142_0x5d5b95(0x1b3),'key':a142_0x5d5b95(0x1b4),'allowSelf':![],'label':'data\x20detail'},{'flag':'export-roles','key':a142_0x5d5b95(0x1af),'allowSelf':![],'label':a142_0x5d5b95(0x1cc)},{'flag':a142_0x5d5b95(0x1d6),'key':a142_0x5d5b95(0x1bb),'allowSelf':!![],'label':a142_0x5d5b95(0x1d1)}];export const PAGE_SET_ROLE_FLAGS=PAGE_SLOT_SPECS[a142_0x5d5b95(0x1c4)](_0x5c120e=>({'name':_0x5c120e[a142_0x5d5b95(0x1ea)],'type':a142_0x5d5b95(0x1f2),'required':![],'description':a142_0x5d5b95(0x1b5)+_0x5c120e[a142_0x5d5b95(0x1f8)]+a142_0x5d5b95(0x1ca)+(_0x5c120e['allowSelf']?a142_0x5d5b95(0x1ce):'')}));export function splitList(_0x13841d){const _0x50220f=a142_0x5d5b95;return _0x13841d[_0x50220f(0x1f5)](',')[_0x50220f(0x1c4)](_0x32ff16=>_0x32ff16[_0x50220f(0x1ef)]())[_0x50220f(0x1ed)](Boolean);}export function projectRoleRef(_0x592491){const _0x141af9=a142_0x5d5b95;return{'id':_0x592491['id'],'roleName':_0x592491[_0x141af9(0x1d9)],'roleType':_0x592491[_0x141af9(0x1cf)]};}export async function resolvePermitRoles(_0x4f9ddd,_0x45c80e,_0x36513d){const _0x3e6eb7=a142_0x5d5b95,_0x4685b0=await listPermitRoles(_0x4f9ddd,{'needSelf':!![],'needPublic':!![]}),_0x3c19ae=[];for(const _0x15b807 of _0x45c80e){const _0x28477a=resolveOnePermitRole(_0x4685b0,_0x15b807);if(!_0x36513d[_0x3e6eb7(0x1eb)]&&_0x28477a['roleType']===_0x3e6eb7(0x1c7))throw CliErrors['validation']('SELF\x20is\x20not\x20allowed\x20for\x20'+_0x36513d[_0x3e6eb7(0x1f8)]+'.',_0x3e6eb7(0x1dd));if(!_0x3c19ae[_0x3e6eb7(0x1b2)](_0x5a899a=>_0x5a899a['id']===_0x28477a['id']))_0x3c19ae['push'](_0x28477a);}return _0x3c19ae;}function a142_0x4e24(){const _0x47ce2b=['bool','18364247RJtFDR','dataCreate','entries','menuPermit','grant','ALL','delete-roles','find','158139MWJoSF','2vSrEgG','Role\x20id\x20','flag','allowSelf','Special\x20role\x20','filter','datasetCode','trim','apiList','Missing\x20action.','string','set','update-roles','split','24djKHKc','data\x20update','label','381224ldIVtC','\x20is\x20not\x20available\x20for\x20this\x20app.','menus','data\x20create','Comma-separated\x20datasetCodes\x20to\x20revoke\x20API\x20access\x20for','Pass\x20--role\x20<id|name>.','toUpperCase','dataExport','allowedActions','\x22\x20not\x20found.','some','detail-roles','dataDetail','Roles\x20for\x20','5784947TIpQwQ','pageNodeList','\x20not\x20found.','datasets','36jQhYEt','dataPermit','447660tObTTi','join','256265iHBCjD','access','key','str','flagMissing','Pass\x20exactly\x20one\x20of\x20--grant\x20/\x20--revoke.','map','Disambiguate\x20with\x20an\x20id.','validation','SELF','81wKItmg','menu\x20visibility','\x20(comma-separated\x20SELF/ALL/id/name)','Revoke\x20access\x20to\x20the\x20listed\x20resources','data\x20export','length',';\x20SELF\x20=\x20only\x20own\x20rows','roleType','840380ioRLki','row\x20visibility','boolean','role','get','resourceCode','row-roles','55opHkBT','revoke','roleName','dataDelete','Role\x20\x22','\x22\x20is\x20ambiguous\x20(ids:\x20','SELF\x20(row-level)\x20applies\x20only\x20to\x20--row-roles.'];a142_0x4e24=function(){return _0x47ce2b;};return a142_0x4e24();}function resolveOnePermitRole(_0x1a89da,_0xb7cbc){const _0x52ab0b=a142_0x5d5b95,_0x446905=_0xb7cbc[_0x52ab0b(0x1ef)](),_0x774427=_0x446905[_0x52ab0b(0x1ae)]();if(_0x774427===_0x52ab0b(0x1c7)||_0x774427===_0x52ab0b(0x1e4)){const _0x483b42=_0x1a89da['find'](_0xfe015=>_0xfe015[_0x52ab0b(0x1cf)]===_0x774427);if(!_0x483b42)throw CliErrors[_0x52ab0b(0x1c6)](_0x52ab0b(0x1ec)+_0x774427+_0x52ab0b(0x1fa));return _0x483b42;}if(/^-?\d+$/['test'](_0x446905)){const _0x3ed880=Number(_0x446905),_0x1d69f6=_0x1a89da[_0x52ab0b(0x1e6)](_0x98b4f9=>_0x98b4f9['id']===_0x3ed880);if(!_0x1d69f6)throw CliErrors[_0x52ab0b(0x1c6)](_0x52ab0b(0x1e9)+_0x3ed880+_0x52ab0b(0x1b8),'Run\x20`role\x20list`.');return _0x1d69f6;}const _0x47748d=_0x1a89da[_0x52ab0b(0x1ed)](_0xffed33=>_0xffed33[_0x52ab0b(0x1d9)]===_0x446905);if(_0x47748d[_0x52ab0b(0x1cd)]===0x0)throw CliErrors[_0x52ab0b(0x1c6)](_0x52ab0b(0x1db)+_0x446905+_0x52ab0b(0x1b1),'Run\x20`role\x20list`,\x20or\x20use\x20SELF/ALL/<id>.');if(_0x47748d['length']>0x1)throw CliErrors[_0x52ab0b(0x1c6)](_0x52ab0b(0x1db)+_0x446905+_0x52ab0b(0x1dc)+_0x47748d['map'](_0x5b0611=>_0x5b0611['id'])[_0x52ab0b(0x1bd)](',\x20')+').',_0x52ab0b(0x1c5));return _0x47748d[0x0];}export function projectPageSlot(_0x5df9dd){const _0x28fd46=a142_0x5d5b95;if(!_0x5df9dd)return null;return{'resourceCode':_0x5df9dd[_0x28fd46(0x1d5)],'roles':(_0x5df9dd['rolePermit']??[])[_0x28fd46(0x1c4)](projectRoleRef)};}function a142_0x29a8(_0x3809af,_0x1da025){_0x3809af=_0x3809af-0x1ac;const _0x4e24ee=a142_0x4e24();let _0x29a808=_0x4e24ee[_0x3809af];return _0x29a808;}export function projectPagePermit(_0x3821a1){const _0x5afb3a=a142_0x5d5b95,_0xf4bc62={'menuId':_0x3821a1['menuId'],'appCode':_0x3821a1['appCode'],'menuPermit':projectPageSlot(_0x3821a1[_0x5afb3a(0x1e2)])};for(const _0x9c6816 of PAGE_SLOT_SPECS){if(_0x9c6816[_0x5afb3a(0x1c0)]===_0x5afb3a(0x1e2))continue;_0xf4bc62[_0x9c6816[_0x5afb3a(0x1c0)]]=projectPageSlot(_0x3821a1[_0x9c6816[_0x5afb3a(0x1c0)]]);}return _0xf4bc62;}export function flattenMenuResources(_0x4b885b){const _0x3ca15c=new Map(),_0x38bcc8=_0x3dcb0c=>{const _0x4b58e0=a142_0x29a8;for(const _0x401fde of _0x3dcb0c??[]){_0x3ca15c[_0x4b58e0(0x1f3)](_0x401fde['resourceCode'],{'resourceCode':_0x401fde['resourceCode'],'resourceName':_0x401fde['resourceName'],'action':_0x401fde[_0x4b58e0(0x1b0)]?.[0x0]??'0'});if(_0x401fde[_0x4b58e0(0x1b7)])_0x38bcc8(_0x401fde[_0x4b58e0(0x1b7)]);}};return _0x38bcc8(_0x4b885b),_0x3ca15c;}export function flattenApiResources(_0x44cfde){const _0x9411b3=a142_0x5d5b95,_0x2f7b4a=new Map(),_0x1bdc72=new Map();for(const _0xd6da91 of _0x44cfde){const _0x38b61c=_0xd6da91[_0x9411b3(0x1f0)]??{};for(const [_0xbbc495,_0x42095d]of Object[_0x9411b3(0x1e1)](_0x38b61c)){_0x2f7b4a[_0x9411b3(0x1f3)](_0xbbc495,{'resourceCode':_0xbbc495,'resourceName':_0xd6da91['resourceName'],'datasetCode':_0xd6da91[_0x9411b3(0x1ee)],'action':_0x42095d?.[0x0]??'0'});const _0x22dbc2=_0x1bdc72[_0x9411b3(0x1d4)](_0xd6da91[_0x9411b3(0x1ee)])??[];_0x22dbc2['push'](_0xbbc495),_0x1bdc72['set'](_0xd6da91[_0x9411b3(0x1ee)],_0x22dbc2);}}return{'byCode':_0x2f7b4a,'byDataset':_0x1bdc72};}export function buildPermits(_0x39fd45,_0x2a3a63){const _0x2ad949=a142_0x5d5b95,_0x8dff16={};for(const [_0x28a15f,_0x1b7c69]of _0x39fd45){const _0x47de98=_0x2a3a63[_0x2ad949(0x1d4)](_0x28a15f)??_0x1b7c69['action'];_0x8dff16[_0x28a15f]=[_0x47de98];}return _0x8dff16;}export function readRoleRef(_0x4ccf04){const _0x5c0a7b=a142_0x5d5b95,_0x20e167=_0x4ccf04[_0x5c0a7b(0x1c1)](_0x5c0a7b(0x1d3))[_0x5c0a7b(0x1ef)]();if(!_0x20e167)throw CliErrors[_0x5c0a7b(0x1c2)](_0x5c0a7b(0x1d3),_0x5c0a7b(0x1ad));return _0x20e167;}export function readGrantRevoke(_0x29b1aa){const _0x55d0c8=a142_0x5d5b95,_0x277078=_0x29b1aa[_0x55d0c8(0x1de)]('grant'),_0x489b63=_0x29b1aa['bool'](_0x55d0c8(0x1d8));if(_0x277078&&_0x489b63)throw CliErrors['validation']('--grant\x20and\x20--revoke\x20are\x20mutually\x20exclusive.');if(!_0x277078&&!_0x489b63)throw CliErrors[_0x55d0c8(0x1c6)](_0x55d0c8(0x1f1),_0x55d0c8(0x1c3));return _0x277078?_0x55d0c8(0x1bf):'0';}
@@ -1 +1 @@
1
- (function(_0x47f986,_0x2b2ac9){const _0x3f1bbe=a143_0x7d6e,_0x5a1b7b=_0x47f986();while(!![]){try{const _0x5567e7=-parseInt(_0x3f1bbe(0x105))/0x1*(-parseInt(_0x3f1bbe(0x111))/0x2)+parseInt(_0x3f1bbe(0x109))/0x3+-parseInt(_0x3f1bbe(0x104))/0x4*(parseInt(_0x3f1bbe(0x10d))/0x5)+-parseInt(_0x3f1bbe(0x106))/0x6+parseInt(_0x3f1bbe(0x102))/0x7+parseInt(_0x3f1bbe(0x100))/0x8+parseInt(_0x3f1bbe(0x103))/0x9*(parseInt(_0x3f1bbe(0x112))/0xa);if(_0x5567e7===_0x2b2ac9)break;else _0x5a1b7b['push'](_0x5a1b7b['shift']());}catch(_0x2dbae0){_0x5a1b7b['push'](_0x5a1b7b['shift']());}}}(a143_0x2dc9,0x356f6));import{existsSync}from'node:fs';import a143_0x4dfb76 from'node:path';import a143_0x14f7d5 from'chalk';import{input,confirm}from'@inquirer/prompts';function a143_0x2dc9(){const _0x37f023=['Project\x20name\x20cannot\x20exceed\x2050\x20characters','cwd','production','my-app','cyan','Project\x20name:','Login\x20failed','test','Logged\x20in','621424hSPDxp','√\x20App\x20Code:\x20','2634142KthcIk','1623906jmabvP','248gzUxSj','62618GEyAwU','2588622GdIIoV','Directory\x20\x22','trim','560433NPSgMk','√\x20Login\x20status:\x20','green','resolve','33385aSBIHM','env','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','log','2bHHFFs','20YOlgmU','length'];a143_0x2dc9=function(){return _0x37f023;};return a143_0x2dc9();}import{getIsSessionValid}from'../../../auth/is-session-valid.js';import{authServer}from'../../../auth/auth-server.js';function a143_0x7d6e(_0x432416,_0x59eb4b){_0x432416=_0x432416-0xf8;const _0x2dc918=a143_0x2dc9();let _0x7d6e8c=_0x2dc918[_0x432416];return _0x7d6e8c;}import{readConfig}from'../../../utils/config.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';export async function guidedCreateProject(_0x4956dd,_0x53a671,_0x2f0a29){const _0x3a66aa=a143_0x7d6e,_0x3d8d8e=_0x3a66aa(0xfa),_0x3161ad=readConfig(),_0x30f7a8=typeof _0x3161ad['env']==='string'?_0x3161ad[_0x3a66aa(0x10e)]:undefined,_0x8a499e=await input({'message':_0x3a66aa(0xfc),'default':_0x3d8d8e,'validate':_0x1c698b=>{const _0x13e414=_0x3a66aa,_0x457307=_0x1c698b[_0x13e414(0x108)]()||_0x3d8d8e;if(_0x457307[_0x13e414(0x113)]>0x32)return _0x13e414(0x114);const _0x51a460=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x457307&&!_0x51a460[_0x13e414(0xfe)](_0x457307))return _0x13e414(0x10f);const _0x7e66d4=a143_0x4dfb76[_0x13e414(0x10c)](process[_0x13e414(0xf8)](),_0x457307);if(existsSync(_0x7e66d4))return _0x13e414(0x107)+_0x457307+'\x22\x20already\x20exists';return!![];}});console[_0x3a66aa(0x110)](a143_0x14f7d5['green']('√\x20Project\x20Name:\x20'+a143_0x14f7d5['cyan'](_0x8a499e)));const _0xe4c7b8=await selectSingleAppcode(_0x2f0a29);console[_0x3a66aa(0x110)](a143_0x14f7d5[_0x3a66aa(0x10b)](_0x3a66aa(0x101)+a143_0x14f7d5[_0x3a66aa(0xfb)](_0xe4c7b8||'Not\x20set')));if(_0xe4c7b8){const _0x4cf78d=await getIsSessionValid();if(!_0x4cf78d){const _0x2f9278=await confirm({'message':'No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','default':!![]});if(_0x2f9278){const _0x400b47=await authServer({'silent':!![]});console[_0x3a66aa(0x110)](a143_0x14f7d5[_0x3a66aa(0x10b)](_0x3a66aa(0x10a)+a143_0x14f7d5[_0x3a66aa(0xfb)](_0x400b47?_0x3a66aa(0xff):_0x3a66aa(0xfd))));}else console['log'](a143_0x14f7d5[_0x3a66aa(0x10b)](_0x3a66aa(0x10a)+a143_0x14f7d5[_0x3a66aa(0xfb)]('Skipped')));}await _0x4956dd({'projectName':_0x8a499e,'appCode':_0xe4c7b8,'env':_0x53a671||_0x30f7a8||_0x3a66aa(0xf9)});}else await _0x4956dd({'projectName':_0x8a499e,'env':_0x53a671||_0x30f7a8||_0x3a66aa(0xf9)});}
1
+ (function(_0x2ccd0d,_0x2323a4){const _0x2e6fc8=a143_0x872a,_0x3069e3=_0x2ccd0d();while(!![]){try{const _0x4c8e17=parseInt(_0x2e6fc8(0x1de))/0x1*(-parseInt(_0x2e6fc8(0x1f3))/0x2)+parseInt(_0x2e6fc8(0x1e9))/0x3*(-parseInt(_0x2e6fc8(0x1e8))/0x4)+-parseInt(_0x2e6fc8(0x1eb))/0x5*(-parseInt(_0x2e6fc8(0x1f6))/0x6)+-parseInt(_0x2e6fc8(0x1e7))/0x7*(-parseInt(_0x2e6fc8(0x1f0))/0x8)+parseInt(_0x2e6fc8(0x1ed))/0x9*(-parseInt(_0x2e6fc8(0x1f4))/0xa)+-parseInt(_0x2e6fc8(0x1f5))/0xb*(-parseInt(_0x2e6fc8(0x1f7))/0xc)+-parseInt(_0x2e6fc8(0x1f2))/0xd*(-parseInt(_0x2e6fc8(0x1f1))/0xe);if(_0x4c8e17===_0x2323a4)break;else _0x3069e3['push'](_0x3069e3['shift']());}catch(_0x180a51){_0x3069e3['push'](_0x3069e3['shift']());}}}(a143_0x6c52,0xe2fe4));import{existsSync}from'node:fs';import a143_0x4eb84f from'node:path';import a143_0x5c0bf3 from'chalk';import{input,confirm}from'@inquirer/prompts';function a143_0x6c52(){const _0x4ba6d2=['Project\x20name\x20cannot\x20exceed\x2050\x20characters','No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','154184TCKvQt','405986sJUrwP','507knsJhX','502bEhJAk','41830KRaknN','16098379GyaGOB','1553346NIeLka','12GRMFBs','\x22\x20already\x20exists','string','Directory\x20\x22','resolve','length','√\x20Login\x20status:\x20','cyan','1210KtyXQQ','log','Project\x20name:','Logged\x20in','env','√\x20Project\x20Name:\x20','production','green','√\x20App\x20Code:\x20','154tIOfBb','434224JTahLK','51NmmofI','test','25MiigKB','Login\x20failed','2655bKzaXB'];a143_0x6c52=function(){return _0x4ba6d2;};return a143_0x6c52();}import{getIsSessionValid}from'../../../auth/is-session-valid.js';import{authServer}from'../../../auth/auth-server.js';import{readConfig}from'../../../utils/config.js';function a143_0x872a(_0x5a7b8a,_0xd09688){_0x5a7b8a=_0x5a7b8a-0x1d7;const _0x6c5234=a143_0x6c52();let _0x872ad4=_0x6c5234[_0x5a7b8a];return _0x872ad4;}import{selectSingleAppcode}from'../../../commands/common/app-selector.js';export async function guidedCreateProject(_0x73e115,_0x4384b6,_0x53001e){const _0x42a567=a143_0x872a,_0x336719='my-app',_0x576297=readConfig(),_0x1529ad=typeof _0x576297[_0x42a567(0x1e2)]===_0x42a567(0x1d8)?_0x576297['env']:undefined,_0x1d52c6=await input({'message':_0x42a567(0x1e0),'default':_0x336719,'validate':_0x273aed=>{const _0x511252=_0x42a567,_0xefeedf=_0x273aed['trim']()||_0x336719;if(_0xefeedf[_0x511252(0x1db)]>0x32)return _0x511252(0x1ee);const _0x27c2a7=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0xefeedf&&!_0x27c2a7[_0x511252(0x1ea)](_0xefeedf))return'Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_';const _0xd8d4fc=a143_0x4eb84f[_0x511252(0x1da)](process['cwd'](),_0xefeedf);if(existsSync(_0xd8d4fc))return _0x511252(0x1d9)+_0xefeedf+_0x511252(0x1d7);return!![];}});console[_0x42a567(0x1df)](a143_0x5c0bf3[_0x42a567(0x1e5)](_0x42a567(0x1e3)+a143_0x5c0bf3[_0x42a567(0x1dd)](_0x1d52c6)));const _0x1393ad=await selectSingleAppcode(_0x53001e);console['log'](a143_0x5c0bf3['green'](_0x42a567(0x1e6)+a143_0x5c0bf3[_0x42a567(0x1dd)](_0x1393ad||'Not\x20set')));if(_0x1393ad){const _0x47da87=await getIsSessionValid();if(!_0x47da87){const _0x1b10b8=await confirm({'message':_0x42a567(0x1ef),'default':!![]});if(_0x1b10b8){const _0x316626=await authServer({'silent':!![]});console[_0x42a567(0x1df)](a143_0x5c0bf3[_0x42a567(0x1e5)](_0x42a567(0x1dc)+a143_0x5c0bf3[_0x42a567(0x1dd)](_0x316626?_0x42a567(0x1e1):_0x42a567(0x1ec))));}else console[_0x42a567(0x1df)](a143_0x5c0bf3[_0x42a567(0x1e5)](_0x42a567(0x1dc)+a143_0x5c0bf3[_0x42a567(0x1dd)]('Skipped')));}await _0x73e115({'projectName':_0x1d52c6,'appCode':_0x1393ad,'env':_0x4384b6||_0x1529ad||_0x42a567(0x1e4)});}else await _0x73e115({'projectName':_0x1d52c6,'env':_0x4384b6||_0x1529ad||_0x42a567(0x1e4)});}
@@ -1 +1 @@
1
- function a144_0x2a26(_0x563ea4,_0x220c55){_0x563ea4=_0x563ea4-0x117;const _0x460545=a144_0x4605();let _0x2a269c=_0x460545[_0x563ea4];return _0x2a269c;}(function(_0x37a07c,_0x5ec229){const _0x2a729a=a144_0x2a26,_0x4ca6eb=_0x37a07c();while(!![]){try{const _0x3e22d2=-parseInt(_0x2a729a(0x118))/0x1*(-parseInt(_0x2a729a(0x11b))/0x2)+parseInt(_0x2a729a(0x11f))/0x3*(parseInt(_0x2a729a(0x121))/0x4)+-parseInt(_0x2a729a(0x11a))/0x5*(parseInt(_0x2a729a(0x120))/0x6)+-parseInt(_0x2a729a(0x122))/0x7+parseInt(_0x2a729a(0x11d))/0x8+parseInt(_0x2a729a(0x119))/0x9+parseInt(_0x2a729a(0x11e))/0xa;if(_0x3e22d2===_0x5ec229)break;else _0x4ca6eb['push'](_0x4ca6eb['shift']());}catch(_0x74c872){_0x4ca6eb['push'](_0x4ca6eb['shift']());}}}(a144_0x4605,0x1dffc));function a144_0x4605(){const _0x4e0f4a=['1034xJDLYJ','now','783240IHgqOh','1527440wxEgTR','9qqxHXV','6QynwFv','90276qzcjmS','1656935JVwEyX','toFixed','191knzevV','993753FMPYZe','839695NPNBCN'];a144_0x4605=function(){return _0x4e0f4a;};return a144_0x4605();}export function formatElapsed(_0x585fd6){const _0x303289=a144_0x2a26,_0x346bea=Date[_0x303289(0x11c)]()-_0x585fd6;if(_0x346bea<0x3e8)return _0x346bea+'ms';const _0x1683dd=(_0x346bea/0x3e8)[_0x303289(0x117)](0x2),_0x144089=_0x1683dd['replace'](/\.?0+$/u,'');return _0x144089+'s';}
1
+ function a144_0x920d(){const _0x12ecc4=['13228RWjbRU','291918NAFlyP','86940kGVrvo','2155314wAfhQZ','replace','toFixed','now','4350RSHgoi','66983kKEblI','440ujKiNI','333aKjbhL','2502mciHuu','75602zRIONs'];a144_0x920d=function(){return _0x12ecc4;};return a144_0x920d();}function a144_0x3f66(_0x2f3d8e,_0x3d7310){_0x2f3d8e=_0x2f3d8e-0x161;const _0x920dec=a144_0x920d();let _0x3f6674=_0x920dec[_0x2f3d8e];return _0x3f6674;}(function(_0x215b6a,_0x210a11){const _0x554165=a144_0x3f66,_0x2e87a4=_0x215b6a();while(!![]){try{const _0x1a778f=-parseInt(_0x554165(0x16a))/0x1+-parseInt(_0x554165(0x168))/0x2+-parseInt(_0x554165(0x166))/0x3*(-parseInt(_0x554165(0x169))/0x4)+-parseInt(_0x554165(0x16b))/0x5+-parseInt(_0x554165(0x16c))/0x6+parseInt(_0x554165(0x164))/0x7*(parseInt(_0x554165(0x165))/0x8)+parseInt(_0x554165(0x167))/0x9*(parseInt(_0x554165(0x163))/0xa);if(_0x1a778f===_0x210a11)break;else _0x2e87a4['push'](_0x2e87a4['shift']());}catch(_0x5a7418){_0x2e87a4['push'](_0x2e87a4['shift']());}}}(a144_0x920d,0x4b308));export function formatElapsed(_0x2219b2){const _0x53e3b1=a144_0x3f66,_0x709acc=Date[_0x53e3b1(0x162)]()-_0x2219b2;if(_0x709acc<0x3e8)return _0x709acc+'ms';const _0x4becbb=(_0x709acc/0x3e8)[_0x53e3b1(0x161)](0x2),_0x11a2ef=_0x4becbb[_0x53e3b1(0x16d)](/\.?0+$/u,'');return _0x11a2ef+'s';}
@@ -1 +1 @@
1
- (function(_0x2d80a4,_0x26a620){const _0x1bf656=a145_0x443c,_0x47e6dd=_0x2d80a4();while(!![]){try{const _0x1b9c87=-parseInt(_0x1bf656(0x91))/0x1+-parseInt(_0x1bf656(0xe3))/0x2+-parseInt(_0x1bf656(0xd6))/0x3+parseInt(_0x1bf656(0xa7))/0x4*(parseInt(_0x1bf656(0x95))/0x5)+parseInt(_0x1bf656(0xd4))/0x6+-parseInt(_0x1bf656(0xd9))/0x7*(-parseInt(_0x1bf656(0xcc))/0x8)+parseInt(_0x1bf656(0xb9))/0x9;if(_0x1b9c87===_0x26a620)break;else _0x47e6dd['push'](_0x47e6dd['shift']());}catch(_0x2ae471){_0x47e6dd['push'](_0x47e6dd['shift']());}}}(a145_0x63e1,0x36f6f));import a145_0x255d67 from'path';import a145_0x56ec88 from'fs';import a145_0x324dac from'chalk';import a145_0x33eafc from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{readConfig}from'../../../utils/config.js';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';function a145_0x63e1(){const _0x1c9639=['API\x20配置拉取异常','\x20|\x20Default:\x20','3510963kPZvQJ','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','stringify','join','green','info','needsUpgrade','stableVersion','modelCount','\x20|\x20AppCode:\x20','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','\x20already\x20exists','defaultApp','Project\x20name:\x20','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','start','create','test','项目创建失败:\x20','2968zoANwG','accessSync','apps','existsSync','readFileSync','1.0.0','√\x20package.json\x20updated:\x20name=','projectName','2368800MaEqQx','*\x20Configuring\x20AppCode\x20for\x20project\x20','1295073DjQrBU','\x20api\x20pull','Install\x20dependencies','2891DGOSYt','\x20run\x20start','\x20model(s)','\x20\x202.\x20Pull\x20API\x20configuration:\x20','error','utf8','parse','rmSync','更新\x20package.json\x20name','appCode','877108XalgUz','production','description','currentVersion','chdir','\x20Generated\x20by\x20rabetbase\x20cli\x20','\x20config\x20set\x20appcode\x20<app-code>\x27','toLocaleString','cookie','129886AtUlps','writeFileSync','清理项目目录失败:\x20','log','39880MlEdvU','*\x20Pulling\x20API\x20configuration...','Project\x20name\x20cannot\x20be\x20empty','name','\x20\x201.\x20Start\x20project:\x20','projectCode','env','cwd','🚀\x20Next\x20Steps:','warn','CLI\x20版本检查','minimumVersion','bold','配置应用AppCode失败','repeat','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','API\x20configuration\x20pulled:\x20','cyan','144yvVaSN','\x20√\x20','cd\x20','stop','...','message','belowMinimum','开始创建项目:\x20','constants','package.json','length','fail','dirname','resolve','version','Project\x20directory\x20'];a145_0x63e1=function(){return _0x1c9639;};return a145_0x63e1();}function a145_0x443c(_0x4ba621,_0x165998){_0x4ba621=_0x4ba621-0x8a;const _0x63e17b=a145_0x63e1();let _0x443c43=_0x63e17b[_0x4ba621];return _0x443c43;}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(_0x2a4dce){const _0x25a7f2=a145_0x443c,_0x26393f=await checkCliVersion();(_0x26393f[_0x25a7f2(0xbf)]||_0x26393f[_0x25a7f2(0xad)])&&(printCliUpgradeWarning(_0x26393f),assertCliVersionSupported(_0x26393f),logger[_0x25a7f2(0xbe)]('create',_0x25a7f2(0x9f),{'currentVersion':_0x26393f[_0x25a7f2(0x8b)],'stableVersion':_0x26393f[_0x25a7f2(0xc0)],'minimumVersion':_0x26393f[_0x25a7f2(0xa0)],'needsUpgrade':_0x26393f[_0x25a7f2(0xbf)],'belowMinimum':_0x26393f[_0x25a7f2(0xad)]}));if(_0x2a4dce[_0x25a7f2(0x9a)]&&_0x2a4dce[_0x25a7f2(0xe2)])await runCreate({'projectName':_0x2a4dce[_0x25a7f2(0x9a)],'appCode':_0x2a4dce[_0x25a7f2(0xe2)],'env':_0x2a4dce['env']},_0x2a4dce);else{if(_0x2a4dce[_0x25a7f2(0x9a)]){const _0x3665aa=await selectSingleAppcode(_0x2a4dce['cookie']);await runCreate({'projectName':_0x2a4dce[_0x25a7f2(0x9a)],'appCode':_0x3665aa||undefined,'env':_0x2a4dce[_0x25a7f2(0x9b)]},_0x2a4dce);}else await guidedCreateProject(_0x58f0d3=>runCreate(_0x58f0d3,_0x2a4dce),_0x2a4dce[_0x25a7f2(0x9b)],_0x2a4dce[_0x25a7f2(0x90)]);}}async function runCreate(_0x38d62e,_0x1be3ac){const _0x1c3b67=a145_0x443c;if(!_0x38d62e[_0x1c3b67(0xd3)]||_0x38d62e[_0x1c3b67(0xd3)]['trim']()==='')throw new Error(_0x1c3b67(0x97));const _0xf41ddc=/[<>:"|?*\x00-\x1f\x7f]/;if(_0xf41ddc[_0x1c3b67(0xca)](_0x38d62e[_0x1c3b67(0xd3)]))throw new Error(_0x1c3b67(0xa4));if(_0x38d62e['projectName']['length']>0x64)throw new Error(_0x1c3b67(0xba));const _0x10e91e=a145_0x255d67['resolve'](process[_0x1c3b67(0x9c)](),_0x38d62e[_0x1c3b67(0xd3)]);if(a145_0x56ec88[_0x1c3b67(0xcf)](_0x10e91e))throw new Error(_0x1c3b67(0xb6)+_0x38d62e['projectName']+_0x1c3b67(0xc4));try{a145_0x56ec88[_0x1c3b67(0xcd)](a145_0x255d67[_0x1c3b67(0xb3)](_0x10e91e),a145_0x56ec88[_0x1c3b67(0xaf)]['W_OK']);}catch{throw new Error(_0x1c3b67(0xc7));}logger['setLogPath'](_0x10e91e),logger['info'](_0x1c3b67(0xc9),_0x1c3b67(0xae)+_0x38d62e[_0x1c3b67(0xd3)],{'projectDir':_0x10e91e,'appCode':_0x38d62e[_0x1c3b67(0xe2)]}),console['log'](),console[_0x1c3b67(0x94)](a145_0x324dac[_0x1c3b67(0xbd)](_0x1c3b67(0xa8))+_0x1c3b67(0xc6)+a145_0x324dac['green'](_0x38d62e[_0x1c3b67(0xd3)])+(_0x38d62e[_0x1c3b67(0xe2)]?_0x1c3b67(0xc2)+a145_0x324dac[_0x1c3b67(0xa6)](_0x38d62e[_0x1c3b67(0xe2)]):''));try{await runTask('Copy\x20project\x20files',()=>copyProjectTemplate(_0x38d62e[_0x1c3b67(0xd3)])),await updatePackageJsonName(_0x38d62e[_0x1c3b67(0xd3)]),await runTask(_0x1c3b67(0xd8),()=>installDependencies(_0x38d62e[_0x1c3b67(0xd3)])),await runTask('Format\x20code',()=>formatProjectCode(_0x38d62e[_0x1c3b67(0xd3)])),await configureAppCode(_0x38d62e[_0x1c3b67(0xd3)],_0x38d62e['appCode']||'',_0x38d62e[_0x1c3b67(0x9b)]);let _0x4b95a8=![];if(_0x38d62e[_0x1c3b67(0xe2)]){console['log'](_0x1c3b67(0x96));const _0x46d2c0=process[_0x1c3b67(0x9c)]();try{process[_0x1c3b67(0x8c)](_0x10e91e);const _0x48e5e4=_0x38d62e[_0x1c3b67(0x9b)]||_0x1c3b67(0xe4);initEnv(_0x48e5e4);const {configArray:_0x14bcd8}=await fetchModelList(_0x38d62e['appCode'],_0x1be3ac[_0x1c3b67(0x90)]||''),_0x174d94=DEFAULT_API_DIR,_0xc3789=await generateApiFile(_0x14bcd8,'',_0x38d62e[_0x1c3b67(0xe2)],!![],_0x48e5e4,_0x174d94);console[_0x1c3b67(0x94)]('√\x20Pulled\x20'+_0x14bcd8[_0x1c3b67(0xb1)]+'\x20dataset(s),\x20generated\x20'+_0xc3789[_0x1c3b67(0xc1)]+_0x1c3b67(0xdb)),logger[_0x1c3b67(0xbe)](_0x1c3b67(0xc9),_0x1c3b67(0xa5)+_0x38d62e[_0x1c3b67(0xe2)]);}catch(_0xc0aece){_0x4b95a8=!![],console[_0x1c3b67(0x94)](_0x1c3b67(0xc3)),logger[_0x1c3b67(0x9e)](_0x1c3b67(0xc9),_0x1c3b67(0xb7),{'error':_0xc0aece instanceof Error?_0xc0aece[_0x1c3b67(0xac)]:String(_0xc0aece)});}finally{process['chdir'](_0x46d2c0);}}logger['success'](_0x1c3b67(0xc9),'项目创建完成:\x20'+_0x38d62e[_0x1c3b67(0xd3)]),console[_0x1c3b67(0x94)](),console['log'](a145_0x324dac['green']('─'[_0x1c3b67(0xa3)](0x3c))),console['log'](a145_0x324dac[_0x1c3b67(0xa6)][_0x1c3b67(0xa1)](_0x1c3b67(0x9d))),console[_0x1c3b67(0x94)](),console[_0x1c3b67(0x94)](_0x1c3b67(0x99)+a145_0x324dac[_0x1c3b67(0xa6)][_0x1c3b67(0xa1)](_0x1c3b67(0xa9)+_0x38d62e[_0x1c3b67(0xd3)]+'\x20&&\x20'+CLI_BIN_NAME+_0x1c3b67(0xda))),_0x4b95a8&&console[_0x1c3b67(0x94)](_0x1c3b67(0xdc)+a145_0x324dac[_0x1c3b67(0xa6)][_0x1c3b67(0xa1)](CLI_BIN_NAME+_0x1c3b67(0xd7))),console[_0x1c3b67(0x94)](a145_0x324dac[_0x1c3b67(0xbd)]('─'[_0x1c3b67(0xa3)](0x3c)));}catch(_0x18cb05){logger['error'](_0x1c3b67(0xc9),_0x1c3b67(0xcb)+_0x38d62e[_0x1c3b67(0xd3)],{'error':_0x18cb05 instanceof Error?_0x18cb05['message']:String(_0x18cb05)});try{a145_0x56ec88[_0x1c3b67(0xcf)](_0x10e91e)&&(console[_0x1c3b67(0x94)]('*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20'+_0x10e91e),a145_0x56ec88[_0x1c3b67(0xe0)](_0x10e91e,{'recursive':!![],'force':!![]}));}catch{logger[_0x1c3b67(0x9e)](_0x1c3b67(0xc9),_0x1c3b67(0x93)+_0x10e91e);}throw _0x18cb05;}}async function runTask(_0x2ec14b,_0x3737a4){const _0x592e99=a145_0x443c,_0x35e306=a145_0x33eafc(_0x2ec14b+_0x592e99(0xab))[_0x592e99(0xc8)]();try{const _0x53d91c=await _0x3737a4();_0x35e306[_0x592e99(0xaa)](),console['log'](''+a145_0x324dac[_0x592e99(0xbd)](_0x592e99(0xa8))+_0x2ec14b+'\x20'+a145_0x324dac['gray']('['+_0x53d91c+']'));}catch(_0x29721e){_0x35e306[_0x592e99(0xb2)](_0x2ec14b);throw _0x29721e;}}async function updatePackageJsonName(_0x3e382b){const _0x3530e8=a145_0x443c,_0x4c4b19=a145_0x255d67[_0x3530e8(0xb4)](process['cwd'](),_0x3e382b),_0x18ac8f=a145_0x255d67[_0x3530e8(0xbc)](_0x4c4b19,_0x3530e8(0xb0));try{console[_0x3530e8(0x94)]('*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields');const _0x494dce=getRabetbaseCliPackageRoot(),_0x5b4d4c=a145_0x255d67['join'](_0x494dce,_0x3530e8(0xb0));let _0x5822f5='1.0.0';try{const _0x5dfaa2=JSON[_0x3530e8(0xdf)](a145_0x56ec88[_0x3530e8(0xd0)](_0x5b4d4c,'utf8'));_0x5822f5=_0x5dfaa2[_0x3530e8(0xb5)]||_0x3530e8(0xd1);}catch{}const _0x391e06=a145_0x56ec88[_0x3530e8(0xd0)](_0x18ac8f,_0x3530e8(0xde)),_0x353510=JSON[_0x3530e8(0xdf)](_0x391e06);_0x353510[_0x3530e8(0x98)]=_0x3e382b,_0x353510[_0x3530e8(0x8a)]=_0x3e382b+_0x3530e8(0x8d)+_0x5822f5,a145_0x56ec88[_0x3530e8(0x92)](_0x18ac8f,JSON[_0x3530e8(0xbb)](_0x353510,null,0x2)+'\x0a',_0x3530e8(0xde)),console['log'](_0x3530e8(0xd2)+_0x3e382b),logger[_0x3530e8(0xbe)](_0x3530e8(0xc9),_0x3530e8(0xe1));}catch(_0xf55e75){logger['error'](_0x3530e8(0xc9),'更新\x20package.json\x20失败');throw _0xf55e75;}}async function configureAppCode(_0x26a3f3,_0x1bf394,_0x47c55e){const _0x991eb3=a145_0x443c,_0x206e2b=a145_0x255d67[_0x991eb3(0xb4)](process[_0x991eb3(0x9c)](),_0x26a3f3),_0x313e15=a145_0x255d67[_0x991eb3(0xbc)](_0x206e2b,NEW_CONFIG_NAME);try{_0x1bf394?console[_0x991eb3(0x94)](_0x991eb3(0xd5)+_0x26a3f3+':\x20'+_0x1bf394):console['log']('*\x20Creating\x20configuration\x20file\x20for\x20project\x20'+_0x26a3f3);const _0x4f3f74=getRabetbaseCliPackageRoot(),_0x445747=a145_0x255d67[_0x991eb3(0xbc)](_0x4f3f74,_0x991eb3(0xb0));let _0x262183=_0x991eb3(0xd1);try{const _0x2f4d17=JSON[_0x991eb3(0xdf)](a145_0x56ec88[_0x991eb3(0xd0)](_0x445747,'utf8'));_0x262183=_0x2f4d17[_0x991eb3(0xb5)]||'1.0.0';}catch{}const _0x242455=readConfig(),_0x249489=typeof _0x242455[_0x991eb3(0x9b)]==='string'?_0x242455[_0x991eb3(0x9b)]:undefined,_0x4ddf02={};for(const _0xd8d3cd of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x242455[_0xd8d3cd]!=null)_0x4ddf02[_0xd8d3cd]=_0x242455[_0xd8d3cd];}const _0x568860=buildCanonicalProjectConfig(_0x4ddf02,{'appCodes':_0x1bf394?[_0x1bf394]:[],'env':_0x47c55e||_0x249489||_0x991eb3(0xe4),'metadata':{'createdAt':new Date()[_0x991eb3(0x8f)](),'version':_0x262183}});writeConfigFile(_0x313e15,_0x568860),_0x1bf394?console[_0x991eb3(0x94)]('√\x20Configuration\x20file\x20created,\x20Apps:\x20'+Object['keys'](_0x568860[_0x991eb3(0xce)]||{})[_0x991eb3(0xbc)](',\x20')+_0x991eb3(0xb8)+_0x568860[_0x991eb3(0xc5)]):console[_0x991eb3(0x94)]('√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27'+CLI_BIN_NAME+_0x991eb3(0x8e)),logger[_0x991eb3(0xbe)](_0x991eb3(0xc9),'配置应用AppCode:\x20'+_0x1bf394);}catch(_0x2dab3f){logger[_0x991eb3(0xdd)](_0x991eb3(0xc9),_0x991eb3(0xa2));}}
1
+ (function(_0x593826,_0x3b7c99){const _0x347cb8=a145_0x1f49,_0x5154d3=_0x593826();while(!![]){try{const _0x397fad=parseInt(_0x347cb8(0xb2))/0x1*(parseInt(_0x347cb8(0x106))/0x2)+parseInt(_0x347cb8(0xe5))/0x3*(parseInt(_0x347cb8(0xcd))/0x4)+-parseInt(_0x347cb8(0xb9))/0x5*(-parseInt(_0x347cb8(0xff))/0x6)+parseInt(_0x347cb8(0xb1))/0x7*(parseInt(_0x347cb8(0xd6))/0x8)+-parseInt(_0x347cb8(0xb4))/0x9+-parseInt(_0x347cb8(0xcb))/0xa+-parseInt(_0x347cb8(0xf1))/0xb;if(_0x397fad===_0x3b7c99)break;else _0x5154d3['push'](_0x5154d3['shift']());}catch(_0x587e0e){_0x5154d3['push'](_0x5154d3['shift']());}}}(a145_0x1b01,0x859bb));import a145_0x39773c from'path';import a145_0x5dd577 from'fs';import a145_0x2b571b from'chalk';import a145_0x598251 from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{readConfig}from'../../../utils/config.js';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';function a145_0x1f49(_0x54933e,_0x2e56b0){_0x54933e=_0x54933e-0xae;const _0x1b0129=a145_0x1b01();let _0x1f49d1=_0x1b0129[_0x54933e];return _0x1f49d1;}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';function a145_0x1b01(){const _0x249c1e=['currentVersion','string','warn','length','repeat','chdir','needsUpgrade','readFileSync','cookie','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','env','cd\x20','Project\x20name:\x20','2594930mgcwoB','配置应用AppCode失败','14576wqcCBK','\x20Generated\x20by\x20rabetbase\x20cli\x20','belowMinimum','\x20api\x20pull','constants','dirname','description','apps','success','416GMHsbG','projectCode','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','更新\x20package.json\x20name','stop','create','stringify','\x20√\x20','Project\x20directory\x20','appCode','join','writeFileSync','existsSync','...','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','282HkiafK','production','更新\x20package.json\x20失败','\x20model(s)','项目创建完成:\x20','keys','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','*\x20Pulling\x20API\x20configuration...','info','API\x20配置拉取异常','log','4242678qcJCwU','bold','W_OK','CLI\x20版本检查','error','rmSync','\x20\x201.\x20Start\x20project:\x20','green','√\x20Pulled\x20','resolve','Project\x20name\x20cannot\x20be\x20empty','API\x20configuration\x20pulled:\x20','test','√\x20Configuration\x20file\x20created,\x20Apps:\x20','582DnsHxQ','开始创建项目:\x20','\x20dataset(s),\x20generated\x20','parse','项目创建失败:\x20','Install\x20dependencies','\x20|\x20Default:\x20','12iUQBGB','start','cyan','projectName','minimumVersion','cwd','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','utf8','配置应用AppCode:\x20','gray','trim','\x20config\x20set\x20appcode\x20<app-code>\x27','83454lacTCm','108139cYISbx','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','7105509XLFeLe','1.0.0','version','Copy\x20project\x20files','\x20&&\x20','19105wAJPhA','*\x20Configuring\x20AppCode\x20for\x20project\x20','清理项目目录失败:\x20','toLocaleString','package.json'];a145_0x1b01=function(){return _0x249c1e;};return a145_0x1b01();}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(_0x5e9d4e){const _0x3e82df=a145_0x1f49,_0x4be6f3=await checkCliVersion();(_0x4be6f3[_0x3e82df(0xc4)]||_0x4be6f3[_0x3e82df(0xcf)])&&(printCliUpgradeWarning(_0x4be6f3),assertCliVersionSupported(_0x4be6f3),logger[_0x3e82df(0xee)]('create',_0x3e82df(0xf4),{'currentVersion':_0x4be6f3[_0x3e82df(0xbe)],'stableVersion':_0x4be6f3['stableVersion'],'minimumVersion':_0x4be6f3[_0x3e82df(0x10a)],'needsUpgrade':_0x4be6f3['needsUpgrade'],'belowMinimum':_0x4be6f3[_0x3e82df(0xcf)]}));if(_0x5e9d4e[_0x3e82df(0xd7)]&&_0x5e9d4e[_0x3e82df(0xdf)])await runCreate({'projectName':_0x5e9d4e[_0x3e82df(0xd7)],'appCode':_0x5e9d4e[_0x3e82df(0xdf)],'env':_0x5e9d4e[_0x3e82df(0xc8)]},_0x5e9d4e);else{if(_0x5e9d4e[_0x3e82df(0xd7)]){const _0x4560df=await selectSingleAppcode(_0x5e9d4e[_0x3e82df(0xc6)]);await runCreate({'projectName':_0x5e9d4e[_0x3e82df(0xd7)],'appCode':_0x4560df||undefined,'env':_0x5e9d4e[_0x3e82df(0xc8)]},_0x5e9d4e);}else await guidedCreateProject(_0x43276d=>runCreate(_0x43276d,_0x5e9d4e),_0x5e9d4e[_0x3e82df(0xc8)],_0x5e9d4e[_0x3e82df(0xc6)]);}}async function runCreate(_0x42dd73,_0x221c50){const _0x4d24b6=a145_0x1f49;if(!_0x42dd73[_0x4d24b6(0x109)]||_0x42dd73[_0x4d24b6(0x109)][_0x4d24b6(0xaf)]()==='')throw new Error(_0x4d24b6(0xfb));const _0x60d0b4=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x60d0b4[_0x4d24b6(0xfd)](_0x42dd73[_0x4d24b6(0x109)]))throw new Error(_0x4d24b6(0xb3));if(_0x42dd73['projectName'][_0x4d24b6(0xc1)]>0x64)throw new Error(_0x4d24b6(0xeb));const _0x51ccbb=a145_0x39773c[_0x4d24b6(0xfa)](process[_0x4d24b6(0x10b)](),_0x42dd73['projectName']);if(a145_0x5dd577[_0x4d24b6(0xe2)](_0x51ccbb))throw new Error(_0x4d24b6(0xde)+_0x42dd73[_0x4d24b6(0x109)]+'\x20already\x20exists');try{a145_0x5dd577['accessSync'](a145_0x39773c[_0x4d24b6(0xd2)](_0x51ccbb),a145_0x5dd577[_0x4d24b6(0xd1)][_0x4d24b6(0xf3)]);}catch{throw new Error(_0x4d24b6(0xc7));}logger['setLogPath'](_0x51ccbb),logger[_0x4d24b6(0xee)]('create',_0x4d24b6(0x100)+_0x42dd73[_0x4d24b6(0x109)],{'projectDir':_0x51ccbb,'appCode':_0x42dd73[_0x4d24b6(0xdf)]}),console[_0x4d24b6(0xf0)](),console['log'](a145_0x2b571b['green'](_0x4d24b6(0xdd))+_0x4d24b6(0xca)+a145_0x2b571b['green'](_0x42dd73[_0x4d24b6(0x109)])+(_0x42dd73['appCode']?'\x20|\x20AppCode:\x20'+a145_0x2b571b['cyan'](_0x42dd73[_0x4d24b6(0xdf)]):''));try{await runTask(_0x4d24b6(0xb7),()=>copyProjectTemplate(_0x42dd73[_0x4d24b6(0x109)])),await updatePackageJsonName(_0x42dd73['projectName']),await runTask(_0x4d24b6(0x104),()=>installDependencies(_0x42dd73[_0x4d24b6(0x109)])),await runTask('Format\x20code',()=>formatProjectCode(_0x42dd73[_0x4d24b6(0x109)])),await configureAppCode(_0x42dd73[_0x4d24b6(0x109)],_0x42dd73[_0x4d24b6(0xdf)]||'',_0x42dd73[_0x4d24b6(0xc8)]);let _0x2ec6fe=![];if(_0x42dd73[_0x4d24b6(0xdf)]){console[_0x4d24b6(0xf0)](_0x4d24b6(0xed));const _0x4b6d6d=process[_0x4d24b6(0x10b)]();try{process['chdir'](_0x51ccbb);const _0x2602e4=_0x42dd73['env']||_0x4d24b6(0xe6);initEnv(_0x2602e4);const {configArray:_0x2c198c}=await fetchModelList(_0x42dd73[_0x4d24b6(0xdf)],_0x221c50[_0x4d24b6(0xc6)]||''),_0x80dd71=DEFAULT_API_DIR,_0x1604c4=await generateApiFile(_0x2c198c,'',_0x42dd73['appCode'],!![],_0x2602e4,_0x80dd71);console[_0x4d24b6(0xf0)](_0x4d24b6(0xf9)+_0x2c198c[_0x4d24b6(0xc1)]+_0x4d24b6(0x101)+_0x1604c4['modelCount']+_0x4d24b6(0xe8)),logger['info']('create',_0x4d24b6(0xfc)+_0x42dd73[_0x4d24b6(0xdf)]);}catch(_0x5b4bcb){_0x2ec6fe=!![],console[_0x4d24b6(0xf0)](_0x4d24b6(0xe4)),logger[_0x4d24b6(0xc0)]('create',_0x4d24b6(0xef),{'error':_0x5b4bcb instanceof Error?_0x5b4bcb['message']:String(_0x5b4bcb)});}finally{process[_0x4d24b6(0xc3)](_0x4b6d6d);}}logger[_0x4d24b6(0xd5)]('create',_0x4d24b6(0xe9)+_0x42dd73[_0x4d24b6(0x109)]),console[_0x4d24b6(0xf0)](),console[_0x4d24b6(0xf0)](a145_0x2b571b[_0x4d24b6(0xf8)]('─'[_0x4d24b6(0xc2)](0x3c))),console[_0x4d24b6(0xf0)](a145_0x2b571b[_0x4d24b6(0x108)][_0x4d24b6(0xf2)]('🚀\x20Next\x20Steps:')),console[_0x4d24b6(0xf0)](),console[_0x4d24b6(0xf0)](_0x4d24b6(0xf7)+a145_0x2b571b['cyan'][_0x4d24b6(0xf2)](_0x4d24b6(0xc9)+_0x42dd73['projectName']+_0x4d24b6(0xb8)+CLI_BIN_NAME+'\x20run\x20start')),_0x2ec6fe&&console['log']('\x20\x202.\x20Pull\x20API\x20configuration:\x20'+a145_0x2b571b[_0x4d24b6(0x108)][_0x4d24b6(0xf2)](CLI_BIN_NAME+_0x4d24b6(0xd0))),console[_0x4d24b6(0xf0)](a145_0x2b571b[_0x4d24b6(0xf8)]('─'[_0x4d24b6(0xc2)](0x3c)));}catch(_0xfb5f77){logger[_0x4d24b6(0xf5)](_0x4d24b6(0xdb),_0x4d24b6(0x103)+_0x42dd73['projectName'],{'error':_0xfb5f77 instanceof Error?_0xfb5f77['message']:String(_0xfb5f77)});try{a145_0x5dd577['existsSync'](_0x51ccbb)&&(console['log'](_0x4d24b6(0x10c)+_0x51ccbb),a145_0x5dd577[_0x4d24b6(0xf6)](_0x51ccbb,{'recursive':!![],'force':!![]}));}catch{logger[_0x4d24b6(0xc0)]('create',_0x4d24b6(0xbb)+_0x51ccbb);}throw _0xfb5f77;}}async function runTask(_0xb01a1c,_0x4202a3){const _0x5b261b=a145_0x1f49,_0x349b26=a145_0x598251(_0xb01a1c+_0x5b261b(0xe3))[_0x5b261b(0x107)]();try{const _0x4f2918=await _0x4202a3();_0x349b26[_0x5b261b(0xda)](),console[_0x5b261b(0xf0)](''+a145_0x2b571b['green'](_0x5b261b(0xdd))+_0xb01a1c+'\x20'+a145_0x2b571b[_0x5b261b(0xae)]('['+_0x4f2918+']'));}catch(_0x42c590){_0x349b26['fail'](_0xb01a1c);throw _0x42c590;}}async function updatePackageJsonName(_0x29cf6d){const _0x2af0a5=a145_0x1f49,_0x339cf9=a145_0x39773c['resolve'](process[_0x2af0a5(0x10b)](),_0x29cf6d),_0x3e307a=a145_0x39773c[_0x2af0a5(0xe0)](_0x339cf9,'package.json');try{console[_0x2af0a5(0xf0)](_0x2af0a5(0xec));const _0x40cb67=getRabetbaseCliPackageRoot(),_0x20f1ec=a145_0x39773c['join'](_0x40cb67,_0x2af0a5(0xbd));let _0x58aced='1.0.0';try{const _0x2f48a3=JSON['parse'](a145_0x5dd577[_0x2af0a5(0xc5)](_0x20f1ec,_0x2af0a5(0x10d)));_0x58aced=_0x2f48a3[_0x2af0a5(0xb6)]||'1.0.0';}catch{}const _0x55987d=a145_0x5dd577[_0x2af0a5(0xc5)](_0x3e307a,_0x2af0a5(0x10d)),_0xe62ceb=JSON['parse'](_0x55987d);_0xe62ceb['name']=_0x29cf6d,_0xe62ceb[_0x2af0a5(0xd3)]=_0x29cf6d+_0x2af0a5(0xce)+_0x58aced,a145_0x5dd577[_0x2af0a5(0xe1)](_0x3e307a,JSON[_0x2af0a5(0xdc)](_0xe62ceb,null,0x2)+'\x0a',_0x2af0a5(0x10d)),console[_0x2af0a5(0xf0)]('√\x20package.json\x20updated:\x20name='+_0x29cf6d),logger[_0x2af0a5(0xee)]('create',_0x2af0a5(0xd9));}catch(_0x22b3e0){logger[_0x2af0a5(0xf5)](_0x2af0a5(0xdb),_0x2af0a5(0xe7));throw _0x22b3e0;}}async function configureAppCode(_0x32f354,_0x53c8b8,_0x358fe9){const _0x13de56=a145_0x1f49,_0x102f28=a145_0x39773c[_0x13de56(0xfa)](process[_0x13de56(0x10b)](),_0x32f354),_0xf5799c=a145_0x39773c[_0x13de56(0xe0)](_0x102f28,NEW_CONFIG_NAME);try{_0x53c8b8?console[_0x13de56(0xf0)](_0x13de56(0xba)+_0x32f354+':\x20'+_0x53c8b8):console[_0x13de56(0xf0)]('*\x20Creating\x20configuration\x20file\x20for\x20project\x20'+_0x32f354);const _0x200877=getRabetbaseCliPackageRoot(),_0x373a17=a145_0x39773c[_0x13de56(0xe0)](_0x200877,_0x13de56(0xbd));let _0x38041d=_0x13de56(0xb5);try{const _0x699e9e=JSON[_0x13de56(0x102)](a145_0x5dd577[_0x13de56(0xc5)](_0x373a17,_0x13de56(0x10d)));_0x38041d=_0x699e9e[_0x13de56(0xb6)]||_0x13de56(0xb5);}catch{}const _0xbdfc44=readConfig(),_0x5547d4=typeof _0xbdfc44[_0x13de56(0xc8)]===_0x13de56(0xbf)?_0xbdfc44[_0x13de56(0xc8)]:undefined,_0x293e71={};for(const _0x3f6be9 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0xbdfc44[_0x3f6be9]!=null)_0x293e71[_0x3f6be9]=_0xbdfc44[_0x3f6be9];}const _0x5dc776=buildCanonicalProjectConfig(_0x293e71,{'appCodes':_0x53c8b8?[_0x53c8b8]:[],'env':_0x358fe9||_0x5547d4||_0x13de56(0xe6),'metadata':{'createdAt':new Date()[_0x13de56(0xbc)](),'version':_0x38041d}});writeConfigFile(_0xf5799c,_0x5dc776),_0x53c8b8?console['log'](_0x13de56(0xfe)+Object[_0x13de56(0xea)](_0x5dc776[_0x13de56(0xd4)]||{})[_0x13de56(0xe0)](',\x20')+_0x13de56(0x105)+_0x5dc776['defaultApp']):console['log'](_0x13de56(0xd8)+CLI_BIN_NAME+_0x13de56(0xb0)),logger[_0x13de56(0xee)](_0x13de56(0xdb),_0x13de56(0x10e)+_0x53c8b8);}catch(_0x43eb40){logger[_0x13de56(0xf5)](_0x13de56(0xdb),_0x13de56(0xcc));}}