@lovrabet/rabetbase-cli 2.5.1-beta.2 → 2.5.1-beta.4
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/api/generate-sdk-config-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/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.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/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.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/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.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-restore.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/dataset/user-deleted-field-list.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-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.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/table-diff-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/deployment/auto-sync.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/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/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.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/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/template.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.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/sync.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/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.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/upgrade.js +1 -1
- package/lib/commands/registry.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/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/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.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/deployment-sync.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-routing.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/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.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.d.ts +0 -16
- 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/kb-search-client.d.ts +30 -0
- package/lib/core/kb-search-client.js +1 -0
- 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.d.ts +1 -0
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.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/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/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
- package/skills/rabetbase/SKILL.md +2 -2
- package/skills/rabetbase/references/rabetbase-config.md +1 -1
- package/skills/rabetbase/references/rabetbase-doctor.md +1 -1
- package/skills/rabetbase/references/rabetbase-kb.md +8 -7
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a151_0x582161=a151_0x1f3d;(function(_0x218f1a,_0x18e0ff){const _0x209d90=a151_0x1f3d,_0x166e74=_0x218f1a();while(!![]){try{const _0x11e5ea=-parseInt(_0x209d90(0xf6))/0x1*(-parseInt(_0x209d90(0xde))/0x2)+-parseInt(_0x209d90(0xe7))/0x3+-parseInt(_0x209d90(0xee))/0x4+-parseInt(_0x209d90(0xeb))/0x5+-parseInt(_0x209d90(0xdc))/0x6+parseInt(_0x209d90(0xfb))/0x7*(parseInt(_0x209d90(0xed))/0x8)+parseInt(_0x209d90(0xf2))/0x9*(parseInt(_0x209d90(0xf5))/0xa);if(_0x11e5ea===_0x18e0ff)break;else _0x166e74['push'](_0x166e74['shift']());}catch(_0x197bb3){_0x166e74['push'](_0x166e74['shift']());}}}(a151_0x1f69,0xd4c2d));function a151_0x1f3d(_0x33cecb,_0xcaa243){_0x33cecb=_0x33cecb-0xd9;const _0x1f6994=a151_0x1f69();let _0x1f3db5=_0x1f6994[_0x33cecb];return _0x1f3db5;}import{getCustomPageSource,publishCustomPage}from'../../../core/api-client.js';function a151_0x1f69(){const _0x2c3a40=['pageId','page','3539748LkAIuL','Optional\x20publish\x20remark','66644JhOWHw','string','isInteger','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20published\x20page\x20could\x20not\x20be\x20generated.','warnings','POST','custom-publish','push','pageCode','1468260nGkPlX','appCode','unknown','status','7252925HtomEf','remark','8ruGZnG','5567976XBENEe','apiError','runtimePageUrl','Would\x20publish\x20Custom\x20Page\x20','297MDtCRC','Published\x20Custom\x20Page\x20','FORMAL','716190sMrnTw','36WjZjTT','/smartapi/webcode/file/publish','Custom\x20Page\x20ID','trim','write','8612849xIOJpE','Custom\x20Page\x20publish\x20did\x20not\x20return\x20the\x20expected\x20page\x20ID.','Publish\x20the\x20latest\x20saved\x20content\x20of\x20a\x20Custom\x20Page','compress','cookie','page.custom-publish'];a151_0x1f69=function(){return _0x2c3a40;};return a151_0x1f69();}import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomPublish={'service':a151_0x582161(0xdb),'command':a151_0x582161(0xe4),'description':a151_0x582161(0xfd),'risk':a151_0x582161(0xfa),'defaultOutputFormat':a151_0x582161(0xfe),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':'number','required':!![],'description':a151_0x582161(0xf8)},{'name':a151_0x582161(0xec),'type':a151_0x582161(0xdf),'description':a151_0x582161(0xdd)}],async 'validate'(_0x1c5388){readCustomPageId(_0x1c5388);},async 'dryRun'(_0x58f606){const _0xb22f78=a151_0x582161,_0x2de168=readInput(_0x58f606);return{'method':_0xb22f78(0xe3),'url':_0xb22f78(0xf7),'body':{'id':_0x2de168[_0xb22f78(0xda)],..._0x2de168[_0xb22f78(0xec)]?{'remark':_0x2de168[_0xb22f78(0xec)]}:{}},'description':_0xb22f78(0xf1)+_0x2de168['pageId']+'.'};},async 'execute'(_0xe645ca){const _0x56d86d=a151_0x582161,_0x3eeb0=readInput(_0xe645ca);await getCustomPageSource(_0x3eeb0['pageId']);const _0x3b6a1f=await publishCustomPage(_0x3eeb0);if(!Number[_0x56d86d(0xe0)](_0x3b6a1f)||_0x3b6a1f!==_0x3eeb0[_0x56d86d(0xda)])throw CliErrors['apiError'](_0x56d86d(0xfc));const _0x45e72b=await getCustomPageSource(_0x3eeb0[_0x56d86d(0xda)]);if(_0x45e72b[_0x56d86d(0xea)]!==_0x56d86d(0xf4))throw CliErrors[_0x56d86d(0xef)]('Custom\x20Page\x20publish\x20did\x20not\x20reach\x20published\x20status:\x20'+(_0x45e72b['status']??_0x56d86d(0xe9))+'.');const _0x36f571=_0x45e72b[_0x56d86d(0xe8)]?.[_0x56d86d(0xf9)](),_0x5d2300=buildCustomPageEditUrl(_0x36f571,_0x3eeb0['pageId']),_0x7fa982=await resolveCustomPageDevelopmentUrl(_0x36f571,_0x3eeb0['pageId'],_0xe645ca[_0x56d86d(0xff)]),_0x406e7c=buildMutationData(_0x3eeb0,!![],_0x7fa982,_0x5d2300);_0x36f571&&!_0x7fa982&&_0x406e7c[_0x56d86d(0xe2)][_0x56d86d(0xe5)]('Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.');const _0x3d3530=buildCustomPageRuntimeUrl(_0x45e72b[_0x56d86d(0xe8)],_0x45e72b[_0x56d86d(0xe6)]);return _0x3d3530?_0x406e7c[_0x56d86d(0xf0)]=_0x3d3530:_0x406e7c['warnings']['push'](_0x56d86d(0xe1)),{'ok':!![],'data':_0x406e7c,'message':_0x56d86d(0xf3)+_0x3eeb0[_0x56d86d(0xda)]+'.'};}};function readInput(_0x1cce9b){const _0x2bb4b3=a151_0x582161,_0x2fa729=readCustomPageId(_0x1cce9b),_0x22e351=_0x1cce9b['str']('remark')[_0x2bb4b3(0xf9)]();return{'pageId':_0x2fa729,..._0x22e351?{'remark':_0x22e351}:{}};}function buildMutationData(_0x4c64a9,_0x4049b7=![],_0x143fe5,_0x193964){const _0x38e4ff=a151_0x582161;return{'operation':_0x38e4ff(0xd9),'selector':{'pageId':_0x4c64a9[_0x38e4ff(0xda)]},'before':null,'after':{'pageId':_0x4c64a9[_0x38e4ff(0xda)],'status':_0x38e4ff(0xf4)},'dryRun':!_0x4049b7,'request':_0x4c64a9,..._0x143fe5?{'pageUrl':_0x143fe5}:{},..._0x193964?{'editPageUrl':_0x193964}:{},'warnings':[]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a152_0x360fb5=a152_0x18f4;(function(_0x51e7cd,_0x339f7d){const _0x57dd0f=a152_0x18f4,_0x37d792=_0x51e7cd();while(!![]){try{const _0x1d0cef=parseInt(_0x57dd0f(0x197))/0x1*(-parseInt(_0x57dd0f(0x19d))/0x2)+-parseInt(_0x57dd0f(0x191))/0x3*(-parseInt(_0x57dd0f(0x1a1))/0x4)+parseInt(_0x57dd0f(0x196))/0x5+parseInt(_0x57dd0f(0x193))/0x6+-parseInt(_0x57dd0f(0x18b))/0x7+-parseInt(_0x57dd0f(0x19e))/0x8+parseInt(_0x57dd0f(0x190))/0x9*(-parseInt(_0x57dd0f(0x19b))/0xa);if(_0x1d0cef===_0x339f7d)break;else _0x37d792['push'](_0x37d792['shift']());}catch(_0x1ed7df){_0x37d792['push'](_0x37d792['shift']());}}}(a152_0x11ed,0x5cfc9));import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';function a152_0x11ed(){const _0x48ae54=['flagMissing','length','num','find','3174597yWegVL','477gThndm','Optional\x20app\x20code\x20resolved\x20from\x20page\x20ID\x20when\x20omitted','3683724iuWJoC','--page-content\x20must\x20be\x20a\x20JSON\x20object\x20whose\x20values\x20are\x20file\x20content\x20strings.','page-content','2261115ZIqSTA','61349zJIFNo','object','type','join','20rkhffV','/ide/','2ztoHyF','2985920qDDyeZ','--id\x20must\x20be\x20a\x20positive\x20integer.','menus','17236FxXWSA','react','map','validation','Invalid\x20Custom\x20Page\x20content:\x20','some','message','file','isArray','trim','isInteger','--page-content\x20must\x20be\x20valid\x20JSON.','1612660dJUvUI'];a152_0x11ed=function(){return _0x48ae54;};return a152_0x11ed();}import{getAppBaseUrl,getPublishedAppDomain}from'../../../constant/domain.js';import{CliErrors}from'../../../errors.js';import{validateCustomPageSourceFiles}from'./syntax.js';export const CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL={...APPCODE_FLAG_OPTIONAL,'description':a152_0x360fb5(0x192)};function a152_0x18f4(_0x428865,_0x299896){_0x428865=_0x428865-0x180;const _0x11edaa=a152_0x11ed();let _0x18f41b=_0x11edaa[_0x428865];return _0x18f41b;}function trimOptional(_0x5cae52){return _0x5cae52?.['trim']()||undefined;}export function buildCustomPageRuntimeUrl(_0x157153,_0x9fbc07){const _0x5e2859=trimOptional(_0x157153),_0x2e58b2=trimOptional(_0x9fbc07);if(!_0x5e2859||!_0x2e58b2)return undefined;return getPublishedAppDomain(_0x5e2859)+'/'+encodeURIComponent(_0x2e58b2);}export function buildCustomPageDevelopmentUrl(_0x19173e,_0x2e5e72){const _0x2bca79=trimOptional(_0x19173e),_0x1a9f09=trimOptional(_0x2e5e72);if(!_0x2bca79||!_0x1a9f09)return undefined;return getAppBaseUrl(_0x2bca79)+'/pages/'+encodeURIComponent(_0x1a9f09);}export async function resolveCustomPageDevelopmentUrl(_0x1f8e21,_0x4cdc84,_0x12f806){const _0x2bd721=a152_0x360fb5,_0x31856e=trimOptional(_0x1f8e21);if(!_0x31856e)return undefined;try{const _0x25062c=(await fetchMenuSnapshot(_0x31856e,_0x12f806))[_0x2bd721(0x1a0)][_0x2bd721(0x18f)](_0x3519d7=>_0x3519d7[_0x2bd721(0x199)]===_0x2bd721(0x180)&&_0x3519d7['pageId']===_0x4cdc84);return buildCustomPageDevelopmentUrl(_0x31856e,_0x25062c?.['path']);}catch{return undefined;}}export function buildCustomPageEditUrl(_0x30d961,_0x53ab6d){const _0xfafcb3=a152_0x360fb5,_0x46ce02=trimOptional(_0x30d961);if(!_0x46ce02)return;const _0x506806=trimOptional(_0x53ab6d==null?undefined:String(_0x53ab6d));if(!_0x506806)return;return getAppBaseUrl(_0x46ce02)+_0xfafcb3(0x19c)+encodeURIComponent(_0x506806);}export function parseCustomPageContent(_0x29bdd0){const _0x3db3df=a152_0x360fb5;if(!_0x29bdd0[_0x3db3df(0x188)]())throw CliErrors[_0x3db3df(0x18c)](_0x3db3df(0x195));let _0x45e820;try{_0x45e820=JSON['parse'](_0x29bdd0);}catch{throw CliErrors['validation'](_0x3db3df(0x18a));}if(typeof _0x45e820!==_0x3db3df(0x198)||_0x45e820===null||Array[_0x3db3df(0x187)](_0x45e820)||Object['values'](_0x45e820)[_0x3db3df(0x184)](_0x19fb4b=>typeof _0x19fb4b!=='string'))throw CliErrors[_0x3db3df(0x182)](_0x3db3df(0x194));return _0x45e820;}export async function validateCustomPageContent(_0xb1a7ee){const _0x42ec9a=a152_0x360fb5,_0x2798cd=await validateCustomPageSourceFiles(_0xb1a7ee);if(_0x2798cd[_0x42ec9a(0x18d)]>0x0)throw CliErrors['validation'](_0x42ec9a(0x183)+_0x2798cd[_0x42ec9a(0x181)](_0x2a3f07=>_0x2a3f07[_0x42ec9a(0x186)]+':\x20'+_0x2a3f07[_0x42ec9a(0x185)])[_0x42ec9a(0x19a)](';\x20'));}export function readCustomPageId(_0x3b50b0){const _0x27bcab=a152_0x360fb5,_0x3a342c=_0x3b50b0[_0x27bcab(0x18e)]('id');if(!Number[_0x27bcab(0x189)](_0x3a342c)||_0x3a342c<=0x0)throw CliErrors[_0x27bcab(0x182)](_0x27bcab(0x19f));return _0x3a342c;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a153_0x3a43f3=a153_0x11bf;(function(_0x25732a,_0x1afc97){const _0x21a475=a153_0x11bf,_0x5259b0=_0x25732a();while(!![]){try{const _0x2a9501=parseInt(_0x21a475(0x1a9))/0x1+parseInt(_0x21a475(0x1a8))/0x2+parseInt(_0x21a475(0x1a5))/0x3+parseInt(_0x21a475(0x199))/0x4*(-parseInt(_0x21a475(0x197))/0x5)+-parseInt(_0x21a475(0x195))/0x6*(-parseInt(_0x21a475(0x1a4))/0x7)+parseInt(_0x21a475(0x1a7))/0x8*(-parseInt(_0x21a475(0x198))/0x9)+-parseInt(_0x21a475(0x19e))/0xa*(parseInt(_0x21a475(0x1a1))/0xb);if(_0x2a9501===_0x1afc97)break;else _0x5259b0['push'](_0x5259b0['shift']());}catch(_0x2eec28){_0x5259b0['push'](_0x5259b0['shift']());}}}(a153_0x264b,0x61cf8));import{format}from'prettier';function a153_0x11bf(_0x2bfd72,_0x156b7c){_0x2bfd72=_0x2bfd72-0x193;const _0x264b4b=a153_0x264b();let _0x11bfde=_0x264b4b[_0x2bfd72];return _0x11bfde;}const SOURCE_PARSERS={'.js':a153_0x3a43f3(0x1a0),'.jsx':a153_0x3a43f3(0x1a0),'.ts':'typescript','.tsx':a153_0x3a43f3(0x1aa)},CUSTOM_PAGE_EXTENSIONS=[a153_0x3a43f3(0x1a2),a153_0x3a43f3(0x19d)];export async function validateCustomPageSourceFiles(_0x3c93f4){const _0x2b7e14=a153_0x3a43f3,_0x41ca00=Object[_0x2b7e14(0x19a)](_0x3c93f4)[_0x2b7e14(0x19c)](([_0x110089])=>getParser(_0x110089));if(!_0x41ca00[_0x2b7e14(0x1a3)](([_0x3c7124])=>isReactSourceFile(_0x3c7124)))return[{'file':'page-content','message':_0x2b7e14(0x194)}];const _0x5e0e0c=await Promise['all'](_0x41ca00[_0x2b7e14(0x196)](async([_0x4cca87,_0x35f688])=>{try{return await format(_0x35f688,{'parser':getParser(_0x4cca87)}),undefined;}catch(_0x24fb61){return{'file':_0x4cca87,'message':_0x24fb61 instanceof Error?_0x24fb61['message']:String(_0x24fb61)};}}));return _0x5e0e0c[_0x2b7e14(0x19c)](_0x330e6a=>_0x330e6a!==undefined);}function a153_0x264b(){const _0x5e88b3=['.tsx','11445960OXyHPT','endsWith','babel','11JXguJx','.jsx','some','72562ieczak','2328717UOikQZ','trim','468088NnQEpz','1371572YvnjsR','546880Pgwjkh','typescript','toLowerCase','Missing\x20React\x20source\x20file\x20with\x20extension\x20.jsx\x20or\x20.tsx','312vdSqOW','map','3843325lGkdzl','36GKdjKX','4QJSXcJ','entries','find','filter'];a153_0x264b=function(){return _0x5e88b3;};return a153_0x264b();}function getParser(_0x44fb4c){const _0x53b2f7=a153_0x3a43f3,_0x11bbd6=_0x44fb4c['trim']()[_0x53b2f7(0x193)]();return Object['entries'](SOURCE_PARSERS)[_0x53b2f7(0x19b)](([_0x534036])=>_0x11bbd6[_0x53b2f7(0x19f)](_0x534036))?.[0x1];}function isReactSourceFile(_0x15c306){const _0x494a2b=a153_0x3a43f3,_0x281ab2=_0x15c306[_0x494a2b(0x1a6)]()[_0x494a2b(0x193)]();return CUSTOM_PAGE_EXTENSIONS[_0x494a2b(0x1a3)](_0x12f05f=>_0x281ab2[_0x494a2b(0x19f)](_0x12f05f));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3d905d,_0x51000c){const _0x23e677=a154_0x1e4d,_0x315d12=_0x3d905d();while(!![]){try{const _0x284fb5=-parseInt(_0x23e677(0x115))/0x1*(-parseInt(_0x23e677(0x110))/0x2)+parseInt(_0x23e677(0x120))/0x3+parseInt(_0x23e677(0x11e))/0x4+parseInt(_0x23e677(0x10f))/0x5+parseInt(_0x23e677(0x117))/0x6*(parseInt(_0x23e677(0x11c))/0x7)+-parseInt(_0x23e677(0x11f))/0x8+-parseInt(_0x23e677(0x11d))/0x9;if(_0x284fb5===_0x51000c)break;else _0x315d12['push'](_0x315d12['shift']());}catch(_0x3edf1f){_0x315d12['push'](_0x315d12['shift']());}}}(a154_0x4afd,0xa8061));function buildIndexFile(_0x3cdbc9){const _0x3ad09f=a154_0x1e4d;return _0x3ad09f(0x111)+JSON['stringify'](_0x3cdbc9)+'}</Typography.Title>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<Typography.Paragraph>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{$i18n.t(\x27pageDescription\x27,\x20\x27这是一个基础页面模板,你可以在此基础上进行开发。\x27)}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</Typography.Paragraph>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</Typography>\x0a\x20\x20\x20\x20\x20\x20</Card>\x0a\x20\x20\x20\x20</div>\x0a\x20\x20);\x0a};\x0a\x0aexport\x20default\x20App;\x0a';}function a154_0x1e4d(_0x24cfbb,_0x3ed233){_0x24cfbb=_0x24cfbb-0x10e;const _0x4afdf8=a154_0x4afd();let _0x1e4d52=_0x4afdf8[_0x24cfbb];return _0x1e4d52;}function buildStyleFile(){const _0xbf569a=a154_0x1e4d;return _0xbf569a(0x119);}function a154_0x4afd(){const _0x56093b=['id-ID','6119730AieWNj','60020slkIvi','import\x20React\x20from\x20\x27react\x27;\x0aimport\x20{\x20Card,\x20Typography\x20}\x20from\x20\x27antd\x27;\x0aimport\x20{\x20useSdkClient,\x20useI18n,\x20useNavigate,\x20useLocation\x20}\x20from\x20\x22@/context/app-context\x22;\x0aimport\x20{\x20locales\x20}\x20from\x20\x27../locales\x27;\x0aimport\x20\x27./index.css\x27;\x0a\x0aconst\x20App\x20=\x20()\x20=>\x20{\x0a\x20\x20const\x20client\x20=\x20useSdkClient();\x20//\x20client\x20可以用于获取其他数据集的数据\x0a\x20\x20const\x20$i18n\x20=\x20useI18n();\x20//\x20国际化多语言\x20i18n\x20实例\x0a\x20\x20const\x20navigate\x20=\x20useNavigate();\x20//\x20react-router\x20navigate\x20导航实例\x0a\x20\x20const\x20location\x20=\x20useLocation();\x20//\x20浏览器\x20location\x20实例\x0a\x0a\x20\x20$i18n.addLocale(locales);\x20//\x20添加多语言词包\x0a\x0a\x20\x20return\x20(\x0a\x20\x20\x20\x20<div\x20className=\x22page-container\x22>\x0a\x20\x20\x20\x20\x20\x20<Card>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<Typography>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<Typography.Title\x20level={2}>{','\x0a};\x0a','join','tr-TR','35kBanpq','This\x20is\x20a\x20basic\x20page\x20template,\x20you\x20can\x20develop\x20based\x20on\x20it.','2634xQKKAj','Bu\x20bir\x20temel\x20sayfa\x20şablonudur.\x20Bu\x20temaplana\x20dayanarak\x20geliştirilebilir.','.page-container\x20{\x0a\x20\x20padding:\x2024px;\x0a\x20\x20background:\x20#f0f2f5;\x0a\x20\x20min-height:\x20100vh;\x0a}\x0a','pageDescription','stringify','13902YRntRJ','22136913PLLgIQ','3641840ohliAs','10882512xgvyCz','1354758hwpmPL','这是一个基础页面模板,你可以在此基础上进行开发。',',\x0a\x20\x20}','en-US','map',':\x20{\x0a\x20\x20\x20\x20'];a154_0x4afd=function(){return _0x56093b;};return a154_0x4afd();}function buildLocalesFile(_0x59c1cb){const _0x483ba8=a154_0x1e4d,_0x5968af=_0x59c1cb[_0x483ba8(0x124)](_0x408518=>{const _0x5bd311=_0x483ba8;let _0x431472='';switch(_0x408518){case'zh-CN':_0x431472=_0x5bd311(0x121);break;case _0x5bd311(0x123):_0x431472=_0x5bd311(0x116);break;case'ja-JP':_0x431472='これは基本ページテンプレートです。あなたは、これに基づいて開発できます。';break;case _0x5bd311(0x114):_0x431472=_0x5bd311(0x118);break;case _0x5bd311(0x10e):_0x431472='Ini\x20adalah\x20sebuah\x20halaman\x20dasar.\x20Anda\x20dapat\x20mengembangkan\x20ini.';break;default:_0x431472=_0x5bd311(0x116);}return'\x20\x20'+JSON[_0x5bd311(0x11b)](_0x408518)+_0x5bd311(0x125)+JSON[_0x5bd311(0x11b)](_0x5bd311(0x11a))+':\x20'+JSON['stringify'](_0x431472)+_0x5bd311(0x122);})[_0x483ba8(0x113)](',\x0a');return'export\x20const\x20locales\x20=\x20{\x0a'+_0x5968af+_0x483ba8(0x112);}export function buildInitialFiles(_0x349444,_0x58ee00){return{'src/app/index.jsx':buildIndexFile(_0x349444),'src/app/index.css':buildStyleFile(),'src/locales/index.js':buildLocalesFile(_0x58ee00)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a155_0x38ed21=a155_0x22f2;(function(_0x1dfc8f,_0x59138d){const _0xfd635e=a155_0x22f2,_0x48a8b2=_0x1dfc8f();while(!![]){try{const _0xcfbf54=-parseInt(_0xfd635e(0x9f))/0x1*(parseInt(_0xfd635e(0x95))/0x2)+parseInt(_0xfd635e(0x7e))/0x3+parseInt(_0xfd635e(0x9c))/0x4+-parseInt(_0xfd635e(0x9b))/0x5+-parseInt(_0xfd635e(0x97))/0x6*(parseInt(_0xfd635e(0x8f))/0x7)+-parseInt(_0xfd635e(0x91))/0x8*(-parseInt(_0xfd635e(0x8b))/0x9)+parseInt(_0xfd635e(0xa0))/0xa;if(_0xcfbf54===_0x59138d)break;else _0x48a8b2['push'](_0x48a8b2['shift']());}catch(_0x39a9e9){_0x48a8b2['push'](_0x48a8b2['shift']());}}}(a155_0x1c7b,0x642bb));import{getCustomPageSource,updateCustomPageContent}from'../../../core/api-client.js';function a155_0x22f2(_0x41a333,_0x33289c){_0x41a333=_0x41a333-0x7d;const _0x1c7b7d=a155_0x1c7b();let _0x22f24e=_0x1c7b7d[_0x41a333];return _0x22f24e;}function a155_0x1c7b(){const _0xd6234e=['apiError','appcode','Custom\x20Page\x20ID','page-content','string','Complete\x20page\x20files\x20as\x20JSON','write','2926413nuxrWp','Custom\x20Page\x20was\x20updated,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','isInteger','custom-update','123823NNKLHy','appCode','16wvIgGj','Custom\x20Page\x20update\x20did\x20not\x20create\x20a\x20new\x20version.','number','trim','16CNXbSp','newVersion','66ISGyvu','pageContent','pageId','cookie','1783595Caoogi','620620IMdUTe','Cannot\x20determine\x20the\x20appCode\x20for\x20Custom\x20Page\x20','Save\x20all\x20files\x20of\x20a\x20Custom\x20Page','77276hXWowO','3484620EUeqkS','/smartapi/webcode/page/update/content','1277622JbuwnW','Updated\x20Custom\x20Page\x20','str','compress','page','Would\x20save\x20all\x20files\x20of\x20Custom\x20Page\x20'];a155_0x1c7b=function(){return _0xd6234e;};return a155_0x1c7b();}import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,parseCustomPageContent,resolveCustomPageDevelopmentUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,validateCustomPageContent}from'./shared.js';export const pageCustomUpdate={'service':a155_0x38ed21(0x82),'command':a155_0x38ed21(0x8e),'description':a155_0x38ed21(0x9e),'risk':a155_0x38ed21(0x8a),'defaultOutputFormat':a155_0x38ed21(0x81),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a155_0x38ed21(0x93),'required':!![],'description':a155_0x38ed21(0x86)},{'name':a155_0x38ed21(0x87),'type':a155_0x38ed21(0x88),'required':!![],'description':a155_0x38ed21(0x89)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x351540){const _0x238b4d=a155_0x38ed21;readCustomPageId(_0x351540),await validateCustomPageContent(parseCustomPageContent(_0x351540[_0x238b4d(0x80)](_0x238b4d(0x87))));},async 'dryRun'(_0x13a8d3){const _0x4b6117=a155_0x38ed21,_0x3f5f63=await readInput(_0x13a8d3);return{'method':'POST','url':_0x4b6117(0x7d),'body':{'id':_0x3f5f63[_0x4b6117(0x99)],'codeContent':_0x3f5f63[_0x4b6117(0x98)]},'description':_0x4b6117(0x83)+_0x3f5f63['pageId']+'.'};},async 'execute'(_0x2c339b){const _0x2064e0=a155_0x38ed21,_0x466d1a=await readInput(_0x2c339b),_0x50d570=await updateCustomPageContent({'pageId':_0x466d1a[_0x2064e0(0x99)],'pageContent':_0x466d1a[_0x2064e0(0x98)]});if(!Number[_0x2064e0(0x8d)](_0x50d570[_0x2064e0(0x96)])||_0x50d570[_0x2064e0(0x96)]<=0x0)throw CliErrors[_0x2064e0(0x84)](_0x2064e0(0x92));const _0x1ddd65=buildCustomPageEditUrl(_0x466d1a['appCode'],_0x466d1a[_0x2064e0(0x99)]),_0x50a260=await resolveCustomPageDevelopmentUrl(_0x466d1a['appCode'],_0x466d1a[_0x2064e0(0x99)],_0x2c339b[_0x2064e0(0x9a)]);return{'ok':!![],'data':buildMutationData(_0x466d1a,_0x50d570,_0x50a260,_0x1ddd65,_0x50a260?[]:[_0x2064e0(0x8c)]),'message':_0x2064e0(0x7f)+_0x466d1a[_0x2064e0(0x99)]+'.'};}};async function readInput(_0xb35d97){const _0x25dd25=a155_0x38ed21,_0x214480=readCustomPageId(_0xb35d97),_0x2f4c0a=_0xb35d97[_0x25dd25(0x80)](_0x25dd25(0x85))[_0x25dd25(0x94)]()||(await getCustomPageSource(_0x214480))[_0x25dd25(0x90)]?.[_0x25dd25(0x94)]();if(!_0x2f4c0a)throw CliErrors['validation'](_0x25dd25(0x9d)+_0x214480+'.');return{'appCode':_0x2f4c0a,'pageId':_0x214480,'pageContent':parseCustomPageContent(_0xb35d97[_0x25dd25(0x80)](_0x25dd25(0x87)))};}function buildMutationData(_0x28ca4c,_0x58a66c,_0x560cbe,_0x256161,_0x1f4348=[]){const _0x42b99d=a155_0x38ed21;return{'operation':'page.custom-update','selector':{'appCode':_0x28ca4c[_0x42b99d(0x90)],'pageId':_0x28ca4c[_0x42b99d(0x99)]},'before':null,'after':{'pageId':_0x58a66c?.[_0x42b99d(0x99)]??_0x28ca4c[_0x42b99d(0x99)],'version':_0x58a66c?.[_0x42b99d(0x96)]??null,'pageContent':_0x28ca4c[_0x42b99d(0x98)]},'dryRun':_0x58a66c===undefined,'request':_0x28ca4c,..._0x560cbe?{'pageUrl':_0x560cbe}:{},..._0x256161?{'editPageUrl':_0x256161}:{},'warnings':_0x1f4348};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a156_0x1aec77=a156_0x1eb4;(function(_0x51538c,_0x1de430){const _0x3643fc=a156_0x1eb4,_0x26a644=_0x51538c();while(!![]){try{const _0x3cfd76=parseInt(_0x3643fc(0x76))/0x1*(-parseInt(_0x3643fc(0x7d))/0x2)+parseInt(_0x3643fc(0x66))/0x3*(parseInt(_0x3643fc(0x6e))/0x4)+-parseInt(_0x3643fc(0x67))/0x5+parseInt(_0x3643fc(0x65))/0x6+-parseInt(_0x3643fc(0x7a))/0x7*(-parseInt(_0x3643fc(0x73))/0x8)+-parseInt(_0x3643fc(0x6d))/0x9*(parseInt(_0x3643fc(0x64))/0xa)+-parseInt(_0x3643fc(0x7b))/0xb;if(_0x3cfd76===_0x1de430)break;else _0x26a644['push'](_0x26a644['shift']());}catch(_0x51637c){_0x26a644['push'](_0x26a644['shift']());}}}(a156_0x1029,0xba86a));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessDataListPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';function a156_0x1029(){const _0x366d4f=['3712185gqAoCh','related-pages-fallback','read','alias','source','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','27CzLinD','4568684KYTpzG','GET','string','page','Query\x20Data\x20List\x20Page\x20facts\x20for\x20a\x20dataset','88AHjztm','relatedPages','nextAction','1254109rorRsv','query-data-list-status','length','compress','743638hTXudm','2529659KheryC','/standard-page-status?appCode=','2hfyZqR','code','status','appCode','manualResolutionRequired','/smartapi/lovrabet/dataset/','2145170lNaAiF','7939986oIZHfK','3TdbMIW'];a156_0x1029=function(){return _0x366d4f;};return a156_0x1029();}function a156_0x1eb4(_0x4322cc,_0xf627af){_0x4322cc=_0x4322cc-0x64;const _0x1029ff=a156_0x1029();let _0x1eb48e=_0x1029ff[_0x4322cc];return _0x1eb48e;}export const pageDataListStatus={'service':a156_0x1aec77(0x71),'command':'data-list-status','description':a156_0x1aec77(0x72),'risk':a156_0x1aec77(0x69),'defaultOutputFormat':a156_0x1aec77(0x79),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a156_0x1aec77(0x6a),'type':a156_0x1aec77(0x70),'description':a156_0x1aec77(0x6c)}],async 'validate'(_0x4c3547){validateDatasetSelector(_0x4c3547);},async 'dryRun'(_0x43a218){const _0x5ad4f7=a156_0x1aec77,_0x496c3d=await loadDatasetDetailForPage(_0x43a218);return{'method':_0x5ad4f7(0x6f),'url':_0x5ad4f7(0x82)+_0x496c3d['code']+_0x5ad4f7(0x7c)+encodeURIComponent(_0x43a218[_0x5ad4f7(0x80)]),'description':serializeDryRunDescription({'dataset':{'id':_0x496c3d['id'],'code':_0x496c3d['code'],'name':_0x496c3d['name']},'action':_0x5ad4f7(0x77)})};},async 'execute'(_0x563703){const _0x5e9a25=a156_0x1aec77,_0x1d9a50=await loadDatasetDetailForPage(_0x563703),_0x2c1484=await loadDataListPageStatusForGenerate(_0x563703,_0x1d9a50[_0x5e9a25(0x7e)]),_0x530b6e=getUndeletedRelatedPages(_0x1d9a50),_0x2aa82a=assessDataListPageState(_0x1d9a50[_0x5e9a25(0x7e)],_0x2c1484,{'fallbackUndeletedPages':_0x530b6e});return{'ok':!![],'data':{'datasetCode':_0x1d9a50[_0x5e9a25(0x7e)],'precheckSource':_0x2c1484?.[_0x5e9a25(0x6b)]??_0x5e9a25(0x68),'status':_0x2aa82a[_0x5e9a25(0x7f)],'manualResolutionRequired':_0x2aa82a[_0x5e9a25(0x81)],'nextAction':_0x2aa82a[_0x5e9a25(0x75)],'dataListPageStatus':_0x2c1484,'relatedPages':{'total':_0x1d9a50[_0x5e9a25(0x74)][_0x5e9a25(0x78)],'undeletedCount':_0x530b6e[_0x5e9a25(0x78)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a157_0x264da4=a157_0x4e12;(function(_0x1f5c3b,_0x311f28){const _0x4a9d0d=a157_0x4e12,_0x3958b4=_0x1f5c3b();while(!![]){try{const _0x413547=-parseInt(_0x4a9d0d(0x128))/0x1*(parseInt(_0x4a9d0d(0x113))/0x2)+parseInt(_0x4a9d0d(0x12d))/0x3*(parseInt(_0x4a9d0d(0x12a))/0x4)+parseInt(_0x4a9d0d(0x137))/0x5+-parseInt(_0x4a9d0d(0x131))/0x6*(parseInt(_0x4a9d0d(0x13c))/0x7)+-parseInt(_0x4a9d0d(0x11a))/0x8+parseInt(_0x4a9d0d(0x118))/0x9*(parseInt(_0x4a9d0d(0x13d))/0xa)+-parseInt(_0x4a9d0d(0x133))/0xb*(parseInt(_0x4a9d0d(0x117))/0xc);if(_0x413547===_0x311f28)break;else _0x3958b4['push'](_0x3958b4['shift']());}catch(_0x2557bd){_0x3958b4['push'](_0x3958b4['shift']());}}}(a157_0x143a,0x7d42f));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a157_0x143a(){const _0x50013d=['PARTIAL_SUCCESS','fieldCount','page\x20generate-start\x20does\x20not\x20accept\x20--page-pattern.','642pcgPpl','code','63305HfTPKm','DATA_LIST','boolean','bool','4019035QXMUNs','dataListPageStatus','reused','apply','currentStep','50337HmRgpf','6860730BPsBzW','DATA_LIST\x20currently\x20has\x20one\x20fixed\x20pattern:\x20CRUD_PAGE_SET.','clientOperationId','related-pages-fallback','page-type','manualResolutionRequired','alias','page\x20generate-start\x20does\x20not\x20accept\x20--page-type.','appCode','dataset','472bSZAEo','Dry-run\x20preview\x20(pass\x20--apply\x20to\x20execute\x20the\x20generation)','/smartapi/lovrabet/dataset/','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','1632RJJIyI','9uSccNR','nextAction','117120KyMjtf','status','generate-start','precheck','message','Submitted\x20a\x20generate\x20task','source','write','taskId','compress','name','Actually\x20execute\x20the\x20generation.\x20Without\x20this\x20flag,\x20only\x20a\x20dry-run\x20preview\x20is\x20shown.','Start\x20async\x20Data\x20List\x20Page\x20generation\x20from\x20a\x20dataset','CRUD_PAGE_SET','134jUtRZB','operationId','8848CNGjjq','number','page-pattern','843KdSARS'];a157_0x143a=function(){return _0x50013d;};return a157_0x143a();}import{assessGenerateOperationState,assessDataListPageState,buildPageGenerateOperationStatusQueryCommand,buildDataListPageStatusQueryCommand,createPageGenerateClientOperationId,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';import{startGenerateDataListPages}from'../../core/api-client.js';function a157_0x4e12(_0x54d5ef,_0x45009b){_0x54d5ef=_0x54d5ef-0x10b;const _0x143ac4=a157_0x143a();let _0x4e12d1=_0x143ac4[_0x54d5ef];return _0x4e12d1;}export const pageGenerateStart={'service':'page','command':a157_0x264da4(0x11c),'description':a157_0x264da4(0x126),'risk':a157_0x264da4(0x121),'defaultOutputFormat':a157_0x264da4(0x123),'rejectedFlags':[{'name':a157_0x264da4(0x10d),'message':a157_0x264da4(0x110),'hint':'This\x20command\x20always\x20generates\x20a\x20DATA_LIST\x20page\x20from\x20a\x20dataset.'},{'name':a157_0x264da4(0x12c),'message':a157_0x264da4(0x130),'hint':a157_0x264da4(0x13e)}],'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a157_0x264da4(0x10f),'type':'string','description':a157_0x264da4(0x116)},{'name':'apply','type':a157_0x264da4(0x135),'description':a157_0x264da4(0x125)}],async 'validate'(_0x285b0d){validateDatasetSelector(_0x285b0d);},async 'dryRun'(_0x46d3d3){const _0x421ee0=a157_0x264da4,_0x350a2f=await prepare(_0x46d3d3);return{'method':'POST','url':_0x421ee0(0x115)+_0x350a2f[_0x421ee0(0x112)][_0x421ee0(0x132)]+'/generate-standard-pages/start','body':{'appCode':_0x46d3d3[_0x421ee0(0x111)],'clientOperationId':_0x350a2f['clientOperationId']},'description':serializeDryRunDescription({'dataset':{'id':_0x350a2f[_0x421ee0(0x112)]['id'],'code':_0x350a2f['dataset'][_0x421ee0(0x132)],'name':_0x350a2f[_0x421ee0(0x112)][_0x421ee0(0x124)],'fieldCount':_0x350a2f['dataset'][_0x421ee0(0x12f)]},'precheckSource':_0x350a2f[_0x421ee0(0x138)]?.[_0x421ee0(0x120)]??'related-pages-fallback','action':_0x421ee0(0x11c),'clientOperationId':_0x350a2f[_0x421ee0(0x10b)],'plannedStatus':_0x350a2f['precheck']['status'],'reason':_0x350a2f[_0x421ee0(0x11d)][_0x421ee0(0x11e)]})};},async 'execute'(_0x1c401e){const _0x188ee=a157_0x264da4;if(!_0x1c401e[_0x188ee(0x136)](_0x188ee(0x13a))){const _0x5f181a=await pageGenerateStart['dryRun'](_0x1c401e);return{'ok':!![],'message':_0x188ee(0x114),'data':_0x5f181a};}const _0x23da72=await prepare(_0x1c401e);if(!_0x23da72[_0x188ee(0x11d)]['allowGenerate'])return{'ok':![],'message':_0x23da72[_0x188ee(0x11d)][_0x188ee(0x11e)],'data':{'datasetCode':_0x23da72[_0x188ee(0x112)][_0x188ee(0x132)],'pageType':'DATA_LIST','pagePattern':'CRUD_PAGE_SET','clientOperationId':_0x23da72['clientOperationId'],'precheckSource':_0x23da72[_0x188ee(0x138)]?.['source']??_0x188ee(0x10c),'status':_0x23da72['precheck'][_0x188ee(0x11b)],'manualResolutionRequired':_0x23da72[_0x188ee(0x11d)][_0x188ee(0x10e)],'nextAction':_0x23da72['precheck'][_0x188ee(0x119)],'query':{'command':buildDataListPageStatusQueryCommand(_0x23da72['dataset'][_0x188ee(0x132)],_0x1c401e[_0x188ee(0x111)])},'dataListPageStatus':_0x23da72[_0x188ee(0x138)]}};const _0x1033b4=await startGenerateDataListPages(_0x1c401e[_0x188ee(0x111)],_0x23da72['dataset'][_0x188ee(0x132)],{'clientOperationId':_0x23da72[_0x188ee(0x10b)]}),_0x5d8356=_0x1033b4[_0x188ee(0x11b)]==='SUCCESS'||_0x1033b4[_0x188ee(0x11b)]===_0x188ee(0x12e)?await loadDataListPageStatusForGenerate(_0x1c401e,_0x23da72[_0x188ee(0x112)]['code']):null,_0x1077c5=assessGenerateOperationState(_0x23da72['dataset'][_0x188ee(0x132)],_0x1033b4[_0x188ee(0x11b)],_0x5d8356);return{'ok':!![],'message':_0x1033b4['reused']?'Reusing\x20an\x20existing\x20generate\x20task':_0x188ee(0x11f),'data':{'datasetCode':_0x23da72['dataset'][_0x188ee(0x132)],'appCode':_0x1c401e[_0x188ee(0x111)],'pageType':_0x188ee(0x134),'pagePattern':_0x188ee(0x127),'taskId':_0x1033b4[_0x188ee(0x122)]??null,'operationId':_0x1033b4[_0x188ee(0x129)]??null,'clientOperationId':_0x23da72['clientOperationId'],'jobStatus':_0x1033b4['status']??null,'progressRate':typeof _0x1033b4['progressRate']===_0x188ee(0x12b)?_0x1033b4['progressRate']:null,'currentStep':_0x1033b4[_0x188ee(0x13b)]??null,'reused':_0x1033b4[_0x188ee(0x139)]===!![],'status':_0x1077c5[_0x188ee(0x11b)],'manualResolutionRequired':_0x1077c5[_0x188ee(0x10e)],'nextAction':_0x1077c5[_0x188ee(0x119)],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x23da72['dataset'][_0x188ee(0x132)],{'appCode':_0x1c401e['appCode'],'taskId':_0x1033b4[_0x188ee(0x122)],'operationId':_0x1033b4[_0x188ee(0x129)],'clientOperationId':_0x23da72['clientOperationId']})},'dataListPageStatus':_0x5d8356}};}};async function prepare(_0x519bb6){const _0x1561ac=a157_0x264da4,_0x279b31=await loadDatasetDetailForPage(_0x519bb6),_0x526ba1=await loadDataListPageStatusForGenerate(_0x519bb6,_0x279b31['code']),_0x8aa887=getUndeletedRelatedPages(_0x279b31);return{'dataset':_0x279b31,'dataListPageStatus':_0x526ba1,'clientOperationId':createPageGenerateClientOperationId(),'precheck':assessDataListPageState(_0x279b31[_0x1561ac(0x132)],_0x526ba1,{'fallbackUndeletedPages':_0x8aa887})};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a158_0x10b5b3=a158_0x1cc8;function a158_0x187a(){const _0x9e46e5=['GET','status','client-operation-id','2CBBuYt','taskId','988686LEHiRU','currentStep','operation-id','alias','name','/smartapi/lovrabet/dataset/','332gBEMcL','5556dfljCM','toString','task-id','811920wipzYR','operationId','Generic\x20task\x20id\x20returned\x20by\x20page\x20generate-start','Async\x20operation\x20id\x20returned\x20by\x20page\x20generate-start','Client\x20recovery/idempotency\x20id\x20when\x20operationId\x20is\x20unavailable\x20or\x20lost','compress','clientOperationId','read','code','string','progressRate','1584870XSThvH','PARTIAL_SUCCESS','message','appCode','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','str','manualResolutionRequired','generate-status','query-generate-operation-status','/generate-standard-pages/status?','518798bJVhxd','SUCCESS','Query\x20Data\x20List\x20Page\x20generate\x20operation\x20status','1328056HJeMcr','number','set','errorMsg','32348IkBBcG'];a158_0x187a=function(){return _0x9e46e5;};return a158_0x187a();}(function(_0x2984ce,_0x77c079){const _0x5f3e68=a158_0x1cc8,_0x420758=_0x2984ce();while(!![]){try{const _0x759aab=parseInt(_0x5f3e68(0x1d6))/0x1*(-parseInt(_0x5f3e68(0x1d2))/0x2)+-parseInt(_0x5f3e68(0x1b3))/0x3*(-parseInt(_0x5f3e68(0x1b2))/0x4)+parseInt(_0x5f3e68(0x1c1))/0x5+-parseInt(_0x5f3e68(0x1b6))/0x6+-parseInt(_0x5f3e68(0x1cb))/0x7+-parseInt(_0x5f3e68(0x1ce))/0x8+parseInt(_0x5f3e68(0x1d8))/0x9;if(_0x759aab===_0x77c079)break;else _0x420758['push'](_0x420758['shift']());}catch(_0x526413){_0x420758['push'](_0x420758['shift']());}}}(a158_0x187a,0x2a2d3));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessGenerateOperationState,buildPageGenerateOperationStatusQueryCommand,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector,validateGenerateOperationSelector}from'../../commands/page/shared.js';import{getGenerateDataListPagesStatus}from'../../core/api-client.js';function a158_0x1cc8(_0x319e7a,_0xfdb092){_0x319e7a=_0x319e7a-0x1b0;const _0x187a60=a158_0x187a();let _0x1cc864=_0x187a60[_0x319e7a];return _0x1cc864;}export const pageGenerateStatus={'service':'page','command':a158_0x10b5b3(0x1c8),'description':a158_0x10b5b3(0x1cd),'risk':a158_0x10b5b3(0x1bd),'defaultOutputFormat':a158_0x10b5b3(0x1bb),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a158_0x10b5b3(0x1db),'type':a158_0x10b5b3(0x1bf),'description':a158_0x10b5b3(0x1c5)},{'name':a158_0x10b5b3(0x1b5),'type':a158_0x10b5b3(0x1bf),'description':a158_0x10b5b3(0x1b8)},{'name':a158_0x10b5b3(0x1da),'type':a158_0x10b5b3(0x1bf),'description':a158_0x10b5b3(0x1b9)},{'name':'client-operation-id','type':a158_0x10b5b3(0x1bf),'description':a158_0x10b5b3(0x1ba)}],async 'validate'(_0x510dfb){validateDatasetSelector(_0x510dfb),validateGenerateOperationSelector(_0x510dfb);},async 'dryRun'(_0x1d714f){const _0x35170a=a158_0x10b5b3,_0x335d5d=await loadDatasetDetailForPage(_0x1d714f),_0x2339a1=_0x1d714f['str'](_0x35170a(0x1b5)),_0x28dd80=_0x1d714f[_0x35170a(0x1c6)](_0x35170a(0x1da)),_0x1bfd21=_0x1d714f[_0x35170a(0x1c6)](_0x35170a(0x1d5)),_0x6e2a25=new URLSearchParams({'appCode':_0x1d714f['appCode']});return _0x2339a1&&_0x6e2a25[_0x35170a(0x1d0)](_0x35170a(0x1d7),_0x2339a1),_0x28dd80&&_0x6e2a25[_0x35170a(0x1d0)](_0x35170a(0x1b7),_0x28dd80),_0x1bfd21&&_0x6e2a25['set'](_0x35170a(0x1bc),_0x1bfd21),{'method':_0x35170a(0x1d3),'url':_0x35170a(0x1b1)+_0x335d5d[_0x35170a(0x1be)]+_0x35170a(0x1ca)+_0x6e2a25[_0x35170a(0x1b4)](),'description':serializeDryRunDescription({'dataset':{'id':_0x335d5d['id'],'code':_0x335d5d['code'],'name':_0x335d5d[_0x35170a(0x1b0)]},'action':_0x35170a(0x1c9),'taskId':_0x2339a1||undefined,'operationId':_0x28dd80||undefined,'clientOperationId':_0x1bfd21||undefined})};},async 'execute'(_0xdd873c){const _0x792d0=a158_0x10b5b3,_0x16cf13=await loadDatasetDetailForPage(_0xdd873c),_0x55015b=_0xdd873c[_0x792d0(0x1c6)]('task-id'),_0x4b650d=_0xdd873c[_0x792d0(0x1c6)](_0x792d0(0x1da)),_0x4fcf99=_0xdd873c[_0x792d0(0x1c6)](_0x792d0(0x1d5)),_0x366916=await getGenerateDataListPagesStatus(_0xdd873c[_0x792d0(0x1c4)],_0x16cf13[_0x792d0(0x1be)],{'taskId':_0x55015b||undefined,'operationId':_0x4b650d||undefined,'clientOperationId':_0x4fcf99||undefined}),_0x57281a=_0x366916[_0x792d0(0x1d4)]===_0x792d0(0x1cc)||_0x366916[_0x792d0(0x1d4)]===_0x792d0(0x1c2),_0x25ed3b=_0x57281a?await loadDataListPageStatusForGenerate(_0xdd873c,_0x16cf13[_0x792d0(0x1be)]):null,_0x3ad052=assessGenerateOperationState(_0x16cf13[_0x792d0(0x1be)],_0x366916[_0x792d0(0x1d4)],_0x25ed3b),_0x182c9d=_0x366916[_0x792d0(0x1d7)]??_0x55015b??undefined,_0x40adc7=_0x366916[_0x792d0(0x1b7)]??_0x4b650d??undefined,_0x3a426b=_0x366916[_0x792d0(0x1bc)]??_0x4fcf99??undefined;return{'ok':!![],'message':_0x3ad052[_0x792d0(0x1d4)]==='operation_failed'?_0x366916[_0x792d0(0x1d1)]||_0x3ad052[_0x792d0(0x1c3)]:_0x3ad052['message'],'data':{'datasetCode':_0x16cf13['code'],'appCode':_0xdd873c['appCode'],'taskId':_0x182c9d,'operationId':_0x40adc7,'clientOperationId':_0x3a426b,'jobStatus':_0x366916[_0x792d0(0x1d4)]??null,'progressRate':typeof _0x366916[_0x792d0(0x1c0)]===_0x792d0(0x1cf)?_0x366916['progressRate']:null,'currentStep':_0x366916[_0x792d0(0x1d9)]??null,'errorMsg':_0x366916[_0x792d0(0x1d1)]??null,'status':_0x3ad052[_0x792d0(0x1d4)],'manualResolutionRequired':_0x3ad052[_0x792d0(0x1c7)],'nextAction':_0x3ad052['nextAction'],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x16cf13[_0x792d0(0x1be)],{'appCode':_0xdd873c[_0x792d0(0x1c4)],'taskId':_0x182c9d,'operationId':_0x40adc7,'clientOperationId':_0x3a426b})},'dataListPageStatus':_0x25ed3b,'result':_0x366916['result']??null}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xd7276d,_0x7a87d2){const _0x34771d=a159_0x14cf,_0x2705c1=_0xd7276d();while(!![]){try{const _0x403a86=-parseInt(_0x34771d(0x14a))/0x1*(-parseInt(_0x34771d(0x14c))/0x2)+parseInt(_0x34771d(0x14f))/0x3+parseInt(_0x34771d(0x154))/0x4*(parseInt(_0x34771d(0x151))/0x5)+parseInt(_0x34771d(0x14d))/0x6*(parseInt(_0x34771d(0x14b))/0x7)+-parseInt(_0x34771d(0x14e))/0x8+parseInt(_0x34771d(0x149))/0x9*(parseInt(_0x34771d(0x153))/0xa)+parseInt(_0x34771d(0x152))/0xb*(-parseInt(_0x34771d(0x150))/0xc);if(_0x403a86===_0x7a87d2)break;else _0x2705c1['push'](_0x2705c1['shift']());}catch(_0xebd0db){_0x2705c1['push'](_0x2705c1['shift']());}}}(a159_0x571f,0x901e2));import{pageGenerateStart}from'../../commands/page/generate-start.js';function a159_0x571f(){const _0x5e5a6f=['7AqRUdG','10430cxfMSJ','5349462ZPWIDj','3540768FNviMQ','3334254ePCDmI','12ZGlCwb','514205yOpIxr','32029888qvobGD','1843310kyVLfL','20swqLrx','45efbwUr','97xTxkDj'];a159_0x571f=function(){return _0x5e5a6f;};return a159_0x571f();}import{pageGenerateStatus}from'../../commands/page/generate-status.js';import{pageDataListStatus}from'../../commands/page/data-list-status.js';import{pageSync}from'../../commands/page/sync.js';import{pagePull}from'../../commands/page/pull.js';import{pagePush}from'../../commands/page/push.js';function a159_0x14cf(_0x46af60,_0x1b3416){_0x46af60=_0x46af60-0x149;const _0x571f40=a159_0x571f();let _0x14cf56=_0x571f40[_0x46af60];return _0x14cf56;}import{pageRelationAudit}from'../../commands/page/relation-audit.js';import{pageRestore}from'../../commands/page/restore.js';import{pageCreate}from'../../commands/page/create.js';import{pageCustomDetail}from'../../commands/page/custom/detail.js';import{pageCustomList}from'../../commands/page/custom/list.js';import{pageCustomPublish}from'../../commands/page/custom/publish.js';import{pageCustomUpdate}from'../../commands/page/custom/update.js';export const pageDefinitions=[pageGenerateStart,pageGenerateStatus,pageDataListStatus,pageRelationAudit,pageSync,pagePull,pagePush,pageRestore,pageCreate,pageCustomList,pageCustomDetail,pageCustomPublish,pageCustomUpdate];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a160_0x462fe6=a160_0x3d32;(function(_0x73126e,_0x1a1e7c){const _0x5e9e3f=a160_0x3d32,_0x44422f=_0x73126e();while(!![]){try{const _0x3e87eb=-parseInt(_0x5e9e3f(0x1bb))/0x1*(-parseInt(_0x5e9e3f(0x19c))/0x2)+parseInt(_0x5e9e3f(0x1b8))/0x3+-parseInt(_0x5e9e3f(0x1b7))/0x4+-parseInt(_0x5e9e3f(0x1a3))/0x5*(parseInt(_0x5e9e3f(0x1c7))/0x6)+parseInt(_0x5e9e3f(0x1c6))/0x7+-parseInt(_0x5e9e3f(0x1a9))/0x8*(parseInt(_0x5e9e3f(0x1a5))/0x9)+-parseInt(_0x5e9e3f(0x1d1))/0xa*(-parseInt(_0x5e9e3f(0x1c2))/0xb);if(_0x3e87eb===_0x1a1e7c)break;else _0x44422f['push'](_0x44422f['shift']());}catch(_0x286dbc){_0x44422f['push'](_0x44422f['shift']());}}}(a160_0x2194,0x81e8e));import{writeFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getPageIdFlag,loadDatasetDetailForPage,loadPageDetailForPage,selectVersionTagGroup,serializeDryRunDescription,validatePageTargetSelector}from'../../commands/page/shared.js';import{computePageContentHash,computePageFileHash,serializePageSchemaForFile}from'../../core/page/hash.js';import{ensureParentDirectory,fileExists,loadPageProjectConfig,resolvePageFilePath}from'../../core/page/file-system.js';import{createEmptyPageLock,ensurePageLockScope,readPageLockFile,writePageLockFile}from'../../core/page/lock.js';import{CliErrors}from'../../errors.js';export const pagePull={'service':'page','command':a160_0x462fe6(0x1ce),'description':a160_0x462fe6(0x1a4),'risk':a160_0x462fe6(0x1c4),'defaultOutputFormat':a160_0x462fe6(0x1d2),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'id','type':a160_0x462fe6(0x1d8),'description':a160_0x462fe6(0x1b5)},DATASETCODE_FLAG_OPTIONAL,{'name':'alias','type':a160_0x462fe6(0x1a7),'description':a160_0x462fe6(0x1bc)},{'name':a160_0x462fe6(0x19f),'type':'string','description':a160_0x462fe6(0x19d)},{'name':a160_0x462fe6(0x1cd),'type':a160_0x462fe6(0x1b6),'description':a160_0x462fe6(0x1d7)}],async 'validate'(_0x191168){validatePageTargetSelector(_0x191168);},async 'dryRun'(_0x2577b9){const _0x4d091b=a160_0x462fe6,_0x484f9b=await buildPullPlan(_0x2577b9);return{'method':_0x4d091b(0x1cc),'url':_0x484f9b['mode']==='single'?_0x4d091b(0x1a0)+(_0x484f9b[_0x4d091b(0x1cf)][0x0]?.['detail'][_0x4d091b(0x1aa)]??''):_0x4d091b(0x1ab),'body':{'appCode':_0x2577b9[_0x4d091b(0x19e)],'mode':_0x484f9b[_0x4d091b(0x1d4)],'targetDatasetCode':_0x484f9b[_0x4d091b(0x1b2)]??null,'pages':_0x484f9b[_0x4d091b(0x1cf)][_0x4d091b(0x1c5)](toPreviewItem)},'description':serializeDryRunDescription({'mode':_0x484f9b[_0x4d091b(0x1d4)],'datasetCode':_0x484f9b[_0x4d091b(0x1b2)]??null,'totalCandidates':_0x484f9b[_0x4d091b(0x1cf)][_0x4d091b(0x1a8)],'totalWouldPull':_0x484f9b[_0x4d091b(0x1cf)][_0x4d091b(0x19b)](_0x1a87fa=>_0x1a87fa[_0x4d091b(0x1b3)]==='would_pull')[_0x4d091b(0x1a8)],'totalConflicts':_0x484f9b[_0x4d091b(0x1cf)][_0x4d091b(0x19b)](_0x2716b8=>_0x2716b8['status']===_0x4d091b(0x1ca))[_0x4d091b(0x1a8)]})};},async 'execute'(_0x4fafe5){const _0x19fb67=a160_0x462fe6,_0x5bfa3c=loadPageProjectConfig(_0x4fafe5['appCode']),_0x39bb48=await readPageLockFile(_0x5bfa3c[_0x19fb67(0x1c0)]),{lockData:_0x561655,appLock:_0xd5464e}=ensurePageLockScope(_0x39bb48??createEmptyPageLock(),_0x4fafe5['appCode']),_0x3cbad8=await buildPullPlan(_0x4fafe5),_0x21d3d8=_0x4fafe5['bool'](_0x19fb67(0x1cd));if(_0x3cbad8['mode']===_0x19fb67(0x1bd)&&_0x3cbad8[_0x19fb67(0x1cf)][0x0]?.[_0x19fb67(0x1b3)]===_0x19fb67(0x1ca)&&!_0x21d3d8)throw CliErrors[_0x19fb67(0x1af)](_0x19fb67(0x1c9)+_0x3cbad8[_0x19fb67(0x1cf)][0x0][_0x19fb67(0x1c3)],'Use\x20--force\x20to\x20overwrite\x20local\x20changes.');const _0x583b28=[],_0x2fc4ae=[];for(const _0x4939eb of _0x3cbad8['items']){if(_0x4939eb[_0x19fb67(0x1b3)]===_0x19fb67(0x1ca)&&!_0x21d3d8){_0x2fc4ae[_0x19fb67(0x1bf)]({'pageId':_0x4939eb[_0x19fb67(0x1b1)]['pageId'],'type':_0x4939eb['detail']['type'],'title':_0x4939eb[_0x19fb67(0x1b1)][_0x19fb67(0x1d3)],'localPath':_0x4939eb['localPath'],'reason':_0x4939eb[_0x19fb67(0x1cb)]??_0x19fb67(0x1c8)});continue;}await ensureParentDirectory(_0x4939eb[_0x19fb67(0x1c3)]);const _0x1e03ec=serializePageSchemaForFile(_0x4939eb[_0x19fb67(0x1b1)][_0x19fb67(0x1d6)]);await writeFile(_0x4939eb[_0x19fb67(0x1c3)],_0x1e03ec,_0x19fb67(0x1b9)),_0xd5464e[_0x19fb67(0x1be)][String(_0x4939eb[_0x19fb67(0x1b1)][_0x19fb67(0x1aa)])]=buildLockEntry(_0x4939eb[_0x19fb67(0x1b1)],_0x1e03ec),_0x583b28['push']({'pageId':_0x4939eb[_0x19fb67(0x1b1)]['pageId'],'type':_0x4939eb[_0x19fb67(0x1b1)][_0x19fb67(0x1b0)],'title':_0x4939eb[_0x19fb67(0x1b1)][_0x19fb67(0x1d3)],'localPath':_0x4939eb['localPath']});}return _0xd5464e[_0x19fb67(0x1ad)]=new Date()['toISOString'](),await writePageLockFile(_0x5bfa3c['lockFilePath'],_0x561655),{'ok':!![],'message':_0x19fb67(0x1ba)+_0x583b28[_0x19fb67(0x1a8)]+'\x20pulled,\x20'+_0x2fc4ae['length']+'\x20skipped','data':{'appCode':_0x4fafe5[_0x19fb67(0x19e)],'pulledPages':_0x583b28,'skippedPages':_0x2fc4ae,'totalPulled':_0x583b28[_0x19fb67(0x1a8)],'totalSkipped':_0x2fc4ae['length']}};}};async function buildPullPlan(_0x54f2cb){const _0x1c4da6=a160_0x462fe6,_0x25d99d=loadPageProjectConfig(_0x54f2cb[_0x1c4da6(0x19e)]),_0x3a7193=await readPageLockFile(_0x25d99d['lockFilePath']),{appLock:_0x4c1e06}=ensurePageLockScope(_0x3a7193??createEmptyPageLock(),_0x54f2cb[_0x1c4da6(0x19e)]),_0x5b52e9=getPageIdFlag(_0x54f2cb);if(_0x5b52e9!==undefined){const _0x419c71=await loadPageDetailForPage(_0x54f2cb,_0x5b52e9);return{'mode':_0x1c4da6(0x1bd),'items':[await inspectPullTarget(_0x25d99d,_0x4c1e06[_0x1c4da6(0x1be)][String(_0x419c71['pageId'])],_0x419c71)]};}const _0x2e64d0=await loadDatasetDetailForPage(_0x54f2cb),_0x5ec478=_0x2e64d0['relatedPages'][_0x1c4da6(0x19b)](_0x18dad3=>!_0x18dad3[_0x1c4da6(0x1a2)]);if(_0x5ec478['length']===0x0)throw CliErrors[_0x1c4da6(0x1af)](_0x1c4da6(0x1d5)+_0x2e64d0[_0x1c4da6(0x1d6)]+_0x1c4da6(0x1c1));const _0x4677f3=await Promise[_0x1c4da6(0x1ae)](_0x5ec478[_0x1c4da6(0x1c5)](_0x1e3de9=>loadPageDetailForPage(_0x54f2cb,_0x1e3de9['id']))),_0x284b9c=selectVersionTagGroup(_0x4677f3,_0x3f0a=>_0x3f0a[_0x1c4da6(0x1a1)],_0x54f2cb['str'](_0x1c4da6(0x19f)));return{'mode':_0x1c4da6(0x1ac),'datasetCode':_0x2e64d0[_0x1c4da6(0x1d6)],'items':await Promise['all'](_0x284b9c[_0x1c4da6(0x1cf)][_0x1c4da6(0x1c5)](_0x1191aa=>inspectPullTarget(_0x25d99d,_0x4c1e06[_0x1c4da6(0x1be)][String(_0x1191aa[_0x1c4da6(0x1aa)])],_0x1191aa)))};}function a160_0x3d32(_0x568c7b,_0x55f7b4){_0x568c7b=_0x568c7b-0x19b;const _0x21942b=a160_0x2194();let _0x3d3202=_0x21942b[_0x568c7b];return _0x3d3202;}async function inspectPullTarget(_0x59f165,_0x5e7f75,_0x39b1a7){const _0x582e70=a160_0x462fe6,_0x3634c0=resolvePageFilePath(_0x59f165,_0x39b1a7[_0x582e70(0x1aa)],_0x39b1a7[_0x582e70(0x1b0)]),_0x29484f=await fileExists(_0x3634c0);if(!_0x29484f){const _0x2ee7a8=serializePageSchemaForFile(_0x39b1a7['code']);return{'detail':_0x39b1a7,'localPath':_0x3634c0,'localHash':computePageContentHash(_0x2ee7a8),'status':_0x582e70(0x1a6)};}const _0x5be085=await computePageFileHash(_0x3634c0);if(!_0x5e7f75||_0x5be085!==_0x5e7f75[_0x582e70(0x1d0)])return{'detail':_0x39b1a7,'localPath':_0x3634c0,'localHash':_0x5be085,'status':'conflict','reason':'local\x20unsynced\x20changes'};return{'detail':_0x39b1a7,'localPath':_0x3634c0,'localHash':_0x5be085,'status':_0x582e70(0x1a6)};}function a160_0x2194(){const _0x1c7a75=['validation','type','detail','datasetCode','status','pageVersion','Page\x20ID','boolean','1825496MgKYGF','2760588rsZBbS','utf8','Pull\x20complete:\x20','372859JTMuiP','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','single','pages','push','lockFilePath','\x22\x20has\x20no\x20undeleted\x20related\x20pages.','1497067UapCva','localPath','read','map','2883986UaKvpy','3816YXuIAg','local\x20unsynced\x20changes','Local\x20page\x20file\x20has\x20unsynced\x20changes:\x20','conflict','reason','GET','force','pull','items','hash','70ezSrYX','compress','name','mode','Dataset\x20\x22','code','Overwrite\x20local\x20files\x20even\x20when\x20unsynced\x20local\x20changes\x20exist','number','filter','2dGZuRT','Page\x20group\x20version\x20tag\x20(batch\x20mode\x20only)','appCode','version-tag','/smartapi/lovrabet/detail?pageId=','versionTag','deleted','7255QimnZA','Pull\x20page\x20schema\x20to\x20local\x20files','3358854rLJWSV','would_pull','string','length','16JPCuZf','pageId','/smartapi/lovrabet/detail\x20(per\x20selected\x20page)','batch','lastSync','all'];a160_0x2194=function(){return _0x1c7a75;};return a160_0x2194();}function buildLockEntry(_0x826301,_0x42675c){const _0x129f97=a160_0x462fe6;return{'hash':computePageContentHash(_0x42675c),'pageId':_0x826301[_0x129f97(0x1aa)],'pageVersion':_0x826301[_0x129f97(0x1b4)],'type':_0x826301[_0x129f97(0x1b0)],'title':_0x826301[_0x129f97(0x1d3)],'datasetIds':_0x826301['datasetIds'],'versionTag':_0x826301[_0x129f97(0x1a1)]};}function toPreviewItem(_0x24b0ad){const _0x42e6c5=a160_0x462fe6;return{'pageId':_0x24b0ad['detail'][_0x42e6c5(0x1aa)],'type':_0x24b0ad[_0x42e6c5(0x1b1)][_0x42e6c5(0x1b0)],'title':_0x24b0ad[_0x42e6c5(0x1b1)][_0x42e6c5(0x1d3)],'localPath':_0x24b0ad[_0x42e6c5(0x1c3)],'status':_0x24b0ad['status'],..._0x24b0ad[_0x42e6c5(0x1cb)]?{'reason':_0x24b0ad[_0x42e6c5(0x1cb)]}:{}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a161_0x502333=a161_0x4b4b;(function(_0x3aede9,_0x1f62a7){const _0x43b2ff=a161_0x4b4b,_0x1e7790=_0x3aede9();while(!![]){try{const _0x540778=-parseInt(_0x43b2ff(0x21d))/0x1*(parseInt(_0x43b2ff(0x22e))/0x2)+parseInt(_0x43b2ff(0x1fe))/0x3+-parseInt(_0x43b2ff(0x21e))/0x4*(parseInt(_0x43b2ff(0x227))/0x5)+-parseInt(_0x43b2ff(0x23a))/0x6*(-parseInt(_0x43b2ff(0x23d))/0x7)+-parseInt(_0x43b2ff(0x1f8))/0x8+parseInt(_0x43b2ff(0x23e))/0x9*(parseInt(_0x43b2ff(0x20a))/0xa)+-parseInt(_0x43b2ff(0x203))/0xb*(-parseInt(_0x43b2ff(0x219))/0xc);if(_0x540778===_0x1f62a7)break;else _0x1e7790['push'](_0x1e7790['shift']());}catch(_0x11d58c){_0x1e7790['push'](_0x1e7790['shift']());}}}(a161_0x5286,0x5bc64));import{readFile,writeFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getPageIdFlag,loadDatasetDetailForPage,loadPageDetailForPage,selectVersionTagGroup,serializeDryRunDescription,validatePageTargetSelector}from'../../commands/page/shared.js';import{updatePage}from'../../core/api-client.js';import{computePageContentHash,computePageFileHash,computeSerializedSchemaHash,serializePageSchemaForFile}from'../../core/page/hash.js';import{fileExists,loadPageProjectConfig,resolvePageFilePath}from'../../core/page/file-system.js';import{createEmptyPageLock,ensurePageLockScope,readPageLockFile,writePageLockFile}from'../../core/page/lock.js';import{CliErrors}from'../../errors.js';export const pagePush={'service':a161_0x502333(0x231),'command':a161_0x502333(0x1f0),'description':'Push\x20local\x20page\x20schema\x20back\x20to\x20remote','risk':a161_0x502333(0x236),'defaultOutputFormat':a161_0x502333(0x200),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'id','type':a161_0x502333(0x1ea),'description':'Page\x20ID'},DATASETCODE_FLAG_OPTIONAL,{'name':a161_0x502333(0x229),'type':a161_0x502333(0x1f5),'description':a161_0x502333(0x1fd)},{'name':a161_0x502333(0x239),'type':a161_0x502333(0x1f5),'description':'Page\x20group\x20version\x20tag\x20(batch\x20mode\x20only)'}],async 'validate'(_0x150985){validatePageTargetSelector(_0x150985);},async 'dryRun'(_0x239fa8){const _0x2f6d3b=a161_0x502333,_0x5c3df2=await buildPushPreview(_0x239fa8);return{'method':_0x2f6d3b(0x210),'url':_0x2f6d3b(0x20d),'body':{'appCode':_0x239fa8['appCode'],'mode':_0x5c3df2[_0x2f6d3b(0x207)],'datasetCode':_0x5c3df2[_0x2f6d3b(0x235)]??null,'pages':_0x5c3df2[_0x2f6d3b(0x1f9)]},'description':serializeDryRunDescription({'mode':_0x5c3df2['mode'],'datasetCode':_0x5c3df2[_0x2f6d3b(0x235)]??null,'totalWouldPush':_0x5c3df2[_0x2f6d3b(0x1f9)]['filter'](_0x29da99=>_0x29da99[_0x2f6d3b(0x1eb)]===_0x2f6d3b(0x209))[_0x2f6d3b(0x1ed)],'totalUnchanged':_0x5c3df2[_0x2f6d3b(0x1f9)][_0x2f6d3b(0x201)](_0x47b632=>_0x47b632[_0x2f6d3b(0x1eb)]===_0x2f6d3b(0x230))[_0x2f6d3b(0x1ed)],'totalConflicts':_0x5c3df2[_0x2f6d3b(0x1f9)][_0x2f6d3b(0x201)](_0x57f951=>_0x57f951['status']===_0x2f6d3b(0x213)||_0x57f951[_0x2f6d3b(0x1eb)]===_0x2f6d3b(0x1ff))[_0x2f6d3b(0x1ed)]})};},async 'execute'(_0x29123e){const _0x4acb86=a161_0x502333,_0x22f2b4=loadPageProjectConfig(_0x29123e[_0x4acb86(0x1fc)]),_0x1a2d23=await readPageLockFile(_0x22f2b4[_0x4acb86(0x1fa)]),{lockData:_0x86618e,appLock:_0x3cda69}=ensurePageLockScope(_0x1a2d23??createEmptyPageLock(),_0x29123e[_0x4acb86(0x1fc)]),_0x3fc900=getPageIdFlag(_0x29123e);if(_0x3fc900!==undefined){const _0x376e92=await prepareSinglePush(_0x29123e,_0x22f2b4,_0x3cda69['pages'][String(_0x3fc900)],_0x3fc900),_0x1566b8=await pushPreparedPage(_0x29123e,_0x376e92);return _0x3cda69['pages'][String(_0x1566b8[_0x4acb86(0x206)])]=_0x1566b8[_0x4acb86(0x1f4)],_0x3cda69[_0x4acb86(0x215)]=new Date()[_0x4acb86(0x232)](),await writePageLockFile(_0x22f2b4[_0x4acb86(0x1fa)],_0x86618e),{'ok':!![],'message':_0x1566b8[_0x4acb86(0x211)]?_0x4acb86(0x217):_0x4acb86(0x237),'data':{'appCode':_0x29123e['appCode'],'pushedPages':[{'pageId':_0x1566b8[_0x4acb86(0x206)],'type':_0x1566b8[_0x4acb86(0x20c)],'title':_0x1566b8[_0x4acb86(0x1fb)],'normalized':_0x1566b8['normalized']}],'skippedPages':[],'failedPages':[],'totalPushed':0x1,'totalSkipped':0x0,'totalFailed':0x0}};}const _0x268970=await buildBatchPushPlan(_0x29123e,_0x3cda69[_0x4acb86(0x23b)]),_0x313476=[],_0x5d2ad8=[],_0x53ab64=[];for(const _0x1d042a of _0x268970[_0x4acb86(0x230)]){_0x5d2ad8[_0x4acb86(0x1f0)](_0x1d042a);}for(const _0x58390d of _0x268970[_0x4acb86(0x212)]){try{const _0x493d40=await prepareSinglePush(_0x29123e,_0x22f2b4,_0x3cda69[_0x4acb86(0x23b)][String(_0x58390d['pageId'])],_0x58390d[_0x4acb86(0x206)],_0x268970['datasetId']),_0x35acd4=await pushPreparedPage(_0x29123e,_0x493d40);_0x3cda69[_0x4acb86(0x23b)][String(_0x35acd4[_0x4acb86(0x206)])]=_0x35acd4[_0x4acb86(0x1f4)],_0x313476['push']({'pageId':_0x35acd4['pageId'],'type':_0x35acd4[_0x4acb86(0x20c)],'title':_0x35acd4[_0x4acb86(0x1fb)],'normalized':_0x35acd4[_0x4acb86(0x211)]});}catch(_0x51797e){_0x53ab64[_0x4acb86(0x1f0)]({'pageId':_0x58390d[_0x4acb86(0x206)],'type':_0x58390d['type'],'title':_0x58390d['title'],'reason':_0x51797e instanceof Error?_0x51797e[_0x4acb86(0x22c)]:String(_0x51797e)});}}return _0x3cda69[_0x4acb86(0x215)]=new Date()['toISOString'](),await writePageLockFile(_0x22f2b4[_0x4acb86(0x1fa)],_0x86618e),{'ok':_0x53ab64[_0x4acb86(0x1ed)]===0x0||_0x313476['length']>0x0||_0x5d2ad8['length']>0x0,'message':_0x53ab64[_0x4acb86(0x1ed)]>0x0&&_0x313476['length']>0x0?'Some\x20pages\x20failed\x20to\x20push':_0x313476[_0x4acb86(0x1ed)]>0x0?_0x4acb86(0x237):_0x5d2ad8[_0x4acb86(0x1ed)]>0x0&&_0x53ab64[_0x4acb86(0x1ed)]===0x0?'No\x20changes\x20to\x20push':_0x53ab64[0x0]?.[_0x4acb86(0x1f2)]||_0x4acb86(0x234),'data':{'appCode':_0x29123e['appCode'],'pushedPages':_0x313476,'skippedPages':_0x5d2ad8,'failedPages':_0x53ab64,'totalPushed':_0x313476[_0x4acb86(0x1ed)],'totalSkipped':_0x5d2ad8[_0x4acb86(0x1ed)],'totalFailed':_0x53ab64[_0x4acb86(0x1ed)]}};}};function a161_0x5286(){const _0x345bd5=['compress','filter','values','22nehITv','name','datasetId','pageId','mode','hash','would_push','22030FmIvRz','includes','type','/smartapi/lovrabet/update-page','Page\x20','remoteDetail','POST','normalized','candidates','conflict','Local\x20file\x20not\x20found:\x20','lastSync','Invalid\x20JSON\x20in\x20local\x20page\x20file:\x20','Push\x20succeeded;\x20server\x20normalized\x20the\x20schema','page-','7515372WYiImX','localPath','utf8','batch','73239ILSzMm','221756KIotwG','datasetIds','No\x20local\x20pages\x20found\x20for\x20dataset\x20\x22','str','validation','`\x20first.','Run\x20`','local\x20JSON\x20is\x20invalid','\x20has\x20changed\x20since\x20last\x20pull.','5THIWHN','versionTag','alias','all','Remote\x20page\x20','message','parse','8CLbhBa','deleted','unchanged','page','toISOString','single','Push\x20failed','datasetCode','write','Push\x20succeeded','\x20no\x20longer\x20belongs\x20to\x20the\x20target\x20dataset','version-tag','285924vhnoon','pages','localContent','7kGOMXZ','342tINcgU','apiError','number','status','`\x20first','length','no\x20changes','code','push','remote\x20pageVersion\x20changed','reason','map','nextLockEntry','string','\x20page\x20pull\x20--id\x20','pageVersion','5558736tNkfTH','items','lockFilePath','title','appCode','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','105645PSGnKI','blocked'];a161_0x5286=function(){return _0x345bd5;};return a161_0x5286();}async function buildPushPreview(_0x53f9ad){const _0x161da8=a161_0x502333,_0x797e9e=loadPageProjectConfig(_0x53f9ad[_0x161da8(0x1fc)]),_0x7eb2af=await readPageLockFile(_0x797e9e[_0x161da8(0x1fa)]),{appLock:_0x22e087}=ensurePageLockScope(_0x7eb2af??createEmptyPageLock(),_0x53f9ad[_0x161da8(0x1fc)]),_0x177123=getPageIdFlag(_0x53f9ad);if(_0x177123!==undefined)return{'mode':_0x161da8(0x233),'items':[await inspectPushPage(_0x53f9ad,_0x797e9e,_0x22e087[_0x161da8(0x23b)][String(_0x177123)],_0x177123)]};const _0x366a65=await buildBatchPushPlan(_0x53f9ad,_0x22e087['pages']);return{'mode':_0x161da8(0x21c),'datasetCode':_0x366a65['datasetCode'],'items':[..._0x366a65[_0x161da8(0x230)][_0x161da8(0x1f3)](_0x152f63=>({'pageId':_0x152f63[_0x161da8(0x206)],'type':_0x152f63[_0x161da8(0x20c)],'title':_0x152f63[_0x161da8(0x1fb)],'localPath':_0x152f63[_0x161da8(0x21a)],'status':_0x161da8(0x230),'reason':_0x152f63[_0x161da8(0x1f2)]})),...await Promise[_0x161da8(0x22a)](_0x366a65[_0x161da8(0x212)][_0x161da8(0x1f3)](_0x22ba77=>inspectPushPage(_0x53f9ad,_0x797e9e,_0x22e087['pages'][String(_0x22ba77['pageId'])],_0x22ba77[_0x161da8(0x206)],_0x366a65[_0x161da8(0x205)])))]};}function a161_0x4b4b(_0x4a4411,_0x558ae0){_0x4a4411=_0x4a4411-0x1ea;const _0x528653=a161_0x5286();let _0x4b4bf9=_0x528653[_0x4a4411];return _0x4b4bf9;}async function buildBatchPushPlan(_0x5a3f1,_0x322999){const _0x54c17b=a161_0x502333,_0x21fe90=loadPageProjectConfig(_0x5a3f1[_0x54c17b(0x1fc)]),_0x2ae75a=await loadDatasetDetailForPage(_0x5a3f1),_0x149317=_0x2ae75a['id'],_0x48794b=new Set(_0x2ae75a['relatedPages'][_0x54c17b(0x201)](_0x224f86=>!_0x224f86[_0x54c17b(0x22f)])[_0x54c17b(0x1f3)](_0x3c49bb=>_0x3c49bb['id'])),_0xd050b1=Object[_0x54c17b(0x202)](_0x322999)['filter'](_0x5e9703=>_0x5e9703[_0x54c17b(0x21f)][_0x54c17b(0x20b)](_0x149317)&&_0x48794b['has'](_0x5e9703[_0x54c17b(0x206)]));if(_0xd050b1[_0x54c17b(0x1ed)]===0x0)throw CliErrors['validation'](_0x54c17b(0x220)+_0x2ae75a[_0x54c17b(0x1ef)]+'\x22.',_0x54c17b(0x224)+CLI_BIN_NAME+'\x20page\x20pull\x20--datasetcode\x20'+_0x2ae75a['code']+_0x54c17b(0x223));const _0x118265=selectVersionTagGroup(_0xd050b1,_0x34fe06=>_0x34fe06[_0x54c17b(0x228)]??null,_0x5a3f1[_0x54c17b(0x221)]('version-tag')),_0x145b68=[],_0x474aa6=[];for(const _0x4a23a3 of _0x118265[_0x54c17b(0x1f9)]){const _0x315fbf=resolvePageFilePath(_0x21fe90,_0x4a23a3[_0x54c17b(0x206)],_0x4a23a3[_0x54c17b(0x20c)]);if(!await fileExists(_0x315fbf)){_0x145b68['push']({'pageId':_0x4a23a3[_0x54c17b(0x206)],'type':_0x4a23a3['type'],'title':_0x4a23a3[_0x54c17b(0x1fb)]});continue;}const _0x21d5d0=await computePageFileHash(_0x315fbf);if(_0x21d5d0===_0x4a23a3[_0x54c17b(0x208)]){_0x474aa6[_0x54c17b(0x1f0)]({'pageId':_0x4a23a3[_0x54c17b(0x206)],'type':_0x4a23a3[_0x54c17b(0x20c)],'title':_0x4a23a3[_0x54c17b(0x1fb)],'localPath':_0x315fbf,'reason':_0x54c17b(0x1ee)});continue;}_0x145b68[_0x54c17b(0x1f0)]({'pageId':_0x4a23a3[_0x54c17b(0x206)],'type':_0x4a23a3['type'],'title':_0x4a23a3[_0x54c17b(0x1fb)]});}return{'datasetCode':_0x2ae75a[_0x54c17b(0x1ef)],'datasetId':_0x149317,'candidates':_0x145b68,'unchanged':_0x474aa6};}async function inspectPushPage(_0x4ecf39,_0x576cb3,_0x315964,_0x1d2107,_0x53a098){const _0x29a91f=a161_0x502333;if(!_0x315964)return{'pageId':_0x1d2107,'type':'UNKNOWN','title':_0x29a91f(0x218)+_0x1d2107,'localPath':resolvePageFilePath(_0x576cb3,_0x1d2107,'UNKNOWN'),'status':_0x29a91f(0x1ff),'reason':_0x29a91f(0x224)+CLI_BIN_NAME+_0x29a91f(0x1f6)+_0x1d2107+_0x29a91f(0x1ec)};const _0x40015a=resolvePageFilePath(_0x576cb3,_0x1d2107,_0x315964[_0x29a91f(0x20c)]);if(!await fileExists(_0x40015a))return{'pageId':_0x1d2107,'type':_0x315964[_0x29a91f(0x20c)],'title':_0x315964[_0x29a91f(0x1fb)],'localPath':_0x40015a,'status':_0x29a91f(0x1ff),'reason':_0x29a91f(0x214)+_0x40015a};const _0x149ff7=await readFile(_0x40015a,_0x29a91f(0x21b));try{JSON[_0x29a91f(0x22d)](_0x149ff7);}catch{return{'pageId':_0x1d2107,'type':_0x315964[_0x29a91f(0x20c)],'title':_0x315964[_0x29a91f(0x1fb)],'localPath':_0x40015a,'status':_0x29a91f(0x1ff),'reason':_0x29a91f(0x225)};}const _0x26e4e8=computePageContentHash(_0x149ff7);if(_0x26e4e8===_0x315964[_0x29a91f(0x208)])return{'pageId':_0x1d2107,'type':_0x315964['type'],'title':_0x315964[_0x29a91f(0x1fb)],'localPath':_0x40015a,'status':'unchanged','reason':_0x29a91f(0x1ee)};try{const _0x2fe677=await loadPageDetailForPage(_0x4ecf39,_0x1d2107);if(_0x53a098!=null&&!_0x2fe677[_0x29a91f(0x21f)][_0x29a91f(0x20b)](_0x53a098))return{'pageId':_0x1d2107,'type':_0x315964[_0x29a91f(0x20c)],'title':_0x315964[_0x29a91f(0x1fb)],'localPath':_0x40015a,'status':_0x29a91f(0x213),'reason':'Page\x20'+_0x1d2107+_0x29a91f(0x238)};const _0x30d16f=_0x315964['pageVersion']!=null&&_0x2fe677[_0x29a91f(0x1f7)]!=null;if(_0x30d16f&&_0x315964['pageVersion']!==_0x2fe677[_0x29a91f(0x1f7)])return{'pageId':_0x1d2107,'type':_0x315964['type'],'title':_0x315964[_0x29a91f(0x1fb)],'localPath':_0x40015a,'status':'conflict','reason':_0x29a91f(0x1f1)};if(!_0x30d16f&&computeSerializedSchemaHash(_0x2fe677['code'])!==_0x315964['hash'])return{'pageId':_0x1d2107,'type':_0x315964[_0x29a91f(0x20c)],'title':_0x315964[_0x29a91f(0x1fb)],'localPath':_0x40015a,'status':_0x29a91f(0x213),'reason':'remote\x20schema\x20changed'};}catch(_0x294d6c){return{'pageId':_0x1d2107,'type':_0x315964[_0x29a91f(0x20c)],'title':_0x315964[_0x29a91f(0x1fb)],'localPath':_0x40015a,'status':_0x29a91f(0x1ff),'reason':_0x294d6c instanceof Error?_0x294d6c['message']:String(_0x294d6c)};}return{'pageId':_0x1d2107,'type':_0x315964['type'],'title':_0x315964[_0x29a91f(0x1fb)],'localPath':_0x40015a,'status':_0x29a91f(0x209)};}async function prepareSinglePush(_0x175ec0,_0x24c3bd,_0x1eb87c,_0x30b68b,_0x547485){const _0x42c921=a161_0x502333;if(!_0x1eb87c)throw CliErrors['validation']('No\x20lock\x20record\x20found\x20for\x20page\x20'+_0x30b68b+'.',_0x42c921(0x224)+CLI_BIN_NAME+_0x42c921(0x1f6)+_0x30b68b+_0x42c921(0x223));const _0x1fb666=resolvePageFilePath(_0x24c3bd,_0x30b68b,_0x1eb87c[_0x42c921(0x20c)]);if(!await fileExists(_0x1fb666))throw CliErrors[_0x42c921(0x222)](_0x42c921(0x214)+_0x1fb666,_0x42c921(0x224)+CLI_BIN_NAME+_0x42c921(0x1f6)+_0x30b68b+'`\x20first.');const _0x55cf95=await readFile(_0x1fb666,_0x42c921(0x21b));try{JSON[_0x42c921(0x22d)](_0x55cf95);}catch{throw CliErrors[_0x42c921(0x222)](_0x42c921(0x216)+_0x1fb666);}const _0x2163b4=await loadPageDetailForPage(_0x175ec0,_0x30b68b);if(_0x547485!=null&&!_0x2163b4[_0x42c921(0x21f)][_0x42c921(0x20b)](_0x547485))throw CliErrors[_0x42c921(0x222)](_0x42c921(0x20e)+_0x30b68b+'\x20no\x20longer\x20belongs\x20to\x20the\x20selected\x20dataset.');const _0x1be9c4=_0x1eb87c['pageVersion']!=null&&_0x2163b4['pageVersion']!=null;if(_0x1be9c4){if(_0x1eb87c[_0x42c921(0x1f7)]!==_0x2163b4[_0x42c921(0x1f7)])throw CliErrors[_0x42c921(0x222)]('Remote\x20page\x20'+_0x30b68b+_0x42c921(0x226),_0x42c921(0x224)+CLI_BIN_NAME+_0x42c921(0x1f6)+_0x30b68b+'`\x20first.');}else{const _0x36ba05=computeSerializedSchemaHash(_0x2163b4[_0x42c921(0x1ef)]);if(_0x36ba05!==_0x1eb87c['hash'])throw CliErrors[_0x42c921(0x222)](_0x42c921(0x22b)+_0x30b68b+_0x42c921(0x226),_0x42c921(0x224)+CLI_BIN_NAME+_0x42c921(0x1f6)+_0x30b68b+'`\x20first.');}return{'lockEntry':_0x1eb87c,'localPath':_0x1fb666,'localContent':_0x55cf95,'localHash':computePageContentHash(_0x55cf95),'remoteDetail':_0x2163b4};}async function pushPreparedPage(_0x1e22ef,_0x164755){const _0x3ceeba=a161_0x502333,_0x3c81e1=await updatePage(_0x1e22ef[_0x3ceeba(0x1fc)],_0x164755['remoteDetail'][_0x3ceeba(0x206)],_0x164755[_0x3ceeba(0x23c)],_0x164755[_0x3ceeba(0x20f)][_0x3ceeba(0x21f)]);if(!_0x3c81e1)throw CliErrors[_0x3ceeba(0x23f)]('Page\x20update\x20failed:\x20'+_0x164755[_0x3ceeba(0x20f)][_0x3ceeba(0x206)]);const _0x243b57=await loadPageDetailForPage(_0x1e22ef,_0x164755[_0x3ceeba(0x20f)][_0x3ceeba(0x206)]),_0x48ade1=serializePageSchemaForFile(_0x243b57[_0x3ceeba(0x1ef)]);return await writeFile(_0x164755['localPath'],_0x48ade1,'utf8'),{'pageId':_0x243b57[_0x3ceeba(0x206)],'type':_0x243b57[_0x3ceeba(0x20c)],'title':_0x243b57['name'],'normalized':_0x48ade1!==serializePageSchemaForFile(_0x164755[_0x3ceeba(0x23c)]),'nextLockEntry':{'hash':computePageContentHash(_0x48ade1),'pageId':_0x243b57[_0x3ceeba(0x206)],'pageVersion':_0x243b57['pageVersion'],'type':_0x243b57[_0x3ceeba(0x20c)],'title':_0x243b57[_0x3ceeba(0x204)],'datasetIds':_0x243b57[_0x3ceeba(0x21f)],'versionTag':_0x243b57['versionTag']}};}
|
|
1
|
+
const a161_0x38c4b7=a161_0x20cf;function a161_0x20cf(_0x1c1229,_0x37120b){_0x1c1229=_0x1c1229-0x162;const _0x44b739=a161_0x44b7();let _0x20cf3e=_0x44b739[_0x1c1229];return _0x20cf3e;}(function(_0x155698,_0x41d53e){const _0x5591d9=a161_0x20cf,_0x5ad911=_0x155698();while(!![]){try{const _0x34d38b=parseInt(_0x5591d9(0x17c))/0x1*(-parseInt(_0x5591d9(0x189))/0x2)+-parseInt(_0x5591d9(0x16f))/0x3+parseInt(_0x5591d9(0x179))/0x4*(parseInt(_0x5591d9(0x1a1))/0x5)+parseInt(_0x5591d9(0x193))/0x6*(-parseInt(_0x5591d9(0x1a9))/0x7)+-parseInt(_0x5591d9(0x18a))/0x8+-parseInt(_0x5591d9(0x1af))/0x9+parseInt(_0x5591d9(0x17a))/0xa;if(_0x34d38b===_0x41d53e)break;else _0x5ad911['push'](_0x5ad911['shift']());}catch(_0x2061a5){_0x5ad911['push'](_0x5ad911['shift']());}}}(a161_0x44b7,0xc195b));import{readFile,writeFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getPageIdFlag,loadDatasetDetailForPage,loadPageDetailForPage,selectVersionTagGroup,serializeDryRunDescription,validatePageTargetSelector}from'../../commands/page/shared.js';import{updatePage}from'../../core/api-client.js';import{computePageContentHash,computePageFileHash,computeSerializedSchemaHash,serializePageSchemaForFile}from'../../core/page/hash.js';import{fileExists,loadPageProjectConfig,resolvePageFilePath}from'../../core/page/file-system.js';import{createEmptyPageLock,ensurePageLockScope,readPageLockFile,writePageLockFile}from'../../core/page/lock.js';import{CliErrors}from'../../errors.js';export const pagePush={'service':a161_0x38c4b7(0x1ad),'command':'push','description':a161_0x38c4b7(0x165),'risk':a161_0x38c4b7(0x18f),'defaultOutputFormat':a161_0x38c4b7(0x17f),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'id','type':'number','description':a161_0x38c4b7(0x1b1)},DATASETCODE_FLAG_OPTIONAL,{'name':a161_0x38c4b7(0x170),'type':a161_0x38c4b7(0x16c),'description':a161_0x38c4b7(0x1a4)},{'name':a161_0x38c4b7(0x188),'type':a161_0x38c4b7(0x16c),'description':a161_0x38c4b7(0x1a6)}],async 'validate'(_0x3ad703){validatePageTargetSelector(_0x3ad703);},async 'dryRun'(_0x479498){const _0x58a99c=a161_0x38c4b7,_0x1c20dc=await buildPushPreview(_0x479498);return{'method':_0x58a99c(0x17b),'url':_0x58a99c(0x1b9),'body':{'appCode':_0x479498[_0x58a99c(0x16b)],'mode':_0x1c20dc[_0x58a99c(0x181)],'datasetCode':_0x1c20dc[_0x58a99c(0x195)]??null,'pages':_0x1c20dc[_0x58a99c(0x19a)]},'description':serializeDryRunDescription({'mode':_0x1c20dc[_0x58a99c(0x181)],'datasetCode':_0x1c20dc[_0x58a99c(0x195)]??null,'totalWouldPush':_0x1c20dc['items'][_0x58a99c(0x1b3)](_0xd29f6b=>_0xd29f6b[_0x58a99c(0x18c)]===_0x58a99c(0x194))[_0x58a99c(0x178)],'totalUnchanged':_0x1c20dc[_0x58a99c(0x19a)]['filter'](_0x5e6526=>_0x5e6526[_0x58a99c(0x18c)]===_0x58a99c(0x173))['length'],'totalConflicts':_0x1c20dc[_0x58a99c(0x19a)][_0x58a99c(0x1b3)](_0x18ba92=>_0x18ba92[_0x58a99c(0x18c)]==='conflict'||_0x18ba92[_0x58a99c(0x18c)]===_0x58a99c(0x169))[_0x58a99c(0x178)]})};},async 'execute'(_0x51fca1){const _0x209eb0=a161_0x38c4b7,_0x46edab=loadPageProjectConfig(_0x51fca1[_0x209eb0(0x16b)]),_0x1ebb63=await readPageLockFile(_0x46edab[_0x209eb0(0x19b)]),{lockData:_0x2728af,appLock:_0x5ce7b0}=ensurePageLockScope(_0x1ebb63??createEmptyPageLock(),_0x51fca1['appCode']),_0x3a2822=getPageIdFlag(_0x51fca1);if(_0x3a2822!==undefined){const _0x35041a=await prepareSinglePush(_0x51fca1,_0x46edab,_0x5ce7b0[_0x209eb0(0x162)][String(_0x3a2822)],_0x3a2822),_0x45871d=await pushPreparedPage(_0x51fca1,_0x35041a);return _0x5ce7b0[_0x209eb0(0x162)][String(_0x45871d[_0x209eb0(0x176)])]=_0x45871d['nextLockEntry'],_0x5ce7b0[_0x209eb0(0x1a0)]=new Date()[_0x209eb0(0x183)](),await writePageLockFile(_0x46edab[_0x209eb0(0x19b)],_0x2728af),{'ok':!![],'message':_0x45871d['normalized']?_0x209eb0(0x196):'Push\x20succeeded','data':{'appCode':_0x51fca1[_0x209eb0(0x16b)],'pushedPages':[{'pageId':_0x45871d[_0x209eb0(0x176)],'type':_0x45871d[_0x209eb0(0x1aa)],'title':_0x45871d[_0x209eb0(0x175)],'normalized':_0x45871d[_0x209eb0(0x1a8)]}],'skippedPages':[],'failedPages':[],'totalPushed':0x1,'totalSkipped':0x0,'totalFailed':0x0}};}const _0x3a7507=await buildBatchPushPlan(_0x51fca1,_0x5ce7b0['pages']),_0x1c5a63=[],_0x1948c2=[],_0x42dfd8=[];for(const _0x5445f3 of _0x3a7507[_0x209eb0(0x173)]){_0x1948c2[_0x209eb0(0x1b8)](_0x5445f3);}for(const _0x9f2fc6 of _0x3a7507[_0x209eb0(0x186)]){try{const _0x341df6=await prepareSinglePush(_0x51fca1,_0x46edab,_0x5ce7b0[_0x209eb0(0x162)][String(_0x9f2fc6[_0x209eb0(0x176)])],_0x9f2fc6[_0x209eb0(0x176)],_0x3a7507[_0x209eb0(0x19d)]),_0x37bdfa=await pushPreparedPage(_0x51fca1,_0x341df6);_0x5ce7b0['pages'][String(_0x37bdfa['pageId'])]=_0x37bdfa[_0x209eb0(0x1b7)],_0x1c5a63[_0x209eb0(0x1b8)]({'pageId':_0x37bdfa[_0x209eb0(0x176)],'type':_0x37bdfa[_0x209eb0(0x1aa)],'title':_0x37bdfa['title'],'normalized':_0x37bdfa[_0x209eb0(0x1a8)]});}catch(_0x121cee){_0x42dfd8[_0x209eb0(0x1b8)]({'pageId':_0x9f2fc6['pageId'],'type':_0x9f2fc6[_0x209eb0(0x1aa)],'title':_0x9f2fc6[_0x209eb0(0x175)],'reason':_0x121cee instanceof Error?_0x121cee[_0x209eb0(0x1b2)]:String(_0x121cee)});}}return _0x5ce7b0[_0x209eb0(0x1a0)]=new Date()[_0x209eb0(0x183)](),await writePageLockFile(_0x46edab[_0x209eb0(0x19b)],_0x2728af),{'ok':_0x42dfd8['length']===0x0||_0x1c5a63[_0x209eb0(0x178)]>0x0||_0x1948c2['length']>0x0,'message':_0x42dfd8['length']>0x0&&_0x1c5a63[_0x209eb0(0x178)]>0x0?_0x209eb0(0x1b0):_0x1c5a63[_0x209eb0(0x178)]>0x0?_0x209eb0(0x167):_0x1948c2['length']>0x0&&_0x42dfd8['length']===0x0?'No\x20changes\x20to\x20push':_0x42dfd8[0x0]?.[_0x209eb0(0x1a3)]||_0x209eb0(0x1b4),'data':{'appCode':_0x51fca1[_0x209eb0(0x16b)],'pushedPages':_0x1c5a63,'skippedPages':_0x1948c2,'failedPages':_0x42dfd8,'totalPushed':_0x1c5a63[_0x209eb0(0x178)],'totalSkipped':_0x1948c2['length'],'totalFailed':_0x42dfd8[_0x209eb0(0x178)]}};}};async function buildPushPreview(_0x41d922){const _0x5196fd=a161_0x38c4b7,_0x28ed42=loadPageProjectConfig(_0x41d922['appCode']),_0x11dc02=await readPageLockFile(_0x28ed42[_0x5196fd(0x19b)]),{appLock:_0x19f848}=ensurePageLockScope(_0x11dc02??createEmptyPageLock(),_0x41d922[_0x5196fd(0x16b)]),_0x450bdd=getPageIdFlag(_0x41d922);if(_0x450bdd!==undefined)return{'mode':_0x5196fd(0x16a),'items':[await inspectPushPage(_0x41d922,_0x28ed42,_0x19f848[_0x5196fd(0x162)][String(_0x450bdd)],_0x450bdd)]};const _0x363d6e=await buildBatchPushPlan(_0x41d922,_0x19f848[_0x5196fd(0x162)]);return{'mode':_0x5196fd(0x18b),'datasetCode':_0x363d6e[_0x5196fd(0x195)],'items':[..._0x363d6e[_0x5196fd(0x173)][_0x5196fd(0x1a2)](_0x558b00=>({'pageId':_0x558b00[_0x5196fd(0x176)],'type':_0x558b00['type'],'title':_0x558b00['title'],'localPath':_0x558b00[_0x5196fd(0x187)],'status':_0x5196fd(0x173),'reason':_0x558b00['reason']})),...await Promise[_0x5196fd(0x17d)](_0x363d6e[_0x5196fd(0x186)]['map'](_0x43c2bd=>inspectPushPage(_0x41d922,_0x28ed42,_0x19f848[_0x5196fd(0x162)][String(_0x43c2bd[_0x5196fd(0x176)])],_0x43c2bd['pageId'],_0x363d6e[_0x5196fd(0x19d)])))]};}async function buildBatchPushPlan(_0x56cb46,_0x119c0d){const _0x51f202=a161_0x38c4b7,_0x4896d1=loadPageProjectConfig(_0x56cb46[_0x51f202(0x16b)]),_0xb00f62=await loadDatasetDetailForPage(_0x56cb46),_0x2a5381=_0xb00f62['id'],_0x57ca06=new Set(_0xb00f62[_0x51f202(0x1ab)]['filter'](_0x2a2c82=>!_0x2a2c82['deleted'])[_0x51f202(0x1a2)](_0x3e0690=>_0x3e0690['id'])),_0x398cc4=Object[_0x51f202(0x177)](_0x119c0d)[_0x51f202(0x1b3)](_0x5ab8c3=>_0x5ab8c3[_0x51f202(0x168)][_0x51f202(0x1b6)](_0x2a5381)&&_0x57ca06[_0x51f202(0x185)](_0x5ab8c3['pageId']));if(_0x398cc4[_0x51f202(0x178)]===0x0)throw CliErrors[_0x51f202(0x16d)]('No\x20local\x20pages\x20found\x20for\x20dataset\x20\x22'+_0xb00f62[_0x51f202(0x18e)]+'\x22.',_0x51f202(0x190)+CLI_BIN_NAME+_0x51f202(0x1ac)+_0xb00f62[_0x51f202(0x18e)]+_0x51f202(0x163));const _0x15c75f=selectVersionTagGroup(_0x398cc4,_0x5bb564=>_0x5bb564['versionTag']??null,_0x56cb46[_0x51f202(0x164)]('version-tag')),_0x54513f=[],_0x1705bd=[];for(const _0x4fc511 of _0x15c75f[_0x51f202(0x19a)]){const _0x4a3893=resolvePageFilePath(_0x4896d1,_0x4fc511[_0x51f202(0x176)],_0x4fc511['type']);if(!await fileExists(_0x4a3893)){_0x54513f[_0x51f202(0x1b8)]({'pageId':_0x4fc511['pageId'],'type':_0x4fc511['type'],'title':_0x4fc511[_0x51f202(0x175)]});continue;}const _0x4bc50e=await computePageFileHash(_0x4a3893);if(_0x4bc50e===_0x4fc511[_0x51f202(0x166)]){_0x1705bd[_0x51f202(0x1b8)]({'pageId':_0x4fc511[_0x51f202(0x176)],'type':_0x4fc511[_0x51f202(0x1aa)],'title':_0x4fc511[_0x51f202(0x175)],'localPath':_0x4a3893,'reason':'no\x20changes'});continue;}_0x54513f[_0x51f202(0x1b8)]({'pageId':_0x4fc511[_0x51f202(0x176)],'type':_0x4fc511[_0x51f202(0x1aa)],'title':_0x4fc511[_0x51f202(0x175)]});}return{'datasetCode':_0xb00f62['code'],'datasetId':_0x2a5381,'candidates':_0x54513f,'unchanged':_0x1705bd};}async function inspectPushPage(_0x4b91fc,_0xa4cc61,_0x4c43ec,_0x4a0539,_0x1eb743){const _0x2ad2cd=a161_0x38c4b7;if(!_0x4c43ec)return{'pageId':_0x4a0539,'type':_0x2ad2cd(0x192),'title':_0x2ad2cd(0x182)+_0x4a0539,'localPath':resolvePageFilePath(_0xa4cc61,_0x4a0539,_0x2ad2cd(0x192)),'status':_0x2ad2cd(0x169),'reason':_0x2ad2cd(0x190)+CLI_BIN_NAME+_0x2ad2cd(0x19c)+_0x4a0539+'`\x20first'};const _0x6a4a39=resolvePageFilePath(_0xa4cc61,_0x4a0539,_0x4c43ec[_0x2ad2cd(0x1aa)]);if(!await fileExists(_0x6a4a39))return{'pageId':_0x4a0539,'type':_0x4c43ec[_0x2ad2cd(0x1aa)],'title':_0x4c43ec['title'],'localPath':_0x6a4a39,'status':_0x2ad2cd(0x169),'reason':'Local\x20file\x20not\x20found:\x20'+_0x6a4a39};const _0x5bb676=await readFile(_0x6a4a39,_0x2ad2cd(0x19e));try{JSON['parse'](_0x5bb676);}catch{return{'pageId':_0x4a0539,'type':_0x4c43ec[_0x2ad2cd(0x1aa)],'title':_0x4c43ec[_0x2ad2cd(0x175)],'localPath':_0x6a4a39,'status':_0x2ad2cd(0x169),'reason':_0x2ad2cd(0x172)};}const _0x30b10d=computePageContentHash(_0x5bb676);if(_0x30b10d===_0x4c43ec[_0x2ad2cd(0x166)])return{'pageId':_0x4a0539,'type':_0x4c43ec['type'],'title':_0x4c43ec[_0x2ad2cd(0x175)],'localPath':_0x6a4a39,'status':_0x2ad2cd(0x173),'reason':'no\x20changes'};try{const _0x327aeb=await loadPageDetailForPage(_0x4b91fc,_0x4a0539);if(_0x1eb743!=null&&!_0x327aeb['datasetIds']['includes'](_0x1eb743))return{'pageId':_0x4a0539,'type':_0x4c43ec['type'],'title':_0x4c43ec[_0x2ad2cd(0x175)],'localPath':_0x6a4a39,'status':'conflict','reason':_0x2ad2cd(0x17e)+_0x4a0539+_0x2ad2cd(0x199)};const _0x57e941=_0x4c43ec['pageVersion']!=null&&_0x327aeb[_0x2ad2cd(0x1b5)]!=null;if(_0x57e941&&_0x4c43ec[_0x2ad2cd(0x1b5)]!==_0x327aeb[_0x2ad2cd(0x1b5)])return{'pageId':_0x4a0539,'type':_0x4c43ec[_0x2ad2cd(0x1aa)],'title':_0x4c43ec[_0x2ad2cd(0x175)],'localPath':_0x6a4a39,'status':_0x2ad2cd(0x198),'reason':_0x2ad2cd(0x1a7)};if(!_0x57e941&&computeSerializedSchemaHash(_0x327aeb[_0x2ad2cd(0x18e)])!==_0x4c43ec['hash'])return{'pageId':_0x4a0539,'type':_0x4c43ec[_0x2ad2cd(0x1aa)],'title':_0x4c43ec[_0x2ad2cd(0x175)],'localPath':_0x6a4a39,'status':_0x2ad2cd(0x198),'reason':_0x2ad2cd(0x197)};}catch(_0x327eb7){return{'pageId':_0x4a0539,'type':_0x4c43ec[_0x2ad2cd(0x1aa)],'title':_0x4c43ec[_0x2ad2cd(0x175)],'localPath':_0x6a4a39,'status':_0x2ad2cd(0x169),'reason':_0x327eb7 instanceof Error?_0x327eb7[_0x2ad2cd(0x1b2)]:String(_0x327eb7)};}return{'pageId':_0x4a0539,'type':_0x4c43ec[_0x2ad2cd(0x1aa)],'title':_0x4c43ec['title'],'localPath':_0x6a4a39,'status':'would_push'};}async function prepareSinglePush(_0xf5fb5b,_0x48b351,_0x13a4f0,_0x248134,_0x47581c){const _0x548101=a161_0x38c4b7;if(!_0x13a4f0)throw CliErrors[_0x548101(0x16d)]('No\x20lock\x20record\x20found\x20for\x20page\x20'+_0x248134+'.',_0x548101(0x190)+CLI_BIN_NAME+_0x548101(0x19c)+_0x248134+'`\x20first.');const _0xd07175=resolvePageFilePath(_0x48b351,_0x248134,_0x13a4f0[_0x548101(0x1aa)]);if(!await fileExists(_0xd07175))throw CliErrors[_0x548101(0x16d)]('Local\x20file\x20not\x20found:\x20'+_0xd07175,'Run\x20`'+CLI_BIN_NAME+'\x20page\x20pull\x20--id\x20'+_0x248134+_0x548101(0x163));const _0x247ddb=await readFile(_0xd07175,_0x548101(0x19e));try{JSON[_0x548101(0x18d)](_0x247ddb);}catch{throw CliErrors[_0x548101(0x16d)](_0x548101(0x180)+_0xd07175);}const _0x9e7a5=await loadPageDetailForPage(_0xf5fb5b,_0x248134);if(_0x47581c!=null&&!_0x9e7a5[_0x548101(0x168)][_0x548101(0x1b6)](_0x47581c))throw CliErrors[_0x548101(0x16d)]('Page\x20'+_0x248134+_0x548101(0x174));const _0x33f1bf=_0x13a4f0['pageVersion']!=null&&_0x9e7a5[_0x548101(0x1b5)]!=null;if(_0x33f1bf){if(_0x13a4f0[_0x548101(0x1b5)]!==_0x9e7a5[_0x548101(0x1b5)])throw CliErrors[_0x548101(0x16d)]('Remote\x20page\x20'+_0x248134+_0x548101(0x19f),_0x548101(0x190)+CLI_BIN_NAME+'\x20page\x20pull\x20--id\x20'+_0x248134+'`\x20first.');}else{const _0x2544f2=computeSerializedSchemaHash(_0x9e7a5[_0x548101(0x18e)]);if(_0x2544f2!==_0x13a4f0[_0x548101(0x166)])throw CliErrors['validation'](_0x548101(0x191)+_0x248134+'\x20has\x20changed\x20since\x20last\x20pull.',_0x548101(0x190)+CLI_BIN_NAME+_0x548101(0x19c)+_0x248134+_0x548101(0x163));}return{'lockEntry':_0x13a4f0,'localPath':_0xd07175,'localContent':_0x247ddb,'localHash':computePageContentHash(_0x247ddb),'remoteDetail':_0x9e7a5};}function a161_0x44b7(){const _0x804bfd=['\x20has\x20changed\x20since\x20last\x20pull.','lastSync','5WUmLIG','map','reason','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','remoteDetail','Page\x20group\x20version\x20tag\x20(batch\x20mode\x20only)','remote\x20pageVersion\x20changed','normalized','3109960qyaUzy','type','relatedPages','\x20page\x20pull\x20--datasetcode\x20','page','Page\x20update\x20failed:\x20','11422017HdtDRi','Some\x20pages\x20failed\x20to\x20push','Page\x20ID','message','filter','Push\x20failed','pageVersion','includes','nextLockEntry','push','/smartapi/lovrabet/update-page','pages','`\x20first.','str','Push\x20local\x20page\x20schema\x20back\x20to\x20remote','hash','Push\x20succeeded','datasetIds','blocked','single','appCode','string','validation','apiError','2395542uYKRml','alias','name','local\x20JSON\x20is\x20invalid','unchanged','\x20no\x20longer\x20belongs\x20to\x20the\x20selected\x20dataset.','title','pageId','values','length','1604260axNdyw','45126770BgzeWc','POST','3EOCMPj','all','Page\x20','compress','Invalid\x20JSON\x20in\x20local\x20page\x20file:\x20','mode','page-','toISOString','localContent','has','candidates','localPath','version-tag','208262CczxIa','6817912uPrKCs','batch','status','parse','code','write','Run\x20`','Remote\x20page\x20','UNKNOWN','12LRpKhF','would_push','datasetCode','Push\x20succeeded;\x20server\x20normalized\x20the\x20schema','remote\x20schema\x20changed','conflict','\x20no\x20longer\x20belongs\x20to\x20the\x20target\x20dataset','items','lockFilePath','\x20page\x20pull\x20--id\x20','datasetId','utf8'];a161_0x44b7=function(){return _0x804bfd;};return a161_0x44b7();}async function pushPreparedPage(_0x24b45f,_0x4d6b8d){const _0x1f3223=a161_0x38c4b7,_0xd1c60c=await updatePage(_0x24b45f['appCode'],_0x4d6b8d[_0x1f3223(0x1a5)][_0x1f3223(0x176)],_0x4d6b8d[_0x1f3223(0x184)],_0x4d6b8d['remoteDetail'][_0x1f3223(0x168)]);if(!_0xd1c60c)throw CliErrors[_0x1f3223(0x16e)](_0x1f3223(0x1ae)+_0x4d6b8d['remoteDetail']['pageId']);const _0x3ebe1b=await loadPageDetailForPage(_0x24b45f,_0x4d6b8d['remoteDetail'][_0x1f3223(0x176)]),_0x20428a=serializePageSchemaForFile(_0x3ebe1b[_0x1f3223(0x18e)]);return await writeFile(_0x4d6b8d[_0x1f3223(0x187)],_0x20428a,'utf8'),{'pageId':_0x3ebe1b[_0x1f3223(0x176)],'type':_0x3ebe1b[_0x1f3223(0x1aa)],'title':_0x3ebe1b[_0x1f3223(0x171)],'normalized':_0x20428a!==serializePageSchemaForFile(_0x4d6b8d[_0x1f3223(0x184)]),'nextLockEntry':{'hash':computePageContentHash(_0x20428a),'pageId':_0x3ebe1b['pageId'],'pageVersion':_0x3ebe1b[_0x1f3223(0x1b5)],'type':_0x3ebe1b[_0x1f3223(0x1aa)],'title':_0x3ebe1b['name'],'datasetIds':_0x3ebe1b[_0x1f3223(0x168)],'versionTag':_0x3ebe1b['versionTag']}};}
|