@lovrabet/rabetbase-cli 2.5.8 → 2.5.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.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/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.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/page-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.d.ts +8 -5
- 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/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.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/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.d.ts +5 -3
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +14 -11
- 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-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-management-client.d.ts +2 -2
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.d.ts +3 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.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/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase/references/rabetbase-kb.md +17 -15
- package/skills/rabetbase/references/rabetbase-rule.md +8 -6
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a232_0x5814e9=a232_0xb8e5;(function(_0x294114,_0x1e43a7){const _0x147981=a232_0xb8e5,_0x37ea5a=_0x294114();while(!![]){try{const _0x312827=parseInt(_0x147981(0x18f))/0x1*(parseInt(_0x147981(0x198))/0x2)+-parseInt(_0x147981(0x18c))/0x3*(-parseInt(_0x147981(0x191))/0x4)+-parseInt(_0x147981(0x19b))/0x5*(-parseInt(_0x147981(0x199))/0x6)+parseInt(_0x147981(0x197))/0x7*(-parseInt(_0x147981(0x193))/0x8)+-parseInt(_0x147981(0x18b))/0x9+parseInt(_0x147981(0x18a))/0xa+parseInt(_0x147981(0x192))/0xb*(-parseInt(_0x147981(0x196))/0xc);if(_0x312827===_0x1e43a7)break;else _0x37ea5a['push'](_0x37ea5a['shift']());}catch(_0x49cc1d){_0x37ea5a['push'](_0x37ea5a['shift']());}}}(a232_0x2167,0xe512d));function a232_0xb8e5(_0x7023a8,_0x574a3e){_0x7023a8=_0x7023a8-0x189;const _0x21677d=a232_0x2167();let _0xb8e52d=_0x21677d[_0x7023a8];return _0xb8e52d;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';function a232_0x2167(){const _0x1820a0=['17350152qZCkmN','497mrdJdc','14usDXCG','11009472dAkRJK','roleName','5CEoTej','Show\x20a\x20single\x20role\x27s\x20detail','dev','roleType','1173820fyyMwq','11909925JuXmen','10677obehEE','role','appCode','197431ReoLid','read','996OBigeV','11qKBflq','57808YXnCdZ','Role\x20','detail'];a232_0x2167=function(){return _0x1820a0;};return a232_0x2167();}export const roleDetail={'service':a232_0x5814e9(0x18d),'command':a232_0x5814e9(0x195),'description':a232_0x5814e9(0x19c),'risk':a232_0x5814e9(0x190),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x11484d){const _0x155b66=a232_0x5814e9,_0x416d84=_0x11484d['num']('id'),_0x2fab7f=await getRoleById(_0x11484d[_0x155b66(0x18e)],_0x416d84);return{'ok':!![],'data':{'scope':_0x155b66(0x19d),'role':projectRole(_0x2fab7f)},'message':_0x155b66(0x194)+_0x2fab7f[_0x155b66(0x19a)]+'\x20('+_0x2fab7f[_0x155b66(0x189)]+')'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x135853,_0x2f66b3){const _0x16cd9a=a233_0x3c2d,_0x106168=_0x135853();while(!![]){try{const _0x2ca844=parseInt(_0x16cd9a(0x99))/0x1+parseInt(_0x16cd9a(0x94))/0x2+parseInt(_0x16cd9a(0x95))/0x3*(parseInt(_0x16cd9a(0x9c))/0x4)+-parseInt(_0x16cd9a(0x9a))/0x5*(parseInt(_0x16cd9a(0x92))/0x6)+-parseInt(_0x16cd9a(0x9b))/0x7*(-parseInt(_0x16cd9a(0x98))/0x8)+parseInt(_0x16cd9a(0x96))/0x9*(-parseInt(_0x16cd9a(0x9d))/0xa)+parseInt(_0x16cd9a(0x97))/0xb*(-parseInt(_0x16cd9a(0x93))/0xc);if(_0x2ca844===_0x2f66b3)break;else _0x106168['push'](_0x106168['shift']());}catch(_0x88ffff){_0x106168['push'](_0x106168['shift']());}}}(a233_0x14c5,0x7c526));import{roleList}from'../../commands/role/list.js';function a233_0x14c5(){const _0x55b6a1=['1723445jYBgTs','7BgJxzz','24UaucIh','93080jewpnv','6DPyTfx','1092972RihxYX','1372058VIJCUS','463881XMadhH','909gRrvjS','77PfpDlG','5474864pHqCFu','133437Ebndfn'];a233_0x14c5=function(){return _0x55b6a1;};return a233_0x14c5();}import{roleDetail}from'../../commands/role/detail.js';import{roleUpdate}from'../../commands/role/update.js';import{roleDelete}from'../../commands/role/delete.js';import{roleUserResolve}from'../../commands/role/user-resolve.js';function a233_0x3c2d(_0x2ab53a,_0x4f2f4f){_0x2ab53a=_0x2ab53a-0x92;const _0x14c558=a233_0x14c5();let _0x3c2dc4=_0x14c558[_0x2ab53a];return _0x3c2dc4;}import{roleUserAdd}from'../../commands/role/user-add.js';import{roleUserRemove}from'../../commands/role/user-remove.js';export const roleDefinitions=[roleList,roleDetail,roleUpdate,roleDelete,roleUserResolve,roleUserAdd,roleUserRemove];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a234_0x3a13cd=a234_0x2278;function a234_0x1d6f(){const _0x39159d=['1204116dHNgTy','toUpperCase','list','Use\x20one\x20of:\x20','roleType','34753UykZTD','num','3020AfppGm','Filter\x20by\x20role\x20type','DEV','pagesize','length','Page\x20index\x20(1-based)','ADMIN','774720MmHQGt','30KrehcH','type','List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','2SGPUMm','string','appCode','4517755VinBJY','--pagesize\x20must\x20be\x20between\x201\x20and\x20100.','str','validation','join','Invalid\x20--type\x20\x22','1389czAhvs','7sCzPcs','role','452775ZHDNzj','read','includes','\x20role(s)','dev','CUSTOM','number','OWNER','trim','page','3052368XImCUC'];a234_0x1d6f=function(){return _0x39159d;};return a234_0x1d6f();}(function(_0x48a4cb,_0x246c5e){const _0x5c7c3e=a234_0x2278,_0xcfc66b=_0x48a4cb();while(!![]){try{const _0x212fbb=-parseInt(_0x5c7c3e(0x1ee))/0x1*(-parseInt(_0x5c7c3e(0x1fb))/0x2)+-parseInt(_0x5c7c3e(0x204))/0x3*(parseInt(_0x5c7c3e(0x1f0))/0x4)+-parseInt(_0x5c7c3e(0x207))/0x5+parseInt(_0x5c7c3e(0x212))/0x6*(-parseInt(_0x5c7c3e(0x205))/0x7)+-parseInt(_0x5c7c3e(0x1f7))/0x8+-parseInt(_0x5c7c3e(0x211))/0x9+-parseInt(_0x5c7c3e(0x1f8))/0xa*(-parseInt(_0x5c7c3e(0x1fe))/0xb);if(_0x212fbb===_0x246c5e)break;else _0xcfc66b['push'](_0xcfc66b['shift']());}catch(_0x2a9134){_0xcfc66b['push'](_0xcfc66b['shift']());}}}(a234_0x1d6f,0x2e676));import{listAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectRole}from'../../commands/role/shared.js';const ROLE_TYPES=[a234_0x3a13cd(0x1f6),a234_0x3a13cd(0x1f2),a234_0x3a13cd(0x20e),a234_0x3a13cd(0x20c)];function a234_0x2278(_0x3a8350,_0x10f0ba){_0x3a8350=_0x3a8350-0x1ee;const _0x1d6f20=a234_0x1d6f();let _0x2278f6=_0x1d6f20[_0x3a8350];return _0x2278f6;}export const roleList={'service':a234_0x3a13cd(0x206),'command':a234_0x3a13cd(0x214),'description':a234_0x3a13cd(0x1fa),'risk':a234_0x3a13cd(0x208),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':a234_0x3a13cd(0x1fc),'required':![],'description':a234_0x3a13cd(0x1f1),'enum':ROLE_TYPES},{'name':a234_0x3a13cd(0x210),'type':a234_0x3a13cd(0x20d),'description':a234_0x3a13cd(0x1f5),'default':0x1},{'name':a234_0x3a13cd(0x1f3),'type':'number','description':'Page\x20size\x20(1-100)','default':0x64}],async 'validate'(_0x4095df){const _0x1834cf=a234_0x3a13cd,_0x1a6e79=_0x4095df[_0x1834cf(0x200)](_0x1834cf(0x1f9))[_0x1834cf(0x20f)]();if(_0x1a6e79&&!ROLE_TYPES[_0x1834cf(0x209)](_0x1a6e79[_0x1834cf(0x213)]()))throw CliErrors[_0x1834cf(0x201)](_0x1834cf(0x203)+_0x1a6e79+'\x22.',_0x1834cf(0x215)+ROLE_TYPES[_0x1834cf(0x202)](',\x20')+'.');const _0x460a4e=_0x4095df[_0x1834cf(0x1ef)]('page',0x1),_0x1fcfd0=_0x4095df[_0x1834cf(0x1ef)](_0x1834cf(0x1f3),0x64);if(_0x460a4e<0x1)throw CliErrors[_0x1834cf(0x201)]('--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.');if(_0x1fcfd0<0x1||_0x1fcfd0>0x64)throw CliErrors[_0x1834cf(0x201)](_0x1834cf(0x1ff));},async 'execute'(_0x32b55a){const _0x562e78=a234_0x3a13cd,_0x4e0764=_0x32b55a['num'](_0x562e78(0x210),0x1)||0x1,_0x422330=_0x32b55a[_0x562e78(0x1ef)](_0x562e78(0x1f3),0x64)||0x64,_0x211919=_0x32b55a['str'](_0x562e78(0x1f9))[_0x562e78(0x20f)]()[_0x562e78(0x213)](),{items:_0xa44b65,paging:_0x113587}=await listAppRoles(_0x32b55a[_0x562e78(0x1fd)],{'currentPage':_0x4e0764,'pageSize':_0x422330}),_0x3a9029=_0x211919?_0xa44b65['filter'](_0x2b06fa=>_0x2b06fa[_0x562e78(0x216)]===_0x211919):_0xa44b65,_0x3f3f58=_0x3a9029['map'](projectRole);return{'ok':!![],'data':{'scope':_0x562e78(0x20b),'roles':_0x3f3f58,'paging':_0x113587},'message':'Found\x20'+_0x3f3f58[_0x562e78(0x1f4)]+_0x562e78(0x20a)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a235_0x278682=a235_0x2021;(function(_0x3131a1,_0x5659fc){const _0x1ee2c4=a235_0x2021,_0x31285f=_0x3131a1();while(!![]){try{const _0x4e1fc4=-parseInt(_0x1ee2c4(0x11a))/0x1*(parseInt(_0x1ee2c4(0x108))/0x2)+-parseInt(_0x1ee2c4(0x120))/0x3*(-parseInt(_0x1ee2c4(0x116))/0x4)+parseInt(_0x1ee2c4(0x119))/0x5*(-parseInt(_0x1ee2c4(0xdb))/0x6)+parseInt(_0x1ee2c4(0xdd))/0x7*(parseInt(_0x1ee2c4(0xf6))/0x8)+-parseInt(_0x1ee2c4(0x11b))/0x9+parseInt(_0x1ee2c4(0xfc))/0xa*(parseInt(_0x1ee2c4(0x109))/0xb)+parseInt(_0x1ee2c4(0xf1))/0xc;if(_0x4e1fc4===_0x5659fc)break;else _0x31285f['push'](_0x31285f['shift']());}catch(_0x421a9a){_0x31285f['push'](_0x31285f['shift']());}}}(a235_0x2329,0x54120));import{getTenantMembers,listDevUserRoleRelations,listAppRoles}from'../../core/api-client.js';import{getSessionUserInfo}from'../../auth/get-session-user.js';import{CliErrors}from'../../errors.js';export const ROLE_ID_FLAG={'name':'id','type':'number','required':!![],'description':a235_0x278682(0x103)};export const ROLE_REF_FLAG={'name':a235_0x278682(0x104),'type':a235_0x278682(0xf5),'required':!![],'description':a235_0x278682(0xd2)};export const USER_REF_FLAG={'name':a235_0x278682(0xec),'type':a235_0x278682(0xf5),'required':!![],'description':'User\x20id,\x20username,\x20or\x20nickname\x20to\x20resolve\x20to\x20a\x20userId'};export const NAME_FLAG={'name':a235_0x278682(0xe5),'type':'string','required':!![],'description':a235_0x278682(0x10e)};export const USER_NAME_FLAG={'name':a235_0x278682(0xe5),'type':'string','required':!![],'description':'Nickname\x20or\x20username\x20to\x20resolve\x20to\x20a\x20userId'};export const REMARK_FLAG={'name':a235_0x278682(0x11d),'type':'string','required':![],'description':a235_0x278682(0x107)};export const EXPECT_USER_COUNT_FLAG={'name':a235_0x278682(0xe3),'type':a235_0x278682(0x10d),'required':![],'description':a235_0x278682(0xdf)};export const BUILTIN_ROLE_TYPES=[a235_0x278682(0xe1),'DEV',a235_0x278682(0xed)];export function isBuiltinRole(_0x56de95){const _0x425141=a235_0x278682;return BUILTIN_ROLE_TYPES[_0x425141(0x117)](_0x56de95);}export function assertCustomRole(_0x17cf93,_0x3537e2){const _0x574307=a235_0x278682;if(_0x17cf93[_0x574307(0xfd)]!==_0x574307(0xe8))throw CliErrors[_0x574307(0x115)](_0x574307(0x123)+_0x3537e2+_0x574307(0xff)+_0x17cf93['roleName']+'\x20('+_0x17cf93[_0x574307(0xfd)]+').',_0x574307(0xd8));}export function projectRole(_0x58cb29){const _0xc6ac67=a235_0x278682;return{'id':_0x58cb29['id'],'roleName':_0x58cb29['roleName'],'roleType':_0x58cb29['roleType'],'remark':_0x58cb29[_0xc6ac67(0x11d)],'userCount':_0x58cb29[_0xc6ac67(0xe0)],'permitCount':_0x58cb29[_0xc6ac67(0xf3)],'builtin':isBuiltinRole(_0x58cb29[_0xc6ac67(0xfd)])};}export async function resolveRoleRef(_0x38f1e3,_0x1ff57c){const _0x52c546=a235_0x278682,_0x41b191=_0x1ff57c[_0x52c546(0xea)]();if(!_0x41b191)throw CliErrors[_0x52c546(0x115)](_0x52c546(0xf0),_0x52c546(0xe9));if(/^\d+$/[_0x52c546(0xf8)](_0x41b191))return getRoleById(_0x38f1e3,Number(_0x41b191));const _0x251419=await listAllAppRoles(_0x38f1e3),_0x1fe1b3=_0x251419[_0x52c546(0xd7)](_0x26a61c=>_0x26a61c[_0x52c546(0x118)]===_0x41b191);if(_0x1fe1b3['length']===0x0)throw CliErrors[_0x52c546(0x115)](_0x52c546(0x113)+_0x41b191+'\x22\x20not\x20found\x20in\x20app\x20'+_0x38f1e3+'.',_0x52c546(0xfb));if(_0x1fe1b3[_0x52c546(0x111)]>0x1){const _0x76764f=_0x1fe1b3[_0x52c546(0x114)](_0x4f5eb2=>_0x4f5eb2['id'])['join'](',\x20');throw CliErrors['validation'](_0x52c546(0x113)+_0x41b191+_0x52c546(0x100)+_0x76764f+').','Disambiguate\x20with\x20--role\x20<id>.');}return _0x1fe1b3[0x0];}function a235_0x2021(_0x1766f2,_0x48a041){_0x1766f2=_0x1766f2-0xd1;const _0x23293e=a235_0x2329();let _0x202110=_0x23293e[_0x1766f2];return _0x202110;}export async function getRoleById(_0x528042,_0x4432b5){const _0x34f35b=a235_0x278682,_0x14f015=await listAllAppRoles(_0x528042),_0x336290=_0x14f015[_0x34f35b(0xd7)](_0x5754fc=>_0x5754fc['id']===_0x4432b5&&(!_0x5754fc['appCode']||_0x5754fc[_0x34f35b(0x110)]===_0x528042));if(_0x336290[_0x34f35b(0x111)]!==0x1)throw CliErrors[_0x34f35b(0x115)](_0x34f35b(0xee)+_0x4432b5+'\x20not\x20found\x20in\x20app\x20'+_0x528042+'.',_0x34f35b(0x101));return _0x336290[0x0];}async function listAllAppRoles(_0x2ddc48){const _0x193cd2=a235_0x278682,_0x21592e=0x64,_0x586014=[];for(let _0x970b08=0x1;;_0x970b08+=0x1){const {items:_0x54a536,paging:_0x13eb00}=await listAppRoles(_0x2ddc48,{'currentPage':_0x970b08,'pageSize':_0x21592e});_0x586014['push'](..._0x54a536);if(_0x54a536[_0x193cd2(0x111)]<_0x21592e||_0x13eb00&&_0x586014[_0x193cd2(0x111)]>=_0x13eb00['totalCount'])return _0x586014;}}export async function resolveTenantCode(){const _0x13f024=a235_0x278682,_0x168ed6=await getSessionUserInfo(),_0x218fd3=_0x168ed6?.[_0x13f024(0xec)]?.[_0x13f024(0xf9)]?.[_0x13f024(0x11e)];if(!_0x218fd3)throw CliErrors[_0x13f024(0xf7)](_0x13f024(0xd4));return _0x218fd3;}function matchMember(_0x396edc,_0x2aea9b){const _0x3b028d=a235_0x278682,_0x589f02=_0x2aea9b['trim']()[_0x3b028d(0x10b)]();return(_0x396edc[_0x3b028d(0xe7)]??'')[_0x3b028d(0x10b)]()===_0x589f02||(_0x396edc[_0x3b028d(0xe6)]??'')[_0x3b028d(0x10b)]()===_0x589f02;}export async function resolveUserRef(_0x2c6faf,_0x2b718f=a235_0x278682(0xda)){const _0xc27edd=a235_0x278682,_0x4698a6=_0x2c6faf[_0xc27edd(0xea)]();if(!_0x4698a6)throw CliErrors[_0xc27edd(0x115)](_0xc27edd(0xfe),_0xc27edd(0x10c));const _0x107234=await resolveTenantCode(),_0x30fd0e=await getTenantMembers(_0x107234);if(/^\d+$/[_0xc27edd(0xf8)](_0x4698a6)){const _0x4130d6=Number(_0x4698a6),_0x5d137e=_0x30fd0e[_0xc27edd(0x121)](_0x27fa04=>_0x27fa04[_0xc27edd(0xe2)]===_0x4130d6);return{'userId':_0x4130d6,'username':_0x5d137e?.[_0xc27edd(0xe6)]??String(_0x4130d6),'nickname':_0x5d137e?.[_0xc27edd(0xe7)],'matchedBy':'id'};}const _0x44d887=_0x30fd0e[_0xc27edd(0xd7)](_0x407d8f=>matchMember(_0x407d8f,_0x4698a6));if(_0x44d887[_0xc27edd(0x111)]===0x0)throw CliErrors[_0xc27edd(0x115)](_0xc27edd(0xd9)+_0x4698a6+'\x22.','Check\x20the\x20nickname/username.\x20'+_0x2b718f);if(_0x44d887['length']>0x1){const _0x2d6a0d=_0x44d887['map'](_0x238351=>(_0x238351[_0xc27edd(0xe7)]??_0x238351[_0xc27edd(0xe6)]??'?')+'('+_0x238351[_0xc27edd(0xe2)]+')')[_0xc27edd(0xd6)](',\x20');throw CliErrors[_0xc27edd(0x115)](_0xc27edd(0x11f)+_0x4698a6+'\x22:\x20'+_0x2d6a0d+'.',_0x2b718f);}const _0x48597b=_0x44d887[0x0];return{'userId':_0x48597b[_0xc27edd(0xe2)],'username':_0x48597b['username']??String(_0x48597b[_0xc27edd(0xe2)]),'nickname':_0x48597b['nickname'],'matchedBy':_0xc27edd(0xe5)};}export const CREATE_USER_ROLE_PATH=a235_0x278682(0xf2);function a235_0x2329(){const _0x53e7f6=['Pass\x20--user\x20<id>.','726hgtgGv','Use\x20the\x20platform\x20ownership-transfer\x20workflow\x20to\x20change\x20the\x20application\x20owner.','11074urRktI','user-add','Anti-drift\x20guard:\x20fail\x20if\x20the\x20role\x27s\x20current\x20member\x20count\x20differs','userCount','ADMIN','userId','expect-user-count','\x20is\x20not\x20a\x20member\x20of\x20role\x20','name','username','nickname','CUSTOM','Pass\x20--role\x20<id|name>.','trim','expectUserCount','user','OWNER','Role\x20id\x20','totalCount','Missing\x20role\x20reference.','8487204VTUnHe','/smartapi/permit/user-role/create','permitCount','\x20duplicate\x20memberships\x20for\x20user\x20','string','2928ykclNm','authRequired','test','tenant','/smartapi/permit/user-role/delete','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles,\x20or\x20pass\x20--role\x20<id>.','5390bKohQS','roleType','Missing\x20user\x20reference.','\x20built-in\x20role\x20','\x22\x20is\x20ambiguous\x20(ids:\x20','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.','str','Role\x20id\x20(from\x20`role\x20list`)','role','push','User\x20','Optional\x20role\x20remark/description','502vOjrry','4829JHBUGJ',';\x20no\x20change.','toLowerCase','Pass\x20--user\x20<id|name>.','number','Role\x20name','POST','appCode','length','\x20members\x20of\x20the\x20OWNER\x20role.','Role\x20name\x20\x22','map','validation','1257868yIMWwu','includes','roleName','7315TBpQuX','2673hqGUJr','5805621DpcEkx','flag','remark','tenant_code','Multiple\x20tenant\x20members\x20match\x20\x22','3WXPWKk','find','Removed\x20','Cannot\x20','\x20is\x20already\x20a\x20member\x20of\x20role\x20','Role\x20id\x20or\x20exact\x20role\x20name','flagMissing','Cannot\x20resolve\x20current\x20tenant.\x20Run\x20`rabetbase\x20auth\x20login`\x20first.','Re-run\x20`role\x20detail`\x20/\x20`role\x20list`\x20and\x20retry\x20with\x20the\x20current\x20count.','join','filter','Only\x20CUSTOM\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','No\x20tenant\x20member\x20matches\x20\x22'];a235_0x2329=function(){return _0x53e7f6;};return a235_0x2329();}export const DELETE_USER_ROLE_PATH=a235_0x278682(0xfa);export function computeRoleUserMutation(_0x1acd57){const _0x28b4f2=a235_0x278682,{operation:_0x3b8065,appCode:_0x16e491,role:_0x5050ba,relations:_0x8072f4,user:_0x427d73}=_0x1acd57,_0x234327=[...new Set(_0x8072f4[_0x28b4f2(0x114)](_0x40f09c=>_0x40f09c[_0x28b4f2(0xe2)]))],_0xa018fe=[];if(_0x1acd57[_0x28b4f2(0xeb)]!==undefined&&_0x1acd57[_0x28b4f2(0xeb)]!==_0x234327[_0x28b4f2(0x111)])throw CliErrors[_0x28b4f2(0x115)]('Anti-drift\x20check\x20failed:\x20expected\x20'+_0x1acd57['expectUserCount']+'\x20member(s)\x20but\x20role\x20has\x20'+_0x234327[_0x28b4f2(0x111)]+'.',_0x28b4f2(0xd5));const _0x113c7d=_0x234327[_0x28b4f2(0x117)](_0x427d73[_0x28b4f2(0xe2)]),_0x2f0b08=_0x8072f4['filter'](_0x2e11a4=>_0x2e11a4['userId']===_0x427d73[_0x28b4f2(0xe2)])[_0x28b4f2(0x114)](_0x8e2c97=>_0x8e2c97['id']),_0x353a72=_0x3b8065==='user-add'?!_0x113c7d:_0x113c7d;let _0x312076=_0x234327;_0x3b8065==='user-add'?_0x113c7d?_0xa018fe['push']('User\x20'+_0x427d73[_0x28b4f2(0xe2)]+_0x28b4f2(0xd1)+_0x5050ba['roleName']+_0x28b4f2(0x10a)):_0x312076=[..._0x234327,_0x427d73[_0x28b4f2(0xe2)]]:!_0x113c7d?_0xa018fe['push'](_0x28b4f2(0x106)+_0x427d73['userId']+_0x28b4f2(0xe4)+_0x5050ba['roleName']+_0x28b4f2(0x10a)):(_0x312076=_0x234327[_0x28b4f2(0xd7)](_0x4ae4d1=>_0x4ae4d1!==_0x427d73['userId']),_0x2f0b08[_0x28b4f2(0x111)]>0x1&&_0xa018fe[_0x28b4f2(0x105)](_0x28b4f2(0x122)+_0x2f0b08['length']+_0x28b4f2(0xf4)+_0x427d73[_0x28b4f2(0xe2)]+'.'));const _0x5e15f9={'scope':'dev','operation':_0x3b8065,'selector':{'appCode':_0x16e491,'roleId':_0x5050ba['id'],'roleName':_0x5050ba['roleName'],'userId':_0x427d73[_0x28b4f2(0xe2)]},'before':{'userIds':_0x234327},'after':{'userIds':_0x312076},'dryRun':_0x1acd57['dryRun'],'backend':{'method':_0x28b4f2(0x10f),'path':_0x3b8065===_0x28b4f2(0xde)?CREATE_USER_ROLE_PATH:DELETE_USER_ROLE_PATH},'warnings':_0xa018fe};return{'mutation':_0x5e15f9,'changed':_0x353a72,'matchingRelationIds':_0x2f0b08};}export async function loadDevRoleRelations(_0x5989bf,_0x6c9c40){const _0x32d70f=a235_0x278682,_0x360fcc=0x64,_0x58be30=[];for(let _0x33ea17=0x1;;_0x33ea17+=0x1){const {items:_0x476743,paging:_0x43f334}=await listDevUserRoleRelations(_0x5989bf,{'roleId':_0x6c9c40,'currentPage':_0x33ea17,'pageSize':_0x360fcc});_0x58be30[_0x32d70f(0x105)](..._0x476743);if(_0x476743[_0x32d70f(0x111)]<_0x360fcc||_0x43f334&&_0x58be30['length']>=_0x43f334[_0x32d70f(0xef)])return _0x58be30;}}export function readRoleRef(_0x1d4239){const _0x181417=a235_0x278682,_0x2c0f01=_0x1d4239[_0x181417(0x102)](_0x181417(0x104))[_0x181417(0xea)]();if(!_0x2c0f01)throw CliErrors[_0x181417(0xd3)](_0x181417(0x104),_0x181417(0xe9));return _0x2c0f01;}export async function prepareUserMutation(_0x433553,_0x189966,_0x1eafe7){const _0x5ab9db=a235_0x278682,_0x192a1d=readRoleRef(_0x433553),_0x1ba22d=_0x433553[_0x5ab9db(0x102)]('user')['trim']();if(!_0x1ba22d)throw CliErrors['flagMissing'](_0x5ab9db(0xec),_0x5ab9db(0x10c));const _0x33d9a9=_0x433553[_0x5ab9db(0x11c)]('expect-user-count'),_0x94da6f=_0x33d9a9===undefined||_0x33d9a9===null?undefined:Number(_0x33d9a9),_0x2f3117=await resolveRoleRef(_0x433553['appCode'],_0x192a1d);if(_0x2f3117[_0x5ab9db(0xfd)]===_0x5ab9db(0xed))throw CliErrors['validation']('Cannot\x20'+_0x189966+_0x5ab9db(0x112),_0x5ab9db(0xdc));const _0x1e2c92=await resolveUserRef(_0x1ba22d),_0x261891=await loadDevRoleRelations(_0x433553[_0x5ab9db(0x110)],_0x2f3117['id']);return{...computeRoleUserMutation({'operation':_0x189966,'appCode':_0x433553[_0x5ab9db(0x110)],'role':_0x2f3117,'relations':_0x261891,'user':{'userId':_0x1e2c92[_0x5ab9db(0xe2)],'username':_0x1e2c92[_0x5ab9db(0xe6)],'nickname':_0x1e2c92[_0x5ab9db(0xe7)]},'dryRun':_0x1eafe7,..._0x94da6f!==undefined?{'expectUserCount':_0x94da6f}:{}}),'role':_0x2f3117,'user':_0x1e2c92};}
|
|
1
|
+
const a235_0x26e15b=a235_0x1f9c;(function(_0x20bf64,_0x9c3507){const _0x4cc996=a235_0x1f9c,_0x421441=_0x20bf64();while(!![]){try{const _0xf41a5d=-parseInt(_0x4cc996(0x1a2))/0x1*(parseInt(_0x4cc996(0x19b))/0x2)+parseInt(_0x4cc996(0x1a3))/0x3*(-parseInt(_0x4cc996(0x197))/0x4)+parseInt(_0x4cc996(0x169))/0x5+-parseInt(_0x4cc996(0x177))/0x6+-parseInt(_0x4cc996(0x168))/0x7*(-parseInt(_0x4cc996(0x15f))/0x8)+-parseInt(_0x4cc996(0x19f))/0x9+-parseInt(_0x4cc996(0x160))/0xa*(-parseInt(_0x4cc996(0x1a8))/0xb);if(_0xf41a5d===_0x9c3507)break;else _0x421441['push'](_0x421441['shift']());}catch(_0x309e18){_0x421441['push'](_0x421441['shift']());}}}(a235_0x37e4,0xc4ef6));import{getTenantMembers,listDevUserRoleRelations,listAppRoles}from'../../core/api-client.js';import{getSessionUserInfo}from'../../auth/get-session-user.js';import{CliErrors}from'../../errors.js';function a235_0x37e4(){const _0x587727=['\x20duplicate\x20memberships\x20for\x20user\x20','Anti-drift\x20guard:\x20fail\x20if\x20the\x20role\x27s\x20current\x20member\x20count\x20differs','push','role','Disambiguate\x20with\x20--role\x20<id>.','authRequired','roleName','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles,\x20or\x20pass\x20--role\x20<id>.','join','tenant_code','Anti-drift\x20check\x20failed:\x20expected\x20','7916058CghJqv','user','name','Role\x20id\x20(from\x20`role\x20list`)','toLowerCase','CUSTOM','\x20member(s)\x20but\x20role\x20has\x20','Nickname\x20or\x20username\x20to\x20resolve\x20to\x20a\x20userId','Pass\x20--user\x20<id>.','User\x20id,\x20username,\x20or\x20nickname\x20to\x20resolve\x20to\x20a\x20userId','\x20built-in\x20role\x20','userCount','Missing\x20role\x20reference.','filter','number','\x20is\x20not\x20a\x20member\x20of\x20role\x20','OWNER','\x22\x20not\x20found\x20in\x20app\x20','length','Role\x20id\x20or\x20exact\x20role\x20name','\x20members\x20of\x20the\x20OWNER\x20role.','Pass\x20--user\x20<id|name>.','nickname','Missing\x20user\x20reference.','trim','User\x20','DEV','username','Multiple\x20tenant\x20members\x20match\x20\x22','expectUserCount','totalCount','POST','4eypSuG','ADMIN','\x20not\x20found\x20in\x20app\x20','str','21642KqQySz','flagMissing','string','roleType','7176555eIoWdt','map','userId','8DNuMIj','358257vvgYKn','\x20is\x20already\x20a\x20member\x20of\x20role\x20','Optional\x20role\x20remark/description','appCode','remark','174350razgVV','dryRun','Check\x20the\x20nickname/username.\x20','includes','\x22:\x20','/smartapi/permit/user-role/delete',';\x20no\x20change.','expect-user-count','Cannot\x20','user-add','Use\x20the\x20platform\x20ownership-transfer\x20workflow\x20to\x20change\x20the\x20application\x20owner.','/smartapi/permit/user-role/create','373328weYLWn','1010nzJjyg','Role\x20name\x20\x22','validation','Pass\x20--role\x20<id|name>.','test','No\x20tenant\x20member\x20matches\x20\x22','Cannot\x20resolve\x20current\x20tenant.\x20Run\x20`rabetbase\x20auth\x20login`\x20first.','Role\x20name','35oYpFiH','6475955QaJtpK','flag','Only\x20CUSTOM\x20roles\x20can\x20be\x20modified\x20or\x20deleted.'];a235_0x37e4=function(){return _0x587727;};return a235_0x37e4();}export const ROLE_ID_FLAG={'name':'id','type':a235_0x26e15b(0x185),'required':!![],'description':a235_0x26e15b(0x17a)};export const ROLE_REF_FLAG={'name':a235_0x26e15b(0x16f),'type':a235_0x26e15b(0x19d),'required':!![],'description':a235_0x26e15b(0x18a)};export const USER_REF_FLAG={'name':a235_0x26e15b(0x178),'type':'string','required':!![],'description':a235_0x26e15b(0x180)};export const NAME_FLAG={'name':a235_0x26e15b(0x179),'type':a235_0x26e15b(0x19d),'required':!![],'description':a235_0x26e15b(0x167)};export const USER_NAME_FLAG={'name':a235_0x26e15b(0x179),'type':a235_0x26e15b(0x19d),'required':!![],'description':a235_0x26e15b(0x17e)};export const REMARK_FLAG={'name':a235_0x26e15b(0x1a7),'type':a235_0x26e15b(0x19d),'required':![],'description':a235_0x26e15b(0x1a5)};export const EXPECT_USER_COUNT_FLAG={'name':a235_0x26e15b(0x15a),'type':a235_0x26e15b(0x185),'required':![],'description':a235_0x26e15b(0x16d)};export const BUILTIN_ROLE_TYPES=[a235_0x26e15b(0x198),a235_0x26e15b(0x191),a235_0x26e15b(0x187)];export function isBuiltinRole(_0x14295b){const _0xffec26=a235_0x26e15b;return BUILTIN_ROLE_TYPES[_0xffec26(0x1ab)](_0x14295b);}export function assertCustomRole(_0x320a1b,_0x233346){const _0x147c95=a235_0x26e15b;if(_0x320a1b[_0x147c95(0x19e)]!==_0x147c95(0x17c))throw CliErrors[_0x147c95(0x162)](_0x147c95(0x15b)+_0x233346+_0x147c95(0x181)+_0x320a1b[_0x147c95(0x172)]+'\x20('+_0x320a1b[_0x147c95(0x19e)]+').',_0x147c95(0x16b));}export function projectRole(_0x4ef16e){const _0x18800d=a235_0x26e15b;return{'id':_0x4ef16e['id'],'roleName':_0x4ef16e['roleName'],'roleType':_0x4ef16e[_0x18800d(0x19e)],'remark':_0x4ef16e[_0x18800d(0x1a7)],'userCount':_0x4ef16e[_0x18800d(0x182)],'permitCount':_0x4ef16e['permitCount'],'builtin':isBuiltinRole(_0x4ef16e[_0x18800d(0x19e)])};}export async function resolveRoleRef(_0x9d0b3b,_0x181f2b){const _0x39a9da=a235_0x26e15b,_0x3035b6=_0x181f2b[_0x39a9da(0x18f)]();if(!_0x3035b6)throw CliErrors[_0x39a9da(0x162)](_0x39a9da(0x183),'Pass\x20--role\x20<id|name>.');if(/^\d+$/['test'](_0x3035b6))return getRoleById(_0x9d0b3b,Number(_0x3035b6));const _0x5bd63e=await listAllAppRoles(_0x9d0b3b),_0x486a57=_0x5bd63e[_0x39a9da(0x184)](_0x2b67d5=>_0x2b67d5[_0x39a9da(0x172)]===_0x3035b6);if(_0x486a57[_0x39a9da(0x189)]===0x0)throw CliErrors['validation'](_0x39a9da(0x161)+_0x3035b6+_0x39a9da(0x188)+_0x9d0b3b+'.',_0x39a9da(0x173));if(_0x486a57[_0x39a9da(0x189)]>0x1){const _0x4ec671=_0x486a57[_0x39a9da(0x1a0)](_0x578cbd=>_0x578cbd['id'])[_0x39a9da(0x174)](',\x20');throw CliErrors[_0x39a9da(0x162)]('Role\x20name\x20\x22'+_0x3035b6+'\x22\x20is\x20ambiguous\x20(ids:\x20'+_0x4ec671+').',_0x39a9da(0x170));}return _0x486a57[0x0];}export async function getRoleById(_0x47c840,_0x31a6df){const _0x2ccc76=a235_0x26e15b,_0x179b23=await listAllAppRoles(_0x47c840),_0x4f1155=_0x179b23['filter'](_0xcb4fde=>_0xcb4fde['id']===_0x31a6df&&(!_0xcb4fde['appCode']||_0xcb4fde[_0x2ccc76(0x1a6)]===_0x47c840));if(_0x4f1155[_0x2ccc76(0x189)]!==0x1)throw CliErrors[_0x2ccc76(0x162)]('Role\x20id\x20'+_0x31a6df+_0x2ccc76(0x199)+_0x47c840+'.','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.');return _0x4f1155[0x0];}async function listAllAppRoles(_0x1269e4){const _0x35df30=a235_0x26e15b,_0x4a7329=0x64,_0x119e74=[];for(let _0xae60b2=0x1;;_0xae60b2+=0x1){const {items:_0x29fb5e,paging:_0x27a8b5}=await listAppRoles(_0x1269e4,{'currentPage':_0xae60b2,'pageSize':_0x4a7329});_0x119e74[_0x35df30(0x16e)](..._0x29fb5e);if(_0x29fb5e[_0x35df30(0x189)]<_0x4a7329||_0x27a8b5&&_0x119e74['length']>=_0x27a8b5[_0x35df30(0x195)])return _0x119e74;}}export async function resolveTenantCode(){const _0x20f84c=a235_0x26e15b,_0x47086e=await getSessionUserInfo(),_0x163ddc=_0x47086e?.[_0x20f84c(0x178)]?.['tenant']?.[_0x20f84c(0x175)];if(!_0x163ddc)throw CliErrors[_0x20f84c(0x171)](_0x20f84c(0x166));return _0x163ddc;}function matchMember(_0x577c10,_0x1ffa07){const _0x48dbee=a235_0x26e15b,_0x36e6d8=_0x1ffa07[_0x48dbee(0x18f)]()[_0x48dbee(0x17b)]();return(_0x577c10['nickname']??'')[_0x48dbee(0x17b)]()===_0x36e6d8||(_0x577c10[_0x48dbee(0x192)]??'')[_0x48dbee(0x17b)]()===_0x36e6d8;}export async function resolveUserRef(_0x49cc9e,_0x3f8c54=a235_0x26e15b(0x17f)){const _0xc5b986=a235_0x26e15b,_0x4dd48d=_0x49cc9e[_0xc5b986(0x18f)]();if(!_0x4dd48d)throw CliErrors[_0xc5b986(0x162)](_0xc5b986(0x18e),_0xc5b986(0x18c));const _0x1c0f40=await resolveTenantCode(),_0x11a0ee=await getTenantMembers(_0x1c0f40);if(/^\d+$/[_0xc5b986(0x164)](_0x4dd48d)){const _0x40e2fb=Number(_0x4dd48d),_0x5db90b=_0x11a0ee['find'](_0x3ad589=>_0x3ad589[_0xc5b986(0x1a1)]===_0x40e2fb);return{'userId':_0x40e2fb,'username':_0x5db90b?.[_0xc5b986(0x192)]??String(_0x40e2fb),'nickname':_0x5db90b?.[_0xc5b986(0x18d)],'matchedBy':'id'};}const _0x13fbe3=_0x11a0ee[_0xc5b986(0x184)](_0x22d5fe=>matchMember(_0x22d5fe,_0x4dd48d));if(_0x13fbe3[_0xc5b986(0x189)]===0x0)throw CliErrors['validation'](_0xc5b986(0x165)+_0x4dd48d+'\x22.',_0xc5b986(0x1aa)+_0x3f8c54);if(_0x13fbe3[_0xc5b986(0x189)]>0x1){const _0xcdac24=_0x13fbe3[_0xc5b986(0x1a0)](_0x139f45=>(_0x139f45['nickname']??_0x139f45[_0xc5b986(0x192)]??'?')+'('+_0x139f45[_0xc5b986(0x1a1)]+')')[_0xc5b986(0x174)](',\x20');throw CliErrors[_0xc5b986(0x162)](_0xc5b986(0x193)+_0x4dd48d+_0xc5b986(0x1ac)+_0xcdac24+'.',_0x3f8c54);}const _0x4e89b9=_0x13fbe3[0x0];return{'userId':_0x4e89b9['userId'],'username':_0x4e89b9['username']??String(_0x4e89b9[_0xc5b986(0x1a1)]),'nickname':_0x4e89b9[_0xc5b986(0x18d)],'matchedBy':'name'};}export const CREATE_USER_ROLE_PATH=a235_0x26e15b(0x15e);export const DELETE_USER_ROLE_PATH=a235_0x26e15b(0x1ad);export function computeRoleUserMutation(_0x49d817){const _0x3934be=a235_0x26e15b,{operation:_0x296c41,appCode:_0x59a597,role:_0x264d43,relations:_0x56c804,user:_0x25a20d}=_0x49d817,_0x550322=[...new Set(_0x56c804[_0x3934be(0x1a0)](_0x25c3e4=>_0x25c3e4[_0x3934be(0x1a1)]))],_0x65bc56=[];if(_0x49d817[_0x3934be(0x194)]!==undefined&&_0x49d817[_0x3934be(0x194)]!==_0x550322[_0x3934be(0x189)])throw CliErrors[_0x3934be(0x162)](_0x3934be(0x176)+_0x49d817[_0x3934be(0x194)]+_0x3934be(0x17d)+_0x550322[_0x3934be(0x189)]+'.','Re-run\x20`role\x20detail`\x20/\x20`role\x20list`\x20and\x20retry\x20with\x20the\x20current\x20count.');const _0x5e93c8=_0x550322['includes'](_0x25a20d[_0x3934be(0x1a1)]),_0x2e6db8=_0x56c804[_0x3934be(0x184)](_0x561777=>_0x561777[_0x3934be(0x1a1)]===_0x25a20d['userId'])[_0x3934be(0x1a0)](_0x4a5b8a=>_0x4a5b8a['id']),_0x384a1d=_0x296c41===_0x3934be(0x15c)?!_0x5e93c8:_0x5e93c8;let _0x54e2e5=_0x550322;_0x296c41==='user-add'?_0x5e93c8?_0x65bc56[_0x3934be(0x16e)](_0x3934be(0x190)+_0x25a20d[_0x3934be(0x1a1)]+_0x3934be(0x1a4)+_0x264d43[_0x3934be(0x172)]+_0x3934be(0x159)):_0x54e2e5=[..._0x550322,_0x25a20d[_0x3934be(0x1a1)]]:!_0x5e93c8?_0x65bc56[_0x3934be(0x16e)](_0x3934be(0x190)+_0x25a20d[_0x3934be(0x1a1)]+_0x3934be(0x186)+_0x264d43[_0x3934be(0x172)]+';\x20no\x20change.'):(_0x54e2e5=_0x550322[_0x3934be(0x184)](_0x370d51=>_0x370d51!==_0x25a20d['userId']),_0x2e6db8[_0x3934be(0x189)]>0x1&&_0x65bc56[_0x3934be(0x16e)]('Removed\x20'+_0x2e6db8[_0x3934be(0x189)]+_0x3934be(0x16c)+_0x25a20d['userId']+'.'));const _0x4eae55={'scope':'dev','operation':_0x296c41,'selector':{'appCode':_0x59a597,'roleId':_0x264d43['id'],'roleName':_0x264d43[_0x3934be(0x172)],'userId':_0x25a20d['userId']},'before':{'userIds':_0x550322},'after':{'userIds':_0x54e2e5},'dryRun':_0x49d817[_0x3934be(0x1a9)],'backend':{'method':_0x3934be(0x196),'path':_0x296c41===_0x3934be(0x15c)?CREATE_USER_ROLE_PATH:DELETE_USER_ROLE_PATH},'warnings':_0x65bc56};return{'mutation':_0x4eae55,'changed':_0x384a1d,'matchingRelationIds':_0x2e6db8};}function a235_0x1f9c(_0x2e41aa,_0x5e8592){_0x2e41aa=_0x2e41aa-0x159;const _0x37e4b8=a235_0x37e4();let _0x1f9c80=_0x37e4b8[_0x2e41aa];return _0x1f9c80;}export async function loadDevRoleRelations(_0x5c5218,_0xf0239b){const _0x5bbba3=a235_0x26e15b,_0x587f14=0x64,_0x1ff562=[];for(let _0x189cea=0x1;;_0x189cea+=0x1){const {items:_0xfc0e03,paging:_0x11ed23}=await listDevUserRoleRelations(_0x5c5218,{'roleId':_0xf0239b,'currentPage':_0x189cea,'pageSize':_0x587f14});_0x1ff562[_0x5bbba3(0x16e)](..._0xfc0e03);if(_0xfc0e03['length']<_0x587f14||_0x11ed23&&_0x1ff562[_0x5bbba3(0x189)]>=_0x11ed23[_0x5bbba3(0x195)])return _0x1ff562;}}export function readRoleRef(_0x301dc0){const _0x524ee1=a235_0x26e15b,_0x565b8c=_0x301dc0['str'](_0x524ee1(0x16f))[_0x524ee1(0x18f)]();if(!_0x565b8c)throw CliErrors['flagMissing']('role',_0x524ee1(0x163));return _0x565b8c;}export async function prepareUserMutation(_0x1bb38d,_0x239d8f,_0x5c26a4){const _0x353318=a235_0x26e15b,_0x57fb3d=readRoleRef(_0x1bb38d),_0x4101cf=_0x1bb38d[_0x353318(0x19a)](_0x353318(0x178))[_0x353318(0x18f)]();if(!_0x4101cf)throw CliErrors[_0x353318(0x19c)]('user',_0x353318(0x18c));const _0x5331c9=_0x1bb38d[_0x353318(0x16a)](_0x353318(0x15a)),_0x5daf2d=_0x5331c9===undefined||_0x5331c9===null?undefined:Number(_0x5331c9),_0x21e307=await resolveRoleRef(_0x1bb38d[_0x353318(0x1a6)],_0x57fb3d);if(_0x21e307['roleType']===_0x353318(0x187))throw CliErrors['validation'](_0x353318(0x15b)+_0x239d8f+_0x353318(0x18b),_0x353318(0x15d));const _0x316dd8=await resolveUserRef(_0x4101cf),_0x414ba4=await loadDevRoleRelations(_0x1bb38d[_0x353318(0x1a6)],_0x21e307['id']);return{...computeRoleUserMutation({'operation':_0x239d8f,'appCode':_0x1bb38d[_0x353318(0x1a6)],'role':_0x21e307,'relations':_0x414ba4,'user':{'userId':_0x316dd8[_0x353318(0x1a1)],'username':_0x316dd8['username'],'nickname':_0x316dd8[_0x353318(0x18d)]},'dryRun':_0x5c26a4,..._0x5daf2d!==undefined?{'expectUserCount':_0x5daf2d}:{}}),'role':_0x21e307,'user':_0x316dd8};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a236_0x6d2ef2=a236_0xf707;(function(_0x288473,_0x575f39){const _0x498a54=a236_0xf707,_0x3a0d78=_0x288473();while(!![]){try{const _0x5c2f85=-parseInt(_0x498a54(0x15a))/0x1*(parseInt(_0x498a54(0x14e))/0x2)+-parseInt(_0x498a54(0x154))/0x3+parseInt(_0x498a54(0x15f))/0x4+parseInt(_0x498a54(0x148))/0x5+parseInt(_0x498a54(0x14b))/0x6+parseInt(_0x498a54(0x161))/0x7*(-parseInt(_0x498a54(0x152))/0x8)+-parseInt(_0x498a54(0x151))/0x9*(-parseInt(_0x498a54(0x153))/0xa);if(_0x5c2f85===_0x575f39)break;else _0x3a0d78['push'](_0x3a0d78['shift']());}catch(_0x3a4e55){_0x3a0d78['push'](_0x3a0d78['shift']());}}}(a236_0x1869,0x4e462));function a236_0xf707(_0x12b6e1,_0x50a8bc){_0x12b6e1=_0x12b6e1-0x145;const _0x186952=a236_0x1869();let _0xf707ec=_0x186952[_0x12b6e1];return _0xf707ec;}function a236_0x1869(){const _0x7ba67a=['1728816oFlVRZ','Role\x20name\x20cannot\x20exceed\x2064\x20characters.','406PcWVDY','dev','Pass\x20at\x20least\x20one\x20of\x20--name\x20/\x20--remark.','name','909815CuyLip','\x20(id=','validation','3222096dqvhHG','update','flag','21224pqpGJm','--name\x20cannot\x20be\x20empty.','Updated\x20role\x20','45KXrABI','25240CgJfJV','259140jdHbxN','1503723elPcBE','trim','write','remark','appCode','length','26VhAzZA','POST','roleName','Update\x20a\x20CUSTOM\x20role\x27s\x20name/remark\x20(built-in\x20roles\x20rejected)','num'];a236_0x1869=function(){return _0x7ba67a;};return a236_0x1869();}import{updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCustomRole,getRoleById,projectRole,REMARK_FLAG,ROLE_ID_FLAG}from'../../commands/role/shared.js';const UPDATE_PATH='/smartapi/permit/role/update';function readPatch(_0x289194){const _0x34e3b4=a236_0xf707,_0x2912cd=_0x289194[_0x34e3b4(0x14d)](_0x34e3b4(0x147)),_0x4092b5=_0x289194[_0x34e3b4(0x14d)]('remark'),_0x58bad8={};if(_0x2912cd!==undefined&&_0x2912cd!==null){const _0x5d4d5a=String(_0x2912cd)[_0x34e3b4(0x155)]();if(!_0x5d4d5a)throw CliErrors[_0x34e3b4(0x14a)](_0x34e3b4(0x14f));if(_0x5d4d5a[_0x34e3b4(0x159)]>0x40)throw CliErrors[_0x34e3b4(0x14a)](_0x34e3b4(0x160));_0x58bad8[_0x34e3b4(0x15c)]=_0x5d4d5a;}_0x4092b5!==undefined&&_0x4092b5!==null&&(_0x58bad8[_0x34e3b4(0x157)]=String(_0x4092b5));if(_0x58bad8[_0x34e3b4(0x15c)]===undefined&&_0x58bad8[_0x34e3b4(0x157)]===undefined)throw CliErrors[_0x34e3b4(0x14a)]('Nothing\x20to\x20update.',_0x34e3b4(0x146));return _0x58bad8;}export const roleUpdate={'service':'role','command':'update','description':a236_0x6d2ef2(0x15d),'risk':a236_0x6d2ef2(0x156),'flags':[ROLE_ID_FLAG,{...REMARK_FLAG},{'name':a236_0x6d2ef2(0x147),'type':'string','required':![],'description':'New\x20role\x20name'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5c64d2){readPatch(_0x5c64d2);},async 'dryRun'(_0x306ae6){const _0x4f9fa9=a236_0x6d2ef2,_0x5c706f=_0x306ae6[_0x4f9fa9(0x15e)]('id'),_0x4f72da=readPatch(_0x306ae6),_0x2715be=await getRoleById(_0x306ae6[_0x4f9fa9(0x158)],_0x5c706f);return assertCustomRole(_0x2715be,'update'),asDryRunResult({'scope':_0x4f9fa9(0x145),'operation':'update','selector':{'appCode':_0x306ae6['appCode'],'roleId':_0x5c706f,'roleName':_0x2715be[_0x4f9fa9(0x15c)]},'before':projectRole(_0x2715be),'after':projectRole({..._0x2715be,..._0x4f72da[_0x4f9fa9(0x15c)]!==undefined?{'roleName':_0x4f72da[_0x4f9fa9(0x15c)]}:{},..._0x4f72da[_0x4f9fa9(0x157)]!==undefined?{'remark':_0x4f72da[_0x4f9fa9(0x157)]}:{}}),'dryRun':!![],'backend':{'method':_0x4f9fa9(0x15b),'path':UPDATE_PATH},'warnings':[]},{'method':_0x4f9fa9(0x15b),'url':UPDATE_PATH});},async 'execute'(_0x2bf65a){const _0x4d7553=a236_0x6d2ef2,_0x19642f=_0x2bf65a[_0x4d7553(0x15e)]('id'),_0xd41dbc=readPatch(_0x2bf65a),_0x2f1761=await getRoleById(_0x2bf65a[_0x4d7553(0x158)],_0x19642f);assertCustomRole(_0x2f1761,_0x4d7553(0x14c)),await updateAppRole({'id':_0x19642f,'appCode':_0x2bf65a[_0x4d7553(0x158)],..._0xd41dbc[_0x4d7553(0x15c)]!==undefined?{'roleName':_0xd41dbc[_0x4d7553(0x15c)]}:{},..._0xd41dbc[_0x4d7553(0x157)]!==undefined?{'remark':_0xd41dbc[_0x4d7553(0x157)]}:{}});const _0x548d0a=await getRoleById(_0x2bf65a['appCode'],_0x19642f);return{'ok':!![],'data':{'scope':_0x4d7553(0x145),'operation':_0x4d7553(0x14c),'selector':{'appCode':_0x2bf65a[_0x4d7553(0x158)],'roleId':_0x19642f,'roleName':_0x548d0a[_0x4d7553(0x15c)]},'before':projectRole(_0x2f1761),'after':projectRole(_0x548d0a),'dryRun':![],'backend':{'method':_0x4d7553(0x15b),'path':UPDATE_PATH},'warnings':[]},'message':_0x4d7553(0x150)+_0x548d0a[_0x4d7553(0x15c)]+_0x4d7553(0x149)+_0x19642f+')'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a237_0x2d91(){const _0x13aecb=['userId','roleName','6707310dkKrGe','user-add','selector','roleId','11940RPgIdF','No\x20change:\x20user\x20','\x20to\x20role\x20','148oflrNh','roleType','607920MlumDu','role','Added\x20user\x20','appCode','108LXSJFx','POST','3367712ELVdvL','5075028EltrLd','2172YVHkhd','965499dTliYW','high-risk-write','username','31413oxRfjX'];a237_0x2d91=function(){return _0x13aecb;};return a237_0x2d91();}const a237_0x3eca58=a237_0xa8b4;(function(_0x4b05a6,_0x171523){const _0x4043e0=a237_0xa8b4,_0x2a4b34=_0x4b05a6();while(!![]){try{const _0xc68105=-parseInt(_0x4043e0(0xc2))/0x1+-parseInt(_0x4043e0(0xcf))/0x2*(parseInt(_0x4043e0(0xc5))/0x3)+parseInt(_0x4043e0(0xbf))/0x4+parseInt(_0x4043e0(0xcc))/0x5*(-parseInt(_0x4043e0(0xc1))/0x6)+parseInt(_0x4043e0(0xc0))/0x7+-parseInt(_0x4043e0(0xd1))/0x8*(-parseInt(_0x4043e0(0xbd))/0x9)+parseInt(_0x4043e0(0xc8))/0xa;if(_0xc68105===_0x171523)break;else _0x2a4b34['push'](_0x2a4b34['shift']());}catch(_0x58676c){_0x2a4b34['push'](_0x2a4b34['shift']());}}}(a237_0x2d91,0x84fde));import{createDevUserRole}from'../../core/api-client.js';function a237_0xa8b4(_0x4f824a,_0x371c74){_0x4f824a=_0x4f824a-0xbc;const _0x2d9101=a237_0x2d91();let _0xa8b48a=_0x2d9101[_0x4f824a];return _0xa8b48a;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{EXPECT_USER_COUNT_FLAG,CREATE_USER_ROLE_PATH,prepareUserMutation,ROLE_REF_FLAG,USER_REF_FLAG}from'../../commands/role/shared.js';export const roleUserAdd={'service':a237_0x3eca58(0xd2),'command':'user-add','description':'Add\x20a\x20user\x20to\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','risk':a237_0x3eca58(0xc3),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x527389){const _0x1bca18=a237_0x3eca58,{mutation:_0x38d201}=await prepareUserMutation(_0x527389,_0x1bca18(0xc9),!![]);return asDryRunResult(_0x38d201,{'method':_0x1bca18(0xbe),'url':CREATE_USER_ROLE_PATH});},async 'execute'(_0x2bd2c4){const _0x36b8ac=a237_0x3eca58,{mutation:_0x174cdb,changed:_0x162ec1,role:_0x46f3a3,user:_0x4f5f31}=await prepareUserMutation(_0x2bd2c4,_0x36b8ac(0xc9),![]);return _0x162ec1&&await createDevUserRole({'appCode':_0x2bd2c4[_0x36b8ac(0xbc)],'userId':_0x4f5f31[_0x36b8ac(0xc6)],'username':_0x4f5f31[_0x36b8ac(0xc4)],'roleType':_0x46f3a3[_0x36b8ac(0xd0)],'roleId':_0x174cdb['selector'][_0x36b8ac(0xcb)]}),{'ok':!![],'data':_0x174cdb,'message':_0x162ec1?_0x36b8ac(0xd3)+_0x174cdb[_0x36b8ac(0xca)][_0x36b8ac(0xc6)]+_0x36b8ac(0xce)+_0x174cdb[_0x36b8ac(0xca)]['roleName']:_0x36b8ac(0xcd)+_0x174cdb[_0x36b8ac(0xca)][_0x36b8ac(0xc6)]+'\x20already\x20in\x20role\x20'+_0x174cdb['selector'][_0x36b8ac(0xc7)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a238_0x111590=a238_0xe242;(function(_0xcf61bd,_0x32047c){const _0x23ea9f=a238_0xe242,_0x4aba28=_0xcf61bd();while(!![]){try{const _0x84183f=parseInt(_0x23ea9f(0x127))/0x1*(parseInt(_0x23ea9f(0x123))/0x2)+parseInt(_0x23ea9f(0x11a))/0x3*(parseInt(_0x23ea9f(0x125))/0x4)+parseInt(_0x23ea9f(0x11b))/0x5*(-parseInt(_0x23ea9f(0x128))/0x6)+-parseInt(_0x23ea9f(0x129))/0x7*(parseInt(_0x23ea9f(0x11d))/0x8)+parseInt(_0x23ea9f(0x11e))/0x9+parseInt(_0x23ea9f(0x124))/0xa+-parseInt(_0x23ea9f(0x121))/0xb*(-parseInt(_0x23ea9f(0x11f))/0xc);if(_0x84183f===_0x32047c)break;else _0x4aba28['push'](_0x4aba28['shift']());}catch(_0x3474fb){_0x4aba28['push'](_0x4aba28['shift']());}}}(a238_0x5d11,0xec8ef));import{deleteDevUserRole}from'../../core/api-client.js';function a238_0x5d11(){const _0x58c1fb=['Remove\x20a\x20user\x20from\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','Removed\x20user\x20','36jKTgtb','8441695MDPiLb','userId','64ovsyzL','5626944ANsuXC','276CFyZfv','roleName','364254yBGuwF','selector','787134nVFTDm','11466020mquSjt','143124dTCEdI','\x20from\x20role\x20','2wFrnJn','6Iuiwjt','956081xGrhnO','user-remove'];a238_0x5d11=function(){return _0x58c1fb;};return a238_0x5d11();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{EXPECT_USER_COUNT_FLAG,DELETE_USER_ROLE_PATH,prepareUserMutation,ROLE_REF_FLAG,USER_REF_FLAG}from'../../commands/role/shared.js';function a238_0xe242(_0x48490b,_0x5e4c0a){_0x48490b=_0x48490b-0x11a;const _0x5d11df=a238_0x5d11();let _0xe242ea=_0x5d11df[_0x48490b];return _0xe242ea;}export const roleUserRemove={'service':'role','command':a238_0x111590(0x12a),'description':a238_0x111590(0x12b),'risk':'high-risk-write','flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x29cb56){const _0x1cb238=a238_0x111590,{mutation:_0x437e9b}=await prepareUserMutation(_0x29cb56,_0x1cb238(0x12a),!![]);return asDryRunResult(_0x437e9b,{'method':'POST','url':DELETE_USER_ROLE_PATH});},async 'execute'(_0xecaf4a){const _0x42041f=a238_0x111590,{matchingRelationIds:_0x43c7fa,mutation:_0x4ef214,changed:_0x1e5d06}=await prepareUserMutation(_0xecaf4a,_0x42041f(0x12a),![]);if(_0x1e5d06)for(const _0x235398 of _0x43c7fa){await deleteDevUserRole(_0x235398);}return{'ok':!![],'data':_0x4ef214,'message':_0x1e5d06?_0x42041f(0x12c)+_0x4ef214['selector'][_0x42041f(0x11c)]+_0x42041f(0x126)+_0x4ef214[_0x42041f(0x122)]['roleName']:'No\x20change:\x20user\x20'+_0x4ef214[_0x42041f(0x122)][_0x42041f(0x11c)]+'\x20not\x20in\x20role\x20'+_0x4ef214[_0x42041f(0x122)][_0x42041f(0x120)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a239_0x1417(_0x35fc89,_0x318dfa){_0x35fc89=_0x35fc89-0x126;const _0x3db590=a239_0x3db5();let _0x1417d0=_0x3db590[_0x35fc89];return _0x1417d0;}function a239_0x3db5(){const _0x19c223=['flagMissing','1652IKeioW','5vbCrUf','\x22\x20→\x20userId\x20','read','3215660WAyTjT','userId','username','nickname','role','41759Jafora','Resolve\x20a\x20nickname/username\x20to\x20a\x20userId\x20(tenant\x20member\x20directory)','3141831dSdijZ','13815LJmeUe','matchedBy','str','3011388XJyeqI','3693XNdqub','344XyYxDG','name','2915704AGKSTU','22Xxfxud'];a239_0x3db5=function(){return _0x19c223;};return a239_0x3db5();}const a239_0x38c886=a239_0x1417;(function(_0x3ef846,_0x46fcf0){const _0x3a0677=a239_0x1417,_0x4b7141=_0x3ef846();while(!![]){try{const _0x2b45ed=parseInt(_0x3a0677(0x12a))/0x1*(parseInt(_0x3a0677(0x135))/0x2)+-parseInt(_0x3a0677(0x131))/0x3*(-parseInt(_0x3a0677(0x137))/0x4)+-parseInt(_0x3a0677(0x138))/0x5*(parseInt(_0x3a0677(0x130))/0x6)+parseInt(_0x3a0677(0x12c))/0x7+-parseInt(_0x3a0677(0x132))/0x8*(parseInt(_0x3a0677(0x12d))/0x9)+-parseInt(_0x3a0677(0x13b))/0xa+-parseInt(_0x3a0677(0x134))/0xb;if(_0x2b45ed===_0x46fcf0)break;else _0x4b7141['push'](_0x4b7141['shift']());}catch(_0x46afa8){_0x4b7141['push'](_0x4b7141['shift']());}}}(a239_0x3db5,0x3ffa4));import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{resolveUserRef,USER_NAME_FLAG}from'../../commands/role/shared.js';export const roleUserResolve={'service':a239_0x38c886(0x129),'command':'user-resolve','description':a239_0x38c886(0x12b),'risk':a239_0x38c886(0x13a),'flags':[USER_NAME_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2bbdef){const _0x5d68eb=a239_0x38c886;if(!_0x2bbdef[_0x5d68eb(0x12f)](_0x5d68eb(0x133))['trim']())throw CliErrors[_0x5d68eb(0x136)](_0x5d68eb(0x133),'Pass\x20--name\x20<nickname|username>.');},async 'execute'(_0x2e0bca){const _0x31d31c=a239_0x38c886,_0x32c00f=_0x2e0bca[_0x31d31c(0x12f)](_0x31d31c(0x133))['trim'](),_0x311d20=await resolveUserRef(_0x32c00f,'Select\x20a\x20listed\x20userId,\x20then\x20pass\x20it\x20to\x20`role\x20user-add`\x20or\x20`role\x20user-remove`\x20with\x20--user\x20<id>.');return{'ok':!![],'data':{'user':{'userId':_0x311d20[_0x31d31c(0x126)],'username':_0x311d20[_0x31d31c(0x127)],'nickname':_0x311d20[_0x31d31c(0x128)],'matchedBy':_0x311d20[_0x31d31c(0x12e)]}},'message':'Resolved\x20\x22'+_0x32c00f+_0x31d31c(0x139)+_0x311d20[_0x31d31c(0x126)]};}};
|
package/lib/commands/rule/get.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a240_0x388d98=a240_0x5ae8;function a240_0x39eb(){const _0x3ed288=['read','175680JOsHlh','Loaded\x20','1cMnDTe','app_rule_not_found','Get\x20one\x20agent\x20context\x20rule\x20for\x20the\x20resolved\x20app','605114FIFDpN','6ZeShMm','rule','1809304VpxMMP','1384062qqMxoH','\x20--file\x20<path>\x20--dry-run`.','cookie','24uBtOBa','1351071lnYAxy','appCode','1076ukRQlL','\x20is\x20not\x20configured\x20for\x20app\x20','8734jATlZL','1670gjoXJO','4310eIFijE'];a240_0x39eb=function(){return _0x3ed288;};return a240_0x39eb();}(function(_0x38ac29,_0x569034){const _0x419251=a240_0x5ae8,_0x4cf961=_0x38ac29();while(!![]){try{const _0x3e3b53=parseInt(_0x419251(0x1be))/0x1*(-parseInt(_0x419251(0x1c1))/0x2)+parseInt(_0x419251(0x1b0))/0x3+parseInt(_0x419251(0x1b6))/0x4*(-parseInt(_0x419251(0x1b9))/0x5)+-parseInt(_0x419251(0x1ad))/0x6*(-parseInt(_0x419251(0x1af))/0x7)+parseInt(_0x419251(0x1b3))/0x8*(-parseInt(_0x419251(0x1b4))/0x9)+parseInt(_0x419251(0x1ba))/0xa*(parseInt(_0x419251(0x1b8))/0xb)+parseInt(_0x419251(0x1bc))/0xc;if(_0x3e3b53===_0x569034)break;else _0x4cf961['push'](_0x4cf961['shift']());}catch(_0x3874da){_0x4cf961['push'](_0x4cf961['shift']());}}}(a240_0x39eb,0x391c0));import{getAppRule}from'../../core/api-client.js';import{APP_RULE_TYPE_FLAG,appRuleError,appRuleFileName,projectAppRule,readAppRuleType}from'../../commands/rule/shared.js';function a240_0x5ae8(_0x3cf40,_0x21da96){_0x3cf40=_0x3cf40-0x1ad;const _0x39eb8a=a240_0x39eb();let _0x5ae88e=_0x39eb8a[_0x3cf40];return _0x5ae88e;}export const ruleGet={'service':a240_0x388d98(0x1ae),'command':'get','description':a240_0x388d98(0x1c0),'risk':a240_0x388d98(0x1bb),'requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG],async 'validate'(_0x4f737f){readAppRuleType(_0x4f737f);},async 'execute'(_0x48c333){const _0x5072b0=a240_0x388d98,_0x24dddd=readAppRuleType(_0x48c333),_0x4ae783=await getAppRule(_0x48c333[_0x5072b0(0x1b2)],{'appCode':_0x48c333['appCode'],'type':_0x24dddd});if(!_0x4ae783)throw appRuleError(_0x5072b0(0x1bf),appRuleFileName(_0x24dddd)+_0x5072b0(0x1b7)+_0x48c333['appCode']+'.','Create\x20it\x20with\x20`rabetbase\x20rule\x20set\x20--type\x20'+_0x24dddd+_0x5072b0(0x1b1));return{'ok':!![],'data':{'rule':{...projectAppRule(_0x24dddd,_0x4ae783),'content':_0x4ae783['content']}},'message':_0x5072b0(0x1bd)+appRuleFileName(_0x24dddd)+'\x20for\x20'+_0x48c333[_0x5072b0(0x1b5)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a241_0x534e(){const _0x4c9525=['20tbhAIN','6165365Lcgvpc','signal','dryRun','4006064oBTOpd','1132338ZMATHf','70956GDUWlw','5497452DDJjOj','1217574Nhhufw','42khQAYT','91lkufMV','107028DhkTjF'];a241_0x534e=function(){return _0x4c9525;};return a241_0x534e();}const a241_0x44310d=a241_0x2868;(function(_0x87f405,_0x32092a){const _0x16e300=a241_0x2868,_0x30662f=_0x87f405();while(!![]){try{const _0x127665=parseInt(_0x16e300(0x156))/0x1+parseInt(_0x16e300(0x159))/0x2+-parseInt(_0x16e300(0x15a))/0x3*(parseInt(_0x16e300(0x15c))/0x4)+parseInt(_0x16e300(0x15e))/0x5+-parseInt(_0x16e300(0x157))/0x6*(parseInt(_0x16e300(0x15b))/0x7)+-parseInt(_0x16e300(0x155))/0x8+-parseInt(_0x16e300(0x158))/0x9*(parseInt(_0x16e300(0x15d))/0xa);if(_0x127665===_0x32092a)break;else _0x30662f['push'](_0x30662f['shift']());}catch(_0x98404b){_0x30662f['push'](_0x30662f['shift']());}}}(a241_0x534e,0xb09f8));import{withKbManagementSession}from'../../core/kb-management-client.js';import{ruleGet}from'../../commands/rule/get.js';function a241_0x2868(_0x2d1282,_0x3c93d6){_0x2d1282=_0x2d1282-0x155;const _0x534e6b=a241_0x534e();let _0x286814=_0x534e6b[_0x2d1282];return _0x286814;}import{ruleList}from'../../commands/rule/list.js';import{ruleSet}from'../../commands/rule/set.js';export const ruleDefinitions=[ruleList,ruleGet,ruleSet]['map'](_0x4227c3=>({..._0x4227c3,'execute':_0x4799cc=>withKbManagementSession(_0x4799cc[a241_0x44310d(0x15f)],()=>_0x4227c3['execute'](_0x4799cc)),..._0x4227c3['dryRun']?{'dryRun':_0x3c3a9=>withKbManagementSession(_0x3c3a9['signal'],()=>_0x4227c3[a241_0x44310d(0x160)](_0x3c3a9))}:{}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a242_0x5485a4=a242_0x4cc1;(function(_0x1c4ae6,_0x4ee4e9){const _0x3c5c81=a242_0x4cc1,_0x5058a1=_0x1c4ae6();while(!![]){try{const _0x3c628f=parseInt(_0x3c5c81(0x104))/0x1*(-parseInt(_0x3c5c81(0xf4))/0x2)+-parseInt(_0x3c5c81(0xf7))/0x3+-parseInt(_0x3c5c81(0xf6))/0x4*(parseInt(_0x3c5c81(0x100))/0x5)+parseInt(_0x3c5c81(0x105))/0x6+-parseInt(_0x3c5c81(0xfc))/0x7*(-parseInt(_0x3c5c81(0xfb))/0x8)+-parseInt(_0x3c5c81(0x107))/0x9+-parseInt(_0x3c5c81(0x101))/0xa*(-parseInt(_0x3c5c81(0xfd))/0xb);if(_0x3c628f===_0x4ee4e9)break;else _0x5058a1['push'](_0x5058a1['shift']());}catch(_0x35746a){_0x5058a1['push'](_0x5058a1['shift']());}}}(a242_0x3a7a,0x1a4b3));import{getAppRule}from'../../core/api-client.js';function a242_0x4cc1(_0x4fc0a5,_0x19a1ea){_0x4fc0a5=_0x4fc0a5-0xf4;const _0x3a7acd=a242_0x3a7a();let _0x4cc1c6=_0x3a7acd[_0x4fc0a5];return _0x4cc1c6;}import{APP_RULE_TYPES,projectAppRule}from'../../commands/rule/shared.js';function a242_0x3a7a(){const _0x472843=['read','19JdKWMt','230412parwrp','cookie','25965FPORZG','2824njjgXL','map','4QKFteU','624600hZcimf','List\x20agent\x20context\x20rules\x20for\x20the\x20resolved\x20app','list','rule','224bgOylw','7483BYxExy','11ygyKCV','appCode','Loaded\x20app\x20rule\x20configuration\x20for\x20','642865SmNlOh','4058510mxBpdP','length'];a242_0x3a7a=function(){return _0x472843;};return a242_0x3a7a();}export const ruleList={'service':a242_0x5485a4(0xfa),'command':a242_0x5485a4(0xf9),'description':a242_0x5485a4(0xf8),'risk':a242_0x5485a4(0x103),'requiresAppCode':!![],'structuredErrors':!![],'flags':[],async 'execute'(_0x44c419){const _0x7c76a6=a242_0x5485a4,_0xab2457=await Promise['all'](APP_RULE_TYPES[_0x7c76a6(0xf5)](_0x3b1563=>getAppRule(_0x44c419[_0x7c76a6(0x106)],{'appCode':_0x44c419['appCode'],'type':_0x3b1563}))),_0x594500=APP_RULE_TYPES[_0x7c76a6(0xf5)]((_0x576fa3,_0x4e3ad4)=>projectAppRule(_0x576fa3,_0xab2457[_0x4e3ad4]??null));return{'ok':!![],'data':{'total':_0x594500[_0x7c76a6(0x102)],'rules':_0x594500},'message':_0x7c76a6(0xff)+_0x44c419[_0x7c76a6(0xfe)]};}};
|
package/lib/commands/rule/set.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function a243_0x2e71(_0x168652,_0x21c32a){_0x168652=_0x168652-0x1e5;const _0x5b37ef=a243_0x5b37();let _0x2e7129=_0x5b37ef[_0x168652];return _0x2e7129;}const a243_0x320ad0=a243_0x2e71;(function(_0x2c3295,_0x3b44d7){const _0xc80f34=a243_0x2e71,_0x37f308=_0x2c3295();while(!![]){try{const _0x1713c1=-parseInt(_0xc80f34(0x1fb))/0x1+-parseInt(_0xc80f34(0x219))/0x2*(-parseInt(_0xc80f34(0x21d))/0x3)+-parseInt(_0xc80f34(0x217))/0x4*(-parseInt(_0xc80f34(0x20c))/0x5)+-parseInt(_0xc80f34(0x212))/0x6*(parseInt(_0xc80f34(0x1e8))/0x7)+parseInt(_0xc80f34(0x1f0))/0x8*(parseInt(_0xc80f34(0x211))/0x9)+parseInt(_0xc80f34(0x20d))/0xa*(-parseInt(_0xc80f34(0x1e9))/0xb)+parseInt(_0xc80f34(0x213))/0xc;if(_0x1713c1===_0x3b44d7)break;else _0x37f308['push'](_0x37f308['shift']());}catch(_0x1a71a5){_0x37f308['push'](_0x37f308['shift']());}}}(a243_0x5b37,0xb4fc9));import{getAppRule,isPlatformTransportFailure,saveAppRule}from'../../core/api-client.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{APP_RULE_TYPE_FLAG,appRuleContextScope,appRuleError,appRuleFileName,inspectAppRuleContent,projectAppRule,readAppRuleFile,readAppRuleType}from'../../commands/rule/shared.js';function a243_0x5b37(){const _0x5b2c45=['29018TWjwvN','--expected-version\x20is\x20a\x20non-atomic\x20read-before-write\x20assertion;\x20the\x20server\x20save\x20contract\x20has\x20no\x20version\x20predicate.','rabetbase\x20rule\x20get\x20--type\x20',';\x20current\x20version\x20is\x20','byteSize','str','expectedVersion','80vGXLHS','app_rule_verification_failed','flag','\x20--format\x20compress','\x20does\x20not\x20prove\x20the\x20requested\x20set\x20state.','contentHash','before','file','rules','isSafeInteger','\x20could\x20not\x20be\x20verified.','828872AetNfE','set','Set\x20response\x20was\x20unavailable;\x20verified\x20the\x20exact\x20content\x20readback\x20without\x20resubmitting.','/smartapi/knowledge-base/save','Inspect\x20it\x20with\x20`rabetbase\x20rule\x20get\x20--type\x20','Do\x20not\x20resubmit\x20automatically.\x20Inspect\x20the\x20exact\x20rule\x20state\x20before\x20retrying.','cause','write','appCode','input','\x20for\x20','number','POST','\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.','app_rule_set_outcome_unknown','type','.\x20Run\x20rule\x20get\x20and\x20review\x20before\x20retrying.','185HmNQTF','2270RhKGBX','beforeRecord','unconfigured','Set\x20','329175MlzeCp','1146pDNdEM','18265584kJdbYh','content','defineProperty','cookie','14240Bhboaj','string','1094922wvxvRn','version','Expected\x20','push','3CJZKGC','UTF-8\x20Markdown\x20file\x20(maximum\x205\x20MiB)','app_rule_version_mismatch','replacement','The\x20set\x20request\x20was\x20sent,\x20but\x20','rule','14588LaYvvo'];a243_0x5b37=function(){return _0x5b2c45;};return a243_0x5b37();}const SAVE_PATH=a243_0x320ad0(0x1fe),NON_ATOMIC_WARNING=a243_0x320ad0(0x1ea);function readSetInput(_0x1ee7be){const _0x48a522=a243_0x320ad0,_0x52d2e4=readAppRuleType(_0x1ee7be),_0x47e3ca=_0x1ee7be[_0x48a522(0x1ee)](_0x48a522(0x1f7))['trim']();if(!_0x47e3ca)throw appRuleError('app_rule_file_required','--file\x20is\x20required.','Pass\x20a\x20UTF-8\x20Markdown\x20file.');const _0x51a21d=_0x1ee7be[_0x48a522(0x1f2)]('expected-version');let _0x5bbbab;if(_0x51a21d!==undefined){_0x5bbbab=Number(_0x51a21d);if(!Number[_0x48a522(0x1f9)](_0x5bbbab)||_0x5bbbab<0x0)throw appRuleError('app_rule_expected_version_invalid','--expected-version\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.');}return{'type':_0x52d2e4,'file':_0x47e3ca,'expectedVersion':_0x5bbbab};}async function prepareSet(_0x22fa02){const _0x12d484=a243_0x320ad0,_0x5541cc=readSetInput(_0x22fa02),_0x2de77e=await readAppRuleFile(_0x5541cc[_0x12d484(0x1f7)]),_0x3587ce=await getAppRule(_0x22fa02[_0x12d484(0x216)],{'appCode':_0x22fa02[_0x12d484(0x203)],'type':_0x5541cc['type']});if(_0x5541cc[_0x12d484(0x1ef)]!==undefined&&_0x3587ce?.[_0x12d484(0x21a)]!==_0x5541cc[_0x12d484(0x1ef)])throw appRuleError(_0x12d484(0x21f),appRuleFileName(_0x5541cc[_0x12d484(0x20a)])+'\x20version\x20changed\x20before\x20write.',_0x12d484(0x21b)+_0x5541cc['expectedVersion']+_0x12d484(0x1ec)+(_0x3587ce?.['version']??_0x12d484(0x20f))+_0x12d484(0x20b));return{'input':_0x5541cc,'replacement':_0x2de77e,'beforeRecord':_0x3587ce,'before':projectAppRule(_0x5541cc[_0x12d484(0x20a)],_0x3587ce),'planned':{'type':_0x5541cc[_0x12d484(0x20a)],'fileName':appRuleFileName(_0x5541cc['type']),'contextScope':appRuleContextScope(_0x5541cc['type']),'enabled':!![],'appCode':_0x22fa02[_0x12d484(0x203)],'scope':_0x12d484(0x1f8),'contentByteSize':_0x2de77e[_0x12d484(0x1ed)],'contentHash':_0x2de77e['contentHash']}};}function warningsFor(_0x4bc74b){return _0x4bc74b===undefined?[]:[NON_ATOMIC_WARNING];}export const ruleSet={'service':a243_0x320ad0(0x1e7),'command':a243_0x320ad0(0x1fc),'description':'Set\x20an\x20agent\x20context\x20rule\x20from\x20a\x20UTF-8\x20Markdown\x20file','risk':a243_0x320ad0(0x202),'requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG,{'name':a243_0x320ad0(0x1f7),'type':a243_0x320ad0(0x218),'required':!![],'description':a243_0x320ad0(0x21e)},{'name':'expected-version','type':a243_0x320ad0(0x206),'required':![],'description':'Non-atomic\x20preflight\x20assertion\x20for\x20the\x20current\x20version'}],async 'validate'(_0x3d4341){readSetInput(_0x3d4341);},async 'dryRun'(_0x5055b0){const _0x3af4b2=a243_0x320ad0,_0x3ee623=await prepareSet(_0x5055b0);return asDryRunResult({'operation':_0x3af4b2(0x1fc),'selector':{'appCode':_0x5055b0[_0x3af4b2(0x203)],'scope':_0x3af4b2(0x1f8),'type':_0x3ee623[_0x3af4b2(0x204)]['type']},'before':_0x3ee623[_0x3af4b2(0x1f6)],'after':_0x3ee623['planned'],'dryRun':!![],'backend':{'method':_0x3af4b2(0x207),'path':SAVE_PATH},'warnings':warningsFor(_0x3ee623['input'][_0x3af4b2(0x1ef)]),'verification':{'expectedVersion':_0x3ee623[_0x3af4b2(0x204)][_0x3af4b2(0x1ef)]??null,'atomicCompareAndSet':![],'lookupCommand':_0x3af4b2(0x1eb)+_0x3ee623[_0x3af4b2(0x204)]['type']+_0x3af4b2(0x1f3)}},{'method':'POST','url':SAVE_PATH});},async 'execute'(_0x18bc1e){const _0x5be0d5=a243_0x320ad0,_0x3b1a13=await prepareSet(_0x18bc1e);let _0x394255=![];try{await saveAppRule(_0x18bc1e[_0x5be0d5(0x216)],{'appCode':_0x18bc1e[_0x5be0d5(0x203)],'type':_0x3b1a13[_0x5be0d5(0x204)][_0x5be0d5(0x20a)],'content':_0x3b1a13[_0x5be0d5(0x1e5)][_0x5be0d5(0x214)]});}catch(_0x524ccf){if(!isPlatformTransportFailure(_0x524ccf))throw _0x524ccf;_0x394255=!![];}let _0x1b698f;try{_0x1b698f=await getAppRule(_0x18bc1e[_0x5be0d5(0x216)],{'appCode':_0x18bc1e[_0x5be0d5(0x203)],'type':_0x3b1a13[_0x5be0d5(0x204)][_0x5be0d5(0x20a)]});}catch(_0x25ada8){const _0x339867=appRuleError(_0x394255?_0x5be0d5(0x209):'app_rule_verification_unavailable',_0x5be0d5(0x1e6)+appRuleFileName(_0x3b1a13[_0x5be0d5(0x204)][_0x5be0d5(0x20a)])+_0x5be0d5(0x1fa),_0x5be0d5(0x200));Object[_0x5be0d5(0x215)](_0x339867,_0x5be0d5(0x201),{'value':_0x25ada8,'enumerable':![]});throw _0x339867;}const _0x54d141=_0x1b698f&&inspectAppRuleContent(_0x1b698f[_0x5be0d5(0x214)])[_0x5be0d5(0x1f5)]===_0x3b1a13['replacement'][_0x5be0d5(0x1f5)],_0x503dea=_0x1b698f&&(_0x3b1a13[_0x5be0d5(0x20e)]===null||_0x1b698f[_0x5be0d5(0x21a)]>_0x3b1a13['beforeRecord'][_0x5be0d5(0x21a)]);if(!_0x1b698f||!_0x54d141||!_0x503dea)throw appRuleError(_0x394255?_0x5be0d5(0x209):_0x5be0d5(0x1f1),appRuleFileName(_0x3b1a13['input']['type'])+_0x5be0d5(0x1f4),_0x5be0d5(0x1ff)+_0x3b1a13['input'][_0x5be0d5(0x20a)]+_0x5be0d5(0x208));const _0x32f2b7=warningsFor(_0x3b1a13[_0x5be0d5(0x204)][_0x5be0d5(0x1ef)]);_0x394255&&_0x32f2b7[_0x5be0d5(0x21c)](_0x5be0d5(0x1fd));const _0x3acb3f=projectAppRule(_0x3b1a13[_0x5be0d5(0x204)][_0x5be0d5(0x20a)],_0x1b698f);return{'ok':!![],'data':{'operation':_0x5be0d5(0x1fc),'selector':{'appCode':_0x18bc1e[_0x5be0d5(0x203)],'scope':_0x5be0d5(0x1f8),'type':_0x3b1a13[_0x5be0d5(0x204)][_0x5be0d5(0x20a)]},'before':_0x3b1a13['before'],'after':_0x3acb3f,'dryRun':![],'backend':{'method':'POST','path':SAVE_PATH},'warnings':_0x32f2b7,'verification':{'status':'verified','recoveredAfterUnknownResponse':_0x394255,'expectedVersion':_0x3b1a13[_0x5be0d5(0x204)]['expectedVersion']??null,'atomicCompareAndSet':![],'lookupCommand':'rabetbase\x20rule\x20get\x20--type\x20'+_0x3b1a13[_0x5be0d5(0x204)][_0x5be0d5(0x20a)]+_0x5be0d5(0x1f3)}},'message':_0x5be0d5(0x210)+appRuleFileName(_0x3b1a13[_0x5be0d5(0x204)][_0x5be0d5(0x20a)])+_0x5be0d5(0x205)+_0x18bc1e[_0x5be0d5(0x203)]};}};
|
|
1
|
+
const a243_0xa3a42e=a243_0x4584;(function(_0x304c49,_0x3b679f){const _0x4b528f=a243_0x4584,_0x48e93d=_0x304c49();while(!![]){try{const _0x742ed9=parseInt(_0x4b528f(0x157))/0x1*(parseInt(_0x4b528f(0x12c))/0x2)+-parseInt(_0x4b528f(0x170))/0x3*(parseInt(_0x4b528f(0x161))/0x4)+parseInt(_0x4b528f(0x158))/0x5*(parseInt(_0x4b528f(0x15d))/0x6)+parseInt(_0x4b528f(0x164))/0x7*(-parseInt(_0x4b528f(0x149))/0x8)+parseInt(_0x4b528f(0x151))/0x9+-parseInt(_0x4b528f(0x16d))/0xa*(parseInt(_0x4b528f(0x137))/0xb)+-parseInt(_0x4b528f(0x140))/0xc;if(_0x742ed9===_0x3b679f)break;else _0x48e93d['push'](_0x48e93d['shift']());}catch(_0x1cb4a2){_0x48e93d['push'](_0x48e93d['shift']());}}}(a243_0x4a9c,0x40093));function a243_0x4a9c(){const _0x438e91=['type','str','content','app_rule_expected_version_invalid','\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.','\x20for\x20','unconfigured','1529XZHvIi','number','contentHash','write','DATABASE','Set\x20an\x20agent\x20context\x20rule\x20from\x20a\x20UTF-8\x20Markdown\x20file','The\x20received\x20rule\x20state\x20contradicts\x20the\x20requested\x20changes.','version','beforeRecord','5727636KHCZAs','file','input','cause','update','appCode','app_rule_verification_failed','Inspect\x20it\x20with\x20`rabetbase\x20rule\x20get\x20--type\x20','.\x20Run\x20rule\x20get\x20and\x20review\x20before\x20retrying.','17336DNhyGS','Do\x20not\x20resubmit\x20automatically.\x20Inspect\x20the\x20exact\x20rule\x20state\x20before\x20retrying.','Require\x20the\x20current\x20version\x20before\x20atomic\x20compare-and-set','UTF-8\x20Markdown\x20file\x20(RULES:\x202000\x20UTF-16\x20units;\x20DATABASE:\x205242880\x20units)','expected-version','Use\x20read-only\x20rule\x20reconciliation;\x20do\x20not\x20resubmit\x20automatically.','Set\x20','POST','4204890lYNkZZ','\x20--format\x20compress','isSafeInteger','before','\x20could\x20not\x20be\x20verified.','cookie','63843PGltbD','20fPyNhA','app_rule_file_required','expectedVersion','app_rule_set_outcome_unknown','create','751164SQYxDf','\x20does\x20not\x20prove\x20the\x20requested\x20set\x20state.','RULES\x20content\x20exceeds\x202000\x20UTF-16\x20units.','app_rule_version_mismatch','24obKAMp','app_rule_verification_unavailable','push','763PBttGx','rule','The\x20set\x20request\x20was\x20sent,\x20but\x20','trim','--file\x20is\x20required.','rules','byteSize','Pass\x20a\x20UTF-8\x20Markdown\x20file.','replacement','1060dLtNbb','string','rabetbase\x20rule\x20get\x20--type\x20','148335DnDVfO','set','10UCPzgH','Expected\x20','Set\x20response\x20was\x20unavailable;\x20verified\x20the\x20exact\x20content\x20readback\x20without\x20resubmitting.','--expected-version\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.'];a243_0x4a9c=function(){return _0x438e91;};return a243_0x4a9c();}function a243_0x4584(_0x431eeb,_0x17a0ee){_0x431eeb=_0x431eeb-0x12b;const _0x4a9c88=a243_0x4a9c();let _0x45844c=_0x4a9c88[_0x431eeb];return _0x45844c;}import{knowledgeDocumentsPath}from'../../core/api-client.js';import{getAppRule,isPlatformTransportFailure,saveAppRule}from'../../core/api-client.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{APP_RULE_TYPE_FLAG,appRuleContextScope,appRuleError,appRuleFileName,inspectAppRuleContent,projectAppRule,readAppRuleFile,readAppRuleType}from'../../commands/rule/shared.js';function readSetInput(_0x1c56ca){const _0x27f4fb=a243_0x4584,_0x30d34a=readAppRuleType(_0x1c56ca),_0x5a8e0=_0x1c56ca[_0x27f4fb(0x131)](_0x27f4fb(0x141))[_0x27f4fb(0x167)]();if(!_0x5a8e0)throw appRuleError(_0x27f4fb(0x159),_0x27f4fb(0x168),_0x27f4fb(0x16b));const _0x55e273=_0x1c56ca['flag'](_0x27f4fb(0x14d));let _0x121099;if(_0x55e273!==undefined){_0x121099=Number(_0x55e273);if(!Number[_0x27f4fb(0x153)](_0x121099)||_0x121099<0x0)throw appRuleError(_0x27f4fb(0x133),_0x27f4fb(0x12f));}return{'type':_0x30d34a,'file':_0x5a8e0,'expectedVersion':_0x121099};}async function prepareSet(_0x5ea188){const _0x34cced=a243_0x4584,_0x284dbe=readSetInput(_0x5ea188),_0x5a0667=await readAppRuleFile(_0x284dbe[_0x34cced(0x141)]);if(_0x284dbe[_0x34cced(0x130)]===_0x34cced(0x169)&&_0x5a0667[_0x34cced(0x132)]['length']>0x7d0)throw appRuleError('app_rule_content_too_large',_0x34cced(0x15f));const _0x3ffcc6=await getAppRule(_0x5ea188[_0x34cced(0x156)],{'appCode':_0x5ea188[_0x34cced(0x145)],'type':_0x284dbe[_0x34cced(0x130)]});if(_0x284dbe[_0x34cced(0x15a)]!==undefined&&(_0x3ffcc6?.[_0x34cced(0x13e)]??0x0)!==_0x284dbe['expectedVersion'])throw appRuleError(_0x34cced(0x160),appRuleFileName(_0x284dbe[_0x34cced(0x130)])+'\x20version\x20changed\x20before\x20write.',_0x34cced(0x12d)+_0x284dbe['expectedVersion']+';\x20current\x20version\x20is\x20'+(_0x3ffcc6?.[_0x34cced(0x13e)]??_0x34cced(0x136))+_0x34cced(0x148));return{'input':_0x284dbe,'replacement':_0x5a0667,'beforeRecord':_0x3ffcc6,'before':projectAppRule(_0x284dbe[_0x34cced(0x130)],_0x3ffcc6),'planned':{'type':_0x284dbe[_0x34cced(0x130)],'fileName':appRuleFileName(_0x284dbe[_0x34cced(0x130)]),'contextScope':appRuleContextScope(_0x284dbe[_0x34cced(0x130)]),'enabled':!![],'appCode':_0x5ea188['appCode'],'scope':_0x34cced(0x169),'contentByteSize':_0x5a0667['byteSize'],'contentHash':_0x5a0667[_0x34cced(0x139)]}};}function warningsFor(_0x26b829){return[];}export const ruleSet={'service':a243_0xa3a42e(0x165),'command':a243_0xa3a42e(0x12b),'description':a243_0xa3a42e(0x13c),'risk':a243_0xa3a42e(0x13a),'requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG,{'name':a243_0xa3a42e(0x141),'type':a243_0xa3a42e(0x16e),'required':!![],'description':a243_0xa3a42e(0x14c)},{'name':a243_0xa3a42e(0x14d),'type':a243_0xa3a42e(0x138),'required':![],'description':a243_0xa3a42e(0x14b)}],async 'validate'(_0xa8827f){readSetInput(_0xa8827f);},async 'dryRun'(_0x54e349){const _0x30c0c7=a243_0xa3a42e,_0x31294d=await prepareSet(_0x54e349);return asDryRunResult({'operation':_0x30c0c7(0x12b),'selector':{'appCode':_0x54e349[_0x30c0c7(0x145)],'scope':'rules','type':_0x31294d[_0x30c0c7(0x142)]['type']},'before':_0x31294d[_0x30c0c7(0x154)],'after':_0x31294d['planned'],'dryRun':!![],'backend':{'method':_0x30c0c7(0x150),'path':knowledgeDocumentsPath(_0x30c0c7(0x169),_0x31294d[_0x30c0c7(0x13f)]?_0x30c0c7(0x144):'create'),'body':{'appCode':_0x54e349['appCode'],..._0x31294d['beforeRecord']?{'id':_0x31294d[_0x30c0c7(0x13f)]['id']}:{},'title':_0x31294d['input'][_0x30c0c7(0x130)]==='rules'?'RULES':_0x30c0c7(0x13b),'contentHash':_0x31294d[_0x30c0c7(0x16c)][_0x30c0c7(0x139)],'contentByteSize':_0x31294d[_0x30c0c7(0x16c)][_0x30c0c7(0x16a)],..._0x31294d[_0x30c0c7(0x13f)]?{'expectedVersion':_0x31294d[_0x30c0c7(0x13f)]['version']}:{}}},'warnings':warningsFor(_0x31294d['input']['expectedVersion']),'verification':{'expectedVersion':_0x31294d[_0x30c0c7(0x13f)]?.[_0x30c0c7(0x13e)]??0x0,'atomicCompareAndSet':!![],'lookupCommand':'rabetbase\x20rule\x20get\x20--type\x20'+_0x31294d['input'][_0x30c0c7(0x130)]+_0x30c0c7(0x152)}},{'method':_0x30c0c7(0x150),'url':knowledgeDocumentsPath(_0x30c0c7(0x169),_0x31294d[_0x30c0c7(0x13f)]?_0x30c0c7(0x144):_0x30c0c7(0x15c))});},async 'execute'(_0x2cbba7){const _0x5b56cc=a243_0xa3a42e,_0x3d90a6=await prepareSet(_0x2cbba7),_0x40a18e=_0x3d90a6[_0x5b56cc(0x13f)]===null?0x1:_0x3d90a6[_0x5b56cc(0x13f)][_0x5b56cc(0x13e)]+(_0x3d90a6[_0x5b56cc(0x13f)][_0x5b56cc(0x132)]===_0x3d90a6[_0x5b56cc(0x16c)][_0x5b56cc(0x132)]?0x0:0x1);let _0x17259d,_0x3cba7a=![];try{_0x17259d=await saveAppRule(_0x2cbba7[_0x5b56cc(0x156)],{'appCode':_0x2cbba7[_0x5b56cc(0x145)],'type':_0x3d90a6[_0x5b56cc(0x142)][_0x5b56cc(0x130)],'content':_0x3d90a6[_0x5b56cc(0x16c)][_0x5b56cc(0x132)],'expectedVersion':_0x3d90a6[_0x5b56cc(0x13f)]?.['version']??0x0,..._0x3d90a6[_0x5b56cc(0x13f)]?{'id':_0x3d90a6[_0x5b56cc(0x13f)]['id']}:{}});if(_0x17259d[_0x5b56cc(0x13e)]!==_0x40a18e||_0x17259d[_0x5b56cc(0x132)]!==_0x3d90a6[_0x5b56cc(0x16c)][_0x5b56cc(0x132)]||_0x3d90a6[_0x5b56cc(0x13f)]!==null&&_0x17259d['id']!==_0x3d90a6[_0x5b56cc(0x13f)]['id'])throw appRuleError(_0x5b56cc(0x146),_0x5b56cc(0x13d),_0x5b56cc(0x14e));}catch(_0x1cef00){if(!isPlatformTransportFailure(_0x1cef00))throw _0x1cef00;_0x3cba7a=!![];}let _0x51fdfb;try{_0x51fdfb=await getAppRule(_0x2cbba7['cookie'],{'appCode':_0x2cbba7[_0x5b56cc(0x145)],'type':_0x3d90a6[_0x5b56cc(0x142)]['type']});}catch(_0x493874){const _0x2bf56e=appRuleError(_0x3cba7a?_0x5b56cc(0x15b):_0x5b56cc(0x162),_0x5b56cc(0x166)+appRuleFileName(_0x3d90a6[_0x5b56cc(0x142)][_0x5b56cc(0x130)])+_0x5b56cc(0x155),_0x5b56cc(0x14a));Object['defineProperty'](_0x2bf56e,_0x5b56cc(0x143),{'value':_0x493874,'enumerable':![]});throw _0x2bf56e;}const _0x17a9f9=_0x51fdfb&&inspectAppRuleContent(_0x51fdfb[_0x5b56cc(0x132)])['contentHash']===_0x3d90a6[_0x5b56cc(0x16c)]['contentHash'],_0x127cc0=_0x51fdfb&&_0x51fdfb['version']===_0x40a18e&&(!_0x17259d||_0x51fdfb['id']===_0x17259d['id']&&_0x51fdfb[_0x5b56cc(0x13e)]===_0x17259d[_0x5b56cc(0x13e)]);if(!_0x51fdfb||!_0x17a9f9||!_0x127cc0||_0x3d90a6[_0x5b56cc(0x13f)]!==null&&_0x51fdfb['id']!==_0x3d90a6[_0x5b56cc(0x13f)]['id'])throw appRuleError(_0x3cba7a?_0x5b56cc(0x15b):_0x5b56cc(0x146),appRuleFileName(_0x3d90a6['input'][_0x5b56cc(0x130)])+_0x5b56cc(0x15e),_0x5b56cc(0x147)+_0x3d90a6[_0x5b56cc(0x142)]['type']+_0x5b56cc(0x134));const _0x297047=warningsFor(_0x3d90a6['input'][_0x5b56cc(0x15a)]);_0x3cba7a&&_0x297047[_0x5b56cc(0x163)](_0x5b56cc(0x12e));const _0xd4bbc4=projectAppRule(_0x3d90a6[_0x5b56cc(0x142)][_0x5b56cc(0x130)],_0x51fdfb);return{'ok':!![],'data':{'operation':_0x5b56cc(0x12b),'selector':{'appCode':_0x2cbba7[_0x5b56cc(0x145)],'scope':'rules','type':_0x3d90a6[_0x5b56cc(0x142)][_0x5b56cc(0x130)]},'before':_0x3d90a6['before'],'after':_0xd4bbc4,'dryRun':![],'backend':{'method':_0x5b56cc(0x150),'path':knowledgeDocumentsPath('rules',_0x3d90a6[_0x5b56cc(0x13f)]?_0x5b56cc(0x144):_0x5b56cc(0x15c))},'warnings':_0x297047,'verification':{'status':'verified','recoveredAfterUnknownResponse':_0x3cba7a,'expectedVersion':_0x3d90a6[_0x5b56cc(0x13f)]?.[_0x5b56cc(0x13e)]??0x0,'atomicCompareAndSet':!![],'lookupCommand':_0x5b56cc(0x16f)+_0x3d90a6[_0x5b56cc(0x142)]['type']+_0x5b56cc(0x152)}},'message':_0x5b56cc(0x14f)+appRuleFileName(_0x3d90a6[_0x5b56cc(0x142)][_0x5b56cc(0x130)])+_0x5b56cc(0x135)+_0x2cbba7[_0x5b56cc(0x145)]};}};
|
|
@@ -2,6 +2,7 @@ import type { AppRuleRecord, AppRuleType } from "../../core/api-client.js";
|
|
|
2
2
|
import { CliError } from "../../errors.js";
|
|
3
3
|
import type { RuntimeContext } from "../../framework/types.js";
|
|
4
4
|
export declare const APP_RULE_TYPES: readonly AppRuleType[];
|
|
5
|
+
export declare const MAX_APP_RULE_UNITS: number;
|
|
5
6
|
export declare const MAX_APP_RULE_BYTES: number;
|
|
6
7
|
export type AppRuleContextScope = "page-api-development" | "database-analysis";
|
|
7
8
|
export declare function appRuleError(code: string, message: string, hint?: string): CliError;
|
|
@@ -23,16 +24,17 @@ export declare function projectAppRule(type: AppRuleType, record: AppRuleRecord
|
|
|
23
24
|
} | {
|
|
24
25
|
updateTime?: string | number | undefined;
|
|
25
26
|
createTime?: string | number | undefined;
|
|
27
|
+
contentByteSize: number;
|
|
28
|
+
contentHash: string;
|
|
29
|
+
indexStatus?: import("../../core/api-client.js").KnowledgeIndexStatus | undefined;
|
|
26
30
|
type: AppRuleType;
|
|
27
31
|
fileName: "RULES.md" | "DATABASE.md";
|
|
28
32
|
contextScope: AppRuleContextScope;
|
|
29
33
|
enabled: boolean;
|
|
30
|
-
id:
|
|
34
|
+
id: string;
|
|
31
35
|
scope: "rules";
|
|
32
36
|
appCode: string;
|
|
33
37
|
version: number;
|
|
34
|
-
contentByteSize: number;
|
|
35
|
-
contentHash: string;
|
|
36
38
|
};
|
|
37
39
|
export declare const APP_RULE_TYPE_FLAG: {
|
|
38
40
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a244_0x268a4c=a244_0x1180;(function(_0x1f09ab,_0x1f40af){const _0x3b84a8=a244_0x1180,_0x1d48b6=_0x1f09ab();while(!![]){try{const _0xf422a2=-parseInt(_0x3b84a8(0x145))/0x1+parseInt(_0x3b84a8(0x141))/0x2+-parseInt(_0x3b84a8(0x14a))/0x3*(-parseInt(_0x3b84a8(0x14d))/0x4)+-parseInt(_0x3b84a8(0x146))/0x5+-parseInt(_0x3b84a8(0x143))/0x6+parseInt(_0x3b84a8(0x156))/0x7*(parseInt(_0x3b84a8(0x13f))/0x8)+-parseInt(_0x3b84a8(0x13d))/0x9;if(_0xf422a2===_0x1f40af)break;else _0x1d48b6['push'](_0x1d48b6['shift']());}catch(_0x50c8e1){_0x1d48b6['push'](_0x1d48b6['shift']());}}}(a244_0x3094,0x95ee8));import{createHash}from'node:crypto';function a244_0x3094(){const _0x4b27c2=['length','contentHash','database','App\x20rule\x20file\x20is\x20blank:\x20','1065969Bvzqsy','app_rule_content_too_large','6334288WufAvp','scope','604994LMumgU','Context\x20rule\x20type:\x20rules\x20for\x20page/API\x20development\x20agents\x20(DB\x20Agent\x20excluded),\x20database\x20for\x20DB\x20Agent\x20database\x20analysis','2304900hxSnGW','message','296266zPLdVQ','1690880wGAxQG','str','App\x20rule\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','digest','15lVipsd','Cannot\x20read\x20app\x20rule\x20file:\x20','App\x20rule\x20content\x20exceeds\x205242880\x20UTF-16\x20units.','525496gJDEgw','appCode','page-api-development','RULES.md','app_rule_file_invalid','rules','content','byteLength','App\x20rule\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','7HRDjGn','app_rule_file_required','string','app_rule_content_invalid','createTime','Pass\x20a\x20UTF-8\x20Markdown\x20file.','Cannot\x20access\x20app\x20rule\x20file:\x20','size','sha256:','--file\x20is\x20required.','--type\x20must\x20be\x20either\x20rules\x20or\x20database.','byteSize','decode','app_rule_file_unreadable','utf8','App\x20rule\x20content\x20exceeds\x20the\x20bounded\x20UTF-8\x20file\x20limit.','updateTime','trim','type','indexStatus','update'];a244_0x3094=function(){return _0x4b27c2;};return a244_0x3094();}import{readFile,stat}from'node:fs/promises';import{resolve}from'node:path';import{TextDecoder}from'node:util';import{CliError}from'../../errors.js';export const APP_RULE_TYPES=['rules',a244_0x268a4c(0x13b)];function a244_0x1180(_0x4366bd,_0x30c51f){_0x4366bd=_0x4366bd-0x125;const _0x3094fe=a244_0x3094();let _0x11808d=_0x3094fe[_0x4366bd];return _0x11808d;}export const MAX_APP_RULE_UNITS=0x5*0x400*0x400;export const MAX_APP_RULE_BYTES=MAX_APP_RULE_UNITS*0x4;const APP_RULE_FILES={'rules':a244_0x268a4c(0x150),'database':'DATABASE.md'},APP_RULE_CONTEXT_SCOPES={'rules':a244_0x268a4c(0x14f),'database':'database-analysis'};export function appRuleError(_0x5590f2,_0x24fbf5,_0x58a643){return new CliError(_0x5590f2,0x1,_0x24fbf5,_0x58a643);}export function readAppRuleType(_0x2edaed){const _0x3fe0c9=a244_0x268a4c,_0x10b373=_0x2edaed[_0x3fe0c9(0x147)](_0x3fe0c9(0x136))['trim']()['toLowerCase']();if(_0x10b373!==_0x3fe0c9(0x152)&&_0x10b373!==_0x3fe0c9(0x13b))throw appRuleError('app_rule_type_invalid',_0x3fe0c9(0x12e));return _0x10b373;}export function appRuleFileName(_0x5e7197){return APP_RULE_FILES[_0x5e7197];}export function appRuleContextScope(_0x4c801e){return APP_RULE_CONTEXT_SCOPES[_0x4c801e];}export function inspectAppRuleContent(_0x4214e5){const _0x57f3c7=a244_0x268a4c,_0x368e3a=Buffer['from'](_0x4214e5,_0x57f3c7(0x132));return{'content':_0x4214e5,'byteSize':_0x368e3a[_0x57f3c7(0x154)],'contentHash':_0x57f3c7(0x12c)+createHash('sha256')[_0x57f3c7(0x138)](_0x368e3a)[_0x57f3c7(0x149)]('hex')};}export async function readAppRuleFile(_0x493ed2){const _0x4fe0d6=a244_0x268a4c,_0x3f7124=_0x493ed2[_0x4fe0d6(0x135)]();if(!_0x3f7124)throw appRuleError(_0x4fe0d6(0x125),_0x4fe0d6(0x12d),_0x4fe0d6(0x129));const _0x4f8f6a=resolve(_0x3f7124);let _0x652393;try{_0x652393=await stat(_0x4f8f6a);}catch(_0x4ae365){throw appRuleError('app_rule_file_unreadable',_0x4fe0d6(0x12a)+_0x3f7124,_0x4ae365 instanceof Error?_0x4ae365['message']:String(_0x4ae365));}if(!_0x652393['isFile']())throw appRuleError(_0x4fe0d6(0x151),_0x4fe0d6(0x148)+_0x3f7124);if(_0x652393[_0x4fe0d6(0x12b)]>MAX_APP_RULE_BYTES)throw appRuleError(_0x4fe0d6(0x13e),_0x4fe0d6(0x133));let _0x53bd8c;try{_0x53bd8c=await readFile(_0x4f8f6a);}catch(_0x1a271e){throw appRuleError(_0x4fe0d6(0x131),_0x4fe0d6(0x14b)+_0x3f7124,_0x1a271e instanceof Error?_0x1a271e[_0x4fe0d6(0x144)]:String(_0x1a271e));}if(_0x53bd8c['byteLength']>MAX_APP_RULE_BYTES)throw appRuleError('app_rule_content_too_large',_0x4fe0d6(0x133));let _0xe419da;try{_0xe419da=new TextDecoder('utf-8',{'fatal':!![],'ignoreBOM':!![]})[_0x4fe0d6(0x130)](_0x53bd8c);}catch{throw appRuleError(_0x4fe0d6(0x127),_0x4fe0d6(0x155)+_0x3f7124);}if(_0xe419da[_0x4fe0d6(0x139)]>MAX_APP_RULE_UNITS)throw appRuleError(_0x4fe0d6(0x13e),_0x4fe0d6(0x14c));if(!_0xe419da[_0x4fe0d6(0x135)]())throw appRuleError(_0x4fe0d6(0x127),_0x4fe0d6(0x13c)+_0x3f7124);return inspectAppRuleContent(_0xe419da);}export function projectAppRule(_0x453fa7,_0x2e58e5){const _0x1131c8=a244_0x268a4c;if(!_0x2e58e5)return{'type':_0x453fa7,'fileName':appRuleFileName(_0x453fa7),'contextScope':appRuleContextScope(_0x453fa7),'enabled':![]};const _0x2dfab3=inspectAppRuleContent(_0x2e58e5[_0x1131c8(0x153)]);return{'type':_0x453fa7,'fileName':appRuleFileName(_0x453fa7),'contextScope':appRuleContextScope(_0x453fa7),'enabled':!![],'id':_0x2e58e5['id'],'scope':_0x2e58e5[_0x1131c8(0x140)],'appCode':_0x2e58e5[_0x1131c8(0x14e)],'version':_0x2e58e5['version'],..._0x2e58e5['indexStatus']!==undefined?{'indexStatus':_0x2e58e5[_0x1131c8(0x137)]}:{},'contentByteSize':_0x2dfab3[_0x1131c8(0x12f)],'contentHash':_0x2dfab3[_0x1131c8(0x13a)],..._0x2e58e5[_0x1131c8(0x128)]!==undefined&&_0x2e58e5[_0x1131c8(0x128)]!==null?{'createTime':_0x2e58e5['createTime']}:{},..._0x2e58e5['updateTime']!==undefined&&_0x2e58e5[_0x1131c8(0x134)]!==null?{'updateTime':_0x2e58e5[_0x1131c8(0x134)]}:{}};}export const APP_RULE_TYPE_FLAG={'name':a244_0x268a4c(0x136),'type':a244_0x268a4c(0x126),'required':!![],'description':a244_0x268a4c(0x142),'enum':[...APP_RULE_TYPES]};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a245_0xcfc987=a245_0x4995;(function(_0x53ed89,_0xf6312){const _0x2e25b0=a245_0x4995,_0x57bd3d=_0x53ed89();while(!![]){try{const _0x12f0fc=parseInt(_0x2e25b0(0xb8))/0x1*(-parseInt(_0x2e25b0(0xc2))/0x2)+parseInt(_0x2e25b0(0xe0))/0x3+parseInt(_0x2e25b0(0xb9))/0x4+parseInt(_0x2e25b0(0xb2))/0x5*(parseInt(_0x2e25b0(0xdd))/0x6)+-parseInt(_0x2e25b0(0xd7))/0x7*(-parseInt(_0x2e25b0(0xc8))/0x8)+parseInt(_0x2e25b0(0xd3))/0x9+-parseInt(_0x2e25b0(0xd2))/0xa;if(_0x12f0fc===_0xf6312)break;else _0x57bd3d['push'](_0x57bd3d['shift']());}catch(_0xa4bf08){_0x57bd3d['push'](_0x57bd3d['shift']());}}}(a245_0x367c,0x85279));import{readFileSync,existsSync}from'node:fs';import{CLI_BIN_NAME}from'../../constant/cli.js';function a245_0x367c(){const _0x587248=['pnpm','slice','all','belowMinimum','preview','vite\x20preview\x20exited\x20with\x20code\x20','watch','21777880CvEvTQ','6985773qyKEFZ','No\x20scripts\x20defined\x20in\x20package.json.','has','bun.lock','371805rFMQip','keys','vite','inherit','run','Run\x20a\x20package.json\x20script','84ENPslV','bun','\x20run\x20<script>\x0a','1753809THRypK','push','bun.lockb','bool','\x20run\x20preview','write','\x20exited\x20with\x20code\x20','args','log','parse','\x20\x20EXAMPLES','Script\x20\x22','pnpm-lock.yaml','boolean','\x20\x20\x20\x20','yarn.lock','dev','length','cwd','changed','path','Available:\x20','error','start','\x20run\x20start','285525BLlbfF','scripts','script','validation','.bin','Domain\x20routing\x20synchronized:\x20','643vQBnJc','813800gcRscq','\x20run\x20preview\x20--watch','\x22\x20not\x20found\x20in\x20package.json.','package.json','npm','needsUpgrade','vite\x20build\x20--watch\x20exited\x20with\x20code\x20','node_modules','No\x20package.json\x20found\x20in\x20current\x20directory.','534VEXocE','Enable\x20watch\x20mode\x20for\x20preview','yarn','close','utf-8','--watch','80HJMZgN','\x0a\x20\x20Available\x20scripts:\x0a','\x20run\x20build'];a245_0x367c=function(){return _0x587248;};return a245_0x367c();}import{resolve,delimiter,join}from'node:path';import{spawn}from'node:child_process';import{CliErrors}from'../../errors.js';import{findProjectRootDirectory,resolveConfigPath}from'../../context/config-loader.js';import{writeProjectDomainRoutingManifest}from'../../config/project-domain-routing.js';import{checkSdkVersion,printSdkUpgradeWarning}from'../../utils/check-sdk-version.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../utils/cli-version-check.js';const VERSION_CHECK_SCRIPTS=new Set([a245_0xcfc987(0xb0),a245_0xcfc987(0xa9)]),DOMAIN_ROUTING_SYNC_SCRIPTS=new Set([a245_0xcfc987(0xb0),a245_0xcfc987(0xa9),'build','preview']);export function syncProjectDomainRoutingBeforeScript(_0xbd3e87,_0x3a6ef2){const _0x28f692=a245_0xcfc987;if(!DOMAIN_ROUTING_SYNC_SCRIPTS['has'](_0x3a6ef2))return null;const _0x5b95e4=findProjectRootDirectory(_0xbd3e87);if(!resolveConfigPath(_0x5b95e4))return null;const _0x20c14f=writeProjectDomainRoutingManifest(_0x5b95e4);return{'path':_0x20c14f[_0x28f692(0xad)],'changed':_0x20c14f[_0x28f692(0xac)]};}function readPackageScripts(_0x20f684){const _0x2a2e20=a245_0xcfc987,_0x459930=resolve(_0x20f684,_0x2a2e20(0xbc));if(!existsSync(_0x459930))return null;try{const _0x15dd68=JSON[_0x2a2e20(0xa2)](readFileSync(_0x459930,_0x2a2e20(0xc6)));return _0x15dd68[_0x2a2e20(0xb3)]??{};}catch{return null;}}function detectPackageManager(_0x3bcb4b){const _0x423c68=a245_0xcfc987;if(existsSync(resolve(_0x3bcb4b,_0x423c68(0x9b)))||existsSync(resolve(_0x3bcb4b,_0x423c68(0xd6))))return _0x423c68(0xde);if(existsSync(resolve(_0x3bcb4b,_0x423c68(0xa5))))return _0x423c68(0xcb);if(existsSync(resolve(_0x3bcb4b,_0x423c68(0xa8))))return _0x423c68(0xc4);return _0x423c68(0xbd);}async function versionCheck(_0x4f7c34){const _0xba911=a245_0xcfc987,_0x28d042=await checkCliVersion();(_0x28d042[_0xba911(0xbe)]||_0x28d042[_0xba911(0xce)])&&(printCliUpgradeWarning(_0x28d042),assertCliVersionSupported(_0x28d042));const _0x908c25=await checkSdkVersion(_0x4f7c34);if(_0x908c25[_0xba911(0xbe)])printSdkUpgradeWarning(_0x908c25);}function spawnScript(_0x120022,_0x1df2c3,_0x34b2c0,_0xc1f762){return new Promise((_0x325e15,_0x1a521a)=>{const _0x384579=a245_0x4995,_0x4fb08a=['run',_0x1df2c3,..._0x34b2c0],_0x10f50b=spawn(_0x120022,_0x4fb08a,{'cwd':_0xc1f762,'stdio':_0x384579(0xda),'shell':!![],'env':{...process.env,'PATH':''+join(_0xc1f762,_0x384579(0xc0),_0x384579(0xb6))+delimiter+process.env.PATH}});_0x10f50b['on'](_0x384579(0xc5),_0x5607fa=>{const _0x33b564=_0x384579;if(_0x5607fa===0x0||_0x5607fa===null)_0x325e15();else _0x1a521a(new Error(_0x120022+'\x20run\x20'+_0x1df2c3+_0x33b564(0x9f)+_0x5607fa));}),_0x10f50b['on']('error',_0x1a521a);});}function spawnViteBuildWatch(_0x359bfa){return new Promise((_0x36368f,_0x3384d5)=>{const _0x1a54a4=a245_0x4995,_0x2b108f=spawn(_0x1a54a4(0xd9),['build',_0x1a54a4(0xc7)],{'cwd':_0x359bfa,'stdio':'inherit','shell':!![],'env':{...process.env,'PATH':''+join(_0x359bfa,_0x1a54a4(0xc0),_0x1a54a4(0xb6))+delimiter+process.env.PATH}});_0x2b108f['on']('close',_0x4fd2f3=>{const _0x70a893=_0x1a54a4;if(_0x4fd2f3===0x0||_0x4fd2f3===null)_0x36368f();else _0x3384d5(new Error(_0x70a893(0xbf)+_0x4fd2f3));}),_0x2b108f['on']('error',_0x3384d5);});}function spawnVitePreview(_0x4d7343){return new Promise((_0x457ac2,_0x30a974)=>{const _0x5c3607=a245_0x4995,_0x386eb7=spawn('vite',[_0x5c3607(0xcf)],{'cwd':_0x4d7343,'stdio':_0x5c3607(0xda),'shell':!![],'env':{...process.env,'PATH':''+join(_0x4d7343,_0x5c3607(0xc0),_0x5c3607(0xb6))+delimiter+process.env.PATH}});_0x386eb7['on'](_0x5c3607(0xc5),_0x50bff0=>{const _0x1ca49f=_0x5c3607;if(_0x50bff0===0x0||_0x50bff0===null)_0x457ac2();else _0x30a974(new Error(_0x1ca49f(0xd0)+_0x50bff0));}),_0x386eb7['on'](_0x5c3607(0xaf),_0x30a974);});}function a245_0x4995(_0x5f8104,_0x2d31b0){_0x5f8104=_0x5f8104-0x9a;const _0x367c73=a245_0x367c();let _0x4995ce=_0x367c73[_0x5f8104];return _0x4995ce;}const runFlags=[{'name':a245_0xcfc987(0xd1),'type':a245_0xcfc987(0xa6),'description':a245_0xcfc987(0xc3),'default':![]}];export const runDefinition={'service':a245_0xcfc987(0xdb),'command':a245_0xcfc987(0xdb),'description':a245_0xcfc987(0xdc),'risk':a245_0xcfc987(0x9e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a245_0xcfc987(0xb4),'description':'Script\x20name\x20defined\x20in\x20package.json','required':![]}],'flags':runFlags,'helpExtra':()=>{const _0x117cfb=a245_0xcfc987,_0x2743bd=[];return _0x2743bd[_0x117cfb(0x9a)](_0x117cfb(0xa3)),_0x2743bd[_0x117cfb(0x9a)]('\x20\x20\x20\x20'+CLI_BIN_NAME+_0x117cfb(0xb1)),_0x2743bd[_0x117cfb(0x9a)](_0x117cfb(0xa7)+CLI_BIN_NAME+_0x117cfb(0xca)),_0x2743bd[_0x117cfb(0x9a)]('\x20\x20\x20\x20'+CLI_BIN_NAME+_0x117cfb(0x9d)),_0x2743bd[_0x117cfb(0x9a)]('\x20\x20\x20\x20'+CLI_BIN_NAME+_0x117cfb(0xba)),_0x2743bd['join']('\x0a');},async 'execute'(_0x2d7802){const _0x52ffce=a245_0xcfc987,_0x34d0bd=process[_0x52ffce(0xab)](),_0x224c5f=_0x2d7802['args'][0x0],_0x318abb=_0x2d7802[_0x52ffce(0xa0)][_0x52ffce(0xcc)](0x1),_0x250b7b=readPackageScripts(_0x34d0bd);if(!_0x250b7b)throw CliErrors['validation'](_0x52ffce(0xc1));if(!_0x224c5f){const _0x51866e=Object[_0x52ffce(0xd8)](_0x250b7b);if(_0x51866e[_0x52ffce(0xaa)]===0x0)console[_0x52ffce(0xa1)](_0x52ffce(0xd4));else{console['log'](_0x52ffce(0xc9));for(const _0x1ed839 of _0x51866e){console[_0x52ffce(0xa1)](_0x52ffce(0xa7)+_0x1ed839);}console[_0x52ffce(0xa1)]('\x0a\x20\x20Usage:\x20'+CLI_BIN_NAME+_0x52ffce(0xdf));}return{'ok':!![]};}if(!_0x250b7b[_0x224c5f])throw CliErrors[_0x52ffce(0xb5)](_0x52ffce(0xa4)+_0x224c5f+_0x52ffce(0xbb),_0x52ffce(0xae)+(Object['keys'](_0x250b7b)['join'](',\x20')||'(none)'));const _0x4a7da9=detectPackageManager(_0x34d0bd),_0x3bcd09=syncProjectDomainRoutingBeforeScript(_0x34d0bd,_0x224c5f);_0x3bcd09?.[_0x52ffce(0xac)]&&console[_0x52ffce(0xaf)](_0x52ffce(0xb7)+_0x3bcd09[_0x52ffce(0xad)]);VERSION_CHECK_SCRIPTS[_0x52ffce(0xd5)](_0x224c5f)&&await versionCheck(_0x34d0bd);if(_0x224c5f===_0x52ffce(0xcf)&&_0x2d7802[_0x52ffce(0x9c)](_0x52ffce(0xd1)))return await Promise[_0x52ffce(0xcd)]([spawnViteBuildWatch(_0x34d0bd),spawnVitePreview(_0x34d0bd)]),{'ok':!![]};return await spawnScript(_0x4a7da9,_0x224c5f,_0x318abb,_0x34d0bd),{'ok':!![]};}};
|
package/lib/commands/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a246_0x2d46ed=a246_0x2648;(function(_0x5b2f17,_0x4a56b4){const _0x3f2588=a246_0x2648,_0x5bf3b8=_0x5b2f17();while(!![]){try{const _0x5ae167=parseInt(_0x3f2588(0x1e8))/0x1+-parseInt(_0x3f2588(0x1e0))/0x2*(parseInt(_0x3f2588(0x1e9))/0x3)+parseInt(_0x3f2588(0x1df))/0x4*(parseInt(_0x3f2588(0x1e2))/0x5)+-parseInt(_0x3f2588(0x1dc))/0x6+-parseInt(_0x3f2588(0x1e7))/0x7+parseInt(_0x3f2588(0x1eb))/0x8*(parseInt(_0x3f2588(0x1e5))/0x9)+parseInt(_0x3f2588(0x1e6))/0xa*(parseInt(_0x3f2588(0x1e3))/0xb);if(_0x5ae167===_0x4a56b4)break;else _0x5bf3b8['push'](_0x5bf3b8['shift']());}catch(_0x210aae){_0x5bf3b8['push'](_0x5bf3b8['shift']());}}}(a246_0x556e,0xc1845));import{buildSchemaPayload}from'../framework/schema-export.js';function a246_0x2648(_0x56e51c,_0x302088){_0x56e51c=_0x56e51c-0x1dc;const _0x556ef4=a246_0x556e();let _0x2648f2=_0x556ef4[_0x56e51c];return _0x2648f2;}async function execute(_0xb1d17e){const _0x1800b9=await buildSchemaPayload();return{'ok':!![],'data':_0x1800b9};}export const schemaDefinition={'service':a246_0x2d46ed(0x1ea),'command':a246_0x2d46ed(0x1de),'description':a246_0x2d46ed(0x1e1),'risk':a246_0x2d46ed(0x1dd),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'defaultOutputFormat':a246_0x2d46ed(0x1e4),'flags':[],'execute':execute};function a246_0x556e(){const _0x55a659=['export','200seTLyg','24qbCYLA','Export\x20machine-readable\x20command\x20schema\x20(JSON)','117470HlfHaN','3327247VyPDXB','json','99lnVllt','20OZUMBz','10064439BnVlQo','695552fHXEgF','207228cLROeH','schema','1009016hbJkeH','4819614YteDuT','read'];a246_0x556e=function(){return _0x55a659;};return a246_0x556e();}
|