@lovrabet/rabetbase-cli 2.5.3-beta.2 → 2.5.3-beta.4
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.d.ts +5 -3
- 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 +19 -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 +6 -1
- package/skills/rabetbase/SKILL.md +16 -10
- package/skills/rabetbase/guides/backend-function.md +5 -1
- package/skills/rabetbase/guides/bff-creation-workflow.md +3 -1
- package/skills/rabetbase/guides/cross-database-bff.md +70 -0
- package/skills/rabetbase/guides/data-api-guidelines.md +35 -33
- package/skills/rabetbase/guides/sdk-client-generation.md +112 -61
- package/skills/rabetbase/guides/sql-creation-workflow.md +2 -0
- 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 +64 -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 +5 -3
- package/templates/README.md +46 -6
- 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
|
-
const
|
|
1
|
+
const a179_0x329bad=a179_0x2895;(function(_0xe63cbd,_0x40546e){const _0x216ade=a179_0x2895,_0x416077=_0xe63cbd();while(!![]){try{const _0x25f682=parseInt(_0x216ade(0xa5))/0x1*(-parseInt(_0x216ade(0xbc))/0x2)+parseInt(_0x216ade(0xb5))/0x3+parseInt(_0x216ade(0xaa))/0x4+-parseInt(_0x216ade(0xbe))/0x5*(-parseInt(_0x216ade(0xb6))/0x6)+parseInt(_0x216ade(0xc0))/0x7+parseInt(_0x216ade(0xc5))/0x8+parseInt(_0x216ade(0xa0))/0x9*(-parseInt(_0x216ade(0xc1))/0xa);if(_0x25f682===_0x40546e)break;else _0x416077['push'](_0x416077['shift']());}catch(_0x8573f9){_0x416077['push'](_0x416077['shift']());}}}(a179_0x24fd,0xde44f));import{asDryRunResult}from'../../commands/common/dry-run.js';function a179_0x2895(_0x20b22f,_0x5452ac){_0x20b22f=_0x20b22f-0xa0;const _0x24fdd9=a179_0x24fd();let _0x289531=_0x24fdd9[_0x20b22f];return _0x289531;}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_0x24fd(){const _0x413494=['406487yVHgKj','planned','notification_config_update_verification_failed',';\x20do\x20not\x20resubmit\x20automatically.','allMatch','2044392uUHnBO','Notification\x20config\x20','mutation','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.',';\x20no\x20automatic\x20retry\x20was\x20attempted.','high-risk-write','payload','channelType','notification_config_update_outcome_unknown','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','Updated\x20notification\x20config\x20','3468111HCkbCy','3310134WPXhoX','config-update','verified','POST','provesChange','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','2rENkWy','appCode','5HgKVqQ','update','5278770CPVPOY','20dSMyNh','before','patch','verifiedFields','2195008FNsxvw','8686836PJGRtK','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','\x20via\x20','notification_config_update_verification_unavailable','Inspect\x20with\x20--id\x20'];a179_0x24fd=function(){return _0x413494;};return a179_0x24fd();}async function prepareUpdate(_0x1a2d99){const _0x1cc24f=a179_0x2895,_0x5300a2=readNotificationId(_0x1a2d99),_0x10a5dd=await readNotificationDocument(_0x1a2d99,_0x1cc24f(0xbf)),_0x15c48c=await requireExactNotificationConfig(_0x1a2d99[_0x1cc24f(0xbd)],_0x5300a2,_0x1cc24f(0xbf));return{'id':_0x5300a2,'patch':_0x10a5dd,'before':_0x15c48c,'payload':mergeUpdateInput(_0x15c48c,_0x10a5dd),'planned':plannedUpdateProjection(_0x15c48c,_0x10a5dd)};}export const notificationConfigUpdate={'service':'notification','command':a179_0x329bad(0xb7),'description':a179_0x329bad(0xb3),'risk':a179_0x329bad(0xaf),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0xa1e3fc){readNotificationId(_0xa1e3fc),assertSingleNotificationSource(_0xa1e3fc),requireNotificationExplicitYes(_0xa1e3fc);},async 'dryRun'(_0x32d2ab){const _0x7a63cc=a179_0x329bad,_0x3d47fe=await prepareUpdate(_0x32d2ab),_0x4db27a=notificationLookupCommand(_0x32d2ab[_0x7a63cc(0xbd)],_0x3d47fe[_0x7a63cc(0xc2)]['channelType']);return asDryRunResult({'operation':_0x7a63cc(0xbf),'selector':notificationSelector(_0x3d47fe[_0x7a63cc(0xc2)]),'before':projectNotificationConfig(_0x3d47fe[_0x7a63cc(0xc2)]),'after':_0x3d47fe[_0x7a63cc(0xa6)],'dryRun':!![],'backend':{'method':_0x7a63cc(0xb9),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x7a63cc(0xa6),'lookupCommand':_0x4db27a}},{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0x4c8c6c){const _0x36bf17=a179_0x329bad;requireNotificationExplicitYes(_0x4c8c6c);const _0x251d67=await prepareUpdate(_0x4c8c6c),_0x1d4c5c=notificationLookupCommand(_0x4c8c6c[_0x36bf17(0xbd)],_0x251d67['before'][_0x36bf17(0xb1)]);let _0x392953=![];try{await updateNotificationChannelConfig(_0x251d67[_0x36bf17(0xb0)]);}catch(_0x132c1e){if(!isPlatformTransportFailure(_0x132c1e))throw safeApiFailure('update',_0x36bf17(0xac),'Inspect\x20ID\x20'+_0x251d67['id']+'\x20with\x20'+_0x1d4c5c+_0x36bf17(0xae));_0x392953=!![];}let _0x562b4e;try{const _0x149d3b=await getNotificationChannelConfig(_0x251d67['id'],_0x4c8c6c[_0x36bf17(0xbd)]);_0x562b4e=normalizeExactNotificationConfig(_0x149d3b,_0x251d67['id'],_0x4c8c6c['appCode']);}catch{throw notificationError(_0x392953?_0x36bf17(0xb2):_0x36bf17(0xa3),_0x36bf17(0xab)+_0x251d67['id']+_0x36bf17(0xbb),_0x36bf17(0xa4)+_0x251d67['id']+_0x36bf17(0xa2)+_0x1d4c5c+_0x36bf17(0xa8));}const _0x57587e=requestedSafeFieldsMatch(_0x251d67[_0x36bf17(0xc2)],_0x562b4e,_0x251d67[_0x36bf17(0xc3)]);if(!_0x57587e[_0x36bf17(0xa9)]||_0x392953&&!_0x57587e[_0x36bf17(0xba)])throw notificationError(_0x392953?'notification_config_update_outcome_unknown':_0x36bf17(0xa7),'Notification\x20config\x20'+_0x251d67['id']+_0x36bf17(0xad),_0x36bf17(0xa4)+_0x251d67['id']+_0x36bf17(0xa2)+_0x1d4c5c+';\x20do\x20not\x20resubmit\x20automatically.');const _0x186518=_0x392953?[_0x36bf17(0xa1)]:[];return{'ok':!![],'data':{'operation':_0x36bf17(0xbf),'selector':notificationSelector(_0x562b4e),'before':projectNotificationConfig(_0x251d67[_0x36bf17(0xc2)]),'after':projectNotificationConfig(_0x562b4e),'dryRun':![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':_0x186518,'verification':{'status':_0x36bf17(0xb8),'recoveredAfterUnknownResponse':_0x392953,'verifiedFields':_0x57587e[_0x36bf17(0xc4)],'lookupCommand':_0x1d4c5c}},'message':_0x36bf17(0xb4)+_0x562b4e['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x51ad2e,_0x3da7ce){const _0x4bba4c=a180_0xe5d4,_0x8dc462=_0x51ad2e();while(!![]){try{const _0x269be4=parseInt(_0x4bba4c(0x187))/0x1+parseInt(_0x4bba4c(0x189))/0x2+-parseInt(_0x4bba4c(0x18b))/0x3+parseInt(_0x4bba4c(0x188))/0x4+-parseInt(_0x4bba4c(0x18c))/0x5+parseInt(_0x4bba4c(0x185))/0x6+-parseInt(_0x4bba4c(0x186))/0x7*(-parseInt(_0x4bba4c(0x18a))/0x8);if(_0x269be4===_0x3da7ce)break;else _0x8dc462['push'](_0x8dc462['shift']());}catch(_0x1a3743){_0x8dc462['push'](_0x8dc462['shift']());}}}(a180_0x5c09,0x66751));import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';function a180_0xe5d4(_0x5da419,_0x2d2430){_0x5da419=_0x5da419-0x185;const _0x5c0911=a180_0x5c09();let _0xe5d47f=_0x5c0911[_0x5da419];return _0xe5d47f;}function a180_0x5c09(){const _0x11f3aa=['74616CnlAdb','72GSwaIC','1922490kPVPwV','3316830WvZtUX','1877256iilncU','394751blTNeo','311421DODoul','2218876OZrrmN'];a180_0x5c09=function(){return _0x11f3aa;};return a180_0x5c09();}import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';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_0xb8cad6=a181_0x517e;(function(_0x201e6c,_0x13f5a5){const _0x48b80d=a181_0x517e,_0x2d306a=_0x201e6c();while(!![]){try{const _0x166fb4=parseInt(_0x48b80d(0xc6))/0x1+parseInt(_0x48b80d(0xb3))/0x2+-parseInt(_0x48b80d(0x98))/0x3+parseInt(_0x48b80d(0x9f))/0x4*(-parseInt(_0x48b80d(0xe6))/0x5)+-parseInt(_0x48b80d(0xdb))/0x6+parseInt(_0x48b80d(0xd7))/0x7+parseInt(_0x48b80d(0xa5))/0x8*(-parseInt(_0x48b80d(0x9c))/0x9);if(_0x166fb4===_0x13f5a5)break;else _0x2d306a['push'](_0x2d306a['shift']());}catch(_0x1eb6e7){_0x2d306a['push'](_0x2d306a['shift']());}}}(a181_0x4634,0xed89e));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_0xb8cad6(0x104),a181_0xb8cad6(0xb4),a181_0xb8cad6(0xc0),a181_0xb8cad6(0xe4),a181_0xb8cad6(0xff)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a181_0xb8cad6(0xf6),a181_0xb8cad6(0xaa),'endpointUrl',a181_0xb8cad6(0xe7),a181_0xb8cad6(0xd3),a181_0xb8cad6(0xaf),a181_0xb8cad6(0x101)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a181_0xb8cad6(0xec),a181_0xb8cad6(0x112),'channelCode']),EMAIL_RECIPIENT_FIELDS=new Set([a181_0xb8cad6(0xdd),a181_0xb8cad6(0xcf),'ccList',a181_0xb8cad6(0xd2),a181_0xb8cad6(0xf5),a181_0xb8cad6(0xc4),a181_0xb8cad6(0x111),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a181_0xb8cad6(0xc7),'type':a181_0xb8cad6(0xd1),'required':![],'description':a181_0xb8cad6(0xde)},{'name':a181_0xb8cad6(0xcc),'type':'boolean','required':![],'default':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin'},{'name':a181_0xb8cad6(0xbb),'type':a181_0xb8cad6(0xd1),'required':![],'description':a181_0xb8cad6(0xb8)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a181_0xb8cad6(0xf8),'required':!![],'description':'Application-level\x20notification\x20config\x20ID'};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x1ddafa,_0x4af5b9,_0x482086){return new CliError(_0x1ddafa,0x1,_0x4af5b9,_0x482086);}export function readNotificationId(_0x1726e8){const _0xdd8e04=a181_0xb8cad6,_0x43b4bd=_0x1726e8[_0xdd8e04(0xcb)]('id');if(!Number[_0xdd8e04(0xb0)](_0x43b4bd)||_0x43b4bd<=0x0)throw notificationError(_0xdd8e04(0xbe),'--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.');return _0x43b4bd;}export function requireNotificationExplicitYes(_0x95a550){const _0x1c313e=a181_0xb8cad6;if(_0x95a550[_0x1c313e(0x10b)](_0x1c313e(0xfb))||_0x95a550[_0x1c313e(0x10b)](_0x1c313e(0x9d)))return;throw notificationError(_0x1c313e(0x10a),_0x1c313e(0x103),_0x1c313e(0xc1));}export function readNotificationChannelType(_0x1ff862,_0x48b510=a181_0xb8cad6(0xc2),_0x265095=a181_0xb8cad6(0x104)){const _0x150c91=a181_0xb8cad6,_0x9e9811=_0x1ff862[_0x150c91(0xac)](_0x48b510)['trim']()||_0x265095;if(!NOTIFICATION_CHANNEL_TYPES[_0x150c91(0xfa)](_0x9e9811))throw CliErrors[_0x150c91(0x115)](_0x150c91(0xbd)+_0x48b510+':\x20'+_0x9e9811,_0x150c91(0xa0)+NOTIFICATION_CHANNEL_TYPES[_0x150c91(0xf0)](',\x20')+'.');return _0x9e9811;}export function assertSingleNotificationSource(_0x45c4ff){const _0xfc5987=a181_0xb8cad6,_0x4ea762=[],_0x32a730=_0x45c4ff[_0xfc5987(0xac)]('file')['trim']();if(_0x32a730)_0x4ea762[_0xfc5987(0xd4)]({'kind':_0xfc5987(0xc7),'path':_0x32a730});if(_0x45c4ff[_0xfc5987(0x10b)](_0xfc5987(0xcc)))_0x4ea762[_0xfc5987(0xd4)]({'kind':_0xfc5987(0xcc)});const _0x5b38de=_0x45c4ff[_0xfc5987(0xac)](_0xfc5987(0xbb))[_0xfc5987(0xb5)]();if(_0x5b38de)_0x4ea762[_0xfc5987(0xd4)]({'kind':'env','name':_0x5b38de});if(_0x4ea762[_0xfc5987(0xcd)]===0x0)throw CliErrors[_0xfc5987(0x115)](_0xfc5987(0x95),_0xfc5987(0x100));if(_0x4ea762[_0xfc5987(0xcd)]>0x1)throw CliErrors[_0xfc5987(0x115)](_0xfc5987(0xa8),_0xfc5987(0x100));return _0x4ea762[0x0];}export async function readNotificationDocument(_0x42ab7d,_0xe0b3c8){const _0x364ecf=a181_0xb8cad6,_0x6cb432=assertSingleNotificationSource(_0x42ab7d),_0x566117=_0x6cb432[_0x364ecf(0xc9)]==='file'?'file\x20'+_0x6cb432['path']:_0x6cb432[_0x364ecf(0xc9)]===_0x364ecf(0xee)?_0x364ecf(0xd8)+_0x6cb432[_0x364ecf(0xfd)]:'stdin';let _0x16da46;try{if(_0x6cb432[_0x364ecf(0xc9)]===_0x364ecf(0xc7))_0x16da46=await readFile(_0x6cb432['path'],_0x364ecf(0xca));else{if(_0x6cb432[_0x364ecf(0xc9)]===_0x364ecf(0xee)){if(!(_0x6cb432[_0x364ecf(0xfd)]in process.env))throw notificationError('notification_config_source_unavailable',_0x364ecf(0xd6)+_0x6cb432[_0x364ecf(0xfd)]);_0x16da46=process.env[_0x6cb432.name]??'';}else _0x16da46=await readStdin();}}catch(_0x298898){if(_0x298898 instanceof CliError)throw _0x298898;throw notificationError('notification_config_source_unavailable',_0x364ecf(0xeb)+_0x566117+'.');}let _0xa99652;try{_0xa99652=JSON[_0x364ecf(0x114)](_0x16da46);}catch{throw notificationError(_0x364ecf(0xf2),_0x364ecf(0xf4)+_0x566117+_0x364ecf(0x97),_0x364ecf(0xd9));}if(!isJsonObject(_0xa99652))throw notificationError('notification_config_json_invalid',_0x364ecf(0xf4)+_0x566117+_0x364ecf(0xb2));return validateNotificationDocument(_0xa99652,_0xe0b3c8);}export function projectNotificationListConfig(_0x5c4ccc,_0x3c5431){const _0x1c6d27=a181_0xb8cad6;return{'id':typeof _0x5c4ccc['id']===_0x1c6d27(0xf8)?_0x5c4ccc['id']:null,'configCode':requireResponseString(_0x5c4ccc[_0x1c6d27(0x112)],'configCode',_0x3c5431),'configName':requireResponseString(_0x5c4ccc[_0x1c6d27(0xf6)],_0x1c6d27(0xf6),_0x3c5431),'channelType':requireResponseString(_0x5c4ccc[_0x1c6d27(0xaa)],_0x1c6d27(0xaa),_0x3c5431),'description':normalizeNullableString(_0x5c4ccc['description']),'createTime':normalizeNullableString(_0x5c4ccc[_0x1c6d27(0xce)]),'updateTime':normalizeNullableString(_0x5c4ccc[_0x1c6d27(0x109)])};}export function normalizeExactNotificationConfig(_0x5b9446,_0x12a6f7,_0x2aeae2){const _0x16acb8=a181_0xb8cad6;if(!Number[_0x16acb8(0xb0)](_0x5b9446['id'])||_0x5b9446['id']!==_0x12a6f7)throw notificationError(_0x16acb8(0xb1),'Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20'+_0x12a6f7+'.');if(_0x5b9446[_0x16acb8(0xec)]!==_0x2aeae2)throw notificationError('notification_config_response_invalid',_0x16acb8(0xb7)+_0x12a6f7+'\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.');const _0x1b67a5=requireExactString(_0x5b9446[_0x16acb8(0xf6)],_0x16acb8(0xf6),_0x12a6f7),_0x56b24d=requireExactString(_0x5b9446[_0x16acb8(0x112)],_0x16acb8(0x112),_0x12a6f7),_0x4e6a63=requireExactString(_0x5b9446['channelType'],_0x16acb8(0xaa),_0x12a6f7);if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x4e6a63))throw notificationError(_0x16acb8(0xb1),_0x16acb8(0xb7)+_0x12a6f7+'\x20has\x20an\x20unsupported\x20channelType.');const _0x2bbca2=responseNullableString(_0x5b9446[_0x16acb8(0x105)],_0x16acb8(0x105),_0x12a6f7),_0x1fefca=responseNullableString(_0x5b9446[_0x16acb8(0xe7)],_0x16acb8(0xe7),_0x12a6f7),_0x403db5=responseNullableString(_0x5b9446[_0x16acb8(0xd3)],_0x16acb8(0xd3),_0x12a6f7),_0x132078=responseNullableTimeout(_0x5b9446[_0x16acb8(0xaf)],'connectTimeout',_0x12a6f7),_0x898bca=responseNullableTimeout(_0x5b9446[_0x16acb8(0x101)],'readTimeout',_0x12a6f7);return{'id':_0x12a6f7,'appCode':_0x2aeae2,'configCode':_0x56b24d,'configName':_0x1b67a5,'channelType':_0x4e6a63,'endpointUrl':redactSensitive(_0x2bbca2),'channelConfig':redactSensitive(_0x1fefca),'description':_0x403db5,'connectTimeout':_0x132078,'readTimeout':_0x898bca,'endpointUrlRaw':_0x2bbca2,'channelConfigRaw':_0x1fefca};}export async function requireExactNotificationConfig(_0x41c47e,_0x50dc87,_0x47499d){const _0x54f586=a181_0xb8cad6;let _0x8a615b;try{_0x8a615b=await getNotificationChannelConfig(_0x50dc87,_0x41c47e);}catch{throw safeApiFailure(_0x47499d,'preflight',_0x54f586(0xad)+_0x41c47e+_0x54f586(0x108));}return normalizeExactNotificationConfig(_0x8a615b,_0x50dc87,_0x41c47e);}export function projectNotificationConfig(_0x9fcf1c){const _0x4877bd=a181_0xb8cad6;return{'id':_0x9fcf1c['id']??null,'appCode':_0x9fcf1c['appCode'],'configCode':_0x9fcf1c[_0x4877bd(0x112)]??null,'configName':_0x9fcf1c['configName'],'channelType':_0x9fcf1c[_0x4877bd(0xaa)],'endpointUrl':redactSensitive(_0x9fcf1c['endpointUrl']),'channelConfig':redactSensitive(_0x9fcf1c[_0x4877bd(0xe7)]),'description':_0x9fcf1c[_0x4877bd(0xd3)]??null,'connectTimeout':_0x9fcf1c['connectTimeout']??null,'readTimeout':_0x9fcf1c[_0x4877bd(0x101)]??null};}export function notificationSelector(_0x3acc2b){const _0x2c8426=a181_0xb8cad6;return{'appCode':_0x3acc2b['appCode'],'id':_0x3acc2b['id'],'configCode':_0x3acc2b[_0x2c8426(0x112)],'configName':_0x3acc2b[_0x2c8426(0xf6)],'channelType':_0x3acc2b[_0x2c8426(0xaa)]};}export function createMutationInput(_0x58cdf4,_0x583660){const _0x21af37=a181_0xb8cad6;return{'appCode':_0x58cdf4,'configName':_0x583660[_0x21af37(0xf6)],'channelType':_0x583660[_0x21af37(0xaa)],...hasOwn(_0x583660,_0x21af37(0x105))?{'endpointUrl':_0x583660['endpointUrl']}:{},...hasOwn(_0x583660,_0x21af37(0xe7))?{'channelConfig':serializeChannelConfig(_0x583660[_0x21af37(0xe7)])}:{},...hasOwn(_0x583660,'description')?{'description':_0x583660[_0x21af37(0xd3)]}:{},...hasOwn(_0x583660,_0x21af37(0xaf))?{'connectTimeout':_0x583660[_0x21af37(0xaf)]}:{},...hasOwn(_0x583660,'readTimeout')?{'readTimeout':_0x583660[_0x21af37(0x101)]}:{}};}export function mergeUpdateInput(_0x2eb18a,_0x559fb3){const _0x498ffa=a181_0xb8cad6;return{'id':_0x2eb18a['id'],'appCode':_0x2eb18a[_0x498ffa(0xec)],'configName':_0x559fb3[_0x498ffa(0xf6)]??_0x2eb18a[_0x498ffa(0xf6)],'channelType':_0x559fb3['channelType']??_0x2eb18a[_0x498ffa(0xaa)],'endpointUrl':hasOwn(_0x559fb3,_0x498ffa(0x105))?_0x559fb3[_0x498ffa(0x105)]:_0x2eb18a['endpointUrlRaw'],'channelConfig':hasOwn(_0x559fb3,_0x498ffa(0xe7))?serializeChannelConfig(_0x559fb3[_0x498ffa(0xe7)]):_0x2eb18a[_0x498ffa(0xa7)],'description':hasOwn(_0x559fb3,_0x498ffa(0xd3))?_0x559fb3[_0x498ffa(0xd3)]:_0x2eb18a[_0x498ffa(0xd3)],'connectTimeout':hasOwn(_0x559fb3,_0x498ffa(0xaf))?_0x559fb3['connectTimeout']:_0x2eb18a[_0x498ffa(0xaf)],'readTimeout':hasOwn(_0x559fb3,_0x498ffa(0x101))?_0x559fb3[_0x498ffa(0x101)]:_0x2eb18a['readTimeout']};}export function plannedUpdateProjection(_0x43dc0a,_0x448054){const _0x33a4e7=a181_0xb8cad6;return projectNotificationConfig({'id':_0x43dc0a['id'],'appCode':_0x43dc0a[_0x33a4e7(0xec)],'configCode':_0x43dc0a[_0x33a4e7(0x112)],'configName':_0x448054[_0x33a4e7(0xf6)]??_0x43dc0a[_0x33a4e7(0xf6)],'channelType':_0x448054[_0x33a4e7(0xaa)]??_0x43dc0a[_0x33a4e7(0xaa)],'endpointUrl':hasOwn(_0x448054,_0x33a4e7(0x105))?_0x448054[_0x33a4e7(0x105)]:_0x43dc0a['endpointUrlRaw'],'channelConfig':hasOwn(_0x448054,'channelConfig')?_0x448054[_0x33a4e7(0xe7)]:_0x43dc0a['channelConfigRaw'],'description':hasOwn(_0x448054,_0x33a4e7(0xd3))?_0x448054[_0x33a4e7(0xd3)]:_0x43dc0a[_0x33a4e7(0xd3)],'connectTimeout':hasOwn(_0x448054,'connectTimeout')?_0x448054[_0x33a4e7(0xaf)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x43dc0a[_0x33a4e7(0xaf)],'readTimeout':hasOwn(_0x448054,'readTimeout')?_0x448054[_0x33a4e7(0x101)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x43dc0a[_0x33a4e7(0x101)]});}export function requestedSafeFieldsMatch(_0x533abc,_0x5d997d,_0x3fa87b){const _0x5ec78c=a181_0xb8cad6,_0x2555da=[],_0x3e19a6=[],_0x1d8b90=[];for(const _0x3da772 of[_0x5ec78c(0xf6),_0x5ec78c(0xaa),_0x5ec78c(0xd3)]){if(!hasOwn(_0x3fa87b,_0x3da772))continue;_0x1d8b90[_0x5ec78c(0xd4)](_0x3da772),_0x2555da[_0x5ec78c(0xd4)](_0x5d997d[_0x3da772]===_0x3fa87b[_0x3da772]),_0x3e19a6['push'](_0x533abc[_0x3da772]!==_0x3fa87b[_0x3da772]&&_0x5d997d[_0x3da772]===_0x3fa87b[_0x3da772]);}for(const _0x3e59f3 of[_0x5ec78c(0xaf),_0x5ec78c(0x101)]){if(!hasOwn(_0x3fa87b,_0x3e59f3))continue;const _0x5cbd28=_0x3fa87b[_0x3e59f3]??(_0x3e59f3===_0x5ec78c(0xaf)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x1d8b90['push'](_0x3e59f3),_0x2555da[_0x5ec78c(0xd4)](_0x5d997d[_0x3e59f3]===_0x5cbd28),_0x3e19a6[_0x5ec78c(0xd4)](_0x533abc[_0x3e59f3]!==_0x5cbd28&&_0x5d997d[_0x3e59f3]===_0x5cbd28);}return hasOwn(_0x3fa87b,_0x5ec78c(0x105))&&_0x3fa87b[_0x5ec78c(0x105)]===null&&(_0x1d8b90[_0x5ec78c(0xd4)]('endpointUrl:null'),_0x2555da[_0x5ec78c(0xd4)](_0x5d997d[_0x5ec78c(0xf3)]===null||_0x5d997d['endpointUrlRaw']===''),_0x3e19a6[_0x5ec78c(0xd4)](_0x533abc[_0x5ec78c(0xf3)]!==null&&_0x533abc['endpointUrlRaw']!==''&&(_0x5d997d[_0x5ec78c(0xf3)]===null||_0x5d997d['endpointUrlRaw']===''))),{'allMatch':_0x2555da[_0x5ec78c(0xc5)](Boolean),'provesChange':_0x3e19a6[_0x5ec78c(0xab)](Boolean),'verifiedFields':_0x1d8b90};}export function validateNotificationDeleteReadback(_0xc9ed74,_0x1e3f8f,_0x2cb216){const _0x329b53=a181_0xb8cad6;for(const [_0x4b8aa2,_0x565dcc]of _0xc9ed74[_0x329b53(0xfc)]()){if(!Number[_0x329b53(0xb0)](_0x565dcc['id'])||_0x565dcc['id']<=0x0)throw notificationError(_0x329b53(0xb1),_0x329b53(0x10c)+(_0x4b8aa2+0x1)+'\x20has\x20an\x20invalid\x20id.');if(_0x565dcc['appCode']!==_0x1e3f8f)throw notificationError('notification_config_response_invalid',_0x329b53(0x10c)+(_0x4b8aa2+0x1)+_0x329b53(0x110));if(_0x565dcc[_0x329b53(0xaa)]!==_0x2cb216)throw notificationError(_0x329b53(0xb1),_0x329b53(0x10c)+(_0x4b8aa2+0x1)+_0x329b53(0x107));}}export function safeApiFailure(_0x2d119f,_0x458c6b,_0x1c4735){const _0x2286c1=a181_0xb8cad6;return notificationError(_0x2286c1(0xe0)+_0x2d119f+'_'+(_0x458c6b===_0x2286c1(0xa2)?_0x2286c1(0xba):_0x458c6b+_0x2286c1(0xda)),'Notification\x20config\x20'+_0x2d119f+'\x20'+_0x458c6b+'\x20failed.',_0x1c4735);}export function notificationLookupCommand(_0x5da0a5,_0x5db676){const _0x14aa31=a181_0xb8cad6;return _0x14aa31(0xa1)+_0x5da0a5+_0x14aa31(0x96)+_0x5db676+'\x20--format\x20compress';}function validateNotificationDocument(_0x14479d,_0x221bea){const _0x5c9c96=a181_0xb8cad6;for(const _0x10161b of Object[_0x5c9c96(0xa6)](_0x14479d)){if(FORBIDDEN_IDENTITY_FIELDS[_0x5c9c96(0xf7)](_0x10161b))throw notificationError(_0x5c9c96(0xe2),_0x5c9c96(0xb6)+_0x10161b+_0x5c9c96(0xe1));if(!ALLOWED_INPUT_FIELDS['has'](_0x10161b))throw notificationError(_0x5c9c96(0xbf),_0x5c9c96(0x102)+_0x10161b+'\x22.');}if(_0x221bea==='update'&&Object[_0x5c9c96(0xa6)](_0x14479d)[_0x5c9c96(0xcd)]===0x0)throw notificationError(_0x5c9c96(0xc8),_0x5c9c96(0xa9));const _0x11b6c5={};if(hasOwn(_0x14479d,'configName'))_0x11b6c5[_0x5c9c96(0xf6)]=validateRequiredString(_0x14479d['configName'],'configName',0x80);else{if(_0x221bea===_0x5c9c96(0xe3))throw notificationError(_0x5c9c96(0xae),'Create\x20JSON\x20requires\x20field\x20'+_0x5c9c96(0xd0));}if(hasOwn(_0x14479d,_0x5c9c96(0xaa))){if(typeof _0x14479d[_0x5c9c96(0xaa)]!==_0x5c9c96(0xd1))throw invalidFieldType(_0x5c9c96(0xaa),_0x5c9c96(0xfe));const _0x916d8b=_0x14479d[_0x5c9c96(0xaa)][_0x5c9c96(0xb5)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x5c9c96(0xfa)](_0x916d8b))throw notificationError(_0x5c9c96(0x106),_0x5c9c96(0x10f),_0x5c9c96(0xa0)+NOTIFICATION_CHANNEL_TYPES[_0x5c9c96(0xf0)](',\x20')+'.');_0x11b6c5['channelType']=_0x916d8b;}else{if(_0x221bea===_0x5c9c96(0xe3))throw notificationError(_0x5c9c96(0xae),_0x5c9c96(0xd5)+_0x5c9c96(0x9b));}for(const [_0x4840c3,_0x328af7]of[[_0x5c9c96(0x105),0x200],['description',0x100]]){if(!hasOwn(_0x14479d,_0x4840c3))continue;const _0x4d073c=_0x14479d[_0x4840c3];if(_0x4d073c!==null&&typeof _0x4d073c!==_0x5c9c96(0xd1))throw invalidFieldType(_0x4840c3,_0x5c9c96(0xe9));if(typeof _0x4d073c===_0x5c9c96(0xd1)&&_0x4d073c[_0x5c9c96(0xcd)]>_0x328af7)throw notificationError('notification_config_field_invalid',_0x5c9c96(0xb6)+_0x4840c3+_0x5c9c96(0xa3)+_0x328af7+'\x20characters.');_0x11b6c5[_0x4840c3]=_0x4d073c;}if(hasOwn(_0x14479d,_0x5c9c96(0xe7))){const _0x31ed28=_0x14479d[_0x5c9c96(0xe7)];if(_0x31ed28===null&&_0x221bea===_0x5c9c96(0xe3))throw invalidFieldType(_0x5c9c96(0xe7),_0x5c9c96(0xe5));if(_0x31ed28!==null&&!isJsonObject(_0x31ed28))throw invalidFieldType(_0x5c9c96(0xe7),_0x221bea==='update'?_0x5c9c96(0xf9):_0x5c9c96(0xe5));_0x31ed28!==null&&validateChannelConfigFields(_0x11b6c5[_0x5c9c96(0xaa)],_0x31ed28),_0x11b6c5[_0x5c9c96(0xe7)]=_0x31ed28;}for(const _0x4d344f of['connectTimeout',_0x5c9c96(0x101)]){if(!hasOwn(_0x14479d,_0x4d344f))continue;const _0x4186c5=_0x14479d[_0x4d344f];if(_0x4186c5!==null&&(!Number['isSafeInteger'](_0x4186c5)||_0x4186c5<0x0))throw notificationError('notification_config_field_invalid',_0x5c9c96(0xb6)+_0x4d344f+_0x5c9c96(0xc3));_0x11b6c5[_0x4d344f]=_0x4186c5;}return _0x11b6c5;}function validateRequiredString(_0x43832c,_0x27420e,_0x2b7b24){const _0x1a59c7=a181_0xb8cad6;if(typeof _0x43832c!==_0x1a59c7(0xd1))throw invalidFieldType(_0x27420e,_0x1a59c7(0xed));const _0x56b7e3=_0x43832c[_0x1a59c7(0xb5)]();if(!_0x56b7e3)throw notificationError(_0x1a59c7(0x106),_0x1a59c7(0xb6)+_0x27420e+_0x1a59c7(0x99));if(_0x56b7e3[_0x1a59c7(0xcd)]>_0x2b7b24)throw notificationError(_0x1a59c7(0x106),'Notification\x20JSON\x20field\x20\x22'+_0x27420e+_0x1a59c7(0xa3)+_0x2b7b24+_0x1a59c7(0xef));return _0x56b7e3;}function validateChannelConfigFields(_0xa8a22e,_0xf2eb2b){const _0x129a9e=a181_0xb8cad6;if(hasOwn(_0xf2eb2b,_0x129a9e(0xdf)))throw forbiddenChannelConfigField(_0x129a9e(0xdf));if(_0xa8a22e===_0x129a9e(0x104))for(const _0x16fc3c of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0xf2eb2b,_0x16fc3c))throw forbiddenChannelConfigField(_0x16fc3c);}}function forbiddenChannelConfigField(_0x66bc14){const _0x38d0d8=a181_0xb8cad6;return notificationError(_0x38d0d8(0x113),_0x38d0d8(0x9e)+_0x66bc14+_0x38d0d8(0x10e));}function invalidFieldType(_0x67fddf,_0x4ca937){const _0x5ee8ab=a181_0xb8cad6;return notificationError('notification_config_field_invalid',_0x5ee8ab(0xb6)+_0x67fddf+_0x5ee8ab(0xdc)+_0x4ca937+'.');}function a181_0x517e(_0x5eba1b,_0x30d530){_0x5eba1b=_0x5eba1b-0x94;const _0x4634d4=a181_0x4634();let _0x517ece=_0x4634d4[_0x5eba1b];return _0x517ece;}function serializeChannelConfig(_0x12ef02){const _0x53623f=a181_0xb8cad6;return _0x12ef02===null||_0x12ef02===undefined?null:JSON[_0x53623f(0x10d)](_0x12ef02);}function redactSensitive(_0x4a90e1){const _0x18a44f=a181_0xb8cad6;return _0x4a90e1===null||_0x4a90e1===undefined||_0x4a90e1===''?null:_0x18a44f(0xea);}function requireResponseString(_0xfe531d,_0x33ace9,_0x5b8caa){const _0x15ccd0=a181_0xb8cad6;if(typeof _0xfe531d!==_0x15ccd0(0xd1)||_0xfe531d[_0x15ccd0(0xb5)]()==='')throw CliErrors[_0x15ccd0(0xb9)]('Invalid\x20notification\x20config\x20response.',_0x15ccd0(0xf1)+(_0x5b8caa+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x33ace9+'\x22.');return _0xfe531d['trim']();}function requireExactString(_0x81abcc,_0xb000d8,_0x86cb26){const _0x51cc70=a181_0xb8cad6;if(typeof _0x81abcc!==_0x51cc70(0xd1)||_0x81abcc[_0x51cc70(0xb5)]()==='')throw notificationError(_0x51cc70(0xb1),_0x51cc70(0xb7)+_0x86cb26+_0x51cc70(0xa4)+_0xb000d8+'\x22.');return _0x81abcc[_0x51cc70(0xb5)]();}function responseNullableString(_0x3bf8ea,_0x160f2c,_0x213ba5){const _0x47ba51=a181_0xb8cad6;if(_0x3bf8ea===undefined||_0x3bf8ea===null)return null;if(typeof _0x3bf8ea!==_0x47ba51(0xd1))throw notificationError(_0x47ba51(0xb1),'Notification\x20config\x20'+_0x213ba5+'\x20has\x20invalid\x20field\x20\x22'+_0x160f2c+'\x22.');return _0x3bf8ea;}function a181_0x4634(){const _0x19c411=['endpointUrlRaw','Notification\x20JSON\x20from\x20','replyTo','configName','has','number','a\x20JSON\x20object\x20or\x20null','includes','dry-run','entries','name','a\x20supported\x20string','WEBHOOK','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','readTimeout','Unknown\x20notification\x20JSON\x20field\x20\x22','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','EMAIL','endpointUrl','notification_config_field_invalid','\x20has\x20an\x20invalid\x20channelType.','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','updateTime','notification_config_confirmation_required','bool','Notification\x20config\x20list\x20item\x20','stringify','\x22\x20is\x20forbidden.','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','\x20has\x20an\x20invalid\x20appCode.','fromName','configCode','notification_config_channel_field_forbidden','parse','validation','call','Missing\x20notification\x20JSON\x20source.','\x20--type\x20','\x20is\x20invalid.','1169817LdJHhI','\x22\x20must\x20be\x20a\x20non-empty\x20string.','prototype','\x22channelType\x22.','860481faCvBb','yes','Notification\x20JSON\x20channelConfig\x20field\x20\x22','4RczTZY','Allowed\x20values:\x20','rabetbase\x20notification\x20config-list\x20--appcode\x20','mutation','\x22\x20cannot\x20exceed\x20','\x20is\x20missing\x20required\x20field\x20\x22','16bNlfVr','keys','channelConfigRaw','Notification\x20JSON\x20source\x20is\x20ambiguous.','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','channelType','some','str','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','notification_config_field_required','connectTimeout','isSafeInteger','notification_config_response_invalid','\x20must\x20be\x20an\x20object.','429084HJhKIP','FEISHU','trim','Notification\x20JSON\x20field\x20\x22','Notification\x20config\x20','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','apiError','failed','from-env','isArray','Invalid\x20--','notification_config_id_invalid','notification_config_field_unknown','DINGTALK','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','type','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','subjectPrefix','every','1511222IWevwf','file','notification_config_update_empty','kind','utf8','num','stdin','length','createTime','recipients','\x22configName\x22.','string','bccList','description','push','Create\x20JSON\x20requires\x20field\x20','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','10074652wLHRtP','environment\x20variable\x20','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','_unavailable','5249004hDsfWJ','\x22\x20must\x20be\x20','emailTargets','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','messageTemplate','notification_config_','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','notification_config_field_forbidden','create','WECOM','a\x20JSON\x20object','3680255BlLCbi','channelConfig','hasOwnProperty','a\x20string\x20or\x20null','<redacted>','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','appCode','a\x20non-empty\x20string','env','\x20characters.','join','Item\x20','notification_config_json_invalid'];a181_0x4634=function(){return _0x19c411;};return a181_0x4634();}function responseNullableTimeout(_0xf5d295,_0x1f2d6d,_0x19f980){const _0x2695a4=a181_0xb8cad6;if(_0xf5d295===undefined||_0xf5d295===null)return null;if(!Number[_0x2695a4(0xb0)](_0xf5d295)||_0xf5d295<0x0)throw notificationError(_0x2695a4(0xb1),_0x2695a4(0xb7)+_0x19f980+'\x20has\x20invalid\x20field\x20\x22'+_0x1f2d6d+'\x22.');return _0xf5d295;}function normalizeNullableString(_0x545f73){const _0xc722cd=a181_0xb8cad6;return typeof _0x545f73===_0xc722cd(0xd1)?_0x545f73:null;}function isJsonObject(_0x46b1d7){const _0x18f575=a181_0xb8cad6;return _0x46b1d7!==null&&typeof _0x46b1d7==='object'&&!Array[_0x18f575(0xbc)](_0x46b1d7);}function hasOwn(_0x30ae51,_0x3fc493){const _0x109c1c=a181_0xb8cad6;return Object[_0x109c1c(0x9a)][_0x109c1c(0xe8)][_0x109c1c(0x94)](_0x30ae51,_0x3fc493);}async function readStdin(){const _0x596e0c=a181_0xb8cad6;let _0x5cad9f='';process[_0x596e0c(0xcc)]['setEncoding'](_0x596e0c(0xca));for await(const _0x5b0028 of process[_0x596e0c(0xcc)])_0x5cad9f+=_0x5b0028;return _0x5cad9f;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a182_0x53933a=a182_0x2536;(function(_0xb3f579,_0x2fafe9){const _0x200f95=a182_0x2536,_0x8433d=_0xb3f579();while(!![]){try{const _0x12efd5=-parseInt(_0x200f95(0xfc))/0x1+-parseInt(_0x200f95(0xed))/0x2+-parseInt(_0x200f95(0x105))/0x3*(parseInt(_0x200f95(0xf9))/0x4)+-parseInt(_0x200f95(0x114))/0x5+-parseInt(_0x200f95(0x10b))/0x6*(parseInt(_0x200f95(0x122))/0x7)+parseInt(_0x200f95(0x10f))/0x8+parseInt(_0x200f95(0xee))/0x9;if(_0x12efd5===_0x2fafe9)break;else _0x8433d['push'](_0x8433d['shift']());}catch(_0x2968bb){_0x8433d['push'](_0x8433d['shift']());}}}(a182_0x3bc3,0xdb2e8));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a182_0x2536(_0x1ac54d,_0x2a7d84){_0x1ac54d=_0x1ac54d-0xeb;const _0x3bc37b=a182_0x3bc3();let _0x2536d6=_0x3bc37b[_0x1ac54d];return _0x2536d6;}const SUPPORTED_SCENES=[a182_0x53933a(0x113),a182_0x53933a(0xf3),a182_0x53933a(0x117),a182_0x53933a(0xeb)],SCENE_TO_LEGACY_TYPE={'invoice':a182_0x53933a(0x10d),'general':a182_0x53933a(0x120),'form':a182_0x53933a(0x11a),'idCard':a182_0x53933a(0xf7)},SCENE_FLAG={'name':a182_0x53933a(0x112),'type':a182_0x53933a(0xfd),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a182_0x53933a(0xec)},IMAGE_FILE_FLAG={'name':a182_0x53933a(0xf0),'type':'string','description':a182_0x53933a(0x101)},IMAGE_URL_FLAG={'name':a182_0x53933a(0xfb),'type':'string','description':a182_0x53933a(0x116)};function a182_0x3bc3(){const _0x6ec77f=['Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','3126rmgAPL','toLowerCase','fileUrl','recognize','trim','File\x20upload\x20response\x20missing\x20filePath.','1301250DrtGYU','/smartapi/common/queryFileUrl','Invoice','join','10264712oSpCSG','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','scene','invoice','3235805zUxmZs','appCode','Publicly\x20accessible\x20image\x20or\x20file\x20URL','form','File\x20URL\x20response\x20missing\x20fileUrl.','filter','Table','toString','Preview:\x20recognize\x20','POST','idcard','/smartapi/ocr/recognize-text','General','filePath','49ivCssr','Unsupported\x20OCR\x20scene:\x20','idCard','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','984402MEzheu','36622647AfRSIN','ocr','image-file','apiError','read','general','imageUrl','/smartapi/common/uploadFile','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','IdCard','count','1332cGJEex','imageFile','image-url','1450031GvrOhE','string','GET','.\x20Supported\x20scenes:\x20','/smartapi/ocr/recognize-text?','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','str','validation'];a182_0x3bc3=function(){return _0x6ec77f;};return a182_0x3bc3();}function normalizeScene(_0x1a9059){const _0x375066=a182_0x53933a,_0x189bb8=_0x1a9059[_0x375066(0x109)]()[_0x375066(0x106)]();if(_0x189bb8===_0x375066(0x11e))return _0x375066(0xeb);if(_0x189bb8===_0x375066(0x113)||_0x189bb8===_0x375066(0xf3)||_0x189bb8===_0x375066(0x117))return _0x189bb8;throw CliErrors['validation'](_0x375066(0x123)+_0x1a9059+_0x375066(0xff)+SUPPORTED_SCENES[_0x375066(0x10e)](',\x20'));}function selectedInputs(_0x3d4432){const _0x27cbc0=a182_0x53933a,_0x14d80f=_0x3d4432[_0x27cbc0(0x102)](_0x27cbc0(0xf0))[_0x27cbc0(0x109)](),_0x405e5d=_0x3d4432[_0x27cbc0(0x102)](_0x27cbc0(0xfb))['trim']();return{'imageFile':_0x14d80f,'imageUrl':_0x405e5d,'count':[_0x14d80f,_0x405e5d][_0x27cbc0(0x119)](Boolean)['length']};}function validateInputSelection(_0x4937ce){const _0x3a932c=a182_0x53933a,_0x2bb1f8=selectedInputs(_0x4937ce);if(_0x2bb1f8[_0x3a932c(0xf8)]!==0x1)throw CliErrors[_0x3a932c(0x103)](_0x3a932c(0x104));return _0x2bb1f8;}function withScene(_0x333ae8,_0x378694,_0x3f62fc){const _0x6373bb=a182_0x53933a;return{..._0x333ae8,'scene':_0x378694,..._0x3f62fc?{'sourceFile':{'fileName':_0x3f62fc['fileName'],'filePath':_0x3f62fc[_0x6373bb(0x121)]}}:{}};}const ocrRecognize={'service':a182_0x53933a(0xef),'command':a182_0x53933a(0x108),'description':a182_0x53933a(0x110),'risk':a182_0x53933a(0xf2),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x5d4c72){const _0x258e3a=a182_0x53933a,_0x25098e=normalizeScene(_0x5d4c72['str'](_0x258e3a(0x112))),_0xf45b0=SCENE_TO_LEGACY_TYPE[_0x25098e],_0x1f9027=validateInputSelection(_0x5d4c72);if(_0x1f9027[_0x258e3a(0xf4)]){const _0x34fc5d=new URLSearchParams({'url':_0x1f9027[_0x258e3a(0xf4)],'type':_0xf45b0,'appCode':_0x5d4c72[_0x258e3a(0x115)]});return{'method':'GET','url':_0x258e3a(0x100)+_0x34fc5d[_0x258e3a(0x11b)](),'description':_0x258e3a(0x11c)+_0x25098e+'\x20OCR\x20from\x20URL'};}const _0x2ba122=requireDevelopmentUploadFile(_0x1f9027[_0x258e3a(0xfa)],_0x258e3a(0xf0));return{'method':'POST','url':_0x258e3a(0xf5),'body':{'steps':[{'method':_0x258e3a(0x11d),'url':'/smartapi/common/uploadFile','body':{'appCode':_0x5d4c72[_0x258e3a(0x115)],'multipart':{'file':_0x2ba122}}},{'method':_0x258e3a(0x11d),'url':_0x258e3a(0x10c),'body':{'filePath':_0x258e3a(0x111),'downloadFlag':![]}},{'method':_0x258e3a(0xfe),'url':_0x258e3a(0x11f),'query':{'appCode':_0x5d4c72[_0x258e3a(0x115)],'url':_0x258e3a(0xf6),'type':_0xf45b0}}]},'description':'Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20'+_0x25098e+'\x20OCR'};},async 'execute'(_0x354b36){const _0xd98484=a182_0x53933a,_0xf66e76=normalizeScene(_0x354b36[_0xd98484(0x102)](_0xd98484(0x112))),_0x3b403d=SCENE_TO_LEGACY_TYPE[_0xf66e76],_0x38a47b=validateInputSelection(_0x354b36);if(_0x38a47b[_0xd98484(0xf4)]){const _0x6cb82b=await recognizeDevelopmentOcr(_0x354b36[_0xd98484(0x115)],{'url':_0x38a47b[_0xd98484(0xf4)],'type':_0x3b403d});return{'ok':!![],'data':withScene(_0x6cb82b,_0xf66e76)};}const _0x20b736=requireDevelopmentUploadFile(_0x38a47b[_0xd98484(0xfa)],_0xd98484(0xf0)),_0xb02ee8=await uploadDevelopmentFile(_0x354b36[_0xd98484(0x115)],_0x20b736['path']);if(!_0xb02ee8['filePath'])throw CliErrors['apiError'](_0xd98484(0x10a));const _0x3bdcf6=await queryDevelopmentFileUrl(_0xb02ee8[_0xd98484(0x121)],{'download':![]});if(!_0x3bdcf6[_0xd98484(0x107)])throw CliErrors[_0xd98484(0xf1)](_0xd98484(0x118));const _0x413190=await recognizeDevelopmentOcr(_0x354b36[_0xd98484(0x115)],{'url':_0x3bdcf6[_0xd98484(0x107)],'type':_0x3b403d});return{'ok':!![],'data':withScene(_0x413190,_0xf66e76,_0xb02ee8)};}};export const ocrDefinitions=[ocrRecognize];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a183_0x5c5995=a183_0x44f2;(function(_0x4c8dee,_0x1711ad){const _0x34a215=a183_0x44f2,_0x4f8b8e=_0x4c8dee();while(!![]){try{const _0x16ab9b=-parseInt(_0x34a215(0x1f7))/0x1*(-parseInt(_0x34a215(0x20d))/0x2)+-parseInt(_0x34a215(0x1df))/0x3*(parseInt(_0x34a215(0x204))/0x4)+parseInt(_0x34a215(0x1e2))/0x5+parseInt(_0x34a215(0x1e5))/0x6+parseInt(_0x34a215(0x1e8))/0x7*(-parseInt(_0x34a215(0x206))/0x8)+-parseInt(_0x34a215(0x201))/0x9*(parseInt(_0x34a215(0x1da))/0xa)+-parseInt(_0x34a215(0x20a))/0xb;if(_0x16ab9b===_0x1711ad)break;else _0x4f8b8e['push'](_0x4f8b8e['shift']());}catch(_0x1d68bc){_0x4f8b8e['push'](_0x4f8b8e['shift']());}}}(a183_0x4217,0x7947d));import{readFile}from'node:fs/promises';import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';import{APPCODE_FLAG}from'../../commands/common/flags.js';import{readCustomPageDirectory}from'../../core/page/file-system.js';import{createCustomPage}from'../../core/api-client.js';function a183_0x4217(){const _0x4d89e2=['length','isNaN','CUSTOM','960230UJNhGr','--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.','stringify','../../../templates/custom-pages','parse','61179fRXAKy','name','validation','4534790pXGLwS','includes','compress','5572512GmhnlJ','--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.','object','63WNKflp','parent-menu-id','parentMenuId','string','page-dir','apiError','now','page-pattern','Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','appCode','str','num','files','/smartapi/webcode/page/create','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','5KMgkPF','.json','\x20and\x20its\x20menu\x20entry.','Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)','menuId','trim','Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','toLowerCase','page\x20create\x20does\x20not\x20accept\x20--page-type.','DASHBOARD','72upkvvj','Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.','Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','4WUCgLk','pageName','594976woetOi','write','pageId','utf8','1577455rkqBBS','isInteger','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.','104954GGTSIp','menuPath','page-content','Would\x20create\x20Custom\x20Page\x20','page-type','Custom\x20Page\x20pattern\x20not\x20found:\x20','page.create','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','Invalid\x20Custom\x20Page\x20pattern:\x20','number','BLANK','Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)','values','pageName\x20cannot\x20exceed\x20100\x20characters.','create','page','version','POST'];a183_0x4217=function(){return _0x4d89e2;};return a183_0x4217();}import{CliErrors}from'../../errors.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,validateCustomPageContent}from'./custom/shared.js';const CUSTOM_PAGE_PATTERNS=[a183_0x5c5995(0x1cf),'ONEPAGE',a183_0x5c5995(0x200)],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),a183_0x5c5995(0x1dd));export const pageCreate={'service':a183_0x5c5995(0x1d4),'command':a183_0x5c5995(0x1d3),'description':a183_0x5c5995(0x1f0),'risk':a183_0x5c5995(0x207),'defaultOutputFormat':a183_0x5c5995(0x1e4),'structuredErrors':!![],'rejectedFlags':[{'name':a183_0x5c5995(0x211),'message':a183_0x5c5995(0x1ff),'hint':a183_0x5c5995(0x20c)},{'name':a183_0x5c5995(0x20f),'message':'page\x20create\x20no\x20longer\x20accepts\x20--page-content.','hint':a183_0x5c5995(0x214)}],'flags':[{'name':a183_0x5c5995(0x1e0),'type':a183_0x5c5995(0x1eb),'description':'Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)'},{'name':a183_0x5c5995(0x1e9),'type':a183_0x5c5995(0x1ce),'description':a183_0x5c5995(0x1f6)},{'name':a183_0x5c5995(0x1ef),'type':a183_0x5c5995(0x1eb),'description':a183_0x5c5995(0x1fa),'enum':CUSTOM_PAGE_PATTERNS},{'name':a183_0x5c5995(0x1ec),'type':a183_0x5c5995(0x1eb),'description':a183_0x5c5995(0x1d0)},APPCODE_FLAG],async 'validate'(_0x531425){await readValidatedPageSource(_0x531425);},async 'dryRun'(_0x446bae){const _0x2c3b3c=a183_0x5c5995,_0x2567cf=readInput(_0x446bae,await readValidatedPageSource(_0x446bae));return{'method':_0x2c3b3c(0x1d6),'url':_0x2c3b3c(0x1f5),'body':{'appCode':_0x2567cf[_0x2c3b3c(0x1f1)],'pageName':_0x2567cf[_0x2c3b3c(0x205)],..._0x2567cf[_0x2c3b3c(0x1ea)]!=null?{'parentMenuId':_0x2567cf[_0x2c3b3c(0x1ea)]}:{},'createMenu':_0x2567cf['createMenu'],'codeContent':_0x2567cf['files']},'description':_0x2c3b3c(0x210)+JSON[_0x2c3b3c(0x1dc)](_0x2567cf[_0x2c3b3c(0x205)])+_0x2c3b3c(0x1f9)};},async 'execute'(_0x563b0d){const _0x1784b4=a183_0x5c5995,_0x1ab837=readInput(_0x563b0d,await readValidatedPageSource(_0x563b0d)),_0x2082f9=await createCustomPage(_0x1ab837);if(!Number[_0x1784b4(0x20b)](_0x2082f9[_0x1784b4(0x208)])||_0x2082f9[_0x1784b4(0x208)]<=0x0)throw CliErrors[_0x1784b4(0x1ed)](_0x1784b4(0x1fd));const _0x2da985=buildCustomPageDevelopmentUrl(_0x1ab837[_0x1784b4(0x1f1)],_0x2082f9['menuPath']),_0x43070f=buildCustomPageEditUrl(_0x1ab837[_0x1784b4(0x1f1)],_0x2082f9[_0x1784b4(0x208)]);return{'ok':!![],'data':{'operation':_0x1784b4(0x213),'pageType':_0x1784b4(0x1d9),'pagePattern':readPagePattern(_0x563b0d),'selector':{'appCode':_0x1ab837['appCode'],'pageName':_0x1ab837[_0x1784b4(0x205)]},'before':null,'after':{'pageId':_0x2082f9[_0x1784b4(0x208)],'pageName':_0x2082f9[_0x1784b4(0x205)],'appCode':_0x2082f9[_0x1784b4(0x1f1)],'version':_0x2082f9[_0x1784b4(0x1d5)],'menuId':_0x2082f9[_0x1784b4(0x1fb)],'menuPath':_0x2082f9[_0x1784b4(0x20e)],'files':_0x2082f9['files']??Object['keys'](_0x1ab837[_0x1784b4(0x1f4)])},'dryRun':![],'request':_0x1ab837,..._0x2da985?{'pageUrl':_0x2da985}:{},..._0x43070f?{'editPageUrl':_0x43070f}:{},'warnings':_0x2da985?[]:[_0x1784b4(0x203)]},'message':'Created\x20Custom\x20Page\x20'+_0x2082f9[_0x1784b4(0x208)]+'.'};}};function readPagePattern(_0xe0ba8e){const _0x81ab44=a183_0x5c5995,_0xd254f1=_0xe0ba8e[_0x81ab44(0x1f2)]('page-pattern')['trim'](),_0x121511=_0xe0ba8e['str'](_0x81ab44(0x1ec))[_0x81ab44(0x1fc)]();if(_0xd254f1&&_0x121511)throw CliErrors['validation']('--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.');if(_0x121511)return null;if(!_0xd254f1)throw CliErrors[_0x81ab44(0x1e1)](_0x81ab44(0x202));if(!CUSTOM_PAGE_PATTERNS[_0x81ab44(0x1e3)](_0xd254f1))throw CliErrors[_0x81ab44(0x1e1)](_0x81ab44(0x1e6));return _0xd254f1;}async function readPageSource(_0x5c715e){const _0x8198c6=a183_0x5c5995,_0x248b99=_0x5c715e[_0x8198c6(0x1f2)](_0x8198c6(0x1ec))[_0x8198c6(0x1fc)](),_0x30aa9a=readPagePattern(_0x5c715e);if(_0x30aa9a===null){const _0x34fa80=await readCustomPageDirectory(_0x248b99);if(Object['keys'](_0x34fa80)['length']===0x0)throw CliErrors['validation'](_0x8198c6(0x1db));return _0x34fa80;}let _0x50b564;try{_0x50b564=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x30aa9a[_0x8198c6(0x1fe)]()+_0x8198c6(0x1f8)),_0x8198c6(0x209));}catch{throw CliErrors[_0x8198c6(0x1e1)](_0x8198c6(0x212)+_0x30aa9a+'.');}let _0x325eca;try{_0x325eca=JSON[_0x8198c6(0x1de)](_0x50b564);}catch{throw CliErrors[_0x8198c6(0x1e1)]('Invalid\x20Custom\x20Page\x20pattern:\x20'+_0x30aa9a+'.');}if(!_0x325eca||typeof _0x325eca!==_0x8198c6(0x1e7)||Array['isArray'](_0x325eca)||Object[_0x8198c6(0x1d1)](_0x325eca)['some'](_0x4e0616=>typeof _0x4e0616!==_0x8198c6(0x1eb)))throw CliErrors[_0x8198c6(0x1e1)](_0x8198c6(0x1cd)+_0x30aa9a+'.');return _0x325eca;}function a183_0x44f2(_0x114337,_0x54b58d){_0x114337=_0x114337-0x1cd;const _0x4217e7=a183_0x4217();let _0x44f2fa=_0x4217e7[_0x114337];return _0x44f2fa;}async function readValidatedPageSource(_0x566038){const _0xee63b9=await readPageSource(_0x566038);return await validateCustomPageContent(_0xee63b9),_0xee63b9;}function readInput(_0x51e876,_0x31a948){const _0x3a1cd5=a183_0x5c5995,_0x5f0870=_0x51e876['str']('name')[_0x3a1cd5(0x1fc)]()||'Custom_page_'+Date[_0x3a1cd5(0x1ee)]();if(_0x5f0870[_0x3a1cd5(0x1d7)]>0x64)throw CliErrors[_0x3a1cd5(0x1e1)](_0x3a1cd5(0x1d2));const _0x167ef5=_0x51e876[_0x3a1cd5(0x1f3)](_0x3a1cd5(0x1e9),NaN),_0x12b4c3=!Number[_0x3a1cd5(0x1d8)](_0x167ef5);if(_0x12b4c3&&(!Number[_0x3a1cd5(0x20b)](_0x167ef5)||_0x167ef5<=0x0))throw CliErrors[_0x3a1cd5(0x1e1)](_0x3a1cd5(0x215));return{'appCode':_0x51e876[_0x3a1cd5(0x1f1)],'pageName':_0x5f0870,..._0x12b4c3?{'parentMenuId':_0x167ef5}:{},'createMenu':!![],'files':_0x31a948};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a184_0x3ebc13=a184_0x4b12;function a184_0x4b12(_0x11e78c,_0x682b72){_0x11e78c=_0x11e78c-0x85;const _0x2ad150=a184_0x2ad1();let _0x4b12de=_0x2ad150[_0x11e78c];return _0x4b12de;}(function(_0x5dff55,_0x1db4d2){const _0x1409e0=a184_0x4b12,_0x5c7b49=_0x5dff55();while(!![]){try{const _0xaa317a=-parseInt(_0x1409e0(0x93))/0x1*(-parseInt(_0x1409e0(0xa2))/0x2)+parseInt(_0x1409e0(0x9e))/0x3*(parseInt(_0x1409e0(0x8f))/0x4)+parseInt(_0x1409e0(0x88))/0x5+parseInt(_0x1409e0(0x8b))/0x6*(parseInt(_0x1409e0(0x95))/0x7)+parseInt(_0x1409e0(0x86))/0x8+parseInt(_0x1409e0(0x90))/0x9+parseInt(_0x1409e0(0xa5))/0xa*(-parseInt(_0x1409e0(0x85))/0xb);if(_0xaa317a===_0x1db4d2)break;else _0x5c7b49['push'](_0x5c7b49['shift']());}catch(_0x4f4b41){_0x5c7b49['push'](_0x5c7b49['shift']());}}}(a184_0x2ad1,0x9dd0c));import{getCustomPageSource}from'../../../core/api-client.js';function a184_0x2ad1(){const _0xeed4d3=['compress','getSeconds','6DLFqsT','Retrieved\x20Custom\x20Page\x20','number','trim','7680LrAcpi','128934kvRbfY','pageCode','getFullYear','2389hDeqTY','padStart','2074548UiNvJT','cookie','getHours','getDate','isNaN','Custom\x20Page\x20ID','getMinutes','read','appCode','894WHQifW','custom-detail','Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','join','58ZMAxmD','appcode','getMonth','30yliQRr','3262127VcKpUX','3901632NwqRKI','getTime','481240wSRjVK'];a184_0x2ad1=function(){return _0xeed4d3;};return a184_0x2ad1();}import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':'page','command':a184_0x3ebc13(0x9f),'description':a184_0x3ebc13(0xa0),'risk':a184_0x3ebc13(0x9c),'defaultOutputFormat':a184_0x3ebc13(0x89),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a184_0x3ebc13(0x8d),'required':!![],'description':a184_0x3ebc13(0x9a)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2bdd79){readCustomPageId(_0x2bdd79);},async 'execute'(_0x1364ff){const _0x5505e7=a184_0x3ebc13,_0x27de40=readCustomPageId(_0x1364ff),_0x36b52f=await getCustomPageSource(_0x27de40),{bundle:_0x5b1101,createTime:_0x72cb86,updateTime:_0x2e90a1,..._0x4c695f}=_0x36b52f,_0x2f766b=_0x36b52f['id']??_0x27de40,_0x21293f=_0x36b52f[_0x5505e7(0x9d)]?.[_0x5505e7(0x8e)]()||_0x1364ff['str'](_0x5505e7(0xa3))[_0x5505e7(0x8e)](),_0x483545=buildCustomPageRuntimeUrl(_0x21293f,_0x36b52f[_0x5505e7(0x91)]),_0x3d7733=buildCustomPageEditUrl(_0x21293f,_0x2f766b),_0x58939f=await resolveCustomPageDevelopmentUrl(_0x21293f,_0x2f766b,_0x1364ff[_0x5505e7(0x96)]);return{'ok':!![],'data':{..._0x4c695f,..._0x483545?{'runtimePageUrl':_0x483545}:{},..._0x58939f?{'pageUrl':_0x58939f}:{},..._0x3d7733?{'editPageUrl':_0x3d7733}:{},..._0x72cb86==null?{}:{'createTime':formatTime(_0x72cb86)},..._0x2e90a1==null?{}:{'updateTime':formatTime(_0x2e90a1)}},'message':_0x5505e7(0x8c)+_0x27de40+'.'};}};function formatTime(_0x334dba){const _0x2bef3e=a184_0x3ebc13,_0x1172f9=new Date(_0x334dba);if(Number[_0x2bef3e(0x99)](_0x1172f9[_0x2bef3e(0x87)]()))return String(_0x334dba);const _0x47e5e3=[_0x1172f9[_0x2bef3e(0x92)](),String(_0x1172f9[_0x2bef3e(0xa4)]()+0x1)['padStart'](0x2,'0'),String(_0x1172f9[_0x2bef3e(0x98)]())[_0x2bef3e(0x94)](0x2,'0')][_0x2bef3e(0xa1)]('-'),_0x1fea24=[String(_0x1172f9[_0x2bef3e(0x97)]())[_0x2bef3e(0x94)](0x2,'0'),String(_0x1172f9[_0x2bef3e(0x9b)]())[_0x2bef3e(0x94)](0x2,'0'),String(_0x1172f9[_0x2bef3e(0x8a)]())[_0x2bef3e(0x94)](0x2,'0')][_0x2bef3e(0xa1)](':');return _0x47e5e3+'\x20'+_0x1fea24;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a185_0x22fe20=a185_0x461b;(function(_0x3fc549,_0x44857a){const _0x569902=a185_0x461b,_0x39388a=_0x3fc549();while(!![]){try{const _0x52eafd=-parseInt(_0x569902(0x128))/0x1+-parseInt(_0x569902(0x11e))/0x2*(-parseInt(_0x569902(0x12d))/0x3)+parseInt(_0x569902(0x127))/0x4+-parseInt(_0x569902(0x117))/0x5+-parseInt(_0x569902(0x124))/0x6*(-parseInt(_0x569902(0x120))/0x7)+-parseInt(_0x569902(0x11d))/0x8+parseInt(_0x569902(0x12b))/0x9*(parseInt(_0x569902(0x118))/0xa);if(_0x52eafd===_0x44857a)break;else _0x39388a['push'](_0x39388a['shift']());}catch(_0x527452){_0x39388a['push'](_0x39388a['shift']());}}}(a185_0x363b,0x4b986));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_0x461b(_0x222e73,_0x25bb3a){_0x222e73=_0x222e73-0x117;const _0x363b09=a185_0x363b();let _0x461bf7=_0x363b09[_0x222e73];return _0x461bf7;}function a185_0x363b(){const _0x3cea48=['101139SyKoie','cookie','2489455vTueZN','1850PlSQSi','path','Found\x20','react','No\x20Custom\x20Pages\x20found.','1057080UHvTap','22edDrPn','type','7TlhmzH','compress','\x20Custom\x20Page(s).','menus','11982IpLnDO','List\x20Custom\x20Pages\x20in\x20the\x20current\x20app','length','1462212ctVICp','605884CZxzJh','pageId','appCode','39267VvZhaY','page'];a185_0x363b=function(){return _0x3cea48;};return a185_0x363b();}export const pageCustomList={'service':a185_0x22fe20(0x12c),'command':'custom-list','description':a185_0x22fe20(0x125),'risk':'read','defaultOutputFormat':a185_0x22fe20(0x121),'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x20406c){const _0x4e5bc0=a185_0x22fe20,_0x57e3fd=(await fetchMenuSnapshot(_0x20406c[_0x4e5bc0(0x12a)],_0x20406c[_0x4e5bc0(0x12e)]))[_0x4e5bc0(0x123)]['flatMap'](_0xdacff8=>{const _0x55eee8=_0x4e5bc0;if(_0xdacff8[_0x55eee8(0x11f)]!==_0x55eee8(0x11b)||_0xdacff8[_0x55eee8(0x129)]==null)return[];const _0x447329=buildCustomPageDevelopmentUrl(_0x20406c['appCode'],_0xdacff8[_0x55eee8(0x119)]),_0x26f57f=buildCustomPageEditUrl(_0x20406c[_0x55eee8(0x12a)],_0xdacff8[_0x55eee8(0x129)]);return[{'pageId':_0xdacff8[_0x55eee8(0x129)],'label':_0xdacff8['label'],..._0x447329?{'pageUrl':_0x447329}:{},..._0x26f57f?{'editPageUrl':_0x26f57f}:{}}];});return{'ok':!![],'data':{'pages':_0x57e3fd},'message':_0x57e3fd[_0x4e5bc0(0x126)]===0x0?_0x4e5bc0(0x11c):_0x4e5bc0(0x11a)+_0x57e3fd['length']+_0x4e5bc0(0x122)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a186_0xd1fe(){const _0x260a7c=['13869ZEOmnH','21oDgpeY','warnings','/smartapi/webcode/file/publish','page.custom-publish','Published\x20Custom\x20Page\x20','unknown','pageCode','isInteger','number','FORMAL','155QyjnBb','Publish\x20the\x20latest\x20saved\x20content\x20of\x20a\x20Custom\x20Page','980116XYlvuX','4122808gjokNp','3633237lVvDPd','str','appCode','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20published\x20page\x20could\x20not\x20be\x20generated.','trim','apiError','21330sFhwLY','push','Would\x20publish\x20Custom\x20Page\x20','status','Custom\x20Page\x20publish\x20did\x20not\x20return\x20the\x20expected\x20page\x20ID.','remark','107694iopsWv','18594sHxGqd','64072qDcjyX','page','compress','custom-publish','pageId'];a186_0xd1fe=function(){return _0x260a7c;};return a186_0xd1fe();}const a186_0x25094d=a186_0x2fd8;(function(_0x18eeb7,_0x3ab6d0){const _0x2a8c4c=a186_0x2fd8,_0x56be13=_0x18eeb7();while(!![]){try{const _0x31238c=parseInt(_0x2a8c4c(0xff))/0x1+-parseInt(_0x2a8c4c(0x113))/0x2+-parseInt(_0x2a8c4c(0x115))/0x3+-parseInt(_0x2a8c4c(0x114))/0x4+-parseInt(_0x2a8c4c(0x111))/0x5*(-parseInt(_0x2a8c4c(0x100))/0x6)+-parseInt(_0x2a8c4c(0x107))/0x7*(parseInt(_0x2a8c4c(0x101))/0x8)+-parseInt(_0x2a8c4c(0x106))/0x9*(-parseInt(_0x2a8c4c(0xf9))/0xa);if(_0x31238c===_0x3ab6d0)break;else _0x56be13['push'](_0x56be13['shift']());}catch(_0x5ebccc){_0x56be13['push'](_0x56be13['shift']());}}}(a186_0xd1fe,0xb3682));import{getCustomPageSource,publishCustomPage}from'../../../core/api-client.js';function a186_0x2fd8(_0x39e3df,_0x303632){_0x39e3df=_0x39e3df-0xf9;const _0xd1fe29=a186_0xd1fe();let _0x2fd808=_0xd1fe29[_0x39e3df];return _0x2fd808;}import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomPublish={'service':a186_0x25094d(0x102),'command':a186_0x25094d(0x104),'description':a186_0x25094d(0x112),'risk':'write','defaultOutputFormat':a186_0x25094d(0x103),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a186_0x25094d(0x10f),'required':!![],'description':'Custom\x20Page\x20ID'},{'name':a186_0x25094d(0xfe),'type':'string','description':'Optional\x20publish\x20remark'}],async 'validate'(_0x5a410b){readCustomPageId(_0x5a410b);},async 'dryRun'(_0xe661d7){const _0x20bb16=a186_0x25094d,_0x17868d=readInput(_0xe661d7);return{'method':'POST','url':_0x20bb16(0x109),'body':{'id':_0x17868d[_0x20bb16(0x105)],..._0x17868d[_0x20bb16(0xfe)]?{'remark':_0x17868d[_0x20bb16(0xfe)]}:{}},'description':_0x20bb16(0xfb)+_0x17868d[_0x20bb16(0x105)]+'.'};},async 'execute'(_0x4d6df2){const _0x5e3fbb=a186_0x25094d,_0x189c4b=readInput(_0x4d6df2);await getCustomPageSource(_0x189c4b[_0x5e3fbb(0x105)]);const _0x510a47=await publishCustomPage(_0x189c4b);if(!Number[_0x5e3fbb(0x10e)](_0x510a47)||_0x510a47!==_0x189c4b[_0x5e3fbb(0x105)])throw CliErrors['apiError'](_0x5e3fbb(0xfd));const _0x1cd731=await getCustomPageSource(_0x189c4b[_0x5e3fbb(0x105)]);if(_0x1cd731[_0x5e3fbb(0xfc)]!==_0x5e3fbb(0x110))throw CliErrors[_0x5e3fbb(0x11a)]('Custom\x20Page\x20publish\x20did\x20not\x20reach\x20published\x20status:\x20'+(_0x1cd731[_0x5e3fbb(0xfc)]??_0x5e3fbb(0x10c))+'.');const _0x2e344e=_0x1cd731[_0x5e3fbb(0x117)]?.[_0x5e3fbb(0x119)](),_0x3101fb=buildCustomPageEditUrl(_0x2e344e,_0x189c4b[_0x5e3fbb(0x105)]),_0x496b6b=await resolveCustomPageDevelopmentUrl(_0x2e344e,_0x189c4b[_0x5e3fbb(0x105)],_0x4d6df2['cookie']),_0x359dce=buildMutationData(_0x189c4b,!![],_0x496b6b,_0x3101fb);_0x2e344e&&!_0x496b6b&&_0x359dce[_0x5e3fbb(0x108)][_0x5e3fbb(0xfa)]('Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.');const _0x1e11ad=buildCustomPageRuntimeUrl(_0x1cd731[_0x5e3fbb(0x117)],_0x1cd731[_0x5e3fbb(0x10d)]);return _0x1e11ad?_0x359dce['runtimePageUrl']=_0x1e11ad:_0x359dce['warnings'][_0x5e3fbb(0xfa)](_0x5e3fbb(0x118)),{'ok':!![],'data':_0x359dce,'message':_0x5e3fbb(0x10b)+_0x189c4b[_0x5e3fbb(0x105)]+'.'};}};function readInput(_0x45c69f){const _0x49efe6=a186_0x25094d,_0x24fa78=readCustomPageId(_0x45c69f),_0x5e9397=_0x45c69f[_0x49efe6(0x116)](_0x49efe6(0xfe))[_0x49efe6(0x119)]();return{'pageId':_0x24fa78,..._0x5e9397?{'remark':_0x5e9397}:{}};}function buildMutationData(_0x1aac98,_0x5c50fb=![],_0x536c16,_0x16707e){const _0x4ed56e=a186_0x25094d;return{'operation':_0x4ed56e(0x10a),'selector':{'pageId':_0x1aac98[_0x4ed56e(0x105)]},'before':null,'after':{'pageId':_0x1aac98[_0x4ed56e(0x105)],'status':_0x4ed56e(0x110)},'dryRun':!_0x5c50fb,'request':_0x1aac98,..._0x536c16?{'pageUrl':_0x536c16}:{},..._0x16707e?{'editPageUrl':_0x16707e}:{},'warnings':[]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a187_0x331d4a=a187_0x5d4f;function a187_0x5152(){const _0x6199f0=['--id\x20must\x20be\x20a\x20positive\x20integer.','3642TRqQQU','5740kqOtCx','1460286yvKeKX','42HDBwkh','path','isInteger','message','num','48202YnnFwI','195710hcuLJa','/ide/','map','react','11RXKzPT','24TljWnr','2820818qiMoVE','Optional\x20app\x20code\x20resolved\x20from\x20page\x20ID\x20when\x20omitted','find','join','length','menus','693mPkTRA','type','2086580GioUSo','validation','Invalid\x20Custom\x20Page\x20content:\x20'];a187_0x5152=function(){return _0x6199f0;};return a187_0x5152();}(function(_0x2a3ddb,_0x4845a3){const _0x381961=a187_0x5d4f,_0x5460cf=_0x2a3ddb();while(!![]){try{const _0x1a4abe=-parseInt(_0x381961(0x14c))/0x1*(-parseInt(_0x381961(0x15a))/0x2)+-parseInt(_0x381961(0x154))/0x3*(-parseInt(_0x381961(0x15b))/0x4)+-parseInt(_0x381961(0x148))/0x5*(parseInt(_0x381961(0x15d))/0x6)+-parseInt(_0x381961(0x147))/0x7*(parseInt(_0x381961(0x14d))/0x8)+parseInt(_0x381961(0x15c))/0x9+parseInt(_0x381961(0x156))/0xa+-parseInt(_0x381961(0x14e))/0xb;if(_0x1a4abe===_0x4845a3)break;else _0x5460cf['push'](_0x5460cf['shift']());}catch(_0x50cac0){_0x5460cf['push'](_0x5460cf['shift']());}}}(a187_0x5152,0x29d4a));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_0x331d4a(0x14f)};function trimOptional(_0x3c0e4a){return _0x3c0e4a?.['trim']()||undefined;}export function buildCustomPageRuntimeUrl(_0x44344f,_0x36a986){const _0x59dba2=trimOptional(_0x44344f),_0x24477d=trimOptional(_0x36a986);if(!_0x59dba2||!_0x24477d)return undefined;return getPublishedAppDomain(_0x59dba2)+'/'+encodeURIComponent(_0x24477d);}export function buildCustomPageDevelopmentUrl(_0x30a676,_0x5bbf8f){const _0x2e6e85=trimOptional(_0x30a676),_0x2d1615=trimOptional(_0x5bbf8f);if(!_0x2e6e85||!_0x2d1615)return undefined;return getAppBaseUrl(_0x2e6e85)+'/pages/'+encodeURIComponent(_0x2d1615);}export async function resolveCustomPageDevelopmentUrl(_0xac87e7,_0x1d898f,_0x3d2c5c){const _0x51e66c=a187_0x331d4a,_0x56c70c=trimOptional(_0xac87e7);if(!_0x56c70c)return undefined;try{const _0x59b264=(await fetchMenuSnapshot(_0x56c70c,_0x3d2c5c))[_0x51e66c(0x153)][_0x51e66c(0x150)](_0xe68de3=>_0xe68de3[_0x51e66c(0x155)]===_0x51e66c(0x14b)&&_0xe68de3['pageId']===_0x1d898f);return buildCustomPageDevelopmentUrl(_0x56c70c,_0x59b264?.[_0x51e66c(0x15e)]);}catch{return undefined;}}export function buildCustomPageEditUrl(_0x249be3,_0x4ccb23){const _0x4f73d5=a187_0x331d4a,_0x42f241=trimOptional(_0x249be3);if(!_0x42f241)return;const _0x44f08c=trimOptional(String(_0x4ccb23??''));if(!_0x44f08c)return;return getAppBaseUrl(_0x42f241)+_0x4f73d5(0x149)+encodeURIComponent(_0x44f08c);}export async function validateCustomPageContent(_0x3c7d0c){const _0x172fbc=a187_0x331d4a,_0x1ba7e1=await validateCustomPageSourceFiles(_0x3c7d0c);if(_0x1ba7e1[_0x172fbc(0x152)]>0x0)throw CliErrors[_0x172fbc(0x157)](_0x172fbc(0x158)+_0x1ba7e1[_0x172fbc(0x14a)](_0x4a5568=>_0x4a5568['file']+':\x20'+_0x4a5568[_0x172fbc(0x145)])[_0x172fbc(0x151)](';\x20'));}function a187_0x5d4f(_0x39068a,_0x1359e7){_0x39068a=_0x39068a-0x145;const _0x51526c=a187_0x5152();let _0x5d4fb5=_0x51526c[_0x39068a];return _0x5d4fb5;}export function readCustomPageId(_0x1d078c){const _0x447dec=a187_0x331d4a,_0x5a8926=_0x1d078c[_0x447dec(0x146)]('id');if(!Number[_0x447dec(0x15f)](_0x5a8926)||_0x5a8926<=0x0)throw CliErrors[_0x447dec(0x157)](_0x447dec(0x159));return _0x5a8926;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a188_0x5c2480=a188_0x155a;(function(_0x3105e7,_0x217f6f){const _0x7b0bfa=a188_0x155a,_0x82bd6e=_0x3105e7();while(!![]){try{const _0x5d498b=-parseInt(_0x7b0bfa(0x13d))/0x1+-parseInt(_0x7b0bfa(0x14a))/0x2*(-parseInt(_0x7b0bfa(0x152))/0x3)+-parseInt(_0x7b0bfa(0x13f))/0x4*(-parseInt(_0x7b0bfa(0x13c))/0x5)+parseInt(_0x7b0bfa(0x13a))/0x6+parseInt(_0x7b0bfa(0x139))/0x7+parseInt(_0x7b0bfa(0x150))/0x8*(parseInt(_0x7b0bfa(0x13e))/0x9)+parseInt(_0x7b0bfa(0x140))/0xa*(-parseInt(_0x7b0bfa(0x153))/0xb);if(_0x5d498b===_0x217f6f)break;else _0x82bd6e['push'](_0x82bd6e['shift']());}catch(_0x1af0c7){_0x82bd6e['push'](_0x82bd6e['shift']());}}}(a188_0x7e42,0xb84fd));function a188_0x155a(_0x3d713d,_0x2936d6){_0x3d713d=_0x3d713d-0x139;const _0x7e429d=a188_0x7e42();let _0x155a40=_0x7e429d[_0x3d713d];return _0x155a40;}import{format}from'prettier';function a188_0x7e42(){const _0x59baa9=['babel','all','Missing\x20React\x20source\x20file\x20with\x20extension\x20.jsx\x20or\x20.tsx','.tsx','message','some','toLowerCase','.jsx','2ndndnb','trim','entries','map','typescript','find','363360iCQqOy','endsWith','3793947HZWIxM','1021790xCSIBm','9907982SrQZVX','5500338wRDbMz','filter','105NHHOha','1196278ZoKYUk','99TxcpAm','33724qnctbo','250HfIPVc','page\x20files'];a188_0x7e42=function(){return _0x59baa9;};return a188_0x7e42();}const SOURCE_PARSERS={'.js':a188_0x5c2480(0x142),'.jsx':a188_0x5c2480(0x142),'.ts':a188_0x5c2480(0x14e),'.tsx':a188_0x5c2480(0x14e)},CUSTOM_PAGE_EXTENSIONS=[a188_0x5c2480(0x149),a188_0x5c2480(0x145)];export async function validateCustomPageSourceFiles(_0x6670e6){const _0x259ac5=a188_0x5c2480,_0x5e9822=Object[_0x259ac5(0x14c)](_0x6670e6)['filter'](([_0x422e9f])=>getParser(_0x422e9f));if(!_0x5e9822['some'](([_0x14a8e9])=>isReactSourceFile(_0x14a8e9)))return[{'file':_0x259ac5(0x141),'message':_0x259ac5(0x144)}];const _0x414546=await Promise[_0x259ac5(0x143)](_0x5e9822[_0x259ac5(0x14d)](async([_0x179af4,_0x2412b0])=>{const _0x1de355=_0x259ac5;try{return await format(_0x2412b0,{'parser':getParser(_0x179af4)}),undefined;}catch(_0x34e1cb){return{'file':_0x179af4,'message':_0x34e1cb instanceof Error?_0x34e1cb[_0x1de355(0x146)]:String(_0x34e1cb)};}}));return _0x414546[_0x259ac5(0x13b)](_0x469a4a=>_0x469a4a!==undefined);}function getParser(_0x294090){const _0x43de3b=a188_0x5c2480,_0x457f8c=_0x294090['trim']()[_0x43de3b(0x148)]();return Object['entries'](SOURCE_PARSERS)[_0x43de3b(0x14f)](([_0x1ca257])=>_0x457f8c[_0x43de3b(0x151)](_0x1ca257))?.[0x1];}function isReactSourceFile(_0x8b23b5){const _0xfdb3e1=a188_0x5c2480,_0x269a26=_0x8b23b5[_0xfdb3e1(0x14b)]()[_0xfdb3e1(0x148)]();return CUSTOM_PAGE_EXTENSIONS[_0xfdb3e1(0x147)](_0x2aac70=>_0x269a26[_0xfdb3e1(0x151)](_0x2aac70));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a189_0x552dd6=a189_0x39a6;(function(_0x4b6880,_0x555728){const _0x5b66eb=a189_0x39a6,_0x25a93a=_0x4b6880();while(!![]){try{const _0x54cd50=parseInt(_0x5b66eb(0x1d8))/0x1*(-parseInt(_0x5b66eb(0x1c1))/0x2)+-parseInt(_0x5b66eb(0x1b7))/0x3*(-parseInt(_0x5b66eb(0x1cf))/0x4)+parseInt(_0x5b66eb(0x1c6))/0x5+parseInt(_0x5b66eb(0x1c5))/0x6*(-parseInt(_0x5b66eb(0x1b5))/0x7)+-parseInt(_0x5b66eb(0x1b8))/0x8+parseInt(_0x5b66eb(0x1c0))/0x9*(-parseInt(_0x5b66eb(0x1cd))/0xa)+parseInt(_0x5b66eb(0x1d2))/0xb*(parseInt(_0x5b66eb(0x1c3))/0xc);if(_0x54cd50===_0x555728)break;else _0x25a93a['push'](_0x25a93a['shift']());}catch(_0xa12ef){_0x25a93a['push'](_0x25a93a['shift']());}}}(a189_0x44e9,0x3bbc1));import{getCustomPageSource,updateCustomPageContent}from'../../../core/api-client.js';import{readCustomPageDirectory}from'../../../core/page/file-system.js';function a189_0x44e9(){const _0x210c0b=['write','/smartapi/webcode/page/update/content','pageId','97mLDlLy','Updated\x20Custom\x20Page\x20','newVersion','appcode','Directory\x20containing\x20all\x20complete\x20page\x20files','custom-update','147KzomHJ','validation','15nXuzhA','2642832SaCWkR','appCode','page-content','apiError','string','str','compress','POST','9UvWkpC','3158jfGfiE','Custom\x20Page\x20ID','1695132cvOqSu','Custom\x20Page\x20was\x20updated,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','32694aPSFFt','203935bGzqaq','Would\x20save\x20all\x20files\x20of\x20Custom\x20Page\x20','page-dir','isInteger','Cannot\x20determine\x20the\x20appCode\x20for\x20Custom\x20Page\x20','Custom\x20Page\x20update\x20did\x20not\x20create\x20a\x20new\x20version.','page','449070cyIHca','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','225356AHsunJ','trim','page\x20custom-update\x20no\x20longer\x20accepts\x20--page-content.','44ybmJmN','pageContent','Save\x20all\x20files\x20of\x20a\x20Custom\x20Page'];a189_0x44e9=function(){return _0x210c0b;};return a189_0x44e9();}import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,resolveCustomPageDevelopmentUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,validateCustomPageContent}from'./shared.js';function a189_0x39a6(_0x4e14e1,_0x14c330){_0x4e14e1=_0x4e14e1-0x1b1;const _0x44e9a8=a189_0x44e9();let _0x39a655=_0x44e9a8[_0x4e14e1];return _0x39a655;}export const pageCustomUpdate={'service':a189_0x552dd6(0x1cc),'command':a189_0x552dd6(0x1b4),'description':a189_0x552dd6(0x1d4),'risk':a189_0x552dd6(0x1d5),'defaultOutputFormat':a189_0x552dd6(0x1be),'structuredErrors':!![],'requiresAppCode':![],'rejectedFlags':[{'name':a189_0x552dd6(0x1ba),'message':a189_0x552dd6(0x1d1),'hint':a189_0x552dd6(0x1ce)}],'flags':[{'name':'id','type':'number','required':!![],'description':a189_0x552dd6(0x1c2)},{'name':a189_0x552dd6(0x1c8),'type':a189_0x552dd6(0x1bc),'required':!![],'description':a189_0x552dd6(0x1b3)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x49a99a){readCustomPageId(_0x49a99a),await readValidatedPageContent(_0x49a99a);},async 'dryRun'(_0x1cc040){const _0x497862=a189_0x552dd6,_0x9bcdf0=await readInput(_0x1cc040);return{'method':_0x497862(0x1bf),'url':_0x497862(0x1d6),'body':{'id':_0x9bcdf0['pageId'],'codeContent':_0x9bcdf0[_0x497862(0x1d3)]},'description':_0x497862(0x1c7)+_0x9bcdf0[_0x497862(0x1d7)]+'.'};},async 'execute'(_0x4a868c){const _0x1cfa44=a189_0x552dd6,_0x542b72=await readInput(_0x4a868c),_0x2a2e97=await updateCustomPageContent({'pageId':_0x542b72[_0x1cfa44(0x1d7)],'pageContent':_0x542b72[_0x1cfa44(0x1d3)]});if(!Number[_0x1cfa44(0x1c9)](_0x2a2e97[_0x1cfa44(0x1b1)])||_0x2a2e97['newVersion']<=0x0)throw CliErrors[_0x1cfa44(0x1bb)](_0x1cfa44(0x1cb));const _0xbeb8fc=buildCustomPageEditUrl(_0x542b72[_0x1cfa44(0x1b9)],_0x542b72['pageId']),_0x477763=await resolveCustomPageDevelopmentUrl(_0x542b72[_0x1cfa44(0x1b9)],_0x542b72['pageId'],_0x4a868c['cookie']);return{'ok':!![],'data':{'operation':'page.custom-update','selector':{'appCode':_0x542b72[_0x1cfa44(0x1b9)],'pageId':_0x542b72[_0x1cfa44(0x1d7)]},'before':null,'after':{'pageId':_0x2a2e97[_0x1cfa44(0x1d7)],'version':_0x2a2e97[_0x1cfa44(0x1b1)],'pageContent':_0x542b72[_0x1cfa44(0x1d3)]},'dryRun':![],'request':_0x542b72,..._0x477763?{'pageUrl':_0x477763}:{},..._0xbeb8fc?{'editPageUrl':_0xbeb8fc}:{},'warnings':_0x477763?[]:[_0x1cfa44(0x1c4)]},'message':_0x1cfa44(0x1d9)+_0x542b72[_0x1cfa44(0x1d7)]+'.'};}};async function readInput(_0x53de09){const _0x124d42=a189_0x552dd6,_0x5e9193=readCustomPageId(_0x53de09),_0x3d611b=_0x53de09[_0x124d42(0x1bd)](_0x124d42(0x1b2))[_0x124d42(0x1d0)]()||(await getCustomPageSource(_0x5e9193))[_0x124d42(0x1b9)]?.[_0x124d42(0x1d0)]();if(!_0x3d611b)throw CliErrors[_0x124d42(0x1b6)](_0x124d42(0x1ca)+_0x5e9193+'.');return{'appCode':_0x3d611b,'pageId':_0x5e9193,'pageContent':await readValidatedPageContent(_0x53de09)};}async function readValidatedPageContent(_0x2a7852){const _0x53cd87=a189_0x552dd6,_0x465d59=await readCustomPageDirectory(_0x2a7852[_0x53cd87(0x1bd)]('page-dir'));return await validateCustomPageContent(_0x465d59),_0x465d59;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a190_0x4dd9(_0x4fa1c8,_0x190a48){_0x4fa1c8=_0x4fa1c8-0x181;const _0x54819e=a190_0x5481();let _0x4dd91e=_0x54819e[_0x4fa1c8];return _0x4dd91e;}const a190_0x3d8a1f=a190_0x4dd9;(function(_0x25ce63,_0x1c88ae){const _0x50beb8=a190_0x4dd9,_0x2e85ab=_0x25ce63();while(!![]){try{const _0x18136e=parseInt(_0x50beb8(0x194))/0x1*(-parseInt(_0x50beb8(0x18d))/0x2)+-parseInt(_0x50beb8(0x1a0))/0x3+-parseInt(_0x50beb8(0x19a))/0x4*(parseInt(_0x50beb8(0x18e))/0x5)+-parseInt(_0x50beb8(0x183))/0x6*(-parseInt(_0x50beb8(0x184))/0x7)+parseInt(_0x50beb8(0x19d))/0x8*(-parseInt(_0x50beb8(0x196))/0x9)+-parseInt(_0x50beb8(0x193))/0xa*(parseInt(_0x50beb8(0x18c))/0xb)+-parseInt(_0x50beb8(0x197))/0xc*(-parseInt(_0x50beb8(0x192))/0xd);if(_0x18136e===_0x1c88ae)break;else _0x2e85ab['push'](_0x2e85ab['shift']());}catch(_0x53f21f){_0x2e85ab['push'](_0x2e85ab['shift']());}}}(a190_0x5481,0x4f257));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a190_0x5481(){const _0x347ef9=['365631IJyQBn','name','manualResolutionRequired','134886xGHbnq','14khQumm','page','/standard-page-status?appCode=','query-data-list-status','appCode','related-pages-fallback','length','data-list-status','1934229dwHomU','24008GwUYeA','375815TLyodt','relatedPages','Query\x20Data\x20List\x20Page\x20facts\x20for\x20a\x20dataset','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','13762489yHhvNO','10TPxTFu','1dlZRBj','alias','281691iaBRZD','12xtMWCs','code','GET','20syytEX','status','read','24lIfTjz','nextAction','compress'];a190_0x5481=function(){return _0x347ef9;};return a190_0x5481();}import{assessDataListPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';export const pageDataListStatus={'service':a190_0x3d8a1f(0x185),'command':a190_0x3d8a1f(0x18b),'description':a190_0x3d8a1f(0x190),'risk':a190_0x3d8a1f(0x19c),'defaultOutputFormat':a190_0x3d8a1f(0x19f),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a190_0x3d8a1f(0x195),'type':'string','description':a190_0x3d8a1f(0x191)}],async 'validate'(_0x47e09d){validateDatasetSelector(_0x47e09d);},async 'dryRun'(_0x22a2c6){const _0x33de64=a190_0x3d8a1f,_0x1f95f2=await loadDatasetDetailForPage(_0x22a2c6);return{'method':_0x33de64(0x199),'url':'/smartapi/lovrabet/dataset/'+_0x1f95f2[_0x33de64(0x198)]+_0x33de64(0x186)+encodeURIComponent(_0x22a2c6[_0x33de64(0x188)]),'description':serializeDryRunDescription({'dataset':{'id':_0x1f95f2['id'],'code':_0x1f95f2[_0x33de64(0x198)],'name':_0x1f95f2[_0x33de64(0x181)]},'action':_0x33de64(0x187)})};},async 'execute'(_0xd5580f){const _0x3bdc87=a190_0x3d8a1f,_0x369460=await loadDatasetDetailForPage(_0xd5580f),_0x1469ff=await loadDataListPageStatusForGenerate(_0xd5580f,_0x369460[_0x3bdc87(0x198)]),_0x27cf4b=getUndeletedRelatedPages(_0x369460),_0x13f93a=assessDataListPageState(_0x369460['code'],_0x1469ff,{'fallbackUndeletedPages':_0x27cf4b});return{'ok':!![],'data':{'datasetCode':_0x369460[_0x3bdc87(0x198)],'precheckSource':_0x1469ff?.['source']??_0x3bdc87(0x189),'status':_0x13f93a[_0x3bdc87(0x19b)],'manualResolutionRequired':_0x13f93a[_0x3bdc87(0x182)],'nextAction':_0x13f93a[_0x3bdc87(0x19e)],'dataListPageStatus':_0x1469ff,'relatedPages':{'total':_0x369460[_0x3bdc87(0x18f)][_0x3bdc87(0x18a)],'undeletedCount':_0x27cf4b[_0x3bdc87(0x18a)]}}};}};
|