@lovrabet/rabetbase-cli 2.2.3-beta.1 → 2.2.3

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 (205) 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/discover.js +1 -1
  21. package/lib/commands/app/index.js +1 -1
  22. package/lib/commands/app/list.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/use.js +1 -1
  26. package/lib/commands/auth/index.js +1 -1
  27. package/lib/commands/bff/create.js +1 -1
  28. package/lib/commands/bff/delete.js +1 -1
  29. package/lib/commands/bff/detail.js +1 -1
  30. package/lib/commands/bff/index.js +1 -1
  31. package/lib/commands/bff/list.js +1 -1
  32. package/lib/commands/bff/pull.js +1 -1
  33. package/lib/commands/bff/push.js +1 -1
  34. package/lib/commands/bff/status.js +1 -1
  35. package/lib/commands/cli-update.js +1 -1
  36. package/lib/commands/codegen/index.js +1 -1
  37. package/lib/commands/codegen/sdk.js +1 -1
  38. package/lib/commands/codegen/sql.js +1 -1
  39. package/lib/commands/common/app-selector.js +1 -1
  40. package/lib/commands/common/flags.js +1 -1
  41. package/lib/commands/common/validate.js +1 -1
  42. package/lib/commands/config/get.js +1 -1
  43. package/lib/commands/config/index.js +1 -1
  44. package/lib/commands/config/list.js +1 -1
  45. package/lib/commands/config/set.js +1 -1
  46. package/lib/commands/config/shared.js +1 -1
  47. package/lib/commands/data/filter.js +1 -1
  48. package/lib/commands/data/getOne.js +1 -1
  49. package/lib/commands/data/index.js +1 -1
  50. package/lib/commands/data/shared.js +1 -1
  51. package/lib/commands/dataset/capability.js +1 -1
  52. package/lib/commands/dataset/delete.js +1 -1
  53. package/lib/commands/dataset/detail.js +1 -1
  54. package/lib/commands/dataset/extend-update.js +1 -1
  55. package/lib/commands/dataset/field-update.js +1 -1
  56. package/lib/commands/dataset/index.js +1 -1
  57. package/lib/commands/dataset/list.js +1 -1
  58. package/lib/commands/dataset/operations.js +1 -1
  59. package/lib/commands/dataset/relation-create.js +1 -1
  60. package/lib/commands/dataset/relation-delete.js +1 -1
  61. package/lib/commands/dataset/relation-shared.js +1 -1
  62. package/lib/commands/dataset/relation-update.js +1 -1
  63. package/lib/commands/dataset/relations.js +1 -1
  64. package/lib/commands/dataset/rename.js +1 -1
  65. package/lib/commands/db/analyze-cancel.js +1 -1
  66. package/lib/commands/db/analyze-start.js +1 -1
  67. package/lib/commands/db/analyze-status.js +1 -1
  68. package/lib/commands/db/create.js +1 -1
  69. package/lib/commands/db/delete.js +1 -1
  70. package/lib/commands/db/detail.js +1 -1
  71. package/lib/commands/db/diff.js +1 -1
  72. package/lib/commands/db/index.js +1 -1
  73. package/lib/commands/db/list.js +1 -1
  74. package/lib/commands/db/shared.js +1 -1
  75. package/lib/commands/db/tables.js +1 -1
  76. package/lib/commands/db/test.js +1 -1
  77. package/lib/commands/db/update.js +1 -1
  78. package/lib/commands/doctor.js +1 -1
  79. package/lib/commands/init/index.js +1 -1
  80. package/lib/commands/issue/index.js +1 -1
  81. package/lib/commands/issue/nudge.js +1 -1
  82. package/lib/commands/issue/report.js +1 -1
  83. package/lib/commands/issue/shared.js +1 -1
  84. package/lib/commands/logs/index.js +1 -1
  85. package/lib/commands/menu/index.js +1 -1
  86. package/lib/commands/menu/list.js +1 -1
  87. package/lib/commands/menu/shared/compare-table.js +1 -1
  88. package/lib/commands/menu/shared/index.js +1 -1
  89. package/lib/commands/menu/shared/inquirer.js +1 -1
  90. package/lib/commands/menu/shared/local-pages.js +1 -1
  91. package/lib/commands/menu/shared/logic.js +1 -1
  92. package/lib/commands/menu/shared/service.js +1 -1
  93. package/lib/commands/menu/shared/sync-core.js +1 -1
  94. package/lib/commands/menu/shared/update-core.js +1 -1
  95. package/lib/commands/menu/shared/valid-url.js +1 -1
  96. package/lib/commands/menu/sync.js +1 -1
  97. package/lib/commands/menu/update.js +1 -1
  98. package/lib/commands/page/generate-start.js +1 -1
  99. package/lib/commands/page/generate-status.js +1 -1
  100. package/lib/commands/page/index.js +1 -1
  101. package/lib/commands/page/pull.js +1 -1
  102. package/lib/commands/page/push.js +1 -1
  103. package/lib/commands/page/relation-audit.js +1 -1
  104. package/lib/commands/page/shared.js +1 -1
  105. package/lib/commands/page/standard-page-status.js +1 -1
  106. package/lib/commands/page/sync.js +1 -1
  107. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  108. package/lib/commands/project/create/format-elapsed.js +1 -1
  109. package/lib/commands/project/create/main.js +1 -1
  110. package/lib/commands/project/create/non-interactive.js +1 -1
  111. package/lib/commands/project/create/project-template-path.js +1 -1
  112. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  113. package/lib/commands/project/create/use-format-code.js +1 -1
  114. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  115. package/lib/commands/project/index.js +1 -1
  116. package/lib/commands/project/init.js +1 -1
  117. package/lib/commands/project/upgrade.js +1 -1
  118. package/lib/commands/registry.js +1 -1
  119. package/lib/commands/run/index.js +1 -1
  120. package/lib/commands/schema.js +1 -1
  121. package/lib/commands/skill/index.js +1 -1
  122. package/lib/commands/sql/create.js +1 -1
  123. package/lib/commands/sql/delete.js +1 -1
  124. package/lib/commands/sql/detail.js +1 -1
  125. package/lib/commands/sql/exec.js +1 -1
  126. package/lib/commands/sql/index.js +1 -1
  127. package/lib/commands/sql/list.js +1 -1
  128. package/lib/commands/sql/pull.js +1 -1
  129. package/lib/commands/sql/push.js +1 -1
  130. package/lib/commands/sql/save.js +1 -1
  131. package/lib/commands/sql/shared.js +1 -1
  132. package/lib/commands/sql/status.js +1 -1
  133. package/lib/commands/sql/validate.js +1 -1
  134. package/lib/config/schema.js +1 -1
  135. package/lib/constant/cdn.js +1 -1
  136. package/lib/constant/cli.js +1 -1
  137. package/lib/constant/defaults.js +1 -1
  138. package/lib/constant/domain.js +1 -1
  139. package/lib/constant/env.js +1 -1
  140. package/lib/constant/output.js +1 -1
  141. package/lib/constant/paths.js +1 -1
  142. package/lib/constant/risk.js +1 -1
  143. package/lib/context.js +1 -1
  144. package/lib/core/alias-resolver.js +1 -1
  145. package/lib/core/api-client.js +1 -1
  146. package/lib/core/bff/config.js +1 -1
  147. package/lib/core/bff/file-system.js +1 -1
  148. package/lib/core/bff/hash.js +1 -1
  149. package/lib/core/bff/lock.js +1 -1
  150. package/lib/core/bff/utils.js +1 -1
  151. package/lib/core/db-resolver.js +1 -1
  152. package/lib/core/page/file-system.js +1 -1
  153. package/lib/core/page/hash.js +1 -1
  154. package/lib/core/page/lock.js +1 -1
  155. package/lib/core/sql-sync/config.js +1 -1
  156. package/lib/core/sql-sync/file-system.js +1 -1
  157. package/lib/core/sql-sync/hash.js +1 -1
  158. package/lib/core/sql-sync/lock.js +1 -1
  159. package/lib/core/sql-sync/utils.js +1 -1
  160. package/lib/core/sql-validator.js +1 -1
  161. package/lib/errors.js +1 -1
  162. package/lib/framework/build-all-flags.js +1 -1
  163. package/lib/framework/flags.js +1 -1
  164. package/lib/framework/help.js +1 -1
  165. package/lib/framework/index.js +1 -1
  166. package/lib/framework/output.js +1 -1
  167. package/lib/framework/response.js +1 -1
  168. package/lib/framework/runner-alias.js +1 -1
  169. package/lib/framework/runner.js +1 -1
  170. package/lib/framework/schema-export.js +1 -1
  171. package/lib/framework/types.js +1 -1
  172. package/lib/generated/build-info.js +1 -1
  173. package/lib/help.js +1 -1
  174. package/lib/skills/main.js +1 -1
  175. package/lib/skills/npx-skills-add.js +1 -1
  176. package/lib/telemetry/cli-command-trace.js +1 -1
  177. package/lib/telemetry/cli-help-trace.js +1 -1
  178. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  179. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  180. package/lib/telemetry/send-cli-trace-log.js +1 -1
  181. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  182. package/lib/utils/ai_config.js +1 -1
  183. package/lib/utils/apply-jq-filter.js +1 -1
  184. package/lib/utils/cdn-config.js +1 -1
  185. package/lib/utils/check-sdk-version.js +1 -1
  186. package/lib/utils/cli-version-check.js +1 -1
  187. package/lib/utils/cli-version-policy.js +1 -1
  188. package/lib/utils/config.js +1 -1
  189. package/lib/utils/copy-directory.js +1 -1
  190. package/lib/utils/entity-with-id.js +1 -1
  191. package/lib/utils/file-utils.js +1 -1
  192. package/lib/utils/guides-cdn.js +1 -1
  193. package/lib/utils/http-client.js +1 -1
  194. package/lib/utils/is-non-interactive.js +1 -1
  195. package/lib/utils/logger.js +1 -1
  196. package/lib/utils/params.js +1 -1
  197. package/lib/utils/platform.js +1 -1
  198. package/lib/utils/rules-cdn.js +1 -1
  199. package/lib/utils/sleep.js +1 -1
  200. package/lib/utils/template-replacer.js +1 -1
  201. package/lib/utils/update-notice.js +1 -1
  202. package/lib/utils/version.js +1 -1
  203. package/lib/utils/with-active-cookie.js +1 -1
  204. package/lib/utils/write-cli-side-channel.js +1 -1
  205. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x5d724b,_0x4a0188){const _0x102759=a92_0x1673,_0x1932b1=_0x5d724b();while(!![]){try{const _0x38a41f=parseInt(_0x102759(0x18f))/0x1+-parseInt(_0x102759(0x19c))/0x2+parseInt(_0x102759(0x196))/0x3+parseInt(_0x102759(0x19a))/0x4*(parseInt(_0x102759(0x1a8))/0x5)+-parseInt(_0x102759(0x19b))/0x6+-parseInt(_0x102759(0x1a5))/0x7+parseInt(_0x102759(0x191))/0x8;if(_0x38a41f===_0x4a0188)break;else _0x1932b1['push'](_0x1932b1['shift']());}catch(_0x1b7cd3){_0x1932b1['push'](_0x1932b1['shift']());}}}(a92_0x3e60,0x422eb));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 a92_0x1673(_0x596651,_0x161785){_0x596651=_0x596651-0x183;const _0x3e6074=a92_0x3e60();let _0x167312=_0x3e6074[_0x596651];return _0x167312;}import{logger}from'../../../utils/logger.js';function validateParams(_0x406f11){const _0xc520cf=a92_0x1673,_0x2f8663=[];return _0x406f11[_0xc520cf(0x1a7)]&&!isValidJsHttpsUrl(_0x406f11[_0xc520cf(0x1a7)])&&_0x2f8663[_0xc520cf(0x1a1)]({'field':'jsUrl','message':_0xc520cf(0x193)}),_0x406f11[_0xc520cf(0x19f)]&&!isValidCssHttpsUrl(_0x406f11['cssUrl'])&&_0x2f8663['push']({'field':_0xc520cf(0x19f),'message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x2f8663;}export async function runMenuSyncCore(_0x41bdfc,_0x53d486,_0x4b872b=[],_0x17bca8){const _0x501b4a=a92_0x1673,_0x5505b7=parseParamsFlag(_0x17bca8),_0x5168ae=_0x4b872b[_0x501b4a(0x18e)]>0x0?_0x4b872b:_0x5505b7[_0x501b4a(0x194)],_0x5080f5=_0x5505b7[_0x501b4a(0x1a7)],_0x6c6a47=_0x5505b7[_0x501b4a(0x19f)],_0x53cc8a=[];if(_0x5080f5)_0x53cc8a[_0x501b4a(0x1a1)](_0x5080f5);if(_0x6c6a47)_0x53cc8a[_0x501b4a(0x1a1)](_0x6c6a47);const _0x584e03=validateParams(_0x5505b7);if(_0x584e03[_0x501b4a(0x18e)]>0x0){const _0x5fc9e1=_0x584e03[_0x501b4a(0x192)](_0x429953=>_0x501b4a(0x18a)+_0x429953['field']+':\x20'+_0x429953['message'])[_0x501b4a(0x1a9)](';\x20');throw new Error(_0x501b4a(0x1a3)+_0x5fc9e1);}logger['setLogPath'](process['cwd']()),logger[_0x501b4a(0x184)](_0x501b4a(0x183),_0x501b4a(0x199),{'appCode':_0x41bdfc,'selectedCount':_0x5168ae?.['length'],'jsUrl':_0x5080f5,'cssUrl':_0x6c6a47});if(_0x5080f5){const _0x3aa344=await isUrlReachable(_0x5080f5);if(!_0x3aa344)throw new Error(_0x501b4a(0x19d)+_0x5080f5);}if(_0x6c6a47){const _0xae9217=await isUrlReachable(_0x6c6a47);if(!_0xae9217)throw new Error(_0x501b4a(0x1a2)+_0x6c6a47);}const _0x239183=getLocalPages();if(_0x239183['length']===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x5b0b10=await getOnlineMenuList(_0x41bdfc,_0x53d486),_0x16c1a0=new Set(_0x5b0b10[_0x501b4a(0x192)](_0xd61986=>_0xd61986['path']));let _0x1a35ef;if(_0x5168ae&&_0x5168ae[_0x501b4a(0x18e)]>0x0){const _0x34228e=new Set(_0x5168ae[_0x501b4a(0x192)](_0x3e630a=>_0x3e630a['trim']()));_0x1a35ef=_0x239183['filter'](_0xabe593=>_0x34228e[_0x501b4a(0x198)](_0xabe593[_0x501b4a(0x189)]));if(_0x1a35ef['length']===0x0){const _0x2ac6d4=_0x239183['map'](_0x41b413=>_0x41b413[_0x501b4a(0x189)])[_0x501b4a(0x1a9)](',\x20');throw new Error('No\x20local\x20pages\x20matched\x20labels:\x20'+[..._0x34228e][_0x501b4a(0x1a9)](',\x20')+_0x501b4a(0x197)+_0x2ac6d4);}}else _0x1a35ef=_0x239183['filter'](_0x45e396=>!_0x16c1a0[_0x501b4a(0x198)](_0x45e396[_0x501b4a(0x1a4)]));if(_0x1a35ef['length']===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x146d1c=await createMenus(_0x41bdfc,_0x53d486,_0x1a35ef,_0x53cc8a['length']>0x0?_0x53cc8a:undefined);return logger[_0x501b4a(0x184)](_0x501b4a(0x183),'Menu\x20sync\x20completed',{'count':_0x1a35ef[_0x501b4a(0x18e)],'resources':_0x53cc8a}),{'created':_0x146d1c['length'],'skipped':![],'targetPages':_0x1a35ef,'menus':_0x146d1c};}export async function readPageLabelsFromStdin(){const _0x2d4701=a92_0x1673;if(!process['stdin'][_0x2d4701(0x195)]&&!process['stdin'][_0x2d4701(0x187)])return new Promise(_0x2201f6=>{const _0x5e991a=_0x2d4701,_0x2e7458=[];process['stdin']['on'](_0x5e991a(0x190),_0x51aa42=>_0x2e7458[_0x5e991a(0x1a1)](_0x51aa42)),process[_0x5e991a(0x188)]['on'](_0x5e991a(0x1ab),()=>{const _0x4b345a=_0x5e991a,_0x2670d2=Buffer[_0x4b345a(0x185)](_0x2e7458)[_0x4b345a(0x19e)](_0x4b345a(0x18c)),_0xa7558d=_0x2670d2[_0x4b345a(0x18d)]('\x0a')[_0x4b345a(0x192)](_0x49e9a1=>_0x49e9a1[_0x4b345a(0x1ac)]())[_0x4b345a(0x18b)](_0x4e5c86=>_0x4e5c86['length']>0x0&&!_0x4e5c86[_0x4b345a(0x1a6)]('#'));_0x2201f6(_0xa7558d);}),setTimeout(()=>_0x2201f6([]),0x1f4);});return[];}function parseParamsFlag(_0x591f1e){const _0x2e9c8b=a92_0x1673;if(!_0x591f1e||typeof _0x591f1e!=='string')return{};try{const _0x43cea0=JSON['parse'](_0x591f1e);if(typeof _0x43cea0!=='object'||_0x43cea0===null||Array[_0x2e9c8b(0x1aa)](_0x43cea0))return{};return{'selectedLabels':Array[_0x2e9c8b(0x1aa)](_0x43cea0[_0x2e9c8b(0x186)])?_0x43cea0[_0x2e9c8b(0x186)]['map'](String):undefined,'jsUrl':typeof _0x43cea0[_0x2e9c8b(0x1a7)]===_0x2e9c8b(0x1a0)?_0x43cea0[_0x2e9c8b(0x1a7)][_0x2e9c8b(0x1ac)]():undefined,'cssUrl':typeof _0x43cea0['cssUrl']===_0x2e9c8b(0x1a0)?_0x43cea0[_0x2e9c8b(0x19f)]['trim']():undefined};}catch{return{};}}function a92_0x3e60(){const _0x2d7036=['17644xnYKTG','3085752sDUkNT','833640IKLbee','JS\x20URL\x20is\x20unreachable:\x20','toString','cssUrl','string','push','CSS\x20URL\x20is\x20unreachable:\x20','Invalid\x20--params:\x20','path','2013452gcaoWN','startsWith','jsUrl','365rCrHkt','join','isArray','end','trim','menu-sync','info','concat','pages','readableEnded','stdin','label','--params.','filter','utf8','split','length','108867IYAdEd','data','8221088mItyun','map','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','selectedLabels','isTTY','93975lYPNxU','\x0a\x20\x20Available\x20local\x20pages:\x20','has','Start\x20non-interactive\x20menu\x20sync'];a92_0x3e60=function(){return _0x2d7036;};return a92_0x3e60();}
1
+ (function(_0x1c3631,_0x79bdba){const _0x2810a=a92_0x99b3,_0x11d59f=_0x1c3631();while(!![]){try{const _0x710919=parseInt(_0x2810a(0x11e))/0x1+parseInt(_0x2810a(0x12f))/0x2*(parseInt(_0x2810a(0x13c))/0x3)+parseInt(_0x2810a(0x123))/0x4+parseInt(_0x2810a(0x12c))/0x5+parseInt(_0x2810a(0x124))/0x6*(parseInt(_0x2810a(0x120))/0x7)+parseInt(_0x2810a(0x139))/0x8*(parseInt(_0x2810a(0x13f))/0x9)+parseInt(_0x2810a(0x117))/0xa*(-parseInt(_0x2810a(0x132))/0xb);if(_0x710919===_0x79bdba)break;else _0x11d59f['push'](_0x11d59f['shift']());}catch(_0x572ee3){_0x11d59f['push'](_0x11d59f['shift']());}}}(a92_0x43bc,0xd1e40));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 a92_0x43bc(){const _0x17e1af=['--params.','325856iWQFRG','32136sojFIM','string','CSS\x20URL\x20is\x20unreachable:\x20','isTTY','pages','cssUrl','cwd','trim','5099845VSFcTU','split','setLogPath','496cZaVHs','jsUrl','data','374VUUwru','filter','toString','\x0a\x20\x20Available\x20local\x20pages:\x20','isArray','message','Start\x20non-interactive\x20menu\x20sync','64KRmaEW','menu-sync','push','3591YRIfBY','end','has','1412451tfGHTF','selectedLabels','JS\x20URL\x20is\x20unreachable:\x20','join','utf8','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','path','length','682940IBOddv','map','readableEnded','Invalid\x20--params:\x20','label','stdin','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','35155AiNaOJ','parse','644mmTMZG','concat'];a92_0x43bc=function(){return _0x17e1af;};return a92_0x43bc();}function a92_0x99b3(_0x36d514,_0x443496){_0x36d514=_0x36d514-0x114;const _0x43bcbb=a92_0x43bc();let _0x99b3f=_0x43bcbb[_0x36d514];return _0x99b3f;}import{logger}from'../../../utils/logger.js';function validateParams(_0xafce4b){const _0x42e053=a92_0x99b3,_0xa69ca5=[];return _0xafce4b['jsUrl']&&!isValidJsHttpsUrl(_0xafce4b[_0x42e053(0x130)])&&_0xa69ca5[_0x42e053(0x13b)]({'field':'jsUrl','message':_0x42e053(0x114)}),_0xafce4b[_0x42e053(0x129)]&&!isValidCssHttpsUrl(_0xafce4b[_0x42e053(0x129)])&&_0xa69ca5[_0x42e053(0x13b)]({'field':_0x42e053(0x129),'message':_0x42e053(0x11d)}),_0xa69ca5;}export async function runMenuSyncCore(_0x1d6186,_0x34ab9f,_0x1ae3de=[],_0x3655df){const _0x1f2527=a92_0x99b3,_0x5d274b=parseParamsFlag(_0x3655df),_0x20f307=_0x1ae3de[_0x1f2527(0x116)]>0x0?_0x1ae3de:_0x5d274b[_0x1f2527(0x140)],_0x4da4bf=_0x5d274b[_0x1f2527(0x130)],_0x3c5c89=_0x5d274b[_0x1f2527(0x129)],_0x4a1294=[];if(_0x4da4bf)_0x4a1294[_0x1f2527(0x13b)](_0x4da4bf);if(_0x3c5c89)_0x4a1294[_0x1f2527(0x13b)](_0x3c5c89);const _0x4e2857=validateParams(_0x5d274b);if(_0x4e2857['length']>0x0){const _0x43be68=_0x4e2857['map'](_0x51bb0e=>_0x1f2527(0x122)+_0x51bb0e['field']+':\x20'+_0x51bb0e[_0x1f2527(0x137)])[_0x1f2527(0x142)](';\x20');throw new Error(_0x1f2527(0x11a)+_0x43be68);}logger[_0x1f2527(0x12e)](process[_0x1f2527(0x12a)]()),logger['info']('menu-sync',_0x1f2527(0x138),{'appCode':_0x1d6186,'selectedCount':_0x20f307?.['length'],'jsUrl':_0x4da4bf,'cssUrl':_0x3c5c89});if(_0x4da4bf){const _0x34d982=await isUrlReachable(_0x4da4bf);if(!_0x34d982)throw new Error(_0x1f2527(0x141)+_0x4da4bf);}if(_0x3c5c89){const _0x57f1ec=await isUrlReachable(_0x3c5c89);if(!_0x57f1ec)throw new Error(_0x1f2527(0x126)+_0x3c5c89);}const _0x14c8d6=getLocalPages();if(_0x14c8d6[_0x1f2527(0x116)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0xd7fb03=await getOnlineMenuList(_0x1d6186,_0x34ab9f),_0x395241=new Set(_0xd7fb03['map'](_0x1dd6d7=>_0x1dd6d7[_0x1f2527(0x115)]));let _0x286212;if(_0x20f307&&_0x20f307[_0x1f2527(0x116)]>0x0){const _0x2d55de=new Set(_0x20f307[_0x1f2527(0x118)](_0xaf28c2=>_0xaf28c2[_0x1f2527(0x12b)]()));_0x286212=_0x14c8d6['filter'](_0x4765d4=>_0x2d55de[_0x1f2527(0x13e)](_0x4765d4[_0x1f2527(0x11b)]));if(_0x286212[_0x1f2527(0x116)]===0x0){const _0x29d90f=_0x14c8d6[_0x1f2527(0x118)](_0x15027f=>_0x15027f[_0x1f2527(0x11b)])[_0x1f2527(0x142)](',\x20');throw new Error('No\x20local\x20pages\x20matched\x20labels:\x20'+[..._0x2d55de][_0x1f2527(0x142)](',\x20')+_0x1f2527(0x135)+_0x29d90f);}}else _0x286212=_0x14c8d6[_0x1f2527(0x133)](_0x8eff63=>!_0x395241[_0x1f2527(0x13e)](_0x8eff63[_0x1f2527(0x115)]));if(_0x286212[_0x1f2527(0x116)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x42d7be=await createMenus(_0x1d6186,_0x34ab9f,_0x286212,_0x4a1294[_0x1f2527(0x116)]>0x0?_0x4a1294:undefined);return logger['info'](_0x1f2527(0x13a),'Menu\x20sync\x20completed',{'count':_0x286212['length'],'resources':_0x4a1294}),{'created':_0x42d7be['length'],'skipped':![],'targetPages':_0x286212,'menus':_0x42d7be};}export async function readPageLabelsFromStdin(){const _0x1c93bd=a92_0x99b3;if(!process[_0x1c93bd(0x11c)][_0x1c93bd(0x127)]&&!process[_0x1c93bd(0x11c)][_0x1c93bd(0x119)])return new Promise(_0x44c1c6=>{const _0x181a4c=_0x1c93bd,_0x340cac=[];process[_0x181a4c(0x11c)]['on'](_0x181a4c(0x131),_0x2d244e=>_0x340cac[_0x181a4c(0x13b)](_0x2d244e)),process[_0x181a4c(0x11c)]['on'](_0x181a4c(0x13d),()=>{const _0x11fceb=_0x181a4c,_0x27d886=Buffer[_0x11fceb(0x121)](_0x340cac)[_0x11fceb(0x134)](_0x11fceb(0x143)),_0x43b588=_0x27d886[_0x11fceb(0x12d)]('\x0a')[_0x11fceb(0x118)](_0xd8f238=>_0xd8f238['trim']())[_0x11fceb(0x133)](_0x2e56af=>_0x2e56af[_0x11fceb(0x116)]>0x0&&!_0x2e56af['startsWith']('#'));_0x44c1c6(_0x43b588);}),setTimeout(()=>_0x44c1c6([]),0x1f4);});return[];}function parseParamsFlag(_0x5cfc73){const _0x3b4608=a92_0x99b3;if(!_0x5cfc73||typeof _0x5cfc73!==_0x3b4608(0x125))return{};try{const _0x211469=JSON[_0x3b4608(0x11f)](_0x5cfc73);if(typeof _0x211469!=='object'||_0x211469===null||Array[_0x3b4608(0x136)](_0x211469))return{};return{'selectedLabels':Array['isArray'](_0x211469[_0x3b4608(0x128)])?_0x211469['pages'][_0x3b4608(0x118)](String):undefined,'jsUrl':typeof _0x211469[_0x3b4608(0x130)]===_0x3b4608(0x125)?_0x211469['jsUrl'][_0x3b4608(0x12b)]():undefined,'cssUrl':typeof _0x211469[_0x3b4608(0x129)]===_0x3b4608(0x125)?_0x211469[_0x3b4608(0x129)][_0x3b4608(0x12b)]():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- (function(_0x1c426e,_0x5084c6){const _0x3e26a5=a94_0x2b37,_0x43f811=_0x1c426e();while(!![]){try{const _0x554664=-parseInt(_0x3e26a5(0x1f9))/0x1+-parseInt(_0x3e26a5(0x1e6))/0x2*(-parseInt(_0x3e26a5(0x1ef))/0x3)+-parseInt(_0x3e26a5(0x1f1))/0x4*(-parseInt(_0x3e26a5(0x207))/0x5)+-parseInt(_0x3e26a5(0x1d6))/0x6*(-parseInt(_0x3e26a5(0x1e9))/0x7)+parseInt(_0x3e26a5(0x1f8))/0x8+parseInt(_0x3e26a5(0x202))/0x9*(-parseInt(_0x3e26a5(0x208))/0xa)+-parseInt(_0x3e26a5(0x1ee))/0xb;if(_0x554664===_0x5084c6)break;else _0x43f811['push'](_0x43f811['shift']());}catch(_0x27c337){_0x43f811['push'](_0x43f811['shift']());}}}(a94_0x5423,0x4c037));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 a94_0x2b37(_0x4eb6d5,_0x718ecd){_0x4eb6d5=_0x4eb6d5-0x1d5;const _0x542388=a94_0x5423();let _0x2b3792=_0x542388[_0x4eb6d5];return _0x2b3792;}function validateParams(_0x3a08b6){const _0x1fd036=a94_0x2b37,_0x5e23d1=[];return _0x3a08b6[_0x1fd036(0x1e1)]&&!isValidJsHttpsUrl(_0x3a08b6[_0x1fd036(0x1e1)])&&_0x5e23d1[_0x1fd036(0x1da)]({'field':'jsUrl','message':_0x1fd036(0x1e7)}),_0x3a08b6[_0x1fd036(0x1d5)]&&!isValidCssHttpsUrl(_0x3a08b6[_0x1fd036(0x1d5)])&&_0x5e23d1[_0x1fd036(0x1da)]({'field':_0x1fd036(0x1d5),'message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x5e23d1;}function a94_0x5423(){const _0x1749eb=['value','\x22\x20(','cwd','toLowerCase','79918rpVEha','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','path','61943tNgzmF','trim','join','unshift','filter','4452184GxOfoj','36VTIrsh','split','436oRFFJi','extend','Menu\x20update\x20completed','parse','length','force','JS\x20URL\x20is\x20unreachable:\x20','3660808sWThqz','289531awiBjR','Start\x20non-interactive\x20menu\x20update','rejected','info','menu-update','status','endsWith','dryRun','.\x20Allowed\x20values:\x20replace,\x20patch','5571XWilBd','some','after',').\x20','Invalid\x20--params:\x20menu\x20update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','8215jculcL','9220EgpksZ','menu\x20update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','isArray','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','--params.','patch','setLogPath','cssUrl','312ZpBRzZ','fulfilled','string','replace','push','label','map','mode','CSS\x20URL\x20is\x20unreachable:\x20','.js','resources','jsUrl'];a94_0x5423=function(){return _0x1749eb;};return a94_0x5423();}export async function runMenuUpdateCore(_0x1bed5a,_0x5a2088,_0x26cc55,_0x4d177f={}){const _0x23c7fc=a94_0x2b37,_0x42b77c=parseUpdateParamsFlag(_0x26cc55),_0x199b26=normalizeMode(_0x4d177f[_0x23c7fc(0x1dd)]),_0x27b9ec=[];if(_0x42b77c[_0x23c7fc(0x1e1)])_0x27b9ec[_0x23c7fc(0x1da)](_0x42b77c[_0x23c7fc(0x1e1)]);if(_0x42b77c[_0x23c7fc(0x1d5)])_0x27b9ec[_0x23c7fc(0x1da)](_0x42b77c[_0x23c7fc(0x1d5)]);const _0x197cec=validateParams(_0x42b77c);if(_0x197cec[_0x23c7fc(0x1f5)]>0x0){const _0x353132=_0x197cec[_0x23c7fc(0x1dc)](_0x2752ae=>_0x23c7fc(0x20c)+_0x2752ae['field']+':\x20'+_0x2752ae['message'])[_0x23c7fc(0x1eb)](';\x20');throw new Error('Invalid\x20--params:\x20'+_0x353132);}if(_0x27b9ec['length']===0x0)throw new Error(_0x23c7fc(0x206)+'Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.');logger[_0x23c7fc(0x20e)](process[_0x23c7fc(0x1e4)]()),logger[_0x23c7fc(0x1fc)](_0x23c7fc(0x1fd),_0x23c7fc(0x1fa),{'appCode':_0x1bed5a,'jsUrl':_0x42b77c[_0x23c7fc(0x1e1)],'cssUrl':_0x42b77c[_0x23c7fc(0x1d5)],'mode':_0x199b26,'dryRun':_0x4d177f[_0x23c7fc(0x200)]===!![]});if(_0x42b77c[_0x23c7fc(0x1e1)]){const _0x453bec=await isUrlReachable(_0x42b77c['jsUrl']);if(!_0x453bec)throw new Error(_0x23c7fc(0x1f7)+_0x42b77c[_0x23c7fc(0x1e1)]);}if(_0x42b77c[_0x23c7fc(0x1d5)]){const _0x92ee49=await isUrlReachable(_0x42b77c[_0x23c7fc(0x1d5)]);if(!_0x92ee49)throw new Error(_0x23c7fc(0x1de)+_0x42b77c[_0x23c7fc(0x1d5)]);}const _0xeab193=await getOnlineMenuList(_0x1bed5a,_0x5a2088),_0x23e0a2=_0xeab193[_0x23c7fc(0x1ed)](_0x5d12ec=>_0x5d12ec[_0x23c7fc(0x1e0)][_0x23c7fc(0x1f5)]>0x0);if(_0x23e0a2['length']===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x4d177f['dryRun']===!![]};const _0x25f9be=_0x23e0a2[_0x23c7fc(0x1dc)](_0x4551f2=>buildMenuUpdateDiff(_0x4551f2,_0x42b77c,_0x199b26,_0x4d177f[_0x23c7fc(0x1f6)]===!![]));if(_0x4d177f[_0x23c7fc(0x200)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x25f9be};const _0xf464c8=await Promise['allSettled'](_0x23e0a2[_0x23c7fc(0x1dc)]((_0x42a9a0,_0x556c75)=>updateMenuCdnUrl(_0x1bed5a,_0x5a2088,{'id':_0x42a9a0['id'],'label':_0x42a9a0[_0x23c7fc(0x1db)],'path':_0x42a9a0[_0x23c7fc(0x1e8)],'resources':_0x25f9be[_0x556c75][_0x23c7fc(0x204)][_0x23c7fc(0x1e0)],'extend':_0x42a9a0[_0x23c7fc(0x1f2)]??null}))),_0x40dc36=_0xf464c8[_0x23c7fc(0x1ed)](_0x5e8b97=>_0x5e8b97[_0x23c7fc(0x1fe)]===_0x23c7fc(0x1d7))[_0x23c7fc(0x1dc)](_0x2d418=>_0x2d418[_0x23c7fc(0x1e2)]),_0x171795=_0xf464c8[_0x23c7fc(0x1ed)](_0x50da3a=>_0x50da3a[_0x23c7fc(0x1fe)]===_0x23c7fc(0x1fb))['length'];return logger['info'](_0x23c7fc(0x1fd),_0x23c7fc(0x1f3),{'count':_0x23e0a2[_0x23c7fc(0x1f5)],'resources':_0x27b9ec}),{'updated':_0x40dc36[_0x23c7fc(0x1f5)],'failed':_0x171795,'skipped':![],'menus':_0x40dc36};}function normalizeMode(_0x48dce1){const _0x3b9c8d=a94_0x2b37;if(!_0x48dce1)return _0x3b9c8d(0x1d9);if(_0x48dce1===_0x3b9c8d(0x1d9)||_0x48dce1===_0x3b9c8d(0x20d))return _0x48dce1;throw new Error('Invalid\x20--mode:\x20'+_0x48dce1+_0x3b9c8d(0x201));}function buildMenuUpdateDiff(_0x202ac4,_0x52dbf2,_0x588cab,_0x5874c4){const _0xa55444=a94_0x2b37,_0x163f4c=[..._0x202ac4['resources']],_0x1e060b=_0x588cab===_0xa55444(0x20d)?patchResources(_0x163f4c,_0x52dbf2):replaceResources(_0x52dbf2),_0x47b85a=[],_0x5cdaa4=_0x163f4c[_0xa55444(0x203)](isJsResource),_0x2699d8=_0x1e060b['some'](isJsResource);if(_0x5cdaa4&&!_0x2699d8){const _0x3e041d=_0xa55444(0x209)+_0x202ac4[_0xa55444(0x1db)]+_0xa55444(0x1e3)+_0x202ac4[_0xa55444(0x1e8)]+_0xa55444(0x205)+_0xa55444(0x20b);if(!_0x5874c4)throw new Error(_0x3e041d);_0x47b85a[_0xa55444(0x1da)](_0x3e041d);}const _0x1df0ca=_0x163f4c[_0xa55444(0x203)](isCssResource),_0x466a00=_0x1e060b[_0xa55444(0x203)](isCssResource);return _0x1df0ca&&!_0x466a00&&_0x47b85a['push']('menu\x20update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22'+_0x202ac4['label']+_0xa55444(0x1e3)+_0x202ac4[_0xa55444(0x1e8)]+').'),{'id':_0x202ac4['id'],'label':_0x202ac4[_0xa55444(0x1db)],'path':_0x202ac4[_0xa55444(0x1e8)],'mode':_0x588cab,'before':{'resources':_0x163f4c},'after':{'resources':_0x1e060b},'warnings':_0x47b85a};}function replaceResources(_0x30e4c9){const _0x58cbfa=a94_0x2b37;return[_0x30e4c9[_0x58cbfa(0x1e1)],_0x30e4c9[_0x58cbfa(0x1d5)]]['filter'](_0x57f4e9=>!!_0x57f4e9);}function patchResources(_0x4f450c,_0x2f2bb0){const _0x14a9a3=a94_0x2b37;let _0x11c526=![],_0x3a9b88=![];const _0x3ec875=[];for(const _0x515868 of _0x4f450c){if(isJsResource(_0x515868)){if(_0x2f2bb0['jsUrl']&&!_0x11c526)_0x3ec875[_0x14a9a3(0x1da)](_0x2f2bb0[_0x14a9a3(0x1e1)]),_0x11c526=!![];else!_0x2f2bb0[_0x14a9a3(0x1e1)]&&_0x3ec875[_0x14a9a3(0x1da)](_0x515868);continue;}if(isCssResource(_0x515868)){if(_0x2f2bb0[_0x14a9a3(0x1d5)]&&!_0x3a9b88)_0x3ec875[_0x14a9a3(0x1da)](_0x2f2bb0[_0x14a9a3(0x1d5)]),_0x3a9b88=!![];else!_0x2f2bb0[_0x14a9a3(0x1d5)]&&_0x3ec875[_0x14a9a3(0x1da)](_0x515868);continue;}_0x3ec875[_0x14a9a3(0x1da)](_0x515868);}return _0x2f2bb0[_0x14a9a3(0x1e1)]&&!_0x11c526&&_0x3ec875[_0x14a9a3(0x1ec)](_0x2f2bb0['jsUrl']),_0x2f2bb0['cssUrl']&&!_0x3a9b88&&_0x3ec875['push'](_0x2f2bb0[_0x14a9a3(0x1d5)]),_0x3ec875;}function isJsResource(_0x2d61d9){const _0x326378=a94_0x2b37;return stripQuery(_0x2d61d9)['toLowerCase']()[_0x326378(0x1ff)](_0x326378(0x1df));}function isCssResource(_0x34aa92){const _0x3632f9=a94_0x2b37;return stripQuery(_0x34aa92)[_0x3632f9(0x1e5)]()[_0x3632f9(0x1ff)]('.css');}function stripQuery(_0x20f77d){const _0x45a12a=a94_0x2b37;return _0x20f77d[_0x45a12a(0x1f0)]('?')[0x0]??_0x20f77d;}function parseUpdateParamsFlag(_0x45bb88){const _0x1c4baf=a94_0x2b37;if(!_0x45bb88||typeof _0x45bb88!==_0x1c4baf(0x1d8))return{};try{const _0x57a664=JSON[_0x1c4baf(0x1f4)](_0x45bb88);if(typeof _0x57a664!=='object'||_0x57a664===null||Array[_0x1c4baf(0x20a)](_0x57a664))return{};return{'jsUrl':typeof _0x57a664['jsUrl']===_0x1c4baf(0x1d8)?_0x57a664[_0x1c4baf(0x1e1)][_0x1c4baf(0x1ea)]():undefined,'cssUrl':typeof _0x57a664['cssUrl']===_0x1c4baf(0x1d8)?_0x57a664[_0x1c4baf(0x1d5)]['trim']():undefined};}catch{return{};}}
1
+ function a94_0x4042(){const _0x41abd8=['push','Start\x20non-interactive\x20menu\x20update','448aofoTB',').\x20','menu-update','--params.','parse','Menu\x20update\x20completed','allSettled','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','object','map','split','endsWith','info','11JfTKTf','status','JS\x20URL\x20is\x20unreachable:\x20','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','7lFXKVD','Invalid\x20--params:\x20','toLowerCase','rejected','1657760HsfsLQ','Invalid\x20--mode:\x20','replace','fulfilled','.js','patch','.css','label','jsUrl','dryRun','path','menu\x20update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','message','377686zUwLQR','string','11402270ScAdSt','mode','extend','CSS\x20URL\x20is\x20unreachable:\x20','621362EZsdGY','4335018RtBZlG','9XmElcj','resources','89865VfroXz','field','force','length','after','unshift','cwd','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','filter','some','cssUrl','\x22\x20(','value','setLogPath','trim','384125UZebLS'];a94_0x4042=function(){return _0x41abd8;};return a94_0x4042();}(function(_0x2da2ea,_0x48b13d){const _0x774022=a94_0x215d,_0xddaec=_0x2da2ea();while(!![]){try{const _0x4d7d1c=-parseInt(_0x774022(0x1bd))/0x1+parseInt(_0x774022(0x1b7))/0x2*(-parseInt(_0x774022(0x1bf))/0x3)+parseInt(_0x774022(0x1aa))/0x4+-parseInt(_0x774022(0x1d1))/0x5+parseInt(_0x774022(0x1be))/0x6*(parseInt(_0x774022(0x1a6))/0x7)+-parseInt(_0x774022(0x1d4))/0x8*(parseInt(_0x774022(0x1c1))/0x9)+-parseInt(_0x774022(0x1b9))/0xa*(-parseInt(_0x774022(0x1a2))/0xb);if(_0x4d7d1c===_0x48b13d)break;else _0xddaec['push'](_0xddaec['shift']());}catch(_0x998f0b){_0xddaec['push'](_0xddaec['shift']());}}}(a94_0x4042,0x6eaae));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(_0x5449a3){const _0x41709a=a94_0x215d,_0x11d09b=[];return _0x5449a3[_0x41709a(0x1b2)]&&!isValidJsHttpsUrl(_0x5449a3['jsUrl'])&&_0x11d09b[_0x41709a(0x1d2)]({'field':_0x41709a(0x1b2),'message':_0x41709a(0x1c8)}),_0x5449a3[_0x41709a(0x1cc)]&&!isValidCssHttpsUrl(_0x5449a3[_0x41709a(0x1cc)])&&_0x11d09b[_0x41709a(0x1d2)]({'field':'cssUrl','message':_0x41709a(0x1db)}),_0x11d09b;}export async function runMenuUpdateCore(_0x4c2d4d,_0x6afeda,_0x2eb412,_0x1d6fc0={}){const _0x5d5fbd=a94_0x215d,_0x5ce88f=parseUpdateParamsFlag(_0x2eb412),_0x4abe72=normalizeMode(_0x1d6fc0[_0x5d5fbd(0x1ba)]),_0x2d53d6=[];if(_0x5ce88f[_0x5d5fbd(0x1b2)])_0x2d53d6['push'](_0x5ce88f[_0x5d5fbd(0x1b2)]);if(_0x5ce88f[_0x5d5fbd(0x1cc)])_0x2d53d6[_0x5d5fbd(0x1d2)](_0x5ce88f[_0x5d5fbd(0x1cc)]);const _0x8e9c6a=validateParams(_0x5ce88f);if(_0x8e9c6a[_0x5d5fbd(0x1c4)]>0x0){const _0xc5e7af=_0x8e9c6a[_0x5d5fbd(0x1dd)](_0x43f094=>_0x5d5fbd(0x1d7)+_0x43f094[_0x5d5fbd(0x1c2)]+':\x20'+_0x43f094[_0x5d5fbd(0x1b6)])['join'](';\x20');throw new Error(_0x5d5fbd(0x1a7)+_0xc5e7af);}if(_0x2d53d6['length']===0x0)throw new Error('Invalid\x20--params:\x20menu\x20update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20'+_0x5d5fbd(0x1c9));logger[_0x5d5fbd(0x1cf)](process[_0x5d5fbd(0x1c7)]()),logger[_0x5d5fbd(0x1a1)](_0x5d5fbd(0x1d6),_0x5d5fbd(0x1d3),{'appCode':_0x4c2d4d,'jsUrl':_0x5ce88f[_0x5d5fbd(0x1b2)],'cssUrl':_0x5ce88f['cssUrl'],'mode':_0x4abe72,'dryRun':_0x1d6fc0[_0x5d5fbd(0x1b3)]===!![]});if(_0x5ce88f[_0x5d5fbd(0x1b2)]){const _0x2107ea=await isUrlReachable(_0x5ce88f[_0x5d5fbd(0x1b2)]);if(!_0x2107ea)throw new Error(_0x5d5fbd(0x1a4)+_0x5ce88f[_0x5d5fbd(0x1b2)]);}if(_0x5ce88f[_0x5d5fbd(0x1cc)]){const _0x4aa3cd=await isUrlReachable(_0x5ce88f[_0x5d5fbd(0x1cc)]);if(!_0x4aa3cd)throw new Error(_0x5d5fbd(0x1bc)+_0x5ce88f[_0x5d5fbd(0x1cc)]);}const _0x375121=await getOnlineMenuList(_0x4c2d4d,_0x6afeda),_0x6108a3=_0x375121['filter'](_0x313fb6=>_0x313fb6[_0x5d5fbd(0x1c0)][_0x5d5fbd(0x1c4)]>0x0);if(_0x6108a3[_0x5d5fbd(0x1c4)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x1d6fc0['dryRun']===!![]};const _0x52dd40=_0x6108a3['map'](_0x4acf60=>buildMenuUpdateDiff(_0x4acf60,_0x5ce88f,_0x4abe72,_0x1d6fc0[_0x5d5fbd(0x1c3)]===!![]));if(_0x1d6fc0[_0x5d5fbd(0x1b3)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x52dd40};const _0x233fda=await Promise[_0x5d5fbd(0x1da)](_0x6108a3[_0x5d5fbd(0x1dd)]((_0x4aea5f,_0x55af25)=>updateMenuCdnUrl(_0x4c2d4d,_0x6afeda,{'id':_0x4aea5f['id'],'label':_0x4aea5f[_0x5d5fbd(0x1b1)],'path':_0x4aea5f[_0x5d5fbd(0x1b4)],'resources':_0x52dd40[_0x55af25][_0x5d5fbd(0x1c5)][_0x5d5fbd(0x1c0)],'extend':_0x4aea5f[_0x5d5fbd(0x1bb)]??null}))),_0x33969f=_0x233fda[_0x5d5fbd(0x1ca)](_0x4f498d=>_0x4f498d[_0x5d5fbd(0x1a3)]===_0x5d5fbd(0x1ad))[_0x5d5fbd(0x1dd)](_0x34b7a6=>_0x34b7a6[_0x5d5fbd(0x1ce)]),_0x55fa4e=_0x233fda[_0x5d5fbd(0x1ca)](_0x288588=>_0x288588[_0x5d5fbd(0x1a3)]===_0x5d5fbd(0x1a9))[_0x5d5fbd(0x1c4)];return logger[_0x5d5fbd(0x1a1)]('menu-update',_0x5d5fbd(0x1d9),{'count':_0x6108a3['length'],'resources':_0x2d53d6}),{'updated':_0x33969f[_0x5d5fbd(0x1c4)],'failed':_0x55fa4e,'skipped':![],'menus':_0x33969f};}function normalizeMode(_0x4dbe8d){const _0x36a14b=a94_0x215d;if(!_0x4dbe8d)return _0x36a14b(0x1ac);if(_0x4dbe8d==='replace'||_0x4dbe8d==='patch')return _0x4dbe8d;throw new Error(_0x36a14b(0x1ab)+_0x4dbe8d+'.\x20Allowed\x20values:\x20replace,\x20patch');}function buildMenuUpdateDiff(_0x14180e,_0x3b3896,_0x358d5a,_0x1a6585){const _0x15c78e=a94_0x215d,_0x239304=[..._0x14180e['resources']],_0x5e6c93=_0x358d5a===_0x15c78e(0x1af)?patchResources(_0x239304,_0x3b3896):replaceResources(_0x3b3896),_0x14ad90=[],_0x53f76c=_0x239304['some'](isJsResource),_0x427215=_0x5e6c93[_0x15c78e(0x1cb)](isJsResource);if(_0x53f76c&&!_0x427215){const _0x41993f='menu\x20update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22'+_0x14180e[_0x15c78e(0x1b1)]+_0x15c78e(0x1cd)+_0x14180e[_0x15c78e(0x1b4)]+_0x15c78e(0x1d5)+_0x15c78e(0x1a5);if(!_0x1a6585)throw new Error(_0x41993f);_0x14ad90[_0x15c78e(0x1d2)](_0x41993f);}const _0x240e70=_0x239304['some'](isCssResource),_0x1faf7e=_0x5e6c93['some'](isCssResource);return _0x240e70&&!_0x1faf7e&&_0x14ad90[_0x15c78e(0x1d2)](_0x15c78e(0x1b5)+_0x14180e['label']+_0x15c78e(0x1cd)+_0x14180e[_0x15c78e(0x1b4)]+').'),{'id':_0x14180e['id'],'label':_0x14180e[_0x15c78e(0x1b1)],'path':_0x14180e[_0x15c78e(0x1b4)],'mode':_0x358d5a,'before':{'resources':_0x239304},'after':{'resources':_0x5e6c93},'warnings':_0x14ad90};}function replaceResources(_0x51daa9){const _0x7d8a7e=a94_0x215d;return[_0x51daa9[_0x7d8a7e(0x1b2)],_0x51daa9['cssUrl']][_0x7d8a7e(0x1ca)](_0x2262c7=>!!_0x2262c7);}function patchResources(_0x26d9aa,_0x4fd781){const _0x2abc07=a94_0x215d;let _0x2bedd1=![],_0x552225=![];const _0x192261=[];for(const _0x1afdc5 of _0x26d9aa){if(isJsResource(_0x1afdc5)){if(_0x4fd781[_0x2abc07(0x1b2)]&&!_0x2bedd1)_0x192261[_0x2abc07(0x1d2)](_0x4fd781[_0x2abc07(0x1b2)]),_0x2bedd1=!![];else!_0x4fd781[_0x2abc07(0x1b2)]&&_0x192261[_0x2abc07(0x1d2)](_0x1afdc5);continue;}if(isCssResource(_0x1afdc5)){if(_0x4fd781[_0x2abc07(0x1cc)]&&!_0x552225)_0x192261[_0x2abc07(0x1d2)](_0x4fd781[_0x2abc07(0x1cc)]),_0x552225=!![];else!_0x4fd781[_0x2abc07(0x1cc)]&&_0x192261[_0x2abc07(0x1d2)](_0x1afdc5);continue;}_0x192261[_0x2abc07(0x1d2)](_0x1afdc5);}return _0x4fd781['jsUrl']&&!_0x2bedd1&&_0x192261[_0x2abc07(0x1c6)](_0x4fd781[_0x2abc07(0x1b2)]),_0x4fd781[_0x2abc07(0x1cc)]&&!_0x552225&&_0x192261[_0x2abc07(0x1d2)](_0x4fd781['cssUrl']),_0x192261;}function isJsResource(_0x28d2eb){const _0x149721=a94_0x215d;return stripQuery(_0x28d2eb)[_0x149721(0x1a8)]()[_0x149721(0x1a0)](_0x149721(0x1ae));}function isCssResource(_0x1152b5){const _0x431236=a94_0x215d;return stripQuery(_0x1152b5)[_0x431236(0x1a8)]()[_0x431236(0x1a0)](_0x431236(0x1b0));}function stripQuery(_0x4aec37){const _0x1266f0=a94_0x215d;return _0x4aec37[_0x1266f0(0x19f)]('?')[0x0]??_0x4aec37;}function a94_0x215d(_0x521b4b,_0x1089ca){_0x521b4b=_0x521b4b-0x19f;const _0x404269=a94_0x4042();let _0x215d37=_0x404269[_0x521b4b];return _0x215d37;}function parseUpdateParamsFlag(_0x410a1c){const _0x5ec62f=a94_0x215d;if(!_0x410a1c||typeof _0x410a1c!==_0x5ec62f(0x1b8))return{};try{const _0x928644=JSON[_0x5ec62f(0x1d8)](_0x410a1c);if(typeof _0x928644!==_0x5ec62f(0x1dc)||_0x928644===null||Array['isArray'](_0x928644))return{};return{'jsUrl':typeof _0x928644[_0x5ec62f(0x1b2)]==='string'?_0x928644['jsUrl']['trim']():undefined,'cssUrl':typeof _0x928644[_0x5ec62f(0x1cc)]===_0x5ec62f(0x1b8)?_0x928644[_0x5ec62f(0x1cc)][_0x5ec62f(0x1d0)]():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- (function(_0x56a2c7,_0x28d88b){const _0x4777e0=a95_0x57ef,_0x3a50b2=_0x56a2c7();while(!![]){try{const _0x778c6b=-parseInt(_0x4777e0(0x12d))/0x1*(parseInt(_0x4777e0(0x128))/0x2)+parseInt(_0x4777e0(0x130))/0x3*(parseInt(_0x4777e0(0x132))/0x4)+-parseInt(_0x4777e0(0x129))/0x5*(parseInt(_0x4777e0(0x133))/0x6)+parseInt(_0x4777e0(0x126))/0x7*(parseInt(_0x4777e0(0x12f))/0x8)+parseInt(_0x4777e0(0x134))/0x9+parseInt(_0x4777e0(0x131))/0xa*(parseInt(_0x4777e0(0x127))/0xb)+-parseInt(_0x4777e0(0x12a))/0xc;if(_0x778c6b===_0x28d88b)break;else _0x3a50b2['push'](_0x3a50b2['shift']());}catch(_0x51eaa9){_0x3a50b2['push'](_0x3a50b2['shift']());}}}(a95_0x21ee,0xeb34a));export function isValidJsHttpsUrl(_0x46d8d7){return/^https:\/\/.+\.js(\?.*)?$/['test'](_0x46d8d7['trim']());}function a95_0x57ef(_0x549850,_0x13f890){_0x549850=_0x549850-0x126;const _0x21ee67=a95_0x21ee();let _0x57efc8=_0x21ee67[_0x549850];return _0x57efc8;}function a95_0x21ee(){const _0x22a1bf=['3816194TnUdlt','2876595lzeSIc','4114116AfeDMv','HEAD','trim','1BUsIkI','test','16PsGrhK','9552URWZPa','510aqHNNf','580hVFpYO','6djZDan','15386292Zhzupr','760802pWhFas','302181pSeGqE'];a95_0x21ee=function(){return _0x22a1bf;};return a95_0x21ee();}export function isValidCssHttpsUrl(_0x776e93){const _0x28f498=a95_0x57ef;return/^https:\/\/.+\.css(\?.*)?$/[_0x28f498(0x12e)](_0x776e93[_0x28f498(0x12c)]());}export async function isUrlReachable(_0xec2d1){const _0x36654f=a95_0x57ef;try{const _0x46975f=await fetch(_0xec2d1,{'method':_0x36654f(0x12b)});return _0x46975f['ok'];}catch{return![];}}
1
+ (function(_0x309c98,_0x4f4610){const _0x1e825f=a95_0x564e,_0x3f1575=_0x309c98();while(!![]){try{const _0x124396=parseInt(_0x1e825f(0x10e))/0x1+parseInt(_0x1e825f(0x112))/0x2*(parseInt(_0x1e825f(0x113))/0x3)+parseInt(_0x1e825f(0x10a))/0x4*(parseInt(_0x1e825f(0x117))/0x5)+parseInt(_0x1e825f(0x116))/0x6*(-parseInt(_0x1e825f(0x111))/0x7)+-parseInt(_0x1e825f(0x114))/0x8*(-parseInt(_0x1e825f(0x10f))/0x9)+parseInt(_0x1e825f(0x108))/0xa*(parseInt(_0x1e825f(0x110))/0xb)+-parseInt(_0x1e825f(0x10c))/0xc*(parseInt(_0x1e825f(0x10b))/0xd);if(_0x124396===_0x4f4610)break;else _0x3f1575['push'](_0x3f1575['shift']());}catch(_0x2a87cc){_0x3f1575['push'](_0x3f1575['shift']());}}}(a95_0x5c55,0xa7b11));function a95_0x564e(_0x200fce,_0x4ea8f2){_0x200fce=_0x200fce-0x108;const _0x5c5587=a95_0x5c55();let _0x564e8b=_0x5c5587[_0x200fce];return _0x564e8b;}export function isValidJsHttpsUrl(_0x211e0f){const _0x315e6c=a95_0x564e;return/^https:\/\/.+\.js(\?.*)?$/['test'](_0x211e0f[_0x315e6c(0x115)]());}export function isValidCssHttpsUrl(_0x5b20dd){const _0x1a63a0=a95_0x564e;return/^https:\/\/.+\.css(\?.*)?$/[_0x1a63a0(0x10d)](_0x5b20dd['trim']());}function a95_0x5c55(){const _0x551959=['4854mqbXuF','477qqgHGY','2472AhtDjX','trim','7959522RaEFNo','10piFoUx','1130HOvSpK','HEAD','1028876XTPCkN','26lmZcuy','13583664qyzICd','test','1135275URPfvl','31905HDdBvP','111595CyJsjq','7anFmqi'];a95_0x5c55=function(){return _0x551959;};return a95_0x5c55();}export async function isUrlReachable(_0x341bba){const _0x33d253=a95_0x564e;try{const _0x9cfeba=await fetch(_0x341bba,{'method':_0x33d253(0x109)});return _0x9cfeba['ok'];}catch{return![];}}
@@ -1 +1 @@
1
- const a96_0x213a17=a96_0x3e75;(function(_0xf110df,_0x4c91a7){const _0x35fd0f=a96_0x3e75,_0x344d47=_0xf110df();while(!![]){try{const _0x9dc4f7=-parseInt(_0x35fd0f(0x181))/0x1*(parseInt(_0x35fd0f(0x180))/0x2)+-parseInt(_0x35fd0f(0x15e))/0x3*(parseInt(_0x35fd0f(0x157))/0x4)+parseInt(_0x35fd0f(0x168))/0x5+parseInt(_0x35fd0f(0x14c))/0x6*(parseInt(_0x35fd0f(0x150))/0x7)+parseInt(_0x35fd0f(0x146))/0x8*(parseInt(_0x35fd0f(0x169))/0x9)+-parseInt(_0x35fd0f(0x153))/0xa*(-parseInt(_0x35fd0f(0x183))/0xb)+parseInt(_0x35fd0f(0x159))/0xc*(-parseInt(_0x35fd0f(0x187))/0xd);if(_0x9dc4f7===_0x4c91a7)break;else _0x344d47['push'](_0x344d47['shift']());}catch(_0x357586){_0x344d47['push'](_0x344d47['shift']());}}}(a96_0x147f,0x5f918));import a96_0xdf2870 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';function a96_0x147f(){const _0x29081b=['gray','118481BRyKCD','length','parse','rawFlags','8684zCXTIu','trim','object','skipped','validation','Menu\x20sync\x20completed:\x20','424TatWfL','\x20menu(s)','failed','sync','\x20\x20Continue\x20with\x20creation?','onlinePaths','4374798tCRgme','\x20failed.','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','Online\x20menu\x20list\x20fetched','7iTebgt','map','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','250QYxOWo','params','\x20created.','Creating\x20','4KXcvna','write','4656HGyFDg','\x20menu(s)...','\x20\x20✓\x20Selected:\x20','cyan','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','1175709dRAnFH','\x20and\x20CSS:\x20','Failed\x20to\x20fetch\x20online\x20menu\x20list','jsUrl','menu','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22,\x22pages\x22:[\x22Page1\x22]}','boolean','\x20created,\x20','appCode','\x20\x20Create\x20','1515575fHxBqQ','54099CMHEPP','Menu\x20creation\x20failed','\x20\x20Cancelled.','string','selectedAppName','localPages','pages','yellow','\x20page(s)','yes','created','\x20menu(s)\x20created','Pre-fill\x20JS/CSS\x20URLs\x20and/or\x20select\x20specific\x20pages.\x20','size','cssUrl','message','Sync\x20local\x20pages\x20as\x20platform\x20menus','onlineMenuList','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','Menu\x20sync\x20skipped','✓\x20Menu\x20sync\x20completed:\x20','Fetching\x20online\x20menu\x20list...','flag','6382oPgFgK','181qKVNgU'];a96_0x147f=function(){return _0x29081b;};return a96_0x147f();}import{CliErrors}from'../../errors.js';function a96_0x3e75(_0x2999d1,_0x4d4c51){_0x2999d1=_0x2999d1-0x142;const _0x147f02=a96_0x147f();let _0x3e75c6=_0x147f02[_0x2999d1];return _0x3e75c6;}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':a96_0x213a17(0x162),'command':a96_0x213a17(0x149),'description':a96_0x213a17(0x179),'risk':a96_0x213a17(0x158),'flags':[{'name':a96_0x213a17(0x154),'type':a96_0x213a17(0x16c),'description':a96_0x213a17(0x175)+a96_0x213a17(0x163)},{'name':a96_0x213a17(0x172),'type':a96_0x213a17(0x164),'description':'Non-interactive:\x20auto-create\x20all\x20local\x20pages\x20not\x20yet\x20on\x20platform'}],async 'execute'(_0x340b1d){const _0x1417f4=a96_0x213a17,_0x471f87=_0x340b1d[_0x1417f4(0x186)]['appcode']?String(_0x340b1d[_0x1417f4(0x186)]['appcode'])['trim']():'';if(!isInProject()&&!_0x340b1d[_0x1417f4(0x16d)]&&!_0x471f87)throw CliErrors[_0x1417f4(0x144)](_0x1417f4(0x15d)+_0x1417f4(0x17b));const _0x4673aa=_0x340b1d[_0x1417f4(0x17f)]('yes'),_0xb047aa=_0x340b1d['str'](_0x1417f4(0x154)),_0x1af423=parseParams(_0xb047aa),_0x4b8e45=!!(_0x1af423['jsUrl']||_0x1af423[_0x1417f4(0x177)]||_0x1af423[_0x1417f4(0x16f)]&&_0x1af423[_0x1417f4(0x16f)][_0x1417f4(0x184)]>0x0);if(_0x4673aa||_0x4b8e45){let _0x2d6bfd=[];!isInteractive()&&!_0x1af423[_0x1417f4(0x16f)]?.[_0x1417f4(0x184)]&&(_0x2d6bfd=await readPageLabelsFromStdin());const _0x28fe59=await runMenuSyncCore(_0x340b1d['appCode'],_0x340b1d['cookie'],_0x2d6bfd[_0x1417f4(0x184)]>0x0?_0x2d6bfd:_0x1af423[_0x1417f4(0x16f)]??[],_0xb047aa);if(_0x28fe59['skipped']){const _0x11408e=getLocalPages();_0x11408e[_0x1417f4(0x184)]===0x0?writeCliSideChannelLine(_0x1417f4(0x152)):writeCliSideChannelLine(_0x1417f4(0x14e));}else writeCliSideChannelLine(_0x1417f4(0x17d)+_0x28fe59[_0x1417f4(0x173)]+_0x1417f4(0x174));return{'ok':!![],'data':_0x28fe59,'message':_0x28fe59[_0x1417f4(0x143)]?_0x1417f4(0x17c):_0x1417f4(0x145)+_0x28fe59[_0x1417f4(0x173)]+_0x1417f4(0x155)};}requireInteractive();const _0x5bf363=startSpinner(_0x1417f4(0x17e));let _0x368b61,_0x203121,_0x2d000d;try{const _0xd6c34a=await fetchMenuData(_0x340b1d[_0x1417f4(0x166)],_0x340b1d['cookie']);_0x368b61=_0xd6c34a[_0x1417f4(0x16e)],_0x203121=_0xd6c34a[_0x1417f4(0x14b)],_0x2d000d=_0xd6c34a[_0x1417f4(0x17a)],stopSpinner(_0x5bf363,_0x1417f4(0x14f),!![]);}catch(_0x8895bc){stopSpinner(_0x5bf363,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors['validation'](_0x8895bc instanceof Error?_0x8895bc[_0x1417f4(0x178)]:_0x1417f4(0x160));}if(_0x368b61[_0x1417f4(0x184)]===0x0)return writeCliSideChannelLine(a96_0xdf2870[_0x1417f4(0x170)]('\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first')),{'ok':!![]};const _0x3d9f9e=buildCompareRows(_0x368b61,_0x203121);writeCliSideChannelLine(renderCompareTable(_0x3d9f9e)),writeCliSideChannelLine('');const _0x2897d3=_0x1af423[_0x1417f4(0x16f)],_0x5d2854=await selectPages(_0x368b61,_0x203121,_0x2897d3);writeCliSideChannelLine(''),writeCliSideChannelLine(a96_0xdf2870[_0x1417f4(0x15c)](_0x1417f4(0x15b)+_0x5d2854[_0x1417f4(0x184)]+_0x1417f4(0x171)));const _0x200cd9=_0x1af423[_0x1417f4(0x161)]&&_0x1af423[_0x1417f4(0x177)];if(!_0x200cd9){writeCliSideChannelLine(renderSyncSummary(_0x5d2854,_0x203121[_0x1417f4(0x176)]>0x0));const _0x413300=await askConfirm(_0x1417f4(0x14a));if(!_0x413300)return writeCliSideChannelLine(a96_0xdf2870[_0x1417f4(0x182)](_0x1417f4(0x16b))),{'ok':!![]};}let _0x311d45=_0x1af423[_0x1417f4(0x161)],_0x5041e4=_0x1af423[_0x1417f4(0x177)];!_0x311d45&&(_0x311d45=await askJsUrl());!_0x5041e4&&(_0x5041e4=await askCssUrl());const _0x17db1a=await askConfirm(_0x1417f4(0x167)+_0x5d2854[_0x1417f4(0x184)]+'\x20menu(s)\x20with\x20JS:\x20'+_0x311d45+_0x1417f4(0x15f)+_0x5041e4+'?');if(!_0x17db1a)return writeCliSideChannelLine(a96_0xdf2870[_0x1417f4(0x182)](_0x1417f4(0x16b))),{'ok':!![]};const _0x2fbef7=[_0x311d45,_0x5041e4],_0x4b8f2d=startSpinner(_0x1417f4(0x156)+_0x5d2854[_0x1417f4(0x184)]+_0x1417f4(0x15a));try{const _0x565540=await doCreateMenus(_0x340b1d[_0x1417f4(0x166)],_0x340b1d['cookie'],_0x5d2854,_0x2fbef7);return stopSpinner(_0x4b8f2d,'Created\x20'+_0x565540[_0x1417f4(0x173)]+_0x1417f4(0x147),!![]),{'ok':!![],'data':_0x565540,'message':_0x1417f4(0x145)+_0x565540['created']+_0x1417f4(0x165)+_0x565540[_0x1417f4(0x148)]+_0x1417f4(0x14d)};}catch(_0x1b47a8){stopSpinner(_0x4b8f2d,'Menu\x20creation\x20failed',![]);throw CliErrors[_0x1417f4(0x144)](_0x1b47a8 instanceof Error?_0x1b47a8[_0x1417f4(0x178)]:_0x1417f4(0x16a));}}};function parseParams(_0x2e08c6){const _0x51c6aa=a96_0x213a17;if(!_0x2e08c6)return{};try{const _0x30f26e=JSON[_0x51c6aa(0x185)](_0x2e08c6);if(typeof _0x30f26e!==_0x51c6aa(0x142)||_0x30f26e===null||Array['isArray'](_0x30f26e))return{};return{'jsUrl':typeof _0x30f26e[_0x51c6aa(0x161)]==='string'?_0x30f26e[_0x51c6aa(0x161)][_0x51c6aa(0x188)]():undefined,'cssUrl':typeof _0x30f26e[_0x51c6aa(0x177)]===_0x51c6aa(0x16c)?_0x30f26e['cssUrl'][_0x51c6aa(0x188)]():undefined,'pages':Array['isArray'](_0x30f26e[_0x51c6aa(0x16f)])?_0x30f26e['pages'][_0x51c6aa(0x151)](String):undefined};}catch{return{};}}
1
+ const a96_0x285265=a96_0x239b;(function(_0x193311,_0x544c04){const _0x277499=a96_0x239b,_0x3c32e5=_0x193311();while(!![]){try{const _0x230f79=parseInt(_0x277499(0x106))/0x1*(-parseInt(_0x277499(0x13b))/0x2)+parseInt(_0x277499(0x137))/0x3+-parseInt(_0x277499(0x115))/0x4*(parseInt(_0x277499(0x104))/0x5)+parseInt(_0x277499(0x11a))/0x6+parseInt(_0x277499(0x12c))/0x7*(-parseInt(_0x277499(0x114))/0x8)+-parseInt(_0x277499(0x110))/0x9+parseInt(_0x277499(0xfc))/0xa*(parseInt(_0x277499(0x127))/0xb);if(_0x230f79===_0x544c04)break;else _0x3c32e5['push'](_0x3c32e5['shift']());}catch(_0x505eb1){_0x3c32e5['push'](_0x3c32e5['shift']());}}}(a96_0x2555,0x3cb1a));import a96_0x412e79 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';function a96_0x2555(){const _0xba58ab=['appCode','✓\x20Menu\x20sync\x20completed:\x20','object','259LjcxFU','cookie','validation','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','flag','\x20menu(s)\x20with\x20JS:\x20','boolean','Non-interactive:\x20auto-create\x20all\x20local\x20pages\x20not\x20yet\x20on\x20platform','yes','isArray','params','696027SOjBwX','size','sync','Menu\x20creation\x20failed','2TGtPFd','\x20menu(s)\x20created','skipped','10VdxYlJ','\x20failed.','yellow','cssUrl','onlinePaths','\x20\x20Cancelled.','string','length','5RrTZAQ','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','16031KRpofj','Sync\x20local\x20pages\x20as\x20platform\x20menus','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22,\x22pages\x22:[\x22Page1\x22]}','Online\x20menu\x20list\x20fetched','message','\x20menu(s)...','gray','map','Menu\x20sync\x20completed:\x20','\x20menu(s)','4074408VPVAYz','write','Pre-fill\x20JS/CSS\x20URLs\x20and/or\x20select\x20specific\x20pages.\x20','trim','43944DciyVK','15944IsJGqf','failed','\x20page(s)','jsUrl','pages','531552lCBedd','menu','Menu\x20sync\x20skipped','localPages','Fetching\x20online\x20menu\x20list...','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','appcode','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','created','cyan','\x20and\x20CSS:\x20','\x20created,\x20','str','6643681YjiXdv','parse'];a96_0x2555=function(){return _0xba58ab;};return a96_0x2555();}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';function a96_0x239b(_0x35fc5c,_0x532cec){_0x35fc5c=_0x35fc5c-0xfa;const _0x255527=a96_0x2555();let _0x239b0b=_0x255527[_0x35fc5c];return _0x239b0b;}import{isInProject}from'../../context.js';export const menuSync={'service':a96_0x285265(0x11b),'command':a96_0x285265(0x139),'description':a96_0x285265(0x107),'risk':a96_0x285265(0x111),'flags':[{'name':a96_0x285265(0x136),'type':a96_0x285265(0x102),'description':a96_0x285265(0x112)+a96_0x285265(0x108)},{'name':'yes','type':a96_0x285265(0x132),'description':a96_0x285265(0x133)}],async 'execute'(_0x4d5d32){const _0x1d831e=a96_0x285265,_0x26fbec=_0x4d5d32['rawFlags']['appcode']?String(_0x4d5d32['rawFlags'][_0x1d831e(0x120)])[_0x1d831e(0x113)]():'';if(!isInProject()&&!_0x4d5d32['selectedAppName']&&!_0x26fbec)throw CliErrors['validation'](_0x1d831e(0x121)+'Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.');const _0x245cb3=_0x4d5d32[_0x1d831e(0x130)](_0x1d831e(0x134)),_0x230e7d=_0x4d5d32[_0x1d831e(0x126)](_0x1d831e(0x136)),_0x10a7ed=parseParams(_0x230e7d),_0x34304f=!!(_0x10a7ed[_0x1d831e(0x118)]||_0x10a7ed[_0x1d831e(0xff)]||_0x10a7ed[_0x1d831e(0x119)]&&_0x10a7ed[_0x1d831e(0x119)][_0x1d831e(0x103)]>0x0);if(_0x245cb3||_0x34304f){let _0x21ffd3=[];!isInteractive()&&!_0x10a7ed[_0x1d831e(0x119)]?.[_0x1d831e(0x103)]&&(_0x21ffd3=await readPageLabelsFromStdin());const _0x5eb12e=await runMenuSyncCore(_0x4d5d32[_0x1d831e(0x129)],_0x4d5d32['cookie'],_0x21ffd3[_0x1d831e(0x103)]>0x0?_0x21ffd3:_0x10a7ed[_0x1d831e(0x119)]??[],_0x230e7d);if(_0x5eb12e[_0x1d831e(0xfb)]){const _0x11310b=getLocalPages();_0x11310b[_0x1d831e(0x103)]===0x0?writeCliSideChannelLine(_0x1d831e(0x11f)):writeCliSideChannelLine(_0x1d831e(0x12f));}else writeCliSideChannelLine(_0x1d831e(0x12a)+_0x5eb12e[_0x1d831e(0x122)]+_0x1d831e(0xfa));return{'ok':!![],'data':_0x5eb12e,'message':_0x5eb12e[_0x1d831e(0xfb)]?_0x1d831e(0x11c):'Menu\x20sync\x20completed:\x20'+_0x5eb12e[_0x1d831e(0x122)]+'\x20created.'};}requireInteractive();const _0x3c114d=startSpinner(_0x1d831e(0x11e));let _0x5311dd,_0x349168,_0x65b165;try{const _0xfd4a1d=await fetchMenuData(_0x4d5d32[_0x1d831e(0x129)],_0x4d5d32[_0x1d831e(0x12d)]);_0x5311dd=_0xfd4a1d[_0x1d831e(0x11d)],_0x349168=_0xfd4a1d[_0x1d831e(0x100)],_0x65b165=_0xfd4a1d['onlineMenuList'],stopSpinner(_0x3c114d,_0x1d831e(0x109),!![]);}catch(_0xd02964){stopSpinner(_0x3c114d,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors[_0x1d831e(0x12e)](_0xd02964 instanceof Error?_0xd02964['message']:'Failed\x20to\x20fetch\x20online\x20menu\x20list');}if(_0x5311dd[_0x1d831e(0x103)]===0x0)return writeCliSideChannelLine(a96_0x412e79[_0x1d831e(0xfe)](_0x1d831e(0x105))),{'ok':!![]};const _0x20eb1e=buildCompareRows(_0x5311dd,_0x349168);writeCliSideChannelLine(renderCompareTable(_0x20eb1e)),writeCliSideChannelLine('');const _0x295044=_0x10a7ed['pages'],_0x3c3b42=await selectPages(_0x5311dd,_0x349168,_0x295044);writeCliSideChannelLine(''),writeCliSideChannelLine(a96_0x412e79[_0x1d831e(0x123)]('\x20\x20✓\x20Selected:\x20'+_0x3c3b42[_0x1d831e(0x103)]+_0x1d831e(0x117)));const _0x58a008=_0x10a7ed[_0x1d831e(0x118)]&&_0x10a7ed[_0x1d831e(0xff)];if(!_0x58a008){writeCliSideChannelLine(renderSyncSummary(_0x3c3b42,_0x349168[_0x1d831e(0x138)]>0x0));const _0x2adc3c=await askConfirm('\x20\x20Continue\x20with\x20creation?');if(!_0x2adc3c)return writeCliSideChannelLine(a96_0x412e79[_0x1d831e(0x10c)](_0x1d831e(0x101))),{'ok':!![]};}let _0x71472a=_0x10a7ed[_0x1d831e(0x118)],_0x1e6976=_0x10a7ed[_0x1d831e(0xff)];!_0x71472a&&(_0x71472a=await askJsUrl());!_0x1e6976&&(_0x1e6976=await askCssUrl());const _0x397b72=await askConfirm('\x20\x20Create\x20'+_0x3c3b42[_0x1d831e(0x103)]+_0x1d831e(0x131)+_0x71472a+_0x1d831e(0x124)+_0x1e6976+'?');if(!_0x397b72)return writeCliSideChannelLine(a96_0x412e79[_0x1d831e(0x10c)](_0x1d831e(0x101))),{'ok':!![]};const _0x13f3f4=[_0x71472a,_0x1e6976],_0x2286d9=startSpinner('Creating\x20'+_0x3c3b42['length']+_0x1d831e(0x10b));try{const _0x38c709=await doCreateMenus(_0x4d5d32[_0x1d831e(0x129)],_0x4d5d32[_0x1d831e(0x12d)],_0x3c3b42,_0x13f3f4);return stopSpinner(_0x2286d9,'Created\x20'+_0x38c709[_0x1d831e(0x122)]+_0x1d831e(0x10f),!![]),{'ok':!![],'data':_0x38c709,'message':_0x1d831e(0x10e)+_0x38c709[_0x1d831e(0x122)]+_0x1d831e(0x125)+_0x38c709[_0x1d831e(0x116)]+_0x1d831e(0xfd)};}catch(_0x1425ce){stopSpinner(_0x2286d9,_0x1d831e(0x13a),![]);throw CliErrors['validation'](_0x1425ce instanceof Error?_0x1425ce[_0x1d831e(0x10a)]:_0x1d831e(0x13a));}}};function parseParams(_0x2b71c6){const _0x442270=a96_0x285265;if(!_0x2b71c6)return{};try{const _0x4d2591=JSON[_0x442270(0x128)](_0x2b71c6);if(typeof _0x4d2591!==_0x442270(0x12b)||_0x4d2591===null||Array[_0x442270(0x135)](_0x4d2591))return{};return{'jsUrl':typeof _0x4d2591['jsUrl']===_0x442270(0x102)?_0x4d2591[_0x442270(0x118)]['trim']():undefined,'cssUrl':typeof _0x4d2591[_0x442270(0xff)]===_0x442270(0x102)?_0x4d2591['cssUrl']['trim']():undefined,'pages':Array['isArray'](_0x4d2591[_0x442270(0x119)])?_0x4d2591[_0x442270(0x119)][_0x442270(0x10d)](String):undefined};}catch{return{};}}
@@ -1 +1 @@
1
- const a97_0x2c7627=a97_0x2394;(function(_0x492601,_0x5d36cf){const _0x26ba5b=a97_0x2394,_0x3d3502=_0x492601();while(!![]){try{const _0x3e70aa=-parseInt(_0x26ba5b(0x15f))/0x1+parseInt(_0x26ba5b(0x11f))/0x2*(parseInt(_0x26ba5b(0x120))/0x3)+-parseInt(_0x26ba5b(0x15b))/0x4*(-parseInt(_0x26ba5b(0x154))/0x5)+-parseInt(_0x26ba5b(0x145))/0x6+-parseInt(_0x26ba5b(0x13a))/0x7*(parseInt(_0x26ba5b(0x14e))/0x8)+parseInt(_0x26ba5b(0x150))/0x9*(-parseInt(_0x26ba5b(0x12d))/0xa)+parseInt(_0x26ba5b(0x131))/0xb;if(_0x3e70aa===_0x5d36cf)break;else _0x3d3502['push'](_0x3d3502['shift']());}catch(_0x59f74d){_0x3d3502['push'](_0x3d3502['shift']());}}}(a97_0x3e4c,0x5c9ad));import a97_0x46f746 from'chalk';function a97_0x2394(_0x4946ce,_0x59a7a9){_0x4946ce=_0x4946ce-0x117;const _0x3e4c5d=a97_0x3e4c();let _0x23941e=_0x3e4c5d[_0x4946ce];return _0x23941e;}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';function a97_0x3e4c(){const _0x39071c=['\x20menu(s)...','406arTgeg','menu','/smartapi/menu/update','Online\x20menu\x20list\x20fetched','Allow\x20replace\x20mode\x20to\x20remove\x20existing\x20JS\x20resources','\x20\x20Found\x20','yes','object','\x20updated.','\x20menu\x20resource\x20set(s).','update','2494590qsFgID','bool','No\x20menus\x20with\x20existing\x20resources\x20would\x20be\x20updated.','selectedAppName','validation','Menu\x20update\x20completed:\x20','\x20\x20Cancelled.','failed','appCode','43184yZjoKR','string','54fChSwX','Non-interactive:\x20update\x20all\x20menus\x20without\x20confirmation;\x20requires\x20--params','parse','trim','5vTZEMD','menu\x20update\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','cssUrl','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','Update\x20CDN\x20asset\x20URLs\x20for\x20all\x20online\x20menus\x20with\x20existing\x20resources','appcode','\x20menu(s)\x20updated','2623844aRqGFg','message','label','replace','101318DCjzRc','Invalid\x20--mode.\x20Allowed\x20values:\x20replace,\x20patch','\x20menu(s)','diffs','\x20\x20Update\x20','boolean','!\x20No\x20menus\x20with\x20existing\x20resources\x20found','skipped','high-risk-write','99358VETTWg','18OfquGJ','rawFlags','Would\x20update\x20','\x20and\x20CSS:\x20','updated','cookie','\x20\x20!\x20No\x20menus\x20with\x20existing\x20resources\x20found','mode','patch','\x20failed.','force','params','str','994860eyoSzq','Failed\x20to\x20fetch\x20online\x20menu\x20list','\x20updated,\x20','length','9375927FxXpst','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','Menu\x20update\x20failed','map','\x20menu(s)\x20failed','\x20menu(s)\x20with\x20JS:\x20','Menu\x20update\x20skipped','jsUrl'];a97_0x3e4c=function(){return _0x39071c;};return a97_0x3e4c();}export const menuUpdate={'service':a97_0x2c7627(0x13b),'command':a97_0x2c7627(0x144),'description':a97_0x2c7627(0x158),'risk':a97_0x2c7627(0x11e),'flags':[{'name':a97_0x2c7627(0x12b),'type':a97_0x2c7627(0x14f),'description':'Pre-fill\x20JS/CSS\x20URLs\x20to\x20update.\x20'+a97_0x2c7627(0x157)},{'name':'yes','type':a97_0x2c7627(0x11b),'description':a97_0x2c7627(0x151)},{'name':a97_0x2c7627(0x127),'type':a97_0x2c7627(0x14f),'description':'Resource\x20update\x20mode:\x20replace\x20rewrites\x20resources\x20from\x20supplied\x20URLs;\x20patch\x20replaces\x20only\x20supplied\x20resource\x20types','enum':[a97_0x2c7627(0x15e),a97_0x2c7627(0x128)],'default':'replace'},{'name':a97_0x2c7627(0x12a),'type':'boolean','description':a97_0x2c7627(0x13e)}],async 'dryRun'(_0x543bf0){const _0xbcdd7=a97_0x2c7627;ensureRunnableContext(_0x543bf0['rawFlags'],_0x543bf0[_0xbcdd7(0x148)]);const _0x4fea8f=await runMenuUpdateCore(_0x543bf0[_0xbcdd7(0x14d)],_0x543bf0['cookie'],_0x543bf0[_0xbcdd7(0x12c)]('params'),{'mode':parseMode(_0x543bf0['str'](_0xbcdd7(0x127))),'dryRun':!![],'force':_0x543bf0[_0xbcdd7(0x146)](_0xbcdd7(0x12a))});return{'method':'POST','url':_0xbcdd7(0x13c),'body':_0x4fea8f,'description':_0x4fea8f[_0xbcdd7(0x11d)]?_0xbcdd7(0x147):_0xbcdd7(0x122)+(_0x4fea8f[_0xbcdd7(0x119)]?.[_0xbcdd7(0x130)]??0x0)+_0xbcdd7(0x143)};},async 'execute'(_0x3c9627){const _0x4f3896=a97_0x2c7627;ensureRunnableContext(_0x3c9627[_0x4f3896(0x121)],_0x3c9627['selectedAppName']);const _0x15900d=_0x3c9627['flag'](_0x4f3896(0x140)),_0xaa4cd7=_0x3c9627[_0x4f3896(0x12c)](_0x4f3896(0x12b)),_0x232dd8=parseMode(_0x3c9627[_0x4f3896(0x12c)](_0x4f3896(0x127))),_0x6f4f76=_0x3c9627[_0x4f3896(0x146)](_0x4f3896(0x12a)),_0x57dd4c=parseParams(_0xaa4cd7),_0x217f48=!!(_0x57dd4c[_0x4f3896(0x138)]||_0x57dd4c[_0x4f3896(0x156)]);if(_0x15900d||_0x217f48&&!isInteractive()){const _0x3554f3=await runMenuUpdateCore(_0x3c9627[_0x4f3896(0x14d)],_0x3c9627[_0x4f3896(0x125)],_0xaa4cd7,{'mode':_0x232dd8,'force':_0x6f4f76});return _0x3554f3[_0x4f3896(0x11d)]?writeCliSideChannelLine(_0x4f3896(0x11c)):(writeCliSideChannelLine('✓\x20Menu\x20update\x20completed:\x20'+_0x3554f3[_0x4f3896(0x124)]+_0x4f3896(0x15a)),_0x3554f3[_0x4f3896(0x14c)]>0x0&&writeCliSideChannelLine('!\x20'+_0x3554f3[_0x4f3896(0x14c)]+_0x4f3896(0x135))),{'ok':_0x3554f3[_0x4f3896(0x14c)]===0x0,'data':_0x3554f3,'message':_0x3554f3[_0x4f3896(0x11d)]?_0x4f3896(0x137):_0x4f3896(0x14a)+_0x3554f3[_0x4f3896(0x124)]+_0x4f3896(0x12f)+_0x3554f3['failed']+_0x4f3896(0x129)};}requireInteractive();const _0x15b6e1=startSpinner('Fetching\x20online\x20menu\x20list...');let _0x2366a4;try{_0x2366a4=await fetchOnlineMenuList(_0x3c9627[_0x4f3896(0x14d)],_0x3c9627['cookie']),stopSpinner(_0x15b6e1,_0x4f3896(0x13d),!![]);}catch(_0x483364){stopSpinner(_0x15b6e1,_0x4f3896(0x12e),![]);throw CliErrors[_0x4f3896(0x149)](_0x483364 instanceof Error?_0x483364[_0x4f3896(0x15c)]:_0x4f3896(0x12e));}const _0x5a88a7=filterMenusWithResources(_0x2366a4);if(_0x5a88a7[_0x4f3896(0x130)]===0x0)return writeCliSideChannelLine(a97_0x46f746['yellow'](_0x4f3896(0x126))),{'ok':!![]};writeCliSideChannelLine(''),writeCliSideChannelLine(a97_0x46f746['cyan'](_0x4f3896(0x13f)+_0x5a88a7[_0x4f3896(0x130)]+'\x20menu(s)\x20with\x20existing\x20resources')),writeCliSideChannelLine(renderUpdateSummary(_0x5a88a7[_0x4f3896(0x134)](_0x163d1b=>_0x163d1b[_0x4f3896(0x15d)]),[_0x57dd4c['jsUrl'],_0x57dd4c[_0x4f3896(0x156)]])),writeCliSideChannelLine('');let _0x180587=_0x57dd4c['jsUrl'],_0x5b3f9f=_0x57dd4c[_0x4f3896(0x156)];!_0x180587&&(_0x180587=await askJsUrl());!_0x5b3f9f&&(_0x5b3f9f=await askCssUrl());const _0xfef118=await askConfirm(_0x4f3896(0x11a)+_0x5a88a7[_0x4f3896(0x130)]+_0x4f3896(0x136)+_0x180587+_0x4f3896(0x123)+_0x5b3f9f+'?');if(!_0xfef118)return writeCliSideChannelLine(a97_0x46f746['gray'](_0x4f3896(0x14b))),{'ok':!![]};const _0x3c573c=[_0x180587,_0x5b3f9f],_0x161bbd=startSpinner('Updating\x20'+_0x5a88a7['length']+_0x4f3896(0x139));try{const _0x116253=await doUpdateCdnUrls(_0x3c9627[_0x4f3896(0x14d)],_0x3c9627['cookie'],_0x5a88a7,_0x3c573c);return stopSpinner(_0x161bbd,'Updated\x20'+_0x116253[_0x4f3896(0x124)]+_0x4f3896(0x118),_0x116253['failed']===0x0),{'ok':_0x116253['failed']===0x0,'data':_0x116253,'message':_0x116253['failed']>0x0?'Menu\x20update\x20completed:\x20'+_0x116253[_0x4f3896(0x124)]+_0x4f3896(0x12f)+_0x116253[_0x4f3896(0x14c)]+_0x4f3896(0x129):_0x4f3896(0x14a)+_0x116253[_0x4f3896(0x124)]+_0x4f3896(0x142)};}catch(_0x8661a1){stopSpinner(_0x161bbd,_0x4f3896(0x133),![]);throw CliErrors[_0x4f3896(0x149)](_0x8661a1 instanceof Error?_0x8661a1[_0x4f3896(0x15c)]:_0x4f3896(0x133));}}};function ensureRunnableContext(_0x5bb20d,_0x22a516){const _0x8f7272=a97_0x2c7627,_0x2b38d6=_0x5bb20d[_0x8f7272(0x159)]?String(_0x5bb20d[_0x8f7272(0x159)])[_0x8f7272(0x153)]():'';if(!isInProject()&&!_0x22a516&&!_0x2b38d6)throw CliErrors[_0x8f7272(0x149)](_0x8f7272(0x155)+_0x8f7272(0x132));}function parseMode(_0x469908){const _0x46cb8f=a97_0x2c7627;if(!_0x469908)return _0x46cb8f(0x15e);if(_0x469908===_0x46cb8f(0x15e)||_0x469908===_0x46cb8f(0x128))return _0x469908;throw CliErrors[_0x46cb8f(0x149)](_0x46cb8f(0x117));}function parseParams(_0x555ebe){const _0x178674=a97_0x2c7627;if(!_0x555ebe)return{};try{const _0x397a6b=JSON[_0x178674(0x152)](_0x555ebe);if(typeof _0x397a6b!==_0x178674(0x141)||_0x397a6b===null||Array['isArray'](_0x397a6b))return{};return{'jsUrl':typeof _0x397a6b[_0x178674(0x138)]==='string'?_0x397a6b[_0x178674(0x138)][_0x178674(0x153)]():undefined,'cssUrl':typeof _0x397a6b[_0x178674(0x156)]==='string'?_0x397a6b[_0x178674(0x156)][_0x178674(0x153)]():undefined};}catch{return{};}}
1
+ const a97_0x9cdfb=a97_0x2b9c;(function(_0x5c93b6,_0x58402e){const _0x394979=a97_0x2b9c,_0x431b4f=_0x5c93b6();while(!![]){try{const _0x11308b=-parseInt(_0x394979(0x188))/0x1*(parseInt(_0x394979(0x17a))/0x2)+parseInt(_0x394979(0x17b))/0x3*(-parseInt(_0x394979(0x161))/0x4)+parseInt(_0x394979(0x167))/0x5+parseInt(_0x394979(0x184))/0x6*(parseInt(_0x394979(0x166))/0x7)+parseInt(_0x394979(0x16c))/0x8+parseInt(_0x394979(0x14a))/0x9+parseInt(_0x394979(0x176))/0xa*(-parseInt(_0x394979(0x157))/0xb);if(_0x11308b===_0x58402e)break;else _0x431b4f['push'](_0x431b4f['shift']());}catch(_0x3de729){_0x431b4f['push'](_0x431b4f['shift']());}}}(a97_0x31f2,0x5390a));import a97_0x44c738 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';function a97_0x2b9c(_0x41d81f,_0x58bb77){_0x41d81f=_0x41d81f-0x148;const _0x31f249=a97_0x31f2();let _0x2b9c98=_0x31f249[_0x41d81f];return _0x2b9c98;}import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{runMenuUpdateCore}from'../../commands/menu/shared/update-core.js';function a97_0x31f2(){const _0x5d5281=['383196LgvHOa','menu','\x20\x20Update\x20','isArray','19vMuJin','params','cookie','Fetching\x20online\x20menu\x20list...','cssUrl','!\x20No\x20menus\x20with\x20existing\x20resources\x20found','2583126wWYsMM','\x20\x20Found\x20','\x20updated,\x20','Pre-fill\x20JS/CSS\x20URLs\x20to\x20update.\x20','jsUrl','boolean','map','Menu\x20update\x20failed','appcode','yellow','trim','force','failed','4106542Nmuujf','menu\x20update\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','gray','Allow\x20replace\x20mode\x20to\x20remove\x20existing\x20JS\x20resources','cyan','diffs','Would\x20update\x20','object','\x20menu(s)\x20with\x20existing\x20resources','validation','636656fqjdld','appCode','patch','\x20failed.','parse','14YXNQSt','2988650uIZRrz','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','\x20updated.','string','mode','393864PbQgNS','Invalid\x20--mode.\x20Allowed\x20values:\x20replace,\x20patch','replace','selectedAppName','\x20\x20!\x20No\x20menus\x20with\x20existing\x20resources\x20found','Resource\x20update\x20mode:\x20replace\x20rewrites\x20resources\x20from\x20supplied\x20URLs;\x20patch\x20replaces\x20only\x20supplied\x20resource\x20types','Menu\x20update\x20completed:\x20','yes','message','\x20menu(s)\x20updated','10AQaLgR','✓\x20Menu\x20update\x20completed:\x20','Online\x20menu\x20list\x20fetched','Update\x20CDN\x20asset\x20URLs\x20for\x20all\x20online\x20menus\x20with\x20existing\x20resources','19678djnPaJ','3LidDxZ','label','str','length','updated','skipped','bool','Failed\x20to\x20fetch\x20online\x20menu\x20list','\x20\x20Cancelled.'];a97_0x31f2=function(){return _0x5d5281;};return a97_0x31f2();}import{isInProject}from'../../context.js';export const menuUpdate={'service':a97_0x9cdfb(0x185),'command':'update','description':a97_0x9cdfb(0x179),'risk':'high-risk-write','flags':[{'name':a97_0x9cdfb(0x189),'type':'string','description':a97_0x9cdfb(0x14d)+a97_0x9cdfb(0x168)},{'name':a97_0x9cdfb(0x173),'type':a97_0x9cdfb(0x14f),'description':'Non-interactive:\x20update\x20all\x20menus\x20without\x20confirmation;\x20requires\x20--params'},{'name':a97_0x9cdfb(0x16b),'type':a97_0x9cdfb(0x16a),'description':a97_0x9cdfb(0x171),'enum':[a97_0x9cdfb(0x16e),a97_0x9cdfb(0x163)],'default':'replace'},{'name':a97_0x9cdfb(0x155),'type':a97_0x9cdfb(0x14f),'description':a97_0x9cdfb(0x15a)}],async 'dryRun'(_0x3186ba){const _0x305804=a97_0x9cdfb;ensureRunnableContext(_0x3186ba['rawFlags'],_0x3186ba['selectedAppName']);const _0xe6c35=await runMenuUpdateCore(_0x3186ba[_0x305804(0x162)],_0x3186ba[_0x305804(0x18a)],_0x3186ba[_0x305804(0x17d)]('params'),{'mode':parseMode(_0x3186ba[_0x305804(0x17d)]('mode')),'dryRun':!![],'force':_0x3186ba['bool'](_0x305804(0x155))});return{'method':'POST','url':'/smartapi/menu/update','body':_0xe6c35,'description':_0xe6c35[_0x305804(0x180)]?'No\x20menus\x20with\x20existing\x20resources\x20would\x20be\x20updated.':_0x305804(0x15d)+(_0xe6c35[_0x305804(0x15c)]?.[_0x305804(0x17e)]??0x0)+'\x20menu\x20resource\x20set(s).'};},async 'execute'(_0x29fc5d){const _0x1e4444=a97_0x9cdfb;ensureRunnableContext(_0x29fc5d['rawFlags'],_0x29fc5d[_0x1e4444(0x16f)]);const _0x1b0b18=_0x29fc5d['flag'](_0x1e4444(0x173)),_0x2623dd=_0x29fc5d[_0x1e4444(0x17d)](_0x1e4444(0x189)),_0xe8ad4e=parseMode(_0x29fc5d[_0x1e4444(0x17d)](_0x1e4444(0x16b))),_0x1333c9=_0x29fc5d[_0x1e4444(0x181)](_0x1e4444(0x155)),_0x1e5489=parseParams(_0x2623dd),_0x51d3d5=!!(_0x1e5489[_0x1e4444(0x14e)]||_0x1e5489[_0x1e4444(0x148)]);if(_0x1b0b18||_0x51d3d5&&!isInteractive()){const _0x109dac=await runMenuUpdateCore(_0x29fc5d[_0x1e4444(0x162)],_0x29fc5d[_0x1e4444(0x18a)],_0x2623dd,{'mode':_0xe8ad4e,'force':_0x1333c9});return _0x109dac['skipped']?writeCliSideChannelLine(_0x1e4444(0x149)):(writeCliSideChannelLine(_0x1e4444(0x177)+_0x109dac[_0x1e4444(0x17f)]+_0x1e4444(0x175)),_0x109dac[_0x1e4444(0x156)]>0x0&&writeCliSideChannelLine('!\x20'+_0x109dac[_0x1e4444(0x156)]+'\x20menu(s)\x20failed')),{'ok':_0x109dac[_0x1e4444(0x156)]===0x0,'data':_0x109dac,'message':_0x109dac[_0x1e4444(0x180)]?'Menu\x20update\x20skipped':_0x1e4444(0x172)+_0x109dac[_0x1e4444(0x17f)]+_0x1e4444(0x14c)+_0x109dac[_0x1e4444(0x156)]+_0x1e4444(0x164)};}requireInteractive();const _0x2aa1e7=startSpinner(_0x1e4444(0x18b));let _0x320708;try{_0x320708=await fetchOnlineMenuList(_0x29fc5d['appCode'],_0x29fc5d[_0x1e4444(0x18a)]),stopSpinner(_0x2aa1e7,_0x1e4444(0x178),!![]);}catch(_0x1eb23a){stopSpinner(_0x2aa1e7,_0x1e4444(0x182),![]);throw CliErrors[_0x1e4444(0x160)](_0x1eb23a instanceof Error?_0x1eb23a['message']:'Failed\x20to\x20fetch\x20online\x20menu\x20list');}const _0x1afa60=filterMenusWithResources(_0x320708);if(_0x1afa60['length']===0x0)return writeCliSideChannelLine(a97_0x44c738[_0x1e4444(0x153)](_0x1e4444(0x170))),{'ok':!![]};writeCliSideChannelLine(''),writeCliSideChannelLine(a97_0x44c738[_0x1e4444(0x15b)](_0x1e4444(0x14b)+_0x1afa60[_0x1e4444(0x17e)]+_0x1e4444(0x15f))),writeCliSideChannelLine(renderUpdateSummary(_0x1afa60[_0x1e4444(0x150)](_0x10cb32=>_0x10cb32[_0x1e4444(0x17c)]),[_0x1e5489[_0x1e4444(0x14e)],_0x1e5489[_0x1e4444(0x148)]])),writeCliSideChannelLine('');let _0x2559f0=_0x1e5489[_0x1e4444(0x14e)],_0x528265=_0x1e5489[_0x1e4444(0x148)];!_0x2559f0&&(_0x2559f0=await askJsUrl());!_0x528265&&(_0x528265=await askCssUrl());const _0x302d1e=await askConfirm(_0x1e4444(0x186)+_0x1afa60['length']+'\x20menu(s)\x20with\x20JS:\x20'+_0x2559f0+'\x20and\x20CSS:\x20'+_0x528265+'?');if(!_0x302d1e)return writeCliSideChannelLine(a97_0x44c738[_0x1e4444(0x159)](_0x1e4444(0x183))),{'ok':!![]};const _0xfcc403=[_0x2559f0,_0x528265],_0x1158c1=startSpinner('Updating\x20'+_0x1afa60[_0x1e4444(0x17e)]+'\x20menu(s)...');try{const _0x42fceb=await doUpdateCdnUrls(_0x29fc5d['appCode'],_0x29fc5d[_0x1e4444(0x18a)],_0x1afa60,_0xfcc403);return stopSpinner(_0x1158c1,'Updated\x20'+_0x42fceb['updated']+'\x20menu(s)',_0x42fceb['failed']===0x0),{'ok':_0x42fceb[_0x1e4444(0x156)]===0x0,'data':_0x42fceb,'message':_0x42fceb['failed']>0x0?_0x1e4444(0x172)+_0x42fceb['updated']+'\x20updated,\x20'+_0x42fceb[_0x1e4444(0x156)]+_0x1e4444(0x164):_0x1e4444(0x172)+_0x42fceb[_0x1e4444(0x17f)]+_0x1e4444(0x169)};}catch(_0x9c8762){stopSpinner(_0x1158c1,_0x1e4444(0x151),![]);throw CliErrors[_0x1e4444(0x160)](_0x9c8762 instanceof Error?_0x9c8762[_0x1e4444(0x174)]:_0x1e4444(0x151));}}};function ensureRunnableContext(_0x926c03,_0x292762){const _0x20c77d=a97_0x9cdfb,_0x116444=_0x926c03[_0x20c77d(0x152)]?String(_0x926c03[_0x20c77d(0x152)])['trim']():'';if(!isInProject()&&!_0x292762&&!_0x116444)throw CliErrors[_0x20c77d(0x160)](_0x20c77d(0x158)+'Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.');}function parseMode(_0x32fa1e){const _0x158210=a97_0x9cdfb;if(!_0x32fa1e)return _0x158210(0x16e);if(_0x32fa1e===_0x158210(0x16e)||_0x32fa1e==='patch')return _0x32fa1e;throw CliErrors['validation'](_0x158210(0x16d));}function parseParams(_0x40a3cb){const _0x35401a=a97_0x9cdfb;if(!_0x40a3cb)return{};try{const _0x5b737f=JSON[_0x35401a(0x165)](_0x40a3cb);if(typeof _0x5b737f!==_0x35401a(0x15e)||_0x5b737f===null||Array[_0x35401a(0x187)](_0x5b737f))return{};return{'jsUrl':typeof _0x5b737f[_0x35401a(0x14e)]===_0x35401a(0x16a)?_0x5b737f['jsUrl'][_0x35401a(0x154)]():undefined,'cssUrl':typeof _0x5b737f[_0x35401a(0x148)]===_0x35401a(0x16a)?_0x5b737f[_0x35401a(0x148)][_0x35401a(0x154)]():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- function a98_0x40c3(){const _0x56aff5=['29456npTaBG','generate-start','fieldCount','已提交生成任务','reused','name','currentStep','write','status','allowGenerate','dataset','Dry-run\x20preview\x20(pass\x20--apply\x20to\x20execute\x20the\x20generation)','947830mupXQk','9LTcrxi','alias','apply','bool','appCode','/smartapi/lovrabet/dataset/','1632233WVLUVW','PARTIAL_SUCCESS','SUCCESS','standardPageStatus','nextAction','source','code','page','Actually\x20execute\x20the\x20generation.\x20Without\x20this\x20flag,\x20only\x20a\x20dry-run\x20preview\x20is\x20shown.','related-pages-fallback','/generate-standard-pages/start','clientOperationId','progressRate','5955666vmiqaE','3272395bsxgAP','number','2319YVSkFM','POST','message','precheck','2849056vOkaQu','operationId','4428yMRsGS','2360tOzruI','复用已有生成任务'];a98_0x40c3=function(){return _0x56aff5;};return a98_0x40c3();}const a98_0x5b8494=a98_0x4693;(function(_0x7d33b5,_0x2db28a){const _0x4f38ce=a98_0x4693,_0xe8bd55=_0x7d33b5();while(!![]){try{const _0x5573f7=parseInt(_0x4f38ce(0x1d1))/0x1+parseInt(_0x4f38ce(0x1b9))/0x2+parseInt(_0x4f38ce(0x1b5))/0x3*(parseInt(_0x4f38ce(0x1bb))/0x4)+-parseInt(_0x4f38ce(0x1b3))/0x5+-parseInt(_0x4f38ce(0x1b2))/0x6+-parseInt(_0x4f38ce(0x1be))/0x7*(parseInt(_0x4f38ce(0x1bc))/0x8)+-parseInt(_0x4f38ce(0x1cb))/0x9*(parseInt(_0x4f38ce(0x1ca))/0xa);if(_0x5573f7===_0x2db28a)break;else _0xe8bd55['push'](_0xe8bd55['shift']());}catch(_0x13e19f){_0xe8bd55['push'](_0xe8bd55['shift']());}}}(a98_0x40c3,0xe2dd7));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';export const pageGenerateStart={'service':a98_0x5b8494(0x1d8),'command':a98_0x5b8494(0x1bf),'description':'Start\x20async\x20Smart\x20List\x20Page\x20generation\x20from\x20a\x20dataset','risk':a98_0x5b8494(0x1c5),'defaultOutputFormat':'compress','flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a98_0x5b8494(0x1cc),'type':'string','description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'},{'name':a98_0x5b8494(0x1cd),'type':'boolean','description':a98_0x5b8494(0x1ad)}],async 'validate'(_0x3fe82c){validateDatasetSelector(_0x3fe82c);},async 'dryRun'(_0x54338c){const _0x3e9c49=a98_0x5b8494,_0x1ba0c2=await prepare(_0x54338c);return{'method':_0x3e9c49(0x1b6),'url':_0x3e9c49(0x1d0)+_0x1ba0c2['dataset'][_0x3e9c49(0x1d7)]+_0x3e9c49(0x1af),'body':{'appCode':_0x54338c[_0x3e9c49(0x1cf)],'clientOperationId':_0x1ba0c2[_0x3e9c49(0x1b0)]},'description':serializeDryRunDescription({'dataset':{'id':_0x1ba0c2[_0x3e9c49(0x1c8)]['id'],'code':_0x1ba0c2[_0x3e9c49(0x1c8)][_0x3e9c49(0x1d7)],'name':_0x1ba0c2[_0x3e9c49(0x1c8)][_0x3e9c49(0x1c3)],'fieldCount':_0x1ba0c2[_0x3e9c49(0x1c8)][_0x3e9c49(0x1c0)]},'precheckSource':_0x1ba0c2['standardPageStatus']?.[_0x3e9c49(0x1d6)]??_0x3e9c49(0x1ae),'action':_0x3e9c49(0x1bf),'clientOperationId':_0x1ba0c2[_0x3e9c49(0x1b0)],'plannedStatus':_0x1ba0c2['precheck'][_0x3e9c49(0x1c6)],'reason':_0x1ba0c2['precheck'][_0x3e9c49(0x1b7)]})};},async 'execute'(_0x5ca448){const _0x572d3f=a98_0x5b8494;if(!_0x5ca448[_0x572d3f(0x1ce)]('apply')){const _0x491995=await pageGenerateStart['dryRun'](_0x5ca448);return{'ok':!![],'message':_0x572d3f(0x1c9),'data':_0x491995};}const _0x5ee973=await prepare(_0x5ca448);if(!_0x5ee973[_0x572d3f(0x1b8)][_0x572d3f(0x1c7)])return{'ok':![],'message':_0x5ee973[_0x572d3f(0x1b8)][_0x572d3f(0x1b7)],'data':{'datasetCode':_0x5ee973['dataset'][_0x572d3f(0x1d7)],'clientOperationId':_0x5ee973[_0x572d3f(0x1b0)],'precheckSource':_0x5ee973[_0x572d3f(0x1d4)]?.[_0x572d3f(0x1d6)]??_0x572d3f(0x1ae),'status':_0x5ee973['precheck'][_0x572d3f(0x1c6)],'manualResolutionRequired':_0x5ee973[_0x572d3f(0x1b8)]['manualResolutionRequired'],'nextAction':_0x5ee973[_0x572d3f(0x1b8)]['nextAction'],'query':{'command':buildStandardPageStatusQueryCommand(_0x5ee973[_0x572d3f(0x1c8)][_0x572d3f(0x1d7)],_0x5ca448[_0x572d3f(0x1cf)])},'standardPageStatus':_0x5ee973[_0x572d3f(0x1d4)]}};const _0x4950cd=await startGenerateStandardPages(_0x5ca448[_0x572d3f(0x1cf)],_0x5ee973[_0x572d3f(0x1c8)][_0x572d3f(0x1d7)],{'clientOperationId':_0x5ee973['clientOperationId']}),_0x4e019f=_0x4950cd[_0x572d3f(0x1c6)]===_0x572d3f(0x1d3)||_0x4950cd['status']===_0x572d3f(0x1d2)?await loadStandardPageStatusForGenerate(_0x5ca448,_0x5ee973['dataset']['code']):null,_0x336a1d=assessGenerateOperationState(_0x5ee973[_0x572d3f(0x1c8)][_0x572d3f(0x1d7)],_0x4950cd['status'],_0x4e019f);return{'ok':!![],'message':_0x4950cd['reused']?_0x572d3f(0x1bd):_0x572d3f(0x1c1),'data':{'datasetCode':_0x5ee973[_0x572d3f(0x1c8)][_0x572d3f(0x1d7)],'appCode':_0x5ca448[_0x572d3f(0x1cf)],'operationId':_0x4950cd[_0x572d3f(0x1ba)]??null,'clientOperationId':_0x5ee973[_0x572d3f(0x1b0)],'jobStatus':_0x4950cd[_0x572d3f(0x1c6)]??null,'progressRate':typeof _0x4950cd[_0x572d3f(0x1b1)]===_0x572d3f(0x1b4)?_0x4950cd[_0x572d3f(0x1b1)]:null,'currentStep':_0x4950cd[_0x572d3f(0x1c4)]??null,'reused':_0x4950cd[_0x572d3f(0x1c2)]===!![],'status':_0x336a1d[_0x572d3f(0x1c6)],'manualResolutionRequired':_0x336a1d['manualResolutionRequired'],'nextAction':_0x336a1d[_0x572d3f(0x1d5)],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x5ee973[_0x572d3f(0x1c8)][_0x572d3f(0x1d7)],{'appCode':_0x5ca448[_0x572d3f(0x1cf)],'operationId':_0x4950cd['operationId'],'clientOperationId':_0x5ee973['clientOperationId']})},'standardPageStatus':_0x4e019f}};}};function a98_0x4693(_0x380df0,_0x2b3228){_0x380df0=_0x380df0-0x1ad;const _0x40c3cd=a98_0x40c3();let _0x469337=_0x40c3cd[_0x380df0];return _0x469337;}async function prepare(_0x132568){const _0x5c9123=a98_0x5b8494,_0x3a282c=await loadDatasetDetailForPage(_0x132568),_0x17e37a=await loadStandardPageStatusForGenerate(_0x132568,_0x3a282c[_0x5c9123(0x1d7)]),_0x1d1f04=getUndeletedRelatedPages(_0x3a282c);return{'dataset':_0x3a282c,'standardPageStatus':_0x17e37a,'clientOperationId':createPageGenerateClientOperationId(),'precheck':assessStandardPageState(_0x3a282c[_0x5c9123(0x1d7)],_0x17e37a,{'fallbackUndeletedPages':_0x1d1f04})};}
1
+ function a98_0x2921(){const _0x39b113=['Dry-run\x20preview\x20(pass\x20--apply\x20to\x20execute\x20the\x20generation)','message','6203048Dbzlty','SUCCESS','nextAction','167784ybImiU','boolean','1qvKfmU','precheck','compress','1640460yFgmpa','clientOperationId','/generate-standard-pages/start','operationId','apply','dataset','86782rKfuoG','appCode','3629892bdiRPG','alias','manualResolutionRequired','6ofdwUE','currentStep','standardPageStatus','复用已有生成任务','PARTIAL_SUCCESS','source','81ShldAp','7471513RyyDbV','dryRun','/smartapi/lovrabet/dataset/','progressRate','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','status','number','code','Actually\x20execute\x20the\x20generation.\x20Without\x20this\x20flag,\x20only\x20a\x20dry-run\x20preview\x20is\x20shown.','generate-start','reused','string','related-pages-fallback','8622540qXydcu','22VLARHb'];a98_0x2921=function(){return _0x39b113;};return a98_0x2921();}function a98_0x1e89(_0xc8b914,_0x4c63bf){_0xc8b914=_0xc8b914-0xaa;const _0x2921e0=a98_0x2921();let _0x1e89b3=_0x2921e0[_0xc8b914];return _0x1e89b3;}const a98_0x522ec1=a98_0x1e89;(function(_0x2db738,_0x374880){const _0x893fe=a98_0x1e89,_0x37c5d6=_0x2db738();while(!![]){try{const _0x21d234=parseInt(_0x893fe(0xcc))/0x1*(-parseInt(_0x893fe(0xaa))/0x2)+-parseInt(_0x893fe(0xac))/0x3+parseInt(_0x893fe(0xc7))/0x4+-parseInt(_0x893fe(0xcf))/0x5+-parseInt(_0x893fe(0xaf))/0x6*(parseInt(_0x893fe(0xb6))/0x7)+-parseInt(_0x893fe(0xca))/0x8*(-parseInt(_0x893fe(0xb5))/0x9)+-parseInt(_0x893fe(0xc3))/0xa*(-parseInt(_0x893fe(0xc4))/0xb);if(_0x21d234===_0x374880)break;else _0x37c5d6['push'](_0x37c5d6['shift']());}catch(_0x3196ed){_0x37c5d6['push'](_0x37c5d6['shift']());}}}(a98_0x2921,0xc7075));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';export const pageGenerateStart={'service':'page','command':a98_0x522ec1(0xbf),'description':'Start\x20async\x20Smart\x20List\x20Page\x20generation\x20from\x20a\x20dataset','risk':'write','defaultOutputFormat':a98_0x522ec1(0xce),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a98_0x522ec1(0xad),'type':a98_0x522ec1(0xc1),'description':a98_0x522ec1(0xba)},{'name':'apply','type':a98_0x522ec1(0xcb),'description':a98_0x522ec1(0xbe)}],async 'validate'(_0x4dbdfc){validateDatasetSelector(_0x4dbdfc);},async 'dryRun'(_0x5df88f){const _0x65f9e7=a98_0x522ec1,_0x5d4d13=await prepare(_0x5df88f);return{'method':'POST','url':_0x65f9e7(0xb8)+_0x5d4d13[_0x65f9e7(0xd4)]['code']+_0x65f9e7(0xd1),'body':{'appCode':_0x5df88f['appCode'],'clientOperationId':_0x5d4d13[_0x65f9e7(0xd0)]},'description':serializeDryRunDescription({'dataset':{'id':_0x5d4d13[_0x65f9e7(0xd4)]['id'],'code':_0x5d4d13[_0x65f9e7(0xd4)]['code'],'name':_0x5d4d13[_0x65f9e7(0xd4)]['name'],'fieldCount':_0x5d4d13[_0x65f9e7(0xd4)]['fieldCount']},'precheckSource':_0x5d4d13[_0x65f9e7(0xb1)]?.[_0x65f9e7(0xb4)]??_0x65f9e7(0xc2),'action':_0x65f9e7(0xbf),'clientOperationId':_0x5d4d13[_0x65f9e7(0xd0)],'plannedStatus':_0x5d4d13[_0x65f9e7(0xcd)][_0x65f9e7(0xbb)],'reason':_0x5d4d13[_0x65f9e7(0xcd)]['message']})};},async 'execute'(_0x489cd4){const _0x12f41a=a98_0x522ec1;if(!_0x489cd4['bool'](_0x12f41a(0xd3))){const _0x217c02=await pageGenerateStart[_0x12f41a(0xb7)](_0x489cd4);return{'ok':!![],'message':_0x12f41a(0xc5),'data':_0x217c02};}const _0x19dc2a=await prepare(_0x489cd4);if(!_0x19dc2a[_0x12f41a(0xcd)]['allowGenerate'])return{'ok':![],'message':_0x19dc2a[_0x12f41a(0xcd)][_0x12f41a(0xc6)],'data':{'datasetCode':_0x19dc2a[_0x12f41a(0xd4)]['code'],'clientOperationId':_0x19dc2a[_0x12f41a(0xd0)],'precheckSource':_0x19dc2a['standardPageStatus']?.[_0x12f41a(0xb4)]??_0x12f41a(0xc2),'status':_0x19dc2a['precheck'][_0x12f41a(0xbb)],'manualResolutionRequired':_0x19dc2a[_0x12f41a(0xcd)][_0x12f41a(0xae)],'nextAction':_0x19dc2a[_0x12f41a(0xcd)]['nextAction'],'query':{'command':buildStandardPageStatusQueryCommand(_0x19dc2a[_0x12f41a(0xd4)][_0x12f41a(0xbd)],_0x489cd4['appCode'])},'standardPageStatus':_0x19dc2a[_0x12f41a(0xb1)]}};const _0x1c6332=await startGenerateStandardPages(_0x489cd4[_0x12f41a(0xab)],_0x19dc2a[_0x12f41a(0xd4)][_0x12f41a(0xbd)],{'clientOperationId':_0x19dc2a['clientOperationId']}),_0x340a12=_0x1c6332[_0x12f41a(0xbb)]===_0x12f41a(0xc8)||_0x1c6332[_0x12f41a(0xbb)]===_0x12f41a(0xb3)?await loadStandardPageStatusForGenerate(_0x489cd4,_0x19dc2a[_0x12f41a(0xd4)][_0x12f41a(0xbd)]):null,_0x18aeec=assessGenerateOperationState(_0x19dc2a[_0x12f41a(0xd4)][_0x12f41a(0xbd)],_0x1c6332['status'],_0x340a12);return{'ok':!![],'message':_0x1c6332[_0x12f41a(0xc0)]?_0x12f41a(0xb2):'已提交生成任务','data':{'datasetCode':_0x19dc2a['dataset'][_0x12f41a(0xbd)],'appCode':_0x489cd4['appCode'],'operationId':_0x1c6332[_0x12f41a(0xd2)]??null,'clientOperationId':_0x19dc2a[_0x12f41a(0xd0)],'jobStatus':_0x1c6332['status']??null,'progressRate':typeof _0x1c6332['progressRate']===_0x12f41a(0xbc)?_0x1c6332[_0x12f41a(0xb9)]:null,'currentStep':_0x1c6332[_0x12f41a(0xb0)]??null,'reused':_0x1c6332['reused']===!![],'status':_0x18aeec[_0x12f41a(0xbb)],'manualResolutionRequired':_0x18aeec['manualResolutionRequired'],'nextAction':_0x18aeec[_0x12f41a(0xc9)],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x19dc2a[_0x12f41a(0xd4)][_0x12f41a(0xbd)],{'appCode':_0x489cd4['appCode'],'operationId':_0x1c6332[_0x12f41a(0xd2)],'clientOperationId':_0x19dc2a[_0x12f41a(0xd0)]})},'standardPageStatus':_0x340a12}};}};async function prepare(_0x2daa1e){const _0x24512a=a98_0x522ec1,_0x5293ca=await loadDatasetDetailForPage(_0x2daa1e),_0x2f00cd=await loadStandardPageStatusForGenerate(_0x2daa1e,_0x5293ca[_0x24512a(0xbd)]),_0x2b2479=getUndeletedRelatedPages(_0x5293ca);return{'dataset':_0x5293ca,'standardPageStatus':_0x2f00cd,'clientOperationId':createPageGenerateClientOperationId(),'precheck':assessStandardPageState(_0x5293ca[_0x24512a(0xbd)],_0x2f00cd,{'fallbackUndeletedPages':_0x2b2479})};}
@@ -1 +1 @@
1
- const a99_0x104642=a99_0x21dd;(function(_0x2bc5b2,_0x5356c2){const _0x3c972b=a99_0x21dd,_0x55d592=_0x2bc5b2();while(!![]){try{const _0xd12292=parseInt(_0x3c972b(0x1c1))/0x1*(-parseInt(_0x3c972b(0x1b2))/0x2)+-parseInt(_0x3c972b(0x1b1))/0x3+-parseInt(_0x3c972b(0x1a0))/0x4+-parseInt(_0x3c972b(0x19d))/0x5+-parseInt(_0x3c972b(0x1a3))/0x6+-parseInt(_0x3c972b(0x1b8))/0x7*(-parseInt(_0x3c972b(0x1a6))/0x8)+parseInt(_0x3c972b(0x1a5))/0x9;if(_0xd12292===_0x5356c2)break;else _0x55d592['push'](_0x55d592['shift']());}catch(_0x2fb3af){_0x55d592['push'](_0x55d592['shift']());}}}(a99_0x316e,0x8aa68));function a99_0x21dd(_0x239419,_0x4b7ac0){_0x239419=_0x239419-0x19d;const _0x316eba=a99_0x316e();let _0x21ddff=_0x316eba[_0x239419];return _0x21ddff;}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';export const pageGenerateStatus={'service':a99_0x104642(0x1b5),'command':a99_0x104642(0x1b9),'description':a99_0x104642(0x1ab),'risk':a99_0x104642(0x19f),'defaultOutputFormat':'compress','flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a99_0x104642(0x1b4),'type':a99_0x104642(0x1aa),'description':a99_0x104642(0x1a2)},{'name':'operation-id','type':a99_0x104642(0x1aa),'description':a99_0x104642(0x1a7)},{'name':a99_0x104642(0x1ad),'type':a99_0x104642(0x1aa),'description':'Client\x20recovery/idempotency\x20id\x20when\x20operationId\x20is\x20unavailable\x20or\x20lost'}],async 'validate'(_0x5afe06){validateDatasetSelector(_0x5afe06),validateGenerateOperationSelector(_0x5afe06);},async 'dryRun'(_0x582181){const _0x1a01f4=a99_0x104642,_0x190bc2=await loadDatasetDetailForPage(_0x582181),_0x4fa904=_0x582181['str']('operation-id'),_0x137890=_0x582181['str'](_0x1a01f4(0x1ad)),_0x49c0e0=new URLSearchParams({'appCode':_0x582181[_0x1a01f4(0x1ac)]});return _0x4fa904&&_0x49c0e0[_0x1a01f4(0x1bc)]('operationId',_0x4fa904),_0x137890&&_0x49c0e0[_0x1a01f4(0x1bc)](_0x1a01f4(0x1be),_0x137890),{'method':_0x1a01f4(0x1bd),'url':'/smartapi/lovrabet/dataset/'+_0x190bc2[_0x1a01f4(0x1b3)]+'/generate-standard-pages/status?'+_0x49c0e0[_0x1a01f4(0x1a9)](),'description':serializeDryRunDescription({'dataset':{'id':_0x190bc2['id'],'code':_0x190bc2[_0x1a01f4(0x1b3)],'name':_0x190bc2[_0x1a01f4(0x1b7)]},'action':_0x1a01f4(0x1b0),'operationId':_0x4fa904||undefined,'clientOperationId':_0x137890||undefined})};},async 'execute'(_0x4a3390){const _0x41b64f=a99_0x104642,_0x5a9045=await loadDatasetDetailForPage(_0x4a3390),_0x316ae3=_0x4a3390[_0x41b64f(0x1bf)](_0x41b64f(0x1af)),_0x326150=_0x4a3390['str']('client-operation-id'),_0x559eed=await getGenerateStandardPagesStatus(_0x4a3390[_0x41b64f(0x1ac)],_0x5a9045[_0x41b64f(0x1b3)],{'operationId':_0x316ae3||undefined,'clientOperationId':_0x326150||undefined}),_0x123e04=_0x559eed[_0x41b64f(0x1bb)]===_0x41b64f(0x1a8)||_0x559eed[_0x41b64f(0x1bb)]===_0x41b64f(0x1c3),_0x242a8=_0x123e04?await loadStandardPageStatusForGenerate(_0x4a3390,_0x5a9045[_0x41b64f(0x1b3)]):null,_0x38a46f=assessGenerateOperationState(_0x5a9045[_0x41b64f(0x1b3)],_0x559eed[_0x41b64f(0x1bb)],_0x242a8),_0x178470=_0x559eed['operationId']??_0x316ae3??undefined,_0x428e90=_0x559eed['clientOperationId']??_0x326150??undefined;return{'ok':!![],'message':_0x38a46f[_0x41b64f(0x1bb)]===_0x41b64f(0x1c2)?_0x559eed[_0x41b64f(0x1ba)]||_0x38a46f['message']:_0x38a46f[_0x41b64f(0x1c0)],'data':{'datasetCode':_0x5a9045[_0x41b64f(0x1b3)],'appCode':_0x4a3390[_0x41b64f(0x1ac)],'operationId':_0x178470,'clientOperationId':_0x428e90,'jobStatus':_0x559eed[_0x41b64f(0x1bb)]??null,'progressRate':typeof _0x559eed[_0x41b64f(0x1a4)]===_0x41b64f(0x1a1)?_0x559eed[_0x41b64f(0x1a4)]:null,'currentStep':_0x559eed['currentStep']??null,'errorMsg':_0x559eed[_0x41b64f(0x1ba)]??null,'status':_0x38a46f[_0x41b64f(0x1bb)],'manualResolutionRequired':_0x38a46f[_0x41b64f(0x19e)],'nextAction':_0x38a46f[_0x41b64f(0x1b6)],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x5a9045[_0x41b64f(0x1b3)],{'appCode':_0x4a3390[_0x41b64f(0x1ac)],'operationId':_0x178470,'clientOperationId':_0x428e90})},'standardPageStatus':_0x242a8,'result':_0x559eed[_0x41b64f(0x1ae)]??null}};}};function a99_0x316e(){const _0x1fd3a3=['PARTIAL_SUCCESS','1487590HyYwrH','manualResolutionRequired','read','4014424UulKil','number','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','2805156loPZWH','progressRate','27917424WeasWM','8GrXgaU','Async\x20operation\x20id\x20returned\x20by\x20page\x20generate-start','SUCCESS','toString','string','Query\x20Smart\x20List\x20Page\x20generate\x20operation\x20status','appCode','client-operation-id','result','operation-id','query-generate-operation-status','1199256EASDJD','1798886xMZhXj','code','alias','page','nextAction','name','3736747pWjWVc','generate-status','errorMsg','status','set','GET','clientOperationId','str','message','1hPPykH','operation_failed'];a99_0x316e=function(){return _0x1fd3a3;};return a99_0x316e();}
1
+ function a99_0x58ea(){const _0xb02863=['number','str','manualResolutionRequired','9644496acymKm','Query\x20Smart\x20List\x20Page\x20generate\x20operation\x20status','7IURxOg','currentStep','status','513154xjvyAH','3184260OHbGMn','clientOperationId','query-generate-operation-status','SUCCESS','operationId','nextAction','Client\x20recovery/idempotency\x20id\x20when\x20operationId\x20is\x20unavailable\x20or\x20lost','generate-status','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','read','errorMsg','620uqKXzf','17295BfWjaC','result','99sNysTz','progressRate','1662330QGIVAJ','8pehvmp','6256243sSoOAD','message','client-operation-id','1117719TrdPow','Async\x20operation\x20id\x20returned\x20by\x20page\x20generate-start','operation-id','/smartapi/lovrabet/dataset/','appCode','code','alias','operation_failed','set','PARTIAL_SUCCESS','string'];a99_0x58ea=function(){return _0xb02863;};return a99_0x58ea();}const a99_0x845af0=a99_0x5073;(function(_0x52677,_0x3b7dcd){const _0x22184a=a99_0x5073,_0x13110b=_0x52677();while(!![]){try{const _0x50843c=parseInt(_0x22184a(0x121))/0x1*(parseInt(_0x22184a(0x124))/0x2)+parseInt(_0x22184a(0x108))/0x3*(parseInt(_0x22184a(0x107))/0x4)+-parseInt(_0x22184a(0x125))/0x5+-parseInt(_0x22184a(0x11f))/0x6+-parseInt(_0x22184a(0x10e))/0x7*(parseInt(_0x22184a(0x10d))/0x8)+-parseInt(_0x22184a(0x111))/0x9+-parseInt(_0x22184a(0x10c))/0xa*(-parseInt(_0x22184a(0x10a))/0xb);if(_0x50843c===_0x3b7dcd)break;else _0x13110b['push'](_0x13110b['shift']());}catch(_0x5beaf9){_0x13110b['push'](_0x13110b['shift']());}}}(a99_0x58ea,0xe176f));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a99_0x5073(_0xd1399,_0x52255e){_0xd1399=_0xd1399-0x107;const _0x58eaad=a99_0x58ea();let _0x507355=_0x58eaad[_0xd1399];return _0x507355;}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':a99_0x845af0(0x12c),'description':a99_0x845af0(0x120),'risk':a99_0x845af0(0x12e),'defaultOutputFormat':'compress','flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a99_0x845af0(0x117),'type':'string','description':a99_0x845af0(0x12d)},{'name':a99_0x845af0(0x113),'type':a99_0x845af0(0x11b),'description':a99_0x845af0(0x112)},{'name':a99_0x845af0(0x110),'type':a99_0x845af0(0x11b),'description':a99_0x845af0(0x12b)}],async 'validate'(_0x3ac98b){validateDatasetSelector(_0x3ac98b),validateGenerateOperationSelector(_0x3ac98b);},async 'dryRun'(_0x42b7aa){const _0x22057f=a99_0x845af0,_0x2b4901=await loadDatasetDetailForPage(_0x42b7aa),_0x1e2dc1=_0x42b7aa[_0x22057f(0x11d)](_0x22057f(0x113)),_0x312221=_0x42b7aa[_0x22057f(0x11d)](_0x22057f(0x110)),_0x2cbe69=new URLSearchParams({'appCode':_0x42b7aa[_0x22057f(0x115)]});return _0x1e2dc1&&_0x2cbe69['set'](_0x22057f(0x129),_0x1e2dc1),_0x312221&&_0x2cbe69[_0x22057f(0x119)](_0x22057f(0x126),_0x312221),{'method':'GET','url':_0x22057f(0x114)+_0x2b4901[_0x22057f(0x116)]+'/generate-standard-pages/status?'+_0x2cbe69['toString'](),'description':serializeDryRunDescription({'dataset':{'id':_0x2b4901['id'],'code':_0x2b4901[_0x22057f(0x116)],'name':_0x2b4901['name']},'action':_0x22057f(0x127),'operationId':_0x1e2dc1||undefined,'clientOperationId':_0x312221||undefined})};},async 'execute'(_0x51a6b1){const _0x571d11=a99_0x845af0,_0xed63ef=await loadDatasetDetailForPage(_0x51a6b1),_0xb74747=_0x51a6b1[_0x571d11(0x11d)]('operation-id'),_0x186b5c=_0x51a6b1[_0x571d11(0x11d)]('client-operation-id'),_0x17329f=await getGenerateStandardPagesStatus(_0x51a6b1[_0x571d11(0x115)],_0xed63ef[_0x571d11(0x116)],{'operationId':_0xb74747||undefined,'clientOperationId':_0x186b5c||undefined}),_0xcd1136=_0x17329f[_0x571d11(0x123)]===_0x571d11(0x128)||_0x17329f['status']===_0x571d11(0x11a),_0x19a4ea=_0xcd1136?await loadStandardPageStatusForGenerate(_0x51a6b1,_0xed63ef[_0x571d11(0x116)]):null,_0xc21efd=assessGenerateOperationState(_0xed63ef['code'],_0x17329f['status'],_0x19a4ea),_0x1ec21f=_0x17329f['operationId']??_0xb74747??undefined,_0x237eeb=_0x17329f[_0x571d11(0x126)]??_0x186b5c??undefined;return{'ok':!![],'message':_0xc21efd[_0x571d11(0x123)]===_0x571d11(0x118)?_0x17329f['errorMsg']||_0xc21efd[_0x571d11(0x10f)]:_0xc21efd[_0x571d11(0x10f)],'data':{'datasetCode':_0xed63ef['code'],'appCode':_0x51a6b1['appCode'],'operationId':_0x1ec21f,'clientOperationId':_0x237eeb,'jobStatus':_0x17329f['status']??null,'progressRate':typeof _0x17329f[_0x571d11(0x10b)]===_0x571d11(0x11c)?_0x17329f[_0x571d11(0x10b)]:null,'currentStep':_0x17329f[_0x571d11(0x122)]??null,'errorMsg':_0x17329f[_0x571d11(0x12f)]??null,'status':_0xc21efd[_0x571d11(0x123)],'manualResolutionRequired':_0xc21efd[_0x571d11(0x11e)],'nextAction':_0xc21efd[_0x571d11(0x12a)],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0xed63ef['code'],{'appCode':_0x51a6b1[_0x571d11(0x115)],'operationId':_0x1ec21f,'clientOperationId':_0x237eeb})},'standardPageStatus':_0x19a4ea,'result':_0x17329f[_0x571d11(0x109)]??null}};}};
@@ -1 +1 @@
1
- (function(_0x754e46,_0x34d3cd){const _0x1d4c21=a100_0x2b30,_0x42cef6=_0x754e46();while(!![]){try{const _0x7d8871=-parseInt(_0x1d4c21(0x1c1))/0x1*(parseInt(_0x1d4c21(0x1c3))/0x2)+parseInt(_0x1d4c21(0x1bc))/0x3+-parseInt(_0x1d4c21(0x1bb))/0x4+parseInt(_0x1d4c21(0x1ba))/0x5*(-parseInt(_0x1d4c21(0x1c0))/0x6)+-parseInt(_0x1d4c21(0x1bf))/0x7*(-parseInt(_0x1d4c21(0x1c2))/0x8)+-parseInt(_0x1d4c21(0x1be))/0x9+parseInt(_0x1d4c21(0x1bd))/0xa;if(_0x7d8871===_0x34d3cd)break;else _0x42cef6['push'](_0x42cef6['shift']());}catch(_0x1ec3a0){_0x42cef6['push'](_0x42cef6['shift']());}}}(a100_0x27fa,0x850f8));import{pageGenerateStart}from'../../commands/page/generate-start.js';import{pageGenerateStatus}from'../../commands/page/generate-status.js';import{pageStandardPageStatus}from'../../commands/page/standard-page-status.js';function a100_0x2b30(_0x31eed3,_0x736b1d){_0x31eed3=_0x31eed3-0x1ba;const _0x27fa60=a100_0x27fa();let _0x2b30f9=_0x27fa60[_0x31eed3];return _0x2b30f9;}function a100_0x27fa(){const _0xa5a37=['89562JFMCbF','24ucpYym','20TPJtlV','5oczJcM','849280doiBjd','1986582MNKkbM','13243880TWzuoP','5560038wJbhMC','777938CGBqgH','295476oXwKRs'];a100_0x27fa=function(){return _0xa5a37;};return a100_0x27fa();}import{pageSync}from'../../commands/page/sync.js';import{pagePull}from'../../commands/page/pull.js';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(_0x521fed,_0x2f401f){const _0x3daf74=a100_0x4c7f,_0x51c8ac=_0x521fed();while(!![]){try{const _0xa5c4aa=parseInt(_0x3daf74(0x142))/0x1*(-parseInt(_0x3daf74(0x13a))/0x2)+-parseInt(_0x3daf74(0x13c))/0x3+-parseInt(_0x3daf74(0x13f))/0x4+-parseInt(_0x3daf74(0x13e))/0x5+-parseInt(_0x3daf74(0x13d))/0x6*(-parseInt(_0x3daf74(0x141))/0x7)+-parseInt(_0x3daf74(0x140))/0x8+-parseInt(_0x3daf74(0x13b))/0x9*(-parseInt(_0x3daf74(0x139))/0xa);if(_0xa5c4aa===_0x2f401f)break;else _0x51c8ac['push'](_0x51c8ac['shift']());}catch(_0x3f9607){_0x51c8ac['push'](_0x51c8ac['shift']());}}}(a100_0x4e09,0x505d5));import{pageGenerateStart}from'../../commands/page/generate-start.js';function a100_0x4c7f(_0x209b44,_0x553c0f){_0x209b44=_0x209b44-0x139;const _0x4e09b6=a100_0x4e09();let _0x4c7fc9=_0x4e09b6[_0x209b44];return _0x4c7fc9;}import{pageGenerateStatus}from'../../commands/page/generate-status.js';import{pageStandardPageStatus}from'../../commands/page/standard-page-status.js';import{pageSync}from'../../commands/page/sync.js';function a100_0x4e09(){const _0x111800=['76272CmMPvQ','27441QWcqTJ','594000scYyyX','32OxhRxd','306nkNmOF','1092645SLbRtR','222zHvPrL','2008970pVxkSC','1488524VwIuFL','4131064KzOxVn'];a100_0x4e09=function(){return _0x111800;};return a100_0x4e09();}import{pagePull}from'../../commands/page/pull.js';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 +1 @@
1
- function a101_0x2a44(){const _0x2ece5d=['384748wTHHIy','\x20pulled,\x20','203546OJkErD','boolean','reason','362344INcsYd','4qWriWP','conflict','push','pageVersion','lastSync','/smartapi/lovrabet/detail\x20(per\x20selected\x20page)','localPath','status','items','would_pull','deleted','Pull\x20page\x20schema\x20to\x20local\x20files','pull','versionTag','mode','alias','local\x20unsynced\x20changes','Use\x20--force\x20to\x20overwrite\x20local\x20changes.','map','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','force','\x22\x20has\x20no\x20undeleted\x20related\x20pages.','pageId','hash','/smartapi/lovrabet/detail?pageId=','utf8','length','type','1161713vhgoif','compress','code','read','string','all','filter','\x20skipped','Page\x20ID','number','Overwrite\x20local\x20files\x20even\x20when\x20unsynced\x20local\x20changes\x20exist','detail','batch','135wOpqZd','lockFilePath','bool','version-tag','3771111IOdiHh','single','Dataset\x20\x22','datasetCode','12yJxVZh','appCode','Page\x20group\x20version\x20tag\x20(batch\x20mode\x20only)','Local\x20page\x20file\x20has\x20unsynced\x20changes:\x20','name','1292280uersIm','4775JhRNtS','datasetIds','validation','GET','pages'];a101_0x2a44=function(){return _0x2ece5d;};return a101_0x2a44();}const a101_0x1da9b2=a101_0x340b;(function(_0x3c9bd6,_0xa9efc1){const _0x5ebda9=a101_0x340b,_0x2bc4c3=_0x3c9bd6();while(!![]){try{const _0x391bc2=parseInt(_0x5ebda9(0x1cc))/0x1+parseInt(_0x5ebda9(0x1ec))/0x2+-parseInt(_0x5ebda9(0x1dd))/0x3*(parseInt(_0x5ebda9(0x1b0))/0x4)+parseInt(_0x5ebda9(0x1e7))/0x5*(parseInt(_0x5ebda9(0x1e1))/0x6)+parseInt(_0x5ebda9(0x1ee))/0x7+-parseInt(_0x5ebda9(0x1af))/0x8*(-parseInt(_0x5ebda9(0x1d9))/0x9)+-parseInt(_0x5ebda9(0x1e6))/0xa;if(_0x391bc2===_0xa9efc1)break;else _0x2bc4c3['push'](_0x2bc4c3['shift']());}catch(_0x24130c){_0x2bc4c3['push'](_0x2bc4c3['shift']());}}}(a101_0x2a44,0xa593d));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 a101_0x340b(_0x48d870,_0xf50b69){_0x48d870=_0x48d870-0x1af;const _0x2a4477=a101_0x2a44();let _0x340b22=_0x2a4477[_0x48d870];return _0x340b22;}export const pagePull={'service':'page','command':a101_0x1da9b2(0x1bc),'description':a101_0x1da9b2(0x1bb),'risk':a101_0x1da9b2(0x1cf),'defaultOutputFormat':a101_0x1da9b2(0x1cd),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'id','type':a101_0x1da9b2(0x1d5),'description':a101_0x1da9b2(0x1d4)},DATASETCODE_FLAG_OPTIONAL,{'name':a101_0x1da9b2(0x1bf),'type':'string','description':a101_0x1da9b2(0x1c3)},{'name':'version-tag','type':a101_0x1da9b2(0x1d0),'description':a101_0x1da9b2(0x1e3)},{'name':a101_0x1da9b2(0x1c4),'type':a101_0x1da9b2(0x1ef),'description':a101_0x1da9b2(0x1d6)}],async 'validate'(_0x52e5e5){validatePageTargetSelector(_0x52e5e5);},async 'dryRun'(_0x4d8c93){const _0x53f65c=a101_0x1da9b2,_0x5e45b3=await buildPullPlan(_0x4d8c93);return{'method':_0x53f65c(0x1ea),'url':_0x5e45b3[_0x53f65c(0x1be)]===_0x53f65c(0x1de)?_0x53f65c(0x1c8)+(_0x5e45b3[_0x53f65c(0x1b8)][0x0]?.[_0x53f65c(0x1d7)][_0x53f65c(0x1c6)]??''):_0x53f65c(0x1b5),'body':{'appCode':_0x4d8c93[_0x53f65c(0x1e2)],'mode':_0x5e45b3[_0x53f65c(0x1be)],'targetDatasetCode':_0x5e45b3[_0x53f65c(0x1e0)]??null,'pages':_0x5e45b3[_0x53f65c(0x1b8)][_0x53f65c(0x1c2)](toPreviewItem)},'description':serializeDryRunDescription({'mode':_0x5e45b3[_0x53f65c(0x1be)],'datasetCode':_0x5e45b3[_0x53f65c(0x1e0)]??null,'totalCandidates':_0x5e45b3['items'][_0x53f65c(0x1ca)],'totalWouldPull':_0x5e45b3[_0x53f65c(0x1b8)][_0x53f65c(0x1d2)](_0x40e981=>_0x40e981[_0x53f65c(0x1b7)]===_0x53f65c(0x1b9))[_0x53f65c(0x1ca)],'totalConflicts':_0x5e45b3[_0x53f65c(0x1b8)][_0x53f65c(0x1d2)](_0x2ed8d6=>_0x2ed8d6[_0x53f65c(0x1b7)]===_0x53f65c(0x1b1))[_0x53f65c(0x1ca)]})};},async 'execute'(_0x178881){const _0x9996c9=a101_0x1da9b2,_0x4c9c57=loadPageProjectConfig(_0x178881[_0x9996c9(0x1e2)]),_0x2bac48=await readPageLockFile(_0x4c9c57[_0x9996c9(0x1da)]),{lockData:_0x5a08b8,appLock:_0xf6d218}=ensurePageLockScope(_0x2bac48??createEmptyPageLock(),_0x178881[_0x9996c9(0x1e2)]),_0x2ddf5d=await buildPullPlan(_0x178881),_0x12c6c5=_0x178881[_0x9996c9(0x1db)](_0x9996c9(0x1c4));if(_0x2ddf5d[_0x9996c9(0x1be)]==='single'&&_0x2ddf5d[_0x9996c9(0x1b8)][0x0]?.[_0x9996c9(0x1b7)]===_0x9996c9(0x1b1)&&!_0x12c6c5)throw CliErrors[_0x9996c9(0x1e9)](_0x9996c9(0x1e4)+_0x2ddf5d[_0x9996c9(0x1b8)][0x0][_0x9996c9(0x1b6)],_0x9996c9(0x1c1));const _0x1959d6=[],_0x4a318f=[];for(const _0x5d8772 of _0x2ddf5d[_0x9996c9(0x1b8)]){if(_0x5d8772['status']===_0x9996c9(0x1b1)&&!_0x12c6c5){_0x4a318f[_0x9996c9(0x1b2)]({'pageId':_0x5d8772[_0x9996c9(0x1d7)]['pageId'],'type':_0x5d8772[_0x9996c9(0x1d7)]['type'],'title':_0x5d8772[_0x9996c9(0x1d7)]['name'],'localPath':_0x5d8772[_0x9996c9(0x1b6)],'reason':_0x5d8772[_0x9996c9(0x1f0)]??_0x9996c9(0x1c0)});continue;}await ensureParentDirectory(_0x5d8772[_0x9996c9(0x1b6)]);const _0x46a479=serializePageSchemaForFile(_0x5d8772[_0x9996c9(0x1d7)][_0x9996c9(0x1ce)]);await writeFile(_0x5d8772['localPath'],_0x46a479,_0x9996c9(0x1c9)),_0xf6d218[_0x9996c9(0x1eb)][String(_0x5d8772[_0x9996c9(0x1d7)][_0x9996c9(0x1c6)])]=buildLockEntry(_0x5d8772['detail'],_0x46a479),_0x1959d6[_0x9996c9(0x1b2)]({'pageId':_0x5d8772[_0x9996c9(0x1d7)][_0x9996c9(0x1c6)],'type':_0x5d8772[_0x9996c9(0x1d7)][_0x9996c9(0x1cb)],'title':_0x5d8772[_0x9996c9(0x1d7)][_0x9996c9(0x1e5)],'localPath':_0x5d8772[_0x9996c9(0x1b6)]});}return _0xf6d218[_0x9996c9(0x1b4)]=new Date()['toISOString'](),await writePageLockFile(_0x4c9c57[_0x9996c9(0x1da)],_0x5a08b8),{'ok':!![],'message':'拉取完成:\x20'+_0x1959d6['length']+_0x9996c9(0x1ed)+_0x4a318f[_0x9996c9(0x1ca)]+_0x9996c9(0x1d3),'data':{'appCode':_0x178881[_0x9996c9(0x1e2)],'pulledPages':_0x1959d6,'skippedPages':_0x4a318f,'totalPulled':_0x1959d6[_0x9996c9(0x1ca)],'totalSkipped':_0x4a318f[_0x9996c9(0x1ca)]}};}};async function buildPullPlan(_0xf49b9d){const _0x1f7300=a101_0x1da9b2,_0x3815f8=loadPageProjectConfig(_0xf49b9d['appCode']),_0x76fff0=await readPageLockFile(_0x3815f8[_0x1f7300(0x1da)]),{appLock:_0x4834a8}=ensurePageLockScope(_0x76fff0??createEmptyPageLock(),_0xf49b9d[_0x1f7300(0x1e2)]),_0x5cab59=getPageIdFlag(_0xf49b9d);if(_0x5cab59!==undefined){const _0x1145ce=await loadPageDetailForPage(_0xf49b9d,_0x5cab59);return{'mode':_0x1f7300(0x1de),'items':[await inspectPullTarget(_0x3815f8,_0x4834a8[_0x1f7300(0x1eb)][String(_0x1145ce[_0x1f7300(0x1c6)])],_0x1145ce)]};}const _0x1b1186=await loadDatasetDetailForPage(_0xf49b9d),_0x14aea6=_0x1b1186['relatedPages'][_0x1f7300(0x1d2)](_0x39ff2e=>!_0x39ff2e[_0x1f7300(0x1ba)]);if(_0x14aea6[_0x1f7300(0x1ca)]===0x0)throw CliErrors[_0x1f7300(0x1e9)](_0x1f7300(0x1df)+_0x1b1186[_0x1f7300(0x1ce)]+_0x1f7300(0x1c5));const _0x263b39=await Promise['all'](_0x14aea6[_0x1f7300(0x1c2)](_0x35e5c1=>loadPageDetailForPage(_0xf49b9d,_0x35e5c1['id']))),_0x5b588f=selectVersionTagGroup(_0x263b39,_0x3176f0=>_0x3176f0[_0x1f7300(0x1bd)],_0xf49b9d['str'](_0x1f7300(0x1dc)));return{'mode':_0x1f7300(0x1d8),'datasetCode':_0x1b1186[_0x1f7300(0x1ce)],'items':await Promise[_0x1f7300(0x1d1)](_0x5b588f[_0x1f7300(0x1b8)][_0x1f7300(0x1c2)](_0x1baa29=>inspectPullTarget(_0x3815f8,_0x4834a8['pages'][String(_0x1baa29[_0x1f7300(0x1c6)])],_0x1baa29)))};}async function inspectPullTarget(_0x575c08,_0x16e7b8,_0x1dbd04){const _0x24e9fd=a101_0x1da9b2,_0x11a165=resolvePageFilePath(_0x575c08,_0x1dbd04[_0x24e9fd(0x1c6)],_0x1dbd04[_0x24e9fd(0x1cb)]),_0x3c2ed8=await fileExists(_0x11a165);if(!_0x3c2ed8){const _0x51cdef=serializePageSchemaForFile(_0x1dbd04[_0x24e9fd(0x1ce)]);return{'detail':_0x1dbd04,'localPath':_0x11a165,'localHash':computePageContentHash(_0x51cdef),'status':_0x24e9fd(0x1b9)};}const _0x109634=await computePageFileHash(_0x11a165);if(!_0x16e7b8||_0x109634!==_0x16e7b8[_0x24e9fd(0x1c7)])return{'detail':_0x1dbd04,'localPath':_0x11a165,'localHash':_0x109634,'status':_0x24e9fd(0x1b1),'reason':_0x24e9fd(0x1c0)};return{'detail':_0x1dbd04,'localPath':_0x11a165,'localHash':_0x109634,'status':_0x24e9fd(0x1b9)};}function buildLockEntry(_0x18fbeb,_0x1b383f){const _0xdc08e8=a101_0x1da9b2;return{'hash':computePageContentHash(_0x1b383f),'pageId':_0x18fbeb[_0xdc08e8(0x1c6)],'pageVersion':_0x18fbeb[_0xdc08e8(0x1b3)],'type':_0x18fbeb['type'],'title':_0x18fbeb[_0xdc08e8(0x1e5)],'datasetIds':_0x18fbeb[_0xdc08e8(0x1e8)],'versionTag':_0x18fbeb['versionTag']};}function toPreviewItem(_0x178e2f){const _0x586969=a101_0x1da9b2;return{'pageId':_0x178e2f[_0x586969(0x1d7)][_0x586969(0x1c6)],'type':_0x178e2f[_0x586969(0x1d7)]['type'],'title':_0x178e2f[_0x586969(0x1d7)]['name'],'localPath':_0x178e2f[_0x586969(0x1b6)],'status':_0x178e2f[_0x586969(0x1b7)],..._0x178e2f[_0x586969(0x1f0)]?{'reason':_0x178e2f['reason']}:{}};}
1
+ const a101_0x14c07a=a101_0x5a7e;(function(_0x42e90c,_0x297396){const _0x35374c=a101_0x5a7e,_0x762a61=_0x42e90c();while(!![]){try{const _0xd6af08=-parseInt(_0x35374c(0xc3))/0x1+-parseInt(_0x35374c(0xc8))/0x2*(-parseInt(_0x35374c(0x9a))/0x3)+parseInt(_0x35374c(0xa1))/0x4+-parseInt(_0x35374c(0xd1))/0x5*(parseInt(_0x35374c(0xcf))/0x6)+parseInt(_0x35374c(0xb2))/0x7+parseInt(_0x35374c(0xad))/0x8+-parseInt(_0x35374c(0xc1))/0x9;if(_0xd6af08===_0x297396)break;else _0x762a61['push'](_0x762a61['shift']());}catch(_0x94c57){_0x762a61['push'](_0x762a61['shift']());}}}(a101_0x16bc,0xbe4e7));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';export const pagePull={'service':'page','command':a101_0x14c07a(0xac),'description':'Pull\x20page\x20schema\x20to\x20local\x20files','risk':a101_0x14c07a(0xba),'defaultOutputFormat':a101_0x14c07a(0xcd),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'id','type':'number','description':a101_0x14c07a(0xca)},DATASETCODE_FLAG_OPTIONAL,{'name':a101_0x14c07a(0xb4),'type':a101_0x14c07a(0xc9),'description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'},{'name':a101_0x14c07a(0xa6),'type':a101_0x14c07a(0xc9),'description':a101_0x14c07a(0xd2)},{'name':a101_0x14c07a(0xa2),'type':'boolean','description':'Overwrite\x20local\x20files\x20even\x20when\x20unsynced\x20local\x20changes\x20exist'}],async 'validate'(_0x343d4c){validatePageTargetSelector(_0x343d4c);},async 'dryRun'(_0x5da929){const _0x1de7bf=a101_0x14c07a,_0x3ef214=await buildPullPlan(_0x5da929);return{'method':_0x1de7bf(0xb3),'url':_0x3ef214['mode']==='single'?_0x1de7bf(0xc5)+(_0x3ef214[_0x1de7bf(0xab)][0x0]?.[_0x1de7bf(0xb9)][_0x1de7bf(0xaa)]??''):_0x1de7bf(0xbf),'body':{'appCode':_0x5da929[_0x1de7bf(0xbe)],'mode':_0x3ef214[_0x1de7bf(0xce)],'targetDatasetCode':_0x3ef214[_0x1de7bf(0xa8)]??null,'pages':_0x3ef214[_0x1de7bf(0xab)][_0x1de7bf(0xb5)](toPreviewItem)},'description':serializeDryRunDescription({'mode':_0x3ef214[_0x1de7bf(0xce)],'datasetCode':_0x3ef214[_0x1de7bf(0xa8)]??null,'totalCandidates':_0x3ef214[_0x1de7bf(0xab)][_0x1de7bf(0xb6)],'totalWouldPull':_0x3ef214[_0x1de7bf(0xab)][_0x1de7bf(0xa7)](_0x1c258f=>_0x1c258f[_0x1de7bf(0x9f)]===_0x1de7bf(0xcb))[_0x1de7bf(0xb6)],'totalConflicts':_0x3ef214['items']['filter'](_0x244d2d=>_0x244d2d[_0x1de7bf(0x9f)]===_0x1de7bf(0xb8))[_0x1de7bf(0xb6)]})};},async 'execute'(_0x4df7e5){const _0x38a550=a101_0x14c07a,_0x3ee5e2=loadPageProjectConfig(_0x4df7e5[_0x38a550(0xbe)]),_0x5c1224=await readPageLockFile(_0x3ee5e2[_0x38a550(0xa0)]),{lockData:_0x49d56d,appLock:_0x305a46}=ensurePageLockScope(_0x5c1224??createEmptyPageLock(),_0x4df7e5[_0x38a550(0xbe)]),_0x1bac90=await buildPullPlan(_0x4df7e5),_0x139fb0=_0x4df7e5['bool'](_0x38a550(0xa2));if(_0x1bac90['mode']===_0x38a550(0xa9)&&_0x1bac90[_0x38a550(0xab)][0x0]?.['status']===_0x38a550(0xb8)&&!_0x139fb0)throw CliErrors[_0x38a550(0xaf)](_0x38a550(0x9d)+_0x1bac90[_0x38a550(0xab)][0x0][_0x38a550(0x9c)],_0x38a550(0xb0));const _0x356f65=[],_0x25637f=[];for(const _0x120cd1 of _0x1bac90[_0x38a550(0xab)]){if(_0x120cd1['status']===_0x38a550(0xb8)&&!_0x139fb0){_0x25637f[_0x38a550(0x9b)]({'pageId':_0x120cd1['detail'][_0x38a550(0xaa)],'type':_0x120cd1[_0x38a550(0xb9)][_0x38a550(0xb7)],'title':_0x120cd1[_0x38a550(0xb9)][_0x38a550(0xc0)],'localPath':_0x120cd1['localPath'],'reason':_0x120cd1[_0x38a550(0xc2)]??_0x38a550(0xbc)});continue;}await ensureParentDirectory(_0x120cd1[_0x38a550(0x9c)]);const _0x16bcf6=serializePageSchemaForFile(_0x120cd1['detail'][_0x38a550(0xbd)]);await writeFile(_0x120cd1[_0x38a550(0x9c)],_0x16bcf6,'utf8'),_0x305a46[_0x38a550(0xd0)][String(_0x120cd1[_0x38a550(0xb9)][_0x38a550(0xaa)])]=buildLockEntry(_0x120cd1[_0x38a550(0xb9)],_0x16bcf6),_0x356f65[_0x38a550(0x9b)]({'pageId':_0x120cd1[_0x38a550(0xb9)]['pageId'],'type':_0x120cd1['detail'][_0x38a550(0xb7)],'title':_0x120cd1['detail'][_0x38a550(0xc0)],'localPath':_0x120cd1[_0x38a550(0x9c)]});}return _0x305a46[_0x38a550(0xb1)]=new Date()[_0x38a550(0xa5)](),await writePageLockFile(_0x3ee5e2[_0x38a550(0xa0)],_0x49d56d),{'ok':!![],'message':'拉取完成:\x20'+_0x356f65[_0x38a550(0xb6)]+_0x38a550(0xcc)+_0x25637f[_0x38a550(0xb6)]+'\x20skipped','data':{'appCode':_0x4df7e5['appCode'],'pulledPages':_0x356f65,'skippedPages':_0x25637f,'totalPulled':_0x356f65[_0x38a550(0xb6)],'totalSkipped':_0x25637f[_0x38a550(0xb6)]}};}};function a101_0x16bc(){const _0x1bcb0d=['pull','5420720jTDtoO','Dataset\x20\x22','validation','Use\x20--force\x20to\x20overwrite\x20local\x20changes.','lastSync','4677386aSsecj','GET','alias','map','length','type','conflict','detail','read','all','local\x20unsynced\x20changes','code','appCode','/smartapi/lovrabet/detail\x20(per\x20selected\x20page)','name','3399714WpcYhS','reason','24671UDnUpj','relatedPages','/smartapi/lovrabet/detail?pageId=','str','\x22\x20has\x20no\x20undeleted\x20related\x20pages.','60386RAwLiu','string','Page\x20ID','would_pull','\x20pulled,\x20','compress','mode','5875614TbIbSj','pages','5kZOMED','Page\x20group\x20version\x20tag\x20(batch\x20mode\x20only)','9zYGjDL','push','localPath','Local\x20page\x20file\x20has\x20unsynced\x20changes:\x20','datasetIds','status','lockFilePath','2899256teBVed','force','pageVersion','deleted','toISOString','version-tag','filter','datasetCode','single','pageId','items'];a101_0x16bc=function(){return _0x1bcb0d;};return a101_0x16bc();}async function buildPullPlan(_0x5483a2){const _0x45aad0=a101_0x14c07a,_0x4fcc06=loadPageProjectConfig(_0x5483a2[_0x45aad0(0xbe)]),_0x1bd2aa=await readPageLockFile(_0x4fcc06[_0x45aad0(0xa0)]),{appLock:_0xa33689}=ensurePageLockScope(_0x1bd2aa??createEmptyPageLock(),_0x5483a2[_0x45aad0(0xbe)]),_0x3cfb02=getPageIdFlag(_0x5483a2);if(_0x3cfb02!==undefined){const _0x21c60f=await loadPageDetailForPage(_0x5483a2,_0x3cfb02);return{'mode':_0x45aad0(0xa9),'items':[await inspectPullTarget(_0x4fcc06,_0xa33689[_0x45aad0(0xd0)][String(_0x21c60f['pageId'])],_0x21c60f)]};}const _0x7ad5c3=await loadDatasetDetailForPage(_0x5483a2),_0x91bcd5=_0x7ad5c3[_0x45aad0(0xc4)][_0x45aad0(0xa7)](_0x20fdb6=>!_0x20fdb6[_0x45aad0(0xa4)]);if(_0x91bcd5['length']===0x0)throw CliErrors[_0x45aad0(0xaf)](_0x45aad0(0xae)+_0x7ad5c3[_0x45aad0(0xbd)]+_0x45aad0(0xc7));const _0x2a20dc=await Promise[_0x45aad0(0xbb)](_0x91bcd5[_0x45aad0(0xb5)](_0x4da75f=>loadPageDetailForPage(_0x5483a2,_0x4da75f['id']))),_0x540fcf=selectVersionTagGroup(_0x2a20dc,_0x3271f8=>_0x3271f8['versionTag'],_0x5483a2[_0x45aad0(0xc6)](_0x45aad0(0xa6)));return{'mode':'batch','datasetCode':_0x7ad5c3[_0x45aad0(0xbd)],'items':await Promise[_0x45aad0(0xbb)](_0x540fcf[_0x45aad0(0xab)][_0x45aad0(0xb5)](_0x3aa48f=>inspectPullTarget(_0x4fcc06,_0xa33689[_0x45aad0(0xd0)][String(_0x3aa48f[_0x45aad0(0xaa)])],_0x3aa48f)))};}async function inspectPullTarget(_0x586da0,_0x14fe43,_0x265485){const _0x2db57c=a101_0x14c07a,_0x5c6609=resolvePageFilePath(_0x586da0,_0x265485[_0x2db57c(0xaa)],_0x265485[_0x2db57c(0xb7)]),_0x4179d1=await fileExists(_0x5c6609);if(!_0x4179d1){const _0x1d9b86=serializePageSchemaForFile(_0x265485[_0x2db57c(0xbd)]);return{'detail':_0x265485,'localPath':_0x5c6609,'localHash':computePageContentHash(_0x1d9b86),'status':'would_pull'};}const _0xc090a5=await computePageFileHash(_0x5c6609);if(!_0x14fe43||_0xc090a5!==_0x14fe43['hash'])return{'detail':_0x265485,'localPath':_0x5c6609,'localHash':_0xc090a5,'status':_0x2db57c(0xb8),'reason':_0x2db57c(0xbc)};return{'detail':_0x265485,'localPath':_0x5c6609,'localHash':_0xc090a5,'status':'would_pull'};}function a101_0x5a7e(_0x288d31,_0x2fed18){_0x288d31=_0x288d31-0x9a;const _0x16bcf6=a101_0x16bc();let _0x5a7ede=_0x16bcf6[_0x288d31];return _0x5a7ede;}function buildLockEntry(_0x317282,_0xdf4969){const _0x33f5f0=a101_0x14c07a;return{'hash':computePageContentHash(_0xdf4969),'pageId':_0x317282[_0x33f5f0(0xaa)],'pageVersion':_0x317282[_0x33f5f0(0xa3)],'type':_0x317282['type'],'title':_0x317282[_0x33f5f0(0xc0)],'datasetIds':_0x317282[_0x33f5f0(0x9e)],'versionTag':_0x317282['versionTag']};}function toPreviewItem(_0x3cc4e8){const _0x19dd0c=a101_0x14c07a;return{'pageId':_0x3cc4e8[_0x19dd0c(0xb9)]['pageId'],'type':_0x3cc4e8[_0x19dd0c(0xb9)][_0x19dd0c(0xb7)],'title':_0x3cc4e8[_0x19dd0c(0xb9)][_0x19dd0c(0xc0)],'localPath':_0x3cc4e8[_0x19dd0c(0x9c)],'status':_0x3cc4e8[_0x19dd0c(0x9f)],..._0x3cc4e8[_0x19dd0c(0xc2)]?{'reason':_0x3cc4e8[_0x19dd0c(0xc2)]}:{}};}
@@ -1 +1 @@
1
- const a102_0x43e1bf=a102_0x526e;(function(_0x175b55,_0x2d5fe2){const _0x48f398=a102_0x526e,_0x171499=_0x175b55();while(!![]){try{const _0x49f9df=parseInt(_0x48f398(0x1c2))/0x1+parseInt(_0x48f398(0x1c9))/0x2+-parseInt(_0x48f398(0x1b5))/0x3*(parseInt(_0x48f398(0x1e5))/0x4)+-parseInt(_0x48f398(0x1a6))/0x5+parseInt(_0x48f398(0x1e1))/0x6+-parseInt(_0x48f398(0x1bf))/0x7*(-parseInt(_0x48f398(0x1b3))/0x8)+parseInt(_0x48f398(0x1e3))/0x9;if(_0x49f9df===_0x2d5fe2)break;else _0x171499['push'](_0x171499['shift']());}catch(_0x3e2979){_0x171499['push'](_0x171499['shift']());}}}(a102_0x58e8,0xd98f0));import{readFile,writeFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getPageIdFlag,loadDatasetDetailForPage,loadPageDetailForPage,selectVersionTagGroup,serializeDryRunDescription,validatePageTargetSelector}from'../../commands/page/shared.js';import{updatePage}from'../../core/api-client.js';import{computePageContentHash,computePageFileHash,computeSerializedSchemaHash,serializePageSchemaForFile}from'../../core/page/hash.js';import{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 pagePush={'service':a102_0x43e1bf(0x1bd),'command':a102_0x43e1bf(0x1d5),'description':a102_0x43e1bf(0x1ae),'risk':a102_0x43e1bf(0x1dc),'defaultOutputFormat':'compress','flags':[APPCODE_FLAG_OPTIONAL,{'name':'id','type':a102_0x43e1bf(0x1a9),'description':a102_0x43e1bf(0x1d0)},DATASETCODE_FLAG_OPTIONAL,{'name':a102_0x43e1bf(0x1da),'type':a102_0x43e1bf(0x1de),'description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'},{'name':a102_0x43e1bf(0x1a2),'type':a102_0x43e1bf(0x1de),'description':'Page\x20group\x20version\x20tag\x20(batch\x20mode\x20only)'}],async 'validate'(_0x5d7f75){validatePageTargetSelector(_0x5d7f75);},async 'dryRun'(_0x446c95){const _0x307833=a102_0x43e1bf,_0x3b9c92=await buildPushPreview(_0x446c95);return{'method':_0x307833(0x1dd),'url':_0x307833(0x1ca),'body':{'appCode':_0x446c95[_0x307833(0x1cc)],'mode':_0x3b9c92[_0x307833(0x1a0)],'datasetCode':_0x3b9c92[_0x307833(0x1d6)]??null,'pages':_0x3b9c92[_0x307833(0x1db)]},'description':serializeDryRunDescription({'mode':_0x3b9c92[_0x307833(0x1a0)],'datasetCode':_0x3b9c92[_0x307833(0x1d6)]??null,'totalWouldPush':_0x3b9c92[_0x307833(0x1db)][_0x307833(0x1e6)](_0x18fbed=>_0x18fbed['status']===_0x307833(0x1e8))[_0x307833(0x1ba)],'totalUnchanged':_0x3b9c92[_0x307833(0x1db)][_0x307833(0x1e6)](_0x491e21=>_0x491e21[_0x307833(0x1c8)]===_0x307833(0x1a8))[_0x307833(0x1ba)],'totalConflicts':_0x3b9c92[_0x307833(0x1db)][_0x307833(0x1e6)](_0x11728d=>_0x11728d[_0x307833(0x1c8)]===_0x307833(0x1c4)||_0x11728d['status']===_0x307833(0x1c0))['length']})};},async 'execute'(_0x36fc0a){const _0x564bc6=a102_0x43e1bf,_0x30f882=loadPageProjectConfig(_0x36fc0a[_0x564bc6(0x1cc)]),_0x7a99cb=await readPageLockFile(_0x30f882[_0x564bc6(0x19a)]),{lockData:_0x16065a,appLock:_0x276dbc}=ensurePageLockScope(_0x7a99cb??createEmptyPageLock(),_0x36fc0a['appCode']),_0x1ffd30=getPageIdFlag(_0x36fc0a);if(_0x1ffd30!==undefined){const _0x4c073e=await prepareSinglePush(_0x36fc0a,_0x30f882,_0x276dbc[_0x564bc6(0x199)][String(_0x1ffd30)],_0x1ffd30),_0x7fedb2=await pushPreparedPage(_0x36fc0a,_0x4c073e);return _0x276dbc['pages'][String(_0x7fedb2[_0x564bc6(0x19f)])]=_0x7fedb2['nextLockEntry'],_0x276dbc[_0x564bc6(0x1c5)]=new Date()[_0x564bc6(0x1c6)](),await writePageLockFile(_0x30f882['lockFilePath'],_0x16065a),{'ok':!![],'message':_0x7fedb2[_0x564bc6(0x19c)]?_0x564bc6(0x1b9):_0x564bc6(0x1b2),'data':{'appCode':_0x36fc0a[_0x564bc6(0x1cc)],'pushedPages':[{'pageId':_0x7fedb2[_0x564bc6(0x19f)],'type':_0x7fedb2[_0x564bc6(0x1b8)],'title':_0x7fedb2[_0x564bc6(0x1d1)],'normalized':_0x7fedb2[_0x564bc6(0x19c)]}],'skippedPages':[],'failedPages':[],'totalPushed':0x1,'totalSkipped':0x0,'totalFailed':0x0}};}const _0x3803bb=await buildBatchPushPlan(_0x36fc0a,_0x276dbc[_0x564bc6(0x199)]),_0x467141=[],_0xc25d1e=[],_0x1985ac=[];for(const _0x5a4769 of _0x3803bb[_0x564bc6(0x1a8)]){_0xc25d1e[_0x564bc6(0x1d5)](_0x5a4769);}for(const _0x49d238 of _0x3803bb[_0x564bc6(0x1cf)]){try{const _0x153a62=await prepareSinglePush(_0x36fc0a,_0x30f882,_0x276dbc['pages'][String(_0x49d238[_0x564bc6(0x19f)])],_0x49d238[_0x564bc6(0x19f)],_0x3803bb[_0x564bc6(0x1c3)]),_0x219b1d=await pushPreparedPage(_0x36fc0a,_0x153a62);_0x276dbc[_0x564bc6(0x199)][String(_0x219b1d['pageId'])]=_0x219b1d[_0x564bc6(0x1b7)],_0x467141['push']({'pageId':_0x219b1d[_0x564bc6(0x19f)],'type':_0x219b1d['type'],'title':_0x219b1d[_0x564bc6(0x1d1)],'normalized':_0x219b1d[_0x564bc6(0x19c)]});}catch(_0x17af99){_0x1985ac[_0x564bc6(0x1d5)]({'pageId':_0x49d238[_0x564bc6(0x19f)],'type':_0x49d238[_0x564bc6(0x1b8)],'title':_0x49d238['title'],'reason':_0x17af99 instanceof Error?_0x17af99[_0x564bc6(0x1be)]:String(_0x17af99)});}}return _0x276dbc[_0x564bc6(0x1c5)]=new Date()['toISOString'](),await writePageLockFile(_0x30f882['lockFilePath'],_0x16065a),{'ok':_0x1985ac['length']===0x0||_0x467141[_0x564bc6(0x1ba)]>0x0||_0xc25d1e[_0x564bc6(0x1ba)]>0x0,'message':_0x1985ac[_0x564bc6(0x1ba)]>0x0&&_0x467141[_0x564bc6(0x1ba)]>0x0?'部分页面推送失败':_0x467141[_0x564bc6(0x1ba)]>0x0?_0x564bc6(0x1b2):_0xc25d1e[_0x564bc6(0x1ba)]>0x0&&_0x1985ac['length']===0x0?_0x564bc6(0x1ce):_0x1985ac[0x0]?.[_0x564bc6(0x1df)]||'推送失败','data':{'appCode':_0x36fc0a[_0x564bc6(0x1cc)],'pushedPages':_0x467141,'skippedPages':_0xc25d1e,'failedPages':_0x1985ac,'totalPushed':_0x467141['length'],'totalSkipped':_0xc25d1e['length'],'totalFailed':_0x1985ac[_0x564bc6(0x1ba)]}};}};async function buildPushPreview(_0x1a2412){const _0x121c72=a102_0x43e1bf,_0x36b684=loadPageProjectConfig(_0x1a2412[_0x121c72(0x1cc)]),_0x48e1f9=await readPageLockFile(_0x36b684[_0x121c72(0x19a)]),{appLock:_0x46a897}=ensurePageLockScope(_0x48e1f9??createEmptyPageLock(),_0x1a2412[_0x121c72(0x1cc)]),_0x832537=getPageIdFlag(_0x1a2412);if(_0x832537!==undefined)return{'mode':_0x121c72(0x1a5),'items':[await inspectPushPage(_0x1a2412,_0x36b684,_0x46a897[_0x121c72(0x199)][String(_0x832537)],_0x832537)]};const _0x38352f=await buildBatchPushPlan(_0x1a2412,_0x46a897[_0x121c72(0x199)]);return{'mode':_0x121c72(0x1a7),'datasetCode':_0x38352f[_0x121c72(0x1d6)],'items':[..._0x38352f[_0x121c72(0x1a8)][_0x121c72(0x1b1)](_0x1374c1=>({'pageId':_0x1374c1[_0x121c72(0x19f)],'type':_0x1374c1['type'],'title':_0x1374c1[_0x121c72(0x1d1)],'localPath':_0x1374c1[_0x121c72(0x1bb)],'status':_0x121c72(0x1a8),'reason':_0x1374c1[_0x121c72(0x1df)]})),...await Promise['all'](_0x38352f['candidates'][_0x121c72(0x1b1)](_0x92a289=>inspectPushPage(_0x1a2412,_0x36b684,_0x46a897[_0x121c72(0x199)][String(_0x92a289[_0x121c72(0x19f)])],_0x92a289[_0x121c72(0x19f)],_0x38352f['datasetId'])))]};}function a102_0x58e8(){const _0xe714d0=['无变更需要推送','candidates','Page\x20ID','title','`\x20first.','page-','includes','push','datasetCode','Local\x20file\x20not\x20found:\x20','local\x20JSON\x20is\x20invalid','`\x20first','alias','items','write','POST','string','reason','localContent','2043960iOOumH','no\x20changes','8211078ENOJGQ','Page\x20update\x20failed:\x20','327412hZRgUo','filter','remoteDetail','would_push','validation','hash','pages','lockFilePath','values','normalized','Page\x20','relatedPages','pageId','mode','\x20has\x20changed\x20since\x20last\x20pull.','version-tag','has','pageVersion','single','2363625FLlebg','batch','unchanged','number','utf8','No\x20local\x20pages\x20found\x20for\x20dataset\x20\x22','parse','datasetIds','Push\x20local\x20page\x20schema\x20back\x20to\x20remote','\x20no\x20longer\x20belongs\x20to\x20the\x20selected\x20dataset.','str','map','推送成功','718168kgpyFy','code','27mzPDuX','versionTag','nextLockEntry','type','推送成功,服务端已规范化\x20schema','length','localPath','\x20page\x20pull\x20--id\x20','page','message','7nuFPGi','blocked','remote\x20pageVersion\x20changed','537914hqExZi','datasetId','conflict','lastSync','toISOString','No\x20lock\x20record\x20found\x20for\x20page\x20','status','439670GQqCSY','/smartapi/lovrabet/update-page','Run\x20`','appCode','Remote\x20page\x20'];a102_0x58e8=function(){return _0xe714d0;};return a102_0x58e8();}async function buildBatchPushPlan(_0x4849ab,_0x538bca){const _0x1b2353=a102_0x43e1bf,_0x7ea1a1=loadPageProjectConfig(_0x4849ab['appCode']),_0xdc237b=await loadDatasetDetailForPage(_0x4849ab),_0xcac0ea=_0xdc237b['id'],_0x2f54b0=new Set(_0xdc237b[_0x1b2353(0x19e)][_0x1b2353(0x1e6)](_0x5ca3e2=>!_0x5ca3e2['deleted'])[_0x1b2353(0x1b1)](_0x31e43f=>_0x31e43f['id'])),_0x24f04d=Object[_0x1b2353(0x19b)](_0x538bca)[_0x1b2353(0x1e6)](_0x39dfbb=>_0x39dfbb[_0x1b2353(0x1ad)][_0x1b2353(0x1d4)](_0xcac0ea)&&_0x2f54b0[_0x1b2353(0x1a3)](_0x39dfbb['pageId']));if(_0x24f04d[_0x1b2353(0x1ba)]===0x0)throw CliErrors['validation'](_0x1b2353(0x1ab)+_0xdc237b[_0x1b2353(0x1b4)]+'\x22.',_0x1b2353(0x1cb)+CLI_BIN_NAME+'\x20page\x20pull\x20--datasetcode\x20'+_0xdc237b[_0x1b2353(0x1b4)]+_0x1b2353(0x1d2));const _0x34a5c3=selectVersionTagGroup(_0x24f04d,_0x4730b6=>_0x4730b6[_0x1b2353(0x1b6)]??null,_0x4849ab[_0x1b2353(0x1b0)](_0x1b2353(0x1a2))),_0x265168=[],_0x5e176d=[];for(const _0x40b1e7 of _0x34a5c3[_0x1b2353(0x1db)]){const _0x375ff8=resolvePageFilePath(_0x7ea1a1,_0x40b1e7[_0x1b2353(0x19f)],_0x40b1e7[_0x1b2353(0x1b8)]);if(!await fileExists(_0x375ff8)){_0x265168['push']({'pageId':_0x40b1e7[_0x1b2353(0x19f)],'type':_0x40b1e7[_0x1b2353(0x1b8)],'title':_0x40b1e7[_0x1b2353(0x1d1)]});continue;}const _0x1716d2=await computePageFileHash(_0x375ff8);if(_0x1716d2===_0x40b1e7[_0x1b2353(0x198)]){_0x5e176d['push']({'pageId':_0x40b1e7['pageId'],'type':_0x40b1e7[_0x1b2353(0x1b8)],'title':_0x40b1e7[_0x1b2353(0x1d1)],'localPath':_0x375ff8,'reason':'no\x20changes'});continue;}_0x265168[_0x1b2353(0x1d5)]({'pageId':_0x40b1e7[_0x1b2353(0x19f)],'type':_0x40b1e7['type'],'title':_0x40b1e7[_0x1b2353(0x1d1)]});}return{'datasetCode':_0xdc237b[_0x1b2353(0x1b4)],'datasetId':_0xcac0ea,'candidates':_0x265168,'unchanged':_0x5e176d};}async function inspectPushPage(_0x45a7c3,_0x33bb67,_0x3ec400,_0x3ca504,_0x5e0c9b){const _0x452680=a102_0x43e1bf;if(!_0x3ec400)return{'pageId':_0x3ca504,'type':'UNKNOWN','title':_0x452680(0x1d3)+_0x3ca504,'localPath':resolvePageFilePath(_0x33bb67,_0x3ca504,'UNKNOWN'),'status':_0x452680(0x1c0),'reason':'Run\x20`'+CLI_BIN_NAME+_0x452680(0x1bc)+_0x3ca504+_0x452680(0x1d9)};const _0x473eeb=resolvePageFilePath(_0x33bb67,_0x3ca504,_0x3ec400[_0x452680(0x1b8)]);if(!await fileExists(_0x473eeb))return{'pageId':_0x3ca504,'type':_0x3ec400['type'],'title':_0x3ec400[_0x452680(0x1d1)],'localPath':_0x473eeb,'status':'blocked','reason':_0x452680(0x1d7)+_0x473eeb};const _0x21e2a3=await readFile(_0x473eeb,_0x452680(0x1aa));try{JSON[_0x452680(0x1ac)](_0x21e2a3);}catch{return{'pageId':_0x3ca504,'type':_0x3ec400[_0x452680(0x1b8)],'title':_0x3ec400[_0x452680(0x1d1)],'localPath':_0x473eeb,'status':'blocked','reason':_0x452680(0x1d8)};}const _0xb27442=computePageContentHash(_0x21e2a3);if(_0xb27442===_0x3ec400['hash'])return{'pageId':_0x3ca504,'type':_0x3ec400['type'],'title':_0x3ec400[_0x452680(0x1d1)],'localPath':_0x473eeb,'status':'unchanged','reason':_0x452680(0x1e2)};try{const _0x16f9b7=await loadPageDetailForPage(_0x45a7c3,_0x3ca504);if(_0x5e0c9b!=null&&!_0x16f9b7[_0x452680(0x1ad)][_0x452680(0x1d4)](_0x5e0c9b))return{'pageId':_0x3ca504,'type':_0x3ec400[_0x452680(0x1b8)],'title':_0x3ec400[_0x452680(0x1d1)],'localPath':_0x473eeb,'status':_0x452680(0x1c4),'reason':_0x452680(0x19d)+_0x3ca504+'\x20no\x20longer\x20belongs\x20to\x20the\x20target\x20dataset'};const _0x99eff3=_0x3ec400[_0x452680(0x1a4)]!=null&&_0x16f9b7[_0x452680(0x1a4)]!=null;if(_0x99eff3&&_0x3ec400[_0x452680(0x1a4)]!==_0x16f9b7[_0x452680(0x1a4)])return{'pageId':_0x3ca504,'type':_0x3ec400[_0x452680(0x1b8)],'title':_0x3ec400['title'],'localPath':_0x473eeb,'status':_0x452680(0x1c4),'reason':_0x452680(0x1c1)};if(!_0x99eff3&&computeSerializedSchemaHash(_0x16f9b7[_0x452680(0x1b4)])!==_0x3ec400[_0x452680(0x198)])return{'pageId':_0x3ca504,'type':_0x3ec400['type'],'title':_0x3ec400[_0x452680(0x1d1)],'localPath':_0x473eeb,'status':_0x452680(0x1c4),'reason':'remote\x20schema\x20changed'};}catch(_0x11b21c){return{'pageId':_0x3ca504,'type':_0x3ec400[_0x452680(0x1b8)],'title':_0x3ec400[_0x452680(0x1d1)],'localPath':_0x473eeb,'status':_0x452680(0x1c0),'reason':_0x11b21c instanceof Error?_0x11b21c[_0x452680(0x1be)]:String(_0x11b21c)};}return{'pageId':_0x3ca504,'type':_0x3ec400['type'],'title':_0x3ec400[_0x452680(0x1d1)],'localPath':_0x473eeb,'status':_0x452680(0x1e8)};}async function prepareSinglePush(_0x3b71b1,_0x45e621,_0x19627a,_0x46604f,_0x4da5b3){const _0x5c1d5f=a102_0x43e1bf;if(!_0x19627a)throw CliErrors[_0x5c1d5f(0x197)](_0x5c1d5f(0x1c7)+_0x46604f+'.','Run\x20`'+CLI_BIN_NAME+_0x5c1d5f(0x1bc)+_0x46604f+'`\x20first.');const _0x424a44=resolvePageFilePath(_0x45e621,_0x46604f,_0x19627a[_0x5c1d5f(0x1b8)]);if(!await fileExists(_0x424a44))throw CliErrors['validation'](_0x5c1d5f(0x1d7)+_0x424a44,_0x5c1d5f(0x1cb)+CLI_BIN_NAME+_0x5c1d5f(0x1bc)+_0x46604f+'`\x20first.');const _0x93ebf=await readFile(_0x424a44,_0x5c1d5f(0x1aa));try{JSON[_0x5c1d5f(0x1ac)](_0x93ebf);}catch{throw CliErrors[_0x5c1d5f(0x197)]('Invalid\x20JSON\x20in\x20local\x20page\x20file:\x20'+_0x424a44);}const _0x3bf43e=await loadPageDetailForPage(_0x3b71b1,_0x46604f);if(_0x4da5b3!=null&&!_0x3bf43e[_0x5c1d5f(0x1ad)][_0x5c1d5f(0x1d4)](_0x4da5b3))throw CliErrors['validation'](_0x5c1d5f(0x19d)+_0x46604f+_0x5c1d5f(0x1af));const _0x22f140=_0x19627a[_0x5c1d5f(0x1a4)]!=null&&_0x3bf43e[_0x5c1d5f(0x1a4)]!=null;if(_0x22f140){if(_0x19627a['pageVersion']!==_0x3bf43e[_0x5c1d5f(0x1a4)])throw CliErrors[_0x5c1d5f(0x197)](_0x5c1d5f(0x1cd)+_0x46604f+_0x5c1d5f(0x1a1),_0x5c1d5f(0x1cb)+CLI_BIN_NAME+'\x20page\x20pull\x20--id\x20'+_0x46604f+'`\x20first.');}else{const _0x449511=computeSerializedSchemaHash(_0x3bf43e[_0x5c1d5f(0x1b4)]);if(_0x449511!==_0x19627a['hash'])throw CliErrors[_0x5c1d5f(0x197)]('Remote\x20page\x20'+_0x46604f+_0x5c1d5f(0x1a1),'Run\x20`'+CLI_BIN_NAME+_0x5c1d5f(0x1bc)+_0x46604f+'`\x20first.');}return{'lockEntry':_0x19627a,'localPath':_0x424a44,'localContent':_0x93ebf,'localHash':computePageContentHash(_0x93ebf),'remoteDetail':_0x3bf43e};}function a102_0x526e(_0x7ee5fd,_0x3df0dd){_0x7ee5fd=_0x7ee5fd-0x197;const _0x58e86d=a102_0x58e8();let _0x526e16=_0x58e86d[_0x7ee5fd];return _0x526e16;}async function pushPreparedPage(_0x5d5599,_0xd79e35){const _0x158f5e=a102_0x43e1bf,_0x1384b3=await updatePage(_0x5d5599[_0x158f5e(0x1cc)],_0xd79e35['remoteDetail'][_0x158f5e(0x19f)],_0xd79e35['localContent'],_0xd79e35[_0x158f5e(0x1e7)][_0x158f5e(0x1ad)]);if(!_0x1384b3)throw CliErrors['apiError'](_0x158f5e(0x1e4)+_0xd79e35['remoteDetail']['pageId']);const _0x1dbdcb=await loadPageDetailForPage(_0x5d5599,_0xd79e35[_0x158f5e(0x1e7)][_0x158f5e(0x19f)]),_0x259920=serializePageSchemaForFile(_0x1dbdcb[_0x158f5e(0x1b4)]);return await writeFile(_0xd79e35[_0x158f5e(0x1bb)],_0x259920,_0x158f5e(0x1aa)),{'pageId':_0x1dbdcb[_0x158f5e(0x19f)],'type':_0x1dbdcb[_0x158f5e(0x1b8)],'title':_0x1dbdcb['name'],'normalized':_0x259920!==serializePageSchemaForFile(_0xd79e35[_0x158f5e(0x1e0)]),'nextLockEntry':{'hash':computePageContentHash(_0x259920),'pageId':_0x1dbdcb[_0x158f5e(0x19f)],'pageVersion':_0x1dbdcb[_0x158f5e(0x1a4)],'type':_0x1dbdcb[_0x158f5e(0x1b8)],'title':_0x1dbdcb['name'],'datasetIds':_0x1dbdcb[_0x158f5e(0x1ad)],'versionTag':_0x1dbdcb[_0x158f5e(0x1b6)]}};}
1
+ const a102_0x465d52=a102_0x2950;(function(_0x1e144f,_0xb7aeb1){const _0xd403d6=a102_0x2950,_0x4fc4d4=_0x1e144f();while(!![]){try{const _0x4bdbb8=-parseInt(_0xd403d6(0x1b7))/0x1+-parseInt(_0xd403d6(0x1b1))/0x2*(parseInt(_0xd403d6(0x177))/0x3)+-parseInt(_0xd403d6(0x179))/0x4+-parseInt(_0xd403d6(0x1a6))/0x5+parseInt(_0xd403d6(0x1ab))/0x6+parseInt(_0xd403d6(0x1a5))/0x7*(parseInt(_0xd403d6(0x185))/0x8)+parseInt(_0xd403d6(0x1b6))/0x9*(parseInt(_0xd403d6(0x18e))/0xa);if(_0x4bdbb8===_0xb7aeb1)break;else _0x4fc4d4['push'](_0x4fc4d4['shift']());}catch(_0x207e06){_0x4fc4d4['push'](_0x4fc4d4['shift']());}}}(a102_0x4c4f,0x6399b));import{readFile,writeFile}from'node:fs/promises';function a102_0x4c4f(){const _0x177530=['1219625NCYYzW','validation','Page\x20group\x20version\x20tag\x20(batch\x20mode\x20only)','No\x20local\x20pages\x20found\x20for\x20dataset\x20\x22','candidates','4524024gshoBx','lastSync','nextLockEntry','remote\x20pageVersion\x20changed','map','datasetCode','29358ZAIOMU','无变更需要推送','datasetIds','filter','length','9JZdWzx','749587HQqlzY','push','Remote\x20page\x20','versionTag','normalized','items','datasetId','blocked','single','utf8','Local\x20file\x20not\x20found:\x20','lockFilePath','/smartapi/lovrabet/update-page','localContent','Invalid\x20JSON\x20in\x20local\x20page\x20file:\x20','UNKNOWN','reason','\x20no\x20longer\x20belongs\x20to\x20the\x20target\x20dataset','mode','部分页面推送失败','\x20has\x20changed\x20since\x20last\x20pull.','version-tag','Page\x20','all','27QivcBx','local\x20JSON\x20is\x20invalid','2751856FdwGpF','batch','no\x20changes','pageId','pages','str','pageVersion','推送成功','推送成功,服务端已规范化\x20schema','message','conflict','page','16zEPNqf','relatedPages','unchanged','\x20page\x20pull\x20--id\x20','\x20page\x20pull\x20--datasetcode\x20','includes','values','status','localPath','6944440Gkiszw','POST','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','alias','parse','remoteDetail','Run\x20`','appCode','string','hash','remote\x20schema\x20changed','title','code','`\x20first.','type','has','Page\x20update\x20failed:\x20','Push\x20local\x20page\x20schema\x20back\x20to\x20remote','`\x20first','name','would_push','No\x20lock\x20record\x20found\x20for\x20page\x20','toISOString','2705857FrcRLe'];a102_0x4c4f=function(){return _0x177530;};return a102_0x4c4f();}function a102_0x2950(_0xc2ebaa,_0x4a9e63){_0xc2ebaa=_0xc2ebaa-0x161;const _0x4c4fc8=a102_0x4c4f();let _0x295015=_0x4c4fc8[_0xc2ebaa];return _0x295015;}import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getPageIdFlag,loadDatasetDetailForPage,loadPageDetailForPage,selectVersionTagGroup,serializeDryRunDescription,validatePageTargetSelector}from'../../commands/page/shared.js';import{updatePage}from'../../core/api-client.js';import{computePageContentHash,computePageFileHash,computeSerializedSchemaHash,serializePageSchemaForFile}from'../../core/page/hash.js';import{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 pagePush={'service':a102_0x465d52(0x184),'command':a102_0x465d52(0x1b8),'description':a102_0x465d52(0x19f),'risk':'write','defaultOutputFormat':'compress','flags':[APPCODE_FLAG_OPTIONAL,{'name':'id','type':'number','description':'Page\x20ID'},DATASETCODE_FLAG_OPTIONAL,{'name':a102_0x465d52(0x191),'type':a102_0x465d52(0x196),'description':a102_0x465d52(0x190)},{'name':'version-tag','type':a102_0x465d52(0x196),'description':a102_0x465d52(0x1a8)}],async 'validate'(_0x5239e1){validatePageTargetSelector(_0x5239e1);},async 'dryRun'(_0xaca3e1){const _0x30a6a7=a102_0x465d52,_0x47d5b8=await buildPushPreview(_0xaca3e1);return{'method':_0x30a6a7(0x18f),'url':_0x30a6a7(0x16b),'body':{'appCode':_0xaca3e1[_0x30a6a7(0x195)],'mode':_0x47d5b8[_0x30a6a7(0x171)],'datasetCode':_0x47d5b8[_0x30a6a7(0x1b0)]??null,'pages':_0x47d5b8[_0x30a6a7(0x164)]},'description':serializeDryRunDescription({'mode':_0x47d5b8[_0x30a6a7(0x171)],'datasetCode':_0x47d5b8[_0x30a6a7(0x1b0)]??null,'totalWouldPush':_0x47d5b8[_0x30a6a7(0x164)]['filter'](_0x47f0e5=>_0x47f0e5[_0x30a6a7(0x18c)]===_0x30a6a7(0x1a2))['length'],'totalUnchanged':_0x47d5b8[_0x30a6a7(0x164)][_0x30a6a7(0x1b4)](_0x64ce6c=>_0x64ce6c[_0x30a6a7(0x18c)]===_0x30a6a7(0x187))[_0x30a6a7(0x1b5)],'totalConflicts':_0x47d5b8[_0x30a6a7(0x164)][_0x30a6a7(0x1b4)](_0xbce518=>_0xbce518['status']===_0x30a6a7(0x183)||_0xbce518[_0x30a6a7(0x18c)]===_0x30a6a7(0x166))[_0x30a6a7(0x1b5)]})};},async 'execute'(_0x5e1814){const _0x5301f9=a102_0x465d52,_0x1eec51=loadPageProjectConfig(_0x5e1814[_0x5301f9(0x195)]),_0x20a156=await readPageLockFile(_0x1eec51[_0x5301f9(0x16a)]),{lockData:_0xbf0f82,appLock:_0x24464a}=ensurePageLockScope(_0x20a156??createEmptyPageLock(),_0x5e1814[_0x5301f9(0x195)]),_0x5b41dd=getPageIdFlag(_0x5e1814);if(_0x5b41dd!==undefined){const _0xd2f6af=await prepareSinglePush(_0x5e1814,_0x1eec51,_0x24464a[_0x5301f9(0x17d)][String(_0x5b41dd)],_0x5b41dd),_0x1c9369=await pushPreparedPage(_0x5e1814,_0xd2f6af);return _0x24464a[_0x5301f9(0x17d)][String(_0x1c9369[_0x5301f9(0x17c)])]=_0x1c9369[_0x5301f9(0x1ad)],_0x24464a['lastSync']=new Date()[_0x5301f9(0x1a4)](),await writePageLockFile(_0x1eec51['lockFilePath'],_0xbf0f82),{'ok':!![],'message':_0x1c9369[_0x5301f9(0x163)]?_0x5301f9(0x181):_0x5301f9(0x180),'data':{'appCode':_0x5e1814['appCode'],'pushedPages':[{'pageId':_0x1c9369[_0x5301f9(0x17c)],'type':_0x1c9369[_0x5301f9(0x19c)],'title':_0x1c9369[_0x5301f9(0x199)],'normalized':_0x1c9369['normalized']}],'skippedPages':[],'failedPages':[],'totalPushed':0x1,'totalSkipped':0x0,'totalFailed':0x0}};}const _0x19d6c4=await buildBatchPushPlan(_0x5e1814,_0x24464a[_0x5301f9(0x17d)]),_0xd66660=[],_0x2192a6=[],_0x2974c7=[];for(const _0xe28d3a of _0x19d6c4[_0x5301f9(0x187)]){_0x2192a6['push'](_0xe28d3a);}for(const _0x52f4a of _0x19d6c4[_0x5301f9(0x1aa)]){try{const _0x1d5de8=await prepareSinglePush(_0x5e1814,_0x1eec51,_0x24464a[_0x5301f9(0x17d)][String(_0x52f4a[_0x5301f9(0x17c)])],_0x52f4a[_0x5301f9(0x17c)],_0x19d6c4[_0x5301f9(0x165)]),_0x25e15e=await pushPreparedPage(_0x5e1814,_0x1d5de8);_0x24464a[_0x5301f9(0x17d)][String(_0x25e15e['pageId'])]=_0x25e15e['nextLockEntry'],_0xd66660[_0x5301f9(0x1b8)]({'pageId':_0x25e15e['pageId'],'type':_0x25e15e[_0x5301f9(0x19c)],'title':_0x25e15e[_0x5301f9(0x199)],'normalized':_0x25e15e[_0x5301f9(0x163)]});}catch(_0x19a282){_0x2974c7[_0x5301f9(0x1b8)]({'pageId':_0x52f4a[_0x5301f9(0x17c)],'type':_0x52f4a[_0x5301f9(0x19c)],'title':_0x52f4a[_0x5301f9(0x199)],'reason':_0x19a282 instanceof Error?_0x19a282[_0x5301f9(0x182)]:String(_0x19a282)});}}return _0x24464a[_0x5301f9(0x1ac)]=new Date()[_0x5301f9(0x1a4)](),await writePageLockFile(_0x1eec51[_0x5301f9(0x16a)],_0xbf0f82),{'ok':_0x2974c7[_0x5301f9(0x1b5)]===0x0||_0xd66660[_0x5301f9(0x1b5)]>0x0||_0x2192a6[_0x5301f9(0x1b5)]>0x0,'message':_0x2974c7[_0x5301f9(0x1b5)]>0x0&&_0xd66660[_0x5301f9(0x1b5)]>0x0?_0x5301f9(0x172):_0xd66660['length']>0x0?'推送成功':_0x2192a6[_0x5301f9(0x1b5)]>0x0&&_0x2974c7[_0x5301f9(0x1b5)]===0x0?_0x5301f9(0x1b2):_0x2974c7[0x0]?.[_0x5301f9(0x16f)]||'推送失败','data':{'appCode':_0x5e1814[_0x5301f9(0x195)],'pushedPages':_0xd66660,'skippedPages':_0x2192a6,'failedPages':_0x2974c7,'totalPushed':_0xd66660['length'],'totalSkipped':_0x2192a6[_0x5301f9(0x1b5)],'totalFailed':_0x2974c7[_0x5301f9(0x1b5)]}};}};async function buildPushPreview(_0x389647){const _0xf01c30=a102_0x465d52,_0x206783=loadPageProjectConfig(_0x389647[_0xf01c30(0x195)]),_0x4c9844=await readPageLockFile(_0x206783['lockFilePath']),{appLock:_0x5b3d6c}=ensurePageLockScope(_0x4c9844??createEmptyPageLock(),_0x389647['appCode']),_0xcbabcc=getPageIdFlag(_0x389647);if(_0xcbabcc!==undefined)return{'mode':_0xf01c30(0x167),'items':[await inspectPushPage(_0x389647,_0x206783,_0x5b3d6c[_0xf01c30(0x17d)][String(_0xcbabcc)],_0xcbabcc)]};const _0x21fc2c=await buildBatchPushPlan(_0x389647,_0x5b3d6c[_0xf01c30(0x17d)]);return{'mode':_0xf01c30(0x17a),'datasetCode':_0x21fc2c[_0xf01c30(0x1b0)],'items':[..._0x21fc2c[_0xf01c30(0x187)][_0xf01c30(0x1af)](_0x1e820c=>({'pageId':_0x1e820c[_0xf01c30(0x17c)],'type':_0x1e820c['type'],'title':_0x1e820c[_0xf01c30(0x199)],'localPath':_0x1e820c[_0xf01c30(0x18d)],'status':'unchanged','reason':_0x1e820c['reason']})),...await Promise[_0xf01c30(0x176)](_0x21fc2c[_0xf01c30(0x1aa)]['map'](_0x3b20c8=>inspectPushPage(_0x389647,_0x206783,_0x5b3d6c['pages'][String(_0x3b20c8[_0xf01c30(0x17c)])],_0x3b20c8[_0xf01c30(0x17c)],_0x21fc2c[_0xf01c30(0x165)])))]};}async function buildBatchPushPlan(_0x1b1d44,_0x45abf7){const _0x1371a3=a102_0x465d52,_0xf0fd6a=loadPageProjectConfig(_0x1b1d44[_0x1371a3(0x195)]),_0x56b293=await loadDatasetDetailForPage(_0x1b1d44),_0x4d2aa6=_0x56b293['id'],_0x150c6a=new Set(_0x56b293[_0x1371a3(0x186)][_0x1371a3(0x1b4)](_0x56ea97=>!_0x56ea97['deleted'])[_0x1371a3(0x1af)](_0x372600=>_0x372600['id'])),_0x4ace68=Object[_0x1371a3(0x18b)](_0x45abf7)[_0x1371a3(0x1b4)](_0x59390b=>_0x59390b[_0x1371a3(0x1b3)]['includes'](_0x4d2aa6)&&_0x150c6a[_0x1371a3(0x19d)](_0x59390b[_0x1371a3(0x17c)]));if(_0x4ace68[_0x1371a3(0x1b5)]===0x0)throw CliErrors[_0x1371a3(0x1a7)](_0x1371a3(0x1a9)+_0x56b293[_0x1371a3(0x19a)]+'\x22.',_0x1371a3(0x194)+CLI_BIN_NAME+_0x1371a3(0x189)+_0x56b293['code']+_0x1371a3(0x19b));const _0x1d660b=selectVersionTagGroup(_0x4ace68,_0x40457f=>_0x40457f['versionTag']??null,_0x1b1d44[_0x1371a3(0x17e)](_0x1371a3(0x174))),_0x13a9ed=[],_0x357360=[];for(const _0x369443 of _0x1d660b[_0x1371a3(0x164)]){const _0x230771=resolvePageFilePath(_0xf0fd6a,_0x369443[_0x1371a3(0x17c)],_0x369443[_0x1371a3(0x19c)]);if(!await fileExists(_0x230771)){_0x13a9ed[_0x1371a3(0x1b8)]({'pageId':_0x369443[_0x1371a3(0x17c)],'type':_0x369443['type'],'title':_0x369443[_0x1371a3(0x199)]});continue;}const _0x9fbb39=await computePageFileHash(_0x230771);if(_0x9fbb39===_0x369443['hash']){_0x357360[_0x1371a3(0x1b8)]({'pageId':_0x369443['pageId'],'type':_0x369443[_0x1371a3(0x19c)],'title':_0x369443[_0x1371a3(0x199)],'localPath':_0x230771,'reason':_0x1371a3(0x17b)});continue;}_0x13a9ed[_0x1371a3(0x1b8)]({'pageId':_0x369443[_0x1371a3(0x17c)],'type':_0x369443[_0x1371a3(0x19c)],'title':_0x369443[_0x1371a3(0x199)]});}return{'datasetCode':_0x56b293[_0x1371a3(0x19a)],'datasetId':_0x4d2aa6,'candidates':_0x13a9ed,'unchanged':_0x357360};}async function inspectPushPage(_0x4ee119,_0x4fc670,_0x33e0b0,_0x202959,_0xb37fdb){const _0x1bc813=a102_0x465d52;if(!_0x33e0b0)return{'pageId':_0x202959,'type':'UNKNOWN','title':'page-'+_0x202959,'localPath':resolvePageFilePath(_0x4fc670,_0x202959,_0x1bc813(0x16e)),'status':_0x1bc813(0x166),'reason':_0x1bc813(0x194)+CLI_BIN_NAME+_0x1bc813(0x188)+_0x202959+_0x1bc813(0x1a0)};const _0x5a9204=resolvePageFilePath(_0x4fc670,_0x202959,_0x33e0b0[_0x1bc813(0x19c)]);if(!await fileExists(_0x5a9204))return{'pageId':_0x202959,'type':_0x33e0b0[_0x1bc813(0x19c)],'title':_0x33e0b0['title'],'localPath':_0x5a9204,'status':_0x1bc813(0x166),'reason':_0x1bc813(0x169)+_0x5a9204};const _0x2c6be6=await readFile(_0x5a9204,_0x1bc813(0x168));try{JSON[_0x1bc813(0x192)](_0x2c6be6);}catch{return{'pageId':_0x202959,'type':_0x33e0b0[_0x1bc813(0x19c)],'title':_0x33e0b0[_0x1bc813(0x199)],'localPath':_0x5a9204,'status':_0x1bc813(0x166),'reason':_0x1bc813(0x178)};}const _0x3eb952=computePageContentHash(_0x2c6be6);if(_0x3eb952===_0x33e0b0[_0x1bc813(0x197)])return{'pageId':_0x202959,'type':_0x33e0b0['type'],'title':_0x33e0b0['title'],'localPath':_0x5a9204,'status':_0x1bc813(0x187),'reason':'no\x20changes'};try{const _0x580c7c=await loadPageDetailForPage(_0x4ee119,_0x202959);if(_0xb37fdb!=null&&!_0x580c7c['datasetIds'][_0x1bc813(0x18a)](_0xb37fdb))return{'pageId':_0x202959,'type':_0x33e0b0[_0x1bc813(0x19c)],'title':_0x33e0b0[_0x1bc813(0x199)],'localPath':_0x5a9204,'status':_0x1bc813(0x183),'reason':_0x1bc813(0x175)+_0x202959+_0x1bc813(0x170)};const _0x4e5b97=_0x33e0b0[_0x1bc813(0x17f)]!=null&&_0x580c7c['pageVersion']!=null;if(_0x4e5b97&&_0x33e0b0[_0x1bc813(0x17f)]!==_0x580c7c[_0x1bc813(0x17f)])return{'pageId':_0x202959,'type':_0x33e0b0[_0x1bc813(0x19c)],'title':_0x33e0b0[_0x1bc813(0x199)],'localPath':_0x5a9204,'status':_0x1bc813(0x183),'reason':_0x1bc813(0x1ae)};if(!_0x4e5b97&&computeSerializedSchemaHash(_0x580c7c['code'])!==_0x33e0b0[_0x1bc813(0x197)])return{'pageId':_0x202959,'type':_0x33e0b0['type'],'title':_0x33e0b0[_0x1bc813(0x199)],'localPath':_0x5a9204,'status':'conflict','reason':_0x1bc813(0x198)};}catch(_0x3f6e41){return{'pageId':_0x202959,'type':_0x33e0b0['type'],'title':_0x33e0b0[_0x1bc813(0x199)],'localPath':_0x5a9204,'status':_0x1bc813(0x166),'reason':_0x3f6e41 instanceof Error?_0x3f6e41['message']:String(_0x3f6e41)};}return{'pageId':_0x202959,'type':_0x33e0b0['type'],'title':_0x33e0b0['title'],'localPath':_0x5a9204,'status':_0x1bc813(0x1a2)};}async function prepareSinglePush(_0x6ba095,_0x5a3c2,_0x2966ff,_0x16e7fc,_0x2b9368){const _0x59129c=a102_0x465d52;if(!_0x2966ff)throw CliErrors[_0x59129c(0x1a7)](_0x59129c(0x1a3)+_0x16e7fc+'.',_0x59129c(0x194)+CLI_BIN_NAME+'\x20page\x20pull\x20--id\x20'+_0x16e7fc+_0x59129c(0x19b));const _0x51bb11=resolvePageFilePath(_0x5a3c2,_0x16e7fc,_0x2966ff[_0x59129c(0x19c)]);if(!await fileExists(_0x51bb11))throw CliErrors['validation'](_0x59129c(0x169)+_0x51bb11,_0x59129c(0x194)+CLI_BIN_NAME+_0x59129c(0x188)+_0x16e7fc+_0x59129c(0x19b));const _0x594248=await readFile(_0x51bb11,'utf8');try{JSON[_0x59129c(0x192)](_0x594248);}catch{throw CliErrors[_0x59129c(0x1a7)](_0x59129c(0x16d)+_0x51bb11);}const _0x455f5b=await loadPageDetailForPage(_0x6ba095,_0x16e7fc);if(_0x2b9368!=null&&!_0x455f5b[_0x59129c(0x1b3)][_0x59129c(0x18a)](_0x2b9368))throw CliErrors['validation'](_0x59129c(0x175)+_0x16e7fc+'\x20no\x20longer\x20belongs\x20to\x20the\x20selected\x20dataset.');const _0x137614=_0x2966ff[_0x59129c(0x17f)]!=null&&_0x455f5b['pageVersion']!=null;if(_0x137614){if(_0x2966ff[_0x59129c(0x17f)]!==_0x455f5b[_0x59129c(0x17f)])throw CliErrors['validation']('Remote\x20page\x20'+_0x16e7fc+'\x20has\x20changed\x20since\x20last\x20pull.','Run\x20`'+CLI_BIN_NAME+_0x59129c(0x188)+_0x16e7fc+_0x59129c(0x19b));}else{const _0x19e29f=computeSerializedSchemaHash(_0x455f5b[_0x59129c(0x19a)]);if(_0x19e29f!==_0x2966ff[_0x59129c(0x197)])throw CliErrors[_0x59129c(0x1a7)](_0x59129c(0x161)+_0x16e7fc+_0x59129c(0x173),_0x59129c(0x194)+CLI_BIN_NAME+'\x20page\x20pull\x20--id\x20'+_0x16e7fc+_0x59129c(0x19b));}return{'lockEntry':_0x2966ff,'localPath':_0x51bb11,'localContent':_0x594248,'localHash':computePageContentHash(_0x594248),'remoteDetail':_0x455f5b};}async function pushPreparedPage(_0x26c947,_0x34668b){const _0x2eeb82=a102_0x465d52,_0x568d04=await updatePage(_0x26c947[_0x2eeb82(0x195)],_0x34668b[_0x2eeb82(0x193)][_0x2eeb82(0x17c)],_0x34668b[_0x2eeb82(0x16c)],_0x34668b['remoteDetail'][_0x2eeb82(0x1b3)]);if(!_0x568d04)throw CliErrors['apiError'](_0x2eeb82(0x19e)+_0x34668b[_0x2eeb82(0x193)]['pageId']);const _0x306f39=await loadPageDetailForPage(_0x26c947,_0x34668b['remoteDetail']['pageId']),_0x20a605=serializePageSchemaForFile(_0x306f39['code']);return await writeFile(_0x34668b['localPath'],_0x20a605,_0x2eeb82(0x168)),{'pageId':_0x306f39['pageId'],'type':_0x306f39['type'],'title':_0x306f39[_0x2eeb82(0x1a1)],'normalized':_0x20a605!==serializePageSchemaForFile(_0x34668b[_0x2eeb82(0x16c)]),'nextLockEntry':{'hash':computePageContentHash(_0x20a605),'pageId':_0x306f39[_0x2eeb82(0x17c)],'pageVersion':_0x306f39['pageVersion'],'type':_0x306f39[_0x2eeb82(0x19c)],'title':_0x306f39['name'],'datasetIds':_0x306f39[_0x2eeb82(0x1b3)],'versionTag':_0x306f39[_0x2eeb82(0x162)]}};}