@lovrabet/rabetbase-cli 2.4.2 → 2.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/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/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/react/create.js +1 -1
- package/lib/commands/page/react/detail.js +1 -1
- package/lib/commands/page/react/list.js +1 -1
- package/lib/commands/page/react/publish.js +1 -1
- package/lib/commands/page/react/shared.js +1 -1
- package/lib/commands/page/react/syntax.js +1 -1
- package/lib/commands/page/react/template.js +1 -1
- package/lib/commands/page/react/update.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +8 -4
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase/guides/react-custom-page-workflow.md +9 -3
- package/skills/rabetbase/knowledge/react-page/generation-standards.md +13 -2
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a132_0x2f2dfe=a132_0x396d;(function(_0x5925b3,_0x59c006){const _0x1003fc=a132_0x396d,_0x2fbd40=_0x5925b3();while(!![]){try{const _0x2ff623=parseInt(_0x1003fc(0x1e7))/0x1+parseInt(_0x1003fc(0x1f6))/0x2*(parseInt(_0x1003fc(0x1e8))/0x3)+parseInt(_0x1003fc(0x1f5))/0x4*(parseInt(_0x1003fc(0x1db))/0x5)+-parseInt(_0x1003fc(0x1e1))/0x6+parseInt(_0x1003fc(0x1dd))/0x7+parseInt(_0x1003fc(0x1e0))/0x8+-parseInt(_0x1003fc(0x1f4))/0x9;if(_0x2ff623===_0x59c006)break;else _0x2fbd40['push'](_0x2fbd40['shift']());}catch(_0x376536){_0x2fbd40['push'](_0x2fbd40['shift']());}}}(a132_0x23cc,0x662d5));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const NOTIFICATION_CHANNEL_TYPES=[a132_0x2f2dfe(0x1de),a132_0x2f2dfe(0x1ed),a132_0x2f2dfe(0x1f8),a132_0x2f2dfe(0x1d8),a132_0x2f2dfe(0x1e6)];export const notificationConfigList={'service':a132_0x2f2dfe(0x1eb),'command':a132_0x2f2dfe(0x1e3),'description':'List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a132_0x2f2dfe(0x1e9),'type':a132_0x2f2dfe(0x1d9),'description':a132_0x2f2dfe(0x1f9),'enum':NOTIFICATION_CHANNEL_TYPES,'default':a132_0x2f2dfe(0x1de)}],async 'validate'(_0xc16bdc){readChannelType(_0xc16bdc);},async 'execute'(_0x5f2db0){const _0x419597=a132_0x2f2dfe,_0x56c968=readChannelType(_0x5f2db0),_0x342968=await listNotificationChannelConfigs(_0x5f2db0[_0x419597(0x1e4)],_0x56c968),_0x259269=_0x342968[_0x419597(0x1f7)](projectNotificationConfig);return{'ok':!![],'data':{'appCode':_0x5f2db0[_0x419597(0x1e4)],'channelType':_0x56c968,'count':_0x259269[_0x419597(0x1da)],'configs':_0x259269},'message':_0x419597(0x1ee)+_0x259269[_0x419597(0x1da)]+'\x20'+_0x56c968+_0x419597(0x1f2)};}};function readChannelType(_0xfbc42e){const _0x3441f6=a132_0x2f2dfe,_0x4f08ae=_0xfbc42e['str'](_0x3441f6(0x1e9))[_0x3441f6(0x1d6)]()||_0x3441f6(0x1de);if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x4f08ae))throw CliErrors['validation'](_0x3441f6(0x1dc)+_0x4f08ae,_0x3441f6(0x1ec)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');return _0x4f08ae;}function projectNotificationConfig(_0x4581cf,_0x1c71b2){const _0x5606cd=a132_0x2f2dfe;return{'id':typeof _0x4581cf['id']===_0x5606cd(0x1ea)?_0x4581cf['id']:null,'configCode':requireConfigString(_0x4581cf,_0x5606cd(0x1f1),_0x1c71b2),'configName':requireConfigString(_0x4581cf,_0x5606cd(0x1f0),_0x1c71b2),'channelType':requireConfigString(_0x4581cf,'channelType',_0x1c71b2),'description':normalizeNullableString(_0x4581cf[_0x5606cd(0x1d7)]),'createTime':normalizeNullableString(_0x4581cf[_0x5606cd(0x1f3)]),'updateTime':normalizeNullableString(_0x4581cf[_0x5606cd(0x1e5)])};}function a132_0x396d(_0x4d5225,_0x3492c7){_0x4d5225=_0x4d5225-0x1d6;const _0x23cc4e=a132_0x23cc();let _0x396dbd=_0x23cc4e[_0x4d5225];return _0x396dbd;}function requireConfigString(_0x26239e,_0x3f9004,_0x2beaa1){const _0x7831e5=a132_0x2f2dfe,_0x3142c8=_0x26239e[_0x3f9004];if(typeof _0x3142c8!==_0x7831e5(0x1d9)||_0x3142c8[_0x7831e5(0x1d6)]()==='')throw CliErrors[_0x7831e5(0x1e2)](_0x7831e5(0x1ef),'Item\x20'+(_0x2beaa1+0x1)+_0x7831e5(0x1df)+_0x3f9004+'\x22.');return _0x3142c8['trim']();}function a132_0x23cc(){const _0x3f4521=['2414948Tbxlqn','63690KhDrLa','map','DINGTALK','Notification\x20channel\x20type','trim','description','WECOM','string','length','5vJUyak','Invalid\x20--type:\x20','939351IwPaoq','EMAIL','\x20is\x20missing\x20required\x20field\x20\x22','3289128lYVHup','1624620lkkyHH','apiError','config-list','appCode','updateTime','WEBHOOK','69619ynDLzR','15lgDKlk','type','number','notification','Allowed\x20values:\x20','FEISHU','Found\x20','Invalid\x20notification\x20config\x20response.','configName','configCode','\x20notification\x20config(s)','createTime','6197652RQCIRm'];a132_0x23cc=function(){return _0x3f4521;};return a132_0x23cc();}function normalizeNullableString(_0x5f56b2){const _0x24a089=a132_0x2f2dfe;return typeof _0x5f56b2===_0x24a089(0x1d9)?_0x5f56b2:null;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a133_0x1817(){const _0x2f93e8=['5mRUHNo','8vdjkFm','183958VlmwoT','6117250bxwcbN','229062WVNZwm','9sPrVnM','424123vbOssC','32zbtzAx','18172693rlbCCQ','367386gyVZGw','297310mzMBto'];a133_0x1817=function(){return _0x2f93e8;};return a133_0x1817();}(function(_0x18ee1b,_0x50c302){const _0x5ec6b7=a133_0x532d,_0x29b5c2=_0x18ee1b();while(!![]){try{const _0x5d059d=-parseInt(_0x5ec6b7(0x1c8))/0x1+-parseInt(_0x5ec6b7(0x1cb))/0x2+-parseInt(_0x5ec6b7(0x1cd))/0x3*(-parseInt(_0x5ec6b7(0x1ca))/0x4)+-parseInt(_0x5ec6b7(0x1c9))/0x5*(parseInt(_0x5ec6b7(0x1c7))/0x6)+-parseInt(_0x5ec6b7(0x1c4))/0x7*(parseInt(_0x5ec6b7(0x1c5))/0x8)+parseInt(_0x5ec6b7(0x1c3))/0x9*(-parseInt(_0x5ec6b7(0x1cc))/0xa)+parseInt(_0x5ec6b7(0x1c6))/0xb;if(_0x5d059d===_0x50c302)break;else _0x29b5c2['push'](_0x29b5c2['shift']());}catch(_0x530d44){_0x29b5c2['push'](_0x29b5c2['shift']());}}}(a133_0x1817,0x7a1ca));function a133_0x532d(_0x1a791d,_0xc7faf9){_0x1a791d=_0x1a791d-0x1c3;const _0x181774=a133_0x1817();let _0x532d6c=_0x181774[_0x1a791d];return _0x532d6c;}import{notificationConfigList}from'../../commands/notification/config-list.js';export const notificationDefinitions=[notificationConfigList];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a134_0x1820(){const _0x5ab077=['General','fileName','/smartapi/common/uploadFile','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','scene','appCode','fileUrl','4gwJAEl','ocr','toString','general','/smartapi/ocr/recognize-text?','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','4709448AUzpxG','filter','3558060Esovey','Publicly\x20accessible\x20image\x20or\x20file\x20URL','POST','filePath','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','/smartapi/common/queryFileUrl','File\x20upload\x20response\x20missing\x20filePath.','\x20OCR\x20from\x20URL','imageFile','imageUrl','idCard','Unsupported\x20OCR\x20scene:\x20','form','image-file','path','join','1559562wDZtVE','.\x20Supported\x20scenes:\x20','apiError','14696uhdNIF','626388zimrkL','\x20OCR','count','File\x20URL\x20response\x20missing\x20fileUrl.','使用研发态\x20OCR\x20服务识别\x20URL\x20或本地文件中的文字','829314pSRtNl','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','Table','3254898AvcXqH','/smartapi/ocr/recognize-text','string','toLowerCase','str','validation','image-url','3038KgXHrp','trim'];a134_0x1820=function(){return _0x5ab077;};return a134_0x1820();}const a134_0x55254c=a134_0x3d84;(function(_0x4dec0c,_0x5c5757){const _0x5a371c=a134_0x3d84,_0x2d5bdd=_0x4dec0c();while(!![]){try{const _0x2109f4=parseInt(_0x5a371c(0x204))/0x1+parseInt(_0x5a371c(0x1fb))/0x2+-parseInt(_0x5a371c(0x1ff))/0x3*(parseInt(_0x5a371c(0x217))/0x4)+-parseInt(_0x5a371c(0x21f))/0x5+-parseInt(_0x5a371c(0x207))/0x6+-parseInt(_0x5a371c(0x20e))/0x7*(-parseInt(_0x5a371c(0x1fe))/0x8)+-parseInt(_0x5a371c(0x21d))/0x9;if(_0x2109f4===_0x5c5757)break;else _0x2d5bdd['push'](_0x2d5bdd['shift']());}catch(_0x316a56){_0x2d5bdd['push'](_0x2d5bdd['shift']());}}}(a134_0x1820,0x6695e));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';function a134_0x3d84(_0x62ad1d,_0x10db2d){_0x62ad1d=_0x62ad1d-0x1f4;const _0x1820ba=a134_0x1820();let _0x3d8495=_0x1820ba[_0x62ad1d];return _0x3d8495;}import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=['invoice',a134_0x55254c(0x21a),a134_0x55254c(0x1f7),a134_0x55254c(0x1f5)],SCENE_TO_LEGACY_TYPE={'invoice':'Invoice','general':a134_0x55254c(0x210),'form':a134_0x55254c(0x206),'idCard':'IdCard'},SCENE_FLAG={'name':a134_0x55254c(0x214),'type':a134_0x55254c(0x209),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a134_0x55254c(0x213)},IMAGE_FILE_FLAG={'name':a134_0x55254c(0x1f8),'type':a134_0x55254c(0x209),'description':a134_0x55254c(0x205)},IMAGE_URL_FLAG={'name':a134_0x55254c(0x20d),'type':a134_0x55254c(0x209),'description':a134_0x55254c(0x220)};function normalizeScene(_0x3b1569){const _0x5ef292=a134_0x55254c,_0x41c2fe=_0x3b1569[_0x5ef292(0x20f)]()[_0x5ef292(0x20a)]();if(_0x41c2fe==='idcard')return _0x5ef292(0x1f5);if(_0x41c2fe==='invoice'||_0x41c2fe===_0x5ef292(0x21a)||_0x41c2fe==='form')return _0x41c2fe;throw CliErrors[_0x5ef292(0x20c)](_0x5ef292(0x1f6)+_0x3b1569+_0x5ef292(0x1fc)+SUPPORTED_SCENES[_0x5ef292(0x1fa)](',\x20'));}function selectedInputs(_0x2aed9b){const _0x5dd6d6=a134_0x55254c,_0x341a29=_0x2aed9b[_0x5dd6d6(0x20b)](_0x5dd6d6(0x1f8))[_0x5dd6d6(0x20f)](),_0x2944ef=_0x2aed9b[_0x5dd6d6(0x20b)](_0x5dd6d6(0x20d))['trim']();return{'imageFile':_0x341a29,'imageUrl':_0x2944ef,'count':[_0x341a29,_0x2944ef][_0x5dd6d6(0x21e)](Boolean)['length']};}function validateInputSelection(_0x525585){const _0x1675bb=a134_0x55254c,_0x1f91cc=selectedInputs(_0x525585);if(_0x1f91cc[_0x1675bb(0x201)]!==0x1)throw CliErrors[_0x1675bb(0x20c)](_0x1675bb(0x21c));return _0x1f91cc;}function withScene(_0x54c007,_0x40c3cc,_0x37122a){const _0x4219cc=a134_0x55254c;return{..._0x54c007,'scene':_0x40c3cc,..._0x37122a?{'sourceFile':{'fileName':_0x37122a[_0x4219cc(0x211)],'filePath':_0x37122a[_0x4219cc(0x222)]}}:{}};}const ocrRecognize={'service':a134_0x55254c(0x218),'command':'recognize','description':a134_0x55254c(0x203),'risk':'read','flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x8e7f1e){const _0x2863bc=a134_0x55254c,_0x3882c2=normalizeScene(_0x8e7f1e[_0x2863bc(0x20b)](_0x2863bc(0x214))),_0x2bc4ab=SCENE_TO_LEGACY_TYPE[_0x3882c2],_0x2e4d46=validateInputSelection(_0x8e7f1e);if(_0x2e4d46['imageUrl']){const _0x3e4b55=new URLSearchParams({'url':_0x2e4d46[_0x2863bc(0x1f4)],'type':_0x2bc4ab,'appCode':_0x8e7f1e[_0x2863bc(0x215)]});return{'method':'GET','url':_0x2863bc(0x21b)+_0x3e4b55[_0x2863bc(0x219)](),'description':'Preview:\x20recognize\x20'+_0x3882c2+_0x2863bc(0x226)};}const _0x472b7e=requireDevelopmentUploadFile(_0x2e4d46[_0x2863bc(0x227)],_0x2863bc(0x1f8));return{'method':_0x2863bc(0x221),'url':_0x2863bc(0x212),'body':{'steps':[{'method':_0x2863bc(0x221),'url':_0x2863bc(0x212),'body':{'appCode':_0x8e7f1e[_0x2863bc(0x215)],'multipart':{'file':_0x472b7e}}},{'method':_0x2863bc(0x221),'url':_0x2863bc(0x224),'body':{'filePath':_0x2863bc(0x223),'downloadFlag':![]}},{'method':'GET','url':_0x2863bc(0x208),'query':{'appCode':_0x8e7f1e[_0x2863bc(0x215)],'url':'<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','type':_0x2bc4ab}}]},'description':'Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20'+_0x3882c2+_0x2863bc(0x200)};},async 'execute'(_0x24f48c){const _0x55c789=a134_0x55254c,_0x3c415b=normalizeScene(_0x24f48c[_0x55c789(0x20b)](_0x55c789(0x214))),_0xd53802=SCENE_TO_LEGACY_TYPE[_0x3c415b],_0x780f44=validateInputSelection(_0x24f48c);if(_0x780f44[_0x55c789(0x1f4)]){const _0x414bac=await recognizeDevelopmentOcr(_0x24f48c[_0x55c789(0x215)],{'url':_0x780f44[_0x55c789(0x1f4)],'type':_0xd53802});return{'ok':!![],'data':withScene(_0x414bac,_0x3c415b)};}const _0xf387fc=requireDevelopmentUploadFile(_0x780f44[_0x55c789(0x227)],_0x55c789(0x1f8)),_0x3edee0=await uploadDevelopmentFile(_0x24f48c[_0x55c789(0x215)],_0xf387fc[_0x55c789(0x1f9)]);if(!_0x3edee0[_0x55c789(0x222)])throw CliErrors[_0x55c789(0x1fd)](_0x55c789(0x225));const _0x33645f=await queryDevelopmentFileUrl(_0x3edee0[_0x55c789(0x222)],{'download':![]});if(!_0x33645f[_0x55c789(0x216)])throw CliErrors[_0x55c789(0x1fd)](_0x55c789(0x202));const _0x4d7b15=await recognizeDevelopmentOcr(_0x24f48c['appCode'],{'url':_0x33645f[_0x55c789(0x216)],'type':_0xd53802});return{'ok':!![],'data':withScene(_0x4d7b15,_0x3c415b,_0x3edee0)};}};export const ocrDefinitions=[ocrRecognize];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a135_0x4de99e=a135_0x3a19;(function(_0xec7430,_0x4fbd1a){const _0x5dce87=a135_0x3a19,_0x3a23f8=_0xec7430();while(!![]){try{const _0x3f45c3=parseInt(_0x5dce87(0x185))/0x1+-parseInt(_0x5dce87(0x174))/0x2+parseInt(_0x5dce87(0x17e))/0x3+-parseInt(_0x5dce87(0x182))/0x4*(-parseInt(_0x5dce87(0x191))/0x5)+-parseInt(_0x5dce87(0x17b))/0x6*(-parseInt(_0x5dce87(0x189))/0x7)+parseInt(_0x5dce87(0x177))/0x8*(parseInt(_0x5dce87(0x18d))/0x9)+parseInt(_0x5dce87(0x19c))/0xa*(-parseInt(_0x5dce87(0x1a0))/0xb);if(_0x3f45c3===_0x4fbd1a)break;else _0x3a23f8['push'](_0x3a23f8['shift']());}catch(_0x2ddc65){_0x3a23f8['push'](_0x3a23f8['shift']());}}}(a135_0xaecb,0x55e09));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessGenerateOperationState,assessStandardPageState,buildPageGenerateOperationStatusQueryCommand,buildStandardPageStatusQueryCommand,createPageGenerateClientOperationId,getUndeletedRelatedPages,loadDatasetDetailForPage,loadStandardPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';function a135_0xaecb(){const _0x5dfb40=['source','4218uQEAAd','reused','/generate-standard-pages/start','1435224CFMZcC','precheck','standardPageStatus','compress','11756LDNNnz','Dry-run\x20preview\x20(pass\x20--apply\x20to\x20execute\x20the\x20generation)','dataset','131432ahyJiQ','复用已有生成任务','manualResolutionRequired','appCode','2240zdZLUk','operationId','已提交生成任务','page','107811aLjSLT','PARTIAL_SUCCESS','apply','message','745gySXsD','related-pages-fallback','POST','nextAction','alias','Actually\x20execute\x20the\x20generation.\x20Without\x20this\x20flag,\x20only\x20a\x20dry-run\x20preview\x20is\x20shown.','name','SUCCESS','string','fieldCount','code','4939060lxhIVD','boolean','generate-start','progressRate','22wHyQDS','number','status','currentStep','81914LJAhDA','write','Start\x20async\x20Smart\x20List\x20Page\x20generation\x20from\x20a\x20dataset','72qvSrbt','clientOperationId','taskId'];a135_0xaecb=function(){return _0x5dfb40;};return a135_0xaecb();}function a135_0x3a19(_0x4bd17b,_0x44fca5){_0x4bd17b=_0x4bd17b-0x171;const _0xaecb0c=a135_0xaecb();let _0x3a19e6=_0xaecb0c[_0x4bd17b];return _0x3a19e6;}import{startGenerateStandardPages}from'../../core/api-client.js';export const pageGenerateStart={'service':a135_0x4de99e(0x18c),'command':a135_0x4de99e(0x19e),'description':a135_0x4de99e(0x176),'risk':a135_0x4de99e(0x175),'defaultOutputFormat':a135_0x4de99e(0x181),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a135_0x4de99e(0x195),'type':a135_0x4de99e(0x199),'description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'},{'name':a135_0x4de99e(0x18f),'type':a135_0x4de99e(0x19d),'description':a135_0x4de99e(0x196)}],async 'validate'(_0x5630bb){validateDatasetSelector(_0x5630bb);},async 'dryRun'(_0x41a353){const _0x570742=a135_0x4de99e,_0x17777c=await prepare(_0x41a353);return{'method':_0x570742(0x193),'url':'/smartapi/lovrabet/dataset/'+_0x17777c[_0x570742(0x184)][_0x570742(0x19b)]+_0x570742(0x17d),'body':{'appCode':_0x41a353[_0x570742(0x188)],'clientOperationId':_0x17777c['clientOperationId']},'description':serializeDryRunDescription({'dataset':{'id':_0x17777c[_0x570742(0x184)]['id'],'code':_0x17777c[_0x570742(0x184)][_0x570742(0x19b)],'name':_0x17777c[_0x570742(0x184)][_0x570742(0x197)],'fieldCount':_0x17777c['dataset'][_0x570742(0x19a)]},'precheckSource':_0x17777c[_0x570742(0x180)]?.[_0x570742(0x17a)]??_0x570742(0x192),'action':_0x570742(0x19e),'clientOperationId':_0x17777c[_0x570742(0x178)],'plannedStatus':_0x17777c[_0x570742(0x17f)]['status'],'reason':_0x17777c['precheck'][_0x570742(0x190)]})};},async 'execute'(_0x3f3910){const _0x41ff7d=a135_0x4de99e;if(!_0x3f3910['bool'](_0x41ff7d(0x18f))){const _0x1c5eaf=await pageGenerateStart['dryRun'](_0x3f3910);return{'ok':!![],'message':_0x41ff7d(0x183),'data':_0x1c5eaf};}const _0x18fdf3=await prepare(_0x3f3910);if(!_0x18fdf3[_0x41ff7d(0x17f)]['allowGenerate'])return{'ok':![],'message':_0x18fdf3['precheck'][_0x41ff7d(0x190)],'data':{'datasetCode':_0x18fdf3[_0x41ff7d(0x184)][_0x41ff7d(0x19b)],'clientOperationId':_0x18fdf3[_0x41ff7d(0x178)],'precheckSource':_0x18fdf3[_0x41ff7d(0x180)]?.['source']??_0x41ff7d(0x192),'status':_0x18fdf3['precheck'][_0x41ff7d(0x172)],'manualResolutionRequired':_0x18fdf3[_0x41ff7d(0x17f)][_0x41ff7d(0x187)],'nextAction':_0x18fdf3[_0x41ff7d(0x17f)][_0x41ff7d(0x194)],'query':{'command':buildStandardPageStatusQueryCommand(_0x18fdf3[_0x41ff7d(0x184)]['code'],_0x3f3910[_0x41ff7d(0x188)])},'standardPageStatus':_0x18fdf3[_0x41ff7d(0x180)]}};const _0x45ee25=await startGenerateStandardPages(_0x3f3910[_0x41ff7d(0x188)],_0x18fdf3[_0x41ff7d(0x184)][_0x41ff7d(0x19b)],{'clientOperationId':_0x18fdf3[_0x41ff7d(0x178)]}),_0x328488=_0x45ee25[_0x41ff7d(0x172)]===_0x41ff7d(0x198)||_0x45ee25[_0x41ff7d(0x172)]===_0x41ff7d(0x18e)?await loadStandardPageStatusForGenerate(_0x3f3910,_0x18fdf3[_0x41ff7d(0x184)][_0x41ff7d(0x19b)]):null,_0x2da21d=assessGenerateOperationState(_0x18fdf3[_0x41ff7d(0x184)][_0x41ff7d(0x19b)],_0x45ee25['status'],_0x328488);return{'ok':!![],'message':_0x45ee25[_0x41ff7d(0x17c)]?_0x41ff7d(0x186):_0x41ff7d(0x18b),'data':{'datasetCode':_0x18fdf3[_0x41ff7d(0x184)][_0x41ff7d(0x19b)],'appCode':_0x3f3910[_0x41ff7d(0x188)],'taskId':_0x45ee25[_0x41ff7d(0x179)]??null,'operationId':_0x45ee25['operationId']??null,'clientOperationId':_0x18fdf3['clientOperationId'],'jobStatus':_0x45ee25[_0x41ff7d(0x172)]??null,'progressRate':typeof _0x45ee25[_0x41ff7d(0x19f)]===_0x41ff7d(0x171)?_0x45ee25[_0x41ff7d(0x19f)]:null,'currentStep':_0x45ee25[_0x41ff7d(0x173)]??null,'reused':_0x45ee25[_0x41ff7d(0x17c)]===!![],'status':_0x2da21d[_0x41ff7d(0x172)],'manualResolutionRequired':_0x2da21d[_0x41ff7d(0x187)],'nextAction':_0x2da21d[_0x41ff7d(0x194)],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x18fdf3[_0x41ff7d(0x184)][_0x41ff7d(0x19b)],{'appCode':_0x3f3910['appCode'],'taskId':_0x45ee25['taskId'],'operationId':_0x45ee25[_0x41ff7d(0x18a)],'clientOperationId':_0x18fdf3['clientOperationId']})},'standardPageStatus':_0x328488}};}};async function prepare(_0x46ef51){const _0xbf7b3a=a135_0x4de99e,_0xde0076=await loadDatasetDetailForPage(_0x46ef51),_0x5d89c6=await loadStandardPageStatusForGenerate(_0x46ef51,_0xde0076[_0xbf7b3a(0x19b)]),_0x17f227=getUndeletedRelatedPages(_0xde0076);return{'dataset':_0xde0076,'standardPageStatus':_0x5d89c6,'clientOperationId':createPageGenerateClientOperationId(),'precheck':assessStandardPageState(_0xde0076['code'],_0x5d89c6,{'fallbackUndeletedPages':_0x17f227})};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a136_0x2a095b=a136_0x50e3;function a136_0x50e3(_0x59cd3a,_0x14f47a){_0x59cd3a=_0x59cd3a-0xa9;const _0x343001=a136_0x3430();let _0x50e3f7=_0x343001[_0x59cd3a];return _0x50e3f7;}(function(_0x20bb55,_0x516bd5){const _0x1ec720=a136_0x50e3,_0x39e0e4=_0x20bb55();while(!![]){try{const _0x18b3da=-parseInt(_0x1ec720(0xc9))/0x1*(parseInt(_0x1ec720(0xbf))/0x2)+parseInt(_0x1ec720(0xb6))/0x3*(parseInt(_0x1ec720(0xc2))/0x4)+-parseInt(_0x1ec720(0xaf))/0x5*(parseInt(_0x1ec720(0xc1))/0x6)+-parseInt(_0x1ec720(0xc0))/0x7+-parseInt(_0x1ec720(0xc4))/0x8*(-parseInt(_0x1ec720(0xbe))/0x9)+-parseInt(_0x1ec720(0xb2))/0xa*(-parseInt(_0x1ec720(0xc3))/0xb)+-parseInt(_0x1ec720(0xc6))/0xc*(-parseInt(_0x1ec720(0xce))/0xd);if(_0x18b3da===_0x516bd5)break;else _0x39e0e4['push'](_0x39e0e4['shift']());}catch(_0x46ef61){_0x39e0e4['push'](_0x39e0e4['shift']());}}}(a136_0x3430,0xa37a1));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessGenerateOperationState,buildPageGenerateOperationStatusQueryCommand,loadDatasetDetailForPage,loadStandardPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector,validateGenerateOperationSelector}from'../../commands/page/shared.js';import{getGenerateStandardPagesStatus}from'../../core/api-client.js';export const pageGenerateStatus={'service':a136_0x2a095b(0xbc),'command':'generate-status','description':a136_0x2a095b(0xb4),'risk':a136_0x2a095b(0xd4),'defaultOutputFormat':a136_0x2a095b(0xb1),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':'alias','type':a136_0x2a095b(0xca),'description':a136_0x2a095b(0xc5)},{'name':a136_0x2a095b(0xd1),'type':a136_0x2a095b(0xca),'description':a136_0x2a095b(0xcc)},{'name':a136_0x2a095b(0xad),'type':a136_0x2a095b(0xca),'description':'Async\x20operation\x20id\x20returned\x20by\x20page\x20generate-start'},{'name':a136_0x2a095b(0xd3),'type':a136_0x2a095b(0xca),'description':'Client\x20recovery/idempotency\x20id\x20when\x20operationId\x20is\x20unavailable\x20or\x20lost'}],async 'validate'(_0x35a19a){validateDatasetSelector(_0x35a19a),validateGenerateOperationSelector(_0x35a19a);},async 'dryRun'(_0x331a82){const _0x1ee4bb=a136_0x2a095b,_0x462dbe=await loadDatasetDetailForPage(_0x331a82),_0x1d9f0a=_0x331a82['str'](_0x1ee4bb(0xd1)),_0x53024c=_0x331a82[_0x1ee4bb(0xc7)](_0x1ee4bb(0xad)),_0x34bcb6=_0x331a82[_0x1ee4bb(0xc7)](_0x1ee4bb(0xd3)),_0x2369e4=new URLSearchParams({'appCode':_0x331a82['appCode']});return _0x1d9f0a&&_0x2369e4[_0x1ee4bb(0xb7)]('taskId',_0x1d9f0a),_0x53024c&&_0x2369e4[_0x1ee4bb(0xb7)](_0x1ee4bb(0xba),_0x53024c),_0x34bcb6&&_0x2369e4['set'](_0x1ee4bb(0xac),_0x34bcb6),{'method':_0x1ee4bb(0xc8),'url':_0x1ee4bb(0xae)+_0x462dbe[_0x1ee4bb(0xd2)]+'/generate-standard-pages/status?'+_0x2369e4[_0x1ee4bb(0xab)](),'description':serializeDryRunDescription({'dataset':{'id':_0x462dbe['id'],'code':_0x462dbe[_0x1ee4bb(0xd2)],'name':_0x462dbe['name']},'action':_0x1ee4bb(0xb8),'taskId':_0x1d9f0a||undefined,'operationId':_0x53024c||undefined,'clientOperationId':_0x34bcb6||undefined})};},async 'execute'(_0x2f0081){const _0x10f4b0=a136_0x2a095b,_0x45af33=await loadDatasetDetailForPage(_0x2f0081),_0x2edb83=_0x2f0081[_0x10f4b0(0xc7)]('task-id'),_0x4fd51c=_0x2f0081[_0x10f4b0(0xc7)]('operation-id'),_0x6e3f8=_0x2f0081[_0x10f4b0(0xc7)](_0x10f4b0(0xd3)),_0x2cf68b=await getGenerateStandardPagesStatus(_0x2f0081[_0x10f4b0(0xcd)],_0x45af33['code'],{'taskId':_0x2edb83||undefined,'operationId':_0x4fd51c||undefined,'clientOperationId':_0x6e3f8||undefined}),_0x247ee2=_0x2cf68b[_0x10f4b0(0xb0)]===_0x10f4b0(0xb5)||_0x2cf68b[_0x10f4b0(0xb0)]==='PARTIAL_SUCCESS',_0x4affc1=_0x247ee2?await loadStandardPageStatusForGenerate(_0x2f0081,_0x45af33[_0x10f4b0(0xd2)]):null,_0x88ab8=assessGenerateOperationState(_0x45af33[_0x10f4b0(0xd2)],_0x2cf68b[_0x10f4b0(0xb0)],_0x4affc1),_0x23c95d=_0x2cf68b[_0x10f4b0(0xbb)]??_0x2edb83??undefined,_0x44be3b=_0x2cf68b['operationId']??_0x4fd51c??undefined,_0x125f0f=_0x2cf68b[_0x10f4b0(0xac)]??_0x6e3f8??undefined;return{'ok':!![],'message':_0x88ab8[_0x10f4b0(0xb0)]===_0x10f4b0(0xb9)?_0x2cf68b['errorMsg']||_0x88ab8[_0x10f4b0(0xcb)]:_0x88ab8['message'],'data':{'datasetCode':_0x45af33['code'],'appCode':_0x2f0081['appCode'],'taskId':_0x23c95d,'operationId':_0x44be3b,'clientOperationId':_0x125f0f,'jobStatus':_0x2cf68b[_0x10f4b0(0xb0)]??null,'progressRate':typeof _0x2cf68b[_0x10f4b0(0xbd)]==='number'?_0x2cf68b[_0x10f4b0(0xbd)]:null,'currentStep':_0x2cf68b[_0x10f4b0(0xcf)]??null,'errorMsg':_0x2cf68b[_0x10f4b0(0xd0)]??null,'status':_0x88ab8['status'],'manualResolutionRequired':_0x88ab8[_0x10f4b0(0xb3)],'nextAction':_0x88ab8[_0x10f4b0(0xaa)],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x45af33[_0x10f4b0(0xd2)],{'appCode':_0x2f0081[_0x10f4b0(0xcd)],'taskId':_0x23c95d,'operationId':_0x44be3b,'clientOperationId':_0x125f0f})},'standardPageStatus':_0x4affc1,'result':_0x2cf68b[_0x10f4b0(0xa9)]??null}};}};function a136_0x3430(){const _0x55d924=['str','GET','1QvsZme','string','message','Generic\x20task\x20id\x20returned\x20by\x20page\x20generate-start','appCode','182qobkfp','currentStep','errorMsg','task-id','code','client-operation-id','read','result','nextAction','toString','clientOperationId','operation-id','/smartapi/lovrabet/dataset/','25pZdjdd','status','compress','300xypXdL','manualResolutionRequired','Query\x20Smart\x20List\x20Page\x20generate\x20operation\x20status','SUCCESS','12GYbgFv','set','query-generate-operation-status','operation_failed','operationId','taskId','page','progressRate','612cIrzRd','742814nlhhAR','6276137kLSMic','1097778dQBZKg','143932GeaKQm','462957FfBniQ','57704IIplrJ','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','818904qYjKYQ'];a136_0x3430=function(){return _0x55d924;};return a136_0x3430();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a137_0x4302(){const _0x2d05b0=['8224456nKDlnm','13303670kElQaq','6iQVhYO','7BjWTfh','1039692OpaAhX','352700hwAlHQ','864MlyrvJ','9ubKVoG','3377730QtmwiM','2659936fmbrfj','1RhNQCc','772937kHbuKw'];a137_0x4302=function(){return _0x2d05b0;};return a137_0x4302();}function a137_0x1f2b(_0xd88baa,_0x198c05){_0xd88baa=_0xd88baa-0x139;const _0x43026d=a137_0x4302();let _0x1f2b5a=_0x43026d[_0xd88baa];return _0x1f2b5a;}(function(_0xefeb57,_0x451241){const _0xe47fd6=a137_0x1f2b,_0x5d999a=_0xefeb57();while(!![]){try{const _0x1f6250=parseInt(_0xe47fd6(0x142))/0x1*(-parseInt(_0xe47fd6(0x13d))/0x2)+-parseInt(_0xe47fd6(0x13a))/0x3*(parseInt(_0xe47fd6(0x141))/0x4)+-parseInt(_0xe47fd6(0x140))/0x5+parseInt(_0xe47fd6(0x13c))/0x6+parseInt(_0xe47fd6(0x13b))/0x7*(-parseInt(_0xe47fd6(0x144))/0x8)+parseInt(_0xe47fd6(0x13f))/0x9*(-parseInt(_0xe47fd6(0x139))/0xa)+-parseInt(_0xe47fd6(0x143))/0xb*(-parseInt(_0xe47fd6(0x13e))/0xc);if(_0x1f6250===_0x451241)break;else _0x5d999a['push'](_0x5d999a['shift']());}catch(_0x4b6296){_0x5d999a['push'](_0x5d999a['shift']());}}}(a137_0x4302,0xa8ffa));import{pageGenerateStart}from'../../commands/page/generate-start.js';import{pageGenerateStatus}from'../../commands/page/generate-status.js';import{pageStandardPageStatus}from'../../commands/page/standard-page-status.js';import{pageSync}from'../../commands/page/sync.js';import{pagePull}from'../../commands/page/pull.js';import{pagePush}from'../../commands/page/push.js';import{pageRelationAudit}from'../../commands/page/relation-audit.js';import{pageRestore}from'../../commands/page/restore.js';import{pageReactCreate}from'../../commands/page/react/create.js';import{pageReactDetail}from'../../commands/page/react/detail.js';import{pageReactList}from'../../commands/page/react/list.js';import{pageReactPublish}from'../../commands/page/react/publish.js';import{pageReactUpdate}from'../../commands/page/react/update.js';export const pageDefinitions=[pageGenerateStart,pageGenerateStatus,pageStandardPageStatus,pageRelationAudit,pageSync,pagePull,pagePush,pageRestore,pageReactCreate,pageReactList,pageReactDetail,pageReactPublish,pageReactUpdate];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a138_0x1d2317=a138_0x57f4;(function(_0x5cdea8,_0x5570eb){const _0x511a2f=a138_0x57f4,_0x20bf3f=_0x5cdea8();while(!![]){try{const _0x1dbf42=-parseInt(_0x511a2f(0xad))/0x1+-parseInt(_0x511a2f(0x8d))/0x2*(parseInt(_0x511a2f(0xb9))/0x3)+-parseInt(_0x511a2f(0xb6))/0x4+-parseInt(_0x511a2f(0xb8))/0x5+parseInt(_0x511a2f(0xa6))/0x6*(parseInt(_0x511a2f(0x96))/0x7)+-parseInt(_0x511a2f(0x91))/0x8*(-parseInt(_0x511a2f(0x94))/0x9)+parseInt(_0x511a2f(0x8f))/0xa;if(_0x1dbf42===_0x5570eb)break;else _0x20bf3f['push'](_0x20bf3f['shift']());}catch(_0x4efe56){_0x20bf3f['push'](_0x20bf3f['shift']());}}}(a138_0x1657,0xdce5d));import{writeFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getPageIdFlag,loadDatasetDetailForPage,loadPageDetailForPage,selectVersionTagGroup,serializeDryRunDescription,validatePageTargetSelector}from'../../commands/page/shared.js';import{computePageContentHash,computePageFileHash,serializePageSchemaForFile}from'../../core/page/hash.js';import{ensureParentDirectory,fileExists,loadPageProjectConfig,resolvePageFilePath}from'../../core/page/file-system.js';import{createEmptyPageLock,ensurePageLockScope,readPageLockFile,writePageLockFile}from'../../core/page/lock.js';import{CliErrors}from'../../errors.js';export const pagePull={'service':a138_0x1d2317(0x8e),'command':a138_0x1d2317(0xa3),'description':a138_0x1d2317(0xbf),'risk':'read','defaultOutputFormat':a138_0x1d2317(0xc3),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'id','type':'number','description':a138_0x1d2317(0xaa)},DATASETCODE_FLAG_OPTIONAL,{'name':a138_0x1d2317(0xa0),'type':a138_0x1d2317(0xc2),'description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'},{'name':'version-tag','type':'string','description':a138_0x1d2317(0xc1)},{'name':'force','type':a138_0x1d2317(0x92),'description':a138_0x1d2317(0xa7)}],async 'validate'(_0x7a9c7b){validatePageTargetSelector(_0x7a9c7b);},async 'dryRun'(_0x574eed){const _0x33e800=a138_0x1d2317,_0x2ec7b5=await buildPullPlan(_0x574eed);return{'method':_0x33e800(0xac),'url':_0x2ec7b5[_0x33e800(0x9f)]===_0x33e800(0x95)?_0x33e800(0x98)+(_0x2ec7b5[_0x33e800(0x9d)][0x0]?.[_0x33e800(0xc0)]['pageId']??''):_0x33e800(0xa9),'body':{'appCode':_0x574eed[_0x33e800(0xa5)],'mode':_0x2ec7b5[_0x33e800(0x9f)],'targetDatasetCode':_0x2ec7b5['datasetCode']??null,'pages':_0x2ec7b5[_0x33e800(0x9d)][_0x33e800(0xaf)](toPreviewItem)},'description':serializeDryRunDescription({'mode':_0x2ec7b5[_0x33e800(0x9f)],'datasetCode':_0x2ec7b5['datasetCode']??null,'totalCandidates':_0x2ec7b5['items'][_0x33e800(0xba)],'totalWouldPull':_0x2ec7b5[_0x33e800(0x9d)]['filter'](_0x32acfb=>_0x32acfb['status']===_0x33e800(0xb7))[_0x33e800(0xba)],'totalConflicts':_0x2ec7b5[_0x33e800(0x9d)]['filter'](_0x22e782=>_0x22e782[_0x33e800(0xb2)]==='conflict')[_0x33e800(0xba)]})};},async 'execute'(_0x3c989f){const _0x432017=a138_0x1d2317,_0x5861be=loadPageProjectConfig(_0x3c989f[_0x432017(0xa5)]),_0x1558cb=await readPageLockFile(_0x5861be[_0x432017(0xb5)]),{lockData:_0x57e880,appLock:_0x35c6d7}=ensurePageLockScope(_0x1558cb??createEmptyPageLock(),_0x3c989f[_0x432017(0xa5)]),_0x493637=await buildPullPlan(_0x3c989f),_0x5ba1d5=_0x3c989f[_0x432017(0xb1)](_0x432017(0x8a));if(_0x493637[_0x432017(0x9f)]===_0x432017(0x95)&&_0x493637[_0x432017(0x9d)][0x0]?.[_0x432017(0xb2)]===_0x432017(0x8c)&&!_0x5ba1d5)throw CliErrors[_0x432017(0xa1)]('Local\x20page\x20file\x20has\x20unsynced\x20changes:\x20'+_0x493637['items'][0x0][_0x432017(0xa2)],'Use\x20--force\x20to\x20overwrite\x20local\x20changes.');const _0x1f6308=[],_0x3b0bef=[];for(const _0x31b996 of _0x493637[_0x432017(0x9d)]){if(_0x31b996[_0x432017(0xb2)]===_0x432017(0x8c)&&!_0x5ba1d5){_0x3b0bef[_0x432017(0x97)]({'pageId':_0x31b996['detail'][_0x432017(0xb3)],'type':_0x31b996[_0x432017(0xc0)]['type'],'title':_0x31b996[_0x432017(0xc0)][_0x432017(0xa8)],'localPath':_0x31b996[_0x432017(0xa2)],'reason':_0x31b996[_0x432017(0xb0)]??_0x432017(0x9e)});continue;}await ensureParentDirectory(_0x31b996[_0x432017(0xa2)]);const _0x44244f=serializePageSchemaForFile(_0x31b996[_0x432017(0xc0)][_0x432017(0x9b)]);await writeFile(_0x31b996[_0x432017(0xa2)],_0x44244f,_0x432017(0xbe)),_0x35c6d7[_0x432017(0xbc)][String(_0x31b996[_0x432017(0xc0)][_0x432017(0xb3)])]=buildLockEntry(_0x31b996['detail'],_0x44244f),_0x1f6308[_0x432017(0x97)]({'pageId':_0x31b996['detail'][_0x432017(0xb3)],'type':_0x31b996['detail'][_0x432017(0x9a)],'title':_0x31b996[_0x432017(0xc0)][_0x432017(0xa8)],'localPath':_0x31b996['localPath']});}return _0x35c6d7[_0x432017(0x8b)]=new Date()[_0x432017(0x93)](),await writePageLockFile(_0x5861be['lockFilePath'],_0x57e880),{'ok':!![],'message':'拉取完成:\x20'+_0x1f6308['length']+_0x432017(0xa4)+_0x3b0bef[_0x432017(0xba)]+_0x432017(0xbd),'data':{'appCode':_0x3c989f[_0x432017(0xa5)],'pulledPages':_0x1f6308,'skippedPages':_0x3b0bef,'totalPulled':_0x1f6308[_0x432017(0xba)],'totalSkipped':_0x3b0bef[_0x432017(0xba)]}};}};function a138_0x57f4(_0x353d64,_0x10c347){_0x353d64=_0x353d64-0x8a;const _0x165769=a138_0x1657();let _0x57f4ef=_0x165769[_0x353d64];return _0x57f4ef;}async function buildPullPlan(_0x250500){const _0x34146e=a138_0x1d2317,_0x4d9414=loadPageProjectConfig(_0x250500[_0x34146e(0xa5)]),_0x2bd570=await readPageLockFile(_0x4d9414[_0x34146e(0xb5)]),{appLock:_0x339704}=ensurePageLockScope(_0x2bd570??createEmptyPageLock(),_0x250500[_0x34146e(0xa5)]),_0x4396c2=getPageIdFlag(_0x250500);if(_0x4396c2!==undefined){const _0x39cab7=await loadPageDetailForPage(_0x250500,_0x4396c2);return{'mode':_0x34146e(0x95),'items':[await inspectPullTarget(_0x4d9414,_0x339704[_0x34146e(0xbc)][String(_0x39cab7[_0x34146e(0xb3)])],_0x39cab7)]};}const _0x1d8833=await loadDatasetDetailForPage(_0x250500),_0x159ff0=_0x1d8833[_0x34146e(0x9c)][_0x34146e(0xbb)](_0x4a46b2=>!_0x4a46b2['deleted']);if(_0x159ff0[_0x34146e(0xba)]===0x0)throw CliErrors['validation'](_0x34146e(0x90)+_0x1d8833[_0x34146e(0x9b)]+_0x34146e(0xae));const _0x4115ce=await Promise[_0x34146e(0x99)](_0x159ff0[_0x34146e(0xaf)](_0x5a53ea=>loadPageDetailForPage(_0x250500,_0x5a53ea['id']))),_0x2e3b64=selectVersionTagGroup(_0x4115ce,_0x4e661d=>_0x4e661d['versionTag'],_0x250500['str']('version-tag'));return{'mode':_0x34146e(0xb4),'datasetCode':_0x1d8833[_0x34146e(0x9b)],'items':await Promise[_0x34146e(0x99)](_0x2e3b64[_0x34146e(0x9d)]['map'](_0x4f3ff2=>inspectPullTarget(_0x4d9414,_0x339704[_0x34146e(0xbc)][String(_0x4f3ff2[_0x34146e(0xb3)])],_0x4f3ff2)))};}async function inspectPullTarget(_0x1d5da2,_0x592d43,_0x10f41b){const _0x672d45=a138_0x1d2317,_0x3a01c8=resolvePageFilePath(_0x1d5da2,_0x10f41b['pageId'],_0x10f41b[_0x672d45(0x9a)]),_0x32e30f=await fileExists(_0x3a01c8);if(!_0x32e30f){const _0x20a440=serializePageSchemaForFile(_0x10f41b['code']);return{'detail':_0x10f41b,'localPath':_0x3a01c8,'localHash':computePageContentHash(_0x20a440),'status':_0x672d45(0xb7)};}const _0x284610=await computePageFileHash(_0x3a01c8);if(!_0x592d43||_0x284610!==_0x592d43['hash'])return{'detail':_0x10f41b,'localPath':_0x3a01c8,'localHash':_0x284610,'status':_0x672d45(0x8c),'reason':_0x672d45(0x9e)};return{'detail':_0x10f41b,'localPath':_0x3a01c8,'localHash':_0x284610,'status':_0x672d45(0xb7)};}function buildLockEntry(_0x45c90a,_0x39fa17){const _0x2b94c8=a138_0x1d2317;return{'hash':computePageContentHash(_0x39fa17),'pageId':_0x45c90a[_0x2b94c8(0xb3)],'pageVersion':_0x45c90a[_0x2b94c8(0xab)],'type':_0x45c90a['type'],'title':_0x45c90a['name'],'datasetIds':_0x45c90a['datasetIds'],'versionTag':_0x45c90a['versionTag']};}function a138_0x1657(){const _0x467013=['GET','1089549DVNlNN','\x22\x20has\x20no\x20undeleted\x20related\x20pages.','map','reason','bool','status','pageId','batch','lockFilePath','6673340SVZQPa','would_pull','8934490CkuLXK','1569CSNZSI','length','filter','pages','\x20skipped','utf8','Pull\x20page\x20schema\x20to\x20local\x20files','detail','Page\x20group\x20version\x20tag\x20(batch\x20mode\x20only)','string','compress','force','lastSync','conflict','5346kKFyDl','page','64194380EJRjtI','Dataset\x20\x22','8kulbfx','boolean','toISOString','3201921BFViGC','single','63qOXQpb','push','/smartapi/lovrabet/detail?pageId=','all','type','code','relatedPages','items','local\x20unsynced\x20changes','mode','alias','validation','localPath','pull','\x20pulled,\x20','appCode','48234WXNBzt','Overwrite\x20local\x20files\x20even\x20when\x20unsynced\x20local\x20changes\x20exist','name','/smartapi/lovrabet/detail\x20(per\x20selected\x20page)','Page\x20ID','pageVersion'];a138_0x1657=function(){return _0x467013;};return a138_0x1657();}function toPreviewItem(_0x43d169){const _0x1ca6b8=a138_0x1d2317;return{'pageId':_0x43d169[_0x1ca6b8(0xc0)]['pageId'],'type':_0x43d169[_0x1ca6b8(0xc0)][_0x1ca6b8(0x9a)],'title':_0x43d169[_0x1ca6b8(0xc0)][_0x1ca6b8(0xa8)],'localPath':_0x43d169[_0x1ca6b8(0xa2)],'status':_0x43d169[_0x1ca6b8(0xb2)],..._0x43d169['reason']?{'reason':_0x43d169[_0x1ca6b8(0xb0)]}:{}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a139_0x388a(){const _0x360e72=['2361786LfdUhW','alias','batch','localContent','推送失败','compress','write','status','\x20has\x20changed\x20since\x20last\x20pull.','Remote\x20page\x20','validation','lastSync','versionTag','apiError','38NVglwm','remote\x20schema\x20changed','type','deleted','Local\x20file\x20not\x20found:\x20','remote\x20pageVersion\x20changed','candidates','parse','推送成功,服务端已规范化\x20schema','unchanged','blocked','items','推送成功','pages','all','hash','remoteDetail','pageVersion','localPath','str','no\x20changes','mode','relatedPages','Page\x20ID','values','map','local\x20JSON\x20is\x20invalid','\x20page\x20pull\x20--id\x20','Page\x20update\x20failed:\x20','datasetId','136QuYVrp','push','conflict','includes','22JkHOub','703572CWiCWO','pageId','Page\x20','1542cUbHII','datasetCode','string','name','message','\x20page\x20pull\x20--datasetcode\x20','page','Push\x20local\x20page\x20schema\x20back\x20to\x20remote','datasetIds','UNKNOWN','utf8','single','version-tag','nextLockEntry','64880pxctMA','title','filter','page-','`\x20first','Page\x20group\x20version\x20tag\x20(batch\x20mode\x20only)','`\x20first.','297ijZroo','appCode','number','3147865cBJxMf','toISOString','reason','45971GkDqTC','8bLaWTt','Run\x20`','length','code','/smartapi/lovrabet/update-page','lockFilePath','2038490ZpREuH','部分页面推送失败'];a139_0x388a=function(){return _0x360e72;};return a139_0x388a();}const a139_0x32b9cc=a139_0x38f9;(function(_0x8b4c53,_0x3881bd){const _0x42863c=a139_0x38f9,_0x3194f9=_0x8b4c53();while(!![]){try{const _0x40e8cb=parseInt(_0x42863c(0x201))/0x1*(-parseInt(_0x42863c(0x1c0))/0x2)+-parseInt(_0x42863c(0x1e6))/0x3*(parseInt(_0x42863c(0x1de))/0x4)+parseInt(_0x42863c(0x208))/0x5+parseInt(_0x42863c(0x20a))/0x6+parseInt(_0x42863c(0x1fe))/0x7*(parseInt(_0x42863c(0x202))/0x8)+parseInt(_0x42863c(0x1fb))/0x9*(parseInt(_0x42863c(0x1f4))/0xa)+-parseInt(_0x42863c(0x1e2))/0xb*(parseInt(_0x42863c(0x1e3))/0xc);if(_0x40e8cb===_0x3881bd)break;else _0x3194f9['push'](_0x3194f9['shift']());}catch(_0x18f1bc){_0x3194f9['push'](_0x3194f9['shift']());}}}(a139_0x388a,0x6f8ed));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';function a139_0x38f9(_0xe354ee,_0x544a11){_0xe354ee=_0xe354ee-0x1bb;const _0x388a52=a139_0x388a();let _0x38f9f8=_0x388a52[_0xe354ee];return _0x38f9f8;}import{getPageIdFlag,loadDatasetDetailForPage,loadPageDetailForPage,selectVersionTagGroup,serializeDryRunDescription,validatePageTargetSelector}from'../../commands/page/shared.js';import{updatePage}from'../../core/api-client.js';import{computePageContentHash,computePageFileHash,computeSerializedSchemaHash,serializePageSchemaForFile}from'../../core/page/hash.js';import{fileExists,loadPageProjectConfig,resolvePageFilePath}from'../../core/page/file-system.js';import{createEmptyPageLock,ensurePageLockScope,readPageLockFile,writePageLockFile}from'../../core/page/lock.js';import{CliErrors}from'../../errors.js';export const pagePush={'service':a139_0x32b9cc(0x1ec),'command':a139_0x32b9cc(0x1df),'description':a139_0x32b9cc(0x1ed),'risk':a139_0x32b9cc(0x210),'defaultOutputFormat':a139_0x32b9cc(0x20f),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'id','type':a139_0x32b9cc(0x1fd),'description':a139_0x32b9cc(0x1d7)},DATASETCODE_FLAG_OPTIONAL,{'name':a139_0x32b9cc(0x20b),'type':a139_0x32b9cc(0x1e8),'description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'},{'name':a139_0x32b9cc(0x1f2),'type':a139_0x32b9cc(0x1e8),'description':a139_0x32b9cc(0x1f9)}],async 'validate'(_0x1d27a8){validatePageTargetSelector(_0x1d27a8);},async 'dryRun'(_0x20ffe0){const _0x5d3bc9=a139_0x32b9cc,_0x5926a4=await buildPushPreview(_0x20ffe0);return{'method':'POST','url':_0x5d3bc9(0x206),'body':{'appCode':_0x20ffe0[_0x5d3bc9(0x1fc)],'mode':_0x5926a4[_0x5d3bc9(0x1d5)],'datasetCode':_0x5926a4[_0x5d3bc9(0x1e7)]??null,'pages':_0x5926a4[_0x5d3bc9(0x1cb)]},'description':serializeDryRunDescription({'mode':_0x5926a4[_0x5d3bc9(0x1d5)],'datasetCode':_0x5926a4[_0x5d3bc9(0x1e7)]??null,'totalWouldPush':_0x5926a4[_0x5d3bc9(0x1cb)]['filter'](_0x405f74=>_0x405f74[_0x5d3bc9(0x211)]==='would_push')[_0x5d3bc9(0x204)],'totalUnchanged':_0x5926a4[_0x5d3bc9(0x1cb)][_0x5d3bc9(0x1f6)](_0x166261=>_0x166261['status']===_0x5d3bc9(0x1c9))['length'],'totalConflicts':_0x5926a4['items'][_0x5d3bc9(0x1f6)](_0x42c166=>_0x42c166[_0x5d3bc9(0x211)]===_0x5d3bc9(0x1e0)||_0x42c166[_0x5d3bc9(0x211)]===_0x5d3bc9(0x1ca))[_0x5d3bc9(0x204)]})};},async 'execute'(_0x3bd8a9){const _0x1bc49e=a139_0x32b9cc,_0xf87e1f=loadPageProjectConfig(_0x3bd8a9[_0x1bc49e(0x1fc)]),_0x4d3cb3=await readPageLockFile(_0xf87e1f[_0x1bc49e(0x207)]),{lockData:_0x37c9c0,appLock:_0x1f3bde}=ensurePageLockScope(_0x4d3cb3??createEmptyPageLock(),_0x3bd8a9[_0x1bc49e(0x1fc)]),_0x2e98db=getPageIdFlag(_0x3bd8a9);if(_0x2e98db!==undefined){const _0x4dd692=await prepareSinglePush(_0x3bd8a9,_0xf87e1f,_0x1f3bde[_0x1bc49e(0x1cd)][String(_0x2e98db)],_0x2e98db),_0x51436a=await pushPreparedPage(_0x3bd8a9,_0x4dd692);return _0x1f3bde[_0x1bc49e(0x1cd)][String(_0x51436a[_0x1bc49e(0x1e4)])]=_0x51436a[_0x1bc49e(0x1f3)],_0x1f3bde[_0x1bc49e(0x1bd)]=new Date()[_0x1bc49e(0x1ff)](),await writePageLockFile(_0xf87e1f['lockFilePath'],_0x37c9c0),{'ok':!![],'message':_0x51436a['normalized']?_0x1bc49e(0x1c8):_0x1bc49e(0x1cc),'data':{'appCode':_0x3bd8a9[_0x1bc49e(0x1fc)],'pushedPages':[{'pageId':_0x51436a[_0x1bc49e(0x1e4)],'type':_0x51436a[_0x1bc49e(0x1c2)],'title':_0x51436a[_0x1bc49e(0x1f5)],'normalized':_0x51436a['normalized']}],'skippedPages':[],'failedPages':[],'totalPushed':0x1,'totalSkipped':0x0,'totalFailed':0x0}};}const _0x57b3fb=await buildBatchPushPlan(_0x3bd8a9,_0x1f3bde[_0x1bc49e(0x1cd)]),_0x145508=[],_0x14b824=[],_0xfe72cc=[];for(const _0x1b162d of _0x57b3fb[_0x1bc49e(0x1c9)]){_0x14b824[_0x1bc49e(0x1df)](_0x1b162d);}for(const _0xce08c of _0x57b3fb[_0x1bc49e(0x1c6)]){try{const _0x3101ff=await prepareSinglePush(_0x3bd8a9,_0xf87e1f,_0x1f3bde[_0x1bc49e(0x1cd)][String(_0xce08c['pageId'])],_0xce08c['pageId'],_0x57b3fb[_0x1bc49e(0x1dd)]),_0xba86af=await pushPreparedPage(_0x3bd8a9,_0x3101ff);_0x1f3bde[_0x1bc49e(0x1cd)][String(_0xba86af[_0x1bc49e(0x1e4)])]=_0xba86af[_0x1bc49e(0x1f3)],_0x145508[_0x1bc49e(0x1df)]({'pageId':_0xba86af[_0x1bc49e(0x1e4)],'type':_0xba86af['type'],'title':_0xba86af[_0x1bc49e(0x1f5)],'normalized':_0xba86af['normalized']});}catch(_0x24efbd){_0xfe72cc[_0x1bc49e(0x1df)]({'pageId':_0xce08c[_0x1bc49e(0x1e4)],'type':_0xce08c[_0x1bc49e(0x1c2)],'title':_0xce08c[_0x1bc49e(0x1f5)],'reason':_0x24efbd instanceof Error?_0x24efbd[_0x1bc49e(0x1ea)]:String(_0x24efbd)});}}return _0x1f3bde[_0x1bc49e(0x1bd)]=new Date()['toISOString'](),await writePageLockFile(_0xf87e1f[_0x1bc49e(0x207)],_0x37c9c0),{'ok':_0xfe72cc[_0x1bc49e(0x204)]===0x0||_0x145508[_0x1bc49e(0x204)]>0x0||_0x14b824[_0x1bc49e(0x204)]>0x0,'message':_0xfe72cc[_0x1bc49e(0x204)]>0x0&&_0x145508[_0x1bc49e(0x204)]>0x0?_0x1bc49e(0x209):_0x145508[_0x1bc49e(0x204)]>0x0?_0x1bc49e(0x1cc):_0x14b824[_0x1bc49e(0x204)]>0x0&&_0xfe72cc[_0x1bc49e(0x204)]===0x0?'无变更需要推送':_0xfe72cc[0x0]?.[_0x1bc49e(0x200)]||_0x1bc49e(0x20e),'data':{'appCode':_0x3bd8a9[_0x1bc49e(0x1fc)],'pushedPages':_0x145508,'skippedPages':_0x14b824,'failedPages':_0xfe72cc,'totalPushed':_0x145508[_0x1bc49e(0x204)],'totalSkipped':_0x14b824[_0x1bc49e(0x204)],'totalFailed':_0xfe72cc[_0x1bc49e(0x204)]}};}};async function buildPushPreview(_0x5a2ab8){const _0x5b0a15=a139_0x32b9cc,_0x823bac=loadPageProjectConfig(_0x5a2ab8[_0x5b0a15(0x1fc)]),_0x2718ef=await readPageLockFile(_0x823bac[_0x5b0a15(0x207)]),{appLock:_0x476dfa}=ensurePageLockScope(_0x2718ef??createEmptyPageLock(),_0x5a2ab8['appCode']),_0x2c4e3c=getPageIdFlag(_0x5a2ab8);if(_0x2c4e3c!==undefined)return{'mode':_0x5b0a15(0x1f1),'items':[await inspectPushPage(_0x5a2ab8,_0x823bac,_0x476dfa[_0x5b0a15(0x1cd)][String(_0x2c4e3c)],_0x2c4e3c)]};const _0x4a83ca=await buildBatchPushPlan(_0x5a2ab8,_0x476dfa[_0x5b0a15(0x1cd)]);return{'mode':_0x5b0a15(0x20c),'datasetCode':_0x4a83ca[_0x5b0a15(0x1e7)],'items':[..._0x4a83ca[_0x5b0a15(0x1c9)]['map'](_0x336e58=>({'pageId':_0x336e58['pageId'],'type':_0x336e58[_0x5b0a15(0x1c2)],'title':_0x336e58[_0x5b0a15(0x1f5)],'localPath':_0x336e58[_0x5b0a15(0x1d2)],'status':_0x5b0a15(0x1c9),'reason':_0x336e58['reason']})),...await Promise[_0x5b0a15(0x1ce)](_0x4a83ca[_0x5b0a15(0x1c6)][_0x5b0a15(0x1d9)](_0x18c413=>inspectPushPage(_0x5a2ab8,_0x823bac,_0x476dfa[_0x5b0a15(0x1cd)][String(_0x18c413[_0x5b0a15(0x1e4)])],_0x18c413[_0x5b0a15(0x1e4)],_0x4a83ca['datasetId'])))]};}async function buildBatchPushPlan(_0x4373e1,_0x13099e){const _0x24a231=a139_0x32b9cc,_0x185900=loadPageProjectConfig(_0x4373e1[_0x24a231(0x1fc)]),_0x4b69af=await loadDatasetDetailForPage(_0x4373e1),_0x4cab6d=_0x4b69af['id'],_0x2b2bc9=new Set(_0x4b69af[_0x24a231(0x1d6)][_0x24a231(0x1f6)](_0x320b12=>!_0x320b12[_0x24a231(0x1c3)])[_0x24a231(0x1d9)](_0x23ecdd=>_0x23ecdd['id'])),_0x293e6e=Object[_0x24a231(0x1d8)](_0x13099e)[_0x24a231(0x1f6)](_0x3faefa=>_0x3faefa[_0x24a231(0x1ee)]['includes'](_0x4cab6d)&&_0x2b2bc9['has'](_0x3faefa[_0x24a231(0x1e4)]));if(_0x293e6e[_0x24a231(0x204)]===0x0)throw CliErrors['validation']('No\x20local\x20pages\x20found\x20for\x20dataset\x20\x22'+_0x4b69af[_0x24a231(0x205)]+'\x22.',_0x24a231(0x203)+CLI_BIN_NAME+_0x24a231(0x1eb)+_0x4b69af[_0x24a231(0x205)]+_0x24a231(0x1fa));const _0x5beb98=selectVersionTagGroup(_0x293e6e,_0x19c2b8=>_0x19c2b8[_0x24a231(0x1be)]??null,_0x4373e1[_0x24a231(0x1d3)](_0x24a231(0x1f2))),_0x9bcf2b=[],_0x4996d8=[];for(const _0x2ea850 of _0x5beb98[_0x24a231(0x1cb)]){const _0x5a4b2f=resolvePageFilePath(_0x185900,_0x2ea850['pageId'],_0x2ea850['type']);if(!await fileExists(_0x5a4b2f)){_0x9bcf2b['push']({'pageId':_0x2ea850[_0x24a231(0x1e4)],'type':_0x2ea850[_0x24a231(0x1c2)],'title':_0x2ea850[_0x24a231(0x1f5)]});continue;}const _0x258add=await computePageFileHash(_0x5a4b2f);if(_0x258add===_0x2ea850[_0x24a231(0x1cf)]){_0x4996d8[_0x24a231(0x1df)]({'pageId':_0x2ea850['pageId'],'type':_0x2ea850[_0x24a231(0x1c2)],'title':_0x2ea850[_0x24a231(0x1f5)],'localPath':_0x5a4b2f,'reason':'no\x20changes'});continue;}_0x9bcf2b[_0x24a231(0x1df)]({'pageId':_0x2ea850[_0x24a231(0x1e4)],'type':_0x2ea850['type'],'title':_0x2ea850[_0x24a231(0x1f5)]});}return{'datasetCode':_0x4b69af[_0x24a231(0x205)],'datasetId':_0x4cab6d,'candidates':_0x9bcf2b,'unchanged':_0x4996d8};}async function inspectPushPage(_0x307c26,_0x1756df,_0x19d320,_0x4533ff,_0x10c334){const _0x57c13e=a139_0x32b9cc;if(!_0x19d320)return{'pageId':_0x4533ff,'type':'UNKNOWN','title':_0x57c13e(0x1f7)+_0x4533ff,'localPath':resolvePageFilePath(_0x1756df,_0x4533ff,_0x57c13e(0x1ef)),'status':_0x57c13e(0x1ca),'reason':'Run\x20`'+CLI_BIN_NAME+_0x57c13e(0x1db)+_0x4533ff+_0x57c13e(0x1f8)};const _0x36016d=resolvePageFilePath(_0x1756df,_0x4533ff,_0x19d320[_0x57c13e(0x1c2)]);if(!await fileExists(_0x36016d))return{'pageId':_0x4533ff,'type':_0x19d320[_0x57c13e(0x1c2)],'title':_0x19d320[_0x57c13e(0x1f5)],'localPath':_0x36016d,'status':_0x57c13e(0x1ca),'reason':_0x57c13e(0x1c4)+_0x36016d};const _0x35522a=await readFile(_0x36016d,'utf8');try{JSON['parse'](_0x35522a);}catch{return{'pageId':_0x4533ff,'type':_0x19d320[_0x57c13e(0x1c2)],'title':_0x19d320[_0x57c13e(0x1f5)],'localPath':_0x36016d,'status':_0x57c13e(0x1ca),'reason':_0x57c13e(0x1da)};}const _0x107d99=computePageContentHash(_0x35522a);if(_0x107d99===_0x19d320[_0x57c13e(0x1cf)])return{'pageId':_0x4533ff,'type':_0x19d320[_0x57c13e(0x1c2)],'title':_0x19d320[_0x57c13e(0x1f5)],'localPath':_0x36016d,'status':_0x57c13e(0x1c9),'reason':_0x57c13e(0x1d4)};try{const _0x16b93a=await loadPageDetailForPage(_0x307c26,_0x4533ff);if(_0x10c334!=null&&!_0x16b93a['datasetIds'][_0x57c13e(0x1e1)](_0x10c334))return{'pageId':_0x4533ff,'type':_0x19d320['type'],'title':_0x19d320['title'],'localPath':_0x36016d,'status':'conflict','reason':_0x57c13e(0x1e5)+_0x4533ff+'\x20no\x20longer\x20belongs\x20to\x20the\x20target\x20dataset'};const _0x56adae=_0x19d320[_0x57c13e(0x1d1)]!=null&&_0x16b93a[_0x57c13e(0x1d1)]!=null;if(_0x56adae&&_0x19d320[_0x57c13e(0x1d1)]!==_0x16b93a['pageVersion'])return{'pageId':_0x4533ff,'type':_0x19d320[_0x57c13e(0x1c2)],'title':_0x19d320['title'],'localPath':_0x36016d,'status':_0x57c13e(0x1e0),'reason':_0x57c13e(0x1c5)};if(!_0x56adae&&computeSerializedSchemaHash(_0x16b93a['code'])!==_0x19d320[_0x57c13e(0x1cf)])return{'pageId':_0x4533ff,'type':_0x19d320[_0x57c13e(0x1c2)],'title':_0x19d320[_0x57c13e(0x1f5)],'localPath':_0x36016d,'status':'conflict','reason':_0x57c13e(0x1c1)};}catch(_0x5f51f0){return{'pageId':_0x4533ff,'type':_0x19d320[_0x57c13e(0x1c2)],'title':_0x19d320[_0x57c13e(0x1f5)],'localPath':_0x36016d,'status':'blocked','reason':_0x5f51f0 instanceof Error?_0x5f51f0[_0x57c13e(0x1ea)]:String(_0x5f51f0)};}return{'pageId':_0x4533ff,'type':_0x19d320[_0x57c13e(0x1c2)],'title':_0x19d320[_0x57c13e(0x1f5)],'localPath':_0x36016d,'status':'would_push'};}async function prepareSinglePush(_0x1d0d2b,_0x569bc6,_0x1249ed,_0x35ffdf,_0x37ae84){const _0x296b01=a139_0x32b9cc;if(!_0x1249ed)throw CliErrors['validation']('No\x20lock\x20record\x20found\x20for\x20page\x20'+_0x35ffdf+'.',_0x296b01(0x203)+CLI_BIN_NAME+_0x296b01(0x1db)+_0x35ffdf+_0x296b01(0x1fa));const _0x4d0110=resolvePageFilePath(_0x569bc6,_0x35ffdf,_0x1249ed[_0x296b01(0x1c2)]);if(!await fileExists(_0x4d0110))throw CliErrors[_0x296b01(0x1bc)](_0x296b01(0x1c4)+_0x4d0110,_0x296b01(0x203)+CLI_BIN_NAME+_0x296b01(0x1db)+_0x35ffdf+_0x296b01(0x1fa));const _0x860827=await readFile(_0x4d0110,_0x296b01(0x1f0));try{JSON[_0x296b01(0x1c7)](_0x860827);}catch{throw CliErrors[_0x296b01(0x1bc)]('Invalid\x20JSON\x20in\x20local\x20page\x20file:\x20'+_0x4d0110);}const _0x343c5b=await loadPageDetailForPage(_0x1d0d2b,_0x35ffdf);if(_0x37ae84!=null&&!_0x343c5b[_0x296b01(0x1ee)]['includes'](_0x37ae84))throw CliErrors[_0x296b01(0x1bc)]('Page\x20'+_0x35ffdf+'\x20no\x20longer\x20belongs\x20to\x20the\x20selected\x20dataset.');const _0x5deb3f=_0x1249ed['pageVersion']!=null&&_0x343c5b[_0x296b01(0x1d1)]!=null;if(_0x5deb3f){if(_0x1249ed[_0x296b01(0x1d1)]!==_0x343c5b[_0x296b01(0x1d1)])throw CliErrors['validation'](_0x296b01(0x1bb)+_0x35ffdf+'\x20has\x20changed\x20since\x20last\x20pull.','Run\x20`'+CLI_BIN_NAME+'\x20page\x20pull\x20--id\x20'+_0x35ffdf+_0x296b01(0x1fa));}else{const _0x6a243d=computeSerializedSchemaHash(_0x343c5b[_0x296b01(0x205)]);if(_0x6a243d!==_0x1249ed[_0x296b01(0x1cf)])throw CliErrors['validation'](_0x296b01(0x1bb)+_0x35ffdf+_0x296b01(0x212),_0x296b01(0x203)+CLI_BIN_NAME+_0x296b01(0x1db)+_0x35ffdf+_0x296b01(0x1fa));}return{'lockEntry':_0x1249ed,'localPath':_0x4d0110,'localContent':_0x860827,'localHash':computePageContentHash(_0x860827),'remoteDetail':_0x343c5b};}async function pushPreparedPage(_0x6cccb5,_0x2cab3a){const _0x43feb1=a139_0x32b9cc,_0x5eaf3d=await updatePage(_0x6cccb5[_0x43feb1(0x1fc)],_0x2cab3a[_0x43feb1(0x1d0)]['pageId'],_0x2cab3a[_0x43feb1(0x20d)],_0x2cab3a['remoteDetail']['datasetIds']);if(!_0x5eaf3d)throw CliErrors[_0x43feb1(0x1bf)](_0x43feb1(0x1dc)+_0x2cab3a[_0x43feb1(0x1d0)][_0x43feb1(0x1e4)]);const _0x4318b2=await loadPageDetailForPage(_0x6cccb5,_0x2cab3a[_0x43feb1(0x1d0)][_0x43feb1(0x1e4)]),_0x253b4b=serializePageSchemaForFile(_0x4318b2['code']);return await writeFile(_0x2cab3a[_0x43feb1(0x1d2)],_0x253b4b,_0x43feb1(0x1f0)),{'pageId':_0x4318b2['pageId'],'type':_0x4318b2[_0x43feb1(0x1c2)],'title':_0x4318b2[_0x43feb1(0x1e9)],'normalized':_0x253b4b!==serializePageSchemaForFile(_0x2cab3a[_0x43feb1(0x20d)]),'nextLockEntry':{'hash':computePageContentHash(_0x253b4b),'pageId':_0x4318b2[_0x43feb1(0x1e4)],'pageVersion':_0x4318b2[_0x43feb1(0x1d1)],'type':_0x4318b2[_0x43feb1(0x1c2)],'title':_0x4318b2[_0x43feb1(0x1e9)],'datasetIds':_0x4318b2[_0x43feb1(0x1ee)],'versionTag':_0x4318b2[_0x43feb1(0x1be)]}};}
|
|
1
|
+
const a139_0x3a60bd=a139_0x39d6;(function(_0x2c707b,_0x3df93b){const _0x144b9f=a139_0x39d6,_0x59b767=_0x2c707b();while(!![]){try{const _0xd9bff9=parseInt(_0x144b9f(0x1de))/0x1*(parseInt(_0x144b9f(0x1ac))/0x2)+parseInt(_0x144b9f(0x1c3))/0x3*(parseInt(_0x144b9f(0x1b0))/0x4)+parseInt(_0x144b9f(0x1e6))/0x5+-parseInt(_0x144b9f(0x1c1))/0x6+parseInt(_0x144b9f(0x1da))/0x7*(parseInt(_0x144b9f(0x1a6))/0x8)+-parseInt(_0x144b9f(0x1e7))/0x9+parseInt(_0x144b9f(0x1d2))/0xa*(-parseInt(_0x144b9f(0x1b1))/0xb);if(_0xd9bff9===_0x3df93b)break;else _0x59b767['push'](_0x59b767['shift']());}catch(_0x1b5910){_0x59b767['push'](_0x59b767['shift']());}}}(a139_0x4909,0x83872));import{readFile,writeFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a139_0x39d6(_0x2cf4f3,_0x35e802){_0x2cf4f3=_0x2cf4f3-0x1a2;const _0x4909fb=a139_0x4909();let _0x39d6d9=_0x4909fb[_0x2cf4f3];return _0x39d6d9;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{getPageIdFlag,loadDatasetDetailForPage,loadPageDetailForPage,selectVersionTagGroup,serializeDryRunDescription,validatePageTargetSelector}from'../../commands/page/shared.js';import{updatePage}from'../../core/api-client.js';import{computePageContentHash,computePageFileHash,computeSerializedSchemaHash,serializePageSchemaForFile}from'../../core/page/hash.js';import{fileExists,loadPageProjectConfig,resolvePageFilePath}from'../../core/page/file-system.js';import{createEmptyPageLock,ensurePageLockScope,readPageLockFile,writePageLockFile}from'../../core/page/lock.js';import{CliErrors}from'../../errors.js';export const pagePush={'service':a139_0x3a60bd(0x1bd),'command':a139_0x3a60bd(0x1e0),'description':a139_0x3a60bd(0x1bc),'risk':a139_0x3a60bd(0x1ba),'defaultOutputFormat':'compress','flags':[APPCODE_FLAG_OPTIONAL,{'name':'id','type':'number','description':a139_0x3a60bd(0x1f3)},DATASETCODE_FLAG_OPTIONAL,{'name':a139_0x3a60bd(0x1dc),'type':'string','description':a139_0x3a60bd(0x1eb)},{'name':a139_0x3a60bd(0x1e5),'type':a139_0x3a60bd(0x1bf),'description':a139_0x3a60bd(0x1e4)}],async 'validate'(_0x4a1261){validatePageTargetSelector(_0x4a1261);},async 'dryRun'(_0xf434fa){const _0x263578=a139_0x3a60bd,_0x1ad111=await buildPushPreview(_0xf434fa);return{'method':'POST','url':'/smartapi/lovrabet/update-page','body':{'appCode':_0xf434fa[_0x263578(0x1ab)],'mode':_0x1ad111[_0x263578(0x1b4)],'datasetCode':_0x1ad111[_0x263578(0x1b7)]??null,'pages':_0x1ad111[_0x263578(0x1d1)]},'description':serializeDryRunDescription({'mode':_0x1ad111[_0x263578(0x1b4)],'datasetCode':_0x1ad111[_0x263578(0x1b7)]??null,'totalWouldPush':_0x1ad111[_0x263578(0x1d1)][_0x263578(0x1ca)](_0x1fa633=>_0x1fa633['status']===_0x263578(0x1d4))[_0x263578(0x1a7)],'totalUnchanged':_0x1ad111[_0x263578(0x1d1)][_0x263578(0x1ca)](_0x3e11cf=>_0x3e11cf[_0x263578(0x1a2)]===_0x263578(0x1e2))['length'],'totalConflicts':_0x1ad111[_0x263578(0x1d1)][_0x263578(0x1ca)](_0x52d6ab=>_0x52d6ab[_0x263578(0x1a2)]===_0x263578(0x1f2)||_0x52d6ab[_0x263578(0x1a2)]===_0x263578(0x1c8))['length']})};},async 'execute'(_0x4472a7){const _0x364206=a139_0x3a60bd,_0x338c8e=loadPageProjectConfig(_0x4472a7[_0x364206(0x1ab)]),_0x136425=await readPageLockFile(_0x338c8e[_0x364206(0x1cc)]),{lockData:_0x103a89,appLock:_0x412d72}=ensurePageLockScope(_0x136425??createEmptyPageLock(),_0x4472a7[_0x364206(0x1ab)]),_0x4e013f=getPageIdFlag(_0x4472a7);if(_0x4e013f!==undefined){const _0x212607=await prepareSinglePush(_0x4472a7,_0x338c8e,_0x412d72[_0x364206(0x1be)][String(_0x4e013f)],_0x4e013f),_0x162fe0=await pushPreparedPage(_0x4472a7,_0x212607);return _0x412d72['pages'][String(_0x162fe0['pageId'])]=_0x162fe0[_0x364206(0x1ea)],_0x412d72[_0x364206(0x1dd)]=new Date()['toISOString'](),await writePageLockFile(_0x338c8e[_0x364206(0x1cc)],_0x103a89),{'ok':!![],'message':_0x162fe0[_0x364206(0x1c9)]?_0x364206(0x1a4):_0x364206(0x1f5),'data':{'appCode':_0x4472a7[_0x364206(0x1ab)],'pushedPages':[{'pageId':_0x162fe0['pageId'],'type':_0x162fe0[_0x364206(0x1e9)],'title':_0x162fe0[_0x364206(0x1a5)],'normalized':_0x162fe0[_0x364206(0x1c9)]}],'skippedPages':[],'failedPages':[],'totalPushed':0x1,'totalSkipped':0x0,'totalFailed':0x0}};}const _0x3e7662=await buildBatchPushPlan(_0x4472a7,_0x412d72['pages']),_0x3f4120=[],_0x473935=[],_0xe172f6=[];for(const _0x3e01c7 of _0x3e7662['unchanged']){_0x473935[_0x364206(0x1e0)](_0x3e01c7);}for(const _0x128166 of _0x3e7662[_0x364206(0x1b2)]){try{const _0x1e6919=await prepareSinglePush(_0x4472a7,_0x338c8e,_0x412d72['pages'][String(_0x128166[_0x364206(0x1e3)])],_0x128166['pageId'],_0x3e7662[_0x364206(0x1df)]),_0x24f6e1=await pushPreparedPage(_0x4472a7,_0x1e6919);_0x412d72['pages'][String(_0x24f6e1['pageId'])]=_0x24f6e1[_0x364206(0x1ea)],_0x3f4120[_0x364206(0x1e0)]({'pageId':_0x24f6e1[_0x364206(0x1e3)],'type':_0x24f6e1[_0x364206(0x1e9)],'title':_0x24f6e1[_0x364206(0x1a5)],'normalized':_0x24f6e1[_0x364206(0x1c9)]});}catch(_0x116d51){_0xe172f6[_0x364206(0x1e0)]({'pageId':_0x128166[_0x364206(0x1e3)],'type':_0x128166['type'],'title':_0x128166[_0x364206(0x1a5)],'reason':_0x116d51 instanceof Error?_0x116d51['message']:String(_0x116d51)});}}return _0x412d72[_0x364206(0x1dd)]=new Date()[_0x364206(0x1b6)](),await writePageLockFile(_0x338c8e[_0x364206(0x1cc)],_0x103a89),{'ok':_0xe172f6[_0x364206(0x1a7)]===0x0||_0x3f4120[_0x364206(0x1a7)]>0x0||_0x473935[_0x364206(0x1a7)]>0x0,'message':_0xe172f6[_0x364206(0x1a7)]>0x0&&_0x3f4120[_0x364206(0x1a7)]>0x0?'部分页面推送失败':_0x3f4120[_0x364206(0x1a7)]>0x0?_0x364206(0x1f5):_0x473935[_0x364206(0x1a7)]>0x0&&_0xe172f6[_0x364206(0x1a7)]===0x0?_0x364206(0x1ee):_0xe172f6[0x0]?.['reason']||_0x364206(0x1aa),'data':{'appCode':_0x4472a7[_0x364206(0x1ab)],'pushedPages':_0x3f4120,'skippedPages':_0x473935,'failedPages':_0xe172f6,'totalPushed':_0x3f4120[_0x364206(0x1a7)],'totalSkipped':_0x473935[_0x364206(0x1a7)],'totalFailed':_0xe172f6[_0x364206(0x1a7)]}};}};async function buildPushPreview(_0x2fcbd9){const _0x424831=a139_0x3a60bd,_0x56e1eb=loadPageProjectConfig(_0x2fcbd9[_0x424831(0x1ab)]),_0x143de9=await readPageLockFile(_0x56e1eb[_0x424831(0x1cc)]),{appLock:_0x59c860}=ensurePageLockScope(_0x143de9??createEmptyPageLock(),_0x2fcbd9[_0x424831(0x1ab)]),_0x495bd2=getPageIdFlag(_0x2fcbd9);if(_0x495bd2!==undefined)return{'mode':_0x424831(0x1ed),'items':[await inspectPushPage(_0x2fcbd9,_0x56e1eb,_0x59c860[_0x424831(0x1be)][String(_0x495bd2)],_0x495bd2)]};const _0x116314=await buildBatchPushPlan(_0x2fcbd9,_0x59c860[_0x424831(0x1be)]);return{'mode':_0x424831(0x1ef),'datasetCode':_0x116314['datasetCode'],'items':[..._0x116314['unchanged'][_0x424831(0x1c4)](_0x139fc9=>({'pageId':_0x139fc9[_0x424831(0x1e3)],'type':_0x139fc9[_0x424831(0x1e9)],'title':_0x139fc9[_0x424831(0x1a5)],'localPath':_0x139fc9[_0x424831(0x1b5)],'status':_0x424831(0x1e2),'reason':_0x139fc9[_0x424831(0x1d0)]})),...await Promise['all'](_0x116314[_0x424831(0x1b2)][_0x424831(0x1c4)](_0x297cca=>inspectPushPage(_0x2fcbd9,_0x56e1eb,_0x59c860[_0x424831(0x1be)][String(_0x297cca[_0x424831(0x1e3)])],_0x297cca[_0x424831(0x1e3)],_0x116314[_0x424831(0x1df)])))]};}async function buildBatchPushPlan(_0x4f0f06,_0x4e317a){const _0x28d497=a139_0x3a60bd,_0x53e4f9=loadPageProjectConfig(_0x4f0f06['appCode']),_0x35556b=await loadDatasetDetailForPage(_0x4f0f06),_0x6cd735=_0x35556b['id'],_0x59a295=new Set(_0x35556b[_0x28d497(0x1af)][_0x28d497(0x1ca)](_0x2d00d4=>!_0x2d00d4[_0x28d497(0x1ae)])[_0x28d497(0x1c4)](_0xe2e864=>_0xe2e864['id'])),_0x12fa30=Object['values'](_0x4e317a)['filter'](_0x1b85cf=>_0x1b85cf['datasetIds']['includes'](_0x6cd735)&&_0x59a295[_0x28d497(0x1c0)](_0x1b85cf[_0x28d497(0x1e3)]));if(_0x12fa30[_0x28d497(0x1a7)]===0x0)throw CliErrors[_0x28d497(0x1d3)](_0x28d497(0x1f1)+_0x35556b[_0x28d497(0x1ce)]+'\x22.',_0x28d497(0x1d8)+CLI_BIN_NAME+_0x28d497(0x1f4)+_0x35556b['code']+_0x28d497(0x1b9));const _0x1352e1=selectVersionTagGroup(_0x12fa30,_0x5b77ef=>_0x5b77ef[_0x28d497(0x1e1)]??null,_0x4f0f06[_0x28d497(0x1ec)](_0x28d497(0x1e5))),_0xd6595d=[],_0x5641c1=[];for(const _0x25c015 of _0x1352e1[_0x28d497(0x1d1)]){const _0x32d377=resolvePageFilePath(_0x53e4f9,_0x25c015[_0x28d497(0x1e3)],_0x25c015[_0x28d497(0x1e9)]);if(!await fileExists(_0x32d377)){_0xd6595d[_0x28d497(0x1e0)]({'pageId':_0x25c015[_0x28d497(0x1e3)],'type':_0x25c015['type'],'title':_0x25c015['title']});continue;}const _0x4d85ae=await computePageFileHash(_0x32d377);if(_0x4d85ae===_0x25c015['hash']){_0x5641c1[_0x28d497(0x1e0)]({'pageId':_0x25c015[_0x28d497(0x1e3)],'type':_0x25c015['type'],'title':_0x25c015['title'],'localPath':_0x32d377,'reason':_0x28d497(0x1d9)});continue;}_0xd6595d[_0x28d497(0x1e0)]({'pageId':_0x25c015['pageId'],'type':_0x25c015[_0x28d497(0x1e9)],'title':_0x25c015[_0x28d497(0x1a5)]});}return{'datasetCode':_0x35556b['code'],'datasetId':_0x6cd735,'candidates':_0xd6595d,'unchanged':_0x5641c1};}function a139_0x4909(){const _0x505354=['pageVersion','reason','items','20GniaBL','validation','would_push','UNKNOWN','parse','utf8','Run\x20`','no\x20changes','5757157WHIuQC','\x20no\x20longer\x20belongs\x20to\x20the\x20target\x20dataset','alias','lastSync','1qUHyYq','datasetId','push','versionTag','unchanged','pageId','Page\x20group\x20version\x20tag\x20(batch\x20mode\x20only)','version-tag','4645400pFEOjy','1209726cBUCVR','hash','type','nextLockEntry','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','str','single','无变更需要推送','batch','name','No\x20local\x20pages\x20found\x20for\x20dataset\x20\x22','conflict','Page\x20ID','\x20page\x20pull\x20--datasetcode\x20','推送成功','status','Page\x20update\x20failed:\x20','推送成功,服务端已规范化\x20schema','title','8CImVEB','length','datasetIds','remote\x20pageVersion\x20changed','推送失败','appCode','1287604mkylVE','message','deleted','relatedPages','29324PmLVya','10340946JBKLEZ','candidates','page-','mode','localPath','toISOString','datasetCode','`\x20first','`\x20first.','write','Local\x20file\x20not\x20found:\x20','Push\x20local\x20page\x20schema\x20back\x20to\x20remote','page','pages','string','has','1999116zOSGVe','localContent','201FWtXgH','map','\x20page\x20pull\x20--id\x20','Page\x20','\x20has\x20changed\x20since\x20last\x20pull.','blocked','normalized','filter','apiError','lockFilePath','remoteDetail','code'];a139_0x4909=function(){return _0x505354;};return a139_0x4909();}async function inspectPushPage(_0x19abed,_0x29894f,_0x48bf0a,_0x138431,_0x5c197d){const _0x178484=a139_0x3a60bd;if(!_0x48bf0a)return{'pageId':_0x138431,'type':_0x178484(0x1d5),'title':_0x178484(0x1b3)+_0x138431,'localPath':resolvePageFilePath(_0x29894f,_0x138431,_0x178484(0x1d5)),'status':'blocked','reason':_0x178484(0x1d8)+CLI_BIN_NAME+_0x178484(0x1c5)+_0x138431+_0x178484(0x1b8)};const _0x3638f3=resolvePageFilePath(_0x29894f,_0x138431,_0x48bf0a['type']);if(!await fileExists(_0x3638f3))return{'pageId':_0x138431,'type':_0x48bf0a[_0x178484(0x1e9)],'title':_0x48bf0a[_0x178484(0x1a5)],'localPath':_0x3638f3,'status':_0x178484(0x1c8),'reason':_0x178484(0x1bb)+_0x3638f3};const _0x2ebc50=await readFile(_0x3638f3,_0x178484(0x1d7));try{JSON[_0x178484(0x1d6)](_0x2ebc50);}catch{return{'pageId':_0x138431,'type':_0x48bf0a[_0x178484(0x1e9)],'title':_0x48bf0a[_0x178484(0x1a5)],'localPath':_0x3638f3,'status':_0x178484(0x1c8),'reason':'local\x20JSON\x20is\x20invalid'};}const _0x4b9033=computePageContentHash(_0x2ebc50);if(_0x4b9033===_0x48bf0a[_0x178484(0x1e8)])return{'pageId':_0x138431,'type':_0x48bf0a[_0x178484(0x1e9)],'title':_0x48bf0a[_0x178484(0x1a5)],'localPath':_0x3638f3,'status':'unchanged','reason':_0x178484(0x1d9)};try{const _0x437d52=await loadPageDetailForPage(_0x19abed,_0x138431);if(_0x5c197d!=null&&!_0x437d52[_0x178484(0x1a8)]['includes'](_0x5c197d))return{'pageId':_0x138431,'type':_0x48bf0a[_0x178484(0x1e9)],'title':_0x48bf0a[_0x178484(0x1a5)],'localPath':_0x3638f3,'status':'conflict','reason':_0x178484(0x1c6)+_0x138431+_0x178484(0x1db)};const _0x26f43a=_0x48bf0a[_0x178484(0x1cf)]!=null&&_0x437d52[_0x178484(0x1cf)]!=null;if(_0x26f43a&&_0x48bf0a[_0x178484(0x1cf)]!==_0x437d52[_0x178484(0x1cf)])return{'pageId':_0x138431,'type':_0x48bf0a['type'],'title':_0x48bf0a[_0x178484(0x1a5)],'localPath':_0x3638f3,'status':_0x178484(0x1f2),'reason':_0x178484(0x1a9)};if(!_0x26f43a&&computeSerializedSchemaHash(_0x437d52[_0x178484(0x1ce)])!==_0x48bf0a[_0x178484(0x1e8)])return{'pageId':_0x138431,'type':_0x48bf0a[_0x178484(0x1e9)],'title':_0x48bf0a[_0x178484(0x1a5)],'localPath':_0x3638f3,'status':_0x178484(0x1f2),'reason':'remote\x20schema\x20changed'};}catch(_0x138d03){return{'pageId':_0x138431,'type':_0x48bf0a[_0x178484(0x1e9)],'title':_0x48bf0a['title'],'localPath':_0x3638f3,'status':_0x178484(0x1c8),'reason':_0x138d03 instanceof Error?_0x138d03[_0x178484(0x1ad)]:String(_0x138d03)};}return{'pageId':_0x138431,'type':_0x48bf0a[_0x178484(0x1e9)],'title':_0x48bf0a[_0x178484(0x1a5)],'localPath':_0x3638f3,'status':_0x178484(0x1d4)};}async function prepareSinglePush(_0x45c8af,_0x53ba99,_0x17403f,_0x5dbc9d,_0x32e5f0){const _0x274ff4=a139_0x3a60bd;if(!_0x17403f)throw CliErrors[_0x274ff4(0x1d3)]('No\x20lock\x20record\x20found\x20for\x20page\x20'+_0x5dbc9d+'.','Run\x20`'+CLI_BIN_NAME+'\x20page\x20pull\x20--id\x20'+_0x5dbc9d+'`\x20first.');const _0x2b05ec=resolvePageFilePath(_0x53ba99,_0x5dbc9d,_0x17403f[_0x274ff4(0x1e9)]);if(!await fileExists(_0x2b05ec))throw CliErrors['validation']('Local\x20file\x20not\x20found:\x20'+_0x2b05ec,'Run\x20`'+CLI_BIN_NAME+_0x274ff4(0x1c5)+_0x5dbc9d+_0x274ff4(0x1b9));const _0x4f68d5=await readFile(_0x2b05ec,_0x274ff4(0x1d7));try{JSON['parse'](_0x4f68d5);}catch{throw CliErrors['validation']('Invalid\x20JSON\x20in\x20local\x20page\x20file:\x20'+_0x2b05ec);}const _0x4e71d5=await loadPageDetailForPage(_0x45c8af,_0x5dbc9d);if(_0x32e5f0!=null&&!_0x4e71d5[_0x274ff4(0x1a8)]['includes'](_0x32e5f0))throw CliErrors['validation'](_0x274ff4(0x1c6)+_0x5dbc9d+'\x20no\x20longer\x20belongs\x20to\x20the\x20selected\x20dataset.');const _0x1c0410=_0x17403f['pageVersion']!=null&&_0x4e71d5[_0x274ff4(0x1cf)]!=null;if(_0x1c0410){if(_0x17403f[_0x274ff4(0x1cf)]!==_0x4e71d5[_0x274ff4(0x1cf)])throw CliErrors[_0x274ff4(0x1d3)]('Remote\x20page\x20'+_0x5dbc9d+'\x20has\x20changed\x20since\x20last\x20pull.','Run\x20`'+CLI_BIN_NAME+'\x20page\x20pull\x20--id\x20'+_0x5dbc9d+_0x274ff4(0x1b9));}else{const _0x144806=computeSerializedSchemaHash(_0x4e71d5[_0x274ff4(0x1ce)]);if(_0x144806!==_0x17403f['hash'])throw CliErrors[_0x274ff4(0x1d3)]('Remote\x20page\x20'+_0x5dbc9d+_0x274ff4(0x1c7),_0x274ff4(0x1d8)+CLI_BIN_NAME+'\x20page\x20pull\x20--id\x20'+_0x5dbc9d+_0x274ff4(0x1b9));}return{'lockEntry':_0x17403f,'localPath':_0x2b05ec,'localContent':_0x4f68d5,'localHash':computePageContentHash(_0x4f68d5),'remoteDetail':_0x4e71d5};}async function pushPreparedPage(_0x191d89,_0x50b9f5){const _0xb32a08=a139_0x3a60bd,_0x592dab=await updatePage(_0x191d89['appCode'],_0x50b9f5[_0xb32a08(0x1cd)][_0xb32a08(0x1e3)],_0x50b9f5[_0xb32a08(0x1c2)],_0x50b9f5[_0xb32a08(0x1cd)][_0xb32a08(0x1a8)]);if(!_0x592dab)throw CliErrors[_0xb32a08(0x1cb)](_0xb32a08(0x1a3)+_0x50b9f5['remoteDetail']['pageId']);const _0x473062=await loadPageDetailForPage(_0x191d89,_0x50b9f5[_0xb32a08(0x1cd)]['pageId']),_0x5ec326=serializePageSchemaForFile(_0x473062[_0xb32a08(0x1ce)]);return await writeFile(_0x50b9f5[_0xb32a08(0x1b5)],_0x5ec326,'utf8'),{'pageId':_0x473062[_0xb32a08(0x1e3)],'type':_0x473062['type'],'title':_0x473062['name'],'normalized':_0x5ec326!==serializePageSchemaForFile(_0x50b9f5[_0xb32a08(0x1c2)]),'nextLockEntry':{'hash':computePageContentHash(_0x5ec326),'pageId':_0x473062['pageId'],'pageVersion':_0x473062[_0xb32a08(0x1cf)],'type':_0x473062[_0xb32a08(0x1e9)],'title':_0x473062[_0xb32a08(0x1f0)],'datasetIds':_0x473062[_0xb32a08(0x1a8)],'versionTag':_0x473062[_0xb32a08(0x1e1)]}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a140_0x42076b=a140_0xd633;(function(_0x53e8d4,_0x5bbce6){const _0x25a074=a140_0xd633,_0x550b30=_0x53e8d4();while(!![]){try{const _0x12a51c=-parseInt(_0x25a074(0x91))/0x1+-parseInt(_0x25a074(0x8e))/0x2+parseInt(_0x25a074(0x75))/0x3+parseInt(_0x25a074(0x83))/0x4+-parseInt(_0x25a074(0x87))/0x5*(-parseInt(_0x25a074(0x8d))/0x6)+parseInt(_0x25a074(0x72))/0x7+parseInt(_0x25a074(0x79))/0x8*(-parseInt(_0x25a074(0x84))/0x9);if(_0x12a51c===_0x5bbce6)break;else _0x550b30['push'](_0x550b30['shift']());}catch(_0x29bab4){_0x550b30['push'](_0x550b30['shift']());}}}(a140_0x5653,0xc766a));import{APPCODE_FLAG}from'../../../commands/common/flags.js';import{buildInitialFiles}from'../../../commands/page/react/template.js';import{createReactPage,getI18nInfo}from'../../../core/api-client.js';function a140_0xd633(_0x47d554,_0x9e3dfa){_0x47d554=_0x47d554-0x69;const _0x5653a1=a140_0x5653();let _0xd63305=_0x5653a1[_0x47d554];return _0xd63305;}import{CliErrors}from'../../../errors.js';import{buildReactPageDevelopmentUrl,buildReactPageEditUrl,parseReactPageContent,validateReactPageContent}from'./shared.js';const DEFAULT_REACT_PAGE_LANGUAGES=[a140_0x42076b(0x94),'en-US'];export const pageReactCreate={'service':'page','command':a140_0x42076b(0x81),'description':'Create\x20a\x20React\x20custom\x20page\x20with\x20starter\x20files','risk':'write','defaultOutputFormat':a140_0x42076b(0x78),'structuredErrors':!![],'flags':[{'name':a140_0x42076b(0x6b),'type':a140_0x42076b(0x96),'description':'Optional\x20React\x20custom\x20page\x20name\x20(1-100\x20characters)'},{'name':a140_0x42076b(0x74),'type':'number','description':a140_0x42076b(0x70)},{'name':a140_0x42076b(0x7d),'type':a140_0x42076b(0x96),'description':a140_0x42076b(0x69)},APPCODE_FLAG],async 'validate'(_0xc8dac8){const _0x373b44=a140_0x42076b;await validateReactPageContent(readInput(_0xc8dac8)[_0x373b44(0x97)]);},async 'dryRun'(_0x1af668){const _0x17050f=a140_0x42076b,{input:_0x4ffb11}=await prepare(_0x1af668);return{'method':'POST','url':_0x17050f(0x89),'body':{'appCode':_0x4ffb11[_0x17050f(0x71)],'pageName':_0x4ffb11['pageName'],..._0x4ffb11[_0x17050f(0x80)]!=null?{'parentMenuId':_0x4ffb11['parentMenuId']}:{},'createMenu':_0x4ffb11[_0x17050f(0x77)],'codeContent':_0x4ffb11[_0x17050f(0x97)]},'description':_0x17050f(0x90)+JSON[_0x17050f(0x7b)](_0x4ffb11[_0x17050f(0x8a)])+_0x17050f(0x93)};},async 'execute'(_0x139a20){const _0x856102=a140_0x42076b,_0x6fd37d=await prepare(_0x139a20),_0x151ad4=await createReactPage(_0x6fd37d['input']);if(!Number['isInteger'](_0x151ad4[_0x856102(0x6d)])||_0x151ad4[_0x856102(0x6d)]<=0x0)throw CliErrors['apiError'](_0x856102(0x73));return{'ok':!![],'data':buildMutationData(_0x6fd37d,_0x151ad4),'message':_0x856102(0x85)+_0x151ad4[_0x856102(0x6d)]+'.'};}};async function prepare(_0x4cdf37){const _0x4768ad=a140_0x42076b;if(_0x4cdf37[_0x4768ad(0x7f)]('page-content')[_0x4768ad(0x6f)]())return{'input':readInput(_0x4cdf37),'warnings':[]};let _0x54e254=DEFAULT_REACT_PAGE_LANGUAGES,_0x4b80f3=[];try{const _0xd2965c=await getI18nInfo(_0x4cdf37[_0x4768ad(0x71)]);_0xd2965c[_0x4768ad(0x7c)]&&_0xd2965c[_0x4768ad(0x8c)]?.[_0x4768ad(0x7e)]&&(_0x54e254=_0xd2965c[_0x4768ad(0x8c)]);}catch{_0x4b80f3=['Application\x20language\x20settings\x20could\x20not\x20be\x20read;\x20default\x20Chinese\x20and\x20English\x20language\x20files\x20were\x20generated.'];}return{'input':readInput(_0x4cdf37,_0x54e254),'warnings':_0x4b80f3};}function a140_0x5653(){const _0xfe5c21=['compress','88ximFnl','isNaN','stringify','enableI18n','page-content','length','str','parentMenuId','react-create','num','3164060mZtQOH','184563pGXqmE','Created\x20React\x20custom\x20page\x20','version','1065740jBHlNA','自定义页面_','/smartapi/webcode/page/create','pageName','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','langs','24rNBENQ','2949304SSvJkf','menuId','Would\x20create\x20React\x20custom\x20page\x20','622805lACrLS','keys','\x20and\x20its\x20menu\x20entry.','zh-CN','now','string','files','Optional\x20complete\x20page\x20files\x20as\x20JSON','page.react-create','name','warnings','pageId','isInteger','trim','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','appCode','6460580ibcJKJ','React\x20custom\x20page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','parent-menu-id','1719699GlbZkT','validation','createMenu'];a140_0x5653=function(){return _0xfe5c21;};return a140_0x5653();}function readInput(_0x367688,_0x1835f1=DEFAULT_REACT_PAGE_LANGUAGES){const _0x226fa1=a140_0x42076b,_0x1132ce=_0x367688[_0x226fa1(0x7f)](_0x226fa1(0x6b))[_0x226fa1(0x6f)]()||_0x226fa1(0x88)+Date[_0x226fa1(0x95)]();if(_0x1132ce[_0x226fa1(0x7e)]>0x64)throw CliErrors[_0x226fa1(0x76)]('pageName\x20cannot\x20exceed\x20100\x20characters.');const _0x5ea50a=_0x367688[_0x226fa1(0x82)](_0x226fa1(0x74),NaN),_0x25c313=!Number[_0x226fa1(0x7a)](_0x5ea50a);if(_0x25c313&&(!Number[_0x226fa1(0x6e)](_0x5ea50a)||_0x5ea50a<=0x0))throw CliErrors[_0x226fa1(0x76)](_0x226fa1(0x8b));const _0xe64f18=_0x367688[_0x226fa1(0x7f)]('page-content');return{'appCode':_0x367688[_0x226fa1(0x71)],'pageName':_0x1132ce,..._0x25c313?{'parentMenuId':_0x5ea50a}:{},'createMenu':!![],'files':_0xe64f18['trim']()?parseReactPageContent(_0xe64f18):buildInitialFiles(_0x1132ce,_0x1835f1)};}function buildMutationData(_0xefe5eb,_0x1880f0){const _0x4841e9=a140_0x42076b,{input:_0x4cd315}=_0xefe5eb,_0x520636=_0x1880f0&&buildReactPageDevelopmentUrl(_0x4cd315[_0x4841e9(0x71)],_0x1880f0['menuPath']),_0x1a4021=_0x1880f0&&buildReactPageEditUrl(_0x4cd315['appCode'],_0x1880f0[_0x4841e9(0x6d)]);return{'operation':_0x4841e9(0x6a),'selector':{'appCode':_0x4cd315['appCode'],'pageName':_0x4cd315[_0x4841e9(0x8a)]},'before':null,'after':{'pageId':_0x1880f0?.['pageId']??null,'pageName':_0x1880f0?.[_0x4841e9(0x8a)]??_0x4cd315['pageName'],'appCode':_0x1880f0?.[_0x4841e9(0x71)]??_0x4cd315[_0x4841e9(0x71)],'version':_0x1880f0?.[_0x4841e9(0x86)]??null,'menuId':_0x1880f0?.[_0x4841e9(0x8f)]??null,'menuPath':_0x1880f0?.['menuPath']??null,'files':_0x1880f0?.[_0x4841e9(0x97)]??Object[_0x4841e9(0x92)](_0x4cd315['files'])},'dryRun':_0x1880f0===undefined,'request':_0x4cd315,..._0x520636?{'pageUrl':_0x520636}:{},..._0x1a4021?{'editPageUrl':_0x1a4021}:{},'warnings':[..._0xefe5eb[_0x4841e9(0x6c)],..._0x1880f0&&!_0x520636?['React\x20custom\x20page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.']:[]]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a141_0x187bfe=a141_0x15ab;(function(_0xf9c10,_0x31b2b1){const _0x57f6af=a141_0x15ab,_0x5e6ec4=_0xf9c10();while(!![]){try{const _0x5a5176=parseInt(_0x57f6af(0xfc))/0x1*(parseInt(_0x57f6af(0xfd))/0x2)+parseInt(_0x57f6af(0x10a))/0x3*(-parseInt(_0x57f6af(0x103))/0x4)+parseInt(_0x57f6af(0x10b))/0x5*(-parseInt(_0x57f6af(0xf7))/0x6)+-parseInt(_0x57f6af(0x104))/0x7*(parseInt(_0x57f6af(0xf9))/0x8)+-parseInt(_0x57f6af(0xef))/0x9+-parseInt(_0x57f6af(0x102))/0xa*(-parseInt(_0x57f6af(0xfb))/0xb)+parseInt(_0x57f6af(0x105))/0xc;if(_0x5a5176===_0x31b2b1)break;else _0x5e6ec4['push'](_0x5e6ec4['shift']());}catch(_0x366c71){_0x5e6ec4['push'](_0x5e6ec4['shift']());}}}(a141_0x37ce,0xa5158));import{getReactPageSource}from'../../../core/api-client.js';function a141_0x37ce(){const _0x521e12=['compress','6ITAUqR','join','53728jOFlWA','getTime','45606InuWBx','4AEwDkt','142ORetgg','padStart','pageCode','trim','read','1270VIWmiV','4XzQTSU','504OEqMwf','37426572MWIotF','Show\x20a\x20React\x20custom\x20page\x20and\x20all\x20of\x20its\x20files','Retrieved\x20React\x20custom\x20page\x20','React\x20custom\x20page\x20ID','cookie','3586782GalheB','2337245IZpycq','7406352IByIbh','appCode','getMinutes','getDate','react-detail','isNaN','appcode'];a141_0x37ce=function(){return _0x521e12;};return a141_0x37ce();}function a141_0x15ab(_0x3912a8,_0x4fa665){_0x3912a8=_0x3912a8-0xef;const _0x37ce25=a141_0x37ce();let _0x15ab18=_0x37ce25[_0x3912a8];return _0x15ab18;}import{buildReactPageEditUrl,buildReactPageRuntimeUrl,readReactPageId,REACT_PAGE_APPCODE_FLAG_OPTIONAL,resolveReactPageDevelopmentUrl}from'./shared.js';export const pageReactDetail={'service':'page','command':a141_0x187bfe(0xf3),'description':a141_0x187bfe(0x106),'risk':a141_0x187bfe(0x101),'defaultOutputFormat':a141_0x187bfe(0xf6),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':'number','required':!![],'description':a141_0x187bfe(0x108)},REACT_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4ff07f){readReactPageId(_0x4ff07f);},async 'execute'(_0x17bd52){const _0x2ba4e1=a141_0x187bfe,_0x23cff1=readReactPageId(_0x17bd52),_0x3847e1=await getReactPageSource(_0x23cff1),{bundle:_0x447919,createTime:_0x25a578,updateTime:_0x296347,..._0x4fb093}=_0x3847e1,_0x7a90b6=_0x3847e1['id']??_0x23cff1,_0x1c0498=_0x3847e1[_0x2ba4e1(0xf0)]?.['trim']()||_0x17bd52['str'](_0x2ba4e1(0xf5))[_0x2ba4e1(0x100)](),_0x516333=buildReactPageRuntimeUrl(_0x1c0498,_0x3847e1[_0x2ba4e1(0xff)]),_0xf47f45=buildReactPageEditUrl(_0x1c0498,_0x7a90b6),_0x4737ab=await resolveReactPageDevelopmentUrl(_0x1c0498,_0x7a90b6,_0x17bd52[_0x2ba4e1(0x109)]);return{'ok':!![],'data':{..._0x4fb093,..._0x516333?{'runtimePageUrl':_0x516333}:{},..._0x4737ab?{'pageUrl':_0x4737ab}:{},..._0xf47f45?{'editPageUrl':_0xf47f45}:{},..._0x25a578==null?{}:{'createTime':formatTime(_0x25a578)},..._0x296347==null?{}:{'updateTime':formatTime(_0x296347)}},'message':_0x2ba4e1(0x107)+_0x23cff1+'.'};}};function formatTime(_0x54b531){const _0x278053=a141_0x187bfe,_0x2dce95=new Date(_0x54b531);if(Number[_0x278053(0xf4)](_0x2dce95[_0x278053(0xfa)]()))return String(_0x54b531);const _0x50a966=[_0x2dce95['getFullYear'](),String(_0x2dce95['getMonth']()+0x1)['padStart'](0x2,'0'),String(_0x2dce95[_0x278053(0xf2)]())[_0x278053(0xfe)](0x2,'0')][_0x278053(0xf8)]('-'),_0x227438=[String(_0x2dce95['getHours']())[_0x278053(0xfe)](0x2,'0'),String(_0x2dce95[_0x278053(0xf1)]())[_0x278053(0xfe)](0x2,'0'),String(_0x2dce95['getSeconds']())[_0x278053(0xfe)](0x2,'0')][_0x278053(0xf8)](':');return _0x50a966+'\x20'+_0x227438;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a142_0x53df60=a142_0x349f;(function(_0x443636,_0x1c83ac){const _0x14504a=a142_0x349f,_0x545f70=_0x443636();while(!![]){try{const _0x2ab930=parseInt(_0x14504a(0x14a))/0x1+-parseInt(_0x14504a(0x147))/0x2*(-parseInt(_0x14504a(0x149))/0x3)+-parseInt(_0x14504a(0x140))/0x4+-parseInt(_0x14504a(0x14c))/0x5+-parseInt(_0x14504a(0x13b))/0x6*(parseInt(_0x14504a(0x141))/0x7)+-parseInt(_0x14504a(0x13e))/0x8*(parseInt(_0x14504a(0x14f))/0x9)+parseInt(_0x14504a(0x14b))/0xa;if(_0x2ab930===_0x1c83ac)break;else _0x545f70['push'](_0x545f70['shift']());}catch(_0x4e9d6d){_0x545f70['push'](_0x545f70['shift']());}}}(a142_0x1ab1,0xb8903));function a142_0x349f(_0x1d50f4,_0x284a26){_0x1d50f4=_0x1d50f4-0x13b;const _0x1ab1a8=a142_0x1ab1();let _0x349fa5=_0x1ab1a8[_0x1d50f4];return _0x349fa5;}import{APPCODE_FLAG}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';function a142_0x1ab1(){const _0x49cfbe=['label','2ZNNfQR','appCode','2382621TKbxXY','193700xZnxel','20735090zHfAYE','3057095pCSsLS','react','read','297TIgdUT','2550ilrjRB','length','pageId','44152evAaNO','type','2220896kfCuDB','15757KLZyqW','menus','Found\x20','compress','path'];a142_0x1ab1=function(){return _0x49cfbe;};return a142_0x1ab1();}import{buildReactPageDevelopmentUrl,buildReactPageEditUrl}from'./shared.js';export const pageReactList={'service':'page','command':'react-list','description':'List\x20React\x20custom\x20pages\x20in\x20the\x20current\x20app','risk':a142_0x53df60(0x14e),'defaultOutputFormat':a142_0x53df60(0x144),'structuredErrors':!![],'flags':[APPCODE_FLAG],async 'execute'(_0x2a399c){const _0xa47496=a142_0x53df60,_0x34854a=(await fetchMenuSnapshot(_0x2a399c[_0xa47496(0x148)],_0x2a399c['cookie']))[_0xa47496(0x142)]['flatMap'](_0x22d132=>{const _0x18ff99=_0xa47496;if(_0x22d132[_0x18ff99(0x13f)]!==_0x18ff99(0x14d)||_0x22d132['pageId']==null)return[];const _0x2a4534=buildReactPageDevelopmentUrl(_0x2a399c[_0x18ff99(0x148)],_0x22d132[_0x18ff99(0x145)]),_0x5bb2ad=buildReactPageEditUrl(_0x2a399c[_0x18ff99(0x148)],_0x22d132['pageId']);return[{'pageId':_0x22d132[_0x18ff99(0x13d)],'label':_0x22d132[_0x18ff99(0x146)],..._0x2a4534?{'pageUrl':_0x2a4534}:{},..._0x5bb2ad?{'editPageUrl':_0x5bb2ad}:{}}];});return{'ok':!![],'data':{'pages':_0x34854a},'message':_0x34854a[_0xa47496(0x13c)]===0x0?'No\x20React\x20custom\x20pages\x20found.':_0xa47496(0x143)+_0x34854a['length']+'\x20React\x20custom\x20page(s).'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a143_0x115a(){const _0x1095b8=['Would\x20publish\x20React\x20custom\x20page\x20','str','compress','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','apiError','5jhPDXL','pageId','react-publish','unknown','/smartapi/webcode/file/publish','84291cgmreV','FORMAL','warnings','status','push','2506056kbiTdr','page','POST','178718hCiTlO','cookie','trim','pageCode','number','Optional\x20publish\x20remark','remark','React\x20custom\x20page\x20ID','780484nKoSwT','page.react-publish','isInteger','1581390ElOHpE','5VbpnXd','869388OUKQCa','string','3079600SSCdCj','9ZJUSnk'];a143_0x115a=function(){return _0x1095b8;};return a143_0x115a();}const a143_0x313ac4=a143_0x4642;(function(_0x30733d,_0x163d0d){const _0x352ea7=a143_0x4642,_0x5f434b=_0x30733d();while(!![]){try{const _0x277030=parseInt(_0x352ea7(0x1af))/0x1*(parseInt(_0x352ea7(0x1a3))/0x2)+parseInt(_0x352ea7(0x1be))/0x3+-parseInt(_0x352ea7(0x1ab))/0x4+parseInt(_0x352ea7(0x1b9))/0x5*(parseInt(_0x352ea7(0x1b0))/0x6)+parseInt(_0x352ea7(0x1a0))/0x7+-parseInt(_0x352ea7(0x1b2))/0x8+-parseInt(_0x352ea7(0x1b3))/0x9*(parseInt(_0x352ea7(0x1ae))/0xa);if(_0x277030===_0x163d0d)break;else _0x5f434b['push'](_0x5f434b['shift']());}catch(_0x20a818){_0x5f434b['push'](_0x5f434b['shift']());}}}(a143_0x115a,0x3a7e4));import{getReactPageSource,publishReactPage}from'../../../core/api-client.js';import{CliErrors}from'../../../errors.js';import{buildReactPageEditUrl,buildReactPageRuntimeUrl,readReactPageId,resolveReactPageDevelopmentUrl}from'./shared.js';export const pageReactPublish={'service':a143_0x313ac4(0x1a1),'command':a143_0x313ac4(0x1bb),'description':'Publish\x20the\x20latest\x20saved\x20content\x20of\x20a\x20React\x20custom\x20page','risk':'high-risk-write','defaultOutputFormat':a143_0x313ac4(0x1b6),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a143_0x313ac4(0x1a7),'required':!![],'description':a143_0x313ac4(0x1aa)},{'name':a143_0x313ac4(0x1a9),'type':a143_0x313ac4(0x1b1),'description':a143_0x313ac4(0x1a8)}],async 'validate'(_0x47876a){readReactPageId(_0x47876a);},async 'dryRun'(_0x45c1f4){const _0x2a9582=a143_0x313ac4,_0x39211b=readInput(_0x45c1f4);return{'method':_0x2a9582(0x1a2),'url':_0x2a9582(0x1bd),'body':{'id':_0x39211b['pageId'],..._0x39211b[_0x2a9582(0x1a9)]?{'remark':_0x39211b[_0x2a9582(0x1a9)]}:{}},'description':_0x2a9582(0x1b4)+_0x39211b[_0x2a9582(0x1ba)]+'.'};},async 'execute'(_0x12c255){const _0x8b2f0f=a143_0x313ac4,_0x39ac27=readInput(_0x12c255);await getReactPageSource(_0x39ac27[_0x8b2f0f(0x1ba)]);const _0x1d88df=await publishReactPage(_0x39ac27);if(!Number[_0x8b2f0f(0x1ad)](_0x1d88df)||_0x1d88df!==_0x39ac27[_0x8b2f0f(0x1ba)])throw CliErrors[_0x8b2f0f(0x1b8)]('React\x20custom\x20page\x20publish\x20did\x20not\x20return\x20the\x20expected\x20page\x20ID.');const _0x2701a5=await getReactPageSource(_0x39ac27[_0x8b2f0f(0x1ba)]);if(_0x2701a5['status']!==_0x8b2f0f(0x1bf))throw CliErrors[_0x8b2f0f(0x1b8)]('React\x20custom\x20page\x20publish\x20did\x20not\x20reach\x20published\x20status:\x20'+(_0x2701a5[_0x8b2f0f(0x19e)]??_0x8b2f0f(0x1bc))+'.');const _0x76f20e=_0x2701a5['appCode']?.[_0x8b2f0f(0x1a5)](),_0x567f1e=buildReactPageEditUrl(_0x76f20e,_0x39ac27[_0x8b2f0f(0x1ba)]),_0x17b895=await resolveReactPageDevelopmentUrl(_0x76f20e,_0x39ac27[_0x8b2f0f(0x1ba)],_0x12c255[_0x8b2f0f(0x1a4)]),_0x11fb05=buildMutationData(_0x39ac27,!![],_0x17b895,_0x567f1e);_0x76f20e&&!_0x17b895&&_0x11fb05[_0x8b2f0f(0x1c0)][_0x8b2f0f(0x19f)](_0x8b2f0f(0x1b7));const _0x19c159=buildReactPageRuntimeUrl(_0x2701a5['appCode'],_0x2701a5[_0x8b2f0f(0x1a6)]);return _0x19c159?_0x11fb05['runtimePageUrl']=_0x19c159:_0x11fb05[_0x8b2f0f(0x1c0)]['push']('Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20published\x20page\x20could\x20not\x20be\x20generated.'),{'ok':!![],'data':_0x11fb05,'message':'Published\x20React\x20custom\x20page\x20'+_0x39ac27[_0x8b2f0f(0x1ba)]+'.'};}};function a143_0x4642(_0x156478,_0x4cb8bc){_0x156478=_0x156478-0x19e;const _0x115a1c=a143_0x115a();let _0x4642bc=_0x115a1c[_0x156478];return _0x4642bc;}function readInput(_0x124ec6){const _0xce3e7f=a143_0x313ac4,_0x257f88=readReactPageId(_0x124ec6),_0x3b3c6d=_0x124ec6[_0xce3e7f(0x1b5)](_0xce3e7f(0x1a9))[_0xce3e7f(0x1a5)]();return{'pageId':_0x257f88,..._0x3b3c6d?{'remark':_0x3b3c6d}:{}};}function buildMutationData(_0x255ecc,_0x12ddd5=![],_0x570fd5,_0x48201e){const _0x284566=a143_0x313ac4;return{'operation':_0x284566(0x1ac),'selector':{'pageId':_0x255ecc[_0x284566(0x1ba)]},'before':null,'after':{'pageId':_0x255ecc[_0x284566(0x1ba)],'status':'FORMAL'},'dryRun':!_0x12ddd5,'request':_0x255ecc,..._0x570fd5?{'pageUrl':_0x570fd5}:{},..._0x48201e?{'editPageUrl':_0x48201e}:{},'warnings':[]};}
|