@lovrabet/rabetbase-cli 2.5.5-beta.1 → 2.5.5-beta.2
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/api-group.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/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.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/detail.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/logs.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/batch-design.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/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.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/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.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/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.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/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.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/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/api-architecture-upgrade.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/domain-routing-sync.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/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.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/feishu-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/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.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.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/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.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/supported-flags.js +1 -1
- 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/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.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 +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +13 -9
- package/skills/rabetbase-page-generation/references/component-baseline.md +2 -2
- package/skills/rabetbase-page-generation/references/generation.md +64 -15
- package/skills/rabetbase-page-generation/templates/onepage/build.mjs +39 -54
- package/skills/rabetbase-page-generation/templates/onepage/list/index.jsx +6 -2
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a190_0x5913(_0x5def8f,_0x5d267c){_0x5def8f=_0x5def8f-0x1da;const _0x5cf7c5=a190_0x5cf7();let _0x591351=_0x5cf7c5[_0x5def8f];return _0x591351;}const a190_0x10d11f=a190_0x5913;(function(_0x5f3cf2,_0x401f7f){const _0x1a4652=a190_0x5913,_0x2ba967=_0x5f3cf2();while(!![]){try{const _0x187faf=parseInt(_0x1a4652(0x1e9))/0x1+parseInt(_0x1a4652(0x1dd))/0x2+parseInt(_0x1a4652(0x1e0))/0x3*(-parseInt(_0x1a4652(0x1e1))/0x4)+parseInt(_0x1a4652(0x1e4))/0x5*(-parseInt(_0x1a4652(0x1e6))/0x6)+parseInt(_0x1a4652(0x1ed))/0x7*(parseInt(_0x1a4652(0x1df))/0x8)+-parseInt(_0x1a4652(0x1e2))/0x9+-parseInt(_0x1a4652(0x1da))/0xa*(-parseInt(_0x1a4652(0x1e8))/0xb);if(_0x187faf===_0x401f7f)break;else _0x2ba967['push'](_0x2ba967['shift']());}catch(_0x49bbbc){_0x2ba967['push'](_0x2ba967['shift']());}}}(a190_0x5cf7,0x9bc59));import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,buildCustomPageRuntimeUrl}from'./shared.js';export const pageCustomList={'service':a190_0x10d11f(0x1e5),'command':a190_0x10d11f(0x1f3),'description':a190_0x10d11f(0x1f2),'risk':a190_0x10d11f(0x1ec),'defaultOutputFormat':a190_0x10d11f(0x1ef),'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x193be4){const _0x2c9ee1=a190_0x10d11f,_0x44cb0c=(await fetchMenuSnapshot(_0x193be4[_0x2c9ee1(0x1f0)],_0x193be4['cookie']))['menus'][_0x2c9ee1(0x1ee)](_0x5b3a95=>{const _0x16163e=_0x2c9ee1;if(_0x5b3a95[_0x16163e(0x1eb)]!==_0x16163e(0x1e3)||_0x5b3a95[_0x16163e(0x1ea)]==null)return[];const _0x542cff=buildCustomPageDevelopmentUrl(_0x193be4[_0x16163e(0x1f0)],_0x5b3a95[_0x16163e(0x1db)]),_0x1a9b1c=buildCustomPageRuntimeUrl(_0x193be4[_0x16163e(0x1f0)],_0x5b3a95[_0x16163e(0x1db)]),_0x144731=buildCustomPageEditUrl(_0x193be4[_0x16163e(0x1f0)],_0x5b3a95['pageId']);return[{'pageId':_0x5b3a95[_0x16163e(0x1ea)],'label':_0x5b3a95[_0x16163e(0x1f1)],'path':_0x5b3a95[_0x16163e(0x1db)],..._0x542cff?{'pageUrl':_0x542cff}:{},..._0x1a9b1c?{'runtimePageUrl':_0x1a9b1c}:{},..._0x144731?{'editPageUrl':_0x144731}:{}}];});return{'ok':!![],'data':{'pages':_0x44cb0c},'message':_0x44cb0c[_0x2c9ee1(0x1dc)]===0x0?_0x2c9ee1(0x1de):'Found\x20'+_0x44cb0c['length']+_0x2c9ee1(0x1e7)};}};function a190_0x5cf7(){const _0x2f7202=['pageId','type','read','228851YqCeZa','flatMap','compress','appCode','label','List\x20Custom\x20Pages\x20in\x20the\x20current\x20app','custom-list','10068950SiozuZ','path','length','909610aNMJBB','No\x20Custom\x20Pages\x20found.','208qJxMHn','19032bSIpBz','636ZNyFSi','9335295rvdJQh','react','125vOMySM','page','17562xXCukR','\x20Custom\x20Page(s).','11CCaLkD','445449YQjfZy'];a190_0x5cf7=function(){return _0x2f7202;};return a190_0x5cf7();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a191_0x359e06=a191_0xee60;(function(_0x5dab3c,_0x35c924){const _0x18e2fc=a191_0xee60,_0x1786fd=_0x5dab3c();while(!![]){try{const _0x18a2cf=parseInt(_0x18e2fc(0x193))/0x1*(parseInt(_0x18e2fc(0x17a))/0x2)+parseInt(_0x18e2fc(0x179))/0x3*(parseInt(_0x18e2fc(0x16e))/0x4)+parseInt(_0x18e2fc(0x181))/0x5*(parseInt(_0x18e2fc(0x186))/0x6)+parseInt(_0x18e2fc(0x177))/0x7*(parseInt(_0x18e2fc(0x18d))/0x8)+-parseInt(_0x18e2fc(0x17f))/0x9+-parseInt(_0x18e2fc(0x17c))/0xa+-parseInt(_0x18e2fc(0x18a))/0xb;if(_0x18a2cf===_0x35c924)break;else _0x1786fd['push'](_0x1786fd['shift']());}catch(_0xbf247f){_0x1786fd['push'](_0x1786fd['shift']());}}}(a191_0xd149,0x9827b));function a191_0xd149(){const _0x2938d2=['Custom\x20Page\x20ID','1184442rWHjuH','appCode','94038HwRAlF','2GHvCot','custom-publish','9745280wCHNHQ','POST','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20published\x20page\x20could\x20not\x20be\x20generated.','2807730tHsNgn','page','5929615PxOndw','write','Optional\x20publish\x20remark','push','runtimePageUrl','6Ijkqcm','str','pageCode','Published\x20Custom\x20Page\x20','5924215sQIINM','remark','string','16NGDSxr','FORMAL','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','status','warnings','number','485111KhwbFU','cookie','56JlHSiE','Publish\x20the\x20latest\x20saved\x20content\x20of\x20a\x20Custom\x20Page','compress','trim','page.custom-publish','apiError','pageId','isInteger'];a191_0xd149=function(){return _0x2938d2;};return a191_0xd149();}import{getCustomPageSource,publishCustomPage}from'../../../core/api-client.js';function a191_0xee60(_0x4b081f,_0x4506ef){_0x4b081f=_0x4b081f-0x16e;const _0xd1499c=a191_0xd149();let _0xee607e=_0xd1499c[_0x4b081f];return _0xee607e;}import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomPublish={'service':a191_0x359e06(0x180),'command':a191_0x359e06(0x17b),'description':a191_0x359e06(0x16f),'risk':a191_0x359e06(0x182),'defaultOutputFormat':a191_0x359e06(0x170),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a191_0x359e06(0x192),'required':!![],'description':a191_0x359e06(0x176)},{'name':'remark','type':a191_0x359e06(0x18c),'description':a191_0x359e06(0x183)}],async 'validate'(_0x517817){readCustomPageId(_0x517817);},async 'dryRun'(_0x461be7){const _0x532dee=a191_0x359e06,_0x5ded9c=readInput(_0x461be7);return{'method':_0x532dee(0x17d),'url':'/smartapi/webcode/file/publish','body':{'id':_0x5ded9c[_0x532dee(0x174)],..._0x5ded9c[_0x532dee(0x18b)]?{'remark':_0x5ded9c[_0x532dee(0x18b)]}:{}},'description':'Would\x20publish\x20Custom\x20Page\x20'+_0x5ded9c['pageId']+'.'};},async 'execute'(_0x326586){const _0x1e62ef=a191_0x359e06,_0xe317e5=readInput(_0x326586);await getCustomPageSource(_0xe317e5['pageId']);const _0x3d7123=await publishCustomPage(_0xe317e5);if(!Number[_0x1e62ef(0x175)](_0x3d7123)||_0x3d7123!==_0xe317e5['pageId'])throw CliErrors[_0x1e62ef(0x173)]('Custom\x20Page\x20publish\x20did\x20not\x20return\x20the\x20expected\x20page\x20ID.');const _0x2079ec=await getCustomPageSource(_0xe317e5['pageId']);if(_0x2079ec[_0x1e62ef(0x190)]!==_0x1e62ef(0x18e))throw CliErrors[_0x1e62ef(0x173)]('Custom\x20Page\x20publish\x20did\x20not\x20reach\x20published\x20status:\x20'+(_0x2079ec['status']??'unknown')+'.');const _0x50de97=_0x2079ec[_0x1e62ef(0x178)]?.[_0x1e62ef(0x171)](),_0x289e2d=buildCustomPageEditUrl(_0x50de97,_0xe317e5[_0x1e62ef(0x174)]),_0x59d3f1=await resolveCustomPageDevelopmentUrl(_0x50de97,_0xe317e5[_0x1e62ef(0x174)],_0x326586[_0x1e62ef(0x194)]),_0x21f387=buildMutationData(_0xe317e5,!![],_0x59d3f1,_0x289e2d);_0x50de97&&!_0x59d3f1&&_0x21f387[_0x1e62ef(0x191)][_0x1e62ef(0x184)](_0x1e62ef(0x18f));const _0x1f89c0=buildCustomPageRuntimeUrl(_0x2079ec[_0x1e62ef(0x178)],_0x2079ec[_0x1e62ef(0x188)]);return _0x1f89c0?_0x21f387[_0x1e62ef(0x185)]=_0x1f89c0:_0x21f387['warnings'][_0x1e62ef(0x184)](_0x1e62ef(0x17e)),{'ok':!![],'data':_0x21f387,'message':_0x1e62ef(0x189)+_0xe317e5[_0x1e62ef(0x174)]+'.'};}};function readInput(_0x246ac9){const _0x33f934=a191_0x359e06,_0x169a23=readCustomPageId(_0x246ac9),_0x312920=_0x246ac9[_0x33f934(0x187)]('remark')['trim']();return{'pageId':_0x169a23,..._0x312920?{'remark':_0x312920}:{}};}function buildMutationData(_0x228dd7,_0x293504=![],_0x417288,_0x418d75){const _0x4b1816=a191_0x359e06;return{'operation':_0x4b1816(0x172),'selector':{'pageId':_0x228dd7[_0x4b1816(0x174)]},'before':null,'after':{'pageId':_0x228dd7[_0x4b1816(0x174)],'status':'FORMAL'},'dryRun':!_0x293504,'request':_0x228dd7,..._0x417288?{'pageUrl':_0x417288}:{},..._0x418d75?{'editPageUrl':_0x418d75}:{},'warnings':[]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a192_0x329015=a192_0x3864;(function(_0x4c5f81,_0x469e0f){const _0x3dccbf=a192_0x3864,_0x4ac595=_0x4c5f81();while(!![]){try{const _0x2ef960=parseInt(_0x3dccbf(0x184))/0x1+parseInt(_0x3dccbf(0x192))/0x2*(parseInt(_0x3dccbf(0x188))/0x3)+parseInt(_0x3dccbf(0x18d))/0x4+-parseInt(_0x3dccbf(0x180))/0x5+parseInt(_0x3dccbf(0x17f))/0x6+-parseInt(_0x3dccbf(0x194))/0x7*(parseInt(_0x3dccbf(0x17d))/0x8)+-parseInt(_0x3dccbf(0x186))/0x9;if(_0x2ef960===_0x469e0f)break;else _0x4ac595['push'](_0x4ac595['shift']());}catch(_0x540b13){_0x4ac595['push'](_0x4ac595['shift']());}}}(a192_0x2527,0x70267));import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{getAppBaseUrl,getPublishedAppDomain}from'../../../constant/domain.js';import{CliErrors}from'../../../errors.js';import{validateCustomPageSourceFiles}from'./syntax.js';function a192_0x3864(_0x50a403,_0x390461){_0x50a403=_0x50a403-0x17d;const _0x25272d=a192_0x2527();let _0x386455=_0x25272d[_0x50a403];return _0x386455;}export const CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL={...APPCODE_FLAG_OPTIONAL,'description':a192_0x329015(0x18a)};function a192_0x2527(){const _0x14c7f9=['8ZbkJke','file','5045562zjmtrM','658440BXWcHE','length','find','Invalid\x20Custom\x20Page\x20content:\x20','806387WRURPd','path','14574465SaAsgh','join','1989519hDFpMZ','/ide/','Optional\x20app\x20code\x20resolved\x20from\x20page\x20ID\x20when\x20omitted','menus','pageId','2196624XBDYcv','num','/pages/','--id\x20must\x20be\x20a\x20positive\x20integer.','react','2wwHPCs','validation','4544421xbSwZc','trim'];a192_0x2527=function(){return _0x14c7f9;};return a192_0x2527();}function trimOptional(_0x263770){const _0xdc62b2=a192_0x329015;return _0x263770?.[_0xdc62b2(0x195)]()||undefined;}export function buildCustomPageRuntimeUrl(_0x412936,_0x253f45){const _0x23399f=trimOptional(_0x412936),_0x37fbbf=trimOptional(_0x253f45);if(!_0x23399f||!_0x37fbbf)return undefined;return getPublishedAppDomain(_0x23399f)+'/'+encodeURIComponent(_0x37fbbf);}export function buildCustomPageDevelopmentUrl(_0x4700d8,_0x22ca0f){const _0x3ef578=a192_0x329015,_0x4c293a=trimOptional(_0x4700d8),_0x57f818=trimOptional(_0x22ca0f);if(!_0x4c293a||!_0x57f818)return undefined;return getAppBaseUrl(_0x4c293a)+_0x3ef578(0x18f)+encodeURIComponent(_0x57f818);}export async function resolveCustomPageDevelopmentUrl(_0x2562ae,_0x310b2e,_0x4ba8d7){const _0x5b0187=a192_0x329015,_0x3c71f4=trimOptional(_0x2562ae);if(!_0x3c71f4)return undefined;try{const _0x4205d2=(await fetchMenuSnapshot(_0x3c71f4,_0x4ba8d7))[_0x5b0187(0x18b)][_0x5b0187(0x182)](_0x572bfa=>_0x572bfa['type']===_0x5b0187(0x191)&&_0x572bfa[_0x5b0187(0x18c)]===_0x310b2e);return buildCustomPageDevelopmentUrl(_0x3c71f4,_0x4205d2?.[_0x5b0187(0x185)]);}catch{return undefined;}}export function buildCustomPageEditUrl(_0x11ca57,_0x1adccf){const _0x23f6fc=a192_0x329015,_0xaad8f9=trimOptional(_0x11ca57);if(!_0xaad8f9)return;const _0x545614=trimOptional(String(_0x1adccf??''));if(!_0x545614)return;return getAppBaseUrl(_0xaad8f9)+_0x23f6fc(0x189)+encodeURIComponent(_0x545614);}export async function validateCustomPageContent(_0x2779d9){const _0xfdc7fa=a192_0x329015,_0x5b6cc1=await validateCustomPageSourceFiles(_0x2779d9);if(_0x5b6cc1[_0xfdc7fa(0x181)]>0x0)throw CliErrors[_0xfdc7fa(0x193)](_0xfdc7fa(0x183)+_0x5b6cc1['map'](_0x45502f=>_0x45502f[_0xfdc7fa(0x17e)]+':\x20'+_0x45502f['message'])[_0xfdc7fa(0x187)](';\x20'));}export function readCustomPageId(_0xf8764d){const _0x3863a3=a192_0x329015,_0x1d44ee=_0xf8764d[_0x3863a3(0x18e)]('id');if(!Number['isInteger'](_0x1d44ee)||_0x1d44ee<=0x0)throw CliErrors[_0x3863a3(0x193)](_0x3863a3(0x190));return _0x1d44ee;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a193_0x2d225=a193_0x5879;(function(_0x5d59be,_0x3bb6f4){const _0x77404f=a193_0x5879,_0x535cf0=_0x5d59be();while(!![]){try{const _0xd423b4=-parseInt(_0x77404f(0x6c))/0x1*(-parseInt(_0x77404f(0x79))/0x2)+-parseInt(_0x77404f(0x72))/0x3+parseInt(_0x77404f(0x76))/0x4*(parseInt(_0x77404f(0x75))/0x5)+-parseInt(_0x77404f(0x68))/0x6+parseInt(_0x77404f(0x67))/0x7+-parseInt(_0x77404f(0x77))/0x8+-parseInt(_0x77404f(0x6b))/0x9*(parseInt(_0x77404f(0x70))/0xa);if(_0xd423b4===_0x3bb6f4)break;else _0x535cf0['push'](_0x535cf0['shift']());}catch(_0x5ee286){_0x535cf0['push'](_0x535cf0['shift']());}}}(a193_0x1a40,0x3a169));function a193_0x5879(_0x3934c1,_0x58c5ae){_0x3934c1=_0x3934c1-0x64;const _0x1a4096=a193_0x1a40();let _0x587959=_0x1a4096[_0x3934c1];return _0x587959;}import{format}from'prettier';function a193_0x1a40(){const _0x31baee=['toLowerCase','page\x20files','2502976HbhdKB','887904FzaDzB','Missing\x20React\x20source\x20file\x20with\x20extension\x20.jsx\x20or\x20.tsx','filter','267903lOgOny','2sGwCwW','.tsx','message','trim','30ZzxMFz','entries','397701QEiSAU','all','map','50cVqdMP','7804SoPQre','794536PsGvkU','some','330020DoxNwu','endsWith','typescript','babel'];a193_0x1a40=function(){return _0x31baee;};return a193_0x1a40();}const SOURCE_PARSERS={'.js':a193_0x2d225(0x64),'.jsx':'babel','.ts':a193_0x2d225(0x7b),'.tsx':'typescript'},CUSTOM_PAGE_EXTENSIONS=['.jsx',a193_0x2d225(0x6d)];export async function validateCustomPageSourceFiles(_0x2f20e5){const _0x450f78=a193_0x2d225,_0x565ab9=Object[_0x450f78(0x71)](_0x2f20e5)[_0x450f78(0x6a)](([_0x368492])=>getParser(_0x368492));if(!_0x565ab9[_0x450f78(0x78)](([_0x3b5d1a])=>isReactSourceFile(_0x3b5d1a)))return[{'file':_0x450f78(0x66),'message':_0x450f78(0x69)}];const _0x32c932=await Promise[_0x450f78(0x73)](_0x565ab9[_0x450f78(0x74)](async([_0x187a62,_0x389af4])=>{const _0x1a276f=_0x450f78;try{return await format(_0x389af4,{'parser':getParser(_0x187a62)}),undefined;}catch(_0x121b77){return{'file':_0x187a62,'message':_0x121b77 instanceof Error?_0x121b77[_0x1a276f(0x6e)]:String(_0x121b77)};}}));return _0x32c932[_0x450f78(0x6a)](_0x2a7f3c=>_0x2a7f3c!==undefined);}function getParser(_0x510f75){const _0x49850e=a193_0x2d225,_0x10832b=_0x510f75[_0x49850e(0x6f)]()[_0x49850e(0x65)]();return Object[_0x49850e(0x71)](SOURCE_PARSERS)['find'](([_0x289db4])=>_0x10832b['endsWith'](_0x289db4))?.[0x1];}function isReactSourceFile(_0x251b28){const _0x348bfb=a193_0x2d225,_0x38adec=_0x251b28[_0x348bfb(0x6f)]()['toLowerCase']();return CUSTOM_PAGE_EXTENSIONS[_0x348bfb(0x78)](_0x4dd2bb=>_0x38adec[_0x348bfb(0x7a)](_0x4dd2bb));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a194_0x6e23cc=a194_0x292e;(function(_0x1be62e,_0x301d77){const _0x7dbd8a=a194_0x292e,_0x3d8f23=_0x1be62e();while(!![]){try{const _0x506ec6=-parseInt(_0x7dbd8a(0x199))/0x1+parseInt(_0x7dbd8a(0x1ae))/0x2+-parseInt(_0x7dbd8a(0x1a0))/0x3+-parseInt(_0x7dbd8a(0x1a7))/0x4*(-parseInt(_0x7dbd8a(0x1a5))/0x5)+parseInt(_0x7dbd8a(0x1b6))/0x6*(parseInt(_0x7dbd8a(0x1b0))/0x7)+-parseInt(_0x7dbd8a(0x198))/0x8*(parseInt(_0x7dbd8a(0x1b8))/0x9)+-parseInt(_0x7dbd8a(0x19e))/0xa*(-parseInt(_0x7dbd8a(0x1a8))/0xb);if(_0x506ec6===_0x301d77)break;else _0x3d8f23['push'](_0x3d8f23['shift']());}catch(_0x59f02f){_0x3d8f23['push'](_0x3d8f23['shift']());}}}(a194_0x5da8,0xe1c56));import{getCustomPageSource,updateCustomPageContent}from'../../../core/api-client.js';function a194_0x292e(_0x1ec113,_0x545fa5){_0x1ec113=_0x1ec113-0x195;const _0x5da830=a194_0x5da8();let _0x292eca=_0x5da830[_0x1ec113];return _0x292eca;}import{readCustomPageDirectory}from'../../../core/page/file-system.js';import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,resolveCustomPageDevelopmentUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,validateCustomPageContent}from'./shared.js';export const pageCustomUpdate={'service':a194_0x6e23cc(0x19b),'command':a194_0x6e23cc(0x1a4),'description':a194_0x6e23cc(0x196),'risk':a194_0x6e23cc(0x1a9),'defaultOutputFormat':a194_0x6e23cc(0x1b7),'structuredErrors':!![],'requiresAppCode':![],'rejectedFlags':[{'name':a194_0x6e23cc(0x19a),'message':'page\x20custom-update\x20no\x20longer\x20accepts\x20--page-content.','hint':'Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.'}],'flags':[{'name':'id','type':a194_0x6e23cc(0x1a3),'required':!![],'description':a194_0x6e23cc(0x1b1)},{'name':a194_0x6e23cc(0x1b4),'type':a194_0x6e23cc(0x1b9),'required':!![],'description':'Directory\x20containing\x20all\x20complete\x20page\x20files'},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5a8a4c){readCustomPageId(_0x5a8a4c),await readValidatedPageContent(_0x5a8a4c);},async 'dryRun'(_0x5e837a){const _0x5e4f7a=a194_0x6e23cc,_0xefcbbc=await readInput(_0x5e837a);return{'method':_0x5e4f7a(0x1ad),'url':_0x5e4f7a(0x1ac),'body':{'id':_0xefcbbc['pageId'],'codeContent':_0xefcbbc[_0x5e4f7a(0x19c)]},'description':_0x5e4f7a(0x1b5)+_0xefcbbc[_0x5e4f7a(0x1a6)]+'.'};},async 'execute'(_0x1ae01b){const _0x18362f=a194_0x6e23cc,_0x460966=await readInput(_0x1ae01b),_0x544709=await updateCustomPageContent({'pageId':_0x460966[_0x18362f(0x1a6)],'pageContent':_0x460966[_0x18362f(0x19c)]});if(!Number[_0x18362f(0x197)](_0x544709[_0x18362f(0x1b3)])||_0x544709[_0x18362f(0x1b3)]<=0x0)throw CliErrors['apiError'](_0x18362f(0x1af));const _0x2915ae=buildCustomPageEditUrl(_0x460966['appCode'],_0x460966[_0x18362f(0x1a6)]),_0x914473=await resolveCustomPageDevelopmentUrl(_0x460966[_0x18362f(0x195)],_0x460966[_0x18362f(0x1a6)],_0x1ae01b[_0x18362f(0x1ab)]);return{'ok':!![],'data':{'operation':_0x18362f(0x1aa),'selector':{'appCode':_0x460966[_0x18362f(0x195)],'pageId':_0x460966[_0x18362f(0x1a6)]},'before':null,'after':{'pageId':_0x544709['pageId'],'version':_0x544709['newVersion'],'pageContent':_0x460966[_0x18362f(0x19c)]},'dryRun':![],'request':_0x460966,..._0x914473?{'pageUrl':_0x914473}:{},..._0x2915ae?{'editPageUrl':_0x2915ae}:{},'warnings':_0x914473?[]:['Custom\x20Page\x20was\x20updated,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.']},'message':_0x18362f(0x19f)+_0x460966[_0x18362f(0x1a6)]+'.'};}};async function readInput(_0x5354f0){const _0x3196c9=a194_0x6e23cc,_0x1a4e1f=readCustomPageId(_0x5354f0),_0xf9f2fc=_0x5354f0['str'](_0x3196c9(0x19d))['trim']()||(await getCustomPageSource(_0x1a4e1f))[_0x3196c9(0x195)]?.['trim']();if(!_0xf9f2fc)throw CliErrors[_0x3196c9(0x1a2)](_0x3196c9(0x1a1)+_0x1a4e1f+'.');return{'appCode':_0xf9f2fc,'pageId':_0x1a4e1f,'pageContent':await readValidatedPageContent(_0x5354f0)};}async function readValidatedPageContent(_0x57bedc){const _0x224ccd=a194_0x6e23cc,_0x5afc4e=await readCustomPageDirectory(_0x57bedc[_0x224ccd(0x1b2)](_0x224ccd(0x1b4)));return await validateCustomPageContent(_0x5afc4e),_0x5afc4e;}function a194_0x5da8(){const _0x4f3bcf=['newVersion','page-dir','Would\x20save\x20all\x20files\x20of\x20Custom\x20Page\x20','6Glqkgp','compress','9GzGxLV','string','appCode','Save\x20all\x20files\x20of\x20a\x20Custom\x20Page','isInteger','9404936NNPQsR','1782258NzvDji','page-content','page','pageContent','appcode','10prOwCZ','Updated\x20Custom\x20Page\x20','5399181qbckCd','Cannot\x20determine\x20the\x20appCode\x20for\x20Custom\x20Page\x20','validation','number','custom-update','2085085nYvVLE','pageId','16kWdEIp','32464465kdryDP','write','page.custom-update','cookie','/smartapi/webcode/page/update/content','POST','1695968OtrVlR','Custom\x20Page\x20update\x20did\x20not\x20create\x20a\x20new\x20version.','1504951wgjPjv','Custom\x20Page\x20ID','str'];a194_0x5da8=function(){return _0x4f3bcf;};return a194_0x5da8();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a195_0x1f2fb8=a195_0x4ce0;function a195_0x4ce0(_0x333ce3,_0x5191c7){_0x333ce3=_0x333ce3-0x1bb;const _0x427fc8=a195_0x427f();let _0x4ce036=_0x427fc8[_0x333ce3];return _0x4ce036;}(function(_0x3aa30a,_0x4a1597){const _0x328f7a=a195_0x4ce0,_0x340ec1=_0x3aa30a();while(!![]){try{const _0x538a93=-parseInt(_0x328f7a(0x1bd))/0x1+parseInt(_0x328f7a(0x1c2))/0x2+-parseInt(_0x328f7a(0x1c5))/0x3+parseInt(_0x328f7a(0x1d1))/0x4+parseInt(_0x328f7a(0x1c6))/0x5+-parseInt(_0x328f7a(0x1bc))/0x6+-parseInt(_0x328f7a(0x1c0))/0x7;if(_0x538a93===_0x4a1597)break;else _0x340ec1['push'](_0x340ec1['shift']());}catch(_0xc6fb6e){_0x340ec1['push'](_0x340ec1['shift']());}}}(a195_0x427f,0xc183e));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 a195_0x427f(){const _0x49cee5=['source','length','compress','nextAction','/standard-page-status?appCode=','code','read','2573468sOgMOd','status','manualResolutionRequired','1876344mDkTag','635667DoOZBE','string','relatedPages','4940866DVHSBu','query-data-list-status','2952154LYTNiI','alias','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','458037edWcTc','2400510GryWDA','page','data-list-status','GET'];a195_0x427f=function(){return _0x49cee5;};return a195_0x427f();}export const pageDataListStatus={'service':a195_0x1f2fb8(0x1c7),'command':a195_0x1f2fb8(0x1c8),'description':'Query\x20Data\x20List\x20Page\x20facts\x20for\x20a\x20dataset','risk':a195_0x1f2fb8(0x1d0),'defaultOutputFormat':a195_0x1f2fb8(0x1cc),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a195_0x1f2fb8(0x1c3),'type':a195_0x1f2fb8(0x1be),'description':a195_0x1f2fb8(0x1c4)}],async 'validate'(_0x242b0d){validateDatasetSelector(_0x242b0d);},async 'dryRun'(_0x4e3961){const _0x2b5ba3=a195_0x1f2fb8,_0x20eaf0=await loadDatasetDetailForPage(_0x4e3961);return{'method':_0x2b5ba3(0x1c9),'url':'/smartapi/lovrabet/dataset/'+_0x20eaf0[_0x2b5ba3(0x1cf)]+_0x2b5ba3(0x1ce)+encodeURIComponent(_0x4e3961['appCode']),'description':serializeDryRunDescription({'dataset':{'id':_0x20eaf0['id'],'code':_0x20eaf0[_0x2b5ba3(0x1cf)],'name':_0x20eaf0['name']},'action':_0x2b5ba3(0x1c1)})};},async 'execute'(_0x1d4e0a){const _0x1bdc37=a195_0x1f2fb8,_0x24a858=await loadDatasetDetailForPage(_0x1d4e0a),_0x16b961=await loadDataListPageStatusForGenerate(_0x1d4e0a,_0x24a858[_0x1bdc37(0x1cf)]),_0x17f220=getUndeletedRelatedPages(_0x24a858),_0x411bb5=assessDataListPageState(_0x24a858[_0x1bdc37(0x1cf)],_0x16b961,{'fallbackUndeletedPages':_0x17f220});return{'ok':!![],'data':{'datasetCode':_0x24a858[_0x1bdc37(0x1cf)],'precheckSource':_0x16b961?.[_0x1bdc37(0x1ca)]??'related-pages-fallback','status':_0x411bb5[_0x1bdc37(0x1d2)],'manualResolutionRequired':_0x411bb5[_0x1bdc37(0x1bb)],'nextAction':_0x411bb5[_0x1bdc37(0x1cd)],'dataListPageStatus':_0x16b961,'relatedPages':{'total':_0x24a858[_0x1bdc37(0x1bf)]['length'],'undeletedCount':_0x17f220[_0x1bdc37(0x1cb)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a196_0x1d2506=a196_0x262e;(function(_0x3665b7,_0x22feae){const _0x8272ef=a196_0x262e,_0x3c368b=_0x3665b7();while(!![]){try{const _0x4d4791=-parseInt(_0x8272ef(0x1f7))/0x1*(parseInt(_0x8272ef(0x1e6))/0x2)+parseInt(_0x8272ef(0x1df))/0x3*(-parseInt(_0x8272ef(0x1e3))/0x4)+parseInt(_0x8272ef(0x1d0))/0x5*(-parseInt(_0x8272ef(0x1d2))/0x6)+-parseInt(_0x8272ef(0x1ff))/0x7+-parseInt(_0x8272ef(0x1d9))/0x8+parseInt(_0x8272ef(0x1da))/0x9+-parseInt(_0x8272ef(0x1e5))/0xa*(-parseInt(_0x8272ef(0x1f1))/0xb);if(_0x4d4791===_0x22feae)break;else _0x3c368b['push'](_0x3c368b['shift']());}catch(_0x38f97b){_0x3c368b['push'](_0x3c368b['shift']());}}}(a196_0x34ba,0xbcad5));function a196_0x262e(_0x738091,_0x2a7429){_0x738091=_0x738091-0x1cc;const _0x34babc=a196_0x34ba();let _0x262ed7=_0x34babc[_0x738091];return _0x262ed7;}import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessGenerateOperationState,assessDataListPageState,buildPageGenerateOperationStatusQueryCommand,buildDataListPageStatusQueryCommand,createPageGenerateClientOperationId,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';function a196_0x34ba(){const _0x4fd86b=['CRUD_PAGE_SET','9771904JvwZud','10410111IRxUYP','appCode','This\x20command\x20always\x20generates\x20a\x20DATA_LIST\x20page\x20from\x20a\x20dataset.','fieldCount','related-pages-fallback','222333KOIJxz','page-type','message','nextAction','36OGpOcd','status','6100370MrRLah','1484762KhRVqv','DATA_LIST','write','source','compress','manualResolutionRequired','precheck','/generate-standard-pages/start','currentStep','clientOperationId','Actually\x20execute\x20the\x20generation.\x20Without\x20this\x20flag,\x20only\x20a\x20dry-run\x20preview\x20is\x20shown.','66DgfQqv','allowGenerate','boolean','page\x20generate-start\x20does\x20not\x20accept\x20--page-pattern.','SUCCESS','reused','2DXKwBC','apply','dataListPageStatus','generate-start','PARTIAL_SUCCESS','alias','operationId','progressRate','3600695OmghcP','DATA_LIST\x20currently\x20has\x20one\x20fixed\x20pattern:\x20CRUD_PAGE_SET.','dataset','taskId','dryRun','page','5AivKvM','Reusing\x20an\x20existing\x20generate\x20task','938676nLzRwv','/smartapi/lovrabet/dataset/','code','Start\x20async\x20Data\x20List\x20Page\x20generation\x20from\x20a\x20dataset','number','Dry-run\x20preview\x20(pass\x20--apply\x20to\x20execute\x20the\x20generation)'];a196_0x34ba=function(){return _0x4fd86b;};return a196_0x34ba();}import{startGenerateDataListPages}from'../../core/api-client.js';export const pageGenerateStart={'service':a196_0x1d2506(0x1cf),'command':a196_0x1d2506(0x1fa),'description':a196_0x1d2506(0x1d5),'risk':a196_0x1d2506(0x1e8),'defaultOutputFormat':a196_0x1d2506(0x1ea),'rejectedFlags':[{'name':a196_0x1d2506(0x1e0),'message':'page\x20generate-start\x20does\x20not\x20accept\x20--page-type.','hint':a196_0x1d2506(0x1dc)},{'name':'page-pattern','message':a196_0x1d2506(0x1f4),'hint':a196_0x1d2506(0x200)}],'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a196_0x1d2506(0x1fc),'type':'string','description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'},{'name':'apply','type':a196_0x1d2506(0x1f3),'description':a196_0x1d2506(0x1f0)}],async 'validate'(_0x441d8d){validateDatasetSelector(_0x441d8d);},async 'dryRun'(_0x1ce7a1){const _0x4b3499=a196_0x1d2506,_0x158b32=await prepare(_0x1ce7a1);return{'method':'POST','url':_0x4b3499(0x1d3)+_0x158b32[_0x4b3499(0x1cc)][_0x4b3499(0x1d4)]+_0x4b3499(0x1ed),'body':{'appCode':_0x1ce7a1[_0x4b3499(0x1db)],'clientOperationId':_0x158b32[_0x4b3499(0x1ef)]},'description':serializeDryRunDescription({'dataset':{'id':_0x158b32[_0x4b3499(0x1cc)]['id'],'code':_0x158b32[_0x4b3499(0x1cc)]['code'],'name':_0x158b32[_0x4b3499(0x1cc)]['name'],'fieldCount':_0x158b32[_0x4b3499(0x1cc)][_0x4b3499(0x1dd)]},'precheckSource':_0x158b32[_0x4b3499(0x1f9)]?.[_0x4b3499(0x1e9)]??_0x4b3499(0x1de),'action':_0x4b3499(0x1fa),'clientOperationId':_0x158b32[_0x4b3499(0x1ef)],'plannedStatus':_0x158b32[_0x4b3499(0x1ec)][_0x4b3499(0x1e4)],'reason':_0x158b32[_0x4b3499(0x1ec)][_0x4b3499(0x1e1)]})};},async 'execute'(_0x440080){const _0x45fdaa=a196_0x1d2506;if(!_0x440080['bool'](_0x45fdaa(0x1f8))){const _0x49a93a=await pageGenerateStart[_0x45fdaa(0x1ce)](_0x440080);return{'ok':!![],'message':_0x45fdaa(0x1d7),'data':_0x49a93a};}const _0x222709=await prepare(_0x440080);if(!_0x222709[_0x45fdaa(0x1ec)][_0x45fdaa(0x1f2)])return{'ok':![],'message':_0x222709['precheck'][_0x45fdaa(0x1e1)],'data':{'datasetCode':_0x222709['dataset'][_0x45fdaa(0x1d4)],'pageType':'DATA_LIST','pagePattern':_0x45fdaa(0x1d8),'clientOperationId':_0x222709['clientOperationId'],'precheckSource':_0x222709['dataListPageStatus']?.[_0x45fdaa(0x1e9)]??'related-pages-fallback','status':_0x222709[_0x45fdaa(0x1ec)][_0x45fdaa(0x1e4)],'manualResolutionRequired':_0x222709[_0x45fdaa(0x1ec)][_0x45fdaa(0x1eb)],'nextAction':_0x222709['precheck']['nextAction'],'query':{'command':buildDataListPageStatusQueryCommand(_0x222709['dataset'][_0x45fdaa(0x1d4)],_0x440080[_0x45fdaa(0x1db)])},'dataListPageStatus':_0x222709[_0x45fdaa(0x1f9)]}};const _0x40c112=await startGenerateDataListPages(_0x440080[_0x45fdaa(0x1db)],_0x222709[_0x45fdaa(0x1cc)][_0x45fdaa(0x1d4)],{'clientOperationId':_0x222709['clientOperationId']}),_0x1568cd=_0x40c112[_0x45fdaa(0x1e4)]===_0x45fdaa(0x1f5)||_0x40c112[_0x45fdaa(0x1e4)]===_0x45fdaa(0x1fb)?await loadDataListPageStatusForGenerate(_0x440080,_0x222709[_0x45fdaa(0x1cc)][_0x45fdaa(0x1d4)]):null,_0x2b0dbd=assessGenerateOperationState(_0x222709['dataset'][_0x45fdaa(0x1d4)],_0x40c112[_0x45fdaa(0x1e4)],_0x1568cd);return{'ok':!![],'message':_0x40c112[_0x45fdaa(0x1f6)]?_0x45fdaa(0x1d1):'Submitted\x20a\x20generate\x20task','data':{'datasetCode':_0x222709[_0x45fdaa(0x1cc)]['code'],'appCode':_0x440080[_0x45fdaa(0x1db)],'pageType':_0x45fdaa(0x1e7),'pagePattern':'CRUD_PAGE_SET','taskId':_0x40c112['taskId']??null,'operationId':_0x40c112[_0x45fdaa(0x1fd)]??null,'clientOperationId':_0x222709[_0x45fdaa(0x1ef)],'jobStatus':_0x40c112[_0x45fdaa(0x1e4)]??null,'progressRate':typeof _0x40c112['progressRate']===_0x45fdaa(0x1d6)?_0x40c112[_0x45fdaa(0x1fe)]:null,'currentStep':_0x40c112[_0x45fdaa(0x1ee)]??null,'reused':_0x40c112['reused']===!![],'status':_0x2b0dbd[_0x45fdaa(0x1e4)],'manualResolutionRequired':_0x2b0dbd[_0x45fdaa(0x1eb)],'nextAction':_0x2b0dbd[_0x45fdaa(0x1e2)],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x222709[_0x45fdaa(0x1cc)][_0x45fdaa(0x1d4)],{'appCode':_0x440080[_0x45fdaa(0x1db)],'taskId':_0x40c112[_0x45fdaa(0x1cd)],'operationId':_0x40c112[_0x45fdaa(0x1fd)],'clientOperationId':_0x222709[_0x45fdaa(0x1ef)]})},'dataListPageStatus':_0x1568cd}};}};async function prepare(_0x4ff64e){const _0x36c22a=a196_0x1d2506,_0x48b135=await loadDatasetDetailForPage(_0x4ff64e),_0x2e0548=await loadDataListPageStatusForGenerate(_0x4ff64e,_0x48b135[_0x36c22a(0x1d4)]),_0x479a4e=getUndeletedRelatedPages(_0x48b135);return{'dataset':_0x48b135,'dataListPageStatus':_0x2e0548,'clientOperationId':createPageGenerateClientOperationId(),'precheck':assessDataListPageState(_0x48b135[_0x36c22a(0x1d4)],_0x2e0548,{'fallbackUndeletedPages':_0x479a4e})};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a197_0x27e8(){const _0x5d1c62=['1wyiAGE','GET','49699ZjKIYO','taskId','20clzuln','1662876rKTYos','/smartapi/lovrabet/dataset/','Async\x20operation\x20id\x20returned\x20by\x20page\x20generate-start','5CZqfLA','str','Generic\x20task\x20id\x20returned\x20by\x20page\x20generate-start','2218484tNPyMI','status','progressRate','operationId','587100cSHUyX','appCode','manualResolutionRequired','string','14LYDhMQ','toString','query-generate-operation-status','762184UnDFNK','name','result','operation-id','SUCCESS','code','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','clientOperationId','1154131BRQPeD','task-id','page','alias','compress','client-operation-id','currentStep','59553aGWEYZ','Client\x20recovery/idempotency\x20id\x20when\x20operationId\x20is\x20unavailable\x20or\x20lost','set','message','PARTIAL_SUCCESS','number','660yNdxjv','584Moljyz','errorMsg'];a197_0x27e8=function(){return _0x5d1c62;};return a197_0x27e8();}const a197_0x51c373=a197_0x5385;(function(_0x13a7ba,_0xcc3ae){const _0x135a62=a197_0x5385,_0x2aba7a=_0x13a7ba();while(!![]){try{const _0x756634=parseInt(_0x135a62(0x134))/0x1*(parseInt(_0x135a62(0x11c))/0x2)+-parseInt(_0x135a62(0x139))/0x3+parseInt(_0x135a62(0x13f))/0x4*(-parseInt(_0x135a62(0x13c))/0x5)+parseInt(_0x135a62(0x143))/0x6*(parseInt(_0x135a62(0x147))/0x7)+-parseInt(_0x135a62(0x132))/0x8*(-parseInt(_0x135a62(0x12b))/0x9)+parseInt(_0x135a62(0x138))/0xa*(parseInt(_0x135a62(0x124))/0xb)+parseInt(_0x135a62(0x131))/0xc*(parseInt(_0x135a62(0x136))/0xd);if(_0x756634===_0xcc3ae)break;else _0x2aba7a['push'](_0x2aba7a['shift']());}catch(_0x119fe1){_0x2aba7a['push'](_0x2aba7a['shift']());}}}(a197_0x27e8,0x5a953));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a197_0x5385(_0x47bdc7,_0x2b9fb4){_0x47bdc7=_0x47bdc7-0x11c;const _0x27e8ea=a197_0x27e8();let _0x538512=_0x27e8ea[_0x47bdc7];return _0x538512;}import{assessGenerateOperationState,buildPageGenerateOperationStatusQueryCommand,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector,validateGenerateOperationSelector}from'../../commands/page/shared.js';import{getGenerateDataListPagesStatus}from'../../core/api-client.js';export const pageGenerateStatus={'service':a197_0x51c373(0x126),'command':'generate-status','description':'Query\x20Data\x20List\x20Page\x20generate\x20operation\x20status','risk':'read','defaultOutputFormat':a197_0x51c373(0x128),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a197_0x51c373(0x127),'type':a197_0x51c373(0x146),'description':a197_0x51c373(0x122)},{'name':a197_0x51c373(0x125),'type':a197_0x51c373(0x146),'description':a197_0x51c373(0x13e)},{'name':a197_0x51c373(0x11f),'type':a197_0x51c373(0x146),'description':a197_0x51c373(0x13b)},{'name':'client-operation-id','type':a197_0x51c373(0x146),'description':a197_0x51c373(0x12c)}],async 'validate'(_0x183276){validateDatasetSelector(_0x183276),validateGenerateOperationSelector(_0x183276);},async 'dryRun'(_0x38aeff){const _0x5b0fb3=a197_0x51c373,_0x2fe154=await loadDatasetDetailForPage(_0x38aeff),_0xf4db87=_0x38aeff[_0x5b0fb3(0x13d)](_0x5b0fb3(0x125)),_0x58aaef=_0x38aeff['str']('operation-id'),_0x16c244=_0x38aeff[_0x5b0fb3(0x13d)](_0x5b0fb3(0x129)),_0x79255d=new URLSearchParams({'appCode':_0x38aeff[_0x5b0fb3(0x144)]});return _0xf4db87&&_0x79255d[_0x5b0fb3(0x12d)](_0x5b0fb3(0x137),_0xf4db87),_0x58aaef&&_0x79255d[_0x5b0fb3(0x12d)](_0x5b0fb3(0x142),_0x58aaef),_0x16c244&&_0x79255d[_0x5b0fb3(0x12d)]('clientOperationId',_0x16c244),{'method':_0x5b0fb3(0x135),'url':_0x5b0fb3(0x13a)+_0x2fe154[_0x5b0fb3(0x121)]+'/generate-standard-pages/status?'+_0x79255d[_0x5b0fb3(0x148)](),'description':serializeDryRunDescription({'dataset':{'id':_0x2fe154['id'],'code':_0x2fe154[_0x5b0fb3(0x121)],'name':_0x2fe154[_0x5b0fb3(0x11d)]},'action':_0x5b0fb3(0x149),'taskId':_0xf4db87||undefined,'operationId':_0x58aaef||undefined,'clientOperationId':_0x16c244||undefined})};},async 'execute'(_0x1a29d7){const _0x1a1c3f=a197_0x51c373,_0x518df2=await loadDatasetDetailForPage(_0x1a29d7),_0x1910fe=_0x1a29d7['str']('task-id'),_0x37ea8e=_0x1a29d7['str'](_0x1a1c3f(0x11f)),_0x312d0b=_0x1a29d7[_0x1a1c3f(0x13d)]('client-operation-id'),_0x162a70=await getGenerateDataListPagesStatus(_0x1a29d7[_0x1a1c3f(0x144)],_0x518df2[_0x1a1c3f(0x121)],{'taskId':_0x1910fe||undefined,'operationId':_0x37ea8e||undefined,'clientOperationId':_0x312d0b||undefined}),_0x522b35=_0x162a70[_0x1a1c3f(0x140)]===_0x1a1c3f(0x120)||_0x162a70[_0x1a1c3f(0x140)]===_0x1a1c3f(0x12f),_0x491232=_0x522b35?await loadDataListPageStatusForGenerate(_0x1a29d7,_0x518df2[_0x1a1c3f(0x121)]):null,_0x15f1ab=assessGenerateOperationState(_0x518df2[_0x1a1c3f(0x121)],_0x162a70[_0x1a1c3f(0x140)],_0x491232),_0x423cb3=_0x162a70['taskId']??_0x1910fe??undefined,_0xaa7f24=_0x162a70[_0x1a1c3f(0x142)]??_0x37ea8e??undefined,_0x144a7d=_0x162a70[_0x1a1c3f(0x123)]??_0x312d0b??undefined;return{'ok':!![],'message':_0x15f1ab['status']==='operation_failed'?_0x162a70[_0x1a1c3f(0x133)]||_0x15f1ab[_0x1a1c3f(0x12e)]:_0x15f1ab[_0x1a1c3f(0x12e)],'data':{'datasetCode':_0x518df2['code'],'appCode':_0x1a29d7[_0x1a1c3f(0x144)],'taskId':_0x423cb3,'operationId':_0xaa7f24,'clientOperationId':_0x144a7d,'jobStatus':_0x162a70['status']??null,'progressRate':typeof _0x162a70[_0x1a1c3f(0x141)]===_0x1a1c3f(0x130)?_0x162a70[_0x1a1c3f(0x141)]:null,'currentStep':_0x162a70[_0x1a1c3f(0x12a)]??null,'errorMsg':_0x162a70[_0x1a1c3f(0x133)]??null,'status':_0x15f1ab[_0x1a1c3f(0x140)],'manualResolutionRequired':_0x15f1ab[_0x1a1c3f(0x145)],'nextAction':_0x15f1ab['nextAction'],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x518df2[_0x1a1c3f(0x121)],{'appCode':_0x1a29d7['appCode'],'taskId':_0x423cb3,'operationId':_0xaa7f24,'clientOperationId':_0x144a7d})},'dataListPageStatus':_0x491232,'result':_0x162a70[_0x1a1c3f(0x11e)]??null}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x465b55,_0x253a84){const _0x55e8cc=a198_0xa5ff,_0xfa423=_0x465b55();while(!![]){try{const _0x2a8e87=-parseInt(_0x55e8cc(0xad))/0x1+-parseInt(_0x55e8cc(0xa6))/0x2+-parseInt(_0x55e8cc(0xa8))/0x3+parseInt(_0x55e8cc(0xa7))/0x4*(-parseInt(_0x55e8cc(0xa4))/0x5)+-parseInt(_0x55e8cc(0xab))/0x6*(-parseInt(_0x55e8cc(0xae))/0x7)+parseInt(_0x55e8cc(0xaa))/0x8*(parseInt(_0x55e8cc(0xa5))/0x9)+parseInt(_0x55e8cc(0xac))/0xa*(parseInt(_0x55e8cc(0xa9))/0xb);if(_0x2a8e87===_0x253a84)break;else _0xfa423['push'](_0xfa423['shift']());}catch(_0x23560b){_0xfa423['push'](_0xfa423['shift']());}}}(a198_0x4a5b,0xa3817));import{pageGenerateStart}from'../../commands/page/generate-start.js';import{pageGenerateStatus}from'../../commands/page/generate-status.js';import{pageDataListStatus}from'../../commands/page/data-list-status.js';import{pageSync}from'../../commands/page/sync.js';function a198_0xa5ff(_0x133966,_0x2e94ad){_0x133966=_0x133966-0xa4;const _0x4a5b6f=a198_0x4a5b();let _0xa5ff6e=_0x4a5b6f[_0x133966];return _0xa5ff6e;}import{pagePull}from'../../commands/page/pull.js';import{pagePush}from'../../commands/page/push.js';import{pageRelationAudit}from'../../commands/page/relation-audit.js';import{pageRestore}from'../../commands/page/restore.js';import{pageCreate}from'../../commands/page/create.js';import{pageCustomDetail}from'../../commands/page/custom/detail.js';import{pageCustomList}from'../../commands/page/custom/list.js';function a198_0x4a5b(){const _0x56d554=['136iFayCg','767235MkhCvZ','55rWhoTu','1136moihHA','186924sLHSxN','3809090UGBSXR','1317647WhoxJj','91EUSLIG','10745WjmRzB','28737AXeirc','893552wPtlZp'];a198_0x4a5b=function(){return _0x56d554;};return a198_0x4a5b();}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 a199_0xc905c0=a199_0x44bd;(function(_0x3f2286,_0x5b6014){const _0x28125a=a199_0x44bd,_0xed3687=_0x3f2286();while(!![]){try{const _0x2db491=-parseInt(_0x28125a(0x20f))/0x1+-parseInt(_0x28125a(0x21e))/0x2+-parseInt(_0x28125a(0x21b))/0x3+parseInt(_0x28125a(0x1f6))/0x4*(parseInt(_0x28125a(0x1ea))/0x5)+-parseInt(_0x28125a(0x210))/0x6+-parseInt(_0x28125a(0x216))/0x7*(-parseInt(_0x28125a(0x20c))/0x8)+parseInt(_0x28125a(0x1ee))/0x9*(parseInt(_0x28125a(0x207))/0xa);if(_0x2db491===_0x5b6014)break;else _0xed3687['push'](_0xed3687['shift']());}catch(_0x4ca2d8){_0xed3687['push'](_0xed3687['shift']());}}}(a199_0x6150,0x88cb9));function a199_0x6150(){const _0x37655c=['relatedPages','pageId','278293JriHxl','2776872ocHZqC','name','localPath','pages','pull','\x20skipped','1540882jKUNbU','boolean','type','validation','/smartapi/lovrabet/detail?pageId=','2237721ENXXQY','datasetIds','length','985154veFHGe','Pull\x20complete:\x20','Local\x20page\x20file\x20has\x20unsynced\x20changes:\x20','mode','would_pull','string','GET','items','page','all','detail','279710NHffTo','appCode','Page\x20group\x20version\x20tag\x20(batch\x20mode\x20only)','hash','2310345uQLUaQ','/smartapi/lovrabet/detail\x20(per\x20selected\x20page)','reason','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','number','\x22\x20has\x20no\x20undeleted\x20related\x20pages.','compress','Dataset\x20\x22','40VBiDxk','str','batch','local\x20unsynced\x20changes','version-tag','status','conflict','force','lastSync','filter','utf8','lockFilePath','map','versionTag','pageVersion','Page\x20ID','read','60wuvLUI','Pull\x20page\x20schema\x20to\x20local\x20files','code','push','datasetCode','16cnjgIv'];a199_0x6150=function(){return _0x37655c;};return a199_0x6150();}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';function a199_0x44bd(_0x4734b0,_0x4565ea){_0x4734b0=_0x4734b0-0x1e4;const _0x615001=a199_0x6150();let _0x44bd01=_0x615001[_0x4734b0];return _0x44bd01;}import{CliErrors}from'../../errors.js';export const pagePull={'service':a199_0xc905c0(0x1e7),'command':a199_0xc905c0(0x214),'description':a199_0xc905c0(0x208),'risk':a199_0xc905c0(0x206),'defaultOutputFormat':a199_0xc905c0(0x1f4),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'id','type':a199_0xc905c0(0x1f2),'description':a199_0xc905c0(0x205)},DATASETCODE_FLAG_OPTIONAL,{'name':'alias','type':a199_0xc905c0(0x1e4),'description':a199_0xc905c0(0x1f1)},{'name':a199_0xc905c0(0x1fa),'type':a199_0xc905c0(0x1e4),'description':a199_0xc905c0(0x1ec)},{'name':a199_0xc905c0(0x1fd),'type':a199_0xc905c0(0x217),'description':'Overwrite\x20local\x20files\x20even\x20when\x20unsynced\x20local\x20changes\x20exist'}],async 'validate'(_0x9cb91d){validatePageTargetSelector(_0x9cb91d);},async 'dryRun'(_0x4993e8){const _0x33bc4e=a199_0xc905c0,_0x4a0fa4=await buildPullPlan(_0x4993e8);return{'method':_0x33bc4e(0x1e5),'url':_0x4a0fa4[_0x33bc4e(0x221)]==='single'?_0x33bc4e(0x21a)+(_0x4a0fa4[_0x33bc4e(0x1e6)][0x0]?.['detail'][_0x33bc4e(0x20e)]??''):_0x33bc4e(0x1ef),'body':{'appCode':_0x4993e8[_0x33bc4e(0x1eb)],'mode':_0x4a0fa4[_0x33bc4e(0x221)],'targetDatasetCode':_0x4a0fa4[_0x33bc4e(0x20b)]??null,'pages':_0x4a0fa4[_0x33bc4e(0x1e6)][_0x33bc4e(0x202)](toPreviewItem)},'description':serializeDryRunDescription({'mode':_0x4a0fa4['mode'],'datasetCode':_0x4a0fa4[_0x33bc4e(0x20b)]??null,'totalCandidates':_0x4a0fa4[_0x33bc4e(0x1e6)][_0x33bc4e(0x21d)],'totalWouldPull':_0x4a0fa4[_0x33bc4e(0x1e6)]['filter'](_0xecf41f=>_0xecf41f['status']===_0x33bc4e(0x222))[_0x33bc4e(0x21d)],'totalConflicts':_0x4a0fa4['items'][_0x33bc4e(0x1ff)](_0x51e700=>_0x51e700['status']==='conflict')['length']})};},async 'execute'(_0x5ae4ee){const _0x3c3b7b=a199_0xc905c0,_0x3b3799=loadPageProjectConfig(_0x5ae4ee['appCode']),_0x528fcb=await readPageLockFile(_0x3b3799[_0x3c3b7b(0x201)]),{lockData:_0x5702e3,appLock:_0x46ebff}=ensurePageLockScope(_0x528fcb??createEmptyPageLock(),_0x5ae4ee[_0x3c3b7b(0x1eb)]),_0x17cf70=await buildPullPlan(_0x5ae4ee),_0x5c8abb=_0x5ae4ee['bool'](_0x3c3b7b(0x1fd));if(_0x17cf70[_0x3c3b7b(0x221)]==='single'&&_0x17cf70[_0x3c3b7b(0x1e6)][0x0]?.[_0x3c3b7b(0x1fb)]===_0x3c3b7b(0x1fc)&&!_0x5c8abb)throw CliErrors[_0x3c3b7b(0x219)](_0x3c3b7b(0x220)+_0x17cf70[_0x3c3b7b(0x1e6)][0x0][_0x3c3b7b(0x212)],'Use\x20--force\x20to\x20overwrite\x20local\x20changes.');const _0x297c9a=[],_0x242c8a=[];for(const _0xcbc9d0 of _0x17cf70['items']){if(_0xcbc9d0[_0x3c3b7b(0x1fb)]===_0x3c3b7b(0x1fc)&&!_0x5c8abb){_0x242c8a[_0x3c3b7b(0x20a)]({'pageId':_0xcbc9d0[_0x3c3b7b(0x1e9)][_0x3c3b7b(0x20e)],'type':_0xcbc9d0['detail']['type'],'title':_0xcbc9d0[_0x3c3b7b(0x1e9)][_0x3c3b7b(0x211)],'localPath':_0xcbc9d0[_0x3c3b7b(0x212)],'reason':_0xcbc9d0[_0x3c3b7b(0x1f0)]??_0x3c3b7b(0x1f9)});continue;}await ensureParentDirectory(_0xcbc9d0[_0x3c3b7b(0x212)]);const _0x3368e1=serializePageSchemaForFile(_0xcbc9d0['detail'][_0x3c3b7b(0x209)]);await writeFile(_0xcbc9d0[_0x3c3b7b(0x212)],_0x3368e1,_0x3c3b7b(0x200)),_0x46ebff[_0x3c3b7b(0x213)][String(_0xcbc9d0['detail'][_0x3c3b7b(0x20e)])]=buildLockEntry(_0xcbc9d0[_0x3c3b7b(0x1e9)],_0x3368e1),_0x297c9a[_0x3c3b7b(0x20a)]({'pageId':_0xcbc9d0['detail'][_0x3c3b7b(0x20e)],'type':_0xcbc9d0[_0x3c3b7b(0x1e9)][_0x3c3b7b(0x218)],'title':_0xcbc9d0['detail'][_0x3c3b7b(0x211)],'localPath':_0xcbc9d0[_0x3c3b7b(0x212)]});}return _0x46ebff[_0x3c3b7b(0x1fe)]=new Date()['toISOString'](),await writePageLockFile(_0x3b3799[_0x3c3b7b(0x201)],_0x5702e3),{'ok':!![],'message':_0x3c3b7b(0x21f)+_0x297c9a['length']+'\x20pulled,\x20'+_0x242c8a[_0x3c3b7b(0x21d)]+_0x3c3b7b(0x215),'data':{'appCode':_0x5ae4ee[_0x3c3b7b(0x1eb)],'pulledPages':_0x297c9a,'skippedPages':_0x242c8a,'totalPulled':_0x297c9a[_0x3c3b7b(0x21d)],'totalSkipped':_0x242c8a[_0x3c3b7b(0x21d)]}};}};async function buildPullPlan(_0x39670d){const _0x308e1d=a199_0xc905c0,_0x5eb7ec=loadPageProjectConfig(_0x39670d['appCode']),_0x27373c=await readPageLockFile(_0x5eb7ec['lockFilePath']),{appLock:_0x35c2c0}=ensurePageLockScope(_0x27373c??createEmptyPageLock(),_0x39670d[_0x308e1d(0x1eb)]),_0x272bb7=getPageIdFlag(_0x39670d);if(_0x272bb7!==undefined){const _0x463b09=await loadPageDetailForPage(_0x39670d,_0x272bb7);return{'mode':'single','items':[await inspectPullTarget(_0x5eb7ec,_0x35c2c0[_0x308e1d(0x213)][String(_0x463b09[_0x308e1d(0x20e)])],_0x463b09)]};}const _0x292c09=await loadDatasetDetailForPage(_0x39670d),_0x1ebaf9=_0x292c09[_0x308e1d(0x20d)][_0x308e1d(0x1ff)](_0xd9f739=>!_0xd9f739['deleted']);if(_0x1ebaf9[_0x308e1d(0x21d)]===0x0)throw CliErrors[_0x308e1d(0x219)](_0x308e1d(0x1f5)+_0x292c09[_0x308e1d(0x209)]+_0x308e1d(0x1f3));const _0x457ee0=await Promise[_0x308e1d(0x1e8)](_0x1ebaf9['map'](_0xc17af4=>loadPageDetailForPage(_0x39670d,_0xc17af4['id']))),_0x276c9a=selectVersionTagGroup(_0x457ee0,_0x286717=>_0x286717[_0x308e1d(0x203)],_0x39670d[_0x308e1d(0x1f7)](_0x308e1d(0x1fa)));return{'mode':_0x308e1d(0x1f8),'datasetCode':_0x292c09[_0x308e1d(0x209)],'items':await Promise[_0x308e1d(0x1e8)](_0x276c9a['items'][_0x308e1d(0x202)](_0x3e2426=>inspectPullTarget(_0x5eb7ec,_0x35c2c0['pages'][String(_0x3e2426[_0x308e1d(0x20e)])],_0x3e2426)))};}async function inspectPullTarget(_0xfe33b0,_0x32734b,_0x591df1){const _0x9920fe=a199_0xc905c0,_0xe211ca=resolvePageFilePath(_0xfe33b0,_0x591df1[_0x9920fe(0x20e)],_0x591df1[_0x9920fe(0x218)]),_0x1ac71a=await fileExists(_0xe211ca);if(!_0x1ac71a){const _0x2fcedf=serializePageSchemaForFile(_0x591df1[_0x9920fe(0x209)]);return{'detail':_0x591df1,'localPath':_0xe211ca,'localHash':computePageContentHash(_0x2fcedf),'status':_0x9920fe(0x222)};}const _0x205a46=await computePageFileHash(_0xe211ca);if(!_0x32734b||_0x205a46!==_0x32734b[_0x9920fe(0x1ed)])return{'detail':_0x591df1,'localPath':_0xe211ca,'localHash':_0x205a46,'status':_0x9920fe(0x1fc),'reason':'local\x20unsynced\x20changes'};return{'detail':_0x591df1,'localPath':_0xe211ca,'localHash':_0x205a46,'status':_0x9920fe(0x222)};}function buildLockEntry(_0x465099,_0x57c815){const _0x2fb178=a199_0xc905c0;return{'hash':computePageContentHash(_0x57c815),'pageId':_0x465099['pageId'],'pageVersion':_0x465099[_0x2fb178(0x204)],'type':_0x465099[_0x2fb178(0x218)],'title':_0x465099[_0x2fb178(0x211)],'datasetIds':_0x465099[_0x2fb178(0x21c)],'versionTag':_0x465099[_0x2fb178(0x203)]};}function toPreviewItem(_0x27fe69){const _0x1c43cb=a199_0xc905c0;return{'pageId':_0x27fe69[_0x1c43cb(0x1e9)][_0x1c43cb(0x20e)],'type':_0x27fe69[_0x1c43cb(0x1e9)]['type'],'title':_0x27fe69[_0x1c43cb(0x1e9)][_0x1c43cb(0x211)],'localPath':_0x27fe69[_0x1c43cb(0x212)],'status':_0x27fe69[_0x1c43cb(0x1fb)],..._0x27fe69['reason']?{'reason':_0x27fe69[_0x1c43cb(0x1f0)]}:{}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a200_0x52e834=a200_0x4a95;(function(_0x2850d0,_0x5504c7){const _0x495f43=a200_0x4a95,_0x2837cc=_0x2850d0();while(!![]){try{const _0x32ffcf=parseInt(_0x495f43(0xa4))/0x1+parseInt(_0x495f43(0xb1))/0x2+-parseInt(_0x495f43(0xc5))/0x3+-parseInt(_0x495f43(0xdc))/0x4*(parseInt(_0x495f43(0xd3))/0x5)+-parseInt(_0x495f43(0xb8))/0x6*(parseInt(_0x495f43(0xdd))/0x7)+-parseInt(_0x495f43(0x98))/0x8+parseInt(_0x495f43(0xbb))/0x9;if(_0x32ffcf===_0x5504c7)break;else _0x2837cc['push'](_0x2837cc['shift']());}catch(_0x4d872b){_0x2837cc['push'](_0x2837cc['shift']());}}}(a200_0x45db,0xa02e7));import{readFile,writeFile}from'node:fs/promises';function a200_0x45db(){const _0x2cb203=['No\x20local\x20pages\x20found\x20for\x20dataset\x20\x22','items','pageVersion','\x20page\x20pull\x20--id\x20','/smartapi/lovrabet/update-page','number','normalizedNodes','message','includes','all','745HfuFJM','type','apiError','values','remote\x20schema\x20changed','POST','local\x20JSON\x20is\x20invalid','datasetIds','toISOString','19944mrCmiw','1724324VbBWjh','length','nextLockEntry','\x20no\x20longer\x20belongs\x20to\x20the\x20target\x20dataset','page','page-','version-tag','\x20has\x20changed\x20since\x20last\x20pull.','candidates','No\x20lock\x20record\x20found\x20for\x20page\x20','lockEntry','Page\x20update\x20failed:\x20','Push\x20succeeded','conflict','Invalid\x20JSON\x20in\x20local\x20page\x20file:\x20','deleted','lastSync','\x20no\x20longer\x20belongs\x20to\x20the\x20selected\x20dataset.','no\x20changes','single','9925328MLVrul','parse','localHash','Push\x20local\x20page\x20schema\x20back\x20to\x20remote','versionTag','remoteDetail','status','remote\x20pageVersion\x20changed','localContent','reason','preparedChanges','code','719662rxwhKk','Page\x20','title','pages','validation','map','mode','`\x20first.','name','hash','normalized','utf8','compress','438736uSDYeN','UNKNOWN','would_push','pageId','appCode','push','`\x20first','12FkmQvL','datasetId','blocked','21972861YyMaFB','localPath','Run\x20`','lockFilePath','filter','has','str','datasetCode','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','unchanged','744336YLJajd','content','Local\x20file\x20not\x20found:\x20','\x20page\x20pull\x20--datasetcode\x20'];a200_0x45db=function(){return _0x2cb203;};return a200_0x45db();}import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a200_0x4a95(_0x384996,_0x7e7234){_0x384996=_0x384996-0x86;const _0x45db3e=a200_0x45db();let _0x4a9558=_0x45db3e[_0x384996];return _0x4a9558;}import{getPageIdFlag,loadDatasetDetailForPage,loadPageDetailForPage,selectVersionTagGroup,serializeDryRunDescription,validatePageTargetSelector}from'../../commands/page/shared.js';import{transpileLrSmartJsx,updatePage}from'../../core/api-client.js';import{computePageContentHash,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{prepareLrSmartJsxForPush}from'../../core/page/lr-smart-jsx.js';import{CliErrors}from'../../errors.js';export const pagePush={'service':a200_0x52e834(0x88),'command':a200_0x52e834(0xb6),'description':a200_0x52e834(0x9b),'risk':'write','defaultOutputFormat':a200_0x52e834(0xb0),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'id','type':a200_0x52e834(0xce),'description':'Page\x20ID'},DATASETCODE_FLAG_OPTIONAL,{'name':'alias','type':'string','description':a200_0x52e834(0xc3)},{'name':a200_0x52e834(0x8a),'type':'string','description':'Page\x20group\x20version\x20tag\x20(batch\x20mode\x20only)'}],async 'validate'(_0xc95816){validatePageTargetSelector(_0xc95816);},async 'dryRun'(_0x166a6c){const _0x58fed2=a200_0x52e834,_0x3e496c=await buildPushPreview(_0x166a6c);return{'method':_0x58fed2(0xd8),'url':_0x58fed2(0xcd),'body':{'appCode':_0x166a6c[_0x58fed2(0xb5)],'mode':_0x3e496c[_0x58fed2(0xaa)],'datasetCode':_0x3e496c[_0x58fed2(0xc2)]??null,'pages':_0x3e496c[_0x58fed2(0xca)]},'description':serializeDryRunDescription({'mode':_0x3e496c[_0x58fed2(0xaa)],'datasetCode':_0x3e496c[_0x58fed2(0xc2)]??null,'totalWouldPush':_0x3e496c[_0x58fed2(0xca)]['filter'](_0x5a87ba=>_0x5a87ba[_0x58fed2(0x9e)]===_0x58fed2(0xb3))[_0x58fed2(0xde)],'totalUnchanged':_0x3e496c[_0x58fed2(0xca)][_0x58fed2(0xbf)](_0x3b0452=>_0x3b0452['status']===_0x58fed2(0xc4))[_0x58fed2(0xde)],'totalConflicts':_0x3e496c[_0x58fed2(0xca)]['filter'](_0x2a6223=>_0x2a6223['status']===_0x58fed2(0x91)||_0x2a6223[_0x58fed2(0x9e)]==='blocked')[_0x58fed2(0xde)]})};},async 'execute'(_0xc98757){const _0x45f2ac=a200_0x52e834,_0x5e9597=loadPageProjectConfig(_0xc98757[_0x45f2ac(0xb5)]),_0x16c734=await readPageLockFile(_0x5e9597[_0x45f2ac(0xbe)]),{lockData:_0xe48117,appLock:_0x4a7661}=ensurePageLockScope(_0x16c734??createEmptyPageLock(),_0xc98757['appCode']),_0x1d5884=getPageIdFlag(_0xc98757);if(_0x1d5884!==undefined){const _0x48e647=await prepareSinglePush(_0xc98757,_0x5e9597,_0x4a7661[_0x45f2ac(0xa7)][String(_0x1d5884)],_0x1d5884),_0x224e58=await pushPreparedPage(_0xc98757,_0x48e647);return _0x4a7661['pages'][String(_0x224e58[_0x45f2ac(0xb4)])]=_0x224e58[_0x45f2ac(0x86)],_0x4a7661[_0x45f2ac(0x94)]=new Date()[_0x45f2ac(0xdb)](),await writePageLockFile(_0x5e9597[_0x45f2ac(0xbe)],_0xe48117),{'ok':!![],'message':_0x224e58['normalized']?'Push\x20succeeded;\x20server\x20normalized\x20the\x20schema':_0x45f2ac(0x90),'data':{'appCode':_0xc98757[_0x45f2ac(0xb5)],'pushedPages':[{'pageId':_0x224e58[_0x45f2ac(0xb4)],'type':_0x224e58[_0x45f2ac(0xd4)],'title':_0x224e58[_0x45f2ac(0xa6)],'normalized':_0x224e58['normalized']}],'skippedPages':[],'failedPages':[],'totalPushed':0x1,'totalSkipped':0x0,'totalFailed':0x0}};}const _0x3d1581=await buildBatchPushPlan(_0xc98757,_0x4a7661[_0x45f2ac(0xa7)]),_0x45c340=[],_0x4bcaf2=[],_0x4458e6=[];for(const _0x32d77e of _0x3d1581['candidates']){try{const _0x227887=await prepareSinglePush(_0xc98757,_0x5e9597,_0x4a7661[_0x45f2ac(0xa7)][String(_0x32d77e[_0x45f2ac(0xb4)])],_0x32d77e[_0x45f2ac(0xb4)],_0x3d1581['datasetId']);if(!_0x227887[_0x45f2ac(0xa2)]&&_0x227887[_0x45f2ac(0x9a)]===_0x227887[_0x45f2ac(0x8e)][_0x45f2ac(0xad)]){_0x4bcaf2['push']({'pageId':_0x32d77e[_0x45f2ac(0xb4)],'type':_0x32d77e[_0x45f2ac(0xd4)],'title':_0x32d77e[_0x45f2ac(0xa6)],'reason':_0x45f2ac(0x96)});continue;}const _0x5cfc79=await pushPreparedPage(_0xc98757,_0x227887);_0x4a7661[_0x45f2ac(0xa7)][String(_0x5cfc79[_0x45f2ac(0xb4)])]=_0x5cfc79[_0x45f2ac(0x86)],_0x45c340[_0x45f2ac(0xb6)]({'pageId':_0x5cfc79[_0x45f2ac(0xb4)],'type':_0x5cfc79[_0x45f2ac(0xd4)],'title':_0x5cfc79[_0x45f2ac(0xa6)],'normalized':_0x5cfc79[_0x45f2ac(0xae)]});}catch(_0x37918d){_0x4458e6[_0x45f2ac(0xb6)]({'pageId':_0x32d77e[_0x45f2ac(0xb4)],'type':_0x32d77e[_0x45f2ac(0xd4)],'title':_0x32d77e[_0x45f2ac(0xa6)],'reason':_0x37918d instanceof Error?_0x37918d['message']:String(_0x37918d)});}}return _0x4a7661[_0x45f2ac(0x94)]=new Date()['toISOString'](),await writePageLockFile(_0x5e9597['lockFilePath'],_0xe48117),{'ok':_0x4458e6[_0x45f2ac(0xde)]===0x0||_0x45c340[_0x45f2ac(0xde)]>0x0||_0x4bcaf2['length']>0x0,'message':_0x4458e6['length']>0x0&&_0x45c340[_0x45f2ac(0xde)]>0x0?'Some\x20pages\x20failed\x20to\x20push':_0x45c340['length']>0x0?_0x45f2ac(0x90):_0x4bcaf2['length']>0x0&&_0x4458e6[_0x45f2ac(0xde)]===0x0?'No\x20changes\x20to\x20push':_0x4458e6[0x0]?.[_0x45f2ac(0xa1)]||'Push\x20failed','data':{'appCode':_0xc98757[_0x45f2ac(0xb5)],'pushedPages':_0x45c340,'skippedPages':_0x4bcaf2,'failedPages':_0x4458e6,'totalPushed':_0x45c340[_0x45f2ac(0xde)],'totalSkipped':_0x4bcaf2['length'],'totalFailed':_0x4458e6['length']}};}};async function buildPushPreview(_0x119e59){const _0x57362b=a200_0x52e834,_0x580357=loadPageProjectConfig(_0x119e59[_0x57362b(0xb5)]),_0x545376=await readPageLockFile(_0x580357[_0x57362b(0xbe)]),{appLock:_0x38ae37}=ensurePageLockScope(_0x545376??createEmptyPageLock(),_0x119e59[_0x57362b(0xb5)]),_0x46f06a=getPageIdFlag(_0x119e59);if(_0x46f06a!==undefined)return{'mode':_0x57362b(0x97),'items':[await inspectPushPage(_0x119e59,_0x580357,_0x38ae37[_0x57362b(0xa7)][String(_0x46f06a)],_0x46f06a)]};const _0x2d05f8=await buildBatchPushPlan(_0x119e59,_0x38ae37['pages']);return{'mode':'batch','datasetCode':_0x2d05f8[_0x57362b(0xc2)],'items':await Promise[_0x57362b(0xd2)](_0x2d05f8[_0x57362b(0x8c)]['map'](_0x2d0588=>inspectPushPage(_0x119e59,_0x580357,_0x38ae37[_0x57362b(0xa7)][String(_0x2d0588['pageId'])],_0x2d0588[_0x57362b(0xb4)],_0x2d05f8[_0x57362b(0xb9)])))};}async function buildBatchPushPlan(_0x1c7dc4,_0x2fbb5a){const _0x2e4b18=a200_0x52e834,_0x161d53=await loadDatasetDetailForPage(_0x1c7dc4),_0xd60cf8=_0x161d53['id'],_0x30a04b=new Set(_0x161d53['relatedPages'][_0x2e4b18(0xbf)](_0x196ff8=>!_0x196ff8[_0x2e4b18(0x93)])[_0x2e4b18(0xa9)](_0x15b3e2=>_0x15b3e2['id'])),_0x532b98=Object[_0x2e4b18(0xd6)](_0x2fbb5a)['filter'](_0x339b87=>_0x339b87[_0x2e4b18(0xda)][_0x2e4b18(0xd1)](_0xd60cf8)&&_0x30a04b[_0x2e4b18(0xc0)](_0x339b87[_0x2e4b18(0xb4)]));if(_0x532b98['length']===0x0)throw CliErrors[_0x2e4b18(0xa8)](_0x2e4b18(0xc9)+_0x161d53[_0x2e4b18(0xa3)]+'\x22.',_0x2e4b18(0xbd)+CLI_BIN_NAME+_0x2e4b18(0xc8)+_0x161d53[_0x2e4b18(0xa3)]+_0x2e4b18(0xab));const _0x85347f=selectVersionTagGroup(_0x532b98,_0x508485=>_0x508485[_0x2e4b18(0x9c)]??null,_0x1c7dc4[_0x2e4b18(0xc1)](_0x2e4b18(0x8a))),_0x346e0b=[];for(const _0x42296b of _0x85347f['items']){_0x346e0b[_0x2e4b18(0xb6)]({'pageId':_0x42296b[_0x2e4b18(0xb4)],'type':_0x42296b['type'],'title':_0x42296b[_0x2e4b18(0xa6)]});}return{'datasetCode':_0x161d53[_0x2e4b18(0xa3)],'datasetId':_0xd60cf8,'candidates':_0x346e0b};}async function inspectPushPage(_0x67f56b,_0x5d297,_0xa2d695,_0x1c0a2f,_0x598e8c){const _0x56661c=a200_0x52e834;if(!_0xa2d695)return{'pageId':_0x1c0a2f,'type':_0x56661c(0xb2),'title':_0x56661c(0x89)+_0x1c0a2f,'localPath':resolvePageFilePath(_0x5d297,_0x1c0a2f,_0x56661c(0xb2)),'status':_0x56661c(0xba),'reason':'Run\x20`'+CLI_BIN_NAME+_0x56661c(0xcc)+_0x1c0a2f+_0x56661c(0xb7)};const _0x200e19=resolvePageFilePath(_0x5d297,_0x1c0a2f,_0xa2d695[_0x56661c(0xd4)]);if(!await fileExists(_0x200e19))return{'pageId':_0x1c0a2f,'type':_0xa2d695[_0x56661c(0xd4)],'title':_0xa2d695[_0x56661c(0xa6)],'localPath':_0x200e19,'status':_0x56661c(0xba),'reason':'Local\x20file\x20not\x20found:\x20'+_0x200e19};const _0x3ae58f=await readFile(_0x200e19,_0x56661c(0xaf));try{JSON[_0x56661c(0x99)](_0x3ae58f);}catch{return{'pageId':_0x1c0a2f,'type':_0xa2d695['type'],'title':_0xa2d695[_0x56661c(0xa6)],'localPath':_0x200e19,'status':'blocked','reason':_0x56661c(0xd9)};}try{const _0x523937=await loadPageDetailForPage(_0x67f56b,_0x1c0a2f);if(_0x598e8c!=null&&!_0x523937[_0x56661c(0xda)][_0x56661c(0xd1)](_0x598e8c))return{'pageId':_0x1c0a2f,'type':_0xa2d695[_0x56661c(0xd4)],'title':_0xa2d695[_0x56661c(0xa6)],'localPath':_0x200e19,'status':_0x56661c(0x91),'reason':'Page\x20'+_0x1c0a2f+_0x56661c(0x87)};const _0x25c31d=_0xa2d695[_0x56661c(0xcb)]!=null&&_0x523937[_0x56661c(0xcb)]!=null;if(_0x25c31d&&_0xa2d695['pageVersion']!==_0x523937[_0x56661c(0xcb)])return{'pageId':_0x1c0a2f,'type':_0xa2d695[_0x56661c(0xd4)],'title':_0xa2d695[_0x56661c(0xa6)],'localPath':_0x200e19,'status':'conflict','reason':_0x56661c(0x9f)};if(!_0x25c31d&&computeSerializedSchemaHash(_0x523937[_0x56661c(0xa3)])!==_0xa2d695[_0x56661c(0xad)])return{'pageId':_0x1c0a2f,'type':_0xa2d695['type'],'title':_0xa2d695[_0x56661c(0xa6)],'localPath':_0x200e19,'status':_0x56661c(0x91),'reason':_0x56661c(0xd7)};const _0x11973e=await prepareLrSmartJsxForPush(_0x3ae58f,_0x523937[_0x56661c(0xa3)],transpileLrSmartJsx);if(_0x11973e[_0x56661c(0xcf)]===0x0&&computePageContentHash(_0x11973e[_0x56661c(0xc6)])===_0xa2d695[_0x56661c(0xad)])return{'pageId':_0x1c0a2f,'type':_0xa2d695[_0x56661c(0xd4)],'title':_0xa2d695[_0x56661c(0xa6)],'localPath':_0x200e19,'status':_0x56661c(0xc4),'reason':'no\x20changes'};}catch(_0x2a965c){return{'pageId':_0x1c0a2f,'type':_0xa2d695[_0x56661c(0xd4)],'title':_0xa2d695['title'],'localPath':_0x200e19,'status':'blocked','reason':_0x2a965c instanceof Error?_0x2a965c[_0x56661c(0xd0)]:String(_0x2a965c)};}return{'pageId':_0x1c0a2f,'type':_0xa2d695[_0x56661c(0xd4)],'title':_0xa2d695['title'],'localPath':_0x200e19,'status':_0x56661c(0xb3)};}async function prepareSinglePush(_0xacfb39,_0x2123d1,_0x59b3bf,_0x1340b2,_0x26af90){const _0x18bf99=a200_0x52e834;if(!_0x59b3bf)throw CliErrors[_0x18bf99(0xa8)](_0x18bf99(0x8d)+_0x1340b2+'.',_0x18bf99(0xbd)+CLI_BIN_NAME+_0x18bf99(0xcc)+_0x1340b2+_0x18bf99(0xab));const _0x339a63=resolvePageFilePath(_0x2123d1,_0x1340b2,_0x59b3bf[_0x18bf99(0xd4)]);if(!await fileExists(_0x339a63))throw CliErrors[_0x18bf99(0xa8)](_0x18bf99(0xc7)+_0x339a63,_0x18bf99(0xbd)+CLI_BIN_NAME+'\x20page\x20pull\x20--id\x20'+_0x1340b2+_0x18bf99(0xab));const _0x35b0e2=await readFile(_0x339a63,_0x18bf99(0xaf));try{JSON[_0x18bf99(0x99)](_0x35b0e2);}catch{throw CliErrors[_0x18bf99(0xa8)](_0x18bf99(0x92)+_0x339a63);}const _0x312abe=await loadPageDetailForPage(_0xacfb39,_0x1340b2);if(_0x26af90!=null&&!_0x312abe[_0x18bf99(0xda)]['includes'](_0x26af90))throw CliErrors[_0x18bf99(0xa8)](_0x18bf99(0xa5)+_0x1340b2+_0x18bf99(0x95));const _0x1a7924=_0x59b3bf[_0x18bf99(0xcb)]!=null&&_0x312abe['pageVersion']!=null;if(_0x1a7924){if(_0x59b3bf[_0x18bf99(0xcb)]!==_0x312abe[_0x18bf99(0xcb)])throw CliErrors[_0x18bf99(0xa8)]('Remote\x20page\x20'+_0x1340b2+_0x18bf99(0x8b),_0x18bf99(0xbd)+CLI_BIN_NAME+'\x20page\x20pull\x20--id\x20'+_0x1340b2+_0x18bf99(0xab));}else{const _0x382b8a=computeSerializedSchemaHash(_0x312abe[_0x18bf99(0xa3)]);if(_0x382b8a!==_0x59b3bf[_0x18bf99(0xad)])throw CliErrors[_0x18bf99(0xa8)]('Remote\x20page\x20'+_0x1340b2+'\x20has\x20changed\x20since\x20last\x20pull.',_0x18bf99(0xbd)+CLI_BIN_NAME+_0x18bf99(0xcc)+_0x1340b2+_0x18bf99(0xab));}const _0xe6be54=await prepareLrSmartJsxForPush(_0x35b0e2,_0x312abe[_0x18bf99(0xa3)],transpileLrSmartJsx);return{'lockEntry':_0x59b3bf,'localPath':_0x339a63,'localContent':_0xe6be54[_0x18bf99(0xc6)],'localHash':computePageContentHash(_0xe6be54[_0x18bf99(0xc6)]),'preparedChanges':_0xe6be54[_0x18bf99(0xcf)]>0x0,'remoteDetail':_0x312abe};}async function pushPreparedPage(_0x457171,_0x52a1a8){const _0x487c78=a200_0x52e834,_0x4f1afd=await updatePage(_0x457171['appCode'],_0x52a1a8[_0x487c78(0x9d)]['pageId'],_0x52a1a8[_0x487c78(0xa0)],_0x52a1a8[_0x487c78(0x9d)][_0x487c78(0xda)]);if(!_0x4f1afd)throw CliErrors[_0x487c78(0xd5)](_0x487c78(0x8f)+_0x52a1a8['remoteDetail'][_0x487c78(0xb4)]);const _0x32e024=await loadPageDetailForPage(_0x457171,_0x52a1a8[_0x487c78(0x9d)][_0x487c78(0xb4)]),_0x4547ba=serializePageSchemaForFile(_0x32e024['code']);return await writeFile(_0x52a1a8[_0x487c78(0xbc)],_0x4547ba,'utf8'),{'pageId':_0x32e024[_0x487c78(0xb4)],'type':_0x32e024['type'],'title':_0x32e024[_0x487c78(0xac)],'normalized':_0x4547ba!==serializePageSchemaForFile(_0x52a1a8['localContent']),'nextLockEntry':{'hash':computePageContentHash(_0x4547ba),'pageId':_0x32e024[_0x487c78(0xb4)],'pageVersion':_0x32e024[_0x487c78(0xcb)],'type':_0x32e024['type'],'title':_0x32e024[_0x487c78(0xac)],'datasetIds':_0x32e024[_0x487c78(0xda)],'versionTag':_0x32e024['versionTag']}};}
|
|
1
|
+
const a200_0x127e01=a200_0x1baa;(function(_0x2d6194,_0x220c77){const _0x3fcb4a=a200_0x1baa,_0x134383=_0x2d6194();while(!![]){try{const _0x5cc06e=parseInt(_0x3fcb4a(0xa5))/0x1*(parseInt(_0x3fcb4a(0x8c))/0x2)+parseInt(_0x3fcb4a(0xa6))/0x3+-parseInt(_0x3fcb4a(0x99))/0x4+parseInt(_0x3fcb4a(0x6c))/0x5*(parseInt(_0x3fcb4a(0xaa))/0x6)+parseInt(_0x3fcb4a(0x79))/0x7*(-parseInt(_0x3fcb4a(0xad))/0x8)+parseInt(_0x3fcb4a(0xa0))/0x9+-parseInt(_0x3fcb4a(0xac))/0xa*(parseInt(_0x3fcb4a(0x7a))/0xb);if(_0x5cc06e===_0x220c77)break;else _0x134383['push'](_0x134383['shift']());}catch(_0x301f2f){_0x134383['push'](_0x134383['shift']());}}}(a200_0x220e,0x1c635));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{transpileLrSmartJsx,updatePage}from'../../core/api-client.js';import{computePageContentHash,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';function a200_0x220e(){const _0x5ece5c=['Push\x20local\x20page\x20schema\x20back\x20to\x20remote','utf8','pageId','version-tag','alias','Page\x20group\x20version\x20tag\x20(batch\x20mode\x20only)','conflict','\x20no\x20longer\x20belongs\x20to\x20the\x20target\x20dataset','503096neJmxM','normalized','items','lastSync','No\x20local\x20pages\x20found\x20for\x20dataset\x20\x22','compress','parse','1821969VUvJxU','type','UNKNOWN','datasetId','POST','29gceWHT','657678DYpeHG','appCode','values','nextLockEntry','12RCHfcl','`\x20first','1328190OepLYZ','16RBFFgw','push','blocked','filter','localContent','includes','content','relatedPages','Run\x20`','string','remoteDetail','Page\x20','mode','\x20has\x20changed\x20since\x20last\x20pull.','Remote\x20page\x20','code','Push\x20succeeded;\x20server\x20normalized\x20the\x20schema','Page\x20ID','lockFilePath','489355elyuAo','hash','length','status','\x20page\x20pull\x20--id\x20','localPath','would_push','message','Push\x20succeeded','versionTag','No\x20changes\x20to\x20push','`\x20first.','pageVersion','420259WvhwuJ','33VfJNhf','No\x20lock\x20record\x20found\x20for\x20page\x20','lockEntry','datasetIds','single','local\x20JSON\x20is\x20invalid','remote\x20pageVersion\x20changed','apiError','normalizedNodes','Local\x20file\x20not\x20found:\x20','no\x20changes','deleted','validation','/smartapi/lovrabet/update-page','pages','datasetCode','title','unchanged','9874SkpAMQ','candidates','write','map','name'];a200_0x220e=function(){return _0x5ece5c;};return a200_0x220e();}function a200_0x1baa(_0x39cb1d,_0x386f61){_0x39cb1d=_0x39cb1d-0x6b;const _0x220e14=a200_0x220e();let _0x1baafd=_0x220e14[_0x39cb1d];return _0x1baafd;}import{prepareLrSmartJsxForPush}from'../../core/page/lr-smart-jsx.js';import{CliErrors}from'../../errors.js';export const pagePush={'service':'page','command':'push','description':a200_0x127e01(0x91),'risk':a200_0x127e01(0x8e),'defaultOutputFormat':a200_0x127e01(0x9e),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'id','type':'number','description':a200_0x127e01(0xbe)},DATASETCODE_FLAG_OPTIONAL,{'name':a200_0x127e01(0x95),'type':a200_0x127e01(0xb6),'description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'},{'name':'version-tag','type':'string','description':a200_0x127e01(0x96)}],async 'validate'(_0x36f7e9){validatePageTargetSelector(_0x36f7e9);},async 'dryRun'(_0x28712e){const _0xd6972e=a200_0x127e01,_0x4d2886=await buildPushPreview(_0x28712e);return{'method':_0xd6972e(0xa4),'url':_0xd6972e(0x87),'body':{'appCode':_0x28712e[_0xd6972e(0xa7)],'mode':_0x4d2886[_0xd6972e(0xb9)],'datasetCode':_0x4d2886['datasetCode']??null,'pages':_0x4d2886['items']},'description':serializeDryRunDescription({'mode':_0x4d2886[_0xd6972e(0xb9)],'datasetCode':_0x4d2886[_0xd6972e(0x89)]??null,'totalWouldPush':_0x4d2886['items'][_0xd6972e(0xb0)](_0x19122e=>_0x19122e['status']===_0xd6972e(0x72))[_0xd6972e(0x6e)],'totalUnchanged':_0x4d2886[_0xd6972e(0x9b)][_0xd6972e(0xb0)](_0x5d1157=>_0x5d1157['status']===_0xd6972e(0x8b))['length'],'totalConflicts':_0x4d2886['items'][_0xd6972e(0xb0)](_0x283819=>_0x283819[_0xd6972e(0x6f)]===_0xd6972e(0x97)||_0x283819[_0xd6972e(0x6f)]===_0xd6972e(0xaf))[_0xd6972e(0x6e)]})};},async 'execute'(_0x592125){const _0x1abe5f=a200_0x127e01,_0x4c65d7=loadPageProjectConfig(_0x592125[_0x1abe5f(0xa7)]),_0x3e875a=await readPageLockFile(_0x4c65d7[_0x1abe5f(0x6b)]),{lockData:_0x32cedc,appLock:_0x329cbd}=ensurePageLockScope(_0x3e875a??createEmptyPageLock(),_0x592125[_0x1abe5f(0xa7)]),_0x4feea4=getPageIdFlag(_0x592125);if(_0x4feea4!==undefined){const _0x35a4a3=await prepareSinglePush(_0x592125,_0x4c65d7,_0x329cbd[_0x1abe5f(0x88)][String(_0x4feea4)],_0x4feea4),_0x537910=await pushPreparedPage(_0x592125,_0x35a4a3);return _0x329cbd[_0x1abe5f(0x88)][String(_0x537910[_0x1abe5f(0x93)])]=_0x537910[_0x1abe5f(0xa9)],_0x329cbd[_0x1abe5f(0x9c)]=new Date()['toISOString'](),await writePageLockFile(_0x4c65d7[_0x1abe5f(0x6b)],_0x32cedc),{'ok':!![],'message':_0x537910[_0x1abe5f(0x9a)]?_0x1abe5f(0xbd):_0x1abe5f(0x74),'data':{'appCode':_0x592125[_0x1abe5f(0xa7)],'pushedPages':[{'pageId':_0x537910[_0x1abe5f(0x93)],'type':_0x537910[_0x1abe5f(0xa1)],'title':_0x537910[_0x1abe5f(0x8a)],'normalized':_0x537910[_0x1abe5f(0x9a)]}],'skippedPages':[],'failedPages':[],'totalPushed':0x1,'totalSkipped':0x0,'totalFailed':0x0}};}const _0x54a443=await buildBatchPushPlan(_0x592125,_0x329cbd['pages']),_0x2f9e7a=[],_0x1e03a4=[],_0x271a3f=[];for(const _0xac655b of _0x54a443[_0x1abe5f(0x8d)]){try{const _0x19b44e=await prepareSinglePush(_0x592125,_0x4c65d7,_0x329cbd['pages'][String(_0xac655b['pageId'])],_0xac655b['pageId'],_0x54a443['datasetId']);if(!_0x19b44e['preparedChanges']&&_0x19b44e['localHash']===_0x19b44e[_0x1abe5f(0x7c)]['hash']){_0x1e03a4['push']({'pageId':_0xac655b['pageId'],'type':_0xac655b[_0x1abe5f(0xa1)],'title':_0xac655b[_0x1abe5f(0x8a)],'reason':_0x1abe5f(0x84)});continue;}const _0x3688c5=await pushPreparedPage(_0x592125,_0x19b44e);_0x329cbd['pages'][String(_0x3688c5[_0x1abe5f(0x93)])]=_0x3688c5[_0x1abe5f(0xa9)],_0x2f9e7a[_0x1abe5f(0xae)]({'pageId':_0x3688c5[_0x1abe5f(0x93)],'type':_0x3688c5[_0x1abe5f(0xa1)],'title':_0x3688c5[_0x1abe5f(0x8a)],'normalized':_0x3688c5[_0x1abe5f(0x9a)]});}catch(_0x2cb2cb){_0x271a3f[_0x1abe5f(0xae)]({'pageId':_0xac655b[_0x1abe5f(0x93)],'type':_0xac655b[_0x1abe5f(0xa1)],'title':_0xac655b['title'],'reason':_0x2cb2cb instanceof Error?_0x2cb2cb[_0x1abe5f(0x73)]:String(_0x2cb2cb)});}}return _0x329cbd[_0x1abe5f(0x9c)]=new Date()['toISOString'](),await writePageLockFile(_0x4c65d7[_0x1abe5f(0x6b)],_0x32cedc),{'ok':_0x271a3f['length']===0x0||_0x2f9e7a[_0x1abe5f(0x6e)]>0x0||_0x1e03a4['length']>0x0,'message':_0x271a3f['length']>0x0&&_0x2f9e7a[_0x1abe5f(0x6e)]>0x0?'Some\x20pages\x20failed\x20to\x20push':_0x2f9e7a[_0x1abe5f(0x6e)]>0x0?_0x1abe5f(0x74):_0x1e03a4[_0x1abe5f(0x6e)]>0x0&&_0x271a3f[_0x1abe5f(0x6e)]===0x0?_0x1abe5f(0x76):_0x271a3f[0x0]?.['reason']||'Push\x20failed','data':{'appCode':_0x592125[_0x1abe5f(0xa7)],'pushedPages':_0x2f9e7a,'skippedPages':_0x1e03a4,'failedPages':_0x271a3f,'totalPushed':_0x2f9e7a[_0x1abe5f(0x6e)],'totalSkipped':_0x1e03a4[_0x1abe5f(0x6e)],'totalFailed':_0x271a3f[_0x1abe5f(0x6e)]}};}};async function buildPushPreview(_0x54e022){const _0x159ed1=a200_0x127e01,_0x2b44d0=loadPageProjectConfig(_0x54e022[_0x159ed1(0xa7)]),_0x2449d5=await readPageLockFile(_0x2b44d0['lockFilePath']),{appLock:_0x505c37}=ensurePageLockScope(_0x2449d5??createEmptyPageLock(),_0x54e022[_0x159ed1(0xa7)]),_0x4b3af3=getPageIdFlag(_0x54e022);if(_0x4b3af3!==undefined)return{'mode':_0x159ed1(0x7e),'items':[await inspectPushPage(_0x54e022,_0x2b44d0,_0x505c37[_0x159ed1(0x88)][String(_0x4b3af3)],_0x4b3af3)]};const _0x2a76ce=await buildBatchPushPlan(_0x54e022,_0x505c37[_0x159ed1(0x88)]);return{'mode':'batch','datasetCode':_0x2a76ce[_0x159ed1(0x89)],'items':await Promise['all'](_0x2a76ce[_0x159ed1(0x8d)]['map'](_0x3d649c=>inspectPushPage(_0x54e022,_0x2b44d0,_0x505c37['pages'][String(_0x3d649c[_0x159ed1(0x93)])],_0x3d649c[_0x159ed1(0x93)],_0x2a76ce[_0x159ed1(0xa3)])))};}async function buildBatchPushPlan(_0x38b1b7,_0x5864e5){const _0x4fe405=a200_0x127e01,_0x3bdc78=await loadDatasetDetailForPage(_0x38b1b7),_0x2d5bb1=_0x3bdc78['id'],_0x3ab030=new Set(_0x3bdc78[_0x4fe405(0xb4)][_0x4fe405(0xb0)](_0x39bec1=>!_0x39bec1[_0x4fe405(0x85)])[_0x4fe405(0x8f)](_0x139169=>_0x139169['id'])),_0xebc3d5=Object[_0x4fe405(0xa8)](_0x5864e5)[_0x4fe405(0xb0)](_0x2aaf85=>_0x2aaf85[_0x4fe405(0x7d)][_0x4fe405(0xb2)](_0x2d5bb1)&&_0x3ab030['has'](_0x2aaf85['pageId']));if(_0xebc3d5[_0x4fe405(0x6e)]===0x0)throw CliErrors['validation'](_0x4fe405(0x9d)+_0x3bdc78[_0x4fe405(0xbc)]+'\x22.',_0x4fe405(0xb5)+CLI_BIN_NAME+'\x20page\x20pull\x20--datasetcode\x20'+_0x3bdc78[_0x4fe405(0xbc)]+_0x4fe405(0x77));const _0x512d55=selectVersionTagGroup(_0xebc3d5,_0x5ec7aa=>_0x5ec7aa[_0x4fe405(0x75)]??null,_0x38b1b7['str'](_0x4fe405(0x94))),_0x138b2d=[];for(const _0x3addd3 of _0x512d55[_0x4fe405(0x9b)]){_0x138b2d[_0x4fe405(0xae)]({'pageId':_0x3addd3[_0x4fe405(0x93)],'type':_0x3addd3[_0x4fe405(0xa1)],'title':_0x3addd3[_0x4fe405(0x8a)]});}return{'datasetCode':_0x3bdc78[_0x4fe405(0xbc)],'datasetId':_0x2d5bb1,'candidates':_0x138b2d};}async function inspectPushPage(_0x1d64ef,_0x205268,_0x309468,_0x499d99,_0x545768){const _0x29a87f=a200_0x127e01;if(!_0x309468)return{'pageId':_0x499d99,'type':_0x29a87f(0xa2),'title':'page-'+_0x499d99,'localPath':resolvePageFilePath(_0x205268,_0x499d99,_0x29a87f(0xa2)),'status':_0x29a87f(0xaf),'reason':_0x29a87f(0xb5)+CLI_BIN_NAME+'\x20page\x20pull\x20--id\x20'+_0x499d99+_0x29a87f(0xab)};const _0x1e2652=resolvePageFilePath(_0x205268,_0x499d99,_0x309468['type']);if(!await fileExists(_0x1e2652))return{'pageId':_0x499d99,'type':_0x309468[_0x29a87f(0xa1)],'title':_0x309468[_0x29a87f(0x8a)],'localPath':_0x1e2652,'status':_0x29a87f(0xaf),'reason':'Local\x20file\x20not\x20found:\x20'+_0x1e2652};const _0x5bf769=await readFile(_0x1e2652,_0x29a87f(0x92));try{JSON[_0x29a87f(0x9f)](_0x5bf769);}catch{return{'pageId':_0x499d99,'type':_0x309468[_0x29a87f(0xa1)],'title':_0x309468[_0x29a87f(0x8a)],'localPath':_0x1e2652,'status':_0x29a87f(0xaf),'reason':_0x29a87f(0x7f)};}try{const _0x1899ff=await loadPageDetailForPage(_0x1d64ef,_0x499d99);if(_0x545768!=null&&!_0x1899ff['datasetIds']['includes'](_0x545768))return{'pageId':_0x499d99,'type':_0x309468[_0x29a87f(0xa1)],'title':_0x309468[_0x29a87f(0x8a)],'localPath':_0x1e2652,'status':_0x29a87f(0x97),'reason':_0x29a87f(0xb8)+_0x499d99+_0x29a87f(0x98)};const _0x3cd1b1=_0x309468[_0x29a87f(0x78)]!=null&&_0x1899ff['pageVersion']!=null;if(_0x3cd1b1&&_0x309468[_0x29a87f(0x78)]!==_0x1899ff[_0x29a87f(0x78)])return{'pageId':_0x499d99,'type':_0x309468[_0x29a87f(0xa1)],'title':_0x309468[_0x29a87f(0x8a)],'localPath':_0x1e2652,'status':_0x29a87f(0x97),'reason':_0x29a87f(0x80)};if(!_0x3cd1b1&&computeSerializedSchemaHash(_0x1899ff['code'])!==_0x309468['hash'])return{'pageId':_0x499d99,'type':_0x309468[_0x29a87f(0xa1)],'title':_0x309468[_0x29a87f(0x8a)],'localPath':_0x1e2652,'status':_0x29a87f(0x97),'reason':'remote\x20schema\x20changed'};const _0x5523e4=await prepareLrSmartJsxForPush(_0x5bf769,_0x1899ff[_0x29a87f(0xbc)],transpileLrSmartJsx);if(_0x5523e4[_0x29a87f(0x82)]===0x0&&computePageContentHash(_0x5523e4[_0x29a87f(0xb3)])===_0x309468[_0x29a87f(0x6d)])return{'pageId':_0x499d99,'type':_0x309468[_0x29a87f(0xa1)],'title':_0x309468[_0x29a87f(0x8a)],'localPath':_0x1e2652,'status':_0x29a87f(0x8b),'reason':_0x29a87f(0x84)};}catch(_0x4fb501){return{'pageId':_0x499d99,'type':_0x309468[_0x29a87f(0xa1)],'title':_0x309468[_0x29a87f(0x8a)],'localPath':_0x1e2652,'status':_0x29a87f(0xaf),'reason':_0x4fb501 instanceof Error?_0x4fb501[_0x29a87f(0x73)]:String(_0x4fb501)};}return{'pageId':_0x499d99,'type':_0x309468['type'],'title':_0x309468['title'],'localPath':_0x1e2652,'status':_0x29a87f(0x72)};}async function prepareSinglePush(_0x5f046f,_0x2e37c0,_0x46401a,_0x4f6946,_0x13cbcd){const _0x33a073=a200_0x127e01;if(!_0x46401a)throw CliErrors['validation'](_0x33a073(0x7b)+_0x4f6946+'.',_0x33a073(0xb5)+CLI_BIN_NAME+_0x33a073(0x70)+_0x4f6946+'`\x20first.');const _0xa74016=resolvePageFilePath(_0x2e37c0,_0x4f6946,_0x46401a[_0x33a073(0xa1)]);if(!await fileExists(_0xa74016))throw CliErrors[_0x33a073(0x86)](_0x33a073(0x83)+_0xa74016,'Run\x20`'+CLI_BIN_NAME+_0x33a073(0x70)+_0x4f6946+_0x33a073(0x77));const _0x591546=await readFile(_0xa74016,_0x33a073(0x92));try{JSON['parse'](_0x591546);}catch{throw CliErrors[_0x33a073(0x86)]('Invalid\x20JSON\x20in\x20local\x20page\x20file:\x20'+_0xa74016);}const _0x5da82b=await loadPageDetailForPage(_0x5f046f,_0x4f6946);if(_0x13cbcd!=null&&!_0x5da82b[_0x33a073(0x7d)]['includes'](_0x13cbcd))throw CliErrors['validation'](_0x33a073(0xb8)+_0x4f6946+'\x20no\x20longer\x20belongs\x20to\x20the\x20selected\x20dataset.');const _0x28a5fb=_0x46401a[_0x33a073(0x78)]!=null&&_0x5da82b[_0x33a073(0x78)]!=null;if(_0x28a5fb){if(_0x46401a[_0x33a073(0x78)]!==_0x5da82b[_0x33a073(0x78)])throw CliErrors['validation'](_0x33a073(0xbb)+_0x4f6946+'\x20has\x20changed\x20since\x20last\x20pull.',_0x33a073(0xb5)+CLI_BIN_NAME+_0x33a073(0x70)+_0x4f6946+_0x33a073(0x77));}else{const _0x6ab350=computeSerializedSchemaHash(_0x5da82b[_0x33a073(0xbc)]);if(_0x6ab350!==_0x46401a[_0x33a073(0x6d)])throw CliErrors[_0x33a073(0x86)](_0x33a073(0xbb)+_0x4f6946+_0x33a073(0xba),_0x33a073(0xb5)+CLI_BIN_NAME+'\x20page\x20pull\x20--id\x20'+_0x4f6946+_0x33a073(0x77));}const _0x3d4f83=await prepareLrSmartJsxForPush(_0x591546,_0x5da82b[_0x33a073(0xbc)],transpileLrSmartJsx);return{'lockEntry':_0x46401a,'localPath':_0xa74016,'localContent':_0x3d4f83[_0x33a073(0xb3)],'localHash':computePageContentHash(_0x3d4f83[_0x33a073(0xb3)]),'preparedChanges':_0x3d4f83['normalizedNodes']>0x0,'remoteDetail':_0x5da82b};}async function pushPreparedPage(_0x590226,_0x91120b){const _0x356e9c=a200_0x127e01,_0x5ef221=await updatePage(_0x590226[_0x356e9c(0xa7)],_0x91120b[_0x356e9c(0xb7)][_0x356e9c(0x93)],_0x91120b[_0x356e9c(0xb1)],_0x91120b['remoteDetail']['datasetIds']);if(!_0x5ef221)throw CliErrors[_0x356e9c(0x81)]('Page\x20update\x20failed:\x20'+_0x91120b[_0x356e9c(0xb7)][_0x356e9c(0x93)]);const _0x5f2793=await loadPageDetailForPage(_0x590226,_0x91120b[_0x356e9c(0xb7)][_0x356e9c(0x93)]),_0x3698cc=serializePageSchemaForFile(_0x5f2793[_0x356e9c(0xbc)]);return await writeFile(_0x91120b[_0x356e9c(0x71)],_0x3698cc,_0x356e9c(0x92)),{'pageId':_0x5f2793[_0x356e9c(0x93)],'type':_0x5f2793[_0x356e9c(0xa1)],'title':_0x5f2793[_0x356e9c(0x90)],'normalized':_0x3698cc!==serializePageSchemaForFile(_0x91120b['localContent']),'nextLockEntry':{'hash':computePageContentHash(_0x3698cc),'pageId':_0x5f2793[_0x356e9c(0x93)],'pageVersion':_0x5f2793['pageVersion'],'type':_0x5f2793[_0x356e9c(0xa1)],'title':_0x5f2793[_0x356e9c(0x90)],'datasetIds':_0x5f2793[_0x356e9c(0x7d)],'versionTag':_0x5f2793[_0x356e9c(0x75)]}};}
|