@lovrabet/rabetbase-cli 2.3.15-beta.2 → 2.3.15
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/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.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/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.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/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/ocr/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/restore.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
|
-
const
|
|
1
|
+
const a121_0x2a32e3=a121_0x5e49;(function(_0x2e7801,_0x2cd84e){const _0x231ac5=a121_0x5e49,_0x18eaa9=_0x2e7801();while(!![]){try{const _0x497b2e=parseInt(_0x231ac5(0xc1))/0x1*(parseInt(_0x231ac5(0xc8))/0x2)+-parseInt(_0x231ac5(0x9d))/0x3*(-parseInt(_0x231ac5(0xb9))/0x4)+-parseInt(_0x231ac5(0xa8))/0x5+parseInt(_0x231ac5(0xaf))/0x6+-parseInt(_0x231ac5(0xbc))/0x7*(-parseInt(_0x231ac5(0x98))/0x8)+parseInt(_0x231ac5(0xb1))/0x9*(-parseInt(_0x231ac5(0xb4))/0xa)+-parseInt(_0x231ac5(0xb5))/0xb*(-parseInt(_0x231ac5(0xbb))/0xc);if(_0x497b2e===_0x2cd84e)break;else _0x18eaa9['push'](_0x18eaa9['shift']());}catch(_0xdb0dba){_0x18eaa9['push'](_0x18eaa9['shift']());}}}(a121_0x3523,0x8e946));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';function a121_0x3523(){const _0x30385e=['12WKmvka','3297yjILeM','join','get','string','procode','682717zJOzhe',':\x20expected\x20a\x20non-empty\x20string.','dryRun','push','path','--params.','CSS\x20URL\x20is\x20unreachable:\x20','2SAcbMV','No\x20local\x20pages\x20matched\x20paths:\x20','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','15336TCWvEJ','--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.','length','setLogPath','Start\x20non-interactive\x20menu\x20sync','3NwyYTi','filter','isArray','JS\x20URL\x20is\x20unreachable:\x20','Invalid\x20--params:\x20','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','keys','info','field','cssUrl','has','5047995BSXzXM','import','jsUrl','object','pages','parse','\x0a\x20\x20Available\x20local\x20paths:\x20','582096spBTjF','menu-sync','334944PFMenq','trim','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','250zRdZym','2737702AzrcAg','map','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','Invalid\x20--params.','2369932cclBVH','message'];a121_0x3523=function(){return _0x30385e;};return a121_0x3523();}import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';const MENU_SYNC_PARAM_KEYS=new Set(['jsUrl',a121_0x2a32e3(0xa6)]);function validateParams(_0x2f771e){const _0x52f6da=a121_0x2a32e3,_0x5c08d0=[];return _0x2f771e[_0x52f6da(0xaa)]&&!isValidJsHttpsUrl(_0x2f771e['jsUrl'])&&_0x5c08d0[_0x52f6da(0xc4)]({'field':'jsUrl','message':_0x52f6da(0xb3)}),_0x2f771e['cssUrl']&&!isValidCssHttpsUrl(_0x2f771e[_0x52f6da(0xa6)])&&_0x5c08d0[_0x52f6da(0xc4)]({'field':_0x52f6da(0xa6),'message':_0x52f6da(0xa2)}),_0x5c08d0;}export async function runMenuSyncCore(_0x2d9b85,_0x43867e,_0x578c59=[],_0x45f923,_0x5076fb={}){const _0x572ec5=a121_0x2a32e3,_0x3152d9=parseMenuSyncParams(_0x45f923),_0x38bf60=[...new Set(_0x578c59[_0x572ec5(0xb6)](_0x566f3a=>_0x566f3a[_0x572ec5(0xb2)]())[_0x572ec5(0x9e)](Boolean))],_0x5e7b99=_0x3152d9[_0x572ec5(0xaa)],_0x494a61=_0x3152d9[_0x572ec5(0xa6)],_0x1627e6=[];if(_0x5e7b99)_0x1627e6['push'](_0x5e7b99);if(_0x494a61)_0x1627e6[_0x572ec5(0xc4)](_0x494a61);const _0x281572=validateParams(_0x3152d9);if(_0x281572[_0x572ec5(0x9a)]>0x0){const _0xa8a900=_0x281572[_0x572ec5(0xb6)](_0x5cfebd=>_0x572ec5(0xc6)+_0x5cfebd[_0x572ec5(0xa5)]+':\x20'+_0x5cfebd[_0x572ec5(0xba)])[_0x572ec5(0xbd)](';\x20');throw new Error(_0x572ec5(0xa1)+_0xa8a900);}logger[_0x572ec5(0x9b)](process['cwd']()),logger[_0x572ec5(0xa4)](_0x572ec5(0xb0),_0x572ec5(0x9c),{'appCode':_0x2d9b85,'selectedCount':_0x38bf60[_0x572ec5(0x9a)],'jsUrl':_0x5e7b99,'cssUrl':_0x494a61});if(_0x5e7b99){const _0x217691=await isUrlReachable(_0x5e7b99);if(!_0x217691)throw new Error(_0x572ec5(0xa0)+_0x5e7b99);}if(_0x494a61){const _0x1d4755=await isUrlReachable(_0x494a61);if(!_0x1d4755)throw new Error(_0x572ec5(0xc7)+_0x494a61);}const _0x2270a5=getLocalPages();if(_0x2270a5[_0x572ec5(0x9a)]===0x0){if(_0x38bf60['length']>0x0)throw new Error(_0x572ec5(0x96)+_0x38bf60[_0x572ec5(0xbd)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x5076fb[_0x572ec5(0xc3)]===!![],'targetPages':[],'plannedMenus':[]};}const _0x49a091=await getOnlineMenuList(_0x2d9b85,_0x43867e),_0x3b75a0=new Set(_0x49a091[_0x572ec5(0xb6)](_0x4db277=>_0x4db277[_0x572ec5(0xc5)]));let _0x3112d4;if(_0x38bf60[_0x572ec5(0x9a)]>0x0){const _0x599dae=new Map(_0x2270a5[_0x572ec5(0xb6)](_0x5741e1=>[_0x5741e1[_0x572ec5(0xc5)],_0x5741e1])),_0x42a55f=_0x38bf60['filter'](_0x7b7272=>!_0x599dae[_0x572ec5(0xa7)](_0x7b7272));if(_0x42a55f[_0x572ec5(0x9a)]>0x0){const _0x2ccaed=_0x2270a5[_0x572ec5(0xb6)](_0x172fb9=>_0x172fb9['path'])['join'](',\x20');throw new Error(_0x572ec5(0x96)+_0x42a55f['join'](',\x20')+_0x572ec5(0xae)+_0x2ccaed);}const _0x4710ce=_0x38bf60[_0x572ec5(0x9e)](_0x2e1aa9=>_0x3b75a0['has'](_0x2e1aa9));if(_0x4710ce[_0x572ec5(0x9a)]>0x0)throw new Error(_0x572ec5(0xb7)+_0x4710ce[_0x572ec5(0xbd)](',\x20'));_0x3112d4=_0x38bf60[_0x572ec5(0xb6)](_0x1550f2=>_0x599dae[_0x572ec5(0xbe)](_0x1550f2));}else _0x3112d4=_0x2270a5['filter'](_0xa04f52=>!_0x3b75a0['has'](_0xa04f52['path']));if(_0x3112d4['length']===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x5076fb[_0x572ec5(0xc3)]===!![],'targetPages':[],'plannedMenus':[]};const _0x5430d4=_0x3112d4['map'](_0x27b22a=>({'type':_0x572ec5(0xc0),'path':_0x27b22a[_0x572ec5(0xc5)],'label':_0x27b22a['label'],'loadScriptMode':_0x572ec5(0xa9),'resources':[..._0x1627e6]}));if(_0x5076fb[_0x572ec5(0xc3)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x3112d4,'plannedMenus':_0x5430d4};const _0x4a68ee=await createMenus(_0x2d9b85,_0x43867e,_0x3112d4,_0x1627e6[_0x572ec5(0x9a)]>0x0?_0x1627e6:undefined);return logger[_0x572ec5(0xa4)](_0x572ec5(0xb0),'Menu\x20sync\x20completed',{'count':_0x3112d4[_0x572ec5(0x9a)],'resources':_0x1627e6}),{'created':_0x4a68ee['length'],'skipped':![],'dryRun':![],'targetPages':_0x3112d4,'plannedMenus':_0x5430d4,'menus':_0x4a68ee};}function a121_0x5e49(_0x1460bb,_0x4bf854){_0x1460bb=_0x1460bb-0x96;const _0x3523f7=a121_0x3523();let _0x5e49ee=_0x3523f7[_0x1460bb];return _0x5e49ee;}export function parseMenuSyncParams(_0x353708){const _0x3a2587=a121_0x2a32e3;if(!_0x353708||typeof _0x353708!==_0x3a2587(0xbf))return{};let _0x251058;try{_0x251058=JSON[_0x3a2587(0xad)](_0x353708);}catch{throw new Error('Invalid\x20--params\x20JSON.');}if(typeof _0x251058!==_0x3a2587(0xab)||_0x251058===null||Array[_0x3a2587(0x9f)](_0x251058))throw new Error(_0x3a2587(0x97));const _0x33de91=_0x251058;if(Object['hasOwn'](_0x33de91,_0x3a2587(0xac)))throw new Error(_0x3a2587(0x99));const _0x108a1b=Object[_0x3a2587(0xa3)](_0x33de91)[_0x3a2587(0x9e)](_0x5baa1f=>!MENU_SYNC_PARAM_KEYS[_0x3a2587(0xa7)](_0x5baa1f));if(_0x108a1b[_0x3a2587(0x9a)]>0x0)throw new Error('Invalid\x20--params\x20fields:\x20'+_0x108a1b[_0x3a2587(0xbd)](',\x20')+'.');for(const _0x388801 of MENU_SYNC_PARAM_KEYS){const _0x182b5a=_0x33de91[_0x388801];if(_0x182b5a!==undefined&&(typeof _0x182b5a!=='string'||_0x182b5a[_0x3a2587(0xb2)]()===''))throw new Error(_0x3a2587(0xb8)+_0x388801+_0x3a2587(0xc2));}return{'jsUrl':typeof _0x33de91['jsUrl']==='string'?_0x33de91['jsUrl'][_0x3a2587(0xb2)]():undefined,'cssUrl':typeof _0x33de91[_0x3a2587(0xa6)]===_0x3a2587(0xbf)?_0x33de91[_0x3a2587(0xa6)]['trim']():undefined};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x1ca2d9,_0x5db3bc){const _0x41fb4f=a123_0x3e40,_0x19a965=_0x1ca2d9();while(!![]){try{const _0x3466ba=parseInt(_0x41fb4f(0x154))/0x1+-parseInt(_0x41fb4f(0x153))/0x2*(-parseInt(_0x41fb4f(0x166))/0x3)+parseInt(_0x41fb4f(0x167))/0x4+parseInt(_0x41fb4f(0x18d))/0x5+parseInt(_0x41fb4f(0x17b))/0x6*(parseInt(_0x41fb4f(0x17a))/0x7)+parseInt(_0x41fb4f(0x16d))/0x8+-parseInt(_0x41fb4f(0x174))/0x9;if(_0x3466ba===_0x5db3bc)break;else _0x19a965['push'](_0x19a965['shift']());}catch(_0x5ac430){_0x19a965['push'](_0x19a965['shift']());}}}(a123_0x443c,0x1ca09));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(_0x53892a){const _0x4da142=a123_0x3e40,_0x35367e=[];return _0x53892a[_0x4da142(0x197)]&&!isValidJsHttpsUrl(_0x53892a[_0x4da142(0x197)])&&_0x35367e[_0x4da142(0x15b)]({'field':_0x4da142(0x197),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x53892a[_0x4da142(0x176)]&&!isValidCssHttpsUrl(_0x53892a['cssUrl'])&&_0x35367e[_0x4da142(0x15b)]({'field':_0x4da142(0x176),'message':_0x4da142(0x180)}),_0x35367e;}export async function runMenuUpdateCore(_0x316d48,_0x1bed62,_0x56b8cc,_0x2eca3b={}){const _0x243d2f=a123_0x3e40,_0x5c2d0f=parseUpdateParamsFlag(_0x56b8cc),_0xd386b1=normalizeMode(_0x2eca3b[_0x243d2f(0x196)]);validateSelection(_0x2eca3b[_0x243d2f(0x192)]);const _0xaf1f24=[];if(_0x5c2d0f[_0x243d2f(0x197)])_0xaf1f24['push'](_0x5c2d0f[_0x243d2f(0x197)]);if(_0x5c2d0f['cssUrl'])_0xaf1f24[_0x243d2f(0x15b)](_0x5c2d0f[_0x243d2f(0x176)]);const _0x340edb=validateParams(_0x5c2d0f);if(_0x340edb[_0x243d2f(0x16b)]>0x0){const _0xc0f655=_0x340edb['map'](_0x445a45=>_0x243d2f(0x165)+_0x445a45[_0x243d2f(0x18c)]+':\x20'+_0x445a45['message'])[_0x243d2f(0x162)](';\x20');throw new Error(_0x243d2f(0x172)+_0xc0f655);}if(_0xaf1f24[_0x243d2f(0x16b)]===0x0)throw new Error(_0x243d2f(0x16a)+'Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.');logger[_0x243d2f(0x188)](process[_0x243d2f(0x195)]()),logger['info'](_0x243d2f(0x158),_0x243d2f(0x17c),{'appCode':_0x316d48,'jsUrl':_0x5c2d0f[_0x243d2f(0x197)],'cssUrl':_0x5c2d0f[_0x243d2f(0x176)],'mode':_0xd386b1,'dryRun':_0x2eca3b[_0x243d2f(0x183)]===!![]});if(_0x5c2d0f[_0x243d2f(0x197)]){const _0x3b8599=await isUrlReachable(_0x5c2d0f['jsUrl']);if(!_0x3b8599)throw new Error(_0x243d2f(0x15f)+_0x5c2d0f['jsUrl']);}if(_0x5c2d0f[_0x243d2f(0x176)]){const _0x4f0fd8=await isUrlReachable(_0x5c2d0f['cssUrl']);if(!_0x4f0fd8)throw new Error(_0x243d2f(0x160)+_0x5c2d0f[_0x243d2f(0x176)]);}const _0x435199=await getOnlineMenuList(_0x316d48,_0x1bed62),_0x346a6c=_0x435199[_0x243d2f(0x17e)](_0x57ce4f=>_0x57ce4f[_0x243d2f(0x16c)][_0x243d2f(0x16b)]>0x0),_0x168279=selectMenusForUpdate(_0x346a6c,_0x2eca3b[_0x243d2f(0x192)]);if(_0x168279['length']===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x2eca3b[_0x243d2f(0x183)]===!![]};const _0x220af5=_0x168279['map'](_0x41bd3d=>buildMenuUpdateDiff(_0x41bd3d,_0x5c2d0f,_0xd386b1,_0x2eca3b[_0x243d2f(0x18a)]===!![],_0x2eca3b['loadScriptMode']));if(_0x2eca3b['dryRun'])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x220af5};const _0x4bb8d1=await Promise[_0x243d2f(0x15c)](_0x168279[_0x243d2f(0x175)]((_0x56a97d,_0x2fdab7)=>updateMenuCdnUrl(_0x316d48,_0x1bed62,{'id':_0x56a97d['id'],'label':_0x56a97d[_0x243d2f(0x185)],'path':_0x56a97d[_0x243d2f(0x164)],'resources':_0x220af5[_0x2fdab7][_0x243d2f(0x157)][_0x243d2f(0x16c)],'extend':_0x56a97d[_0x243d2f(0x184)]??null,'loadScriptMode':_0x2eca3b[_0x243d2f(0x16f)]}))),_0x50f5e1=_0x4bb8d1[_0x243d2f(0x17e)](_0x3b69b9=>_0x3b69b9['status']===_0x243d2f(0x181))[_0x243d2f(0x175)](_0x2fd305=>_0x2fd305[_0x243d2f(0x182)]),_0x4cc3b0=_0x4bb8d1[_0x243d2f(0x17e)](_0x4acc98=>_0x4acc98[_0x243d2f(0x15e)]===_0x243d2f(0x159))['length'];return logger[_0x243d2f(0x15d)](_0x243d2f(0x158),'Menu\x20asset\x20update\x20completed',{'count':_0x168279[_0x243d2f(0x16b)],'resources':_0xaf1f24}),{'updated':_0x50f5e1[_0x243d2f(0x16b)],'failed':_0x4cc3b0,'skipped':![],'menus':_0x50f5e1};}function validateSelection(_0x1299b6){const _0x465677=a123_0x3e40;if(!_0x1299b6)throw new Error(_0x465677(0x155));if(_0x1299b6[_0x465677(0x18b)]&&(_0x1299b6[_0x465677(0x189)][_0x465677(0x16b)]>0x0||_0x1299b6['paths'][_0x465677(0x16b)]>0x0))throw new Error(_0x465677(0x163));if(!_0x1299b6[_0x465677(0x18b)]&&_0x1299b6[_0x465677(0x189)][_0x465677(0x16b)]===0x0&&_0x1299b6[_0x465677(0x161)]['length']===0x0)throw new Error('menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.');}export function selectMenusForUpdate(_0xef6324,_0x37f38d){const _0x34a181=a123_0x3e40;validateSelection(_0x37f38d);if(_0x37f38d[_0x34a181(0x18b)])return _0xef6324;const _0x550a3c=new Set(_0xef6324[_0x34a181(0x175)](_0x59db76=>_0x59db76['id'])),_0x47f514=new Set(_0xef6324[_0x34a181(0x175)](_0x184e61=>_0x184e61[_0x34a181(0x164)])),_0x276d5a=_0x37f38d[_0x34a181(0x189)][_0x34a181(0x17e)](_0x18791e=>!_0x550a3c[_0x34a181(0x173)](_0x18791e)),_0x345490=_0x37f38d['paths'][_0x34a181(0x17e)](_0x9c6acb=>!_0x47f514[_0x34a181(0x173)](_0x9c6acb));if(_0x276d5a[_0x34a181(0x16b)]>0x0||_0x345490[_0x34a181(0x16b)]>0x0){const _0x35e649=[..._0x276d5a[_0x34a181(0x175)](_0x27b680=>String(_0x27b680)),..._0x345490][_0x34a181(0x162)](',\x20');throw new Error(_0x34a181(0x169)+_0x35e649);}const _0x385d5c=new Set(_0x37f38d[_0x34a181(0x189)]),_0x46e08c=new Set(_0x37f38d[_0x34a181(0x161)]);return _0xef6324[_0x34a181(0x17e)](_0x2e9078=>_0x385d5c[_0x34a181(0x173)](_0x2e9078['id'])||_0x46e08c[_0x34a181(0x173)](_0x2e9078[_0x34a181(0x164)]));}function normalizeMode(_0x2b03c4){const _0x22fbdb=a123_0x3e40;if(!_0x2b03c4)return _0x22fbdb(0x179);if(_0x2b03c4==='replace'||_0x2b03c4==='patch')return _0x2b03c4;throw new Error(_0x22fbdb(0x17d)+_0x2b03c4+'.\x20Allowed\x20values:\x20replace,\x20patch');}function buildMenuUpdateDiff(_0x14e509,_0xa0fe50,_0x5e1802,_0x5a31ca,_0x4fb4d6){const _0x375382=a123_0x3e40,_0x376423=[..._0x14e509[_0x375382(0x16c)]];_0x5e1802===_0x375382(0x179)&&assertUnambiguousPatchResources(_0x14e509,_0x376423,_0xa0fe50);const _0x1d1d99=_0x5e1802==='patch'?patchResources(_0x376423,_0xa0fe50):replaceResources(_0xa0fe50),_0x28505d=[],_0x35e188=_0x376423[_0x375382(0x170)](isJsResource),_0x1ae9d6=_0x1d1d99['some'](isJsResource);if(_0x35e188&&!_0x1ae9d6){const _0x5bf1d7=_0x375382(0x193)+_0x14e509[_0x375382(0x185)]+_0x375382(0x16e)+_0x14e509[_0x375382(0x164)]+_0x375382(0x152)+_0x375382(0x18e);if(!_0x5a31ca)throw new Error(_0x5bf1d7);_0x28505d['push'](_0x5bf1d7);}const _0x1c3ed9=_0x376423[_0x375382(0x170)](isCssResource),_0x168555=_0x1d1d99['some'](isCssResource);_0x1c3ed9&&!_0x168555&&_0x28505d[_0x375382(0x15b)](_0x375382(0x186)+_0x14e509[_0x375382(0x185)]+_0x375382(0x16e)+_0x14e509[_0x375382(0x164)]+').');const _0x459694=typeof _0x14e509['extend']?.[_0x375382(0x16f)]===_0x375382(0x15a)?_0x14e509[_0x375382(0x184)][_0x375382(0x16f)]:null,_0x18f6a3=_0x4fb4d6?{'loadScriptMode':_0x459694}:{},_0x33250b=_0x4fb4d6?{'loadScriptMode':_0x4fb4d6}:{};return{'id':_0x14e509['id'],'label':_0x14e509[_0x375382(0x185)],'path':_0x14e509[_0x375382(0x164)],'mode':_0x5e1802,'before':{'resources':_0x376423,..._0x18f6a3},'after':{'resources':_0x1d1d99,..._0x33250b},'warnings':_0x28505d};}function replaceResources(_0x45791d){const _0x4f66ea=a123_0x3e40;return[_0x45791d[_0x4f66ea(0x197)],_0x45791d[_0x4f66ea(0x176)]][_0x4f66ea(0x17e)](_0xcaa33f=>!!_0xcaa33f);}function assertUnambiguousPatchResources(_0x4c7daa,_0x4a73e8,_0x1fa837){const _0x3d4740=a123_0x3e40,_0x24b311=_0x4a73e8[_0x3d4740(0x17e)](isJsResource)[_0x3d4740(0x16b)];if(_0x1fa837['jsUrl']&&_0x24b311>0x1)throw new Error(_0x3d4740(0x156)+_0x24b311+_0x3d4740(0x187)+_0x4c7daa[_0x3d4740(0x185)]+'\x22\x20('+_0x4c7daa['path']+')\x20'+'with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.');const _0xbff3e4=_0x4a73e8['filter'](isCssResource)[_0x3d4740(0x16b)];if(_0x1fa837[_0x3d4740(0x176)]&&_0xbff3e4>0x1)throw new Error(_0x3d4740(0x156)+_0xbff3e4+_0x3d4740(0x171)+_0x4c7daa['label']+_0x3d4740(0x16e)+_0x4c7daa[_0x3d4740(0x164)]+')\x20'+_0x3d4740(0x18f));}function patchResources(_0x5b3309,_0x44b886){const _0x44e8e2=a123_0x3e40;let _0x55fd84=![],_0x1c6d03=![];const _0x6015fd=[];for(const _0x540ba7 of _0x5b3309){if(isJsResource(_0x540ba7)){if(_0x44b886[_0x44e8e2(0x197)]&&!_0x55fd84)_0x6015fd[_0x44e8e2(0x15b)](_0x44b886['jsUrl']),_0x55fd84=!![];else!_0x44b886[_0x44e8e2(0x197)]&&_0x6015fd[_0x44e8e2(0x15b)](_0x540ba7);continue;}if(isCssResource(_0x540ba7)){if(_0x44b886[_0x44e8e2(0x176)]&&!_0x1c6d03)_0x6015fd[_0x44e8e2(0x15b)](_0x44b886['cssUrl']),_0x1c6d03=!![];else!_0x44b886['cssUrl']&&_0x6015fd[_0x44e8e2(0x15b)](_0x540ba7);continue;}_0x6015fd[_0x44e8e2(0x15b)](_0x540ba7);}return _0x44b886[_0x44e8e2(0x197)]&&!_0x55fd84&&_0x6015fd[_0x44e8e2(0x190)](_0x44b886[_0x44e8e2(0x197)]),_0x44b886[_0x44e8e2(0x176)]&&!_0x1c6d03&&_0x6015fd[_0x44e8e2(0x15b)](_0x44b886[_0x44e8e2(0x176)]),_0x6015fd;}function isJsResource(_0x4fbe2a){const _0x4ee5d1=a123_0x3e40;return stripQuery(_0x4fbe2a)[_0x4ee5d1(0x168)]()[_0x4ee5d1(0x191)](_0x4ee5d1(0x17f));}function a123_0x443c(){const _0x40f8d7=['menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','\x20existing\x20JS\x20resources\x20for\x20\x22','setLogPath','menuIds','force','all','field','262695iDsiiv','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','unshift','endsWith','selection','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','.css','cwd','mode','jsUrl',').\x20','457484fXklsS','159943ZHGeda','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','menu\x20asset-update\x20cannot\x20patch\x20','after','menu-asset-update','rejected','string','push','allSettled','info','status','JS\x20URL\x20is\x20unreachable:\x20','CSS\x20URL\x20is\x20unreachable:\x20','paths','join','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','path','--params.','3rbVMda','87292Nwtwgz','toLowerCase','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','length','resources','153216ZIvmce','\x22\x20(','loadScriptMode','some','\x20existing\x20CSS\x20resources\x20for\x20\x22','Invalid\x20--params:\x20','has','5344686Yhiuvo','map','cssUrl','parse','object','patch','100149IeMfUT','96aTuiVr','Start\x20non-interactive\x20menu\x20asset\x20update','Invalid\x20--mode:\x20','filter','.js','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','fulfilled','value','dryRun','extend','label'];a123_0x443c=function(){return _0x40f8d7;};return a123_0x443c();}function isCssResource(_0x2ad183){const _0x5931c1=a123_0x3e40;return stripQuery(_0x2ad183)[_0x5931c1(0x168)]()[_0x5931c1(0x191)](_0x5931c1(0x194));}function a123_0x3e40(_0x599a15,_0x9d4778){_0x599a15=_0x599a15-0x152;const _0x443ca7=a123_0x443c();let _0x3e4054=_0x443ca7[_0x599a15];return _0x3e4054;}function stripQuery(_0x32d751){return _0x32d751['split']('?')[0x0]??_0x32d751;}function parseUpdateParamsFlag(_0x1941ef){const _0x3f3a58=a123_0x3e40;if(!_0x1941ef||typeof _0x1941ef!==_0x3f3a58(0x15a))return{};try{const _0x4a1744=JSON[_0x3f3a58(0x177)](_0x1941ef);if(typeof _0x4a1744!==_0x3f3a58(0x178)||_0x4a1744===null||Array['isArray'](_0x4a1744))return{};return{'jsUrl':typeof _0x4a1744[_0x3f3a58(0x197)]===_0x3f3a58(0x15a)?_0x4a1744[_0x3f3a58(0x197)]['trim']():undefined,'cssUrl':typeof _0x4a1744[_0x3f3a58(0x176)]===_0x3f3a58(0x15a)?_0x4a1744['cssUrl']['trim']():undefined};}catch{return{};}}
|
|
1
|
+
(function(_0x4825e0,_0x375ba7){const _0x5944e5=a123_0x4403,_0x10b62e=_0x4825e0();while(!![]){try{const _0x573912=-parseInt(_0x5944e5(0xd7))/0x1+-parseInt(_0x5944e5(0xc6))/0x2*(parseInt(_0x5944e5(0xf1))/0x3)+parseInt(_0x5944e5(0xb7))/0x4*(parseInt(_0x5944e5(0xbb))/0x5)+-parseInt(_0x5944e5(0xf6))/0x6*(-parseInt(_0x5944e5(0xd4))/0x7)+-parseInt(_0x5944e5(0xdb))/0x8+-parseInt(_0x5944e5(0xe5))/0x9*(parseInt(_0x5944e5(0xe4))/0xa)+parseInt(_0x5944e5(0xe9))/0xb;if(_0x573912===_0x375ba7)break;else _0x10b62e['push'](_0x10b62e['shift']());}catch(_0x15a3a9){_0x10b62e['push'](_0x10b62e['shift']());}}}(a123_0x5d9b,0x62959));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';function a123_0x4403(_0x186f06,_0x50a06c){_0x186f06=_0x186f06-0xb5;const _0x5d9b1d=a123_0x5d9b();let _0x4403de=_0x5d9b1d[_0x186f06];return _0x4403de;}import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x331e2d){const _0x44c90f=a123_0x4403,_0x3096e1=[];return _0x331e2d['jsUrl']&&!isValidJsHttpsUrl(_0x331e2d['jsUrl'])&&_0x3096e1[_0x44c90f(0xf2)]({'field':_0x44c90f(0xcf),'message':_0x44c90f(0xcc)}),_0x331e2d[_0x44c90f(0xd3)]&&!isValidCssHttpsUrl(_0x331e2d[_0x44c90f(0xd3)])&&_0x3096e1[_0x44c90f(0xf2)]({'field':_0x44c90f(0xd3),'message':_0x44c90f(0xbc)}),_0x3096e1;}export async function runMenuUpdateCore(_0x1769d4,_0x29ded8,_0x18ab78,_0x446caf={}){const _0x3af9f3=a123_0x4403,_0x383313=parseUpdateParamsFlag(_0x18ab78),_0x2f8555=normalizeMode(_0x446caf['mode']);validateSelection(_0x446caf['selection']);const _0x13751a=[];if(_0x383313['jsUrl'])_0x13751a[_0x3af9f3(0xf2)](_0x383313[_0x3af9f3(0xcf)]);if(_0x383313[_0x3af9f3(0xd3)])_0x13751a[_0x3af9f3(0xf2)](_0x383313[_0x3af9f3(0xd3)]);const _0x2c4def=validateParams(_0x383313);if(_0x2c4def[_0x3af9f3(0xdf)]>0x0){const _0x4fe4ec=_0x2c4def[_0x3af9f3(0xc9)](_0x44be1f=>_0x3af9f3(0xd9)+_0x44be1f['field']+':\x20'+_0x44be1f[_0x3af9f3(0xf9)])[_0x3af9f3(0xf5)](';\x20');throw new Error('Invalid\x20--params:\x20'+_0x4fe4ec);}if(_0x13751a[_0x3af9f3(0xdf)]===0x0)throw new Error('Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20'+_0x3af9f3(0xb5));logger[_0x3af9f3(0xd0)](process[_0x3af9f3(0xc4)]()),logger[_0x3af9f3(0xdc)](_0x3af9f3(0xbf),_0x3af9f3(0xd8),{'appCode':_0x1769d4,'jsUrl':_0x383313[_0x3af9f3(0xcf)],'cssUrl':_0x383313[_0x3af9f3(0xd3)],'mode':_0x2f8555,'dryRun':_0x446caf[_0x3af9f3(0xde)]===!![]});if(_0x383313['jsUrl']){const _0x2bde35=await isUrlReachable(_0x383313[_0x3af9f3(0xcf)]);if(!_0x2bde35)throw new Error(_0x3af9f3(0xcb)+_0x383313['jsUrl']);}if(_0x383313[_0x3af9f3(0xd3)]){const _0x23b8d8=await isUrlReachable(_0x383313[_0x3af9f3(0xd3)]);if(!_0x23b8d8)throw new Error(_0x3af9f3(0xc2)+_0x383313['cssUrl']);}const _0x4e4b18=await getOnlineMenuList(_0x1769d4,_0x29ded8),_0x2f8fe5=_0x4e4b18['filter'](_0x407339=>_0x407339[_0x3af9f3(0xd6)][_0x3af9f3(0xdf)]>0x0),_0x5a9e6c=selectMenusForUpdate(_0x2f8fe5,_0x446caf[_0x3af9f3(0xe1)]);if(_0x5a9e6c[_0x3af9f3(0xdf)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x446caf[_0x3af9f3(0xde)]===!![]};const _0x1da96b=_0x5a9e6c[_0x3af9f3(0xc9)](_0x2bf24a=>buildMenuUpdateDiff(_0x2bf24a,_0x383313,_0x2f8555,_0x446caf['force']===!![],_0x446caf[_0x3af9f3(0xbd)]));if(_0x446caf[_0x3af9f3(0xde)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x1da96b};const _0x2f2754=await Promise['allSettled'](_0x5a9e6c[_0x3af9f3(0xc9)]((_0xf85291,_0x4857d7)=>updateMenuCdnUrl(_0x1769d4,_0x29ded8,{'id':_0xf85291['id'],'label':_0xf85291[_0x3af9f3(0xc3)],'path':_0xf85291[_0x3af9f3(0xe0)],'resources':_0x1da96b[_0x4857d7][_0x3af9f3(0xe3)][_0x3af9f3(0xd6)],'extend':_0xf85291[_0x3af9f3(0xd1)]??null,'loadScriptMode':_0x446caf['loadScriptMode']}))),_0x5e2cab=_0x2f2754[_0x3af9f3(0xc5)](_0x55b3d7=>_0x55b3d7['status']==='fulfilled')[_0x3af9f3(0xc9)](_0x31c2da=>_0x31c2da[_0x3af9f3(0xec)]),_0x4b6203=_0x2f2754[_0x3af9f3(0xc5)](_0x34fdf2=>_0x34fdf2['status']===_0x3af9f3(0xea))[_0x3af9f3(0xdf)];return logger['info'](_0x3af9f3(0xbf),_0x3af9f3(0xb6),{'count':_0x5a9e6c[_0x3af9f3(0xdf)],'resources':_0x13751a}),{'updated':_0x5e2cab[_0x3af9f3(0xdf)],'failed':_0x4b6203,'skipped':![],'menus':_0x5e2cab};}function a123_0x5d9b(){const _0x9de66c=['446056qQdVsz','.\x20Allowed\x20values:\x20replace,\x20patch','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','endsWith','10VnwoTF','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','loadScriptMode','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','menu-asset-update','.css','all','CSS\x20URL\x20is\x20unreachable:\x20','label','cwd','filter','6478DZeRHV','\x22\x20(','menu\x20asset-update\x20cannot\x20patch\x20','map','\x20existing\x20CSS\x20resources\x20for\x20\x22','JS\x20URL\x20is\x20unreachable:\x20','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','some','toLowerCase','jsUrl','setLogPath','extend','paths','cssUrl','3644648hNKQSj','.js','resources','461773swEzKL','Start\x20non-interactive\x20menu\x20asset\x20update','--params.','\x20existing\x20JS\x20resources\x20for\x20\x22','6230376OvPxMP','info','string','dryRun','length','path','selection','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','after','10zSjtJL','4955481JPMglT','has','object','patch','19063891ZLwZxq','rejected','unshift','value','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','split','parse','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','261gIUOry','push','Invalid\x20--mode:\x20','replace','join','6wDNpkT','trim','menuIds','message','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','Menu\x20asset\x20update\x20completed'];a123_0x5d9b=function(){return _0x9de66c;};return a123_0x5d9b();}function validateSelection(_0x2342e7){const _0x1254a2=a123_0x4403;if(!_0x2342e7)throw new Error('menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.');if(_0x2342e7[_0x1254a2(0xc1)]&&(_0x2342e7[_0x1254a2(0xf8)][_0x1254a2(0xdf)]>0x0||_0x2342e7[_0x1254a2(0xd2)][_0x1254a2(0xdf)]>0x0))throw new Error(_0x1254a2(0xb9));if(!_0x2342e7['all']&&_0x2342e7[_0x1254a2(0xf8)][_0x1254a2(0xdf)]===0x0&&_0x2342e7[_0x1254a2(0xd2)][_0x1254a2(0xdf)]===0x0)throw new Error(_0x1254a2(0xbe));}export function selectMenusForUpdate(_0x4fa404,_0x1cb399){const _0xb3de46=a123_0x4403;validateSelection(_0x1cb399);if(_0x1cb399[_0xb3de46(0xc1)])return _0x4fa404;const _0x50b9b7=new Set(_0x4fa404[_0xb3de46(0xc9)](_0x5f54a1=>_0x5f54a1['id'])),_0x16ed2e=new Set(_0x4fa404[_0xb3de46(0xc9)](_0x6e27ff=>_0x6e27ff['path'])),_0x389c95=_0x1cb399[_0xb3de46(0xf8)]['filter'](_0xc7f6c8=>!_0x50b9b7[_0xb3de46(0xe6)](_0xc7f6c8)),_0x417569=_0x1cb399[_0xb3de46(0xd2)][_0xb3de46(0xc5)](_0x24d073=>!_0x16ed2e[_0xb3de46(0xe6)](_0x24d073));if(_0x389c95[_0xb3de46(0xdf)]>0x0||_0x417569['length']>0x0){const _0x593640=[..._0x389c95['map'](_0x4e46b7=>String(_0x4e46b7)),..._0x417569][_0xb3de46(0xf5)](',\x20');throw new Error(_0xb3de46(0xed)+_0x593640);}const _0xb388da=new Set(_0x1cb399['menuIds']),_0xe1fe62=new Set(_0x1cb399['paths']);return _0x4fa404[_0xb3de46(0xc5)](_0x57fb64=>_0xb388da['has'](_0x57fb64['id'])||_0xe1fe62[_0xb3de46(0xe6)](_0x57fb64[_0xb3de46(0xe0)]));}function normalizeMode(_0x283b8c){const _0x2638e5=a123_0x4403;if(!_0x283b8c)return'patch';if(_0x283b8c===_0x2638e5(0xf4)||_0x283b8c==='patch')return _0x283b8c;throw new Error(_0x2638e5(0xf3)+_0x283b8c+_0x2638e5(0xb8));}function buildMenuUpdateDiff(_0x38b92e,_0xf27b18,_0x5bcec4,_0xf7b32c,_0xbfb63c){const _0x1615bf=a123_0x4403,_0x2b1241=[..._0x38b92e[_0x1615bf(0xd6)]];_0x5bcec4===_0x1615bf(0xe8)&&assertUnambiguousPatchResources(_0x38b92e,_0x2b1241,_0xf27b18);const _0x1bf888=_0x5bcec4==='patch'?patchResources(_0x2b1241,_0xf27b18):replaceResources(_0xf27b18),_0x40b532=[],_0x1857c6=_0x2b1241[_0x1615bf(0xcd)](isJsResource),_0x5c144d=_0x1bf888['some'](isJsResource);if(_0x1857c6&&!_0x5c144d){const _0x4984eb=_0x1615bf(0xe2)+_0x38b92e[_0x1615bf(0xc3)]+'\x22\x20('+_0x38b92e[_0x1615bf(0xe0)]+').\x20'+'Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.';if(!_0xf7b32c)throw new Error(_0x4984eb);_0x40b532[_0x1615bf(0xf2)](_0x4984eb);}const _0x347b37=_0x2b1241[_0x1615bf(0xcd)](isCssResource),_0x5bc3f4=_0x1bf888['some'](isCssResource);_0x347b37&&!_0x5bc3f4&&_0x40b532[_0x1615bf(0xf2)](_0x1615bf(0xf0)+_0x38b92e['label']+_0x1615bf(0xc7)+_0x38b92e[_0x1615bf(0xe0)]+').');const _0x13d1b3=typeof _0x38b92e[_0x1615bf(0xd1)]?.['loadScriptMode']===_0x1615bf(0xdd)?_0x38b92e[_0x1615bf(0xd1)]['loadScriptMode']:null,_0x5c7bbf=_0xbfb63c?{'loadScriptMode':_0x13d1b3}:{},_0x30ad19=_0xbfb63c?{'loadScriptMode':_0xbfb63c}:{};return{'id':_0x38b92e['id'],'label':_0x38b92e[_0x1615bf(0xc3)],'path':_0x38b92e[_0x1615bf(0xe0)],'mode':_0x5bcec4,'before':{'resources':_0x2b1241,..._0x5c7bbf},'after':{'resources':_0x1bf888,..._0x30ad19},'warnings':_0x40b532};}function replaceResources(_0x200d5b){const _0x23d2f5=a123_0x4403;return[_0x200d5b['jsUrl'],_0x200d5b[_0x23d2f5(0xd3)]][_0x23d2f5(0xc5)](_0x5078ae=>!!_0x5078ae);}function assertUnambiguousPatchResources(_0x158a5f,_0x1c1425,_0x4f86f7){const _0x2438de=a123_0x4403,_0x36aed5=_0x1c1425[_0x2438de(0xc5)](isJsResource)[_0x2438de(0xdf)];if(_0x4f86f7['jsUrl']&&_0x36aed5>0x1)throw new Error(_0x2438de(0xc8)+_0x36aed5+_0x2438de(0xda)+_0x158a5f[_0x2438de(0xc3)]+'\x22\x20('+_0x158a5f['path']+')\x20'+'with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.');const _0x2cf898=_0x1c1425[_0x2438de(0xc5)](isCssResource)['length'];if(_0x4f86f7[_0x2438de(0xd3)]&&_0x2cf898>0x1)throw new Error('menu\x20asset-update\x20cannot\x20patch\x20'+_0x2cf898+_0x2438de(0xca)+_0x158a5f['label']+'\x22\x20('+_0x158a5f['path']+')\x20'+'with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.');}function patchResources(_0x359fc4,_0x491776){const _0x585e5d=a123_0x4403;let _0x7f9dbc=![],_0x26c5b1=![];const _0x57bb23=[];for(const _0x1765b6 of _0x359fc4){if(isJsResource(_0x1765b6)){if(_0x491776[_0x585e5d(0xcf)]&&!_0x7f9dbc)_0x57bb23[_0x585e5d(0xf2)](_0x491776[_0x585e5d(0xcf)]),_0x7f9dbc=!![];else!_0x491776['jsUrl']&&_0x57bb23[_0x585e5d(0xf2)](_0x1765b6);continue;}if(isCssResource(_0x1765b6)){if(_0x491776[_0x585e5d(0xd3)]&&!_0x26c5b1)_0x57bb23[_0x585e5d(0xf2)](_0x491776[_0x585e5d(0xd3)]),_0x26c5b1=!![];else!_0x491776[_0x585e5d(0xd3)]&&_0x57bb23[_0x585e5d(0xf2)](_0x1765b6);continue;}_0x57bb23[_0x585e5d(0xf2)](_0x1765b6);}return _0x491776[_0x585e5d(0xcf)]&&!_0x7f9dbc&&_0x57bb23[_0x585e5d(0xeb)](_0x491776[_0x585e5d(0xcf)]),_0x491776['cssUrl']&&!_0x26c5b1&&_0x57bb23[_0x585e5d(0xf2)](_0x491776[_0x585e5d(0xd3)]),_0x57bb23;}function isJsResource(_0x226d6b){const _0x45620c=a123_0x4403;return stripQuery(_0x226d6b)[_0x45620c(0xce)]()['endsWith'](_0x45620c(0xd5));}function isCssResource(_0x5f540f){const _0x1ba2e0=a123_0x4403;return stripQuery(_0x5f540f)[_0x1ba2e0(0xce)]()[_0x1ba2e0(0xba)](_0x1ba2e0(0xc0));}function stripQuery(_0x460ce2){const _0x50857a=a123_0x4403;return _0x460ce2[_0x50857a(0xee)]('?')[0x0]??_0x460ce2;}function parseUpdateParamsFlag(_0x32990c){const _0x495ae4=a123_0x4403;if(!_0x32990c||typeof _0x32990c!==_0x495ae4(0xdd))return{};try{const _0x58c8b6=JSON[_0x495ae4(0xef)](_0x32990c);if(typeof _0x58c8b6!==_0x495ae4(0xe7)||_0x58c8b6===null||Array['isArray'](_0x58c8b6))return{};return{'jsUrl':typeof _0x58c8b6['jsUrl']==='string'?_0x58c8b6['jsUrl'][_0x495ae4(0xf7)]():undefined,'cssUrl':typeof _0x58c8b6[_0x495ae4(0xd3)]===_0x495ae4(0xdd)?_0x58c8b6[_0x495ae4(0xd3)][_0x495ae4(0xf7)]():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a124_0x3912(){const _0x5ae8a4=['156jUqjGv','72klxCIO','trim','981tfCGsh','238Bdzwpv','159966qEwlnV','258784pRHZfg','3076WmMHGQ','3597csaiAn','test','1294ZtLCqt','95693vbvdEZ','95010mxkFES','745KYqSDw','15440LxVRQA'];a124_0x3912=function(){return _0x5ae8a4;};return a124_0x3912();}function a124_0x112d(_0x4577b2,_0x1d35ac){_0x4577b2=_0x4577b2-0x16f;const _0x3912cf=a124_0x3912();let _0x112deb=_0x3912cf[_0x4577b2];return _0x112deb;}(function(_0x2d4495,_0x349ec0){const _0xcc83c9=a124_0x112d,_0xe4e6f9=_0x2d4495();while(!![]){try{const _0x29451c=parseInt(_0xcc83c9(0x179))/0x1+-parseInt(_0xcc83c9(0x16f))/0x2*(-parseInt(_0xcc83c9(0x177))/0x3)+-parseInt(_0xcc83c9(0x17b))/0x4*(-parseInt(_0xcc83c9(0x172))/0x5)+parseInt(_0xcc83c9(0x171))/0x6*(-parseInt(_0xcc83c9(0x178))/0x7)+-parseInt(_0xcc83c9(0x17a))/0x8*(parseInt(_0xcc83c9(0x175))/0x9)+parseInt(_0xcc83c9(0x173))/0xa*(parseInt(_0xcc83c9(0x17c))/0xb)+parseInt(_0xcc83c9(0x174))/0xc*(parseInt(_0xcc83c9(0x170))/0xd);if(_0x29451c===_0x349ec0)break;else _0xe4e6f9['push'](_0xe4e6f9['shift']());}catch(_0x5249b4){_0xe4e6f9['push'](_0xe4e6f9['shift']());}}}(a124_0x3912,0x46af3));export function isValidJsHttpsUrl(_0x2faedb){const _0x447a14=a124_0x112d;return/^https:\/\/.+\.js(\?.*)?$/[_0x447a14(0x17d)](_0x2faedb[_0x447a14(0x176)]());}export function isValidCssHttpsUrl(_0xc5e31a){const _0x2b93eb=a124_0x112d;return/^https:\/\/.+\.css(\?.*)?$/[_0x2b93eb(0x17d)](_0xc5e31a[_0x2b93eb(0x176)]());}export async function isUrlReachable(_0xf517ab){try{const _0x260bc8=await fetch(_0xf517ab,{'method':'HEAD'});return _0x260bc8['ok'];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a125_0x4e34f3=a125_0x55ae;function a125_0x4132(){const _0x20733e=['cssUrl','skipped','length','3UScGia','Created\x20','split','size','yellow','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','2FLQzjX','jsUrl','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','string','✓\x20Menu\x20sync\x20completed:\x20','/smartapi/menu/create','selectedAppName','Non-interactive\x20menu\x20sync\x20requires\x20--yes.','Menu\x20creation\x20failed','95644QbGhlJ','\x20\x20✓\x20Selected:\x20','\x20page(s)','Would\x20create\x20','\x20\x20Cancelled.','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','33745ApyXXi','localPages','filter','Online\x20menu\x20list\x20fetched','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','Creating\x20','\x20menu(s)','appCode','Pre-fill\x20JS/CSS\x20URLs.\x20','targetPages','onlinePaths','Menu\x20sync\x20skipped','trim','rawFlags','appcode','params','702dZJNPL','failed','cookie','\x20menu(s)...','gray','sync','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','menu','\x20local\x20microfrontend\x20menu(s).','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','896888atiWQm','5234669mbsfkl','Menu\x20sync\x20completed:\x20','\x20created.','14744292AiEyYF','10mKzkfO','\x20failed.','748359DqpIOa','\x20created,\x20','Sync\x20local\x20pages\x20as\x20platform\x20menus','cyan','paths','validation','str','created','8fBsLzj','yes','\x20menu(s)\x20with\x20JS:\x20','1434538oxzSJY','message'];a125_0x4132=function(){return _0x20733e;};return a125_0x4132();}(function(_0xface6a,_0x3e4fe3){const _0x790924=a125_0x55ae,_0x128ccf=_0xface6a();while(!![]){try{const _0xb9b719=-parseInt(_0x790924(0x1f5))/0x1*(-parseInt(_0x790924(0x1eb))/0x2)+parseInt(_0x790924(0x1e5))/0x3*(-parseInt(_0x790924(0x215))/0x4)+-parseInt(_0x790924(0x1fb))/0x5*(parseInt(_0x790924(0x20b))/0x6)+parseInt(_0x790924(0x1e0))/0x7+-parseInt(_0x790924(0x1dd))/0x8*(parseInt(_0x790924(0x1d5))/0x9)+-parseInt(_0x790924(0x1d3))/0xa*(-parseInt(_0x790924(0x216))/0xb)+parseInt(_0x790924(0x219))/0xc;if(_0xb9b719===_0x3e4fe3)break;else _0x128ccf['push'](_0x128ccf['shift']());}catch(_0x47d473){_0x128ccf['push'](_0x128ccf['shift']());}}}(a125_0x4132,0xddb6e));import a125_0x36b0ad from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';function a125_0x55ae(_0xd8bb75,_0x44dbe1){_0xd8bb75=_0xd8bb75-0x1d3;const _0x413293=a125_0x4132();let _0x55aec5=_0x413293[_0xd8bb75];return _0x55aec5;}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{parseMenuSyncParams,runMenuSyncCore}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':a125_0x4e34f3(0x212),'command':a125_0x4e34f3(0x210),'description':a125_0x4e34f3(0x1d7),'risk':'write','flags':[{'name':'params','type':a125_0x4e34f3(0x1ef),'description':a125_0x4e34f3(0x203)+a125_0x4e34f3(0x211)},{'name':'paths','type':a125_0x4e34f3(0x1ef),'description':'Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync'},{'name':a125_0x4e34f3(0x1de),'type':'boolean','description':a125_0x4e34f3(0x214)}],async 'dryRun'(_0x25a5e8){const _0x43bb5e=a125_0x4e34f3;ensureRunnableContext(_0x25a5e8[_0x43bb5e(0x208)],_0x25a5e8['selectedAppName']);const _0x313aeb=await runMenuSyncCore(_0x25a5e8[_0x43bb5e(0x202)],_0x25a5e8[_0x43bb5e(0x20d)],parsePaths(_0x25a5e8[_0x43bb5e(0x1db)](_0x43bb5e(0x1d9))),_0x25a5e8[_0x43bb5e(0x1db)](_0x43bb5e(0x20a)),{'dryRun':!![]});return{'method':'POST','url':_0x43bb5e(0x1f1),'body':_0x313aeb,'description':_0x313aeb[_0x43bb5e(0x1e3)]?'No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.':_0x43bb5e(0x1f8)+_0x313aeb[_0x43bb5e(0x204)]['length']+_0x43bb5e(0x213)};},async 'execute'(_0xd7f119){const _0xed86c9=a125_0x4e34f3;ensureRunnableContext(_0xd7f119[_0xed86c9(0x208)],_0xd7f119[_0xed86c9(0x1f2)]);const _0x2ecd01=_0xd7f119['flag'](_0xed86c9(0x1de)),_0x8c5e2e=_0xd7f119['str'](_0xed86c9(0x20a)),_0x1e6b50=parsePaths(_0xd7f119[_0xed86c9(0x1db)]('paths')),_0x445421=parseMenuSyncParams(_0x8c5e2e);if(_0x2ecd01){const _0x4094c3=await runMenuSyncCore(_0xd7f119[_0xed86c9(0x202)],_0xd7f119[_0xed86c9(0x20d)],_0x1e6b50,_0x8c5e2e);if(_0x4094c3[_0xed86c9(0x1e3)]){const _0x29d00d=getLocalPages();_0x29d00d[_0xed86c9(0x1e4)]===0x0?writeCliSideChannelLine(_0xed86c9(0x1ee)):writeCliSideChannelLine(_0xed86c9(0x1ea));}else writeCliSideChannelLine(_0xed86c9(0x1f0)+_0x4094c3['created']+'\x20menu(s)\x20created');return{'ok':!![],'data':_0x4094c3,'message':_0x4094c3[_0xed86c9(0x1e3)]?_0xed86c9(0x206):_0xed86c9(0x217)+_0x4094c3[_0xed86c9(0x1dc)]+_0xed86c9(0x218)};}if(_0x1e6b50[_0xed86c9(0x1e4)]>0x0)throw CliErrors['validation']('menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.',_0xed86c9(0x1ed));if(!isInteractive()&&_0x8c5e2e)throw CliErrors[_0xed86c9(0x1da)](_0xed86c9(0x1f3),'Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.');requireInteractive();const _0x1e3277=startSpinner('Fetching\x20online\x20menu\x20list...');let _0xde0810,_0x29a4d5,_0x4a4b02;try{const _0x2acdf0=await fetchMenuData(_0xd7f119['appCode'],_0xd7f119[_0xed86c9(0x20d)]);_0xde0810=_0x2acdf0[_0xed86c9(0x1fc)],_0x29a4d5=_0x2acdf0[_0xed86c9(0x205)],_0x4a4b02=_0x2acdf0['onlineMenuList'],stopSpinner(_0x1e3277,_0xed86c9(0x1fe),!![]);}catch(_0x30b22a){stopSpinner(_0x1e3277,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors['validation'](_0x30b22a instanceof Error?_0x30b22a[_0xed86c9(0x1e1)]:'Failed\x20to\x20fetch\x20online\x20menu\x20list');}if(_0xde0810[_0xed86c9(0x1e4)]===0x0)return writeCliSideChannelLine(a125_0x36b0ad[_0xed86c9(0x1e9)](_0xed86c9(0x1fa))),{'ok':!![]};const _0x539ef1=buildCompareRows(_0xde0810,_0x29a4d5);writeCliSideChannelLine(renderCompareTable(_0x539ef1)),writeCliSideChannelLine('');const _0x53f1aa=await selectPages(_0xde0810,_0x29a4d5);writeCliSideChannelLine(''),writeCliSideChannelLine(a125_0x36b0ad[_0xed86c9(0x1d8)](_0xed86c9(0x1f6)+_0x53f1aa['length']+_0xed86c9(0x1f7)));const _0x1161ff=_0x445421[_0xed86c9(0x1ec)]&&_0x445421[_0xed86c9(0x1e2)];if(!_0x1161ff){writeCliSideChannelLine(renderSyncSummary(_0x53f1aa,_0x29a4d5[_0xed86c9(0x1e8)]>0x0));const _0x471f8a=await askConfirm('\x20\x20Continue\x20with\x20creation?');if(!_0x471f8a)return writeCliSideChannelLine(a125_0x36b0ad['gray'](_0xed86c9(0x1f9))),{'ok':!![]};}let _0x1d68f5=_0x445421[_0xed86c9(0x1ec)],_0x5837f6=_0x445421[_0xed86c9(0x1e2)];!_0x1d68f5&&(_0x1d68f5=await askJsUrl());!_0x5837f6&&(_0x5837f6=await askCssUrl());const _0x496c43=await askConfirm('\x20\x20Create\x20'+_0x53f1aa[_0xed86c9(0x1e4)]+_0xed86c9(0x1df)+_0x1d68f5+'\x20and\x20CSS:\x20'+_0x5837f6+'?');if(!_0x496c43)return writeCliSideChannelLine(a125_0x36b0ad[_0xed86c9(0x20f)](_0xed86c9(0x1f9))),{'ok':!![]};const _0x389c21=[_0x1d68f5,_0x5837f6],_0x4c3a1f=startSpinner(_0xed86c9(0x200)+_0x53f1aa['length']+_0xed86c9(0x20e));try{const _0x4c7deb=await doCreateMenus(_0xd7f119['appCode'],_0xd7f119[_0xed86c9(0x20d)],_0x53f1aa,_0x389c21);return stopSpinner(_0x4c3a1f,_0xed86c9(0x1e6)+_0x4c7deb[_0xed86c9(0x1dc)]+_0xed86c9(0x201),!![]),{'ok':!![],'data':_0x4c7deb,'message':_0xed86c9(0x217)+_0x4c7deb[_0xed86c9(0x1dc)]+_0xed86c9(0x1d6)+_0x4c7deb[_0xed86c9(0x20c)]+_0xed86c9(0x1d4)};}catch(_0xf60a54){stopSpinner(_0x4c3a1f,_0xed86c9(0x1f4),![]);throw CliErrors[_0xed86c9(0x1da)](_0xf60a54 instanceof Error?_0xf60a54[_0xed86c9(0x1e1)]:'Menu\x20creation\x20failed');}}};function ensureRunnableContext(_0x3de4d6,_0x49b015){const _0xee89eb=a125_0x4e34f3,_0x1717d3=_0x3de4d6[_0xee89eb(0x209)]?String(_0x3de4d6[_0xee89eb(0x209)])['trim']():'';if(!isInProject()&&!_0x49b015&&!_0x1717d3)throw CliErrors[_0xee89eb(0x1da)]('menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20'+_0xee89eb(0x1ff));}function parsePaths(_0xd91367){const _0x44c6ae=a125_0x4e34f3;return[...new Set(_0xd91367[_0x44c6ae(0x1e7)](',')['map'](_0x422537=>_0x422537[_0x44c6ae(0x207)]())[_0x44c6ae(0x1fd)](Boolean))];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a126_0x1abe68=a126_0x4836;(function(_0x23523b,_0x20658c){const _0x1dc614=a126_0x4836,_0x4371e7=_0x23523b();while(!![]){try{const _0x2de2e6=-parseInt(_0x1dc614(0x1c3))/0x1*(parseInt(_0x1dc614(0x1dd))/0x2)+parseInt(_0x1dc614(0x1c4))/0x3*(parseInt(_0x1dc614(0x1c8))/0x4)+-parseInt(_0x1dc614(0x1d9))/0x5+-parseInt(_0x1dc614(0x1c1))/0x6*(parseInt(_0x1dc614(0x1d8))/0x7)+-parseInt(_0x1dc614(0x1d5))/0x8+-parseInt(_0x1dc614(0x1d4))/0x9+parseInt(_0x1dc614(0x1d0))/0xa;if(_0x2de2e6===_0x20658c)break;else _0x4371e7['push'](_0x4371e7['shift']());}catch(_0x4d8a3e){_0x4371e7['push'](_0x4371e7['shift']());}}}(a126_0x151e,0xd3a57));function a126_0x151e(){const _0x3826d8=['6472640qfbDfI','string','length','\x20is\x20missing\x20required\x20field\x20\x22','78652TqwgZz','config-list','createTime','notification','WEBHOOK','channelType','join','description','Notification\x20channel\x20type','validation','Found\x20','24WDBGNJ','includes','19yPprdl','33IKTped','trim','EMAIL','number','125908acKQEI','FEISHU','Invalid\x20notification\x20config\x20response.','Invalid\x20--type:\x20','DINGTALK','configCode','\x20notification\x20config(s)','read','59569970PfrrzN','updateTime','Item\x20','str','4777812KVkDAP','10103416PBCvAo','appCode','map','2801442nmHZva'];a126_0x151e=function(){return _0x3826d8;};return a126_0x151e();}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=[a126_0x1abe68(0x1c6),a126_0x1abe68(0x1c9),a126_0x1abe68(0x1cc),'WECOM',a126_0x1abe68(0x1e1)];function a126_0x4836(_0x4f9624,_0x874a4){_0x4f9624=_0x4f9624-0x1bb;const _0x151e42=a126_0x151e();let _0x483694=_0x151e42[_0x4f9624];return _0x483694;}export const notificationConfigList={'service':a126_0x1abe68(0x1e0),'command':a126_0x1abe68(0x1de),'description':'List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','risk':a126_0x1abe68(0x1cf),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':a126_0x1abe68(0x1da),'description':a126_0x1abe68(0x1be),'enum':NOTIFICATION_CHANNEL_TYPES,'default':a126_0x1abe68(0x1c6)}],async 'validate'(_0x48653b){readChannelType(_0x48653b);},async 'execute'(_0x18c85d){const _0xb8a78a=a126_0x1abe68,_0x195161=readChannelType(_0x18c85d),_0x42089b=await listNotificationChannelConfigs(_0x18c85d['appCode'],_0x195161),_0x4d2266=_0x42089b[_0xb8a78a(0x1d7)](projectNotificationConfig);return{'ok':!![],'data':{'appCode':_0x18c85d[_0xb8a78a(0x1d6)],'channelType':_0x195161,'count':_0x4d2266[_0xb8a78a(0x1db)],'configs':_0x4d2266},'message':_0xb8a78a(0x1c0)+_0x4d2266['length']+'\x20'+_0x195161+_0xb8a78a(0x1ce)};}};function readChannelType(_0x5aef26){const _0x15b383=a126_0x1abe68,_0x320307=_0x5aef26[_0x15b383(0x1d3)]('type')[_0x15b383(0x1c5)]()||_0x15b383(0x1c6);if(!NOTIFICATION_CHANNEL_TYPES[_0x15b383(0x1c2)](_0x320307))throw CliErrors[_0x15b383(0x1bf)](_0x15b383(0x1cb)+_0x320307,'Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES[_0x15b383(0x1bc)](',\x20')+'.');return _0x320307;}function projectNotificationConfig(_0x3105fb,_0x1bd628){const _0x2f0415=a126_0x1abe68;return{'id':typeof _0x3105fb['id']===_0x2f0415(0x1c7)?_0x3105fb['id']:null,'configCode':requireConfigString(_0x3105fb,_0x2f0415(0x1cd),_0x1bd628),'configName':requireConfigString(_0x3105fb,'configName',_0x1bd628),'channelType':requireConfigString(_0x3105fb,_0x2f0415(0x1bb),_0x1bd628),'description':normalizeNullableString(_0x3105fb[_0x2f0415(0x1bd)]),'createTime':normalizeNullableString(_0x3105fb[_0x2f0415(0x1df)]),'updateTime':normalizeNullableString(_0x3105fb[_0x2f0415(0x1d1)])};}function requireConfigString(_0x275ee7,_0x550f22,_0x24f84a){const _0x4fe4da=a126_0x1abe68,_0x51a26b=_0x275ee7[_0x550f22];if(typeof _0x51a26b!==_0x4fe4da(0x1da)||_0x51a26b[_0x4fe4da(0x1c5)]()==='')throw CliErrors['apiError'](_0x4fe4da(0x1ca),_0x4fe4da(0x1d2)+(_0x24f84a+0x1)+_0x4fe4da(0x1dc)+_0x550f22+'\x22.');return _0x51a26b[_0x4fe4da(0x1c5)]();}function normalizeNullableString(_0x2b7a58){return typeof _0x2b7a58==='string'?_0x2b7a58:null;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a127_0x131f(){const _0x1886ef=['2226873IPYyGa','13gkdJYl','8088732MghgnA','157312SofGLN','40mejvrl','93SPYXVW','553426RtbfCC','91pFjqsn','5jKZQkV','2092410cfEYTL','4028076UqQZEJ','2KnQvZc','24340kNzmDU'];a127_0x131f=function(){return _0x1886ef;};return a127_0x131f();}(function(_0x530c01,_0x36a489){const _0xa88256=a127_0x1970,_0x122719=_0x530c01();while(!![]){try{const _0x39b233=-parseInt(_0xa88256(0x1d0))/0x1*(-parseInt(_0xa88256(0x1d8))/0x2)+parseInt(_0xa88256(0x1d7))/0x3*(parseInt(_0xa88256(0x1d1))/0x4)+-parseInt(_0xa88256(0x1da))/0x5*(parseInt(_0xa88256(0x1cf))/0x6)+parseInt(_0xa88256(0x1d9))/0x7*(parseInt(_0xa88256(0x1d5))/0x8)+parseInt(_0xa88256(0x1db))/0x9+parseInt(_0xa88256(0x1d6))/0xa*(-parseInt(_0xa88256(0x1d2))/0xb)+parseInt(_0xa88256(0x1d4))/0xc*(parseInt(_0xa88256(0x1d3))/0xd);if(_0x39b233===_0x36a489)break;else _0x122719['push'](_0x122719['shift']());}catch(_0x174224){_0x122719['push'](_0x122719['shift']());}}}(a127_0x131f,0x674d6));import{notificationConfigList}from'../../commands/notification/config-list.js';function a127_0x1970(_0x57aee7,_0xe271ef){_0x57aee7=_0x57aee7-0x1cf;const _0x131f8b=a127_0x131f();let _0x1970b4=_0x131f8b[_0x57aee7];return _0x1970b4;}export const notificationDefinitions=[notificationConfigList];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a128_0x21d2d2=a128_0x2a59;(function(_0x4dc626,_0x1c1e3e){const _0x205d54=a128_0x2a59,_0x397a86=_0x4dc626();while(!![]){try{const _0x4d9398=parseInt(_0x205d54(0xb4))/0x1*(parseInt(_0x205d54(0xda))/0x2)+parseInt(_0x205d54(0xb9))/0x3*(parseInt(_0x205d54(0xcf))/0x4)+-parseInt(_0x205d54(0xcb))/0x5*(-parseInt(_0x205d54(0xc3))/0x6)+-parseInt(_0x205d54(0xe6))/0x7+parseInt(_0x205d54(0xc8))/0x8+parseInt(_0x205d54(0xd2))/0x9+-parseInt(_0x205d54(0xb2))/0xa*(parseInt(_0x205d54(0xaf))/0xb);if(_0x4d9398===_0x1c1e3e)break;else _0x397a86['push'](_0x397a86['shift']());}catch(_0x138603){_0x397a86['push'](_0x397a86['shift']());}}}(a128_0x73c5,0x5cb4d));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';function a128_0x73c5(){const _0x5f59b3=['form','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','string','fileUrl','path','103146ZLRBTy','\x20OCR\x20from\x20URL','idCard','/smartapi/common/uploadFile','Unsupported\x20OCR\x20scene:\x20','673912QSdlme','general','recognize','95FfgKCJ','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','Publicly\x20accessible\x20image\x20or\x20file\x20URL','filter','1268zEdyxz','image-url','appCode','1135314lrhGXW','apiError','invoice','imageFile','scene','join','image-file','imageUrl','53032CGGQvk','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','str','Table','fileName','ocr','filePath','toString','/smartapi/ocr/recognize-text?','Invoice','validation','idcard','3699745KWQkWh','使用研发态\x20OCR\x20服务识别\x20URL\x20或本地文件中的文字','\x20OCR','length','187XwdWte','IdCard','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','554210uJXizO','POST','22zGnfzX','Preview:\x20recognize\x20','/smartapi/common/queryFileUrl','File\x20URL\x20response\x20missing\x20fileUrl.','File\x20upload\x20response\x20missing\x20filePath.','6909cEmqKv','read','count','GET','trim'];a128_0x73c5=function(){return _0x5f59b3;};return a128_0x73c5();}import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=['invoice',a128_0x21d2d2(0xc9),'form',a128_0x21d2d2(0xc5)],SCENE_TO_LEGACY_TYPE={'invoice':a128_0x21d2d2(0xe3),'general':'General','form':a128_0x21d2d2(0xdd),'idCard':a128_0x21d2d2(0xb0)},SCENE_FLAG={'name':'scene','type':'string','required':!![],'enum':[...SUPPORTED_SCENES],'description':a128_0x21d2d2(0xb1)},IMAGE_FILE_FLAG={'name':'image-file','type':a128_0x21d2d2(0xc0),'description':'Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR'},IMAGE_URL_FLAG={'name':a128_0x21d2d2(0xd0),'type':a128_0x21d2d2(0xc0),'description':a128_0x21d2d2(0xcd)};function normalizeScene(_0x343876){const _0x1df1eb=a128_0x21d2d2,_0x36faef=_0x343876[_0x1df1eb(0xbd)]()['toLowerCase']();if(_0x36faef===_0x1df1eb(0xe5))return _0x1df1eb(0xc5);if(_0x36faef===_0x1df1eb(0xd4)||_0x36faef==='general'||_0x36faef===_0x1df1eb(0xbe))return _0x36faef;throw CliErrors[_0x1df1eb(0xe4)](_0x1df1eb(0xc7)+_0x343876+'.\x20Supported\x20scenes:\x20'+SUPPORTED_SCENES[_0x1df1eb(0xd7)](',\x20'));}function a128_0x2a59(_0x386a5b,_0x29a2eb){_0x386a5b=_0x386a5b-0xaf;const _0x73c508=a128_0x73c5();let _0x2a5949=_0x73c508[_0x386a5b];return _0x2a5949;}function selectedInputs(_0x1bf639){const _0x4a3750=a128_0x21d2d2,_0x249c27=_0x1bf639['str'](_0x4a3750(0xd8))['trim'](),_0x4da2d9=_0x1bf639[_0x4a3750(0xdc)](_0x4a3750(0xd0))[_0x4a3750(0xbd)]();return{'imageFile':_0x249c27,'imageUrl':_0x4da2d9,'count':[_0x249c27,_0x4da2d9][_0x4a3750(0xce)](Boolean)[_0x4a3750(0xe9)]};}function validateInputSelection(_0x4b0c96){const _0xe0c7bd=a128_0x21d2d2,_0x3b1927=selectedInputs(_0x4b0c96);if(_0x3b1927[_0xe0c7bd(0xbb)]!==0x1)throw CliErrors[_0xe0c7bd(0xe4)](_0xe0c7bd(0xdb));return _0x3b1927;}function withScene(_0x2b7f08,_0x1656ea,_0x1b4993){const _0x7bbc5f=a128_0x21d2d2;return{..._0x2b7f08,'scene':_0x1656ea,..._0x1b4993?{'sourceFile':{'fileName':_0x1b4993[_0x7bbc5f(0xde)],'filePath':_0x1b4993[_0x7bbc5f(0xe0)]}}:{}};}const ocrRecognize={'service':a128_0x21d2d2(0xdf),'command':a128_0x21d2d2(0xca),'description':a128_0x21d2d2(0xe7),'risk':a128_0x21d2d2(0xba),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x2db2fe){const _0xa5bde9=a128_0x21d2d2,_0x132499=normalizeScene(_0x2db2fe[_0xa5bde9(0xdc)](_0xa5bde9(0xd6))),_0x5f1938=SCENE_TO_LEGACY_TYPE[_0x132499],_0x37c9d9=validateInputSelection(_0x2db2fe);if(_0x37c9d9[_0xa5bde9(0xd9)]){const _0x21a7fd=new URLSearchParams({'url':_0x37c9d9['imageUrl'],'type':_0x5f1938,'appCode':_0x2db2fe[_0xa5bde9(0xd1)]});return{'method':_0xa5bde9(0xbc),'url':_0xa5bde9(0xe2)+_0x21a7fd[_0xa5bde9(0xe1)](),'description':_0xa5bde9(0xb5)+_0x132499+_0xa5bde9(0xc4)};}const _0x140d20=requireDevelopmentUploadFile(_0x37c9d9['imageFile'],_0xa5bde9(0xd8));return{'method':_0xa5bde9(0xb3),'url':_0xa5bde9(0xc6),'body':{'steps':[{'method':_0xa5bde9(0xb3),'url':'/smartapi/common/uploadFile','body':{'appCode':_0x2db2fe[_0xa5bde9(0xd1)],'multipart':{'file':_0x140d20}}},{'method':_0xa5bde9(0xb3),'url':_0xa5bde9(0xb6),'body':{'filePath':_0xa5bde9(0xbf),'downloadFlag':![]}},{'method':'GET','url':'/smartapi/ocr/recognize-text','query':{'appCode':_0x2db2fe[_0xa5bde9(0xd1)],'url':'<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','type':_0x5f1938}}]},'description':_0xa5bde9(0xcc)+_0x132499+_0xa5bde9(0xe8)};},async 'execute'(_0x3bfc83){const _0x261327=a128_0x21d2d2,_0x1728c9=normalizeScene(_0x3bfc83[_0x261327(0xdc)](_0x261327(0xd6))),_0x5a1a93=SCENE_TO_LEGACY_TYPE[_0x1728c9],_0x127f8c=validateInputSelection(_0x3bfc83);if(_0x127f8c[_0x261327(0xd9)]){const _0x3ada77=await recognizeDevelopmentOcr(_0x3bfc83[_0x261327(0xd1)],{'url':_0x127f8c[_0x261327(0xd9)],'type':_0x5a1a93});return{'ok':!![],'data':withScene(_0x3ada77,_0x1728c9)};}const _0xadc0b9=requireDevelopmentUploadFile(_0x127f8c[_0x261327(0xd5)],'image-file'),_0x22f9c1=await uploadDevelopmentFile(_0x3bfc83['appCode'],_0xadc0b9[_0x261327(0xc2)]);if(!_0x22f9c1['filePath'])throw CliErrors[_0x261327(0xd3)](_0x261327(0xb8));const _0x209b68=await queryDevelopmentFileUrl(_0x22f9c1[_0x261327(0xe0)],{'download':![]});if(!_0x209b68[_0x261327(0xc1)])throw CliErrors['apiError'](_0x261327(0xb7));const _0x3fb344=await recognizeDevelopmentOcr(_0x3bfc83['appCode'],{'url':_0x209b68[_0x261327(0xc1)],'type':_0x5a1a93});return{'ok':!![],'data':withScene(_0x3fb344,_0x1728c9,_0x22f9c1)};}};export const ocrDefinitions=[ocrRecognize];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a129_0xdcf3(_0xb776f,_0x523b51){_0xb776f=_0xb776f-0x72;const _0x40a8b0=a129_0x40a8();let _0xdcf39b=_0x40a8b0[_0xb776f];return _0xdcf39b;}function a129_0x40a8(){const _0x4eb7de=['progressRate','Start\x20async\x20Smart\x20List\x20Page\x20generation\x20from\x20a\x20dataset','69240dvTZUT','9190284cExPAf','appCode','apply','clientOperationId','code','number','dataset','nextAction','43191EEWOHH','719315YawDis','generate-start','6rLXWwm','2352VxaxAA','manualResolutionRequired','4ZqsfFc','PARTIAL_SUCCESS','/generate-standard-pages/start','14gHTMOY','name','standardPageStatus','451515tveAJt','bool','SUCCESS','fieldCount','POST','page','precheck','385HFFZDI','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','message','5079655ZorkRA','Actually\x20execute\x20the\x20generation.\x20Without\x20this\x20flag,\x20only\x20a\x20dry-run\x20preview\x20is\x20shown.','status','/smartapi/lovrabet/dataset/','reused','复用已有生成任务','510573SXHYPd','source','allowGenerate','dryRun','currentStep','write'];a129_0x40a8=function(){return _0x4eb7de;};return a129_0x40a8();}const a129_0x587c55=a129_0xdcf3;(function(_0x394fe1,_0x2f3f9f){const _0x5dfb89=a129_0xdcf3,_0x467632=_0x394fe1();while(!![]){try{const _0x5b7658=-parseInt(_0x5dfb89(0x96))/0x1+-parseInt(_0x5dfb89(0x9e))/0x2*(parseInt(_0x5dfb89(0x84))/0x3)+parseInt(_0x5dfb89(0x9b))/0x4*(parseInt(_0x5dfb89(0x74))/0x5)+parseInt(_0x5dfb89(0x98))/0x6*(parseInt(_0x5dfb89(0x7e))/0x7)+parseInt(_0x5dfb89(0x99))/0x8*(parseInt(_0x5dfb89(0x95))/0x9)+-parseInt(_0x5dfb89(0x8c))/0xa*(parseInt(_0x5dfb89(0x7b))/0xb)+parseInt(_0x5dfb89(0x8d))/0xc;if(_0x5b7658===_0x2f3f9f)break;else _0x467632['push'](_0x467632['shift']());}catch(_0x4ebbb5){_0x467632['push'](_0x467632['shift']());}}}(a129_0x40a8,0xcd03b));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':a129_0x587c55(0x79),'command':a129_0x587c55(0x97),'description':a129_0x587c55(0x8b),'risk':a129_0x587c55(0x89),'defaultOutputFormat':'compress','flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':'alias','type':'string','description':a129_0x587c55(0x7c)},{'name':a129_0x587c55(0x8f),'type':'boolean','description':a129_0x587c55(0x7f)}],async 'validate'(_0x373bef){validateDatasetSelector(_0x373bef);},async 'dryRun'(_0x755dae){const _0x3bac1d=a129_0x587c55,_0x3cfe7d=await prepare(_0x755dae);return{'method':_0x3bac1d(0x78),'url':_0x3bac1d(0x81)+_0x3cfe7d['dataset'][_0x3bac1d(0x91)]+_0x3bac1d(0x9d),'body':{'appCode':_0x755dae[_0x3bac1d(0x8e)],'clientOperationId':_0x3cfe7d[_0x3bac1d(0x90)]},'description':serializeDryRunDescription({'dataset':{'id':_0x3cfe7d[_0x3bac1d(0x93)]['id'],'code':_0x3cfe7d['dataset'][_0x3bac1d(0x91)],'name':_0x3cfe7d[_0x3bac1d(0x93)][_0x3bac1d(0x72)],'fieldCount':_0x3cfe7d[_0x3bac1d(0x93)][_0x3bac1d(0x77)]},'precheckSource':_0x3cfe7d[_0x3bac1d(0x73)]?.[_0x3bac1d(0x85)]??'related-pages-fallback','action':_0x3bac1d(0x97),'clientOperationId':_0x3cfe7d['clientOperationId'],'plannedStatus':_0x3cfe7d[_0x3bac1d(0x7a)]['status'],'reason':_0x3cfe7d['precheck'][_0x3bac1d(0x7d)]})};},async 'execute'(_0x199095){const _0xff4846=a129_0x587c55;if(!_0x199095[_0xff4846(0x75)]('apply')){const _0x368879=await pageGenerateStart[_0xff4846(0x87)](_0x199095);return{'ok':!![],'message':'Dry-run\x20preview\x20(pass\x20--apply\x20to\x20execute\x20the\x20generation)','data':_0x368879};}const _0x2e3c25=await prepare(_0x199095);if(!_0x2e3c25['precheck'][_0xff4846(0x86)])return{'ok':![],'message':_0x2e3c25[_0xff4846(0x7a)]['message'],'data':{'datasetCode':_0x2e3c25[_0xff4846(0x93)][_0xff4846(0x91)],'clientOperationId':_0x2e3c25[_0xff4846(0x90)],'precheckSource':_0x2e3c25[_0xff4846(0x73)]?.['source']??'related-pages-fallback','status':_0x2e3c25['precheck'][_0xff4846(0x80)],'manualResolutionRequired':_0x2e3c25[_0xff4846(0x7a)][_0xff4846(0x9a)],'nextAction':_0x2e3c25['precheck']['nextAction'],'query':{'command':buildStandardPageStatusQueryCommand(_0x2e3c25['dataset'][_0xff4846(0x91)],_0x199095[_0xff4846(0x8e)])},'standardPageStatus':_0x2e3c25['standardPageStatus']}};const _0x287c37=await startGenerateStandardPages(_0x199095[_0xff4846(0x8e)],_0x2e3c25['dataset'][_0xff4846(0x91)],{'clientOperationId':_0x2e3c25['clientOperationId']}),_0x9975d0=_0x287c37[_0xff4846(0x80)]===_0xff4846(0x76)||_0x287c37[_0xff4846(0x80)]===_0xff4846(0x9c)?await loadStandardPageStatusForGenerate(_0x199095,_0x2e3c25[_0xff4846(0x93)][_0xff4846(0x91)]):null,_0x4be0f4=assessGenerateOperationState(_0x2e3c25[_0xff4846(0x93)][_0xff4846(0x91)],_0x287c37[_0xff4846(0x80)],_0x9975d0);return{'ok':!![],'message':_0x287c37[_0xff4846(0x82)]?_0xff4846(0x83):'已提交生成任务','data':{'datasetCode':_0x2e3c25[_0xff4846(0x93)][_0xff4846(0x91)],'appCode':_0x199095[_0xff4846(0x8e)],'operationId':_0x287c37['operationId']??null,'clientOperationId':_0x2e3c25[_0xff4846(0x90)],'jobStatus':_0x287c37[_0xff4846(0x80)]??null,'progressRate':typeof _0x287c37[_0xff4846(0x8a)]===_0xff4846(0x92)?_0x287c37[_0xff4846(0x8a)]:null,'currentStep':_0x287c37[_0xff4846(0x88)]??null,'reused':_0x287c37[_0xff4846(0x82)]===!![],'status':_0x4be0f4[_0xff4846(0x80)],'manualResolutionRequired':_0x4be0f4['manualResolutionRequired'],'nextAction':_0x4be0f4[_0xff4846(0x94)],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x2e3c25[_0xff4846(0x93)][_0xff4846(0x91)],{'appCode':_0x199095[_0xff4846(0x8e)],'operationId':_0x287c37['operationId'],'clientOperationId':_0x2e3c25[_0xff4846(0x90)]})},'standardPageStatus':_0x9975d0}};}};async function prepare(_0x71bf58){const _0x55b53c=a129_0x587c55,_0xa45a7e=await loadDatasetDetailForPage(_0x71bf58),_0x3d36e1=await loadStandardPageStatusForGenerate(_0x71bf58,_0xa45a7e['code']),_0x43adc8=getUndeletedRelatedPages(_0xa45a7e);return{'dataset':_0xa45a7e,'standardPageStatus':_0x3d36e1,'clientOperationId':createPageGenerateClientOperationId(),'precheck':assessStandardPageState(_0xa45a7e[_0x55b53c(0x91)],_0x3d36e1,{'fallbackUndeletedPages':_0x43adc8})};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a130_0x7d52b7=a130_0x2649;(function(_0x114fce,_0x392b19){const _0x2a8465=a130_0x2649,_0x45218d=_0x114fce();while(!![]){try{const _0x24932a=-parseInt(_0x2a8465(0xc8))/0x1+parseInt(_0x2a8465(0xb8))/0x2+parseInt(_0x2a8465(0xcb))/0x3*(-parseInt(_0x2a8465(0xb7))/0x4)+-parseInt(_0x2a8465(0xba))/0x5+-parseInt(_0x2a8465(0xce))/0x6*(-parseInt(_0x2a8465(0xb2))/0x7)+-parseInt(_0x2a8465(0xb1))/0x8*(-parseInt(_0x2a8465(0xbf))/0x9)+-parseInt(_0x2a8465(0xaa))/0xa;if(_0x24932a===_0x392b19)break;else _0x45218d['push'](_0x45218d['shift']());}catch(_0x2223db){_0x45218d['push'](_0x45218d['shift']());}}}(a130_0x3d16,0xb79d3));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';function a130_0x2649(_0x5c6dc4,_0xcc6da0){_0x5c6dc4=_0x5c6dc4-0xa8;const _0x3d16b7=a130_0x3d16();let _0x264951=_0x3d16b7[_0x5c6dc4];return _0x264951;}import{getGenerateStandardPagesStatus}from'../../core/api-client.js';function a130_0x3d16(){const _0x81817b=['851170nRUNPq','Async\x20operation\x20id\x20returned\x20by\x20page\x20generate-start','3136675FoLjha','progressRate','toString','manualResolutionRequired','code','603Wcrxmk','result','number','message','client-operation-id','/generate-standard-pages/status?','str','/smartapi/lovrabet/dataset/','page','784763pNFNPW','appCode','errorMsg','381RPEPrO','operationId','status','7009428SjVZHk','clientOperationId','compress','Query\x20Smart\x20List\x20Page\x20generate\x20operation\x20status','generate-status','operation-id','read','1872120wMoJqP','query-generate-operation-status','SUCCESS','currentStep','PARTIAL_SUCCESS','string','GET','128776KZnpyF','7RnQwbp','nextAction','name','alias','set','10108ZtHfhK'];a130_0x3d16=function(){return _0x81817b;};return a130_0x3d16();}export const pageGenerateStatus={'service':a130_0x7d52b7(0xc7),'command':a130_0x7d52b7(0xd2),'description':a130_0x7d52b7(0xd1),'risk':a130_0x7d52b7(0xa9),'defaultOutputFormat':a130_0x7d52b7(0xd0),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a130_0x7d52b7(0xb5),'type':a130_0x7d52b7(0xaf),'description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'},{'name':a130_0x7d52b7(0xa8),'type':a130_0x7d52b7(0xaf),'description':a130_0x7d52b7(0xb9)},{'name':a130_0x7d52b7(0xc3),'type':a130_0x7d52b7(0xaf),'description':'Client\x20recovery/idempotency\x20id\x20when\x20operationId\x20is\x20unavailable\x20or\x20lost'}],async 'validate'(_0x23fa8f){validateDatasetSelector(_0x23fa8f),validateGenerateOperationSelector(_0x23fa8f);},async 'dryRun'(_0x42c4a9){const _0x2d88ee=a130_0x7d52b7,_0x1cd2c1=await loadDatasetDetailForPage(_0x42c4a9),_0x38ff9b=_0x42c4a9['str'](_0x2d88ee(0xa8)),_0x507cee=_0x42c4a9[_0x2d88ee(0xc5)]('client-operation-id'),_0x3422fd=new URLSearchParams({'appCode':_0x42c4a9['appCode']});return _0x38ff9b&&_0x3422fd[_0x2d88ee(0xb6)](_0x2d88ee(0xcc),_0x38ff9b),_0x507cee&&_0x3422fd['set'](_0x2d88ee(0xcf),_0x507cee),{'method':_0x2d88ee(0xb0),'url':_0x2d88ee(0xc6)+_0x1cd2c1[_0x2d88ee(0xbe)]+_0x2d88ee(0xc4)+_0x3422fd[_0x2d88ee(0xbc)](),'description':serializeDryRunDescription({'dataset':{'id':_0x1cd2c1['id'],'code':_0x1cd2c1[_0x2d88ee(0xbe)],'name':_0x1cd2c1[_0x2d88ee(0xb4)]},'action':_0x2d88ee(0xab),'operationId':_0x38ff9b||undefined,'clientOperationId':_0x507cee||undefined})};},async 'execute'(_0x1d4264){const _0x5affc3=a130_0x7d52b7,_0x13a90f=await loadDatasetDetailForPage(_0x1d4264),_0x3144db=_0x1d4264[_0x5affc3(0xc5)]('operation-id'),_0x1dc6db=_0x1d4264[_0x5affc3(0xc5)](_0x5affc3(0xc3)),_0x37eb92=await getGenerateStandardPagesStatus(_0x1d4264[_0x5affc3(0xc9)],_0x13a90f[_0x5affc3(0xbe)],{'operationId':_0x3144db||undefined,'clientOperationId':_0x1dc6db||undefined}),_0x4653fc=_0x37eb92[_0x5affc3(0xcd)]===_0x5affc3(0xac)||_0x37eb92[_0x5affc3(0xcd)]===_0x5affc3(0xae),_0x53fd59=_0x4653fc?await loadStandardPageStatusForGenerate(_0x1d4264,_0x13a90f[_0x5affc3(0xbe)]):null,_0x562b35=assessGenerateOperationState(_0x13a90f[_0x5affc3(0xbe)],_0x37eb92[_0x5affc3(0xcd)],_0x53fd59),_0x25ec3e=_0x37eb92[_0x5affc3(0xcc)]??_0x3144db??undefined,_0x369dc5=_0x37eb92[_0x5affc3(0xcf)]??_0x1dc6db??undefined;return{'ok':!![],'message':_0x562b35['status']==='operation_failed'?_0x37eb92[_0x5affc3(0xca)]||_0x562b35[_0x5affc3(0xc2)]:_0x562b35[_0x5affc3(0xc2)],'data':{'datasetCode':_0x13a90f[_0x5affc3(0xbe)],'appCode':_0x1d4264['appCode'],'operationId':_0x25ec3e,'clientOperationId':_0x369dc5,'jobStatus':_0x37eb92['status']??null,'progressRate':typeof _0x37eb92[_0x5affc3(0xbb)]===_0x5affc3(0xc1)?_0x37eb92[_0x5affc3(0xbb)]:null,'currentStep':_0x37eb92[_0x5affc3(0xad)]??null,'errorMsg':_0x37eb92[_0x5affc3(0xca)]??null,'status':_0x562b35['status'],'manualResolutionRequired':_0x562b35[_0x5affc3(0xbd)],'nextAction':_0x562b35[_0x5affc3(0xb3)],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x13a90f[_0x5affc3(0xbe)],{'appCode':_0x1d4264[_0x5affc3(0xc9)],'operationId':_0x25ec3e,'clientOperationId':_0x369dc5})},'standardPageStatus':_0x53fd59,'result':_0x37eb92[_0x5affc3(0xc0)]??null}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x52c1d1,_0x157a6b){const _0x59f1f9=a131_0x1d35,_0x79f409=_0x52c1d1();while(!![]){try{const _0x3f92ff=-parseInt(_0x59f1f9(0xcc))/0x1+parseInt(_0x59f1f9(0xc6))/0x2*(-parseInt(_0x59f1f9(0xc5))/0x3)+-parseInt(_0x59f1f9(0xc8))/0x4*(parseInt(_0x59f1f9(0xcb))/0x5)+-parseInt(_0x59f1f9(0xc9))/0x6*(-parseInt(_0x59f1f9(0xca))/0x7)+parseInt(_0x59f1f9(0xcd))/0x8+-parseInt(_0x59f1f9(0xce))/0x9*(-parseInt(_0x59f1f9(0xc4))/0xa)+-parseInt(_0x59f1f9(0xc7))/0xb;if(_0x3f92ff===_0x157a6b)break;else _0x79f409['push'](_0x79f409['shift']());}catch(_0x31f08b){_0x79f409['push'](_0x79f409['shift']());}}}(a131_0x3ff8,0x9941b));function a131_0x1d35(_0x272702,_0x2f37a4){_0x272702=_0x272702-0xc4;const _0x3ff83c=a131_0x3ff8();let _0x1d356b=_0x3ff83c[_0x272702];return _0x1d356b;}import{pageGenerateStart}from'../../commands/page/generate-start.js';import{pageGenerateStatus}from'../../commands/page/generate-status.js';function a131_0x3ff8(){const _0x1a3b68=['4itZHMb','18CFeXxX','2917054ICPLvq','1722795VwyFhw','79274GjFzjS','7973584LipISa','219627UepajY','490ChEMpC','12KJcGaM','368826fdStWY','18187257fPIZXh'];a131_0x3ff8=function(){return _0x1a3b68;};return a131_0x3ff8();}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';import{pageRelationAudit}from'../../commands/page/relation-audit.js';import{pageRestore}from'../../commands/page/restore.js';export const pageDefinitions=[pageGenerateStart,pageGenerateStatus,pageStandardPageStatus,pageRelationAudit,pageSync,pagePull,pagePush,pageRestore];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a132_0x3eed3e=a132_0x2865;(function(_0x3d610e,_0x38dc06){const _0xc4ab99=a132_0x2865,_0x337bf3=_0x3d610e();while(!![]){try{const _0x448685=parseInt(_0xc4ab99(0xee))/0x1*(-parseInt(_0xc4ab99(0xfe))/0x2)+parseInt(_0xc4ab99(0x115))/0x3*(-parseInt(_0xc4ab99(0x10a))/0x4)+parseInt(_0xc4ab99(0xe1))/0x5*(parseInt(_0xc4ab99(0x11b))/0x6)+-parseInt(_0xc4ab99(0xfb))/0x7+parseInt(_0xc4ab99(0x118))/0x8*(parseInt(_0xc4ab99(0xfa))/0x9)+parseInt(_0xc4ab99(0xf0))/0xa*(parseInt(_0xc4ab99(0x113))/0xb)+-parseInt(_0xc4ab99(0xf6))/0xc;if(_0x448685===_0x38dc06)break;else _0x337bf3['push'](_0x337bf3['shift']());}catch(_0x3d75da){_0x337bf3['push'](_0x337bf3['shift']());}}}(a132_0x5026,0x591d4));import{writeFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getPageIdFlag,loadDatasetDetailForPage,loadPageDetailForPage,selectVersionTagGroup,serializeDryRunDescription,validatePageTargetSelector}from'../../commands/page/shared.js';function a132_0x5026(){const _0x787035=['would_pull','compress','\x20skipped','items','lockFilePath','164840MPTnZC','Dataset\x20\x22','localPath','Overwrite\x20local\x20files\x20even\x20when\x20unsynced\x20local\x20changes\x20exist','single','status','versionTag','read','pull','33shtXHa','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','9rVmrSm','push','Use\x20--force\x20to\x20overwrite\x20local\x20changes.','232XmgPyD','force','Page\x20group\x20version\x20tag\x20(batch\x20mode\x20only)','482802itbLlf','filter','name','conflict','/smartapi/lovrabet/detail\x20(per\x20selected\x20page)','bool','utf8','number','Page\x20ID','30sQlCSh','relatedPages','toISOString','拉取完成:\x20','datasetIds','all','map','appCode','reason','version-tag','code','pages','mode','2880ESQWci','type','363240UMlYnh','GET','deleted','length','hash','Pull\x20page\x20schema\x20to\x20local\x20files','3391464aMevNs','pageId','\x22\x20has\x20no\x20undeleted\x20related\x20pages.','detail','148761HLJEUC','1111117VFMZjR','str','local\x20unsynced\x20changes','98FRNkYe','datasetCode','boolean','batch','pageVersion','string','validation'];a132_0x5026=function(){return _0x787035;};return a132_0x5026();}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':a132_0x3eed3e(0x112),'description':a132_0x3eed3e(0xf5),'risk':a132_0x3eed3e(0x111),'defaultOutputFormat':a132_0x3eed3e(0x106),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'id','type':a132_0x3eed3e(0xdf),'description':a132_0x3eed3e(0xe0)},DATASETCODE_FLAG_OPTIONAL,{'name':'alias','type':'string','description':a132_0x3eed3e(0x114)},{'name':a132_0x3eed3e(0xea),'type':a132_0x3eed3e(0x103),'description':a132_0x3eed3e(0x11a)},{'name':a132_0x3eed3e(0x119),'type':a132_0x3eed3e(0x100),'description':a132_0x3eed3e(0x10d)}],async 'validate'(_0x4c28a3){validatePageTargetSelector(_0x4c28a3);},async 'dryRun'(_0x51ecaa){const _0x5c056c=a132_0x3eed3e,_0x1a1747=await buildPullPlan(_0x51ecaa);return{'method':_0x5c056c(0xf1),'url':_0x1a1747['mode']==='single'?'/smartapi/lovrabet/detail?pageId='+(_0x1a1747['items'][0x0]?.[_0x5c056c(0xf9)][_0x5c056c(0xf7)]??''):_0x5c056c(0x11f),'body':{'appCode':_0x51ecaa[_0x5c056c(0xe8)],'mode':_0x1a1747[_0x5c056c(0xed)],'targetDatasetCode':_0x1a1747[_0x5c056c(0xff)]??null,'pages':_0x1a1747[_0x5c056c(0x108)]['map'](toPreviewItem)},'description':serializeDryRunDescription({'mode':_0x1a1747[_0x5c056c(0xed)],'datasetCode':_0x1a1747[_0x5c056c(0xff)]??null,'totalCandidates':_0x1a1747[_0x5c056c(0x108)][_0x5c056c(0xf3)],'totalWouldPull':_0x1a1747['items'][_0x5c056c(0x11c)](_0x171ddc=>_0x171ddc['status']===_0x5c056c(0x105))['length'],'totalConflicts':_0x1a1747[_0x5c056c(0x108)]['filter'](_0x4cac41=>_0x4cac41[_0x5c056c(0x10f)]===_0x5c056c(0x11e))[_0x5c056c(0xf3)]})};},async 'execute'(_0x5b74d9){const _0x26ce98=a132_0x3eed3e,_0x2584fd=loadPageProjectConfig(_0x5b74d9['appCode']),_0x49437f=await readPageLockFile(_0x2584fd[_0x26ce98(0x109)]),{lockData:_0x5c2071,appLock:_0x50c4ad}=ensurePageLockScope(_0x49437f??createEmptyPageLock(),_0x5b74d9[_0x26ce98(0xe8)]),_0x1e2e00=await buildPullPlan(_0x5b74d9),_0x226ca4=_0x5b74d9[_0x26ce98(0x120)](_0x26ce98(0x119));if(_0x1e2e00['mode']===_0x26ce98(0x10e)&&_0x1e2e00[_0x26ce98(0x108)][0x0]?.[_0x26ce98(0x10f)]===_0x26ce98(0x11e)&&!_0x226ca4)throw CliErrors[_0x26ce98(0x104)]('Local\x20page\x20file\x20has\x20unsynced\x20changes:\x20'+_0x1e2e00[_0x26ce98(0x108)][0x0][_0x26ce98(0x10c)],_0x26ce98(0x117));const _0x2c97ca=[],_0x321547=[];for(const _0xd7bd60 of _0x1e2e00[_0x26ce98(0x108)]){if(_0xd7bd60[_0x26ce98(0x10f)]==='conflict'&&!_0x226ca4){_0x321547[_0x26ce98(0x116)]({'pageId':_0xd7bd60['detail']['pageId'],'type':_0xd7bd60['detail'][_0x26ce98(0xef)],'title':_0xd7bd60['detail']['name'],'localPath':_0xd7bd60[_0x26ce98(0x10c)],'reason':_0xd7bd60[_0x26ce98(0xe9)]??_0x26ce98(0xfd)});continue;}await ensureParentDirectory(_0xd7bd60[_0x26ce98(0x10c)]);const _0x25d645=serializePageSchemaForFile(_0xd7bd60['detail'][_0x26ce98(0xeb)]);await writeFile(_0xd7bd60[_0x26ce98(0x10c)],_0x25d645,_0x26ce98(0x121)),_0x50c4ad['pages'][String(_0xd7bd60['detail'][_0x26ce98(0xf7)])]=buildLockEntry(_0xd7bd60[_0x26ce98(0xf9)],_0x25d645),_0x2c97ca[_0x26ce98(0x116)]({'pageId':_0xd7bd60[_0x26ce98(0xf9)][_0x26ce98(0xf7)],'type':_0xd7bd60[_0x26ce98(0xf9)][_0x26ce98(0xef)],'title':_0xd7bd60['detail']['name'],'localPath':_0xd7bd60['localPath']});}return _0x50c4ad['lastSync']=new Date()[_0x26ce98(0xe3)](),await writePageLockFile(_0x2584fd[_0x26ce98(0x109)],_0x5c2071),{'ok':!![],'message':_0x26ce98(0xe4)+_0x2c97ca[_0x26ce98(0xf3)]+'\x20pulled,\x20'+_0x321547[_0x26ce98(0xf3)]+_0x26ce98(0x107),'data':{'appCode':_0x5b74d9['appCode'],'pulledPages':_0x2c97ca,'skippedPages':_0x321547,'totalPulled':_0x2c97ca['length'],'totalSkipped':_0x321547[_0x26ce98(0xf3)]}};}};function a132_0x2865(_0x1fb603,_0x5e94ef){_0x1fb603=_0x1fb603-0xdf;const _0x5026d0=a132_0x5026();let _0x286532=_0x5026d0[_0x1fb603];return _0x286532;}async function buildPullPlan(_0x58ba50){const _0x524fc5=a132_0x3eed3e,_0x2b4ba9=loadPageProjectConfig(_0x58ba50[_0x524fc5(0xe8)]),_0x354a33=await readPageLockFile(_0x2b4ba9[_0x524fc5(0x109)]),{appLock:_0x13bf40}=ensurePageLockScope(_0x354a33??createEmptyPageLock(),_0x58ba50[_0x524fc5(0xe8)]),_0x29966e=getPageIdFlag(_0x58ba50);if(_0x29966e!==undefined){const _0x17ef72=await loadPageDetailForPage(_0x58ba50,_0x29966e);return{'mode':_0x524fc5(0x10e),'items':[await inspectPullTarget(_0x2b4ba9,_0x13bf40['pages'][String(_0x17ef72[_0x524fc5(0xf7)])],_0x17ef72)]};}const _0x1f5312=await loadDatasetDetailForPage(_0x58ba50),_0x53c7d9=_0x1f5312[_0x524fc5(0xe2)][_0x524fc5(0x11c)](_0x5dee31=>!_0x5dee31[_0x524fc5(0xf2)]);if(_0x53c7d9[_0x524fc5(0xf3)]===0x0)throw CliErrors[_0x524fc5(0x104)](_0x524fc5(0x10b)+_0x1f5312['code']+_0x524fc5(0xf8));const _0x19c73f=await Promise[_0x524fc5(0xe6)](_0x53c7d9[_0x524fc5(0xe7)](_0x59b183=>loadPageDetailForPage(_0x58ba50,_0x59b183['id']))),_0x12c395=selectVersionTagGroup(_0x19c73f,_0x2709ba=>_0x2709ba['versionTag'],_0x58ba50[_0x524fc5(0xfc)](_0x524fc5(0xea)));return{'mode':_0x524fc5(0x101),'datasetCode':_0x1f5312['code'],'items':await Promise['all'](_0x12c395[_0x524fc5(0x108)][_0x524fc5(0xe7)](_0x3bc81d=>inspectPullTarget(_0x2b4ba9,_0x13bf40[_0x524fc5(0xec)][String(_0x3bc81d[_0x524fc5(0xf7)])],_0x3bc81d)))};}async function inspectPullTarget(_0xbb3386,_0x11652b,_0x9a08d9){const _0x8c2e78=a132_0x3eed3e,_0x1b95b0=resolvePageFilePath(_0xbb3386,_0x9a08d9['pageId'],_0x9a08d9[_0x8c2e78(0xef)]),_0x41ab9c=await fileExists(_0x1b95b0);if(!_0x41ab9c){const _0x9e0be3=serializePageSchemaForFile(_0x9a08d9[_0x8c2e78(0xeb)]);return{'detail':_0x9a08d9,'localPath':_0x1b95b0,'localHash':computePageContentHash(_0x9e0be3),'status':'would_pull'};}const _0x5485b5=await computePageFileHash(_0x1b95b0);if(!_0x11652b||_0x5485b5!==_0x11652b[_0x8c2e78(0xf4)])return{'detail':_0x9a08d9,'localPath':_0x1b95b0,'localHash':_0x5485b5,'status':'conflict','reason':_0x8c2e78(0xfd)};return{'detail':_0x9a08d9,'localPath':_0x1b95b0,'localHash':_0x5485b5,'status':_0x8c2e78(0x105)};}function buildLockEntry(_0x422444,_0x4898a8){const _0x5b4b0b=a132_0x3eed3e;return{'hash':computePageContentHash(_0x4898a8),'pageId':_0x422444[_0x5b4b0b(0xf7)],'pageVersion':_0x422444[_0x5b4b0b(0x102)],'type':_0x422444[_0x5b4b0b(0xef)],'title':_0x422444['name'],'datasetIds':_0x422444[_0x5b4b0b(0xe5)],'versionTag':_0x422444[_0x5b4b0b(0x110)]};}function toPreviewItem(_0x393ef8){const _0x2c7883=a132_0x3eed3e;return{'pageId':_0x393ef8[_0x2c7883(0xf9)]['pageId'],'type':_0x393ef8[_0x2c7883(0xf9)][_0x2c7883(0xef)],'title':_0x393ef8[_0x2c7883(0xf9)][_0x2c7883(0x11d)],'localPath':_0x393ef8[_0x2c7883(0x10c)],'status':_0x393ef8[_0x2c7883(0x10f)],..._0x393ef8[_0x2c7883(0xe9)]?{'reason':_0x393ef8[_0x2c7883(0xe9)]}:{}};}
|