@lovrabet/rabetbase-cli 2.3.9 → 2.3.10-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/update.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/init.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3221f3,_0x46915e){const _0x518846=a116_0x391e,_0xedbd19=_0x3221f3();while(!![]){try{const _0x362a51=-parseInt(_0x518846(0xd7))/0x1*(-parseInt(_0x518846(0xdc))/0x2)+-parseInt(_0x518846(0xea))/0x3+-parseInt(_0x518846(0xcd))/0x4+-parseInt(_0x518846(0xdf))/0x5+-parseInt(_0x518846(0xe9))/0x6+-parseInt(_0x518846(0xc4))/0x7+parseInt(_0x518846(0xd8))/0x8*(parseInt(_0x518846(0xe0))/0x9);if(_0x362a51===_0x46915e)break;else _0xedbd19['push'](_0xedbd19['shift']());}catch(_0x1289cb){_0xedbd19['push'](_0xedbd19['shift']());}}}(a116_0x13a6,0xcbcd5));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';function a116_0x13a6(){const _0x193d34=['map','1016156VJDIDg','--params.','push','4576645FQyhRn','436203REzZrm','label','isTTY','has','field','cssUrl','trim','startsWith','join','8450814PLeohT','1723683SCBFxj','split','parse','641886pCSbcD','object','cwd','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','isArray','utf8','pages','data','JS\x20URL\x20is\x20unreachable:\x20','5150452cNBYHL','stdin','path','Start\x20non-interactive\x20menu\x20sync','filter','message','selectedLabels','string','jsUrl','concat','1TiDYnq','760ctjzYm','menu-sync','length'];a116_0x13a6=function(){return _0x193d34;};return a116_0x13a6();}import{logger}from'../../../utils/logger.js';function a116_0x391e(_0x525b12,_0x218dc5){_0x525b12=_0x525b12-0xc4;const _0x13a6dd=a116_0x13a6();let _0x391e55=_0x13a6dd[_0x525b12];return _0x391e55;}function validateParams(_0x420d0d){const _0x1c2358=a116_0x391e,_0x1fa3f2=[];return _0x420d0d[_0x1c2358(0xd5)]&&!isValidJsHttpsUrl(_0x420d0d[_0x1c2358(0xd5)])&&_0x1fa3f2['push']({'field':'jsUrl','message':_0x1c2358(0xc7)}),_0x420d0d[_0x1c2358(0xe5)]&&!isValidCssHttpsUrl(_0x420d0d[_0x1c2358(0xe5)])&&_0x1fa3f2[_0x1c2358(0xde)]({'field':'cssUrl','message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x1fa3f2;}export async function runMenuSyncCore(_0xee6527,_0xe07f31,_0x3e4e46=[],_0x39d9be){const _0x3f39d9=a116_0x391e,_0x18068a=parseParamsFlag(_0x39d9be),_0x2c8ea7=_0x3e4e46[_0x3f39d9(0xda)]>0x0?_0x3e4e46:_0x18068a[_0x3f39d9(0xd3)],_0x5f0b71=_0x18068a['jsUrl'],_0x16f3e3=_0x18068a[_0x3f39d9(0xe5)],_0x5a9640=[];if(_0x5f0b71)_0x5a9640[_0x3f39d9(0xde)](_0x5f0b71);if(_0x16f3e3)_0x5a9640[_0x3f39d9(0xde)](_0x16f3e3);const _0x752792=validateParams(_0x18068a);if(_0x752792[_0x3f39d9(0xda)]>0x0){const _0x58632a=_0x752792['map'](_0x5c8972=>_0x3f39d9(0xdd)+_0x5c8972[_0x3f39d9(0xe4)]+':\x20'+_0x5c8972[_0x3f39d9(0xd2)])['join'](';\x20');throw new Error('Invalid\x20--params:\x20'+_0x58632a);}logger['setLogPath'](process[_0x3f39d9(0xc6)]()),logger['info'](_0x3f39d9(0xd9),_0x3f39d9(0xd0),{'appCode':_0xee6527,'selectedCount':_0x2c8ea7?.['length'],'jsUrl':_0x5f0b71,'cssUrl':_0x16f3e3});if(_0x5f0b71){const _0x385b41=await isUrlReachable(_0x5f0b71);if(!_0x385b41)throw new Error(_0x3f39d9(0xcc)+_0x5f0b71);}if(_0x16f3e3){const _0x1e29bf=await isUrlReachable(_0x16f3e3);if(!_0x1e29bf)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x16f3e3);}const _0x23d19c=getLocalPages();if(_0x23d19c[_0x3f39d9(0xda)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x3024ed=await getOnlineMenuList(_0xee6527,_0xe07f31),_0x14f069=new Set(_0x3024ed[_0x3f39d9(0xdb)](_0x54a4b7=>_0x54a4b7['path']));let _0x57d811;if(_0x2c8ea7&&_0x2c8ea7[_0x3f39d9(0xda)]>0x0){const _0x28bb8e=new Set(_0x2c8ea7['map'](_0x2fc297=>_0x2fc297['trim']()));_0x57d811=_0x23d19c[_0x3f39d9(0xd1)](_0x1c21bc=>_0x28bb8e[_0x3f39d9(0xe3)](_0x1c21bc[_0x3f39d9(0xe1)]));if(_0x57d811['length']===0x0){const _0x38620d=_0x23d19c[_0x3f39d9(0xdb)](_0x214d3a=>_0x214d3a[_0x3f39d9(0xe1)])[_0x3f39d9(0xe8)](',\x20');throw new Error('No\x20local\x20pages\x20matched\x20labels:\x20'+[..._0x28bb8e][_0x3f39d9(0xe8)](',\x20')+'\x0a\x20\x20Available\x20local\x20pages:\x20'+_0x38620d);}}else _0x57d811=_0x23d19c[_0x3f39d9(0xd1)](_0x4cb498=>!_0x14f069['has'](_0x4cb498[_0x3f39d9(0xcf)]));if(_0x57d811[_0x3f39d9(0xda)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x1976d8=await createMenus(_0xee6527,_0xe07f31,_0x57d811,_0x5a9640[_0x3f39d9(0xda)]>0x0?_0x5a9640:undefined);return logger['info']('menu-sync','Menu\x20sync\x20completed',{'count':_0x57d811['length'],'resources':_0x5a9640}),{'created':_0x1976d8['length'],'skipped':![],'targetPages':_0x57d811,'menus':_0x1976d8};}export async function readPageLabelsFromStdin(){const _0x15ac7c=a116_0x391e;if(!process[_0x15ac7c(0xce)][_0x15ac7c(0xe2)]&&!process[_0x15ac7c(0xce)]['readableEnded'])return new Promise(_0x35b277=>{const _0x4cb428=_0x15ac7c,_0x582593=[];process[_0x4cb428(0xce)]['on'](_0x4cb428(0xcb),_0x41949=>_0x582593[_0x4cb428(0xde)](_0x41949)),process[_0x4cb428(0xce)]['on']('end',()=>{const _0x3961df=_0x4cb428,_0x1d19e0=Buffer[_0x3961df(0xd6)](_0x582593)['toString'](_0x3961df(0xc9)),_0x22891c=_0x1d19e0[_0x3961df(0xeb)]('\x0a')[_0x3961df(0xdb)](_0x56f0b6=>_0x56f0b6[_0x3961df(0xe6)]())[_0x3961df(0xd1)](_0x2a5a36=>_0x2a5a36['length']>0x0&&!_0x2a5a36[_0x3961df(0xe7)]('#'));_0x35b277(_0x22891c);}),setTimeout(()=>_0x35b277([]),0x1f4);});return[];}function parseParamsFlag(_0x544dba){const _0x40fd17=a116_0x391e;if(!_0x544dba||typeof _0x544dba!==_0x40fd17(0xd4))return{};try{const _0x44f35a=JSON[_0x40fd17(0xec)](_0x544dba);if(typeof _0x44f35a!==_0x40fd17(0xc5)||_0x44f35a===null||Array[_0x40fd17(0xc8)](_0x44f35a))return{};return{'selectedLabels':Array[_0x40fd17(0xc8)](_0x44f35a[_0x40fd17(0xca)])?_0x44f35a[_0x40fd17(0xca)][_0x40fd17(0xdb)](String):undefined,'jsUrl':typeof _0x44f35a[_0x40fd17(0xd5)]===_0x40fd17(0xd4)?_0x44f35a[_0x40fd17(0xd5)][_0x40fd17(0xe6)]():undefined,'cssUrl':typeof _0x44f35a[_0x40fd17(0xe5)]==='string'?_0x44f35a[_0x40fd17(0xe5)][_0x40fd17(0xe6)]():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a118_0x6bdb(_0x340483,_0x2a2645){_0x340483=_0x340483-0x15b;const _0x49bd72=a118_0x49bd();let _0x6bdbb8=_0x49bd72[_0x340483];return _0x6bdbb8;}function a118_0x49bd(){const _0x509681=['extend','15SzvNLM','menu\x20update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','JS\x20URL\x20is\x20unreachable:\x20','after','mode','some','label','split','resources','Menu\x20update\x20completed','menu-update','trim','Invalid\x20--params:\x20menu\x20update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','join','info','fulfilled','cwd','\x22\x20(','666404QmFoZG','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','3614xzxiTM','map','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','--params.','force','dryRun','3823355evOOVr','3593004UCWURX','2448257lhOpHh','11ZQojYe','935280AWruXg','field','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','value','toLowerCase','Invalid\x20--mode:\x20','.\x20Allowed\x20values:\x20replace,\x20patch','length','7921110qFvFuC','endsWith','16KzOEty','parse','patch','status','object',').\x20','push','cssUrl','431AKEoYh','replace','message','filter','6tjONCK','isArray','menu\x20update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','string','path','rejected','Invalid\x20--params:\x20','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','jsUrl'];a118_0x49bd=function(){return _0x509681;};return a118_0x49bd();}(function(_0xfec4f5,_0x3a2c00){const _0x3892b1=a118_0x6bdb,_0x4d74da=_0xfec4f5();while(!![]){try{const _0x588e3c=parseInt(_0x3892b1(0x187))/0x1*(parseInt(_0x3892b1(0x16b))/0x2)+-parseInt(_0x3892b1(0x195))/0x3*(parseInt(_0x3892b1(0x169))/0x4)+-parseInt(_0x3892b1(0x171))/0x5*(parseInt(_0x3892b1(0x18b))/0x6)+parseInt(_0x3892b1(0x173))/0x7*(parseInt(_0x3892b1(0x17f))/0x8)+parseInt(_0x3892b1(0x175))/0x9+parseInt(_0x3892b1(0x17d))/0xa+-parseInt(_0x3892b1(0x174))/0xb*(parseInt(_0x3892b1(0x172))/0xc);if(_0x588e3c===_0x3a2c00)break;else _0x4d74da['push'](_0x4d74da['shift']());}catch(_0x4ae35a){_0x4d74da['push'](_0x4d74da['shift']());}}}(a118_0x49bd,0x74849));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x106159){const _0x7a6742=a118_0x6bdb,_0x5890d8=[];return _0x106159[_0x7a6742(0x193)]&&!isValidJsHttpsUrl(_0x106159[_0x7a6742(0x193)])&&_0x5890d8[_0x7a6742(0x185)]({'field':'jsUrl','message':_0x7a6742(0x16d)}),_0x106159[_0x7a6742(0x186)]&&!isValidCssHttpsUrl(_0x106159['cssUrl'])&&_0x5890d8['push']({'field':_0x7a6742(0x186),'message':_0x7a6742(0x16a)}),_0x5890d8;}export async function runMenuUpdateCore(_0x346c05,_0x28816c,_0x39ba9b,_0xacd475={}){const _0x32560f=a118_0x6bdb,_0x5aa624=parseUpdateParamsFlag(_0x39ba9b),_0x166196=normalizeMode(_0xacd475[_0x32560f(0x15b)]),_0x31942a=[];if(_0x5aa624[_0x32560f(0x193)])_0x31942a[_0x32560f(0x185)](_0x5aa624[_0x32560f(0x193)]);if(_0x5aa624[_0x32560f(0x186)])_0x31942a[_0x32560f(0x185)](_0x5aa624[_0x32560f(0x186)]);const _0x2e4972=validateParams(_0x5aa624);if(_0x2e4972[_0x32560f(0x17c)]>0x0){const _0x320f97=_0x2e4972['map'](_0x4fd7f7=>_0x32560f(0x16e)+_0x4fd7f7[_0x32560f(0x176)]+':\x20'+_0x4fd7f7[_0x32560f(0x189)])[_0x32560f(0x164)](';\x20');throw new Error(_0x32560f(0x191)+_0x320f97);}if(_0x31942a['length']===0x0)throw new Error(_0x32560f(0x163)+_0x32560f(0x177));logger['setLogPath'](process[_0x32560f(0x167)]()),logger[_0x32560f(0x165)](_0x32560f(0x161),'Start\x20non-interactive\x20menu\x20update',{'appCode':_0x346c05,'jsUrl':_0x5aa624['jsUrl'],'cssUrl':_0x5aa624['cssUrl'],'mode':_0x166196,'dryRun':_0xacd475[_0x32560f(0x170)]===!![]});if(_0x5aa624[_0x32560f(0x193)]){const _0x1132ba=await isUrlReachable(_0x5aa624[_0x32560f(0x193)]);if(!_0x1132ba)throw new Error(_0x32560f(0x197)+_0x5aa624[_0x32560f(0x193)]);}if(_0x5aa624['cssUrl']){const _0x5c7a9b=await isUrlReachable(_0x5aa624[_0x32560f(0x186)]);if(!_0x5c7a9b)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x5aa624[_0x32560f(0x186)]);}const _0x340832=await getOnlineMenuList(_0x346c05,_0x28816c),_0x215c85=_0x340832[_0x32560f(0x18a)](_0x284afb=>_0x284afb[_0x32560f(0x15f)][_0x32560f(0x17c)]>0x0);if(_0x215c85[_0x32560f(0x17c)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0xacd475[_0x32560f(0x170)]===!![]};const _0x329faf=_0x215c85[_0x32560f(0x16c)](_0x256a75=>buildMenuUpdateDiff(_0x256a75,_0x5aa624,_0x166196,_0xacd475[_0x32560f(0x16f)]===!![]));if(_0xacd475['dryRun'])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x329faf};const _0x3b0f7f=await Promise['allSettled'](_0x215c85[_0x32560f(0x16c)]((_0x2788d3,_0xfa5780)=>updateMenuCdnUrl(_0x346c05,_0x28816c,{'id':_0x2788d3['id'],'label':_0x2788d3['label'],'path':_0x2788d3['path'],'resources':_0x329faf[_0xfa5780][_0x32560f(0x198)]['resources'],'extend':_0x2788d3[_0x32560f(0x194)]??null}))),_0x40aff7=_0x3b0f7f['filter'](_0x40b94a=>_0x40b94a['status']===_0x32560f(0x166))[_0x32560f(0x16c)](_0x1e2a19=>_0x1e2a19[_0x32560f(0x178)]),_0x4c007b=_0x3b0f7f[_0x32560f(0x18a)](_0x39e9c1=>_0x39e9c1[_0x32560f(0x182)]===_0x32560f(0x190))[_0x32560f(0x17c)];return logger[_0x32560f(0x165)](_0x32560f(0x161),_0x32560f(0x160),{'count':_0x215c85[_0x32560f(0x17c)],'resources':_0x31942a}),{'updated':_0x40aff7[_0x32560f(0x17c)],'failed':_0x4c007b,'skipped':![],'menus':_0x40aff7};}function normalizeMode(_0x39750d){const _0x1ab60e=a118_0x6bdb;if(!_0x39750d)return'replace';if(_0x39750d===_0x1ab60e(0x188)||_0x39750d==='patch')return _0x39750d;throw new Error(_0x1ab60e(0x17a)+_0x39750d+_0x1ab60e(0x17b));}function buildMenuUpdateDiff(_0xf23d19,_0x15409a,_0x33b069,_0x23d0c9){const _0x400ec6=a118_0x6bdb,_0x3f9169=[..._0xf23d19[_0x400ec6(0x15f)]],_0x21ebe2=_0x33b069===_0x400ec6(0x181)?patchResources(_0x3f9169,_0x15409a):replaceResources(_0x15409a),_0x38aecf=[],_0x17d943=_0x3f9169[_0x400ec6(0x15c)](isJsResource),_0xb4bce4=_0x21ebe2[_0x400ec6(0x15c)](isJsResource);if(_0x17d943&&!_0xb4bce4){const _0x5a57e8=_0x400ec6(0x196)+_0xf23d19[_0x400ec6(0x15d)]+'\x22\x20('+_0xf23d19['path']+_0x400ec6(0x184)+_0x400ec6(0x192);if(!_0x23d0c9)throw new Error(_0x5a57e8);_0x38aecf[_0x400ec6(0x185)](_0x5a57e8);}const _0x43325d=_0x3f9169[_0x400ec6(0x15c)](isCssResource),_0x197b1e=_0x21ebe2[_0x400ec6(0x15c)](isCssResource);return _0x43325d&&!_0x197b1e&&_0x38aecf[_0x400ec6(0x185)](_0x400ec6(0x18d)+_0xf23d19[_0x400ec6(0x15d)]+_0x400ec6(0x168)+_0xf23d19[_0x400ec6(0x18f)]+').'),{'id':_0xf23d19['id'],'label':_0xf23d19[_0x400ec6(0x15d)],'path':_0xf23d19[_0x400ec6(0x18f)],'mode':_0x33b069,'before':{'resources':_0x3f9169},'after':{'resources':_0x21ebe2},'warnings':_0x38aecf};}function replaceResources(_0x1528bb){const _0x12c7bc=a118_0x6bdb;return[_0x1528bb[_0x12c7bc(0x193)],_0x1528bb['cssUrl']][_0x12c7bc(0x18a)](_0x13c2da=>!!_0x13c2da);}function patchResources(_0x19c7f1,_0x45f58d){const _0x177f78=a118_0x6bdb;let _0x12f374=![],_0x7b2b01=![];const _0x74bbd8=[];for(const _0x2070b1 of _0x19c7f1){if(isJsResource(_0x2070b1)){if(_0x45f58d[_0x177f78(0x193)]&&!_0x12f374)_0x74bbd8[_0x177f78(0x185)](_0x45f58d[_0x177f78(0x193)]),_0x12f374=!![];else!_0x45f58d['jsUrl']&&_0x74bbd8[_0x177f78(0x185)](_0x2070b1);continue;}if(isCssResource(_0x2070b1)){if(_0x45f58d['cssUrl']&&!_0x7b2b01)_0x74bbd8['push'](_0x45f58d[_0x177f78(0x186)]),_0x7b2b01=!![];else!_0x45f58d[_0x177f78(0x186)]&&_0x74bbd8[_0x177f78(0x185)](_0x2070b1);continue;}_0x74bbd8[_0x177f78(0x185)](_0x2070b1);}return _0x45f58d[_0x177f78(0x193)]&&!_0x12f374&&_0x74bbd8['unshift'](_0x45f58d[_0x177f78(0x193)]),_0x45f58d[_0x177f78(0x186)]&&!_0x7b2b01&&_0x74bbd8[_0x177f78(0x185)](_0x45f58d[_0x177f78(0x186)]),_0x74bbd8;}function isJsResource(_0x3212da){const _0x389b66=a118_0x6bdb;return stripQuery(_0x3212da)['toLowerCase']()[_0x389b66(0x17e)]('.js');}function isCssResource(_0x59521a){const _0x3a8d8a=a118_0x6bdb;return stripQuery(_0x59521a)[_0x3a8d8a(0x179)]()[_0x3a8d8a(0x17e)]('.css');}function stripQuery(_0x499c08){const _0x1d4e40=a118_0x6bdb;return _0x499c08[_0x1d4e40(0x15e)]('?')[0x0]??_0x499c08;}function parseUpdateParamsFlag(_0x34e09e){const _0x2ac218=a118_0x6bdb;if(!_0x34e09e||typeof _0x34e09e!==_0x2ac218(0x18e))return{};try{const _0x2a0742=JSON[_0x2ac218(0x180)](_0x34e09e);if(typeof _0x2a0742!==_0x2ac218(0x183)||_0x2a0742===null||Array[_0x2ac218(0x18c)](_0x2a0742))return{};return{'jsUrl':typeof _0x2a0742[_0x2ac218(0x193)]==='string'?_0x2a0742[_0x2ac218(0x193)][_0x2ac218(0x162)]():undefined,'cssUrl':typeof _0x2a0742['cssUrl']===_0x2ac218(0x18e)?_0x2a0742[_0x2ac218(0x186)][_0x2ac218(0x162)]():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3464a4,_0x35e427){const _0x25d956=a119_0x5175,_0x538a43=_0x3464a4();while(!![]){try{const _0x433a87=-parseInt(_0x25d956(0x14c))/0x1+-parseInt(_0x25d956(0x149))/0x2*(parseInt(_0x25d956(0x144))/0x3)+-parseInt(_0x25d956(0x145))/0x4+-parseInt(_0x25d956(0x146))/0x5*(-parseInt(_0x25d956(0x14b))/0x6)+-parseInt(_0x25d956(0x151))/0x7*(parseInt(_0x25d956(0x14e))/0x8)+parseInt(_0x25d956(0x14f))/0x9*(parseInt(_0x25d956(0x14a))/0xa)+parseInt(_0x25d956(0x150))/0xb;if(_0x433a87===_0x35e427)break;else _0x538a43['push'](_0x538a43['shift']());}catch(_0x51c244){_0x538a43['push'](_0x538a43['shift']());}}}(a119_0x2bb0,0xa03c1));function a119_0x2bb0(){const _0x229f0c=['320037zNIvKA','HEAD','152jxghAM','2960217nFdnEt','20367237KoHQxN','287497mOSQlj','3HYvOlZ','3252728sAjfhR','99140xCdngF','test','trim','14302eQDzUC','10dBEKgH','120WEhEQG'];a119_0x2bb0=function(){return _0x229f0c;};return a119_0x2bb0();}export function isValidJsHttpsUrl(_0x45ea5e){const _0x303d49=a119_0x5175;return/^https:\/\/.+\.js(\?.*)?$/[_0x303d49(0x147)](_0x45ea5e[_0x303d49(0x148)]());}export function isValidCssHttpsUrl(_0x373243){const _0x19a846=a119_0x5175;return/^https:\/\/.+\.css(\?.*)?$/['test'](_0x373243[_0x19a846(0x148)]());}function a119_0x5175(_0x4ee005,_0x3d72f8){_0x4ee005=_0x4ee005-0x144;const _0x2bb061=a119_0x2bb0();let _0x517556=_0x2bb061[_0x4ee005];return _0x517556;}export async function isUrlReachable(_0x1deae2){const _0x3dc3e0=a119_0x5175;try{const _0x2130a8=await fetch(_0x1deae2,{'method':_0x3dc3e0(0x14d)});return _0x2130a8['ok'];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a120_0x29b7(_0x2f70d5,_0x5f089a){_0x2f70d5=_0x2f70d5-0xf8;const _0x1b73b1=a120_0x1b73();let _0x29b7a7=_0x1b73b1[_0x2f70d5];return _0x29b7a7;}function a120_0x1b73(){const _0x2d7b59=['map','2022BgDLLT','\x20menu(s)\x20with\x20JS:\x20','\x20created,\x20','length','write','failed','yellow','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22,\x22pages\x22:[\x22Page1\x22]}','jsUrl','cookie','size','\x20\x20Cancelled.','\x20created.','Menu\x20creation\x20failed','onlinePaths','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','skipped','\x20menu(s)\x20created','4069242MyKXOv','\x20and\x20CSS:\x20','\x20\x20✓\x20Selected:\x20','Menu\x20sync\x20skipped','Online\x20menu\x20list\x20fetched','created','appcode','2031760kxJnmK','\x20page(s)','onlineMenuList','yes','rawFlags','gray','string','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','isArray','4410624FKsitC','520fKwYmK','validation','params','appCode','Failed\x20to\x20fetch\x20online\x20menu\x20list','2555tgHnCc','selectedAppName','\x20\x20Continue\x20with\x20creation?','3492144aDzreM','flag','menu','\x20menu(s)','object','\x20menu(s)...','3224451UcEpTP','pages','\x20failed.','\x20\x20Create\x20','trim','sync','cssUrl','Created\x20','message','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','✓\x20Menu\x20sync\x20completed:\x20','Creating\x20','20368AVqEDv','Menu\x20sync\x20completed:\x20','boolean'];a120_0x1b73=function(){return _0x2d7b59;};return a120_0x1b73();}const a120_0x51864c=a120_0x29b7;(function(_0x7bdb34,_0xbcfb1d){const _0x15689a=a120_0x29b7,_0x3c4439=_0x7bdb34();while(!![]){try{const _0xabc20b=-parseInt(_0x15689a(0x121))/0x1*(parseInt(_0x15689a(0x103))/0x2)+parseInt(_0x15689a(0x111))/0x3+-parseInt(_0x15689a(0x102))/0x4+parseInt(_0x15689a(0xf9))/0x5+-parseInt(_0x15689a(0x10b))/0x6+parseInt(_0x15689a(0x108))/0x7*(parseInt(_0x15689a(0x11d))/0x8)+parseInt(_0x15689a(0x133))/0x9;if(_0xabc20b===_0xbcfb1d)break;else _0x3c4439['push'](_0x3c4439['shift']());}catch(_0x555ae7){_0x3c4439['push'](_0x3c4439['shift']());}}}(a120_0x1b73,0x9f3a5));import a120_0x5f0cd4 from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{runMenuSyncCore,readPageLabelsFromStdin}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';export const menuSync={'service':a120_0x51864c(0x10d),'command':a120_0x51864c(0x116),'description':'Sync\x20local\x20pages\x20as\x20platform\x20menus','risk':a120_0x51864c(0x125),'flags':[{'name':'params','type':a120_0x51864c(0xff),'description':'Pre-fill\x20JS/CSS\x20URLs\x20and/or\x20select\x20specific\x20pages.\x20'+a120_0x51864c(0x128)},{'name':a120_0x51864c(0xfc),'type':a120_0x51864c(0x11f),'description':'Non-interactive:\x20auto-create\x20all\x20local\x20pages\x20not\x20yet\x20on\x20platform'}],async 'execute'(_0xb8e8f3){const _0x228f04=a120_0x51864c,_0x4e2e3f=_0xb8e8f3[_0x228f04(0xfd)]['appcode']?String(_0xb8e8f3['rawFlags'][_0x228f04(0xf8)])[_0x228f04(0x115)]():'';if(!isInProject()&&!_0xb8e8f3[_0x228f04(0x109)]&&!_0x4e2e3f)throw CliErrors[_0x228f04(0x104)]('menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20'+_0x228f04(0x130));const _0x35a97e=_0xb8e8f3[_0x228f04(0x10c)](_0x228f04(0xfc)),_0x471002=_0xb8e8f3['str'](_0x228f04(0x105)),_0x10f462=parseParams(_0x471002),_0x4672c5=!!(_0x10f462[_0x228f04(0x129)]||_0x10f462['cssUrl']||_0x10f462[_0x228f04(0x112)]&&_0x10f462[_0x228f04(0x112)][_0x228f04(0x124)]>0x0);if(_0x35a97e||_0x4672c5){let _0x5a35fc=[];!isInteractive()&&!_0x10f462['pages']?.['length']&&(_0x5a35fc=await readPageLabelsFromStdin());const _0x51ce33=await runMenuSyncCore(_0xb8e8f3[_0x228f04(0x106)],_0xb8e8f3[_0x228f04(0x12a)],_0x5a35fc[_0x228f04(0x124)]>0x0?_0x5a35fc:_0x10f462[_0x228f04(0x112)]??[],_0x471002);if(_0x51ce33['skipped']){const _0x4ad444=getLocalPages();_0x4ad444['length']===0x0?writeCliSideChannelLine(_0x228f04(0x100)):writeCliSideChannelLine(_0x228f04(0x11a));}else writeCliSideChannelLine(_0x228f04(0x11b)+_0x51ce33[_0x228f04(0x138)]+_0x228f04(0x132));return{'ok':!![],'data':_0x51ce33,'message':_0x51ce33[_0x228f04(0x131)]?_0x228f04(0x136):_0x228f04(0x11e)+_0x51ce33[_0x228f04(0x138)]+_0x228f04(0x12d)};}requireInteractive();const _0x321bf8=startSpinner('Fetching\x20online\x20menu\x20list...');let _0x17be52,_0x362400,_0xf223c2;try{const _0x42161a=await fetchMenuData(_0xb8e8f3[_0x228f04(0x106)],_0xb8e8f3[_0x228f04(0x12a)]);_0x17be52=_0x42161a['localPages'],_0x362400=_0x42161a[_0x228f04(0x12f)],_0xf223c2=_0x42161a[_0x228f04(0xfb)],stopSpinner(_0x321bf8,_0x228f04(0x137),!![]);}catch(_0x585e69){stopSpinner(_0x321bf8,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors[_0x228f04(0x104)](_0x585e69 instanceof Error?_0x585e69[_0x228f04(0x119)]:_0x228f04(0x107));}if(_0x17be52['length']===0x0)return writeCliSideChannelLine(a120_0x5f0cd4[_0x228f04(0x127)]('\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first')),{'ok':!![]};const _0x469682=buildCompareRows(_0x17be52,_0x362400);writeCliSideChannelLine(renderCompareTable(_0x469682)),writeCliSideChannelLine('');const _0x3a8090=_0x10f462[_0x228f04(0x112)],_0x5c4988=await selectPages(_0x17be52,_0x362400,_0x3a8090);writeCliSideChannelLine(''),writeCliSideChannelLine(a120_0x5f0cd4['cyan'](_0x228f04(0x135)+_0x5c4988[_0x228f04(0x124)]+_0x228f04(0xfa)));const _0x2e3f90=_0x10f462[_0x228f04(0x129)]&&_0x10f462[_0x228f04(0x117)];if(!_0x2e3f90){writeCliSideChannelLine(renderSyncSummary(_0x5c4988,_0x362400[_0x228f04(0x12b)]>0x0));const _0x42c48a=await askConfirm(_0x228f04(0x10a));if(!_0x42c48a)return writeCliSideChannelLine(a120_0x5f0cd4[_0x228f04(0xfe)](_0x228f04(0x12c))),{'ok':!![]};}let _0x4c8064=_0x10f462[_0x228f04(0x129)],_0x513720=_0x10f462[_0x228f04(0x117)];!_0x4c8064&&(_0x4c8064=await askJsUrl());!_0x513720&&(_0x513720=await askCssUrl());const _0x468be9=await askConfirm(_0x228f04(0x114)+_0x5c4988[_0x228f04(0x124)]+_0x228f04(0x122)+_0x4c8064+_0x228f04(0x134)+_0x513720+'?');if(!_0x468be9)return writeCliSideChannelLine(a120_0x5f0cd4['gray']('\x20\x20Cancelled.')),{'ok':!![]};const _0x34ce47=[_0x4c8064,_0x513720],_0x5eb8a4=startSpinner(_0x228f04(0x11c)+_0x5c4988[_0x228f04(0x124)]+_0x228f04(0x110));try{const _0x598049=await doCreateMenus(_0xb8e8f3[_0x228f04(0x106)],_0xb8e8f3['cookie'],_0x5c4988,_0x34ce47);return stopSpinner(_0x5eb8a4,_0x228f04(0x118)+_0x598049[_0x228f04(0x138)]+_0x228f04(0x10e),!![]),{'ok':!![],'data':_0x598049,'message':_0x228f04(0x11e)+_0x598049[_0x228f04(0x138)]+_0x228f04(0x123)+_0x598049[_0x228f04(0x126)]+_0x228f04(0x113)};}catch(_0x3e53b6){stopSpinner(_0x5eb8a4,_0x228f04(0x12e),![]);throw CliErrors[_0x228f04(0x104)](_0x3e53b6 instanceof Error?_0x3e53b6[_0x228f04(0x119)]:'Menu\x20creation\x20failed');}}};function parseParams(_0x14ebbf){const _0x3025b8=a120_0x51864c;if(!_0x14ebbf)return{};try{const _0x1954f2=JSON['parse'](_0x14ebbf);if(typeof _0x1954f2!==_0x3025b8(0x10f)||_0x1954f2===null||Array[_0x3025b8(0x101)](_0x1954f2))return{};return{'jsUrl':typeof _0x1954f2[_0x3025b8(0x129)]===_0x3025b8(0xff)?_0x1954f2['jsUrl'][_0x3025b8(0x115)]():undefined,'cssUrl':typeof _0x1954f2['cssUrl']===_0x3025b8(0xff)?_0x1954f2[_0x3025b8(0x117)][_0x3025b8(0x115)]():undefined,'pages':Array[_0x3025b8(0x101)](_0x1954f2[_0x3025b8(0x112)])?_0x1954f2['pages'][_0x3025b8(0x120)](String):undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a121_0x31d606=a121_0x5106;(function(_0x20048a,_0xd5e4dd){const _0x300e8b=a121_0x5106,_0x3ed82e=_0x20048a();while(!![]){try{const _0x50c987=parseInt(_0x300e8b(0x20d))/0x1*(parseInt(_0x300e8b(0x204))/0x2)+-parseInt(_0x300e8b(0x1fc))/0x3*(parseInt(_0x300e8b(0x1ef))/0x4)+parseInt(_0x300e8b(0x1e8))/0x5+parseInt(_0x300e8b(0x219))/0x6*(parseInt(_0x300e8b(0x1e9))/0x7)+-parseInt(_0x300e8b(0x1fe))/0x8+parseInt(_0x300e8b(0x203))/0x9*(parseInt(_0x300e8b(0x206))/0xa)+parseInt(_0x300e8b(0x21d))/0xb*(parseInt(_0x300e8b(0x20c))/0xc);if(_0x50c987===_0xd5e4dd)break;else _0x3ed82e['push'](_0x3ed82e['shift']());}catch(_0x229b32){_0x3ed82e['push'](_0x3ed82e['shift']());}}}(a121_0x3e63,0xd9dcf));import a121_0x5e4ba7 from'chalk';import{filterMenusWithResources,doUpdateCdnUrls,fetchOnlineMenuList}from'../../commands/menu/shared/logic.js';import{renderUpdateSummary}from'../../commands/menu/shared/compare-table.js';function a121_0x3e63(){const _0x12b6ec=['✓\x20Menu\x20update\x20completed:\x20','Fetching\x20online\x20menu\x20list...','22YYAEKB','\x20updated,\x20','bool','\x20failed.','\x20\x20Cancelled.','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','No\x20menus\x20with\x20existing\x20resources\x20would\x20be\x20updated.','label','appcode','boolean','Online\x20menu\x20list\x20fetched','failed','\x20updated.','selectedAppName','Updating\x20','appCode','Non-interactive:\x20update\x20all\x20menus\x20without\x20confirmation;\x20requires\x20--params','\x20menu(s)\x20with\x20JS:\x20','cssUrl','Update\x20CDN\x20asset\x20URLs\x20for\x20all\x20online\x20menus\x20with\x20existing\x20resources','yes','yellow','Failed\x20to\x20fetch\x20online\x20menu\x20list','menu','1512035Jndrdj','203xDwRgr','length','rawFlags','message','\x20\x20Update\x20','str','64CmSbYg','cookie','menu\x20update\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','flag','\x20menu\x20resource\x20set(s).','jsUrl','isArray','Allow\x20replace\x20mode\x20to\x20remove\x20existing\x20JS\x20resources','force','trim','Menu\x20update\x20completed:\x20','parse','high-risk-write','92199OFALUt','validation','11139344XhCTQV','Menu\x20update\x20skipped','\x20\x20Found\x20','Invalid\x20--mode.\x20Allowed\x20values:\x20replace,\x20patch','Would\x20update\x20','99LmYUpd','16HcjxgO','params','412690MwqhkK','skipped','replace','\x20menu(s)...','patch','updated','2116272WGhHMk','27473ywRJHV','Menu\x20update\x20failed','map','Updated\x20','!\x20No\x20menus\x20with\x20existing\x20resources\x20found','update','mode','Resource\x20update\x20mode:\x20replace\x20rewrites\x20resources\x20from\x20supplied\x20URLs;\x20patch\x20replaces\x20only\x20supplied\x20resource\x20types','object','POST','\x20menu(s)\x20updated','string','299514CjkupP','gray'];a121_0x3e63=function(){return _0x12b6ec;};return a121_0x3e63();}import{askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{runMenuUpdateCore}from'../../commands/menu/shared/update-core.js';import{isInProject}from'../../context.js';export const menuUpdate={'service':a121_0x31d606(0x1e7),'command':a121_0x31d606(0x212),'description':a121_0x31d606(0x230),'risk':a121_0x31d606(0x1fb),'flags':[{'name':a121_0x31d606(0x205),'type':a121_0x31d606(0x218),'description':'Pre-fill\x20JS/CSS\x20URLs\x20to\x20update.\x20'+'JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}'},{'name':a121_0x31d606(0x231),'type':a121_0x31d606(0x226),'description':a121_0x31d606(0x22d)},{'name':'mode','type':a121_0x31d606(0x218),'description':a121_0x31d606(0x214),'enum':['replace',a121_0x31d606(0x20a)],'default':a121_0x31d606(0x208)},{'name':a121_0x31d606(0x1f7),'type':a121_0x31d606(0x226),'description':a121_0x31d606(0x1f6)}],async 'dryRun'(_0x112509){const _0x3a4108=a121_0x31d606;ensureRunnableContext(_0x112509[_0x3a4108(0x1eb)],_0x112509[_0x3a4108(0x22a)]);const _0x49c412=await runMenuUpdateCore(_0x112509[_0x3a4108(0x22c)],_0x112509[_0x3a4108(0x1f0)],_0x112509['str']('params'),{'mode':parseMode(_0x112509[_0x3a4108(0x1ee)](_0x3a4108(0x213))),'dryRun':!![],'force':_0x112509[_0x3a4108(0x21f)](_0x3a4108(0x1f7))});return{'method':_0x3a4108(0x216),'url':'/smartapi/menu/update','body':_0x49c412,'description':_0x49c412[_0x3a4108(0x207)]?_0x3a4108(0x223):_0x3a4108(0x202)+(_0x49c412['diffs']?.[_0x3a4108(0x1ea)]??0x0)+_0x3a4108(0x1f3)};},async 'execute'(_0x31b20a){const _0x10f559=a121_0x31d606;ensureRunnableContext(_0x31b20a[_0x10f559(0x1eb)],_0x31b20a[_0x10f559(0x22a)]);const _0x102218=_0x31b20a[_0x10f559(0x1f2)](_0x10f559(0x231)),_0x416156=_0x31b20a['str'](_0x10f559(0x205)),_0x379613=parseMode(_0x31b20a[_0x10f559(0x1ee)](_0x10f559(0x213))),_0x5e9aac=_0x31b20a[_0x10f559(0x21f)](_0x10f559(0x1f7)),_0x5cd7e6=parseParams(_0x416156),_0xeaf5da=!!(_0x5cd7e6['jsUrl']||_0x5cd7e6[_0x10f559(0x22f)]);if(_0x102218||_0xeaf5da&&!isInteractive()){const _0x3ebd3b=await runMenuUpdateCore(_0x31b20a[_0x10f559(0x22c)],_0x31b20a[_0x10f559(0x1f0)],_0x416156,{'mode':_0x379613,'force':_0x5e9aac});return _0x3ebd3b[_0x10f559(0x207)]?writeCliSideChannelLine(_0x10f559(0x211)):(writeCliSideChannelLine(_0x10f559(0x21b)+_0x3ebd3b[_0x10f559(0x20b)]+_0x10f559(0x217)),_0x3ebd3b['failed']>0x0&&writeCliSideChannelLine('!\x20'+_0x3ebd3b[_0x10f559(0x228)]+'\x20menu(s)\x20failed')),{'ok':_0x3ebd3b[_0x10f559(0x228)]===0x0,'data':_0x3ebd3b,'message':_0x3ebd3b[_0x10f559(0x207)]?_0x10f559(0x1ff):_0x10f559(0x1f9)+_0x3ebd3b[_0x10f559(0x20b)]+_0x10f559(0x21e)+_0x3ebd3b[_0x10f559(0x228)]+_0x10f559(0x220)};}requireInteractive();const _0x43e810=startSpinner(_0x10f559(0x21c));let _0x276fe5;try{_0x276fe5=await fetchOnlineMenuList(_0x31b20a[_0x10f559(0x22c)],_0x31b20a[_0x10f559(0x1f0)]),stopSpinner(_0x43e810,_0x10f559(0x227),!![]);}catch(_0x9fb5e5){stopSpinner(_0x43e810,_0x10f559(0x233),![]);throw CliErrors[_0x10f559(0x1fd)](_0x9fb5e5 instanceof Error?_0x9fb5e5[_0x10f559(0x1ec)]:_0x10f559(0x233));}const _0x179ad8=filterMenusWithResources(_0x276fe5);if(_0x179ad8['length']===0x0)return writeCliSideChannelLine(a121_0x5e4ba7[_0x10f559(0x232)]('\x20\x20!\x20No\x20menus\x20with\x20existing\x20resources\x20found')),{'ok':!![]};writeCliSideChannelLine(''),writeCliSideChannelLine(a121_0x5e4ba7['cyan'](_0x10f559(0x200)+_0x179ad8[_0x10f559(0x1ea)]+'\x20menu(s)\x20with\x20existing\x20resources')),writeCliSideChannelLine(renderUpdateSummary(_0x179ad8[_0x10f559(0x20f)](_0x140877=>_0x140877[_0x10f559(0x224)]),[_0x5cd7e6[_0x10f559(0x1f4)],_0x5cd7e6[_0x10f559(0x22f)]])),writeCliSideChannelLine('');let _0x247cd6=_0x5cd7e6[_0x10f559(0x1f4)],_0x1d0c6a=_0x5cd7e6[_0x10f559(0x22f)];!_0x247cd6&&(_0x247cd6=await askJsUrl());!_0x1d0c6a&&(_0x1d0c6a=await askCssUrl());const _0x349028=await askConfirm(_0x10f559(0x1ed)+_0x179ad8[_0x10f559(0x1ea)]+_0x10f559(0x22e)+_0x247cd6+'\x20and\x20CSS:\x20'+_0x1d0c6a+'?');if(!_0x349028)return writeCliSideChannelLine(a121_0x5e4ba7[_0x10f559(0x21a)](_0x10f559(0x221))),{'ok':!![]};const _0x1c2f89=[_0x247cd6,_0x1d0c6a],_0x1011bc=startSpinner(_0x10f559(0x22b)+_0x179ad8[_0x10f559(0x1ea)]+_0x10f559(0x209));try{const _0x31628c=await doUpdateCdnUrls(_0x31b20a[_0x10f559(0x22c)],_0x31b20a[_0x10f559(0x1f0)],_0x179ad8,_0x1c2f89);return stopSpinner(_0x1011bc,_0x10f559(0x210)+_0x31628c[_0x10f559(0x20b)]+'\x20menu(s)',_0x31628c[_0x10f559(0x228)]===0x0),{'ok':_0x31628c['failed']===0x0,'data':_0x31628c,'message':_0x31628c['failed']>0x0?'Menu\x20update\x20completed:\x20'+_0x31628c[_0x10f559(0x20b)]+'\x20updated,\x20'+_0x31628c['failed']+'\x20failed.':_0x10f559(0x1f9)+_0x31628c[_0x10f559(0x20b)]+_0x10f559(0x229)};}catch(_0x39aee9){stopSpinner(_0x1011bc,_0x10f559(0x20e),![]);throw CliErrors[_0x10f559(0x1fd)](_0x39aee9 instanceof Error?_0x39aee9[_0x10f559(0x1ec)]:_0x10f559(0x20e));}}};function ensureRunnableContext(_0x406e3c,_0xd0c087){const _0x672c67=a121_0x31d606,_0x393fad=_0x406e3c[_0x672c67(0x225)]?String(_0x406e3c['appcode'])[_0x672c67(0x1f8)]():'';if(!isInProject()&&!_0xd0c087&&!_0x393fad)throw CliErrors['validation'](_0x672c67(0x1f1)+_0x672c67(0x222));}function a121_0x5106(_0x2830e6,_0x54ff2f){_0x2830e6=_0x2830e6-0x1e7;const _0x3e63b2=a121_0x3e63();let _0x51067f=_0x3e63b2[_0x2830e6];return _0x51067f;}function parseMode(_0x596b5e){const _0x355a0f=a121_0x31d606;if(!_0x596b5e)return _0x355a0f(0x208);if(_0x596b5e==='replace'||_0x596b5e===_0x355a0f(0x20a))return _0x596b5e;throw CliErrors[_0x355a0f(0x1fd)](_0x355a0f(0x201));}function parseParams(_0x214889){const _0xb53c88=a121_0x31d606;if(!_0x214889)return{};try{const _0x29ea83=JSON[_0xb53c88(0x1fa)](_0x214889);if(typeof _0x29ea83!==_0xb53c88(0x215)||_0x29ea83===null||Array[_0xb53c88(0x1f5)](_0x29ea83))return{};return{'jsUrl':typeof _0x29ea83[_0xb53c88(0x1f4)]===_0xb53c88(0x218)?_0x29ea83[_0xb53c88(0x1f4)][_0xb53c88(0x1f8)]():undefined,'cssUrl':typeof _0x29ea83[_0xb53c88(0x22f)]===_0xb53c88(0x218)?_0x29ea83[_0xb53c88(0x22f)][_0xb53c88(0x1f8)]():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a122_0x432cde=a122_0x325f;function a122_0x325f(_0x4f6444,_0x3f78f5){_0x4f6444=_0x4f6444-0xda;const _0x322f87=a122_0x322f();let _0x325f79=_0x322f87[_0x4f6444];return _0x325f79;}(function(_0x16a456,_0x2b7374){const _0x1d505c=a122_0x325f,_0x338041=_0x16a456();while(!![]){try{const _0x4137d7=-parseInt(_0x1d505c(0xf6))/0x1*(-parseInt(_0x1d505c(0xe4))/0x2)+parseInt(_0x1d505c(0xe6))/0x3*(parseInt(_0x1d505c(0xfe))/0x4)+parseInt(_0x1d505c(0xdf))/0x5*(-parseInt(_0x1d505c(0xf7))/0x6)+parseInt(_0x1d505c(0xde))/0x7+parseInt(_0x1d505c(0xf1))/0x8+parseInt(_0x1d505c(0xf9))/0x9+-parseInt(_0x1d505c(0xe9))/0xa;if(_0x4137d7===_0x2b7374)break;else _0x338041['push'](_0x338041['shift']());}catch(_0x49f701){_0x338041['push'](_0x338041['shift']());}}}(a122_0x322f,0x877a8));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const NOTIFICATION_CHANNEL_TYPES=[a122_0x432cde(0xec),a122_0x432cde(0xea),a122_0x432cde(0xdd),'WECOM','WEBHOOK'];export const notificationConfigList={'service':a122_0x432cde(0xe8),'command':a122_0x432cde(0xeb),'description':'List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','risk':a122_0x432cde(0xda),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a122_0x432cde(0xdc),'type':'string','description':a122_0x432cde(0xf3),'enum':NOTIFICATION_CHANNEL_TYPES,'default':a122_0x432cde(0xec)}],async 'validate'(_0x203efc){readChannelType(_0x203efc);},async 'execute'(_0x2ebc75){const _0x2cebe9=a122_0x432cde,_0x149591=readChannelType(_0x2ebc75),_0x323211=await listNotificationChannelConfigs(_0x2ebc75[_0x2cebe9(0xf0)],_0x149591),_0x130211=_0x323211['map'](projectNotificationConfig);return{'ok':!![],'data':{'appCode':_0x2ebc75[_0x2cebe9(0xf0)],'channelType':_0x149591,'count':_0x130211[_0x2cebe9(0xe2)],'configs':_0x130211},'message':_0x2cebe9(0xe1)+_0x130211[_0x2cebe9(0xe2)]+'\x20'+_0x149591+_0x2cebe9(0xfc)};}};function readChannelType(_0x21c124){const _0x55f3b9=a122_0x432cde,_0x5b9d06=_0x21c124[_0x55f3b9(0xed)](_0x55f3b9(0xdc))[_0x55f3b9(0xf4)]()||_0x55f3b9(0xec);if(!NOTIFICATION_CHANNEL_TYPES[_0x55f3b9(0xe3)](_0x5b9d06))throw CliErrors['validation'](_0x55f3b9(0xe0)+_0x5b9d06,_0x55f3b9(0xee)+NOTIFICATION_CHANNEL_TYPES[_0x55f3b9(0xfa)](',\x20')+'.');return _0x5b9d06;}function projectNotificationConfig(_0x413f74,_0x32261d){const _0x5a8f19=a122_0x432cde;return{'id':typeof _0x413f74['id']===_0x5a8f19(0xf2)?_0x413f74['id']:null,'configCode':requireConfigString(_0x413f74,'configCode',_0x32261d),'configName':requireConfigString(_0x413f74,'configName',_0x32261d),'channelType':requireConfigString(_0x413f74,'channelType',_0x32261d),'description':normalizeNullableString(_0x413f74[_0x5a8f19(0xe5)]),'createTime':normalizeNullableString(_0x413f74[_0x5a8f19(0xef)]),'updateTime':normalizeNullableString(_0x413f74[_0x5a8f19(0xdb)])};}function requireConfigString(_0x1195cb,_0x3161b5,_0x1b449b){const _0x21bec8=a122_0x432cde,_0x2b2b01=_0x1195cb[_0x3161b5];if(typeof _0x2b2b01!==_0x21bec8(0xf5)||_0x2b2b01[_0x21bec8(0xf4)]()==='')throw CliErrors[_0x21bec8(0xf8)](_0x21bec8(0xfb),_0x21bec8(0xfd)+(_0x1b449b+0x1)+_0x21bec8(0xe7)+_0x3161b5+'\x22.');return _0x2b2b01['trim']();}function a122_0x322f(){const _0x109ac8=['appCode','5587392NRKCct','number','Notification\x20channel\x20type','trim','string','62GFwlIQ','6vhwAZI','apiError','6538419COuTGZ','join','Invalid\x20notification\x20config\x20response.','\x20notification\x20config(s)','Item\x20','106484ocTJoB','read','updateTime','type','DINGTALK','5935790iIulXD','2817045dImwkN','Invalid\x20--type:\x20','Found\x20','length','includes','16924CEHETQ','description','93SkOrcb','\x20is\x20missing\x20required\x20field\x20\x22','notification','25044510fYbgHo','FEISHU','config-list','EMAIL','str','Allowed\x20values:\x20','createTime'];a122_0x322f=function(){return _0x109ac8;};return a122_0x322f();}function normalizeNullableString(_0x195cf2){return typeof _0x195cf2==='string'?_0x195cf2:null;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a123_0x46b7(_0xcb85e,_0x18b499){_0xcb85e=_0xcb85e-0x6a;const _0x42e802=a123_0x42e8();let _0x46b7d7=_0x42e802[_0xcb85e];return _0x46b7d7;}(function(_0x46ac8e,_0x552f48){const _0x4779b7=a123_0x46b7,_0x33ae23=_0x46ac8e();while(!![]){try{const _0x1e6e4c=-parseInt(_0x4779b7(0x74))/0x1*(parseInt(_0x4779b7(0x6a))/0x2)+parseInt(_0x4779b7(0x71))/0x3*(-parseInt(_0x4779b7(0x72))/0x4)+-parseInt(_0x4779b7(0x73))/0x5+parseInt(_0x4779b7(0x6d))/0x6*(parseInt(_0x4779b7(0x70))/0x7)+parseInt(_0x4779b7(0x75))/0x8+-parseInt(_0x4779b7(0x6f))/0x9*(parseInt(_0x4779b7(0x6e))/0xa)+-parseInt(_0x4779b7(0x6b))/0xb*(-parseInt(_0x4779b7(0x6c))/0xc);if(_0x1e6e4c===_0x552f48)break;else _0x33ae23['push'](_0x33ae23['shift']());}catch(_0x4cc1f7){_0x33ae23['push'](_0x33ae23['shift']());}}}(a123_0x42e8,0xa114a));import{notificationConfigList}from'../../commands/notification/config-list.js';export const notificationDefinitions=[notificationConfigList];function a123_0x42e8(){const _0x9ad58b=['28YxknvO','8533520nLZvjW','71368KlJBXo','1947XSprsf','75900jqebiQ','5435994fcCtub','142210WFnvJC','396BAHduX','7mpEBsL','15ltnatn','200444atkUWs','2784985gnOWph'];a123_0x42e8=function(){return _0x9ad58b;};return a123_0x42e8();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a124_0x948378=a124_0x36db;(function(_0x146452,_0x5b387c){const _0x1cbb97=a124_0x36db,_0x16c969=_0x146452();while(!![]){try{const _0x37e3a1=-parseInt(_0x1cbb97(0x1d0))/0x1+-parseInt(_0x1cbb97(0x1d4))/0x2*(parseInt(_0x1cbb97(0x1da))/0x3)+-parseInt(_0x1cbb97(0x1c7))/0x4*(parseInt(_0x1cbb97(0x1c4))/0x5)+-parseInt(_0x1cbb97(0x1d1))/0x6*(parseInt(_0x1cbb97(0x1e6))/0x7)+-parseInt(_0x1cbb97(0x1c8))/0x8+parseInt(_0x1cbb97(0x1bf))/0x9+parseInt(_0x1cbb97(0x1d7))/0xa;if(_0x37e3a1===_0x5b387c)break;else _0x16c969['push'](_0x16c969['shift']());}catch(_0x4fd0b1){_0x16c969['push'](_0x16c969['shift']());}}}(a124_0x41bc,0xad37c));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessGenerateOperationState,assessStandardPageState,buildPageGenerateOperationStatusQueryCommand,buildStandardPageStatusQueryCommand,createPageGenerateClientOperationId,getUndeletedRelatedPages,loadDatasetDetailForPage,loadStandardPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';import{startGenerateStandardPages}from'../../core/api-client.js';function a124_0x36db(_0x296c38,_0x2edffe){_0x296c38=_0x296c38-0x1bd;const _0x41bc86=a124_0x41bc();let _0x36db03=_0x41bc86[_0x296c38];return _0x36db03;}export const pageGenerateStart={'service':a124_0x948378(0x1ce),'command':a124_0x948378(0x1e1),'description':a124_0x948378(0x1ca),'risk':a124_0x948378(0x1be),'defaultOutputFormat':a124_0x948378(0x1e4),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a124_0x948378(0x1d9),'type':a124_0x948378(0x1d6),'description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'},{'name':'apply','type':a124_0x948378(0x1d2),'description':a124_0x948378(0x1d3)}],async 'validate'(_0x547f8a){validateDatasetSelector(_0x547f8a);},async 'dryRun'(_0x46f771){const _0x20d6a1=a124_0x948378,_0x184973=await prepare(_0x46f771);return{'method':_0x20d6a1(0x1e5),'url':_0x20d6a1(0x1e0)+_0x184973['dataset'][_0x20d6a1(0x1db)]+_0x20d6a1(0x1de),'body':{'appCode':_0x46f771[_0x20d6a1(0x1e3)],'clientOperationId':_0x184973[_0x20d6a1(0x1cf)]},'description':serializeDryRunDescription({'dataset':{'id':_0x184973[_0x20d6a1(0x1c1)]['id'],'code':_0x184973[_0x20d6a1(0x1c1)][_0x20d6a1(0x1db)],'name':_0x184973[_0x20d6a1(0x1c1)]['name'],'fieldCount':_0x184973[_0x20d6a1(0x1c1)]['fieldCount']},'precheckSource':_0x184973['standardPageStatus']?.[_0x20d6a1(0x1dc)]??_0x20d6a1(0x1d5),'action':_0x20d6a1(0x1e1),'clientOperationId':_0x184973[_0x20d6a1(0x1cf)],'plannedStatus':_0x184973['precheck'][_0x20d6a1(0x1c0)],'reason':_0x184973[_0x20d6a1(0x1c9)][_0x20d6a1(0x1bd)]})};},async 'execute'(_0x2c4d6b){const _0xef3585=a124_0x948378;if(!_0x2c4d6b['bool'](_0xef3585(0x1cc))){const _0x43649a=await pageGenerateStart['dryRun'](_0x2c4d6b);return{'ok':!![],'message':'Dry-run\x20preview\x20(pass\x20--apply\x20to\x20execute\x20the\x20generation)','data':_0x43649a};}const _0x228b61=await prepare(_0x2c4d6b);if(!_0x228b61[_0xef3585(0x1c9)][_0xef3585(0x1e2)])return{'ok':![],'message':_0x228b61[_0xef3585(0x1c9)][_0xef3585(0x1bd)],'data':{'datasetCode':_0x228b61[_0xef3585(0x1c1)]['code'],'clientOperationId':_0x228b61['clientOperationId'],'precheckSource':_0x228b61['standardPageStatus']?.['source']??_0xef3585(0x1d5),'status':_0x228b61['precheck']['status'],'manualResolutionRequired':_0x228b61['precheck'][_0xef3585(0x1d8)],'nextAction':_0x228b61['precheck'][_0xef3585(0x1cb)],'query':{'command':buildStandardPageStatusQueryCommand(_0x228b61[_0xef3585(0x1c1)][_0xef3585(0x1db)],_0x2c4d6b[_0xef3585(0x1e3)])},'standardPageStatus':_0x228b61[_0xef3585(0x1e7)]}};const _0xd92158=await startGenerateStandardPages(_0x2c4d6b[_0xef3585(0x1e3)],_0x228b61[_0xef3585(0x1c1)]['code'],{'clientOperationId':_0x228b61[_0xef3585(0x1cf)]}),_0x8422c8=_0xd92158['status']==='SUCCESS'||_0xd92158[_0xef3585(0x1c0)]===_0xef3585(0x1c3)?await loadStandardPageStatusForGenerate(_0x2c4d6b,_0x228b61[_0xef3585(0x1c1)][_0xef3585(0x1db)]):null,_0x28ef76=assessGenerateOperationState(_0x228b61[_0xef3585(0x1c1)][_0xef3585(0x1db)],_0xd92158[_0xef3585(0x1c0)],_0x8422c8);return{'ok':!![],'message':_0xd92158['reused']?_0xef3585(0x1df):'已提交生成任务','data':{'datasetCode':_0x228b61[_0xef3585(0x1c1)][_0xef3585(0x1db)],'appCode':_0x2c4d6b[_0xef3585(0x1e3)],'operationId':_0xd92158[_0xef3585(0x1c5)]??null,'clientOperationId':_0x228b61[_0xef3585(0x1cf)],'jobStatus':_0xd92158['status']??null,'progressRate':typeof _0xd92158[_0xef3585(0x1dd)]===_0xef3585(0x1cd)?_0xd92158[_0xef3585(0x1dd)]:null,'currentStep':_0xd92158[_0xef3585(0x1c6)]??null,'reused':_0xd92158[_0xef3585(0x1c2)]===!![],'status':_0x28ef76[_0xef3585(0x1c0)],'manualResolutionRequired':_0x28ef76['manualResolutionRequired'],'nextAction':_0x28ef76['nextAction'],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x228b61[_0xef3585(0x1c1)][_0xef3585(0x1db)],{'appCode':_0x2c4d6b[_0xef3585(0x1e3)],'operationId':_0xd92158['operationId'],'clientOperationId':_0x228b61[_0xef3585(0x1cf)]})},'standardPageStatus':_0x8422c8}};}};function a124_0x41bc(){const _0x5bf12f=['string','49316120ultkVa','manualResolutionRequired','alias','13116TjHbXE','code','source','progressRate','/generate-standard-pages/start','复用已有生成任务','/smartapi/lovrabet/dataset/','generate-start','allowGenerate','appCode','compress','POST','1603BCsOQY','standardPageStatus','message','write','7366716oIcOAf','status','dataset','reused','PARTIAL_SUCCESS','10rHlqmi','operationId','currentStep','1864364zNxwcc','11336952gcdAzH','precheck','Start\x20async\x20Smart\x20List\x20Page\x20generation\x20from\x20a\x20dataset','nextAction','apply','number','page','clientOperationId','805142ScQxoO','21126RDBRiT','boolean','Actually\x20execute\x20the\x20generation.\x20Without\x20this\x20flag,\x20only\x20a\x20dry-run\x20preview\x20is\x20shown.','494XHbPco','related-pages-fallback'];a124_0x41bc=function(){return _0x5bf12f;};return a124_0x41bc();}async function prepare(_0x16e94d){const _0xe37cb2=a124_0x948378,_0x276f7e=await loadDatasetDetailForPage(_0x16e94d),_0x411c41=await loadStandardPageStatusForGenerate(_0x16e94d,_0x276f7e[_0xe37cb2(0x1db)]),_0x6a274=getUndeletedRelatedPages(_0x276f7e);return{'dataset':_0x276f7e,'standardPageStatus':_0x411c41,'clientOperationId':createPageGenerateClientOperationId(),'precheck':assessStandardPageState(_0x276f7e[_0xe37cb2(0x1db)],_0x411c41,{'fallbackUndeletedPages':_0x6a274})};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a125_0x1bdc4a=a125_0x2e68;(function(_0x4206de,_0x5290e8){const _0x161a2b=a125_0x2e68,_0x54a69c=_0x4206de();while(!![]){try{const _0x231007=-parseInt(_0x161a2b(0x1c0))/0x1*(-parseInt(_0x161a2b(0x1ae))/0x2)+-parseInt(_0x161a2b(0x1ca))/0x3+-parseInt(_0x161a2b(0x1b2))/0x4*(parseInt(_0x161a2b(0x1cf))/0x5)+-parseInt(_0x161a2b(0x1d2))/0x6*(parseInt(_0x161a2b(0x1b7))/0x7)+-parseInt(_0x161a2b(0x1bb))/0x8+parseInt(_0x161a2b(0x1bf))/0x9+-parseInt(_0x161a2b(0x1be))/0xa*(-parseInt(_0x161a2b(0x1b4))/0xb);if(_0x231007===_0x5290e8)break;else _0x54a69c['push'](_0x54a69c['shift']());}catch(_0x15256c){_0x54a69c['push'](_0x54a69c['shift']());}}}(a125_0x34e4,0x2c900));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessGenerateOperationState,buildPageGenerateOperationStatusQueryCommand,loadDatasetDetailForPage,loadStandardPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector,validateGenerateOperationSelector}from'../../commands/page/shared.js';import{getGenerateStandardPagesStatus}from'../../core/api-client.js';function a125_0x34e4(){const _0x2c77ff=['clientOperationId','Query\x20Smart\x20List\x20Page\x20generate\x20operation\x20status','currentStep','Client\x20recovery/idempotency\x20id\x20when\x20operationId\x20is\x20unavailable\x20or\x20lost','set','SUCCESS','client-operation-id','page','code','532332POqKcn','manualResolutionRequired','operation-id','/smartapi/lovrabet/dataset/','str','1555IFCUmZ','query-generate-operation-status','GET','132uoyRwX','read','compress','errorMsg','4fElgyp','status','progressRate','toString','4292HuQBsh','/generate-standard-pages/status?','1430495sKDwSo','appCode','operationId','111629ccIYpV','PARTIAL_SUCCESS','name','operation_failed','396776AIQjRR','string','message','60OlAJdd','502632YIyalW','128994QITbkh'];a125_0x34e4=function(){return _0x2c77ff;};return a125_0x34e4();}function a125_0x2e68(_0x529e3d,_0x379bdd){_0x529e3d=_0x529e3d-0x1ab;const _0x34e4fe=a125_0x34e4();let _0x2e682b=_0x34e4fe[_0x529e3d];return _0x2e682b;}export const pageGenerateStatus={'service':a125_0x1bdc4a(0x1c8),'command':'generate-status','description':a125_0x1bdc4a(0x1c2),'risk':a125_0x1bdc4a(0x1ab),'defaultOutputFormat':a125_0x1bdc4a(0x1ac),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':'alias','type':a125_0x1bdc4a(0x1bc),'description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'},{'name':a125_0x1bdc4a(0x1cc),'type':a125_0x1bdc4a(0x1bc),'description':'Async\x20operation\x20id\x20returned\x20by\x20page\x20generate-start'},{'name':a125_0x1bdc4a(0x1c7),'type':'string','description':a125_0x1bdc4a(0x1c4)}],async 'validate'(_0x3e8a18){validateDatasetSelector(_0x3e8a18),validateGenerateOperationSelector(_0x3e8a18);},async 'dryRun'(_0x404798){const _0x104bf1=a125_0x1bdc4a,_0x2bd59c=await loadDatasetDetailForPage(_0x404798),_0x3740b4=_0x404798[_0x104bf1(0x1ce)](_0x104bf1(0x1cc)),_0x32bd7b=_0x404798[_0x104bf1(0x1ce)](_0x104bf1(0x1c7)),_0x485ae9=new URLSearchParams({'appCode':_0x404798[_0x104bf1(0x1b5)]});return _0x3740b4&&_0x485ae9[_0x104bf1(0x1c5)](_0x104bf1(0x1b6),_0x3740b4),_0x32bd7b&&_0x485ae9[_0x104bf1(0x1c5)](_0x104bf1(0x1c1),_0x32bd7b),{'method':_0x104bf1(0x1d1),'url':_0x104bf1(0x1cd)+_0x2bd59c[_0x104bf1(0x1c9)]+_0x104bf1(0x1b3)+_0x485ae9[_0x104bf1(0x1b1)](),'description':serializeDryRunDescription({'dataset':{'id':_0x2bd59c['id'],'code':_0x2bd59c[_0x104bf1(0x1c9)],'name':_0x2bd59c[_0x104bf1(0x1b9)]},'action':_0x104bf1(0x1d0),'operationId':_0x3740b4||undefined,'clientOperationId':_0x32bd7b||undefined})};},async 'execute'(_0x34cbd){const _0x1662b5=a125_0x1bdc4a,_0x110969=await loadDatasetDetailForPage(_0x34cbd),_0x373df1=_0x34cbd['str'](_0x1662b5(0x1cc)),_0x511337=_0x34cbd[_0x1662b5(0x1ce)](_0x1662b5(0x1c7)),_0x348a84=await getGenerateStandardPagesStatus(_0x34cbd[_0x1662b5(0x1b5)],_0x110969[_0x1662b5(0x1c9)],{'operationId':_0x373df1||undefined,'clientOperationId':_0x511337||undefined}),_0x4fce59=_0x348a84[_0x1662b5(0x1af)]===_0x1662b5(0x1c6)||_0x348a84['status']===_0x1662b5(0x1b8),_0x34aa6e=_0x4fce59?await loadStandardPageStatusForGenerate(_0x34cbd,_0x110969[_0x1662b5(0x1c9)]):null,_0x2852a5=assessGenerateOperationState(_0x110969[_0x1662b5(0x1c9)],_0x348a84[_0x1662b5(0x1af)],_0x34aa6e),_0x258aa7=_0x348a84['operationId']??_0x373df1??undefined,_0x368104=_0x348a84[_0x1662b5(0x1c1)]??_0x511337??undefined;return{'ok':!![],'message':_0x2852a5['status']===_0x1662b5(0x1ba)?_0x348a84['errorMsg']||_0x2852a5[_0x1662b5(0x1bd)]:_0x2852a5[_0x1662b5(0x1bd)],'data':{'datasetCode':_0x110969[_0x1662b5(0x1c9)],'appCode':_0x34cbd[_0x1662b5(0x1b5)],'operationId':_0x258aa7,'clientOperationId':_0x368104,'jobStatus':_0x348a84[_0x1662b5(0x1af)]??null,'progressRate':typeof _0x348a84[_0x1662b5(0x1b0)]==='number'?_0x348a84['progressRate']:null,'currentStep':_0x348a84[_0x1662b5(0x1c3)]??null,'errorMsg':_0x348a84[_0x1662b5(0x1ad)]??null,'status':_0x2852a5[_0x1662b5(0x1af)],'manualResolutionRequired':_0x2852a5[_0x1662b5(0x1cb)],'nextAction':_0x2852a5['nextAction'],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x110969[_0x1662b5(0x1c9)],{'appCode':_0x34cbd[_0x1662b5(0x1b5)],'operationId':_0x258aa7,'clientOperationId':_0x368104})},'standardPageStatus':_0x34aa6e,'result':_0x348a84['result']??null}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xfaa403,_0xe16ef4){const _0x1f2cbe=a126_0x31d7,_0x8dd116=_0xfaa403();while(!![]){try{const _0x5b9843=-parseInt(_0x1f2cbe(0x15d))/0x1*(parseInt(_0x1f2cbe(0x161))/0x2)+-parseInt(_0x1f2cbe(0x163))/0x3*(parseInt(_0x1f2cbe(0x15b))/0x4)+parseInt(_0x1f2cbe(0x160))/0x5+-parseInt(_0x1f2cbe(0x15c))/0x6+-parseInt(_0x1f2cbe(0x162))/0x7+-parseInt(_0x1f2cbe(0x15e))/0x8*(parseInt(_0x1f2cbe(0x15f))/0x9)+parseInt(_0x1f2cbe(0x164))/0xa;if(_0x5b9843===_0xe16ef4)break;else _0x8dd116['push'](_0x8dd116['shift']());}catch(_0xa570f1){_0x8dd116['push'](_0x8dd116['shift']());}}}(a126_0x3b3a,0x6411e));import{pageGenerateStart}from'../../commands/page/generate-start.js';import{pageGenerateStatus}from'../../commands/page/generate-status.js';function a126_0x31d7(_0x4d56a7,_0x5979d8){_0x4d56a7=_0x4d56a7-0x15b;const _0x3b3a53=a126_0x3b3a();let _0x31d7dc=_0x3b3a53[_0x4d56a7];return _0x31d7dc;}import{pageStandardPageStatus}from'../../commands/page/standard-page-status.js';import{pageSync}from'../../commands/page/sync.js';import{pagePull}from'../../commands/page/pull.js';import{pagePush}from'../../commands/page/push.js';function a126_0x3b3a(){const _0x10783f=['1107AAliwY','3081310ebcgOW','356xdSWuf','860174egJFnj','273558KOJZMO','17204390snfBcf','16nTkQnl','1932912DDLzlx','1739GzcMhU','52520clNgiO'];a126_0x3b3a=function(){return _0x10783f;};return a126_0x3b3a();}import{pageRelationAudit}from'../../commands/page/relation-audit.js';export const pageDefinitions=[pageGenerateStart,pageGenerateStatus,pageStandardPageStatus,pageRelationAudit,pageSync,pagePull,pagePush];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a127_0x35f333=a127_0x38ec;(function(_0x4dad3e,_0x3c6dd0){const _0x47bd0d=a127_0x38ec,_0xf1d1c3=_0x4dad3e();while(!![]){try{const _0x56eb1d=parseInt(_0x47bd0d(0x1b6))/0x1+parseInt(_0x47bd0d(0x1d6))/0x2*(-parseInt(_0x47bd0d(0x1d1))/0x3)+parseInt(_0x47bd0d(0x1ce))/0x4+-parseInt(_0x47bd0d(0x1eb))/0x5+parseInt(_0x47bd0d(0x1e3))/0x6*(-parseInt(_0x47bd0d(0x1e5))/0x7)+parseInt(_0x47bd0d(0x1b9))/0x8+parseInt(_0x47bd0d(0x1ee))/0x9;if(_0x56eb1d===_0x3c6dd0)break;else _0xf1d1c3['push'](_0xf1d1c3['shift']());}catch(_0x2075d0){_0xf1d1c3['push'](_0xf1d1c3['shift']());}}}(a127_0x27f6,0x25bc8));import{writeFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getPageIdFlag,loadDatasetDetailForPage,loadPageDetailForPage,selectVersionTagGroup,serializeDryRunDescription,validatePageTargetSelector}from'../../commands/page/shared.js';import{computePageContentHash,computePageFileHash,serializePageSchemaForFile}from'../../core/page/hash.js';import{ensureParentDirectory,fileExists,loadPageProjectConfig,resolvePageFilePath}from'../../core/page/file-system.js';import{createEmptyPageLock,ensurePageLockScope,readPageLockFile,writePageLockFile}from'../../core/page/lock.js';import{CliErrors}from'../../errors.js';function a127_0x27f6(){const _0x324895=['code','Use\x20--force\x20to\x20overwrite\x20local\x20changes.','filter','datasetCode','all','\x22\x20has\x20no\x20undeleted\x20related\x20pages.','push','detail','\x20pulled,\x20','number','batch','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','map','page','721196mIukcp','items','pages','390207aFWOIh','bool','Overwrite\x20local\x20files\x20even\x20when\x20unsynced\x20local\x20changes\x20exist','versionTag','alias','2XkiwEU','relatedPages','appCode','GET','validation','lockFilePath','/smartapi/lovrabet/detail\x20(per\x20selected\x20page)','lastSync','pageId','compress','pull','would_pull','Page\x20group\x20version\x20tag\x20(batch\x20mode\x20only)','2748cYQyCt','single','3017EOrSDp','status','read','type','force','reason','1451000KLQouN','local\x20unsynced\x20changes','Dataset\x20\x22','2170944pYAFsr','mode','length','Pull\x20page\x20schema\x20to\x20local\x20files','utf8','deleted','boolean','拉取完成:\x20','toISOString','150617SPygUb','conflict','/smartapi/lovrabet/detail?pageId=','1600824ZCDvOt','string','datasetIds','version-tag','name','\x20skipped','localPath'];a127_0x27f6=function(){return _0x324895;};return a127_0x27f6();}export const pagePull={'service':a127_0x35f333(0x1cd),'command':a127_0x35f333(0x1e0),'description':a127_0x35f333(0x1f1),'risk':a127_0x35f333(0x1e7),'defaultOutputFormat':a127_0x35f333(0x1df),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'id','type':a127_0x35f333(0x1c9),'description':'Page\x20ID'},DATASETCODE_FLAG_OPTIONAL,{'name':a127_0x35f333(0x1d5),'type':a127_0x35f333(0x1ba),'description':a127_0x35f333(0x1cb)},{'name':a127_0x35f333(0x1bc),'type':a127_0x35f333(0x1ba),'description':a127_0x35f333(0x1e2)},{'name':'force','type':a127_0x35f333(0x1f4),'description':a127_0x35f333(0x1d3)}],async 'validate'(_0x4d1b44){validatePageTargetSelector(_0x4d1b44);},async 'dryRun'(_0xfd42e7){const _0x3b67b6=a127_0x35f333,_0x36b947=await buildPullPlan(_0xfd42e7);return{'method':_0x3b67b6(0x1d9),'url':_0x36b947[_0x3b67b6(0x1ef)]===_0x3b67b6(0x1e4)?_0x3b67b6(0x1b8)+(_0x36b947[_0x3b67b6(0x1cf)][0x0]?.[_0x3b67b6(0x1c7)][_0x3b67b6(0x1de)]??''):_0x3b67b6(0x1dc),'body':{'appCode':_0xfd42e7[_0x3b67b6(0x1d8)],'mode':_0x36b947[_0x3b67b6(0x1ef)],'targetDatasetCode':_0x36b947[_0x3b67b6(0x1c3)]??null,'pages':_0x36b947[_0x3b67b6(0x1cf)][_0x3b67b6(0x1cc)](toPreviewItem)},'description':serializeDryRunDescription({'mode':_0x36b947[_0x3b67b6(0x1ef)],'datasetCode':_0x36b947['datasetCode']??null,'totalCandidates':_0x36b947[_0x3b67b6(0x1cf)][_0x3b67b6(0x1f0)],'totalWouldPull':_0x36b947[_0x3b67b6(0x1cf)]['filter'](_0x311ba3=>_0x311ba3[_0x3b67b6(0x1e6)]===_0x3b67b6(0x1e1))[_0x3b67b6(0x1f0)],'totalConflicts':_0x36b947['items']['filter'](_0x4b065a=>_0x4b065a[_0x3b67b6(0x1e6)]===_0x3b67b6(0x1b7))[_0x3b67b6(0x1f0)]})};},async 'execute'(_0x1791aa){const _0x3dba4d=a127_0x35f333,_0x5159d4=loadPageProjectConfig(_0x1791aa[_0x3dba4d(0x1d8)]),_0x45cf52=await readPageLockFile(_0x5159d4[_0x3dba4d(0x1db)]),{lockData:_0x55bef0,appLock:_0x397c6f}=ensurePageLockScope(_0x45cf52??createEmptyPageLock(),_0x1791aa[_0x3dba4d(0x1d8)]),_0x26d6ed=await buildPullPlan(_0x1791aa),_0x35910a=_0x1791aa[_0x3dba4d(0x1d2)](_0x3dba4d(0x1e9));if(_0x26d6ed[_0x3dba4d(0x1ef)]===_0x3dba4d(0x1e4)&&_0x26d6ed[_0x3dba4d(0x1cf)][0x0]?.[_0x3dba4d(0x1e6)]===_0x3dba4d(0x1b7)&&!_0x35910a)throw CliErrors[_0x3dba4d(0x1da)]('Local\x20page\x20file\x20has\x20unsynced\x20changes:\x20'+_0x26d6ed['items'][0x0][_0x3dba4d(0x1bf)],_0x3dba4d(0x1c1));const _0x414f87=[],_0xb8ab46=[];for(const _0x330881 of _0x26d6ed[_0x3dba4d(0x1cf)]){if(_0x330881[_0x3dba4d(0x1e6)]===_0x3dba4d(0x1b7)&&!_0x35910a){_0xb8ab46[_0x3dba4d(0x1c6)]({'pageId':_0x330881[_0x3dba4d(0x1c7)][_0x3dba4d(0x1de)],'type':_0x330881[_0x3dba4d(0x1c7)][_0x3dba4d(0x1e8)],'title':_0x330881[_0x3dba4d(0x1c7)][_0x3dba4d(0x1bd)],'localPath':_0x330881[_0x3dba4d(0x1bf)],'reason':_0x330881[_0x3dba4d(0x1ea)]??_0x3dba4d(0x1ec)});continue;}await ensureParentDirectory(_0x330881['localPath']);const _0x512b32=serializePageSchemaForFile(_0x330881[_0x3dba4d(0x1c7)][_0x3dba4d(0x1c0)]);await writeFile(_0x330881[_0x3dba4d(0x1bf)],_0x512b32,_0x3dba4d(0x1f2)),_0x397c6f[_0x3dba4d(0x1d0)][String(_0x330881[_0x3dba4d(0x1c7)][_0x3dba4d(0x1de)])]=buildLockEntry(_0x330881[_0x3dba4d(0x1c7)],_0x512b32),_0x414f87[_0x3dba4d(0x1c6)]({'pageId':_0x330881['detail']['pageId'],'type':_0x330881[_0x3dba4d(0x1c7)][_0x3dba4d(0x1e8)],'title':_0x330881[_0x3dba4d(0x1c7)][_0x3dba4d(0x1bd)],'localPath':_0x330881[_0x3dba4d(0x1bf)]});}return _0x397c6f[_0x3dba4d(0x1dd)]=new Date()[_0x3dba4d(0x1b5)](),await writePageLockFile(_0x5159d4[_0x3dba4d(0x1db)],_0x55bef0),{'ok':!![],'message':_0x3dba4d(0x1f5)+_0x414f87['length']+_0x3dba4d(0x1c8)+_0xb8ab46[_0x3dba4d(0x1f0)]+_0x3dba4d(0x1be),'data':{'appCode':_0x1791aa[_0x3dba4d(0x1d8)],'pulledPages':_0x414f87,'skippedPages':_0xb8ab46,'totalPulled':_0x414f87['length'],'totalSkipped':_0xb8ab46[_0x3dba4d(0x1f0)]}};}};function a127_0x38ec(_0x20412f,_0x207ce6){_0x20412f=_0x20412f-0x1b5;const _0x27f6a5=a127_0x27f6();let _0x38ec62=_0x27f6a5[_0x20412f];return _0x38ec62;}async function buildPullPlan(_0x3adbbe){const _0x21aa77=a127_0x35f333,_0x2eda3f=loadPageProjectConfig(_0x3adbbe['appCode']),_0x19349d=await readPageLockFile(_0x2eda3f[_0x21aa77(0x1db)]),{appLock:_0x154c8e}=ensurePageLockScope(_0x19349d??createEmptyPageLock(),_0x3adbbe[_0x21aa77(0x1d8)]),_0x5f15e0=getPageIdFlag(_0x3adbbe);if(_0x5f15e0!==undefined){const _0x391dfe=await loadPageDetailForPage(_0x3adbbe,_0x5f15e0);return{'mode':_0x21aa77(0x1e4),'items':[await inspectPullTarget(_0x2eda3f,_0x154c8e['pages'][String(_0x391dfe[_0x21aa77(0x1de)])],_0x391dfe)]};}const _0x513ad6=await loadDatasetDetailForPage(_0x3adbbe),_0x85734e=_0x513ad6[_0x21aa77(0x1d7)][_0x21aa77(0x1c2)](_0x59e030=>!_0x59e030[_0x21aa77(0x1f3)]);if(_0x85734e[_0x21aa77(0x1f0)]===0x0)throw CliErrors[_0x21aa77(0x1da)](_0x21aa77(0x1ed)+_0x513ad6[_0x21aa77(0x1c0)]+_0x21aa77(0x1c5));const _0x504dc4=await Promise[_0x21aa77(0x1c4)](_0x85734e['map'](_0x159b56=>loadPageDetailForPage(_0x3adbbe,_0x159b56['id']))),_0x383301=selectVersionTagGroup(_0x504dc4,_0x1664d1=>_0x1664d1[_0x21aa77(0x1d4)],_0x3adbbe['str'](_0x21aa77(0x1bc)));return{'mode':_0x21aa77(0x1ca),'datasetCode':_0x513ad6[_0x21aa77(0x1c0)],'items':await Promise[_0x21aa77(0x1c4)](_0x383301[_0x21aa77(0x1cf)][_0x21aa77(0x1cc)](_0x1ed0d0=>inspectPullTarget(_0x2eda3f,_0x154c8e[_0x21aa77(0x1d0)][String(_0x1ed0d0[_0x21aa77(0x1de)])],_0x1ed0d0)))};}async function inspectPullTarget(_0x150f8d,_0x596a40,_0x157a1a){const _0x440597=a127_0x35f333,_0x25c87f=resolvePageFilePath(_0x150f8d,_0x157a1a[_0x440597(0x1de)],_0x157a1a[_0x440597(0x1e8)]),_0x5e965f=await fileExists(_0x25c87f);if(!_0x5e965f){const _0x36dbeb=serializePageSchemaForFile(_0x157a1a[_0x440597(0x1c0)]);return{'detail':_0x157a1a,'localPath':_0x25c87f,'localHash':computePageContentHash(_0x36dbeb),'status':'would_pull'};}const _0x3158f5=await computePageFileHash(_0x25c87f);if(!_0x596a40||_0x3158f5!==_0x596a40['hash'])return{'detail':_0x157a1a,'localPath':_0x25c87f,'localHash':_0x3158f5,'status':_0x440597(0x1b7),'reason':'local\x20unsynced\x20changes'};return{'detail':_0x157a1a,'localPath':_0x25c87f,'localHash':_0x3158f5,'status':_0x440597(0x1e1)};}function buildLockEntry(_0x549385,_0x3b31e0){const _0x74b249=a127_0x35f333;return{'hash':computePageContentHash(_0x3b31e0),'pageId':_0x549385[_0x74b249(0x1de)],'pageVersion':_0x549385['pageVersion'],'type':_0x549385[_0x74b249(0x1e8)],'title':_0x549385[_0x74b249(0x1bd)],'datasetIds':_0x549385[_0x74b249(0x1bb)],'versionTag':_0x549385[_0x74b249(0x1d4)]};}function toPreviewItem(_0x4d8814){const _0x3e96cc=a127_0x35f333;return{'pageId':_0x4d8814[_0x3e96cc(0x1c7)][_0x3e96cc(0x1de)],'type':_0x4d8814[_0x3e96cc(0x1c7)][_0x3e96cc(0x1e8)],'title':_0x4d8814[_0x3e96cc(0x1c7)][_0x3e96cc(0x1bd)],'localPath':_0x4d8814[_0x3e96cc(0x1bf)],'status':_0x4d8814['status'],..._0x4d8814[_0x3e96cc(0x1ea)]?{'reason':_0x4d8814[_0x3e96cc(0x1ea)]}:{}};}
|