@lovrabet/rabetbase-cli 2.5.4-beta.4 → 2.5.4-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -2
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.d.ts +2 -0
- package/lib/commands/app/detail.js +1 -0
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.d.ts +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.d.ts +3 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.d.ts +2 -0
- package/lib/commands/menu/shared/path.js +1 -0
- package/lib/commands/menu/shared/service.d.ts +6 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.d.ts +28 -0
- package/lib/commands/menu/shared/subapp-assets.js +1 -0
- package/lib/commands/menu/shared/sync-core.d.ts +2 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/types.d.ts +14 -4
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.d.ts +2 -0
- package/lib/commands/menu/subapp-assets-status.js +1 -0
- package/lib/commands/menu/subapp-assets-update.d.ts +2 -0
- package/lib/commands/menu/subapp-assets-update.js +1 -0
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +15 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.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/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +21 -12
- package/skills/rabetbase/guides/backend-function.md +2 -7
- package/skills/rabetbase/guides/bff-creation-workflow.md +24 -23
- package/skills/rabetbase/guides/host-frontend-integration.md +62 -0
- package/skills/rabetbase/guides/independent-deployment.md +45 -0
- package/skills/rabetbase/guides/troubleshooting.md +9 -1
- package/skills/rabetbase/references/rabetbase-app-detail.md +31 -0
- package/skills/rabetbase/references/rabetbase-bff-detail.md +1 -1
- package/skills/rabetbase/references/rabetbase-bff-push.md +2 -2
- package/skills/rabetbase/references/rabetbase-data-list-status.md +1 -0
- package/skills/rabetbase/references/rabetbase-deployment-sync-all.md +5 -1
- package/skills/rabetbase/references/rabetbase-menu-asset-update.md +9 -7
- package/skills/rabetbase/references/rabetbase-menu-list.md +2 -2
- package/skills/rabetbase/references/rabetbase-menu-subapp-assets-status.md +19 -0
- package/skills/rabetbase/references/rabetbase-menu-subapp-assets-update.md +27 -0
- package/skills/rabetbase/references/rabetbase-menu-sync.md +40 -14
- package/skills/rabetbase/references/rabetbase-page-create.md +1 -1
- package/skills/rabetbase/references/rabetbase-page-generate-start.md +5 -3
- package/skills/rabetbase/references/rabetbase-page-generate-status.md +1 -0
- package/skills/rabetbase.manifest.json +8 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2b9825,_0x23da5c){const _0x2e7983=a214_0x1d67,_0xe2a8b2=_0x2b9825();while(!![]){try{const _0x4b0872=-parseInt(_0x2e7983(0xdc))/0x1*(-parseInt(_0x2e7983(0xe1))/0x2)+parseInt(_0x2e7983(0xd9))/0x3+-parseInt(_0x2e7983(0xda))/0x4+parseInt(_0x2e7983(0xdb))/0x5*(parseInt(_0x2e7983(0xe7))/0x6)+-parseInt(_0x2e7983(0xd6))/0x7+parseInt(_0x2e7983(0xe8))/0x8+-parseInt(_0x2e7983(0xd7))/0x9*(parseInt(_0x2e7983(0xe4))/0xa);if(_0x4b0872===_0x23da5c)break;else _0xe2a8b2['push'](_0xe2a8b2['shift']());}catch(_0xd8492b){_0xe2a8b2['push'](_0xe2a8b2['shift']());}}}(a214_0x13bd,0xc7001));import a214_0x55fed5 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a214_0x13bd(){const _0x1b6ebe=['115oTLKCr','1jPttSk','format','npx','Code\x20format\x20completed','cwd','2015878fKIOHk','message','info','10uafKOX','prettier','Code\x20format\x20failed','105834XxHoYF','11971592WqqZfd','now','Starting\x20code\x20format','resolve','3148404odnruV','24747813sDLueQ','success','3711834rWbAIG','530916PsXppR'];a214_0x13bd=function(){return _0x1b6ebe;};return a214_0x13bd();}import{logger}from'../../../utils/logger.js';function a214_0x1d67(_0x37514f,_0x51df9c){_0x37514f=_0x37514f-0xd3;const _0x13bd0c=a214_0x13bd();let _0x1d679c=_0x13bd0c[_0x37514f];return _0x1d679c;}import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x5b9b1a){const _0x2acf13=a214_0x1d67,_0x4b9bcd=Date['now'](),_0x161591=a214_0x55fed5[_0x2acf13(0xd5)](process[_0x2acf13(0xe0)](),_0x5b9b1a);try{logger[_0x2acf13(0xe3)](_0x2acf13(0xdd),_0x2acf13(0xd4),{'projectCode':_0x5b9b1a}),await execa(resolveNpmBin(_0x2acf13(0xde)),[_0x2acf13(0xe5),'--write','.'],{'cwd':_0x161591});const _0x2392de=Date[_0x2acf13(0xd3)]()-_0x4b9bcd;logger[_0x2acf13(0xd8)](_0x2acf13(0xdd),_0x2acf13(0xdf),_0x2392de,{'projectCode':_0x5b9b1a});}catch(_0x569b61){const _0x3fcf20=Date['now']()-_0x4b9bcd;logger['error'](_0x2acf13(0xdd),_0x2acf13(0xe6),{'projectCode':_0x5b9b1a,'error':_0x569b61 instanceof Error?_0x569b61[_0x2acf13(0xe2)]:String(_0x569b61),'duration':_0x3fcf20});throw _0x569b61;}return formatElapsed(_0x4b9bcd);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x172060,_0x1a88a5){const _0x3de055=a215_0x5d53,_0x11e37b=_0x172060();while(!![]){try{const _0xcc00a9=-parseInt(_0x3de055(0x1f9))/0x1*(-parseInt(_0x3de055(0x1f8))/0x2)+parseInt(_0x3de055(0x1fd))/0x3*(-parseInt(_0x3de055(0x1f5))/0x4)+parseInt(_0x3de055(0x1e8))/0x5+parseInt(_0x3de055(0x1ff))/0x6*(parseInt(_0x3de055(0x1fc))/0x7)+parseInt(_0x3de055(0x1ef))/0x8+parseInt(_0x3de055(0x1f3))/0x9*(parseInt(_0x3de055(0x1f6))/0xa)+-parseInt(_0x3de055(0x1e9))/0xb*(parseInt(_0x3de055(0x1f0))/0xc);if(_0xcc00a9===_0x1a88a5)break;else _0x11e37b['push'](_0x11e37b['shift']());}catch(_0x132aa5){_0x11e37b['push'](_0x11e37b['shift']());}}}(a215_0x5529,0xa2819));import a215_0x2d826b from'node:path';function a215_0x5529(){const _0x220799=['npm','1945468hEjOxt','1658469OjuvmD','install','24EiWyCd','--registry','1436950JjqbeP','11XwqJTK','Dependency\x20install\x20completed','error','success','info','now','8741760HkBDcR','25550124WQjDhN','https://registry.npmmirror.com','cwd','3186nMuzHQ','resolve','4GaJmhz','7960CqhOVQ','message','154lyYEcz','7455BrPAZg','Starting\x20dependency\x20install'];a215_0x5529=function(){return _0x220799;};return a215_0x5529();}import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a215_0x5d53(_0x32cbc1,_0x274765){_0x32cbc1=_0x32cbc1-0x1e7;const _0x55293c=a215_0x5529();let _0x5d53a2=_0x55293c[_0x32cbc1];return _0x5d53a2;}import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x3f02a7){const _0x694a20=a215_0x5d53,_0x5142cf=Date[_0x694a20(0x1ee)](),_0x375d6c=a215_0x2d826b[_0x694a20(0x1f4)](process[_0x694a20(0x1f2)](),_0x3f02a7);try{logger[_0x694a20(0x1ed)](_0x694a20(0x1fe),_0x694a20(0x1fa),{'projectCode':_0x3f02a7,'registry':_0x694a20(0x1f1)}),await execa(resolveNpmBin(_0x694a20(0x1fb)),['install',_0x694a20(0x1e7),_0x694a20(0x1f1)],{'cwd':_0x375d6c});const _0x34fc6e=Date[_0x694a20(0x1ee)]()-_0x5142cf;logger[_0x694a20(0x1ec)](_0x694a20(0x1fe),_0x694a20(0x1ea),_0x34fc6e,{'projectCode':_0x3f02a7});}catch(_0x3b2c22){const _0x341e32=Date[_0x694a20(0x1ee)]()-_0x5142cf;logger[_0x694a20(0x1eb)](_0x694a20(0x1fe),'Dependency\x20install\x20failed',{'projectCode':_0x3f02a7,'error':_0x3b2c22 instanceof Error?_0x3b2c22[_0x694a20(0x1f7)]:String(_0x3b2c22),'duration':_0x341e32});throw _0x3b2c22;}return formatElapsed(_0x5142cf);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a216_0x378216=a216_0xdb00;(function(_0x27418b,_0x249f37){const _0x3d5ca3=a216_0xdb00,_0x1d56cc=_0x27418b();while(!![]){try{const _0x9973d8=parseInt(_0x3d5ca3(0xc2))/0x1+parseInt(_0x3d5ca3(0xcd))/0x2+parseInt(_0x3d5ca3(0xc7))/0x3+parseInt(_0x3d5ca3(0xc1))/0x4*(parseInt(_0x3d5ca3(0xd0))/0x5)+parseInt(_0x3d5ca3(0xca))/0x6*(-parseInt(_0x3d5ca3(0xcc))/0x7)+-parseInt(_0x3d5ca3(0xc0))/0x8*(parseInt(_0x3d5ca3(0xcb))/0x9)+-parseInt(_0x3d5ca3(0xce))/0xa;if(_0x9973d8===_0x249f37)break;else _0x1d56cc['push'](_0x1d56cc['shift']());}catch(_0x394b4a){_0x1d56cc['push'](_0x1d56cc['shift']());}}}(a216_0x40a0,0xb27fa));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{findProjectRootDirectory,resolveConfigPath}from'../../context/config-loader.js';import{writeProjectDomainRoutingManifest}from'../../config/project-domain-routing.js';function a216_0xdb00(_0x3a3a08,_0xdafcb3){_0x3a3a08=_0x3a3a08-0xc0;const _0x40a066=a216_0x40a0();let _0xdb00b4=_0x40a066[_0x3a3a08];return _0xdb00b4;}export const projectDomainRoutingSyncDefinition={'service':a216_0x378216(0xc8),'command':a216_0x378216(0xc5),'description':'Synchronize\x20the\x20current\x20project\x27s\x20public\x20Domain\x20routing','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(){const _0xc0468d=a216_0x378216,_0x5dd94a=findProjectRootDirectory();if(!resolveConfigPath(_0x5dd94a))throw CliErrors[_0xc0468d(0xc9)](_0xc0468d(0xcf),'Run\x20'+CLI_BIN_NAME+_0xc0468d(0xc4));const _0x5355d6=writeProjectDomainRoutingManifest(_0x5dd94a);return{'ok':!![],'message':_0xc0468d(0xc6)+_0x5355d6[_0xc0468d(0xc3)],'data':_0x5355d6};}};function a216_0x40a0(){const _0x51cf55=['524yPUCVx','572610ufHoFC','path','\x20workspace\x20init\x20--appcode\x20<code>\x20in\x20the\x20project\x20directory\x20first.','domain-routing-sync','Domain\x20routing\x20synchronized:\x20','3817437dbYPcF','project','validation','3330ohtytq','3950631JAzUoe','12271GwxOWX','738110AanrnR','13646340bmxmjs','No\x20Rabetbase\x20project\x20configuration\x20was\x20found.','49370rafeYD','8clorxf'];a216_0x40a0=function(){return _0x51cf55;};return a216_0x40a0();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a217_0x1a8932=a217_0x582c;(function(_0x12feae,_0x54c0ca){const _0x21192e=a217_0x582c,_0x40bea7=_0x12feae();while(!![]){try{const _0x171f94=-parseInt(_0x21192e(0x1c7))/0x1+parseInt(_0x21192e(0x1ec))/0x2*(-parseInt(_0x21192e(0x1d1))/0x3)+parseInt(_0x21192e(0x1f5))/0x4+-parseInt(_0x21192e(0x1d7))/0x5+parseInt(_0x21192e(0x1d4))/0x6+parseInt(_0x21192e(0x1f2))/0x7+-parseInt(_0x21192e(0x1cd))/0x8;if(_0x171f94===_0x54c0ca)break;else _0x40bea7['push'](_0x40bea7['shift']());}catch(_0x59fa6e){_0x40bea7['push'](_0x40bea7['shift']());}}}(a217_0x28d4,0x4a791));function a217_0x582c(_0x151d1d,_0xf37b62){_0x151d1d=_0x151d1d-0x1c7;const _0x28d42a=a217_0x28d4();let _0x582c54=_0x28d42a[_0x151d1d];return _0x582c54;}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a217_0x28d4(){const _0x592be4=['\x20project\x20create\x20--current-dir\x20[--appcode\x20<code>]\x20from\x20the\x20empty\x20target\x20directory.','../../commands/project/create/main.js','str','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','upgrade','Upgrade\x20cancelled.','PATCH','name','current-dir','Usage:\x20','cwd','env','completed','Skip\x20confirmation\x20prompt','Create\x20a\x20new\x20project','boolean','cookie','project-name','429274RJaphG','yes','Upgrade\x20project\x20dependencies\x20and\x20application\x20source\x20structure','Would\x20upgrade\x20project\x20dependencies\x20and\x20application\x20source\x20structure\x20without\x20overwriting\x20project-owned\x20entrypoints','write','validation','1863540xFyziG','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','string','482112GcmzTf','appcode','bool','Prepared\x20local\x20project\x20template\x20directory','98096ktHEkw','\x20project\x20create\x20--current-dir\x20[--appcode\x20<code>]','--current-dir\x20cannot\x20be\x20combined\x20with\x20a\x20project\x20name.','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]\x20or\x20','nonInteractive','create','1129704bNDQbV','cancelled','Initialize\x20the\x20current\x20empty\x20directory\x20instead\x20of\x20creating\x20a\x20child\x20directory','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','3MpgysZ','project','Project\x20upgrade\x20completed.','3144132tMYeWO','Target\x20environment','template-source','758915mBbCvW','args','trim'];a217_0x28d4=function(){return _0x592be4;};return a217_0x28d4();}import{analyseProjectUpgrade,upgradeApp}from'../../commands/project/upgrade.js';import{projectDomainRoutingSyncDefinition}from'../../commands/project/domain-routing-sync.js';const createFlags=[{'name':a217_0x1a8932(0x1e1),'type':a217_0x1a8932(0x1f4),'description':'Project\x20name'},{'name':a217_0x1a8932(0x1e5),'type':a217_0x1a8932(0x1f4),'description':a217_0x1a8932(0x1d5)},{'name':'appcode','type':a217_0x1a8932(0x1f4),'description':a217_0x1a8932(0x1f3)},{'name':'current-dir','type':a217_0x1a8932(0x1e9),'description':a217_0x1a8932(0x1cf),'default':![]},{'name':a217_0x1a8932(0x1d6),'type':a217_0x1a8932(0x1f4),'description':a217_0x1a8932(0x1f8)}],upgradeFlags=[{'name':a217_0x1a8932(0x1ed),'type':a217_0x1a8932(0x1e9),'description':a217_0x1a8932(0x1e7),'default':![]}];export const projectDefinitions=[{'service':a217_0x1a8932(0x1d2),'command':a217_0x1a8932(0x1cc),'description':a217_0x1a8932(0x1e8),'risk':a217_0x1a8932(0x1f0),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a217_0x1a8932(0x1eb),'description':a217_0x1a8932(0x1d0),'required':![]}],'flags':createFlags,async 'execute'(_0x3a8686){const _0x30a5d9=a217_0x1a8932,{createApp:_0x4fba3c}=await import(_0x30a5d9(0x1db)),_0x127774=_0x3a8686[_0x30a5d9(0x1dc)](_0x30a5d9(0x1e1))[_0x30a5d9(0x1d9)]()||_0x3a8686[_0x30a5d9(0x1d8)][0x0]?.[_0x30a5d9(0x1d9)](),_0x4bf416=_0x3a8686[_0x30a5d9(0x1dc)](_0x30a5d9(0x1e5))||undefined,_0x1a0ce6=_0x3a8686[_0x30a5d9(0x1dc)](_0x30a5d9(0x1f6))||undefined,_0x14b4ea=_0x3a8686[_0x30a5d9(0x1dc)]('template-source')['trim']()||undefined,_0x18f574=_0x3a8686[_0x30a5d9(0x1f7)](_0x30a5d9(0x1e2));if(_0x18f574&&_0x127774)throw CliErrors[_0x30a5d9(0x1f1)](_0x30a5d9(0x1c9),'Run\x20'+CLI_BIN_NAME+_0x30a5d9(0x1da));if(_0x3a8686['nonInteractive']){if(!_0x127774&&!_0x18f574)throw CliErrors[_0x30a5d9(0x1f1)](_0x30a5d9(0x1dd),_0x30a5d9(0x1e3)+CLI_BIN_NAME+_0x30a5d9(0x1ca)+CLI_BIN_NAME+_0x30a5d9(0x1c8));await _0x4fba3c({'projectCode':_0x127774,'appCode':_0x1a0ce6,'env':_0x4bf416,'cookie':_0x3a8686[_0x30a5d9(0x1ea)],'currentDir':_0x18f574,'nonInteractive':!![],'templateSource':_0x14b4ea});}else await _0x4fba3c({'projectCode':_0x127774,'appCode':_0x1a0ce6,'env':_0x4bf416,'cookie':_0x3a8686['cookie'],'currentDir':_0x18f574,'templateSource':_0x14b4ea});return{'ok':!![]};}},projectDomainRoutingSyncDefinition,{'service':a217_0x1a8932(0x1d2),'command':a217_0x1a8932(0x1de),'description':a217_0x1a8932(0x1ee),'risk':a217_0x1a8932(0x1f0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'dryRun'(){const _0x2cc83e=a217_0x1a8932,_0x5c2ee3=analyseProjectUpgrade(process[_0x2cc83e(0x1e4)]());return{'method':_0x2cc83e(0x1e0),'url':process['cwd'](),'body':_0x5c2ee3,'description':_0x2cc83e(0x1ef)};},async 'execute'(_0x1463b2){const _0x24252d=a217_0x1a8932,_0x54f2a5=await upgradeApp(_0x1463b2[_0x24252d(0x1cb)],{'yes':_0x1463b2[_0x24252d(0x1f7)](_0x24252d(0x1ed))});return{'ok':_0x54f2a5[_0x24252d(0x1e6)]||_0x54f2a5[_0x24252d(0x1ce)]===!![],'message':_0x54f2a5[_0x24252d(0x1ce)]?_0x24252d(0x1df):_0x54f2a5[_0x24252d(0x1e6)]?_0x24252d(0x1d3):'Project\x20upgrade\x20completed\x20with\x20follow-up\x20work.','data':_0x54f2a5};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x549cd4,_0x155782){const _0x40a808=a213_0x3f47,_0x3a7d56=_0x549cd4();while(!![]){try{const _0x1e850d=parseInt(_0x40a808(0x1f5))/0x1+parseInt(_0x40a808(0x1e4))/0x2+-parseInt(_0x40a808(0x20d))/0x3*(-parseInt(_0x40a808(0x1e2))/0x4)+parseInt(_0x40a808(0x1ff))/0x5+parseInt(_0x40a808(0x1d8))/0x6*(-parseInt(_0x40a808(0x1fe))/0x7)+-parseInt(_0x40a808(0x1ea))/0x8*(-parseInt(_0x40a808(0x1d9))/0x9)+-parseInt(_0x40a808(0x200))/0xa;if(_0x1e850d===_0x155782)break;else _0x3a7d56['push'](_0x3a7d56['shift']());}catch(_0x14f1d1){_0x3a7d56['push'](_0x3a7d56['shift']());}}}(a213_0x11bc,0xea397));import a213_0x49de56 from'chalk';import a213_0x50be76 from'ora';function a213_0x3f47(_0x22db37,_0x1fc900){_0x22db37=_0x22db37-0x1ce;const _0x11bcfe=a213_0x11bc();let _0x3f4718=_0x11bcfe[_0x22db37];return _0x3f4718;}import{existsSync,readFileSync,writeFileSync}from'node:fs';function a213_0x11bc(){const _0x4c03bf=['\x20→\x20latest','@lovrabet/sdk:','cyan','apiArchitecture','devDependencies','Upgrade\x20application\x20source','CANCEL','@lovrabet/sdk','487041CAiJfq','parse','length','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','detail','source\x20structure\x20is\x20current','green','Step\x202/2:\x20Application\x20source\x20—\x20','\x20\x20npm\x20install','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','upgrade\x20needed','sdkUpgrade','candidatePath','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','not\x20found\x20or\x20already\x20at\x20latest','\x20\x20\x20\x20','log','===\x20Upgrade\x20Analysis\x20===','\x20\x20#\x20or','bold','message','stringify','done','path','Proceed\x20with\x20upgrade?','profiles','6SMjjRc','7704lMQajF','Upgrade\x20@lovrabet/sdk','groups','[\x22@lovrabet/sdk\x22]:\x20','\x20\x20bun\x20install','fail','Upgrade\x20candidates\x20were\x20written,\x20but\x20project-owned\x20source\x20files\x20still\x20require\x20manual\x20merging.','\x20\x20\x20\x20\x20\x20\x20','Upgrade\x20cancelled.','36Wswpjx','needed','2386802SJIGnk','red','up-to-date','label','cwd','Your\x20project\x20is\x20already\x20up-to-date.','5800OsmTKK','string','gray','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','utf8','FAIL','\x20→\x20','white','object','latest','step','1156824UVxyAf','===\x20Upgrade\x20Summary\x20===','candidate\x20entrypoints\x20written;\x20manual\x20merge\x20required','\x20\x20\x20\x20\x20\x20candidate:\x20','package.json','Step\x201/2:\x20@lovrabet/sdk\x20—\x20','skippedLegacyDirectories','failed','start','427441EjPjsV','3194690YnACyc','40504400uZCJOx','manualMergeRequired','push','yellow','\x20\x20Step\x20'];a213_0x11bc=function(){return _0x4c03bf;};return a213_0x11bc();}import{resolve}from'node:path';import{askConfirm}from'../../commands/menu/shared/inquirer.js';import{analyzeProjectApiArchitecture,upgradeProjectApiArchitecture}from'../../commands/project/api-architecture-upgrade.js';import{NEW_CONFIG_NAME}from'../../context.js';function readProjectConfig(_0x27861f){const _0x520cca=a213_0x3f47;try{const _0x290e5f=JSON[_0x520cca(0x20e)](readFileSync(_0x27861f,_0x520cca(0x1ee)));return _0x290e5f&&typeof _0x290e5f===_0x520cca(0x1f2)?_0x290e5f:{};}catch{return{};}}export function analyseProjectUpgrade(_0x44edc9){const _0x3a2d63=a213_0x3f47;let _0x5b1c82=null;const _0x1ae884=resolve(_0x44edc9,_0x3a2d63(0x1f9));if(existsSync(_0x1ae884))try{const _0x134005=JSON[_0x3a2d63(0x20e)](readFileSync(_0x1ae884,_0x3a2d63(0x1ee)));for(const _0xc3621c of['dependencies',_0x3a2d63(0x209)]){const _0x1c3d91=_0x134005?.[_0xc3621c]?.[_0x3a2d63(0x20c)];if(typeof _0x1c3d91===_0x3a2d63(0x1eb)){_0x1c3d91!==_0x3a2d63(0x1f3)&&(_0x5b1c82={'pkgPath':_0x1ae884,'currentVersion':_0x1c3d91,'field':_0xc3621c});break;}}}catch{}const _0x43e945=resolve(_0x44edc9,NEW_CONFIG_NAME),_0xed27e0=existsSync(_0x43e945)?readProjectConfig(_0x43e945):{},_0x18e005=analyzeProjectApiArchitecture(_0x44edc9,_0xed27e0);return{'sdkUpgrade':_0x5b1c82,'apiArchitecture':_0x18e005};}function printReport(_0x37c904){const _0x4588e1=a213_0x3f47;console[_0x4588e1(0x1ce)](''),console[_0x4588e1(0x1ce)](a213_0x49de56[_0x4588e1(0x1d1)](_0x4588e1(0x1cf))),console[_0x4588e1(0x1ce)](''),console[_0x4588e1(0x1ce)](a213_0x49de56[_0x4588e1(0x207)]('Application\x20source:')+('\x20\x20'+(_0x37c904[_0x4588e1(0x208)][_0x4588e1(0x1e3)]?a213_0x49de56[_0x4588e1(0x203)](_0x4588e1(0x217)):a213_0x49de56[_0x4588e1(0x213)](_0x4588e1(0x1e6)))));for(const _0x56e3e3 of _0x37c904['apiArchitecture'][_0x4588e1(0x1db)]){console[_0x4588e1(0x1ce)]('\x20\x20'+_0x56e3e3['apiDir']+'\x20('+_0x56e3e3[_0x4588e1(0x1d7)]['join'](',\x20')+')');for(const _0x2694d9 of _0x56e3e3['files']){console['log'](_0x4588e1(0x21c)+_0x2694d9['action']['padEnd'](0x11)+'\x20'+_0x2694d9[_0x4588e1(0x1d5)]),_0x2694d9[_0x4588e1(0x219)]&&console[_0x4588e1(0x1ce)](_0x4588e1(0x1f8)+_0x2694d9['candidatePath']);}}_0x37c904[_0x4588e1(0x208)][_0x4588e1(0x1fb)][_0x4588e1(0x20f)]>0x0&&console[_0x4588e1(0x1ce)]('\x20\x20Historical\x20ungrouped\x20multi-app\x20directories\x20keep\x20their\x20prefixed\x20API\x20files.');console[_0x4588e1(0x1ce)]('');if(_0x37c904[_0x4588e1(0x218)]){const {currentVersion:_0x56613b,field:_0x33406a,pkgPath:_0x59e7a3}=_0x37c904[_0x4588e1(0x218)];console['log'](a213_0x49de56[_0x4588e1(0x207)](_0x4588e1(0x206))+('\x20\x20'+a213_0x49de56[_0x4588e1(0x203)](_0x59e7a3))),console[_0x4588e1(0x1ce)]('\x20\x20Current\x20version\x20in\x20'+_0x33406a+':\x20'+a213_0x49de56[_0x4588e1(0x203)](_0x56613b)+_0x4588e1(0x1f0)+a213_0x49de56[_0x4588e1(0x213)]('latest')),console[_0x4588e1(0x1ce)]('\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)');}else console[_0x4588e1(0x1ce)](a213_0x49de56[_0x4588e1(0x207)](_0x4588e1(0x206))+'\x20\x20'+a213_0x49de56[_0x4588e1(0x1ec)](_0x4588e1(0x21b)));console[_0x4588e1(0x1ce)]('');}function execUpgradeSdk(_0x313e11){const _0x313f73=a213_0x3f47;if(!_0x313e11[_0x313f73(0x218)])return{'step':0x1,'label':_0x313f73(0x1da),'ok':!![],'detail':_0x313f73(0x210)};const {pkgPath:_0x321059,currentVersion:_0x1efb1c,field:_0x40fac4}=_0x313e11[_0x313f73(0x218)];try{const _0x1f577f=readFileSync(_0x321059,_0x313f73(0x1ee)),_0x2008ab=JSON[_0x313f73(0x20e)](_0x1f577f);return _0x2008ab[_0x40fac4][_0x313f73(0x20c)]=_0x313f73(0x1f3),writeFileSync(_0x321059,JSON[_0x313f73(0x1d3)](_0x2008ab,null,0x2)+'\x0a','utf8'),{'step':0x1,'label':_0x313f73(0x1da),'ok':!![],'detail':_0x40fac4+_0x313f73(0x1dc)+_0x1efb1c+_0x313f73(0x205)};}catch(_0x87530f){return{'step':0x1,'label':'Upgrade\x20@lovrabet/sdk','ok':![],'detail':_0x87530f instanceof Error?_0x87530f[_0x313f73(0x1d2)]:String(_0x87530f)};}}function printSummary(_0x1a123e){const _0x5afd33=a213_0x3f47;console[_0x5afd33(0x1ce)](''),console['log'](a213_0x49de56[_0x5afd33(0x1d1)](_0x5afd33(0x1f6))),console[_0x5afd33(0x1ce)]('');for(const _0x2a59ac of _0x1a123e){const _0x361cee=_0x2a59ac['ok']?a213_0x49de56[_0x5afd33(0x213)]('OK'):a213_0x49de56[_0x5afd33(0x1e5)](_0x5afd33(0x1ef));console['log']('\x20\x20'+_0x361cee+_0x5afd33(0x204)+_0x2a59ac[_0x5afd33(0x1f4)]+':\x20'+_0x2a59ac[_0x5afd33(0x1e7)]);if(_0x2a59ac[_0x5afd33(0x211)])console['log'](_0x5afd33(0x1e0)+a213_0x49de56['gray'](_0x2a59ac['detail']));}console[_0x5afd33(0x1ce)]('');}export async function upgradeApp(_0x105009,_0x72d3b2){const _0x3af8d1=a213_0x3f47,_0x5459f3=process[_0x3af8d1(0x1e8)](),_0x6d8634=analyseProjectUpgrade(_0x5459f3);if(!_0x6d8634['sdkUpgrade']&&!_0x6d8634[_0x3af8d1(0x208)][_0x3af8d1(0x1e3)])return console['log'](a213_0x49de56[_0x3af8d1(0x213)](_0x3af8d1(0x1e9))),{'analysis':_0x6d8634,'steps':[],'completed':!![]};printReport(_0x6d8634);const _0x7d1022=!!(_0x72d3b2['yes']||_0x72d3b2['Y']||_0x105009);if(!_0x7d1022)try{const _0x1eb855=await askConfirm(_0x3af8d1(0x1d6));if(!_0x1eb855)return console[_0x3af8d1(0x1ce)](a213_0x49de56[_0x3af8d1(0x1ec)](_0x3af8d1(0x1e1))),{'analysis':_0x6d8634,'steps':[],'completed':![],'cancelled':!![]};}catch(_0x54fb04){if(_0x54fb04?.['message']===_0x3af8d1(0x20b))return console[_0x3af8d1(0x1ce)](a213_0x49de56['gray'](_0x3af8d1(0x1e1))),{'analysis':_0x6d8634,'steps':[],'completed':![],'cancelled':!![]};throw _0x54fb04;}const _0x5bf143=[],_0x4bdf58=a213_0x50be76({'text':'Step\x201/2:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','color':_0x3af8d1(0x207)})[_0x3af8d1(0x1fd)](),_0x532ad9=execUpgradeSdk(_0x6d8634);_0x5bf143[_0x3af8d1(0x202)](_0x532ad9),_0x4bdf58[_0x532ad9['ok']?'succeed':_0x3af8d1(0x1de)](_0x3af8d1(0x1fa)+(_0x532ad9[_0x3af8d1(0x211)]??(_0x532ad9['ok']?_0x3af8d1(0x1d4):_0x3af8d1(0x1fc))));const _0x38e4cc=a213_0x50be76({'text':'Step\x202/2:\x20Upgrading\x20application\x20source\x20structure...','color':_0x3af8d1(0x207)})[_0x3af8d1(0x1fd)]();let _0x3a0ffa;try{_0x3a0ffa=await upgradeProjectApiArchitecture(_0x5459f3);const _0x2cbd66=_0x3a0ffa[_0x3af8d1(0x201)]?_0x3af8d1(0x1f7):_0x3af8d1(0x212);_0x38e4cc['succeed'](_0x3af8d1(0x214)+_0x2cbd66),_0x5bf143[_0x3af8d1(0x202)]({'step':0x2,'label':_0x3af8d1(0x20a),'ok':!![],'detail':_0x2cbd66});}catch(_0x41b672){const _0x20439a=_0x41b672 instanceof Error?_0x41b672[_0x3af8d1(0x1d2)]:String(_0x41b672);_0x38e4cc[_0x3af8d1(0x1de)](_0x3af8d1(0x214)+_0x20439a),_0x5bf143[_0x3af8d1(0x202)]({'step':0x2,'label':_0x3af8d1(0x20a),'ok':![],'detail':_0x20439a});}printSummary(_0x5bf143);const _0x599b2a=_0x5bf143['some'](_0x381b2d=>!_0x381b2d['ok']);if(_0x599b2a)console[_0x3af8d1(0x1ce)](a213_0x49de56[_0x3af8d1(0x203)](_0x3af8d1(0x216)));else _0x3a0ffa?.[_0x3af8d1(0x201)]?console[_0x3af8d1(0x1ce)](a213_0x49de56['yellow'](_0x3af8d1(0x1df))):console[_0x3af8d1(0x1ce)](a213_0x49de56['green']('Upgrade\x20completed\x20successfully!'));return _0x532ad9['ok']&&_0x6d8634['sdkUpgrade']&&(console[_0x3af8d1(0x1ce)](''),console[_0x3af8d1(0x1ce)](a213_0x49de56['bold'][_0x3af8d1(0x207)](_0x3af8d1(0x21a))),console['log'](a213_0x49de56['cyan'](_0x3af8d1(0x1ed))),console[_0x3af8d1(0x1ce)](''),console[_0x3af8d1(0x1ce)](a213_0x49de56['white'](_0x3af8d1(0x215))),console[_0x3af8d1(0x1ce)](a213_0x49de56[_0x3af8d1(0x1f1)](_0x3af8d1(0x1d0))),console['log'](a213_0x49de56['white'](_0x3af8d1(0x1dd))),console['log']('')),{'analysis':_0x6d8634,'steps':_0x5bf143,'apiArchitecture':_0x3a0ffa,'completed':!_0x599b2a&&!_0x3a0ffa?.[_0x3af8d1(0x201)]};}
|
|
1
|
+
(function(_0x346c56,_0x7612e5){const _0x1d83c5=a218_0x3f4b,_0x500ea5=_0x346c56();while(!![]){try{const _0x456512=-parseInt(_0x1d83c5(0x1e4))/0x1*(parseInt(_0x1d83c5(0x1d4))/0x2)+parseInt(_0x1d83c5(0x1f1))/0x3+-parseInt(_0x1d83c5(0x1c4))/0x4+parseInt(_0x1d83c5(0x1e2))/0x5+parseInt(_0x1d83c5(0x1e5))/0x6+-parseInt(_0x1d83c5(0x1f0))/0x7+parseInt(_0x1d83c5(0x1e9))/0x8;if(_0x456512===_0x7612e5)break;else _0x500ea5['push'](_0x500ea5['shift']());}catch(_0x1eb592){_0x500ea5['push'](_0x500ea5['shift']());}}}(a218_0x5bc9,0x29bce));import a218_0x2937ef from'chalk';import a218_0x448a82 from'ora';function a218_0x5bc9(){const _0x8ab71f=['candidatePath','1493768HcNGLz','done','\x20\x20npm\x20install','utf8','padEnd','sdkUpgrade','needed','723583Vglkrd','772530VgKGqi','cyan','Step\x202/2:\x20Application\x20source\x20—\x20','some','message','\x20\x20Step\x20','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','Step\x201/2:\x20@lovrabet/sdk\x20—\x20','action','Step\x202/2:\x20Upgrading\x20application\x20source\x20structure...','stringify','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','Upgrade\x20application\x20source','start','gray','push','log','@lovrabet/sdk:','Upgrade\x20candidates\x20were\x20written,\x20but\x20project-owned\x20source\x20files\x20still\x20require\x20manual\x20merging.','CANCEL','apiArchitecture','\x20\x20Historical\x20ungrouped\x20multi-app\x20directories\x20keep\x20their\x20prefixed\x20API\x20files.','FAIL','white','red','1114216OalSPO','groups','Application\x20source:','up-to-date','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','bold','Upgrade\x20cancelled.','object','Your\x20project\x20is\x20already\x20up-to-date.','devDependencies','Step\x201/2:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','label','succeed','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','length','===\x20Upgrade\x20Analysis\x20===','50HFZDnI','join','Upgrade\x20completed\x20successfully!','step','@lovrabet/sdk','manualMergeRequired','failed','upgrade\x20needed','Upgrade\x20@lovrabet/sdk','fail','yellow','parse','green','package.json','217380aCYGqD','detail','1021wXWBPx','544194GrTpwx','string','latest'];a218_0x5bc9=function(){return _0x8ab71f;};return a218_0x5bc9();}import{existsSync,readFileSync,writeFileSync}from'node:fs';import{resolve}from'node:path';import{askConfirm}from'../../commands/menu/shared/inquirer.js';import{analyzeProjectApiArchitecture,upgradeProjectApiArchitecture}from'../../commands/project/api-architecture-upgrade.js';import{NEW_CONFIG_NAME}from'../../context.js';function readProjectConfig(_0x3ef0f2){const _0x518998=a218_0x3f4b;try{const _0x192c44=JSON[_0x518998(0x1df)](readFileSync(_0x3ef0f2,_0x518998(0x1ec)));return _0x192c44&&typeof _0x192c44===_0x518998(0x1cb)?_0x192c44:{};}catch{return{};}}function a218_0x3f4b(_0x5ea2bd,_0x438fb9){_0x5ea2bd=_0x5ea2bd-0x1b3;const _0x5bc9f6=a218_0x5bc9();let _0x3f4bf0=_0x5bc9f6[_0x5ea2bd];return _0x3f4bf0;}export function analyseProjectUpgrade(_0x34b25b){const _0x1b4272=a218_0x3f4b;let _0x3567ee=null;const _0x4d8664=resolve(_0x34b25b,_0x1b4272(0x1e1));if(existsSync(_0x4d8664))try{const _0x25135e=JSON['parse'](readFileSync(_0x4d8664,_0x1b4272(0x1ec)));for(const _0x18de93 of['dependencies',_0x1b4272(0x1cd)]){const _0x1a5e9f=_0x25135e?.[_0x18de93]?.[_0x1b4272(0x1d8)];if(typeof _0x1a5e9f===_0x1b4272(0x1e6)){_0x1a5e9f!==_0x1b4272(0x1e7)&&(_0x3567ee={'pkgPath':_0x4d8664,'currentVersion':_0x1a5e9f,'field':_0x18de93});break;}}}catch{}const _0x369647=resolve(_0x34b25b,NEW_CONFIG_NAME),_0x45a736=existsSync(_0x369647)?readProjectConfig(_0x369647):{},_0x2c0060=analyzeProjectApiArchitecture(_0x34b25b,_0x45a736);return{'sdkUpgrade':_0x3567ee,'apiArchitecture':_0x2c0060};}function printReport(_0x5f077e){const _0xed5fbd=a218_0x3f4b;console[_0xed5fbd(0x1bb)](''),console[_0xed5fbd(0x1bb)](a218_0x2937ef[_0xed5fbd(0x1c9)](_0xed5fbd(0x1d3))),console[_0xed5fbd(0x1bb)](''),console[_0xed5fbd(0x1bb)](a218_0x2937ef[_0xed5fbd(0x1f2)](_0xed5fbd(0x1c6))+('\x20\x20'+(_0x5f077e[_0xed5fbd(0x1bf)][_0xed5fbd(0x1ef)]?a218_0x2937ef[_0xed5fbd(0x1de)](_0xed5fbd(0x1db)):a218_0x2937ef[_0xed5fbd(0x1e0)](_0xed5fbd(0x1c7)))));for(const _0x371918 of _0x5f077e[_0xed5fbd(0x1bf)][_0xed5fbd(0x1c5)]){console[_0xed5fbd(0x1bb)]('\x20\x20'+_0x371918['apiDir']+'\x20('+_0x371918['profiles'][_0xed5fbd(0x1d5)](',\x20')+')');for(const _0x4590b8 of _0x371918['files']){console[_0xed5fbd(0x1bb)]('\x20\x20\x20\x20'+_0x4590b8[_0xed5fbd(0x1b3)][_0xed5fbd(0x1ed)](0x11)+'\x20'+_0x4590b8['path']),_0x4590b8[_0xed5fbd(0x1e8)]&&console['log']('\x20\x20\x20\x20\x20\x20candidate:\x20'+_0x4590b8[_0xed5fbd(0x1e8)]);}}_0x5f077e[_0xed5fbd(0x1bf)]['skippedLegacyDirectories'][_0xed5fbd(0x1d2)]>0x0&&console[_0xed5fbd(0x1bb)](_0xed5fbd(0x1c0));console[_0xed5fbd(0x1bb)]('');if(_0x5f077e[_0xed5fbd(0x1ee)]){const {currentVersion:_0x595ada,field:_0x31ee5d,pkgPath:_0x225c53}=_0x5f077e[_0xed5fbd(0x1ee)];console['log'](a218_0x2937ef[_0xed5fbd(0x1f2)](_0xed5fbd(0x1bc))+('\x20\x20'+a218_0x2937ef['yellow'](_0x225c53))),console[_0xed5fbd(0x1bb)]('\x20\x20Current\x20version\x20in\x20'+_0x31ee5d+':\x20'+a218_0x2937ef[_0xed5fbd(0x1de)](_0x595ada)+'\x20→\x20'+a218_0x2937ef['green'](_0xed5fbd(0x1e7))),console[_0xed5fbd(0x1bb)](_0xed5fbd(0x1f7));}else console[_0xed5fbd(0x1bb)](a218_0x2937ef[_0xed5fbd(0x1f2)](_0xed5fbd(0x1bc))+'\x20\x20'+a218_0x2937ef[_0xed5fbd(0x1b9)]('not\x20found\x20or\x20already\x20at\x20latest'));console[_0xed5fbd(0x1bb)]('');}function execUpgradeSdk(_0x29207d){const _0x410168=a218_0x3f4b;if(!_0x29207d['sdkUpgrade'])return{'step':0x1,'label':_0x410168(0x1dc),'ok':!![],'detail':_0x410168(0x1d1)};const {pkgPath:_0x7bbfe1,currentVersion:_0x3aef4d,field:_0x4a0f60}=_0x29207d['sdkUpgrade'];try{const _0x4700c3=readFileSync(_0x7bbfe1,_0x410168(0x1ec)),_0x456951=JSON[_0x410168(0x1df)](_0x4700c3);return _0x456951[_0x4a0f60][_0x410168(0x1d8)]=_0x410168(0x1e7),writeFileSync(_0x7bbfe1,JSON[_0x410168(0x1b5)](_0x456951,null,0x2)+'\x0a',_0x410168(0x1ec)),{'step':0x1,'label':_0x410168(0x1dc),'ok':!![],'detail':_0x4a0f60+'[\x22@lovrabet/sdk\x22]:\x20'+_0x3aef4d+'\x20→\x20latest'};}catch(_0x5d0006){return{'step':0x1,'label':_0x410168(0x1dc),'ok':![],'detail':_0x5d0006 instanceof Error?_0x5d0006['message']:String(_0x5d0006)};}}function printSummary(_0xdb4854){const _0x511532=a218_0x3f4b;console[_0x511532(0x1bb)](''),console[_0x511532(0x1bb)](a218_0x2937ef['bold']('===\x20Upgrade\x20Summary\x20===')),console[_0x511532(0x1bb)]('');for(const _0x3fdbcc of _0xdb4854){const _0x2f75fa=_0x3fdbcc['ok']?a218_0x2937ef[_0x511532(0x1e0)]('OK'):a218_0x2937ef[_0x511532(0x1c3)](_0x511532(0x1c1));console[_0x511532(0x1bb)]('\x20\x20'+_0x2f75fa+_0x511532(0x1f6)+_0x3fdbcc[_0x511532(0x1d7)]+':\x20'+_0x3fdbcc[_0x511532(0x1cf)]);if(_0x3fdbcc[_0x511532(0x1e3)])console[_0x511532(0x1bb)]('\x20\x20\x20\x20\x20\x20\x20'+a218_0x2937ef[_0x511532(0x1b9)](_0x3fdbcc[_0x511532(0x1e3)]));}console['log']('');}export async function upgradeApp(_0x59e126,_0x394125){const _0x2fda52=a218_0x3f4b,_0x4ae44e=process['cwd'](),_0x36dc19=analyseProjectUpgrade(_0x4ae44e);if(!_0x36dc19[_0x2fda52(0x1ee)]&&!_0x36dc19['apiArchitecture'][_0x2fda52(0x1ef)])return console['log'](a218_0x2937ef['green'](_0x2fda52(0x1cc))),{'analysis':_0x36dc19,'steps':[],'completed':!![]};printReport(_0x36dc19);const _0x129ed0=!!(_0x394125['yes']||_0x394125['Y']||_0x59e126);if(!_0x129ed0)try{const _0x1acfee=await askConfirm('Proceed\x20with\x20upgrade?');if(!_0x1acfee)return console['log'](a218_0x2937ef['gray'](_0x2fda52(0x1ca))),{'analysis':_0x36dc19,'steps':[],'completed':![],'cancelled':!![]};}catch(_0x50432c){if(_0x50432c?.[_0x2fda52(0x1f5)]===_0x2fda52(0x1be))return console['log'](a218_0x2937ef[_0x2fda52(0x1b9)](_0x2fda52(0x1ca))),{'analysis':_0x36dc19,'steps':[],'completed':![],'cancelled':!![]};throw _0x50432c;}const _0x2e5e4a=[],_0x384203=a218_0x448a82({'text':_0x2fda52(0x1ce),'color':'cyan'})[_0x2fda52(0x1b8)](),_0x51e6dc=execUpgradeSdk(_0x36dc19);_0x2e5e4a[_0x2fda52(0x1ba)](_0x51e6dc),_0x384203[_0x51e6dc['ok']?_0x2fda52(0x1d0):_0x2fda52(0x1dd)](_0x2fda52(0x1f8)+(_0x51e6dc[_0x2fda52(0x1e3)]??(_0x51e6dc['ok']?_0x2fda52(0x1ea):_0x2fda52(0x1da))));const _0x1f348f=a218_0x448a82({'text':_0x2fda52(0x1b4),'color':_0x2fda52(0x1f2)})[_0x2fda52(0x1b8)]();let _0x47b42e;try{_0x47b42e=await upgradeProjectApiArchitecture(_0x4ae44e);const _0x4a6d3c=_0x47b42e[_0x2fda52(0x1d9)]?'candidate\x20entrypoints\x20written;\x20manual\x20merge\x20required':'source\x20structure\x20is\x20current';_0x1f348f[_0x2fda52(0x1d0)](_0x2fda52(0x1f3)+_0x4a6d3c),_0x2e5e4a[_0x2fda52(0x1ba)]({'step':0x2,'label':_0x2fda52(0x1b7),'ok':!![],'detail':_0x4a6d3c});}catch(_0x2eeaa6){const _0x44c1b6=_0x2eeaa6 instanceof Error?_0x2eeaa6['message']:String(_0x2eeaa6);_0x1f348f[_0x2fda52(0x1dd)]('Step\x202/2:\x20Application\x20source\x20—\x20'+_0x44c1b6),_0x2e5e4a[_0x2fda52(0x1ba)]({'step':0x2,'label':'Upgrade\x20application\x20source','ok':![],'detail':_0x44c1b6});}printSummary(_0x2e5e4a);const _0xe351d4=_0x2e5e4a[_0x2fda52(0x1f4)](_0x307f2d=>!_0x307f2d['ok']);if(_0xe351d4)console[_0x2fda52(0x1bb)](a218_0x2937ef[_0x2fda52(0x1de)](_0x2fda52(0x1c8)));else _0x47b42e?.[_0x2fda52(0x1d9)]?console[_0x2fda52(0x1bb)](a218_0x2937ef[_0x2fda52(0x1de)](_0x2fda52(0x1bd))):console[_0x2fda52(0x1bb)](a218_0x2937ef['green'](_0x2fda52(0x1d6)));return _0x51e6dc['ok']&&_0x36dc19[_0x2fda52(0x1ee)]&&(console[_0x2fda52(0x1bb)](''),console[_0x2fda52(0x1bb)](a218_0x2937ef[_0x2fda52(0x1c9)][_0x2fda52(0x1f2)](_0x2fda52(0x1b6))),console['log'](a218_0x2937ef['cyan']('Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:')),console[_0x2fda52(0x1bb)](''),console[_0x2fda52(0x1bb)](a218_0x2937ef['white'](_0x2fda52(0x1eb))),console[_0x2fda52(0x1bb)](a218_0x2937ef[_0x2fda52(0x1c2)]('\x20\x20#\x20or')),console['log'](a218_0x2937ef[_0x2fda52(0x1c2)]('\x20\x20bun\x20install')),console[_0x2fda52(0x1bb)]('')),{'analysis':_0x36dc19,'steps':_0x2e5e4a,'apiArchitecture':_0x47b42e,'completed':!_0xe351d4&&!_0x47b42e?.[_0x2fda52(0x1d9)]};}
|
package/lib/commands/registry.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a214_0x173b09=a214_0x29ee;(function(_0x8389bc,_0x199505){const _0x338684=a214_0x29ee,_0x3932a1=_0x8389bc();while(!![]){try{const _0x205625=-parseInt(_0x338684(0x215))/0x1*(parseInt(_0x338684(0x227))/0x2)+parseInt(_0x338684(0x20c))/0x3*(-parseInt(_0x338684(0x211))/0x4)+-parseInt(_0x338684(0x212))/0x5+-parseInt(_0x338684(0x229))/0x6+parseInt(_0x338684(0x1ed))/0x7+-parseInt(_0x338684(0x241))/0x8+parseInt(_0x338684(0x20f))/0x9*(parseInt(_0x338684(0x242))/0xa);if(_0x205625===_0x199505)break;else _0x3932a1['push'](_0x3932a1['shift']());}catch(_0x2198a1){_0x3932a1['push'](_0x3932a1['shift']());}}}(a214_0x4712,0x4fa00));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{flowDefinitions}from'../commands/flow/index.js';function a214_0x4712(){const _0x5a0889=['8aZgPbs','825330kmmduN','rabetbase\x20workspace\x20init\x20--appcode\x20<code>','sql:new','1wMOiJW','risk','rabetbase\x20page\x20custom-publish','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27','knowledge-base:detail','rabetbase\x20sql\x20create','rabetbase\x20page\x20custom-detail','\x20\x20[high-risk-write]','hidden','push','bff:new','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK','Tenant\x20Members','User\x20Accounts','rabetbase\x20workspace\x20use\x20--app\x20<name>','install','start','127010ssXkKB','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','3306534zlWwjq','Schema','Data\x20List\x20Pages\x20&\x20Custom\x20Pages','from','commands','page:react-list','values','rabetbase\x20kb\x20update','rabetbase\x20page\x20custom-update','File','preview','Dataset\x20&\x20Operations','rabetbase\x20kb\x20delete','rabetbase\x20project\x20create\x20<project-name>','flow:enable','rabetbase\x20run\x20build','write','Resource\x20saves\x20are\x20synchronized\x20automatically\x20by\x20the\x20server;\x20no\x20manual\x20CLI\x20replacement\x20is\x20required.','flow:disable','permit:role-apis-set','rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml','Self\x20Update','Notification\x20Configuration','permit:role-menus','3897248nfDAAt','10BZxZmA','Authentication','Project','Deployment','filter','This\x20lifecycle\x20operation\x20is\x20no\x20longer\x20exposed\x20by\x20Rabetbase\x20CLI;\x20no\x20replacement\x20command\x20is\x20available.','knowledge-base:create','CLI\x20Built-in\x20Skill','app:add','rabetbase\x20menu\x20asset-update','Menu','Backend\x20Function\x20Scripts','service','app:remote','build','has','rabetbase\x20role\x20list','rabetbase\x20run\x20preview','skills:','`rabetbase\x20','\x20\x20[write]','permit:page-get','login','map','set','data:filter','wildcardDef','read','permit:page-set','permit:role-menus-set','get','knowledge-base:update','638533gzSxly','Code\x20Generation','Diagnostics','Runtime\x20App\x20Config\x20Management','isSingleCommand','rabetbase\x20cli-skill\x20install','Logs','Run\x20Scripts','Instant\x20API\x20Policy','page:react-detail','Platform\x20Issue','rabetbase\x20kb\x20list','menu:update','length','rabetbase\x20app\x20list\x20--remote','<script>','Configuration','API\x20Development','`\x20has\x20been\x20removed.','skill:','app:use','rabetbase\x20workspace\x20remove\x20<name>','Roles','rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>','command','role:create','rabetbase\x20page\x20data-list-status','logout','rabetbase\x20bff\x20create','show','page:react-create','617634QXpXkw','\x20\x20[','rabetbase\x20auth\x20logout','17221473RmoMSc','Async\x20Tasks'];a214_0x4712=function(){return _0x5a0889;};return a214_0x4712();}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 a214_0x29ee(_0x5d20ce,_0x4fc089){_0x5d20ce=_0x5d20ce-0x1e8;const _0x471240=a214_0x4712();let _0x29eee2=_0x471240[_0x5d20ce];return _0x29eee2;}function registerDefinitions(_0x2ba541){const _0x49f090=a214_0x29ee;for(const _0x521c71 of _0x2ba541){definitions['set'](_0x521c71[_0x49f090(0x24e)]+':'+_0x521c71[_0x49f090(0x205)],_0x521c71);let _0x323667=serviceGroups['get'](_0x521c71[_0x49f090(0x24e)]);!_0x323667&&(_0x323667=[],serviceGroups['set'](_0x521c71[_0x49f090(0x24e)],_0x323667)),_0x323667[_0x49f090(0x21f)](_0x521c71);}}function registerDeclarativeService(_0xaeff03,_0x5dc84f,_0x59a9cf){const _0x3e518e=a214_0x29ee;registerDefinitions(_0x5dc84f);_0x59a9cf?.[_0x3e518e(0x25c)]&®isterDefinitions([_0x59a9cf[_0x3e518e(0x25c)]]);const _0x29ca93=_0x4db830=>_0x4db830===_0x3e518e(0x1e8)?'':_0x4db830===_0x3e518e(0x239)?_0x3e518e(0x256):_0x3e518e(0x21d),_0x4e7983={'service':_0x5dc84f[0x0]['service'],'label':_0xaeff03,'commands':_0x5dc84f[_0x3e518e(0x246)](_0xd0bfef=>!_0xd0bfef[_0x3e518e(0x21e)])[_0x3e518e(0x259)](_0x181791=>({'command':_0x181791[_0x3e518e(0x205)],'description':_0x181791['description'],'tag':_0x29ca93(_0x181791[_0x3e518e(0x216)])})),'declarative':!![],'defaultCommand':_0x59a9cf?.['defaultCommand']??(_0x59a9cf?.[_0x3e518e(0x1f1)]?_0x5dc84f[0x0][_0x3e518e(0x205)]:undefined),'wildcardDef':_0x59a9cf?.[_0x3e518e(0x25c)],'isSingleCommand':_0x59a9cf?.[_0x3e518e(0x1f1)]};serviceRegistry[_0x3e518e(0x21f)](_0x4e7983),serviceByName[_0x3e518e(0x25a)](_0x4e7983[_0x3e518e(0x24e)],_0x4e7983);}registerDeclarativeService(a214_0x173b09(0x244),projectDefinitions),registerDeclarativeService('Workspace',workspaceDefinitions),registerDeclarativeService('App\x20Management',appDefinitions),registerDeclarativeService(a214_0x173b09(0x243),authDefinitions,{'defaultCommand':a214_0x173b09(0x258)}),registerDeclarativeService(a214_0x173b09(0x222),tenantDefinitions),registerDeclarativeService(a214_0x173b09(0x223),userAccountDefinitions),registerDeclarativeService(a214_0x173b09(0x234),datasetDefinitions),registerDeclarativeService(a214_0x173b09(0x22b),pageDefinitions),registerDeclarativeService(a214_0x173b09(0x1fe),apiDefinitions),registerDeclarativeService(a214_0x173b09(0x24d),bffDefinitions),registerDeclarativeService(a214_0x173b09(0x1f5),instantApiPolicyDefinitions),registerDeclarativeService(a214_0x173b09(0x23f),notificationDefinitions),registerDeclarativeService('SQL\x20Queries',sqlDefinitions),registerDeclarativeService('Database\x20Connections',dbDefinitions),registerDeclarativeService(a214_0x173b09(0x245),deploymentDefinitions),registerDeclarativeService(a214_0x173b09(0x24c),menuDefinitions),registerDeclarativeService(a214_0x173b09(0x210),taskDefinitions),registerDeclarativeService(a214_0x173b09(0x203),roleDefinitions),registerDeclarativeService(a214_0x173b09(0x1f0),appConfigDefinitions),registerDeclarativeService('Company\x20Knowledge\x20Base',kbDefinitions),registerDeclarativeService('Agent\x20Context\x20Rules',ruleDefinitions),registerDeclarativeService(a214_0x173b09(0x1f7),issueDefinitions),registerDeclarativeService(a214_0x173b09(0x232),fileDefinitions),registerDeclarativeService('OCR',ocrDefinitions),registerDeclarativeService(a214_0x173b09(0x1ee),codegenDefinitions),registerDeclarativeService(a214_0x173b09(0x1fd),configDefinitions),registerDeclarativeService(a214_0x173b09(0x1ef),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a214_0x173b09(0x22a),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a214_0x173b09(0x23e),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a214_0x173b09(0x249),cliSkillDefinitions,{'defaultCommand':a214_0x173b09(0x225)}),registerDeclarativeService('Approval\x20Flows',flowDefinitions),registerDeclarativeService(a214_0x173b09(0x1f3),logsDefinitions,{'defaultCommand':a214_0x173b09(0x20a)}),registerDeclarativeService(a214_0x173b09(0x1f4),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a214_0x173b09(0x1fa)]-0x1];last[a214_0x173b09(0x22d)]=[{'command':a214_0x173b09(0x1fc),'description':'Run\x20any\x20package.json\x20script','tag':a214_0x173b09(0x20d)+runDefinition[a214_0x173b09(0x216)]+']'}];}const REMOVED_COMMAND_REPLACEMENTS=new Map([['sql:save',a214_0x173b09(0x23d)],[a214_0x173b09(0x220),a214_0x173b09(0x209)],[a214_0x173b09(0x214),a214_0x173b09(0x21b)],[a214_0x173b09(0x1f9),a214_0x173b09(0x24b)],['project:init',a214_0x173b09(0x213)],[a214_0x173b09(0x200),'rabetbase\x20cli-skill\x20install'],['skill:install','rabetbase\x20cli-skill\x20install'],[a214_0x173b09(0x254),'rabetbase\x20cli-skill\x20install'],['skills:install',a214_0x173b09(0x1f2)],[a214_0x173b09(0x24f),a214_0x173b09(0x1fb)],[a214_0x173b09(0x201),a214_0x173b09(0x224)],[a214_0x173b09(0x24a),a214_0x173b09(0x204)],['app:remove',a214_0x173b09(0x202)],['knowledge-base:list',a214_0x173b09(0x1f8)],[a214_0x173b09(0x21a),'rabetbase\x20kb\x20detail'],[a214_0x173b09(0x248),'rabetbase\x20kb\x20create'],[a214_0x173b09(0x1ec),a214_0x173b09(0x230)],['knowledge-base:delete',a214_0x173b09(0x235)],[a214_0x173b09(0x206),a214_0x173b09(0x252)],[a214_0x173b09(0x25b),a214_0x173b09(0x219)],['data:getOne',a214_0x173b09(0x228)],['page:standard-page-status',a214_0x173b09(0x207)],[a214_0x173b09(0x20b),a214_0x173b09(0x221)],['page:custom-create',a214_0x173b09(0x221)],[a214_0x173b09(0x22e),'rabetbase\x20page\x20custom-list'],[a214_0x173b09(0x1f6),a214_0x173b09(0x21c)],['page:react-update',a214_0x173b09(0x231)],['page:react-publish',a214_0x173b09(0x217)]]),REMOVED_COMMAND_HINTS=new Map([[a214_0x173b09(0x237),a214_0x173b09(0x247)],[a214_0x173b09(0x23b),a214_0x173b09(0x247)],['deployment:sync',a214_0x173b09(0x23a)],[a214_0x173b09(0x257),a214_0x173b09(0x218)],[a214_0x173b09(0x1e9),a214_0x173b09(0x218)],[a214_0x173b09(0x240),'No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.'],[a214_0x173b09(0x1ea),a214_0x173b09(0x218)],[a214_0x173b09(0x23c),a214_0x173b09(0x218)]]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([['create',a214_0x173b09(0x236)],[a214_0x173b09(0x226),'rabetbase\x20run\x20start'],[a214_0x173b09(0x250),a214_0x173b09(0x238)],[a214_0x173b09(0x233),a214_0x173b09(0x253)],[a214_0x173b09(0x208),a214_0x173b09(0x20e)]]);export function resolveRemovedCommand(_0x139e5b,_0x3bb7b3){const _0x229e40=a214_0x173b09;if(!_0x139e5b)return undefined;const _0x5ef665=REMOVED_COMMAND_REPLACEMENTS[_0x229e40(0x1eb)](_0x139e5b+':'+(_0x3bb7b3??'')),_0x2d8a78=REMOVED_FLAT_COMMAND_REPLACEMENTS[_0x229e40(0x1eb)](_0x139e5b),_0x5f57a4=_0x5ef665??_0x2d8a78,_0x2b56bb=REMOVED_COMMAND_HINTS[_0x229e40(0x1eb)](_0x139e5b+':'+(_0x3bb7b3??''));if(!_0x5f57a4&&!_0x2b56bb)return undefined;const _0x1af795=_0x2d8a78?_0x139e5b:_0x3bb7b3?_0x139e5b+'\x20'+_0x3bb7b3:_0x139e5b;return{'command':_0x1af795,'message':_0x229e40(0x255)+_0x1af795+_0x229e40(0x1ff),'hint':_0x2b56bb??'Use\x20`'+_0x5f57a4+'`\x20instead.'};}export function findDefinition(_0x1d6440,_0x14b9f6){const _0x2ee8fc=a214_0x173b09;return definitions[_0x2ee8fc(0x1eb)](_0x1d6440+':'+_0x14b9f6);}export function isKnownService(_0x3b522){const _0x5a8b87=a214_0x173b09;return serviceByName[_0x5a8b87(0x251)](_0x3b522);}export function isDeclarativeService(_0x5e68b4){const _0x47f87b=a214_0x173b09;return serviceGroups[_0x47f87b(0x251)](_0x5e68b4)||serviceByName[_0x47f87b(0x1eb)](_0x5e68b4)?.['wildcardDef']!==undefined;}export function getServiceEntry(_0x3ae0e6){const _0x34e6f6=a214_0x173b09;return serviceByName[_0x34e6f6(0x1eb)](_0x3ae0e6);}export function getLegacyHandler(_0x5f5481,_0x213384){return undefined;}export function getAllDefinitions(){const _0x31ea34=a214_0x173b09;return Array[_0x31ea34(0x22c)](definitions[_0x31ea34(0x22f)]());}
|
|
1
|
+
const a219_0x5a3d1c=a219_0x339a;(function(_0x5915fc,_0x596fa3){const _0x264455=a219_0x339a,_0x2df770=_0x5915fc();while(!![]){try{const _0x4c25a9=parseInt(_0x264455(0x231))/0x1*(parseInt(_0x264455(0x259))/0x2)+-parseInt(_0x264455(0x233))/0x3*(parseInt(_0x264455(0x1fa))/0x4)+parseInt(_0x264455(0x1ee))/0x5+-parseInt(_0x264455(0x256))/0x6*(parseInt(_0x264455(0x240))/0x7)+-parseInt(_0x264455(0x209))/0x8*(-parseInt(_0x264455(0x1e7))/0x9)+parseInt(_0x264455(0x215))/0xa+-parseInt(_0x264455(0x250))/0xb;if(_0x4c25a9===_0x596fa3)break;else _0x2df770['push'](_0x2df770['shift']());}catch(_0x2ae01d){_0x2df770['push'](_0x2df770['shift']());}}}(a219_0xa45b,0x6d7a2));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';function a219_0xa45b(){const _0x56f002=['User\x20Accounts','defaultCommand','1336716qvNzfC','set','Roles','sql:new','app:use','values','549ryCAiW','data:filter','<script>','rabetbase\x20run\x20start','Company\x20Knowledge\x20Base','from','data:getOne','1414245LUPNlU','`\x20instead.','permit:role-menus','Agent\x20Context\x20Rules','Approval\x20Flows','page:react-publish','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.','rabetbase\x20kb\x20update','Diagnostics','Logs','rabetbase\x20kb\x20delete','filter','188OagmPq','knowledge-base:update','rabetbase\x20project\x20create\x20<project-name>','`rabetbase\x20','app:remove','Instant\x20API\x20Policy','permit:page-get','Async\x20Tasks','Configuration','Code\x20Generation','flow:disable','rabetbase\x20run\x20preview','Run\x20Scripts','rabetbase\x20page\x20custom-detail','push','7032beXrsh','SQL\x20Queries','bff:new','read','\x20\x20[','Data\x20List\x20Pages\x20&\x20Custom\x20Pages','wildcardDef','rabetbase\x20cli-skill\x20install','Database\x20Connections','knowledge-base:detail','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','rabetbase\x20kb\x20create','5059440pLaQVM','rabetbase\x20bff\x20create','app:assets-update','Platform\x20Issue','risk','build','Project','sql:save','get','rabetbase\x20workspace\x20init\x20--appcode\x20<code>','page:custom-create','page:react-create','rabetbase\x20sql\x20create','page:react-update','permit:role-menus-set','rabetbase\x20run\x20build','rabetbase\x20page\x20data-list-status','app:assets-status','flow:enable','rabetbase\x20kb\x20list','service','app:add','has','Use\x20`','Self\x20Update','length','`\x20has\x20been\x20removed.','menu:update','1lAGBpw','commands','17283QCaNyN','skills:install','Backend\x20Function\x20Scripts','rabetbase\x20page\x20custom-list','description','This\x20lifecycle\x20operation\x20is\x20no\x20longer\x20exposed\x20by\x20Rabetbase\x20CLI;\x20no\x20replacement\x20command\x20is\x20available.','Notification\x20Configuration','command','knowledge-base:create','API\x20Development','deployment:sync','preview','write','130522fmTxuH','project:init','rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27','page:react-detail','isSingleCommand','page:react-list','OCR','Dataset\x20&\x20Operations','\x20\x20[write]','Tenant\x20Members','app:remote','Workspace','File','skill:install','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK','1118513RSAJzJ','rabetbase\x20role\x20list','CLI\x20Built-in\x20Skill','knowledge-base:list','rabetbase\x20menu\x20asset-update','rabetbase\x20kb\x20detail','222uQUvnn'];a219_0xa45b=function(){return _0x56f002;};return a219_0xa45b();}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{flowDefinitions}from'../commands/flow/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 registerDefinitions(_0x41204c){const _0x1efaa7=a219_0x339a;for(const _0x50f1b8 of _0x41204c){definitions[_0x1efaa7(0x25a)](_0x50f1b8['service']+':'+_0x50f1b8[_0x1efaa7(0x23a)],_0x50f1b8);let _0x228b7a=serviceGroups[_0x1efaa7(0x21d)](_0x50f1b8[_0x1efaa7(0x229)]);!_0x228b7a&&(_0x228b7a=[],serviceGroups[_0x1efaa7(0x25a)](_0x50f1b8[_0x1efaa7(0x229)],_0x228b7a)),_0x228b7a['push'](_0x50f1b8);}}function registerDeclarativeService(_0x520bee,_0x2f8029,_0x5d3c99){const _0x2e7fed=a219_0x339a;registerDefinitions(_0x2f8029);_0x5d3c99?.[_0x2e7fed(0x20f)]&®isterDefinitions([_0x5d3c99['wildcardDef']]);const _0xf4cc7f=_0x3c07c0=>_0x3c07c0===_0x2e7fed(0x20c)?'':_0x3c07c0===_0x2e7fed(0x23f)?_0x2e7fed(0x249):'\x20\x20[high-risk-write]',_0x3336b9={'service':_0x2f8029[0x0][_0x2e7fed(0x229)],'label':_0x520bee,'commands':_0x2f8029[_0x2e7fed(0x1f9)](_0x43efb5=>!_0x43efb5['hidden'])['map'](_0x35fbe0=>({'command':_0x35fbe0['command'],'description':_0x35fbe0[_0x2e7fed(0x237)],'tag':_0xf4cc7f(_0x35fbe0[_0x2e7fed(0x219)])})),'declarative':!![],'defaultCommand':_0x5d3c99?.[_0x2e7fed(0x258)]??(_0x5d3c99?.[_0x2e7fed(0x245)]?_0x2f8029[0x0][_0x2e7fed(0x23a)]:undefined),'wildcardDef':_0x5d3c99?.[_0x2e7fed(0x20f)],'isSingleCommand':_0x5d3c99?.[_0x2e7fed(0x245)]};serviceRegistry[_0x2e7fed(0x208)](_0x3336b9),serviceByName[_0x2e7fed(0x25a)](_0x3336b9[_0x2e7fed(0x229)],_0x3336b9);}registerDeclarativeService(a219_0x5a3d1c(0x21b),projectDefinitions),registerDeclarativeService(a219_0x5a3d1c(0x24c),workspaceDefinitions),registerDeclarativeService('App\x20Management',appDefinitions),registerDeclarativeService('Authentication',authDefinitions,{'defaultCommand':'login'}),registerDeclarativeService(a219_0x5a3d1c(0x24a),tenantDefinitions),registerDeclarativeService(a219_0x5a3d1c(0x257),userAccountDefinitions),registerDeclarativeService(a219_0x5a3d1c(0x248),datasetDefinitions),registerDeclarativeService(a219_0x5a3d1c(0x20e),pageDefinitions),registerDeclarativeService(a219_0x5a3d1c(0x23c),apiDefinitions),registerDeclarativeService(a219_0x5a3d1c(0x235),bffDefinitions),registerDeclarativeService(a219_0x5a3d1c(0x1ff),instantApiPolicyDefinitions),registerDeclarativeService(a219_0x5a3d1c(0x239),notificationDefinitions),registerDeclarativeService(a219_0x5a3d1c(0x20a),sqlDefinitions),registerDeclarativeService(a219_0x5a3d1c(0x211),dbDefinitions),registerDeclarativeService('Deployment',deploymentDefinitions),registerDeclarativeService('Menu',menuDefinitions),registerDeclarativeService(a219_0x5a3d1c(0x201),taskDefinitions),registerDeclarativeService(a219_0x5a3d1c(0x1e3),roleDefinitions),registerDeclarativeService('Runtime\x20App\x20Config\x20Management',appConfigDefinitions),registerDeclarativeService(a219_0x5a3d1c(0x1eb),kbDefinitions),registerDeclarativeService(a219_0x5a3d1c(0x1f1),ruleDefinitions),registerDeclarativeService(a219_0x5a3d1c(0x218),issueDefinitions),registerDeclarativeService(a219_0x5a3d1c(0x24d),fileDefinitions),registerDeclarativeService(a219_0x5a3d1c(0x247),ocrDefinitions),registerDeclarativeService(a219_0x5a3d1c(0x203),codegenDefinitions),registerDeclarativeService(a219_0x5a3d1c(0x202),configDefinitions),registerDeclarativeService(a219_0x5a3d1c(0x1f6),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Schema',[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a219_0x5a3d1c(0x22d),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a219_0x5a3d1c(0x252),cliSkillDefinitions,{'defaultCommand':'install'}),registerDeclarativeService(a219_0x5a3d1c(0x1f2),flowDefinitions),registerDeclarativeService(a219_0x5a3d1c(0x1f7),logsDefinitions,{'defaultCommand':'show'}),registerDeclarativeService(a219_0x5a3d1c(0x206),[runDefinition],{'wildcardDef':runDefinition});function a219_0x339a(_0xd93f3e,_0xa1fa12){_0xd93f3e=_0xd93f3e-0x1e3;const _0xa45b96=a219_0xa45b();let _0x339afb=_0xa45b96[_0xd93f3e];return _0x339afb;}{const last=serviceRegistry[serviceRegistry[a219_0x5a3d1c(0x22e)]-0x1];last[a219_0x5a3d1c(0x232)]=[{'command':a219_0x5a3d1c(0x1e9),'description':'Run\x20any\x20package.json\x20script','tag':a219_0x5a3d1c(0x20d)+runDefinition[a219_0x5a3d1c(0x219)]+']'}];}const REMOVED_COMMAND_REPLACEMENTS=new Map([[a219_0x5a3d1c(0x21c),a219_0x5a3d1c(0x242)],[a219_0x5a3d1c(0x20b),a219_0x5a3d1c(0x216)],[a219_0x5a3d1c(0x1e4),a219_0x5a3d1c(0x221)],[a219_0x5a3d1c(0x230),a219_0x5a3d1c(0x254)],[a219_0x5a3d1c(0x241),a219_0x5a3d1c(0x21e)],['skill:','rabetbase\x20cli-skill\x20install'],[a219_0x5a3d1c(0x24e),a219_0x5a3d1c(0x210)],['skills:','rabetbase\x20cli-skill\x20install'],[a219_0x5a3d1c(0x234),a219_0x5a3d1c(0x210)],[a219_0x5a3d1c(0x226),'rabetbase\x20menu\x20subapp-assets-status\x20--appcode\x20<host-appcode>\x20--app-name\x20<name>'],[a219_0x5a3d1c(0x217),'rabetbase\x20menu\x20subapp-assets-update\x20--appcode\x20<host-appcode>\x20--app-name\x20<name>\x20--resources\x20\x27<json>\x27'],[a219_0x5a3d1c(0x24b),'rabetbase\x20app\x20list\x20--remote'],[a219_0x5a3d1c(0x1e5),'rabetbase\x20workspace\x20use\x20--app\x20<name>'],[a219_0x5a3d1c(0x22a),'rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>'],[a219_0x5a3d1c(0x1fe),'rabetbase\x20workspace\x20remove\x20<name>'],[a219_0x5a3d1c(0x253),a219_0x5a3d1c(0x228)],[a219_0x5a3d1c(0x212),a219_0x5a3d1c(0x255)],[a219_0x5a3d1c(0x23b),a219_0x5a3d1c(0x214)],[a219_0x5a3d1c(0x1fb),a219_0x5a3d1c(0x1f5)],['knowledge-base:delete',a219_0x5a3d1c(0x1f8)],['role:create',a219_0x5a3d1c(0x251)],[a219_0x5a3d1c(0x1e8),a219_0x5a3d1c(0x243)],[a219_0x5a3d1c(0x1ed),a219_0x5a3d1c(0x213)],['page:standard-page-status',a219_0x5a3d1c(0x225)],[a219_0x5a3d1c(0x220),a219_0x5a3d1c(0x24f)],[a219_0x5a3d1c(0x21f),'rabetbase\x20page\x20create\x20--page-pattern\x20BLANK'],[a219_0x5a3d1c(0x246),a219_0x5a3d1c(0x236)],[a219_0x5a3d1c(0x244),a219_0x5a3d1c(0x207)],[a219_0x5a3d1c(0x222),'rabetbase\x20page\x20custom-update'],[a219_0x5a3d1c(0x1f3),'rabetbase\x20page\x20custom-publish']]),REMOVED_COMMAND_HINTS=new Map([[a219_0x5a3d1c(0x227),a219_0x5a3d1c(0x238)],[a219_0x5a3d1c(0x204),'This\x20lifecycle\x20operation\x20is\x20no\x20longer\x20exposed\x20by\x20Rabetbase\x20CLI;\x20no\x20replacement\x20command\x20is\x20available.'],[a219_0x5a3d1c(0x23d),'Resource\x20saves\x20are\x20synchronized\x20automatically\x20by\x20the\x20server;\x20no\x20manual\x20CLI\x20replacement\x20is\x20required.'],[a219_0x5a3d1c(0x200),'No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.'],['permit:page-set',a219_0x5a3d1c(0x1f4)],[a219_0x5a3d1c(0x1f0),a219_0x5a3d1c(0x1f4)],[a219_0x5a3d1c(0x223),a219_0x5a3d1c(0x1f4)],['permit:role-apis-set',a219_0x5a3d1c(0x1f4)]]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([['create',a219_0x5a3d1c(0x1fc)],['start',a219_0x5a3d1c(0x1ea)],[a219_0x5a3d1c(0x21a),a219_0x5a3d1c(0x224)],[a219_0x5a3d1c(0x23e),a219_0x5a3d1c(0x205)],['logout','rabetbase\x20auth\x20logout']]);export function resolveRemovedCommand(_0x44c607,_0x233179){const _0x493b64=a219_0x5a3d1c;if(!_0x44c607)return undefined;const _0x1f4ef6=REMOVED_COMMAND_REPLACEMENTS[_0x493b64(0x21d)](_0x44c607+':'+(_0x233179??'')),_0x1d04a8=REMOVED_FLAT_COMMAND_REPLACEMENTS['get'](_0x44c607),_0x20099c=_0x1f4ef6??_0x1d04a8,_0x162689=REMOVED_COMMAND_HINTS[_0x493b64(0x21d)](_0x44c607+':'+(_0x233179??''));if(!_0x20099c&&!_0x162689)return undefined;const _0x5b8c5d=_0x1d04a8?_0x44c607:_0x233179?_0x44c607+'\x20'+_0x233179:_0x44c607;return{'command':_0x5b8c5d,'message':_0x493b64(0x1fd)+_0x5b8c5d+_0x493b64(0x22f),'hint':_0x162689??_0x493b64(0x22c)+_0x20099c+_0x493b64(0x1ef)};}export function findDefinition(_0x4ce73e,_0xf6353e){const _0x2ecfdd=a219_0x5a3d1c;return definitions[_0x2ecfdd(0x21d)](_0x4ce73e+':'+_0xf6353e);}export function isKnownService(_0x30a050){return serviceByName['has'](_0x30a050);}export function isDeclarativeService(_0x5d14f1){const _0x33c448=a219_0x5a3d1c;return serviceGroups[_0x33c448(0x22b)](_0x5d14f1)||serviceByName['get'](_0x5d14f1)?.['wildcardDef']!==undefined;}export function getServiceEntry(_0x16c32a){const _0x11a4e7=a219_0x5a3d1c;return serviceByName[_0x11a4e7(0x21d)](_0x16c32a);}export function getLegacyHandler(_0x198269,_0x33f4a2){return undefined;}export function getAllDefinitions(){const _0x45b0ac=a219_0x5a3d1c;return Array[_0x45b0ac(0x1ec)](definitions[_0x45b0ac(0x1e6)]());}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a220_0x4677e1=a220_0x1008;function a220_0x1008(_0x21f640,_0xf47d5f){_0x21f640=_0x21f640-0xdf;const _0x576d22=a220_0x576d();let _0x1008b5=_0x576d22[_0x21f640];return _0x1008b5;}(function(_0x6af173,_0x1c2840){const _0x46b98c=a220_0x1008,_0x3cf0b0=_0x6af173();while(!![]){try{const _0x554b8e=parseInt(_0x46b98c(0xf4))/0x1*(-parseInt(_0x46b98c(0xdf))/0x2)+-parseInt(_0x46b98c(0xec))/0x3+-parseInt(_0x46b98c(0xe0))/0x4*(parseInt(_0x46b98c(0xed))/0x5)+-parseInt(_0x46b98c(0xf0))/0x6*(parseInt(_0x46b98c(0xe3))/0x7)+parseInt(_0x46b98c(0xe4))/0x8+-parseInt(_0x46b98c(0xe6))/0x9+parseInt(_0x46b98c(0xf3))/0xa;if(_0x554b8e===_0x1c2840)break;else _0x3cf0b0['push'](_0x3cf0b0['shift']());}catch(_0x2af782){_0x3cf0b0['push'](_0x3cf0b0['shift']());}}}(a220_0x576d,0x586cc));import{deleteAppRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a220_0x576d(){const _0x236dd8=['13LEIjrp','65316MyhiYf','394248qcThKZ','POST','roleName','4077913NhdAKU','2763456dROPyh','Delete\x20a\x20CUSTOM\x20role\x20(built-in\x20roles\x20rejected);\x20requires\x20--yes','6317100WzGZxS','userCount','\x20member(s);\x20they\x20will\x20lose\x20this\x20group.','appCode','\x20(id=','Role\x20still\x20has\x20','299586HkVLmJ','35ridxoB','delete','high-risk-write','6QqNdbr','role','num','25155650iEpFHK'];a220_0x576d=function(){return _0x236dd8;};return a220_0x576d();}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';export const roleDelete={'service':a220_0x4677e1(0xf1),'command':a220_0x4677e1(0xee),'description':a220_0x4677e1(0xe5),'risk':a220_0x4677e1(0xef),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x2e1b16){const _0x1a05dd=a220_0x4677e1,_0x9470b7=_0x2e1b16[_0x1a05dd(0xf2)]('id'),_0x3fee1e=await getRoleById(_0x2e1b16[_0x1a05dd(0xe9)],_0x9470b7);return assertCustomRole(_0x3fee1e,_0x1a05dd(0xee)),asDryRunResult({'scope':'dev','operation':'delete','selector':{'appCode':_0x2e1b16['appCode'],'roleId':_0x9470b7,'roleName':_0x3fee1e[_0x1a05dd(0xe2)]},'before':projectRole(_0x3fee1e),'after':null,'dryRun':!![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x3fee1e[_0x1a05dd(0xe7)]>0x0?[_0x1a05dd(0xeb)+_0x3fee1e[_0x1a05dd(0xe7)]+_0x1a05dd(0xe8)]:[]},{'method':_0x1a05dd(0xe1),'url':DELETE_PATH});},async 'execute'(_0x10c6db){const _0x3f83c8=a220_0x4677e1,_0x507fef=_0x10c6db['num']('id'),_0xe65133=await getRoleById(_0x10c6db['appCode'],_0x507fef);return assertCustomRole(_0xe65133,_0x3f83c8(0xee)),await deleteAppRole(_0x507fef),{'ok':!![],'data':{'scope':'dev','operation':_0x3f83c8(0xee),'selector':{'appCode':_0x10c6db[_0x3f83c8(0xe9)],'roleId':_0x507fef,'roleName':_0xe65133[_0x3f83c8(0xe2)]},'before':projectRole(_0xe65133),'after':null,'dryRun':![],'backend':{'method':_0x3f83c8(0xe1),'path':DELETE_PATH},'warnings':[]},'message':'Deleted\x20role\x20'+_0xe65133['roleName']+_0x3f83c8(0xea)+_0x507fef+')'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a221_0x1b7012=a221_0x1a3f;(function(_0x302184,_0x21f97b){const _0x364e73=a221_0x1a3f,_0x1742ba=_0x302184();while(!![]){try{const _0x5334d9=-parseInt(_0x364e73(0xe6))/0x1+-parseInt(_0x364e73(0xdb))/0x2*(parseInt(_0x364e73(0xd9))/0x3)+-parseInt(_0x364e73(0xdd))/0x4+parseInt(_0x364e73(0xde))/0x5*(-parseInt(_0x364e73(0xe4))/0x6)+parseInt(_0x364e73(0xd7))/0x7*(-parseInt(_0x364e73(0xe2))/0x8)+parseInt(_0x364e73(0xe1))/0x9+-parseInt(_0x364e73(0xe5))/0xa*(-parseInt(_0x364e73(0xe3))/0xb);if(_0x5334d9===_0x21f97b)break;else _0x1742ba['push'](_0x1742ba['shift']());}catch(_0x5c8837){_0x1742ba['push'](_0x1742ba['shift']());}}}(a221_0x350f,0x31d5f));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';function a221_0x1a3f(_0x1830a9,_0xdb18cb){_0x1830a9=_0x1830a9-0xd5;const _0x350fb6=a221_0x350f();let _0x1a3f75=_0x350fb6[_0x1830a9];return _0x1a3f75;}export const roleDetail={'service':a221_0x1b7012(0xdf),'command':a221_0x1b7012(0xd5),'description':a221_0x1b7012(0xdc),'risk':'read','flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x25293e){const _0x36309d=a221_0x1b7012,_0xcfbbfb=_0x25293e[_0x36309d(0xda)]('id'),_0x1e64dd=await getRoleById(_0x25293e[_0x36309d(0xd8)],_0xcfbbfb);return{'ok':!![],'data':{'scope':'dev','role':projectRole(_0x1e64dd)},'message':_0x36309d(0xd6)+_0x1e64dd[_0x36309d(0xe0)]+'\x20('+_0x1e64dd[_0x36309d(0xe7)]+')'};}};function a221_0x350f(){const _0x5c681d=['role','roleName','1298583QgVShg','208yREwCi','66DtbzLo','6tGFiPR','1365020UYMdAq','53107wBVSNI','roleType','detail','Role\x20','39473XGCOyx','appCode','825144XDubhz','num','2pkBdvx','Show\x20a\x20single\x20role\x27s\x20detail','480152MHXEcR','821825uyBalD'];a221_0x350f=function(){return _0x5c681d;};return a221_0x350f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x17dcb5,_0x1ddf8f){const _0x97013c=a222_0x4a75,_0x153eb7=_0x17dcb5();while(!![]){try{const _0x3c0f59=-parseInt(_0x97013c(0x181))/0x1*(-parseInt(_0x97013c(0x186))/0x2)+-parseInt(_0x97013c(0x182))/0x3+parseInt(_0x97013c(0x180))/0x4+-parseInt(_0x97013c(0x185))/0x5*(parseInt(_0x97013c(0x184))/0x6)+-parseInt(_0x97013c(0x188))/0x7+-parseInt(_0x97013c(0x187))/0x8*(parseInt(_0x97013c(0x17f))/0x9)+parseInt(_0x97013c(0x183))/0xa;if(_0x3c0f59===_0x1ddf8f)break;else _0x153eb7['push'](_0x153eb7['shift']());}catch(_0x3a43d0){_0x153eb7['push'](_0x153eb7['shift']());}}}(a222_0x1670,0xf0460));function a222_0x1670(){const _0x31daab=['757426VxCICo','7692376ZiNVwk','9345952NBwoYa','18favtKy','7433860uGvIVI','2ifrPje','5867736EYCiwp','36830670UDGvRl','36moMgbw','83880GKpyag'];a222_0x1670=function(){return _0x31daab;};return a222_0x1670();}import{roleList}from'../../commands/role/list.js';function a222_0x4a75(_0x51d1d0,_0x1b1f8b){_0x51d1d0=_0x51d1d0-0x17f;const _0x1670cc=a222_0x1670();let _0x4a75bd=_0x1670cc[_0x51d1d0];return _0x4a75bd;}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';import{roleUserRemove}from'../../commands/role/user-remove.js';export const roleDefinitions=[roleList,roleDetail,roleUpdate,roleDelete,roleUserResolve,roleUserAdd,roleUserRemove];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a223_0x502ba9=a223_0x761c;(function(_0x1e4709,_0x5e9bcd){const _0x2d38de=a223_0x761c,_0x512a69=_0x1e4709();while(!![]){try{const _0x13a32b=parseInt(_0x2d38de(0x183))/0x1*(parseInt(_0x2d38de(0x195))/0x2)+parseInt(_0x2d38de(0x185))/0x3+-parseInt(_0x2d38de(0x18a))/0x4+parseInt(_0x2d38de(0x189))/0x5+-parseInt(_0x2d38de(0x19b))/0x6+parseInt(_0x2d38de(0x1a3))/0x7+-parseInt(_0x2d38de(0x17f))/0x8;if(_0x13a32b===_0x5e9bcd)break;else _0x512a69['push'](_0x512a69['shift']());}catch(_0xa9b54b){_0x512a69['push'](_0x512a69['shift']());}}}(a223_0x2b01,0x5b272));import{listAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a223_0x761c(_0x5967d8,_0x566b07){_0x5967d8=_0x5967d8-0x17e;const _0x2b01c8=a223_0x2b01();let _0x761c06=_0x2b01c8[_0x5967d8];return _0x761c06;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a223_0x2b01(){const _0x217380=['roleType','list','Found\x20','toUpperCase','ADMIN','dev','pagesize','2GYveIJ','OWNER','str','Invalid\x20--type\x20\x22','DEV','num','881214JsJCwr','Page\x20size\x20(1-100)','\x20role(s)','validation','Page\x20index\x20(1-based)','Filter\x20by\x20role\x20type','--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.','appCode','2595614AOzIid','List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','length','14239440JdUWop','--pagesize\x20must\x20be\x20between\x201\x20and\x20100.','string','type','723941HakGvY','map','1869771LTiUWa','includes','number','filter','3410500vXBcuD','399756MPhOwE','CUSTOM','page','trim'];a223_0x2b01=function(){return _0x217380;};return a223_0x2b01();}import{projectRole}from'../../commands/role/shared.js';const ROLE_TYPES=[a223_0x502ba9(0x192),a223_0x502ba9(0x199),a223_0x502ba9(0x196),a223_0x502ba9(0x18b)];export const roleList={'service':'role','command':a223_0x502ba9(0x18f),'description':a223_0x502ba9(0x1a4),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a223_0x502ba9(0x182),'type':a223_0x502ba9(0x181),'required':![],'description':a223_0x502ba9(0x1a0),'enum':ROLE_TYPES},{'name':a223_0x502ba9(0x18c),'type':a223_0x502ba9(0x187),'description':a223_0x502ba9(0x19f),'default':0x1},{'name':a223_0x502ba9(0x194),'type':'number','description':a223_0x502ba9(0x19c),'default':0x64}],async 'validate'(_0x297fb2){const _0x1fd041=a223_0x502ba9,_0x1bea6f=_0x297fb2[_0x1fd041(0x197)](_0x1fd041(0x182))['trim']();if(_0x1bea6f&&!ROLE_TYPES[_0x1fd041(0x186)](_0x1bea6f['toUpperCase']()))throw CliErrors[_0x1fd041(0x19e)](_0x1fd041(0x198)+_0x1bea6f+'\x22.','Use\x20one\x20of:\x20'+ROLE_TYPES['join'](',\x20')+'.');const _0x18661a=_0x297fb2[_0x1fd041(0x19a)]('page',0x1),_0x57bfc8=_0x297fb2['num'](_0x1fd041(0x194),0x64);if(_0x18661a<0x1)throw CliErrors[_0x1fd041(0x19e)](_0x1fd041(0x1a1));if(_0x57bfc8<0x1||_0x57bfc8>0x64)throw CliErrors[_0x1fd041(0x19e)](_0x1fd041(0x180));},async 'execute'(_0x2ce608){const _0x244074=a223_0x502ba9,_0x10ae7e=_0x2ce608['num'](_0x244074(0x18c),0x1)||0x1,_0x33155b=_0x2ce608[_0x244074(0x19a)]('pagesize',0x64)||0x64,_0x581027=_0x2ce608[_0x244074(0x197)]('type')[_0x244074(0x18d)]()[_0x244074(0x191)](),{items:_0x3589f5,paging:_0x5079ab}=await listAppRoles(_0x2ce608[_0x244074(0x1a2)],{'currentPage':_0x10ae7e,'pageSize':_0x33155b}),_0x6b6d9b=_0x581027?_0x3589f5[_0x244074(0x188)](_0x227946=>_0x227946[_0x244074(0x18e)]===_0x581027):_0x3589f5,_0x361344=_0x6b6d9b[_0x244074(0x184)](projectRole);return{'ok':!![],'data':{'scope':_0x244074(0x193),'roles':_0x361344,'paging':_0x5079ab},'message':_0x244074(0x190)+_0x361344[_0x244074(0x17e)]+_0x244074(0x19d)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a219_0x14d093=a219_0x3397;(function(_0x4b68a7,_0x1bf900){const _0x42419d=a219_0x3397,_0x35ca4b=_0x4b68a7();while(!![]){try{const _0x278839=-parseInt(_0x42419d(0xa9))/0x1+parseInt(_0x42419d(0xd8))/0x2+parseInt(_0x42419d(0xb5))/0x3+-parseInt(_0x42419d(0xb1))/0x4+-parseInt(_0x42419d(0xbe))/0x5+-parseInt(_0x42419d(0xf0))/0x6*(parseInt(_0x42419d(0xe0))/0x7)+parseInt(_0x42419d(0xf2))/0x8;if(_0x278839===_0x1bf900)break;else _0x35ca4b['push'](_0x35ca4b['shift']());}catch(_0x132358){_0x35ca4b['push'](_0x35ca4b['shift']());}}}(a219_0x5cc1,0x9a945));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':a219_0x14d093(0xd9),'required':!![],'description':a219_0x14d093(0xd7)};export const ROLE_REF_FLAG={'name':a219_0x14d093(0xf4),'type':a219_0x14d093(0xeb),'required':!![],'description':a219_0x14d093(0xdf)};export const USER_REF_FLAG={'name':a219_0x14d093(0xa8),'type':a219_0x14d093(0xeb),'required':!![],'description':a219_0x14d093(0xb8)};export const NAME_FLAG={'name':a219_0x14d093(0xc5),'type':a219_0x14d093(0xeb),'required':!![],'description':a219_0x14d093(0xb4)};export const USER_NAME_FLAG={'name':'name','type':a219_0x14d093(0xeb),'required':!![],'description':a219_0x14d093(0xd1)};export const REMARK_FLAG={'name':'remark','type':a219_0x14d093(0xeb),'required':![],'description':a219_0x14d093(0xf6)};export const EXPECT_USER_COUNT_FLAG={'name':a219_0x14d093(0xcb),'type':a219_0x14d093(0xd9),'required':![],'description':a219_0x14d093(0xab)};export const BUILTIN_ROLE_TYPES=[a219_0x14d093(0xb7),a219_0x14d093(0xda),a219_0x14d093(0xb0)];export function isBuiltinRole(_0x31523e){const _0x4d6f90=a219_0x14d093;return BUILTIN_ROLE_TYPES[_0x4d6f90(0xb2)](_0x31523e);}export function assertCustomRole(_0x2d33b0,_0x4c4f8e){const _0x27c059=a219_0x14d093;if(_0x2d33b0[_0x27c059(0xc0)]!==_0x27c059(0xc2))throw CliErrors[_0x27c059(0xad)](_0x27c059(0xe2)+_0x4c4f8e+_0x27c059(0xdd)+_0x2d33b0[_0x27c059(0xaa)]+'\x20('+_0x2d33b0[_0x27c059(0xc0)]+').',_0x27c059(0xd3));}export function projectRole(_0x412fc2){const _0x2d44f7=a219_0x14d093;return{'id':_0x412fc2['id'],'roleName':_0x412fc2[_0x2d44f7(0xaa)],'roleType':_0x412fc2[_0x2d44f7(0xc0)],'remark':_0x412fc2['remark'],'userCount':_0x412fc2[_0x2d44f7(0xe3)],'permitCount':_0x412fc2['permitCount'],'builtin':isBuiltinRole(_0x412fc2['roleType'])};}export async function resolveRoleRef(_0x5cd510,_0x35ae64){const _0x43064b=a219_0x14d093,_0x438ceb=_0x35ae64[_0x43064b(0xe1)]();if(!_0x438ceb)throw CliErrors[_0x43064b(0xad)](_0x43064b(0xf5),_0x43064b(0xe8));if(/^\d+$/[_0x43064b(0xd5)](_0x438ceb))return getRoleById(_0x5cd510,Number(_0x438ceb));const _0x2cef3f=await listAllAppRoles(_0x5cd510),_0x2a1535=_0x2cef3f[_0x43064b(0xb6)](_0x1f0c6e=>_0x1f0c6e[_0x43064b(0xaa)]===_0x438ceb);if(_0x2a1535[_0x43064b(0xb3)]===0x0)throw CliErrors[_0x43064b(0xad)](_0x43064b(0xe7)+_0x438ceb+_0x43064b(0xac)+_0x5cd510+'.',_0x43064b(0xbf));if(_0x2a1535[_0x43064b(0xb3)]>0x1){const _0x537d75=_0x2a1535['map'](_0x2592ab=>_0x2592ab['id'])['join'](',\x20');throw CliErrors[_0x43064b(0xad)]('Role\x20name\x20\x22'+_0x438ceb+_0x43064b(0xbb)+_0x537d75+').',_0x43064b(0xd4));}return _0x2a1535[0x0];}export async function getRoleById(_0x43ffc6,_0x3feedd){const _0x12e386=a219_0x14d093,_0x583075=await listAllAppRoles(_0x43ffc6),_0x3292fa=_0x583075[_0x12e386(0xb6)](_0xe9a368=>_0xe9a368['id']===_0x3feedd&&(!_0xe9a368[_0x12e386(0xd2)]||_0xe9a368[_0x12e386(0xd2)]===_0x43ffc6));if(_0x3292fa['length']!==0x1)throw CliErrors[_0x12e386(0xad)]('Role\x20id\x20'+_0x3feedd+_0x12e386(0xb9)+_0x43ffc6+'.',_0x12e386(0xdb));return _0x3292fa[0x0];}async function listAllAppRoles(_0x1a4662){const _0x3cfb53=a219_0x14d093,_0x4294fc=0x64,_0x2c725c=[];for(let _0x40031f=0x1;;_0x40031f+=0x1){const {items:_0x192035,paging:_0x3bd34e}=await listAppRoles(_0x1a4662,{'currentPage':_0x40031f,'pageSize':_0x4294fc});_0x2c725c[_0x3cfb53(0xed)](..._0x192035);if(_0x192035['length']<_0x4294fc||_0x3bd34e&&_0x2c725c[_0x3cfb53(0xb3)]>=_0x3bd34e['totalCount'])return _0x2c725c;}}export async function resolveTenantCode(){const _0x13428b=a219_0x14d093,_0x3c9944=await getSessionUserInfo(),_0x5058ae=_0x3c9944?.[_0x13428b(0xa8)]?.[_0x13428b(0xcf)]?.[_0x13428b(0xbc)];if(!_0x5058ae)throw CliErrors[_0x13428b(0xef)](_0x13428b(0xae));return _0x5058ae;}function matchMember(_0x41d1bd,_0x6e4183){const _0x5806ae=a219_0x14d093,_0x5e545c=_0x6e4183['trim']()['toLowerCase']();return(_0x41d1bd[_0x5806ae(0xc6)]??'')[_0x5806ae(0xe9)]()===_0x5e545c||(_0x41d1bd[_0x5806ae(0xce)]??'')[_0x5806ae(0xe9)]()===_0x5e545c;}export async function resolveUserRef(_0x32ec12,_0x4c0db0='Pass\x20--user\x20<id>.'){const _0x35c711=a219_0x14d093,_0x911de6=_0x32ec12[_0x35c711(0xe1)]();if(!_0x911de6)throw CliErrors[_0x35c711(0xad)]('Missing\x20user\x20reference.',_0x35c711(0xaf));const _0x5b3e78=await resolveTenantCode(),_0x30dd2b=await getTenantMembers(_0x5b3e78);if(/^\d+$/[_0x35c711(0xd5)](_0x911de6)){const _0x3cfdf2=Number(_0x911de6),_0x418118=_0x30dd2b[_0x35c711(0xe6)](_0x11e04e=>_0x11e04e[_0x35c711(0xf7)]===_0x3cfdf2);return{'userId':_0x3cfdf2,'username':_0x418118?.[_0x35c711(0xce)]??String(_0x3cfdf2),'nickname':_0x418118?.[_0x35c711(0xc6)],'matchedBy':'id'};}const _0x245139=_0x30dd2b[_0x35c711(0xb6)](_0x50969e=>matchMember(_0x50969e,_0x911de6));if(_0x245139[_0x35c711(0xb3)]===0x0)throw CliErrors[_0x35c711(0xad)](_0x35c711(0xdc)+_0x911de6+'\x22.',_0x35c711(0xa7)+_0x4c0db0);if(_0x245139['length']>0x1){const _0x432ed7=_0x245139[_0x35c711(0xcc)](_0x1d9755=>(_0x1d9755[_0x35c711(0xc6)]??_0x1d9755[_0x35c711(0xce)]??'?')+'('+_0x1d9755['userId']+')')[_0x35c711(0xe4)](',\x20');throw CliErrors[_0x35c711(0xad)](_0x35c711(0xc9)+_0x911de6+'\x22:\x20'+_0x432ed7+'.',_0x4c0db0);}const _0x28030b=_0x245139[0x0];return{'userId':_0x28030b['userId'],'username':_0x28030b[_0x35c711(0xce)]??String(_0x28030b['userId']),'nickname':_0x28030b[_0x35c711(0xc6)],'matchedBy':_0x35c711(0xc5)};}export const CREATE_USER_ROLE_PATH=a219_0x14d093(0xea);export const DELETE_USER_ROLE_PATH=a219_0x14d093(0xca);export function computeRoleUserMutation(_0x2b9c2d){const _0x92539b=a219_0x14d093,{operation:_0x14ecea,appCode:_0x3dfb8e,role:_0x491f00,relations:_0x43af9b,user:_0x47a4f0}=_0x2b9c2d,_0x41bc92=[...new Set(_0x43af9b[_0x92539b(0xcc)](_0x28bbc1=>_0x28bbc1['userId']))],_0x97f4a4=[];if(_0x2b9c2d[_0x92539b(0xc1)]!==undefined&&_0x2b9c2d[_0x92539b(0xc1)]!==_0x41bc92[_0x92539b(0xb3)])throw CliErrors[_0x92539b(0xad)]('Anti-drift\x20check\x20failed:\x20expected\x20'+_0x2b9c2d[_0x92539b(0xc1)]+_0x92539b(0xd6)+_0x41bc92[_0x92539b(0xb3)]+'.',_0x92539b(0xcd));const _0x93b1a9=_0x41bc92[_0x92539b(0xb2)](_0x47a4f0['userId']),_0x8f7d5f=_0x43af9b[_0x92539b(0xb6)](_0x817b5b=>_0x817b5b[_0x92539b(0xf7)]===_0x47a4f0[_0x92539b(0xf7)])['map'](_0x41cc15=>_0x41cc15['id']),_0x9f9ac8=_0x14ecea===_0x92539b(0xbd)?!_0x93b1a9:_0x93b1a9;let _0x4de105=_0x41bc92;_0x14ecea===_0x92539b(0xbd)?_0x93b1a9?_0x97f4a4['push'](_0x92539b(0xe5)+_0x47a4f0[_0x92539b(0xf7)]+_0x92539b(0xc3)+_0x491f00[_0x92539b(0xaa)]+_0x92539b(0xf1)):_0x4de105=[..._0x41bc92,_0x47a4f0[_0x92539b(0xf7)]]:!_0x93b1a9?_0x97f4a4[_0x92539b(0xed)]('User\x20'+_0x47a4f0[_0x92539b(0xf7)]+_0x92539b(0xee)+_0x491f00[_0x92539b(0xaa)]+_0x92539b(0xf1)):(_0x4de105=_0x41bc92[_0x92539b(0xb6)](_0x5c8ad6=>_0x5c8ad6!==_0x47a4f0[_0x92539b(0xf7)]),_0x8f7d5f['length']>0x1&&_0x97f4a4[_0x92539b(0xed)](_0x92539b(0xd0)+_0x8f7d5f[_0x92539b(0xb3)]+'\x20duplicate\x20memberships\x20for\x20user\x20'+_0x47a4f0[_0x92539b(0xf7)]+'.'));const _0x2f5a8d={'scope':_0x92539b(0xf3),'operation':_0x14ecea,'selector':{'appCode':_0x3dfb8e,'roleId':_0x491f00['id'],'roleName':_0x491f00[_0x92539b(0xaa)],'userId':_0x47a4f0[_0x92539b(0xf7)]},'before':{'userIds':_0x41bc92},'after':{'userIds':_0x4de105},'dryRun':_0x2b9c2d['dryRun'],'backend':{'method':_0x92539b(0xde),'path':_0x14ecea==='user-add'?CREATE_USER_ROLE_PATH:DELETE_USER_ROLE_PATH},'warnings':_0x97f4a4};return{'mutation':_0x2f5a8d,'changed':_0x9f9ac8,'matchingRelationIds':_0x8f7d5f};}function a219_0x3397(_0x92d656,_0x51e8bf){_0x92d656=_0x92d656-0xa7;const _0x5cc124=a219_0x5cc1();let _0x3397d4=_0x5cc124[_0x92d656];return _0x3397d4;}export async function loadDevRoleRelations(_0x392850,_0x634ba){const _0x1210ff=a219_0x14d093,_0xf64214=0x64,_0x3ca357=[];for(let _0x4a9a9a=0x1;;_0x4a9a9a+=0x1){const {items:_0x5d071e,paging:_0x2eee6b}=await listDevUserRoleRelations(_0x392850,{'roleId':_0x634ba,'currentPage':_0x4a9a9a,'pageSize':_0xf64214});_0x3ca357['push'](..._0x5d071e);if(_0x5d071e[_0x1210ff(0xb3)]<_0xf64214||_0x2eee6b&&_0x3ca357[_0x1210ff(0xb3)]>=_0x2eee6b[_0x1210ff(0xc7)])return _0x3ca357;}}export function readRoleRef(_0x38d103){const _0x2a91fc=a219_0x14d093,_0x1739d4=_0x38d103[_0x2a91fc(0xba)](_0x2a91fc(0xf4))[_0x2a91fc(0xe1)]();if(!_0x1739d4)throw CliErrors[_0x2a91fc(0xc8)](_0x2a91fc(0xf4),_0x2a91fc(0xe8));return _0x1739d4;}function a219_0x5cc1(){const _0x16bb32=['1581505FnCODH','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles,\x20or\x20pass\x20--role\x20<id>.','roleType','expectUserCount','CUSTOM','\x20is\x20already\x20a\x20member\x20of\x20role\x20','flag','name','nickname','totalCount','flagMissing','Multiple\x20tenant\x20members\x20match\x20\x22','/smartapi/permit/user-role/delete','expect-user-count','map','Re-run\x20`role\x20detail`\x20/\x20`role\x20list`\x20and\x20retry\x20with\x20the\x20current\x20count.','username','tenant','Removed\x20','Nickname\x20or\x20username\x20to\x20resolve\x20to\x20a\x20userId','appCode','Only\x20CUSTOM\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','Disambiguate\x20with\x20--role\x20<id>.','test','\x20member(s)\x20but\x20role\x20has\x20','Role\x20id\x20(from\x20`role\x20list`)','855952PYdWOi','number','DEV','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.','No\x20tenant\x20member\x20matches\x20\x22','\x20built-in\x20role\x20','POST','Role\x20id\x20or\x20exact\x20role\x20name','7119sNWotm','trim','Cannot\x20','userCount','join','User\x20','find','Role\x20name\x20\x22','Pass\x20--role\x20<id|name>.','toLowerCase','/smartapi/permit/user-role/create','string','\x20members\x20of\x20the\x20OWNER\x20role.','push','\x20is\x20not\x20a\x20member\x20of\x20role\x20','authRequired','174yojTuh',';\x20no\x20change.','15611848wMGfaX','dev','role','Missing\x20role\x20reference.','Optional\x20role\x20remark/description','userId','Check\x20the\x20nickname/username.\x20','user','1016346Dbgzjx','roleName','Anti-drift\x20guard:\x20fail\x20if\x20the\x20role\x27s\x20current\x20member\x20count\x20differs','\x22\x20not\x20found\x20in\x20app\x20','validation','Cannot\x20resolve\x20current\x20tenant.\x20Run\x20`rabetbase\x20auth\x20login`\x20first.','Pass\x20--user\x20<id|name>.','OWNER','3218084pmpHyH','includes','length','Role\x20name','1261083cRrfGQ','filter','ADMIN','User\x20id,\x20username,\x20or\x20nickname\x20to\x20resolve\x20to\x20a\x20userId','\x20not\x20found\x20in\x20app\x20','str','\x22\x20is\x20ambiguous\x20(ids:\x20','tenant_code','user-add'];a219_0x5cc1=function(){return _0x16bb32;};return a219_0x5cc1();}export async function prepareUserMutation(_0x2ccc8d,_0x294fff,_0xb36a5){const _0x5a2b32=a219_0x14d093,_0x2f5de8=readRoleRef(_0x2ccc8d),_0x323951=_0x2ccc8d[_0x5a2b32(0xba)](_0x5a2b32(0xa8))[_0x5a2b32(0xe1)]();if(!_0x323951)throw CliErrors['flagMissing'](_0x5a2b32(0xa8),_0x5a2b32(0xaf));const _0x57f2c9=_0x2ccc8d[_0x5a2b32(0xc4)]('expect-user-count'),_0x253a5a=_0x57f2c9===undefined||_0x57f2c9===null?undefined:Number(_0x57f2c9),_0x333906=await resolveRoleRef(_0x2ccc8d['appCode'],_0x2f5de8);if(_0x333906[_0x5a2b32(0xc0)]===_0x5a2b32(0xb0))throw CliErrors[_0x5a2b32(0xad)](_0x5a2b32(0xe2)+_0x294fff+_0x5a2b32(0xec),'Use\x20the\x20platform\x20ownership-transfer\x20workflow\x20to\x20change\x20the\x20application\x20owner.');const _0x30be37=await resolveUserRef(_0x323951),_0x3ed31f=await loadDevRoleRelations(_0x2ccc8d[_0x5a2b32(0xd2)],_0x333906['id']);return{...computeRoleUserMutation({'operation':_0x294fff,'appCode':_0x2ccc8d[_0x5a2b32(0xd2)],'role':_0x333906,'relations':_0x3ed31f,'user':{'userId':_0x30be37[_0x5a2b32(0xf7)],'username':_0x30be37['username'],'nickname':_0x30be37[_0x5a2b32(0xc6)]},'dryRun':_0xb36a5,..._0x253a5a!==undefined?{'expectUserCount':_0x253a5a}:{}}),'role':_0x333906,'user':_0x30be37};}
|
|
1
|
+
const a224_0x1b57ec=a224_0x3568;(function(_0xab357d,_0x7e0e59){const _0x234731=a224_0x3568,_0x24d5be=_0xab357d();while(!![]){try{const _0x198863=-parseInt(_0x234731(0x1b3))/0x1*(-parseInt(_0x234731(0x1f1))/0x2)+-parseInt(_0x234731(0x1d9))/0x3*(-parseInt(_0x234731(0x1f5))/0x4)+-parseInt(_0x234731(0x1cd))/0x5+parseInt(_0x234731(0x1f4))/0x6+-parseInt(_0x234731(0x1d5))/0x7*(parseInt(_0x234731(0x1bf))/0x8)+parseInt(_0x234731(0x1b1))/0x9+-parseInt(_0x234731(0x1dc))/0xa;if(_0x198863===_0x7e0e59)break;else _0x24d5be['push'](_0x24d5be['shift']());}catch(_0x136d4a){_0x24d5be['push'](_0x24d5be['shift']());}}}(a224_0x57b0,0x75db6));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':a224_0x1b57ec(0x1ba),'required':!![],'description':a224_0x1b57ec(0x1b4)};export const ROLE_REF_FLAG={'name':a224_0x1b57ec(0x1e1),'type':a224_0x1b57ec(0x1f2),'required':!![],'description':a224_0x1b57ec(0x1cc)};export const USER_REF_FLAG={'name':a224_0x1b57ec(0x1b9),'type':a224_0x1b57ec(0x1f2),'required':!![],'description':a224_0x1b57ec(0x1ea)};export const NAME_FLAG={'name':a224_0x1b57ec(0x1e5),'type':a224_0x1b57ec(0x1f2),'required':!![],'description':a224_0x1b57ec(0x1ef)};export const USER_NAME_FLAG={'name':'name','type':a224_0x1b57ec(0x1f2),'required':!![],'description':'Nickname\x20or\x20username\x20to\x20resolve\x20to\x20a\x20userId'};export const REMARK_FLAG={'name':a224_0x1b57ec(0x1d2),'type':a224_0x1b57ec(0x1f2),'required':![],'description':a224_0x1b57ec(0x1f8)};function a224_0x57b0(){const _0xec8024=['7MixJcB','Pass\x20--user\x20<id|name>.','expect-user-count','\x22\x20not\x20found\x20in\x20app\x20','660741mmhKHf','tenant_code','Pass\x20--role\x20<id|name>.','10098050ZqnkvU','map','expectUserCount','user-add','test','role','trim','\x22\x20is\x20ambiguous\x20(ids:\x20','roleType','name','Anti-drift\x20guard:\x20fail\x20if\x20the\x20role\x27s\x20current\x20member\x20count\x20differs','nickname','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.','length','User\x20id,\x20username,\x20or\x20nickname\x20to\x20resolve\x20to\x20a\x20userId','totalCount','Cannot\x20','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles,\x20or\x20pass\x20--role\x20<id>.','push','Role\x20name','flag','2HZTZde','string','/smartapi/permit/user-role/create','2854842EMhiQc','16xuWzPA','No\x20tenant\x20member\x20matches\x20\x22','Anti-drift\x20check\x20failed:\x20expected\x20','Optional\x20role\x20remark/description','dryRun','OWNER','str','validation','flagMissing','8577936RVXwNa','tenant','257576WtXDqq','Role\x20id\x20(from\x20`role\x20list`)','\x22:\x20','User\x20','Role\x20name\x20\x22','\x20built-in\x20role\x20','user','number','includes','userCount','DEV','\x20member(s)\x20but\x20role\x20has\x20','4768984Rpdmrx','/smartapi/permit/user-role/delete','POST','ADMIN','appCode','toLowerCase','Cannot\x20resolve\x20current\x20tenant.\x20Run\x20`rabetbase\x20auth\x20login`\x20first.','Missing\x20user\x20reference.','roleName','\x20duplicate\x20memberships\x20for\x20user\x20','filter','\x20not\x20found\x20in\x20app\x20','userId','Role\x20id\x20or\x20exact\x20role\x20name','2394025mEZFHq','username','find','Pass\x20--user\x20<id>.','Check\x20the\x20nickname/username.\x20','remark','Missing\x20role\x20reference.',';\x20no\x20change.'];a224_0x57b0=function(){return _0xec8024;};return a224_0x57b0();}export const EXPECT_USER_COUNT_FLAG={'name':a224_0x1b57ec(0x1d7),'type':a224_0x1b57ec(0x1ba),'required':![],'description':a224_0x1b57ec(0x1e6)};export const BUILTIN_ROLE_TYPES=[a224_0x1b57ec(0x1c2),a224_0x1b57ec(0x1bd),a224_0x1b57ec(0x1ad)];export function isBuiltinRole(_0x538472){return BUILTIN_ROLE_TYPES['includes'](_0x538472);}export function assertCustomRole(_0x15a896,_0x17bcaa){const _0x22770c=a224_0x1b57ec;if(_0x15a896[_0x22770c(0x1e4)]!=='CUSTOM')throw CliErrors[_0x22770c(0x1af)]('Cannot\x20'+_0x17bcaa+_0x22770c(0x1b8)+_0x15a896[_0x22770c(0x1c7)]+'\x20('+_0x15a896[_0x22770c(0x1e4)]+').','Only\x20CUSTOM\x20roles\x20can\x20be\x20modified\x20or\x20deleted.');}export function projectRole(_0x3bd23a){const _0x2067c5=a224_0x1b57ec;return{'id':_0x3bd23a['id'],'roleName':_0x3bd23a[_0x2067c5(0x1c7)],'roleType':_0x3bd23a[_0x2067c5(0x1e4)],'remark':_0x3bd23a[_0x2067c5(0x1d2)],'userCount':_0x3bd23a[_0x2067c5(0x1bc)],'permitCount':_0x3bd23a['permitCount'],'builtin':isBuiltinRole(_0x3bd23a[_0x2067c5(0x1e4)])};}export async function resolveRoleRef(_0x48b443,_0x399dc3){const _0x542108=a224_0x1b57ec,_0x25d848=_0x399dc3['trim']();if(!_0x25d848)throw CliErrors[_0x542108(0x1af)](_0x542108(0x1d3),_0x542108(0x1db));if(/^\d+$/[_0x542108(0x1e0)](_0x25d848))return getRoleById(_0x48b443,Number(_0x25d848));const _0x5af235=await listAllAppRoles(_0x48b443),_0x17da94=_0x5af235[_0x542108(0x1c9)](_0x4bcde2=>_0x4bcde2[_0x542108(0x1c7)]===_0x25d848);if(_0x17da94['length']===0x0)throw CliErrors['validation'](_0x542108(0x1b7)+_0x25d848+_0x542108(0x1d8)+_0x48b443+'.',_0x542108(0x1ed));if(_0x17da94[_0x542108(0x1e9)]>0x1){const _0x25f217=_0x17da94[_0x542108(0x1dd)](_0x2ac3f0=>_0x2ac3f0['id'])['join'](',\x20');throw CliErrors[_0x542108(0x1af)](_0x542108(0x1b7)+_0x25d848+_0x542108(0x1e3)+_0x25f217+').','Disambiguate\x20with\x20--role\x20<id>.');}return _0x17da94[0x0];}export async function getRoleById(_0x766a48,_0x16aae8){const _0x11b70f=a224_0x1b57ec,_0x3a8b52=await listAllAppRoles(_0x766a48),_0x3b86f4=_0x3a8b52['filter'](_0x5701c5=>_0x5701c5['id']===_0x16aae8&&(!_0x5701c5[_0x11b70f(0x1c3)]||_0x5701c5[_0x11b70f(0x1c3)]===_0x766a48));if(_0x3b86f4[_0x11b70f(0x1e9)]!==0x1)throw CliErrors[_0x11b70f(0x1af)]('Role\x20id\x20'+_0x16aae8+_0x11b70f(0x1ca)+_0x766a48+'.',_0x11b70f(0x1e8));return _0x3b86f4[0x0];}async function listAllAppRoles(_0x1d2ac7){const _0xf63b5f=a224_0x1b57ec,_0x1cd17d=0x64,_0x1c81b8=[];for(let _0x2de09e=0x1;;_0x2de09e+=0x1){const {items:_0x107895,paging:_0x5e95d7}=await listAppRoles(_0x1d2ac7,{'currentPage':_0x2de09e,'pageSize':_0x1cd17d});_0x1c81b8[_0xf63b5f(0x1ee)](..._0x107895);if(_0x107895[_0xf63b5f(0x1e9)]<_0x1cd17d||_0x5e95d7&&_0x1c81b8['length']>=_0x5e95d7['totalCount'])return _0x1c81b8;}}export async function resolveTenantCode(){const _0x3953e4=a224_0x1b57ec,_0x2e4935=await getSessionUserInfo(),_0x3c0bde=_0x2e4935?.[_0x3953e4(0x1b9)]?.[_0x3953e4(0x1b2)]?.[_0x3953e4(0x1da)];if(!_0x3c0bde)throw CliErrors['authRequired'](_0x3953e4(0x1c5));return _0x3c0bde;}function matchMember(_0x5aa4de,_0x10e4b1){const _0x3962a0=a224_0x1b57ec,_0x2fe7d0=_0x10e4b1['trim']()[_0x3962a0(0x1c4)]();return(_0x5aa4de[_0x3962a0(0x1e7)]??'')[_0x3962a0(0x1c4)]()===_0x2fe7d0||(_0x5aa4de[_0x3962a0(0x1ce)]??'')[_0x3962a0(0x1c4)]()===_0x2fe7d0;}export async function resolveUserRef(_0x29fe09,_0x217641=a224_0x1b57ec(0x1d0)){const _0x12bd08=a224_0x1b57ec,_0x181e1a=_0x29fe09[_0x12bd08(0x1e2)]();if(!_0x181e1a)throw CliErrors[_0x12bd08(0x1af)](_0x12bd08(0x1c6),_0x12bd08(0x1d6));const _0x34e9d4=await resolveTenantCode(),_0xcebff9=await getTenantMembers(_0x34e9d4);if(/^\d+$/[_0x12bd08(0x1e0)](_0x181e1a)){const _0x2d3cb3=Number(_0x181e1a),_0x276161=_0xcebff9[_0x12bd08(0x1cf)](_0x18c460=>_0x18c460[_0x12bd08(0x1cb)]===_0x2d3cb3);return{'userId':_0x2d3cb3,'username':_0x276161?.[_0x12bd08(0x1ce)]??String(_0x2d3cb3),'nickname':_0x276161?.['nickname'],'matchedBy':'id'};}const _0x68785f=_0xcebff9[_0x12bd08(0x1c9)](_0x5255c5=>matchMember(_0x5255c5,_0x181e1a));if(_0x68785f[_0x12bd08(0x1e9)]===0x0)throw CliErrors['validation'](_0x12bd08(0x1f6)+_0x181e1a+'\x22.',_0x12bd08(0x1d1)+_0x217641);if(_0x68785f['length']>0x1){const _0x375dc3=_0x68785f[_0x12bd08(0x1dd)](_0x2cd2c9=>(_0x2cd2c9[_0x12bd08(0x1e7)]??_0x2cd2c9[_0x12bd08(0x1ce)]??'?')+'('+_0x2cd2c9[_0x12bd08(0x1cb)]+')')['join'](',\x20');throw CliErrors[_0x12bd08(0x1af)]('Multiple\x20tenant\x20members\x20match\x20\x22'+_0x181e1a+_0x12bd08(0x1b5)+_0x375dc3+'.',_0x217641);}const _0xf18907=_0x68785f[0x0];return{'userId':_0xf18907['userId'],'username':_0xf18907['username']??String(_0xf18907[_0x12bd08(0x1cb)]),'nickname':_0xf18907[_0x12bd08(0x1e7)],'matchedBy':_0x12bd08(0x1e5)};}export const CREATE_USER_ROLE_PATH=a224_0x1b57ec(0x1f3);export const DELETE_USER_ROLE_PATH=a224_0x1b57ec(0x1c0);function a224_0x3568(_0x57a723,_0x456e3b){_0x57a723=_0x57a723-0x1ac;const _0x57b024=a224_0x57b0();let _0x3568b6=_0x57b024[_0x57a723];return _0x3568b6;}export function computeRoleUserMutation(_0x51002a){const _0x3ee2fc=a224_0x1b57ec,{operation:_0x11fec6,appCode:_0x228629,role:_0x427206,relations:_0x3fe66d,user:_0x1e2055}=_0x51002a,_0x199a96=[...new Set(_0x3fe66d[_0x3ee2fc(0x1dd)](_0x35ef96=>_0x35ef96[_0x3ee2fc(0x1cb)]))],_0x38caf1=[];if(_0x51002a[_0x3ee2fc(0x1de)]!==undefined&&_0x51002a[_0x3ee2fc(0x1de)]!==_0x199a96['length'])throw CliErrors[_0x3ee2fc(0x1af)](_0x3ee2fc(0x1f7)+_0x51002a['expectUserCount']+_0x3ee2fc(0x1be)+_0x199a96[_0x3ee2fc(0x1e9)]+'.','Re-run\x20`role\x20detail`\x20/\x20`role\x20list`\x20and\x20retry\x20with\x20the\x20current\x20count.');const _0x324705=_0x199a96[_0x3ee2fc(0x1bb)](_0x1e2055[_0x3ee2fc(0x1cb)]),_0x23f85f=_0x3fe66d[_0x3ee2fc(0x1c9)](_0x279082=>_0x279082['userId']===_0x1e2055[_0x3ee2fc(0x1cb)])[_0x3ee2fc(0x1dd)](_0x275f2a=>_0x275f2a['id']),_0x1e6398=_0x11fec6===_0x3ee2fc(0x1df)?!_0x324705:_0x324705;let _0x54245b=_0x199a96;_0x11fec6==='user-add'?_0x324705?_0x38caf1[_0x3ee2fc(0x1ee)](_0x3ee2fc(0x1b6)+_0x1e2055[_0x3ee2fc(0x1cb)]+'\x20is\x20already\x20a\x20member\x20of\x20role\x20'+_0x427206[_0x3ee2fc(0x1c7)]+_0x3ee2fc(0x1d4)):_0x54245b=[..._0x199a96,_0x1e2055[_0x3ee2fc(0x1cb)]]:!_0x324705?_0x38caf1['push']('User\x20'+_0x1e2055['userId']+'\x20is\x20not\x20a\x20member\x20of\x20role\x20'+_0x427206['roleName']+';\x20no\x20change.'):(_0x54245b=_0x199a96[_0x3ee2fc(0x1c9)](_0x222d98=>_0x222d98!==_0x1e2055[_0x3ee2fc(0x1cb)]),_0x23f85f[_0x3ee2fc(0x1e9)]>0x1&&_0x38caf1['push']('Removed\x20'+_0x23f85f[_0x3ee2fc(0x1e9)]+_0x3ee2fc(0x1c8)+_0x1e2055[_0x3ee2fc(0x1cb)]+'.'));const _0x5df5f7={'scope':'dev','operation':_0x11fec6,'selector':{'appCode':_0x228629,'roleId':_0x427206['id'],'roleName':_0x427206['roleName'],'userId':_0x1e2055[_0x3ee2fc(0x1cb)]},'before':{'userIds':_0x199a96},'after':{'userIds':_0x54245b},'dryRun':_0x51002a[_0x3ee2fc(0x1ac)],'backend':{'method':_0x3ee2fc(0x1c1),'path':_0x11fec6==='user-add'?CREATE_USER_ROLE_PATH:DELETE_USER_ROLE_PATH},'warnings':_0x38caf1};return{'mutation':_0x5df5f7,'changed':_0x1e6398,'matchingRelationIds':_0x23f85f};}export async function loadDevRoleRelations(_0xf531af,_0x1540e4){const _0x584e92=a224_0x1b57ec,_0x27d7b7=0x64,_0x411f26=[];for(let _0x833128=0x1;;_0x833128+=0x1){const {items:_0x55d883,paging:_0x58b36b}=await listDevUserRoleRelations(_0xf531af,{'roleId':_0x1540e4,'currentPage':_0x833128,'pageSize':_0x27d7b7});_0x411f26[_0x584e92(0x1ee)](..._0x55d883);if(_0x55d883[_0x584e92(0x1e9)]<_0x27d7b7||_0x58b36b&&_0x411f26[_0x584e92(0x1e9)]>=_0x58b36b[_0x584e92(0x1eb)])return _0x411f26;}}export function readRoleRef(_0x41e86c){const _0x1cbbcc=a224_0x1b57ec,_0x2a4403=_0x41e86c[_0x1cbbcc(0x1ae)](_0x1cbbcc(0x1e1))[_0x1cbbcc(0x1e2)]();if(!_0x2a4403)throw CliErrors[_0x1cbbcc(0x1b0)](_0x1cbbcc(0x1e1),_0x1cbbcc(0x1db));return _0x2a4403;}export async function prepareUserMutation(_0x3b68df,_0x1f798b,_0x2d13e3){const _0x45b4e8=a224_0x1b57ec,_0x335e2c=readRoleRef(_0x3b68df),_0x10336e=_0x3b68df[_0x45b4e8(0x1ae)](_0x45b4e8(0x1b9))['trim']();if(!_0x10336e)throw CliErrors[_0x45b4e8(0x1b0)]('user',_0x45b4e8(0x1d6));const _0x5694a5=_0x3b68df[_0x45b4e8(0x1f0)](_0x45b4e8(0x1d7)),_0x2b7538=_0x5694a5===undefined||_0x5694a5===null?undefined:Number(_0x5694a5),_0x597476=await resolveRoleRef(_0x3b68df['appCode'],_0x335e2c);if(_0x597476['roleType']===_0x45b4e8(0x1ad))throw CliErrors[_0x45b4e8(0x1af)](_0x45b4e8(0x1ec)+_0x1f798b+'\x20members\x20of\x20the\x20OWNER\x20role.','Use\x20the\x20platform\x20ownership-transfer\x20workflow\x20to\x20change\x20the\x20application\x20owner.');const _0x3d8f1f=await resolveUserRef(_0x10336e),_0x551d64=await loadDevRoleRelations(_0x3b68df[_0x45b4e8(0x1c3)],_0x597476['id']);return{...computeRoleUserMutation({'operation':_0x1f798b,'appCode':_0x3b68df['appCode'],'role':_0x597476,'relations':_0x551d64,'user':{'userId':_0x3d8f1f[_0x45b4e8(0x1cb)],'username':_0x3d8f1f[_0x45b4e8(0x1ce)],'nickname':_0x3d8f1f['nickname']},'dryRun':_0x2d13e3,..._0x2b7538!==undefined?{'expectUserCount':_0x2b7538}:{}}),'role':_0x597476,'user':_0x3d8f1f};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a225_0x5cdae4=a225_0x33b2;(function(_0x3a7047,_0x25b5af){const _0x4950e2=a225_0x33b2,_0x38b263=_0x3a7047();while(!![]){try{const _0x478796=-parseInt(_0x4950e2(0x80))/0x1+-parseInt(_0x4950e2(0x7a))/0x2*(-parseInt(_0x4950e2(0x87))/0x3)+parseInt(_0x4950e2(0x7d))/0x4*(-parseInt(_0x4950e2(0x7f))/0x5)+parseInt(_0x4950e2(0x8c))/0x6*(parseInt(_0x4950e2(0x8a))/0x7)+-parseInt(_0x4950e2(0x78))/0x8+parseInt(_0x4950e2(0x73))/0x9+parseInt(_0x4950e2(0x82))/0xa*(parseInt(_0x4950e2(0x89))/0xb);if(_0x478796===_0x25b5af)break;else _0x38b263['push'](_0x38b263['shift']());}catch(_0x15fe79){_0x38b263['push'](_0x38b263['shift']());}}}(a225_0x38fb,0xc3557));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';function a225_0x33b2(_0x3c13ef,_0x9d33d7){_0x3c13ef=_0x3c13ef-0x6e;const _0x38fbb6=a225_0x38fb();let _0x33b285=_0x38fbb6[_0x3c13ef];return _0x33b285;}function a225_0x38fb(){const _0xcbd77e=['trim','Pass\x20at\x20least\x20one\x20of\x20--name\x20/\x20--remark.','name','roleName','\x20(id=','10909350ftscIH','update','Nothing\x20to\x20update.','appCode','dev','10868880XWplWg','string','346jvQwCn','validation','remark','3252thBqpJ','flag','20svyOEx','1536221WVIJNS','--name\x20cannot\x20be\x20empty.','10BovXzg','num','/smartapi/permit/role/update','role','Role\x20name\x20cannot\x20exceed\x2064\x20characters.','25377pKjSWF','Update\x20a\x20CUSTOM\x20role\x27s\x20name/remark\x20(built-in\x20roles\x20rejected)','4235759OhVzTZ','557851nUFXfj','POST','48juxLPZ'];a225_0x38fb=function(){return _0xcbd77e;};return a225_0x38fb();}import{assertCustomRole,getRoleById,projectRole,REMARK_FLAG,ROLE_ID_FLAG}from'../../commands/role/shared.js';const UPDATE_PATH=a225_0x5cdae4(0x84);function readPatch(_0x598248){const _0x39023e=a225_0x5cdae4,_0xca85f7=_0x598248[_0x39023e(0x7e)](_0x39023e(0x70)),_0x5d7719=_0x598248[_0x39023e(0x7e)](_0x39023e(0x7c)),_0x3f5805={};if(_0xca85f7!==undefined&&_0xca85f7!==null){const _0x59a3a6=String(_0xca85f7)[_0x39023e(0x6e)]();if(!_0x59a3a6)throw CliErrors[_0x39023e(0x7b)](_0x39023e(0x81));if(_0x59a3a6['length']>0x40)throw CliErrors[_0x39023e(0x7b)](_0x39023e(0x86));_0x3f5805[_0x39023e(0x71)]=_0x59a3a6;}_0x5d7719!==undefined&&_0x5d7719!==null&&(_0x3f5805['remark']=String(_0x5d7719));if(_0x3f5805[_0x39023e(0x71)]===undefined&&_0x3f5805[_0x39023e(0x7c)]===undefined)throw CliErrors['validation'](_0x39023e(0x75),_0x39023e(0x6f));return _0x3f5805;}export const roleUpdate={'service':a225_0x5cdae4(0x85),'command':a225_0x5cdae4(0x74),'description':a225_0x5cdae4(0x88),'risk':'write','flags':[ROLE_ID_FLAG,{...REMARK_FLAG},{'name':a225_0x5cdae4(0x70),'type':a225_0x5cdae4(0x79),'required':![],'description':'New\x20role\x20name'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x579e2a){readPatch(_0x579e2a);},async 'dryRun'(_0x53cab1){const _0x1f06e6=a225_0x5cdae4,_0x58e0d0=_0x53cab1[_0x1f06e6(0x83)]('id'),_0x1eb6c3=readPatch(_0x53cab1),_0x10e299=await getRoleById(_0x53cab1['appCode'],_0x58e0d0);return assertCustomRole(_0x10e299,_0x1f06e6(0x74)),asDryRunResult({'scope':_0x1f06e6(0x77),'operation':'update','selector':{'appCode':_0x53cab1['appCode'],'roleId':_0x58e0d0,'roleName':_0x10e299[_0x1f06e6(0x71)]},'before':projectRole(_0x10e299),'after':projectRole({..._0x10e299,..._0x1eb6c3[_0x1f06e6(0x71)]!==undefined?{'roleName':_0x1eb6c3['roleName']}:{},..._0x1eb6c3['remark']!==undefined?{'remark':_0x1eb6c3[_0x1f06e6(0x7c)]}:{}}),'dryRun':!![],'backend':{'method':_0x1f06e6(0x8b),'path':UPDATE_PATH},'warnings':[]},{'method':_0x1f06e6(0x8b),'url':UPDATE_PATH});},async 'execute'(_0x52ce86){const _0x26559a=a225_0x5cdae4,_0x3f178a=_0x52ce86[_0x26559a(0x83)]('id'),_0x2971c7=readPatch(_0x52ce86),_0x475405=await getRoleById(_0x52ce86[_0x26559a(0x76)],_0x3f178a);assertCustomRole(_0x475405,'update'),await updateAppRole({'id':_0x3f178a,'appCode':_0x52ce86['appCode'],..._0x2971c7[_0x26559a(0x71)]!==undefined?{'roleName':_0x2971c7[_0x26559a(0x71)]}:{},..._0x2971c7[_0x26559a(0x7c)]!==undefined?{'remark':_0x2971c7['remark']}:{}});const _0x1cfe9a=await getRoleById(_0x52ce86[_0x26559a(0x76)],_0x3f178a);return{'ok':!![],'data':{'scope':_0x26559a(0x77),'operation':_0x26559a(0x74),'selector':{'appCode':_0x52ce86['appCode'],'roleId':_0x3f178a,'roleName':_0x1cfe9a[_0x26559a(0x71)]},'before':projectRole(_0x475405),'after':projectRole(_0x1cfe9a),'dryRun':![],'backend':{'method':_0x26559a(0x8b),'path':UPDATE_PATH},'warnings':[]},'message':'Updated\x20role\x20'+_0x1cfe9a[_0x26559a(0x71)]+_0x26559a(0x72)+_0x3f178a+')'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a226_0x441d56=a226_0x3107;(function(_0x5ed8ab,_0x591e74){const _0x2da0ec=a226_0x3107,_0x1c1052=_0x5ed8ab();while(!![]){try{const _0x210cc8=parseInt(_0x2da0ec(0x8d))/0x1*(parseInt(_0x2da0ec(0x94))/0x2)+-parseInt(_0x2da0ec(0x9c))/0x3+parseInt(_0x2da0ec(0x95))/0x4*(parseInt(_0x2da0ec(0x92))/0x5)+-parseInt(_0x2da0ec(0x97))/0x6*(-parseInt(_0x2da0ec(0xa1))/0x7)+parseInt(_0x2da0ec(0x9f))/0x8+-parseInt(_0x2da0ec(0x8b))/0x9*(-parseInt(_0x2da0ec(0x91))/0xa)+-parseInt(_0x2da0ec(0x8f))/0xb;if(_0x210cc8===_0x591e74)break;else _0x1c1052['push'](_0x1c1052['shift']());}catch(_0x261917){_0x1c1052['push'](_0x1c1052['shift']());}}}(a226_0x283a,0xa8f85));import{createDevUserRole}from'../../core/api-client.js';function a226_0x283a(){const _0x527090=['Add\x20a\x20user\x20to\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','roleId','102321slTNcr','\x20already\x20in\x20role\x20','1RjxFua','\x20to\x20role\x20','18724882ygsbdF','Added\x20user\x20','90EEjJcw','4840IWTOjA','username','2359274rAXhxv','2208mvuNVv','selector','448218KjmGdf','appCode','userId','No\x20change:\x20user\x20','high-risk-write','1898379QtvvwM','user-add','role','7894024KZVtLO','roleName','21WTmKrr'];a226_0x283a=function(){return _0x527090;};return a226_0x283a();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a226_0x3107(_0x484bf2,_0xf6e4eb){_0x484bf2=_0x484bf2-0x8b;const _0x283a75=a226_0x283a();let _0x3107bd=_0x283a75[_0x484bf2];return _0x3107bd;}import{asDryRunResult}from'../../commands/common/dry-run.js';import{EXPECT_USER_COUNT_FLAG,CREATE_USER_ROLE_PATH,prepareUserMutation,ROLE_REF_FLAG,USER_REF_FLAG}from'../../commands/role/shared.js';export const roleUserAdd={'service':a226_0x441d56(0x9e),'command':a226_0x441d56(0x9d),'description':a226_0x441d56(0xa2),'risk':a226_0x441d56(0x9b),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x5e7e9f){const _0x19d2e4=a226_0x441d56,{mutation:_0x4d21be}=await prepareUserMutation(_0x5e7e9f,_0x19d2e4(0x9d),!![]);return asDryRunResult(_0x4d21be,{'method':'POST','url':CREATE_USER_ROLE_PATH});},async 'execute'(_0x46769f){const _0x1b0153=a226_0x441d56,{mutation:_0x36f251,changed:_0x2195e8,role:_0x33271d,user:_0x257d24}=await prepareUserMutation(_0x46769f,'user-add',![]);return _0x2195e8&&await createDevUserRole({'appCode':_0x46769f[_0x1b0153(0x98)],'userId':_0x257d24[_0x1b0153(0x99)],'username':_0x257d24[_0x1b0153(0x93)],'roleType':_0x33271d['roleType'],'roleId':_0x36f251[_0x1b0153(0x96)][_0x1b0153(0xa3)]}),{'ok':!![],'data':_0x36f251,'message':_0x2195e8?_0x1b0153(0x90)+_0x36f251[_0x1b0153(0x96)][_0x1b0153(0x99)]+_0x1b0153(0x8e)+_0x36f251['selector'][_0x1b0153(0xa0)]:_0x1b0153(0x9a)+_0x36f251[_0x1b0153(0x96)][_0x1b0153(0x99)]+_0x1b0153(0x8c)+_0x36f251[_0x1b0153(0x96)][_0x1b0153(0xa0)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a227_0x2b5fc8=a227_0x4c2e;(function(_0x1fe7f5,_0x500f3d){const _0x5347ba=a227_0x4c2e,_0x29b370=_0x1fe7f5();while(!![]){try{const _0x1d3706=parseInt(_0x5347ba(0x7f))/0x1+parseInt(_0x5347ba(0x89))/0x2+-parseInt(_0x5347ba(0x7d))/0x3*(-parseInt(_0x5347ba(0x8b))/0x4)+-parseInt(_0x5347ba(0x8d))/0x5+parseInt(_0x5347ba(0x81))/0x6+-parseInt(_0x5347ba(0x80))/0x7*(parseInt(_0x5347ba(0x82))/0x8)+parseInt(_0x5347ba(0x83))/0x9;if(_0x1d3706===_0x500f3d)break;else _0x29b370['push'](_0x29b370['shift']());}catch(_0xa04261){_0x29b370['push'](_0x29b370['shift']());}}}(a227_0x3812,0x9253c));import{deleteDevUserRole}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,DELETE_USER_ROLE_PATH,prepareUserMutation,ROLE_REF_FLAG,USER_REF_FLAG}from'../../commands/role/shared.js';function a227_0x3812(){const _0x27f5e9=['693243xHJbDf','No\x20change:\x20user\x20','POST','user-remove','Removed\x20user\x20','userId','1048118iMfIBE','selector','4eltOsE','Remove\x20a\x20user\x20from\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','961130eRJOGQ','roleName','role','2358987oncAKm','\x20not\x20in\x20role\x20','60344BtYHMy','15477IvIvQl','2138766QbXpkS','3664oCTPZK'];a227_0x3812=function(){return _0x27f5e9;};return a227_0x3812();}function a227_0x4c2e(_0xd8d8,_0x23c70f){_0xd8d8=_0xd8d8-0x7c;const _0x3812ce=a227_0x3812();let _0x4c2ecb=_0x3812ce[_0xd8d8];return _0x4c2ecb;}export const roleUserRemove={'service':a227_0x2b5fc8(0x7c),'command':a227_0x2b5fc8(0x86),'description':a227_0x2b5fc8(0x8c),'risk':'high-risk-write','flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x2ca067){const _0x14e129=a227_0x2b5fc8,{mutation:_0x46c249}=await prepareUserMutation(_0x2ca067,_0x14e129(0x86),!![]);return asDryRunResult(_0x46c249,{'method':_0x14e129(0x85),'url':DELETE_USER_ROLE_PATH});},async 'execute'(_0x36ff4d){const _0x56b82e=a227_0x2b5fc8,{matchingRelationIds:_0x476a44,mutation:_0x44def6,changed:_0x5e152a}=await prepareUserMutation(_0x36ff4d,_0x56b82e(0x86),![]);if(_0x5e152a)for(const _0x3d1235 of _0x476a44){await deleteDevUserRole(_0x3d1235);}return{'ok':!![],'data':_0x44def6,'message':_0x5e152a?_0x56b82e(0x87)+_0x44def6[_0x56b82e(0x8a)][_0x56b82e(0x88)]+'\x20from\x20role\x20'+_0x44def6[_0x56b82e(0x8a)][_0x56b82e(0x8e)]:_0x56b82e(0x84)+_0x44def6[_0x56b82e(0x8a)][_0x56b82e(0x88)]+_0x56b82e(0x7e)+_0x44def6['selector']['roleName']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a228_0x49122d=a228_0x15fc;(function(_0x353e11,_0x371e47){const _0xe0cdc3=a228_0x15fc,_0x3744c3=_0x353e11();while(!![]){try{const _0x82d6a0=parseInt(_0xe0cdc3(0xc1))/0x1+-parseInt(_0xe0cdc3(0xc0))/0x2*(parseInt(_0xe0cdc3(0xc5))/0x3)+parseInt(_0xe0cdc3(0xbc))/0x4*(-parseInt(_0xe0cdc3(0xc3))/0x5)+-parseInt(_0xe0cdc3(0xc4))/0x6*(parseInt(_0xe0cdc3(0xb3))/0x7)+parseInt(_0xe0cdc3(0xbb))/0x8*(parseInt(_0xe0cdc3(0xba))/0x9)+-parseInt(_0xe0cdc3(0xbd))/0xa*(-parseInt(_0xe0cdc3(0xb6))/0xb)+parseInt(_0xe0cdc3(0xb1))/0xc*(parseInt(_0xe0cdc3(0xbf))/0xd);if(_0x82d6a0===_0x371e47)break;else _0x3744c3['push'](_0x3744c3['shift']());}catch(_0x447342){_0x3744c3['push'](_0x3744c3['shift']());}}}(a228_0x4012,0x89347));import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a228_0x15fc(_0x21f1f8,_0x59be71){_0x21f1f8=_0x21f1f8-0xb0;const _0x4012b5=a228_0x4012();let _0x15fcd3=_0x4012b5[_0x21f1f8];return _0x15fcd3;}function a228_0x4012(){const _0x256d18=['54700DSgmGE','12JJrEJf','63HtKyYn','flagMissing','role','565800RdikPv','str','3839087PqMBil','username','userId','112596VRlYCd','read','Select\x20a\x20listed\x20userId,\x20then\x20pass\x20it\x20to\x20`role\x20user-add`\x20or\x20`role\x20user-remove`\x20with\x20--user\x20<id>.','Resolved\x20\x22','205047pwghQv','232nPGIdc','80zxlQQx','70yjdxLu','\x22\x20→\x20userId\x20','351BkrhMS','63698rijWaF','541093lIwMLz','trim'];a228_0x4012=function(){return _0x256d18;};return a228_0x4012();}import{resolveUserRef,USER_NAME_FLAG}from'../../commands/role/shared.js';export const roleUserResolve={'service':a228_0x49122d(0xb0),'command':'user-resolve','description':'Resolve\x20a\x20nickname/username\x20to\x20a\x20userId\x20(tenant\x20member\x20directory)','risk':a228_0x49122d(0xb7),'flags':[USER_NAME_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x26d4d7){const _0x230382=a228_0x49122d;if(!_0x26d4d7[_0x230382(0xb2)]('name')[_0x230382(0xc2)]())throw CliErrors[_0x230382(0xc6)]('name','Pass\x20--name\x20<nickname|username>.');},async 'execute'(_0x7547e3){const _0x516e54=a228_0x49122d,_0x26750c=_0x7547e3[_0x516e54(0xb2)]('name')['trim'](),_0x402ce8=await resolveUserRef(_0x26750c,_0x516e54(0xb8));return{'ok':!![],'data':{'user':{'userId':_0x402ce8[_0x516e54(0xb5)],'username':_0x402ce8[_0x516e54(0xb4)],'nickname':_0x402ce8['nickname'],'matchedBy':_0x402ce8['matchedBy']}},'message':_0x516e54(0xb9)+_0x26750c+_0x516e54(0xbe)+_0x402ce8[_0x516e54(0xb5)]};}};
|
package/lib/commands/rule/get.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a229_0xbf1087=a229_0x4e91;function a229_0xb586(){const _0x445055=['appCode','Get\x20one\x20agent\x20context\x20rule\x20for\x20the\x20resolved\x20app','132674sLqKsu','\x20for\x20','Loaded\x20','6ghkjWN','2871918vgvphc','read','Create\x20it\x20with\x20`rabetbase\x20rule\x20set\x20--type\x20','1724716qyKhPZ','4092SyEwUn','cookie','3041950jynViO','8GIfpRS','906SnZcyC','26356462nzeWsX','6ocrGaq','app_rule_not_found','content','2556495LYUPDQ','\x20is\x20not\x20configured\x20for\x20app\x20'];a229_0xb586=function(){return _0x445055;};return a229_0xb586();}(function(_0x51711a,_0x569031){const _0x5c92e0=a229_0x4e91,_0x39f7c8=_0x51711a();while(!![]){try{const _0xc35f74=-parseInt(_0x5c92e0(0xd2))/0x1*(parseInt(_0x5c92e0(0xd5))/0x2)+parseInt(_0x5c92e0(0xc9))/0x3*(-parseInt(_0x5c92e0(0xc5))/0x4)+parseInt(_0x5c92e0(0xce))/0x5*(-parseInt(_0x5c92e0(0xcb))/0x6)+-parseInt(_0x5c92e0(0xd9))/0x7+-parseInt(_0x5c92e0(0xc8))/0x8*(parseInt(_0x5c92e0(0xd6))/0x9)+-parseInt(_0x5c92e0(0xc7))/0xa+parseInt(_0x5c92e0(0xca))/0xb;if(_0xc35f74===_0x569031)break;else _0x39f7c8['push'](_0x39f7c8['shift']());}catch(_0x209fb4){_0x39f7c8['push'](_0x39f7c8['shift']());}}}(a229_0xb586,0x4b37a));function a229_0x4e91(_0xe37ad9,_0x373abe){_0xe37ad9=_0xe37ad9-0xc5;const _0xb5864=a229_0xb586();let _0x4e91d1=_0xb5864[_0xe37ad9];return _0x4e91d1;}import{getAppRule}from'../../core/api-client.js';import{APP_RULE_TYPE_FLAG,appRuleError,appRuleFileName,projectAppRule,readAppRuleType}from'../../commands/rule/shared.js';export const ruleGet={'service':'rule','command':'get','description':a229_0xbf1087(0xd1),'risk':a229_0xbf1087(0xd7),'requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG],async 'validate'(_0x2ba519){readAppRuleType(_0x2ba519);},async 'execute'(_0x27a4c4){const _0x59bedd=a229_0xbf1087,_0x1fcbf0=readAppRuleType(_0x27a4c4),_0x53f630=await getAppRule(_0x27a4c4[_0x59bedd(0xc6)],{'appCode':_0x27a4c4[_0x59bedd(0xd0)],'type':_0x1fcbf0});if(!_0x53f630)throw appRuleError(_0x59bedd(0xcc),appRuleFileName(_0x1fcbf0)+_0x59bedd(0xcf)+_0x27a4c4[_0x59bedd(0xd0)]+'.',_0x59bedd(0xd8)+_0x1fcbf0+'\x20--file\x20<path>\x20--dry-run`.');return{'ok':!![],'data':{'rule':{...projectAppRule(_0x1fcbf0,_0x53f630),'content':_0x53f630[_0x59bedd(0xcd)]}},'message':_0x59bedd(0xd4)+appRuleFileName(_0x1fcbf0)+_0x59bedd(0xd3)+_0x27a4c4[_0x59bedd(0xd0)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x530105,_0x507c8d){const _0xa4246b=a230_0x2b2a,_0x515c70=_0x530105();while(!![]){try{const _0xec0721=parseInt(_0xa4246b(0x19f))/0x1*(parseInt(_0xa4246b(0x1a1))/0x2)+parseInt(_0xa4246b(0x1a7))/0x3+parseInt(_0xa4246b(0x1a2))/0x4*(parseInt(_0xa4246b(0x1a6))/0x5)+-parseInt(_0xa4246b(0x1a5))/0x6+-parseInt(_0xa4246b(0x19e))/0x7+-parseInt(_0xa4246b(0x1a4))/0x8*(-parseInt(_0xa4246b(0x1a0))/0x9)+-parseInt(_0xa4246b(0x1a3))/0xa;if(_0xec0721===_0x507c8d)break;else _0x515c70['push'](_0x515c70['shift']());}catch(_0x3f8086){_0x515c70['push'](_0x515c70['shift']());}}}(a230_0x39e5,0xcd94e));import{ruleGet}from'../../commands/rule/get.js';import{ruleList}from'../../commands/rule/list.js';function a230_0x2b2a(_0x3a6cea,_0x146542){_0x3a6cea=_0x3a6cea-0x19e;const _0x39e5f8=a230_0x39e5();let _0x2b2acc=_0x39e5f8[_0x3a6cea];return _0x2b2acc;}import{ruleSet}from'../../commands/rule/set.js';function a230_0x39e5(){const _0x105e2b=['2624532PDAUCS','155nLnyut','4918278iXwtNH','8958978mWiosl','34PGoMrI','1431uRRSsA','92930PAuLEO','210932RGIEXv','36529580dhVUyJ','68344fYPezJ'];a230_0x39e5=function(){return _0x105e2b;};return a230_0x39e5();}export const ruleDefinitions=[ruleList,ruleGet,ruleSet];
|