@lovrabet/rabetbase-cli 2.5.2 → 2.5.3-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.d.ts +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.d.ts +2 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/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/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/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.d.ts +23 -0
- package/lib/config/region-config.js +1 -0
- package/lib/config/schema.d.ts +15 -0
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.d.ts +6 -0
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.d.ts +13 -0
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +2 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.d.ts +6 -0
- package/lib/core/page/lr-smart-jsx.js +1 -0
- 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/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/types/index.d.ts +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.d.ts +2 -8
- 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.d.ts +2 -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 +6 -5
- package/skills/rabetbase/guides/page-development-workflow.md +3 -0
- package/skills/rabetbase/guides/sdk-client-generation.md +5 -5
- package/skills/rabetbase/knowledge/page-schema/LrSmartJsx.md +11 -3
- package/skills/rabetbase/references/rabetbase-api-pull.md +5 -4
- package/skills/rabetbase/references/rabetbase-app-list.md +3 -0
- package/skills/rabetbase/references/rabetbase-bff-list.md +1 -1
- package/skills/rabetbase/references/rabetbase-bff-pull.md +2 -0
- package/skills/rabetbase/references/rabetbase-bff-status.md +2 -0
- package/skills/rabetbase/references/rabetbase-config.md +10 -9
- package/skills/rabetbase/references/rabetbase-doctor.md +2 -2
- package/skills/rabetbase/references/rabetbase-page-push.md +5 -1
- package/skills/rabetbase/references/rabetbase-workspace.md +4 -2
- package/skills/rabetbase.manifest.json +3 -3
- package/templates/generate-api/client.ts.tpl +1 -1
package/lib/commands/registry.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a189_0x5d4446=a189_0x39ed;(function(_0x7a9485,_0x5942fe){const _0x17d3de=a189_0x39ed,_0x3a0e89=_0x7a9485();while(!![]){try{const _0x544a6a=parseInt(_0x17d3de(0xf6))/0x1+parseInt(_0x17d3de(0xbf))/0x2*(parseInt(_0x17d3de(0x100))/0x3)+-parseInt(_0x17d3de(0x112))/0x4*(-parseInt(_0x17d3de(0x10d))/0x5)+-parseInt(_0x17d3de(0xca))/0x6+-parseInt(_0x17d3de(0x131))/0x7*(parseInt(_0x17d3de(0xc6))/0x8)+parseInt(_0x17d3de(0x12f))/0x9+parseInt(_0x17d3de(0xc4))/0xa*(parseInt(_0x17d3de(0x120))/0xb);if(_0x544a6a===_0x5942fe)break;else _0x3a0e89['push'](_0x3a0e89['shift']());}catch(_0x4fe872){_0x3a0e89['push'](_0x3a0e89['shift']());}}}(a189_0x5403,0xa294c));import{apiDefinitions}from'../commands/api/index.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{pageDefinitions}from'../commands/page/index.js';import{dbDefinitions}from'../commands/db/index.js';import{deploymentDefinitions}from'../commands/deployment/index.js';import{codegenDefinitions}from'../commands/codegen/index.js';import{menuDefinitions}from'../commands/menu/index.js';import{taskDefinitions}from'../commands/task/index.js';import{tenantDefinitions}from'../commands/tenant/index.js';import{roleDefinitions}from'../commands/role/index.js';import{appDefinitions}from'../commands/app/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{ruleDefinitions}from'../commands/rule/index.js';import{notificationDefinitions}from'../commands/notification/index.js';import{instantApiPolicyDefinitions}from'../commands/instant-api-policy/index.js';import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/index.js';import{doctorDefinition}from'../commands/doctor.js';import{updateDefinition}from'../commands/cli-update.js';import{schemaDefinition}from'../commands/schema.js';import{issueDefinitions}from'../commands/issue/index.js';import{fileDefinitions}from'../commands/file/index.js';import{ocrDefinitions}from'../commands/ocr/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{userAccountDefinitions}from'../commands/user-account/index.js';import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{projectDefinitions}from'../commands/project/index.js';import{runDefinition}from'../commands/run/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function a189_0x39ed(_0x1d65a7,_0x435f97){_0x1d65a7=_0x1d65a7-0xbc;const _0x540320=a189_0x5403();let _0x39ed48=_0x540320[_0x1d65a7];return _0x39ed48;}function registerDefinitions(_0x4a4077){const _0x24793d=a189_0x39ed;for(const _0x48b1bc of _0x4a4077){definitions[_0x24793d(0x132)](_0x48b1bc[_0x24793d(0x127)]+':'+_0x48b1bc[_0x24793d(0xd3)],_0x48b1bc);let _0x2484ce=serviceGroups[_0x24793d(0x121)](_0x48b1bc[_0x24793d(0x127)]);!_0x2484ce&&(_0x2484ce=[],serviceGroups[_0x24793d(0x132)](_0x48b1bc[_0x24793d(0x127)],_0x2484ce)),_0x2484ce['push'](_0x48b1bc);}}function registerDeclarativeService(_0x538da5,_0x6f2f62,_0x266130){const _0x171d7c=a189_0x39ed;registerDefinitions(_0x6f2f62);_0x266130?.[_0x171d7c(0xc0)]&®isterDefinitions([_0x266130[_0x171d7c(0xc0)]]);const _0x41742a=_0x4af03e=>_0x4af03e===_0x171d7c(0x11d)?'':_0x4af03e===_0x171d7c(0x133)?'\x20\x20[write]':_0x171d7c(0x130),_0x5b2115={'service':_0x6f2f62[0x0][_0x171d7c(0x127)],'label':_0x538da5,'commands':_0x6f2f62[_0x171d7c(0xdb)](_0x30b310=>!_0x30b310[_0x171d7c(0xc2)])[_0x171d7c(0x11b)](_0x3850af=>({'command':_0x3850af[_0x171d7c(0xd3)],'description':_0x3850af[_0x171d7c(0xf4)],'tag':_0x41742a(_0x3850af[_0x171d7c(0xff)])})),'declarative':!![],'defaultCommand':_0x266130?.[_0x171d7c(0x111)]??(_0x266130?.[_0x171d7c(0xbe)]?_0x6f2f62[0x0][_0x171d7c(0xd3)]:undefined),'wildcardDef':_0x266130?.[_0x171d7c(0xc0)],'isSingleCommand':_0x266130?.['isSingleCommand']};serviceRegistry[_0x171d7c(0xce)](_0x5b2115),serviceByName[_0x171d7c(0x132)](_0x5b2115[_0x171d7c(0x127)],_0x5b2115);}registerDeclarativeService(a189_0x5d4446(0xf8),projectDefinitions),registerDeclarativeService(a189_0x5d4446(0x116),workspaceDefinitions),registerDeclarativeService(a189_0x5d4446(0xe4),appDefinitions),registerDeclarativeService(a189_0x5d4446(0xfd),authDefinitions,{'defaultCommand':'login'}),registerDeclarativeService('Tenant\x20Members',tenantDefinitions),registerDeclarativeService('User\x20Accounts',userAccountDefinitions),registerDeclarativeService(a189_0x5d4446(0xcc),datasetDefinitions),registerDeclarativeService('Data\x20List\x20Pages\x20&\x20Custom\x20Pages',pageDefinitions),registerDeclarativeService('API\x20Development',apiDefinitions),registerDeclarativeService(a189_0x5d4446(0xeb),bffDefinitions),registerDeclarativeService(a189_0x5d4446(0xcf),instantApiPolicyDefinitions),registerDeclarativeService(a189_0x5d4446(0x12b),notificationDefinitions),registerDeclarativeService(a189_0x5d4446(0x125),sqlDefinitions),registerDeclarativeService(a189_0x5d4446(0x10b),dbDefinitions),registerDeclarativeService(a189_0x5d4446(0x12d),deploymentDefinitions),registerDeclarativeService(a189_0x5d4446(0xd6),menuDefinitions),registerDeclarativeService(a189_0x5d4446(0x123),taskDefinitions),registerDeclarativeService('Roles',roleDefinitions),registerDeclarativeService(a189_0x5d4446(0xfb),appConfigDefinitions),registerDeclarativeService(a189_0x5d4446(0xfa),kbDefinitions),registerDeclarativeService('Agent\x20Context\x20Rules',ruleDefinitions),registerDeclarativeService(a189_0x5d4446(0xcb),issueDefinitions),registerDeclarativeService('File',fileDefinitions),registerDeclarativeService('OCR',ocrDefinitions),registerDeclarativeService(a189_0x5d4446(0xda),codegenDefinitions),registerDeclarativeService('Configuration',configDefinitions),registerDeclarativeService('Diagnostics',[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a189_0x5d4446(0xf9),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a189_0x5d4446(0x105),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a189_0x5d4446(0xe3),cliSkillDefinitions,{'defaultCommand':a189_0x5d4446(0xdc)}),registerDeclarativeService(a189_0x5d4446(0x108),logsDefinitions,{'defaultCommand':a189_0x5d4446(0xe7)}),registerDeclarativeService(a189_0x5d4446(0x126),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry['length']-0x1];last[a189_0x5d4446(0x12e)]=[{'command':a189_0x5d4446(0xe2),'description':'Run\x20any\x20package.json\x20script','tag':'\x20\x20['+runDefinition[a189_0x5d4446(0xff)]+']'}];}const REMOVED_COMMAND_REPLACEMENTS=new Map([[a189_0x5d4446(0xf5),a189_0x5d4446(0x10a)],['bff:new',a189_0x5d4446(0xe9)],[a189_0x5d4446(0xf2),a189_0x5d4446(0xc3)],[a189_0x5d4446(0xe0),a189_0x5d4446(0x119)],[a189_0x5d4446(0xd4),a189_0x5d4446(0x102)],['skill:','rabetbase\x20cli-skill\x20install'],[a189_0x5d4446(0xe1),a189_0x5d4446(0xd8)],[a189_0x5d4446(0x11f),'rabetbase\x20cli-skill\x20install'],['skills:install',a189_0x5d4446(0xd8)],[a189_0x5d4446(0xc7),a189_0x5d4446(0xd2)],[a189_0x5d4446(0x11a),a189_0x5d4446(0x12a)],[a189_0x5d4446(0xf7),'rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>'],[a189_0x5d4446(0x11e),a189_0x5d4446(0x10e)],[a189_0x5d4446(0xf3),a189_0x5d4446(0x109)],[a189_0x5d4446(0x103),a189_0x5d4446(0xc8)],[a189_0x5d4446(0x10f),a189_0x5d4446(0x124)],[a189_0x5d4446(0xc5),a189_0x5d4446(0xe8)],[a189_0x5d4446(0x129),a189_0x5d4446(0xd7)],[a189_0x5d4446(0x118),a189_0x5d4446(0xdd)],[a189_0x5d4446(0xed),a189_0x5d4446(0xd1)],[a189_0x5d4446(0x113),a189_0x5d4446(0xe6)],[a189_0x5d4446(0xbc),a189_0x5d4446(0xef)],[a189_0x5d4446(0xd5),a189_0x5d4446(0xf0)],[a189_0x5d4446(0xd0),a189_0x5d4446(0xf0)],['page:react-list',a189_0x5d4446(0xfc)],[a189_0x5d4446(0x128),a189_0x5d4446(0xbd)],[a189_0x5d4446(0x107),a189_0x5d4446(0x117)],[a189_0x5d4446(0xc1),a189_0x5d4446(0x101)]]),REMOVED_COMMAND_HINTS=new Map([[a189_0x5d4446(0xcd),a189_0x5d4446(0xd9)],['permit:page-get','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.'],[a189_0x5d4446(0x114),a189_0x5d4446(0xde)],[a189_0x5d4446(0x104),a189_0x5d4446(0xde)],[a189_0x5d4446(0xea),a189_0x5d4446(0xde)],[a189_0x5d4446(0xe5),a189_0x5d4446(0xde)]]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([['create',a189_0x5d4446(0xec)],['start',a189_0x5d4446(0x10c)],[a189_0x5d4446(0x122),a189_0x5d4446(0x110)],[a189_0x5d4446(0xee),'rabetbase\x20run\x20preview'],[a189_0x5d4446(0x12c),'rabetbase\x20auth\x20logout']]);export function resolveRemovedCommand(_0x13a40f,_0x1f980d){const _0x53d69e=a189_0x5d4446;if(!_0x13a40f)return undefined;const _0x3070d8=REMOVED_COMMAND_REPLACEMENTS[_0x53d69e(0x121)](_0x13a40f+':'+(_0x1f980d??'')),_0x1d1a29=REMOVED_FLAT_COMMAND_REPLACEMENTS[_0x53d69e(0x121)](_0x13a40f),_0xb028d7=_0x3070d8??_0x1d1a29,_0x22f20c=REMOVED_COMMAND_HINTS[_0x53d69e(0x121)](_0x13a40f+':'+(_0x1f980d??''));if(!_0xb028d7&&!_0x22f20c)return undefined;const _0x1649f7=_0x1d1a29?_0x13a40f:_0x1f980d?_0x13a40f+'\x20'+_0x1f980d:_0x13a40f;return{'command':_0x1649f7,'message':_0x53d69e(0xfe)+_0x1649f7+_0x53d69e(0xc9),'hint':_0x22f20c??_0x53d69e(0xf1)+_0xb028d7+_0x53d69e(0xdf)};}export function findDefinition(_0x112d32,_0x2e9bcf){const _0x131d6d=a189_0x5d4446;return definitions[_0x131d6d(0x121)](_0x112d32+':'+_0x2e9bcf);}export function isKnownService(_0x4e60bf){return serviceByName['has'](_0x4e60bf);}function a189_0x5403(){const _0x1cea0d=['rabetbase\x20workspace\x20use\x20--app\x20<name>','Notification\x20Configuration','logout','Deployment','commands','10084023JDnLGp','\x20\x20[high-risk-write]','7mknXOh','set','write','page:standard-page-status','rabetbase\x20page\x20custom-detail','isSingleCommand','156ehtNXo','wildcardDef','page:react-publish','hidden','rabetbase\x20sql\x20create','250QAyrnZ','knowledge-base:update','8798776BAmugC','app:remote','rabetbase\x20kb\x20detail','`\x20has\x20been\x20removed.','5491698KWoCBj','Platform\x20Issue','Dataset\x20&\x20Operations','deployment:sync','push','Instant\x20API\x20Policy','page:custom-create','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27','rabetbase\x20app\x20list\x20--remote','command','project:init','page:react-create','Menu','rabetbase\x20kb\x20delete','rabetbase\x20cli-skill\x20install','Resource\x20saves\x20are\x20synchronized\x20automatically\x20by\x20the\x20server;\x20no\x20manual\x20CLI\x20replacement\x20is\x20required.','Code\x20Generation','filter','install','rabetbase\x20role\x20list','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.','`\x20instead.','menu:update','skill:install','<script>','CLI\x20Built-in\x20Skill','App\x20Management','permit:role-apis-set','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','show','rabetbase\x20kb\x20update','rabetbase\x20bff\x20create','permit:role-menus-set','Backend\x20Function\x20Scripts','rabetbase\x20project\x20create\x20<project-name>','data:filter','preview','rabetbase\x20page\x20data-list-status','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK','Use\x20`','sql:new','knowledge-base:list','description','sql:save','54047cZFneJ','app:add','Project','Schema','Company\x20Knowledge\x20Base','Runtime\x20App\x20Config\x20Management','rabetbase\x20page\x20custom-list','Authentication','`rabetbase\x20','risk','3099TQEqpP','rabetbase\x20page\x20custom-publish','rabetbase\x20workspace\x20init\x20--appcode\x20<code>','knowledge-base:detail','permit:role-menus','Self\x20Update','from','page:react-update','Logs','rabetbase\x20kb\x20list','rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml','Database\x20Connections','rabetbase\x20run\x20start','15OANCZj','rabetbase\x20workspace\x20remove\x20<name>','knowledge-base:create','rabetbase\x20run\x20build','defaultCommand','1491292zVhYNI','data:getOne','permit:page-set','has','Workspace','rabetbase\x20page\x20custom-update','role:create','rabetbase\x20menu\x20asset-update','app:use','map','values','read','app:remove','skills:','135311hHPjON','get','build','Async\x20Tasks','rabetbase\x20kb\x20create','SQL\x20Queries','Run\x20Scripts','service','page:react-detail','knowledge-base:delete'];a189_0x5403=function(){return _0x1cea0d;};return a189_0x5403();}export function isDeclarativeService(_0x448c92){const _0x474b2b=a189_0x5d4446;return serviceGroups[_0x474b2b(0x115)](_0x448c92)||serviceByName[_0x474b2b(0x121)](_0x448c92)?.[_0x474b2b(0xc0)]!==undefined;}export function getServiceEntry(_0xb29119){const _0x3ac06c=a189_0x5d4446;return serviceByName[_0x3ac06c(0x121)](_0xb29119);}export function getLegacyHandler(_0x24e3f2,_0x4b690c){return undefined;}export function getAllDefinitions(){const _0x4efb87=a189_0x5d4446;return Array[_0x4efb87(0x106)](definitions[_0x4efb87(0x11c)]());}
|
|
1
|
+
const a189_0x5e9d80=a189_0x3f33;(function(_0x35dcc8,_0x292ee6){const _0x2cf8e7=a189_0x3f33,_0x3a3b01=_0x35dcc8();while(!![]){try{const _0x4fd873=parseInt(_0x2cf8e7(0x1e7))/0x1+-parseInt(_0x2cf8e7(0x1df))/0x2+parseInt(_0x2cf8e7(0x1f7))/0x3+-parseInt(_0x2cf8e7(0x1f0))/0x4+parseInt(_0x2cf8e7(0x205))/0x5+-parseInt(_0x2cf8e7(0x1be))/0x6*(-parseInt(_0x2cf8e7(0x1e8))/0x7)+parseInt(_0x2cf8e7(0x1d3))/0x8;if(_0x4fd873===_0x292ee6)break;else _0x3a3b01['push'](_0x3a3b01['shift']());}catch(_0x1ec64f){_0x3a3b01['push'](_0x3a3b01['shift']());}}}(a189_0x2fad,0xcfa4e));import{apiDefinitions}from'../commands/api/index.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{pageDefinitions}from'../commands/page/index.js';function a189_0x3f33(_0x42b586,_0x26d438){_0x42b586=_0x42b586-0x1b8;const _0x2fad55=a189_0x2fad();let _0x3f33de=_0x2fad55[_0x42b586];return _0x3f33de;}import{dbDefinitions}from'../commands/db/index.js';import{deploymentDefinitions}from'../commands/deployment/index.js';import{codegenDefinitions}from'../commands/codegen/index.js';import{menuDefinitions}from'../commands/menu/index.js';import{taskDefinitions}from'../commands/task/index.js';import{tenantDefinitions}from'../commands/tenant/index.js';import{roleDefinitions}from'../commands/role/index.js';import{appDefinitions}from'../commands/app/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{ruleDefinitions}from'../commands/rule/index.js';import{notificationDefinitions}from'../commands/notification/index.js';import{instantApiPolicyDefinitions}from'../commands/instant-api-policy/index.js';import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/index.js';import{doctorDefinition}from'../commands/doctor.js';import{updateDefinition}from'../commands/cli-update.js';import{schemaDefinition}from'../commands/schema.js';import{issueDefinitions}from'../commands/issue/index.js';import{fileDefinitions}from'../commands/file/index.js';import{ocrDefinitions}from'../commands/ocr/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{userAccountDefinitions}from'../commands/user-account/index.js';import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';function a189_0x2fad(){const _0x2f6b4a=['rabetbase\x20page\x20custom-list','Agent\x20Context\x20Rules','User\x20Accounts','risk','skills:','permit:role-apis-set','Company\x20Knowledge\x20Base','Database\x20Connections','Workspace','Backend\x20Function\x20Scripts','Project','rabetbase\x20kb\x20detail','rabetbase\x20kb\x20delete','rabetbase\x20workspace\x20init\x20--appcode\x20<code>','has','rabetbase\x20role\x20list','Roles','Run\x20Scripts','menu:update','File','4184776gugVRV','data:filter','login','wildcardDef','Use\x20`','build','permit:role-menus-set','Notification\x20Configuration','page:react-publish','role:create','rabetbase\x20run\x20build','rabetbase\x20cli-skill\x20install','3159344GOUNOz','filter','rabetbase\x20app\x20list\x20--remote','rabetbase\x20page\x20data-list-status','app:remove','length','Tenant\x20Members','knowledge-base:update','1433661XVloFN','766738RxyFme','read','rabetbase\x20project\x20create\x20<project-name>','page:react-detail','\x20\x20[high-risk-write]','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.','API\x20Development','bff:new','6629704BsubmP','`rabetbase\x20','rabetbase\x20kb\x20create','sql:new','knowledge-base:delete','Authentication','SQL\x20Queries','1055451jqhAEH','page:custom-create','rabetbase\x20auth\x20logout','command','get','\x20\x20[','<script>','knowledge-base:list','Runtime\x20App\x20Config\x20Management','App\x20Management','rabetbase\x20page\x20custom-publish','rabetbase\x20bff\x20create','page:react-list','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','1775455YNnMXd','rabetbase\x20run\x20preview','skill:install','Code\x20Generation','skill:','Schema','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27','Resource\x20saves\x20are\x20synchronized\x20automatically\x20by\x20the\x20server;\x20no\x20manual\x20CLI\x20replacement\x20is\x20required.','set','logout','map','Logs','start','create','show','from','rabetbase\x20menu\x20asset-update','Run\x20any\x20package.json\x20script','rabetbase\x20workspace\x20use\x20--app\x20<name>','`\x20has\x20been\x20removed.','knowledge-base:create','app:use','preview','service','values','rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>','push','Instant\x20API\x20Policy','Menu','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK','Configuration','\x20\x20[write]','page:standard-page-status','app:add','rabetbase\x20page\x20custom-detail','skills:install','sql:save','isSingleCommand','install','defaultCommand','knowledge-base:detail','Diagnostics','Platform\x20Issue','hidden','78ujXPtt'];a189_0x2fad=function(){return _0x2f6b4a;};return a189_0x2fad();}import{projectDefinitions}from'../commands/project/index.js';import{runDefinition}from'../commands/run/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x432ebe){const _0x57a48a=a189_0x3f33;for(const _0x2f50bd of _0x432ebe){definitions[_0x57a48a(0x20d)](_0x2f50bd[_0x57a48a(0x21c)]+':'+_0x2f50bd['command'],_0x2f50bd);let _0x4b1a1e=serviceGroups[_0x57a48a(0x1fb)](_0x2f50bd[_0x57a48a(0x21c)]);!_0x4b1a1e&&(_0x4b1a1e=[],serviceGroups[_0x57a48a(0x20d)](_0x2f50bd[_0x57a48a(0x21c)],_0x4b1a1e)),_0x4b1a1e[_0x57a48a(0x21f)](_0x2f50bd);}}function registerDeclarativeService(_0x3c69d9,_0x5088fd,_0x189b11){const _0x426cd2=a189_0x3f33;registerDefinitions(_0x5088fd);_0x189b11?.[_0x426cd2(0x1d6)]&®isterDefinitions([_0x189b11[_0x426cd2(0x1d6)]]);const _0x4b6e28=_0x3cad6b=>_0x3cad6b===_0x426cd2(0x1e9)?'':_0x3cad6b==='write'?_0x426cd2(0x224):_0x426cd2(0x1ec),_0xe3c211={'service':_0x5088fd[0x0][_0x426cd2(0x21c)],'label':_0x3c69d9,'commands':_0x5088fd[_0x426cd2(0x1e0)](_0x1166ba=>!_0x1166ba[_0x426cd2(0x1bd)])[_0x426cd2(0x20f)](_0x4c0a50=>({'command':_0x4c0a50[_0x426cd2(0x1fa)],'description':_0x4c0a50['description'],'tag':_0x4b6e28(_0x4c0a50['risk'])})),'declarative':!![],'defaultCommand':_0x189b11?.[_0x426cd2(0x1b9)]??(_0x189b11?.['isSingleCommand']?_0x5088fd[0x0][_0x426cd2(0x1fa)]:undefined),'wildcardDef':_0x189b11?.[_0x426cd2(0x1d6)],'isSingleCommand':_0x189b11?.[_0x426cd2(0x22a)]};serviceRegistry[_0x426cd2(0x21f)](_0xe3c211),serviceByName['set'](_0xe3c211[_0x426cd2(0x21c)],_0xe3c211);}registerDeclarativeService(a189_0x5e9d80(0x1c9),projectDefinitions),registerDeclarativeService(a189_0x5e9d80(0x1c7),workspaceDefinitions),registerDeclarativeService(a189_0x5e9d80(0x200),appDefinitions),registerDeclarativeService(a189_0x5e9d80(0x1f5),authDefinitions,{'defaultCommand':a189_0x5e9d80(0x1d5)}),registerDeclarativeService(a189_0x5e9d80(0x1e5),tenantDefinitions),registerDeclarativeService(a189_0x5e9d80(0x1c1),userAccountDefinitions),registerDeclarativeService('Dataset\x20&\x20Operations',datasetDefinitions),registerDeclarativeService('Data\x20List\x20Pages\x20&\x20Custom\x20Pages',pageDefinitions),registerDeclarativeService(a189_0x5e9d80(0x1ee),apiDefinitions),registerDeclarativeService(a189_0x5e9d80(0x1c8),bffDefinitions),registerDeclarativeService(a189_0x5e9d80(0x220),instantApiPolicyDefinitions),registerDeclarativeService(a189_0x5e9d80(0x1da),notificationDefinitions),registerDeclarativeService(a189_0x5e9d80(0x1f6),sqlDefinitions),registerDeclarativeService(a189_0x5e9d80(0x1c6),dbDefinitions),registerDeclarativeService('Deployment',deploymentDefinitions),registerDeclarativeService(a189_0x5e9d80(0x221),menuDefinitions),registerDeclarativeService('Async\x20Tasks',taskDefinitions),registerDeclarativeService(a189_0x5e9d80(0x1cf),roleDefinitions),registerDeclarativeService(a189_0x5e9d80(0x1ff),appConfigDefinitions),registerDeclarativeService(a189_0x5e9d80(0x1c5),kbDefinitions),registerDeclarativeService(a189_0x5e9d80(0x1c0),ruleDefinitions),registerDeclarativeService(a189_0x5e9d80(0x1bc),issueDefinitions),registerDeclarativeService(a189_0x5e9d80(0x1d2),fileDefinitions),registerDeclarativeService('OCR',ocrDefinitions),registerDeclarativeService(a189_0x5e9d80(0x208),codegenDefinitions),registerDeclarativeService(a189_0x5e9d80(0x223),configDefinitions),registerDeclarativeService(a189_0x5e9d80(0x1bb),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a189_0x5e9d80(0x20a),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Self\x20Update',[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('CLI\x20Built-in\x20Skill',cliSkillDefinitions,{'defaultCommand':a189_0x5e9d80(0x1b8)}),registerDeclarativeService(a189_0x5e9d80(0x210),logsDefinitions,{'defaultCommand':a189_0x5e9d80(0x213)}),registerDeclarativeService(a189_0x5e9d80(0x1d0),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a189_0x5e9d80(0x1e4)]-0x1];last['commands']=[{'command':a189_0x5e9d80(0x1fd),'description':a189_0x5e9d80(0x216),'tag':a189_0x5e9d80(0x1fc)+runDefinition[a189_0x5e9d80(0x1c2)]+']'}];}const REMOVED_COMMAND_REPLACEMENTS=new Map([[a189_0x5e9d80(0x229),'rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml'],[a189_0x5e9d80(0x1ef),a189_0x5e9d80(0x202)],[a189_0x5e9d80(0x1f3),'rabetbase\x20sql\x20create'],[a189_0x5e9d80(0x1d1),a189_0x5e9d80(0x215)],['project:init',a189_0x5e9d80(0x1cc)],[a189_0x5e9d80(0x209),a189_0x5e9d80(0x1de)],[a189_0x5e9d80(0x207),a189_0x5e9d80(0x1de)],[a189_0x5e9d80(0x1c3),'rabetbase\x20cli-skill\x20install'],[a189_0x5e9d80(0x228),'rabetbase\x20cli-skill\x20install'],['app:remote',a189_0x5e9d80(0x1e1)],[a189_0x5e9d80(0x21a),a189_0x5e9d80(0x217)],[a189_0x5e9d80(0x226),a189_0x5e9d80(0x21e)],[a189_0x5e9d80(0x1e3),'rabetbase\x20workspace\x20remove\x20<name>'],[a189_0x5e9d80(0x1fe),'rabetbase\x20kb\x20list'],[a189_0x5e9d80(0x1ba),a189_0x5e9d80(0x1ca)],[a189_0x5e9d80(0x219),a189_0x5e9d80(0x1f2)],[a189_0x5e9d80(0x1e6),'rabetbase\x20kb\x20update'],[a189_0x5e9d80(0x1f4),a189_0x5e9d80(0x1cb)],[a189_0x5e9d80(0x1dc),a189_0x5e9d80(0x1ce)],[a189_0x5e9d80(0x1d4),a189_0x5e9d80(0x20b)],['data:getOne',a189_0x5e9d80(0x204)],[a189_0x5e9d80(0x225),a189_0x5e9d80(0x1e2)],['page:react-create','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK'],[a189_0x5e9d80(0x1f8),a189_0x5e9d80(0x222)],[a189_0x5e9d80(0x203),a189_0x5e9d80(0x1bf)],[a189_0x5e9d80(0x1eb),a189_0x5e9d80(0x227)],['page:react-update','rabetbase\x20page\x20custom-update'],[a189_0x5e9d80(0x1db),a189_0x5e9d80(0x201)]]),REMOVED_COMMAND_HINTS=new Map([['deployment:sync',a189_0x5e9d80(0x20c)],['permit:page-get',a189_0x5e9d80(0x1ed)],['permit:page-set',a189_0x5e9d80(0x1ed)],['permit:role-menus',a189_0x5e9d80(0x1ed)],[a189_0x5e9d80(0x1d9),a189_0x5e9d80(0x1ed)],[a189_0x5e9d80(0x1c4),'No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.']]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([[a189_0x5e9d80(0x212),a189_0x5e9d80(0x1ea)],[a189_0x5e9d80(0x211),'rabetbase\x20run\x20start'],[a189_0x5e9d80(0x1d8),a189_0x5e9d80(0x1dd)],[a189_0x5e9d80(0x21b),a189_0x5e9d80(0x206)],[a189_0x5e9d80(0x20e),a189_0x5e9d80(0x1f9)]]);export function resolveRemovedCommand(_0x6f7047,_0x3fe65e){const _0xff5f83=a189_0x5e9d80;if(!_0x6f7047)return undefined;const _0x529561=REMOVED_COMMAND_REPLACEMENTS[_0xff5f83(0x1fb)](_0x6f7047+':'+(_0x3fe65e??'')),_0x49c888=REMOVED_FLAT_COMMAND_REPLACEMENTS[_0xff5f83(0x1fb)](_0x6f7047),_0x21ad1d=_0x529561??_0x49c888,_0x202983=REMOVED_COMMAND_HINTS[_0xff5f83(0x1fb)](_0x6f7047+':'+(_0x3fe65e??''));if(!_0x21ad1d&&!_0x202983)return undefined;const _0x1eafd4=_0x49c888?_0x6f7047:_0x3fe65e?_0x6f7047+'\x20'+_0x3fe65e:_0x6f7047;return{'command':_0x1eafd4,'message':_0xff5f83(0x1f1)+_0x1eafd4+_0xff5f83(0x218),'hint':_0x202983??_0xff5f83(0x1d7)+_0x21ad1d+'`\x20instead.'};}export function findDefinition(_0x52d95a,_0x51ca95){const _0x2fb5ca=a189_0x5e9d80;return definitions[_0x2fb5ca(0x1fb)](_0x52d95a+':'+_0x51ca95);}export function isKnownService(_0x3abeda){const _0x42f382=a189_0x5e9d80;return serviceByName[_0x42f382(0x1cd)](_0x3abeda);}export function isDeclarativeService(_0x4d77a6){const _0x5403ff=a189_0x5e9d80;return serviceGroups[_0x5403ff(0x1cd)](_0x4d77a6)||serviceByName[_0x5403ff(0x1fb)](_0x4d77a6)?.[_0x5403ff(0x1d6)]!==undefined;}export function getServiceEntry(_0x59e413){const _0x86343f=a189_0x5e9d80;return serviceByName[_0x86343f(0x1fb)](_0x59e413);}export function getLegacyHandler(_0x214f51,_0x393bdf){return undefined;}export function getAllDefinitions(){const _0x1123e7=a189_0x5e9d80;return Array[_0x1123e7(0x214)](definitions[_0x1123e7(0x21d)]());}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a190_0x5cee7f=a190_0x1f87;function a190_0x3dfa(){const _0x1c6847=['roleName','25548DEwjlW','5bnxhFS','9922276TcQFvt','num','high-risk-write','dev','Role\x20still\x20has\x20','Deleted\x20role\x20','1387920tvPCac','2183145PxRIWa','appCode','8IjFhSB','117HEIcHr','role','userCount','257697tVZZHj','delete','8NeWkyc','POST','485540yqzouW','\x20(id=','Delete\x20a\x20CUSTOM\x20role\x20(built-in\x20roles\x20rejected);\x20requires\x20--yes','3839jFTzUe','972456LQfdvp'];a190_0x3dfa=function(){return _0x1c6847;};return a190_0x3dfa();}(function(_0x39ec1e,_0x34d406){const _0x5b08af=a190_0x1f87,_0x5a2be4=_0x39ec1e();while(!![]){try{const _0x2d69a6=-parseInt(_0x5b08af(0x1c3))/0x1+parseInt(_0x5b08af(0x1bc))/0x2+-parseInt(_0x5b08af(0x1bd))/0x3*(-parseInt(_0x5b08af(0x1bf))/0x4)+-parseInt(_0x5b08af(0x1b5))/0x5*(-parseInt(_0x5b08af(0x1cb))/0x6)+parseInt(_0x5b08af(0x1b6))/0x7*(-parseInt(_0x5b08af(0x1c5))/0x8)+-parseInt(_0x5b08af(0x1c0))/0x9*(parseInt(_0x5b08af(0x1c7))/0xa)+parseInt(_0x5b08af(0x1ca))/0xb*(parseInt(_0x5b08af(0x1b4))/0xc);if(_0x2d69a6===_0x34d406)break;else _0x5a2be4['push'](_0x5a2be4['shift']());}catch(_0x285cdf){_0x5a2be4['push'](_0x5a2be4['shift']());}}}(a190_0x3dfa,0xb6a58));import{deleteAppRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCustomRole,getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';const DELETE_PATH='/smartapi/permit/role/delete';function a190_0x1f87(_0x4f08e4,_0x386c29){_0x4f08e4=_0x4f08e4-0x1b4;const _0x3dfa14=a190_0x3dfa();let _0x1f870c=_0x3dfa14[_0x4f08e4];return _0x1f870c;}export const roleDelete={'service':a190_0x5cee7f(0x1c1),'command':a190_0x5cee7f(0x1c4),'description':a190_0x5cee7f(0x1c9),'risk':a190_0x5cee7f(0x1b8),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x586ece){const _0x2266a2=a190_0x5cee7f,_0x1a1808=_0x586ece[_0x2266a2(0x1b7)]('id'),_0x6fb98a=await getRoleById(_0x586ece[_0x2266a2(0x1be)],_0x1a1808);return assertCustomRole(_0x6fb98a,_0x2266a2(0x1c4)),asDryRunResult({'scope':'dev','operation':'delete','selector':{'appCode':_0x586ece[_0x2266a2(0x1be)],'roleId':_0x1a1808,'roleName':_0x6fb98a['roleName']},'before':projectRole(_0x6fb98a),'after':null,'dryRun':!![],'backend':{'method':_0x2266a2(0x1c6),'path':DELETE_PATH},'warnings':_0x6fb98a[_0x2266a2(0x1c2)]>0x0?[_0x2266a2(0x1ba)+_0x6fb98a['userCount']+'\x20member(s);\x20they\x20will\x20lose\x20this\x20group.']:[]},{'method':'POST','url':DELETE_PATH});},async 'execute'(_0x54a536){const _0x53b5f1=a190_0x5cee7f,_0x894217=_0x54a536[_0x53b5f1(0x1b7)]('id'),_0x57ec03=await getRoleById(_0x54a536[_0x53b5f1(0x1be)],_0x894217);return assertCustomRole(_0x57ec03,_0x53b5f1(0x1c4)),await deleteAppRole(_0x894217),{'ok':!![],'data':{'scope':_0x53b5f1(0x1b9),'operation':_0x53b5f1(0x1c4),'selector':{'appCode':_0x54a536[_0x53b5f1(0x1be)],'roleId':_0x894217,'roleName':_0x57ec03['roleName']},'before':projectRole(_0x57ec03),'after':null,'dryRun':![],'backend':{'method':_0x53b5f1(0x1c6),'path':DELETE_PATH},'warnings':[]},'message':_0x53b5f1(0x1bb)+_0x57ec03[_0x53b5f1(0x1cc)]+_0x53b5f1(0x1c8)+_0x894217+')'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a191_0x1d8cc5=a191_0x76a8;(function(_0x1554ac,_0x592a32){const _0x46dd24=a191_0x76a8,_0xcac227=_0x1554ac();while(!![]){try{const _0x2c2ea7=parseInt(_0x46dd24(0x137))/0x1*(-parseInt(_0x46dd24(0x141))/0x2)+-parseInt(_0x46dd24(0x13b))/0x3+parseInt(_0x46dd24(0x139))/0x4*(parseInt(_0x46dd24(0x142))/0x5)+-parseInt(_0x46dd24(0x13f))/0x6*(parseInt(_0x46dd24(0x148))/0x7)+parseInt(_0x46dd24(0x143))/0x8+parseInt(_0x46dd24(0x144))/0x9+parseInt(_0x46dd24(0x13a))/0xa*(parseInt(_0x46dd24(0x138))/0xb);if(_0x2c2ea7===_0x592a32)break;else _0xcac227['push'](_0xcac227['shift']());}catch(_0x4b4dba){_0xcac227['push'](_0xcac227['shift']());}}}(a191_0x3c38,0x4fa8c));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a191_0x76a8(_0x80f263,_0x21279b){_0x80f263=_0x80f263-0x136;const _0x3c3852=a191_0x3c38();let _0x76a84=_0x3c3852[_0x80f263];return _0x76a84;}import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';function a191_0x3c38(){const _0x3e07aa=['Show\x20a\x20single\x20role\x27s\x20detail','77RnVNDC','roleName','2mouYkO','3582722lHvetz','4CcUVzG','20sEIkuj','267831XePigk','roleType','num','Role\x20','321162jLcPhh','appCode','238174XQgJJh','2484595sAtKGK','659760owzQMg','105651hsOBrv','role','read'];a191_0x3c38=function(){return _0x3e07aa;};return a191_0x3c38();}export const roleDetail={'service':a191_0x1d8cc5(0x145),'command':'detail','description':a191_0x1d8cc5(0x147),'risk':a191_0x1d8cc5(0x146),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x5f2757){const _0x1a0ae9=a191_0x1d8cc5,_0x1011b8=_0x5f2757[_0x1a0ae9(0x13d)]('id'),_0x38b9fd=await getRoleById(_0x5f2757[_0x1a0ae9(0x140)],_0x1011b8);return{'ok':!![],'data':{'scope':'dev','role':projectRole(_0x38b9fd)},'message':_0x1a0ae9(0x13e)+_0x38b9fd[_0x1a0ae9(0x136)]+'\x20('+_0x38b9fd[_0x1a0ae9(0x13c)]+')'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a192_0x46cc(_0x53c02c,_0x3fbe2b){_0x53c02c=_0x53c02c-0xc6;const _0x33f234=a192_0x33f2();let _0x46ccdb=_0x33f234[_0x53c02c];return _0x46ccdb;}(function(_0x292ac8,_0x2b28dd){const _0x3ab97f=a192_0x46cc,_0x5304f5=_0x292ac8();while(!![]){try{const _0x319f43=-parseInt(_0x3ab97f(0xc7))/0x1*(-parseInt(_0x3ab97f(0xcf))/0x2)+-parseInt(_0x3ab97f(0xc8))/0x3+parseInt(_0x3ab97f(0xcc))/0x4*(-parseInt(_0x3ab97f(0xd1))/0x5)+-parseInt(_0x3ab97f(0xca))/0x6*(parseInt(_0x3ab97f(0xc6))/0x7)+-parseInt(_0x3ab97f(0xcd))/0x8+parseInt(_0x3ab97f(0xcb))/0x9*(-parseInt(_0x3ab97f(0xd0))/0xa)+parseInt(_0x3ab97f(0xc9))/0xb*(parseInt(_0x3ab97f(0xce))/0xc);if(_0x319f43===_0x2b28dd)break;else _0x5304f5['push'](_0x5304f5['shift']());}catch(_0xb7a0ea){_0x5304f5['push'](_0x5304f5['shift']());}}}(a192_0x33f2,0x732af));import{roleList}from'../../commands/role/list.js';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';import{roleUserAdd}from'../../commands/role/user-add.js';function a192_0x33f2(){const _0x259456=['142891WeDiej','82663sRTYmb','1355355nIbNve','24472415dBUFuS','66oPSkVO','36rdfVyw','417276PBxALd','7209608aiKBuC','12ZhRJmx','14AeFaGz','1363780CGZoIN','10AtmfVq'];a192_0x33f2=function(){return _0x259456;};return a192_0x33f2();}import{roleUserRemove}from'../../commands/role/user-remove.js';export const roleDefinitions=[roleList,roleDetail,roleUpdate,roleDelete,roleUserResolve,roleUserAdd,roleUserRemove];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a193_0x5d42(){const _0x18370d=['type','OWNER','33540KtghXu','Use\x20one\x20of:\x20','Filter\x20by\x20role\x20type','203mFQbPd','ADMIN','appCode','10ypezRE','4268OEtENK','DEV','1043559ipTGyM','11290ABSJHA','filter','--pagesize\x20must\x20be\x20between\x201\x20and\x20100.','page','471259vAXQmh','356967OvYsEV','includes','validation','role','str','Found\x20','trim','string','length','pagesize','read','2366286kzUczJ','184xlSSwX','Page\x20size\x20(1-100)','num','List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','CUSTOM','toUpperCase','31128FEZqNt','Invalid\x20--type\x20\x22','number'];a193_0x5d42=function(){return _0x18370d;};return a193_0x5d42();}const a193_0x13dfdf=a193_0x5366;(function(_0x3e1e9a,_0x57365c){const _0xccad8=a193_0x5366,_0xd13be4=_0x3e1e9a();while(!![]){try{const _0x539d6c=parseInt(_0xccad8(0x1cd))/0x1+-parseInt(_0xccad8(0x1c5))/0x2*(-parseInt(_0xccad8(0x1ce))/0x3)+-parseInt(_0xccad8(0x1da))/0x4*(parseInt(_0xccad8(0x1bf))/0x5)+parseInt(_0xccad8(0x1d9))/0x6+-parseInt(_0xccad8(0x1c2))/0x7*(parseInt(_0xccad8(0x1ba))/0x8)+-parseInt(_0xccad8(0x1c8))/0x9+-parseInt(_0xccad8(0x1c9))/0xa*(parseInt(_0xccad8(0x1c6))/0xb);if(_0x539d6c===_0x57365c)break;else _0xd13be4['push'](_0xd13be4['shift']());}catch(_0x551880){_0xd13be4['push'](_0xd13be4['shift']());}}}(a193_0x5d42,0x76737));import{listAppRoles}from'../../core/api-client.js';function a193_0x5366(_0x4a26d6,_0x5d6242){_0x4a26d6=_0x4a26d6-0x1b5;const _0x5d42bd=a193_0x5d42();let _0x5366da=_0x5d42bd[_0x4a26d6];return _0x5366da;}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectRole}from'../../commands/role/shared.js';const ROLE_TYPES=[a193_0x13dfdf(0x1c3),a193_0x13dfdf(0x1c7),a193_0x13dfdf(0x1be),a193_0x13dfdf(0x1b8)];export const roleList={'service':a193_0x13dfdf(0x1d1),'command':'list','description':a193_0x13dfdf(0x1b7),'risk':a193_0x13dfdf(0x1d8),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a193_0x13dfdf(0x1bd),'type':a193_0x13dfdf(0x1d5),'required':![],'description':a193_0x13dfdf(0x1c1),'enum':ROLE_TYPES},{'name':'page','type':a193_0x13dfdf(0x1bc),'description':'Page\x20index\x20(1-based)','default':0x1},{'name':a193_0x13dfdf(0x1d7),'type':a193_0x13dfdf(0x1bc),'description':a193_0x13dfdf(0x1b5),'default':0x64}],async 'validate'(_0xe21167){const _0x40dbb7=a193_0x13dfdf,_0x1ebb32=_0xe21167[_0x40dbb7(0x1d2)](_0x40dbb7(0x1bd))['trim']();if(_0x1ebb32&&!ROLE_TYPES[_0x40dbb7(0x1cf)](_0x1ebb32[_0x40dbb7(0x1b9)]()))throw CliErrors[_0x40dbb7(0x1d0)](_0x40dbb7(0x1bb)+_0x1ebb32+'\x22.',_0x40dbb7(0x1c0)+ROLE_TYPES['join'](',\x20')+'.');const _0x12d5cf=_0xe21167[_0x40dbb7(0x1b6)](_0x40dbb7(0x1cc),0x1),_0x205d0a=_0xe21167[_0x40dbb7(0x1b6)](_0x40dbb7(0x1d7),0x64);if(_0x12d5cf<0x1)throw CliErrors['validation']('--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.');if(_0x205d0a<0x1||_0x205d0a>0x64)throw CliErrors[_0x40dbb7(0x1d0)](_0x40dbb7(0x1cb));},async 'execute'(_0x425198){const _0xb9091c=a193_0x13dfdf,_0x4c0a28=_0x425198[_0xb9091c(0x1b6)](_0xb9091c(0x1cc),0x1)||0x1,_0x1ef26d=_0x425198[_0xb9091c(0x1b6)]('pagesize',0x64)||0x64,_0x12dac1=_0x425198['str']('type')[_0xb9091c(0x1d4)]()[_0xb9091c(0x1b9)](),{items:_0x30ad39,paging:_0x496c72}=await listAppRoles(_0x425198[_0xb9091c(0x1c4)],{'currentPage':_0x4c0a28,'pageSize':_0x1ef26d}),_0xea610a=_0x12dac1?_0x30ad39[_0xb9091c(0x1ca)](_0x271e6b=>_0x271e6b['roleType']===_0x12dac1):_0x30ad39,_0xc8ba11=_0xea610a['map'](projectRole);return{'ok':!![],'data':{'scope':'dev','roles':_0xc8ba11,'paging':_0x496c72},'message':_0xb9091c(0x1d3)+_0xc8ba11[_0xb9091c(0x1d6)]+'\x20role(s)'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a194_0x478f8f=a194_0x2124;(function(_0x12ced5,_0x42fe71){const _0x49fa12=a194_0x2124,_0xac4f53=_0x12ced5();while(!![]){try{const _0x49c2fb=-parseInt(_0x49fa12(0x7e))/0x1+-parseInt(_0x49fa12(0x96))/0x2*(parseInt(_0x49fa12(0x82))/0x3)+-parseInt(_0x49fa12(0x94))/0x4+-parseInt(_0x49fa12(0x6e))/0x5+parseInt(_0x49fa12(0x72))/0x6+-parseInt(_0x49fa12(0xab))/0x7*(parseInt(_0x49fa12(0xa2))/0x8)+parseInt(_0x49fa12(0x9c))/0x9;if(_0x49c2fb===_0x42fe71)break;else _0xac4f53['push'](_0xac4f53['shift']());}catch(_0x398c4f){_0xac4f53['push'](_0xac4f53['shift']());}}}(a194_0x3cf4,0x76d27));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':a194_0x478f8f(0xa8)};export const ROLE_REF_FLAG={'name':a194_0x478f8f(0x84),'type':a194_0x478f8f(0x74),'required':!![],'description':'Role\x20id\x20or\x20exact\x20role\x20name'};export const USER_REF_FLAG={'name':'user','type':'string','required':!![],'description':a194_0x478f8f(0x8b)};export const NAME_FLAG={'name':a194_0x478f8f(0xb6),'type':a194_0x478f8f(0x74),'required':!![],'description':a194_0x478f8f(0x79)};export const USER_NAME_FLAG={'name':a194_0x478f8f(0xb6),'type':a194_0x478f8f(0x74),'required':!![],'description':a194_0x478f8f(0x9b)};export const REMARK_FLAG={'name':a194_0x478f8f(0x87),'type':a194_0x478f8f(0x74),'required':![],'description':a194_0x478f8f(0x78)};export const EXPECT_USER_COUNT_FLAG={'name':a194_0x478f8f(0x85),'type':a194_0x478f8f(0x81),'required':![],'description':'Anti-drift\x20guard:\x20fail\x20if\x20the\x20role\x27s\x20current\x20member\x20count\x20differs'};export const BUILTIN_ROLE_TYPES=['ADMIN',a194_0x478f8f(0x90),a194_0x478f8f(0xa0)];export function isBuiltinRole(_0x1eeefe){return BUILTIN_ROLE_TYPES['includes'](_0x1eeefe);}export function assertCustomRole(_0x3a7a3e,_0x4000f6){const _0x321691=a194_0x478f8f;if(_0x3a7a3e[_0x321691(0x9f)]!==_0x321691(0x98))throw CliErrors[_0x321691(0x75)](_0x321691(0xac)+_0x4000f6+_0x321691(0x6d)+_0x3a7a3e[_0x321691(0x89)]+'\x20('+_0x3a7a3e[_0x321691(0x9f)]+').',_0x321691(0x7d));}function a194_0x2124(_0x23712b,_0x1238db){_0x23712b=_0x23712b-0x6b;const _0x3cf4b3=a194_0x3cf4();let _0x212473=_0x3cf4b3[_0x23712b];return _0x212473;}export function projectRole(_0x5f7f90){const _0x45597d=a194_0x478f8f;return{'id':_0x5f7f90['id'],'roleName':_0x5f7f90[_0x45597d(0x89)],'roleType':_0x5f7f90['roleType'],'remark':_0x5f7f90[_0x45597d(0x87)],'userCount':_0x5f7f90[_0x45597d(0x71)],'permitCount':_0x5f7f90['permitCount'],'builtin':isBuiltinRole(_0x5f7f90['roleType'])};}export async function resolveRoleRef(_0x45e636,_0x3bb83c){const _0x3f7d71=a194_0x478f8f,_0x5d3e11=_0x3bb83c['trim']();if(!_0x5d3e11)throw CliErrors['validation'](_0x3f7d71(0x8f),_0x3f7d71(0xad));if(/^\d+$/[_0x3f7d71(0xb4)](_0x5d3e11))return getRoleById(_0x45e636,Number(_0x5d3e11));const _0x32918d=await listAllAppRoles(_0x45e636),_0x548041=_0x32918d[_0x3f7d71(0x9d)](_0x33fe2b=>_0x33fe2b['roleName']===_0x5d3e11);if(_0x548041[_0x3f7d71(0x8d)]===0x0)throw CliErrors[_0x3f7d71(0x75)](_0x3f7d71(0x8e)+_0x5d3e11+_0x3f7d71(0x7c)+_0x45e636+'.',_0x3f7d71(0x93));if(_0x548041[_0x3f7d71(0x8d)]>0x1){const _0x12a4b0=_0x548041[_0x3f7d71(0xaa)](_0x1629cf=>_0x1629cf['id'])[_0x3f7d71(0x7a)](',\x20');throw CliErrors[_0x3f7d71(0x75)](_0x3f7d71(0x8e)+_0x5d3e11+_0x3f7d71(0x9e)+_0x12a4b0+').',_0x3f7d71(0x6c));}return _0x548041[0x0];}export async function getRoleById(_0x2ada89,_0x259b18){const _0x310ca0=a194_0x478f8f,_0x40ca3c=await listAllAppRoles(_0x2ada89),_0x3f81ed=_0x40ca3c[_0x310ca0(0x9d)](_0x502ac1=>_0x502ac1['id']===_0x259b18&&(!_0x502ac1[_0x310ca0(0x8a)]||_0x502ac1['appCode']===_0x2ada89));if(_0x3f81ed['length']!==0x1)throw CliErrors[_0x310ca0(0x75)](_0x310ca0(0x77)+_0x259b18+'\x20not\x20found\x20in\x20app\x20'+_0x2ada89+'.',_0x310ca0(0x76));return _0x3f81ed[0x0];}async function listAllAppRoles(_0x1383e4){const _0x19be80=a194_0x478f8f,_0x5858a8=0x64,_0x3eb60f=[];for(let _0x5b7133=0x1;;_0x5b7133+=0x1){const {items:_0xcf1544,paging:_0x29097d}=await listAppRoles(_0x1383e4,{'currentPage':_0x5b7133,'pageSize':_0x5858a8});_0x3eb60f[_0x19be80(0xaf)](..._0xcf1544);if(_0xcf1544[_0x19be80(0x8d)]<_0x5858a8||_0x29097d&&_0x3eb60f[_0x19be80(0x8d)]>=_0x29097d['totalCount'])return _0x3eb60f;}}export async function resolveTenantCode(){const _0x344874=a194_0x478f8f,_0x3d469d=await getSessionUserInfo(),_0x287520=_0x3d469d?.[_0x344874(0xb1)]?.[_0x344874(0x9a)]?.[_0x344874(0x86)];if(!_0x287520)throw CliErrors[_0x344874(0xa6)](_0x344874(0x97));return _0x287520;}function matchMember(_0x257934,_0x598482){const _0x314819=a194_0x478f8f,_0x2fcf0e=_0x598482['trim']()[_0x314819(0xb7)]();return(_0x257934[_0x314819(0x8c)]??'')[_0x314819(0xb7)]()===_0x2fcf0e||(_0x257934[_0x314819(0x91)]??'')[_0x314819(0xb7)]()===_0x2fcf0e;}function a194_0x3cf4(){const _0x307459=['string','validation','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.','Role\x20id\x20','Optional\x20role\x20remark/description','Role\x20name','join','trim','\x22\x20not\x20found\x20in\x20app\x20','Only\x20CUSTOM\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','772696CYeNTF','flag','totalCount','number','2094678IRlyhl','Removed\x20','role','expect-user-count','tenant_code','remark','dev','roleName','appCode','User\x20id,\x20username,\x20or\x20nickname\x20to\x20resolve\x20to\x20a\x20userId','nickname','length','Role\x20name\x20\x22','Missing\x20role\x20reference.','DEV','username','Check\x20the\x20nickname/username.\x20','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles,\x20or\x20pass\x20--role\x20<id>.','3217984JVkBgZ','userId','2Qbtcub','Cannot\x20resolve\x20current\x20tenant.\x20Run\x20`rabetbase\x20auth\x20login`\x20first.','CUSTOM','\x20is\x20not\x20a\x20member\x20of\x20role\x20','tenant','Nickname\x20or\x20username\x20to\x20resolve\x20to\x20a\x20userId','21050694MIGSAT','filter','\x22\x20is\x20ambiguous\x20(ids:\x20','roleType','OWNER','\x20member(s)\x20but\x20role\x20has\x20','808DcMBwT','\x20members\x20of\x20the\x20OWNER\x20role.','str','Re-run\x20`role\x20detail`\x20/\x20`role\x20list`\x20and\x20retry\x20with\x20the\x20current\x20count.','authRequired','user-add','Role\x20id\x20(from\x20`role\x20list`)','Pass\x20--user\x20<id|name>.','map','630VJDWHZ','Cannot\x20','Pass\x20--role\x20<id|name>.','includes','push','flagMissing','user','No\x20tenant\x20member\x20matches\x20\x22','User\x20','test','\x20duplicate\x20memberships\x20for\x20user\x20','name','toLowerCase','Pass\x20--user\x20<id>.','Use\x20the\x20platform\x20ownership-transfer\x20workflow\x20to\x20change\x20the\x20application\x20owner.','Disambiguate\x20with\x20--role\x20<id>.','\x20built-in\x20role\x20','298265NFLpKr',';\x20no\x20change.','POST','userCount','2951340fFRVvu','/smartapi/permit/user-role/create'];a194_0x3cf4=function(){return _0x307459;};return a194_0x3cf4();}export async function resolveUserRef(_0xb7f4d0,_0x31f804=a194_0x478f8f(0xb8)){const _0x3b3d27=a194_0x478f8f,_0x3b4741=_0xb7f4d0[_0x3b3d27(0x7b)]();if(!_0x3b4741)throw CliErrors[_0x3b3d27(0x75)]('Missing\x20user\x20reference.',_0x3b3d27(0xa9));const _0x20d8c2=await resolveTenantCode(),_0x8be42c=await getTenantMembers(_0x20d8c2);if(/^\d+$/[_0x3b3d27(0xb4)](_0x3b4741)){const _0x39dc5c=Number(_0x3b4741),_0x3a6fcb=_0x8be42c['find'](_0x3a30b0=>_0x3a30b0[_0x3b3d27(0x95)]===_0x39dc5c);return{'userId':_0x39dc5c,'username':_0x3a6fcb?.[_0x3b3d27(0x91)]??String(_0x39dc5c),'nickname':_0x3a6fcb?.['nickname'],'matchedBy':'id'};}const _0x4989a5=_0x8be42c[_0x3b3d27(0x9d)](_0x1c9c49=>matchMember(_0x1c9c49,_0x3b4741));if(_0x4989a5[_0x3b3d27(0x8d)]===0x0)throw CliErrors[_0x3b3d27(0x75)](_0x3b3d27(0xb2)+_0x3b4741+'\x22.',_0x3b3d27(0x92)+_0x31f804);if(_0x4989a5[_0x3b3d27(0x8d)]>0x1){const _0x1fa3e2=_0x4989a5[_0x3b3d27(0xaa)](_0x3cffbb=>(_0x3cffbb[_0x3b3d27(0x8c)]??_0x3cffbb[_0x3b3d27(0x91)]??'?')+'('+_0x3cffbb[_0x3b3d27(0x95)]+')')['join'](',\x20');throw CliErrors['validation']('Multiple\x20tenant\x20members\x20match\x20\x22'+_0x3b4741+'\x22:\x20'+_0x1fa3e2+'.',_0x31f804);}const _0x40ebdd=_0x4989a5[0x0];return{'userId':_0x40ebdd['userId'],'username':_0x40ebdd[_0x3b3d27(0x91)]??String(_0x40ebdd[_0x3b3d27(0x95)]),'nickname':_0x40ebdd[_0x3b3d27(0x8c)],'matchedBy':_0x3b3d27(0xb6)};}export const CREATE_USER_ROLE_PATH=a194_0x478f8f(0x73);export const DELETE_USER_ROLE_PATH='/smartapi/permit/user-role/delete';export function computeRoleUserMutation(_0x3e8281){const _0x171511=a194_0x478f8f,{operation:_0x1fcd02,appCode:_0x378959,role:_0x5f1cf4,relations:_0x3bf287,user:_0x2e0978}=_0x3e8281,_0x3a8885=[...new Set(_0x3bf287['map'](_0xbd1c09=>_0xbd1c09['userId']))],_0x300db0=[];if(_0x3e8281['expectUserCount']!==undefined&&_0x3e8281['expectUserCount']!==_0x3a8885['length'])throw CliErrors['validation']('Anti-drift\x20check\x20failed:\x20expected\x20'+_0x3e8281['expectUserCount']+_0x171511(0xa1)+_0x3a8885[_0x171511(0x8d)]+'.',_0x171511(0xa5));const _0x1062d1=_0x3a8885[_0x171511(0xae)](_0x2e0978[_0x171511(0x95)]),_0x4e92ac=_0x3bf287[_0x171511(0x9d)](_0x1aefa6=>_0x1aefa6[_0x171511(0x95)]===_0x2e0978[_0x171511(0x95)])[_0x171511(0xaa)](_0x146d99=>_0x146d99['id']),_0x17abbc=_0x1fcd02===_0x171511(0xa7)?!_0x1062d1:_0x1062d1;let _0x17ea33=_0x3a8885;_0x1fcd02===_0x171511(0xa7)?_0x1062d1?_0x300db0[_0x171511(0xaf)](_0x171511(0xb3)+_0x2e0978[_0x171511(0x95)]+'\x20is\x20already\x20a\x20member\x20of\x20role\x20'+_0x5f1cf4['roleName']+_0x171511(0x6f)):_0x17ea33=[..._0x3a8885,_0x2e0978[_0x171511(0x95)]]:!_0x1062d1?_0x300db0[_0x171511(0xaf)](_0x171511(0xb3)+_0x2e0978[_0x171511(0x95)]+_0x171511(0x99)+_0x5f1cf4[_0x171511(0x89)]+_0x171511(0x6f)):(_0x17ea33=_0x3a8885[_0x171511(0x9d)](_0x765281=>_0x765281!==_0x2e0978['userId']),_0x4e92ac['length']>0x1&&_0x300db0[_0x171511(0xaf)](_0x171511(0x83)+_0x4e92ac['length']+_0x171511(0xb5)+_0x2e0978[_0x171511(0x95)]+'.'));const _0xdbe245={'scope':_0x171511(0x88),'operation':_0x1fcd02,'selector':{'appCode':_0x378959,'roleId':_0x5f1cf4['id'],'roleName':_0x5f1cf4[_0x171511(0x89)],'userId':_0x2e0978['userId']},'before':{'userIds':_0x3a8885},'after':{'userIds':_0x17ea33},'dryRun':_0x3e8281['dryRun'],'backend':{'method':_0x171511(0x70),'path':_0x1fcd02==='user-add'?CREATE_USER_ROLE_PATH:DELETE_USER_ROLE_PATH},'warnings':_0x300db0};return{'mutation':_0xdbe245,'changed':_0x17abbc,'matchingRelationIds':_0x4e92ac};}export async function loadDevRoleRelations(_0x93014e,_0x4e1233){const _0xb1738b=a194_0x478f8f,_0x4381d4=0x64,_0x31fe96=[];for(let _0x3f6b48=0x1;;_0x3f6b48+=0x1){const {items:_0x48442e,paging:_0x595142}=await listDevUserRoleRelations(_0x93014e,{'roleId':_0x4e1233,'currentPage':_0x3f6b48,'pageSize':_0x4381d4});_0x31fe96[_0xb1738b(0xaf)](..._0x48442e);if(_0x48442e[_0xb1738b(0x8d)]<_0x4381d4||_0x595142&&_0x31fe96['length']>=_0x595142[_0xb1738b(0x80)])return _0x31fe96;}}export function readRoleRef(_0x450e89){const _0x23ab1b=a194_0x478f8f,_0x1cb96a=_0x450e89[_0x23ab1b(0xa4)]('role')[_0x23ab1b(0x7b)]();if(!_0x1cb96a)throw CliErrors[_0x23ab1b(0xb0)]('role',_0x23ab1b(0xad));return _0x1cb96a;}export async function prepareUserMutation(_0x1ad316,_0x2db580,_0x45a935){const _0x22c843=a194_0x478f8f,_0x1d6269=readRoleRef(_0x1ad316),_0x488c5e=_0x1ad316[_0x22c843(0xa4)](_0x22c843(0xb1))[_0x22c843(0x7b)]();if(!_0x488c5e)throw CliErrors[_0x22c843(0xb0)]('user',_0x22c843(0xa9));const _0x226746=_0x1ad316[_0x22c843(0x7f)](_0x22c843(0x85)),_0x3761c8=_0x226746===undefined||_0x226746===null?undefined:Number(_0x226746),_0x217878=await resolveRoleRef(_0x1ad316[_0x22c843(0x8a)],_0x1d6269);if(_0x217878[_0x22c843(0x9f)]===_0x22c843(0xa0))throw CliErrors[_0x22c843(0x75)](_0x22c843(0xac)+_0x2db580+_0x22c843(0xa3),_0x22c843(0x6b));const _0x4cbb06=await resolveUserRef(_0x488c5e),_0x15f5ba=await loadDevRoleRelations(_0x1ad316[_0x22c843(0x8a)],_0x217878['id']);return{...computeRoleUserMutation({'operation':_0x2db580,'appCode':_0x1ad316['appCode'],'role':_0x217878,'relations':_0x15f5ba,'user':{'userId':_0x4cbb06['userId'],'username':_0x4cbb06[_0x22c843(0x91)],'nickname':_0x4cbb06['nickname']},'dryRun':_0x45a935,..._0x3761c8!==undefined?{'expectUserCount':_0x3761c8}:{}}),'role':_0x217878,'user':_0x4cbb06};}
|
|
1
|
+
const a194_0x5a2978=a194_0x4732;(function(_0x4df329,_0x1f1faa){const _0x4e4bc9=a194_0x4732,_0x5f2d08=_0x4df329();while(!![]){try{const _0x16123a=parseInt(_0x4e4bc9(0xf8))/0x1*(parseInt(_0x4e4bc9(0xfe))/0x2)+parseInt(_0x4e4bc9(0xef))/0x3+parseInt(_0x4e4bc9(0x103))/0x4*(parseInt(_0x4e4bc9(0x11d))/0x5)+-parseInt(_0x4e4bc9(0xff))/0x6+-parseInt(_0x4e4bc9(0x109))/0x7*(-parseInt(_0x4e4bc9(0xf1))/0x8)+parseInt(_0x4e4bc9(0xec))/0x9*(parseInt(_0x4e4bc9(0x111))/0xa)+-parseInt(_0x4e4bc9(0x104))/0xb;if(_0x16123a===_0x1f1faa)break;else _0x5f2d08['push'](_0x5f2d08['shift']());}catch(_0x5186f8){_0x5f2d08['push'](_0x5f2d08['shift']());}}}(a194_0x4d1b,0xaa47d));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':a194_0x5a2978(0x11e),'required':!![],'description':a194_0x5a2978(0x10c)};export const ROLE_REF_FLAG={'name':a194_0x5a2978(0x116),'type':a194_0x5a2978(0x12d),'required':!![],'description':a194_0x5a2978(0x12e)};export const USER_REF_FLAG={'name':a194_0x5a2978(0x119),'type':a194_0x5a2978(0x12d),'required':!![],'description':a194_0x5a2978(0x102)};export const NAME_FLAG={'name':a194_0x5a2978(0xf4),'type':'string','required':!![],'description':'Role\x20name'};export const USER_NAME_FLAG={'name':a194_0x5a2978(0xf4),'type':a194_0x5a2978(0x12d),'required':!![],'description':a194_0x5a2978(0xf2)};export const REMARK_FLAG={'name':a194_0x5a2978(0xea),'type':'string','required':![],'description':a194_0x5a2978(0x105)};export const EXPECT_USER_COUNT_FLAG={'name':a194_0x5a2978(0x11f),'type':a194_0x5a2978(0x11e),'required':![],'description':a194_0x5a2978(0x122)};export const BUILTIN_ROLE_TYPES=['ADMIN',a194_0x5a2978(0x128),a194_0x5a2978(0x106)];export function isBuiltinRole(_0x80903a){const _0x3722c8=a194_0x5a2978;return BUILTIN_ROLE_TYPES[_0x3722c8(0xf5)](_0x80903a);}export function assertCustomRole(_0x433571,_0x216225){const _0x3e516c=a194_0x5a2978;if(_0x433571['roleType']!==_0x3e516c(0xf3))throw CliErrors[_0x3e516c(0x110)](_0x3e516c(0xe9)+_0x216225+'\x20built-in\x20role\x20'+_0x433571['roleName']+'\x20('+_0x433571[_0x3e516c(0xfb)]+').',_0x3e516c(0xee));}export function projectRole(_0x20cdda){const _0x1641ef=a194_0x5a2978;return{'id':_0x20cdda['id'],'roleName':_0x20cdda['roleName'],'roleType':_0x20cdda['roleType'],'remark':_0x20cdda[_0x1641ef(0xea)],'userCount':_0x20cdda[_0x1641ef(0xfa)],'permitCount':_0x20cdda[_0x1641ef(0x12a)],'builtin':isBuiltinRole(_0x20cdda[_0x1641ef(0xfb)])};}export async function resolveRoleRef(_0x352239,_0x10601c){const _0x45f3d3=a194_0x5a2978,_0x90817c=_0x10601c['trim']();if(!_0x90817c)throw CliErrors[_0x45f3d3(0x110)](_0x45f3d3(0x113),_0x45f3d3(0x127));if(/^\d+$/['test'](_0x90817c))return getRoleById(_0x352239,Number(_0x90817c));const _0xfcc287=await listAllAppRoles(_0x352239),_0x6e2e1c=_0xfcc287[_0x45f3d3(0x124)](_0x36ac2d=>_0x36ac2d['roleName']===_0x90817c);if(_0x6e2e1c[_0x45f3d3(0x118)]===0x0)throw CliErrors[_0x45f3d3(0x110)](_0x45f3d3(0xf9)+_0x90817c+'\x22\x20not\x20found\x20in\x20app\x20'+_0x352239+'.',_0x45f3d3(0xfc));if(_0x6e2e1c['length']>0x1){const _0x57e10f=_0x6e2e1c[_0x45f3d3(0x126)](_0x17739d=>_0x17739d['id'])[_0x45f3d3(0x117)](',\x20');throw CliErrors[_0x45f3d3(0x110)]('Role\x20name\x20\x22'+_0x90817c+_0x45f3d3(0x132)+_0x57e10f+').','Disambiguate\x20with\x20--role\x20<id>.');}return _0x6e2e1c[0x0];}export async function getRoleById(_0x2abe96,_0x221691){const _0x189b41=a194_0x5a2978,_0x414629=await listAllAppRoles(_0x2abe96),_0xa640be=_0x414629['filter'](_0x4ee034=>_0x4ee034['id']===_0x221691&&(!_0x4ee034[_0x189b41(0x10e)]||_0x4ee034['appCode']===_0x2abe96));if(_0xa640be[_0x189b41(0x118)]!==0x1)throw CliErrors[_0x189b41(0x110)](_0x189b41(0x10a)+_0x221691+'\x20not\x20found\x20in\x20app\x20'+_0x2abe96+'.',_0x189b41(0x12c));return _0xa640be[0x0];}async function listAllAppRoles(_0x228834){const _0x3f20e4=a194_0x5a2978,_0x5b9bed=0x64,_0x513768=[];for(let _0x347272=0x1;;_0x347272+=0x1){const {items:_0x1b08c0,paging:_0x3c2203}=await listAppRoles(_0x228834,{'currentPage':_0x347272,'pageSize':_0x5b9bed});_0x513768[_0x3f20e4(0x10b)](..._0x1b08c0);if(_0x1b08c0['length']<_0x5b9bed||_0x3c2203&&_0x513768[_0x3f20e4(0x118)]>=_0x3c2203[_0x3f20e4(0x134)])return _0x513768;}}export async function resolveTenantCode(){const _0x46db2c=a194_0x5a2978,_0x59647f=await getSessionUserInfo(),_0x5c5e56=_0x59647f?.[_0x46db2c(0x119)]?.['tenant']?.['tenant_code'];if(!_0x5c5e56)throw CliErrors[_0x46db2c(0x12b)](_0x46db2c(0x100));return _0x5c5e56;}function matchMember(_0x3d0ddc,_0x29f484){const _0x28ba95=a194_0x5a2978,_0x1c7d48=_0x29f484[_0x28ba95(0xf0)]()['toLowerCase']();return(_0x3d0ddc[_0x28ba95(0x10f)]??'')[_0x28ba95(0xed)]()===_0x1c7d48||(_0x3d0ddc[_0x28ba95(0x129)]??'')[_0x28ba95(0xed)]()===_0x1c7d48;}export async function resolveUserRef(_0x586bc5,_0x18e8fe='Pass\x20--user\x20<id>.'){const _0x2dcf12=a194_0x5a2978,_0xbc0f5e=_0x586bc5[_0x2dcf12(0xf0)]();if(!_0xbc0f5e)throw CliErrors[_0x2dcf12(0x110)](_0x2dcf12(0xe8),_0x2dcf12(0x11c));const _0x909f4f=await resolveTenantCode(),_0x5c2095=await getTenantMembers(_0x909f4f);if(/^\d+$/['test'](_0xbc0f5e)){const _0x3379b9=Number(_0xbc0f5e),_0x76e444=_0x5c2095[_0x2dcf12(0xf7)](_0x1d8d45=>_0x1d8d45[_0x2dcf12(0xe7)]===_0x3379b9);return{'userId':_0x3379b9,'username':_0x76e444?.[_0x2dcf12(0x129)]??String(_0x3379b9),'nickname':_0x76e444?.[_0x2dcf12(0x10f)],'matchedBy':'id'};}const _0x56a850=_0x5c2095[_0x2dcf12(0x124)](_0x24fc58=>matchMember(_0x24fc58,_0xbc0f5e));if(_0x56a850[_0x2dcf12(0x118)]===0x0)throw CliErrors[_0x2dcf12(0x110)](_0x2dcf12(0x123)+_0xbc0f5e+'\x22.',_0x2dcf12(0x12f)+_0x18e8fe);if(_0x56a850['length']>0x1){const _0x5e2dbb=_0x56a850[_0x2dcf12(0x126)](_0x246bc3=>(_0x246bc3[_0x2dcf12(0x10f)]??_0x246bc3[_0x2dcf12(0x129)]??'?')+'('+_0x246bc3[_0x2dcf12(0xe7)]+')')[_0x2dcf12(0x117)](',\x20');throw CliErrors[_0x2dcf12(0x110)]('Multiple\x20tenant\x20members\x20match\x20\x22'+_0xbc0f5e+_0x2dcf12(0xf6)+_0x5e2dbb+'.',_0x18e8fe);}const _0x20c8db=_0x56a850[0x0];return{'userId':_0x20c8db['userId'],'username':_0x20c8db['username']??String(_0x20c8db[_0x2dcf12(0xe7)]),'nickname':_0x20c8db[_0x2dcf12(0x10f)],'matchedBy':'name'};}function a194_0x4732(_0x513828,_0x8011af){_0x513828=_0x513828-0xe5;const _0x4d1b08=a194_0x4d1b();let _0x473294=_0x4d1b08[_0x513828];return _0x473294;}export const CREATE_USER_ROLE_PATH=a194_0x5a2978(0x11a);export const DELETE_USER_ROLE_PATH=a194_0x5a2978(0x131);function a194_0x4d1b(){const _0x3c754f=['299770bvkJBR','number','expect-user-count','Anti-drift\x20check\x20failed:\x20expected\x20','Removed\x20','Anti-drift\x20guard:\x20fail\x20if\x20the\x20role\x27s\x20current\x20member\x20count\x20differs','No\x20tenant\x20member\x20matches\x20\x22','filter','POST','map','Pass\x20--role\x20<id|name>.','DEV','username','permitCount','authRequired','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.','string','Role\x20id\x20or\x20exact\x20role\x20name','Check\x20the\x20nickname/username.\x20','roleName','/smartapi/permit/user-role/delete','\x22\x20is\x20ambiguous\x20(ids:\x20','User\x20','totalCount','\x20is\x20already\x20a\x20member\x20of\x20role\x20','\x20is\x20not\x20a\x20member\x20of\x20role\x20','userId','Missing\x20user\x20reference.','Cannot\x20','remark','Re-run\x20`role\x20detail`\x20/\x20`role\x20list`\x20and\x20retry\x20with\x20the\x20current\x20count.','156798CKlWUS','toLowerCase','Only\x20CUSTOM\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','3076374jSDtTj','trim','472HJLiHb','Nickname\x20or\x20username\x20to\x20resolve\x20to\x20a\x20userId','CUSTOM','name','includes','\x22:\x20','find','838bbVMaU','Role\x20name\x20\x22','userCount','roleType','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles,\x20or\x20pass\x20--role\x20<id>.','flag','2818rcGalF','646104DpyARl','Cannot\x20resolve\x20current\x20tenant.\x20Run\x20`rabetbase\x20auth\x20login`\x20first.','dryRun','User\x20id,\x20username,\x20or\x20nickname\x20to\x20resolve\x20to\x20a\x20userId','44bFngwj','44453376rcyEfz','Optional\x20role\x20remark/description','OWNER','flagMissing','str','71701XtizHA','Role\x20id\x20','push','Role\x20id\x20(from\x20`role\x20list`)','\x20members\x20of\x20the\x20OWNER\x20role.','appCode','nickname','validation','790HQFVCO','user-add','Missing\x20role\x20reference.',';\x20no\x20change.','\x20member(s)\x20but\x20role\x20has\x20','role','join','length','user','/smartapi/permit/user-role/create','expectUserCount','Pass\x20--user\x20<id|name>.'];a194_0x4d1b=function(){return _0x3c754f;};return a194_0x4d1b();}export function computeRoleUserMutation(_0x1627f6){const _0xc6618c=a194_0x5a2978,{operation:_0x1f0655,appCode:_0x2bf7d2,role:_0x387a68,relations:_0x18c989,user:_0x3a2b99}=_0x1627f6,_0x8e9333=[...new Set(_0x18c989[_0xc6618c(0x126)](_0x248729=>_0x248729[_0xc6618c(0xe7)]))],_0x2af19d=[];if(_0x1627f6[_0xc6618c(0x11b)]!==undefined&&_0x1627f6[_0xc6618c(0x11b)]!==_0x8e9333[_0xc6618c(0x118)])throw CliErrors[_0xc6618c(0x110)](_0xc6618c(0x120)+_0x1627f6[_0xc6618c(0x11b)]+_0xc6618c(0x115)+_0x8e9333[_0xc6618c(0x118)]+'.',_0xc6618c(0xeb));const _0x27a047=_0x8e9333[_0xc6618c(0xf5)](_0x3a2b99[_0xc6618c(0xe7)]),_0x5ac25f=_0x18c989[_0xc6618c(0x124)](_0x903374=>_0x903374[_0xc6618c(0xe7)]===_0x3a2b99[_0xc6618c(0xe7)])[_0xc6618c(0x126)](_0x2760b4=>_0x2760b4['id']),_0x24a90a=_0x1f0655==='user-add'?!_0x27a047:_0x27a047;let _0x4bafa7=_0x8e9333;_0x1f0655===_0xc6618c(0x112)?_0x27a047?_0x2af19d['push'](_0xc6618c(0x133)+_0x3a2b99[_0xc6618c(0xe7)]+_0xc6618c(0xe5)+_0x387a68[_0xc6618c(0x130)]+_0xc6618c(0x114)):_0x4bafa7=[..._0x8e9333,_0x3a2b99[_0xc6618c(0xe7)]]:!_0x27a047?_0x2af19d[_0xc6618c(0x10b)](_0xc6618c(0x133)+_0x3a2b99[_0xc6618c(0xe7)]+_0xc6618c(0xe6)+_0x387a68['roleName']+_0xc6618c(0x114)):(_0x4bafa7=_0x8e9333[_0xc6618c(0x124)](_0xdb8920=>_0xdb8920!==_0x3a2b99[_0xc6618c(0xe7)]),_0x5ac25f[_0xc6618c(0x118)]>0x1&&_0x2af19d[_0xc6618c(0x10b)](_0xc6618c(0x121)+_0x5ac25f[_0xc6618c(0x118)]+'\x20duplicate\x20memberships\x20for\x20user\x20'+_0x3a2b99[_0xc6618c(0xe7)]+'.'));const _0x4a5878={'scope':'dev','operation':_0x1f0655,'selector':{'appCode':_0x2bf7d2,'roleId':_0x387a68['id'],'roleName':_0x387a68[_0xc6618c(0x130)],'userId':_0x3a2b99[_0xc6618c(0xe7)]},'before':{'userIds':_0x8e9333},'after':{'userIds':_0x4bafa7},'dryRun':_0x1627f6[_0xc6618c(0x101)],'backend':{'method':_0xc6618c(0x125),'path':_0x1f0655==='user-add'?CREATE_USER_ROLE_PATH:DELETE_USER_ROLE_PATH},'warnings':_0x2af19d};return{'mutation':_0x4a5878,'changed':_0x24a90a,'matchingRelationIds':_0x5ac25f};}export async function loadDevRoleRelations(_0x201710,_0x477355){const _0x4d4b76=a194_0x5a2978,_0x4a298b=0x64,_0x44bec6=[];for(let _0x592e6c=0x1;;_0x592e6c+=0x1){const {items:_0xfe0d7b,paging:_0x3267e8}=await listDevUserRoleRelations(_0x201710,{'roleId':_0x477355,'currentPage':_0x592e6c,'pageSize':_0x4a298b});_0x44bec6['push'](..._0xfe0d7b);if(_0xfe0d7b[_0x4d4b76(0x118)]<_0x4a298b||_0x3267e8&&_0x44bec6['length']>=_0x3267e8[_0x4d4b76(0x134)])return _0x44bec6;}}export function readRoleRef(_0x20f45c){const _0x12475c=a194_0x5a2978,_0x1ce6b0=_0x20f45c[_0x12475c(0x108)](_0x12475c(0x116))[_0x12475c(0xf0)]();if(!_0x1ce6b0)throw CliErrors[_0x12475c(0x107)](_0x12475c(0x116),'Pass\x20--role\x20<id|name>.');return _0x1ce6b0;}export async function prepareUserMutation(_0x224cfa,_0x41429,_0x5f4675){const _0x35ab40=a194_0x5a2978,_0x351798=readRoleRef(_0x224cfa),_0x4e8d7c=_0x224cfa[_0x35ab40(0x108)]('user')['trim']();if(!_0x4e8d7c)throw CliErrors['flagMissing'](_0x35ab40(0x119),_0x35ab40(0x11c));const _0x447037=_0x224cfa[_0x35ab40(0xfd)](_0x35ab40(0x11f)),_0x4e223f=_0x447037===undefined||_0x447037===null?undefined:Number(_0x447037),_0x1a0402=await resolveRoleRef(_0x224cfa[_0x35ab40(0x10e)],_0x351798);if(_0x1a0402[_0x35ab40(0xfb)]==='OWNER')throw CliErrors['validation']('Cannot\x20'+_0x41429+_0x35ab40(0x10d),'Use\x20the\x20platform\x20ownership-transfer\x20workflow\x20to\x20change\x20the\x20application\x20owner.');const _0x3b0080=await resolveUserRef(_0x4e8d7c),_0x5f24da=await loadDevRoleRelations(_0x224cfa[_0x35ab40(0x10e)],_0x1a0402['id']);return{...computeRoleUserMutation({'operation':_0x41429,'appCode':_0x224cfa[_0x35ab40(0x10e)],'role':_0x1a0402,'relations':_0x5f24da,'user':{'userId':_0x3b0080['userId'],'username':_0x3b0080[_0x35ab40(0x129)],'nickname':_0x3b0080[_0x35ab40(0x10f)]},'dryRun':_0x5f4675,..._0x4e223f!==undefined?{'expectUserCount':_0x4e223f}:{}}),'role':_0x1a0402,'user':_0x3b0080};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a195_0x59dd3a=a195_0xb576;function a195_0x5299(){const _0x876593=['15594650xmaxyi','5wuNHMs','2072744ndFoeL','165516oHkSph','dev','Updated\x20role\x20','Nothing\x20to\x20update.','validation','Role\x20name\x20cannot\x20exceed\x2064\x20characters.','appCode','flag','update','length','New\x20role\x20name','--name\x20cannot\x20be\x20empty.','140QjjSap','Update\x20a\x20CUSTOM\x20role\x27s\x20name/remark\x20(built-in\x20roles\x20rejected)','trim','205844SKitDF','num','role','remark','roleName','101800GSSsdB','778894wkPoAF','POST','name','1684248FxMUOA','/smartapi/permit/role/update','306SXwOTj','string'];a195_0x5299=function(){return _0x876593;};return a195_0x5299();}(function(_0x124718,_0x7ed20d){const _0x4e944b=a195_0xb576,_0x99681=_0x124718();while(!![]){try{const _0x44c91b=parseInt(_0x4e944b(0xd5))/0x1+-parseInt(_0x4e944b(0xdb))/0x2+-parseInt(_0x4e944b(0xde))/0x3+parseInt(_0x4e944b(0xc5))/0x4*(-parseInt(_0x4e944b(0xc4))/0x5)+parseInt(_0x4e944b(0xc6))/0x6*(parseInt(_0x4e944b(0xd2))/0x7)+parseInt(_0x4e944b(0xda))/0x8*(-parseInt(_0x4e944b(0xe0))/0x9)+parseInt(_0x4e944b(0xc3))/0xa;if(_0x44c91b===_0x7ed20d)break;else _0x99681['push'](_0x99681['shift']());}catch(_0x237692){_0x99681['push'](_0x99681['shift']());}}}(a195_0x5299,0x65662));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';function a195_0xb576(_0x24a3fc,_0x289253){_0x24a3fc=_0x24a3fc-0xc2;const _0x529951=a195_0x5299();let _0xb576b0=_0x529951[_0x24a3fc];return _0xb576b0;}const UPDATE_PATH=a195_0x59dd3a(0xdf);function readPatch(_0x2de85b){const _0x4ad3d6=a195_0x59dd3a,_0x35b395=_0x2de85b[_0x4ad3d6(0xcd)](_0x4ad3d6(0xdd)),_0x86200f=_0x2de85b[_0x4ad3d6(0xcd)]('remark'),_0x2915e4={};if(_0x35b395!==undefined&&_0x35b395!==null){const _0x3fb9da=String(_0x35b395)[_0x4ad3d6(0xd4)]();if(!_0x3fb9da)throw CliErrors[_0x4ad3d6(0xca)](_0x4ad3d6(0xd1));if(_0x3fb9da[_0x4ad3d6(0xcf)]>0x40)throw CliErrors[_0x4ad3d6(0xca)](_0x4ad3d6(0xcb));_0x2915e4[_0x4ad3d6(0xd9)]=_0x3fb9da;}_0x86200f!==undefined&&_0x86200f!==null&&(_0x2915e4[_0x4ad3d6(0xd8)]=String(_0x86200f));if(_0x2915e4[_0x4ad3d6(0xd9)]===undefined&&_0x2915e4[_0x4ad3d6(0xd8)]===undefined)throw CliErrors[_0x4ad3d6(0xca)](_0x4ad3d6(0xc9),'Pass\x20at\x20least\x20one\x20of\x20--name\x20/\x20--remark.');return _0x2915e4;}export const roleUpdate={'service':a195_0x59dd3a(0xd7),'command':a195_0x59dd3a(0xce),'description':a195_0x59dd3a(0xd3),'risk':'write','flags':[ROLE_ID_FLAG,{...REMARK_FLAG},{'name':a195_0x59dd3a(0xdd),'type':a195_0x59dd3a(0xc2),'required':![],'description':a195_0x59dd3a(0xd0)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1f7e61){readPatch(_0x1f7e61);},async 'dryRun'(_0x9e6e24){const _0x60aa55=a195_0x59dd3a,_0x1c6e2a=_0x9e6e24[_0x60aa55(0xd6)]('id'),_0x5c9e8b=readPatch(_0x9e6e24),_0x30cf26=await getRoleById(_0x9e6e24[_0x60aa55(0xcc)],_0x1c6e2a);return assertCustomRole(_0x30cf26,_0x60aa55(0xce)),asDryRunResult({'scope':_0x60aa55(0xc7),'operation':'update','selector':{'appCode':_0x9e6e24[_0x60aa55(0xcc)],'roleId':_0x1c6e2a,'roleName':_0x30cf26[_0x60aa55(0xd9)]},'before':projectRole(_0x30cf26),'after':projectRole({..._0x30cf26,..._0x5c9e8b['roleName']!==undefined?{'roleName':_0x5c9e8b[_0x60aa55(0xd9)]}:{},..._0x5c9e8b[_0x60aa55(0xd8)]!==undefined?{'remark':_0x5c9e8b[_0x60aa55(0xd8)]}:{}}),'dryRun':!![],'backend':{'method':_0x60aa55(0xdc),'path':UPDATE_PATH},'warnings':[]},{'method':_0x60aa55(0xdc),'url':UPDATE_PATH});},async 'execute'(_0x527549){const _0x59fdd3=a195_0x59dd3a,_0x59475e=_0x527549[_0x59fdd3(0xd6)]('id'),_0x616f52=readPatch(_0x527549),_0x4aeb2b=await getRoleById(_0x527549[_0x59fdd3(0xcc)],_0x59475e);assertCustomRole(_0x4aeb2b,_0x59fdd3(0xce)),await updateAppRole({'id':_0x59475e,'appCode':_0x527549['appCode'],..._0x616f52[_0x59fdd3(0xd9)]!==undefined?{'roleName':_0x616f52[_0x59fdd3(0xd9)]}:{},..._0x616f52[_0x59fdd3(0xd8)]!==undefined?{'remark':_0x616f52[_0x59fdd3(0xd8)]}:{}});const _0x1c5dcd=await getRoleById(_0x527549[_0x59fdd3(0xcc)],_0x59475e);return{'ok':!![],'data':{'scope':_0x59fdd3(0xc7),'operation':_0x59fdd3(0xce),'selector':{'appCode':_0x527549[_0x59fdd3(0xcc)],'roleId':_0x59475e,'roleName':_0x1c5dcd[_0x59fdd3(0xd9)]},'before':projectRole(_0x4aeb2b),'after':projectRole(_0x1c5dcd),'dryRun':![],'backend':{'method':_0x59fdd3(0xdc),'path':UPDATE_PATH},'warnings':[]},'message':_0x59fdd3(0xc8)+_0x1c5dcd[_0x59fdd3(0xd9)]+'\x20(id='+_0x59475e+')'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a196_0x1007f5=a196_0x3f3d;function a196_0x1bf5(){const _0x4ec0b5=['high-risk-write','10sKpZbi','POST','1960620DJkqBH','2921868UCmEiY','No\x20change:\x20user\x20','userId','610SunKAj','selector','32dfhdvb','Added\x20user\x20','589714lCmpiT','33884ZOWBjo','roleName','roleType','27201229WMnpkT','12pEgLTy','username','\x20already\x20in\x20role\x20','\x20to\x20role\x20','703535zjRULL','roleId','user-add','appCode','48387ZaWrCX'];a196_0x1bf5=function(){return _0x4ec0b5;};return a196_0x1bf5();}(function(_0x3927cf,_0x120b49){const _0x568549=a196_0x3f3d,_0x1c5dc8=_0x3927cf();while(!![]){try{const _0x3c0ae9=-parseInt(_0x568549(0x11b))/0x1+parseInt(_0x568549(0x12c))/0x2+-parseInt(_0x568549(0x128))/0x3+-parseInt(_0x568549(0x11c))/0x4*(parseInt(_0x568549(0x130))/0x5)+-parseInt(_0x568549(0x120))/0x6*(-parseInt(_0x568549(0x124))/0x7)+parseInt(_0x568549(0x119))/0x8*(-parseInt(_0x568549(0x12d))/0x9)+-parseInt(_0x568549(0x12a))/0xa*(-parseInt(_0x568549(0x11f))/0xb);if(_0x3c0ae9===_0x120b49)break;else _0x1c5dc8['push'](_0x1c5dc8['shift']());}catch(_0xdbd9c7){_0x1c5dc8['push'](_0x1c5dc8['shift']());}}}(a196_0x1bf5,0xaedd6));import{createDevUserRole}from'../../core/api-client.js';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';function a196_0x3f3d(_0x37ea2d,_0x9a970d){_0x37ea2d=_0x37ea2d-0x118;const _0x1bf5b2=a196_0x1bf5();let _0x3f3d58=_0x1bf5b2[_0x37ea2d];return _0x3f3d58;}export const roleUserAdd={'service':'role','command':a196_0x1007f5(0x126),'description':'Add\x20a\x20user\x20to\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','risk':a196_0x1007f5(0x129),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0xa02822){const _0x49b3db=a196_0x1007f5,{mutation:_0x3088e7}=await prepareUserMutation(_0xa02822,_0x49b3db(0x126),!![]);return asDryRunResult(_0x3088e7,{'method':_0x49b3db(0x12b),'url':CREATE_USER_ROLE_PATH});},async 'execute'(_0x452ab6){const _0x4e60be=a196_0x1007f5,{mutation:_0x46b67a,changed:_0x1fdc9e,role:_0x3ed61e,user:_0xe6126c}=await prepareUserMutation(_0x452ab6,'user-add',![]);return _0x1fdc9e&&await createDevUserRole({'appCode':_0x452ab6[_0x4e60be(0x127)],'userId':_0xe6126c[_0x4e60be(0x12f)],'username':_0xe6126c[_0x4e60be(0x121)],'roleType':_0x3ed61e[_0x4e60be(0x11e)],'roleId':_0x46b67a['selector'][_0x4e60be(0x125)]}),{'ok':!![],'data':_0x46b67a,'message':_0x1fdc9e?_0x4e60be(0x11a)+_0x46b67a[_0x4e60be(0x118)]['userId']+_0x4e60be(0x123)+_0x46b67a[_0x4e60be(0x118)][_0x4e60be(0x11d)]:_0x4e60be(0x12e)+_0x46b67a[_0x4e60be(0x118)]['userId']+_0x4e60be(0x122)+_0x46b67a[_0x4e60be(0x118)]['roleName']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a197_0x16ef4d=a197_0x2fdc;(function(_0x5e040a,_0x431ad2){const _0x270efe=a197_0x2fdc,_0x38d560=_0x5e040a();while(!![]){try{const _0x22b9b3=-parseInt(_0x270efe(0x154))/0x1*(parseInt(_0x270efe(0x153))/0x2)+-parseInt(_0x270efe(0x147))/0x3+parseInt(_0x270efe(0x158))/0x4+-parseInt(_0x270efe(0x152))/0x5+-parseInt(_0x270efe(0x14f))/0x6+-parseInt(_0x270efe(0x150))/0x7+parseInt(_0x270efe(0x144))/0x8*(parseInt(_0x270efe(0x149))/0x9);if(_0x22b9b3===_0x431ad2)break;else _0x38d560['push'](_0x38d560['shift']());}catch(_0x47c7f1){_0x38d560['push'](_0x38d560['shift']());}}}(a197_0x2ea3,0x8e20a));import{deleteDevUserRole}from'../../core/api-client.js';function a197_0x2fdc(_0x73789d,_0xb042b0){_0x73789d=_0x73789d-0x144;const _0x2ea33b=a197_0x2ea3();let _0x2fdc2b=_0x2ea33b[_0x73789d];return _0x2fdc2b;}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';export const roleUserRemove={'service':a197_0x16ef4d(0x145),'command':'user-remove','description':a197_0x16ef4d(0x14b),'risk':a197_0x16ef4d(0x14a),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x14f69f){const _0x1ad7dc=a197_0x16ef4d,{mutation:_0x41ea27}=await prepareUserMutation(_0x14f69f,_0x1ad7dc(0x148),!![]);return asDryRunResult(_0x41ea27,{'method':_0x1ad7dc(0x157),'url':DELETE_USER_ROLE_PATH});},async 'execute'(_0xc62052){const _0x4e5e90=a197_0x16ef4d,{matchingRelationIds:_0x588549,mutation:_0x349471,changed:_0x6e3616}=await prepareUserMutation(_0xc62052,'user-remove',![]);if(_0x6e3616)for(const _0x44db97 of _0x588549){await deleteDevUserRole(_0x44db97);}return{'ok':!![],'data':_0x349471,'message':_0x6e3616?_0x4e5e90(0x14d)+_0x349471[_0x4e5e90(0x146)][_0x4e5e90(0x156)]+_0x4e5e90(0x14e)+_0x349471[_0x4e5e90(0x146)][_0x4e5e90(0x155)]:_0x4e5e90(0x151)+_0x349471[_0x4e5e90(0x146)]['userId']+_0x4e5e90(0x14c)+_0x349471['selector'][_0x4e5e90(0x155)]};}};function a197_0x2ea3(){const _0x57b0a8=['Remove\x20a\x20user\x20from\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','\x20not\x20in\x20role\x20','Removed\x20user\x20','\x20from\x20role\x20','2980278tbEUwo','6415899msWCfb','No\x20change:\x20user\x20','4682265QserEo','44zlNSmR','3357AfaMnr','roleName','userId','POST','2430216tJCnti','26919760VVzUpU','role','selector','2900379UsQDrX','user-remove','9BzEPMk','high-risk-write'];a197_0x2ea3=function(){return _0x57b0a8;};return a197_0x2ea3();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a198_0x712efb=a198_0x3aae;(function(_0x375069,_0x4a6d27){const _0x33f476=a198_0x3aae,_0x16d07a=_0x375069();while(!![]){try{const _0x25a131=-parseInt(_0x33f476(0x189))/0x1*(-parseInt(_0x33f476(0x185))/0x2)+parseInt(_0x33f476(0x199))/0x3+parseInt(_0x33f476(0x194))/0x4+-parseInt(_0x33f476(0x191))/0x5*(parseInt(_0x33f476(0x188))/0x6)+-parseInt(_0x33f476(0x18b))/0x7+-parseInt(_0x33f476(0x18d))/0x8*(parseInt(_0x33f476(0x197))/0x9)+parseInt(_0x33f476(0x18f))/0xa;if(_0x25a131===_0x4a6d27)break;else _0x16d07a['push'](_0x16d07a['shift']());}catch(_0x4b6c74){_0x16d07a['push'](_0x16d07a['shift']());}}}(a198_0x54b1,0x2271b));function a198_0x3aae(_0x7ddf09,_0x55e94e){_0x7ddf09=_0x7ddf09-0x184;const _0x54b141=a198_0x54b1();let _0x3aae84=_0x54b141[_0x7ddf09];return _0x3aae84;}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a198_0x54b1(){const _0x1827cf=['userId','46592kgjtSV','nickname','3984600nVJAcT','Resolve\x20a\x20nickname/username\x20to\x20a\x20userId\x20(tenant\x20member\x20directory)','10kLeMID','str','Resolved\x20\x22','173740zEJsIv','trim','flagMissing','369bDDGTH','Select\x20a\x20listed\x20userId,\x20then\x20pass\x20it\x20to\x20`role\x20user-add`\x20or\x20`role\x20user-remove`\x20with\x20--user\x20<id>.','91830vCrQdI','\x22\x20→\x20userId\x20','118vHtAuc','user-resolve','name','139014fhToSj','3042eyjXbr','Pass\x20--name\x20<nickname|username>.','1580446QkcGIi'];a198_0x54b1=function(){return _0x1827cf;};return a198_0x54b1();}import{resolveUserRef,USER_NAME_FLAG}from'../../commands/role/shared.js';export const roleUserResolve={'service':'role','command':a198_0x712efb(0x186),'description':a198_0x712efb(0x190),'risk':'read','flags':[USER_NAME_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x27d4a8){const _0x46e6c4=a198_0x712efb;if(!_0x27d4a8[_0x46e6c4(0x192)](_0x46e6c4(0x187))[_0x46e6c4(0x195)]())throw CliErrors[_0x46e6c4(0x196)](_0x46e6c4(0x187),_0x46e6c4(0x18a));},async 'execute'(_0x10b78c){const _0x2291b8=a198_0x712efb,_0x1888a5=_0x10b78c['str'](_0x2291b8(0x187))[_0x2291b8(0x195)](),_0x55c5a7=await resolveUserRef(_0x1888a5,_0x2291b8(0x198));return{'ok':!![],'data':{'user':{'userId':_0x55c5a7['userId'],'username':_0x55c5a7['username'],'nickname':_0x55c5a7[_0x2291b8(0x18e)],'matchedBy':_0x55c5a7['matchedBy']}},'message':_0x2291b8(0x193)+_0x1888a5+_0x2291b8(0x184)+_0x55c5a7[_0x2291b8(0x18c)]};}};
|
package/lib/commands/rule/get.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a199_0x162f87=a199_0x1733;(function(_0x44a8d1,_0x1ca483){const _0x2f3f23=a199_0x1733,_0x590556=_0x44a8d1();while(!![]){try{const _0x1c795e=-parseInt(_0x2f3f23(0x1f3))/0x1*(parseInt(_0x2f3f23(0x1fb))/0x2)+-parseInt(_0x2f3f23(0x1fa))/0x3+parseInt(_0x2f3f23(0x202))/0x4*(parseInt(_0x2f3f23(0x1f6))/0x5)+parseInt(_0x2f3f23(0x1fe))/0x6+-parseInt(_0x2f3f23(0x1f4))/0x7+parseInt(_0x2f3f23(0x1f9))/0x8+parseInt(_0x2f3f23(0x1fd))/0x9;if(_0x1c795e===_0x1ca483)break;else _0x590556['push'](_0x590556['shift']());}catch(_0x337f59){_0x590556['push'](_0x590556['shift']());}}}(a199_0x1eb8,0x80c64));function a199_0x1eb8(){const _0x107aaf=['get','Get\x20one\x20agent\x20context\x20rule\x20for\x20the\x20resolved\x20app','rule','1986188OLtNgt','Loaded\x20','\x20for\x20','\x20is\x20not\x20configured\x20for\x20app\x20','169sccgSb','466333UcaQWV','read','5tABZBM','cookie','appCode','657768Yhjgkq','1478730yVTqHa','5218AAQeWB','Create\x20it\x20with\x20`rabetbase\x20rule\x20set\x20--type\x20','6538995WfIcbe','1335522PfJKgN'];a199_0x1eb8=function(){return _0x107aaf;};return a199_0x1eb8();}import{getAppRule}from'../../core/api-client.js';import{APP_RULE_TYPE_FLAG,appRuleError,appRuleFileName,projectAppRule,readAppRuleType}from'../../commands/rule/shared.js';function a199_0x1733(_0x3c230a,_0x4aec80){_0x3c230a=_0x3c230a-0x1f3;const _0x1eb878=a199_0x1eb8();let _0x1733c6=_0x1eb878[_0x3c230a];return _0x1733c6;}export const ruleGet={'service':a199_0x162f87(0x201),'command':a199_0x162f87(0x1ff),'description':a199_0x162f87(0x200),'risk':a199_0x162f87(0x1f5),'requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG],async 'validate'(_0x35d863){readAppRuleType(_0x35d863);},async 'execute'(_0x3e10b7){const _0x47b0b4=a199_0x162f87,_0x4108eb=readAppRuleType(_0x3e10b7),_0x257034=await getAppRule(_0x3e10b7[_0x47b0b4(0x1f7)],{'appCode':_0x3e10b7[_0x47b0b4(0x1f8)],'type':_0x4108eb});if(!_0x257034)throw appRuleError('app_rule_not_found',appRuleFileName(_0x4108eb)+_0x47b0b4(0x205)+_0x3e10b7[_0x47b0b4(0x1f8)]+'.',_0x47b0b4(0x1fc)+_0x4108eb+'\x20--file\x20<path>\x20--dry-run`.');return{'ok':!![],'data':{'rule':{...projectAppRule(_0x4108eb,_0x257034),'content':_0x257034['content']}},'message':_0x47b0b4(0x203)+appRuleFileName(_0x4108eb)+_0x47b0b4(0x204)+_0x3e10b7[_0x47b0b4(0x1f8)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3f8240,_0x229193){const _0x448644=a200_0x1742,_0x5d087a=_0x3f8240();while(!![]){try{const _0x1b4b89=-parseInt(_0x448644(0x18c))/0x1+-parseInt(_0x448644(0x18f))/0x2*(-parseInt(_0x448644(0x191))/0x3)+parseInt(_0x448644(0x190))/0x4+-parseInt(_0x448644(0x18b))/0x5*(-parseInt(_0x448644(0x188))/0x6)+parseInt(_0x448644(0x189))/0x7+parseInt(_0x448644(0x18e))/0x8*(parseInt(_0x448644(0x18a))/0x9)+parseInt(_0x448644(0x18d))/0xa*(-parseInt(_0x448644(0x192))/0xb);if(_0x1b4b89===_0x229193)break;else _0x5d087a['push'](_0x5d087a['shift']());}catch(_0x5491e9){_0x5d087a['push'](_0x5d087a['shift']());}}}(a200_0x4160,0x3bb35));import{ruleGet}from'../../commands/rule/get.js';function a200_0x4160(){const _0x11b4c3=['77570rQdjSp','133025akXabQ','5869030teZHDW','24BKKdQz','292308xTnIel','1221584nGcXip','3MzHSSj','11IEZmOD','30HRWPEu','2268896pJFlkz','333639PlVlXB'];a200_0x4160=function(){return _0x11b4c3;};return a200_0x4160();}import{ruleList}from'../../commands/rule/list.js';function a200_0x1742(_0x321159,_0x11c39a){_0x321159=_0x321159-0x188;const _0x41600e=a200_0x4160();let _0x17427c=_0x41600e[_0x321159];return _0x17427c;}import{ruleSet}from'../../commands/rule/set.js';export const ruleDefinitions=[ruleList,ruleGet,ruleSet];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a201_0x273f(){const _0x3dd96d=['2229IYHnuF','1020550OVTKnO','678830RdthRW','map','list','read','1314nDdnpu','279rkMMhN','cookie','482432ZjMpNT','76240MLHWck','Loaded\x20app\x20rule\x20configuration\x20for\x20','366aoXbna','71624XoMfjV','length','List\x20agent\x20context\x20rules\x20for\x20the\x20resolved\x20app','all','rule','appCode','9121PjcWkQ'];a201_0x273f=function(){return _0x3dd96d;};return a201_0x273f();}const a201_0x2d1102=a201_0x5c43;(function(_0x4b4d18,_0x7a966c){const _0x1b94f1=a201_0x5c43,_0x49f697=_0x4b4d18();while(!![]){try{const _0xa7133d=-parseInt(_0x1b94f1(0x11c))/0x1+parseInt(_0x1b94f1(0x11e))/0x2*(-parseInt(_0x1b94f1(0x112))/0x3)+parseInt(_0x1b94f1(0x11b))/0x4+parseInt(_0x1b94f1(0x114))/0x5+-parseInt(_0x1b94f1(0x118))/0x6*(-parseInt(_0x1b94f1(0x111))/0x7)+-parseInt(_0x1b94f1(0x11f))/0x8*(parseInt(_0x1b94f1(0x119))/0x9)+parseInt(_0x1b94f1(0x113))/0xa;if(_0xa7133d===_0x7a966c)break;else _0x49f697['push'](_0x49f697['shift']());}catch(_0x3c5a4e){_0x49f697['push'](_0x49f697['shift']());}}}(a201_0x273f,0x259b2));import{getAppRule}from'../../core/api-client.js';function a201_0x5c43(_0x1c4f7b,_0x3cedf6){_0x1c4f7b=_0x1c4f7b-0x10c;const _0x273fa9=a201_0x273f();let _0x5c438d=_0x273fa9[_0x1c4f7b];return _0x5c438d;}import{APP_RULE_TYPES,projectAppRule}from'../../commands/rule/shared.js';export const ruleList={'service':a201_0x2d1102(0x10f),'command':a201_0x2d1102(0x116),'description':a201_0x2d1102(0x10d),'risk':a201_0x2d1102(0x117),'requiresAppCode':!![],'structuredErrors':!![],'flags':[],async 'execute'(_0x270f9b){const _0x4f4f7d=a201_0x2d1102,_0x51f2ac=await Promise[_0x4f4f7d(0x10e)](APP_RULE_TYPES[_0x4f4f7d(0x115)](_0x446459=>getAppRule(_0x270f9b[_0x4f4f7d(0x11a)],{'appCode':_0x270f9b[_0x4f4f7d(0x110)],'type':_0x446459}))),_0x33ab4a=APP_RULE_TYPES[_0x4f4f7d(0x115)]((_0x2565f1,_0x4d372b)=>projectAppRule(_0x2565f1,_0x51f2ac[_0x4d372b]??null));return{'ok':!![],'data':{'total':_0x33ab4a[_0x4f4f7d(0x10c)],'rules':_0x33ab4a},'message':_0x4f4f7d(0x11d)+_0x270f9b['appCode']};}};
|
package/lib/commands/rule/set.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a202_0x5d39(_0x61a209,_0x3671fc){_0x61a209=_0x61a209-0x1a4;const _0x218051=a202_0x2180();let _0x5d3923=_0x218051[_0x61a209];return _0x5d3923;}const a202_0x51f545=a202_0x5d39;(function(_0x1cf6aa,_0x1a4d2a){const _0x182c7a=a202_0x5d39,_0x598bce=_0x1cf6aa();while(!![]){try{const _0x4c3fb4=parseInt(_0x182c7a(0x1cd))/0x1*(parseInt(_0x182c7a(0x1d0))/0x2)+parseInt(_0x182c7a(0x1a8))/0x3+parseInt(_0x182c7a(0x1c3))/0x4*(-parseInt(_0x182c7a(0x1c9))/0x5)+parseInt(_0x182c7a(0x1cb))/0x6+-parseInt(_0x182c7a(0x1ad))/0x7*(parseInt(_0x182c7a(0x1ca))/0x8)+-parseInt(_0x182c7a(0x1d1))/0x9*(parseInt(_0x182c7a(0x1a9))/0xa)+parseInt(_0x182c7a(0x1ce))/0xb;if(_0x4c3fb4===_0x1a4d2a)break;else _0x598bce['push'](_0x598bce['shift']());}catch(_0x195712){_0x598bce['push'](_0x598bce['shift']());}}}(a202_0x2180,0x961c5));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';const SAVE_PATH=a202_0x51f545(0x1c6),NON_ATOMIC_WARNING=a202_0x51f545(0x1bc);function readSetInput(_0xba645d){const _0x32acb9=a202_0x51f545,_0x5d73cc=readAppRuleType(_0xba645d),_0x25d632=_0xba645d[_0x32acb9(0x1cf)](_0x32acb9(0x1b1))['trim']();if(!_0x25d632)throw appRuleError(_0x32acb9(0x1c8),'--file\x20is\x20required.',_0x32acb9(0x1ba));const _0x56686e=_0xba645d[_0x32acb9(0x1a4)](_0x32acb9(0x1d4));let _0x28a42f;if(_0x56686e!==undefined){_0x28a42f=Number(_0x56686e);if(!Number[_0x32acb9(0x1b8)](_0x28a42f)||_0x28a42f<0x0)throw appRuleError('app_rule_expected_version_invalid',_0x32acb9(0x1a5));}return{'type':_0x5d73cc,'file':_0x25d632,'expectedVersion':_0x28a42f};}async function prepareSet(_0x21c192){const _0x59df0f=a202_0x51f545,_0x8ff385=readSetInput(_0x21c192),_0x3b254c=await readAppRuleFile(_0x8ff385['file']),_0x108b20=await getAppRule(_0x21c192['cookie'],{'appCode':_0x21c192[_0x59df0f(0x1ac)],'type':_0x8ff385['type']});if(_0x8ff385[_0x59df0f(0x1d6)]!==undefined&&_0x108b20?.[_0x59df0f(0x1d3)]!==_0x8ff385[_0x59df0f(0x1d6)])throw appRuleError(_0x59df0f(0x1bb),appRuleFileName(_0x8ff385[_0x59df0f(0x1c1)])+'\x20version\x20changed\x20before\x20write.','Expected\x20'+_0x8ff385[_0x59df0f(0x1d6)]+';\x20current\x20version\x20is\x20'+(_0x108b20?.['version']??_0x59df0f(0x1dd))+_0x59df0f(0x1c5));return{'input':_0x8ff385,'replacement':_0x3b254c,'beforeRecord':_0x108b20,'before':projectAppRule(_0x8ff385[_0x59df0f(0x1c1)],_0x108b20),'planned':{'type':_0x8ff385[_0x59df0f(0x1c1)],'fileName':appRuleFileName(_0x8ff385['type']),'contextScope':appRuleContextScope(_0x8ff385[_0x59df0f(0x1c1)]),'enabled':!![],'appCode':_0x21c192['appCode'],'scope':_0x59df0f(0x1d2),'contentByteSize':_0x3b254c[_0x59df0f(0x1be)],'contentHash':_0x3b254c[_0x59df0f(0x1bf)]}};}function warningsFor(_0x48c74b){return _0x48c74b===undefined?[]:[NON_ATOMIC_WARNING];}function a202_0x2180(){const _0x6a23fb=['app_rule_file_required','170335LAPfwl','856JkTYmE','4671132ZXRXKQ','Set\x20an\x20agent\x20context\x20rule\x20from\x20a\x20UTF-8\x20Markdown\x20file','482343fsKufS','7612528IuHHrM','str','2izeCGu','9495657zELdXT','rules','version','expected-version','app_rule_set_outcome_unknown','expectedVersion','cookie','Inspect\x20it\x20with\x20`rabetbase\x20rule\x20get\x20--type\x20','Do\x20not\x20resubmit\x20automatically.\x20Inspect\x20the\x20exact\x20rule\x20state\x20before\x20retrying.','app_rule_verification_failed','string','Non-atomic\x20preflight\x20assertion\x20for\x20the\x20current\x20version','unconfigured','app_rule_verification_unavailable','POST','\x20does\x20not\x20prove\x20the\x20requested\x20set\x20state.','\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.','\x20--format\x20compress','flag','--expected-version\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.','rabetbase\x20rule\x20get\x20--type\x20','\x20for\x20','2211420RAJXsc','10ARvBEb','write','set','appCode','26621IvudCl','\x20could\x20not\x20be\x20verified.','UTF-8\x20Markdown\x20file\x20(maximum\x205\x20MiB)','Set\x20','file','input','verified','beforeRecord','rule','cause','before','isSafeInteger','replacement','Pass\x20a\x20UTF-8\x20Markdown\x20file.','app_rule_version_mismatch','--expected-version\x20is\x20a\x20non-atomic\x20read-before-write\x20assertion;\x20the\x20server\x20save\x20contract\x20has\x20no\x20version\x20predicate.','number','byteSize','contentHash','defineProperty','type','Set\x20response\x20was\x20unavailable;\x20verified\x20the\x20exact\x20content\x20readback\x20without\x20resubmitting.','72MmCiXE','push','.\x20Run\x20rule\x20get\x20and\x20review\x20before\x20retrying.','/smartapi/knowledge-base/save','The\x20set\x20request\x20was\x20sent,\x20but\x20'];a202_0x2180=function(){return _0x6a23fb;};return a202_0x2180();}export const ruleSet={'service':a202_0x51f545(0x1b5),'command':a202_0x51f545(0x1ab),'description':a202_0x51f545(0x1cc),'risk':a202_0x51f545(0x1aa),'requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG,{'name':'file','type':a202_0x51f545(0x1db),'required':!![],'description':a202_0x51f545(0x1af)},{'name':'expected-version','type':a202_0x51f545(0x1bd),'required':![],'description':a202_0x51f545(0x1dc)}],async 'validate'(_0x27637e){readSetInput(_0x27637e);},async 'dryRun'(_0x3d5e4f){const _0x2730b1=a202_0x51f545,_0x42755c=await prepareSet(_0x3d5e4f);return asDryRunResult({'operation':_0x2730b1(0x1ab),'selector':{'appCode':_0x3d5e4f[_0x2730b1(0x1ac)],'scope':_0x2730b1(0x1d2),'type':_0x42755c['input'][_0x2730b1(0x1c1)]},'before':_0x42755c['before'],'after':_0x42755c['planned'],'dryRun':!![],'backend':{'method':_0x2730b1(0x1df),'path':SAVE_PATH},'warnings':warningsFor(_0x42755c[_0x2730b1(0x1b2)][_0x2730b1(0x1d6)]),'verification':{'expectedVersion':_0x42755c[_0x2730b1(0x1b2)][_0x2730b1(0x1d6)]??null,'atomicCompareAndSet':![],'lookupCommand':_0x2730b1(0x1a6)+_0x42755c[_0x2730b1(0x1b2)][_0x2730b1(0x1c1)]+_0x2730b1(0x1e2)}},{'method':'POST','url':SAVE_PATH});},async 'execute'(_0x13b339){const _0x434f70=a202_0x51f545,_0x499750=await prepareSet(_0x13b339);let _0x2e5d91=![];try{await saveAppRule(_0x13b339[_0x434f70(0x1d7)],{'appCode':_0x13b339[_0x434f70(0x1ac)],'type':_0x499750[_0x434f70(0x1b2)][_0x434f70(0x1c1)],'content':_0x499750[_0x434f70(0x1b9)]['content']});}catch(_0x420943){if(!isPlatformTransportFailure(_0x420943))throw _0x420943;_0x2e5d91=!![];}let _0x7a7633;try{_0x7a7633=await getAppRule(_0x13b339[_0x434f70(0x1d7)],{'appCode':_0x13b339[_0x434f70(0x1ac)],'type':_0x499750[_0x434f70(0x1b2)][_0x434f70(0x1c1)]});}catch(_0x3f4d49){const _0x2f6a43=appRuleError(_0x2e5d91?_0x434f70(0x1d5):_0x434f70(0x1de),_0x434f70(0x1c7)+appRuleFileName(_0x499750['input'][_0x434f70(0x1c1)])+_0x434f70(0x1ae),_0x434f70(0x1d9));Object[_0x434f70(0x1c0)](_0x2f6a43,_0x434f70(0x1b6),{'value':_0x3f4d49,'enumerable':![]});throw _0x2f6a43;}const _0x26240f=_0x7a7633&&inspectAppRuleContent(_0x7a7633['content'])[_0x434f70(0x1bf)]===_0x499750[_0x434f70(0x1b9)][_0x434f70(0x1bf)],_0x37b43b=_0x7a7633&&(_0x499750['beforeRecord']===null||_0x7a7633[_0x434f70(0x1d3)]>_0x499750[_0x434f70(0x1b4)]['version']);if(!_0x7a7633||!_0x26240f||!_0x37b43b)throw appRuleError(_0x2e5d91?_0x434f70(0x1d5):_0x434f70(0x1da),appRuleFileName(_0x499750[_0x434f70(0x1b2)][_0x434f70(0x1c1)])+_0x434f70(0x1e0),_0x434f70(0x1d8)+_0x499750[_0x434f70(0x1b2)][_0x434f70(0x1c1)]+_0x434f70(0x1e1));const _0x40271b=warningsFor(_0x499750[_0x434f70(0x1b2)]['expectedVersion']);_0x2e5d91&&_0x40271b[_0x434f70(0x1c4)](_0x434f70(0x1c2));const _0x17325c=projectAppRule(_0x499750[_0x434f70(0x1b2)][_0x434f70(0x1c1)],_0x7a7633);return{'ok':!![],'data':{'operation':_0x434f70(0x1ab),'selector':{'appCode':_0x13b339['appCode'],'scope':'rules','type':_0x499750[_0x434f70(0x1b2)][_0x434f70(0x1c1)]},'before':_0x499750[_0x434f70(0x1b7)],'after':_0x17325c,'dryRun':![],'backend':{'method':_0x434f70(0x1df),'path':SAVE_PATH},'warnings':_0x40271b,'verification':{'status':_0x434f70(0x1b3),'recoveredAfterUnknownResponse':_0x2e5d91,'expectedVersion':_0x499750[_0x434f70(0x1b2)][_0x434f70(0x1d6)]??null,'atomicCompareAndSet':![],'lookupCommand':_0x434f70(0x1a6)+_0x499750['input']['type']+_0x434f70(0x1e2)}},'message':_0x434f70(0x1b0)+appRuleFileName(_0x499750[_0x434f70(0x1b2)][_0x434f70(0x1c1)])+_0x434f70(0x1a7)+_0x13b339[_0x434f70(0x1ac)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a203_0x54f9da=a203_0x104c;(function(_0x1b93a3,_0xc3873d){const _0x2a14d0=a203_0x104c,_0x29ad52=_0x1b93a3();while(!![]){try{const _0x2e93a4=parseInt(_0x2a14d0(0x173))/0x1+-parseInt(_0x2a14d0(0x188))/0x2*(parseInt(_0x2a14d0(0x17f))/0x3)+parseInt(_0x2a14d0(0x170))/0x4+-parseInt(_0x2a14d0(0x182))/0x5*(-parseInt(_0x2a14d0(0x16e))/0x6)+parseInt(_0x2a14d0(0x19b))/0x7*(-parseInt(_0x2a14d0(0x192))/0x8)+-parseInt(_0x2a14d0(0x189))/0x9+parseInt(_0x2a14d0(0x178))/0xa;if(_0x2e93a4===_0xc3873d)break;else _0x29ad52['push'](_0x29ad52['shift']());}catch(_0x9bfaec){_0x29ad52['push'](_0x29ad52['shift']());}}}(a203_0x8ca6,0x21e94));import{createHash}from'node:crypto';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=[a203_0x54f9da(0x180),a203_0x54f9da(0x18c)];export const MAX_APP_RULE_BYTES=0x5*0x400*0x400;const APP_RULE_FILES={'rules':a203_0x54f9da(0x19f),'database':a203_0x54f9da(0x18b)},APP_RULE_CONTEXT_SCOPES={'rules':a203_0x54f9da(0x19d),'database':a203_0x54f9da(0x18f)};export function appRuleError(_0x7874eb,_0x1dd82d,_0x20de35){return new CliError(_0x7874eb,0x1,_0x1dd82d,_0x20de35);}export function readAppRuleType(_0x340d73){const _0x55bfff=a203_0x54f9da,_0x31112a=_0x340d73[_0x55bfff(0x171)](_0x55bfff(0x1a4))[_0x55bfff(0x18a)]()[_0x55bfff(0x17e)]();if(_0x31112a!==_0x55bfff(0x180)&&_0x31112a!==_0x55bfff(0x18c))throw appRuleError(_0x55bfff(0x193),_0x55bfff(0x186));return _0x31112a;}function a203_0x8ca6(){const _0x3dfe24=['update','database-analysis','createTime','decode','8ZFRwBQ','app_rule_type_invalid','digest','App\x20rule\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','app_rule_file_invalid','app_rule_file_unreadable','size','utf-8','isFile','1111579wBjUqN','content','page-api-development','byteLength','RULES.md','app_rule_content_too_large','byteSize','utf8','sha256','type','122022CRjFKQ','App\x20rule\x20content\x20exceeds\x20the\x205\x20MiB\x20server\x20limit.','942176QgGTjJ','str','hex','158819axNrem','app_rule_content_invalid','from','updateTime','Cannot\x20access\x20app\x20rule\x20file:\x20','1642380HihsiY','contentHash','App\x20rule\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','--file\x20is\x20required.','App\x20rule\x20file\x20is\x20blank:\x20','Cannot\x20read\x20app\x20rule\x20file:\x20','toLowerCase','202956UXjZWF','rules','version','10ILxush','scope','Context\x20rule\x20type:\x20rules\x20for\x20page/API\x20development\x20agents\x20(DB\x20Agent\x20excluded),\x20database\x20for\x20DB\x20Agent\x20database\x20analysis','message','--type\x20must\x20be\x20either\x20rules\x20or\x20database.','appCode','2GiLmoq','2105334pxaeSh','trim','DATABASE.md','database','app_rule_file_required'];a203_0x8ca6=function(){return _0x3dfe24;};return a203_0x8ca6();}export function appRuleFileName(_0x34e1ea){return APP_RULE_FILES[_0x34e1ea];}export function appRuleContextScope(_0x597d1b){return APP_RULE_CONTEXT_SCOPES[_0x597d1b];}export function inspectAppRuleContent(_0x3e85be){const _0x3dfe05=a203_0x54f9da,_0x54827d=Buffer[_0x3dfe05(0x175)](_0x3e85be,_0x3dfe05(0x1a2));return{'content':_0x3e85be,'byteSize':_0x54827d[_0x3dfe05(0x19e)],'contentHash':'sha256:'+createHash(_0x3dfe05(0x1a3))[_0x3dfe05(0x18e)](_0x54827d)[_0x3dfe05(0x194)](_0x3dfe05(0x172))};}export async function readAppRuleFile(_0x1db151){const _0x23a030=a203_0x54f9da,_0x19214f=_0x1db151[_0x23a030(0x18a)]();if(!_0x19214f)throw appRuleError(_0x23a030(0x18d),_0x23a030(0x17b),'Pass\x20a\x20UTF-8\x20Markdown\x20file.');const _0xa83530=resolve(_0x19214f);let _0x51946f;try{_0x51946f=await stat(_0xa83530);}catch(_0x205c08){throw appRuleError(_0x23a030(0x197),_0x23a030(0x177)+_0x19214f,_0x205c08 instanceof Error?_0x205c08[_0x23a030(0x185)]:String(_0x205c08));}if(!_0x51946f[_0x23a030(0x19a)]())throw appRuleError(_0x23a030(0x196),_0x23a030(0x17a)+_0x19214f);if(_0x51946f[_0x23a030(0x198)]>MAX_APP_RULE_BYTES)throw appRuleError(_0x23a030(0x1a0),'App\x20rule\x20content\x20exceeds\x20the\x205\x20MiB\x20server\x20limit.');let _0xc381e3;try{_0xc381e3=await readFile(_0xa83530);}catch(_0x34aac4){throw appRuleError(_0x23a030(0x197),_0x23a030(0x17d)+_0x19214f,_0x34aac4 instanceof Error?_0x34aac4[_0x23a030(0x185)]:String(_0x34aac4));}if(_0xc381e3[_0x23a030(0x19e)]>MAX_APP_RULE_BYTES)throw appRuleError(_0x23a030(0x1a0),_0x23a030(0x16f));let _0x81ddef;try{_0x81ddef=new TextDecoder(_0x23a030(0x199),{'fatal':!![],'ignoreBOM':!![]})[_0x23a030(0x191)](_0xc381e3);}catch{throw appRuleError(_0x23a030(0x174),_0x23a030(0x195)+_0x19214f);}if(!_0x81ddef[_0x23a030(0x18a)]())throw appRuleError(_0x23a030(0x174),_0x23a030(0x17c)+_0x19214f);return inspectAppRuleContent(_0x81ddef);}function a203_0x104c(_0x7fbf5,_0x74004b){_0x7fbf5=_0x7fbf5-0x16e;const _0x8ca62b=a203_0x8ca6();let _0x104cd3=_0x8ca62b[_0x7fbf5];return _0x104cd3;}export function projectAppRule(_0x39edf5,_0x4251d0){const _0x366ee4=a203_0x54f9da;if(!_0x4251d0)return{'type':_0x39edf5,'fileName':appRuleFileName(_0x39edf5),'contextScope':appRuleContextScope(_0x39edf5),'enabled':![]};const _0x2a9cea=inspectAppRuleContent(_0x4251d0[_0x366ee4(0x19c)]);return{'type':_0x39edf5,'fileName':appRuleFileName(_0x39edf5),'contextScope':appRuleContextScope(_0x39edf5),'enabled':!![],'id':_0x4251d0['id'],'scope':_0x4251d0[_0x366ee4(0x183)],'appCode':_0x4251d0[_0x366ee4(0x187)],'version':_0x4251d0[_0x366ee4(0x181)],'contentByteSize':_0x2a9cea[_0x366ee4(0x1a1)],'contentHash':_0x2a9cea[_0x366ee4(0x179)],..._0x4251d0['createTime']!==undefined&&_0x4251d0['createTime']!==null?{'createTime':_0x4251d0[_0x366ee4(0x190)]}:{},..._0x4251d0[_0x366ee4(0x176)]!==undefined&&_0x4251d0['updateTime']!==null?{'updateTime':_0x4251d0[_0x366ee4(0x176)]}:{}};}export const APP_RULE_TYPE_FLAG={'name':a203_0x54f9da(0x1a4),'type':'string','required':!![],'description':a203_0x54f9da(0x184),'enum':[...APP_RULE_TYPES]};
|