@lovrabet/rabetbase-cli 2.5.3-beta.2 → 2.5.3-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.d.ts +22 -0
- package/lib/api/api-group.js +1 -0
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.d.ts +18 -2
- 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.d.ts +11 -0
- package/lib/api/legacy-api-file.js +1 -0
- package/lib/api/model-registry-file.d.ts +36 -0
- package/lib/api/model-registry-file.js +1 -0
- package/lib/api/model-registry-scaffold.d.ts +7 -0
- package/lib/api/model-registry-scaffold.js +1 -0
- package/lib/api/model-source.d.ts +6 -0
- package/lib/api/model-source.js +1 -0
- 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.d.ts +7 -0
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.d.ts +2 -0
- package/lib/commands/dataset/cross-relation-create.js +1 -0
- package/lib/commands/dataset/cross-relation-delete.d.ts +2 -0
- package/lib/commands/dataset/cross-relation-delete.js +1 -0
- package/lib/commands/dataset/cross-relation-list.d.ts +2 -0
- package/lib/commands/dataset/cross-relation-list.js +1 -0
- package/lib/commands/dataset/cross-relation-shared.d.ts +190 -0
- package/lib/commands/dataset/cross-relation-shared.js +1 -0
- package/lib/commands/dataset/cross-relation-update.d.ts +2 -0
- package/lib/commands/dataset/cross-relation-update.js +1 -0
- 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.d.ts +28 -0
- package/lib/commands/project/api-architecture-upgrade.js +1 -0
- 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.d.ts +30 -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/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.d.ts +2 -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.d.ts +2 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.d.ts +13 -17
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +6 -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.d.ts +41 -0
- package/lib/core/cross-db-relation.js +1 -0
- 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.d.ts +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.d.ts +0 -10
- 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/types/index.d.ts +11 -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.d.ts +12 -0
- 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 +4 -1
- package/skills/rabetbase/SKILL.md +10 -6
- package/skills/rabetbase/guides/sdk-client-generation.md +112 -61
- package/skills/rabetbase/guides/typescript-sdk.md +9 -0
- package/skills/rabetbase/references/rabetbase-api-pull.md +30 -19
- package/skills/rabetbase/references/rabetbase-app-list.md +1 -1
- package/skills/rabetbase/references/rabetbase-config.md +2 -1
- package/skills/rabetbase/references/rabetbase-dataset-cross-relations.md +60 -0
- package/skills/rabetbase/references/rabetbase-project-create.md +3 -3
- package/skills/rabetbase/references/rabetbase-project-upgrade.md +24 -13
- package/skills/rabetbase.manifest.json +4 -3
- package/templates/README.md +16 -4
- package/templates/generate-api/model-runtime.ts.tpl +101 -0
- package/templates/generate-api/profile-api.ts.tpl +21 -0
- package/templates/generate-api/profile-client.ts.tpl +14 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a178_0x23e7(_0x5580f1,_0x144a35){_0x5580f1=_0x5580f1-0x144;const _0x2f910c=a178_0x2f91();let _0x23e7aa=_0x2f910c[_0x5580f1];return _0x23e7aa;}const a178_0x3d9166=a178_0x23e7;(function(_0x2e88ba,_0x18f7ed){const _0xddcfc=a178_0x23e7,_0xb72e65=_0x2e88ba();while(!![]){try{const _0x20de4c=-parseInt(_0xddcfc(0x15f))/0x1+parseInt(_0xddcfc(0x154))/0x2*(-parseInt(_0xddcfc(0x148))/0x3)+-parseInt(_0xddcfc(0x155))/0x4*(-parseInt(_0xddcfc(0x14c))/0x5)+-parseInt(_0xddcfc(0x152))/0x6*(parseInt(_0xddcfc(0x15b))/0x7)+-parseInt(_0xddcfc(0x150))/0x8+parseInt(_0xddcfc(0x14f))/0x9*(parseInt(_0xddcfc(0x144))/0xa)+parseInt(_0xddcfc(0x159))/0xb;if(_0x20de4c===_0x18f7ed)break;else _0xb72e65['push'](_0xb72e65['shift']());}catch(_0x510db8){_0xb72e65['push'](_0xb72e65['shift']());}}}(a178_0x2f91,0xd2130));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a178_0x2f91(){const _0x38f27f=['Notification\x20channel\x20type','48UWrZPs','length','1925604IMwxsi','4267972RelqhR','trim','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','bool','22030008cmLqwQ','List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type','90517JiTonY','map','boolean','all','793419xucYUx','string','Found\x20','4000310KzdjMZ','Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.','flat','type','3mbXgjW','\x20notification\x20config(s)','notification','appCode','5rhqvvA','config-list','str','18zZvEzl','9197200MrEMlK'];a178_0x2f91=function(){return _0x38f27f;};return a178_0x2f91();}import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a178_0x3d9166(0x14a),'command':a178_0x3d9166(0x14d),'description':a178_0x3d9166(0x157),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':a178_0x3d9166(0x160),'description':a178_0x3d9166(0x151),'enum':NOTIFICATION_CHANNEL_TYPES},{'name':a178_0x3d9166(0x15e),'type':a178_0x3d9166(0x15d),'default':![],'description':a178_0x3d9166(0x15a)}],async 'validate'(_0x54d7a9){const _0x4fa941=a178_0x3d9166;if(_0x54d7a9[_0x4fa941(0x158)]('all')&&_0x54d7a9[_0x4fa941(0x14e)](_0x4fa941(0x147))[_0x4fa941(0x156)]())throw CliErrors['validation']('--all\x20and\x20--type\x20are\x20mutually\x20exclusive.',_0x4fa941(0x145));if(_0x54d7a9[_0x4fa941(0x158)](_0x4fa941(0x15e)))return;readNotificationChannelType(_0x54d7a9);},async 'execute'(_0x33ec98){const _0x23a3d0=a178_0x3d9166;if(_0x33ec98[_0x23a3d0(0x158)]('all')){const _0x1ec3f6=await Promise[_0x23a3d0(0x15e)](NOTIFICATION_CHANNEL_TYPES[_0x23a3d0(0x15c)](_0x36921d=>listNotificationChannelConfigs(_0x33ec98[_0x23a3d0(0x14b)],_0x36921d))),_0x11e626=_0x1ec3f6[_0x23a3d0(0x146)]()['map'](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x33ec98['appCode'],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x11e626['length'],'configs':_0x11e626},'message':_0x23a3d0(0x161)+_0x11e626[_0x23a3d0(0x153)]+'\x20notification\x20config(s)\x20across\x20all\x20channel\x20types'};}const _0x1c09d3=readNotificationChannelType(_0x33ec98),_0x1b44d6=await listNotificationChannelConfigs(_0x33ec98[_0x23a3d0(0x14b)],_0x1c09d3),_0x29c48f=_0x1b44d6[_0x23a3d0(0x15c)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x33ec98[_0x23a3d0(0x14b)],'channelType':_0x1c09d3,'count':_0x29c48f[_0x23a3d0(0x153)],'configs':_0x29c48f},'message':_0x23a3d0(0x161)+_0x29c48f[_0x23a3d0(0x153)]+'\x20'+_0x1c09d3+_0x23a3d0(0x149)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a179_0x3bacbd=a179_0x5797;(function(_0x215e09,_0x2ca505){const _0x18eca0=a179_0x5797,_0x5e9e32=_0x215e09();while(!![]){try{const _0x170688=-parseInt(_0x18eca0(0x152))/0x1+parseInt(_0x18eca0(0x14e))/0x2+parseInt(_0x18eca0(0x14b))/0x3+-parseInt(_0x18eca0(0x146))/0x4+parseInt(_0x18eca0(0x149))/0x5*(-parseInt(_0x18eca0(0x148))/0x6)+-parseInt(_0x18eca0(0x13c))/0x7+parseInt(_0x18eca0(0x156))/0x8*(parseInt(_0x18eca0(0x14f))/0x9);if(_0x170688===_0x2ca505)break;else _0x5e9e32['push'](_0x5e9e32['shift']());}catch(_0x127b6a){_0x5e9e32['push'](_0x5e9e32['shift']());}}}(a179_0x2aae,0xd1b82));import{asDryRunResult}from'../../commands/common/dry-run.js';function a179_0x5797(_0xe4506a,_0x268e25){_0xe4506a=_0xe4506a-0x139;const _0x2aae6c=a179_0x2aae();let _0x5797c2=_0x2aae6c[_0xe4506a];return _0x5797c2;}import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';const UPDATE_PATH='/notification/channel-config/update';function a179_0x2aae(){const _0x59872b=['Inspect\x20with\x20--id\x20','2858660CcgTgS','notification_config_update_outcome_unknown','2482212ncLpza','15IzUxPD','notification','5021064WPSjpA','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','POST','1259378nBwndt','14367105QBqhoo','verified','Updated\x20notification\x20config\x20','1622986yLWGBM','patch','verifiedFields','before','16IXLxbg','config-update','\x20with\x20','provesChange','update',';\x20do\x20not\x20resubmit\x20automatically.','notification_config_update_verification_unavailable','Inspect\x20ID\x20','mutation','\x20via\x20','7408100KFLXLy','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.',';\x20no\x20automatic\x20retry\x20was\x20attempted.','Notification\x20config\x20','planned','appCode','channelType','payload','notification_config_update_verification_failed'];a179_0x2aae=function(){return _0x59872b;};return a179_0x2aae();}async function prepareUpdate(_0x2ac079){const _0x3bb2b1=a179_0x5797,_0x4402d6=readNotificationId(_0x2ac079),_0x5b36ef=await readNotificationDocument(_0x2ac079,_0x3bb2b1(0x15a)),_0x567ad2=await requireExactNotificationConfig(_0x2ac079[_0x3bb2b1(0x141)],_0x4402d6,_0x3bb2b1(0x15a));return{'id':_0x4402d6,'patch':_0x5b36ef,'before':_0x567ad2,'payload':mergeUpdateInput(_0x567ad2,_0x5b36ef),'planned':plannedUpdateProjection(_0x567ad2,_0x5b36ef)};}export const notificationConfigUpdate={'service':a179_0x3bacbd(0x14a),'command':a179_0x3bacbd(0x157),'description':'Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','risk':'high-risk-write','requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x3b7001){readNotificationId(_0x3b7001),assertSingleNotificationSource(_0x3b7001),requireNotificationExplicitYes(_0x3b7001);},async 'dryRun'(_0x2ff77c){const _0x436582=a179_0x3bacbd,_0x30d522=await prepareUpdate(_0x2ff77c),_0x43cd9f=notificationLookupCommand(_0x2ff77c['appCode'],_0x30d522[_0x436582(0x155)]['channelType']);return asDryRunResult({'operation':_0x436582(0x15a),'selector':notificationSelector(_0x30d522[_0x436582(0x155)]),'before':projectNotificationConfig(_0x30d522[_0x436582(0x155)]),'after':_0x30d522[_0x436582(0x140)],'dryRun':!![],'backend':{'method':_0x436582(0x14d),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x436582(0x140),'lookupCommand':_0x43cd9f}},{'method':_0x436582(0x14d),'url':UPDATE_PATH});},async 'execute'(_0x47d2e9){const _0x4b046f=a179_0x3bacbd;requireNotificationExplicitYes(_0x47d2e9);const _0x453f8d=await prepareUpdate(_0x47d2e9),_0x3a83a8=notificationLookupCommand(_0x47d2e9['appCode'],_0x453f8d[_0x4b046f(0x155)][_0x4b046f(0x142)]);let _0x1359a3=![];try{await updateNotificationChannelConfig(_0x453f8d[_0x4b046f(0x143)]);}catch(_0x13fc8e){if(!isPlatformTransportFailure(_0x13fc8e))throw safeApiFailure(_0x4b046f(0x15a),_0x4b046f(0x13a),_0x4b046f(0x139)+_0x453f8d['id']+_0x4b046f(0x158)+_0x3a83a8+_0x4b046f(0x13e));_0x1359a3=!![];}let _0x1a31e0;try{const _0x3f3b8f=await getNotificationChannelConfig(_0x453f8d['id'],_0x47d2e9[_0x4b046f(0x141)]);_0x1a31e0=normalizeExactNotificationConfig(_0x3f3b8f,_0x453f8d['id'],_0x47d2e9['appCode']);}catch{throw notificationError(_0x1359a3?_0x4b046f(0x147):_0x4b046f(0x15c),_0x4b046f(0x13f)+_0x453f8d['id']+'\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.',_0x4b046f(0x145)+_0x453f8d['id']+_0x4b046f(0x13b)+_0x3a83a8+_0x4b046f(0x15b));}const _0xbb5f3=requestedSafeFieldsMatch(_0x453f8d[_0x4b046f(0x155)],_0x1a31e0,_0x453f8d[_0x4b046f(0x153)]);if(!_0xbb5f3['allMatch']||_0x1359a3&&!_0xbb5f3[_0x4b046f(0x159)])throw notificationError(_0x1359a3?_0x4b046f(0x147):_0x4b046f(0x144),_0x4b046f(0x13f)+_0x453f8d['id']+_0x4b046f(0x14c),_0x4b046f(0x145)+_0x453f8d['id']+_0x4b046f(0x13b)+_0x3a83a8+_0x4b046f(0x15b));const _0x511df5=_0x1359a3?[_0x4b046f(0x13d)]:[];return{'ok':!![],'data':{'operation':_0x4b046f(0x15a),'selector':notificationSelector(_0x1a31e0),'before':projectNotificationConfig(_0x453f8d[_0x4b046f(0x155)]),'after':projectNotificationConfig(_0x1a31e0),'dryRun':![],'backend':{'method':_0x4b046f(0x14d),'path':UPDATE_PATH},'warnings':_0x511df5,'verification':{'status':_0x4b046f(0x150),'recoveredAfterUnknownResponse':_0x1359a3,'verifiedFields':_0xbb5f3[_0x4b046f(0x154)],'lookupCommand':_0x3a83a8}},'message':_0x4b046f(0x151)+_0x1a31e0['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x9753e6,_0x4beefb){const _0x467394=a180_0x2949,_0x5ab27d=_0x9753e6();while(!![]){try{const _0xcd679c=-parseInt(_0x467394(0x1a8))/0x1+parseInt(_0x467394(0x1aa))/0x2*(-parseInt(_0x467394(0x1a5))/0x3)+parseInt(_0x467394(0x1a7))/0x4+parseInt(_0x467394(0x1a4))/0x5+parseInt(_0x467394(0x1a2))/0x6*(-parseInt(_0x467394(0x1ac))/0x7)+parseInt(_0x467394(0x1a9))/0x8*(-parseInt(_0x467394(0x1a3))/0x9)+parseInt(_0x467394(0x1ab))/0xa*(parseInt(_0x467394(0x1a6))/0xb);if(_0xcd679c===_0x4beefb)break;else _0x5ab27d['push'](_0x5ab27d['shift']());}catch(_0x16ad99){_0x5ab27d['push'](_0x5ab27d['shift']());}}}(a180_0x2885,0xad887));import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';import{notificationConfigUpdate}from'../../commands/notification/config-update.js';function a180_0x2949(_0x36cb86,_0x56c6d5){_0x36cb86=_0x36cb86-0x1a2;const _0x28850f=a180_0x2885();let _0x294951=_0x28850f[_0x36cb86];return _0x294951;}import{notificationConfigDelete}from'../../commands/notification/config-delete.js';function a180_0x2885(){const _0xffb8c4=['30CJGXtM','2079oJWtYf','398732pxIGpR','643962SsQQLy','241808HUYUji','131302QusoeX','90190AsOraH','35lubdiR','168780EYrOJo','198moxOCQ','5063055vlwLgJ'];a180_0x2885=function(){return _0xffb8c4;};return a180_0x2885();}export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a171_0x14e415=a171_0x1ae6;(function(_0x2f5269,_0x4f6e37){const _0x37c3cb=a171_0x1ae6,_0x4f96b6=_0x2f5269();while(!![]){try{const _0x49fb08=-parseInt(_0x37c3cb(0x120))/0x1*(parseInt(_0x37c3cb(0xf1))/0x2)+-parseInt(_0x37c3cb(0x123))/0x3*(-parseInt(_0x37c3cb(0x103))/0x4)+-parseInt(_0x37c3cb(0x130))/0x5*(-parseInt(_0x37c3cb(0xf3))/0x6)+parseInt(_0x37c3cb(0x16c))/0x7*(parseInt(_0x37c3cb(0x127))/0x8)+-parseInt(_0x37c3cb(0x146))/0x9*(-parseInt(_0x37c3cb(0x164))/0xa)+parseInt(_0x37c3cb(0x13c))/0xb*(-parseInt(_0x37c3cb(0x12b))/0xc)+parseInt(_0x37c3cb(0x147))/0xd;if(_0x49fb08===_0x4f6e37)break;else _0x4f96b6['push'](_0x4f96b6['shift']());}catch(_0x2b31e4){_0x4f96b6['push'](_0x4f96b6['shift']());}}}(a171_0x2e6b,0x41136));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=[a171_0x14e415(0x15d),a171_0x14e415(0x143),'DINGTALK',a171_0x14e415(0x116),'WEBHOOK'];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;function a171_0x2e6b(){const _0x200b09=['rabetbase\x20notification\x20config-list\x20--appcode\x20','replyTo','push','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','228815RAEaEs','string','\x22\x20cannot\x20exceed\x20','Notification\x20JSON\x20field\x20\x22','hasOwnProperty','connectTimeout','Allowed\x20values:\x20','\x22configName\x22.','isSafeInteger','channelConfig','\x20has\x20an\x20invalid\x20id.','<redacted>','3036pSbzsZ','endpointUrlRaw','notification_config_field_unknown','a\x20string\x20or\x20null','\x22\x20must\x20be\x20','Unknown\x20notification\x20JSON\x20field\x20\x22','Invalid\x20notification\x20config\x20response.','FEISHU','notification_config_source_unavailable','Notification\x20JSON\x20from\x20','139734YLSEjy','1201746ANmkhF','a\x20JSON\x20object','channelConfigRaw','kind','some','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','stringify','Invalid\x20--','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','\x20is\x20missing\x20required\x20field\x20\x22','notification_config_id_invalid','notification_config_field_required','bccList','yes','notification_config_update_empty','path','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','trim','Notification\x20JSON\x20source\x20is\x20ambiguous.','length','setEncoding','a\x20JSON\x20object\x20or\x20null','EMAIL','file','messageTemplate','\x20--format\x20compress','env','join','\x20has\x20an\x20unsupported\x20channelType.','70sgjYZY','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','Missing\x20notification\x20JSON\x20source.','recipients','subjectPrefix','update','description','preflight','4501lAgGfr','endpointUrl','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','\x20has\x20invalid\x20field\x20\x22','bool','214YEEfkq','validation','6MWuipu','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','parse','Application-level\x20notification\x20config\x20ID','notification_config_response_invalid','has','endpointUrl:null','ccList','create','utf8','mutation','apiError','\x20characters.','a\x20non-empty\x20string','includes','stdin','110800wdigtK','emailTargets','_unavailable','\x22\x20must\x20be\x20a\x20non-empty\x20string.','Notification\x20config\x20list\x20item\x20','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','number','every','Create\x20JSON\x20requires\x20field\x20','updateTime','\x20must\x20be\x20an\x20object.','readTimeout','str','\x20--type\x20','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','\x22channelType\x22.','notification_config_field_invalid','fromName','from-env','WECOM','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','notification_config_','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','entries','\x20has\x20an\x20invalid\x20channelType.','configName','name','appCode','1957xuRpZj','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','27xSyjqH','Notification\x20config\x20','notification_config_json_invalid','configCode','720NgAMmj','environment\x20variable\x20','type','channelType','3396jZbHUd'];a171_0x2e6b=function(){return _0x200b09;};return a171_0x2e6b();}export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a171_0x14e415(0x11d),'channelType',a171_0x14e415(0xed),a171_0x14e415(0x139),a171_0x14e415(0x16a),a171_0x14e415(0x135),a171_0x14e415(0x10e)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id','appCode',a171_0x14e415(0x126),'channelCode']),EMAIL_RECIPIENT_FIELDS=new Set([a171_0x14e415(0x104),a171_0x14e415(0x167),a171_0x14e415(0xfa),a171_0x14e415(0x153),a171_0x14e415(0x12d),a171_0x14e415(0x168),a171_0x14e415(0x114),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a171_0x14e415(0x15e),'type':a171_0x14e415(0x131),'required':![],'description':a171_0x14e415(0x14f)},{'name':a171_0x14e415(0x102),'type':'boolean','required':![],'default':![],'description':a171_0x14e415(0x14c)},{'name':a171_0x14e415(0x115),'type':a171_0x14e415(0x131),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable'}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a171_0x14e415(0x109),'required':!![],'description':a171_0x14e415(0xf6)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x23623f,_0x3e3f15,_0x50ee68){return new CliError(_0x23623f,0x1,_0x3e3f15,_0x50ee68);}export function readNotificationId(_0x38123e){const _0x1067cd=a171_0x14e415,_0x23038e=_0x38123e['num']('id');if(!Number[_0x1067cd(0x138)](_0x23038e)||_0x23038e<=0x0)throw notificationError(_0x1067cd(0x151),'--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.');return _0x23038e;}export function requireNotificationExplicitYes(_0x160e4e){const _0x55d985=a171_0x14e415;if(_0x160e4e['bool']('dry-run')||_0x160e4e[_0x55d985(0xf0)](_0x55d985(0x154)))return;throw notificationError('notification_config_confirmation_required','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.',_0x55d985(0x121));}export function readNotificationChannelType(_0x354ac5,_0x155a6c=a171_0x14e415(0x129),_0x374f6d=a171_0x14e415(0x15d)){const _0x4083d6=a171_0x14e415,_0x5cabf7=_0x354ac5[_0x4083d6(0x10f)](_0x155a6c)[_0x4083d6(0x158)]()||_0x374f6d;if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x5cabf7))throw CliErrors[_0x4083d6(0xf2)](_0x4083d6(0x14e)+_0x155a6c+':\x20'+_0x5cabf7,_0x4083d6(0x136)+NOTIFICATION_CHANNEL_TYPES[_0x4083d6(0x162)](',\x20')+'.');return _0x5cabf7;}export function assertSingleNotificationSource(_0x120dde){const _0x30c2b9=a171_0x14e415,_0x1b6d1b=[],_0x2a1e64=_0x120dde[_0x30c2b9(0x10f)](_0x30c2b9(0x15e))[_0x30c2b9(0x158)]();if(_0x2a1e64)_0x1b6d1b[_0x30c2b9(0x12e)]({'kind':'file','path':_0x2a1e64});if(_0x120dde[_0x30c2b9(0xf0)](_0x30c2b9(0x102)))_0x1b6d1b[_0x30c2b9(0x12e)]({'kind':_0x30c2b9(0x102)});const _0x4825f5=_0x120dde[_0x30c2b9(0x10f)](_0x30c2b9(0x115))[_0x30c2b9(0x158)]();if(_0x4825f5)_0x1b6d1b['push']({'kind':'env','name':_0x4825f5});if(_0x1b6d1b[_0x30c2b9(0x15a)]===0x0)throw CliErrors[_0x30c2b9(0xf2)](_0x30c2b9(0x166),_0x30c2b9(0x165));if(_0x1b6d1b[_0x30c2b9(0x15a)]>0x1)throw CliErrors[_0x30c2b9(0xf2)](_0x30c2b9(0x159),'Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.');return _0x1b6d1b[0x0];}export async function readNotificationDocument(_0x2fda1b,_0x9f2514){const _0x8dc563=a171_0x14e415,_0x4e0432=assertSingleNotificationSource(_0x2fda1b),_0x36f939=_0x4e0432['kind']===_0x8dc563(0x15e)?'file\x20'+_0x4e0432[_0x8dc563(0x156)]:_0x4e0432['kind']===_0x8dc563(0x161)?_0x8dc563(0x128)+_0x4e0432[_0x8dc563(0x11e)]:_0x8dc563(0x102);let _0x69696f;try{if(_0x4e0432[_0x8dc563(0x14a)]===_0x8dc563(0x15e))_0x69696f=await readFile(_0x4e0432['path'],_0x8dc563(0xfc));else{if(_0x4e0432['kind']===_0x8dc563(0x161)){if(!(_0x4e0432['name']in process.env))throw notificationError(_0x8dc563(0x144),_0x8dc563(0x11a)+_0x4e0432['name']);_0x69696f=process.env[_0x4e0432.name]??'';}else _0x69696f=await readStdin();}}catch(_0x5b1cb1){if(_0x5b1cb1 instanceof CliError)throw _0x5b1cb1;throw notificationError('notification_config_source_unavailable',_0x8dc563(0x118)+_0x36f939+'.');}let _0x5944eb;try{_0x5944eb=JSON[_0x8dc563(0xf5)](_0x69696f);}catch{throw notificationError('notification_config_json_invalid',_0x8dc563(0x145)+_0x36f939+'\x20is\x20invalid.',_0x8dc563(0xf4));}if(!isJsonObject(_0x5944eb))throw notificationError(_0x8dc563(0x125),_0x8dc563(0x145)+_0x36f939+_0x8dc563(0x10d));return validateNotificationDocument(_0x5944eb,_0x9f2514);}export function projectNotificationListConfig(_0x1bafa1,_0x48299a){const _0x4fac51=a171_0x14e415;return{'id':typeof _0x1bafa1['id']===_0x4fac51(0x109)?_0x1bafa1['id']:null,'configCode':requireResponseString(_0x1bafa1[_0x4fac51(0x126)],'configCode',_0x48299a),'configName':requireResponseString(_0x1bafa1[_0x4fac51(0x11d)],_0x4fac51(0x11d),_0x48299a),'channelType':requireResponseString(_0x1bafa1['channelType'],_0x4fac51(0x12a),_0x48299a),'description':normalizeNullableString(_0x1bafa1[_0x4fac51(0x16a)]),'createTime':normalizeNullableString(_0x1bafa1['createTime']),'updateTime':normalizeNullableString(_0x1bafa1[_0x4fac51(0x10c)])};}export function normalizeExactNotificationConfig(_0x120647,_0x2ca0ae,_0x434867){const _0x104ea9=a171_0x14e415;if(!Number['isSafeInteger'](_0x120647['id'])||_0x120647['id']!==_0x2ca0ae)throw notificationError(_0x104ea9(0xf7),_0x104ea9(0x12f)+_0x2ca0ae+'.');if(_0x120647[_0x104ea9(0x11f)]!==_0x434867)throw notificationError('notification_config_response_invalid',_0x104ea9(0x124)+_0x2ca0ae+_0x104ea9(0x111));const _0x378e92=requireExactString(_0x120647[_0x104ea9(0x11d)],_0x104ea9(0x11d),_0x2ca0ae),_0x50dffa=requireExactString(_0x120647['configCode'],_0x104ea9(0x126),_0x2ca0ae),_0x15a904=requireExactString(_0x120647[_0x104ea9(0x12a)],_0x104ea9(0x12a),_0x2ca0ae);if(!NOTIFICATION_CHANNEL_TYPES[_0x104ea9(0x101)](_0x15a904))throw notificationError(_0x104ea9(0xf7),_0x104ea9(0x124)+_0x2ca0ae+_0x104ea9(0x163));const _0x5ae849=responseNullableString(_0x120647['endpointUrl'],_0x104ea9(0xed),_0x2ca0ae),_0x5cc7d6=responseNullableString(_0x120647[_0x104ea9(0x139)],_0x104ea9(0x139),_0x2ca0ae),_0x10f095=responseNullableString(_0x120647[_0x104ea9(0x16a)],_0x104ea9(0x16a),_0x2ca0ae),_0x4259c5=responseNullableTimeout(_0x120647[_0x104ea9(0x135)],_0x104ea9(0x135),_0x2ca0ae),_0x3a6d6e=responseNullableTimeout(_0x120647[_0x104ea9(0x10e)],_0x104ea9(0x10e),_0x2ca0ae);return{'id':_0x2ca0ae,'appCode':_0x434867,'configCode':_0x50dffa,'configName':_0x378e92,'channelType':_0x15a904,'endpointUrl':redactSensitive(_0x5ae849),'channelConfig':redactSensitive(_0x5cc7d6),'description':_0x10f095,'connectTimeout':_0x4259c5,'readTimeout':_0x3a6d6e,'endpointUrlRaw':_0x5ae849,'channelConfigRaw':_0x5cc7d6};}export async function requireExactNotificationConfig(_0x369e15,_0x47aba5,_0x62aedf){const _0x4342f6=a171_0x14e415;let _0xea1d3b;try{_0xea1d3b=await getNotificationChannelConfig(_0x47aba5,_0x369e15);}catch{throw safeApiFailure(_0x62aedf,_0x4342f6(0x16b),_0x4342f6(0xee)+_0x369e15+_0x4342f6(0x108));}return normalizeExactNotificationConfig(_0xea1d3b,_0x47aba5,_0x369e15);}export function projectNotificationConfig(_0x15175b){const _0x2f8f1b=a171_0x14e415;return{'id':_0x15175b['id']??null,'appCode':_0x15175b[_0x2f8f1b(0x11f)],'configCode':_0x15175b[_0x2f8f1b(0x126)]??null,'configName':_0x15175b[_0x2f8f1b(0x11d)],'channelType':_0x15175b[_0x2f8f1b(0x12a)],'endpointUrl':redactSensitive(_0x15175b[_0x2f8f1b(0xed)]),'channelConfig':redactSensitive(_0x15175b[_0x2f8f1b(0x139)]),'description':_0x15175b['description']??null,'connectTimeout':_0x15175b[_0x2f8f1b(0x135)]??null,'readTimeout':_0x15175b[_0x2f8f1b(0x10e)]??null};}export function notificationSelector(_0x4ead1){const _0x5819db=a171_0x14e415;return{'appCode':_0x4ead1['appCode'],'id':_0x4ead1['id'],'configCode':_0x4ead1[_0x5819db(0x126)],'configName':_0x4ead1['configName'],'channelType':_0x4ead1[_0x5819db(0x12a)]};}export function createMutationInput(_0x1431e4,_0x410601){const _0x413c19=a171_0x14e415;return{'appCode':_0x1431e4,'configName':_0x410601['configName'],'channelType':_0x410601[_0x413c19(0x12a)],...hasOwn(_0x410601,_0x413c19(0xed))?{'endpointUrl':_0x410601[_0x413c19(0xed)]}:{},...hasOwn(_0x410601,_0x413c19(0x139))?{'channelConfig':serializeChannelConfig(_0x410601['channelConfig'])}:{},...hasOwn(_0x410601,'description')?{'description':_0x410601[_0x413c19(0x16a)]}:{},...hasOwn(_0x410601,_0x413c19(0x135))?{'connectTimeout':_0x410601['connectTimeout']}:{},...hasOwn(_0x410601,'readTimeout')?{'readTimeout':_0x410601[_0x413c19(0x10e)]}:{}};}export function mergeUpdateInput(_0xc2ac5a,_0x40de28){const _0x7d2d01=a171_0x14e415;return{'id':_0xc2ac5a['id'],'appCode':_0xc2ac5a[_0x7d2d01(0x11f)],'configName':_0x40de28['configName']??_0xc2ac5a[_0x7d2d01(0x11d)],'channelType':_0x40de28['channelType']??_0xc2ac5a[_0x7d2d01(0x12a)],'endpointUrl':hasOwn(_0x40de28,_0x7d2d01(0xed))?_0x40de28[_0x7d2d01(0xed)]:_0xc2ac5a[_0x7d2d01(0x13d)],'channelConfig':hasOwn(_0x40de28,_0x7d2d01(0x139))?serializeChannelConfig(_0x40de28[_0x7d2d01(0x139)]):_0xc2ac5a[_0x7d2d01(0x149)],'description':hasOwn(_0x40de28,_0x7d2d01(0x16a))?_0x40de28[_0x7d2d01(0x16a)]:_0xc2ac5a[_0x7d2d01(0x16a)],'connectTimeout':hasOwn(_0x40de28,_0x7d2d01(0x135))?_0x40de28[_0x7d2d01(0x135)]:_0xc2ac5a[_0x7d2d01(0x135)],'readTimeout':hasOwn(_0x40de28,_0x7d2d01(0x10e))?_0x40de28[_0x7d2d01(0x10e)]:_0xc2ac5a[_0x7d2d01(0x10e)]};}export function plannedUpdateProjection(_0x457a8c,_0x4c912a){const _0x5a41ab=a171_0x14e415;return projectNotificationConfig({'id':_0x457a8c['id'],'appCode':_0x457a8c[_0x5a41ab(0x11f)],'configCode':_0x457a8c[_0x5a41ab(0x126)],'configName':_0x4c912a[_0x5a41ab(0x11d)]??_0x457a8c[_0x5a41ab(0x11d)],'channelType':_0x4c912a[_0x5a41ab(0x12a)]??_0x457a8c['channelType'],'endpointUrl':hasOwn(_0x4c912a,_0x5a41ab(0xed))?_0x4c912a[_0x5a41ab(0xed)]:_0x457a8c[_0x5a41ab(0x13d)],'channelConfig':hasOwn(_0x4c912a,_0x5a41ab(0x139))?_0x4c912a['channelConfig']:_0x457a8c[_0x5a41ab(0x149)],'description':hasOwn(_0x4c912a,'description')?_0x4c912a['description']:_0x457a8c['description'],'connectTimeout':hasOwn(_0x4c912a,'connectTimeout')?_0x4c912a['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x457a8c[_0x5a41ab(0x135)],'readTimeout':hasOwn(_0x4c912a,'readTimeout')?_0x4c912a[_0x5a41ab(0x10e)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x457a8c['readTimeout']});}export function requestedSafeFieldsMatch(_0x16ded7,_0x5da25f,_0x404266){const _0x3f01d1=a171_0x14e415,_0x390d3a=[],_0x2fc042=[],_0x41a268=[];for(const _0x4a25c7 of[_0x3f01d1(0x11d),'channelType',_0x3f01d1(0x16a)]){if(!hasOwn(_0x404266,_0x4a25c7))continue;_0x41a268[_0x3f01d1(0x12e)](_0x4a25c7),_0x390d3a['push'](_0x5da25f[_0x4a25c7]===_0x404266[_0x4a25c7]),_0x2fc042[_0x3f01d1(0x12e)](_0x16ded7[_0x4a25c7]!==_0x404266[_0x4a25c7]&&_0x5da25f[_0x4a25c7]===_0x404266[_0x4a25c7]);}for(const _0x1641f2 of[_0x3f01d1(0x135),_0x3f01d1(0x10e)]){if(!hasOwn(_0x404266,_0x1641f2))continue;const _0x197c7b=_0x404266[_0x1641f2]??(_0x1641f2==='connectTimeout'?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x41a268['push'](_0x1641f2),_0x390d3a[_0x3f01d1(0x12e)](_0x5da25f[_0x1641f2]===_0x197c7b),_0x2fc042[_0x3f01d1(0x12e)](_0x16ded7[_0x1641f2]!==_0x197c7b&&_0x5da25f[_0x1641f2]===_0x197c7b);}return hasOwn(_0x404266,_0x3f01d1(0xed))&&_0x404266[_0x3f01d1(0xed)]===null&&(_0x41a268['push'](_0x3f01d1(0xf9)),_0x390d3a[_0x3f01d1(0x12e)](_0x5da25f[_0x3f01d1(0x13d)]===null||_0x5da25f[_0x3f01d1(0x13d)]===''),_0x2fc042[_0x3f01d1(0x12e)](_0x16ded7[_0x3f01d1(0x13d)]!==null&&_0x16ded7['endpointUrlRaw']!==''&&(_0x5da25f['endpointUrlRaw']===null||_0x5da25f['endpointUrlRaw']===''))),{'allMatch':_0x390d3a[_0x3f01d1(0x10a)](Boolean),'provesChange':_0x2fc042[_0x3f01d1(0x14b)](Boolean),'verifiedFields':_0x41a268};}export function validateNotificationDeleteReadback(_0x398257,_0x29db39,_0x42fafd){const _0x2595c9=a171_0x14e415;for(const [_0x388fb5,_0x1cfc7a]of _0x398257[_0x2595c9(0x11b)]()){if(!Number[_0x2595c9(0x138)](_0x1cfc7a['id'])||_0x1cfc7a['id']<=0x0)throw notificationError(_0x2595c9(0xf7),_0x2595c9(0x107)+(_0x388fb5+0x1)+_0x2595c9(0x13a));if(_0x1cfc7a['appCode']!==_0x29db39)throw notificationError(_0x2595c9(0xf7),_0x2595c9(0x107)+(_0x388fb5+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0x1cfc7a[_0x2595c9(0x12a)]!==_0x42fafd)throw notificationError(_0x2595c9(0xf7),_0x2595c9(0x107)+(_0x388fb5+0x1)+_0x2595c9(0x11c));}}export function safeApiFailure(_0x364930,_0x3fd602,_0x351967){const _0xe94512=a171_0x14e415;return notificationError(_0xe94512(0x119)+_0x364930+'_'+(_0x3fd602===_0xe94512(0xfd)?'failed':_0x3fd602+_0xe94512(0x105)),_0xe94512(0x124)+_0x364930+'\x20'+_0x3fd602+'\x20failed.',_0x351967);}export function notificationLookupCommand(_0x33c8e0,_0x1ff77a){const _0x50136c=a171_0x14e415;return _0x50136c(0x12c)+_0x33c8e0+_0x50136c(0x110)+_0x1ff77a+_0x50136c(0x160);}function validateNotificationDocument(_0x2815ec,_0x1bd98a){const _0x46c521=a171_0x14e415;for(const _0x1de85a of Object['keys'](_0x2815ec)){if(FORBIDDEN_IDENTITY_FIELDS[_0x46c521(0xf8)](_0x1de85a))throw notificationError('notification_config_field_forbidden',_0x46c521(0x133)+_0x1de85a+_0x46c521(0x122));if(!ALLOWED_INPUT_FIELDS['has'](_0x1de85a))throw notificationError(_0x46c521(0x13e),_0x46c521(0x141)+_0x1de85a+'\x22.');}if(_0x1bd98a===_0x46c521(0x169)&&Object['keys'](_0x2815ec)[_0x46c521(0x15a)]===0x0)throw notificationError(_0x46c521(0x155),'Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.');const _0x40a946={};if(hasOwn(_0x2815ec,_0x46c521(0x11d)))_0x40a946[_0x46c521(0x11d)]=validateRequiredString(_0x2815ec[_0x46c521(0x11d)],'configName',0x80);else{if(_0x1bd98a==='create')throw notificationError(_0x46c521(0x152),_0x46c521(0x10b)+_0x46c521(0x137));}if(hasOwn(_0x2815ec,_0x46c521(0x12a))){if(typeof _0x2815ec[_0x46c521(0x12a)]!==_0x46c521(0x131))throw invalidFieldType(_0x46c521(0x12a),'a\x20supported\x20string');const _0x591ca3=_0x2815ec[_0x46c521(0x12a)][_0x46c521(0x158)]();if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x591ca3))throw notificationError(_0x46c521(0x113),_0x46c521(0x117),'Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES[_0x46c521(0x162)](',\x20')+'.');_0x40a946[_0x46c521(0x12a)]=_0x591ca3;}else{if(_0x1bd98a===_0x46c521(0xfb))throw notificationError(_0x46c521(0x152),_0x46c521(0x10b)+_0x46c521(0x112));}for(const [_0x1ba1e3,_0x1d92de]of[[_0x46c521(0xed),0x200],[_0x46c521(0x16a),0x100]]){if(!hasOwn(_0x2815ec,_0x1ba1e3))continue;const _0x59a1b4=_0x2815ec[_0x1ba1e3];if(_0x59a1b4!==null&&typeof _0x59a1b4!==_0x46c521(0x131))throw invalidFieldType(_0x1ba1e3,_0x46c521(0x13f));if(typeof _0x59a1b4==='string'&&_0x59a1b4[_0x46c521(0x15a)]>_0x1d92de)throw notificationError(_0x46c521(0x113),'Notification\x20JSON\x20field\x20\x22'+_0x1ba1e3+_0x46c521(0x132)+_0x1d92de+_0x46c521(0xff));_0x40a946[_0x1ba1e3]=_0x59a1b4;}if(hasOwn(_0x2815ec,_0x46c521(0x139))){const _0xa48b1c=_0x2815ec[_0x46c521(0x139)];if(_0xa48b1c===null&&_0x1bd98a==='create')throw invalidFieldType(_0x46c521(0x139),_0x46c521(0x148));if(_0xa48b1c!==null&&!isJsonObject(_0xa48b1c))throw invalidFieldType(_0x46c521(0x139),_0x1bd98a==='update'?_0x46c521(0x15c):_0x46c521(0x148));_0xa48b1c!==null&&validateChannelConfigFields(_0x40a946[_0x46c521(0x12a)],_0xa48b1c),_0x40a946[_0x46c521(0x139)]=_0xa48b1c;}for(const _0x4ccbc2 of['connectTimeout',_0x46c521(0x10e)]){if(!hasOwn(_0x2815ec,_0x4ccbc2))continue;const _0xa12fe4=_0x2815ec[_0x4ccbc2];if(_0xa12fe4!==null&&(!Number['isSafeInteger'](_0xa12fe4)||_0xa12fe4<0x0))throw notificationError(_0x46c521(0x113),_0x46c521(0x133)+_0x4ccbc2+_0x46c521(0x157));_0x40a946[_0x4ccbc2]=_0xa12fe4;}return _0x40a946;}function validateRequiredString(_0x15ef49,_0xde43b6,_0x555108){const _0x461468=a171_0x14e415;if(typeof _0x15ef49!==_0x461468(0x131))throw invalidFieldType(_0xde43b6,_0x461468(0x100));const _0x3cd56f=_0x15ef49[_0x461468(0x158)]();if(!_0x3cd56f)throw notificationError(_0x461468(0x113),_0x461468(0x133)+_0xde43b6+_0x461468(0x106));if(_0x3cd56f[_0x461468(0x15a)]>_0x555108)throw notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22'+_0xde43b6+_0x461468(0x132)+_0x555108+_0x461468(0xff));return _0x3cd56f;}function validateChannelConfigFields(_0xa27c3d,_0x59c9d3){const _0x22a984=a171_0x14e415;if(hasOwn(_0x59c9d3,'messageTemplate'))throw forbiddenChannelConfigField(_0x22a984(0x15f));if(_0xa27c3d===_0x22a984(0x15d))for(const _0x4549d1 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x59c9d3,_0x4549d1))throw forbiddenChannelConfigField(_0x4549d1);}}function forbiddenChannelConfigField(_0x4205f4){return notificationError('notification_config_channel_field_forbidden','Notification\x20JSON\x20channelConfig\x20field\x20\x22'+_0x4205f4+'\x22\x20is\x20forbidden.');}function invalidFieldType(_0x33a7f0,_0x48a7af){const _0x4c4285=a171_0x14e415;return notificationError('notification_config_field_invalid',_0x4c4285(0x133)+_0x33a7f0+_0x4c4285(0x140)+_0x48a7af+'.');}function serializeChannelConfig(_0x375ba5){const _0x4c72a7=a171_0x14e415;return _0x375ba5===null||_0x375ba5===undefined?null:JSON[_0x4c72a7(0x14d)](_0x375ba5);}function redactSensitive(_0x1b6730){const _0x31ec52=a171_0x14e415;return _0x1b6730===null||_0x1b6730===undefined||_0x1b6730===''?null:_0x31ec52(0x13b);}function requireResponseString(_0x30ffca,_0x2d4cdd,_0x135fcc){const _0x16d523=a171_0x14e415;if(typeof _0x30ffca!==_0x16d523(0x131)||_0x30ffca[_0x16d523(0x158)]()==='')throw CliErrors[_0x16d523(0xfe)](_0x16d523(0x142),'Item\x20'+(_0x135fcc+0x1)+_0x16d523(0x150)+_0x2d4cdd+'\x22.');return _0x30ffca[_0x16d523(0x158)]();}function requireExactString(_0x427f24,_0x4f3b27,_0x11f9c5){const _0x4bc41e=a171_0x14e415;if(typeof _0x427f24!==_0x4bc41e(0x131)||_0x427f24['trim']()==='')throw notificationError(_0x4bc41e(0xf7),_0x4bc41e(0x124)+_0x11f9c5+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x4f3b27+'\x22.');return _0x427f24[_0x4bc41e(0x158)]();}function a171_0x1ae6(_0x562f64,_0x389363){_0x562f64=_0x562f64-0xed;const _0x2e6be2=a171_0x2e6b();let _0x1ae6e5=_0x2e6be2[_0x562f64];return _0x1ae6e5;}function responseNullableString(_0x82180a,_0x477d5a,_0x157eb7){const _0x93b89c=a171_0x14e415;if(_0x82180a===undefined||_0x82180a===null)return null;if(typeof _0x82180a!==_0x93b89c(0x131))throw notificationError(_0x93b89c(0xf7),_0x93b89c(0x124)+_0x157eb7+'\x20has\x20invalid\x20field\x20\x22'+_0x477d5a+'\x22.');return _0x82180a;}function responseNullableTimeout(_0x23019a,_0x586840,_0x7e5145){const _0x58c81f=a171_0x14e415;if(_0x23019a===undefined||_0x23019a===null)return null;if(!Number['isSafeInteger'](_0x23019a)||_0x23019a<0x0)throw notificationError(_0x58c81f(0xf7),_0x58c81f(0x124)+_0x7e5145+_0x58c81f(0xef)+_0x586840+'\x22.');return _0x23019a;}function normalizeNullableString(_0x207826){const _0x4ba658=a171_0x14e415;return typeof _0x207826===_0x4ba658(0x131)?_0x207826:null;}function isJsonObject(_0x128da7){return _0x128da7!==null&&typeof _0x128da7==='object'&&!Array['isArray'](_0x128da7);}function hasOwn(_0x5e46fd,_0x1d639e){const _0x4f6bb8=a171_0x14e415;return Object['prototype'][_0x4f6bb8(0x134)]['call'](_0x5e46fd,_0x1d639e);}async function readStdin(){const _0x40b86c=a171_0x14e415;let _0x352209='';process['stdin'][_0x40b86c(0x15b)](_0x40b86c(0xfc));for await(const _0x1ebb1f of process[_0x40b86c(0x102)])_0x352209+=_0x1ebb1f;return _0x352209;}
|
|
1
|
+
const a181_0x4164a7=a181_0x1c7d;(function(_0x492e05,_0x4b0aaa){const _0x4a9877=a181_0x1c7d,_0x4b05a5=_0x492e05();while(!![]){try{const _0x1ae5a9=parseInt(_0x4a9877(0x23b))/0x1+parseInt(_0x4a9877(0x23d))/0x2+-parseInt(_0x4a9877(0x247))/0x3+-parseInt(_0x4a9877(0x230))/0x4+-parseInt(_0x4a9877(0x203))/0x5*(parseInt(_0x4a9877(0x23a))/0x6)+-parseInt(_0x4a9877(0x25a))/0x7*(parseInt(_0x4a9877(0x1ea))/0x8)+parseInt(_0x4a9877(0x1e6))/0x9;if(_0x1ae5a9===_0x4b0aaa)break;else _0x4b05a5['push'](_0x4b05a5['shift']());}catch(_0x2f90e2){_0x4b05a5['push'](_0x4b05a5['shift']());}}}(a181_0x1e41,0xd6c84));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_0x4164a7(0x20f),a181_0x4164a7(0x227),a181_0x4164a7(0x252),'WECOM',a181_0x4164a7(0x253)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a181_0x4164a7(0x1ef),a181_0x4164a7(0x1e1),a181_0x4164a7(0x241),a181_0x4164a7(0x1f7),a181_0x4164a7(0x1de),a181_0x4164a7(0x1dc),a181_0x4164a7(0x22d)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id','appCode',a181_0x4164a7(0x234),a181_0x4164a7(0x201)]),EMAIL_RECIPIENT_FIELDS=new Set([a181_0x4164a7(0x22e),a181_0x4164a7(0x20c),a181_0x4164a7(0x212),a181_0x4164a7(0x255),a181_0x4164a7(0x1dd),a181_0x4164a7(0x231),'fromName','to','cc']);function a181_0x1c7d(_0x5a6155,_0x26cebe){_0x5a6155=_0x5a6155-0x1d9;const _0x1e41d4=a181_0x1e41();let _0x1c7db5=_0x1e41d4[_0x5a6155];return _0x1c7db5;}export const NOTIFICATION_INPUT_FLAGS=[{'name':a181_0x4164a7(0x24e),'type':a181_0x4164a7(0x25c),'required':![],'description':a181_0x4164a7(0x24f)},{'name':a181_0x4164a7(0x21c),'type':'boolean','required':![],'default':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin'},{'name':a181_0x4164a7(0x20a),'type':'string','required':![],'description':a181_0x4164a7(0x208)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a181_0x4164a7(0x24b),'required':!![],'description':a181_0x4164a7(0x228)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x901d27,_0x1609e4,_0x1773f4){return new CliError(_0x901d27,0x1,_0x1609e4,_0x1773f4);}export function readNotificationId(_0x3e43fe){const _0x2153b5=a181_0x4164a7,_0x33b6ab=_0x3e43fe[_0x2153b5(0x222)]('id');if(!Number[_0x2153b5(0x238)](_0x33b6ab)||_0x33b6ab<=0x0)throw notificationError('notification_config_id_invalid','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.');return _0x33b6ab;}export function requireNotificationExplicitYes(_0x2916d6){const _0x465092=a181_0x4164a7;if(_0x2916d6[_0x465092(0x244)](_0x465092(0x237))||_0x2916d6[_0x465092(0x244)](_0x465092(0x205)))return;throw notificationError(_0x465092(0x20b),_0x465092(0x1f4),_0x465092(0x20e));}export function readNotificationChannelType(_0x1e0dc6,_0x5b4773=a181_0x4164a7(0x21a),_0x675641=a181_0x4164a7(0x20f)){const _0x139391=a181_0x4164a7,_0x98eb3b=_0x1e0dc6[_0x139391(0x242)](_0x5b4773)['trim']()||_0x675641;if(!NOTIFICATION_CHANNEL_TYPES[_0x139391(0x1fc)](_0x98eb3b))throw CliErrors['validation'](_0x139391(0x251)+_0x5b4773+':\x20'+_0x98eb3b,_0x139391(0x23e)+NOTIFICATION_CHANNEL_TYPES[_0x139391(0x258)](',\x20')+'.');return _0x98eb3b;}export function assertSingleNotificationSource(_0x219a7d){const _0x405a7c=a181_0x4164a7,_0x36209b=[],_0x44d057=_0x219a7d[_0x405a7c(0x242)](_0x405a7c(0x24e))[_0x405a7c(0x1e8)]();if(_0x44d057)_0x36209b['push']({'kind':'file','path':_0x44d057});if(_0x219a7d[_0x405a7c(0x244)](_0x405a7c(0x21c)))_0x36209b['push']({'kind':_0x405a7c(0x21c)});const _0x10b4c1=_0x219a7d['str'](_0x405a7c(0x20a))['trim']();if(_0x10b4c1)_0x36209b[_0x405a7c(0x223)]({'kind':'env','name':_0x10b4c1});if(_0x36209b[_0x405a7c(0x22a)]===0x0)throw CliErrors[_0x405a7c(0x22c)](_0x405a7c(0x1ee),_0x405a7c(0x233));if(_0x36209b['length']>0x1)throw CliErrors['validation'](_0x405a7c(0x1fe),_0x405a7c(0x233));return _0x36209b[0x0];}export async function readNotificationDocument(_0x445e77,_0x4e2036){const _0x1316e2=a181_0x4164a7,_0x74dd2b=assertSingleNotificationSource(_0x445e77),_0x32ff67=_0x74dd2b[_0x1316e2(0x213)]==='file'?_0x1316e2(0x21d)+_0x74dd2b[_0x1316e2(0x235)]:_0x74dd2b[_0x1316e2(0x213)]===_0x1316e2(0x236)?_0x1316e2(0x257)+_0x74dd2b[_0x1316e2(0x22b)]:_0x1316e2(0x21c);let _0x5c010f;try{if(_0x74dd2b[_0x1316e2(0x213)]==='file')_0x5c010f=await readFile(_0x74dd2b[_0x1316e2(0x235)],'utf8');else{if(_0x74dd2b[_0x1316e2(0x213)]===_0x1316e2(0x236)){if(!(_0x74dd2b[_0x1316e2(0x22b)]in process.env))throw notificationError(_0x1316e2(0x1f6),_0x1316e2(0x250)+_0x74dd2b[_0x1316e2(0x22b)]);_0x5c010f=process.env[_0x74dd2b.name]??'';}else _0x5c010f=await readStdin();}}catch(_0x2da873){if(_0x2da873 instanceof CliError)throw _0x2da873;throw notificationError(_0x1316e2(0x1f6),_0x1316e2(0x224)+_0x32ff67+'.');}let _0xfddaf7;try{_0xfddaf7=JSON[_0x1316e2(0x254)](_0x5c010f);}catch{throw notificationError('notification_config_json_invalid',_0x1316e2(0x216)+_0x32ff67+'\x20is\x20invalid.','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.');}if(!isJsonObject(_0xfddaf7))throw notificationError(_0x1316e2(0x207),_0x1316e2(0x216)+_0x32ff67+_0x1316e2(0x1f9));return validateNotificationDocument(_0xfddaf7,_0x4e2036);}export function projectNotificationListConfig(_0x118e9e,_0x3c0a98){const _0x27bf2b=a181_0x4164a7;return{'id':typeof _0x118e9e['id']==='number'?_0x118e9e['id']:null,'configCode':requireResponseString(_0x118e9e[_0x27bf2b(0x234)],_0x27bf2b(0x234),_0x3c0a98),'configName':requireResponseString(_0x118e9e['configName'],'configName',_0x3c0a98),'channelType':requireResponseString(_0x118e9e[_0x27bf2b(0x1e1)],_0x27bf2b(0x1e1),_0x3c0a98),'description':normalizeNullableString(_0x118e9e[_0x27bf2b(0x1de)]),'createTime':normalizeNullableString(_0x118e9e[_0x27bf2b(0x248)]),'updateTime':normalizeNullableString(_0x118e9e[_0x27bf2b(0x21e)])};}export function normalizeExactNotificationConfig(_0x4ff3f2,_0xc71fb3,_0x3d257c){const _0x7a10dd=a181_0x4164a7;if(!Number[_0x7a10dd(0x238)](_0x4ff3f2['id'])||_0x4ff3f2['id']!==_0xc71fb3)throw notificationError(_0x7a10dd(0x1ed),_0x7a10dd(0x1fd)+_0xc71fb3+'.');if(_0x4ff3f2['appCode']!==_0x3d257c)throw notificationError(_0x7a10dd(0x1ed),_0x7a10dd(0x210)+_0xc71fb3+_0x7a10dd(0x226));const _0x187aca=requireExactString(_0x4ff3f2[_0x7a10dd(0x1ef)],_0x7a10dd(0x1ef),_0xc71fb3),_0x31098a=requireExactString(_0x4ff3f2['configCode'],_0x7a10dd(0x234),_0xc71fb3),_0x370a93=requireExactString(_0x4ff3f2[_0x7a10dd(0x1e1)],_0x7a10dd(0x1e1),_0xc71fb3);if(!NOTIFICATION_CHANNEL_TYPES[_0x7a10dd(0x1fc)](_0x370a93))throw notificationError('notification_config_response_invalid',_0x7a10dd(0x210)+_0xc71fb3+_0x7a10dd(0x1d9));const _0x15f2ac=responseNullableString(_0x4ff3f2['endpointUrl'],_0x7a10dd(0x241),_0xc71fb3),_0x30227a=responseNullableString(_0x4ff3f2[_0x7a10dd(0x1f7)],_0x7a10dd(0x1f7),_0xc71fb3),_0x1ee346=responseNullableString(_0x4ff3f2['description'],_0x7a10dd(0x1de),_0xc71fb3),_0x265227=responseNullableTimeout(_0x4ff3f2['connectTimeout'],_0x7a10dd(0x1dc),_0xc71fb3),_0x3fc204=responseNullableTimeout(_0x4ff3f2[_0x7a10dd(0x22d)],_0x7a10dd(0x22d),_0xc71fb3);return{'id':_0xc71fb3,'appCode':_0x3d257c,'configCode':_0x31098a,'configName':_0x187aca,'channelType':_0x370a93,'endpointUrl':redactSensitive(_0x15f2ac),'channelConfig':redactSensitive(_0x30227a),'description':_0x1ee346,'connectTimeout':_0x265227,'readTimeout':_0x3fc204,'endpointUrlRaw':_0x15f2ac,'channelConfigRaw':_0x30227a};}export async function requireExactNotificationConfig(_0x2a0057,_0x382312,_0x5b1808){const _0x315c88=a181_0x4164a7;let _0x23933b;try{_0x23933b=await getNotificationChannelConfig(_0x382312,_0x2a0057);}catch{throw safeApiFailure(_0x5b1808,_0x315c88(0x245),_0x315c88(0x21f)+_0x2a0057+_0x315c88(0x1f2));}return normalizeExactNotificationConfig(_0x23933b,_0x382312,_0x2a0057);}export function projectNotificationConfig(_0x3404df){const _0x5bdd8e=a181_0x4164a7;return{'id':_0x3404df['id']??null,'appCode':_0x3404df[_0x5bdd8e(0x256)],'configCode':_0x3404df[_0x5bdd8e(0x234)]??null,'configName':_0x3404df[_0x5bdd8e(0x1ef)],'channelType':_0x3404df['channelType'],'endpointUrl':redactSensitive(_0x3404df[_0x5bdd8e(0x241)]),'channelConfig':redactSensitive(_0x3404df[_0x5bdd8e(0x1f7)]),'description':_0x3404df[_0x5bdd8e(0x1de)]??null,'connectTimeout':_0x3404df[_0x5bdd8e(0x1dc)]??null,'readTimeout':_0x3404df[_0x5bdd8e(0x22d)]??null};}export function notificationSelector(_0x3a3c07){const _0x5b71ec=a181_0x4164a7;return{'appCode':_0x3a3c07[_0x5b71ec(0x256)],'id':_0x3a3c07['id'],'configCode':_0x3a3c07[_0x5b71ec(0x234)],'configName':_0x3a3c07[_0x5b71ec(0x1ef)],'channelType':_0x3a3c07[_0x5b71ec(0x1e1)]};}export function createMutationInput(_0x2dac62,_0x4704dc){const _0x1a30f1=a181_0x4164a7;return{'appCode':_0x2dac62,'configName':_0x4704dc[_0x1a30f1(0x1ef)],'channelType':_0x4704dc[_0x1a30f1(0x1e1)],...hasOwn(_0x4704dc,_0x1a30f1(0x241))?{'endpointUrl':_0x4704dc[_0x1a30f1(0x241)]}:{},...hasOwn(_0x4704dc,_0x1a30f1(0x1f7))?{'channelConfig':serializeChannelConfig(_0x4704dc[_0x1a30f1(0x1f7)])}:{},...hasOwn(_0x4704dc,_0x1a30f1(0x1de))?{'description':_0x4704dc['description']}:{},...hasOwn(_0x4704dc,_0x1a30f1(0x1dc))?{'connectTimeout':_0x4704dc['connectTimeout']}:{},...hasOwn(_0x4704dc,'readTimeout')?{'readTimeout':_0x4704dc[_0x1a30f1(0x22d)]}:{}};}export function mergeUpdateInput(_0x1fdc5a,_0x592227){const _0x1f2b71=a181_0x4164a7;return{'id':_0x1fdc5a['id'],'appCode':_0x1fdc5a[_0x1f2b71(0x256)],'configName':_0x592227['configName']??_0x1fdc5a[_0x1f2b71(0x1ef)],'channelType':_0x592227[_0x1f2b71(0x1e1)]??_0x1fdc5a[_0x1f2b71(0x1e1)],'endpointUrl':hasOwn(_0x592227,'endpointUrl')?_0x592227[_0x1f2b71(0x241)]:_0x1fdc5a[_0x1f2b71(0x217)],'channelConfig':hasOwn(_0x592227,'channelConfig')?serializeChannelConfig(_0x592227[_0x1f2b71(0x1f7)]):_0x1fdc5a['channelConfigRaw'],'description':hasOwn(_0x592227,_0x1f2b71(0x1de))?_0x592227[_0x1f2b71(0x1de)]:_0x1fdc5a[_0x1f2b71(0x1de)],'connectTimeout':hasOwn(_0x592227,_0x1f2b71(0x1dc))?_0x592227['connectTimeout']:_0x1fdc5a['connectTimeout'],'readTimeout':hasOwn(_0x592227,_0x1f2b71(0x22d))?_0x592227[_0x1f2b71(0x22d)]:_0x1fdc5a['readTimeout']};}export function plannedUpdateProjection(_0x4523c2,_0x2f323c){const _0x337e27=a181_0x4164a7;return projectNotificationConfig({'id':_0x4523c2['id'],'appCode':_0x4523c2[_0x337e27(0x256)],'configCode':_0x4523c2[_0x337e27(0x234)],'configName':_0x2f323c[_0x337e27(0x1ef)]??_0x4523c2[_0x337e27(0x1ef)],'channelType':_0x2f323c[_0x337e27(0x1e1)]??_0x4523c2['channelType'],'endpointUrl':hasOwn(_0x2f323c,_0x337e27(0x241))?_0x2f323c[_0x337e27(0x241)]:_0x4523c2['endpointUrlRaw'],'channelConfig':hasOwn(_0x2f323c,_0x337e27(0x1f7))?_0x2f323c[_0x337e27(0x1f7)]:_0x4523c2[_0x337e27(0x23f)],'description':hasOwn(_0x2f323c,_0x337e27(0x1de))?_0x2f323c[_0x337e27(0x1de)]:_0x4523c2[_0x337e27(0x1de)],'connectTimeout':hasOwn(_0x2f323c,_0x337e27(0x1dc))?_0x2f323c['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x4523c2[_0x337e27(0x1dc)],'readTimeout':hasOwn(_0x2f323c,_0x337e27(0x22d))?_0x2f323c['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x4523c2[_0x337e27(0x22d)]});}export function requestedSafeFieldsMatch(_0x4e1597,_0x589632,_0x260a8b){const _0x3ccadf=a181_0x4164a7,_0x4d44cf=[],_0x58493f=[],_0x47204c=[];for(const _0x1363c4 of[_0x3ccadf(0x1ef),_0x3ccadf(0x1e1),'description']){if(!hasOwn(_0x260a8b,_0x1363c4))continue;_0x47204c[_0x3ccadf(0x223)](_0x1363c4),_0x4d44cf[_0x3ccadf(0x223)](_0x589632[_0x1363c4]===_0x260a8b[_0x1363c4]),_0x58493f[_0x3ccadf(0x223)](_0x4e1597[_0x1363c4]!==_0x260a8b[_0x1363c4]&&_0x589632[_0x1363c4]===_0x260a8b[_0x1363c4]);}for(const _0x5a09a2 of[_0x3ccadf(0x1dc),_0x3ccadf(0x22d)]){if(!hasOwn(_0x260a8b,_0x5a09a2))continue;const _0x9dafcf=_0x260a8b[_0x5a09a2]??(_0x5a09a2==='connectTimeout'?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x47204c[_0x3ccadf(0x223)](_0x5a09a2),_0x4d44cf[_0x3ccadf(0x223)](_0x589632[_0x5a09a2]===_0x9dafcf),_0x58493f[_0x3ccadf(0x223)](_0x4e1597[_0x5a09a2]!==_0x9dafcf&&_0x589632[_0x5a09a2]===_0x9dafcf);}return hasOwn(_0x260a8b,_0x3ccadf(0x241))&&_0x260a8b[_0x3ccadf(0x241)]===null&&(_0x47204c[_0x3ccadf(0x223)]('endpointUrl:null'),_0x4d44cf[_0x3ccadf(0x223)](_0x589632[_0x3ccadf(0x217)]===null||_0x589632[_0x3ccadf(0x217)]===''),_0x58493f[_0x3ccadf(0x223)](_0x4e1597['endpointUrlRaw']!==null&&_0x4e1597[_0x3ccadf(0x217)]!==''&&(_0x589632[_0x3ccadf(0x217)]===null||_0x589632[_0x3ccadf(0x217)]===''))),{'allMatch':_0x4d44cf[_0x3ccadf(0x218)](Boolean),'provesChange':_0x58493f[_0x3ccadf(0x1e9)](Boolean),'verifiedFields':_0x47204c};}export function validateNotificationDeleteReadback(_0x427443,_0x49e2e4,_0x4d31eb){const _0x28f2b8=a181_0x4164a7;for(const [_0x4e6111,_0x45dd66]of _0x427443[_0x28f2b8(0x232)]()){if(!Number[_0x28f2b8(0x238)](_0x45dd66['id'])||_0x45dd66['id']<=0x0)throw notificationError('notification_config_response_invalid',_0x28f2b8(0x1df)+(_0x4e6111+0x1)+'\x20has\x20an\x20invalid\x20id.');if(_0x45dd66[_0x28f2b8(0x256)]!==_0x49e2e4)throw notificationError(_0x28f2b8(0x1ed),'Notification\x20config\x20list\x20item\x20'+(_0x4e6111+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0x45dd66['channelType']!==_0x4d31eb)throw notificationError(_0x28f2b8(0x1ed),_0x28f2b8(0x1df)+(_0x4e6111+0x1)+_0x28f2b8(0x1e2));}}export function safeApiFailure(_0x4b61b5,_0xd0349a,_0x4e49fb){const _0x57a150=a181_0x4164a7;return notificationError(_0x57a150(0x25d)+_0x4b61b5+'_'+(_0xd0349a==='mutation'?_0x57a150(0x1fa):_0xd0349a+_0x57a150(0x23c)),_0x57a150(0x210)+_0x4b61b5+'\x20'+_0xd0349a+_0x57a150(0x1f3),_0x4e49fb);}export function notificationLookupCommand(_0x4a7661,_0x5ec057){const _0x3d6fa8=a181_0x4164a7;return _0x3d6fa8(0x24c)+_0x4a7661+'\x20--type\x20'+_0x5ec057+_0x3d6fa8(0x239);}function validateNotificationDocument(_0x5a5c8a,_0x235cc7){const _0x56e055=a181_0x4164a7;for(const _0x18e476 of Object[_0x56e055(0x24a)](_0x5a5c8a)){if(FORBIDDEN_IDENTITY_FIELDS[_0x56e055(0x1f5)](_0x18e476))throw notificationError(_0x56e055(0x243),_0x56e055(0x249)+_0x18e476+_0x56e055(0x1da));if(!ALLOWED_INPUT_FIELDS['has'](_0x18e476))throw notificationError(_0x56e055(0x229),_0x56e055(0x1ff)+_0x18e476+'\x22.');}if(_0x235cc7===_0x56e055(0x25b)&&Object['keys'](_0x5a5c8a)[_0x56e055(0x22a)]===0x0)throw notificationError(_0x56e055(0x215),_0x56e055(0x22f));const _0x1236a9={};if(hasOwn(_0x5a5c8a,_0x56e055(0x1ef)))_0x1236a9[_0x56e055(0x1ef)]=validateRequiredString(_0x5a5c8a[_0x56e055(0x1ef)],_0x56e055(0x1ef),0x80);else{if(_0x235cc7===_0x56e055(0x1e7))throw notificationError(_0x56e055(0x1e4),_0x56e055(0x259)+_0x56e055(0x1ec));}if(hasOwn(_0x5a5c8a,_0x56e055(0x1e1))){if(typeof _0x5a5c8a[_0x56e055(0x1e1)]!==_0x56e055(0x25c))throw invalidFieldType('channelType','a\x20supported\x20string');const _0x1be0ac=_0x5a5c8a[_0x56e055(0x1e1)]['trim']();if(!NOTIFICATION_CHANNEL_TYPES[_0x56e055(0x1fc)](_0x1be0ac))throw notificationError(_0x56e055(0x206),_0x56e055(0x1f1),_0x56e055(0x23e)+NOTIFICATION_CHANNEL_TYPES[_0x56e055(0x258)](',\x20')+'.');_0x1236a9[_0x56e055(0x1e1)]=_0x1be0ac;}else{if(_0x235cc7===_0x56e055(0x1e7))throw notificationError(_0x56e055(0x1e4),_0x56e055(0x259)+_0x56e055(0x211));}for(const [_0x17fc6b,_0x191360]of[[_0x56e055(0x241),0x200],[_0x56e055(0x1de),0x100]]){if(!hasOwn(_0x5a5c8a,_0x17fc6b))continue;const _0x50e787=_0x5a5c8a[_0x17fc6b];if(_0x50e787!==null&&typeof _0x50e787!==_0x56e055(0x25c))throw invalidFieldType(_0x17fc6b,_0x56e055(0x1e5));if(typeof _0x50e787===_0x56e055(0x25c)&&_0x50e787['length']>_0x191360)throw notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22'+_0x17fc6b+'\x22\x20cannot\x20exceed\x20'+_0x191360+_0x56e055(0x24d));_0x1236a9[_0x17fc6b]=_0x50e787;}if(hasOwn(_0x5a5c8a,_0x56e055(0x1f7))){const _0x5e215e=_0x5a5c8a['channelConfig'];if(_0x5e215e===null&&_0x235cc7===_0x56e055(0x1e7))throw invalidFieldType('channelConfig','a\x20JSON\x20object');if(_0x5e215e!==null&&!isJsonObject(_0x5e215e))throw invalidFieldType(_0x56e055(0x1f7),_0x235cc7==='update'?_0x56e055(0x204):_0x56e055(0x214));_0x5e215e!==null&&validateChannelConfigFields(_0x1236a9['channelType'],_0x5e215e),_0x1236a9[_0x56e055(0x1f7)]=_0x5e215e;}for(const _0x333441 of['connectTimeout',_0x56e055(0x22d)]){if(!hasOwn(_0x5a5c8a,_0x333441))continue;const _0x3a0dce=_0x5a5c8a[_0x333441];if(_0x3a0dce!==null&&(!Number[_0x56e055(0x238)](_0x3a0dce)||_0x3a0dce<0x0))throw notificationError(_0x56e055(0x206),'Notification\x20JSON\x20field\x20\x22'+_0x333441+_0x56e055(0x202));_0x1236a9[_0x333441]=_0x3a0dce;}return _0x1236a9;}function validateRequiredString(_0x178761,_0x4c241f,_0x34a147){const _0xb15ecb=a181_0x4164a7;if(typeof _0x178761!==_0xb15ecb(0x25c))throw invalidFieldType(_0x4c241f,_0xb15ecb(0x1e0));const _0x3793e5=_0x178761[_0xb15ecb(0x1e8)]();if(!_0x3793e5)throw notificationError('notification_config_field_invalid',_0xb15ecb(0x249)+_0x4c241f+_0xb15ecb(0x1e3));if(_0x3793e5[_0xb15ecb(0x22a)]>_0x34a147)throw notificationError(_0xb15ecb(0x206),_0xb15ecb(0x249)+_0x4c241f+_0xb15ecb(0x246)+_0x34a147+_0xb15ecb(0x24d));return _0x3793e5;}function validateChannelConfigFields(_0x570f02,_0x191689){const _0x58ac31=a181_0x4164a7;if(hasOwn(_0x191689,_0x58ac31(0x225)))throw forbiddenChannelConfigField(_0x58ac31(0x225));if(_0x570f02===_0x58ac31(0x20f))for(const _0x159f4a of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x191689,_0x159f4a))throw forbiddenChannelConfigField(_0x159f4a);}}function forbiddenChannelConfigField(_0x28c8ef){const _0x56db18=a181_0x4164a7;return notificationError(_0x56db18(0x1fb),_0x56db18(0x220)+_0x28c8ef+_0x56db18(0x1db));}function invalidFieldType(_0x1fdcca,_0x119bce){const _0x416180=a181_0x4164a7;return notificationError(_0x416180(0x206),_0x416180(0x249)+_0x1fdcca+_0x416180(0x200)+_0x119bce+'.');}function serializeChannelConfig(_0x5d4f73){return _0x5d4f73===null||_0x5d4f73===undefined?null:JSON['stringify'](_0x5d4f73);}function redactSensitive(_0x36853f){const _0x166ecf=a181_0x4164a7;return _0x36853f===null||_0x36853f===undefined||_0x36853f===''?null:_0x166ecf(0x1f0);}function requireResponseString(_0x417a76,_0x3a3ae1,_0x369ec9){const _0x36a507=a181_0x4164a7;if(typeof _0x417a76!==_0x36a507(0x25c)||_0x417a76[_0x36a507(0x1e8)]()==='')throw CliErrors[_0x36a507(0x240)](_0x36a507(0x20d),'Item\x20'+(_0x369ec9+0x1)+_0x36a507(0x1f8)+_0x3a3ae1+'\x22.');return _0x417a76[_0x36a507(0x1e8)]();}function requireExactString(_0x399246,_0x350e67,_0x1afde1){const _0x588b9d=a181_0x4164a7;if(typeof _0x399246!==_0x588b9d(0x25c)||_0x399246[_0x588b9d(0x1e8)]()==='')throw notificationError(_0x588b9d(0x1ed),'Notification\x20config\x20'+_0x1afde1+_0x588b9d(0x1f8)+_0x350e67+'\x22.');return _0x399246[_0x588b9d(0x1e8)]();}function responseNullableString(_0x234b28,_0x200a49,_0x33f3f3){const _0x11d875=a181_0x4164a7;if(_0x234b28===undefined||_0x234b28===null)return null;if(typeof _0x234b28!=='string')throw notificationError(_0x11d875(0x1ed),_0x11d875(0x210)+_0x33f3f3+'\x20has\x20invalid\x20field\x20\x22'+_0x200a49+'\x22.');return _0x234b28;}function responseNullableTimeout(_0x83cd2c,_0xfe083c,_0x412d9e){const _0x58af0d=a181_0x4164a7;if(_0x83cd2c===undefined||_0x83cd2c===null)return null;if(!Number[_0x58af0d(0x238)](_0x83cd2c)||_0x83cd2c<0x0)throw notificationError(_0x58af0d(0x1ed),_0x58af0d(0x210)+_0x412d9e+_0x58af0d(0x21b)+_0xfe083c+'\x22.');return _0x83cd2c;}function normalizeNullableString(_0x5dcd5e){const _0x1286ce=a181_0x4164a7;return typeof _0x5dcd5e===_0x1286ce(0x25c)?_0x5dcd5e:null;}function isJsonObject(_0x2d0eab){const _0x5f011a=a181_0x4164a7;return _0x2d0eab!==null&&typeof _0x2d0eab===_0x5f011a(0x219)&&!Array['isArray'](_0x2d0eab);}function hasOwn(_0x1ada30,_0x27b085){const _0x33c723=a181_0x4164a7;return Object[_0x33c723(0x1eb)]['hasOwnProperty'][_0x33c723(0x209)](_0x1ada30,_0x27b085);}function a181_0x1e41(){const _0x4f47e5=['Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','call','from-env','notification_config_confirmation_required','recipients','Invalid\x20notification\x20config\x20response.','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','EMAIL','Notification\x20config\x20','\x22channelType\x22.','ccList','kind','a\x20JSON\x20object','notification_config_update_empty','Notification\x20JSON\x20from\x20','endpointUrlRaw','every','object','type','\x20has\x20invalid\x20field\x20\x22','stdin','file\x20','updateTime','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','Notification\x20JSON\x20channelConfig\x20field\x20\x22','setEncoding','num','push','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','messageTemplate','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','FEISHU','Application-level\x20notification\x20config\x20ID','notification_config_field_unknown','length','name','validation','readTimeout','emailTargets','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','3631308wWWzJh','subjectPrefix','entries','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','configCode','path','env','dry-run','isSafeInteger','\x20--format\x20compress','6KHJlaj','1408687PsOXFY','_unavailable','1022854dQNzNY','Allowed\x20values:\x20','channelConfigRaw','apiError','endpointUrl','str','notification_config_field_forbidden','bool','preflight','\x22\x20cannot\x20exceed\x20','3152766gqzqaW','createTime','Notification\x20JSON\x20field\x20\x22','keys','number','rabetbase\x20notification\x20config-list\x20--appcode\x20','\x20characters.','file','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','Invalid\x20--','DINGTALK','WEBHOOK','parse','bccList','appCode','environment\x20variable\x20','join','Create\x20JSON\x20requires\x20field\x20','29239huMcTf','update','string','notification_config_','\x20has\x20an\x20unsupported\x20channelType.','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','\x22\x20is\x20forbidden.','connectTimeout','replyTo','description','Notification\x20config\x20list\x20item\x20','a\x20non-empty\x20string','channelType','\x20has\x20an\x20invalid\x20channelType.','\x22\x20must\x20be\x20a\x20non-empty\x20string.','notification_config_field_required','a\x20string\x20or\x20null','34825032CIRSSy','create','trim','some','2416wvtBUS','prototype','\x22configName\x22.','notification_config_response_invalid','Missing\x20notification\x20JSON\x20source.','configName','<redacted>','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','\x20failed.','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','has','notification_config_source_unavailable','channelConfig','\x20is\x20missing\x20required\x20field\x20\x22','\x20must\x20be\x20an\x20object.','failed','notification_config_channel_field_forbidden','includes','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','Notification\x20JSON\x20source\x20is\x20ambiguous.','Unknown\x20notification\x20JSON\x20field\x20\x22','\x22\x20must\x20be\x20','channelCode','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','8448055vypiAt','a\x20JSON\x20object\x20or\x20null','yes','notification_config_field_invalid','notification_config_json_invalid'];a181_0x1e41=function(){return _0x4f47e5;};return a181_0x1e41();}async function readStdin(){const _0x27ebee=a181_0x4164a7;let _0x5b97b6='';process[_0x27ebee(0x21c)][_0x27ebee(0x221)]('utf8');for await(const _0x4fe3da of process[_0x27ebee(0x21c)])_0x5b97b6+=_0x4fe3da;return _0x5b97b6;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a182_0x129c(){const _0x293ed2=['recognize','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','Unsupported\x20OCR\x20scene:\x20','GET','14360877iZiJSI','891555BpRQPW','filePath','/smartapi/common/queryFileUrl','ocr','Publicly\x20accessible\x20image\x20or\x20file\x20URL','fileName','general','imageUrl','filter','2623264ovvTUw','Table','validation','scene','\x20OCR\x20from\x20URL','fileUrl','525cGDUsy','image-file','count','POST','join','imageFile','1074334ETexHB','path','appCode','Preview:\x20recognize\x20','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','read','.\x20Supported\x20scenes:\x20','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','2020647hWGXmW','\x20OCR','8SJWGzA','idCard','apiError','File\x20URL\x20response\x20missing\x20fileUrl.','toLowerCase','767621mojpCF','Invoice','trim','form','string','str','5250hVgoDS','idcard','length','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','image-url'];a182_0x129c=function(){return _0x293ed2;};return a182_0x129c();}const a182_0x29f76f=a182_0x5e67;(function(_0x17ed77,_0x2d5d8b){const _0x5311c8=a182_0x5e67,_0x40fb2=_0x17ed77();while(!![]){try{const _0x1de8c3=parseInt(_0x5311c8(0x18c))/0x1+-parseInt(_0x5311c8(0x17d))/0x2+-parseInt(_0x5311c8(0x185))/0x3+-parseInt(_0x5311c8(0x171))/0x4+-parseInt(_0x5311c8(0x19c))/0x5+parseInt(_0x5311c8(0x192))/0x6*(parseInt(_0x5311c8(0x177))/0x7)+parseInt(_0x5311c8(0x187))/0x8*(parseInt(_0x5311c8(0x19b))/0x9);if(_0x1de8c3===_0x2d5d8b)break;else _0x40fb2['push'](_0x40fb2['shift']());}catch(_0x58b540){_0x40fb2['push'](_0x40fb2['shift']());}}}(a182_0x129c,0x5dc38));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=['invoice',a182_0x29f76f(0x1a2),a182_0x29f76f(0x18f),a182_0x29f76f(0x188)],SCENE_TO_LEGACY_TYPE={'invoice':a182_0x29f76f(0x18d),'general':'General','form':a182_0x29f76f(0x172),'idCard':'IdCard'},SCENE_FLAG={'name':a182_0x29f76f(0x174),'type':'string','required':!![],'enum':[...SUPPORTED_SCENES],'description':a182_0x29f76f(0x184)},IMAGE_FILE_FLAG={'name':a182_0x29f76f(0x178),'type':a182_0x29f76f(0x190),'description':a182_0x29f76f(0x195)},IMAGE_URL_FLAG={'name':a182_0x29f76f(0x196),'type':a182_0x29f76f(0x190),'description':a182_0x29f76f(0x1a0)};function normalizeScene(_0x2dc491){const _0x16c432=a182_0x29f76f,_0x5c7511=_0x2dc491['trim']()[_0x16c432(0x18b)]();if(_0x5c7511===_0x16c432(0x193))return'idCard';if(_0x5c7511==='invoice'||_0x5c7511===_0x16c432(0x1a2)||_0x5c7511===_0x16c432(0x18f))return _0x5c7511;throw CliErrors['validation'](_0x16c432(0x199)+_0x2dc491+_0x16c432(0x183)+SUPPORTED_SCENES[_0x16c432(0x17b)](',\x20'));}function selectedInputs(_0x22b1ce){const _0x3918d3=a182_0x29f76f,_0x29d496=_0x22b1ce[_0x3918d3(0x191)](_0x3918d3(0x178))[_0x3918d3(0x18e)](),_0x5ca673=_0x22b1ce[_0x3918d3(0x191)](_0x3918d3(0x196))[_0x3918d3(0x18e)]();return{'imageFile':_0x29d496,'imageUrl':_0x5ca673,'count':[_0x29d496,_0x5ca673][_0x3918d3(0x170)](Boolean)[_0x3918d3(0x194)]};}function a182_0x5e67(_0xfdf51b,_0x58a250){_0xfdf51b=_0xfdf51b-0x16f;const _0x129c09=a182_0x129c();let _0x5e67e4=_0x129c09[_0xfdf51b];return _0x5e67e4;}function validateInputSelection(_0x21297e){const _0x32821d=a182_0x29f76f,_0x4bc8e6=selectedInputs(_0x21297e);if(_0x4bc8e6[_0x32821d(0x179)]!==0x1)throw CliErrors[_0x32821d(0x173)]('Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.');return _0x4bc8e6;}function withScene(_0x1581c7,_0x1c600b,_0x49b540){const _0x547fc7=a182_0x29f76f;return{..._0x1581c7,'scene':_0x1c600b,..._0x49b540?{'sourceFile':{'fileName':_0x49b540[_0x547fc7(0x1a1)],'filePath':_0x49b540[_0x547fc7(0x19d)]}}:{}};}const ocrRecognize={'service':a182_0x29f76f(0x19f),'command':a182_0x29f76f(0x197),'description':a182_0x29f76f(0x181),'risk':a182_0x29f76f(0x182),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x1aacf6){const _0x543f6f=a182_0x29f76f,_0xf09bcf=normalizeScene(_0x1aacf6[_0x543f6f(0x191)](_0x543f6f(0x174))),_0x5ed17b=SCENE_TO_LEGACY_TYPE[_0xf09bcf],_0x305af1=validateInputSelection(_0x1aacf6);if(_0x305af1[_0x543f6f(0x16f)]){const _0x4627b7=new URLSearchParams({'url':_0x305af1[_0x543f6f(0x16f)],'type':_0x5ed17b,'appCode':_0x1aacf6[_0x543f6f(0x17f)]});return{'method':_0x543f6f(0x19a),'url':'/smartapi/ocr/recognize-text?'+_0x4627b7['toString'](),'description':_0x543f6f(0x180)+_0xf09bcf+_0x543f6f(0x175)};}const _0x161a68=requireDevelopmentUploadFile(_0x305af1[_0x543f6f(0x17c)],_0x543f6f(0x178));return{'method':_0x543f6f(0x17a),'url':'/smartapi/common/uploadFile','body':{'steps':[{'method':'POST','url':'/smartapi/common/uploadFile','body':{'appCode':_0x1aacf6[_0x543f6f(0x17f)],'multipart':{'file':_0x161a68}}},{'method':'POST','url':_0x543f6f(0x19e),'body':{'filePath':'<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','downloadFlag':![]}},{'method':_0x543f6f(0x19a),'url':'/smartapi/ocr/recognize-text','query':{'appCode':_0x1aacf6[_0x543f6f(0x17f)],'url':_0x543f6f(0x198),'type':_0x5ed17b}}]},'description':'Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20'+_0xf09bcf+_0x543f6f(0x186)};},async 'execute'(_0x7961d5){const _0x5efb84=a182_0x29f76f,_0x3fd9ae=normalizeScene(_0x7961d5['str']('scene')),_0x51069f=SCENE_TO_LEGACY_TYPE[_0x3fd9ae],_0x142e23=validateInputSelection(_0x7961d5);if(_0x142e23['imageUrl']){const _0x3fad86=await recognizeDevelopmentOcr(_0x7961d5[_0x5efb84(0x17f)],{'url':_0x142e23[_0x5efb84(0x16f)],'type':_0x51069f});return{'ok':!![],'data':withScene(_0x3fad86,_0x3fd9ae)};}const _0x5a43bc=requireDevelopmentUploadFile(_0x142e23['imageFile'],_0x5efb84(0x178)),_0x25953b=await uploadDevelopmentFile(_0x7961d5['appCode'],_0x5a43bc[_0x5efb84(0x17e)]);if(!_0x25953b['filePath'])throw CliErrors[_0x5efb84(0x189)]('File\x20upload\x20response\x20missing\x20filePath.');const _0x5d9091=await queryDevelopmentFileUrl(_0x25953b[_0x5efb84(0x19d)],{'download':![]});if(!_0x5d9091[_0x5efb84(0x176)])throw CliErrors[_0x5efb84(0x189)](_0x5efb84(0x18a));const _0x4716a0=await recognizeDevelopmentOcr(_0x7961d5['appCode'],{'url':_0x5d9091[_0x5efb84(0x176)],'type':_0x51069f});return{'ok':!![],'data':withScene(_0x4716a0,_0x3fd9ae,_0x25953b)};}};export const ocrDefinitions=[ocrRecognize];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a183_0x2206d8=a183_0x3395;(function(_0x3ea515,_0xe20e6a){const _0x43317a=a183_0x3395,_0x263c30=_0x3ea515();while(!![]){try{const _0x4a897b=-parseInt(_0x43317a(0x9f))/0x1*(-parseInt(_0x43317a(0xa7))/0x2)+parseInt(_0x43317a(0xb1))/0x3*(-parseInt(_0x43317a(0xb2))/0x4)+parseInt(_0x43317a(0xa8))/0x5+parseInt(_0x43317a(0xa0))/0x6*(parseInt(_0x43317a(0xac))/0x7)+parseInt(_0x43317a(0xc4))/0x8*(-parseInt(_0x43317a(0xba))/0x9)+parseInt(_0x43317a(0xcd))/0xa*(-parseInt(_0x43317a(0xe0))/0xb)+parseInt(_0x43317a(0xc3))/0xc;if(_0x4a897b===_0xe20e6a)break;else _0x263c30['push'](_0x263c30['shift']());}catch(_0x474c2d){_0x263c30['push'](_0x263c30['shift']());}}}(a183_0x1a72,0xdf16c));import{readFile}from'node:fs/promises';import{dirname,join,resolve}from'node:path';function a183_0x3395(_0xb020f4,_0x5f50ff){_0xb020f4=_0xb020f4-0x9b;const _0x1a72bd=a183_0x1a72();let _0x3395a4=_0x1a72bd[_0xb020f4];return _0x3395a4;}import{fileURLToPath}from'node:url';function a183_0x1a72(){const _0x4294c7=['.json','values','60000xivqTz','../../../templates/custom-pages','name','apiError','POST','Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)','Invalid\x20Custom\x20Page\x20pattern:\x20','str','Custom_page_','files','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','length','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','version','isInteger','parent-menu-id','write','pageName','/smartapi/webcode/page/create','2607wJvsas','ONEPAGE','--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.','BLANK','create','toLowerCase','trim','isArray','1321049HaYnDX','12QCDqgl','Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','parentMenuId','compress','page-dir','pageName\x20cannot\x20exceed\x20100\x20characters.','pageId','2jPZeSH','6827130jAmaLf','DASHBOARD','number','parse','110243OqAMPj','utf8','some','object','validation','231LkZYPC','3324DoTnPf','page-content','stringify','Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','keys','Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.','Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.','4401qesZpx','menuPath','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','page','\x20and\x20its\x20menu\x20entry.','--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','CUSTOM','page-pattern','4220592GhwvFF','10960yoHEPm','Would\x20create\x20Custom\x20Page\x20','page\x20create\x20does\x20not\x20accept\x20--page-type.','page.create','createMenu','string','appCode'];a183_0x1a72=function(){return _0x4294c7;};return a183_0x1a72();}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';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,validateCustomPageContent}from'./custom/shared.js';const CUSTOM_PAGE_PATTERNS=[a183_0x2206d8(0xe3),a183_0x2206d8(0xe1),a183_0x2206d8(0xa9)],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),a183_0x2206d8(0xce));export const pageCreate={'service':a183_0x2206d8(0xbd),'command':a183_0x2206d8(0x9b),'description':a183_0x2206d8(0xa1),'risk':a183_0x2206d8(0xdd),'defaultOutputFormat':a183_0x2206d8(0xa3),'structuredErrors':!![],'rejectedFlags':[{'name':'page-type','message':a183_0x2206d8(0xc6),'hint':a183_0x2206d8(0xb8)},{'name':a183_0x2206d8(0xb3),'message':'page\x20create\x20no\x20longer\x20accepts\x20--page-content.','hint':a183_0x2206d8(0xd7)}],'flags':[{'name':'name','type':a183_0x2206d8(0xc9),'description':a183_0x2206d8(0xd9)},{'name':a183_0x2206d8(0xdc),'type':a183_0x2206d8(0xaa),'description':a183_0x2206d8(0xbc)},{'name':a183_0x2206d8(0xc2),'type':'string','description':'Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)','enum':CUSTOM_PAGE_PATTERNS},{'name':a183_0x2206d8(0xa4),'type':a183_0x2206d8(0xc9),'description':a183_0x2206d8(0xd2)},APPCODE_FLAG],async 'validate'(_0x992715){await readValidatedPageSource(_0x992715);},async 'dryRun'(_0x2f8216){const _0x2b6e97=a183_0x2206d8,_0x15d353=readInput(_0x2f8216,await readValidatedPageSource(_0x2f8216));return{'method':_0x2b6e97(0xd1),'url':_0x2b6e97(0xdf),'body':{'appCode':_0x15d353['appCode'],'pageName':_0x15d353[_0x2b6e97(0xde)],..._0x15d353[_0x2b6e97(0xa2)]!=null?{'parentMenuId':_0x15d353[_0x2b6e97(0xa2)]}:{},'createMenu':_0x15d353[_0x2b6e97(0xc8)],'codeContent':_0x15d353[_0x2b6e97(0xd6)]},'description':_0x2b6e97(0xc5)+JSON[_0x2b6e97(0xb4)](_0x15d353[_0x2b6e97(0xde)])+_0x2b6e97(0xbe)};},async 'execute'(_0x1c737d){const _0x32279a=a183_0x2206d8,_0x4b81ac=readInput(_0x1c737d,await readValidatedPageSource(_0x1c737d)),_0x5a599d=await createCustomPage(_0x4b81ac);if(!Number[_0x32279a(0xdb)](_0x5a599d[_0x32279a(0xa6)])||_0x5a599d[_0x32279a(0xa6)]<=0x0)throw CliErrors[_0x32279a(0xd0)](_0x32279a(0xb7));const _0x5af446=buildCustomPageDevelopmentUrl(_0x4b81ac[_0x32279a(0xca)],_0x5a599d[_0x32279a(0xbb)]),_0x2ceabf=buildCustomPageEditUrl(_0x4b81ac[_0x32279a(0xca)],_0x5a599d[_0x32279a(0xa6)]);return{'ok':!![],'data':{'operation':_0x32279a(0xc7),'pageType':_0x32279a(0xc1),'pagePattern':readPagePattern(_0x1c737d),'selector':{'appCode':_0x4b81ac[_0x32279a(0xca)],'pageName':_0x4b81ac['pageName']},'before':null,'after':{'pageId':_0x5a599d[_0x32279a(0xa6)],'pageName':_0x5a599d[_0x32279a(0xde)],'appCode':_0x5a599d['appCode'],'version':_0x5a599d[_0x32279a(0xda)],'menuId':_0x5a599d['menuId'],'menuPath':_0x5a599d[_0x32279a(0xbb)],'files':_0x5a599d['files']??Object['keys'](_0x4b81ac[_0x32279a(0xd6)])},'dryRun':![],'request':_0x4b81ac,..._0x5af446?{'pageUrl':_0x5af446}:{},..._0x2ceabf?{'editPageUrl':_0x2ceabf}:{},'warnings':_0x5af446?[]:[_0x32279a(0xb5)]},'message':'Created\x20Custom\x20Page\x20'+_0x5a599d[_0x32279a(0xa6)]+'.'};}};function readPagePattern(_0x1f8b19){const _0x5dc75f=a183_0x2206d8,_0x2b64d3=_0x1f8b19[_0x5dc75f(0xd4)](_0x5dc75f(0xc2))[_0x5dc75f(0x9d)](),_0xe78688=_0x1f8b19[_0x5dc75f(0xd4)](_0x5dc75f(0xa4))['trim']();if(_0x2b64d3&&_0xe78688)throw CliErrors['validation'](_0x5dc75f(0xbf));if(_0xe78688)return null;if(!_0x2b64d3)throw CliErrors[_0x5dc75f(0xb0)](_0x5dc75f(0xb9));if(!CUSTOM_PAGE_PATTERNS['includes'](_0x2b64d3))throw CliErrors[_0x5dc75f(0xb0)]('--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.');return _0x2b64d3;}async function readPageSource(_0x176354){const _0x4acac9=a183_0x2206d8,_0x513352=_0x176354['str'](_0x4acac9(0xa4))[_0x4acac9(0x9d)](),_0x4947df=readPagePattern(_0x176354);if(_0x4947df===null){const _0x5b40b9=await readCustomPageDirectory(_0x513352);if(Object[_0x4acac9(0xb6)](_0x5b40b9)['length']===0x0)throw CliErrors[_0x4acac9(0xb0)](_0x4acac9(0xe2));return _0x5b40b9;}let _0xa0e52;try{_0xa0e52=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x4947df[_0x4acac9(0x9c)]()+_0x4acac9(0xcb)),_0x4acac9(0xad));}catch{throw CliErrors[_0x4acac9(0xb0)]('Custom\x20Page\x20pattern\x20not\x20found:\x20'+_0x4947df+'.');}let _0x128ce4;try{_0x128ce4=JSON[_0x4acac9(0xab)](_0xa0e52);}catch{throw CliErrors['validation'](_0x4acac9(0xd3)+_0x4947df+'.');}if(!_0x128ce4||typeof _0x128ce4!==_0x4acac9(0xaf)||Array[_0x4acac9(0x9e)](_0x128ce4)||Object[_0x4acac9(0xcc)](_0x128ce4)[_0x4acac9(0xae)](_0x159036=>typeof _0x159036!==_0x4acac9(0xc9)))throw CliErrors['validation'](_0x4acac9(0xd3)+_0x4947df+'.');return _0x128ce4;}async function readValidatedPageSource(_0xe9ebd3){const _0x570034=await readPageSource(_0xe9ebd3);return await validateCustomPageContent(_0x570034),_0x570034;}function readInput(_0x5cc2f7,_0x5c4bff){const _0x250409=a183_0x2206d8,_0x33fb12=_0x5cc2f7[_0x250409(0xd4)](_0x250409(0xcf))[_0x250409(0x9d)]()||_0x250409(0xd5)+Date['now']();if(_0x33fb12[_0x250409(0xd8)]>0x64)throw CliErrors[_0x250409(0xb0)](_0x250409(0xa5));const _0x302296=_0x5cc2f7['num']('parent-menu-id',NaN),_0x20888c=!Number['isNaN'](_0x302296);if(_0x20888c&&(!Number['isInteger'](_0x302296)||_0x302296<=0x0))throw CliErrors[_0x250409(0xb0)](_0x250409(0xc0));return{'appCode':_0x5cc2f7['appCode'],'pageName':_0x33fb12,..._0x20888c?{'parentMenuId':_0x302296}:{},'createMenu':!![],'files':_0x5c4bff};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a184_0x35ab(){const _0x219b1b=['padStart','Custom\x20Page\x20ID','str','getFullYear','221798cPRfFo','join','number','5531364OAickR','1786036biDpJC','custom-detail','trim','Retrieved\x20Custom\x20Page\x20','getHours','getMinutes','read','151036PlNSaw','Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','2098525SquOKk','getMonth','getSeconds','getTime','7770104EIXuGJ','appCode','7150850eRDblY','6ZJzTCz','page','20erwqph','pageCode','57IyMAHG','compress'];a184_0x35ab=function(){return _0x219b1b;};return a184_0x35ab();}const a184_0xd3fda0=a184_0x24c0;(function(_0xea4ec9,_0x190c1d){const _0x16d5fc=a184_0x24c0,_0x6fd150=_0xea4ec9();while(!![]){try{const _0x54fcb7=-parseInt(_0x16d5fc(0x1de))/0x1+-parseInt(_0x16d5fc(0x1e2))/0x2+parseInt(_0x16d5fc(0x1d8))/0x3*(parseInt(_0x16d5fc(0x1e9))/0x4)+parseInt(_0x16d5fc(0x1cd))/0x5+-parseInt(_0x16d5fc(0x1d4))/0x6*(-parseInt(_0x16d5fc(0x1d3))/0x7)+parseInt(_0x16d5fc(0x1d1))/0x8+parseInt(_0x16d5fc(0x1e1))/0x9*(-parseInt(_0x16d5fc(0x1d6))/0xa);if(_0x54fcb7===_0x190c1d)break;else _0x6fd150['push'](_0x6fd150['shift']());}catch(_0x40d1b4){_0x6fd150['push'](_0x6fd150['shift']());}}}(a184_0x35ab,0xbfe0b));import{getCustomPageSource}from'../../../core/api-client.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';function a184_0x24c0(_0x355d34,_0x112546){_0x355d34=_0x355d34-0x1cd;const _0x35ab7f=a184_0x35ab();let _0x24c087=_0x35ab7f[_0x355d34];return _0x24c087;}export const pageCustomDetail={'service':a184_0xd3fda0(0x1d5),'command':a184_0xd3fda0(0x1e3),'description':a184_0xd3fda0(0x1ea),'risk':a184_0xd3fda0(0x1e8),'defaultOutputFormat':a184_0xd3fda0(0x1d9),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a184_0xd3fda0(0x1e0),'required':!![],'description':a184_0xd3fda0(0x1db)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4f1d50){readCustomPageId(_0x4f1d50);},async 'execute'(_0xc8c99f){const _0x455e8b=a184_0xd3fda0,_0x3dcf95=readCustomPageId(_0xc8c99f),_0x1e09f3=await getCustomPageSource(_0x3dcf95),{bundle:_0x47645f,createTime:_0x5404a6,updateTime:_0x3c0c70,..._0x9735ab}=_0x1e09f3,_0x521513=_0x1e09f3['id']??_0x3dcf95,_0x340ea7=_0x1e09f3[_0x455e8b(0x1d2)]?.[_0x455e8b(0x1e4)]()||_0xc8c99f[_0x455e8b(0x1dc)]('appcode')[_0x455e8b(0x1e4)](),_0xd40492=buildCustomPageRuntimeUrl(_0x340ea7,_0x1e09f3[_0x455e8b(0x1d7)]),_0x3796e8=buildCustomPageEditUrl(_0x340ea7,_0x521513),_0x5f3b8a=await resolveCustomPageDevelopmentUrl(_0x340ea7,_0x521513,_0xc8c99f['cookie']);return{'ok':!![],'data':{..._0x9735ab,..._0xd40492?{'runtimePageUrl':_0xd40492}:{},..._0x5f3b8a?{'pageUrl':_0x5f3b8a}:{},..._0x3796e8?{'editPageUrl':_0x3796e8}:{},..._0x5404a6==null?{}:{'createTime':formatTime(_0x5404a6)},..._0x3c0c70==null?{}:{'updateTime':formatTime(_0x3c0c70)}},'message':_0x455e8b(0x1e5)+_0x3dcf95+'.'};}};function formatTime(_0x41de54){const _0x5e704a=a184_0xd3fda0,_0x2bdd99=new Date(_0x41de54);if(Number['isNaN'](_0x2bdd99[_0x5e704a(0x1d0)]()))return String(_0x41de54);const _0x3b6e03=[_0x2bdd99[_0x5e704a(0x1dd)](),String(_0x2bdd99[_0x5e704a(0x1ce)]()+0x1)[_0x5e704a(0x1da)](0x2,'0'),String(_0x2bdd99['getDate']())[_0x5e704a(0x1da)](0x2,'0')][_0x5e704a(0x1df)]('-'),_0x4830b0=[String(_0x2bdd99[_0x5e704a(0x1e6)]())[_0x5e704a(0x1da)](0x2,'0'),String(_0x2bdd99[_0x5e704a(0x1e7)]())[_0x5e704a(0x1da)](0x2,'0'),String(_0x2bdd99[_0x5e704a(0x1cf)]())[_0x5e704a(0x1da)](0x2,'0')][_0x5e704a(0x1df)](':');return _0x3b6e03+'\x20'+_0x4830b0;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a185_0x17754c=a185_0x23b8;(function(_0x2ba099,_0x532eee){const _0x5e0e16=a185_0x23b8,_0x15a57c=_0x2ba099();while(!![]){try{const _0x1ec716=parseInt(_0x5e0e16(0x1e0))/0x1*(-parseInt(_0x5e0e16(0x1d1))/0x2)+parseInt(_0x5e0e16(0x1d0))/0x3+-parseInt(_0x5e0e16(0x1cd))/0x4*(parseInt(_0x5e0e16(0x1e2))/0x5)+-parseInt(_0x5e0e16(0x1db))/0x6*(parseInt(_0x5e0e16(0x1dd))/0x7)+parseInt(_0x5e0e16(0x1d9))/0x8*(-parseInt(_0x5e0e16(0x1df))/0x9)+-parseInt(_0x5e0e16(0x1d8))/0xa+parseInt(_0x5e0e16(0x1dc))/0xb;if(_0x1ec716===_0x532eee)break;else _0x15a57c['push'](_0x15a57c['shift']());}catch(_0x1ed132){_0x15a57c['push'](_0x15a57c['shift']());}}}(a185_0x5ca2,0xced63));import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl}from'./shared.js';function a185_0x23b8(_0xe5fe6b,_0x283d0e){_0xe5fe6b=_0xe5fe6b-0x1cd;const _0x5ca23c=a185_0x5ca2();let _0x23b855=_0x5ca23c[_0xe5fe6b];return _0x23b855;}export const pageCustomList={'service':a185_0x17754c(0x1cf),'command':'custom-list','description':'List\x20Custom\x20Pages\x20in\x20the\x20current\x20app','risk':a185_0x17754c(0x1ce),'defaultOutputFormat':'compress','structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x1aa409){const _0x392c6d=a185_0x17754c,_0x1f9b05=(await fetchMenuSnapshot(_0x1aa409[_0x392c6d(0x1d5)],_0x1aa409['cookie']))['menus']['flatMap'](_0x3660fa=>{const _0x106fd7=_0x392c6d;if(_0x3660fa[_0x106fd7(0x1d4)]!=='react'||_0x3660fa['pageId']==null)return[];const _0x428752=buildCustomPageDevelopmentUrl(_0x1aa409[_0x106fd7(0x1d5)],_0x3660fa[_0x106fd7(0x1d6)]),_0x2a3a4c=buildCustomPageEditUrl(_0x1aa409[_0x106fd7(0x1d5)],_0x3660fa[_0x106fd7(0x1d7)]);return[{'pageId':_0x3660fa[_0x106fd7(0x1d7)],'label':_0x3660fa[_0x106fd7(0x1de)],..._0x428752?{'pageUrl':_0x428752}:{},..._0x2a3a4c?{'editPageUrl':_0x2a3a4c}:{}}];});return{'ok':!![],'data':{'pages':_0x1f9b05},'message':_0x1f9b05[_0x392c6d(0x1d2)]===0x0?_0x392c6d(0x1e1):_0x392c6d(0x1d3)+_0x1f9b05['length']+_0x392c6d(0x1da)};}};function a185_0x5ca2(){const _0x19589e=['63700KDtdUB','read','page','5010399fJLNIM','4AjVGBD','length','Found\x20','type','appCode','path','pageId','7677910VygtPE','1681232kaqtqu','\x20Custom\x20Page(s).','2010tsewHk','20715266rKYZEK','6706kWwPDk','label','9TXNqjJ','42743DcLIkE','No\x20Custom\x20Pages\x20found.','415gJjcew'];a185_0x5ca2=function(){return _0x19589e;};return a185_0x5ca2();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a186_0x6e1bd6=a186_0x2e40;function a186_0x766c(){const _0x265adf=['2729988dTWEOg','appCode','121WxrWCW','status','trim','FORMAL','string','unknown','14aIvSva','number','148270GyqBZg','1113354jBmrjQ','Custom\x20Page\x20publish\x20did\x20not\x20return\x20the\x20expected\x20page\x20ID.','remark','Published\x20Custom\x20Page\x20','2086860Mcjlof','531820neyRCx','apiError','1368490gYdtmS','Optional\x20publish\x20remark','isInteger','84vNFMtU','Custom\x20Page\x20publish\x20did\x20not\x20reach\x20published\x20status:\x20','Custom\x20Page\x20ID','2EoaXaY','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20published\x20page\x20could\x20not\x20be\x20generated.','custom-publish','write','pageId','compress','pageCode','POST','2057384rCqYjF','runtimePageUrl','page.custom-publish','warnings'];a186_0x766c=function(){return _0x265adf;};return a186_0x766c();}(function(_0x2acee7,_0x44a7d9){const _0x22f0a6=a186_0x2e40,_0x13a45c=_0x2acee7();while(!![]){try{const _0x208c2c=parseInt(_0x22f0a6(0xa1))/0x1*(-parseInt(_0x22f0a6(0xa9))/0x2)+-parseInt(_0x22f0a6(0xa0))/0x3+-parseInt(_0x22f0a6(0xb5))/0x4+-parseInt(_0x22f0a6(0x9b))/0x5*(-parseInt(_0x22f0a6(0xa6))/0x6)+parseInt(_0x22f0a6(0xbd))/0x7*(parseInt(_0x22f0a6(0xb1))/0x8)+-parseInt(_0x22f0a6(0x9c))/0x9+parseInt(_0x22f0a6(0xa3))/0xa*(parseInt(_0x22f0a6(0xb7))/0xb);if(_0x208c2c===_0x44a7d9)break;else _0x13a45c['push'](_0x13a45c['shift']());}catch(_0x4a80c6){_0x13a45c['push'](_0x13a45c['shift']());}}}(a186_0x766c,0x61f2e));import{getCustomPageSource,publishCustomPage}from'../../../core/api-client.js';function a186_0x2e40(_0x4e6b6b,_0xf07d0a){_0x4e6b6b=_0x4e6b6b-0x9b;const _0x766ce9=a186_0x766c();let _0x2e407d=_0x766ce9[_0x4e6b6b];return _0x2e407d;}import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomPublish={'service':'page','command':a186_0x6e1bd6(0xab),'description':'Publish\x20the\x20latest\x20saved\x20content\x20of\x20a\x20Custom\x20Page','risk':a186_0x6e1bd6(0xac),'defaultOutputFormat':a186_0x6e1bd6(0xae),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a186_0x6e1bd6(0xbe),'required':!![],'description':a186_0x6e1bd6(0xa8)},{'name':a186_0x6e1bd6(0x9e),'type':a186_0x6e1bd6(0xbb),'description':a186_0x6e1bd6(0xa4)}],async 'validate'(_0xc58c1){readCustomPageId(_0xc58c1);},async 'dryRun'(_0x4a44bc){const _0x230952=a186_0x6e1bd6,_0x5e930a=readInput(_0x4a44bc);return{'method':_0x230952(0xb0),'url':'/smartapi/webcode/file/publish','body':{'id':_0x5e930a['pageId'],..._0x5e930a[_0x230952(0x9e)]?{'remark':_0x5e930a[_0x230952(0x9e)]}:{}},'description':'Would\x20publish\x20Custom\x20Page\x20'+_0x5e930a['pageId']+'.'};},async 'execute'(_0x4ef0c5){const _0x4076b7=a186_0x6e1bd6,_0x9e36da=readInput(_0x4ef0c5);await getCustomPageSource(_0x9e36da['pageId']);const _0x155729=await publishCustomPage(_0x9e36da);if(!Number[_0x4076b7(0xa5)](_0x155729)||_0x155729!==_0x9e36da[_0x4076b7(0xad)])throw CliErrors[_0x4076b7(0xa2)](_0x4076b7(0x9d));const _0x2dcc6e=await getCustomPageSource(_0x9e36da[_0x4076b7(0xad)]);if(_0x2dcc6e[_0x4076b7(0xb8)]!==_0x4076b7(0xba))throw CliErrors['apiError'](_0x4076b7(0xa7)+(_0x2dcc6e[_0x4076b7(0xb8)]??_0x4076b7(0xbc))+'.');const _0xb15114=_0x2dcc6e[_0x4076b7(0xb6)]?.['trim'](),_0xb1ce1c=buildCustomPageEditUrl(_0xb15114,_0x9e36da[_0x4076b7(0xad)]),_0x476350=await resolveCustomPageDevelopmentUrl(_0xb15114,_0x9e36da['pageId'],_0x4ef0c5['cookie']),_0x3fc5d0=buildMutationData(_0x9e36da,!![],_0x476350,_0xb1ce1c);_0xb15114&&!_0x476350&&_0x3fc5d0['warnings']['push']('Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.');const _0x1ee79b=buildCustomPageRuntimeUrl(_0x2dcc6e[_0x4076b7(0xb6)],_0x2dcc6e[_0x4076b7(0xaf)]);return _0x1ee79b?_0x3fc5d0[_0x4076b7(0xb2)]=_0x1ee79b:_0x3fc5d0[_0x4076b7(0xb4)]['push'](_0x4076b7(0xaa)),{'ok':!![],'data':_0x3fc5d0,'message':_0x4076b7(0x9f)+_0x9e36da[_0x4076b7(0xad)]+'.'};}};function readInput(_0x425fe8){const _0x106c5c=a186_0x6e1bd6,_0x3e1a5f=readCustomPageId(_0x425fe8),_0x202369=_0x425fe8['str'](_0x106c5c(0x9e))[_0x106c5c(0xb9)]();return{'pageId':_0x3e1a5f,..._0x202369?{'remark':_0x202369}:{}};}function buildMutationData(_0x25f6f2,_0x29f6dd=![],_0x167768,_0x592266){const _0x56c1f9=a186_0x6e1bd6;return{'operation':_0x56c1f9(0xb3),'selector':{'pageId':_0x25f6f2['pageId']},'before':null,'after':{'pageId':_0x25f6f2[_0x56c1f9(0xad)],'status':_0x56c1f9(0xba)},'dryRun':!_0x29f6dd,'request':_0x25f6f2,..._0x167768?{'pageUrl':_0x167768}:{},..._0x592266?{'editPageUrl':_0x592266}:{},'warnings':[]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a187_0x5c4075=a187_0x1cce;(function(_0x149507,_0x4a9cd0){const _0x2bf634=a187_0x1cce,_0x1ebdcd=_0x149507();while(!![]){try{const _0x5e6076=parseInt(_0x2bf634(0x79))/0x1+parseInt(_0x2bf634(0x8d))/0x2+-parseInt(_0x2bf634(0x7d))/0x3*(parseInt(_0x2bf634(0x89))/0x4)+parseInt(_0x2bf634(0x7a))/0x5*(-parseInt(_0x2bf634(0x77))/0x6)+parseInt(_0x2bf634(0x78))/0x7+parseInt(_0x2bf634(0x7f))/0x8*(parseInt(_0x2bf634(0x85))/0x9)+-parseInt(_0x2bf634(0x7b))/0xa*(-parseInt(_0x2bf634(0x86))/0xb);if(_0x5e6076===_0x4a9cd0)break;else _0x1ebdcd['push'](_0x1ebdcd['shift']());}catch(_0x42d1d7){_0x1ebdcd['push'](_0x1ebdcd['shift']());}}}(a187_0x5447,0xf288f));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';export const CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL={...APPCODE_FLAG_OPTIONAL,'description':a187_0x5c4075(0x87)};function trimOptional(_0x3e1e13){const _0x19eee0=a187_0x5c4075;return _0x3e1e13?.[_0x19eee0(0x81)]()||undefined;}export function buildCustomPageRuntimeUrl(_0x402836,_0x52ff1d){const _0x10e0e2=trimOptional(_0x402836),_0x479a6f=trimOptional(_0x52ff1d);if(!_0x10e0e2||!_0x479a6f)return undefined;return getPublishedAppDomain(_0x10e0e2)+'/'+encodeURIComponent(_0x479a6f);}export function buildCustomPageDevelopmentUrl(_0x308b06,_0x2a1697){const _0x810c38=a187_0x5c4075,_0x534e32=trimOptional(_0x308b06),_0x46e093=trimOptional(_0x2a1697);if(!_0x534e32||!_0x46e093)return undefined;return getAppBaseUrl(_0x534e32)+_0x810c38(0x76)+encodeURIComponent(_0x46e093);}function a187_0x5447(){const _0x5cad60=['12302163Mztgxq','22CfHNfv','Optional\x20app\x20code\x20resolved\x20from\x20page\x20ID\x20when\x20omitted','message','8496MrUSTK','menus','/ide/','map','2560654rugsYj','path','join','validation','type','/pages/','4111686CFCEeS','900466tBemID','18878XuENNc','5tWbdBV','2342290PLwWbJ','react','2238YxDykU','Invalid\x20Custom\x20Page\x20content:\x20','8DlAyoB','num','trim','file','pageId','--id\x20must\x20be\x20a\x20positive\x20integer.'];a187_0x5447=function(){return _0x5cad60;};return a187_0x5447();}function a187_0x1cce(_0x31cc15,_0x40e2d2){_0x31cc15=_0x31cc15-0x73;const _0x5447a9=a187_0x5447();let _0x1ccea0=_0x5447a9[_0x31cc15];return _0x1ccea0;}export async function resolveCustomPageDevelopmentUrl(_0x5160d2,_0x184127,_0x5639a0){const _0x47ec1f=a187_0x5c4075,_0x1380bb=trimOptional(_0x5160d2);if(!_0x1380bb)return undefined;try{const _0x1a6bb9=(await fetchMenuSnapshot(_0x1380bb,_0x5639a0))[_0x47ec1f(0x8a)]['find'](_0x1a4249=>_0x1a4249[_0x47ec1f(0x75)]===_0x47ec1f(0x7c)&&_0x1a4249[_0x47ec1f(0x83)]===_0x184127);return buildCustomPageDevelopmentUrl(_0x1380bb,_0x1a6bb9?.[_0x47ec1f(0x8e)]);}catch{return undefined;}}export function buildCustomPageEditUrl(_0x1820ed,_0x8554b3){const _0x178d6b=a187_0x5c4075,_0x4a6d39=trimOptional(_0x1820ed);if(!_0x4a6d39)return;const _0x45f79e=trimOptional(String(_0x8554b3??''));if(!_0x45f79e)return;return getAppBaseUrl(_0x4a6d39)+_0x178d6b(0x8b)+encodeURIComponent(_0x45f79e);}export async function validateCustomPageContent(_0x4a68ff){const _0x21c5f0=a187_0x5c4075,_0x318bc9=await validateCustomPageSourceFiles(_0x4a68ff);if(_0x318bc9['length']>0x0)throw CliErrors[_0x21c5f0(0x74)](_0x21c5f0(0x7e)+_0x318bc9[_0x21c5f0(0x8c)](_0x374ef8=>_0x374ef8[_0x21c5f0(0x82)]+':\x20'+_0x374ef8[_0x21c5f0(0x88)])[_0x21c5f0(0x73)](';\x20'));}export function readCustomPageId(_0x52db0f){const _0xf221b4=a187_0x5c4075,_0x1d4fed=_0x52db0f[_0xf221b4(0x80)]('id');if(!Number['isInteger'](_0x1d4fed)||_0x1d4fed<=0x0)throw CliErrors[_0xf221b4(0x74)](_0xf221b4(0x84));return _0x1d4fed;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a188_0x10ef2e=a188_0x5b91;(function(_0x29397c,_0x23f1b6){const _0x81a819=a188_0x5b91,_0x228722=_0x29397c();while(!![]){try{const _0x559b90=parseInt(_0x81a819(0x134))/0x1*(parseInt(_0x81a819(0x130))/0x2)+-parseInt(_0x81a819(0x142))/0x3+parseInt(_0x81a819(0x137))/0x4*(parseInt(_0x81a819(0x133))/0x5)+-parseInt(_0x81a819(0x13e))/0x6+-parseInt(_0x81a819(0x135))/0x7*(parseInt(_0x81a819(0x13a))/0x8)+-parseInt(_0x81a819(0x143))/0x9*(parseInt(_0x81a819(0x13b))/0xa)+-parseInt(_0x81a819(0x132))/0xb*(-parseInt(_0x81a819(0x13c))/0xc);if(_0x559b90===_0x23f1b6)break;else _0x228722['push'](_0x228722['shift']());}catch(_0x519ba9){_0x228722['push'](_0x228722['shift']());}}}(a188_0x1960,0xe2d58));function a188_0x1960(){const _0x5f208e=['6811407Wghzmk','toLowerCase','.tsx','typescript','endsWith','find','trim','366jjQctG','entries','52929514dhCYpi','25dIpEgv','2803RvtmlP','2044KnPLyZ','Missing\x20React\x20source\x20file\x20with\x20extension\x20.jsx\x20or\x20.tsx','135188ZGMNmz','filter','.jsx','46504WJBvau','20yWbTRI','12eAlwfF','message','7607886scsXgk','babel','some','map','256719fFEXeW'];a188_0x1960=function(){return _0x5f208e;};return a188_0x1960();}import{format}from'prettier';const SOURCE_PARSERS={'.js':a188_0x10ef2e(0x13f),'.jsx':a188_0x10ef2e(0x13f),'.ts':'typescript','.tsx':a188_0x10ef2e(0x146)},CUSTOM_PAGE_EXTENSIONS=[a188_0x10ef2e(0x139),a188_0x10ef2e(0x145)];export async function validateCustomPageSourceFiles(_0x44b8e2){const _0x1e9434=a188_0x10ef2e,_0x6f2f04=Object[_0x1e9434(0x131)](_0x44b8e2)['filter'](([_0x182db7])=>getParser(_0x182db7));if(!_0x6f2f04[_0x1e9434(0x140)](([_0x3d0f9b])=>isReactSourceFile(_0x3d0f9b)))return[{'file':'page\x20files','message':_0x1e9434(0x136)}];const _0x531c92=await Promise['all'](_0x6f2f04[_0x1e9434(0x141)](async([_0x5361e5,_0x1d6611])=>{const _0x2d2b55=_0x1e9434;try{return await format(_0x1d6611,{'parser':getParser(_0x5361e5)}),undefined;}catch(_0x2dbbb0){return{'file':_0x5361e5,'message':_0x2dbbb0 instanceof Error?_0x2dbbb0[_0x2d2b55(0x13d)]:String(_0x2dbbb0)};}}));return _0x531c92[_0x1e9434(0x138)](_0x597af6=>_0x597af6!==undefined);}function getParser(_0x256a03){const _0x3a54a6=a188_0x10ef2e,_0x1e6a7c=_0x256a03['trim']()[_0x3a54a6(0x144)]();return Object[_0x3a54a6(0x131)](SOURCE_PARSERS)[_0x3a54a6(0x12e)](([_0x39a862])=>_0x1e6a7c[_0x3a54a6(0x12d)](_0x39a862))?.[0x1];}function a188_0x5b91(_0x5cb0f2,_0x4a9c5a){_0x5cb0f2=_0x5cb0f2-0x12d;const _0x1960dd=a188_0x1960();let _0x5b91f5=_0x1960dd[_0x5cb0f2];return _0x5b91f5;}function isReactSourceFile(_0x57e2aa){const _0xf1b17a=a188_0x10ef2e,_0x1c92d7=_0x57e2aa[_0xf1b17a(0x12f)]()['toLowerCase']();return CUSTOM_PAGE_EXTENSIONS[_0xf1b17a(0x140)](_0x24159a=>_0x1c92d7[_0xf1b17a(0x12d)](_0x24159a));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a189_0x56e889=a189_0x336a;(function(_0x47d187,_0x4bf42e){const _0x478e39=a189_0x336a,_0x536db5=_0x47d187();while(!![]){try{const _0x40db72=-parseInt(_0x478e39(0x122))/0x1*(parseInt(_0x478e39(0x121))/0x2)+-parseInt(_0x478e39(0x12f))/0x3*(parseInt(_0x478e39(0x132))/0x4)+-parseInt(_0x478e39(0x11f))/0x5+-parseInt(_0x478e39(0x12b))/0x6*(parseInt(_0x478e39(0x126))/0x7)+parseInt(_0x478e39(0x134))/0x8*(-parseInt(_0x478e39(0x12a))/0x9)+-parseInt(_0x478e39(0x142))/0xa*(parseInt(_0x478e39(0x13a))/0xb)+parseInt(_0x478e39(0x128))/0xc;if(_0x40db72===_0x4bf42e)break;else _0x536db5['push'](_0x536db5['shift']());}catch(_0x5e4ded){_0x536db5['push'](_0x536db5['shift']());}}}(a189_0x4479,0x54b05));import{getCustomPageSource,updateCustomPageContent}from'../../../core/api-client.js';function a189_0x4479(){const _0x1179d7=['Custom\x20Page\x20update\x20did\x20not\x20create\x20a\x20new\x20version.','Custom\x20Page\x20ID','appcode','511TKjMjW','page.custom-update','23853528YNoKIZ','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','141894WOBnau','9006IdRbGG','apiError','page-content','page\x20custom-update\x20no\x20longer\x20accepts\x20--page-content.','2649zptQHo','number','/smartapi/webcode/page/update/content','1400LFyBaL','Custom\x20Page\x20was\x20updated,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','216vwNnsA','pageId','cookie','trim','Would\x20save\x20all\x20files\x20of\x20Custom\x20Page\x20','isInteger','3454OePvhy','validation','appCode','Updated\x20Custom\x20Page\x20','page','pageContent','str','POST','3370xFttkQ','newVersion','2693620bHPbcK','Save\x20all\x20files\x20of\x20a\x20Custom\x20Page','304124FqVVyY','1dYSnJT'];a189_0x4479=function(){return _0x1179d7;};return a189_0x4479();}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';function a189_0x336a(_0x168b3d,_0x23ac5a){_0x168b3d=_0x168b3d-0x11f;const _0x4479f9=a189_0x4479();let _0x336ac5=_0x4479f9[_0x168b3d];return _0x336ac5;}export const pageCustomUpdate={'service':a189_0x56e889(0x13e),'command':'custom-update','description':a189_0x56e889(0x120),'risk':'write','defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'rejectedFlags':[{'name':a189_0x56e889(0x12d),'message':a189_0x56e889(0x12e),'hint':a189_0x56e889(0x129)}],'flags':[{'name':'id','type':a189_0x56e889(0x130),'required':!![],'description':a189_0x56e889(0x124)},{'name':'page-dir','type':'string','required':!![],'description':'Directory\x20containing\x20all\x20complete\x20page\x20files'},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1c51d6){readCustomPageId(_0x1c51d6),await readValidatedPageContent(_0x1c51d6);},async 'dryRun'(_0x326900){const _0x3b5a5a=a189_0x56e889,_0x170da8=await readInput(_0x326900);return{'method':_0x3b5a5a(0x141),'url':_0x3b5a5a(0x131),'body':{'id':_0x170da8['pageId'],'codeContent':_0x170da8[_0x3b5a5a(0x13f)]},'description':_0x3b5a5a(0x138)+_0x170da8[_0x3b5a5a(0x135)]+'.'};},async 'execute'(_0x2d346c){const _0x470f7e=a189_0x56e889,_0x36d32b=await readInput(_0x2d346c),_0xd3514b=await updateCustomPageContent({'pageId':_0x36d32b[_0x470f7e(0x135)],'pageContent':_0x36d32b[_0x470f7e(0x13f)]});if(!Number[_0x470f7e(0x139)](_0xd3514b[_0x470f7e(0x143)])||_0xd3514b[_0x470f7e(0x143)]<=0x0)throw CliErrors[_0x470f7e(0x12c)](_0x470f7e(0x123));const _0x58b0d6=buildCustomPageEditUrl(_0x36d32b[_0x470f7e(0x13c)],_0x36d32b[_0x470f7e(0x135)]),_0x53cfec=await resolveCustomPageDevelopmentUrl(_0x36d32b[_0x470f7e(0x13c)],_0x36d32b[_0x470f7e(0x135)],_0x2d346c[_0x470f7e(0x136)]);return{'ok':!![],'data':{'operation':_0x470f7e(0x127),'selector':{'appCode':_0x36d32b[_0x470f7e(0x13c)],'pageId':_0x36d32b[_0x470f7e(0x135)]},'before':null,'after':{'pageId':_0xd3514b[_0x470f7e(0x135)],'version':_0xd3514b[_0x470f7e(0x143)],'pageContent':_0x36d32b['pageContent']},'dryRun':![],'request':_0x36d32b,..._0x53cfec?{'pageUrl':_0x53cfec}:{},..._0x58b0d6?{'editPageUrl':_0x58b0d6}:{},'warnings':_0x53cfec?[]:[_0x470f7e(0x133)]},'message':_0x470f7e(0x13d)+_0x36d32b[_0x470f7e(0x135)]+'.'};}};async function readInput(_0x235d96){const _0x14e66b=a189_0x56e889,_0x2f5040=readCustomPageId(_0x235d96),_0x5063c3=_0x235d96['str'](_0x14e66b(0x125))[_0x14e66b(0x137)]()||(await getCustomPageSource(_0x2f5040))[_0x14e66b(0x13c)]?.[_0x14e66b(0x137)]();if(!_0x5063c3)throw CliErrors[_0x14e66b(0x13b)]('Cannot\x20determine\x20the\x20appCode\x20for\x20Custom\x20Page\x20'+_0x2f5040+'.');return{'appCode':_0x5063c3,'pageId':_0x2f5040,'pageContent':await readValidatedPageContent(_0x235d96)};}async function readValidatedPageContent(_0x199755){const _0x10a233=a189_0x56e889,_0x3d3477=await readCustomPageDirectory(_0x199755[_0x10a233(0x140)]('page-dir'));return await validateCustomPageContent(_0x3d3477),_0x3d3477;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a190_0x5e0fea=a190_0x1adb;(function(_0x55c9f3,_0x1b3f26){const _0x4817c0=a190_0x1adb,_0x17ead1=_0x55c9f3();while(!![]){try{const _0xb82c91=-parseInt(_0x4817c0(0x178))/0x1*(parseInt(_0x4817c0(0x167))/0x2)+parseInt(_0x4817c0(0x171))/0x3*(parseInt(_0x4817c0(0x175))/0x4)+-parseInt(_0x4817c0(0x168))/0x5*(parseInt(_0x4817c0(0x163))/0x6)+-parseInt(_0x4817c0(0x160))/0x7+-parseInt(_0x4817c0(0x179))/0x8*(-parseInt(_0x4817c0(0x17b))/0x9)+parseInt(_0x4817c0(0x176))/0xa+-parseInt(_0x4817c0(0x16d))/0xb*(-parseInt(_0x4817c0(0x16c))/0xc);if(_0xb82c91===_0x1b3f26)break;else _0x17ead1['push'](_0x17ead1['shift']());}catch(_0x11e78c){_0x17ead1['push'](_0x17ead1['shift']());}}}(a190_0x1116,0x4af04));function a190_0x1adb(_0x1f6d79,_0x32b416){_0x1f6d79=_0x1f6d79-0x15f;const _0x111639=a190_0x1116();let _0x1adb55=_0x111639[_0x1f6d79];return _0x1adb55;}import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessDataListPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';export const pageDataListStatus={'service':a190_0x5e0fea(0x16a),'command':a190_0x5e0fea(0x17a),'description':'Query\x20Data\x20List\x20Page\x20facts\x20for\x20a\x20dataset','risk':a190_0x5e0fea(0x16f),'defaultOutputFormat':a190_0x5e0fea(0x164),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a190_0x5e0fea(0x172),'type':a190_0x5e0fea(0x16b),'description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'}],async 'validate'(_0xf438f0){validateDatasetSelector(_0xf438f0);},async 'dryRun'(_0x4adae8){const _0xeb5b10=a190_0x5e0fea,_0x268d5c=await loadDatasetDetailForPage(_0x4adae8);return{'method':'GET','url':_0xeb5b10(0x16e)+_0x268d5c[_0xeb5b10(0x177)]+_0xeb5b10(0x166)+encodeURIComponent(_0x4adae8[_0xeb5b10(0x17c)]),'description':serializeDryRunDescription({'dataset':{'id':_0x268d5c['id'],'code':_0x268d5c['code'],'name':_0x268d5c[_0xeb5b10(0x161)]},'action':_0xeb5b10(0x169)})};},async 'execute'(_0x407eb8){const _0x479128=a190_0x5e0fea,_0x29405b=await loadDatasetDetailForPage(_0x407eb8),_0x248760=await loadDataListPageStatusForGenerate(_0x407eb8,_0x29405b['code']),_0x748c54=getUndeletedRelatedPages(_0x29405b),_0x3069d8=assessDataListPageState(_0x29405b[_0x479128(0x177)],_0x248760,{'fallbackUndeletedPages':_0x748c54});return{'ok':!![],'data':{'datasetCode':_0x29405b[_0x479128(0x177)],'precheckSource':_0x248760?.['source']??_0x479128(0x165),'status':_0x3069d8[_0x479128(0x173)],'manualResolutionRequired':_0x3069d8[_0x479128(0x174)],'nextAction':_0x3069d8[_0x479128(0x15f)],'dataListPageStatus':_0x248760,'relatedPages':{'total':_0x29405b[_0x479128(0x170)][_0x479128(0x162)],'undeletedCount':_0x748c54['length']}}};}};function a190_0x1116(){const _0x51bb74=['/smartapi/lovrabet/dataset/','read','relatedPages','31812AtaUTk','alias','status','manualResolutionRequired','196vsxglC','583940zVccJo','code','19289bpmJCT','536dRPBOO','data-list-status','65889LbFSon','appCode','nextAction','25844cgqHhC','name','length','42shQbnn','compress','related-pages-fallback','/standard-page-status?appCode=','28ZQuLoq','433765nCFgAi','query-data-list-status','page','string','360pYkevj','43802BLEUuL'];a190_0x1116=function(){return _0x51bb74;};return a190_0x1116();}
|