@lovrabet/rabetbase-cli 2.5.4-beta.1 → 2.5.4-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/README.md +4 -3
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.d.ts +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.d.ts +2 -0
- package/lib/commands/user-account/feishu-bind.js +1 -0
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.d.ts +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.d.ts +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.d.ts +4 -0
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.d.ts +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.d.ts +14 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.d.ts +1 -0
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +2 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.d.ts +15 -3
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.d.ts +2 -2
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.d.ts +5 -0
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +4 -3
- package/skills/rabetbase/guides/sql-creation-workflow.md +1 -1
- package/skills/rabetbase/guides/sql-mybatis.md +12 -8
- package/skills/rabetbase/references/rabetbase-config.md +6 -4
- package/skills/rabetbase/references/rabetbase-init.md +7 -5
- package/skills/rabetbase/references/rabetbase-kb.md +8 -6
- package/skills/rabetbase/references/rabetbase-user-account.md +20 -2
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const a181_0xc65655=a181_0x5673;(function(_0x82156a,_0x1d4874){const _0x334b23=a181_0x5673,_0x7544=_0x82156a();while(!![]){try{const _0x335fd4=-parseInt(_0x334b23(0x114))/0x1*(-parseInt(_0x334b23(0x129))/0x2)+-parseInt(_0x334b23(0x100))/0x3*(parseInt(_0x334b23(0x16f))/0x4)+parseInt(_0x334b23(0x147))/0x5*(-parseInt(_0x334b23(0x15d))/0x6)+parseInt(_0x334b23(0x175))/0x7*(parseInt(_0x334b23(0x16d))/0x8)+-parseInt(_0x334b23(0x139))/0x9*(-parseInt(_0x334b23(0x164))/0xa)+parseInt(_0x334b23(0x117))/0xb+-parseInt(_0x334b23(0x12a))/0xc;if(_0x335fd4===_0x1d4874)break;else _0x7544['push'](_0x7544['shift']());}catch(_0x5ea72b){_0x7544['push'](_0x7544['shift']());}}}(a181_0x37f6,0xbb287));import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=['EMAIL',a181_0xc65655(0x159),a181_0xc65655(0x15b),a181_0xc65655(0x153),a181_0xc65655(0x14b)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a181_0xc65655(0x169),'channelType',a181_0xc65655(0x14e),a181_0xc65655(0x135),'description',a181_0xc65655(0x12c),'readTimeout']),FORBIDDEN_IDENTITY_FIELDS=new Set(['id','appCode','configCode',a181_0xc65655(0x105)]),EMAIL_RECIPIENT_FIELDS=new Set([a181_0xc65655(0x126),a181_0xc65655(0x107),'ccList','bccList',a181_0xc65655(0x10e),a181_0xc65655(0x122),a181_0xc65655(0x123),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':'file','type':a181_0xc65655(0x151),'required':![],'description':a181_0xc65655(0x156)},{'name':a181_0xc65655(0x13a),'type':'boolean','required':![],'default':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin'},{'name':a181_0xc65655(0x144),'type':a181_0xc65655(0x151),'required':![],'description':a181_0xc65655(0x152)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':'number','required':!![],'description':a181_0xc65655(0x136)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x3c2da5,_0x2ace7a,_0x3c8b4f){return new CliError(_0x3c2da5,0x1,_0x2ace7a,_0x3c8b4f);}export function readNotificationId(_0x1bbd6d){const _0x4f0b32=a181_0xc65655,_0x3a8285=_0x1bbd6d[_0x4f0b32(0x10f)]('id');if(!Number['isSafeInteger'](_0x3a8285)||_0x3a8285<=0x0)throw notificationError(_0x4f0b32(0x11d),_0x4f0b32(0x106));return _0x3a8285;}export function requireNotificationExplicitYes(_0x30138b){const _0x22c0dc=a181_0xc65655;if(_0x30138b['bool'](_0x22c0dc(0x148))||_0x30138b[_0x22c0dc(0x118)](_0x22c0dc(0xfe)))return;throw notificationError('notification_config_confirmation_required',_0x22c0dc(0x16a),_0x22c0dc(0x133));}function a181_0x37f6(){const _0x93cf11=['Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','\x22\x20is\x20forbidden.','from-env','number','appCode','5UKfpJr','dry-run','env','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','WEBHOOK','Allowed\x20values:\x20','readTimeout','endpointUrl','parse','notification_config_response_invalid','string','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','WECOM','a\x20JSON\x20object','trim','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','utf8','type','FEISHU','\x22\x20must\x20be\x20','DINGTALK','\x20must\x20be\x20an\x20object.','419262WnOIFg','updateTime','validation','a\x20supported\x20string','configCode','\x22channelType\x22.','isArray','1631250XWpKMf','preflight','Invalid\x20--','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','notification_config_field_unknown','configName','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','length','channelType','7927176btMuyQ','\x22\x20cannot\x20exceed\x20','11972BaKmgf','notification_config_field_required','createTime','path','keys','str','7jqcJTX','\x20has\x20invalid\x20field\x20\x22','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','notification_config_source_unavailable','setEncoding','yes','\x20--type\x20','1299sJpTxc','a\x20non-empty\x20string','\x20has\x20an\x20invalid\x20channelType.','create','apiError','channelCode','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','recipients','hasOwnProperty','\x20--format\x20compress','notification_config_channel_field_forbidden','Notification\x20config\x20list\x20item\x20','description','kind','replyTo','num','push','join','stringify','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','30WojcsW','Notification\x20config\x20','failed','5343888NAjfgQ','bool','notification_config_update_empty','name','\x20characters.','environment\x20variable\x20','notification_config_id_invalid','some','a\x20string\x20or\x20null','EMAIL','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','subjectPrefix','fromName','has','file','emailTargets','entries','includes','12106pKyXLo','4097700tIaYMw','isSafeInteger','connectTimeout','call','\x20has\x20an\x20invalid\x20id.','_unavailable','notification_config_field_invalid','Notification\x20JSON\x20from\x20','\x20has\x20an\x20invalid\x20appCode.','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','every','channelConfig','Application-level\x20notification\x20config\x20ID','update','Notification\x20JSON\x20field\x20\x22','45cMmaVD','stdin','\x20failed.','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','\x22configName\x22.','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','channelConfigRaw','Missing\x20notification\x20JSON\x20source.','endpointUrlRaw'];a181_0x37f6=function(){return _0x93cf11;};return a181_0x37f6();}export function readNotificationChannelType(_0xc60f64,_0x3e0de3=a181_0xc65655(0x158),_0x4199c0=a181_0xc65655(0x120)){const _0x344ca8=a181_0xc65655,_0x5c98db=_0xc60f64[_0x344ca8(0x174)](_0x3e0de3)['trim']()||_0x4199c0;if(!NOTIFICATION_CHANNEL_TYPES[_0x344ca8(0x128)](_0x5c98db))throw CliErrors[_0x344ca8(0x15f)](_0x344ca8(0x166)+_0x3e0de3+':\x20'+_0x5c98db,_0x344ca8(0x14c)+NOTIFICATION_CHANNEL_TYPES[_0x344ca8(0x111)](',\x20')+'.');return _0x5c98db;}export function assertSingleNotificationSource(_0x13a834){const _0x3c91f1=a181_0xc65655,_0x59b49f=[],_0x4809c1=_0x13a834[_0x3c91f1(0x174)](_0x3c91f1(0x125))['trim']();if(_0x4809c1)_0x59b49f[_0x3c91f1(0x110)]({'kind':_0x3c91f1(0x125),'path':_0x4809c1});if(_0x13a834[_0x3c91f1(0x118)]('stdin'))_0x59b49f[_0x3c91f1(0x110)]({'kind':_0x3c91f1(0x13a)});const _0x6513bb=_0x13a834[_0x3c91f1(0x174)](_0x3c91f1(0x144))[_0x3c91f1(0x155)]();if(_0x6513bb)_0x59b49f[_0x3c91f1(0x110)]({'kind':'env','name':_0x6513bb});if(_0x59b49f[_0x3c91f1(0x16b)]===0x0)throw CliErrors[_0x3c91f1(0x15f)](_0x3c91f1(0x140),_0x3c91f1(0x14a));if(_0x59b49f['length']>0x1)throw CliErrors[_0x3c91f1(0x15f)]('Notification\x20JSON\x20source\x20is\x20ambiguous.',_0x3c91f1(0x14a));return _0x59b49f[0x0];}export async function readNotificationDocument(_0x501010,_0x49b2b2){const _0x2f7810=a181_0xc65655,_0x28e4ab=assertSingleNotificationSource(_0x501010),_0xb26c0b=_0x28e4ab[_0x2f7810(0x10d)]===_0x2f7810(0x125)?'file\x20'+_0x28e4ab[_0x2f7810(0x172)]:_0x28e4ab[_0x2f7810(0x10d)]===_0x2f7810(0x149)?_0x2f7810(0x11c)+_0x28e4ab[_0x2f7810(0x11a)]:_0x2f7810(0x13a);let _0x3d29d0;try{if(_0x28e4ab['kind']==='file')_0x3d29d0=await readFile(_0x28e4ab[_0x2f7810(0x172)],'utf8');else{if(_0x28e4ab['kind']===_0x2f7810(0x149)){if(!(_0x28e4ab[_0x2f7810(0x11a)]in process.env))throw notificationError('notification_config_source_unavailable',_0x2f7810(0x167)+_0x28e4ab[_0x2f7810(0x11a)]);_0x3d29d0=process.env[_0x28e4ab.name]??'';}else _0x3d29d0=await readStdin();}}catch(_0x329097){if(_0x329097 instanceof CliError)throw _0x329097;throw notificationError(_0x2f7810(0xfc),'Unable\x20to\x20read\x20notification\x20JSON\x20from\x20'+_0xb26c0b+'.');}let _0x448f7e;try{_0x448f7e=JSON[_0x2f7810(0x14f)](_0x3d29d0);}catch{throw notificationError('notification_config_json_invalid',_0x2f7810(0x131)+_0xb26c0b+'\x20is\x20invalid.',_0x2f7810(0x121));}if(!isJsonObject(_0x448f7e))throw notificationError('notification_config_json_invalid','Notification\x20JSON\x20from\x20'+_0xb26c0b+_0x2f7810(0x15c));return validateNotificationDocument(_0x448f7e,_0x49b2b2);}export function projectNotificationListConfig(_0x43ab70,_0x804ef1){const _0x4b39a1=a181_0xc65655;return{'id':typeof _0x43ab70['id']===_0x4b39a1(0x145)?_0x43ab70['id']:null,'configCode':requireResponseString(_0x43ab70['configCode'],_0x4b39a1(0x161),_0x804ef1),'configName':requireResponseString(_0x43ab70['configName'],_0x4b39a1(0x169),_0x804ef1),'channelType':requireResponseString(_0x43ab70[_0x4b39a1(0x16c)],_0x4b39a1(0x16c),_0x804ef1),'description':normalizeNullableString(_0x43ab70[_0x4b39a1(0x10c)]),'createTime':normalizeNullableString(_0x43ab70[_0x4b39a1(0x171)]),'updateTime':normalizeNullableString(_0x43ab70[_0x4b39a1(0x15e)])};}export function normalizeExactNotificationConfig(_0xa6fbe9,_0x2aeaaf,_0x297ac4){const _0x3fd3c7=a181_0xc65655;if(!Number[_0x3fd3c7(0x12b)](_0xa6fbe9['id'])||_0xa6fbe9['id']!==_0x2aeaaf)throw notificationError(_0x3fd3c7(0x150),'Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20'+_0x2aeaaf+'.');if(_0xa6fbe9[_0x3fd3c7(0x146)]!==_0x297ac4)throw notificationError('notification_config_response_invalid',_0x3fd3c7(0x115)+_0x2aeaaf+_0x3fd3c7(0xfb));const _0x48c7ca=requireExactString(_0xa6fbe9[_0x3fd3c7(0x169)],'configName',_0x2aeaaf),_0x2129bd=requireExactString(_0xa6fbe9[_0x3fd3c7(0x161)],_0x3fd3c7(0x161),_0x2aeaaf),_0x18fcb1=requireExactString(_0xa6fbe9[_0x3fd3c7(0x16c)],_0x3fd3c7(0x16c),_0x2aeaaf);if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x18fcb1))throw notificationError('notification_config_response_invalid',_0x3fd3c7(0x115)+_0x2aeaaf+'\x20has\x20an\x20unsupported\x20channelType.');const _0x4a631b=responseNullableString(_0xa6fbe9['endpointUrl'],_0x3fd3c7(0x14e),_0x2aeaaf),_0x4feb0a=responseNullableString(_0xa6fbe9[_0x3fd3c7(0x135)],_0x3fd3c7(0x135),_0x2aeaaf),_0x234bbf=responseNullableString(_0xa6fbe9['description'],_0x3fd3c7(0x10c),_0x2aeaaf),_0x3cf145=responseNullableTimeout(_0xa6fbe9[_0x3fd3c7(0x12c)],_0x3fd3c7(0x12c),_0x2aeaaf),_0x370f56=responseNullableTimeout(_0xa6fbe9[_0x3fd3c7(0x14d)],_0x3fd3c7(0x14d),_0x2aeaaf);return{'id':_0x2aeaaf,'appCode':_0x297ac4,'configCode':_0x2129bd,'configName':_0x48c7ca,'channelType':_0x18fcb1,'endpointUrl':redactSensitive(_0x4a631b),'channelConfig':redactSensitive(_0x4feb0a),'description':_0x234bbf,'connectTimeout':_0x3cf145,'readTimeout':_0x370f56,'endpointUrlRaw':_0x4a631b,'channelConfigRaw':_0x4feb0a};}export async function requireExactNotificationConfig(_0x26b1df,_0x396c8a,_0xe8883a){const _0x356b22=a181_0xc65655;let _0x4e8162;try{_0x4e8162=await getNotificationChannelConfig(_0x396c8a,_0x26b1df);}catch{throw safeApiFailure(_0xe8883a,_0x356b22(0x165),_0x356b22(0x113)+_0x26b1df+_0x356b22(0x13c));}return normalizeExactNotificationConfig(_0x4e8162,_0x396c8a,_0x26b1df);}export function projectNotificationConfig(_0x23d7b5){const _0x1f82ba=a181_0xc65655;return{'id':_0x23d7b5['id']??null,'appCode':_0x23d7b5['appCode'],'configCode':_0x23d7b5[_0x1f82ba(0x161)]??null,'configName':_0x23d7b5[_0x1f82ba(0x169)],'channelType':_0x23d7b5[_0x1f82ba(0x16c)],'endpointUrl':redactSensitive(_0x23d7b5[_0x1f82ba(0x14e)]),'channelConfig':redactSensitive(_0x23d7b5[_0x1f82ba(0x135)]),'description':_0x23d7b5['description']??null,'connectTimeout':_0x23d7b5['connectTimeout']??null,'readTimeout':_0x23d7b5[_0x1f82ba(0x14d)]??null};}export function notificationSelector(_0x2fb013){const _0x336388=a181_0xc65655;return{'appCode':_0x2fb013['appCode'],'id':_0x2fb013['id'],'configCode':_0x2fb013[_0x336388(0x161)],'configName':_0x2fb013['configName'],'channelType':_0x2fb013[_0x336388(0x16c)]};}export function createMutationInput(_0x5ee4e7,_0x2eab83){const _0x2dc6f0=a181_0xc65655;return{'appCode':_0x5ee4e7,'configName':_0x2eab83[_0x2dc6f0(0x169)],'channelType':_0x2eab83[_0x2dc6f0(0x16c)],...hasOwn(_0x2eab83,_0x2dc6f0(0x14e))?{'endpointUrl':_0x2eab83[_0x2dc6f0(0x14e)]}:{},...hasOwn(_0x2eab83,_0x2dc6f0(0x135))?{'channelConfig':serializeChannelConfig(_0x2eab83[_0x2dc6f0(0x135)])}:{},...hasOwn(_0x2eab83,_0x2dc6f0(0x10c))?{'description':_0x2eab83['description']}:{},...hasOwn(_0x2eab83,_0x2dc6f0(0x12c))?{'connectTimeout':_0x2eab83[_0x2dc6f0(0x12c)]}:{},...hasOwn(_0x2eab83,_0x2dc6f0(0x14d))?{'readTimeout':_0x2eab83[_0x2dc6f0(0x14d)]}:{}};}export function mergeUpdateInput(_0x120577,_0x38148d){const _0x1ccc79=a181_0xc65655;return{'id':_0x120577['id'],'appCode':_0x120577['appCode'],'configName':_0x38148d[_0x1ccc79(0x169)]??_0x120577[_0x1ccc79(0x169)],'channelType':_0x38148d[_0x1ccc79(0x16c)]??_0x120577[_0x1ccc79(0x16c)],'endpointUrl':hasOwn(_0x38148d,_0x1ccc79(0x14e))?_0x38148d[_0x1ccc79(0x14e)]:_0x120577[_0x1ccc79(0x141)],'channelConfig':hasOwn(_0x38148d,_0x1ccc79(0x135))?serializeChannelConfig(_0x38148d['channelConfig']):_0x120577[_0x1ccc79(0x13f)],'description':hasOwn(_0x38148d,_0x1ccc79(0x10c))?_0x38148d['description']:_0x120577['description'],'connectTimeout':hasOwn(_0x38148d,_0x1ccc79(0x12c))?_0x38148d['connectTimeout']:_0x120577[_0x1ccc79(0x12c)],'readTimeout':hasOwn(_0x38148d,_0x1ccc79(0x14d))?_0x38148d[_0x1ccc79(0x14d)]:_0x120577['readTimeout']};}export function plannedUpdateProjection(_0x1a5d52,_0x475572){const _0xdfb784=a181_0xc65655;return projectNotificationConfig({'id':_0x1a5d52['id'],'appCode':_0x1a5d52[_0xdfb784(0x146)],'configCode':_0x1a5d52[_0xdfb784(0x161)],'configName':_0x475572['configName']??_0x1a5d52['configName'],'channelType':_0x475572[_0xdfb784(0x16c)]??_0x1a5d52['channelType'],'endpointUrl':hasOwn(_0x475572,_0xdfb784(0x14e))?_0x475572[_0xdfb784(0x14e)]:_0x1a5d52[_0xdfb784(0x141)],'channelConfig':hasOwn(_0x475572,_0xdfb784(0x135))?_0x475572[_0xdfb784(0x135)]:_0x1a5d52[_0xdfb784(0x13f)],'description':hasOwn(_0x475572,_0xdfb784(0x10c))?_0x475572[_0xdfb784(0x10c)]:_0x1a5d52[_0xdfb784(0x10c)],'connectTimeout':hasOwn(_0x475572,_0xdfb784(0x12c))?_0x475572[_0xdfb784(0x12c)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x1a5d52['connectTimeout'],'readTimeout':hasOwn(_0x475572,_0xdfb784(0x14d))?_0x475572[_0xdfb784(0x14d)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x1a5d52[_0xdfb784(0x14d)]});}export function requestedSafeFieldsMatch(_0x22e937,_0x22cb6e,_0x44a095){const _0x24b5d1=a181_0xc65655,_0x328d08=[],_0xa4609a=[],_0x4585ea=[];for(const _0x57c3b7 of[_0x24b5d1(0x169),_0x24b5d1(0x16c),_0x24b5d1(0x10c)]){if(!hasOwn(_0x44a095,_0x57c3b7))continue;_0x4585ea[_0x24b5d1(0x110)](_0x57c3b7),_0x328d08[_0x24b5d1(0x110)](_0x22cb6e[_0x57c3b7]===_0x44a095[_0x57c3b7]),_0xa4609a[_0x24b5d1(0x110)](_0x22e937[_0x57c3b7]!==_0x44a095[_0x57c3b7]&&_0x22cb6e[_0x57c3b7]===_0x44a095[_0x57c3b7]);}for(const _0x1f6204 of[_0x24b5d1(0x12c),_0x24b5d1(0x14d)]){if(!hasOwn(_0x44a095,_0x1f6204))continue;const _0xfb6354=_0x44a095[_0x1f6204]??(_0x1f6204===_0x24b5d1(0x12c)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x4585ea[_0x24b5d1(0x110)](_0x1f6204),_0x328d08[_0x24b5d1(0x110)](_0x22cb6e[_0x1f6204]===_0xfb6354),_0xa4609a['push'](_0x22e937[_0x1f6204]!==_0xfb6354&&_0x22cb6e[_0x1f6204]===_0xfb6354);}return hasOwn(_0x44a095,_0x24b5d1(0x14e))&&_0x44a095[_0x24b5d1(0x14e)]===null&&(_0x4585ea[_0x24b5d1(0x110)]('endpointUrl:null'),_0x328d08['push'](_0x22cb6e[_0x24b5d1(0x141)]===null||_0x22cb6e[_0x24b5d1(0x141)]===''),_0xa4609a[_0x24b5d1(0x110)](_0x22e937[_0x24b5d1(0x141)]!==null&&_0x22e937[_0x24b5d1(0x141)]!==''&&(_0x22cb6e[_0x24b5d1(0x141)]===null||_0x22cb6e[_0x24b5d1(0x141)]===''))),{'allMatch':_0x328d08[_0x24b5d1(0x134)](Boolean),'provesChange':_0xa4609a[_0x24b5d1(0x11e)](Boolean),'verifiedFields':_0x4585ea};}export function validateNotificationDeleteReadback(_0x31240c,_0x40689d,_0x32e8c0){const _0x338318=a181_0xc65655;for(const [_0x41afc3,_0x44052d]of _0x31240c[_0x338318(0x127)]()){if(!Number['isSafeInteger'](_0x44052d['id'])||_0x44052d['id']<=0x0)throw notificationError(_0x338318(0x150),'Notification\x20config\x20list\x20item\x20'+(_0x41afc3+0x1)+_0x338318(0x12e));if(_0x44052d[_0x338318(0x146)]!==_0x40689d)throw notificationError(_0x338318(0x150),'Notification\x20config\x20list\x20item\x20'+(_0x41afc3+0x1)+_0x338318(0x132));if(_0x44052d['channelType']!==_0x32e8c0)throw notificationError(_0x338318(0x150),_0x338318(0x10b)+(_0x41afc3+0x1)+_0x338318(0x102));}}function a181_0x5673(_0x4bbac3,_0x599076){_0x4bbac3=_0x4bbac3-0xfa;const _0x37f657=a181_0x37f6();let _0x5673b9=_0x37f657[_0x4bbac3];return _0x5673b9;}export function safeApiFailure(_0x5389af,_0x341cad,_0x47726b){const _0x5be6eb=a181_0xc65655;return notificationError('notification_config_'+_0x5389af+'_'+(_0x341cad==='mutation'?_0x5be6eb(0x116):_0x341cad+_0x5be6eb(0x12f)),_0x5be6eb(0x115)+_0x5389af+'\x20'+_0x341cad+_0x5be6eb(0x13b),_0x47726b);}export function notificationLookupCommand(_0x294702,_0x27b40f){const _0xf5e898=a181_0xc65655;return'rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x294702+_0xf5e898(0xff)+_0x27b40f+_0xf5e898(0x109);}function validateNotificationDocument(_0x1eca7d,_0x4a6d07){const _0x55f193=a181_0xc65655;for(const _0x2e8f94 of Object['keys'](_0x1eca7d)){if(FORBIDDEN_IDENTITY_FIELDS['has'](_0x2e8f94))throw notificationError('notification_config_field_forbidden',_0x55f193(0x138)+_0x2e8f94+'\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.');if(!ALLOWED_INPUT_FIELDS[_0x55f193(0x124)](_0x2e8f94))throw notificationError(_0x55f193(0x168),'Unknown\x20notification\x20JSON\x20field\x20\x22'+_0x2e8f94+'\x22.');}if(_0x4a6d07===_0x55f193(0x137)&&Object[_0x55f193(0x173)](_0x1eca7d)['length']===0x0)throw notificationError(_0x55f193(0x119),_0x55f193(0x142));const _0x385ebf={};if(hasOwn(_0x1eca7d,_0x55f193(0x169)))_0x385ebf[_0x55f193(0x169)]=validateRequiredString(_0x1eca7d[_0x55f193(0x169)],_0x55f193(0x169),0x80);else{if(_0x4a6d07===_0x55f193(0x103))throw notificationError(_0x55f193(0x170),'Create\x20JSON\x20requires\x20field\x20'+_0x55f193(0x13d));}if(hasOwn(_0x1eca7d,_0x55f193(0x16c))){if(typeof _0x1eca7d[_0x55f193(0x16c)]!==_0x55f193(0x151))throw invalidFieldType('channelType',_0x55f193(0x160));const _0xa42baa=_0x1eca7d[_0x55f193(0x16c)]['trim']();if(!NOTIFICATION_CHANNEL_TYPES[_0x55f193(0x128)](_0xa42baa))throw notificationError(_0x55f193(0x130),_0x55f193(0x13e),'Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');_0x385ebf['channelType']=_0xa42baa;}else{if(_0x4a6d07==='create')throw notificationError(_0x55f193(0x170),'Create\x20JSON\x20requires\x20field\x20'+_0x55f193(0x162));}for(const [_0x2fa057,_0x3a0efe]of[[_0x55f193(0x14e),0x200],[_0x55f193(0x10c),0x100]]){if(!hasOwn(_0x1eca7d,_0x2fa057))continue;const _0x376885=_0x1eca7d[_0x2fa057];if(_0x376885!==null&&typeof _0x376885!==_0x55f193(0x151))throw invalidFieldType(_0x2fa057,_0x55f193(0x11f));if(typeof _0x376885===_0x55f193(0x151)&&_0x376885['length']>_0x3a0efe)throw notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22'+_0x2fa057+_0x55f193(0x16e)+_0x3a0efe+_0x55f193(0x11b));_0x385ebf[_0x2fa057]=_0x376885;}if(hasOwn(_0x1eca7d,_0x55f193(0x135))){const _0x323312=_0x1eca7d[_0x55f193(0x135)];if(_0x323312===null&&_0x4a6d07===_0x55f193(0x103))throw invalidFieldType('channelConfig',_0x55f193(0x154));if(_0x323312!==null&&!isJsonObject(_0x323312))throw invalidFieldType(_0x55f193(0x135),_0x4a6d07===_0x55f193(0x137)?'a\x20JSON\x20object\x20or\x20null':_0x55f193(0x154));_0x323312!==null&&validateChannelConfigFields(_0x385ebf[_0x55f193(0x16c)],_0x323312),_0x385ebf[_0x55f193(0x135)]=_0x323312;}for(const _0x3bc72e of[_0x55f193(0x12c),_0x55f193(0x14d)]){if(!hasOwn(_0x1eca7d,_0x3bc72e))continue;const _0x1fc4e2=_0x1eca7d[_0x3bc72e];if(_0x1fc4e2!==null&&(!Number[_0x55f193(0x12b)](_0x1fc4e2)||_0x1fc4e2<0x0))throw notificationError(_0x55f193(0x130),'Notification\x20JSON\x20field\x20\x22'+_0x3bc72e+'\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.');_0x385ebf[_0x3bc72e]=_0x1fc4e2;}return _0x385ebf;}function validateRequiredString(_0x3e8b03,_0x2404a3,_0x31d87a){const _0x893215=a181_0xc65655;if(typeof _0x3e8b03!=='string')throw invalidFieldType(_0x2404a3,_0x893215(0x101));const _0x472ce3=_0x3e8b03['trim']();if(!_0x472ce3)throw notificationError(_0x893215(0x130),_0x893215(0x138)+_0x2404a3+'\x22\x20must\x20be\x20a\x20non-empty\x20string.');if(_0x472ce3['length']>_0x31d87a)throw notificationError(_0x893215(0x130),_0x893215(0x138)+_0x2404a3+_0x893215(0x16e)+_0x31d87a+_0x893215(0x11b));return _0x472ce3;}function validateChannelConfigFields(_0x38d21b,_0x5b9e2e){if(hasOwn(_0x5b9e2e,'messageTemplate'))throw forbiddenChannelConfigField('messageTemplate');if(_0x38d21b==='EMAIL')for(const _0x34e47d of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x5b9e2e,_0x34e47d))throw forbiddenChannelConfigField(_0x34e47d);}}function forbiddenChannelConfigField(_0x28fadc){const _0x376a10=a181_0xc65655;return notificationError(_0x376a10(0x10a),'Notification\x20JSON\x20channelConfig\x20field\x20\x22'+_0x28fadc+_0x376a10(0x143));}function invalidFieldType(_0x1ff886,_0x3232b3){const _0x1329ff=a181_0xc65655;return notificationError('notification_config_field_invalid',_0x1329ff(0x138)+_0x1ff886+_0x1329ff(0x15a)+_0x3232b3+'.');}function serializeChannelConfig(_0x3d1cf2){const _0x2b8c2b=a181_0xc65655;return _0x3d1cf2===null||_0x3d1cf2===undefined?null:JSON[_0x2b8c2b(0x112)](_0x3d1cf2);}function redactSensitive(_0x257a10){return _0x257a10===null||_0x257a10===undefined||_0x257a10===''?null:'<redacted>';}function requireResponseString(_0x34f3a6,_0xc44118,_0x5c3f10){const _0xd9eb44=a181_0xc65655;if(typeof _0x34f3a6!==_0xd9eb44(0x151)||_0x34f3a6[_0xd9eb44(0x155)]()==='')throw CliErrors[_0xd9eb44(0x104)]('Invalid\x20notification\x20config\x20response.','Item\x20'+(_0x5c3f10+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0xc44118+'\x22.');return _0x34f3a6[_0xd9eb44(0x155)]();}function requireExactString(_0x28f74b,_0x498c0a,_0x2224cb){const _0x358da0=a181_0xc65655;if(typeof _0x28f74b!=='string'||_0x28f74b[_0x358da0(0x155)]()==='')throw notificationError(_0x358da0(0x150),_0x358da0(0x115)+_0x2224cb+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x498c0a+'\x22.');return _0x28f74b[_0x358da0(0x155)]();}function responseNullableString(_0x1a9cbc,_0x182134,_0x343733){const _0x2f5fbb=a181_0xc65655;if(_0x1a9cbc===undefined||_0x1a9cbc===null)return null;if(typeof _0x1a9cbc!=='string')throw notificationError('notification_config_response_invalid',_0x2f5fbb(0x115)+_0x343733+'\x20has\x20invalid\x20field\x20\x22'+_0x182134+'\x22.');return _0x1a9cbc;}function responseNullableTimeout(_0x477fbd,_0x193fca,_0x685039){const _0x144a0d=a181_0xc65655;if(_0x477fbd===undefined||_0x477fbd===null)return null;if(!Number[_0x144a0d(0x12b)](_0x477fbd)||_0x477fbd<0x0)throw notificationError(_0x144a0d(0x150),_0x144a0d(0x115)+_0x685039+_0x144a0d(0xfa)+_0x193fca+'\x22.');return _0x477fbd;}function normalizeNullableString(_0xb74f5d){return typeof _0xb74f5d==='string'?_0xb74f5d:null;}function isJsonObject(_0xe3abd9){const _0x178ca5=a181_0xc65655;return _0xe3abd9!==null&&typeof _0xe3abd9==='object'&&!Array[_0x178ca5(0x163)](_0xe3abd9);}function hasOwn(_0x1cd354,_0x59a6c8){const _0xa397e6=a181_0xc65655;return Object['prototype'][_0xa397e6(0x108)][_0xa397e6(0x12d)](_0x1cd354,_0x59a6c8);}async function readStdin(){const _0x48318c=a181_0xc65655;let _0x432b7c='';process[_0x48318c(0x13a)][_0x48318c(0xfd)](_0x48318c(0x157));for await(const _0x181f5d of process[_0x48318c(0x13a)])_0x432b7c+=_0x181f5d;return _0x432b7c;}
|
|
1
|
+
const a181_0x1fbea3=a181_0x5936;(function(_0x3c3bcb,_0x92c4e5){const _0x1faa46=a181_0x5936,_0x2ea2b7=_0x3c3bcb();while(!![]){try{const _0x17f871=-parseInt(_0x1faa46(0x89))/0x1*(-parseInt(_0x1faa46(0xa6))/0x2)+parseInt(_0x1faa46(0xe8))/0x3+parseInt(_0x1faa46(0xe9))/0x4+-parseInt(_0x1faa46(0xb4))/0x5+-parseInt(_0x1faa46(0x9c))/0x6*(-parseInt(_0x1faa46(0xb8))/0x7)+parseInt(_0x1faa46(0xed))/0x8*(parseInt(_0x1faa46(0xbf))/0x9)+parseInt(_0x1faa46(0xe7))/0xa*(-parseInt(_0x1faa46(0x85))/0xb);if(_0x17f871===_0x92c4e5)break;else _0x2ea2b7['push'](_0x2ea2b7['shift']());}catch(_0x11819b){_0x2ea2b7['push'](_0x2ea2b7['shift']());}}}(a181_0x4113,0x2302d));import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=[a181_0x1fbea3(0xc9),a181_0x1fbea3(0xcb),a181_0x1fbea3(0xa8),a181_0x1fbea3(0xe3),a181_0x1fbea3(0xe5)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a181_0x1fbea3(0x8c),a181_0x1fbea3(0xaf),a181_0x1fbea3(0x83),a181_0x1fbea3(0x9d),a181_0x1fbea3(0xc6),a181_0x1fbea3(0x81),a181_0x1fbea3(0xab)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a181_0x1fbea3(0xe2),a181_0x1fbea3(0xa9),'channelCode']),EMAIL_RECIPIENT_FIELDS=new Set([a181_0x1fbea3(0xd2),a181_0x1fbea3(0xcf),a181_0x1fbea3(0xde),a181_0x1fbea3(0xad),a181_0x1fbea3(0x8f),a181_0x1fbea3(0x84),'fromName','to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':'file','type':a181_0x1fbea3(0x8d),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file'},{'name':a181_0x1fbea3(0x86),'type':a181_0x1fbea3(0xf0),'required':![],'default':![],'description':a181_0x1fbea3(0xb3)},{'name':a181_0x1fbea3(0x92),'type':a181_0x1fbea3(0x8d),'required':![],'description':a181_0x1fbea3(0x8b)}];function a181_0x5936(_0x1f8891,_0x6e9ad2){_0x1f8891=_0x1f8891-0x7f;const _0x4113c4=a181_0x4113();let _0x59367f=_0x4113c4[_0x1f8891];return _0x59367f;}export const NOTIFICATION_ID_FLAG={'name':'id','type':'number','required':!![],'description':a181_0x1fbea3(0xe6)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0xd3f86b,_0xdc2f08,_0x459cba){return new CliError(_0xd3f86b,0x1,_0xdc2f08,_0x459cba);}export function readNotificationId(_0xfe4a78){const _0x535a16=a181_0x1fbea3,_0x1a637c=_0xfe4a78[_0x535a16(0xb5)]('id');if(!Number['isSafeInteger'](_0x1a637c)||_0x1a637c<=0x0)throw notificationError('notification_config_id_invalid','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.');return _0x1a637c;}export function requireNotificationExplicitYes(_0x3d02f5){const _0x1e98ab=a181_0x1fbea3;if(_0x3d02f5[_0x1e98ab(0xf5)](_0x1e98ab(0xd7))||_0x3d02f5[_0x1e98ab(0xf5)](_0x1e98ab(0x8a)))return;throw notificationError('notification_config_confirmation_required',_0x1e98ab(0xb1),_0x1e98ab(0xcd));}export function readNotificationChannelType(_0x3d6b4b,_0x3280c1=a181_0x1fbea3(0x80),_0x1a9f08=a181_0x1fbea3(0xc9)){const _0x302f9b=a181_0x1fbea3,_0x12be4c=_0x3d6b4b[_0x302f9b(0x7f)](_0x3280c1)[_0x302f9b(0xc4)]()||_0x1a9f08;if(!NOTIFICATION_CHANNEL_TYPES[_0x302f9b(0xb9)](_0x12be4c))throw CliErrors['validation']('Invalid\x20--'+_0x3280c1+':\x20'+_0x12be4c,_0x302f9b(0xa5)+NOTIFICATION_CHANNEL_TYPES[_0x302f9b(0xb0)](',\x20')+'.');return _0x12be4c;}export function assertSingleNotificationSource(_0x27f882){const _0x44ae11=a181_0x1fbea3,_0x28f0ca=[],_0x3a8b29=_0x27f882[_0x44ae11(0x7f)](_0x44ae11(0xd0))[_0x44ae11(0xc4)]();if(_0x3a8b29)_0x28f0ca[_0x44ae11(0xcc)]({'kind':_0x44ae11(0xd0),'path':_0x3a8b29});if(_0x27f882[_0x44ae11(0xf5)](_0x44ae11(0x86)))_0x28f0ca[_0x44ae11(0xcc)]({'kind':'stdin'});const _0x543912=_0x27f882[_0x44ae11(0x7f)](_0x44ae11(0x92))[_0x44ae11(0xc4)]();if(_0x543912)_0x28f0ca[_0x44ae11(0xcc)]({'kind':_0x44ae11(0xc5),'name':_0x543912});if(_0x28f0ca['length']===0x0)throw CliErrors[_0x44ae11(0x9a)](_0x44ae11(0xbd),_0x44ae11(0xd1));if(_0x28f0ca[_0x44ae11(0xf1)]>0x1)throw CliErrors[_0x44ae11(0x9a)]('Notification\x20JSON\x20source\x20is\x20ambiguous.',_0x44ae11(0xd1));return _0x28f0ca[0x0];}export async function readNotificationDocument(_0x34fb5f,_0x2526bc){const _0x4fcbc0=a181_0x1fbea3,_0x4ecd11=assertSingleNotificationSource(_0x34fb5f),_0x53204b=_0x4ecd11['kind']===_0x4fcbc0(0xd0)?'file\x20'+_0x4ecd11[_0x4fcbc0(0x96)]:_0x4ecd11[_0x4fcbc0(0xfa)]===_0x4fcbc0(0xc5)?_0x4fcbc0(0xaa)+_0x4ecd11[_0x4fcbc0(0xb2)]:_0x4fcbc0(0x86);let _0x28894e;try{if(_0x4ecd11['kind']==='file')_0x28894e=await readFile(_0x4ecd11['path'],_0x4fcbc0(0xe0));else{if(_0x4ecd11[_0x4fcbc0(0xfa)]===_0x4fcbc0(0xc5)){if(!(_0x4ecd11[_0x4fcbc0(0xb2)]in process.env))throw notificationError(_0x4fcbc0(0xda),_0x4fcbc0(0xe1)+_0x4ecd11[_0x4fcbc0(0xb2)]);_0x28894e=process.env[_0x4ecd11.name]??'';}else _0x28894e=await readStdin();}}catch(_0x261c9c){if(_0x261c9c instanceof CliError)throw _0x261c9c;throw notificationError(_0x4fcbc0(0xda),_0x4fcbc0(0xdf)+_0x53204b+'.');}let _0x2b7707;try{_0x2b7707=JSON[_0x4fcbc0(0xfb)](_0x28894e);}catch{throw notificationError(_0x4fcbc0(0x9e),'Notification\x20JSON\x20from\x20'+_0x53204b+_0x4fcbc0(0xca),_0x4fcbc0(0x90));}if(!isJsonObject(_0x2b7707))throw notificationError('notification_config_json_invalid',_0x4fcbc0(0xc2)+_0x53204b+_0x4fcbc0(0xec));return validateNotificationDocument(_0x2b7707,_0x2526bc);}export function projectNotificationListConfig(_0x5f374f,_0x1c6564){const _0x568b36=a181_0x1fbea3;return{'id':typeof _0x5f374f['id']===_0x568b36(0x94)?_0x5f374f['id']:null,'configCode':requireResponseString(_0x5f374f[_0x568b36(0xa9)],'configCode',_0x1c6564),'configName':requireResponseString(_0x5f374f[_0x568b36(0x8c)],'configName',_0x1c6564),'channelType':requireResponseString(_0x5f374f[_0x568b36(0xaf)],_0x568b36(0xaf),_0x1c6564),'description':normalizeNullableString(_0x5f374f[_0x568b36(0xc6)]),'createTime':normalizeNullableString(_0x5f374f['createTime']),'updateTime':normalizeNullableString(_0x5f374f[_0x568b36(0xeb)])};}export function normalizeExactNotificationConfig(_0x1886a7,_0x4aeea2,_0x217d76){const _0x2f5a66=a181_0x1fbea3;if(!Number[_0x2f5a66(0xe4)](_0x1886a7['id'])||_0x1886a7['id']!==_0x4aeea2)throw notificationError('notification_config_response_invalid','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20'+_0x4aeea2+'.');if(_0x1886a7[_0x2f5a66(0xe2)]!==_0x217d76)throw notificationError(_0x2f5a66(0xbb),_0x2f5a66(0xa4)+_0x4aeea2+'\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.');const _0x5e32de=requireExactString(_0x1886a7[_0x2f5a66(0x8c)],_0x2f5a66(0x8c),_0x4aeea2),_0x20b7b0=requireExactString(_0x1886a7[_0x2f5a66(0xa9)],_0x2f5a66(0xa9),_0x4aeea2),_0x50cdc4=requireExactString(_0x1886a7[_0x2f5a66(0xaf)],_0x2f5a66(0xaf),_0x4aeea2);if(!NOTIFICATION_CHANNEL_TYPES[_0x2f5a66(0xb9)](_0x50cdc4))throw notificationError(_0x2f5a66(0xbb),_0x2f5a66(0xa4)+_0x4aeea2+_0x2f5a66(0xa0));const _0x1fe313=responseNullableString(_0x1886a7[_0x2f5a66(0x83)],'endpointUrl',_0x4aeea2),_0x31788f=responseNullableString(_0x1886a7[_0x2f5a66(0x9d)],_0x2f5a66(0x9d),_0x4aeea2),_0x3a8ec0=responseNullableString(_0x1886a7['description'],_0x2f5a66(0xc6),_0x4aeea2),_0x46846a=responseNullableTimeout(_0x1886a7[_0x2f5a66(0x81)],'connectTimeout',_0x4aeea2),_0x4c7d09=responseNullableTimeout(_0x1886a7['readTimeout'],_0x2f5a66(0xab),_0x4aeea2);return{'id':_0x4aeea2,'appCode':_0x217d76,'configCode':_0x20b7b0,'configName':_0x5e32de,'channelType':_0x50cdc4,'endpointUrl':redactSensitive(_0x1fe313),'channelConfig':redactSensitive(_0x31788f),'description':_0x3a8ec0,'connectTimeout':_0x46846a,'readTimeout':_0x4c7d09,'endpointUrlRaw':_0x1fe313,'channelConfigRaw':_0x31788f};}function a181_0x4113(){const _0x148320=['notification_config_field_unknown','recipients','file','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','emailTargets','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','isArray','failed','\x20failed.','dry-run','\x20--type\x20','channelConfigRaw','notification_config_source_unavailable','Invalid\x20notification\x20config\x20response.','mutation','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','ccList','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','utf8','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','appCode','WECOM','isSafeInteger','WEBHOOK','Application-level\x20notification\x20config\x20ID','410aowWZF','627777NvMIAF','650196WIYHDH','every','updateTime','\x20must\x20be\x20an\x20object.','316264sSUbAw','\x22\x20must\x20be\x20a\x20non-empty\x20string.','rabetbase\x20notification\x20config-list\x20--appcode\x20','boolean','length','call','Unknown\x20notification\x20JSON\x20field\x20\x22','preflight','bool','a\x20non-empty\x20string','create','notification_config_field_invalid','Item\x20','kind','parse','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','Notification\x20config\x20list\x20item\x20','str','type','connectTimeout','endpointUrlRaw','endpointUrl','subjectPrefix','166298QbIQjN','stdin','prototype','a\x20supported\x20string','91hJvlnA','yes','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','configName','string','\x20characters.','replyTo','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','has','from-env','Notification\x20JSON\x20field\x20\x22','number','object','path','\x20has\x20an\x20invalid\x20id.','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','\x20has\x20invalid\x20field\x20\x22','validation','<redacted>','1063872fXDkVM','channelConfig','notification_config_json_invalid','\x20has\x20an\x20invalid\x20appCode.','\x20has\x20an\x20unsupported\x20channelType.','Create\x20JSON\x20requires\x20field\x20','some','stringify','Notification\x20config\x20','Allowed\x20values:\x20','1642PpeRXc','\x20--format\x20compress','DINGTALK','configCode','environment\x20variable\x20','readTimeout','notification_config_field_required','bccList','a\x20JSON\x20object\x20or\x20null','channelType','join','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','name','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','488930cdutaF','num','notification_config_','endpointUrl:null','7rFVAkg','includes','setEncoding','notification_config_response_invalid','update','Missing\x20notification\x20JSON\x20source.','messageTemplate','54TjFxSB','a\x20JSON\x20object','keys','Notification\x20JSON\x20from\x20','\x22channelType\x22.','trim','env','description','a\x20string\x20or\x20null','apiError','EMAIL','\x20is\x20invalid.','FEISHU','push','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.'];a181_0x4113=function(){return _0x148320;};return a181_0x4113();}export async function requireExactNotificationConfig(_0x50e01b,_0x3bfd2b,_0x570943){const _0x50f277=a181_0x1fbea3;let _0x18c723;try{_0x18c723=await getNotificationChannelConfig(_0x3bfd2b,_0x50e01b);}catch{throw safeApiFailure(_0x570943,_0x50f277(0xf4),_0x50f277(0xfc)+_0x50e01b+'\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.');}return normalizeExactNotificationConfig(_0x18c723,_0x3bfd2b,_0x50e01b);}export function projectNotificationConfig(_0x42e72b){const _0xdf806a=a181_0x1fbea3;return{'id':_0x42e72b['id']??null,'appCode':_0x42e72b[_0xdf806a(0xe2)],'configCode':_0x42e72b['configCode']??null,'configName':_0x42e72b[_0xdf806a(0x8c)],'channelType':_0x42e72b[_0xdf806a(0xaf)],'endpointUrl':redactSensitive(_0x42e72b[_0xdf806a(0x83)]),'channelConfig':redactSensitive(_0x42e72b[_0xdf806a(0x9d)]),'description':_0x42e72b[_0xdf806a(0xc6)]??null,'connectTimeout':_0x42e72b[_0xdf806a(0x81)]??null,'readTimeout':_0x42e72b[_0xdf806a(0xab)]??null};}export function notificationSelector(_0x1e0abe){const _0x57c50a=a181_0x1fbea3;return{'appCode':_0x1e0abe[_0x57c50a(0xe2)],'id':_0x1e0abe['id'],'configCode':_0x1e0abe[_0x57c50a(0xa9)],'configName':_0x1e0abe[_0x57c50a(0x8c)],'channelType':_0x1e0abe[_0x57c50a(0xaf)]};}export function createMutationInput(_0x3bf05b,_0x508e15){const _0x1d5198=a181_0x1fbea3;return{'appCode':_0x3bf05b,'configName':_0x508e15['configName'],'channelType':_0x508e15[_0x1d5198(0xaf)],...hasOwn(_0x508e15,_0x1d5198(0x83))?{'endpointUrl':_0x508e15[_0x1d5198(0x83)]}:{},...hasOwn(_0x508e15,_0x1d5198(0x9d))?{'channelConfig':serializeChannelConfig(_0x508e15['channelConfig'])}:{},...hasOwn(_0x508e15,_0x1d5198(0xc6))?{'description':_0x508e15[_0x1d5198(0xc6)]}:{},...hasOwn(_0x508e15,_0x1d5198(0x81))?{'connectTimeout':_0x508e15[_0x1d5198(0x81)]}:{},...hasOwn(_0x508e15,_0x1d5198(0xab))?{'readTimeout':_0x508e15[_0x1d5198(0xab)]}:{}};}export function mergeUpdateInput(_0x3892f0,_0x2c5ad5){const _0x4d42c6=a181_0x1fbea3;return{'id':_0x3892f0['id'],'appCode':_0x3892f0[_0x4d42c6(0xe2)],'configName':_0x2c5ad5[_0x4d42c6(0x8c)]??_0x3892f0[_0x4d42c6(0x8c)],'channelType':_0x2c5ad5[_0x4d42c6(0xaf)]??_0x3892f0[_0x4d42c6(0xaf)],'endpointUrl':hasOwn(_0x2c5ad5,_0x4d42c6(0x83))?_0x2c5ad5[_0x4d42c6(0x83)]:_0x3892f0[_0x4d42c6(0x82)],'channelConfig':hasOwn(_0x2c5ad5,_0x4d42c6(0x9d))?serializeChannelConfig(_0x2c5ad5[_0x4d42c6(0x9d)]):_0x3892f0[_0x4d42c6(0xd9)],'description':hasOwn(_0x2c5ad5,'description')?_0x2c5ad5[_0x4d42c6(0xc6)]:_0x3892f0[_0x4d42c6(0xc6)],'connectTimeout':hasOwn(_0x2c5ad5,_0x4d42c6(0x81))?_0x2c5ad5[_0x4d42c6(0x81)]:_0x3892f0[_0x4d42c6(0x81)],'readTimeout':hasOwn(_0x2c5ad5,_0x4d42c6(0xab))?_0x2c5ad5['readTimeout']:_0x3892f0[_0x4d42c6(0xab)]};}export function plannedUpdateProjection(_0x60491d,_0x1a2734){const _0x5c6905=a181_0x1fbea3;return projectNotificationConfig({'id':_0x60491d['id'],'appCode':_0x60491d[_0x5c6905(0xe2)],'configCode':_0x60491d[_0x5c6905(0xa9)],'configName':_0x1a2734['configName']??_0x60491d['configName'],'channelType':_0x1a2734[_0x5c6905(0xaf)]??_0x60491d[_0x5c6905(0xaf)],'endpointUrl':hasOwn(_0x1a2734,_0x5c6905(0x83))?_0x1a2734[_0x5c6905(0x83)]:_0x60491d[_0x5c6905(0x82)],'channelConfig':hasOwn(_0x1a2734,'channelConfig')?_0x1a2734[_0x5c6905(0x9d)]:_0x60491d[_0x5c6905(0xd9)],'description':hasOwn(_0x1a2734,_0x5c6905(0xc6))?_0x1a2734[_0x5c6905(0xc6)]:_0x60491d['description'],'connectTimeout':hasOwn(_0x1a2734,_0x5c6905(0x81))?_0x1a2734[_0x5c6905(0x81)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x60491d['connectTimeout'],'readTimeout':hasOwn(_0x1a2734,_0x5c6905(0xab))?_0x1a2734['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x60491d[_0x5c6905(0xab)]});}export function requestedSafeFieldsMatch(_0x1d95ff,_0x388984,_0x2ee1e7){const _0x441aee=a181_0x1fbea3,_0x52ac72=[],_0x4049b0=[],_0x7fe1f4=[];for(const _0x5f04d2 of[_0x441aee(0x8c),'channelType',_0x441aee(0xc6)]){if(!hasOwn(_0x2ee1e7,_0x5f04d2))continue;_0x7fe1f4[_0x441aee(0xcc)](_0x5f04d2),_0x52ac72[_0x441aee(0xcc)](_0x388984[_0x5f04d2]===_0x2ee1e7[_0x5f04d2]),_0x4049b0[_0x441aee(0xcc)](_0x1d95ff[_0x5f04d2]!==_0x2ee1e7[_0x5f04d2]&&_0x388984[_0x5f04d2]===_0x2ee1e7[_0x5f04d2]);}for(const _0x3d76a9 of[_0x441aee(0x81),_0x441aee(0xab)]){if(!hasOwn(_0x2ee1e7,_0x3d76a9))continue;const _0x49f197=_0x2ee1e7[_0x3d76a9]??(_0x3d76a9===_0x441aee(0x81)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x7fe1f4['push'](_0x3d76a9),_0x52ac72[_0x441aee(0xcc)](_0x388984[_0x3d76a9]===_0x49f197),_0x4049b0['push'](_0x1d95ff[_0x3d76a9]!==_0x49f197&&_0x388984[_0x3d76a9]===_0x49f197);}return hasOwn(_0x2ee1e7,_0x441aee(0x83))&&_0x2ee1e7['endpointUrl']===null&&(_0x7fe1f4['push'](_0x441aee(0xb7)),_0x52ac72[_0x441aee(0xcc)](_0x388984[_0x441aee(0x82)]===null||_0x388984[_0x441aee(0x82)]===''),_0x4049b0[_0x441aee(0xcc)](_0x1d95ff[_0x441aee(0x82)]!==null&&_0x1d95ff[_0x441aee(0x82)]!==''&&(_0x388984[_0x441aee(0x82)]===null||_0x388984[_0x441aee(0x82)]===''))),{'allMatch':_0x52ac72[_0x441aee(0xea)](Boolean),'provesChange':_0x4049b0[_0x441aee(0xa2)](Boolean),'verifiedFields':_0x7fe1f4};}export function validateNotificationDeleteReadback(_0xd352f4,_0x10f563,_0x4377ec){const _0xf9edeb=a181_0x1fbea3;for(const [_0x52e963,_0x10d3db]of _0xd352f4['entries']()){if(!Number['isSafeInteger'](_0x10d3db['id'])||_0x10d3db['id']<=0x0)throw notificationError('notification_config_response_invalid',_0xf9edeb(0xfd)+(_0x52e963+0x1)+_0xf9edeb(0x97));if(_0x10d3db[_0xf9edeb(0xe2)]!==_0x10f563)throw notificationError(_0xf9edeb(0xbb),_0xf9edeb(0xfd)+(_0x52e963+0x1)+_0xf9edeb(0x9f));if(_0x10d3db[_0xf9edeb(0xaf)]!==_0x4377ec)throw notificationError('notification_config_response_invalid',_0xf9edeb(0xfd)+(_0x52e963+0x1)+'\x20has\x20an\x20invalid\x20channelType.');}}export function safeApiFailure(_0x18d1ba,_0x199889,_0x17e7c8){const _0x301240=a181_0x1fbea3;return notificationError(_0x301240(0xb6)+_0x18d1ba+'_'+(_0x199889===_0x301240(0xdc)?_0x301240(0xd5):_0x199889+'_unavailable'),_0x301240(0xa4)+_0x18d1ba+'\x20'+_0x199889+_0x301240(0xd6),_0x17e7c8);}export function notificationLookupCommand(_0x5b3d53,_0xe8ac21){const _0x500c97=a181_0x1fbea3;return _0x500c97(0xef)+_0x5b3d53+_0x500c97(0xd8)+_0xe8ac21+_0x500c97(0xa7);}function validateNotificationDocument(_0x1ec33c,_0x41fcfd){const _0x1500fe=a181_0x1fbea3;for(const _0x2c14de of Object[_0x1500fe(0xc1)](_0x1ec33c)){if(FORBIDDEN_IDENTITY_FIELDS[_0x1500fe(0x91)](_0x2c14de))throw notificationError('notification_config_field_forbidden','Notification\x20JSON\x20field\x20\x22'+_0x2c14de+_0x1500fe(0xd3));if(!ALLOWED_INPUT_FIELDS['has'](_0x2c14de))throw notificationError(_0x1500fe(0xce),_0x1500fe(0xf3)+_0x2c14de+'\x22.');}if(_0x41fcfd==='update'&&Object[_0x1500fe(0xc1)](_0x1ec33c)[_0x1500fe(0xf1)]===0x0)throw notificationError('notification_config_update_empty',_0x1500fe(0x98));const _0xff5585={};if(hasOwn(_0x1ec33c,_0x1500fe(0x8c)))_0xff5585[_0x1500fe(0x8c)]=validateRequiredString(_0x1ec33c[_0x1500fe(0x8c)],'configName',0x80);else{if(_0x41fcfd==='create')throw notificationError('notification_config_field_required',_0x1500fe(0xa1)+'\x22configName\x22.');}if(hasOwn(_0x1ec33c,'channelType')){if(typeof _0x1ec33c[_0x1500fe(0xaf)]!==_0x1500fe(0x8d))throw invalidFieldType(_0x1500fe(0xaf),_0x1500fe(0x88));const _0x124754=_0x1ec33c[_0x1500fe(0xaf)][_0x1500fe(0xc4)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x1500fe(0xb9)](_0x124754))throw notificationError(_0x1500fe(0xf8),'Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES[_0x1500fe(0xb0)](',\x20')+'.');_0xff5585[_0x1500fe(0xaf)]=_0x124754;}else{if(_0x41fcfd===_0x1500fe(0xf7))throw notificationError(_0x1500fe(0xac),_0x1500fe(0xa1)+_0x1500fe(0xc3));}for(const [_0x5e8e29,_0x3fbddd]of[[_0x1500fe(0x83),0x200],['description',0x100]]){if(!hasOwn(_0x1ec33c,_0x5e8e29))continue;const _0x3a106a=_0x1ec33c[_0x5e8e29];if(_0x3a106a!==null&&typeof _0x3a106a!==_0x1500fe(0x8d))throw invalidFieldType(_0x5e8e29,_0x1500fe(0xc7));if(typeof _0x3a106a===_0x1500fe(0x8d)&&_0x3a106a[_0x1500fe(0xf1)]>_0x3fbddd)throw notificationError(_0x1500fe(0xf8),'Notification\x20JSON\x20field\x20\x22'+_0x5e8e29+'\x22\x20cannot\x20exceed\x20'+_0x3fbddd+_0x1500fe(0x8e));_0xff5585[_0x5e8e29]=_0x3a106a;}if(hasOwn(_0x1ec33c,_0x1500fe(0x9d))){const _0x4b7b00=_0x1ec33c[_0x1500fe(0x9d)];if(_0x4b7b00===null&&_0x41fcfd===_0x1500fe(0xf7))throw invalidFieldType('channelConfig',_0x1500fe(0xc0));if(_0x4b7b00!==null&&!isJsonObject(_0x4b7b00))throw invalidFieldType(_0x1500fe(0x9d),_0x41fcfd===_0x1500fe(0xbc)?_0x1500fe(0xae):_0x1500fe(0xc0));_0x4b7b00!==null&&validateChannelConfigFields(_0xff5585[_0x1500fe(0xaf)],_0x4b7b00),_0xff5585[_0x1500fe(0x9d)]=_0x4b7b00;}for(const _0x2e39d7 of[_0x1500fe(0x81),_0x1500fe(0xab)]){if(!hasOwn(_0x1ec33c,_0x2e39d7))continue;const _0x1de916=_0x1ec33c[_0x2e39d7];if(_0x1de916!==null&&(!Number[_0x1500fe(0xe4)](_0x1de916)||_0x1de916<0x0))throw notificationError('notification_config_field_invalid',_0x1500fe(0x93)+_0x2e39d7+_0x1500fe(0xdd));_0xff5585[_0x2e39d7]=_0x1de916;}return _0xff5585;}function validateRequiredString(_0x22f68c,_0x2df928,_0x11369f){const _0x158a3f=a181_0x1fbea3;if(typeof _0x22f68c!=='string')throw invalidFieldType(_0x2df928,_0x158a3f(0xf6));const _0x42f52a=_0x22f68c['trim']();if(!_0x42f52a)throw notificationError(_0x158a3f(0xf8),_0x158a3f(0x93)+_0x2df928+_0x158a3f(0xee));if(_0x42f52a[_0x158a3f(0xf1)]>_0x11369f)throw notificationError(_0x158a3f(0xf8),_0x158a3f(0x93)+_0x2df928+'\x22\x20cannot\x20exceed\x20'+_0x11369f+_0x158a3f(0x8e));return _0x42f52a;}function validateChannelConfigFields(_0x15283e,_0x410f79){const _0x1577c7=a181_0x1fbea3;if(hasOwn(_0x410f79,_0x1577c7(0xbe)))throw forbiddenChannelConfigField(_0x1577c7(0xbe));if(_0x15283e===_0x1577c7(0xc9))for(const _0x2e8e0a of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x410f79,_0x2e8e0a))throw forbiddenChannelConfigField(_0x2e8e0a);}}function forbiddenChannelConfigField(_0x569542){return notificationError('notification_config_channel_field_forbidden','Notification\x20JSON\x20channelConfig\x20field\x20\x22'+_0x569542+'\x22\x20is\x20forbidden.');}function invalidFieldType(_0x441a4d,_0x347ff1){const _0x39eb24=a181_0x1fbea3;return notificationError(_0x39eb24(0xf8),_0x39eb24(0x93)+_0x441a4d+'\x22\x20must\x20be\x20'+_0x347ff1+'.');}function serializeChannelConfig(_0x312c77){const _0x4586fa=a181_0x1fbea3;return _0x312c77===null||_0x312c77===undefined?null:JSON[_0x4586fa(0xa3)](_0x312c77);}function redactSensitive(_0x5731c7){const _0x169783=a181_0x1fbea3;return _0x5731c7===null||_0x5731c7===undefined||_0x5731c7===''?null:_0x169783(0x9b);}function requireResponseString(_0x59e8d0,_0x3ac716,_0xe9098f){const _0x5670db=a181_0x1fbea3;if(typeof _0x59e8d0!==_0x5670db(0x8d)||_0x59e8d0['trim']()==='')throw CliErrors[_0x5670db(0xc8)](_0x5670db(0xdb),_0x5670db(0xf9)+(_0xe9098f+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x3ac716+'\x22.');return _0x59e8d0[_0x5670db(0xc4)]();}function requireExactString(_0x15c098,_0x386ca3,_0x43bd5d){const _0x1c9814=a181_0x1fbea3;if(typeof _0x15c098!==_0x1c9814(0x8d)||_0x15c098[_0x1c9814(0xc4)]()==='')throw notificationError(_0x1c9814(0xbb),'Notification\x20config\x20'+_0x43bd5d+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x386ca3+'\x22.');return _0x15c098[_0x1c9814(0xc4)]();}function responseNullableString(_0x508ab2,_0x40d518,_0x4c6c36){const _0x2ad010=a181_0x1fbea3;if(_0x508ab2===undefined||_0x508ab2===null)return null;if(typeof _0x508ab2!==_0x2ad010(0x8d))throw notificationError(_0x2ad010(0xbb),'Notification\x20config\x20'+_0x4c6c36+_0x2ad010(0x99)+_0x40d518+'\x22.');return _0x508ab2;}function responseNullableTimeout(_0x64192b,_0x2c9815,_0x2dda02){const _0x144591=a181_0x1fbea3;if(_0x64192b===undefined||_0x64192b===null)return null;if(!Number[_0x144591(0xe4)](_0x64192b)||_0x64192b<0x0)throw notificationError(_0x144591(0xbb),_0x144591(0xa4)+_0x2dda02+_0x144591(0x99)+_0x2c9815+'\x22.');return _0x64192b;}function normalizeNullableString(_0x5a4f02){return typeof _0x5a4f02==='string'?_0x5a4f02:null;}function isJsonObject(_0x578452){const _0x2257be=a181_0x1fbea3;return _0x578452!==null&&typeof _0x578452===_0x2257be(0x95)&&!Array[_0x2257be(0xd4)](_0x578452);}function hasOwn(_0xc7158d,_0x51d492){const _0x344b07=a181_0x1fbea3;return Object[_0x344b07(0x87)]['hasOwnProperty'][_0x344b07(0xf2)](_0xc7158d,_0x51d492);}async function readStdin(){const _0x1cad08=a181_0x1fbea3;let _0xf9a33c='';process[_0x1cad08(0x86)][_0x1cad08(0xba)](_0x1cad08(0xe0));for await(const _0x17f117 of process['stdin'])_0xf9a33c+=_0x17f117;return _0xf9a33c;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a182_0x2c208d=a182_0x4173;(function(_0x48d6a8,_0x5e0316){const _0x236ae1=a182_0x4173,_0x4dd3a1=_0x48d6a8();while(!![]){try{const _0xe37f6=-parseInt(_0x236ae1(0x81))/0x1*(parseInt(_0x236ae1(0x7b))/0x2)+-parseInt(_0x236ae1(0x97))/0x3+-parseInt(_0x236ae1(0x92))/0x4+parseInt(_0x236ae1(0x87))/0x5+-parseInt(_0x236ae1(0x72))/0x6+-parseInt(_0x236ae1(0x7e))/0x7+-parseInt(_0x236ae1(0x93))/0x8*(-parseInt(_0x236ae1(0xa3))/0x9);if(_0xe37f6===_0x5e0316)break;else _0x4dd3a1['push'](_0x4dd3a1['shift']());}catch(_0x4ca2f1){_0x4dd3a1['push'](_0x4dd3a1['shift']());}}}(a182_0x14c8,0xdcaf3));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';function a182_0x14c8(){const _0x2d7699=['2016880TDruIj','scene','/smartapi/ocr/recognize-text?','POST','2201943WeoeLT','appCode','trim','invoice','Invoice','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','fileUrl','filter','/smartapi/common/uploadFile','GET','/smartapi/common/queryFileUrl','.\x20Supported\x20scenes:\x20','117ikBaow','idcard','\x20OCR','imageFile','path','read','general','4647522GGrkbU','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','string','apiError','ocr','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','toLowerCase','Preview:\x20recognize\x20','34TlXbYy','idCard','\x20OCR\x20from\x20URL','2375401gxkSRP','toString','validation','23089vsZtEb','filePath','str','image-url','IdCard','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','6510760GErNvz','form','join','Unsupported\x20OCR\x20scene:\x20','File\x20upload\x20response\x20missing\x20filePath.','image-file','Table','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','imageUrl','Publicly\x20accessible\x20image\x20or\x20file\x20URL','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','5740940RfAnNg'];a182_0x14c8=function(){return _0x2d7699;};return a182_0x14c8();}import{CliErrors}from'../../errors.js';function a182_0x4173(_0x1bf084,_0x9baf35){_0x1bf084=_0x1bf084-0x6f;const _0x14c803=a182_0x14c8();let _0x417344=_0x14c803[_0x1bf084];return _0x417344;}const SUPPORTED_SCENES=[a182_0x2c208d(0x9a),a182_0x2c208d(0x71),a182_0x2c208d(0x88),a182_0x2c208d(0x7c)],SCENE_TO_LEGACY_TYPE={'invoice':a182_0x2c208d(0x9b),'general':'General','form':a182_0x2c208d(0x8d),'idCard':a182_0x2c208d(0x85)},SCENE_FLAG={'name':'scene','type':a182_0x2c208d(0x74),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a182_0x2c208d(0x73)},IMAGE_FILE_FLAG={'name':a182_0x2c208d(0x8c),'type':'string','description':a182_0x2c208d(0x8e)},IMAGE_URL_FLAG={'name':a182_0x2c208d(0x84),'type':a182_0x2c208d(0x74),'description':a182_0x2c208d(0x90)};function normalizeScene(_0x3504c4){const _0x54ecdb=a182_0x2c208d,_0x47fab3=_0x3504c4[_0x54ecdb(0x99)]()[_0x54ecdb(0x79)]();if(_0x47fab3===_0x54ecdb(0xa4))return _0x54ecdb(0x7c);if(_0x47fab3===_0x54ecdb(0x9a)||_0x47fab3===_0x54ecdb(0x71)||_0x47fab3===_0x54ecdb(0x88))return _0x47fab3;throw CliErrors[_0x54ecdb(0x80)](_0x54ecdb(0x8a)+_0x3504c4+_0x54ecdb(0xa2)+SUPPORTED_SCENES[_0x54ecdb(0x89)](',\x20'));}function selectedInputs(_0xba097a){const _0x412507=a182_0x2c208d,_0x42cbb5=_0xba097a['str'](_0x412507(0x8c))[_0x412507(0x99)](),_0x45954d=_0xba097a[_0x412507(0x83)](_0x412507(0x84))[_0x412507(0x99)]();return{'imageFile':_0x42cbb5,'imageUrl':_0x45954d,'count':[_0x42cbb5,_0x45954d][_0x412507(0x9e)](Boolean)['length']};}function validateInputSelection(_0x542b96){const _0x9f1a18=a182_0x2c208d,_0x26742e=selectedInputs(_0x542b96);if(_0x26742e['count']!==0x1)throw CliErrors[_0x9f1a18(0x80)](_0x9f1a18(0x9c));return _0x26742e;}function withScene(_0x36fed2,_0xbbc754,_0x47dfd7){const _0x21b8d1=a182_0x2c208d;return{..._0x36fed2,'scene':_0xbbc754,..._0x47dfd7?{'sourceFile':{'fileName':_0x47dfd7['fileName'],'filePath':_0x47dfd7[_0x21b8d1(0x82)]}}:{}};}const ocrRecognize={'service':a182_0x2c208d(0x76),'command':'recognize','description':a182_0x2c208d(0x91),'risk':a182_0x2c208d(0x70),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x19f775){const _0x311a01=a182_0x2c208d,_0x5e49da=normalizeScene(_0x19f775[_0x311a01(0x83)](_0x311a01(0x94))),_0x5dedad=SCENE_TO_LEGACY_TYPE[_0x5e49da],_0xb10626=validateInputSelection(_0x19f775);if(_0xb10626['imageUrl']){const _0x4a3acc=new URLSearchParams({'url':_0xb10626[_0x311a01(0x8f)],'type':_0x5dedad,'appCode':_0x19f775[_0x311a01(0x98)]});return{'method':_0x311a01(0xa0),'url':_0x311a01(0x95)+_0x4a3acc[_0x311a01(0x7f)](),'description':_0x311a01(0x7a)+_0x5e49da+_0x311a01(0x7d)};}const _0x2d6af6=requireDevelopmentUploadFile(_0xb10626['imageFile'],'image-file');return{'method':_0x311a01(0x96),'url':_0x311a01(0x9f),'body':{'steps':[{'method':_0x311a01(0x96),'url':_0x311a01(0x9f),'body':{'appCode':_0x19f775[_0x311a01(0x98)],'multipart':{'file':_0x2d6af6}}},{'method':'POST','url':_0x311a01(0xa1),'body':{'filePath':_0x311a01(0x86),'downloadFlag':![]}},{'method':_0x311a01(0xa0),'url':'/smartapi/ocr/recognize-text','query':{'appCode':_0x19f775[_0x311a01(0x98)],'url':_0x311a01(0x77),'type':_0x5dedad}}]},'description':_0x311a01(0x78)+_0x5e49da+_0x311a01(0xa5)};},async 'execute'(_0x58bb63){const _0x2fce38=a182_0x2c208d,_0x13d508=normalizeScene(_0x58bb63[_0x2fce38(0x83)]('scene')),_0xe4dad2=SCENE_TO_LEGACY_TYPE[_0x13d508],_0x1262d9=validateInputSelection(_0x58bb63);if(_0x1262d9['imageUrl']){const _0xc02f51=await recognizeDevelopmentOcr(_0x58bb63[_0x2fce38(0x98)],{'url':_0x1262d9['imageUrl'],'type':_0xe4dad2});return{'ok':!![],'data':withScene(_0xc02f51,_0x13d508)};}const _0x59ca1d=requireDevelopmentUploadFile(_0x1262d9[_0x2fce38(0xa6)],_0x2fce38(0x8c)),_0x4b7edc=await uploadDevelopmentFile(_0x58bb63[_0x2fce38(0x98)],_0x59ca1d[_0x2fce38(0x6f)]);if(!_0x4b7edc['filePath'])throw CliErrors['apiError'](_0x2fce38(0x8b));const _0x3cd856=await queryDevelopmentFileUrl(_0x4b7edc[_0x2fce38(0x82)],{'download':![]});if(!_0x3cd856[_0x2fce38(0x9d)])throw CliErrors[_0x2fce38(0x75)]('File\x20URL\x20response\x20missing\x20fileUrl.');const _0x3066e0=await recognizeDevelopmentOcr(_0x58bb63[_0x2fce38(0x98)],{'url':_0x3cd856[_0x2fce38(0x9d)],'type':_0xe4dad2});return{'ok':!![],'data':withScene(_0x3066e0,_0x13d508,_0x4b7edc)};}};export const ocrDefinitions=[ocrRecognize];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a183_0x524e(_0x272565,_0x478c1d){_0x272565=_0x272565-0x1ec;const _0x298e1d=a183_0x298e();let _0x524e28=_0x298e1d[_0x272565];return _0x524e28;}const a183_0x169251=a183_0x524e;(function(_0x1b4f40,_0x628a34){const _0x42240b=a183_0x524e,_0x512a87=_0x1b4f40();while(!![]){try{const _0x3e94a0=parseInt(_0x42240b(0x22d))/0x1+parseInt(_0x42240b(0x20f))/0x2*(-parseInt(_0x42240b(0x1f1))/0x3)+-parseInt(_0x42240b(0x20b))/0x4*(parseInt(_0x42240b(0x1f6))/0x5)+parseInt(_0x42240b(0x22b))/0x6+parseInt(_0x42240b(0x211))/0x7*(parseInt(_0x42240b(0x221))/0x8)+-parseInt(_0x42240b(0x216))/0x9*(-parseInt(_0x42240b(0x1f4))/0xa)+-parseInt(_0x42240b(0x228))/0xb*(parseInt(_0x42240b(0x204))/0xc);if(_0x3e94a0===_0x628a34)break;else _0x512a87['push'](_0x512a87['shift']());}catch(_0x3e7c65){_0x512a87['push'](_0x512a87['shift']());}}}(a183_0x298e,0xe739f));import{readFile}from'node:fs/promises';import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';import{APPCODE_FLAG}from'../../commands/common/flags.js';import{readCustomPageDirectory}from'../../core/page/file-system.js';import{createCustomPage}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a183_0x298e(){const _0x816497=['72032qBznOt','appCode','create','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','4918TseGny','includes','2212105QwgsTl','files','length','Created\x20Custom\x20Page\x20','page-pattern','279Ufqduj','trim','apiError','page\x20create\x20no\x20longer\x20accepts\x20--page-content.','.json','Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)','validation','page-dir','BLANK','pageName\x20cannot\x20exceed\x20100\x20characters.','--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.','24HorNbx','Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.','createMenu','--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.','CUSTOM','string','/smartapi/webcode/page/create','1744798mbdBBS','stringify','page\x20create\x20does\x20not\x20accept\x20--page-type.','4092906rCZXvj','POST','505261RniFKa','isInteger','num','DASHBOARD','parentMenuId','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','now','Custom_page_','keys','pageName','isArray','page','Invalid\x20Custom\x20Page\x20pattern:\x20','Would\x20create\x20Custom\x20Page\x20','compress','591poMENw','write','object','282130WrDwaz','page-content','130RXYfyu','Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)','some','number','menuId','page.create','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','parse','utf8','parent-menu-id','Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','name','Custom\x20Page\x20pattern\x20not\x20found:\x20','menuPath','84UZmDUK','\x20and\x20its\x20menu\x20entry.','str','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.','ONEPAGE','pageId','values'];a183_0x298e=function(){return _0x816497;};return a183_0x298e();}import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,validateCustomPageContent}from'./custom/shared.js';const CUSTOM_PAGE_PATTERNS=[a183_0x169251(0x21e),a183_0x169251(0x208),a183_0x169251(0x230)],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),'../../../templates/custom-pages');export const pageCreate={'service':a183_0x169251(0x1ed),'command':a183_0x169251(0x20d),'description':a183_0x169251(0x200),'risk':a183_0x169251(0x1f2),'defaultOutputFormat':a183_0x169251(0x1f0),'structuredErrors':!![],'rejectedFlags':[{'name':'page-type','message':a183_0x169251(0x22a),'hint':a183_0x169251(0x207)},{'name':a183_0x169251(0x1f5),'message':a183_0x169251(0x219),'hint':a183_0x169251(0x232)}],'flags':[{'name':a183_0x169251(0x201),'type':a183_0x169251(0x226),'description':a183_0x169251(0x1fc)},{'name':'parent-menu-id','type':a183_0x169251(0x1f9),'description':'Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry'},{'name':'page-pattern','type':a183_0x169251(0x226),'description':a183_0x169251(0x21b),'enum':CUSTOM_PAGE_PATTERNS},{'name':a183_0x169251(0x21d),'type':'string','description':a183_0x169251(0x1f7)},APPCODE_FLAG],async 'validate'(_0x2992d1){await readValidatedPageSource(_0x2992d1);},async 'dryRun'(_0x206cfd){const _0x5e5ec4=a183_0x169251,_0x43869b=readInput(_0x206cfd,await readValidatedPageSource(_0x206cfd));return{'method':_0x5e5ec4(0x22c),'url':_0x5e5ec4(0x227),'body':{'appCode':_0x43869b[_0x5e5ec4(0x20c)],'pageName':_0x43869b['pageName'],..._0x43869b[_0x5e5ec4(0x231)]!=null?{'parentMenuId':_0x43869b['parentMenuId']}:{},'createMenu':_0x43869b[_0x5e5ec4(0x223)],'codeContent':_0x43869b[_0x5e5ec4(0x212)]},'description':_0x5e5ec4(0x1ef)+JSON[_0x5e5ec4(0x229)](_0x43869b[_0x5e5ec4(0x236)])+_0x5e5ec4(0x205)};},async 'execute'(_0xc6a3bf){const _0xa7e091=a183_0x169251,_0x10f493=readInput(_0xc6a3bf,await readValidatedPageSource(_0xc6a3bf)),_0x118cdd=await createCustomPage(_0x10f493);if(!Number['isInteger'](_0x118cdd[_0xa7e091(0x209)])||_0x118cdd['pageId']<=0x0)throw CliErrors[_0xa7e091(0x218)]('Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.');const _0x5a5e8e=buildCustomPageDevelopmentUrl(_0x10f493['appCode'],_0x118cdd[_0xa7e091(0x203)]),_0x310604=buildCustomPageEditUrl(_0x10f493['appCode'],_0x118cdd['pageId']);return{'ok':!![],'data':{'operation':_0xa7e091(0x1fb),'pageType':_0xa7e091(0x225),'pagePattern':readPagePattern(_0xc6a3bf),'selector':{'appCode':_0x10f493[_0xa7e091(0x20c)],'pageName':_0x10f493['pageName']},'before':null,'after':{'pageId':_0x118cdd[_0xa7e091(0x209)],'pageName':_0x118cdd[_0xa7e091(0x236)],'appCode':_0x118cdd['appCode'],'version':_0x118cdd['version'],'menuId':_0x118cdd[_0xa7e091(0x1fa)],'menuPath':_0x118cdd['menuPath'],'files':_0x118cdd[_0xa7e091(0x212)]??Object['keys'](_0x10f493[_0xa7e091(0x212)])},'dryRun':![],'request':_0x10f493,..._0x5a5e8e?{'pageUrl':_0x5a5e8e}:{},..._0x310604?{'editPageUrl':_0x310604}:{},'warnings':_0x5a5e8e?[]:['Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.']},'message':_0xa7e091(0x214)+_0x118cdd[_0xa7e091(0x209)]+'.'};}};function readPagePattern(_0x452cb3){const _0x1fdb22=a183_0x169251,_0x18f6a7=_0x452cb3[_0x1fdb22(0x206)](_0x1fdb22(0x215))[_0x1fdb22(0x217)](),_0x187cce=_0x452cb3[_0x1fdb22(0x206)](_0x1fdb22(0x21d))[_0x1fdb22(0x217)]();if(_0x18f6a7&&_0x187cce)throw CliErrors[_0x1fdb22(0x21c)](_0x1fdb22(0x224));if(_0x187cce)return null;if(!_0x18f6a7)throw CliErrors[_0x1fdb22(0x21c)](_0x1fdb22(0x222));if(!CUSTOM_PAGE_PATTERNS[_0x1fdb22(0x210)](_0x18f6a7))throw CliErrors[_0x1fdb22(0x21c)](_0x1fdb22(0x220));return _0x18f6a7;}async function readPageSource(_0x154cbd){const _0x562f89=a183_0x169251,_0x12543e=_0x154cbd[_0x562f89(0x206)](_0x562f89(0x21d))[_0x562f89(0x217)](),_0x36dd4a=readPagePattern(_0x154cbd);if(_0x36dd4a===null){const _0x274bdb=await readCustomPageDirectory(_0x12543e);if(Object[_0x562f89(0x235)](_0x274bdb)[_0x562f89(0x213)]===0x0)throw CliErrors[_0x562f89(0x21c)]('--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.');return _0x274bdb;}let _0x5ad614;try{_0x5ad614=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x36dd4a['toLowerCase']()+_0x562f89(0x21a)),_0x562f89(0x1fe));}catch{throw CliErrors['validation'](_0x562f89(0x202)+_0x36dd4a+'.');}let _0x23a121;try{_0x23a121=JSON[_0x562f89(0x1fd)](_0x5ad614);}catch{throw CliErrors[_0x562f89(0x21c)](_0x562f89(0x1ee)+_0x36dd4a+'.');}if(!_0x23a121||typeof _0x23a121!==_0x562f89(0x1f3)||Array[_0x562f89(0x1ec)](_0x23a121)||Object[_0x562f89(0x20a)](_0x23a121)[_0x562f89(0x1f8)](_0x12f3ed=>typeof _0x12f3ed!=='string'))throw CliErrors[_0x562f89(0x21c)](_0x562f89(0x1ee)+_0x36dd4a+'.');return _0x23a121;}async function readValidatedPageSource(_0x1f51cf){const _0x489d75=await readPageSource(_0x1f51cf);return await validateCustomPageContent(_0x489d75),_0x489d75;}function readInput(_0x24014e,_0x1244b8){const _0x2526fd=a183_0x169251,_0x18188f=_0x24014e[_0x2526fd(0x206)]('name')['trim']()||_0x2526fd(0x234)+Date[_0x2526fd(0x233)]();if(_0x18188f[_0x2526fd(0x213)]>0x64)throw CliErrors[_0x2526fd(0x21c)](_0x2526fd(0x21f));const _0xf3a0c4=_0x24014e[_0x2526fd(0x22f)](_0x2526fd(0x1ff),NaN),_0xf6617a=!Number['isNaN'](_0xf3a0c4);if(_0xf6617a&&(!Number[_0x2526fd(0x22e)](_0xf3a0c4)||_0xf3a0c4<=0x0))throw CliErrors[_0x2526fd(0x21c)](_0x2526fd(0x20e));return{'appCode':_0x24014e[_0x2526fd(0x20c)],'pageName':_0x18188f,..._0xf6617a?{'parentMenuId':_0xf3a0c4}:{},'createMenu':!![],'files':_0x1244b8};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a184_0x1ec5f6=a184_0x5cde;function a184_0x91ad(){const _0x113e66=['custom-detail','read','184XwCIPX','padStart','85180JbbuQU','trim','1822194nGjnPT','1234520ymSHTL','pageCode','5337jSCVhJ','Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','getMonth','982932lqhCIs','2hJGeZR','str','getDate','getMinutes','27752UMaZIn','49nbnnfm','getHours','isNaN','cookie','page','appCode','118032ygmJyW','number'];a184_0x91ad=function(){return _0x113e66;};return a184_0x91ad();}(function(_0x2aa3eb,_0x27233d){const _0x4d26f8=a184_0x5cde,_0x2a18e1=_0x2aa3eb();while(!![]){try{const _0x1035a0=-parseInt(_0x4d26f8(0x11e))/0x1*(-parseInt(_0x4d26f8(0x113))/0x2)+parseInt(_0x4d26f8(0x10f))/0x3*(parseInt(_0x4d26f8(0x108))/0x4)+parseInt(_0x4d26f8(0x10a))/0x5+-parseInt(_0x4d26f8(0x112))/0x6+parseInt(_0x4d26f8(0x118))/0x7*(-parseInt(_0x4d26f8(0x117))/0x8)+parseInt(_0x4d26f8(0x10c))/0x9+-parseInt(_0x4d26f8(0x10d))/0xa;if(_0x1035a0===_0x27233d)break;else _0x2a18e1['push'](_0x2a18e1['shift']());}catch(_0x3e5795){_0x2a18e1['push'](_0x2a18e1['shift']());}}}(a184_0x91ad,0x1a523));import{getCustomPageSource}from'../../../core/api-client.js';function a184_0x5cde(_0x400f74,_0x1df620){_0x400f74=_0x400f74-0x108;const _0x91adbd=a184_0x91ad();let _0x5cdee5=_0x91adbd[_0x400f74];return _0x5cdee5;}import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':a184_0x1ec5f6(0x11c),'command':a184_0x1ec5f6(0x120),'description':a184_0x1ec5f6(0x110),'risk':a184_0x1ec5f6(0x121),'defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a184_0x1ec5f6(0x11f),'required':!![],'description':'Custom\x20Page\x20ID'},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x25d24a){readCustomPageId(_0x25d24a);},async 'execute'(_0x393a14){const _0x27fd42=a184_0x1ec5f6,_0xbf9ca5=readCustomPageId(_0x393a14),_0x1d6107=await getCustomPageSource(_0xbf9ca5),{bundle:_0x19cf72,createTime:_0x1005d3,updateTime:_0x14abdd,..._0x17e642}=_0x1d6107,_0x3cc395=_0x1d6107['id']??_0xbf9ca5,_0x453524=_0x1d6107[_0x27fd42(0x11d)]?.[_0x27fd42(0x10b)]()||_0x393a14[_0x27fd42(0x114)]('appcode')[_0x27fd42(0x10b)](),_0x124a98=buildCustomPageRuntimeUrl(_0x453524,_0x1d6107[_0x27fd42(0x10e)]),_0x28e1de=buildCustomPageEditUrl(_0x453524,_0x3cc395),_0x20d726=await resolveCustomPageDevelopmentUrl(_0x453524,_0x3cc395,_0x393a14[_0x27fd42(0x11b)]);return{'ok':!![],'data':{..._0x17e642,..._0x124a98?{'runtimePageUrl':_0x124a98}:{},..._0x20d726?{'pageUrl':_0x20d726}:{},..._0x28e1de?{'editPageUrl':_0x28e1de}:{},..._0x1005d3==null?{}:{'createTime':formatTime(_0x1005d3)},..._0x14abdd==null?{}:{'updateTime':formatTime(_0x14abdd)}},'message':'Retrieved\x20Custom\x20Page\x20'+_0xbf9ca5+'.'};}};function formatTime(_0x547c87){const _0x333229=a184_0x1ec5f6,_0x527fca=new Date(_0x547c87);if(Number[_0x333229(0x11a)](_0x527fca['getTime']()))return String(_0x547c87);const _0x1bf769=[_0x527fca['getFullYear'](),String(_0x527fca[_0x333229(0x111)]()+0x1)[_0x333229(0x109)](0x2,'0'),String(_0x527fca[_0x333229(0x115)]())[_0x333229(0x109)](0x2,'0')]['join']('-'),_0x213e5d=[String(_0x527fca[_0x333229(0x119)]())[_0x333229(0x109)](0x2,'0'),String(_0x527fca[_0x333229(0x116)]())[_0x333229(0x109)](0x2,'0'),String(_0x527fca['getSeconds']())[_0x333229(0x109)](0x2,'0')]['join'](':');return _0x1bf769+'\x20'+_0x213e5d;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a185_0x504065=a185_0x15b9;(function(_0x143c7a,_0x1a39a6){const _0x48853c=a185_0x15b9,_0x12be35=_0x143c7a();while(!![]){try{const _0x59e70b=parseInt(_0x48853c(0x191))/0x1+-parseInt(_0x48853c(0x190))/0x2*(parseInt(_0x48853c(0x187))/0x3)+parseInt(_0x48853c(0x181))/0x4*(parseInt(_0x48853c(0x180))/0x5)+-parseInt(_0x48853c(0x189))/0x6+parseInt(_0x48853c(0x17b))/0x7+-parseInt(_0x48853c(0x184))/0x8*(parseInt(_0x48853c(0x186))/0x9)+parseInt(_0x48853c(0x18b))/0xa;if(_0x59e70b===_0x1a39a6)break;else _0x12be35['push'](_0x12be35['shift']());}catch(_0x5e895f){_0x12be35['push'](_0x12be35['shift']());}}}(a185_0x19c9,0x859b9));import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,buildCustomPageRuntimeUrl}from'./shared.js';function a185_0x15b9(_0xb87303,_0x205867){_0xb87303=_0xb87303-0x179;const _0x19c9b9=a185_0x19c9();let _0x15b953=_0x19c9b9[_0xb87303];return _0x15b953;}export const pageCustomList={'service':'page','command':a185_0x504065(0x18c),'description':a185_0x504065(0x188),'risk':a185_0x504065(0x17a),'defaultOutputFormat':a185_0x504065(0x185),'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x29a1d5){const _0x5fc298=a185_0x504065,_0x3bb03c=(await fetchMenuSnapshot(_0x29a1d5[_0x5fc298(0x17c)],_0x29a1d5[_0x5fc298(0x17e)]))[_0x5fc298(0x17d)][_0x5fc298(0x183)](_0x3cac93=>{const _0x14a6a3=_0x5fc298;if(_0x3cac93[_0x14a6a3(0x179)]!=='react'||_0x3cac93[_0x14a6a3(0x18f)]==null)return[];const _0x7628c8=buildCustomPageDevelopmentUrl(_0x29a1d5[_0x14a6a3(0x17c)],_0x3cac93[_0x14a6a3(0x17f)]),_0x474eb1=buildCustomPageRuntimeUrl(_0x29a1d5[_0x14a6a3(0x17c)],_0x3cac93['path']),_0x32cb5e=buildCustomPageEditUrl(_0x29a1d5[_0x14a6a3(0x17c)],_0x3cac93[_0x14a6a3(0x18f)]);return[{'pageId':_0x3cac93[_0x14a6a3(0x18f)],'label':_0x3cac93[_0x14a6a3(0x18d)],'path':_0x3cac93['path'],..._0x7628c8?{'pageUrl':_0x7628c8}:{},..._0x474eb1?{'runtimePageUrl':_0x474eb1}:{},..._0x32cb5e?{'editPageUrl':_0x32cb5e}:{}}];});return{'ok':!![],'data':{'pages':_0x3bb03c},'message':_0x3bb03c['length']===0x0?'No\x20Custom\x20Pages\x20found.':_0x5fc298(0x182)+_0x3bb03c[_0x5fc298(0x18a)]+_0x5fc298(0x18e)};}};function a185_0x19c9(){const _0x98bb71=['2815hTqiwR','292SSgncG','Found\x20','flatMap','162896bOfDwI','compress','63MwgHFm','3077022fVeIqr','List\x20Custom\x20Pages\x20in\x20the\x20current\x20app','5322324bRwRzt','length','17820460jgQvhd','custom-list','label','\x20Custom\x20Page(s).','pageId','2hUuGID','517536tgrTcF','type','read','1832866jXdtuU','appCode','menus','cookie','path'];a185_0x19c9=function(){return _0x98bb71;};return a185_0x19c9();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a186_0x136907=a186_0x4e68;(function(_0x123b7f,_0x2259b3){const _0x4dbfe6=a186_0x4e68,_0x194419=_0x123b7f();while(!![]){try{const _0x4cd1f1=parseInt(_0x4dbfe6(0x9b))/0x1*(-parseInt(_0x4dbfe6(0xa8))/0x2)+-parseInt(_0x4dbfe6(0xa6))/0x3+parseInt(_0x4dbfe6(0x8e))/0x4*(parseInt(_0x4dbfe6(0x94))/0x5)+parseInt(_0x4dbfe6(0x85))/0x6*(parseInt(_0x4dbfe6(0x91))/0x7)+parseInt(_0x4dbfe6(0x93))/0x8+-parseInt(_0x4dbfe6(0x90))/0x9+-parseInt(_0x4dbfe6(0x99))/0xa*(parseInt(_0x4dbfe6(0xa2))/0xb);if(_0x4cd1f1===_0x2259b3)break;else _0x194419['push'](_0x194419['shift']());}catch(_0xadf00f){_0x194419['push'](_0x194419['shift']());}}}(a186_0x11da,0x68b18));function a186_0x11da(){const _0x1df0a3=['125377mWraVP','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20published\x20page\x20could\x20not\x20be\x20generated.','6058320ruWGvK','65SWbOuU','cookie','remark','pageId','string','20IYmiOF','appCode','24551PIvOan','custom-publish','Publish\x20the\x20latest\x20saved\x20content\x20of\x20a\x20Custom\x20Page','/smartapi/webcode/file/publish','Custom\x20Page\x20publish\x20did\x20not\x20return\x20the\x20expected\x20page\x20ID.','isInteger','Published\x20Custom\x20Page\x20','866833DWQnIb','Custom\x20Page\x20publish\x20did\x20not\x20reach\x20published\x20status:\x20','write','pageCode','953100lqzwRh','trim','10HLCsIN','POST','186rnfcWc','Optional\x20publish\x20remark','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','apiError','status','Custom\x20Page\x20ID','page.custom-publish','page','FORMAL','81364omIMmC','push','4950711fpdzyY'];a186_0x11da=function(){return _0x1df0a3;};return a186_0x11da();}import{getCustomPageSource,publishCustomPage}from'../../../core/api-client.js';function a186_0x4e68(_0x3abbe6,_0x17ae1d){_0x3abbe6=_0x3abbe6-0x84;const _0x11da6b=a186_0x11da();let _0x4e6872=_0x11da6b[_0x3abbe6];return _0x4e6872;}import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomPublish={'service':a186_0x136907(0x8c),'command':a186_0x136907(0x9c),'description':a186_0x136907(0x9d),'risk':a186_0x136907(0xa4),'defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':'number','required':!![],'description':a186_0x136907(0x8a)},{'name':a186_0x136907(0x96),'type':a186_0x136907(0x98),'description':a186_0x136907(0x86)}],async 'validate'(_0x39d50e){readCustomPageId(_0x39d50e);},async 'dryRun'(_0x1461e9){const _0x15830c=a186_0x136907,_0x5b4da5=readInput(_0x1461e9);return{'method':_0x15830c(0x84),'url':_0x15830c(0x9e),'body':{'id':_0x5b4da5[_0x15830c(0x97)],..._0x5b4da5[_0x15830c(0x96)]?{'remark':_0x5b4da5[_0x15830c(0x96)]}:{}},'description':'Would\x20publish\x20Custom\x20Page\x20'+_0x5b4da5[_0x15830c(0x97)]+'.'};},async 'execute'(_0x4c1b2b){const _0x5b16c4=a186_0x136907,_0x9d4b0e=readInput(_0x4c1b2b);await getCustomPageSource(_0x9d4b0e[_0x5b16c4(0x97)]);const _0x430560=await publishCustomPage(_0x9d4b0e);if(!Number[_0x5b16c4(0xa0)](_0x430560)||_0x430560!==_0x9d4b0e[_0x5b16c4(0x97)])throw CliErrors['apiError'](_0x5b16c4(0x9f));const _0x4bfd76=await getCustomPageSource(_0x9d4b0e['pageId']);if(_0x4bfd76['status']!==_0x5b16c4(0x8d))throw CliErrors[_0x5b16c4(0x88)](_0x5b16c4(0xa3)+(_0x4bfd76[_0x5b16c4(0x89)]??'unknown')+'.');const _0x28858a=_0x4bfd76[_0x5b16c4(0x9a)]?.[_0x5b16c4(0xa7)](),_0x8ecbb5=buildCustomPageEditUrl(_0x28858a,_0x9d4b0e[_0x5b16c4(0x97)]),_0x526b6d=await resolveCustomPageDevelopmentUrl(_0x28858a,_0x9d4b0e['pageId'],_0x4c1b2b[_0x5b16c4(0x95)]),_0x14923d=buildMutationData(_0x9d4b0e,!![],_0x526b6d,_0x8ecbb5);_0x28858a&&!_0x526b6d&&_0x14923d['warnings'][_0x5b16c4(0x8f)](_0x5b16c4(0x87));const _0x100e81=buildCustomPageRuntimeUrl(_0x4bfd76['appCode'],_0x4bfd76[_0x5b16c4(0xa5)]);return _0x100e81?_0x14923d['runtimePageUrl']=_0x100e81:_0x14923d['warnings'][_0x5b16c4(0x8f)](_0x5b16c4(0x92)),{'ok':!![],'data':_0x14923d,'message':_0x5b16c4(0xa1)+_0x9d4b0e[_0x5b16c4(0x97)]+'.'};}};function readInput(_0x2e8064){const _0x459e86=a186_0x136907,_0x3e04e1=readCustomPageId(_0x2e8064),_0x54ad46=_0x2e8064['str'](_0x459e86(0x96))[_0x459e86(0xa7)]();return{'pageId':_0x3e04e1,..._0x54ad46?{'remark':_0x54ad46}:{}};}function buildMutationData(_0x22eb59,_0x24854b=![],_0xe71b56,_0x96dda9){const _0x1d2152=a186_0x136907;return{'operation':_0x1d2152(0x8b),'selector':{'pageId':_0x22eb59['pageId']},'before':null,'after':{'pageId':_0x22eb59[_0x1d2152(0x97)],'status':_0x1d2152(0x8d)},'dryRun':!_0x24854b,'request':_0x22eb59,..._0xe71b56?{'pageUrl':_0xe71b56}:{},..._0x96dda9?{'editPageUrl':_0x96dda9}:{},'warnings':[]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a187_0x2df7(){const _0x2be452=['find','128584LyVrzf','type','length','5250080wuqQIg','1020952KTogQt','5BUBdCt','1718970ArJnNv','/ide/','/pages/','message','react','validation','3kIlKYI','4031862tHBdWH','Invalid\x20Custom\x20Page\x20content:\x20','join','2120230dRlHRK','isInteger','410695kInnjv','menus','map','trim','108ZMSjFw'];a187_0x2df7=function(){return _0x2be452;};return a187_0x2df7();}(function(_0x47099a,_0x250abe){const _0x1057bc=a187_0x1098,_0x546e02=_0x47099a();while(!![]){try{const _0x209168=parseInt(_0x1057bc(0x1ab))/0x1+-parseInt(_0x1057bc(0x19f))/0x2+-parseInt(_0x1057bc(0x1a5))/0x3*(-parseInt(_0x1057bc(0x19d))/0x4)+parseInt(_0x1057bc(0x19e))/0x5*(parseInt(_0x1057bc(0x1a6))/0x6)+-parseInt(_0x1057bc(0x1a9))/0x7+parseInt(_0x1057bc(0x199))/0x8*(-parseInt(_0x1057bc(0x197))/0x9)+parseInt(_0x1057bc(0x19c))/0xa;if(_0x209168===_0x250abe)break;else _0x546e02['push'](_0x546e02['shift']());}catch(_0x571dab){_0x546e02['push'](_0x546e02['shift']());}}}(a187_0x2df7,0x7bf13));import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{getAppBaseUrl,getPublishedAppDomain}from'../../../constant/domain.js';import{CliErrors}from'../../../errors.js';import{validateCustomPageSourceFiles}from'./syntax.js';function a187_0x1098(_0x37ba38,_0x2fcbf2){_0x37ba38=_0x37ba38-0x194;const _0x2df7f4=a187_0x2df7();let _0x10983b=_0x2df7f4[_0x37ba38];return _0x10983b;}export const CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL={...APPCODE_FLAG_OPTIONAL,'description':'Optional\x20app\x20code\x20resolved\x20from\x20page\x20ID\x20when\x20omitted'};function trimOptional(_0x28b914){const _0x2ae6d8=a187_0x1098;return _0x28b914?.[_0x2ae6d8(0x196)]()||undefined;}export function buildCustomPageRuntimeUrl(_0x230c78,_0x1ab4bb){const _0x3d431d=trimOptional(_0x230c78),_0x3c90b6=trimOptional(_0x1ab4bb);if(!_0x3d431d||!_0x3c90b6)return undefined;return getPublishedAppDomain(_0x3d431d)+'/'+encodeURIComponent(_0x3c90b6);}export function buildCustomPageDevelopmentUrl(_0x4044be,_0x357f14){const _0x323d84=a187_0x1098,_0x430435=trimOptional(_0x4044be),_0x9adb44=trimOptional(_0x357f14);if(!_0x430435||!_0x9adb44)return undefined;return getAppBaseUrl(_0x430435)+_0x323d84(0x1a1)+encodeURIComponent(_0x9adb44);}export async function resolveCustomPageDevelopmentUrl(_0x418655,_0x362229,_0xcbb7ba){const _0x445cd1=a187_0x1098,_0xa9a230=trimOptional(_0x418655);if(!_0xa9a230)return undefined;try{const _0x2294b4=(await fetchMenuSnapshot(_0xa9a230,_0xcbb7ba))[_0x445cd1(0x194)][_0x445cd1(0x198)](_0x2a0ca6=>_0x2a0ca6[_0x445cd1(0x19a)]===_0x445cd1(0x1a3)&&_0x2a0ca6['pageId']===_0x362229);return buildCustomPageDevelopmentUrl(_0xa9a230,_0x2294b4?.['path']);}catch{return undefined;}}export function buildCustomPageEditUrl(_0x553b0c,_0x433080){const _0xfc57a5=a187_0x1098,_0x56bffe=trimOptional(_0x553b0c);if(!_0x56bffe)return;const _0x2805aa=trimOptional(String(_0x433080??''));if(!_0x2805aa)return;return getAppBaseUrl(_0x56bffe)+_0xfc57a5(0x1a0)+encodeURIComponent(_0x2805aa);}export async function validateCustomPageContent(_0x4ad62c){const _0xf7bf71=a187_0x1098,_0x3f6056=await validateCustomPageSourceFiles(_0x4ad62c);if(_0x3f6056[_0xf7bf71(0x19b)]>0x0)throw CliErrors[_0xf7bf71(0x1a4)](_0xf7bf71(0x1a7)+_0x3f6056[_0xf7bf71(0x195)](_0x3d8689=>_0x3d8689['file']+':\x20'+_0x3d8689[_0xf7bf71(0x1a2)])[_0xf7bf71(0x1a8)](';\x20'));}export function readCustomPageId(_0x1c6e2a){const _0x4b044f=a187_0x1098,_0xdbc953=_0x1c6e2a['num']('id');if(!Number[_0x4b044f(0x1aa)](_0xdbc953)||_0xdbc953<=0x0)throw CliErrors[_0x4b044f(0x1a4)]('--id\x20must\x20be\x20a\x20positive\x20integer.');return _0xdbc953;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a188_0x44192a=a188_0x1206;(function(_0x1c2180,_0x597576){const _0x4df24a=a188_0x1206,_0x1084ac=_0x1c2180();while(!![]){try{const _0x5cfbde=-parseInt(_0x4df24a(0x18b))/0x1+parseInt(_0x4df24a(0x182))/0x2*(-parseInt(_0x4df24a(0x17b))/0x3)+-parseInt(_0x4df24a(0x18a))/0x4+parseInt(_0x4df24a(0x186))/0x5*(parseInt(_0x4df24a(0x181))/0x6)+parseInt(_0x4df24a(0x180))/0x7*(-parseInt(_0x4df24a(0x187))/0x8)+parseInt(_0x4df24a(0x18f))/0x9*(parseInt(_0x4df24a(0x189))/0xa)+parseInt(_0x4df24a(0x179))/0xb;if(_0x5cfbde===_0x597576)break;else _0x1084ac['push'](_0x1084ac['shift']());}catch(_0x29c64a){_0x1084ac['push'](_0x1084ac['shift']());}}}(a188_0x50b7,0xee2f6));import{format}from'prettier';const SOURCE_PARSERS={'.js':a188_0x44192a(0x18d),'.jsx':'babel','.ts':a188_0x44192a(0x17f),'.tsx':'typescript'},CUSTOM_PAGE_EXTENSIONS=[a188_0x44192a(0x17d),a188_0x44192a(0x184)];function a188_0x50b7(){const _0x4065cd=['1772830WpEQww','799364sdkWDY','1334571PqtxUY','message','babel','filter','63IihaYk','39357791RAXZHN','toLowerCase','169737YggqAV','some','.jsx','map','typescript','7OGFwXT','6oyfAqA','54upFZOp','trim','.tsx','find','2532765rblsPJ','10302912GxFqQT','all'];a188_0x50b7=function(){return _0x4065cd;};return a188_0x50b7();}export async function validateCustomPageSourceFiles(_0x2ebf02){const _0x420973=a188_0x44192a,_0x1a497a=Object['entries'](_0x2ebf02)[_0x420973(0x18e)](([_0x55cbff])=>getParser(_0x55cbff));if(!_0x1a497a[_0x420973(0x17c)](([_0x53f844])=>isReactSourceFile(_0x53f844)))return[{'file':'page\x20files','message':'Missing\x20React\x20source\x20file\x20with\x20extension\x20.jsx\x20or\x20.tsx'}];const _0x18671f=await Promise[_0x420973(0x188)](_0x1a497a[_0x420973(0x17e)](async([_0x4e589c,_0x2ae26c])=>{const _0xbea60f=_0x420973;try{return await format(_0x2ae26c,{'parser':getParser(_0x4e589c)}),undefined;}catch(_0x23069b){return{'file':_0x4e589c,'message':_0x23069b instanceof Error?_0x23069b[_0xbea60f(0x18c)]:String(_0x23069b)};}}));return _0x18671f[_0x420973(0x18e)](_0x174c77=>_0x174c77!==undefined);}function getParser(_0x2e9d6f){const _0x3ccec4=a188_0x44192a,_0x498a99=_0x2e9d6f['trim']()[_0x3ccec4(0x17a)]();return Object['entries'](SOURCE_PARSERS)[_0x3ccec4(0x185)](([_0x492781])=>_0x498a99['endsWith'](_0x492781))?.[0x1];}function a188_0x1206(_0x50ce2e,_0x371e35){_0x50ce2e=_0x50ce2e-0x179;const _0x50b737=a188_0x50b7();let _0x120635=_0x50b737[_0x50ce2e];return _0x120635;}function isReactSourceFile(_0x3f66d0){const _0x2e71b0=a188_0x44192a,_0x207e7f=_0x3f66d0[_0x2e71b0(0x183)]()[_0x2e71b0(0x17a)]();return CUSTOM_PAGE_EXTENSIONS[_0x2e71b0(0x17c)](_0x19389b=>_0x207e7f['endsWith'](_0x19389b));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a189_0x19a9e3=a189_0x404d;function a189_0x1e6e(){const _0x1b82d6=['pageContent','4MZxAXk','page-dir','2061684SmqvIe','149336CXgAAl','compress','Cannot\x20determine\x20the\x20appCode\x20for\x20Custom\x20Page\x20','newVersion','str','848069GJIugj','cookie','page','5973380EmxQPF','2066696DolcgM','/smartapi/webcode/page/update/content','appCode','414EDJtbp','trim','appcode','write','page-content','page.custom-update','13884390WgrwZl','string','pageId','77476lLoopD','Save\x20all\x20files\x20of\x20a\x20Custom\x20Page','Custom\x20Page\x20was\x20updated,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','Would\x20save\x20all\x20files\x20of\x20Custom\x20Page\x20','Custom\x20Page\x20update\x20did\x20not\x20create\x20a\x20new\x20version.','81UTvMHU','validation','Custom\x20Page\x20ID','isInteger','POST','Directory\x20containing\x20all\x20complete\x20page\x20files'];a189_0x1e6e=function(){return _0x1b82d6;};return a189_0x1e6e();}(function(_0x5bdeeb,_0x4e8188){const _0x5ddbf5=a189_0x404d,_0x2af32c=_0x5bdeeb();while(!![]){try{const _0x2c2100=-parseInt(_0x5ddbf5(0xce))/0x1+-parseInt(_0x5ddbf5(0xae))/0x2+-parseInt(_0x5ddbf5(0xc8))/0x3+parseInt(_0x5ddbf5(0xc6))/0x4*(parseInt(_0x5ddbf5(0xad))/0x5)+parseInt(_0x5ddbf5(0xb1))/0x6*(parseInt(_0x5ddbf5(0xba))/0x7)+-parseInt(_0x5ddbf5(0xc9))/0x8*(parseInt(_0x5ddbf5(0xbf))/0x9)+parseInt(_0x5ddbf5(0xb7))/0xa;if(_0x2c2100===_0x4e8188)break;else _0x2af32c['push'](_0x2af32c['shift']());}catch(_0x212afa){_0x2af32c['push'](_0x2af32c['shift']());}}}(a189_0x1e6e,0x94f6f));import{getCustomPageSource,updateCustomPageContent}from'../../../core/api-client.js';import{readCustomPageDirectory}from'../../../core/page/file-system.js';import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,resolveCustomPageDevelopmentUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,validateCustomPageContent}from'./shared.js';export const pageCustomUpdate={'service':a189_0x19a9e3(0xac),'command':'custom-update','description':a189_0x19a9e3(0xbb),'risk':a189_0x19a9e3(0xb4),'defaultOutputFormat':a189_0x19a9e3(0xca),'structuredErrors':!![],'requiresAppCode':![],'rejectedFlags':[{'name':a189_0x19a9e3(0xb5),'message':'page\x20custom-update\x20no\x20longer\x20accepts\x20--page-content.','hint':'Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.'}],'flags':[{'name':'id','type':'number','required':!![],'description':a189_0x19a9e3(0xc1)},{'name':'page-dir','type':a189_0x19a9e3(0xb8),'required':!![],'description':a189_0x19a9e3(0xc4)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x51f349){readCustomPageId(_0x51f349),await readValidatedPageContent(_0x51f349);},async 'dryRun'(_0x42418f){const _0x4a6a04=a189_0x19a9e3,_0x1e5b44=await readInput(_0x42418f);return{'method':_0x4a6a04(0xc3),'url':_0x4a6a04(0xaf),'body':{'id':_0x1e5b44[_0x4a6a04(0xb9)],'codeContent':_0x1e5b44['pageContent']},'description':_0x4a6a04(0xbd)+_0x1e5b44['pageId']+'.'};},async 'execute'(_0x1ca5d7){const _0x234db9=a189_0x19a9e3,_0x352dde=await readInput(_0x1ca5d7),_0x5bb5c0=await updateCustomPageContent({'pageId':_0x352dde['pageId'],'pageContent':_0x352dde['pageContent']});if(!Number[_0x234db9(0xc2)](_0x5bb5c0[_0x234db9(0xcc)])||_0x5bb5c0[_0x234db9(0xcc)]<=0x0)throw CliErrors['apiError'](_0x234db9(0xbe));const _0x3a3095=buildCustomPageEditUrl(_0x352dde[_0x234db9(0xb0)],_0x352dde[_0x234db9(0xb9)]),_0xc368ce=await resolveCustomPageDevelopmentUrl(_0x352dde[_0x234db9(0xb0)],_0x352dde[_0x234db9(0xb9)],_0x1ca5d7[_0x234db9(0xcf)]);return{'ok':!![],'data':{'operation':_0x234db9(0xb6),'selector':{'appCode':_0x352dde[_0x234db9(0xb0)],'pageId':_0x352dde[_0x234db9(0xb9)]},'before':null,'after':{'pageId':_0x5bb5c0[_0x234db9(0xb9)],'version':_0x5bb5c0[_0x234db9(0xcc)],'pageContent':_0x352dde[_0x234db9(0xc5)]},'dryRun':![],'request':_0x352dde,..._0xc368ce?{'pageUrl':_0xc368ce}:{},..._0x3a3095?{'editPageUrl':_0x3a3095}:{},'warnings':_0xc368ce?[]:[_0x234db9(0xbc)]},'message':'Updated\x20Custom\x20Page\x20'+_0x352dde['pageId']+'.'};}};function a189_0x404d(_0x19680e,_0x402e04){_0x19680e=_0x19680e-0xac;const _0x1e6ee0=a189_0x1e6e();let _0x404db8=_0x1e6ee0[_0x19680e];return _0x404db8;}async function readInput(_0x2b59f6){const _0xe9fe7e=a189_0x19a9e3,_0x1b84d4=readCustomPageId(_0x2b59f6),_0x3d7bb3=_0x2b59f6[_0xe9fe7e(0xcd)](_0xe9fe7e(0xb3))['trim']()||(await getCustomPageSource(_0x1b84d4))[_0xe9fe7e(0xb0)]?.[_0xe9fe7e(0xb2)]();if(!_0x3d7bb3)throw CliErrors[_0xe9fe7e(0xc0)](_0xe9fe7e(0xcb)+_0x1b84d4+'.');return{'appCode':_0x3d7bb3,'pageId':_0x1b84d4,'pageContent':await readValidatedPageContent(_0x2b59f6)};}async function readValidatedPageContent(_0x5c71c1){const _0x125c4f=a189_0x19a9e3,_0x34c0a8=await readCustomPageDirectory(_0x5c71c1[_0x125c4f(0xcd)](_0x125c4f(0xc7)));return await validateCustomPageContent(_0x34c0a8),_0x34c0a8;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a190_0x1dae54=a190_0x471c;(function(_0x12f453,_0x4bb44c){const _0x2b9b7d=a190_0x471c,_0x5dd1af=_0x12f453();while(!![]){try{const _0x18a2fc=parseInt(_0x2b9b7d(0x11b))/0x1*(-parseInt(_0x2b9b7d(0x119))/0x2)+-parseInt(_0x2b9b7d(0x10c))/0x3*(-parseInt(_0x2b9b7d(0x10d))/0x4)+parseInt(_0x2b9b7d(0x110))/0x5*(parseInt(_0x2b9b7d(0x111))/0x6)+parseInt(_0x2b9b7d(0x10e))/0x7*(parseInt(_0x2b9b7d(0x123))/0x8)+-parseInt(_0x2b9b7d(0x11f))/0x9*(parseInt(_0x2b9b7d(0x124))/0xa)+parseInt(_0x2b9b7d(0x10f))/0xb+-parseInt(_0x2b9b7d(0x121))/0xc*(parseInt(_0x2b9b7d(0x127))/0xd);if(_0x18a2fc===_0x4bb44c)break;else _0x5dd1af['push'](_0x5dd1af['shift']());}catch(_0x19ec1f){_0x5dd1af['push'](_0x5dd1af['shift']());}}}(a190_0x5b5c,0xa13d8));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessDataListPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';function a190_0x471c(_0x285a13,_0x56f0fe){_0x285a13=_0x285a13-0x10c;const _0x5b5c32=a190_0x5b5c();let _0x471c3e=_0x5b5c32[_0x285a13];return _0x471c3e;}function a190_0x5b5c(){const _0x270ffd=['481020iphjBT','60ZPxQJN','nextAction','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','compress','read','alias','manualResolutionRequired','page','190LZXIDr','related-pages-fallback','11915aMUzZw','string','code','status','5832uxbfVS','length','312gBbKol','query-data-list-status','24Zhgmse','5410pDTCKH','source','relatedPages','351741SRdtrm','GET','15567yIEXgy','852ijoZbN','819602EEhWsQ','4706460NsFyya'];a190_0x5b5c=function(){return _0x270ffd;};return a190_0x5b5c();}export const pageDataListStatus={'service':a190_0x1dae54(0x118),'command':'data-list-status','description':'Query\x20Data\x20List\x20Page\x20facts\x20for\x20a\x20dataset','risk':a190_0x1dae54(0x115),'defaultOutputFormat':a190_0x1dae54(0x114),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a190_0x1dae54(0x116),'type':a190_0x1dae54(0x11c),'description':a190_0x1dae54(0x113)}],async 'validate'(_0x421c6a){validateDatasetSelector(_0x421c6a);},async 'dryRun'(_0x45ac89){const _0x5ffbe5=a190_0x1dae54,_0x4df1f6=await loadDatasetDetailForPage(_0x45ac89);return{'method':_0x5ffbe5(0x128),'url':'/smartapi/lovrabet/dataset/'+_0x4df1f6[_0x5ffbe5(0x11d)]+'/standard-page-status?appCode='+encodeURIComponent(_0x45ac89['appCode']),'description':serializeDryRunDescription({'dataset':{'id':_0x4df1f6['id'],'code':_0x4df1f6[_0x5ffbe5(0x11d)],'name':_0x4df1f6['name']},'action':_0x5ffbe5(0x122)})};},async 'execute'(_0xdc99b6){const _0x2d6406=a190_0x1dae54,_0x498bad=await loadDatasetDetailForPage(_0xdc99b6),_0x45662a=await loadDataListPageStatusForGenerate(_0xdc99b6,_0x498bad['code']),_0x1ac9bc=getUndeletedRelatedPages(_0x498bad),_0x4df902=assessDataListPageState(_0x498bad[_0x2d6406(0x11d)],_0x45662a,{'fallbackUndeletedPages':_0x1ac9bc});return{'ok':!![],'data':{'datasetCode':_0x498bad['code'],'precheckSource':_0x45662a?.[_0x2d6406(0x125)]??_0x2d6406(0x11a),'status':_0x4df902[_0x2d6406(0x11e)],'manualResolutionRequired':_0x4df902[_0x2d6406(0x117)],'nextAction':_0x4df902[_0x2d6406(0x112)],'dataListPageStatus':_0x45662a,'relatedPages':{'total':_0x498bad[_0x2d6406(0x126)][_0x2d6406(0x120)],'undeletedCount':_0x1ac9bc['length']}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a191_0x21d3ae=a191_0x3b50;(function(_0x5b93c5,_0x10bf20){const _0x14e72e=a191_0x3b50,_0x5433f4=_0x5b93c5();while(!![]){try{const _0x46f6b6=parseInt(_0x14e72e(0x85))/0x1*(parseInt(_0x14e72e(0x7a))/0x2)+parseInt(_0x14e72e(0x87))/0x3+-parseInt(_0x14e72e(0xa1))/0x4+parseInt(_0x14e72e(0x78))/0x5*(-parseInt(_0x14e72e(0x94))/0x6)+-parseInt(_0x14e72e(0x98))/0x7+parseInt(_0x14e72e(0x9d))/0x8*(parseInt(_0x14e72e(0x77))/0x9)+-parseInt(_0x14e72e(0x80))/0xa;if(_0x46f6b6===_0x10bf20)break;else _0x5433f4['push'](_0x5433f4['shift']());}catch(_0x24fc35){_0x5433f4['push'](_0x5433f4['shift']());}}}(a191_0x1e7c,0x5ddb4));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a191_0x3b50(_0x7ba543,_0x31c7c9){_0x7ba543=_0x7ba543-0x76;const _0x1e7c3d=a191_0x1e7c();let _0x3b5020=_0x1e7c3d[_0x7ba543];return _0x3b5020;}function a191_0x1e7c(){const _0x3e0a94=['apply','appCode','source','precheck','dataset','SUCCESS','status','progressRate','204BHqTLV','code','page-pattern','bool','2718653MpnqIl','currentStep','nextAction','number','dataListPageStatus','232720ilUmAf','compress','write','clientOperationId','470656lwYYIg','This\x20command\x20always\x20generates\x20a\x20DATA_LIST\x20page\x20from\x20a\x20dataset.','page','string','boolean','/generate-standard-pages/start','Actually\x20execute\x20the\x20generation.\x20Without\x20this\x20flag,\x20only\x20a\x20dry-run\x20preview\x20is\x20shown.','dryRun','name','fieldCount','171MzfRIe','41025BbBnho','manualResolutionRequired','606406jsFGOi','page\x20generate-start\x20does\x20not\x20accept\x20--page-type.','message','CRUD_PAGE_SET','DATA_LIST','Reusing\x20an\x20existing\x20generate\x20task','4009180TpGMTh','Dry-run\x20preview\x20(pass\x20--apply\x20to\x20execute\x20the\x20generation)','POST','reused','allowGenerate','1hrblJO','operationId','2143362xdlPhV','related-pages-fallback','taskId','alias','generate-start'];a191_0x1e7c=function(){return _0x3e0a94;};return a191_0x1e7c();}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':a191_0x21d3ae(0xa3),'command':'generate-start','description':'Start\x20async\x20Data\x20List\x20Page\x20generation\x20from\x20a\x20dataset','risk':a191_0x21d3ae(0x9f),'defaultOutputFormat':a191_0x21d3ae(0x9e),'rejectedFlags':[{'name':'page-type','message':a191_0x21d3ae(0x7b),'hint':a191_0x21d3ae(0xa2)},{'name':a191_0x21d3ae(0x96),'message':'page\x20generate-start\x20does\x20not\x20accept\x20--page-pattern.','hint':'DATA_LIST\x20currently\x20has\x20one\x20fixed\x20pattern:\x20CRUD_PAGE_SET.'}],'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a191_0x21d3ae(0x8a),'type':a191_0x21d3ae(0xa4),'description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'},{'name':'apply','type':a191_0x21d3ae(0xa5),'description':a191_0x21d3ae(0xa7)}],async 'validate'(_0xf769f0){validateDatasetSelector(_0xf769f0);},async 'dryRun'(_0x1554c9){const _0x987c44=a191_0x21d3ae,_0x1ec63f=await prepare(_0x1554c9);return{'method':_0x987c44(0x82),'url':'/smartapi/lovrabet/dataset/'+_0x1ec63f[_0x987c44(0x90)]['code']+_0x987c44(0xa6),'body':{'appCode':_0x1554c9[_0x987c44(0x8d)],'clientOperationId':_0x1ec63f[_0x987c44(0xa0)]},'description':serializeDryRunDescription({'dataset':{'id':_0x1ec63f[_0x987c44(0x90)]['id'],'code':_0x1ec63f[_0x987c44(0x90)][_0x987c44(0x95)],'name':_0x1ec63f[_0x987c44(0x90)][_0x987c44(0xa9)],'fieldCount':_0x1ec63f[_0x987c44(0x90)][_0x987c44(0x76)]},'precheckSource':_0x1ec63f[_0x987c44(0x9c)]?.[_0x987c44(0x8e)]??'related-pages-fallback','action':_0x987c44(0x8b),'clientOperationId':_0x1ec63f[_0x987c44(0xa0)],'plannedStatus':_0x1ec63f['precheck']['status'],'reason':_0x1ec63f[_0x987c44(0x8f)][_0x987c44(0x7c)]})};},async 'execute'(_0x4053bd){const _0x578637=a191_0x21d3ae;if(!_0x4053bd[_0x578637(0x97)](_0x578637(0x8c))){const _0x3d03b0=await pageGenerateStart[_0x578637(0xa8)](_0x4053bd);return{'ok':!![],'message':_0x578637(0x81),'data':_0x3d03b0};}const _0x3a42bb=await prepare(_0x4053bd);if(!_0x3a42bb['precheck'][_0x578637(0x84)])return{'ok':![],'message':_0x3a42bb[_0x578637(0x8f)][_0x578637(0x7c)],'data':{'datasetCode':_0x3a42bb[_0x578637(0x90)][_0x578637(0x95)],'pageType':_0x578637(0x7e),'pagePattern':'CRUD_PAGE_SET','clientOperationId':_0x3a42bb[_0x578637(0xa0)],'precheckSource':_0x3a42bb['dataListPageStatus']?.[_0x578637(0x8e)]??_0x578637(0x88),'status':_0x3a42bb[_0x578637(0x8f)]['status'],'manualResolutionRequired':_0x3a42bb[_0x578637(0x8f)][_0x578637(0x79)],'nextAction':_0x3a42bb[_0x578637(0x8f)][_0x578637(0x9a)],'query':{'command':buildDataListPageStatusQueryCommand(_0x3a42bb[_0x578637(0x90)][_0x578637(0x95)],_0x4053bd['appCode'])},'dataListPageStatus':_0x3a42bb[_0x578637(0x9c)]}};const _0xd2aa35=await startGenerateDataListPages(_0x4053bd[_0x578637(0x8d)],_0x3a42bb[_0x578637(0x90)][_0x578637(0x95)],{'clientOperationId':_0x3a42bb[_0x578637(0xa0)]}),_0x34d48d=_0xd2aa35[_0x578637(0x92)]===_0x578637(0x91)||_0xd2aa35[_0x578637(0x92)]==='PARTIAL_SUCCESS'?await loadDataListPageStatusForGenerate(_0x4053bd,_0x3a42bb[_0x578637(0x90)][_0x578637(0x95)]):null,_0x3314c2=assessGenerateOperationState(_0x3a42bb[_0x578637(0x90)]['code'],_0xd2aa35['status'],_0x34d48d);return{'ok':!![],'message':_0xd2aa35[_0x578637(0x83)]?_0x578637(0x7f):'Submitted\x20a\x20generate\x20task','data':{'datasetCode':_0x3a42bb[_0x578637(0x90)][_0x578637(0x95)],'appCode':_0x4053bd['appCode'],'pageType':_0x578637(0x7e),'pagePattern':_0x578637(0x7d),'taskId':_0xd2aa35['taskId']??null,'operationId':_0xd2aa35[_0x578637(0x86)]??null,'clientOperationId':_0x3a42bb[_0x578637(0xa0)],'jobStatus':_0xd2aa35[_0x578637(0x92)]??null,'progressRate':typeof _0xd2aa35[_0x578637(0x93)]===_0x578637(0x9b)?_0xd2aa35[_0x578637(0x93)]:null,'currentStep':_0xd2aa35[_0x578637(0x99)]??null,'reused':_0xd2aa35[_0x578637(0x83)]===!![],'status':_0x3314c2[_0x578637(0x92)],'manualResolutionRequired':_0x3314c2[_0x578637(0x79)],'nextAction':_0x3314c2[_0x578637(0x9a)],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x3a42bb[_0x578637(0x90)][_0x578637(0x95)],{'appCode':_0x4053bd['appCode'],'taskId':_0xd2aa35[_0x578637(0x89)],'operationId':_0xd2aa35[_0x578637(0x86)],'clientOperationId':_0x3a42bb['clientOperationId']})},'dataListPageStatus':_0x34d48d}};}};async function prepare(_0x1f004d){const _0x2fd810=a191_0x21d3ae,_0x1902d1=await loadDatasetDetailForPage(_0x1f004d),_0x468465=await loadDataListPageStatusForGenerate(_0x1f004d,_0x1902d1['code']),_0x3444fd=getUndeletedRelatedPages(_0x1902d1);return{'dataset':_0x1902d1,'dataListPageStatus':_0x468465,'clientOperationId':createPageGenerateClientOperationId(),'precheck':assessDataListPageState(_0x1902d1[_0x2fd810(0x95)],_0x468465,{'fallbackUndeletedPages':_0x3444fd})};}
|