@lovrabet/rabetbase-cli 2.3.9-beta.3 → 2.3.10-beta.1

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 (258) 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/delete.js +1 -1
  103. package/lib/commands/menu/group-create.js +1 -1
  104. package/lib/commands/menu/group-update.js +1 -1
  105. package/lib/commands/menu/index.js +1 -1
  106. package/lib/commands/menu/list.js +1 -1
  107. package/lib/commands/menu/regroup-start.js +1 -1
  108. package/lib/commands/menu/shared/compare-table.js +1 -1
  109. package/lib/commands/menu/shared/delete-plan.js +1 -1
  110. package/lib/commands/menu/shared/facts.js +1 -1
  111. package/lib/commands/menu/shared/index.js +1 -1
  112. package/lib/commands/menu/shared/inquirer.js +1 -1
  113. package/lib/commands/menu/shared/local-pages.js +1 -1
  114. package/lib/commands/menu/shared/logic.js +1 -1
  115. package/lib/commands/menu/shared/mutations.js +1 -1
  116. package/lib/commands/menu/shared/service.js +1 -1
  117. package/lib/commands/menu/shared/sync-core.js +1 -1
  118. package/lib/commands/menu/shared/update-core.js +1 -1
  119. package/lib/commands/menu/shared/valid-url.js +1 -1
  120. package/lib/commands/menu/sync.js +1 -1
  121. package/lib/commands/menu/update.js +1 -1
  122. package/lib/commands/notification/config-list.js +1 -1
  123. package/lib/commands/notification/index.js +1 -1
  124. package/lib/commands/page/generate-start.js +1 -1
  125. package/lib/commands/page/generate-status.js +1 -1
  126. package/lib/commands/page/index.js +1 -1
  127. package/lib/commands/page/pull.js +1 -1
  128. package/lib/commands/page/push.js +1 -1
  129. package/lib/commands/page/relation-audit.js +1 -1
  130. package/lib/commands/page/shared.js +1 -1
  131. package/lib/commands/page/standard-page-status.js +1 -1
  132. package/lib/commands/page/sync.js +1 -1
  133. package/lib/commands/permit/index.js +1 -1
  134. package/lib/commands/permit/page-get.js +1 -1
  135. package/lib/commands/permit/page-set.js +1 -1
  136. package/lib/commands/permit/role-apis-set.js +1 -1
  137. package/lib/commands/permit/role-menus-set.js +1 -1
  138. package/lib/commands/permit/role-menus.js +1 -1
  139. package/lib/commands/permit/shared.js +1 -1
  140. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  141. package/lib/commands/project/create/format-elapsed.js +1 -1
  142. package/lib/commands/project/create/main.js +1 -1
  143. package/lib/commands/project/create/non-interactive.js +1 -1
  144. package/lib/commands/project/create/project-template-path.js +1 -1
  145. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  146. package/lib/commands/project/create/use-format-code.js +1 -1
  147. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  148. package/lib/commands/project/index.js +1 -1
  149. package/lib/commands/project/init.js +1 -1
  150. package/lib/commands/project/upgrade.js +1 -1
  151. package/lib/commands/registry.js +1 -1
  152. package/lib/commands/role/create.js +1 -1
  153. package/lib/commands/role/delete.js +1 -1
  154. package/lib/commands/role/detail.js +1 -1
  155. package/lib/commands/role/index.js +1 -1
  156. package/lib/commands/role/list.js +1 -1
  157. package/lib/commands/role/shared.js +1 -1
  158. package/lib/commands/role/update.js +1 -1
  159. package/lib/commands/role/user-add.js +1 -1
  160. package/lib/commands/role/user-remove.js +1 -1
  161. package/lib/commands/role/user-resolve.js +1 -1
  162. package/lib/commands/run/index.js +1 -1
  163. package/lib/commands/schema.js +1 -1
  164. package/lib/commands/sql/create.js +1 -1
  165. package/lib/commands/sql/delete.js +1 -1
  166. package/lib/commands/sql/detail.js +1 -1
  167. package/lib/commands/sql/exec.js +1 -1
  168. package/lib/commands/sql/index.js +1 -1
  169. package/lib/commands/sql/list.js +1 -1
  170. package/lib/commands/sql/pull.js +1 -1
  171. package/lib/commands/sql/push.js +1 -1
  172. package/lib/commands/sql/save.js +1 -1
  173. package/lib/commands/sql/shared.js +1 -1
  174. package/lib/commands/sql/status.js +1 -1
  175. package/lib/commands/sql/validate.js +1 -1
  176. package/lib/commands/task/index.js +1 -1
  177. package/lib/commands/task/status.js +1 -1
  178. package/lib/commands/workspace/add.js +1 -1
  179. package/lib/commands/workspace/index.js +1 -1
  180. package/lib/commands/workspace/remove.js +1 -1
  181. package/lib/config/schema.js +1 -1
  182. package/lib/constant/cdn.js +1 -1
  183. package/lib/constant/cli.js +1 -1
  184. package/lib/constant/defaults.js +1 -1
  185. package/lib/constant/domain.js +1 -1
  186. package/lib/constant/env.js +1 -1
  187. package/lib/constant/output.js +1 -1
  188. package/lib/constant/paths.js +1 -1
  189. package/lib/constant/risk.js +1 -1
  190. package/lib/context/app-resolver.js +1 -1
  191. package/lib/context/auth-resolver.js +1 -1
  192. package/lib/context/config-loader.js +1 -1
  193. package/lib/context.js +1 -1
  194. package/lib/core/alias-resolver.js +1 -1
  195. package/lib/core/api-client.js +1 -1
  196. package/lib/core/bff/config.js +1 -1
  197. package/lib/core/bff/file-system.js +1 -1
  198. package/lib/core/bff/hash.js +1 -1
  199. package/lib/core/bff/lock.js +1 -1
  200. package/lib/core/bff/utils.js +1 -1
  201. package/lib/core/db-resolver.js +1 -1
  202. package/lib/core/page/file-system.js +1 -1
  203. package/lib/core/page/hash.js +1 -1
  204. package/lib/core/page/lock.js +1 -1
  205. package/lib/core/sql-index-auditor.js +1 -1
  206. package/lib/core/sql-sync/config.js +1 -1
  207. package/lib/core/sql-sync/file-system.js +1 -1
  208. package/lib/core/sql-sync/hash.js +1 -1
  209. package/lib/core/sql-sync/lock.js +1 -1
  210. package/lib/core/sql-sync/utils.js +1 -1
  211. package/lib/core/sql-validator.js +1 -1
  212. package/lib/errors.js +1 -1
  213. package/lib/framework/build-all-flags.js +1 -1
  214. package/lib/framework/error-output.js +1 -1
  215. package/lib/framework/explicit-yes.js +1 -1
  216. package/lib/framework/flags.js +1 -1
  217. package/lib/framework/help.js +1 -1
  218. package/lib/framework/index.js +1 -1
  219. package/lib/framework/output.js +1 -1
  220. package/lib/framework/response.js +1 -1
  221. package/lib/framework/runner-alias.js +1 -1
  222. package/lib/framework/runner.js +1 -1
  223. package/lib/framework/schema-export.js +1 -1
  224. package/lib/framework/types.js +1 -1
  225. package/lib/generated/build-info.js +1 -1
  226. package/lib/help.js +1 -1
  227. package/lib/skills/main.js +1 -1
  228. package/lib/skills/npx-skills-add.js +1 -1
  229. package/lib/telemetry/cli-command-trace.js +1 -1
  230. package/lib/telemetry/cli-help-trace.js +1 -1
  231. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  232. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  233. package/lib/telemetry/send-cli-trace-log.js +1 -1
  234. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  235. package/lib/utils/ai_config.js +1 -1
  236. package/lib/utils/apply-jq-filter.js +1 -1
  237. package/lib/utils/cdn-config.js +1 -1
  238. package/lib/utils/check-sdk-version.js +1 -1
  239. package/lib/utils/cli-version-check.js +1 -1
  240. package/lib/utils/cli-version-policy.js +1 -1
  241. package/lib/utils/config.js +1 -1
  242. package/lib/utils/copy-directory.js +1 -1
  243. package/lib/utils/entity-with-id.js +1 -1
  244. package/lib/utils/file-utils.js +1 -1
  245. package/lib/utils/guides-cdn.js +1 -1
  246. package/lib/utils/http-client.js +1 -1
  247. package/lib/utils/is-non-interactive.js +1 -1
  248. package/lib/utils/logger.js +1 -1
  249. package/lib/utils/params.js +1 -1
  250. package/lib/utils/platform.js +1 -1
  251. package/lib/utils/rules-cdn.js +1 -1
  252. package/lib/utils/sleep.js +1 -1
  253. package/lib/utils/template-replacer.js +1 -1
  254. package/lib/utils/update-notice.js +1 -1
  255. package/lib/utils/version.js +1 -1
  256. package/lib/utils/with-active-cookie.js +1 -1
  257. package/lib/utils/write-cli-side-channel.js +1 -1
  258. package/package.json +1 -1
@@ -1 +1 @@
1
- function a116_0x50d8(){const _0x2a9f95=['755PIhtxz','split','538839xtTUii','cssUrl','isArray','CSS\x20URL\x20is\x20unreachable:\x20','9045704lgOfHI','startsWith','readableEnded','10xuBMJq','menu-sync','Start\x20non-interactive\x20menu\x20sync','stdin','path','11fuHbRu','22146yjLPme','has','611531zRNcCu','toString','message','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','cwd','setLogPath','join','utf8','12CyCrHR','trim','JS\x20URL\x20is\x20unreachable:\x20','filter','12357708aNROqn','jsUrl','end','push','--params.','concat','info','343EdhGaM','3988eLhAXd','\x0a\x20\x20Available\x20local\x20pages:\x20','length','map','field','47283QTtjYk','string'];a116_0x50d8=function(){return _0x2a9f95;};return a116_0x50d8();}(function(_0x452372,_0x2cc313){const _0x23b15c=a116_0x4922,_0x4e59d3=_0x452372();while(!![]){try{const _0x1efd31=parseInt(_0x23b15c(0xcd))/0x1+parseInt(_0x23b15c(0xd5))/0x2*(-parseInt(_0x23b15c(0xba))/0x3)+parseInt(_0x23b15c(0xb5))/0x4*(parseInt(_0x23b15c(0xbc))/0x5)+parseInt(_0x23b15c(0xcb))/0x6*(-parseInt(_0x23b15c(0xb4))/0x7)+parseInt(_0x23b15c(0xc2))/0x8+-parseInt(_0x23b15c(0xbe))/0x9*(-parseInt(_0x23b15c(0xc5))/0xa)+-parseInt(_0x23b15c(0xca))/0xb*(parseInt(_0x23b15c(0xd9))/0xc);if(_0x1efd31===_0x2cc313)break;else _0x4e59d3['push'](_0x4e59d3['shift']());}catch(_0x575517){_0x4e59d3['push'](_0x4e59d3['shift']());}}}(a116_0x50d8,0x9e104));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';function a116_0x4922(_0x4b175f,_0x2ceda8){_0x4b175f=_0x4b175f-0xb1;const _0x50d8c2=a116_0x50d8();let _0x492244=_0x50d8c2[_0x4b175f];return _0x492244;}import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x435427){const _0x713ed7=a116_0x4922,_0x52e587=[];return _0x435427[_0x713ed7(0xda)]&&!isValidJsHttpsUrl(_0x435427['jsUrl'])&&_0x52e587[_0x713ed7(0xdc)]({'field':_0x713ed7(0xda),'message':_0x713ed7(0xd0)}),_0x435427['cssUrl']&&!isValidCssHttpsUrl(_0x435427[_0x713ed7(0xbf)])&&_0x52e587[_0x713ed7(0xdc)]({'field':'cssUrl','message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x52e587;}export async function runMenuSyncCore(_0x50eeca,_0x2e947b,_0x5a9278=[],_0x21c8ad){const _0x58d4b2=a116_0x4922,_0xe890df=parseParamsFlag(_0x21c8ad),_0x49fd18=_0x5a9278[_0x58d4b2(0xb7)]>0x0?_0x5a9278:_0xe890df['selectedLabels'],_0x2db7de=_0xe890df[_0x58d4b2(0xda)],_0x1f4c4e=_0xe890df[_0x58d4b2(0xbf)],_0x2f5c42=[];if(_0x2db7de)_0x2f5c42[_0x58d4b2(0xdc)](_0x2db7de);if(_0x1f4c4e)_0x2f5c42['push'](_0x1f4c4e);const _0x154480=validateParams(_0xe890df);if(_0x154480[_0x58d4b2(0xb7)]>0x0){const _0x3494f7=_0x154480[_0x58d4b2(0xb8)](_0x406e16=>_0x58d4b2(0xb1)+_0x406e16[_0x58d4b2(0xb9)]+':\x20'+_0x406e16[_0x58d4b2(0xcf)])[_0x58d4b2(0xd3)](';\x20');throw new Error('Invalid\x20--params:\x20'+_0x3494f7);}logger[_0x58d4b2(0xd2)](process[_0x58d4b2(0xd1)]()),logger['info'](_0x58d4b2(0xc6),_0x58d4b2(0xc7),{'appCode':_0x50eeca,'selectedCount':_0x49fd18?.[_0x58d4b2(0xb7)],'jsUrl':_0x2db7de,'cssUrl':_0x1f4c4e});if(_0x2db7de){const _0xb1c70a=await isUrlReachable(_0x2db7de);if(!_0xb1c70a)throw new Error(_0x58d4b2(0xd7)+_0x2db7de);}if(_0x1f4c4e){const _0x5432e2=await isUrlReachable(_0x1f4c4e);if(!_0x5432e2)throw new Error(_0x58d4b2(0xc1)+_0x1f4c4e);}const _0x4ab59b=getLocalPages();if(_0x4ab59b[_0x58d4b2(0xb7)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0xd3e143=await getOnlineMenuList(_0x50eeca,_0x2e947b),_0x116a1f=new Set(_0xd3e143[_0x58d4b2(0xb8)](_0x31d121=>_0x31d121['path']));let _0x6fd8a9;if(_0x49fd18&&_0x49fd18['length']>0x0){const _0x23080a=new Set(_0x49fd18[_0x58d4b2(0xb8)](_0xd5c845=>_0xd5c845[_0x58d4b2(0xd6)]()));_0x6fd8a9=_0x4ab59b['filter'](_0x13c233=>_0x23080a['has'](_0x13c233['label']));if(_0x6fd8a9[_0x58d4b2(0xb7)]===0x0){const _0x5dbc29=_0x4ab59b[_0x58d4b2(0xb8)](_0x1751ef=>_0x1751ef['label'])[_0x58d4b2(0xd3)](',\x20');throw new Error('No\x20local\x20pages\x20matched\x20labels:\x20'+[..._0x23080a][_0x58d4b2(0xd3)](',\x20')+_0x58d4b2(0xb6)+_0x5dbc29);}}else _0x6fd8a9=_0x4ab59b[_0x58d4b2(0xd8)](_0x3b6c0a=>!_0x116a1f[_0x58d4b2(0xcc)](_0x3b6c0a[_0x58d4b2(0xc9)]));if(_0x6fd8a9[_0x58d4b2(0xb7)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x54d3a2=await createMenus(_0x50eeca,_0x2e947b,_0x6fd8a9,_0x2f5c42[_0x58d4b2(0xb7)]>0x0?_0x2f5c42:undefined);return logger[_0x58d4b2(0xb3)](_0x58d4b2(0xc6),'Menu\x20sync\x20completed',{'count':_0x6fd8a9[_0x58d4b2(0xb7)],'resources':_0x2f5c42}),{'created':_0x54d3a2[_0x58d4b2(0xb7)],'skipped':![],'targetPages':_0x6fd8a9,'menus':_0x54d3a2};}export async function readPageLabelsFromStdin(){const _0x10f977=a116_0x4922;if(!process[_0x10f977(0xc8)]['isTTY']&&!process[_0x10f977(0xc8)][_0x10f977(0xc4)])return new Promise(_0x1f1d2b=>{const _0x1d3693=_0x10f977,_0x4c2c7d=[];process[_0x1d3693(0xc8)]['on']('data',_0x51e2a8=>_0x4c2c7d[_0x1d3693(0xdc)](_0x51e2a8)),process[_0x1d3693(0xc8)]['on'](_0x1d3693(0xdb),()=>{const _0x3d20ce=_0x1d3693,_0x3c7778=Buffer[_0x3d20ce(0xb2)](_0x4c2c7d)[_0x3d20ce(0xce)](_0x3d20ce(0xd4)),_0x1bda66=_0x3c7778[_0x3d20ce(0xbd)]('\x0a')[_0x3d20ce(0xb8)](_0x4dad7b=>_0x4dad7b['trim']())['filter'](_0x30c09b=>_0x30c09b['length']>0x0&&!_0x30c09b[_0x3d20ce(0xc3)]('#'));_0x1f1d2b(_0x1bda66);}),setTimeout(()=>_0x1f1d2b([]),0x1f4);});return[];}function parseParamsFlag(_0x1730f5){const _0x3d4821=a116_0x4922;if(!_0x1730f5||typeof _0x1730f5!=='string')return{};try{const _0x20b46f=JSON['parse'](_0x1730f5);if(typeof _0x20b46f!=='object'||_0x20b46f===null||Array[_0x3d4821(0xc0)](_0x20b46f))return{};return{'selectedLabels':Array['isArray'](_0x20b46f['pages'])?_0x20b46f['pages'][_0x3d4821(0xb8)](String):undefined,'jsUrl':typeof _0x20b46f['jsUrl']===_0x3d4821(0xbb)?_0x20b46f[_0x3d4821(0xda)]['trim']():undefined,'cssUrl':typeof _0x20b46f[_0x3d4821(0xbf)]===_0x3d4821(0xbb)?_0x20b46f['cssUrl'][_0x3d4821(0xd6)]():undefined};}catch{return{};}}
1
+ (function(_0x3221f3,_0x46915e){const _0x518846=a116_0x391e,_0xedbd19=_0x3221f3();while(!![]){try{const _0x362a51=-parseInt(_0x518846(0xd7))/0x1*(-parseInt(_0x518846(0xdc))/0x2)+-parseInt(_0x518846(0xea))/0x3+-parseInt(_0x518846(0xcd))/0x4+-parseInt(_0x518846(0xdf))/0x5+-parseInt(_0x518846(0xe9))/0x6+-parseInt(_0x518846(0xc4))/0x7+parseInt(_0x518846(0xd8))/0x8*(parseInt(_0x518846(0xe0))/0x9);if(_0x362a51===_0x46915e)break;else _0xedbd19['push'](_0xedbd19['shift']());}catch(_0x1289cb){_0xedbd19['push'](_0xedbd19['shift']());}}}(a116_0x13a6,0xcbcd5));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';function a116_0x13a6(){const _0x193d34=['map','1016156VJDIDg','--params.','push','4576645FQyhRn','436203REzZrm','label','isTTY','has','field','cssUrl','trim','startsWith','join','8450814PLeohT','1723683SCBFxj','split','parse','641886pCSbcD','object','cwd','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','isArray','utf8','pages','data','JS\x20URL\x20is\x20unreachable:\x20','5150452cNBYHL','stdin','path','Start\x20non-interactive\x20menu\x20sync','filter','message','selectedLabels','string','jsUrl','concat','1TiDYnq','760ctjzYm','menu-sync','length'];a116_0x13a6=function(){return _0x193d34;};return a116_0x13a6();}import{logger}from'../../../utils/logger.js';function a116_0x391e(_0x525b12,_0x218dc5){_0x525b12=_0x525b12-0xc4;const _0x13a6dd=a116_0x13a6();let _0x391e55=_0x13a6dd[_0x525b12];return _0x391e55;}function validateParams(_0x420d0d){const _0x1c2358=a116_0x391e,_0x1fa3f2=[];return _0x420d0d[_0x1c2358(0xd5)]&&!isValidJsHttpsUrl(_0x420d0d[_0x1c2358(0xd5)])&&_0x1fa3f2['push']({'field':'jsUrl','message':_0x1c2358(0xc7)}),_0x420d0d[_0x1c2358(0xe5)]&&!isValidCssHttpsUrl(_0x420d0d[_0x1c2358(0xe5)])&&_0x1fa3f2[_0x1c2358(0xde)]({'field':'cssUrl','message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x1fa3f2;}export async function runMenuSyncCore(_0xee6527,_0xe07f31,_0x3e4e46=[],_0x39d9be){const _0x3f39d9=a116_0x391e,_0x18068a=parseParamsFlag(_0x39d9be),_0x2c8ea7=_0x3e4e46[_0x3f39d9(0xda)]>0x0?_0x3e4e46:_0x18068a[_0x3f39d9(0xd3)],_0x5f0b71=_0x18068a['jsUrl'],_0x16f3e3=_0x18068a[_0x3f39d9(0xe5)],_0x5a9640=[];if(_0x5f0b71)_0x5a9640[_0x3f39d9(0xde)](_0x5f0b71);if(_0x16f3e3)_0x5a9640[_0x3f39d9(0xde)](_0x16f3e3);const _0x752792=validateParams(_0x18068a);if(_0x752792[_0x3f39d9(0xda)]>0x0){const _0x58632a=_0x752792['map'](_0x5c8972=>_0x3f39d9(0xdd)+_0x5c8972[_0x3f39d9(0xe4)]+':\x20'+_0x5c8972[_0x3f39d9(0xd2)])['join'](';\x20');throw new Error('Invalid\x20--params:\x20'+_0x58632a);}logger['setLogPath'](process[_0x3f39d9(0xc6)]()),logger['info'](_0x3f39d9(0xd9),_0x3f39d9(0xd0),{'appCode':_0xee6527,'selectedCount':_0x2c8ea7?.['length'],'jsUrl':_0x5f0b71,'cssUrl':_0x16f3e3});if(_0x5f0b71){const _0x385b41=await isUrlReachable(_0x5f0b71);if(!_0x385b41)throw new Error(_0x3f39d9(0xcc)+_0x5f0b71);}if(_0x16f3e3){const _0x1e29bf=await isUrlReachable(_0x16f3e3);if(!_0x1e29bf)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x16f3e3);}const _0x23d19c=getLocalPages();if(_0x23d19c[_0x3f39d9(0xda)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x3024ed=await getOnlineMenuList(_0xee6527,_0xe07f31),_0x14f069=new Set(_0x3024ed[_0x3f39d9(0xdb)](_0x54a4b7=>_0x54a4b7['path']));let _0x57d811;if(_0x2c8ea7&&_0x2c8ea7[_0x3f39d9(0xda)]>0x0){const _0x28bb8e=new Set(_0x2c8ea7['map'](_0x2fc297=>_0x2fc297['trim']()));_0x57d811=_0x23d19c[_0x3f39d9(0xd1)](_0x1c21bc=>_0x28bb8e[_0x3f39d9(0xe3)](_0x1c21bc[_0x3f39d9(0xe1)]));if(_0x57d811['length']===0x0){const _0x38620d=_0x23d19c[_0x3f39d9(0xdb)](_0x214d3a=>_0x214d3a[_0x3f39d9(0xe1)])[_0x3f39d9(0xe8)](',\x20');throw new Error('No\x20local\x20pages\x20matched\x20labels:\x20'+[..._0x28bb8e][_0x3f39d9(0xe8)](',\x20')+'\x0a\x20\x20Available\x20local\x20pages:\x20'+_0x38620d);}}else _0x57d811=_0x23d19c[_0x3f39d9(0xd1)](_0x4cb498=>!_0x14f069['has'](_0x4cb498[_0x3f39d9(0xcf)]));if(_0x57d811[_0x3f39d9(0xda)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x1976d8=await createMenus(_0xee6527,_0xe07f31,_0x57d811,_0x5a9640[_0x3f39d9(0xda)]>0x0?_0x5a9640:undefined);return logger['info']('menu-sync','Menu\x20sync\x20completed',{'count':_0x57d811['length'],'resources':_0x5a9640}),{'created':_0x1976d8['length'],'skipped':![],'targetPages':_0x57d811,'menus':_0x1976d8};}export async function readPageLabelsFromStdin(){const _0x15ac7c=a116_0x391e;if(!process[_0x15ac7c(0xce)][_0x15ac7c(0xe2)]&&!process[_0x15ac7c(0xce)]['readableEnded'])return new Promise(_0x35b277=>{const _0x4cb428=_0x15ac7c,_0x582593=[];process[_0x4cb428(0xce)]['on'](_0x4cb428(0xcb),_0x41949=>_0x582593[_0x4cb428(0xde)](_0x41949)),process[_0x4cb428(0xce)]['on']('end',()=>{const _0x3961df=_0x4cb428,_0x1d19e0=Buffer[_0x3961df(0xd6)](_0x582593)['toString'](_0x3961df(0xc9)),_0x22891c=_0x1d19e0[_0x3961df(0xeb)]('\x0a')[_0x3961df(0xdb)](_0x56f0b6=>_0x56f0b6[_0x3961df(0xe6)]())[_0x3961df(0xd1)](_0x2a5a36=>_0x2a5a36['length']>0x0&&!_0x2a5a36[_0x3961df(0xe7)]('#'));_0x35b277(_0x22891c);}),setTimeout(()=>_0x35b277([]),0x1f4);});return[];}function parseParamsFlag(_0x544dba){const _0x40fd17=a116_0x391e;if(!_0x544dba||typeof _0x544dba!==_0x40fd17(0xd4))return{};try{const _0x44f35a=JSON[_0x40fd17(0xec)](_0x544dba);if(typeof _0x44f35a!==_0x40fd17(0xc5)||_0x44f35a===null||Array[_0x40fd17(0xc8)](_0x44f35a))return{};return{'selectedLabels':Array[_0x40fd17(0xc8)](_0x44f35a[_0x40fd17(0xca)])?_0x44f35a[_0x40fd17(0xca)][_0x40fd17(0xdb)](String):undefined,'jsUrl':typeof _0x44f35a[_0x40fd17(0xd5)]===_0x40fd17(0xd4)?_0x44f35a[_0x40fd17(0xd5)][_0x40fd17(0xe6)]():undefined,'cssUrl':typeof _0x44f35a[_0x40fd17(0xe5)]==='string'?_0x44f35a[_0x40fd17(0xe5)][_0x40fd17(0xe6)]():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- function a118_0x3f73(){const _0x1dbd76=['\x22\x20(','value','push','1352AJGXvK','1547948LwNMgJ','.js','cssUrl','length','resources','path','setLogPath','Invalid\x20--params:\x20','force','string','--params.','45SAATLE','menu-update','menu\x20update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','unshift','message','info','map','55uqeyhA','endsWith','836290fZOZRl','215KIbxNg','status','parse','75408ZNLCyk','1190838qCwDjl','allSettled','isArray','field','dryRun','JS\x20URL\x20is\x20unreachable:\x20','Invalid\x20--params:\x20menu\x20update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','305590BcKsxe','fulfilled','join','patch','.css','label','448024mvSkAa','5469zVZIEJ','object','filter','trim','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','jsUrl','toLowerCase','Invalid\x20--mode:\x20','extend','some','replace'];a118_0x3f73=function(){return _0x1dbd76;};return a118_0x3f73();}(function(_0x202267,_0x92a818){const _0x546904=a118_0x49f9,_0x4a4db6=_0x202267();while(!![]){try{const _0x5348e5=parseInt(_0x546904(0x145))/0x1+-parseInt(_0x546904(0x12c))/0x2+-parseInt(_0x546904(0x11d))/0x3*(parseInt(_0x546904(0x12b))/0x4)+-parseInt(_0x546904(0x141))/0x5*(-parseInt(_0x546904(0x144))/0x6)+-parseInt(_0x546904(0x140))/0x7+parseInt(_0x546904(0x11c))/0x8*(parseInt(_0x546904(0x137))/0x9)+parseInt(_0x546904(0x116))/0xa*(parseInt(_0x546904(0x13e))/0xb);if(_0x5348e5===_0x92a818)break;else _0x4a4db6['push'](_0x4a4db6['shift']());}catch(_0x446d4e){_0x4a4db6['push'](_0x4a4db6['shift']());}}}(a118_0x3f73,0x9fc76));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x1c7ef2){const _0x2b2a57=a118_0x49f9,_0x587e77=[];return _0x1c7ef2[_0x2b2a57(0x122)]&&!isValidJsHttpsUrl(_0x1c7ef2['jsUrl'])&&_0x587e77[_0x2b2a57(0x12a)]({'field':_0x2b2a57(0x122),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x1c7ef2[_0x2b2a57(0x12e)]&&!isValidCssHttpsUrl(_0x1c7ef2[_0x2b2a57(0x12e)])&&_0x587e77[_0x2b2a57(0x12a)]({'field':_0x2b2a57(0x12e),'message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x587e77;}export async function runMenuUpdateCore(_0xa7b090,_0x15dce6,_0x8f976c,_0x98cb83={}){const _0x181fa9=a118_0x49f9,_0x25db23=parseUpdateParamsFlag(_0x8f976c),_0x509adc=normalizeMode(_0x98cb83['mode']),_0x2bb4ed=[];if(_0x25db23[_0x181fa9(0x122)])_0x2bb4ed[_0x181fa9(0x12a)](_0x25db23[_0x181fa9(0x122)]);if(_0x25db23['cssUrl'])_0x2bb4ed[_0x181fa9(0x12a)](_0x25db23[_0x181fa9(0x12e)]);const _0x1bb1a8=validateParams(_0x25db23);if(_0x1bb1a8[_0x181fa9(0x12f)]>0x0){const _0x38c53a=_0x1bb1a8[_0x181fa9(0x13d)](_0x277411=>_0x181fa9(0x136)+_0x277411[_0x181fa9(0x148)]+':\x20'+_0x277411[_0x181fa9(0x13b)])[_0x181fa9(0x118)](';\x20');throw new Error(_0x181fa9(0x133)+_0x38c53a);}if(_0x2bb4ed['length']===0x0)throw new Error(_0x181fa9(0x115)+'Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.');logger[_0x181fa9(0x132)](process['cwd']()),logger['info'](_0x181fa9(0x138),'Start\x20non-interactive\x20menu\x20update',{'appCode':_0xa7b090,'jsUrl':_0x25db23[_0x181fa9(0x122)],'cssUrl':_0x25db23[_0x181fa9(0x12e)],'mode':_0x509adc,'dryRun':_0x98cb83['dryRun']===!![]});if(_0x25db23[_0x181fa9(0x122)]){const _0x3d7368=await isUrlReachable(_0x25db23['jsUrl']);if(!_0x3d7368)throw new Error(_0x181fa9(0x114)+_0x25db23[_0x181fa9(0x122)]);}if(_0x25db23[_0x181fa9(0x12e)]){const _0x4613f5=await isUrlReachable(_0x25db23['cssUrl']);if(!_0x4613f5)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x25db23[_0x181fa9(0x12e)]);}const _0x2dc9e4=await getOnlineMenuList(_0xa7b090,_0x15dce6),_0x4c8b94=_0x2dc9e4[_0x181fa9(0x11f)](_0x542833=>_0x542833[_0x181fa9(0x130)][_0x181fa9(0x12f)]>0x0);if(_0x4c8b94[_0x181fa9(0x12f)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x98cb83[_0x181fa9(0x113)]===!![]};const _0x5d57bf=_0x4c8b94[_0x181fa9(0x13d)](_0xa93a67=>buildMenuUpdateDiff(_0xa93a67,_0x25db23,_0x509adc,_0x98cb83[_0x181fa9(0x134)]===!![]));if(_0x98cb83[_0x181fa9(0x113)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x5d57bf};const _0x45900e=await Promise[_0x181fa9(0x146)](_0x4c8b94[_0x181fa9(0x13d)]((_0x39b667,_0x44c4a8)=>updateMenuCdnUrl(_0xa7b090,_0x15dce6,{'id':_0x39b667['id'],'label':_0x39b667[_0x181fa9(0x11b)],'path':_0x39b667[_0x181fa9(0x131)],'resources':_0x5d57bf[_0x44c4a8]['after']['resources'],'extend':_0x39b667[_0x181fa9(0x125)]??null}))),_0x1040c5=_0x45900e[_0x181fa9(0x11f)](_0x3deda5=>_0x3deda5[_0x181fa9(0x142)]===_0x181fa9(0x117))[_0x181fa9(0x13d)](_0x5addf5=>_0x5addf5[_0x181fa9(0x129)]),_0x1516cb=_0x45900e[_0x181fa9(0x11f)](_0xf497fd=>_0xf497fd[_0x181fa9(0x142)]==='rejected')[_0x181fa9(0x12f)];return logger[_0x181fa9(0x13c)](_0x181fa9(0x138),'Menu\x20update\x20completed',{'count':_0x4c8b94['length'],'resources':_0x2bb4ed}),{'updated':_0x1040c5[_0x181fa9(0x12f)],'failed':_0x1516cb,'skipped':![],'menus':_0x1040c5};}function normalizeMode(_0x26edc6){const _0xcec857=a118_0x49f9;if(!_0x26edc6)return _0xcec857(0x127);if(_0x26edc6===_0xcec857(0x127)||_0x26edc6===_0xcec857(0x119))return _0x26edc6;throw new Error(_0xcec857(0x124)+_0x26edc6+'.\x20Allowed\x20values:\x20replace,\x20patch');}function buildMenuUpdateDiff(_0x3c31f0,_0x261a9d,_0x271e54,_0x384fe4){const _0x5a60be=a118_0x49f9,_0x3e20ad=[..._0x3c31f0[_0x5a60be(0x130)]],_0x499ef8=_0x271e54===_0x5a60be(0x119)?patchResources(_0x3e20ad,_0x261a9d):replaceResources(_0x261a9d),_0x3e8a83=[],_0x1e3580=_0x3e20ad[_0x5a60be(0x126)](isJsResource),_0xac268e=_0x499ef8[_0x5a60be(0x126)](isJsResource);if(_0x1e3580&&!_0xac268e){const _0x2dcd43=_0x5a60be(0x139)+_0x3c31f0[_0x5a60be(0x11b)]+_0x5a60be(0x128)+_0x3c31f0[_0x5a60be(0x131)]+').\x20'+_0x5a60be(0x121);if(!_0x384fe4)throw new Error(_0x2dcd43);_0x3e8a83['push'](_0x2dcd43);}const _0x25ed35=_0x3e20ad[_0x5a60be(0x126)](isCssResource),_0x466e28=_0x499ef8['some'](isCssResource);return _0x25ed35&&!_0x466e28&&_0x3e8a83[_0x5a60be(0x12a)]('menu\x20update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22'+_0x3c31f0[_0x5a60be(0x11b)]+_0x5a60be(0x128)+_0x3c31f0[_0x5a60be(0x131)]+').'),{'id':_0x3c31f0['id'],'label':_0x3c31f0[_0x5a60be(0x11b)],'path':_0x3c31f0[_0x5a60be(0x131)],'mode':_0x271e54,'before':{'resources':_0x3e20ad},'after':{'resources':_0x499ef8},'warnings':_0x3e8a83};}function replaceResources(_0x4e5590){const _0x15205b=a118_0x49f9;return[_0x4e5590[_0x15205b(0x122)],_0x4e5590[_0x15205b(0x12e)]][_0x15205b(0x11f)](_0x5d47f5=>!!_0x5d47f5);}function patchResources(_0x40c5e1,_0x2b9bf9){const _0xa49ec8=a118_0x49f9;let _0x50b38d=![],_0x1eec66=![];const _0x20d8dd=[];for(const _0xa8c28e of _0x40c5e1){if(isJsResource(_0xa8c28e)){if(_0x2b9bf9['jsUrl']&&!_0x50b38d)_0x20d8dd[_0xa49ec8(0x12a)](_0x2b9bf9[_0xa49ec8(0x122)]),_0x50b38d=!![];else!_0x2b9bf9[_0xa49ec8(0x122)]&&_0x20d8dd[_0xa49ec8(0x12a)](_0xa8c28e);continue;}if(isCssResource(_0xa8c28e)){if(_0x2b9bf9[_0xa49ec8(0x12e)]&&!_0x1eec66)_0x20d8dd[_0xa49ec8(0x12a)](_0x2b9bf9[_0xa49ec8(0x12e)]),_0x1eec66=!![];else!_0x2b9bf9['cssUrl']&&_0x20d8dd['push'](_0xa8c28e);continue;}_0x20d8dd[_0xa49ec8(0x12a)](_0xa8c28e);}return _0x2b9bf9[_0xa49ec8(0x122)]&&!_0x50b38d&&_0x20d8dd[_0xa49ec8(0x13a)](_0x2b9bf9[_0xa49ec8(0x122)]),_0x2b9bf9[_0xa49ec8(0x12e)]&&!_0x1eec66&&_0x20d8dd[_0xa49ec8(0x12a)](_0x2b9bf9['cssUrl']),_0x20d8dd;}function isJsResource(_0x3b0d86){const _0x120a91=a118_0x49f9;return stripQuery(_0x3b0d86)[_0x120a91(0x123)]()[_0x120a91(0x13f)](_0x120a91(0x12d));}function a118_0x49f9(_0x3b212c,_0xa1d3a5){_0x3b212c=_0x3b212c-0x113;const _0x3f7384=a118_0x3f73();let _0x49f900=_0x3f7384[_0x3b212c];return _0x49f900;}function isCssResource(_0x3664a3){const _0x42ff9f=a118_0x49f9;return stripQuery(_0x3664a3)['toLowerCase']()[_0x42ff9f(0x13f)](_0x42ff9f(0x11a));}function stripQuery(_0x23d673){return _0x23d673['split']('?')[0x0]??_0x23d673;}function parseUpdateParamsFlag(_0x22fc31){const _0x5159bf=a118_0x49f9;if(!_0x22fc31||typeof _0x22fc31!==_0x5159bf(0x135))return{};try{const _0x19b63c=JSON[_0x5159bf(0x143)](_0x22fc31);if(typeof _0x19b63c!==_0x5159bf(0x11e)||_0x19b63c===null||Array[_0x5159bf(0x147)](_0x19b63c))return{};return{'jsUrl':typeof _0x19b63c['jsUrl']===_0x5159bf(0x135)?_0x19b63c['jsUrl'][_0x5159bf(0x120)]():undefined,'cssUrl':typeof _0x19b63c[_0x5159bf(0x12e)]===_0x5159bf(0x135)?_0x19b63c[_0x5159bf(0x12e)][_0x5159bf(0x120)]():undefined};}catch{return{};}}
1
+ function a118_0x6bdb(_0x340483,_0x2a2645){_0x340483=_0x340483-0x15b;const _0x49bd72=a118_0x49bd();let _0x6bdbb8=_0x49bd72[_0x340483];return _0x6bdbb8;}function a118_0x49bd(){const _0x509681=['extend','15SzvNLM','menu\x20update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','JS\x20URL\x20is\x20unreachable:\x20','after','mode','some','label','split','resources','Menu\x20update\x20completed','menu-update','trim','Invalid\x20--params:\x20menu\x20update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','join','info','fulfilled','cwd','\x22\x20(','666404QmFoZG','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','3614xzxiTM','map','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','--params.','force','dryRun','3823355evOOVr','3593004UCWURX','2448257lhOpHh','11ZQojYe','935280AWruXg','field','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','value','toLowerCase','Invalid\x20--mode:\x20','.\x20Allowed\x20values:\x20replace,\x20patch','length','7921110qFvFuC','endsWith','16KzOEty','parse','patch','status','object',').\x20','push','cssUrl','431AKEoYh','replace','message','filter','6tjONCK','isArray','menu\x20update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','string','path','rejected','Invalid\x20--params:\x20','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','jsUrl'];a118_0x49bd=function(){return _0x509681;};return a118_0x49bd();}(function(_0xfec4f5,_0x3a2c00){const _0x3892b1=a118_0x6bdb,_0x4d74da=_0xfec4f5();while(!![]){try{const _0x588e3c=parseInt(_0x3892b1(0x187))/0x1*(parseInt(_0x3892b1(0x16b))/0x2)+-parseInt(_0x3892b1(0x195))/0x3*(parseInt(_0x3892b1(0x169))/0x4)+-parseInt(_0x3892b1(0x171))/0x5*(parseInt(_0x3892b1(0x18b))/0x6)+parseInt(_0x3892b1(0x173))/0x7*(parseInt(_0x3892b1(0x17f))/0x8)+parseInt(_0x3892b1(0x175))/0x9+parseInt(_0x3892b1(0x17d))/0xa+-parseInt(_0x3892b1(0x174))/0xb*(parseInt(_0x3892b1(0x172))/0xc);if(_0x588e3c===_0x3a2c00)break;else _0x4d74da['push'](_0x4d74da['shift']());}catch(_0x4ae35a){_0x4d74da['push'](_0x4d74da['shift']());}}}(a118_0x49bd,0x74849));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x106159){const _0x7a6742=a118_0x6bdb,_0x5890d8=[];return _0x106159[_0x7a6742(0x193)]&&!isValidJsHttpsUrl(_0x106159[_0x7a6742(0x193)])&&_0x5890d8[_0x7a6742(0x185)]({'field':'jsUrl','message':_0x7a6742(0x16d)}),_0x106159[_0x7a6742(0x186)]&&!isValidCssHttpsUrl(_0x106159['cssUrl'])&&_0x5890d8['push']({'field':_0x7a6742(0x186),'message':_0x7a6742(0x16a)}),_0x5890d8;}export async function runMenuUpdateCore(_0x346c05,_0x28816c,_0x39ba9b,_0xacd475={}){const _0x32560f=a118_0x6bdb,_0x5aa624=parseUpdateParamsFlag(_0x39ba9b),_0x166196=normalizeMode(_0xacd475[_0x32560f(0x15b)]),_0x31942a=[];if(_0x5aa624[_0x32560f(0x193)])_0x31942a[_0x32560f(0x185)](_0x5aa624[_0x32560f(0x193)]);if(_0x5aa624[_0x32560f(0x186)])_0x31942a[_0x32560f(0x185)](_0x5aa624[_0x32560f(0x186)]);const _0x2e4972=validateParams(_0x5aa624);if(_0x2e4972[_0x32560f(0x17c)]>0x0){const _0x320f97=_0x2e4972['map'](_0x4fd7f7=>_0x32560f(0x16e)+_0x4fd7f7[_0x32560f(0x176)]+':\x20'+_0x4fd7f7[_0x32560f(0x189)])[_0x32560f(0x164)](';\x20');throw new Error(_0x32560f(0x191)+_0x320f97);}if(_0x31942a['length']===0x0)throw new Error(_0x32560f(0x163)+_0x32560f(0x177));logger['setLogPath'](process[_0x32560f(0x167)]()),logger[_0x32560f(0x165)](_0x32560f(0x161),'Start\x20non-interactive\x20menu\x20update',{'appCode':_0x346c05,'jsUrl':_0x5aa624['jsUrl'],'cssUrl':_0x5aa624['cssUrl'],'mode':_0x166196,'dryRun':_0xacd475[_0x32560f(0x170)]===!![]});if(_0x5aa624[_0x32560f(0x193)]){const _0x1132ba=await isUrlReachable(_0x5aa624[_0x32560f(0x193)]);if(!_0x1132ba)throw new Error(_0x32560f(0x197)+_0x5aa624[_0x32560f(0x193)]);}if(_0x5aa624['cssUrl']){const _0x5c7a9b=await isUrlReachable(_0x5aa624[_0x32560f(0x186)]);if(!_0x5c7a9b)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x5aa624[_0x32560f(0x186)]);}const _0x340832=await getOnlineMenuList(_0x346c05,_0x28816c),_0x215c85=_0x340832[_0x32560f(0x18a)](_0x284afb=>_0x284afb[_0x32560f(0x15f)][_0x32560f(0x17c)]>0x0);if(_0x215c85[_0x32560f(0x17c)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0xacd475[_0x32560f(0x170)]===!![]};const _0x329faf=_0x215c85[_0x32560f(0x16c)](_0x256a75=>buildMenuUpdateDiff(_0x256a75,_0x5aa624,_0x166196,_0xacd475[_0x32560f(0x16f)]===!![]));if(_0xacd475['dryRun'])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x329faf};const _0x3b0f7f=await Promise['allSettled'](_0x215c85[_0x32560f(0x16c)]((_0x2788d3,_0xfa5780)=>updateMenuCdnUrl(_0x346c05,_0x28816c,{'id':_0x2788d3['id'],'label':_0x2788d3['label'],'path':_0x2788d3['path'],'resources':_0x329faf[_0xfa5780][_0x32560f(0x198)]['resources'],'extend':_0x2788d3[_0x32560f(0x194)]??null}))),_0x40aff7=_0x3b0f7f['filter'](_0x40b94a=>_0x40b94a['status']===_0x32560f(0x166))[_0x32560f(0x16c)](_0x1e2a19=>_0x1e2a19[_0x32560f(0x178)]),_0x4c007b=_0x3b0f7f[_0x32560f(0x18a)](_0x39e9c1=>_0x39e9c1[_0x32560f(0x182)]===_0x32560f(0x190))[_0x32560f(0x17c)];return logger[_0x32560f(0x165)](_0x32560f(0x161),_0x32560f(0x160),{'count':_0x215c85[_0x32560f(0x17c)],'resources':_0x31942a}),{'updated':_0x40aff7[_0x32560f(0x17c)],'failed':_0x4c007b,'skipped':![],'menus':_0x40aff7};}function normalizeMode(_0x39750d){const _0x1ab60e=a118_0x6bdb;if(!_0x39750d)return'replace';if(_0x39750d===_0x1ab60e(0x188)||_0x39750d==='patch')return _0x39750d;throw new Error(_0x1ab60e(0x17a)+_0x39750d+_0x1ab60e(0x17b));}function buildMenuUpdateDiff(_0xf23d19,_0x15409a,_0x33b069,_0x23d0c9){const _0x400ec6=a118_0x6bdb,_0x3f9169=[..._0xf23d19[_0x400ec6(0x15f)]],_0x21ebe2=_0x33b069===_0x400ec6(0x181)?patchResources(_0x3f9169,_0x15409a):replaceResources(_0x15409a),_0x38aecf=[],_0x17d943=_0x3f9169[_0x400ec6(0x15c)](isJsResource),_0xb4bce4=_0x21ebe2[_0x400ec6(0x15c)](isJsResource);if(_0x17d943&&!_0xb4bce4){const _0x5a57e8=_0x400ec6(0x196)+_0xf23d19[_0x400ec6(0x15d)]+'\x22\x20('+_0xf23d19['path']+_0x400ec6(0x184)+_0x400ec6(0x192);if(!_0x23d0c9)throw new Error(_0x5a57e8);_0x38aecf[_0x400ec6(0x185)](_0x5a57e8);}const _0x43325d=_0x3f9169[_0x400ec6(0x15c)](isCssResource),_0x197b1e=_0x21ebe2[_0x400ec6(0x15c)](isCssResource);return _0x43325d&&!_0x197b1e&&_0x38aecf[_0x400ec6(0x185)](_0x400ec6(0x18d)+_0xf23d19[_0x400ec6(0x15d)]+_0x400ec6(0x168)+_0xf23d19[_0x400ec6(0x18f)]+').'),{'id':_0xf23d19['id'],'label':_0xf23d19[_0x400ec6(0x15d)],'path':_0xf23d19[_0x400ec6(0x18f)],'mode':_0x33b069,'before':{'resources':_0x3f9169},'after':{'resources':_0x21ebe2},'warnings':_0x38aecf};}function replaceResources(_0x1528bb){const _0x12c7bc=a118_0x6bdb;return[_0x1528bb[_0x12c7bc(0x193)],_0x1528bb['cssUrl']][_0x12c7bc(0x18a)](_0x13c2da=>!!_0x13c2da);}function patchResources(_0x19c7f1,_0x45f58d){const _0x177f78=a118_0x6bdb;let _0x12f374=![],_0x7b2b01=![];const _0x74bbd8=[];for(const _0x2070b1 of _0x19c7f1){if(isJsResource(_0x2070b1)){if(_0x45f58d[_0x177f78(0x193)]&&!_0x12f374)_0x74bbd8[_0x177f78(0x185)](_0x45f58d[_0x177f78(0x193)]),_0x12f374=!![];else!_0x45f58d['jsUrl']&&_0x74bbd8[_0x177f78(0x185)](_0x2070b1);continue;}if(isCssResource(_0x2070b1)){if(_0x45f58d['cssUrl']&&!_0x7b2b01)_0x74bbd8['push'](_0x45f58d[_0x177f78(0x186)]),_0x7b2b01=!![];else!_0x45f58d[_0x177f78(0x186)]&&_0x74bbd8[_0x177f78(0x185)](_0x2070b1);continue;}_0x74bbd8[_0x177f78(0x185)](_0x2070b1);}return _0x45f58d[_0x177f78(0x193)]&&!_0x12f374&&_0x74bbd8['unshift'](_0x45f58d[_0x177f78(0x193)]),_0x45f58d[_0x177f78(0x186)]&&!_0x7b2b01&&_0x74bbd8[_0x177f78(0x185)](_0x45f58d[_0x177f78(0x186)]),_0x74bbd8;}function isJsResource(_0x3212da){const _0x389b66=a118_0x6bdb;return stripQuery(_0x3212da)['toLowerCase']()[_0x389b66(0x17e)]('.js');}function isCssResource(_0x59521a){const _0x3a8d8a=a118_0x6bdb;return stripQuery(_0x59521a)[_0x3a8d8a(0x179)]()[_0x3a8d8a(0x17e)]('.css');}function stripQuery(_0x499c08){const _0x1d4e40=a118_0x6bdb;return _0x499c08[_0x1d4e40(0x15e)]('?')[0x0]??_0x499c08;}function parseUpdateParamsFlag(_0x34e09e){const _0x2ac218=a118_0x6bdb;if(!_0x34e09e||typeof _0x34e09e!==_0x2ac218(0x18e))return{};try{const _0x2a0742=JSON[_0x2ac218(0x180)](_0x34e09e);if(typeof _0x2a0742!==_0x2ac218(0x183)||_0x2a0742===null||Array[_0x2ac218(0x18c)](_0x2a0742))return{};return{'jsUrl':typeof _0x2a0742[_0x2ac218(0x193)]==='string'?_0x2a0742[_0x2ac218(0x193)][_0x2ac218(0x162)]():undefined,'cssUrl':typeof _0x2a0742['cssUrl']===_0x2ac218(0x18e)?_0x2a0742[_0x2ac218(0x186)][_0x2ac218(0x162)]():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- function a119_0xbb9d(_0x480712,_0x446f02){_0x480712=_0x480712-0x13d;const _0x56434c=a119_0x5643();let _0xbb9d83=_0x56434c[_0x480712];return _0xbb9d83;}(function(_0xece3d2,_0x224722){const _0x478719=a119_0xbb9d,_0x20fd59=_0xece3d2();while(!![]){try{const _0x2e3b16=-parseInt(_0x478719(0x145))/0x1+-parseInt(_0x478719(0x141))/0x2*(parseInt(_0x478719(0x13e))/0x3)+-parseInt(_0x478719(0x144))/0x4*(parseInt(_0x478719(0x13f))/0x5)+parseInt(_0x478719(0x13d))/0x6+parseInt(_0x478719(0x140))/0x7*(parseInt(_0x478719(0x147))/0x8)+-parseInt(_0x478719(0x146))/0x9+parseInt(_0x478719(0x142))/0xa*(parseInt(_0x478719(0x148))/0xb);if(_0x2e3b16===_0x224722)break;else _0x20fd59['push'](_0x20fd59['shift']());}catch(_0x311696){_0x20fd59['push'](_0x20fd59['shift']());}}}(a119_0x5643,0xef569));function a119_0x5643(){const _0x3fc345=['103280coYBdh','11NWpKOx','7489728mInVPn','48fhGiBU','5jnNJOy','448VhNSVc','470oiAPvq','12422710fTlxxZ','test','2970868OFEVMh','648743vesGiG','8471250ULZqHD'];a119_0x5643=function(){return _0x3fc345;};return a119_0x5643();}export function isValidJsHttpsUrl(_0x557899){return/^https:\/\/.+\.js(\?.*)?$/['test'](_0x557899['trim']());}export function isValidCssHttpsUrl(_0x2926eb){const _0xdbde94=a119_0xbb9d;return/^https:\/\/.+\.css(\?.*)?$/[_0xdbde94(0x143)](_0x2926eb['trim']());}export async function isUrlReachable(_0x18289b){try{const _0x44add4=await fetch(_0x18289b,{'method':'HEAD'});return _0x44add4['ok'];}catch{return![];}}
1
+ (function(_0x3464a4,_0x35e427){const _0x25d956=a119_0x5175,_0x538a43=_0x3464a4();while(!![]){try{const _0x433a87=-parseInt(_0x25d956(0x14c))/0x1+-parseInt(_0x25d956(0x149))/0x2*(parseInt(_0x25d956(0x144))/0x3)+-parseInt(_0x25d956(0x145))/0x4+-parseInt(_0x25d956(0x146))/0x5*(-parseInt(_0x25d956(0x14b))/0x6)+-parseInt(_0x25d956(0x151))/0x7*(parseInt(_0x25d956(0x14e))/0x8)+parseInt(_0x25d956(0x14f))/0x9*(parseInt(_0x25d956(0x14a))/0xa)+parseInt(_0x25d956(0x150))/0xb;if(_0x433a87===_0x35e427)break;else _0x538a43['push'](_0x538a43['shift']());}catch(_0x51c244){_0x538a43['push'](_0x538a43['shift']());}}}(a119_0x2bb0,0xa03c1));function a119_0x2bb0(){const _0x229f0c=['320037zNIvKA','HEAD','152jxghAM','2960217nFdnEt','20367237KoHQxN','287497mOSQlj','3HYvOlZ','3252728sAjfhR','99140xCdngF','test','trim','14302eQDzUC','10dBEKgH','120WEhEQG'];a119_0x2bb0=function(){return _0x229f0c;};return a119_0x2bb0();}export function isValidJsHttpsUrl(_0x45ea5e){const _0x303d49=a119_0x5175;return/^https:\/\/.+\.js(\?.*)?$/[_0x303d49(0x147)](_0x45ea5e[_0x303d49(0x148)]());}export function isValidCssHttpsUrl(_0x373243){const _0x19a846=a119_0x5175;return/^https:\/\/.+\.css(\?.*)?$/['test'](_0x373243[_0x19a846(0x148)]());}function a119_0x5175(_0x4ee005,_0x3d72f8){_0x4ee005=_0x4ee005-0x144;const _0x2bb061=a119_0x2bb0();let _0x517556=_0x2bb061[_0x4ee005];return _0x517556;}export async function isUrlReachable(_0x1deae2){const _0x3dc3e0=a119_0x5175;try{const _0x2130a8=await fetch(_0x1deae2,{'method':_0x3dc3e0(0x14d)});return _0x2130a8['ok'];}catch{return![];}}
@@ -1 +1 @@
1
- const a120_0x5aba06=a120_0x2cf9;(function(_0x579a63,_0x3609da){const _0x5898bd=a120_0x2cf9,_0x20b485=_0x579a63();while(!![]){try{const _0x17bf3a=parseInt(_0x5898bd(0x192))/0x1*(parseInt(_0x5898bd(0x18d))/0x2)+parseInt(_0x5898bd(0x17f))/0x3+-parseInt(_0x5898bd(0x180))/0x4*(parseInt(_0x5898bd(0x17c))/0x5)+parseInt(_0x5898bd(0x196))/0x6*(parseInt(_0x5898bd(0x19d))/0x7)+parseInt(_0x5898bd(0x1a6))/0x8*(-parseInt(_0x5898bd(0x19f))/0x9)+-parseInt(_0x5898bd(0x1b0))/0xa+parseInt(_0x5898bd(0x176))/0xb*(parseInt(_0x5898bd(0x18a))/0xc);if(_0x17bf3a===_0x3609da)break;else _0x20b485['push'](_0x20b485['shift']());}catch(_0x4906e2){_0x20b485['push'](_0x20b485['shift']());}}}(a120_0x4fd7,0xc9bc3));import a120_0x164a13 from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{runMenuSyncCore,readPageLabelsFromStdin}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';function a120_0x4fd7(){const _0x2a6f0f=['Created\x20','isArray','\x20and\x20CSS:\x20','onlinePaths','\x20\x20Cancelled.','selectedAppName','✓\x20Menu\x20sync\x20completed:\x20','object','\x20page(s)','3221448MTQGRK','cyan','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','2BCnqFe','\x20created.','yes','yellow','Menu\x20sync\x20completed:\x20','575479iHxZGz','appcode','\x20menu(s)\x20with\x20JS:\x20','sync','54EPUwHi','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','Menu\x20sync\x20skipped','parse','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22,\x22pages\x22:[\x22Page1\x22]}','skipped','length','920136hFLBox','params','9NgFXkj','localPages','Failed\x20to\x20fetch\x20online\x20menu\x20list','flag','gray','Fetching\x20online\x20menu\x20list...','Non-interactive:\x20auto-create\x20all\x20local\x20pages\x20not\x20yet\x20on\x20platform','5179032HzVFzG','write','str','cssUrl','Online\x20menu\x20list\x20fetched','message','appCode','\x20menu(s)\x20created','Sync\x20local\x20pages\x20as\x20platform\x20menus','onlineMenuList','7405800gobRLJ','map','\x20menu(s)','pages','string','\x20\x20Continue\x20with\x20creation?','\x20\x20✓\x20Selected:\x20','failed','jsUrl','created','Pre-fill\x20JS/CSS\x20URLs\x20and/or\x20select\x20specific\x20pages.\x20','cookie','trim','Menu\x20creation\x20failed','11DGvePv','Creating\x20','\x20\x20Create\x20','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','\x20failed.','\x20menu(s)...','705cDutXJ','boolean','validation','2051286uXmOpi','14084OPyPUO'];a120_0x4fd7=function(){return _0x2a6f0f;};return a120_0x4fd7();}function a120_0x2cf9(_0xf7ae92,_0x5244a4){_0xf7ae92=_0xf7ae92-0x175;const _0x4fd7d1=a120_0x4fd7();let _0x2cf98e=_0x4fd7d1[_0xf7ae92];return _0x2cf98e;}export const menuSync={'service':'menu','command':a120_0x5aba06(0x195),'description':a120_0x5aba06(0x1ae),'risk':a120_0x5aba06(0x1a7),'flags':[{'name':'params','type':a120_0x5aba06(0x1b4),'description':a120_0x5aba06(0x1ba)+a120_0x5aba06(0x19a)},{'name':a120_0x5aba06(0x18f),'type':a120_0x5aba06(0x17d),'description':a120_0x5aba06(0x1a5)}],async 'execute'(_0x29f572){const _0x20a442=a120_0x5aba06,_0x1496d8=_0x29f572['rawFlags'][_0x20a442(0x193)]?String(_0x29f572['rawFlags'][_0x20a442(0x193)])['trim']():'';if(!isInProject()&&!_0x29f572[_0x20a442(0x186)]&&!_0x1496d8)throw CliErrors['validation'](_0x20a442(0x197)+_0x20a442(0x179));const _0x46cbfb=_0x29f572[_0x20a442(0x1a2)](_0x20a442(0x18f)),_0x24098f=_0x29f572[_0x20a442(0x1a8)](_0x20a442(0x19e)),_0x92a5fc=parseParams(_0x24098f),_0x13cbfc=!!(_0x92a5fc['jsUrl']||_0x92a5fc[_0x20a442(0x1a9)]||_0x92a5fc[_0x20a442(0x1b3)]&&_0x92a5fc['pages'][_0x20a442(0x19c)]>0x0);if(_0x46cbfb||_0x13cbfc){let _0x3b5c3e=[];!isInteractive()&&!_0x92a5fc[_0x20a442(0x1b3)]?.['length']&&(_0x3b5c3e=await readPageLabelsFromStdin());const _0x2743e8=await runMenuSyncCore(_0x29f572[_0x20a442(0x1ac)],_0x29f572[_0x20a442(0x1bb)],_0x3b5c3e[_0x20a442(0x19c)]>0x0?_0x3b5c3e:_0x92a5fc[_0x20a442(0x1b3)]??[],_0x24098f);if(_0x2743e8[_0x20a442(0x19b)]){const _0x1ce0ca=getLocalPages();_0x1ce0ca[_0x20a442(0x19c)]===0x0?writeCliSideChannelLine('!\x20No\x20local\x20pages\x20found\x20in\x20src/pages'):writeCliSideChannelLine('✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform');}else writeCliSideChannelLine(_0x20a442(0x187)+_0x2743e8[_0x20a442(0x1b9)]+_0x20a442(0x1ad));return{'ok':!![],'data':_0x2743e8,'message':_0x2743e8['skipped']?_0x20a442(0x198):_0x20a442(0x191)+_0x2743e8[_0x20a442(0x1b9)]+_0x20a442(0x18e)};}requireInteractive();const _0x143b50=startSpinner(_0x20a442(0x1a4));let _0x505d4b,_0x44928b,_0x2e2b4b;try{const _0xa5f01c=await fetchMenuData(_0x29f572['appCode'],_0x29f572['cookie']);_0x505d4b=_0xa5f01c[_0x20a442(0x1a0)],_0x44928b=_0xa5f01c[_0x20a442(0x184)],_0x2e2b4b=_0xa5f01c[_0x20a442(0x1af)],stopSpinner(_0x143b50,_0x20a442(0x1aa),!![]);}catch(_0x290bcb){stopSpinner(_0x143b50,_0x20a442(0x1a1),![]);throw CliErrors[_0x20a442(0x17e)](_0x290bcb instanceof Error?_0x290bcb[_0x20a442(0x1ab)]:_0x20a442(0x1a1));}if(_0x505d4b[_0x20a442(0x19c)]===0x0)return writeCliSideChannelLine(a120_0x164a13[_0x20a442(0x190)](_0x20a442(0x18c))),{'ok':!![]};const _0x569ae7=buildCompareRows(_0x505d4b,_0x44928b);writeCliSideChannelLine(renderCompareTable(_0x569ae7)),writeCliSideChannelLine('');const _0x447499=_0x92a5fc['pages'],_0x16a2ad=await selectPages(_0x505d4b,_0x44928b,_0x447499);writeCliSideChannelLine(''),writeCliSideChannelLine(a120_0x164a13[_0x20a442(0x18b)](_0x20a442(0x1b6)+_0x16a2ad['length']+_0x20a442(0x189)));const _0x5c361d=_0x92a5fc['jsUrl']&&_0x92a5fc[_0x20a442(0x1a9)];if(!_0x5c361d){writeCliSideChannelLine(renderSyncSummary(_0x16a2ad,_0x44928b['size']>0x0));const _0xff27a8=await askConfirm(_0x20a442(0x1b5));if(!_0xff27a8)return writeCliSideChannelLine(a120_0x164a13[_0x20a442(0x1a3)](_0x20a442(0x185))),{'ok':!![]};}let _0x301d14=_0x92a5fc[_0x20a442(0x1b8)],_0x5f101e=_0x92a5fc[_0x20a442(0x1a9)];!_0x301d14&&(_0x301d14=await askJsUrl());!_0x5f101e&&(_0x5f101e=await askCssUrl());const _0x40bd96=await askConfirm(_0x20a442(0x178)+_0x16a2ad[_0x20a442(0x19c)]+_0x20a442(0x194)+_0x301d14+_0x20a442(0x183)+_0x5f101e+'?');if(!_0x40bd96)return writeCliSideChannelLine(a120_0x164a13['gray']('\x20\x20Cancelled.')),{'ok':!![]};const _0x344798=[_0x301d14,_0x5f101e],_0xb09233=startSpinner(_0x20a442(0x177)+_0x16a2ad[_0x20a442(0x19c)]+_0x20a442(0x17b));try{const _0x5265d3=await doCreateMenus(_0x29f572['appCode'],_0x29f572[_0x20a442(0x1bb)],_0x16a2ad,_0x344798);return stopSpinner(_0xb09233,_0x20a442(0x181)+_0x5265d3[_0x20a442(0x1b9)]+_0x20a442(0x1b2),!![]),{'ok':!![],'data':_0x5265d3,'message':_0x20a442(0x191)+_0x5265d3[_0x20a442(0x1b9)]+'\x20created,\x20'+_0x5265d3[_0x20a442(0x1b7)]+_0x20a442(0x17a)};}catch(_0x4153ae){stopSpinner(_0xb09233,'Menu\x20creation\x20failed',![]);throw CliErrors[_0x20a442(0x17e)](_0x4153ae instanceof Error?_0x4153ae['message']:_0x20a442(0x175));}}};function parseParams(_0x35954b){const _0x3945d9=a120_0x5aba06;if(!_0x35954b)return{};try{const _0x1e337e=JSON[_0x3945d9(0x199)](_0x35954b);if(typeof _0x1e337e!==_0x3945d9(0x188)||_0x1e337e===null||Array[_0x3945d9(0x182)](_0x1e337e))return{};return{'jsUrl':typeof _0x1e337e[_0x3945d9(0x1b8)]==='string'?_0x1e337e[_0x3945d9(0x1b8)][_0x3945d9(0x1bc)]():undefined,'cssUrl':typeof _0x1e337e['cssUrl']===_0x3945d9(0x1b4)?_0x1e337e[_0x3945d9(0x1a9)][_0x3945d9(0x1bc)]():undefined,'pages':Array[_0x3945d9(0x182)](_0x1e337e[_0x3945d9(0x1b3)])?_0x1e337e[_0x3945d9(0x1b3)][_0x3945d9(0x1b1)](String):undefined};}catch{return{};}}
1
+ function a120_0x29b7(_0x2f70d5,_0x5f089a){_0x2f70d5=_0x2f70d5-0xf8;const _0x1b73b1=a120_0x1b73();let _0x29b7a7=_0x1b73b1[_0x2f70d5];return _0x29b7a7;}function a120_0x1b73(){const _0x2d7b59=['map','2022BgDLLT','\x20menu(s)\x20with\x20JS:\x20','\x20created,\x20','length','write','failed','yellow','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22,\x22pages\x22:[\x22Page1\x22]}','jsUrl','cookie','size','\x20\x20Cancelled.','\x20created.','Menu\x20creation\x20failed','onlinePaths','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','skipped','\x20menu(s)\x20created','4069242MyKXOv','\x20and\x20CSS:\x20','\x20\x20✓\x20Selected:\x20','Menu\x20sync\x20skipped','Online\x20menu\x20list\x20fetched','created','appcode','2031760kxJnmK','\x20page(s)','onlineMenuList','yes','rawFlags','gray','string','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','isArray','4410624FKsitC','520fKwYmK','validation','params','appCode','Failed\x20to\x20fetch\x20online\x20menu\x20list','2555tgHnCc','selectedAppName','\x20\x20Continue\x20with\x20creation?','3492144aDzreM','flag','menu','\x20menu(s)','object','\x20menu(s)...','3224451UcEpTP','pages','\x20failed.','\x20\x20Create\x20','trim','sync','cssUrl','Created\x20','message','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','✓\x20Menu\x20sync\x20completed:\x20','Creating\x20','20368AVqEDv','Menu\x20sync\x20completed:\x20','boolean'];a120_0x1b73=function(){return _0x2d7b59;};return a120_0x1b73();}const a120_0x51864c=a120_0x29b7;(function(_0x7bdb34,_0xbcfb1d){const _0x15689a=a120_0x29b7,_0x3c4439=_0x7bdb34();while(!![]){try{const _0xabc20b=-parseInt(_0x15689a(0x121))/0x1*(parseInt(_0x15689a(0x103))/0x2)+parseInt(_0x15689a(0x111))/0x3+-parseInt(_0x15689a(0x102))/0x4+parseInt(_0x15689a(0xf9))/0x5+-parseInt(_0x15689a(0x10b))/0x6+parseInt(_0x15689a(0x108))/0x7*(parseInt(_0x15689a(0x11d))/0x8)+parseInt(_0x15689a(0x133))/0x9;if(_0xabc20b===_0xbcfb1d)break;else _0x3c4439['push'](_0x3c4439['shift']());}catch(_0x555ae7){_0x3c4439['push'](_0x3c4439['shift']());}}}(a120_0x1b73,0x9f3a5));import a120_0x5f0cd4 from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{runMenuSyncCore,readPageLabelsFromStdin}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';export const menuSync={'service':a120_0x51864c(0x10d),'command':a120_0x51864c(0x116),'description':'Sync\x20local\x20pages\x20as\x20platform\x20menus','risk':a120_0x51864c(0x125),'flags':[{'name':'params','type':a120_0x51864c(0xff),'description':'Pre-fill\x20JS/CSS\x20URLs\x20and/or\x20select\x20specific\x20pages.\x20'+a120_0x51864c(0x128)},{'name':a120_0x51864c(0xfc),'type':a120_0x51864c(0x11f),'description':'Non-interactive:\x20auto-create\x20all\x20local\x20pages\x20not\x20yet\x20on\x20platform'}],async 'execute'(_0xb8e8f3){const _0x228f04=a120_0x51864c,_0x4e2e3f=_0xb8e8f3[_0x228f04(0xfd)]['appcode']?String(_0xb8e8f3['rawFlags'][_0x228f04(0xf8)])[_0x228f04(0x115)]():'';if(!isInProject()&&!_0xb8e8f3[_0x228f04(0x109)]&&!_0x4e2e3f)throw CliErrors[_0x228f04(0x104)]('menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20'+_0x228f04(0x130));const _0x35a97e=_0xb8e8f3[_0x228f04(0x10c)](_0x228f04(0xfc)),_0x471002=_0xb8e8f3['str'](_0x228f04(0x105)),_0x10f462=parseParams(_0x471002),_0x4672c5=!!(_0x10f462[_0x228f04(0x129)]||_0x10f462['cssUrl']||_0x10f462[_0x228f04(0x112)]&&_0x10f462[_0x228f04(0x112)][_0x228f04(0x124)]>0x0);if(_0x35a97e||_0x4672c5){let _0x5a35fc=[];!isInteractive()&&!_0x10f462['pages']?.['length']&&(_0x5a35fc=await readPageLabelsFromStdin());const _0x51ce33=await runMenuSyncCore(_0xb8e8f3[_0x228f04(0x106)],_0xb8e8f3[_0x228f04(0x12a)],_0x5a35fc[_0x228f04(0x124)]>0x0?_0x5a35fc:_0x10f462[_0x228f04(0x112)]??[],_0x471002);if(_0x51ce33['skipped']){const _0x4ad444=getLocalPages();_0x4ad444['length']===0x0?writeCliSideChannelLine(_0x228f04(0x100)):writeCliSideChannelLine(_0x228f04(0x11a));}else writeCliSideChannelLine(_0x228f04(0x11b)+_0x51ce33[_0x228f04(0x138)]+_0x228f04(0x132));return{'ok':!![],'data':_0x51ce33,'message':_0x51ce33[_0x228f04(0x131)]?_0x228f04(0x136):_0x228f04(0x11e)+_0x51ce33[_0x228f04(0x138)]+_0x228f04(0x12d)};}requireInteractive();const _0x321bf8=startSpinner('Fetching\x20online\x20menu\x20list...');let _0x17be52,_0x362400,_0xf223c2;try{const _0x42161a=await fetchMenuData(_0xb8e8f3[_0x228f04(0x106)],_0xb8e8f3[_0x228f04(0x12a)]);_0x17be52=_0x42161a['localPages'],_0x362400=_0x42161a[_0x228f04(0x12f)],_0xf223c2=_0x42161a[_0x228f04(0xfb)],stopSpinner(_0x321bf8,_0x228f04(0x137),!![]);}catch(_0x585e69){stopSpinner(_0x321bf8,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors[_0x228f04(0x104)](_0x585e69 instanceof Error?_0x585e69[_0x228f04(0x119)]:_0x228f04(0x107));}if(_0x17be52['length']===0x0)return writeCliSideChannelLine(a120_0x5f0cd4[_0x228f04(0x127)]('\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first')),{'ok':!![]};const _0x469682=buildCompareRows(_0x17be52,_0x362400);writeCliSideChannelLine(renderCompareTable(_0x469682)),writeCliSideChannelLine('');const _0x3a8090=_0x10f462[_0x228f04(0x112)],_0x5c4988=await selectPages(_0x17be52,_0x362400,_0x3a8090);writeCliSideChannelLine(''),writeCliSideChannelLine(a120_0x5f0cd4['cyan'](_0x228f04(0x135)+_0x5c4988[_0x228f04(0x124)]+_0x228f04(0xfa)));const _0x2e3f90=_0x10f462[_0x228f04(0x129)]&&_0x10f462[_0x228f04(0x117)];if(!_0x2e3f90){writeCliSideChannelLine(renderSyncSummary(_0x5c4988,_0x362400[_0x228f04(0x12b)]>0x0));const _0x42c48a=await askConfirm(_0x228f04(0x10a));if(!_0x42c48a)return writeCliSideChannelLine(a120_0x5f0cd4[_0x228f04(0xfe)](_0x228f04(0x12c))),{'ok':!![]};}let _0x4c8064=_0x10f462[_0x228f04(0x129)],_0x513720=_0x10f462[_0x228f04(0x117)];!_0x4c8064&&(_0x4c8064=await askJsUrl());!_0x513720&&(_0x513720=await askCssUrl());const _0x468be9=await askConfirm(_0x228f04(0x114)+_0x5c4988[_0x228f04(0x124)]+_0x228f04(0x122)+_0x4c8064+_0x228f04(0x134)+_0x513720+'?');if(!_0x468be9)return writeCliSideChannelLine(a120_0x5f0cd4['gray']('\x20\x20Cancelled.')),{'ok':!![]};const _0x34ce47=[_0x4c8064,_0x513720],_0x5eb8a4=startSpinner(_0x228f04(0x11c)+_0x5c4988[_0x228f04(0x124)]+_0x228f04(0x110));try{const _0x598049=await doCreateMenus(_0xb8e8f3[_0x228f04(0x106)],_0xb8e8f3['cookie'],_0x5c4988,_0x34ce47);return stopSpinner(_0x5eb8a4,_0x228f04(0x118)+_0x598049[_0x228f04(0x138)]+_0x228f04(0x10e),!![]),{'ok':!![],'data':_0x598049,'message':_0x228f04(0x11e)+_0x598049[_0x228f04(0x138)]+_0x228f04(0x123)+_0x598049[_0x228f04(0x126)]+_0x228f04(0x113)};}catch(_0x3e53b6){stopSpinner(_0x5eb8a4,_0x228f04(0x12e),![]);throw CliErrors[_0x228f04(0x104)](_0x3e53b6 instanceof Error?_0x3e53b6[_0x228f04(0x119)]:'Menu\x20creation\x20failed');}}};function parseParams(_0x14ebbf){const _0x3025b8=a120_0x51864c;if(!_0x14ebbf)return{};try{const _0x1954f2=JSON['parse'](_0x14ebbf);if(typeof _0x1954f2!==_0x3025b8(0x10f)||_0x1954f2===null||Array[_0x3025b8(0x101)](_0x1954f2))return{};return{'jsUrl':typeof _0x1954f2[_0x3025b8(0x129)]===_0x3025b8(0xff)?_0x1954f2['jsUrl'][_0x3025b8(0x115)]():undefined,'cssUrl':typeof _0x1954f2['cssUrl']===_0x3025b8(0xff)?_0x1954f2[_0x3025b8(0x117)][_0x3025b8(0x115)]():undefined,'pages':Array[_0x3025b8(0x101)](_0x1954f2[_0x3025b8(0x112)])?_0x1954f2['pages'][_0x3025b8(0x120)](String):undefined};}catch{return{};}}
@@ -1 +1 @@
1
- const a121_0x2270df=a121_0x5c21;(function(_0x3bdf87,_0x18987f){const _0x4256e2=a121_0x5c21,_0x5dca1f=_0x3bdf87();while(!![]){try{const _0x247c12=parseInt(_0x4256e2(0x1e6))/0x1*(-parseInt(_0x4256e2(0x1d9))/0x2)+parseInt(_0x4256e2(0x1b7))/0x3*(parseInt(_0x4256e2(0x1e8))/0x4)+parseInt(_0x4256e2(0x1dd))/0x5*(parseInt(_0x4256e2(0x1ea))/0x6)+-parseInt(_0x4256e2(0x1e5))/0x7+parseInt(_0x4256e2(0x1d5))/0x8+-parseInt(_0x4256e2(0x1d4))/0x9+-parseInt(_0x4256e2(0x1c1))/0xa;if(_0x247c12===_0x18987f)break;else _0x5dca1f['push'](_0x5dca1f['shift']());}catch(_0x2ac1bc){_0x5dca1f['push'](_0x5dca1f['shift']());}}}(a121_0x3dea,0xca24f));function a121_0x3dea(){const _0x23fdfe=['\x20\x20Update\x20','\x20menu(s)\x20with\x20JS:\x20','label','params','menu\x20update\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','string','Invalid\x20--mode.\x20Allowed\x20values:\x20replace,\x20patch','Would\x20update\x20','object','7431138QxXLyC','12300256JDabsh','\x20menu(s)...','Fetching\x20online\x20menu\x20list...','str','34OfxuzU','appCode','✓\x20Menu\x20update\x20completed:\x20','menu','3506540JQNROy','\x20updated,\x20','Allow\x20replace\x20mode\x20to\x20remove\x20existing\x20JS\x20resources','patch','Menu\x20update\x20failed','updated','Pre-fill\x20JS/CSS\x20URLs\x20to\x20update.\x20','yellow','5569095FGOzWJ','13467xBngRp','replace','4tjdsos','\x20menu(s)\x20failed','12BWpahk','Menu\x20update\x20completed:\x20','Resource\x20update\x20mode:\x20replace\x20rewrites\x20resources\x20from\x20supplied\x20URLs;\x20patch\x20replaces\x20only\x20supplied\x20resource\x20types','length','isArray','\x20\x20Found\x20','mode','cookie','parse','\x20\x20!\x20No\x20menus\x20with\x20existing\x20resources\x20found','boolean','\x20failed.','Menu\x20update\x20skipped','map','failed','validation','Updating\x20','trim','\x20updated.','selectedAppName','appcode','POST','2808849EzvQug','bool','\x20and\x20CSS:\x20','high-risk-write','No\x20menus\x20with\x20existing\x20resources\x20would\x20be\x20updated.','cssUrl','message','Non-interactive:\x20update\x20all\x20menus\x20without\x20confirmation;\x20requires\x20--params','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','update','11982420IRZopO','rawFlags','jsUrl','skipped','Online\x20menu\x20list\x20fetched','Updated\x20','Failed\x20to\x20fetch\x20online\x20menu\x20list','\x20menu\x20resource\x20set(s).','force','yes'];a121_0x3dea=function(){return _0x23fdfe;};return a121_0x3dea();}import a121_0x4ceb20 from'chalk';import{filterMenusWithResources,doUpdateCdnUrls,fetchOnlineMenuList}from'../../commands/menu/shared/logic.js';import{renderUpdateSummary}from'../../commands/menu/shared/compare-table.js';import{askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{runMenuUpdateCore}from'../../commands/menu/shared/update-core.js';import{isInProject}from'../../context.js';export const menuUpdate={'service':a121_0x2270df(0x1dc),'command':a121_0x2270df(0x1c0),'description':'Update\x20CDN\x20asset\x20URLs\x20for\x20all\x20online\x20menus\x20with\x20existing\x20resources','risk':a121_0x2270df(0x1ba),'flags':[{'name':a121_0x2270df(0x1ce),'type':'string','description':a121_0x2270df(0x1e3)+'JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}'},{'name':a121_0x2270df(0x1ca),'type':'boolean','description':a121_0x2270df(0x1be)},{'name':a121_0x2270df(0x1f0),'type':a121_0x2270df(0x1d0),'description':a121_0x2270df(0x1ec),'enum':[a121_0x2270df(0x1e7),a121_0x2270df(0x1e0)],'default':a121_0x2270df(0x1e7)},{'name':'force','type':a121_0x2270df(0x1f4),'description':a121_0x2270df(0x1df)}],async 'dryRun'(_0x2ab8c1){const _0x14321e=a121_0x2270df;ensureRunnableContext(_0x2ab8c1[_0x14321e(0x1c2)],_0x2ab8c1[_0x14321e(0x1b4)]);const _0x94b033=await runMenuUpdateCore(_0x2ab8c1['appCode'],_0x2ab8c1[_0x14321e(0x1f1)],_0x2ab8c1[_0x14321e(0x1d8)](_0x14321e(0x1ce)),{'mode':parseMode(_0x2ab8c1[_0x14321e(0x1d8)](_0x14321e(0x1f0))),'dryRun':!![],'force':_0x2ab8c1[_0x14321e(0x1b8)](_0x14321e(0x1c9))});return{'method':_0x14321e(0x1b6),'url':'/smartapi/menu/update','body':_0x94b033,'description':_0x94b033['skipped']?_0x14321e(0x1bb):_0x14321e(0x1d2)+(_0x94b033['diffs']?.[_0x14321e(0x1ed)]??0x0)+_0x14321e(0x1c8)};},async 'execute'(_0x2daa8b){const _0x3af8a8=a121_0x2270df;ensureRunnableContext(_0x2daa8b[_0x3af8a8(0x1c2)],_0x2daa8b[_0x3af8a8(0x1b4)]);const _0x5c9f41=_0x2daa8b['flag'](_0x3af8a8(0x1ca)),_0x41507d=_0x2daa8b[_0x3af8a8(0x1d8)](_0x3af8a8(0x1ce)),_0x5c7f2b=parseMode(_0x2daa8b[_0x3af8a8(0x1d8)](_0x3af8a8(0x1f0))),_0x919944=_0x2daa8b[_0x3af8a8(0x1b8)](_0x3af8a8(0x1c9)),_0x206ef3=parseParams(_0x41507d),_0x338e1a=!!(_0x206ef3['jsUrl']||_0x206ef3[_0x3af8a8(0x1bc)]);if(_0x5c9f41||_0x338e1a&&!isInteractive()){const _0x1c770f=await runMenuUpdateCore(_0x2daa8b['appCode'],_0x2daa8b[_0x3af8a8(0x1f1)],_0x41507d,{'mode':_0x5c7f2b,'force':_0x919944});return _0x1c770f['skipped']?writeCliSideChannelLine('!\x20No\x20menus\x20with\x20existing\x20resources\x20found'):(writeCliSideChannelLine(_0x3af8a8(0x1db)+_0x1c770f[_0x3af8a8(0x1e2)]+'\x20menu(s)\x20updated'),_0x1c770f['failed']>0x0&&writeCliSideChannelLine('!\x20'+_0x1c770f['failed']+_0x3af8a8(0x1e9))),{'ok':_0x1c770f[_0x3af8a8(0x1f8)]===0x0,'data':_0x1c770f,'message':_0x1c770f[_0x3af8a8(0x1c4)]?_0x3af8a8(0x1f6):_0x3af8a8(0x1eb)+_0x1c770f[_0x3af8a8(0x1e2)]+'\x20updated,\x20'+_0x1c770f[_0x3af8a8(0x1f8)]+_0x3af8a8(0x1f5)};}requireInteractive();const _0xb493d3=startSpinner(_0x3af8a8(0x1d7));let _0x5d1091;try{_0x5d1091=await fetchOnlineMenuList(_0x2daa8b[_0x3af8a8(0x1da)],_0x2daa8b[_0x3af8a8(0x1f1)]),stopSpinner(_0xb493d3,_0x3af8a8(0x1c5),!![]);}catch(_0x20ba43){stopSpinner(_0xb493d3,_0x3af8a8(0x1c7),![]);throw CliErrors[_0x3af8a8(0x1f9)](_0x20ba43 instanceof Error?_0x20ba43['message']:_0x3af8a8(0x1c7));}const _0x393b24=filterMenusWithResources(_0x5d1091);if(_0x393b24[_0x3af8a8(0x1ed)]===0x0)return writeCliSideChannelLine(a121_0x4ceb20[_0x3af8a8(0x1e4)](_0x3af8a8(0x1f3))),{'ok':!![]};writeCliSideChannelLine(''),writeCliSideChannelLine(a121_0x4ceb20['cyan'](_0x3af8a8(0x1ef)+_0x393b24['length']+'\x20menu(s)\x20with\x20existing\x20resources')),writeCliSideChannelLine(renderUpdateSummary(_0x393b24[_0x3af8a8(0x1f7)](_0x1b8fb9=>_0x1b8fb9[_0x3af8a8(0x1cd)]),[_0x206ef3[_0x3af8a8(0x1c3)],_0x206ef3[_0x3af8a8(0x1bc)]])),writeCliSideChannelLine('');let _0x44e1ed=_0x206ef3[_0x3af8a8(0x1c3)],_0x39d081=_0x206ef3[_0x3af8a8(0x1bc)];!_0x44e1ed&&(_0x44e1ed=await askJsUrl());!_0x39d081&&(_0x39d081=await askCssUrl());const _0x8d1758=await askConfirm(_0x3af8a8(0x1cb)+_0x393b24[_0x3af8a8(0x1ed)]+_0x3af8a8(0x1cc)+_0x44e1ed+_0x3af8a8(0x1b9)+_0x39d081+'?');if(!_0x8d1758)return writeCliSideChannelLine(a121_0x4ceb20['gray']('\x20\x20Cancelled.')),{'ok':!![]};const _0x384530=[_0x44e1ed,_0x39d081],_0x136f57=startSpinner(_0x3af8a8(0x1b1)+_0x393b24['length']+_0x3af8a8(0x1d6));try{const _0x449ad6=await doUpdateCdnUrls(_0x2daa8b[_0x3af8a8(0x1da)],_0x2daa8b[_0x3af8a8(0x1f1)],_0x393b24,_0x384530);return stopSpinner(_0x136f57,_0x3af8a8(0x1c6)+_0x449ad6['updated']+'\x20menu(s)',_0x449ad6['failed']===0x0),{'ok':_0x449ad6[_0x3af8a8(0x1f8)]===0x0,'data':_0x449ad6,'message':_0x449ad6['failed']>0x0?'Menu\x20update\x20completed:\x20'+_0x449ad6[_0x3af8a8(0x1e2)]+_0x3af8a8(0x1de)+_0x449ad6[_0x3af8a8(0x1f8)]+'\x20failed.':_0x3af8a8(0x1eb)+_0x449ad6['updated']+_0x3af8a8(0x1b3)};}catch(_0x36f24c){stopSpinner(_0x136f57,_0x3af8a8(0x1e1),![]);throw CliErrors['validation'](_0x36f24c instanceof Error?_0x36f24c[_0x3af8a8(0x1bd)]:_0x3af8a8(0x1e1));}}};function ensureRunnableContext(_0x4c82ae,_0x371626){const _0x35d46c=a121_0x2270df,_0x394c7d=_0x4c82ae[_0x35d46c(0x1b5)]?String(_0x4c82ae[_0x35d46c(0x1b5)])['trim']():'';if(!isInProject()&&!_0x371626&&!_0x394c7d)throw CliErrors[_0x35d46c(0x1f9)](_0x35d46c(0x1cf)+_0x35d46c(0x1bf));}function a121_0x5c21(_0x5353ef,_0xa6813f){_0x5353ef=_0x5353ef-0x1b1;const _0x3dea9d=a121_0x3dea();let _0x5c2185=_0x3dea9d[_0x5353ef];return _0x5c2185;}function parseMode(_0x579db2){const _0xcf9c74=a121_0x2270df;if(!_0x579db2)return _0xcf9c74(0x1e7);if(_0x579db2===_0xcf9c74(0x1e7)||_0x579db2==='patch')return _0x579db2;throw CliErrors[_0xcf9c74(0x1f9)](_0xcf9c74(0x1d1));}function parseParams(_0x5b9034){const _0x5cee8d=a121_0x2270df;if(!_0x5b9034)return{};try{const _0xe02c85=JSON[_0x5cee8d(0x1f2)](_0x5b9034);if(typeof _0xe02c85!==_0x5cee8d(0x1d3)||_0xe02c85===null||Array[_0x5cee8d(0x1ee)](_0xe02c85))return{};return{'jsUrl':typeof _0xe02c85[_0x5cee8d(0x1c3)]===_0x5cee8d(0x1d0)?_0xe02c85[_0x5cee8d(0x1c3)][_0x5cee8d(0x1b2)]():undefined,'cssUrl':typeof _0xe02c85['cssUrl']===_0x5cee8d(0x1d0)?_0xe02c85['cssUrl']['trim']():undefined};}catch{return{};}}
1
+ const a121_0x31d606=a121_0x5106;(function(_0x20048a,_0xd5e4dd){const _0x300e8b=a121_0x5106,_0x3ed82e=_0x20048a();while(!![]){try{const _0x50c987=parseInt(_0x300e8b(0x20d))/0x1*(parseInt(_0x300e8b(0x204))/0x2)+-parseInt(_0x300e8b(0x1fc))/0x3*(parseInt(_0x300e8b(0x1ef))/0x4)+parseInt(_0x300e8b(0x1e8))/0x5+parseInt(_0x300e8b(0x219))/0x6*(parseInt(_0x300e8b(0x1e9))/0x7)+-parseInt(_0x300e8b(0x1fe))/0x8+parseInt(_0x300e8b(0x203))/0x9*(parseInt(_0x300e8b(0x206))/0xa)+parseInt(_0x300e8b(0x21d))/0xb*(parseInt(_0x300e8b(0x20c))/0xc);if(_0x50c987===_0xd5e4dd)break;else _0x3ed82e['push'](_0x3ed82e['shift']());}catch(_0x229b32){_0x3ed82e['push'](_0x3ed82e['shift']());}}}(a121_0x3e63,0xd9dcf));import a121_0x5e4ba7 from'chalk';import{filterMenusWithResources,doUpdateCdnUrls,fetchOnlineMenuList}from'../../commands/menu/shared/logic.js';import{renderUpdateSummary}from'../../commands/menu/shared/compare-table.js';function a121_0x3e63(){const _0x12b6ec=['✓\x20Menu\x20update\x20completed:\x20','Fetching\x20online\x20menu\x20list...','22YYAEKB','\x20updated,\x20','bool','\x20failed.','\x20\x20Cancelled.','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','No\x20menus\x20with\x20existing\x20resources\x20would\x20be\x20updated.','label','appcode','boolean','Online\x20menu\x20list\x20fetched','failed','\x20updated.','selectedAppName','Updating\x20','appCode','Non-interactive:\x20update\x20all\x20menus\x20without\x20confirmation;\x20requires\x20--params','\x20menu(s)\x20with\x20JS:\x20','cssUrl','Update\x20CDN\x20asset\x20URLs\x20for\x20all\x20online\x20menus\x20with\x20existing\x20resources','yes','yellow','Failed\x20to\x20fetch\x20online\x20menu\x20list','menu','1512035Jndrdj','203xDwRgr','length','rawFlags','message','\x20\x20Update\x20','str','64CmSbYg','cookie','menu\x20update\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','flag','\x20menu\x20resource\x20set(s).','jsUrl','isArray','Allow\x20replace\x20mode\x20to\x20remove\x20existing\x20JS\x20resources','force','trim','Menu\x20update\x20completed:\x20','parse','high-risk-write','92199OFALUt','validation','11139344XhCTQV','Menu\x20update\x20skipped','\x20\x20Found\x20','Invalid\x20--mode.\x20Allowed\x20values:\x20replace,\x20patch','Would\x20update\x20','99LmYUpd','16HcjxgO','params','412690MwqhkK','skipped','replace','\x20menu(s)...','patch','updated','2116272WGhHMk','27473ywRJHV','Menu\x20update\x20failed','map','Updated\x20','!\x20No\x20menus\x20with\x20existing\x20resources\x20found','update','mode','Resource\x20update\x20mode:\x20replace\x20rewrites\x20resources\x20from\x20supplied\x20URLs;\x20patch\x20replaces\x20only\x20supplied\x20resource\x20types','object','POST','\x20menu(s)\x20updated','string','299514CjkupP','gray'];a121_0x3e63=function(){return _0x12b6ec;};return a121_0x3e63();}import{askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{runMenuUpdateCore}from'../../commands/menu/shared/update-core.js';import{isInProject}from'../../context.js';export const menuUpdate={'service':a121_0x31d606(0x1e7),'command':a121_0x31d606(0x212),'description':a121_0x31d606(0x230),'risk':a121_0x31d606(0x1fb),'flags':[{'name':a121_0x31d606(0x205),'type':a121_0x31d606(0x218),'description':'Pre-fill\x20JS/CSS\x20URLs\x20to\x20update.\x20'+'JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}'},{'name':a121_0x31d606(0x231),'type':a121_0x31d606(0x226),'description':a121_0x31d606(0x22d)},{'name':'mode','type':a121_0x31d606(0x218),'description':a121_0x31d606(0x214),'enum':['replace',a121_0x31d606(0x20a)],'default':a121_0x31d606(0x208)},{'name':a121_0x31d606(0x1f7),'type':a121_0x31d606(0x226),'description':a121_0x31d606(0x1f6)}],async 'dryRun'(_0x112509){const _0x3a4108=a121_0x31d606;ensureRunnableContext(_0x112509[_0x3a4108(0x1eb)],_0x112509[_0x3a4108(0x22a)]);const _0x49c412=await runMenuUpdateCore(_0x112509[_0x3a4108(0x22c)],_0x112509[_0x3a4108(0x1f0)],_0x112509['str']('params'),{'mode':parseMode(_0x112509[_0x3a4108(0x1ee)](_0x3a4108(0x213))),'dryRun':!![],'force':_0x112509[_0x3a4108(0x21f)](_0x3a4108(0x1f7))});return{'method':_0x3a4108(0x216),'url':'/smartapi/menu/update','body':_0x49c412,'description':_0x49c412[_0x3a4108(0x207)]?_0x3a4108(0x223):_0x3a4108(0x202)+(_0x49c412['diffs']?.[_0x3a4108(0x1ea)]??0x0)+_0x3a4108(0x1f3)};},async 'execute'(_0x31b20a){const _0x10f559=a121_0x31d606;ensureRunnableContext(_0x31b20a[_0x10f559(0x1eb)],_0x31b20a[_0x10f559(0x22a)]);const _0x102218=_0x31b20a[_0x10f559(0x1f2)](_0x10f559(0x231)),_0x416156=_0x31b20a['str'](_0x10f559(0x205)),_0x379613=parseMode(_0x31b20a[_0x10f559(0x1ee)](_0x10f559(0x213))),_0x5e9aac=_0x31b20a[_0x10f559(0x21f)](_0x10f559(0x1f7)),_0x5cd7e6=parseParams(_0x416156),_0xeaf5da=!!(_0x5cd7e6['jsUrl']||_0x5cd7e6[_0x10f559(0x22f)]);if(_0x102218||_0xeaf5da&&!isInteractive()){const _0x3ebd3b=await runMenuUpdateCore(_0x31b20a[_0x10f559(0x22c)],_0x31b20a[_0x10f559(0x1f0)],_0x416156,{'mode':_0x379613,'force':_0x5e9aac});return _0x3ebd3b[_0x10f559(0x207)]?writeCliSideChannelLine(_0x10f559(0x211)):(writeCliSideChannelLine(_0x10f559(0x21b)+_0x3ebd3b[_0x10f559(0x20b)]+_0x10f559(0x217)),_0x3ebd3b['failed']>0x0&&writeCliSideChannelLine('!\x20'+_0x3ebd3b[_0x10f559(0x228)]+'\x20menu(s)\x20failed')),{'ok':_0x3ebd3b[_0x10f559(0x228)]===0x0,'data':_0x3ebd3b,'message':_0x3ebd3b[_0x10f559(0x207)]?_0x10f559(0x1ff):_0x10f559(0x1f9)+_0x3ebd3b[_0x10f559(0x20b)]+_0x10f559(0x21e)+_0x3ebd3b[_0x10f559(0x228)]+_0x10f559(0x220)};}requireInteractive();const _0x43e810=startSpinner(_0x10f559(0x21c));let _0x276fe5;try{_0x276fe5=await fetchOnlineMenuList(_0x31b20a[_0x10f559(0x22c)],_0x31b20a[_0x10f559(0x1f0)]),stopSpinner(_0x43e810,_0x10f559(0x227),!![]);}catch(_0x9fb5e5){stopSpinner(_0x43e810,_0x10f559(0x233),![]);throw CliErrors[_0x10f559(0x1fd)](_0x9fb5e5 instanceof Error?_0x9fb5e5[_0x10f559(0x1ec)]:_0x10f559(0x233));}const _0x179ad8=filterMenusWithResources(_0x276fe5);if(_0x179ad8['length']===0x0)return writeCliSideChannelLine(a121_0x5e4ba7[_0x10f559(0x232)]('\x20\x20!\x20No\x20menus\x20with\x20existing\x20resources\x20found')),{'ok':!![]};writeCliSideChannelLine(''),writeCliSideChannelLine(a121_0x5e4ba7['cyan'](_0x10f559(0x200)+_0x179ad8[_0x10f559(0x1ea)]+'\x20menu(s)\x20with\x20existing\x20resources')),writeCliSideChannelLine(renderUpdateSummary(_0x179ad8[_0x10f559(0x20f)](_0x140877=>_0x140877[_0x10f559(0x224)]),[_0x5cd7e6[_0x10f559(0x1f4)],_0x5cd7e6[_0x10f559(0x22f)]])),writeCliSideChannelLine('');let _0x247cd6=_0x5cd7e6[_0x10f559(0x1f4)],_0x1d0c6a=_0x5cd7e6[_0x10f559(0x22f)];!_0x247cd6&&(_0x247cd6=await askJsUrl());!_0x1d0c6a&&(_0x1d0c6a=await askCssUrl());const _0x349028=await askConfirm(_0x10f559(0x1ed)+_0x179ad8[_0x10f559(0x1ea)]+_0x10f559(0x22e)+_0x247cd6+'\x20and\x20CSS:\x20'+_0x1d0c6a+'?');if(!_0x349028)return writeCliSideChannelLine(a121_0x5e4ba7[_0x10f559(0x21a)](_0x10f559(0x221))),{'ok':!![]};const _0x1c2f89=[_0x247cd6,_0x1d0c6a],_0x1011bc=startSpinner(_0x10f559(0x22b)+_0x179ad8[_0x10f559(0x1ea)]+_0x10f559(0x209));try{const _0x31628c=await doUpdateCdnUrls(_0x31b20a[_0x10f559(0x22c)],_0x31b20a[_0x10f559(0x1f0)],_0x179ad8,_0x1c2f89);return stopSpinner(_0x1011bc,_0x10f559(0x210)+_0x31628c[_0x10f559(0x20b)]+'\x20menu(s)',_0x31628c[_0x10f559(0x228)]===0x0),{'ok':_0x31628c['failed']===0x0,'data':_0x31628c,'message':_0x31628c['failed']>0x0?'Menu\x20update\x20completed:\x20'+_0x31628c[_0x10f559(0x20b)]+'\x20updated,\x20'+_0x31628c['failed']+'\x20failed.':_0x10f559(0x1f9)+_0x31628c[_0x10f559(0x20b)]+_0x10f559(0x229)};}catch(_0x39aee9){stopSpinner(_0x1011bc,_0x10f559(0x20e),![]);throw CliErrors[_0x10f559(0x1fd)](_0x39aee9 instanceof Error?_0x39aee9[_0x10f559(0x1ec)]:_0x10f559(0x20e));}}};function ensureRunnableContext(_0x406e3c,_0xd0c087){const _0x672c67=a121_0x31d606,_0x393fad=_0x406e3c[_0x672c67(0x225)]?String(_0x406e3c['appcode'])[_0x672c67(0x1f8)]():'';if(!isInProject()&&!_0xd0c087&&!_0x393fad)throw CliErrors['validation'](_0x672c67(0x1f1)+_0x672c67(0x222));}function a121_0x5106(_0x2830e6,_0x54ff2f){_0x2830e6=_0x2830e6-0x1e7;const _0x3e63b2=a121_0x3e63();let _0x51067f=_0x3e63b2[_0x2830e6];return _0x51067f;}function parseMode(_0x596b5e){const _0x355a0f=a121_0x31d606;if(!_0x596b5e)return _0x355a0f(0x208);if(_0x596b5e==='replace'||_0x596b5e===_0x355a0f(0x20a))return _0x596b5e;throw CliErrors[_0x355a0f(0x1fd)](_0x355a0f(0x201));}function parseParams(_0x214889){const _0xb53c88=a121_0x31d606;if(!_0x214889)return{};try{const _0x29ea83=JSON[_0xb53c88(0x1fa)](_0x214889);if(typeof _0x29ea83!==_0xb53c88(0x215)||_0x29ea83===null||Array[_0xb53c88(0x1f5)](_0x29ea83))return{};return{'jsUrl':typeof _0x29ea83[_0xb53c88(0x1f4)]===_0xb53c88(0x218)?_0x29ea83[_0xb53c88(0x1f4)][_0xb53c88(0x1f8)]():undefined,'cssUrl':typeof _0x29ea83[_0xb53c88(0x22f)]===_0xb53c88(0x218)?_0x29ea83[_0xb53c88(0x22f)][_0xb53c88(0x1f8)]():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- const a122_0x17802b=a122_0x33b9;(function(_0x515782,_0x5e706c){const _0x3c3d2e=a122_0x33b9,_0x44a27e=_0x515782();while(!![]){try{const _0x34a735=parseInt(_0x3c3d2e(0x1ef))/0x1*(parseInt(_0x3c3d2e(0x1f8))/0x2)+-parseInt(_0x3c3d2e(0x1e5))/0x3+parseInt(_0x3c3d2e(0x1fd))/0x4*(parseInt(_0x3c3d2e(0x1e2))/0x5)+-parseInt(_0x3c3d2e(0x1e1))/0x6+-parseInt(_0x3c3d2e(0x201))/0x7+-parseInt(_0x3c3d2e(0x1e8))/0x8+-parseInt(_0x3c3d2e(0x1e7))/0x9*(parseInt(_0x3c3d2e(0x1de))/0xa);if(_0x34a735===_0x5e706c)break;else _0x44a27e['push'](_0x44a27e['shift']());}catch(_0x18aa9c){_0x44a27e['push'](_0x44a27e['shift']());}}}(a122_0xfc89,0x332a8));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const NOTIFICATION_CHANNEL_TYPES=[a122_0x17802b(0x1f9),a122_0x17802b(0x1e6),'DINGTALK',a122_0x17802b(0x1ec),'WEBHOOK'];function a122_0xfc89(){const _0x162ebb=['\x20notification\x20config(s)','WECOM','channelType','updateTime','6577wMPzFw','createTime','apiError','number','str','string','type','Allowed\x20values:\x20','description','76ymgOtL','EMAIL','trim','appCode','Found\x20','4sBiiUW','Invalid\x20--type:\x20','validation','notification','317156ahuAbo','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','3980tUPVbz','config-list','configCode','495744uhlrFk','1685195foqIqV','map','Notification\x20channel\x20type','259494BNwLXK','FEISHU','882OTbFbB','991640wnYDVB','join','length'];a122_0xfc89=function(){return _0x162ebb;};return a122_0xfc89();}export const notificationConfigList={'service':a122_0x17802b(0x200),'command':a122_0x17802b(0x1df),'description':a122_0x17802b(0x1dd),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':'string','description':a122_0x17802b(0x1e4),'enum':NOTIFICATION_CHANNEL_TYPES,'default':a122_0x17802b(0x1f9)}],async 'validate'(_0x53420e){readChannelType(_0x53420e);},async 'execute'(_0x5e75c2){const _0x41f19f=a122_0x17802b,_0x2f286f=readChannelType(_0x5e75c2),_0x5acecf=await listNotificationChannelConfigs(_0x5e75c2[_0x41f19f(0x1fb)],_0x2f286f),_0x18edcf=_0x5acecf[_0x41f19f(0x1e3)](projectNotificationConfig);return{'ok':!![],'data':{'appCode':_0x5e75c2[_0x41f19f(0x1fb)],'channelType':_0x2f286f,'count':_0x18edcf[_0x41f19f(0x1ea)],'configs':_0x18edcf},'message':_0x41f19f(0x1fc)+_0x18edcf[_0x41f19f(0x1ea)]+'\x20'+_0x2f286f+_0x41f19f(0x1eb)};}};function readChannelType(_0x54e9b4){const _0x311c48=a122_0x17802b,_0x1115d9=_0x54e9b4[_0x311c48(0x1f3)](_0x311c48(0x1f5))[_0x311c48(0x1fa)]()||_0x311c48(0x1f9);if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x1115d9))throw CliErrors[_0x311c48(0x1ff)](_0x311c48(0x1fe)+_0x1115d9,_0x311c48(0x1f6)+NOTIFICATION_CHANNEL_TYPES[_0x311c48(0x1e9)](',\x20')+'.');return _0x1115d9;}function projectNotificationConfig(_0x4c5858,_0x2702f1){const _0xe02a3=a122_0x17802b;return{'id':typeof _0x4c5858['id']===_0xe02a3(0x1f2)?_0x4c5858['id']:null,'configCode':requireConfigString(_0x4c5858,_0xe02a3(0x1e0),_0x2702f1),'configName':requireConfigString(_0x4c5858,'configName',_0x2702f1),'channelType':requireConfigString(_0x4c5858,_0xe02a3(0x1ed),_0x2702f1),'description':normalizeNullableString(_0x4c5858[_0xe02a3(0x1f7)]),'createTime':normalizeNullableString(_0x4c5858[_0xe02a3(0x1f0)]),'updateTime':normalizeNullableString(_0x4c5858[_0xe02a3(0x1ee)])};}function a122_0x33b9(_0x4d9c55,_0xf83e53){_0x4d9c55=_0x4d9c55-0x1dd;const _0xfc89d4=a122_0xfc89();let _0x33b9db=_0xfc89d4[_0x4d9c55];return _0x33b9db;}function requireConfigString(_0x5bd4b4,_0x4a9acc,_0x49f306){const _0x1857ba=a122_0x17802b,_0x211056=_0x5bd4b4[_0x4a9acc];if(typeof _0x211056!=='string'||_0x211056[_0x1857ba(0x1fa)]()==='')throw CliErrors[_0x1857ba(0x1f1)]('Invalid\x20notification\x20config\x20response.','Item\x20'+(_0x49f306+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x4a9acc+'\x22.');return _0x211056[_0x1857ba(0x1fa)]();}function normalizeNullableString(_0x182025){const _0x497d50=a122_0x17802b;return typeof _0x182025===_0x497d50(0x1f4)?_0x182025:null;}
1
+ const a122_0x432cde=a122_0x325f;function a122_0x325f(_0x4f6444,_0x3f78f5){_0x4f6444=_0x4f6444-0xda;const _0x322f87=a122_0x322f();let _0x325f79=_0x322f87[_0x4f6444];return _0x325f79;}(function(_0x16a456,_0x2b7374){const _0x1d505c=a122_0x325f,_0x338041=_0x16a456();while(!![]){try{const _0x4137d7=-parseInt(_0x1d505c(0xf6))/0x1*(-parseInt(_0x1d505c(0xe4))/0x2)+parseInt(_0x1d505c(0xe6))/0x3*(parseInt(_0x1d505c(0xfe))/0x4)+parseInt(_0x1d505c(0xdf))/0x5*(-parseInt(_0x1d505c(0xf7))/0x6)+parseInt(_0x1d505c(0xde))/0x7+parseInt(_0x1d505c(0xf1))/0x8+parseInt(_0x1d505c(0xf9))/0x9+-parseInt(_0x1d505c(0xe9))/0xa;if(_0x4137d7===_0x2b7374)break;else _0x338041['push'](_0x338041['shift']());}catch(_0x49f701){_0x338041['push'](_0x338041['shift']());}}}(a122_0x322f,0x877a8));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const NOTIFICATION_CHANNEL_TYPES=[a122_0x432cde(0xec),a122_0x432cde(0xea),a122_0x432cde(0xdd),'WECOM','WEBHOOK'];export const notificationConfigList={'service':a122_0x432cde(0xe8),'command':a122_0x432cde(0xeb),'description':'List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','risk':a122_0x432cde(0xda),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a122_0x432cde(0xdc),'type':'string','description':a122_0x432cde(0xf3),'enum':NOTIFICATION_CHANNEL_TYPES,'default':a122_0x432cde(0xec)}],async 'validate'(_0x203efc){readChannelType(_0x203efc);},async 'execute'(_0x2ebc75){const _0x2cebe9=a122_0x432cde,_0x149591=readChannelType(_0x2ebc75),_0x323211=await listNotificationChannelConfigs(_0x2ebc75[_0x2cebe9(0xf0)],_0x149591),_0x130211=_0x323211['map'](projectNotificationConfig);return{'ok':!![],'data':{'appCode':_0x2ebc75[_0x2cebe9(0xf0)],'channelType':_0x149591,'count':_0x130211[_0x2cebe9(0xe2)],'configs':_0x130211},'message':_0x2cebe9(0xe1)+_0x130211[_0x2cebe9(0xe2)]+'\x20'+_0x149591+_0x2cebe9(0xfc)};}};function readChannelType(_0x21c124){const _0x55f3b9=a122_0x432cde,_0x5b9d06=_0x21c124[_0x55f3b9(0xed)](_0x55f3b9(0xdc))[_0x55f3b9(0xf4)]()||_0x55f3b9(0xec);if(!NOTIFICATION_CHANNEL_TYPES[_0x55f3b9(0xe3)](_0x5b9d06))throw CliErrors['validation'](_0x55f3b9(0xe0)+_0x5b9d06,_0x55f3b9(0xee)+NOTIFICATION_CHANNEL_TYPES[_0x55f3b9(0xfa)](',\x20')+'.');return _0x5b9d06;}function projectNotificationConfig(_0x413f74,_0x32261d){const _0x5a8f19=a122_0x432cde;return{'id':typeof _0x413f74['id']===_0x5a8f19(0xf2)?_0x413f74['id']:null,'configCode':requireConfigString(_0x413f74,'configCode',_0x32261d),'configName':requireConfigString(_0x413f74,'configName',_0x32261d),'channelType':requireConfigString(_0x413f74,'channelType',_0x32261d),'description':normalizeNullableString(_0x413f74[_0x5a8f19(0xe5)]),'createTime':normalizeNullableString(_0x413f74[_0x5a8f19(0xef)]),'updateTime':normalizeNullableString(_0x413f74[_0x5a8f19(0xdb)])};}function requireConfigString(_0x1195cb,_0x3161b5,_0x1b449b){const _0x21bec8=a122_0x432cde,_0x2b2b01=_0x1195cb[_0x3161b5];if(typeof _0x2b2b01!==_0x21bec8(0xf5)||_0x2b2b01[_0x21bec8(0xf4)]()==='')throw CliErrors[_0x21bec8(0xf8)](_0x21bec8(0xfb),_0x21bec8(0xfd)+(_0x1b449b+0x1)+_0x21bec8(0xe7)+_0x3161b5+'\x22.');return _0x2b2b01['trim']();}function a122_0x322f(){const _0x109ac8=['appCode','5587392NRKCct','number','Notification\x20channel\x20type','trim','string','62GFwlIQ','6vhwAZI','apiError','6538419COuTGZ','join','Invalid\x20notification\x20config\x20response.','\x20notification\x20config(s)','Item\x20','106484ocTJoB','read','updateTime','type','DINGTALK','5935790iIulXD','2817045dImwkN','Invalid\x20--type:\x20','Found\x20','length','includes','16924CEHETQ','description','93SkOrcb','\x20is\x20missing\x20required\x20field\x20\x22','notification','25044510fYbgHo','FEISHU','config-list','EMAIL','str','Allowed\x20values:\x20','createTime'];a122_0x322f=function(){return _0x109ac8;};return a122_0x322f();}function normalizeNullableString(_0x195cf2){return typeof _0x195cf2==='string'?_0x195cf2:null;}
@@ -1 +1 @@
1
- function a123_0x1cfd(_0x383fce,_0x373836){_0x383fce=_0x383fce-0xc3;const _0x28261f=a123_0x2826();let _0x1cfd98=_0x28261f[_0x383fce];return _0x1cfd98;}(function(_0x1b6108,_0x537c4e){const _0x31ce11=a123_0x1cfd,_0x444e73=_0x1b6108();while(!![]){try{const _0x2084f9=-parseInt(_0x31ce11(0xcc))/0x1*(parseInt(_0x31ce11(0xc4))/0x2)+parseInt(_0x31ce11(0xc3))/0x3+parseInt(_0x31ce11(0xc7))/0x4*(-parseInt(_0x31ce11(0xc6))/0x5)+-parseInt(_0x31ce11(0xcb))/0x6*(parseInt(_0x31ce11(0xc5))/0x7)+-parseInt(_0x31ce11(0xc8))/0x8+parseInt(_0x31ce11(0xc9))/0x9+parseInt(_0x31ce11(0xca))/0xa;if(_0x2084f9===_0x537c4e)break;else _0x444e73['push'](_0x444e73['shift']());}catch(_0x297b9d){_0x444e73['push'](_0x444e73['shift']());}}}(a123_0x2826,0x8fe52));function a123_0x2826(){const _0xd4c54e=['23771030vXBlhL','78EREwPJ','530169vUnHGd','843066knZcAn','2zbwVST','606963mNUjgJ','70375EwMRLP','132lmeAFw','8486488GUTcpy','10025469QunHQu'];a123_0x2826=function(){return _0xd4c54e;};return a123_0x2826();}import{notificationConfigList}from'../../commands/notification/config-list.js';export const notificationDefinitions=[notificationConfigList];
1
+ function a123_0x46b7(_0xcb85e,_0x18b499){_0xcb85e=_0xcb85e-0x6a;const _0x42e802=a123_0x42e8();let _0x46b7d7=_0x42e802[_0xcb85e];return _0x46b7d7;}(function(_0x46ac8e,_0x552f48){const _0x4779b7=a123_0x46b7,_0x33ae23=_0x46ac8e();while(!![]){try{const _0x1e6e4c=-parseInt(_0x4779b7(0x74))/0x1*(parseInt(_0x4779b7(0x6a))/0x2)+parseInt(_0x4779b7(0x71))/0x3*(-parseInt(_0x4779b7(0x72))/0x4)+-parseInt(_0x4779b7(0x73))/0x5+parseInt(_0x4779b7(0x6d))/0x6*(parseInt(_0x4779b7(0x70))/0x7)+parseInt(_0x4779b7(0x75))/0x8+-parseInt(_0x4779b7(0x6f))/0x9*(parseInt(_0x4779b7(0x6e))/0xa)+-parseInt(_0x4779b7(0x6b))/0xb*(-parseInt(_0x4779b7(0x6c))/0xc);if(_0x1e6e4c===_0x552f48)break;else _0x33ae23['push'](_0x33ae23['shift']());}catch(_0x4cc1f7){_0x33ae23['push'](_0x33ae23['shift']());}}}(a123_0x42e8,0xa114a));import{notificationConfigList}from'../../commands/notification/config-list.js';export const notificationDefinitions=[notificationConfigList];function a123_0x42e8(){const _0x9ad58b=['28YxknvO','8533520nLZvjW','71368KlJBXo','1947XSprsf','75900jqebiQ','5435994fcCtub','142210WFnvJC','396BAHduX','7mpEBsL','15ltnatn','200444atkUWs','2784985gnOWph'];a123_0x42e8=function(){return _0x9ad58b;};return a123_0x42e8();}
@@ -1 +1 @@
1
- const a124_0x5672dd=a124_0x92e8;(function(_0x50da30,_0x41be0c){const _0x42cbad=a124_0x92e8,_0x286aa5=_0x50da30();while(!![]){try{const _0x5d6a4d=-parseInt(_0x42cbad(0x1ac))/0x1*(parseInt(_0x42cbad(0x18f))/0x2)+parseInt(_0x42cbad(0x1a3))/0x3+parseInt(_0x42cbad(0x19a))/0x4+parseInt(_0x42cbad(0x1b8))/0x5+parseInt(_0x42cbad(0x1b6))/0x6*(-parseInt(_0x42cbad(0x1a1))/0x7)+-parseInt(_0x42cbad(0x195))/0x8*(-parseInt(_0x42cbad(0x196))/0x9)+-parseInt(_0x42cbad(0x1b7))/0xa;if(_0x5d6a4d===_0x41be0c)break;else _0x286aa5['push'](_0x286aa5['shift']());}catch(_0x2385de){_0x286aa5['push'](_0x286aa5['shift']());}}}(a124_0x5b64,0x3e76a));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessGenerateOperationState,assessStandardPageState,buildPageGenerateOperationStatusQueryCommand,buildStandardPageStatusQueryCommand,createPageGenerateClientOperationId,getUndeletedRelatedPages,loadDatasetDetailForPage,loadStandardPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';function a124_0x5b64(){const _0x3a108d=['allowGenerate','currentStep','clientOperationId','appCode','37IWFtgG','SUCCESS','page','/smartapi/lovrabet/dataset/','compress','已提交生成任务','bool','reused','standardPageStatus','Actually\x20execute\x20the\x20generation.\x20Without\x20this\x20flag,\x20only\x20a\x20dry-run\x20preview\x20is\x20shown.','1581126aQDqqA','40390hUSMFr','1507260ayOZYp','dataset','generate-start','related-pages-fallback','/generate-standard-pages/start','22030qYdlBj','dryRun','PARTIAL_SUCCESS','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','boolean','status','1882624RDmIII','9ykhUwd','POST','alias','nextAction','776768eIxdKJ','operationId','name','precheck','code','Dry-run\x20preview\x20(pass\x20--apply\x20to\x20execute\x20the\x20generation)','Start\x20async\x20Smart\x20List\x20Page\x20generation\x20from\x20a\x20dataset','7tFtxcO','apply','599979nWMddh','message','source','progressRate','write'];a124_0x5b64=function(){return _0x3a108d;};return a124_0x5b64();}import{startGenerateStandardPages}from'../../core/api-client.js';function a124_0x92e8(_0x2006c5,_0x5cc869){_0x2006c5=_0x2006c5-0x18f;const _0x5b6412=a124_0x5b64();let _0x92e8dd=_0x5b6412[_0x2006c5];return _0x92e8dd;}export const pageGenerateStart={'service':a124_0x5672dd(0x1ae),'command':a124_0x5672dd(0x1ba),'description':a124_0x5672dd(0x1a0),'risk':a124_0x5672dd(0x1a7),'defaultOutputFormat':a124_0x5672dd(0x1b0),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a124_0x5672dd(0x198),'type':'string','description':a124_0x5672dd(0x192)},{'name':a124_0x5672dd(0x1a2),'type':a124_0x5672dd(0x193),'description':a124_0x5672dd(0x1b5)}],async 'validate'(_0x3ace02){validateDatasetSelector(_0x3ace02);},async 'dryRun'(_0x2ec6d6){const _0x1ea612=a124_0x5672dd,_0x5174a4=await prepare(_0x2ec6d6);return{'method':_0x1ea612(0x197),'url':_0x1ea612(0x1af)+_0x5174a4[_0x1ea612(0x1b9)][_0x1ea612(0x19e)]+_0x1ea612(0x1bc),'body':{'appCode':_0x2ec6d6[_0x1ea612(0x1ab)],'clientOperationId':_0x5174a4[_0x1ea612(0x1aa)]},'description':serializeDryRunDescription({'dataset':{'id':_0x5174a4[_0x1ea612(0x1b9)]['id'],'code':_0x5174a4[_0x1ea612(0x1b9)][_0x1ea612(0x19e)],'name':_0x5174a4[_0x1ea612(0x1b9)][_0x1ea612(0x19c)],'fieldCount':_0x5174a4[_0x1ea612(0x1b9)]['fieldCount']},'precheckSource':_0x5174a4[_0x1ea612(0x1b4)]?.[_0x1ea612(0x1a5)]??_0x1ea612(0x1bb),'action':_0x1ea612(0x1ba),'clientOperationId':_0x5174a4[_0x1ea612(0x1aa)],'plannedStatus':_0x5174a4[_0x1ea612(0x19d)]['status'],'reason':_0x5174a4[_0x1ea612(0x19d)]['message']})};},async 'execute'(_0x1e98fb){const _0x506517=a124_0x5672dd;if(!_0x1e98fb[_0x506517(0x1b2)](_0x506517(0x1a2))){const _0x55f695=await pageGenerateStart[_0x506517(0x190)](_0x1e98fb);return{'ok':!![],'message':_0x506517(0x19f),'data':_0x55f695};}const _0x4bf5a7=await prepare(_0x1e98fb);if(!_0x4bf5a7[_0x506517(0x19d)][_0x506517(0x1a8)])return{'ok':![],'message':_0x4bf5a7[_0x506517(0x19d)][_0x506517(0x1a4)],'data':{'datasetCode':_0x4bf5a7[_0x506517(0x1b9)]['code'],'clientOperationId':_0x4bf5a7[_0x506517(0x1aa)],'precheckSource':_0x4bf5a7[_0x506517(0x1b4)]?.[_0x506517(0x1a5)]??_0x506517(0x1bb),'status':_0x4bf5a7[_0x506517(0x19d)][_0x506517(0x194)],'manualResolutionRequired':_0x4bf5a7[_0x506517(0x19d)]['manualResolutionRequired'],'nextAction':_0x4bf5a7[_0x506517(0x19d)]['nextAction'],'query':{'command':buildStandardPageStatusQueryCommand(_0x4bf5a7[_0x506517(0x1b9)][_0x506517(0x19e)],_0x1e98fb[_0x506517(0x1ab)])},'standardPageStatus':_0x4bf5a7[_0x506517(0x1b4)]}};const _0x2f480f=await startGenerateStandardPages(_0x1e98fb['appCode'],_0x4bf5a7[_0x506517(0x1b9)][_0x506517(0x19e)],{'clientOperationId':_0x4bf5a7['clientOperationId']}),_0x502509=_0x2f480f[_0x506517(0x194)]===_0x506517(0x1ad)||_0x2f480f['status']===_0x506517(0x191)?await loadStandardPageStatusForGenerate(_0x1e98fb,_0x4bf5a7[_0x506517(0x1b9)][_0x506517(0x19e)]):null,_0x446546=assessGenerateOperationState(_0x4bf5a7[_0x506517(0x1b9)]['code'],_0x2f480f[_0x506517(0x194)],_0x502509);return{'ok':!![],'message':_0x2f480f['reused']?'复用已有生成任务':_0x506517(0x1b1),'data':{'datasetCode':_0x4bf5a7[_0x506517(0x1b9)][_0x506517(0x19e)],'appCode':_0x1e98fb[_0x506517(0x1ab)],'operationId':_0x2f480f[_0x506517(0x19b)]??null,'clientOperationId':_0x4bf5a7[_0x506517(0x1aa)],'jobStatus':_0x2f480f['status']??null,'progressRate':typeof _0x2f480f[_0x506517(0x1a6)]==='number'?_0x2f480f[_0x506517(0x1a6)]:null,'currentStep':_0x2f480f[_0x506517(0x1a9)]??null,'reused':_0x2f480f[_0x506517(0x1b3)]===!![],'status':_0x446546[_0x506517(0x194)],'manualResolutionRequired':_0x446546['manualResolutionRequired'],'nextAction':_0x446546[_0x506517(0x199)],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x4bf5a7[_0x506517(0x1b9)][_0x506517(0x19e)],{'appCode':_0x1e98fb[_0x506517(0x1ab)],'operationId':_0x2f480f[_0x506517(0x19b)],'clientOperationId':_0x4bf5a7['clientOperationId']})},'standardPageStatus':_0x502509}};}};async function prepare(_0x47e5d8){const _0x2f6b27=a124_0x5672dd,_0x143203=await loadDatasetDetailForPage(_0x47e5d8),_0x51c6ed=await loadStandardPageStatusForGenerate(_0x47e5d8,_0x143203['code']),_0x1c0213=getUndeletedRelatedPages(_0x143203);return{'dataset':_0x143203,'standardPageStatus':_0x51c6ed,'clientOperationId':createPageGenerateClientOperationId(),'precheck':assessStandardPageState(_0x143203[_0x2f6b27(0x19e)],_0x51c6ed,{'fallbackUndeletedPages':_0x1c0213})};}
1
+ const a124_0x948378=a124_0x36db;(function(_0x146452,_0x5b387c){const _0x1cbb97=a124_0x36db,_0x16c969=_0x146452();while(!![]){try{const _0x37e3a1=-parseInt(_0x1cbb97(0x1d0))/0x1+-parseInt(_0x1cbb97(0x1d4))/0x2*(parseInt(_0x1cbb97(0x1da))/0x3)+-parseInt(_0x1cbb97(0x1c7))/0x4*(parseInt(_0x1cbb97(0x1c4))/0x5)+-parseInt(_0x1cbb97(0x1d1))/0x6*(parseInt(_0x1cbb97(0x1e6))/0x7)+-parseInt(_0x1cbb97(0x1c8))/0x8+parseInt(_0x1cbb97(0x1bf))/0x9+parseInt(_0x1cbb97(0x1d7))/0xa;if(_0x37e3a1===_0x5b387c)break;else _0x16c969['push'](_0x16c969['shift']());}catch(_0x4fd0b1){_0x16c969['push'](_0x16c969['shift']());}}}(a124_0x41bc,0xad37c));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessGenerateOperationState,assessStandardPageState,buildPageGenerateOperationStatusQueryCommand,buildStandardPageStatusQueryCommand,createPageGenerateClientOperationId,getUndeletedRelatedPages,loadDatasetDetailForPage,loadStandardPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';import{startGenerateStandardPages}from'../../core/api-client.js';function a124_0x36db(_0x296c38,_0x2edffe){_0x296c38=_0x296c38-0x1bd;const _0x41bc86=a124_0x41bc();let _0x36db03=_0x41bc86[_0x296c38];return _0x36db03;}export const pageGenerateStart={'service':a124_0x948378(0x1ce),'command':a124_0x948378(0x1e1),'description':a124_0x948378(0x1ca),'risk':a124_0x948378(0x1be),'defaultOutputFormat':a124_0x948378(0x1e4),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a124_0x948378(0x1d9),'type':a124_0x948378(0x1d6),'description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'},{'name':'apply','type':a124_0x948378(0x1d2),'description':a124_0x948378(0x1d3)}],async 'validate'(_0x547f8a){validateDatasetSelector(_0x547f8a);},async 'dryRun'(_0x46f771){const _0x20d6a1=a124_0x948378,_0x184973=await prepare(_0x46f771);return{'method':_0x20d6a1(0x1e5),'url':_0x20d6a1(0x1e0)+_0x184973['dataset'][_0x20d6a1(0x1db)]+_0x20d6a1(0x1de),'body':{'appCode':_0x46f771[_0x20d6a1(0x1e3)],'clientOperationId':_0x184973[_0x20d6a1(0x1cf)]},'description':serializeDryRunDescription({'dataset':{'id':_0x184973[_0x20d6a1(0x1c1)]['id'],'code':_0x184973[_0x20d6a1(0x1c1)][_0x20d6a1(0x1db)],'name':_0x184973[_0x20d6a1(0x1c1)]['name'],'fieldCount':_0x184973[_0x20d6a1(0x1c1)]['fieldCount']},'precheckSource':_0x184973['standardPageStatus']?.[_0x20d6a1(0x1dc)]??_0x20d6a1(0x1d5),'action':_0x20d6a1(0x1e1),'clientOperationId':_0x184973[_0x20d6a1(0x1cf)],'plannedStatus':_0x184973['precheck'][_0x20d6a1(0x1c0)],'reason':_0x184973[_0x20d6a1(0x1c9)][_0x20d6a1(0x1bd)]})};},async 'execute'(_0x2c4d6b){const _0xef3585=a124_0x948378;if(!_0x2c4d6b['bool'](_0xef3585(0x1cc))){const _0x43649a=await pageGenerateStart['dryRun'](_0x2c4d6b);return{'ok':!![],'message':'Dry-run\x20preview\x20(pass\x20--apply\x20to\x20execute\x20the\x20generation)','data':_0x43649a};}const _0x228b61=await prepare(_0x2c4d6b);if(!_0x228b61[_0xef3585(0x1c9)][_0xef3585(0x1e2)])return{'ok':![],'message':_0x228b61[_0xef3585(0x1c9)][_0xef3585(0x1bd)],'data':{'datasetCode':_0x228b61[_0xef3585(0x1c1)]['code'],'clientOperationId':_0x228b61['clientOperationId'],'precheckSource':_0x228b61['standardPageStatus']?.['source']??_0xef3585(0x1d5),'status':_0x228b61['precheck']['status'],'manualResolutionRequired':_0x228b61['precheck'][_0xef3585(0x1d8)],'nextAction':_0x228b61['precheck'][_0xef3585(0x1cb)],'query':{'command':buildStandardPageStatusQueryCommand(_0x228b61[_0xef3585(0x1c1)][_0xef3585(0x1db)],_0x2c4d6b[_0xef3585(0x1e3)])},'standardPageStatus':_0x228b61[_0xef3585(0x1e7)]}};const _0xd92158=await startGenerateStandardPages(_0x2c4d6b[_0xef3585(0x1e3)],_0x228b61[_0xef3585(0x1c1)]['code'],{'clientOperationId':_0x228b61[_0xef3585(0x1cf)]}),_0x8422c8=_0xd92158['status']==='SUCCESS'||_0xd92158[_0xef3585(0x1c0)]===_0xef3585(0x1c3)?await loadStandardPageStatusForGenerate(_0x2c4d6b,_0x228b61[_0xef3585(0x1c1)][_0xef3585(0x1db)]):null,_0x28ef76=assessGenerateOperationState(_0x228b61[_0xef3585(0x1c1)][_0xef3585(0x1db)],_0xd92158[_0xef3585(0x1c0)],_0x8422c8);return{'ok':!![],'message':_0xd92158['reused']?_0xef3585(0x1df):'已提交生成任务','data':{'datasetCode':_0x228b61[_0xef3585(0x1c1)][_0xef3585(0x1db)],'appCode':_0x2c4d6b[_0xef3585(0x1e3)],'operationId':_0xd92158[_0xef3585(0x1c5)]??null,'clientOperationId':_0x228b61[_0xef3585(0x1cf)],'jobStatus':_0xd92158['status']??null,'progressRate':typeof _0xd92158[_0xef3585(0x1dd)]===_0xef3585(0x1cd)?_0xd92158[_0xef3585(0x1dd)]:null,'currentStep':_0xd92158[_0xef3585(0x1c6)]??null,'reused':_0xd92158[_0xef3585(0x1c2)]===!![],'status':_0x28ef76[_0xef3585(0x1c0)],'manualResolutionRequired':_0x28ef76['manualResolutionRequired'],'nextAction':_0x28ef76['nextAction'],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x228b61[_0xef3585(0x1c1)][_0xef3585(0x1db)],{'appCode':_0x2c4d6b[_0xef3585(0x1e3)],'operationId':_0xd92158['operationId'],'clientOperationId':_0x228b61[_0xef3585(0x1cf)]})},'standardPageStatus':_0x8422c8}};}};function a124_0x41bc(){const _0x5bf12f=['string','49316120ultkVa','manualResolutionRequired','alias','13116TjHbXE','code','source','progressRate','/generate-standard-pages/start','复用已有生成任务','/smartapi/lovrabet/dataset/','generate-start','allowGenerate','appCode','compress','POST','1603BCsOQY','standardPageStatus','message','write','7366716oIcOAf','status','dataset','reused','PARTIAL_SUCCESS','10rHlqmi','operationId','currentStep','1864364zNxwcc','11336952gcdAzH','precheck','Start\x20async\x20Smart\x20List\x20Page\x20generation\x20from\x20a\x20dataset','nextAction','apply','number','page','clientOperationId','805142ScQxoO','21126RDBRiT','boolean','Actually\x20execute\x20the\x20generation.\x20Without\x20this\x20flag,\x20only\x20a\x20dry-run\x20preview\x20is\x20shown.','494XHbPco','related-pages-fallback'];a124_0x41bc=function(){return _0x5bf12f;};return a124_0x41bc();}async function prepare(_0x16e94d){const _0xe37cb2=a124_0x948378,_0x276f7e=await loadDatasetDetailForPage(_0x16e94d),_0x411c41=await loadStandardPageStatusForGenerate(_0x16e94d,_0x276f7e[_0xe37cb2(0x1db)]),_0x6a274=getUndeletedRelatedPages(_0x276f7e);return{'dataset':_0x276f7e,'standardPageStatus':_0x411c41,'clientOperationId':createPageGenerateClientOperationId(),'precheck':assessStandardPageState(_0x276f7e[_0xe37cb2(0x1db)],_0x411c41,{'fallbackUndeletedPages':_0x6a274})};}
@@ -1 +1 @@
1
- const a125_0x3a9eae=a125_0x11ba;function a125_0x11ba(_0x100093,_0x383f52){_0x100093=_0x100093-0xc6;const _0x27b195=a125_0x27b1();let _0x11baf0=_0x27b195[_0x100093];return _0x11baf0;}(function(_0x866a6a,_0x3d3834){const _0x120306=a125_0x11ba,_0x5e43d0=_0x866a6a();while(!![]){try{const _0x264272=parseInt(_0x120306(0xc7))/0x1*(-parseInt(_0x120306(0xe0))/0x2)+parseInt(_0x120306(0xcb))/0x3*(-parseInt(_0x120306(0xe3))/0x4)+-parseInt(_0x120306(0xda))/0x5+-parseInt(_0x120306(0xc8))/0x6*(parseInt(_0x120306(0xe9))/0x7)+parseInt(_0x120306(0xec))/0x8+-parseInt(_0x120306(0xea))/0x9+parseInt(_0x120306(0xdb))/0xa;if(_0x264272===_0x3d3834)break;else _0x5e43d0['push'](_0x5e43d0['shift']());}catch(_0x1e2ee5){_0x5e43d0['push'](_0x5e43d0['shift']());}}}(a125_0x27b1,0x5cc38));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a125_0x27b1(){const _0x252076=['49677htuqkZ','operation_failed','Query\x20Smart\x20List\x20Page\x20generate\x20operation\x20status','currentStep','generate-status','set','compress','operationId','message','progressRate','/generate-standard-pages/status?','errorMsg','toString','alias','nextAction','2601870ZWEntN','22430980EiUinJ','manualResolutionRequired','operation-id','SUCCESS','appCode','1006UskIDJ','read','code','156fsnsxD','query-generate-operation-status','status','/smartapi/lovrabet/dataset/','clientOperationId','GET','22162VvuyCg','3398004FkrQwv','str','3674384RwPQJb','client-operation-id','1353kbZqRv','186AKlMve','string','Client\x20recovery/idempotency\x20id\x20when\x20operationId\x20is\x20unavailable\x20or\x20lost'];a125_0x27b1=function(){return _0x252076;};return a125_0x27b1();}import{assessGenerateOperationState,buildPageGenerateOperationStatusQueryCommand,loadDatasetDetailForPage,loadStandardPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector,validateGenerateOperationSelector}from'../../commands/page/shared.js';import{getGenerateStandardPagesStatus}from'../../core/api-client.js';export const pageGenerateStatus={'service':'page','command':a125_0x3a9eae(0xcf),'description':a125_0x3a9eae(0xcd),'risk':a125_0x3a9eae(0xe1),'defaultOutputFormat':a125_0x3a9eae(0xd1),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a125_0x3a9eae(0xd8),'type':'string','description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'},{'name':a125_0x3a9eae(0xdd),'type':a125_0x3a9eae(0xc9),'description':'Async\x20operation\x20id\x20returned\x20by\x20page\x20generate-start'},{'name':'client-operation-id','type':a125_0x3a9eae(0xc9),'description':a125_0x3a9eae(0xca)}],async 'validate'(_0x58087e){validateDatasetSelector(_0x58087e),validateGenerateOperationSelector(_0x58087e);},async 'dryRun'(_0x7fcd03){const _0x2ed97f=a125_0x3a9eae,_0x3d31a7=await loadDatasetDetailForPage(_0x7fcd03),_0xa0136e=_0x7fcd03[_0x2ed97f(0xeb)](_0x2ed97f(0xdd)),_0xdd8475=_0x7fcd03[_0x2ed97f(0xeb)](_0x2ed97f(0xc6)),_0x3f4ce5=new URLSearchParams({'appCode':_0x7fcd03[_0x2ed97f(0xdf)]});return _0xa0136e&&_0x3f4ce5['set'](_0x2ed97f(0xd2),_0xa0136e),_0xdd8475&&_0x3f4ce5[_0x2ed97f(0xd0)](_0x2ed97f(0xe7),_0xdd8475),{'method':_0x2ed97f(0xe8),'url':_0x2ed97f(0xe6)+_0x3d31a7['code']+_0x2ed97f(0xd5)+_0x3f4ce5[_0x2ed97f(0xd7)](),'description':serializeDryRunDescription({'dataset':{'id':_0x3d31a7['id'],'code':_0x3d31a7[_0x2ed97f(0xe2)],'name':_0x3d31a7['name']},'action':_0x2ed97f(0xe4),'operationId':_0xa0136e||undefined,'clientOperationId':_0xdd8475||undefined})};},async 'execute'(_0xa97a16){const _0x35f4fb=a125_0x3a9eae,_0x3db370=await loadDatasetDetailForPage(_0xa97a16),_0x1713ee=_0xa97a16['str'](_0x35f4fb(0xdd)),_0x14f7b7=_0xa97a16['str'](_0x35f4fb(0xc6)),_0x57897d=await getGenerateStandardPagesStatus(_0xa97a16[_0x35f4fb(0xdf)],_0x3db370['code'],{'operationId':_0x1713ee||undefined,'clientOperationId':_0x14f7b7||undefined}),_0x885204=_0x57897d[_0x35f4fb(0xe5)]===_0x35f4fb(0xde)||_0x57897d[_0x35f4fb(0xe5)]==='PARTIAL_SUCCESS',_0x310742=_0x885204?await loadStandardPageStatusForGenerate(_0xa97a16,_0x3db370[_0x35f4fb(0xe2)]):null,_0x3e37f0=assessGenerateOperationState(_0x3db370[_0x35f4fb(0xe2)],_0x57897d[_0x35f4fb(0xe5)],_0x310742),_0x794c1e=_0x57897d[_0x35f4fb(0xd2)]??_0x1713ee??undefined,_0xfbb7db=_0x57897d['clientOperationId']??_0x14f7b7??undefined;return{'ok':!![],'message':_0x3e37f0[_0x35f4fb(0xe5)]===_0x35f4fb(0xcc)?_0x57897d[_0x35f4fb(0xd6)]||_0x3e37f0[_0x35f4fb(0xd3)]:_0x3e37f0[_0x35f4fb(0xd3)],'data':{'datasetCode':_0x3db370[_0x35f4fb(0xe2)],'appCode':_0xa97a16[_0x35f4fb(0xdf)],'operationId':_0x794c1e,'clientOperationId':_0xfbb7db,'jobStatus':_0x57897d[_0x35f4fb(0xe5)]??null,'progressRate':typeof _0x57897d[_0x35f4fb(0xd4)]==='number'?_0x57897d['progressRate']:null,'currentStep':_0x57897d[_0x35f4fb(0xce)]??null,'errorMsg':_0x57897d['errorMsg']??null,'status':_0x3e37f0[_0x35f4fb(0xe5)],'manualResolutionRequired':_0x3e37f0[_0x35f4fb(0xdc)],'nextAction':_0x3e37f0[_0x35f4fb(0xd9)],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x3db370[_0x35f4fb(0xe2)],{'appCode':_0xa97a16[_0x35f4fb(0xdf)],'operationId':_0x794c1e,'clientOperationId':_0xfbb7db})},'standardPageStatus':_0x310742,'result':_0x57897d['result']??null}};}};
1
+ const a125_0x1bdc4a=a125_0x2e68;(function(_0x4206de,_0x5290e8){const _0x161a2b=a125_0x2e68,_0x54a69c=_0x4206de();while(!![]){try{const _0x231007=-parseInt(_0x161a2b(0x1c0))/0x1*(-parseInt(_0x161a2b(0x1ae))/0x2)+-parseInt(_0x161a2b(0x1ca))/0x3+-parseInt(_0x161a2b(0x1b2))/0x4*(parseInt(_0x161a2b(0x1cf))/0x5)+-parseInt(_0x161a2b(0x1d2))/0x6*(parseInt(_0x161a2b(0x1b7))/0x7)+-parseInt(_0x161a2b(0x1bb))/0x8+parseInt(_0x161a2b(0x1bf))/0x9+-parseInt(_0x161a2b(0x1be))/0xa*(-parseInt(_0x161a2b(0x1b4))/0xb);if(_0x231007===_0x5290e8)break;else _0x54a69c['push'](_0x54a69c['shift']());}catch(_0x15256c){_0x54a69c['push'](_0x54a69c['shift']());}}}(a125_0x34e4,0x2c900));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessGenerateOperationState,buildPageGenerateOperationStatusQueryCommand,loadDatasetDetailForPage,loadStandardPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector,validateGenerateOperationSelector}from'../../commands/page/shared.js';import{getGenerateStandardPagesStatus}from'../../core/api-client.js';function a125_0x34e4(){const _0x2c77ff=['clientOperationId','Query\x20Smart\x20List\x20Page\x20generate\x20operation\x20status','currentStep','Client\x20recovery/idempotency\x20id\x20when\x20operationId\x20is\x20unavailable\x20or\x20lost','set','SUCCESS','client-operation-id','page','code','532332POqKcn','manualResolutionRequired','operation-id','/smartapi/lovrabet/dataset/','str','1555IFCUmZ','query-generate-operation-status','GET','132uoyRwX','read','compress','errorMsg','4fElgyp','status','progressRate','toString','4292HuQBsh','/generate-standard-pages/status?','1430495sKDwSo','appCode','operationId','111629ccIYpV','PARTIAL_SUCCESS','name','operation_failed','396776AIQjRR','string','message','60OlAJdd','502632YIyalW','128994QITbkh'];a125_0x34e4=function(){return _0x2c77ff;};return a125_0x34e4();}function a125_0x2e68(_0x529e3d,_0x379bdd){_0x529e3d=_0x529e3d-0x1ab;const _0x34e4fe=a125_0x34e4();let _0x2e682b=_0x34e4fe[_0x529e3d];return _0x2e682b;}export const pageGenerateStatus={'service':a125_0x1bdc4a(0x1c8),'command':'generate-status','description':a125_0x1bdc4a(0x1c2),'risk':a125_0x1bdc4a(0x1ab),'defaultOutputFormat':a125_0x1bdc4a(0x1ac),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':'alias','type':a125_0x1bdc4a(0x1bc),'description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'},{'name':a125_0x1bdc4a(0x1cc),'type':a125_0x1bdc4a(0x1bc),'description':'Async\x20operation\x20id\x20returned\x20by\x20page\x20generate-start'},{'name':a125_0x1bdc4a(0x1c7),'type':'string','description':a125_0x1bdc4a(0x1c4)}],async 'validate'(_0x3e8a18){validateDatasetSelector(_0x3e8a18),validateGenerateOperationSelector(_0x3e8a18);},async 'dryRun'(_0x404798){const _0x104bf1=a125_0x1bdc4a,_0x2bd59c=await loadDatasetDetailForPage(_0x404798),_0x3740b4=_0x404798[_0x104bf1(0x1ce)](_0x104bf1(0x1cc)),_0x32bd7b=_0x404798[_0x104bf1(0x1ce)](_0x104bf1(0x1c7)),_0x485ae9=new URLSearchParams({'appCode':_0x404798[_0x104bf1(0x1b5)]});return _0x3740b4&&_0x485ae9[_0x104bf1(0x1c5)](_0x104bf1(0x1b6),_0x3740b4),_0x32bd7b&&_0x485ae9[_0x104bf1(0x1c5)](_0x104bf1(0x1c1),_0x32bd7b),{'method':_0x104bf1(0x1d1),'url':_0x104bf1(0x1cd)+_0x2bd59c[_0x104bf1(0x1c9)]+_0x104bf1(0x1b3)+_0x485ae9[_0x104bf1(0x1b1)](),'description':serializeDryRunDescription({'dataset':{'id':_0x2bd59c['id'],'code':_0x2bd59c[_0x104bf1(0x1c9)],'name':_0x2bd59c[_0x104bf1(0x1b9)]},'action':_0x104bf1(0x1d0),'operationId':_0x3740b4||undefined,'clientOperationId':_0x32bd7b||undefined})};},async 'execute'(_0x34cbd){const _0x1662b5=a125_0x1bdc4a,_0x110969=await loadDatasetDetailForPage(_0x34cbd),_0x373df1=_0x34cbd['str'](_0x1662b5(0x1cc)),_0x511337=_0x34cbd[_0x1662b5(0x1ce)](_0x1662b5(0x1c7)),_0x348a84=await getGenerateStandardPagesStatus(_0x34cbd[_0x1662b5(0x1b5)],_0x110969[_0x1662b5(0x1c9)],{'operationId':_0x373df1||undefined,'clientOperationId':_0x511337||undefined}),_0x4fce59=_0x348a84[_0x1662b5(0x1af)]===_0x1662b5(0x1c6)||_0x348a84['status']===_0x1662b5(0x1b8),_0x34aa6e=_0x4fce59?await loadStandardPageStatusForGenerate(_0x34cbd,_0x110969[_0x1662b5(0x1c9)]):null,_0x2852a5=assessGenerateOperationState(_0x110969[_0x1662b5(0x1c9)],_0x348a84[_0x1662b5(0x1af)],_0x34aa6e),_0x258aa7=_0x348a84['operationId']??_0x373df1??undefined,_0x368104=_0x348a84[_0x1662b5(0x1c1)]??_0x511337??undefined;return{'ok':!![],'message':_0x2852a5['status']===_0x1662b5(0x1ba)?_0x348a84['errorMsg']||_0x2852a5[_0x1662b5(0x1bd)]:_0x2852a5[_0x1662b5(0x1bd)],'data':{'datasetCode':_0x110969[_0x1662b5(0x1c9)],'appCode':_0x34cbd[_0x1662b5(0x1b5)],'operationId':_0x258aa7,'clientOperationId':_0x368104,'jobStatus':_0x348a84[_0x1662b5(0x1af)]??null,'progressRate':typeof _0x348a84[_0x1662b5(0x1b0)]==='number'?_0x348a84['progressRate']:null,'currentStep':_0x348a84[_0x1662b5(0x1c3)]??null,'errorMsg':_0x348a84[_0x1662b5(0x1ad)]??null,'status':_0x2852a5[_0x1662b5(0x1af)],'manualResolutionRequired':_0x2852a5[_0x1662b5(0x1cb)],'nextAction':_0x2852a5['nextAction'],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x110969[_0x1662b5(0x1c9)],{'appCode':_0x34cbd[_0x1662b5(0x1b5)],'operationId':_0x258aa7,'clientOperationId':_0x368104})},'standardPageStatus':_0x34aa6e,'result':_0x348a84['result']??null}};}};
@@ -1 +1 @@
1
- (function(_0x2b7924,_0x42ff3c){const _0xca0bc5=a126_0x87e4,_0x310c7b=_0x2b7924();while(!![]){try{const _0x3ececa=parseInt(_0xca0bc5(0x197))/0x1+parseInt(_0xca0bc5(0x194))/0x2*(parseInt(_0xca0bc5(0x196))/0x3)+parseInt(_0xca0bc5(0x198))/0x4+parseInt(_0xca0bc5(0x193))/0x5*(-parseInt(_0xca0bc5(0x19b))/0x6)+-parseInt(_0xca0bc5(0x192))/0x7+-parseInt(_0xca0bc5(0x195))/0x8*(parseInt(_0xca0bc5(0x19a))/0x9)+parseInt(_0xca0bc5(0x199))/0xa;if(_0x3ececa===_0x42ff3c)break;else _0x310c7b['push'](_0x310c7b['shift']());}catch(_0x5b537b){_0x310c7b['push'](_0x310c7b['shift']());}}}(a126_0x35a3,0x501f8));import{pageGenerateStart}from'../../commands/page/generate-start.js';function a126_0x35a3(){const _0x53e153=['1455330fAGIVx','9342IfCoXn','18bhiyyG','2892463ugnNIC','503585QWHEjA','10SxNFRy','2008fnGELQ','277899tUdyuJ','294867qHOoVJ','1602068eUikJz'];a126_0x35a3=function(){return _0x53e153;};return a126_0x35a3();}import{pageGenerateStatus}from'../../commands/page/generate-status.js';import{pageStandardPageStatus}from'../../commands/page/standard-page-status.js';import{pageSync}from'../../commands/page/sync.js';import{pagePull}from'../../commands/page/pull.js';function a126_0x87e4(_0x4fd96d,_0x2dcc2d){_0x4fd96d=_0x4fd96d-0x192;const _0x35a3db=a126_0x35a3();let _0x87e466=_0x35a3db[_0x4fd96d];return _0x87e466;}import{pagePush}from'../../commands/page/push.js';import{pageRelationAudit}from'../../commands/page/relation-audit.js';export const pageDefinitions=[pageGenerateStart,pageGenerateStatus,pageStandardPageStatus,pageRelationAudit,pageSync,pagePull,pagePush];
1
+ (function(_0xfaa403,_0xe16ef4){const _0x1f2cbe=a126_0x31d7,_0x8dd116=_0xfaa403();while(!![]){try{const _0x5b9843=-parseInt(_0x1f2cbe(0x15d))/0x1*(parseInt(_0x1f2cbe(0x161))/0x2)+-parseInt(_0x1f2cbe(0x163))/0x3*(parseInt(_0x1f2cbe(0x15b))/0x4)+parseInt(_0x1f2cbe(0x160))/0x5+-parseInt(_0x1f2cbe(0x15c))/0x6+-parseInt(_0x1f2cbe(0x162))/0x7+-parseInt(_0x1f2cbe(0x15e))/0x8*(parseInt(_0x1f2cbe(0x15f))/0x9)+parseInt(_0x1f2cbe(0x164))/0xa;if(_0x5b9843===_0xe16ef4)break;else _0x8dd116['push'](_0x8dd116['shift']());}catch(_0xa570f1){_0x8dd116['push'](_0x8dd116['shift']());}}}(a126_0x3b3a,0x6411e));import{pageGenerateStart}from'../../commands/page/generate-start.js';import{pageGenerateStatus}from'../../commands/page/generate-status.js';function a126_0x31d7(_0x4d56a7,_0x5979d8){_0x4d56a7=_0x4d56a7-0x15b;const _0x3b3a53=a126_0x3b3a();let _0x31d7dc=_0x3b3a53[_0x4d56a7];return _0x31d7dc;}import{pageStandardPageStatus}from'../../commands/page/standard-page-status.js';import{pageSync}from'../../commands/page/sync.js';import{pagePull}from'../../commands/page/pull.js';import{pagePush}from'../../commands/page/push.js';function a126_0x3b3a(){const _0x10783f=['1107AAliwY','3081310ebcgOW','356xdSWuf','860174egJFnj','273558KOJZMO','17204390snfBcf','16nTkQnl','1932912DDLzlx','1739GzcMhU','52520clNgiO'];a126_0x3b3a=function(){return _0x10783f;};return a126_0x3b3a();}import{pageRelationAudit}from'../../commands/page/relation-audit.js';export const pageDefinitions=[pageGenerateStart,pageGenerateStatus,pageStandardPageStatus,pageRelationAudit,pageSync,pagePull,pagePush];
@@ -1 +1 @@
1
- const a127_0x36f207=a127_0x2c4c;(function(_0x31d319,_0x4af3a3){const _0x201f5f=a127_0x2c4c,_0x42812c=_0x31d319();while(!![]){try{const _0x459815=-parseInt(_0x201f5f(0x108))/0x1*(-parseInt(_0x201f5f(0xea))/0x2)+-parseInt(_0x201f5f(0x11d))/0x3*(-parseInt(_0x201f5f(0xf6))/0x4)+parseInt(_0x201f5f(0xec))/0x5*(-parseInt(_0x201f5f(0x11a))/0x6)+-parseInt(_0x201f5f(0x119))/0x7*(-parseInt(_0x201f5f(0xe5))/0x8)+-parseInt(_0x201f5f(0x103))/0x9*(parseInt(_0x201f5f(0x118))/0xa)+parseInt(_0x201f5f(0xdd))/0xb*(parseInt(_0x201f5f(0x10b))/0xc)+parseInt(_0x201f5f(0xee))/0xd*(-parseInt(_0x201f5f(0x11e))/0xe);if(_0x459815===_0x4af3a3)break;else _0x42812c['push'](_0x42812c['shift']());}catch(_0x588423){_0x42812c['push'](_0x42812c['shift']());}}}(a127_0x435d,0x1f66a));import{writeFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getPageIdFlag,loadDatasetDetailForPage,loadPageDetailForPage,selectVersionTagGroup,serializeDryRunDescription,validatePageTargetSelector}from'../../commands/page/shared.js';function a127_0x435d(){const _0x4d6eed=['12azxwEV','hash','reason','35751KfLyyx','42EZhLSn','Dataset\x20\x22','2197151FzSekN','appCode','bool','versionTag','local\x20unsynced\x20changes','/smartapi/lovrabet/detail\x20(per\x20selected\x20page)','batch','version-tag','12232SxFyAR','single','all','code','type','476CXMNKu','\x22\x20has\x20no\x20undeleted\x20related\x20pages.','358555oLHXui','lastSync','552071Emqphc','name','datasetIds','would_pull','map','push','pageId','string','36nBgDYU','Page\x20ID','str','boolean','localPath','datasetCode','force','alias','/smartapi/lovrabet/detail?pageId=','validation','conflict','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','number','836253ObKnxg','compress','\x20skipped','detail','pages','893rgroDi','mode','Local\x20page\x20file\x20has\x20unsynced\x20changes:\x20','12vGYnbw','Overwrite\x20local\x20files\x20even\x20when\x20unsynced\x20local\x20changes\x20exist','pageVersion','items','relatedPages','拉取完成:\x20','\x20pulled,\x20','lockFilePath','filter','toISOString','status','Pull\x20page\x20schema\x20to\x20local\x20files','length','20yVjRwE','301OiBgVK'];a127_0x435d=function(){return _0x4d6eed;};return a127_0x435d();}function a127_0x2c4c(_0x453d70,_0x3e83d5){_0x453d70=_0x453d70-0xdd;const _0x435d81=a127_0x435d();let _0x2c4ca4=_0x435d81[_0x453d70];return _0x2c4ca4;}import{computePageContentHash,computePageFileHash,serializePageSchemaForFile}from'../../core/page/hash.js';import{ensureParentDirectory,fileExists,loadPageProjectConfig,resolvePageFilePath}from'../../core/page/file-system.js';import{createEmptyPageLock,ensurePageLockScope,readPageLockFile,writePageLockFile}from'../../core/page/lock.js';import{CliErrors}from'../../errors.js';export const pagePull={'service':'page','command':'pull','description':a127_0x36f207(0x116),'risk':'read','defaultOutputFormat':a127_0x36f207(0x104),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'id','type':a127_0x36f207(0x102),'description':a127_0x36f207(0xf7)},DATASETCODE_FLAG_OPTIONAL,{'name':a127_0x36f207(0xfd),'type':a127_0x36f207(0xf5),'description':a127_0x36f207(0x101)},{'name':a127_0x36f207(0xe4),'type':a127_0x36f207(0xf5),'description':'Page\x20group\x20version\x20tag\x20(batch\x20mode\x20only)'},{'name':a127_0x36f207(0xfc),'type':a127_0x36f207(0xf9),'description':a127_0x36f207(0x10c)}],async 'validate'(_0x11c66b){validatePageTargetSelector(_0x11c66b);},async 'dryRun'(_0x45b1d3){const _0xd672c7=a127_0x36f207,_0x5f0f54=await buildPullPlan(_0x45b1d3);return{'method':'GET','url':_0x5f0f54['mode']===_0xd672c7(0xe6)?_0xd672c7(0xfe)+(_0x5f0f54['items'][0x0]?.[_0xd672c7(0x106)]['pageId']??''):_0xd672c7(0xe2),'body':{'appCode':_0x45b1d3['appCode'],'mode':_0x5f0f54[_0xd672c7(0x109)],'targetDatasetCode':_0x5f0f54[_0xd672c7(0xfb)]??null,'pages':_0x5f0f54['items'][_0xd672c7(0xf2)](toPreviewItem)},'description':serializeDryRunDescription({'mode':_0x5f0f54[_0xd672c7(0x109)],'datasetCode':_0x5f0f54[_0xd672c7(0xfb)]??null,'totalCandidates':_0x5f0f54['items']['length'],'totalWouldPull':_0x5f0f54[_0xd672c7(0x10e)][_0xd672c7(0x113)](_0x992b4d=>_0x992b4d[_0xd672c7(0x115)]===_0xd672c7(0xf1))[_0xd672c7(0x117)],'totalConflicts':_0x5f0f54['items'][_0xd672c7(0x113)](_0x451c46=>_0x451c46[_0xd672c7(0x115)]===_0xd672c7(0x100))[_0xd672c7(0x117)]})};},async 'execute'(_0x10aa48){const _0x393f8c=a127_0x36f207,_0xf3bade=loadPageProjectConfig(_0x10aa48[_0x393f8c(0xde)]),_0x68ab63=await readPageLockFile(_0xf3bade[_0x393f8c(0x112)]),{lockData:_0xd79a04,appLock:_0x274564}=ensurePageLockScope(_0x68ab63??createEmptyPageLock(),_0x10aa48['appCode']),_0x46cdad=await buildPullPlan(_0x10aa48),_0x52abda=_0x10aa48[_0x393f8c(0xdf)](_0x393f8c(0xfc));if(_0x46cdad['mode']===_0x393f8c(0xe6)&&_0x46cdad['items'][0x0]?.[_0x393f8c(0x115)]===_0x393f8c(0x100)&&!_0x52abda)throw CliErrors[_0x393f8c(0xff)](_0x393f8c(0x10a)+_0x46cdad['items'][0x0][_0x393f8c(0xfa)],'Use\x20--force\x20to\x20overwrite\x20local\x20changes.');const _0x323566=[],_0x3fab33=[];for(const _0x5b9b75 of _0x46cdad[_0x393f8c(0x10e)]){if(_0x5b9b75[_0x393f8c(0x115)]==='conflict'&&!_0x52abda){_0x3fab33[_0x393f8c(0xf3)]({'pageId':_0x5b9b75[_0x393f8c(0x106)][_0x393f8c(0xf4)],'type':_0x5b9b75[_0x393f8c(0x106)][_0x393f8c(0xe9)],'title':_0x5b9b75[_0x393f8c(0x106)][_0x393f8c(0xef)],'localPath':_0x5b9b75[_0x393f8c(0xfa)],'reason':_0x5b9b75['reason']??_0x393f8c(0xe1)});continue;}await ensureParentDirectory(_0x5b9b75[_0x393f8c(0xfa)]);const _0x52b83c=serializePageSchemaForFile(_0x5b9b75[_0x393f8c(0x106)][_0x393f8c(0xe8)]);await writeFile(_0x5b9b75[_0x393f8c(0xfa)],_0x52b83c,'utf8'),_0x274564[_0x393f8c(0x107)][String(_0x5b9b75[_0x393f8c(0x106)]['pageId'])]=buildLockEntry(_0x5b9b75[_0x393f8c(0x106)],_0x52b83c),_0x323566['push']({'pageId':_0x5b9b75['detail'][_0x393f8c(0xf4)],'type':_0x5b9b75[_0x393f8c(0x106)]['type'],'title':_0x5b9b75['detail'][_0x393f8c(0xef)],'localPath':_0x5b9b75['localPath']});}return _0x274564[_0x393f8c(0xed)]=new Date()[_0x393f8c(0x114)](),await writePageLockFile(_0xf3bade[_0x393f8c(0x112)],_0xd79a04),{'ok':!![],'message':_0x393f8c(0x110)+_0x323566['length']+_0x393f8c(0x111)+_0x3fab33[_0x393f8c(0x117)]+_0x393f8c(0x105),'data':{'appCode':_0x10aa48[_0x393f8c(0xde)],'pulledPages':_0x323566,'skippedPages':_0x3fab33,'totalPulled':_0x323566[_0x393f8c(0x117)],'totalSkipped':_0x3fab33['length']}};}};async function buildPullPlan(_0x2b845a){const _0x31388a=a127_0x36f207,_0x5aee08=loadPageProjectConfig(_0x2b845a[_0x31388a(0xde)]),_0xad0e7a=await readPageLockFile(_0x5aee08[_0x31388a(0x112)]),{appLock:_0x327b41}=ensurePageLockScope(_0xad0e7a??createEmptyPageLock(),_0x2b845a[_0x31388a(0xde)]),_0x54a4e9=getPageIdFlag(_0x2b845a);if(_0x54a4e9!==undefined){const _0x2ef5e8=await loadPageDetailForPage(_0x2b845a,_0x54a4e9);return{'mode':_0x31388a(0xe6),'items':[await inspectPullTarget(_0x5aee08,_0x327b41[_0x31388a(0x107)][String(_0x2ef5e8['pageId'])],_0x2ef5e8)]};}const _0x2a6236=await loadDatasetDetailForPage(_0x2b845a),_0x3aee6f=_0x2a6236[_0x31388a(0x10f)][_0x31388a(0x113)](_0x571a97=>!_0x571a97['deleted']);if(_0x3aee6f[_0x31388a(0x117)]===0x0)throw CliErrors[_0x31388a(0xff)](_0x31388a(0x11f)+_0x2a6236[_0x31388a(0xe8)]+_0x31388a(0xeb));const _0x71d218=await Promise[_0x31388a(0xe7)](_0x3aee6f[_0x31388a(0xf2)](_0x3ab874=>loadPageDetailForPage(_0x2b845a,_0x3ab874['id']))),_0x1e4753=selectVersionTagGroup(_0x71d218,_0xf3e3a4=>_0xf3e3a4[_0x31388a(0xe0)],_0x2b845a[_0x31388a(0xf8)]('version-tag'));return{'mode':_0x31388a(0xe3),'datasetCode':_0x2a6236['code'],'items':await Promise[_0x31388a(0xe7)](_0x1e4753['items'][_0x31388a(0xf2)](_0xa78c25=>inspectPullTarget(_0x5aee08,_0x327b41[_0x31388a(0x107)][String(_0xa78c25[_0x31388a(0xf4)])],_0xa78c25)))};}async function inspectPullTarget(_0x3ccfec,_0x50358f,_0x4944fc){const _0x4d9a4f=a127_0x36f207,_0x35c5a5=resolvePageFilePath(_0x3ccfec,_0x4944fc['pageId'],_0x4944fc[_0x4d9a4f(0xe9)]),_0x61b11c=await fileExists(_0x35c5a5);if(!_0x61b11c){const _0x1226f5=serializePageSchemaForFile(_0x4944fc[_0x4d9a4f(0xe8)]);return{'detail':_0x4944fc,'localPath':_0x35c5a5,'localHash':computePageContentHash(_0x1226f5),'status':_0x4d9a4f(0xf1)};}const _0x50b274=await computePageFileHash(_0x35c5a5);if(!_0x50358f||_0x50b274!==_0x50358f[_0x4d9a4f(0x11b)])return{'detail':_0x4944fc,'localPath':_0x35c5a5,'localHash':_0x50b274,'status':_0x4d9a4f(0x100),'reason':_0x4d9a4f(0xe1)};return{'detail':_0x4944fc,'localPath':_0x35c5a5,'localHash':_0x50b274,'status':_0x4d9a4f(0xf1)};}function buildLockEntry(_0x368d28,_0x4b4eb3){const _0x12148d=a127_0x36f207;return{'hash':computePageContentHash(_0x4b4eb3),'pageId':_0x368d28[_0x12148d(0xf4)],'pageVersion':_0x368d28[_0x12148d(0x10d)],'type':_0x368d28[_0x12148d(0xe9)],'title':_0x368d28[_0x12148d(0xef)],'datasetIds':_0x368d28[_0x12148d(0xf0)],'versionTag':_0x368d28[_0x12148d(0xe0)]};}function toPreviewItem(_0xa4de35){const _0x5ef262=a127_0x36f207;return{'pageId':_0xa4de35[_0x5ef262(0x106)]['pageId'],'type':_0xa4de35[_0x5ef262(0x106)][_0x5ef262(0xe9)],'title':_0xa4de35['detail']['name'],'localPath':_0xa4de35[_0x5ef262(0xfa)],'status':_0xa4de35[_0x5ef262(0x115)],..._0xa4de35[_0x5ef262(0x11c)]?{'reason':_0xa4de35[_0x5ef262(0x11c)]}:{}};}
1
+ const a127_0x35f333=a127_0x38ec;(function(_0x4dad3e,_0x3c6dd0){const _0x47bd0d=a127_0x38ec,_0xf1d1c3=_0x4dad3e();while(!![]){try{const _0x56eb1d=parseInt(_0x47bd0d(0x1b6))/0x1+parseInt(_0x47bd0d(0x1d6))/0x2*(-parseInt(_0x47bd0d(0x1d1))/0x3)+parseInt(_0x47bd0d(0x1ce))/0x4+-parseInt(_0x47bd0d(0x1eb))/0x5+parseInt(_0x47bd0d(0x1e3))/0x6*(-parseInt(_0x47bd0d(0x1e5))/0x7)+parseInt(_0x47bd0d(0x1b9))/0x8+parseInt(_0x47bd0d(0x1ee))/0x9;if(_0x56eb1d===_0x3c6dd0)break;else _0xf1d1c3['push'](_0xf1d1c3['shift']());}catch(_0x2075d0){_0xf1d1c3['push'](_0xf1d1c3['shift']());}}}(a127_0x27f6,0x25bc8));import{writeFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getPageIdFlag,loadDatasetDetailForPage,loadPageDetailForPage,selectVersionTagGroup,serializeDryRunDescription,validatePageTargetSelector}from'../../commands/page/shared.js';import{computePageContentHash,computePageFileHash,serializePageSchemaForFile}from'../../core/page/hash.js';import{ensureParentDirectory,fileExists,loadPageProjectConfig,resolvePageFilePath}from'../../core/page/file-system.js';import{createEmptyPageLock,ensurePageLockScope,readPageLockFile,writePageLockFile}from'../../core/page/lock.js';import{CliErrors}from'../../errors.js';function a127_0x27f6(){const _0x324895=['code','Use\x20--force\x20to\x20overwrite\x20local\x20changes.','filter','datasetCode','all','\x22\x20has\x20no\x20undeleted\x20related\x20pages.','push','detail','\x20pulled,\x20','number','batch','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','map','page','721196mIukcp','items','pages','390207aFWOIh','bool','Overwrite\x20local\x20files\x20even\x20when\x20unsynced\x20local\x20changes\x20exist','versionTag','alias','2XkiwEU','relatedPages','appCode','GET','validation','lockFilePath','/smartapi/lovrabet/detail\x20(per\x20selected\x20page)','lastSync','pageId','compress','pull','would_pull','Page\x20group\x20version\x20tag\x20(batch\x20mode\x20only)','2748cYQyCt','single','3017EOrSDp','status','read','type','force','reason','1451000KLQouN','local\x20unsynced\x20changes','Dataset\x20\x22','2170944pYAFsr','mode','length','Pull\x20page\x20schema\x20to\x20local\x20files','utf8','deleted','boolean','拉取完成:\x20','toISOString','150617SPygUb','conflict','/smartapi/lovrabet/detail?pageId=','1600824ZCDvOt','string','datasetIds','version-tag','name','\x20skipped','localPath'];a127_0x27f6=function(){return _0x324895;};return a127_0x27f6();}export const pagePull={'service':a127_0x35f333(0x1cd),'command':a127_0x35f333(0x1e0),'description':a127_0x35f333(0x1f1),'risk':a127_0x35f333(0x1e7),'defaultOutputFormat':a127_0x35f333(0x1df),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'id','type':a127_0x35f333(0x1c9),'description':'Page\x20ID'},DATASETCODE_FLAG_OPTIONAL,{'name':a127_0x35f333(0x1d5),'type':a127_0x35f333(0x1ba),'description':a127_0x35f333(0x1cb)},{'name':a127_0x35f333(0x1bc),'type':a127_0x35f333(0x1ba),'description':a127_0x35f333(0x1e2)},{'name':'force','type':a127_0x35f333(0x1f4),'description':a127_0x35f333(0x1d3)}],async 'validate'(_0x4d1b44){validatePageTargetSelector(_0x4d1b44);},async 'dryRun'(_0xfd42e7){const _0x3b67b6=a127_0x35f333,_0x36b947=await buildPullPlan(_0xfd42e7);return{'method':_0x3b67b6(0x1d9),'url':_0x36b947[_0x3b67b6(0x1ef)]===_0x3b67b6(0x1e4)?_0x3b67b6(0x1b8)+(_0x36b947[_0x3b67b6(0x1cf)][0x0]?.[_0x3b67b6(0x1c7)][_0x3b67b6(0x1de)]??''):_0x3b67b6(0x1dc),'body':{'appCode':_0xfd42e7[_0x3b67b6(0x1d8)],'mode':_0x36b947[_0x3b67b6(0x1ef)],'targetDatasetCode':_0x36b947[_0x3b67b6(0x1c3)]??null,'pages':_0x36b947[_0x3b67b6(0x1cf)][_0x3b67b6(0x1cc)](toPreviewItem)},'description':serializeDryRunDescription({'mode':_0x36b947[_0x3b67b6(0x1ef)],'datasetCode':_0x36b947['datasetCode']??null,'totalCandidates':_0x36b947[_0x3b67b6(0x1cf)][_0x3b67b6(0x1f0)],'totalWouldPull':_0x36b947[_0x3b67b6(0x1cf)]['filter'](_0x311ba3=>_0x311ba3[_0x3b67b6(0x1e6)]===_0x3b67b6(0x1e1))[_0x3b67b6(0x1f0)],'totalConflicts':_0x36b947['items']['filter'](_0x4b065a=>_0x4b065a[_0x3b67b6(0x1e6)]===_0x3b67b6(0x1b7))[_0x3b67b6(0x1f0)]})};},async 'execute'(_0x1791aa){const _0x3dba4d=a127_0x35f333,_0x5159d4=loadPageProjectConfig(_0x1791aa[_0x3dba4d(0x1d8)]),_0x45cf52=await readPageLockFile(_0x5159d4[_0x3dba4d(0x1db)]),{lockData:_0x55bef0,appLock:_0x397c6f}=ensurePageLockScope(_0x45cf52??createEmptyPageLock(),_0x1791aa[_0x3dba4d(0x1d8)]),_0x26d6ed=await buildPullPlan(_0x1791aa),_0x35910a=_0x1791aa[_0x3dba4d(0x1d2)](_0x3dba4d(0x1e9));if(_0x26d6ed[_0x3dba4d(0x1ef)]===_0x3dba4d(0x1e4)&&_0x26d6ed[_0x3dba4d(0x1cf)][0x0]?.[_0x3dba4d(0x1e6)]===_0x3dba4d(0x1b7)&&!_0x35910a)throw CliErrors[_0x3dba4d(0x1da)]('Local\x20page\x20file\x20has\x20unsynced\x20changes:\x20'+_0x26d6ed['items'][0x0][_0x3dba4d(0x1bf)],_0x3dba4d(0x1c1));const _0x414f87=[],_0xb8ab46=[];for(const _0x330881 of _0x26d6ed[_0x3dba4d(0x1cf)]){if(_0x330881[_0x3dba4d(0x1e6)]===_0x3dba4d(0x1b7)&&!_0x35910a){_0xb8ab46[_0x3dba4d(0x1c6)]({'pageId':_0x330881[_0x3dba4d(0x1c7)][_0x3dba4d(0x1de)],'type':_0x330881[_0x3dba4d(0x1c7)][_0x3dba4d(0x1e8)],'title':_0x330881[_0x3dba4d(0x1c7)][_0x3dba4d(0x1bd)],'localPath':_0x330881[_0x3dba4d(0x1bf)],'reason':_0x330881[_0x3dba4d(0x1ea)]??_0x3dba4d(0x1ec)});continue;}await ensureParentDirectory(_0x330881['localPath']);const _0x512b32=serializePageSchemaForFile(_0x330881[_0x3dba4d(0x1c7)][_0x3dba4d(0x1c0)]);await writeFile(_0x330881[_0x3dba4d(0x1bf)],_0x512b32,_0x3dba4d(0x1f2)),_0x397c6f[_0x3dba4d(0x1d0)][String(_0x330881[_0x3dba4d(0x1c7)][_0x3dba4d(0x1de)])]=buildLockEntry(_0x330881[_0x3dba4d(0x1c7)],_0x512b32),_0x414f87[_0x3dba4d(0x1c6)]({'pageId':_0x330881['detail']['pageId'],'type':_0x330881[_0x3dba4d(0x1c7)][_0x3dba4d(0x1e8)],'title':_0x330881[_0x3dba4d(0x1c7)][_0x3dba4d(0x1bd)],'localPath':_0x330881[_0x3dba4d(0x1bf)]});}return _0x397c6f[_0x3dba4d(0x1dd)]=new Date()[_0x3dba4d(0x1b5)](),await writePageLockFile(_0x5159d4[_0x3dba4d(0x1db)],_0x55bef0),{'ok':!![],'message':_0x3dba4d(0x1f5)+_0x414f87['length']+_0x3dba4d(0x1c8)+_0xb8ab46[_0x3dba4d(0x1f0)]+_0x3dba4d(0x1be),'data':{'appCode':_0x1791aa[_0x3dba4d(0x1d8)],'pulledPages':_0x414f87,'skippedPages':_0xb8ab46,'totalPulled':_0x414f87['length'],'totalSkipped':_0xb8ab46[_0x3dba4d(0x1f0)]}};}};function a127_0x38ec(_0x20412f,_0x207ce6){_0x20412f=_0x20412f-0x1b5;const _0x27f6a5=a127_0x27f6();let _0x38ec62=_0x27f6a5[_0x20412f];return _0x38ec62;}async function buildPullPlan(_0x3adbbe){const _0x21aa77=a127_0x35f333,_0x2eda3f=loadPageProjectConfig(_0x3adbbe['appCode']),_0x19349d=await readPageLockFile(_0x2eda3f[_0x21aa77(0x1db)]),{appLock:_0x154c8e}=ensurePageLockScope(_0x19349d??createEmptyPageLock(),_0x3adbbe[_0x21aa77(0x1d8)]),_0x5f15e0=getPageIdFlag(_0x3adbbe);if(_0x5f15e0!==undefined){const _0x391dfe=await loadPageDetailForPage(_0x3adbbe,_0x5f15e0);return{'mode':_0x21aa77(0x1e4),'items':[await inspectPullTarget(_0x2eda3f,_0x154c8e['pages'][String(_0x391dfe[_0x21aa77(0x1de)])],_0x391dfe)]};}const _0x513ad6=await loadDatasetDetailForPage(_0x3adbbe),_0x85734e=_0x513ad6[_0x21aa77(0x1d7)][_0x21aa77(0x1c2)](_0x59e030=>!_0x59e030[_0x21aa77(0x1f3)]);if(_0x85734e[_0x21aa77(0x1f0)]===0x0)throw CliErrors[_0x21aa77(0x1da)](_0x21aa77(0x1ed)+_0x513ad6[_0x21aa77(0x1c0)]+_0x21aa77(0x1c5));const _0x504dc4=await Promise[_0x21aa77(0x1c4)](_0x85734e['map'](_0x159b56=>loadPageDetailForPage(_0x3adbbe,_0x159b56['id']))),_0x383301=selectVersionTagGroup(_0x504dc4,_0x1664d1=>_0x1664d1[_0x21aa77(0x1d4)],_0x3adbbe['str'](_0x21aa77(0x1bc)));return{'mode':_0x21aa77(0x1ca),'datasetCode':_0x513ad6[_0x21aa77(0x1c0)],'items':await Promise[_0x21aa77(0x1c4)](_0x383301[_0x21aa77(0x1cf)][_0x21aa77(0x1cc)](_0x1ed0d0=>inspectPullTarget(_0x2eda3f,_0x154c8e[_0x21aa77(0x1d0)][String(_0x1ed0d0[_0x21aa77(0x1de)])],_0x1ed0d0)))};}async function inspectPullTarget(_0x150f8d,_0x596a40,_0x157a1a){const _0x440597=a127_0x35f333,_0x25c87f=resolvePageFilePath(_0x150f8d,_0x157a1a[_0x440597(0x1de)],_0x157a1a[_0x440597(0x1e8)]),_0x5e965f=await fileExists(_0x25c87f);if(!_0x5e965f){const _0x36dbeb=serializePageSchemaForFile(_0x157a1a[_0x440597(0x1c0)]);return{'detail':_0x157a1a,'localPath':_0x25c87f,'localHash':computePageContentHash(_0x36dbeb),'status':'would_pull'};}const _0x3158f5=await computePageFileHash(_0x25c87f);if(!_0x596a40||_0x3158f5!==_0x596a40['hash'])return{'detail':_0x157a1a,'localPath':_0x25c87f,'localHash':_0x3158f5,'status':_0x440597(0x1b7),'reason':'local\x20unsynced\x20changes'};return{'detail':_0x157a1a,'localPath':_0x25c87f,'localHash':_0x3158f5,'status':_0x440597(0x1e1)};}function buildLockEntry(_0x549385,_0x3b31e0){const _0x74b249=a127_0x35f333;return{'hash':computePageContentHash(_0x3b31e0),'pageId':_0x549385[_0x74b249(0x1de)],'pageVersion':_0x549385['pageVersion'],'type':_0x549385[_0x74b249(0x1e8)],'title':_0x549385[_0x74b249(0x1bd)],'datasetIds':_0x549385[_0x74b249(0x1bb)],'versionTag':_0x549385[_0x74b249(0x1d4)]};}function toPreviewItem(_0x4d8814){const _0x3e96cc=a127_0x35f333;return{'pageId':_0x4d8814[_0x3e96cc(0x1c7)][_0x3e96cc(0x1de)],'type':_0x4d8814[_0x3e96cc(0x1c7)][_0x3e96cc(0x1e8)],'title':_0x4d8814[_0x3e96cc(0x1c7)][_0x3e96cc(0x1bd)],'localPath':_0x4d8814[_0x3e96cc(0x1bf)],'status':_0x4d8814['status'],..._0x4d8814[_0x3e96cc(0x1ea)]?{'reason':_0x4d8814[_0x3e96cc(0x1ea)]}:{}};}