@lovrabet/rabetbase-cli 2.4.6-beta.1 → 2.4.6-beta.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/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-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-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/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.d.ts +8 -7
- 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/types.d.ts +17 -2
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.d.ts +2 -0
- package/lib/commands/menu/visibility-update.js +1 -0
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/template.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/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/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +4 -3
- package/skills/rabetbase/references/rabetbase-menu-list.md +3 -1
- package/skills/rabetbase/references/rabetbase-menu-visibility-update.md +59 -0
- package/skills/rabetbase/references/rabetbase-ocr.md +17 -2
- package/skills/rabetbase.manifest.json +4 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a143_0x5b61b7=a143_0xec0e;(function(_0x5b373,_0x23de4b){const _0x2ee085=a143_0xec0e,_0x659104=_0x5b373();while(!![]){try{const _0x260d8b=parseInt(_0x2ee085(0x1ee))/0x1*(parseInt(_0x2ee085(0x215))/0x2)+parseInt(_0x2ee085(0x21d))/0x3+-parseInt(_0x2ee085(0x20e))/0x4*(-parseInt(_0x2ee085(0x205))/0x5)+-parseInt(_0x2ee085(0x223))/0x6+parseInt(_0x2ee085(0x20c))/0x7+parseInt(_0x2ee085(0x1f0))/0x8+-parseInt(_0x2ee085(0x21f))/0x9;if(_0x260d8b===_0x23de4b)break;else _0x659104['push'](_0x659104['shift']());}catch(_0x232d2b){_0x659104['push'](_0x659104['shift']());}}}(a143_0x4724,0x61b48));import{APPCODE_FLAG}from'../../commands/common/flags.js';import{buildInitialFiles}from'../../commands/page/custom/template.js';import{createCustomPage,getI18nInfo}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,parseCustomPageContent,validateCustomPageContent}from'./custom/shared.js';const DEFAULT_CUSTOM_PAGE_LANGUAGES=[a143_0x5b61b7(0x225),a143_0x5b61b7(0x1e9)];export const pageCreate={'service':a143_0x5b61b7(0x1ea),'command':a143_0x5b61b7(0x1f6),'description':a143_0x5b61b7(0x1f5),'risk':a143_0x5b61b7(0x220),'defaultOutputFormat':a143_0x5b61b7(0x1ed),'structuredErrors':!![],'rejectedFlags':[{'name':a143_0x5b61b7(0x1fe),'message':'page\x20create\x20does\x20not\x20accept\x20--page-type.','hint':a143_0x5b61b7(0x20d)}],'flags':[{'name':'name','type':a143_0x5b61b7(0x217),'description':a143_0x5b61b7(0x20a)},{'name':a143_0x5b61b7(0x1e6),'type':a143_0x5b61b7(0x21b),'description':a143_0x5b61b7(0x1fc)},{'name':a143_0x5b61b7(0x1e7),'type':'string','description':a143_0x5b61b7(0x213),'enum':[a143_0x5b61b7(0x204)]},{'name':a143_0x5b61b7(0x21c),'type':a143_0x5b61b7(0x217),'description':a143_0x5b61b7(0x212)},APPCODE_FLAG],async 'validate'(_0x20f743){const _0x149f27=a143_0x5b61b7,_0x5639ad=readPagePattern(_0x20f743);await validateCustomPageContent(readInput(_0x20f743,DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x5639ad)[_0x149f27(0x201)]);},async 'dryRun'(_0x2e2881){const _0x165478=a143_0x5b61b7,{input:_0x284974}=await prepare(_0x2e2881);return{'method':'POST','url':_0x165478(0x1f8),'body':{'appCode':_0x284974[_0x165478(0x21a)],'pageName':_0x284974[_0x165478(0x216)],..._0x284974[_0x165478(0x200)]!=null?{'parentMenuId':_0x284974[_0x165478(0x200)]}:{},'createMenu':_0x284974[_0x165478(0x221)],'codeContent':_0x284974[_0x165478(0x201)]},'description':_0x165478(0x219)+JSON[_0x165478(0x206)](_0x284974[_0x165478(0x216)])+_0x165478(0x210)};},async 'execute'(_0x3c2bb7){const _0x64e2ff=a143_0x5b61b7,_0x57903c=await prepare(_0x3c2bb7),_0x18f1a8=await createCustomPage(_0x57903c[_0x64e2ff(0x1e5)]);if(!Number[_0x64e2ff(0x20f)](_0x18f1a8[_0x64e2ff(0x1f4)])||_0x18f1a8[_0x64e2ff(0x1f4)]<=0x0)throw CliErrors[_0x64e2ff(0x20b)](_0x64e2ff(0x214));return{'ok':!![],'data':buildMutationData(_0x57903c,_0x18f1a8),'message':'Created\x20Custom\x20Page\x20'+_0x18f1a8['pageId']+'.'};}};async function prepare(_0x451471){const _0x48ba2c=a143_0x5b61b7,_0x1e4c8d=readPagePattern(_0x451471);if(_0x1e4c8d===null)return{'input':readInput(_0x451471,DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x1e4c8d),'warnings':[],'pagePattern':_0x1e4c8d};let _0x4509e0=DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x150f49=[];try{const _0x5429e8=await getI18nInfo(_0x451471[_0x48ba2c(0x21a)]);_0x5429e8[_0x48ba2c(0x207)]&&_0x5429e8[_0x48ba2c(0x1fa)]?.[_0x48ba2c(0x203)]&&(_0x4509e0=_0x5429e8['langs']);}catch{_0x150f49=[_0x48ba2c(0x1e8)];}return{'input':readInput(_0x451471,_0x4509e0,_0x1e4c8d),'warnings':_0x150f49,'pagePattern':_0x1e4c8d};}function a143_0x4724(){const _0x5bd64b=['createMenu','pagePattern','1026762GFGkBE','num','zh-CN','str','input','parent-menu-id','page-pattern','Application\x20language\x20settings\x20could\x20not\x20be\x20read;\x20default\x20Chinese\x20and\x20English\x20language\x20files\x20were\x20generated.','en-US','page','--page-pattern\x20currently\x20supports\x20only\x20BLANK.','自定义页面_','compress','6593djGJKC','version','4314184HMYVLq','menuPath','CUSTOM','validation','pageId','Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20complete\x20files','create','isNaN','/smartapi/webcode/page/create','page.create','langs','trim','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','pageName\x20cannot\x20exceed\x20100\x20characters.','page-type','name','parentMenuId','files','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','length','BLANK','2663085PRMEIo','stringify','enableI18n','warnings','Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','apiError','1017401uiipBG','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK\x20or\x20--page-content.','4VraOgj','isInteger','\x20and\x20its\x20menu\x20entry.','--page-pattern\x20and\x20--page-content\x20cannot\x20be\x20used\x20together.','Complete\x20page\x20files\x20as\x20JSON\x20(conflicts\x20with\x20--page-pattern)','Custom\x20Page\x20pattern\x20(currently\x20BLANK;\x20conflicts\x20with\x20--page-content)','Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','56KiSNrc','pageName','string','menuId','Would\x20create\x20Custom\x20Page\x20','appCode','number','page-content','1658694hBpNBQ','Provide\x20--page-pattern\x20BLANK\x20or\x20--page-content.','12450672JeUZEf','write'];a143_0x4724=function(){return _0x5bd64b;};return a143_0x4724();}function readPagePattern(_0x4daa47){const _0x3d1ab1=a143_0x5b61b7,_0x3dd143=_0x4daa47[_0x3d1ab1(0x226)](_0x3d1ab1(0x1e7))[_0x3d1ab1(0x1fb)](),_0x295266=_0x4daa47[_0x3d1ab1(0x226)](_0x3d1ab1(0x21c))['trim']()['length']>0x0;if(_0x3dd143&&_0x295266)throw CliErrors[_0x3d1ab1(0x1f3)](_0x3d1ab1(0x211));if(_0x295266)return null;if(!_0x3dd143)throw CliErrors[_0x3d1ab1(0x1f3)](_0x3d1ab1(0x21e));if(_0x3dd143!==_0x3d1ab1(0x204))throw CliErrors['validation'](_0x3d1ab1(0x1eb));return _0x3dd143;}function readInput(_0x185d1b,_0x36eb1c=DEFAULT_CUSTOM_PAGE_LANGUAGES,_0x4b5f1f=readPagePattern(_0x185d1b)){const _0x11ed11=a143_0x5b61b7,_0x36304=_0x185d1b[_0x11ed11(0x226)](_0x11ed11(0x1ff))['trim']()||_0x11ed11(0x1ec)+Date['now']();if(_0x36304['length']>0x64)throw CliErrors[_0x11ed11(0x1f3)](_0x11ed11(0x1fd));const _0x51008b=_0x185d1b[_0x11ed11(0x224)](_0x11ed11(0x1e6),NaN),_0x259fdf=!Number[_0x11ed11(0x1f7)](_0x51008b);if(_0x259fdf&&(!Number[_0x11ed11(0x20f)](_0x51008b)||_0x51008b<=0x0))throw CliErrors[_0x11ed11(0x1f3)](_0x11ed11(0x202));return{'appCode':_0x185d1b[_0x11ed11(0x21a)],'pageName':_0x36304,..._0x259fdf?{'parentMenuId':_0x51008b}:{},'createMenu':!![],'files':_0x4b5f1f===null?parseCustomPageContent(_0x185d1b[_0x11ed11(0x226)](_0x11ed11(0x21c))):buildInitialFiles(_0x36304,_0x36eb1c)};}function a143_0xec0e(_0x556928,_0x218ecf){_0x556928=_0x556928-0x1e5;const _0x4724da=a143_0x4724();let _0xec0e0a=_0x4724da[_0x556928];return _0xec0e0a;}function buildMutationData(_0x36a336,_0x460370){const _0x5cd53f=a143_0x5b61b7,{input:_0x28735f}=_0x36a336,_0x1bfa82=_0x460370&&buildCustomPageDevelopmentUrl(_0x28735f['appCode'],_0x460370[_0x5cd53f(0x1f1)]),_0x2e171c=_0x460370&&buildCustomPageEditUrl(_0x28735f['appCode'],_0x460370['pageId']);return{'operation':_0x5cd53f(0x1f9),'pageType':_0x5cd53f(0x1f2),'pagePattern':_0x36a336[_0x5cd53f(0x222)],'selector':{'appCode':_0x28735f[_0x5cd53f(0x21a)],'pageName':_0x28735f[_0x5cd53f(0x216)]},'before':null,'after':{'pageId':_0x460370?.['pageId']??null,'pageName':_0x460370?.[_0x5cd53f(0x216)]??_0x28735f[_0x5cd53f(0x216)],'appCode':_0x460370?.[_0x5cd53f(0x21a)]??_0x28735f[_0x5cd53f(0x21a)],'version':_0x460370?.[_0x5cd53f(0x1ef)]??null,'menuId':_0x460370?.[_0x5cd53f(0x218)]??null,'menuPath':_0x460370?.[_0x5cd53f(0x1f1)]??null,'files':_0x460370?.[_0x5cd53f(0x201)]??Object['keys'](_0x28735f[_0x5cd53f(0x201)])},'dryRun':_0x460370===undefined,'request':_0x28735f,..._0x1bfa82?{'pageUrl':_0x1bfa82}:{},..._0x2e171c?{'editPageUrl':_0x2e171c}:{},'warnings':[..._0x36a336[_0x5cd53f(0x208)],..._0x460370&&!_0x1bfa82?[_0x5cd53f(0x209)]:[]]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a144_0x2b47fd=a144_0x43e5;function a144_0x43e5(_0x49787b,_0x3c12a2){_0x49787b=_0x49787b-0x9b;const _0x1ed764=a144_0x1ed7();let _0x43e534=_0x1ed764[_0x49787b];return _0x43e534;}function a144_0x1ed7(){const _0x8d95eb=['getHours','Custom\x20Page\x20ID','50676gmfvYd','getMonth','6987483jqWtEs','number','Retrieved\x20Custom\x20Page\x20','trim','686327dbZGHX','184AkuMrf','7210PcsVsd','appCode','getFullYear','str','read','padStart','getTime','join','Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','getMinutes','1635555XzRaaJ','appcode','3924bGwkfP','45068243axCwbq','4840984xffdYW','12IULVap','10FYPqsr','custom-detail'];a144_0x1ed7=function(){return _0x8d95eb;};return a144_0x1ed7();}(function(_0x46ac7b,_0xbb21b9){const _0x206a67=a144_0x43e5,_0x3e16d0=_0x46ac7b();while(!![]){try{const _0x270437=-parseInt(_0x206a67(0xb1))/0x1+parseInt(_0x206a67(0xb2))/0x2*(-parseInt(_0x206a67(0xab))/0x3)+-parseInt(_0x206a67(0xa6))/0x4*(-parseInt(_0x206a67(0xa1))/0x5)+parseInt(_0x206a67(0xa3))/0x6*(-parseInt(_0x206a67(0xb3))/0x7)+-parseInt(_0x206a67(0xa5))/0x8+-parseInt(_0x206a67(0xad))/0x9*(parseInt(_0x206a67(0xa7))/0xa)+parseInt(_0x206a67(0xa4))/0xb;if(_0x270437===_0xbb21b9)break;else _0x3e16d0['push'](_0x3e16d0['shift']());}catch(_0xe42895){_0x3e16d0['push'](_0x3e16d0['shift']());}}}(a144_0x1ed7,0xbf24d));import{getCustomPageSource}from'../../../core/api-client.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':'page','command':a144_0x2b47fd(0xa8),'description':a144_0x2b47fd(0x9f),'risk':a144_0x2b47fd(0x9b),'defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a144_0x2b47fd(0xae),'required':!![],'description':a144_0x2b47fd(0xaa)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x39e34a){readCustomPageId(_0x39e34a);},async 'execute'(_0x35c788){const _0x36f332=a144_0x2b47fd,_0x50bba9=readCustomPageId(_0x35c788),_0x2b92f9=await getCustomPageSource(_0x50bba9),{bundle:_0x3d344d,createTime:_0x140bd4,updateTime:_0x19f827,..._0x4cc151}=_0x2b92f9,_0x286884=_0x2b92f9['id']??_0x50bba9,_0x2c5b10=_0x2b92f9[_0x36f332(0xb4)]?.[_0x36f332(0xb0)]()||_0x35c788[_0x36f332(0xb6)](_0x36f332(0xa2))[_0x36f332(0xb0)](),_0x5eb2d4=buildCustomPageRuntimeUrl(_0x2c5b10,_0x2b92f9['pageCode']),_0x3db5d7=buildCustomPageEditUrl(_0x2c5b10,_0x286884),_0x3a3ae2=await resolveCustomPageDevelopmentUrl(_0x2c5b10,_0x286884,_0x35c788['cookie']);return{'ok':!![],'data':{..._0x4cc151,..._0x5eb2d4?{'runtimePageUrl':_0x5eb2d4}:{},..._0x3a3ae2?{'pageUrl':_0x3a3ae2}:{},..._0x3db5d7?{'editPageUrl':_0x3db5d7}:{},..._0x140bd4==null?{}:{'createTime':formatTime(_0x140bd4)},..._0x19f827==null?{}:{'updateTime':formatTime(_0x19f827)}},'message':_0x36f332(0xaf)+_0x50bba9+'.'};}};function formatTime(_0x2b279f){const _0x4f9f54=a144_0x2b47fd,_0x28d89b=new Date(_0x2b279f);if(Number['isNaN'](_0x28d89b[_0x4f9f54(0x9d)]()))return String(_0x2b279f);const _0xda9924=[_0x28d89b[_0x4f9f54(0xb5)](),String(_0x28d89b[_0x4f9f54(0xac)]()+0x1)[_0x4f9f54(0x9c)](0x2,'0'),String(_0x28d89b['getDate']())[_0x4f9f54(0x9c)](0x2,'0')][_0x4f9f54(0x9e)]('-'),_0x36c272=[String(_0x28d89b[_0x4f9f54(0xa9)]())['padStart'](0x2,'0'),String(_0x28d89b[_0x4f9f54(0xa0)]())[_0x4f9f54(0x9c)](0x2,'0'),String(_0x28d89b['getSeconds']())[_0x4f9f54(0x9c)](0x2,'0')]['join'](':');return _0xda9924+'\x20'+_0x36c272;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a145_0x16a575=a145_0x134e;(function(_0x391c3a,_0xabcbff){const _0x387f67=a145_0x134e,_0x227f4a=_0x391c3a();while(!![]){try{const _0xe3599c=parseInt(_0x387f67(0x8a))/0x1+-parseInt(_0x387f67(0x80))/0x2*(parseInt(_0x387f67(0x87))/0x3)+-parseInt(_0x387f67(0x83))/0x4+-parseInt(_0x387f67(0x7c))/0x5*(parseInt(_0x387f67(0x7b))/0x6)+-parseInt(_0x387f67(0x8d))/0x7*(-parseInt(_0x387f67(0x86))/0x8)+-parseInt(_0x387f67(0x7f))/0x9+parseInt(_0x387f67(0x79))/0xa;if(_0xe3599c===_0xabcbff)break;else _0x227f4a['push'](_0x227f4a['shift']());}catch(_0x5ab756){_0x227f4a['push'](_0x227f4a['shift']());}}}(a145_0x34ab,0x23db3));import{APPCODE_FLAG}from'../../../commands/common/flags.js';function a145_0x134e(_0x5215db,_0x5884a2){_0x5215db=_0x5215db-0x79;const _0x34ab0b=a145_0x34ab();let _0x134e3a=_0x34ab0b[_0x5215db];return _0x134e3a;}function a145_0x34ab(){const _0x239d2c=['label','List\x20Custom\x20Pages\x20in\x20the\x20current\x20app','1750311glafnU','2jUZouh','No\x20Custom\x20Pages\x20found.','cookie','946704VaCCZt','\x20Custom\x20Page(s).','appCode','133264WsBjLK','25737LBGelF','Found\x20','read','143339upMxyO','react','page','119pWukvh','menus','pageId','compress','3262550fPfQdo','length','25566kqfkUb','195mxBiEQ'];a145_0x34ab=function(){return _0x239d2c;};return a145_0x34ab();}import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl}from'./shared.js';export const pageCustomList={'service':a145_0x16a575(0x8c),'command':'custom-list','description':a145_0x16a575(0x7e),'risk':a145_0x16a575(0x89),'defaultOutputFormat':a145_0x16a575(0x90),'structuredErrors':!![],'flags':[APPCODE_FLAG],async 'execute'(_0x544b3b){const _0x373233=a145_0x16a575,_0x27e761=(await fetchMenuSnapshot(_0x544b3b[_0x373233(0x85)],_0x544b3b[_0x373233(0x82)]))[_0x373233(0x8e)]['flatMap'](_0x45df38=>{const _0x4e4b26=_0x373233;if(_0x45df38['type']!==_0x4e4b26(0x8b)||_0x45df38[_0x4e4b26(0x8f)]==null)return[];const _0x4f090e=buildCustomPageDevelopmentUrl(_0x544b3b[_0x4e4b26(0x85)],_0x45df38['path']),_0xbe66d3=buildCustomPageEditUrl(_0x544b3b['appCode'],_0x45df38[_0x4e4b26(0x8f)]);return[{'pageId':_0x45df38[_0x4e4b26(0x8f)],'label':_0x45df38[_0x4e4b26(0x7d)],..._0x4f090e?{'pageUrl':_0x4f090e}:{},..._0xbe66d3?{'editPageUrl':_0xbe66d3}:{}}];});return{'ok':!![],'data':{'pages':_0x27e761},'message':_0x27e761[_0x373233(0x7a)]===0x0?_0x373233(0x81):_0x373233(0x88)+_0x27e761[_0x373233(0x7a)]+_0x373233(0x84)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a146_0x40d886=a146_0x3915;function a146_0x9016(){const _0x4e7902=['126uMqmQm','154SAXpel','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','36YqZveD','isInteger','number','pageCode','373EuZnPL','page','warnings','write','remark','str','3312200lXwajY','runtimePageUrl','Custom\x20Page\x20ID','Optional\x20publish\x20remark','FORMAL','push','status','4348MnaPUz','POST','487923LTOvBE','Published\x20Custom\x20Page\x20','pageId','525678UCftWR','29236VNfnUo','Would\x20publish\x20Custom\x20Page\x20','unknown','/smartapi/webcode/file/publish','515THqGov','Publish\x20the\x20latest\x20saved\x20content\x20of\x20a\x20Custom\x20Page','3831740BefqGP','page.custom-publish','Custom\x20Page\x20publish\x20did\x20not\x20reach\x20published\x20status:\x20','appCode','string','apiError','trim','2581476uJDpbb'];a146_0x9016=function(){return _0x4e7902;};return a146_0x9016();}(function(_0x4548f1,_0x5b3040){const _0x2edc82=a146_0x3915,_0x21262c=_0x4548f1();while(!![]){try{const _0x5cde6a=parseInt(_0x2edc82(0xd2))/0x1*(-parseInt(_0x2edc82(0xdf))/0x2)+-parseInt(_0x2edc82(0xe1))/0x3+-parseInt(_0x2edc82(0xe5))/0x4*(parseInt(_0x2edc82(0xe9))/0x5)+parseInt(_0x2edc82(0xe4))/0x6*(parseInt(_0x2edc82(0xcb))/0x7)+-parseInt(_0x2edc82(0xd8))/0x8+parseInt(_0x2edc82(0xce))/0x9*(-parseInt(_0x2edc82(0xeb))/0xa)+-parseInt(_0x2edc82(0xcc))/0xb*(-parseInt(_0x2edc82(0xf2))/0xc);if(_0x5cde6a===_0x5b3040)break;else _0x21262c['push'](_0x21262c['shift']());}catch(_0x2374a6){_0x21262c['push'](_0x21262c['shift']());}}}(a146_0x9016,0xdf8d1));import{getCustomPageSource,publishCustomPage}from'../../../core/api-client.js';import{CliErrors}from'../../../errors.js';function a146_0x3915(_0x5abcec,_0x458603){_0x5abcec=_0x5abcec-0xcb;const _0x901608=a146_0x9016();let _0x3915cf=_0x901608[_0x5abcec];return _0x3915cf;}import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomPublish={'service':a146_0x40d886(0xd3),'command':'custom-publish','description':a146_0x40d886(0xea),'risk':a146_0x40d886(0xd5),'defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a146_0x40d886(0xd0),'required':!![],'description':a146_0x40d886(0xda)},{'name':a146_0x40d886(0xd6),'type':a146_0x40d886(0xef),'description':a146_0x40d886(0xdb)}],async 'validate'(_0x374506){readCustomPageId(_0x374506);},async 'dryRun'(_0x5cf296){const _0x1724cd=a146_0x40d886,_0x1d2592=readInput(_0x5cf296);return{'method':_0x1724cd(0xe0),'url':_0x1724cd(0xe8),'body':{'id':_0x1d2592[_0x1724cd(0xe3)],..._0x1d2592['remark']?{'remark':_0x1d2592[_0x1724cd(0xd6)]}:{}},'description':_0x1724cd(0xe6)+_0x1d2592[_0x1724cd(0xe3)]+'.'};},async 'execute'(_0x240003){const _0x4d192e=a146_0x40d886,_0x460278=readInput(_0x240003);await getCustomPageSource(_0x460278[_0x4d192e(0xe3)]);const _0x5f21c8=await publishCustomPage(_0x460278);if(!Number[_0x4d192e(0xcf)](_0x5f21c8)||_0x5f21c8!==_0x460278['pageId'])throw CliErrors[_0x4d192e(0xf0)]('Custom\x20Page\x20publish\x20did\x20not\x20return\x20the\x20expected\x20page\x20ID.');const _0x589bfa=await getCustomPageSource(_0x460278[_0x4d192e(0xe3)]);if(_0x589bfa['status']!==_0x4d192e(0xdc))throw CliErrors[_0x4d192e(0xf0)](_0x4d192e(0xed)+(_0x589bfa[_0x4d192e(0xde)]??_0x4d192e(0xe7))+'.');const _0x1957f5=_0x589bfa[_0x4d192e(0xee)]?.['trim'](),_0x407c3b=buildCustomPageEditUrl(_0x1957f5,_0x460278[_0x4d192e(0xe3)]),_0x1ffcb9=await resolveCustomPageDevelopmentUrl(_0x1957f5,_0x460278['pageId'],_0x240003['cookie']),_0x576706=buildMutationData(_0x460278,!![],_0x1ffcb9,_0x407c3b);_0x1957f5&&!_0x1ffcb9&&_0x576706[_0x4d192e(0xd4)][_0x4d192e(0xdd)](_0x4d192e(0xcd));const _0x16a855=buildCustomPageRuntimeUrl(_0x589bfa['appCode'],_0x589bfa[_0x4d192e(0xd1)]);return _0x16a855?_0x576706[_0x4d192e(0xd9)]=_0x16a855:_0x576706[_0x4d192e(0xd4)][_0x4d192e(0xdd)]('Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20published\x20page\x20could\x20not\x20be\x20generated.'),{'ok':!![],'data':_0x576706,'message':_0x4d192e(0xe2)+_0x460278[_0x4d192e(0xe3)]+'.'};}};function readInput(_0x436e99){const _0x3cda0d=a146_0x40d886,_0x5242f7=readCustomPageId(_0x436e99),_0x2d5e8c=_0x436e99[_0x3cda0d(0xd7)](_0x3cda0d(0xd6))[_0x3cda0d(0xf1)]();return{'pageId':_0x5242f7,..._0x2d5e8c?{'remark':_0x2d5e8c}:{}};}function buildMutationData(_0x5308e3,_0x3be18b=![],_0x163e6d,_0x16a156){const _0x1fad4a=a146_0x40d886;return{'operation':_0x1fad4a(0xec),'selector':{'pageId':_0x5308e3[_0x1fad4a(0xe3)]},'before':null,'after':{'pageId':_0x5308e3[_0x1fad4a(0xe3)],'status':_0x1fad4a(0xdc)},'dryRun':!_0x3be18b,'request':_0x5308e3,..._0x163e6d?{'pageUrl':_0x163e6d}:{},..._0x16a156?{'editPageUrl':_0x16a156}:{},'warnings':[]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a147_0x1222e2=a147_0x2036;(function(_0xcce2ba,_0xd51404){const _0x5c18bc=a147_0x2036,_0x276d93=_0xcce2ba();while(!![]){try{const _0x544b9a=parseInt(_0x5c18bc(0x138))/0x1+parseInt(_0x5c18bc(0x11e))/0x2*(parseInt(_0x5c18bc(0x12f))/0x3)+-parseInt(_0x5c18bc(0x122))/0x4+parseInt(_0x5c18bc(0x11c))/0x5*(-parseInt(_0x5c18bc(0x136))/0x6)+-parseInt(_0x5c18bc(0x12d))/0x7+-parseInt(_0x5c18bc(0x129))/0x8+parseInt(_0x5c18bc(0x13a))/0x9;if(_0x544b9a===_0xd51404)break;else _0x276d93['push'](_0x276d93['shift']());}catch(_0x32f852){_0x276d93['push'](_0x276d93['shift']());}}}(a147_0x1eaa,0x5f2d0));import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{getEnv,isProduction}from'../../../constant/env.js';import{getAppBaseUrl}from'../../../constant/domain.js';import{CliErrors}from'../../../errors.js';import{validateCustomPageSourceFiles}from'./syntax.js';function a147_0x1eaa(){const _0x1cbff6=['--page-content\x20must\x20be\x20a\x20JSON\x20object\x20whose\x20values\x20are\x20file\x20content\x20strings.','type','menus','map','--id\x20must\x20be\x20a\x20positive\x20integer.','154925rBWpEQ','isArray','10094RHVKBQ','isInteger','flagMissing','page-content','989184GOQhPT','https://daily.lovrabet.com','/pages/','file','message','/app','object','4971640qnwBNL','find','/web-app/app','--page-content\x20must\x20be\x20valid\x20JSON.','38696jwnpBB','https://app.lovrabet.com','126fIAtlX','https://','Optional\x20app\x20code\x20resolved\x20from\x20page\x20ID\x20when\x20omitted','parse','pageId','trim','some','150UjyceY','validation','164464DsmyNl','values','14960754OhHlLG','react','path'];a147_0x1eaa=function(){return _0x1cbff6;};return a147_0x1eaa();}function a147_0x2036(_0x480ba6,_0x3d2921){_0x480ba6=_0x480ba6-0x11a;const _0x1eaa66=a147_0x1eaa();let _0x2036a8=_0x1eaa66[_0x480ba6];return _0x2036a8;}export const CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL={...APPCODE_FLAG_OPTIONAL,'description':a147_0x1222e2(0x131)};function trimOptional(_0x2291d7){const _0x2939c1=a147_0x1222e2;return _0x2291d7?.[_0x2939c1(0x134)]()||undefined;}export function buildCustomPageRuntimeUrl(_0x54906a,_0x565378){const _0xba03c0=a147_0x1222e2,_0xc53b05=trimOptional(_0x54906a),_0x391d37=trimOptional(_0x565378);if(!_0xc53b05||!_0x391d37)return undefined;const _0x29a625=isProduction(getEnv())?_0xc53b05+'.app.lovrabet.com':_0xc53b05+'.daily.lovrabet.com';return _0xba03c0(0x130)+_0x29a625+'/'+encodeURIComponent(_0x391d37);}export function buildCustomPageDevelopmentUrl(_0x45d741,_0x352b64){const _0x5cf87f=a147_0x1222e2,_0x4a0ad1=trimOptional(_0x45d741),_0x36845d=trimOptional(_0x352b64);if(!_0x4a0ad1||!_0x36845d)return undefined;return getAppBaseUrl(_0x4a0ad1)+_0x5cf87f(0x124)+encodeURIComponent(_0x36845d);}export async function resolveCustomPageDevelopmentUrl(_0xbd95ad,_0x28ae09,_0x2da511){const _0x398b63=a147_0x1222e2,_0x29f045=trimOptional(_0xbd95ad);if(!_0x29f045)return undefined;try{const _0x107100=(await fetchMenuSnapshot(_0x29f045,_0x2da511))[_0x398b63(0x13f)][_0x398b63(0x12a)](_0x591c97=>_0x591c97[_0x398b63(0x13e)]===_0x398b63(0x13b)&&_0x591c97[_0x398b63(0x133)]===_0x28ae09);return buildCustomPageDevelopmentUrl(_0x29f045,_0x107100?.[_0x398b63(0x13c)]);}catch{return undefined;}}export function buildCustomPageEditUrl(_0x2fcb8d,_0x5cdca0){const _0xc46a7b=a147_0x1222e2,_0x3d3691=trimOptional(_0x2fcb8d);if(!_0x3d3691)return;const _0x454fbd=trimOptional(_0x5cdca0==null?undefined:String(_0x5cdca0));if(!_0x454fbd)return;const _0x41f601=isProduction(getEnv())?_0xc46a7b(0x127):_0xc46a7b(0x12b),_0x125b88=isProduction(getEnv())?_0xc46a7b(0x12e):_0xc46a7b(0x123);return''+_0x125b88+_0x41f601+'/'+encodeURIComponent(_0x3d3691)+'/ide/'+encodeURIComponent(_0x454fbd);}export function parseCustomPageContent(_0x31a859){const _0x4a487a=a147_0x1222e2;if(!_0x31a859[_0x4a487a(0x134)]())throw CliErrors[_0x4a487a(0x120)](_0x4a487a(0x121));let _0x5e8560;try{_0x5e8560=JSON[_0x4a487a(0x132)](_0x31a859);}catch{throw CliErrors[_0x4a487a(0x137)](_0x4a487a(0x12c));}if(typeof _0x5e8560!==_0x4a487a(0x128)||_0x5e8560===null||Array[_0x4a487a(0x11d)](_0x5e8560)||Object[_0x4a487a(0x139)](_0x5e8560)[_0x4a487a(0x135)](_0x422364=>typeof _0x422364!=='string'))throw CliErrors[_0x4a487a(0x137)](_0x4a487a(0x13d));return _0x5e8560;}export async function validateCustomPageContent(_0x37b2b4){const _0x520fc6=a147_0x1222e2,_0x573a94=await validateCustomPageSourceFiles(_0x37b2b4);if(_0x573a94['length']>0x0)throw CliErrors[_0x520fc6(0x137)]('Invalid\x20Custom\x20Page\x20content:\x20'+_0x573a94[_0x520fc6(0x11a)](_0x4de7c5=>_0x4de7c5[_0x520fc6(0x125)]+':\x20'+_0x4de7c5[_0x520fc6(0x126)])['join'](';\x20'));}export function readCustomPageId(_0x5c4de7){const _0xf7101c=a147_0x1222e2,_0x1c2bae=_0x5c4de7['num']('id');if(!Number[_0xf7101c(0x11f)](_0x1c2bae)||_0x1c2bae<=0x0)throw CliErrors[_0xf7101c(0x137)](_0xf7101c(0x11b));return _0x1c2bae;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a148_0x4928e3=a148_0x50ac;(function(_0x13e3eb,_0x11b90b){const _0x4d1419=a148_0x50ac,_0x35b051=_0x13e3eb();while(!![]){try{const _0x5056a0=parseInt(_0x4d1419(0x101))/0x1+parseInt(_0x4d1419(0x104))/0x2*(-parseInt(_0x4d1419(0x103))/0x3)+-parseInt(_0x4d1419(0x110))/0x4*(parseInt(_0x4d1419(0x10c))/0x5)+parseInt(_0x4d1419(0x10b))/0x6*(-parseInt(_0x4d1419(0x109))/0x7)+-parseInt(_0x4d1419(0xfa))/0x8*(parseInt(_0x4d1419(0x10a))/0x9)+-parseInt(_0x4d1419(0xfb))/0xa*(-parseInt(_0x4d1419(0x102))/0xb)+parseInt(_0x4d1419(0xf7))/0xc;if(_0x5056a0===_0x11b90b)break;else _0x35b051['push'](_0x35b051['shift']());}catch(_0x43a864){_0x35b051['push'](_0x35b051['shift']());}}}(a148_0x9bf1,0x31195));import{format}from'prettier';const SOURCE_PARSERS={'.js':'babel','.jsx':a148_0x4928e3(0x106),'.ts':'typescript','.tsx':a148_0x4928e3(0x10f)},CUSTOM_PAGE_EXTENSIONS=[a148_0x4928e3(0x105),a148_0x4928e3(0x100)];function a148_0x50ac(_0x308129,_0x38fd7c){_0x308129=_0x308129-0xf7;const _0x9bf1f3=a148_0x9bf1();let _0x50ace4=_0x9bf1f3[_0x308129];return _0x50ace4;}export async function validateCustomPageSourceFiles(_0x394102){const _0x3b3f84=a148_0x4928e3,_0x4f6a70=Object[_0x3b3f84(0x111)](_0x394102)[_0x3b3f84(0x107)](([_0x16431e])=>getParser(_0x16431e));if(!_0x4f6a70['some'](([_0x572550])=>isReactSourceFile(_0x572550)))return[{'file':_0x3b3f84(0x108),'message':_0x3b3f84(0x10e)}];const _0x476275=await Promise[_0x3b3f84(0xfc)](_0x4f6a70[_0x3b3f84(0x10d)](async([_0x27e689,_0x4c5631])=>{const _0xeae909=_0x3b3f84;try{return await format(_0x4c5631,{'parser':getParser(_0x27e689)}),undefined;}catch(_0x5ec61f){return{'file':_0x27e689,'message':_0x5ec61f instanceof Error?_0x5ec61f[_0xeae909(0xf8)]:String(_0x5ec61f)};}}));return _0x476275[_0x3b3f84(0x107)](_0x4bcb9b=>_0x4bcb9b!==undefined);}function getParser(_0x170b8f){const _0x228b7a=a148_0x4928e3,_0x54fe5c=_0x170b8f[_0x228b7a(0xf9)]()['toLowerCase']();return Object['entries'](SOURCE_PARSERS)[_0x228b7a(0xfe)](([_0x36b9fd])=>_0x54fe5c[_0x228b7a(0xfd)](_0x36b9fd))?.[0x1];}function a148_0x9bf1(){const _0x58551e=['trim','1151536ZJpDFX','10eCRkve','all','endsWith','find','some','.tsx','219381qDsadP','216887HbNjcV','7683dZzPRB','186UfncmP','.jsx','babel','filter','page-content','5215irpPvM','9MMyEfJ','966zgpabM','48090AKquOj','map','Missing\x20React\x20source\x20file\x20with\x20extension\x20.jsx\x20or\x20.tsx','typescript','4bSUfoQ','entries','5684268otqUaN','message'];a148_0x9bf1=function(){return _0x58551e;};return a148_0x9bf1();}function isReactSourceFile(_0x5b473a){const _0x591178=a148_0x4928e3,_0x5298b6=_0x5b473a[_0x591178(0xf9)]()['toLowerCase']();return CUSTOM_PAGE_EXTENSIONS[_0x591178(0xff)](_0x793aa7=>_0x5298b6[_0x591178(0xfd)](_0x793aa7));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a149_0x1c95(){const _0x2d2feb=['这是一个基础页面模板,你可以在此基础上进行开发。',',\x0a\x20\x20}','\x0a};\x0a','Ini\x20adalah\x20sebuah\x20halaman\x20dasar.\x20Anda\x20dapat\x20mengembangkan\x20ini.','55044DbPAhz','204kuSnvi','Bu\x20bir\x20temel\x20sayfa\x20şablonudur.\x20Bu\x20temaplana\x20dayanarak\x20geliştirilebilir.','en-US','join','stringify','}</Typography.Title>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<Typography.Paragraph>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{$i18n.t(\x27pageDescription\x27,\x20\x27这是一个基础页面模板,你可以在此基础上进行开发。\x27)}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</Typography.Paragraph>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</Typography>\x0a\x20\x20\x20\x20\x20\x20</Card>\x0a\x20\x20\x20\x20</div>\x0a\x20\x20);\x0a};\x0a\x0aexport\x20default\x20App;\x0a','1478625Wcctxi','101521Gxdfwh','import\x20React\x20from\x20\x27react\x27;\x0aimport\x20{\x20Card,\x20Typography\x20}\x20from\x20\x27antd\x27;\x0aimport\x20{\x20useSdkClient,\x20useI18n,\x20useNavigate,\x20useLocation\x20}\x20from\x20\x22@/context/app-context\x22;\x0aimport\x20{\x20locales\x20}\x20from\x20\x27../locales\x27;\x0aimport\x20\x27./index.css\x27;\x0a\x0aconst\x20App\x20=\x20()\x20=>\x20{\x0a\x20\x20const\x20client\x20=\x20useSdkClient();\x20//\x20client\x20可以用于获取其他数据集的数据\x0a\x20\x20const\x20$i18n\x20=\x20useI18n();\x20//\x20国际化多语言\x20i18n\x20实例\x0a\x20\x20const\x20navigate\x20=\x20useNavigate();\x20//\x20react-router\x20navigate\x20导航实例\x0a\x20\x20const\x20location\x20=\x20useLocation();\x20//\x20浏览器\x20location\x20实例\x0a\x0a\x20\x20$i18n.addLocale(locales);\x20//\x20添加多语言词包\x0a\x0a\x20\x20return\x20(\x0a\x20\x20\x20\x20<div\x20className=\x22page-container\x22>\x0a\x20\x20\x20\x20\x20\x20<Card>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<Typography>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<Typography.Title\x20level={2}>{','pageDescription','This\x20is\x20a\x20basic\x20page\x20template,\x20you\x20can\x20develop\x20based\x20on\x20it.','id-ID','map','7303740SiFueh','96hsueFm','307133WSTRKI','356859GtlhrV','これは基本ページテンプレートです。あなたは、これに基づいて開発できます。','export\x20const\x20locales\x20=\x20{\x0a','9DjDtbG','147162oBFYNy'];a149_0x1c95=function(){return _0x2d2feb;};return a149_0x1c95();}(function(_0xbe1e66,_0x5c5595){const _0x271822=a149_0x5e5f,_0x362521=_0xbe1e66();while(!![]){try{const _0x13faa0=parseInt(_0x271822(0xb1))/0x1+-parseInt(_0x271822(0x9c))/0x2+-parseInt(_0x271822(0x9b))/0x3*(parseInt(_0x271822(0xa1))/0x4)+parseInt(_0x271822(0xa8))/0x5+parseInt(_0x271822(0xa2))/0x6*(-parseInt(_0x271822(0xa9))/0x7)+-parseInt(_0x271822(0xb0))/0x8*(parseInt(_0x271822(0xb2))/0x9)+parseInt(_0x271822(0xaf))/0xa;if(_0x13faa0===_0x5c5595)break;else _0x362521['push'](_0x362521['shift']());}catch(_0xa82a5d){_0x362521['push'](_0x362521['shift']());}}}(a149_0x1c95,0x3ce6e));function buildIndexFile(_0xa2a9df){const _0x4dcd94=a149_0x5e5f;return _0x4dcd94(0xaa)+JSON[_0x4dcd94(0xa6)](_0xa2a9df)+_0x4dcd94(0xa7);}function a149_0x5e5f(_0x143f91,_0x54bee1){_0x143f91=_0x143f91-0x99;const _0x1c95c8=a149_0x1c95();let _0x5e5fbe=_0x1c95c8[_0x143f91];return _0x5e5fbe;}function buildStyleFile(){return'.page-container\x20{\x0a\x20\x20padding:\x2024px;\x0a\x20\x20background:\x20#f0f2f5;\x0a\x20\x20min-height:\x20100vh;\x0a}\x0a';}function buildLocalesFile(_0x2caaad){const _0x12053f=a149_0x5e5f,_0x4cde29=_0x2caaad[_0x12053f(0xae)](_0x68ba4f=>{const _0x2103b9=_0x12053f;let _0x57f8a3='';switch(_0x68ba4f){case'zh-CN':_0x57f8a3=_0x2103b9(0x9d);break;case _0x2103b9(0xa4):_0x57f8a3='This\x20is\x20a\x20basic\x20page\x20template,\x20you\x20can\x20develop\x20based\x20on\x20it.';break;case'ja-JP':_0x57f8a3=_0x2103b9(0x99);break;case'tr-TR':_0x57f8a3=_0x2103b9(0xa3);break;case _0x2103b9(0xad):_0x57f8a3=_0x2103b9(0xa0);break;default:_0x57f8a3=_0x2103b9(0xac);}return'\x20\x20'+JSON[_0x2103b9(0xa6)](_0x68ba4f)+':\x20{\x0a\x20\x20\x20\x20'+JSON[_0x2103b9(0xa6)](_0x2103b9(0xab))+':\x20'+JSON[_0x2103b9(0xa6)](_0x57f8a3)+_0x2103b9(0x9e);})[_0x12053f(0xa5)](',\x0a');return _0x12053f(0x9a)+_0x4cde29+_0x12053f(0x9f);}export function buildInitialFiles(_0xd6425f,_0xab98c8){return{'src/app/index.jsx':buildIndexFile(_0xd6425f),'src/app/index.css':buildStyleFile(),'src/locales/index.js':buildLocalesFile(_0xab98c8)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a150_0x504b26=a150_0x5086;(function(_0xade381,_0x9335d1){const _0xb4d9ec=a150_0x5086,_0xfa065f=_0xade381();while(!![]){try{const _0x32f682=-parseInt(_0xb4d9ec(0x17e))/0x1*(parseInt(_0xb4d9ec(0x175))/0x2)+-parseInt(_0xb4d9ec(0x17c))/0x3*(-parseInt(_0xb4d9ec(0x174))/0x4)+-parseInt(_0xb4d9ec(0x18a))/0x5+parseInt(_0xb4d9ec(0x185))/0x6*(parseInt(_0xb4d9ec(0x170))/0x7)+parseInt(_0xb4d9ec(0x189))/0x8+parseInt(_0xb4d9ec(0x176))/0x9*(parseInt(_0xb4d9ec(0x18d))/0xa)+-parseInt(_0xb4d9ec(0x179))/0xb;if(_0x32f682===_0x9335d1)break;else _0xfa065f['push'](_0xfa065f['shift']());}catch(_0x42a557){_0xfa065f['push'](_0xfa065f['shift']());}}}(a150_0xade6,0xa4fe6));import{getCustomPageSource,updateCustomPageContent}from'../../../core/api-client.js';import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,parseCustomPageContent,resolveCustomPageDevelopmentUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,validateCustomPageContent}from'./shared.js';function a150_0xade6(){const _0x150589=['9ohVJDM','page-content','appCode','13843588qPMZup','trim','pageId','102tEDLuy','POST','1168511KYFYTw','validation','Complete\x20page\x20files\x20as\x20JSON','Custom\x20Page\x20was\x20updated,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','cookie','compress','Cannot\x20determine\x20the\x20appCode\x20for\x20Custom\x20Page\x20','66NHineb','pageContent','str','appcode','5396456RmHJvz','3225280oHOQed','number','Would\x20save\x20all\x20files\x20of\x20Custom\x20Page\x20','12385990eFGGkI','Save\x20all\x20files\x20of\x20a\x20Custom\x20Page','page','802011QDxJHA','newVersion','Updated\x20Custom\x20Page\x20','string','67580gDEUhr','2LvyKTE'];a150_0xade6=function(){return _0x150589;};return a150_0xade6();}function a150_0x5086(_0x30698c,_0x5855df){_0x30698c=_0x30698c-0x170;const _0xade6e0=a150_0xade6();let _0x5086f4=_0xade6e0[_0x30698c];return _0x5086f4;}export const pageCustomUpdate={'service':a150_0x504b26(0x18f),'command':'custom-update','description':a150_0x504b26(0x18e),'risk':'write','defaultOutputFormat':a150_0x504b26(0x183),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a150_0x504b26(0x18b),'required':!![],'description':'Custom\x20Page\x20ID'},{'name':'page-content','type':a150_0x504b26(0x173),'required':!![],'description':a150_0x504b26(0x180)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2d2972){const _0x1b654a=a150_0x504b26;readCustomPageId(_0x2d2972),await validateCustomPageContent(parseCustomPageContent(_0x2d2972[_0x1b654a(0x187)](_0x1b654a(0x177))));},async 'dryRun'(_0x1fb6e2){const _0x3ec68d=a150_0x504b26,_0x5e2c1d=await readInput(_0x1fb6e2);return{'method':_0x3ec68d(0x17d),'url':'/smartapi/webcode/page/update/content','body':{'id':_0x5e2c1d[_0x3ec68d(0x17b)],'codeContent':_0x5e2c1d['pageContent']},'description':_0x3ec68d(0x18c)+_0x5e2c1d['pageId']+'.'};},async 'execute'(_0x39831d){const _0x358c57=a150_0x504b26,_0x5bd24b=await readInput(_0x39831d),_0x23530d=await updateCustomPageContent({'pageId':_0x5bd24b[_0x358c57(0x17b)],'pageContent':_0x5bd24b[_0x358c57(0x186)]});if(!Number['isInteger'](_0x23530d['newVersion'])||_0x23530d[_0x358c57(0x171)]<=0x0)throw CliErrors['apiError']('Custom\x20Page\x20update\x20did\x20not\x20create\x20a\x20new\x20version.');const _0x1264f6=buildCustomPageEditUrl(_0x5bd24b[_0x358c57(0x178)],_0x5bd24b[_0x358c57(0x17b)]),_0x30363f=await resolveCustomPageDevelopmentUrl(_0x5bd24b['appCode'],_0x5bd24b[_0x358c57(0x17b)],_0x39831d[_0x358c57(0x182)]);return{'ok':!![],'data':buildMutationData(_0x5bd24b,_0x23530d,_0x30363f,_0x1264f6,_0x30363f?[]:[_0x358c57(0x181)]),'message':_0x358c57(0x172)+_0x5bd24b[_0x358c57(0x17b)]+'.'};}};async function readInput(_0x3ffa8b){const _0x81a3a5=a150_0x504b26,_0x5e8895=readCustomPageId(_0x3ffa8b),_0x26eb61=_0x3ffa8b[_0x81a3a5(0x187)](_0x81a3a5(0x188))[_0x81a3a5(0x17a)]()||(await getCustomPageSource(_0x5e8895))['appCode']?.['trim']();if(!_0x26eb61)throw CliErrors[_0x81a3a5(0x17f)](_0x81a3a5(0x184)+_0x5e8895+'.');return{'appCode':_0x26eb61,'pageId':_0x5e8895,'pageContent':parseCustomPageContent(_0x3ffa8b[_0x81a3a5(0x187)](_0x81a3a5(0x177)))};}function buildMutationData(_0x481520,_0xfcaf75,_0x32478c,_0x431fc8,_0x3cc6bf=[]){const _0x2ff84d=a150_0x504b26;return{'operation':'page.custom-update','selector':{'appCode':_0x481520[_0x2ff84d(0x178)],'pageId':_0x481520['pageId']},'before':null,'after':{'pageId':_0xfcaf75?.[_0x2ff84d(0x17b)]??_0x481520['pageId'],'version':_0xfcaf75?.[_0x2ff84d(0x171)]??null,'pageContent':_0x481520[_0x2ff84d(0x186)]},'dryRun':_0xfcaf75===undefined,'request':_0x481520,..._0x32478c?{'pageUrl':_0x32478c}:{},..._0x431fc8?{'editPageUrl':_0x431fc8}:{},'warnings':_0x3cc6bf};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a151_0x9ded(){const _0x5b6ce4=['read','3476574oNiDcY','query-data-list-status','alias','GET','175018BGDFIm','related-pages-fallback','1690300MNGcPX','length','/standard-page-status?appCode=','916350RlYTXG','77PwttVA','manualResolutionRequired','2073808pmkBdi','code','source','/smartapi/lovrabet/dataset/','nextAction','7632KYmHjL','name','string','relatedPages','5427816MxJCGg','1ynvdvc','21FMVkLU','18cTaXye','status'];a151_0x9ded=function(){return _0x5b6ce4;};return a151_0x9ded();}const a151_0x27d358=a151_0x9e9e;(function(_0x1f3b0d,_0xacbbd3){const _0x203060=a151_0x9e9e,_0xc65261=_0x1f3b0d();while(!![]){try{const _0x2797b0=-parseInt(_0x203060(0x1fc))/0x1*(-parseInt(_0x203060(0x1ea))/0x2)+parseInt(_0x203060(0x1fb))/0x3+parseInt(_0x203060(0x1f7))/0x4+-parseInt(_0x203060(0x1ec))/0x5+-parseInt(_0x203060(0x1e6))/0x6*(parseInt(_0x203060(0x1fd))/0x7)+-parseInt(_0x203060(0x1f2))/0x8*(-parseInt(_0x203060(0x1fe))/0x9)+parseInt(_0x203060(0x1ef))/0xa*(parseInt(_0x203060(0x1f0))/0xb);if(_0x2797b0===_0xacbbd3)break;else _0xc65261['push'](_0xc65261['shift']());}catch(_0x54b2e6){_0xc65261['push'](_0xc65261['shift']());}}}(a151_0x9ded,0xefcdf));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a151_0x9e9e(_0x23c166,_0x389d4d){_0x23c166=_0x23c166-0x1e4;const _0x9ded2f=a151_0x9ded();let _0x9e9e92=_0x9ded2f[_0x23c166];return _0x9e9e92;}import{assessDataListPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';export const pageDataListStatus={'service':'page','command':'data-list-status','description':'Query\x20Data\x20List\x20Page\x20facts\x20for\x20a\x20dataset','risk':a151_0x27d358(0x1e5),'defaultOutputFormat':'compress','flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a151_0x27d358(0x1e8),'type':a151_0x27d358(0x1f9),'description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'}],async 'validate'(_0x3931d9){validateDatasetSelector(_0x3931d9);},async 'dryRun'(_0x9406f7){const _0x4256eb=a151_0x27d358,_0x43ae7e=await loadDatasetDetailForPage(_0x9406f7);return{'method':_0x4256eb(0x1e9),'url':_0x4256eb(0x1f5)+_0x43ae7e['code']+_0x4256eb(0x1ee)+encodeURIComponent(_0x9406f7['appCode']),'description':serializeDryRunDescription({'dataset':{'id':_0x43ae7e['id'],'code':_0x43ae7e['code'],'name':_0x43ae7e[_0x4256eb(0x1f8)]},'action':_0x4256eb(0x1e7)})};},async 'execute'(_0x210c1f){const _0x2502ba=a151_0x27d358,_0x2a0162=await loadDatasetDetailForPage(_0x210c1f),_0x254124=await loadDataListPageStatusForGenerate(_0x210c1f,_0x2a0162[_0x2502ba(0x1f3)]),_0x2e8e56=getUndeletedRelatedPages(_0x2a0162),_0x55dac8=assessDataListPageState(_0x2a0162[_0x2502ba(0x1f3)],_0x254124,{'fallbackUndeletedPages':_0x2e8e56});return{'ok':!![],'data':{'datasetCode':_0x2a0162['code'],'precheckSource':_0x254124?.[_0x2502ba(0x1f4)]??_0x2502ba(0x1eb),'status':_0x55dac8[_0x2502ba(0x1e4)],'manualResolutionRequired':_0x55dac8[_0x2502ba(0x1f1)],'nextAction':_0x55dac8[_0x2502ba(0x1f6)],'dataListPageStatus':_0x254124,'relatedPages':{'total':_0x2a0162[_0x2502ba(0x1fa)]['length'],'undeletedCount':_0x2e8e56[_0x2502ba(0x1ed)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a152_0x320f(_0x219fbe,_0x41f120){_0x219fbe=_0x219fbe-0xb9;const _0x36f4c1=a152_0x36f4();let _0x320f3f=_0x36f4c1[_0x219fbe];return _0x320f3f;}const a152_0xac741e=a152_0x320f;(function(_0x4ba172,_0xc7719b){const _0x5bed47=a152_0x320f,_0x48d0b3=_0x4ba172();while(!![]){try{const _0x2c5326=parseInt(_0x5bed47(0xcf))/0x1+-parseInt(_0x5bed47(0xd1))/0x2*(parseInt(_0x5bed47(0xe7))/0x3)+parseInt(_0x5bed47(0xbd))/0x4*(-parseInt(_0x5bed47(0xc9))/0x5)+-parseInt(_0x5bed47(0xb9))/0x6+parseInt(_0x5bed47(0xc3))/0x7*(-parseInt(_0x5bed47(0xe6))/0x8)+-parseInt(_0x5bed47(0xe9))/0x9*(-parseInt(_0x5bed47(0xe8))/0xa)+parseInt(_0x5bed47(0xc2))/0xb;if(_0x2c5326===_0xc7719b)break;else _0x48d0b3['push'](_0x48d0b3['shift']());}catch(_0x47d023){_0x48d0b3['push'](_0x48d0b3['shift']());}}}(a152_0x36f4,0xcc186));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a152_0x36f4(){const _0x47391d=['20SKRxLZ','6256827QqjFjh','page\x20generate-start\x20does\x20not\x20accept\x20--page-type.','已提交生成任务','CRUD_PAGE_SET','page-pattern','taskId','apply','page\x20generate-start\x20does\x20not\x20accept\x20--page-pattern.','1599114fQcDPE','name','manualResolutionRequired','dataListPageStatus','4dTWyAD','reused','/generate-standard-pages/start','related-pages-fallback','Start\x20async\x20Data\x20List\x20Page\x20generation\x20from\x20a\x20dataset','22571395onsCtP','98odXhqc','page','progressRate','dataset','status','POST','6719705WYIkJc','DATA_LIST','appCode','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','precheck','generate-start','940483qisWwx','allowGenerate','804wTtsRm','This\x20command\x20always\x20generates\x20a\x20DATA_LIST\x20page\x20from\x20a\x20dataset.','Actually\x20execute\x20the\x20generation.\x20Without\x20this\x20flag,\x20only\x20a\x20dry-run\x20preview\x20is\x20shown.','bool','alias','SUCCESS','source','fieldCount','number','DATA_LIST\x20currently\x20has\x20one\x20fixed\x20pattern:\x20CRUD_PAGE_SET.','clientOperationId','/smartapi/lovrabet/dataset/','operationId','page-type','nextAction','复用已有生成任务','code','PARTIAL_SUCCESS','string','compress','message','489272TWAtQk','8061PgtQie'];a152_0x36f4=function(){return _0x47391d;};return a152_0x36f4();}import{assessGenerateOperationState,assessDataListPageState,buildPageGenerateOperationStatusQueryCommand,buildDataListPageStatusQueryCommand,createPageGenerateClientOperationId,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';import{startGenerateDataListPages}from'../../core/api-client.js';export const pageGenerateStart={'service':a152_0xac741e(0xc4),'command':a152_0xac741e(0xce),'description':a152_0xac741e(0xc1),'risk':'write','defaultOutputFormat':a152_0xac741e(0xe4),'rejectedFlags':[{'name':a152_0xac741e(0xde),'message':a152_0xac741e(0xea),'hint':a152_0xac741e(0xd2)},{'name':a152_0xac741e(0xed),'message':a152_0xac741e(0xf0),'hint':a152_0xac741e(0xda)}],'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a152_0xac741e(0xd5),'type':a152_0xac741e(0xe3),'description':a152_0xac741e(0xcc)},{'name':a152_0xac741e(0xef),'type':'boolean','description':a152_0xac741e(0xd3)}],async 'validate'(_0x466c33){validateDatasetSelector(_0x466c33);},async 'dryRun'(_0x49df24){const _0x5235d1=a152_0xac741e,_0x5608c7=await prepare(_0x49df24);return{'method':_0x5235d1(0xc8),'url':_0x5235d1(0xdc)+_0x5608c7['dataset'][_0x5235d1(0xe1)]+_0x5235d1(0xbf),'body':{'appCode':_0x49df24[_0x5235d1(0xcb)],'clientOperationId':_0x5608c7[_0x5235d1(0xdb)]},'description':serializeDryRunDescription({'dataset':{'id':_0x5608c7[_0x5235d1(0xc6)]['id'],'code':_0x5608c7[_0x5235d1(0xc6)][_0x5235d1(0xe1)],'name':_0x5608c7[_0x5235d1(0xc6)][_0x5235d1(0xba)],'fieldCount':_0x5608c7['dataset'][_0x5235d1(0xd8)]},'precheckSource':_0x5608c7['dataListPageStatus']?.[_0x5235d1(0xd7)]??_0x5235d1(0xc0),'action':_0x5235d1(0xce),'clientOperationId':_0x5608c7[_0x5235d1(0xdb)],'plannedStatus':_0x5608c7[_0x5235d1(0xcd)]['status'],'reason':_0x5608c7[_0x5235d1(0xcd)][_0x5235d1(0xe5)]})};},async 'execute'(_0x51955c){const _0x4ac14a=a152_0xac741e;if(!_0x51955c[_0x4ac14a(0xd4)](_0x4ac14a(0xef))){const _0x256f00=await pageGenerateStart['dryRun'](_0x51955c);return{'ok':!![],'message':'Dry-run\x20preview\x20(pass\x20--apply\x20to\x20execute\x20the\x20generation)','data':_0x256f00};}const _0x54e984=await prepare(_0x51955c);if(!_0x54e984[_0x4ac14a(0xcd)][_0x4ac14a(0xd0)])return{'ok':![],'message':_0x54e984[_0x4ac14a(0xcd)][_0x4ac14a(0xe5)],'data':{'datasetCode':_0x54e984[_0x4ac14a(0xc6)]['code'],'pageType':_0x4ac14a(0xca),'pagePattern':_0x4ac14a(0xec),'clientOperationId':_0x54e984[_0x4ac14a(0xdb)],'precheckSource':_0x54e984[_0x4ac14a(0xbc)]?.[_0x4ac14a(0xd7)]??'related-pages-fallback','status':_0x54e984[_0x4ac14a(0xcd)][_0x4ac14a(0xc7)],'manualResolutionRequired':_0x54e984[_0x4ac14a(0xcd)][_0x4ac14a(0xbb)],'nextAction':_0x54e984[_0x4ac14a(0xcd)][_0x4ac14a(0xdf)],'query':{'command':buildDataListPageStatusQueryCommand(_0x54e984[_0x4ac14a(0xc6)][_0x4ac14a(0xe1)],_0x51955c[_0x4ac14a(0xcb)])},'dataListPageStatus':_0x54e984[_0x4ac14a(0xbc)]}};const _0x2f2d7b=await startGenerateDataListPages(_0x51955c['appCode'],_0x54e984[_0x4ac14a(0xc6)][_0x4ac14a(0xe1)],{'clientOperationId':_0x54e984['clientOperationId']}),_0x1b3781=_0x2f2d7b[_0x4ac14a(0xc7)]===_0x4ac14a(0xd6)||_0x2f2d7b[_0x4ac14a(0xc7)]===_0x4ac14a(0xe2)?await loadDataListPageStatusForGenerate(_0x51955c,_0x54e984[_0x4ac14a(0xc6)][_0x4ac14a(0xe1)]):null,_0x22fb02=assessGenerateOperationState(_0x54e984[_0x4ac14a(0xc6)][_0x4ac14a(0xe1)],_0x2f2d7b['status'],_0x1b3781);return{'ok':!![],'message':_0x2f2d7b[_0x4ac14a(0xbe)]?_0x4ac14a(0xe0):_0x4ac14a(0xeb),'data':{'datasetCode':_0x54e984['dataset']['code'],'appCode':_0x51955c[_0x4ac14a(0xcb)],'pageType':'DATA_LIST','pagePattern':_0x4ac14a(0xec),'taskId':_0x2f2d7b[_0x4ac14a(0xee)]??null,'operationId':_0x2f2d7b[_0x4ac14a(0xdd)]??null,'clientOperationId':_0x54e984[_0x4ac14a(0xdb)],'jobStatus':_0x2f2d7b[_0x4ac14a(0xc7)]??null,'progressRate':typeof _0x2f2d7b[_0x4ac14a(0xc5)]===_0x4ac14a(0xd9)?_0x2f2d7b[_0x4ac14a(0xc5)]:null,'currentStep':_0x2f2d7b['currentStep']??null,'reused':_0x2f2d7b['reused']===!![],'status':_0x22fb02[_0x4ac14a(0xc7)],'manualResolutionRequired':_0x22fb02[_0x4ac14a(0xbb)],'nextAction':_0x22fb02[_0x4ac14a(0xdf)],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x54e984[_0x4ac14a(0xc6)][_0x4ac14a(0xe1)],{'appCode':_0x51955c[_0x4ac14a(0xcb)],'taskId':_0x2f2d7b['taskId'],'operationId':_0x2f2d7b[_0x4ac14a(0xdd)],'clientOperationId':_0x54e984['clientOperationId']})},'dataListPageStatus':_0x1b3781}};}};async function prepare(_0xd30810){const _0x4172a8=a152_0xac741e,_0x23df6d=await loadDatasetDetailForPage(_0xd30810),_0xa7ba81=await loadDataListPageStatusForGenerate(_0xd30810,_0x23df6d['code']),_0x204ed9=getUndeletedRelatedPages(_0x23df6d);return{'dataset':_0x23df6d,'dataListPageStatus':_0xa7ba81,'clientOperationId':createPageGenerateClientOperationId(),'precheck':assessDataListPageState(_0x23df6d[_0x4172a8(0xe1)],_0xa7ba81,{'fallbackUndeletedPages':_0x204ed9})};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a153_0x31f387=a153_0x1da6;function a153_0x1da6(_0x53616d,_0x1e5381){_0x53616d=_0x53616d-0x1ee;const _0x433852=a153_0x4338();let _0x1da62a=_0x433852[_0x53616d];return _0x1da62a;}(function(_0x21ab87,_0x2556f6){const _0x5ae74d=a153_0x1da6,_0x58763b=_0x21ab87();while(!![]){try{const _0x16d2f2=-parseInt(_0x5ae74d(0x206))/0x1*(parseInt(_0x5ae74d(0x1f8))/0x2)+-parseInt(_0x5ae74d(0x204))/0x3*(-parseInt(_0x5ae74d(0x1f3))/0x4)+-parseInt(_0x5ae74d(0x211))/0x5*(parseInt(_0x5ae74d(0x20a))/0x6)+-parseInt(_0x5ae74d(0x1f0))/0x7*(parseInt(_0x5ae74d(0x1fa))/0x8)+parseInt(_0x5ae74d(0x1f7))/0x9+-parseInt(_0x5ae74d(0x200))/0xa*(parseInt(_0x5ae74d(0x202))/0xb)+-parseInt(_0x5ae74d(0x217))/0xc*(-parseInt(_0x5ae74d(0x21a))/0xd);if(_0x16d2f2===_0x2556f6)break;else _0x58763b['push'](_0x58763b['shift']());}catch(_0x37d12a){_0x58763b['push'](_0x58763b['shift']());}}}(a153_0x4338,0xd431d));function a153_0x4338(){const _0x401ab8=['progressRate','73120SKahsS','task-id','GET','str','8436375ZnVclX','8SrMSJq','message','112fpdCch','taskId','PARTIAL_SUCCESS','name','string','nextAction','1130uPZOvz','set','31295VOjHTP','page','51wxVmdh','Client\x20recovery/idempotency\x20id\x20when\x20operationId\x20is\x20unavailable\x20or\x20lost','303458JyfgDE','number','operation_failed','clientOperationId','6204CBTmvZ','operationId','/generate-standard-pages/status?','errorMsg','read','code','toString','6985LHxuGk','client-operation-id','alias','appCode','result','generate-status','5902188sDcPrr','status','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','91CdYxFV','Query\x20Data\x20List\x20Page\x20generate\x20operation\x20status','Async\x20operation\x20id\x20returned\x20by\x20page\x20generate-start','operation-id','manualResolutionRequired','421057xQuXGQ','SUCCESS'];a153_0x4338=function(){return _0x401ab8;};return a153_0x4338();}import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessGenerateOperationState,buildPageGenerateOperationStatusQueryCommand,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector,validateGenerateOperationSelector}from'../../commands/page/shared.js';import{getGenerateDataListPagesStatus}from'../../core/api-client.js';export const pageGenerateStatus={'service':a153_0x31f387(0x203),'command':a153_0x31f387(0x216),'description':a153_0x31f387(0x21b),'risk':a153_0x31f387(0x20e),'defaultOutputFormat':'compress','flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a153_0x31f387(0x213),'type':a153_0x31f387(0x1fe),'description':a153_0x31f387(0x219)},{'name':'task-id','type':a153_0x31f387(0x1fe),'description':'Generic\x20task\x20id\x20returned\x20by\x20page\x20generate-start'},{'name':a153_0x31f387(0x1ee),'type':a153_0x31f387(0x1fe),'description':a153_0x31f387(0x21c)},{'name':a153_0x31f387(0x212),'type':'string','description':a153_0x31f387(0x205)}],async 'validate'(_0x555afa){validateDatasetSelector(_0x555afa),validateGenerateOperationSelector(_0x555afa);},async 'dryRun'(_0x15e009){const _0x630100=a153_0x31f387,_0x7632ab=await loadDatasetDetailForPage(_0x15e009),_0x11f6dc=_0x15e009[_0x630100(0x1f6)]('task-id'),_0x3ad687=_0x15e009[_0x630100(0x1f6)]('operation-id'),_0xe74abb=_0x15e009[_0x630100(0x1f6)](_0x630100(0x212)),_0x49bd99=new URLSearchParams({'appCode':_0x15e009[_0x630100(0x214)]});return _0x11f6dc&&_0x49bd99[_0x630100(0x201)]('taskId',_0x11f6dc),_0x3ad687&&_0x49bd99[_0x630100(0x201)](_0x630100(0x20b),_0x3ad687),_0xe74abb&&_0x49bd99[_0x630100(0x201)](_0x630100(0x209),_0xe74abb),{'method':_0x630100(0x1f5),'url':'/smartapi/lovrabet/dataset/'+_0x7632ab[_0x630100(0x20f)]+_0x630100(0x20c)+_0x49bd99[_0x630100(0x210)](),'description':serializeDryRunDescription({'dataset':{'id':_0x7632ab['id'],'code':_0x7632ab[_0x630100(0x20f)],'name':_0x7632ab[_0x630100(0x1fd)]},'action':'query-generate-operation-status','taskId':_0x11f6dc||undefined,'operationId':_0x3ad687||undefined,'clientOperationId':_0xe74abb||undefined})};},async 'execute'(_0x357b3a){const _0x539e0a=a153_0x31f387,_0x1ce595=await loadDatasetDetailForPage(_0x357b3a),_0x5c89b7=_0x357b3a['str'](_0x539e0a(0x1f4)),_0x3ed604=_0x357b3a[_0x539e0a(0x1f6)]('operation-id'),_0x3f0c32=_0x357b3a[_0x539e0a(0x1f6)]('client-operation-id'),_0x54befe=await getGenerateDataListPagesStatus(_0x357b3a[_0x539e0a(0x214)],_0x1ce595[_0x539e0a(0x20f)],{'taskId':_0x5c89b7||undefined,'operationId':_0x3ed604||undefined,'clientOperationId':_0x3f0c32||undefined}),_0xfef4b3=_0x54befe[_0x539e0a(0x218)]===_0x539e0a(0x1f1)||_0x54befe[_0x539e0a(0x218)]===_0x539e0a(0x1fc),_0x22a048=_0xfef4b3?await loadDataListPageStatusForGenerate(_0x357b3a,_0x1ce595['code']):null,_0xfdb692=assessGenerateOperationState(_0x1ce595[_0x539e0a(0x20f)],_0x54befe[_0x539e0a(0x218)],_0x22a048),_0x533dc1=_0x54befe[_0x539e0a(0x1fb)]??_0x5c89b7??undefined,_0x32d531=_0x54befe[_0x539e0a(0x20b)]??_0x3ed604??undefined,_0x5b8248=_0x54befe['clientOperationId']??_0x3f0c32??undefined;return{'ok':!![],'message':_0xfdb692[_0x539e0a(0x218)]===_0x539e0a(0x208)?_0x54befe[_0x539e0a(0x20d)]||_0xfdb692[_0x539e0a(0x1f9)]:_0xfdb692[_0x539e0a(0x1f9)],'data':{'datasetCode':_0x1ce595['code'],'appCode':_0x357b3a[_0x539e0a(0x214)],'taskId':_0x533dc1,'operationId':_0x32d531,'clientOperationId':_0x5b8248,'jobStatus':_0x54befe['status']??null,'progressRate':typeof _0x54befe[_0x539e0a(0x1f2)]===_0x539e0a(0x207)?_0x54befe['progressRate']:null,'currentStep':_0x54befe['currentStep']??null,'errorMsg':_0x54befe[_0x539e0a(0x20d)]??null,'status':_0xfdb692[_0x539e0a(0x218)],'manualResolutionRequired':_0xfdb692[_0x539e0a(0x1ef)],'nextAction':_0xfdb692[_0x539e0a(0x1ff)],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x1ce595[_0x539e0a(0x20f)],{'appCode':_0x357b3a[_0x539e0a(0x214)],'taskId':_0x533dc1,'operationId':_0x32d531,'clientOperationId':_0x5b8248})},'dataListPageStatus':_0x22a048,'result':_0x54befe[_0x539e0a(0x215)]??null}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a154_0x12ca(_0x3cde63,_0x4e8cf2){_0x3cde63=_0x3cde63-0x7e;const _0x8f6cc2=a154_0x8f6c();let _0x12ca6c=_0x8f6cc2[_0x3cde63];return _0x12ca6c;}(function(_0x2f61ce,_0x34ec54){const _0x1e655a=a154_0x12ca,_0x3c1d4f=_0x2f61ce();while(!![]){try{const _0x1698d5=parseInt(_0x1e655a(0x85))/0x1+-parseInt(_0x1e655a(0x83))/0x2*(parseInt(_0x1e655a(0x84))/0x3)+-parseInt(_0x1e655a(0x7f))/0x4*(parseInt(_0x1e655a(0x81))/0x5)+parseInt(_0x1e655a(0x82))/0x6+-parseInt(_0x1e655a(0x88))/0x7*(parseInt(_0x1e655a(0x86))/0x8)+-parseInt(_0x1e655a(0x80))/0x9*(-parseInt(_0x1e655a(0x87))/0xa)+parseInt(_0x1e655a(0x7e))/0xb;if(_0x1698d5===_0x34ec54)break;else _0x3c1d4f['push'](_0x3c1d4f['shift']());}catch(_0x1461ea){_0x3c1d4f['push'](_0x3c1d4f['shift']());}}}(a154_0x8f6c,0xb19d8));import{pageGenerateStart}from'../../commands/page/generate-start.js';import{pageGenerateStatus}from'../../commands/page/generate-status.js';import{pageDataListStatus}from'../../commands/page/data-list-status.js';import{pageSync}from'../../commands/page/sync.js';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';function a154_0x8f6c(){const _0x3c480d=['374672peznrg','10XBqQNE','56kIwyKq','5981624Awvbjh','2941276dRtyvB','1908693sUwJun','5lyipjQ','6743202LnuwMX','322kPSIqd','21429eIqNzE','1107798zOdygw'];a154_0x8f6c=function(){return _0x3c480d;};return a154_0x8f6c();}import{pageCreate}from'../../commands/page/create.js';import{pageCustomDetail}from'../../commands/page/custom/detail.js';import{pageCustomList}from'../../commands/page/custom/list.js';import{pageCustomPublish}from'../../commands/page/custom/publish.js';import{pageCustomUpdate}from'../../commands/page/custom/update.js';export const pageDefinitions=[pageGenerateStart,pageGenerateStatus,pageDataListStatus,pageRelationAudit,pageSync,pagePull,pagePush,pageRestore,pageCreate,pageCustomList,pageCustomDetail,pageCustomPublish,pageCustomUpdate];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a155_0xd88adf=a155_0x3612;(function(_0x462c18,_0x5b65a6){const _0x137f5d=a155_0x3612,_0x451d10=_0x462c18();while(!![]){try{const _0x13fae2=-parseInt(_0x137f5d(0x1c3))/0x1*(parseInt(_0x137f5d(0x1a1))/0x2)+parseInt(_0x137f5d(0x1a4))/0x3+-parseInt(_0x137f5d(0x198))/0x4+parseInt(_0x137f5d(0x1c8))/0x5*(parseInt(_0x137f5d(0x195))/0x6)+-parseInt(_0x137f5d(0x1a8))/0x7*(-parseInt(_0x137f5d(0x18d))/0x8)+parseInt(_0x137f5d(0x1c1))/0x9+-parseInt(_0x137f5d(0x1bc))/0xa;if(_0x13fae2===_0x5b65a6)break;else _0x451d10['push'](_0x451d10['shift']());}catch(_0x5f23c9){_0x451d10['push'](_0x451d10['shift']());}}}(a155_0x1e08,0xdee9f));import{writeFile}from'node:fs/promises';function a155_0x1e08(){const _0x571afb=['Dataset\x20\x22','compress','14797200TSmpjp','items','map','filter','number','16280802VxzbTY','datasetIds','427288nruJzK','datasetCode','Pull\x20page\x20schema\x20to\x20local\x20files','Use\x20--force\x20to\x20overwrite\x20local\x20changes.','reason','6356495vzjiYj','\x20skipped','validation','拉取完成:\x20','bool','force','32KyBcLD','all','name','\x20pulled,\x20','/smartapi/lovrabet/detail\x20(per\x20selected\x20page)','Overwrite\x20local\x20files\x20even\x20when\x20unsynced\x20local\x20changes\x20exist','lastSync','push','6cgDzsa','hash','lockFilePath','1365852mFDgJW','status','mode','version-tag','str','relatedPages','Page\x20ID','batch','type','8CSqWik','pageId','localPath','282087dEgTVP','would_pull','boolean','detail','2220897fMPdJG','page','local\x20unsynced\x20changes','alias','length','code','utf8','string','pull','pageVersion','pages','appCode','single','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','Page\x20group\x20version\x20tag\x20(batch\x20mode\x20only)','conflict','read','versionTag'];a155_0x1e08=function(){return _0x571afb;};return a155_0x1e08();}import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getPageIdFlag,loadDatasetDetailForPage,loadPageDetailForPage,selectVersionTagGroup,serializeDryRunDescription,validatePageTargetSelector}from'../../commands/page/shared.js';import{computePageContentHash,computePageFileHash,serializePageSchemaForFile}from'../../core/page/hash.js';import{ensureParentDirectory,fileExists,loadPageProjectConfig,resolvePageFilePath}from'../../core/page/file-system.js';import{createEmptyPageLock,ensurePageLockScope,readPageLockFile,writePageLockFile}from'../../core/page/lock.js';import{CliErrors}from'../../errors.js';function a155_0x3612(_0xe3d55e,_0x12d903){_0xe3d55e=_0xe3d55e-0x18a;const _0x1e0885=a155_0x1e08();let _0x3612b3=_0x1e0885[_0xe3d55e];return _0x3612b3;}export const pagePull={'service':a155_0xd88adf(0x1a9),'command':a155_0xd88adf(0x1b0),'description':a155_0xd88adf(0x1c5),'risk':a155_0xd88adf(0x1b8),'defaultOutputFormat':a155_0xd88adf(0x1bb),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'id','type':a155_0xd88adf(0x1c0),'description':a155_0xd88adf(0x19e)},DATASETCODE_FLAG_OPTIONAL,{'name':a155_0xd88adf(0x1ab),'type':a155_0xd88adf(0x1af),'description':a155_0xd88adf(0x1b5)},{'name':a155_0xd88adf(0x19b),'type':'string','description':a155_0xd88adf(0x1b6)},{'name':a155_0xd88adf(0x18c),'type':a155_0xd88adf(0x1a6),'description':a155_0xd88adf(0x192)}],async 'validate'(_0x1f8140){validatePageTargetSelector(_0x1f8140);},async 'dryRun'(_0x56ca55){const _0x1941a5=a155_0xd88adf,_0x21e5c5=await buildPullPlan(_0x56ca55);return{'method':'GET','url':_0x21e5c5[_0x1941a5(0x19a)]===_0x1941a5(0x1b4)?'/smartapi/lovrabet/detail?pageId='+(_0x21e5c5[_0x1941a5(0x1bd)][0x0]?.[_0x1941a5(0x1a7)][_0x1941a5(0x1a2)]??''):_0x1941a5(0x191),'body':{'appCode':_0x56ca55[_0x1941a5(0x1b3)],'mode':_0x21e5c5[_0x1941a5(0x19a)],'targetDatasetCode':_0x21e5c5[_0x1941a5(0x1c4)]??null,'pages':_0x21e5c5['items']['map'](toPreviewItem)},'description':serializeDryRunDescription({'mode':_0x21e5c5[_0x1941a5(0x19a)],'datasetCode':_0x21e5c5[_0x1941a5(0x1c4)]??null,'totalCandidates':_0x21e5c5[_0x1941a5(0x1bd)]['length'],'totalWouldPull':_0x21e5c5[_0x1941a5(0x1bd)][_0x1941a5(0x1bf)](_0x3a03b7=>_0x3a03b7[_0x1941a5(0x199)]===_0x1941a5(0x1a5))['length'],'totalConflicts':_0x21e5c5[_0x1941a5(0x1bd)][_0x1941a5(0x1bf)](_0x442ade=>_0x442ade['status']===_0x1941a5(0x1b7))[_0x1941a5(0x1ac)]})};},async 'execute'(_0x90c61b){const _0xf5520e=a155_0xd88adf,_0x2696e1=loadPageProjectConfig(_0x90c61b[_0xf5520e(0x1b3)]),_0x331208=await readPageLockFile(_0x2696e1[_0xf5520e(0x197)]),{lockData:_0x381ae3,appLock:_0x522cce}=ensurePageLockScope(_0x331208??createEmptyPageLock(),_0x90c61b[_0xf5520e(0x1b3)]),_0x6f47f5=await buildPullPlan(_0x90c61b),_0x2e8a2b=_0x90c61b[_0xf5520e(0x18b)](_0xf5520e(0x18c));if(_0x6f47f5[_0xf5520e(0x19a)]===_0xf5520e(0x1b4)&&_0x6f47f5[_0xf5520e(0x1bd)][0x0]?.[_0xf5520e(0x199)]===_0xf5520e(0x1b7)&&!_0x2e8a2b)throw CliErrors[_0xf5520e(0x1ca)]('Local\x20page\x20file\x20has\x20unsynced\x20changes:\x20'+_0x6f47f5[_0xf5520e(0x1bd)][0x0][_0xf5520e(0x1a3)],_0xf5520e(0x1c6));const _0x5141ca=[],_0x2391e9=[];for(const _0x451179 of _0x6f47f5[_0xf5520e(0x1bd)]){if(_0x451179[_0xf5520e(0x199)]===_0xf5520e(0x1b7)&&!_0x2e8a2b){_0x2391e9['push']({'pageId':_0x451179['detail'][_0xf5520e(0x1a2)],'type':_0x451179['detail']['type'],'title':_0x451179['detail'][_0xf5520e(0x18f)],'localPath':_0x451179['localPath'],'reason':_0x451179['reason']??'local\x20unsynced\x20changes'});continue;}await ensureParentDirectory(_0x451179['localPath']);const _0x4ce533=serializePageSchemaForFile(_0x451179[_0xf5520e(0x1a7)][_0xf5520e(0x1ad)]);await writeFile(_0x451179[_0xf5520e(0x1a3)],_0x4ce533,_0xf5520e(0x1ae)),_0x522cce[_0xf5520e(0x1b2)][String(_0x451179[_0xf5520e(0x1a7)][_0xf5520e(0x1a2)])]=buildLockEntry(_0x451179['detail'],_0x4ce533),_0x5141ca[_0xf5520e(0x194)]({'pageId':_0x451179[_0xf5520e(0x1a7)][_0xf5520e(0x1a2)],'type':_0x451179[_0xf5520e(0x1a7)][_0xf5520e(0x1a0)],'title':_0x451179[_0xf5520e(0x1a7)]['name'],'localPath':_0x451179[_0xf5520e(0x1a3)]});}return _0x522cce[_0xf5520e(0x193)]=new Date()['toISOString'](),await writePageLockFile(_0x2696e1[_0xf5520e(0x197)],_0x381ae3),{'ok':!![],'message':_0xf5520e(0x18a)+_0x5141ca[_0xf5520e(0x1ac)]+_0xf5520e(0x190)+_0x2391e9['length']+_0xf5520e(0x1c9),'data':{'appCode':_0x90c61b['appCode'],'pulledPages':_0x5141ca,'skippedPages':_0x2391e9,'totalPulled':_0x5141ca['length'],'totalSkipped':_0x2391e9['length']}};}};async function buildPullPlan(_0x34c240){const _0xc4e7b4=a155_0xd88adf,_0x3a17d0=loadPageProjectConfig(_0x34c240['appCode']),_0x4bdaed=await readPageLockFile(_0x3a17d0[_0xc4e7b4(0x197)]),{appLock:_0x361afa}=ensurePageLockScope(_0x4bdaed??createEmptyPageLock(),_0x34c240[_0xc4e7b4(0x1b3)]),_0x287502=getPageIdFlag(_0x34c240);if(_0x287502!==undefined){const _0x5cc2ef=await loadPageDetailForPage(_0x34c240,_0x287502);return{'mode':_0xc4e7b4(0x1b4),'items':[await inspectPullTarget(_0x3a17d0,_0x361afa['pages'][String(_0x5cc2ef[_0xc4e7b4(0x1a2)])],_0x5cc2ef)]};}const _0x58aff7=await loadDatasetDetailForPage(_0x34c240),_0x17d9cd=_0x58aff7[_0xc4e7b4(0x19d)][_0xc4e7b4(0x1bf)](_0x3a2c2f=>!_0x3a2c2f['deleted']);if(_0x17d9cd[_0xc4e7b4(0x1ac)]===0x0)throw CliErrors[_0xc4e7b4(0x1ca)](_0xc4e7b4(0x1ba)+_0x58aff7[_0xc4e7b4(0x1ad)]+'\x22\x20has\x20no\x20undeleted\x20related\x20pages.');const _0x2af9ea=await Promise[_0xc4e7b4(0x18e)](_0x17d9cd[_0xc4e7b4(0x1be)](_0x4d2a57=>loadPageDetailForPage(_0x34c240,_0x4d2a57['id']))),_0x326ade=selectVersionTagGroup(_0x2af9ea,_0x21e470=>_0x21e470['versionTag'],_0x34c240[_0xc4e7b4(0x19c)](_0xc4e7b4(0x19b)));return{'mode':_0xc4e7b4(0x19f),'datasetCode':_0x58aff7['code'],'items':await Promise['all'](_0x326ade[_0xc4e7b4(0x1bd)][_0xc4e7b4(0x1be)](_0x5b7412=>inspectPullTarget(_0x3a17d0,_0x361afa[_0xc4e7b4(0x1b2)][String(_0x5b7412[_0xc4e7b4(0x1a2)])],_0x5b7412)))};}async function inspectPullTarget(_0x152292,_0x55608c,_0x2fdf04){const _0x1b79f4=a155_0xd88adf,_0x5b717b=resolvePageFilePath(_0x152292,_0x2fdf04[_0x1b79f4(0x1a2)],_0x2fdf04[_0x1b79f4(0x1a0)]),_0x1d3673=await fileExists(_0x5b717b);if(!_0x1d3673){const _0x18ff23=serializePageSchemaForFile(_0x2fdf04['code']);return{'detail':_0x2fdf04,'localPath':_0x5b717b,'localHash':computePageContentHash(_0x18ff23),'status':_0x1b79f4(0x1a5)};}const _0x4b5007=await computePageFileHash(_0x5b717b);if(!_0x55608c||_0x4b5007!==_0x55608c[_0x1b79f4(0x196)])return{'detail':_0x2fdf04,'localPath':_0x5b717b,'localHash':_0x4b5007,'status':_0x1b79f4(0x1b7),'reason':_0x1b79f4(0x1aa)};return{'detail':_0x2fdf04,'localPath':_0x5b717b,'localHash':_0x4b5007,'status':_0x1b79f4(0x1a5)};}function buildLockEntry(_0x5ba1a5,_0x1bae00){const _0x142e62=a155_0xd88adf;return{'hash':computePageContentHash(_0x1bae00),'pageId':_0x5ba1a5[_0x142e62(0x1a2)],'pageVersion':_0x5ba1a5[_0x142e62(0x1b1)],'type':_0x5ba1a5['type'],'title':_0x5ba1a5[_0x142e62(0x18f)],'datasetIds':_0x5ba1a5[_0x142e62(0x1c2)],'versionTag':_0x5ba1a5[_0x142e62(0x1b9)]};}function toPreviewItem(_0x31469c){const _0x43e196=a155_0xd88adf;return{'pageId':_0x31469c['detail']['pageId'],'type':_0x31469c[_0x43e196(0x1a7)][_0x43e196(0x1a0)],'title':_0x31469c['detail'][_0x43e196(0x18f)],'localPath':_0x31469c[_0x43e196(0x1a3)],'status':_0x31469c[_0x43e196(0x199)],..._0x31469c[_0x43e196(0x1c7)]?{'reason':_0x31469c[_0x43e196(0x1c7)]}:{}};}
|