@lovrabet/rabetbase-cli 2.5.0-beta.4 → 2.5.0-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 +28 -0
- package/lib/api/api-doc.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/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-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/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/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/template.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/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/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/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/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.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/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/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/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.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 +1 -1
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a46_0x318a6c=a46_0x53ea;function a46_0x506d(){const _0x260ec8=['\x27\x5c\x27\x27','Async\x20task\x20','\x20--appcode\x20','16UwwibL','SUCCESS','string','\x20task\x20status\x20--task-id\x20','\x20response\x20did\x20not\x20contain\x20a\x20status.','\x20is\x20pending.','13801530PlcKle','apiError','10076034MdOlkE','2286QOpjIW','\x20is\x20processing.','has','taskId','10957131JLUhXh','errorMessage','Task\x20','status','1040418TKytrO','2649314HOSvhR','\x20--format\x20compress','FAILED','5omDuoK','314398FvJqYC','\x20failed.','toUpperCase','PENDING','PROCESSING','trim','\x20returned\x20unknown\x20status\x20','\x20failed:\x20','2352eDgGtZ'];a46_0x506d=function(){return _0x260ec8;};return a46_0x506d();}(function(_0x245dbd,_0x307553){const _0x29b255=a46_0x53ea,_0x4fe576=_0x245dbd();while(!![]){try{const _0x1e6225=parseInt(_0x29b255(0x7c))/0x1+-parseInt(_0x29b255(0x7d))/0x2+parseInt(_0x29b255(0x74))/0x3*(-parseInt(_0x29b255(0x89))/0x4)+parseInt(_0x29b255(0x80))/0x5*(parseInt(_0x29b255(0x95))/0x6)+-parseInt(_0x29b255(0x81))/0x7*(-parseInt(_0x29b255(0x8d))/0x8)+parseInt(_0x29b255(0x78))/0x9+-parseInt(_0x29b255(0x93))/0xa;if(_0x1e6225===_0x307553)break;else _0x4fe576['push'](_0x4fe576['shift']());}catch(_0x5e53ee){_0x4fe576['push'](_0x4fe576['shift']());}}}(a46_0x506d,0xd56c2));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set([a46_0x318a6c(0x8e),'FAILED']),NON_TERMINAL_STATUSES=new Set([a46_0x318a6c(0x84),a46_0x318a6c(0x85)]);export function normalizeAsyncTask(_0x19e541){const _0x4e1670=a46_0x318a6c,_0x5a3985=typeof _0x19e541?.[_0x4e1670(0x77)]===_0x4e1670(0x8f)?_0x19e541[_0x4e1670(0x77)]['trim']():'';if(!_0x5a3985)throw CliErrors[_0x4e1670(0x94)]('Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.');const _0x140676=typeof _0x19e541[_0x4e1670(0x7b)]===_0x4e1670(0x8f)?_0x19e541[_0x4e1670(0x7b)][_0x4e1670(0x86)]()[_0x4e1670(0x83)]():'';if(!_0x140676)throw CliErrors[_0x4e1670(0x94)](_0x4e1670(0x8b)+_0x5a3985+_0x4e1670(0x91));return{'taskId':_0x5a3985,'status':_0x140676,'errorMessage':typeof _0x19e541[_0x4e1670(0x79)]===_0x4e1670(0x8f)&&_0x19e541['errorMessage'][_0x4e1670(0x86)]()?_0x19e541[_0x4e1670(0x79)][_0x4e1670(0x86)]():null,'isTerminal':TERMINAL_STATUSES[_0x4e1670(0x76)](_0x140676),'knownStatus':TERMINAL_STATUSES[_0x4e1670(0x76)](_0x140676)||NON_TERMINAL_STATUSES[_0x4e1670(0x76)](_0x140676)};}export function buildAsyncTaskStatusCommand(_0x4be5f5,_0x3bd29e){const _0x202736=a46_0x318a6c;return CLI_BIN_NAME+_0x202736(0x90)+quoteShellArg(_0x4be5f5)+_0x202736(0x8c)+quoteShellArg(_0x3bd29e)+_0x202736(0x7e);}function a46_0x53ea(_0x2715a4,_0x39d19c){_0x2715a4=_0x2715a4-0x74;const _0x506db2=a46_0x506d();let _0x53ea04=_0x506db2[_0x2715a4];return _0x53ea04;}export function asyncTaskMessage(_0x307d61){const _0xa75213=a46_0x318a6c;switch(_0x307d61['status']){case _0xa75213(0x84):return _0xa75213(0x7a)+_0x307d61[_0xa75213(0x77)]+_0xa75213(0x92);case _0xa75213(0x85):return _0xa75213(0x7a)+_0x307d61[_0xa75213(0x77)]+_0xa75213(0x75);case'SUCCESS':return _0xa75213(0x7a)+_0x307d61[_0xa75213(0x77)]+'\x20completed\x20successfully.';case _0xa75213(0x7f):return _0x307d61[_0xa75213(0x79)]?_0xa75213(0x7a)+_0x307d61[_0xa75213(0x77)]+_0xa75213(0x88)+_0x307d61[_0xa75213(0x79)]:_0xa75213(0x7a)+_0x307d61[_0xa75213(0x77)]+_0xa75213(0x82);default:return'Task\x20'+_0x307d61[_0xa75213(0x77)]+_0xa75213(0x87)+_0x307d61['status']+'.';}}function quoteShellArg(_0x235bc8){const _0x307ef5=a46_0x318a6c;return'\x27'+_0x235bc8['replace'](/'/g,_0x307ef5(0x8a))+'\x27';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1b6dad,_0x2f3db6){var _0x313ee2=a47_0x4219,_0x2a2b6a=_0x1b6dad();while(!![]){try{var _0x1c9c48=parseInt(_0x313ee2(0xf7))/0x1+-parseInt(_0x313ee2(0xf9))/0x2*(parseInt(_0x313ee2(0xfc))/0x3)+-parseInt(_0x313ee2(0xf6))/0x4+-parseInt(_0x313ee2(0xf4))/0x5*(parseInt(_0x313ee2(0x100))/0x6)+parseInt(_0x313ee2(0xfe))/0x7*(-parseInt(_0x313ee2(0xf5))/0x8)+parseInt(_0x313ee2(0x101))/0x9+-parseInt(_0x313ee2(0xfb))/0xa*(-parseInt(_0x313ee2(0xf3))/0xb);if(_0x1c9c48===_0x2f3db6)break;else _0x2a2b6a['push'](_0x2a2b6a['shift']());}catch(_0x2a1def){_0x2a2b6a['push'](_0x2a2b6a['shift']());}}}(a47_0xc35b,0x690e4));function a47_0x4219(_0x4b849a,_0x4c8732){_0x4b849a=_0x4b849a-0xf3;var _0xc35b02=a47_0xc35b();var _0x421909=_0xc35b02[_0x4b849a];return _0x421909;}export function asDryRunResult(_0x1aa4d5,_0x10f7d1){var _0x1b69b5=a47_0x4219;return Object[_0x1b69b5(0xfa)](_0x1aa4d5,{'method':{'value':_0x10f7d1[_0x1b69b5(0xf8)],'enumerable':![]},'url':{'value':_0x10f7d1[_0x1b69b5(0xfd)],'enumerable':![]},..._0x10f7d1['description']?{'description':{'value':_0x10f7d1[_0x1b69b5(0xff)],'enumerable':![]}}:{}});}function a47_0xc35b(){var _0x4c01d2=['139557fynKZY','230hwWYcz','41880jYdJpG','306928OQrqUK','462475vacxJc','method','14HZmsOZ','defineProperties','40ukzbXV','137031NueBTs','url','49RFfQTE','description','66030eySfnJ','7707879hVbWBt'];a47_0xc35b=function(){return _0x4c01d2;};return a47_0xc35b();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a48_0x2fd2bb=a48_0x8045;(function(_0x11e44d,_0x7baba7){const _0x595e61=a48_0x8045,_0x5ee74d=_0x11e44d();while(!![]){try{const _0x37c8bd=-parseInt(_0x595e61(0xd9))/0x1*(parseInt(_0x595e61(0xe4))/0x2)+parseInt(_0x595e61(0xdb))/0x3*(-parseInt(_0x595e61(0xe3))/0x4)+parseInt(_0x595e61(0xce))/0x5*(-parseInt(_0x595e61(0xd8))/0x6)+-parseInt(_0x595e61(0xde))/0x7*(parseInt(_0x595e61(0xd3))/0x8)+-parseInt(_0x595e61(0xda))/0x9*(parseInt(_0x595e61(0xe1))/0xa)+parseInt(_0x595e61(0xd5))/0xb*(parseInt(_0x595e61(0xcf))/0xc)+parseInt(_0x595e61(0xdc))/0xd;if(_0x37c8bd===_0x7baba7)break;else _0x5ee74d['push'](_0x5ee74d['shift']());}catch(_0x1074e0){_0x5ee74d['push'](_0x5ee74d['shift']());}}}(a48_0x47d6,0x5288e));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':a48_0x2fd2bb(0xe6)};export const CODE_FLAG={'name':a48_0x2fd2bb(0xe2),'type':'string','required':!![],'description':a48_0x2fd2bb(0xcc),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':'datasetcode','description':'Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)'};function a48_0x47d6(){const _0x3c6123=['dbtype','66DLspda','appcode','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','3368196pdRQsx','1nrHnDw','45iyZHZx','66879HaAEqt','25539176WusiOB','skip-connection-test','4449382jETdBl','string','POSTGRESQL','549910mwZsDh','code','48EwgnsY','53402PBjYYj','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','5xtQGpy','279348lcvDUn','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','MYSQL','App\x20code\x20(e.g.\x20app-xxxxx)','8vdOGLx'];a48_0x47d6=function(){return _0x3c6123;};return a48_0x47d6();}export const SQLCODE_FLAG={'name':'sqlcode','type':'string','required':!![],'description':a48_0x2fd2bb(0xcd),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a48_0x2fd2bb(0xd0)}};export const APPCODE_FLAG_OPTIONAL={'name':a48_0x2fd2bb(0xd6),'type':a48_0x2fd2bb(0xdf),'required':![],'description':a48_0x2fd2bb(0xe5)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a48_0x2fd2bb(0xd2)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};function a48_0x8045(_0x3556c4,_0x2bc94a){_0x3556c4=_0x3556c4-0xcc;const _0x47d69e=a48_0x47d6();let _0x804520=_0x47d69e[_0x3556c4];return _0x804520;}export const DBLINK_ID_FLAG={'name':'id','type':'number','required':!![],'description':a48_0x2fd2bb(0xd7)};export const DB_TYPE_FLAG={'name':a48_0x2fd2bb(0xd4),'type':a48_0x2fd2bb(0xdf),'required':!![],'description':'Database\x20product\x20type','enum':[a48_0x2fd2bb(0xd1),a48_0x2fd2bb(0xe0)]};export const SKIP_CONNECTION_TEST_FLAG={'name':a48_0x2fd2bb(0xdd),'type':'boolean','description':'Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update'};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x35cf93,_0x53e756){const _0x51d6fa=a49_0x3de3,_0x409fd3=_0x35cf93();while(!![]){try{const _0x4cb16c=parseInt(_0x51d6fa(0x16c))/0x1+-parseInt(_0x51d6fa(0x171))/0x2+parseInt(_0x51d6fa(0x175))/0x3*(-parseInt(_0x51d6fa(0x179))/0x4)+parseInt(_0x51d6fa(0x176))/0x5*(-parseInt(_0x51d6fa(0x172))/0x6)+-parseInt(_0x51d6fa(0x16d))/0x7+parseInt(_0x51d6fa(0x17b))/0x8+parseInt(_0x51d6fa(0x174))/0x9;if(_0x4cb16c===_0x53e756)break;else _0x409fd3['push'](_0x409fd3['shift']());}catch(_0x30e40a){_0x409fd3['push'](_0x409fd3['shift']());}}}(a49_0x55f5,0x9445a));function a49_0x3de3(_0xc7a323,_0x3cb41e){_0xc7a323=_0xc7a323-0x16c;const _0x55f517=a49_0x55f5();let _0x3de3f5=_0x55f517[_0xc7a323];return _0x3de3f5;}function a49_0x55f5(){const _0x36f0a5=['983590hWtshc','1925028HuUwul','File\x20is\x20not\x20a\x20regular\x20file:\x20','5761206aczspF','3qbXQta','5BkIggG','ceil','validation','950248aeGsMz','isFile','2778512cEjhjJ','File\x20not\x20found:\x20','\x20path\x20is\x20required.','786869XCVIQa','817600GnMyIl','toFixed','trim','size'];a49_0x55f5=function(){return _0x36f0a5;};return a49_0x55f5();}import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x376b3){const _0x459e24=a49_0x3de3;if(_0x376b3>=BYTES_PER_MB){const _0x1a7a12=Math[_0x459e24(0x177)](_0x376b3/BYTES_PER_MB*0x64)/0x64;return _0x1a7a12[_0x459e24(0x16e)](0x2)+'\x20MB';}return _0x376b3+'\x20B';}export function requireDevelopmentUploadFile(_0x4b35c2,_0x4523c7){const _0x3f12f1=a49_0x3de3,_0x2980fe=_0x4b35c2[_0x3f12f1(0x16f)]();if(!_0x2980fe)throw CliErrors['validation'](_0x4523c7+_0x3f12f1(0x17d));if(!existsSync(_0x2980fe))throw CliErrors['validation'](_0x3f12f1(0x17c)+_0x2980fe);const _0x2587dc=statSync(_0x2980fe);if(!_0x2587dc[_0x3f12f1(0x17a)]())throw CliErrors[_0x3f12f1(0x178)](_0x3f12f1(0x173)+_0x2980fe);if(_0x2587dc[_0x3f12f1(0x170)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors['validation']('File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20'+_0x2980fe+'\x20('+formatBytes(_0x2587dc[_0x3f12f1(0x170)])+')');return{'path':_0x2980fe,'size':_0x2587dc[_0x3f12f1(0x170)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x106ff2,_0x4076aa){const _0x5beb2f=a50_0x1329,_0x2a221a=_0x106ff2();while(!![]){try{const _0x1f00d7=parseInt(_0x5beb2f(0x123))/0x1+-parseInt(_0x5beb2f(0x119))/0x2*(-parseInt(_0x5beb2f(0x122))/0x3)+parseInt(_0x5beb2f(0x11c))/0x4*(parseInt(_0x5beb2f(0x121))/0x5)+parseInt(_0x5beb2f(0x11b))/0x6*(-parseInt(_0x5beb2f(0x117))/0x7)+-parseInt(_0x5beb2f(0x11f))/0x8+parseInt(_0x5beb2f(0x118))/0x9+parseInt(_0x5beb2f(0x120))/0xa;if(_0x1f00d7===_0x4076aa)break;else _0x2a221a['push'](_0x2a221a['shift']());}catch(_0x19c302){_0x2a221a['push'](_0x2a221a['shift']());}}}(a50_0x4f1f,0x33903));export function validateAppcode(_0x43c4f1){const _0x1ac813=a50_0x1329,_0xdb8f40=_0x43c4f1[_0x1ac813(0x11e)]();if(!_0xdb8f40)return{'valid':![],'message':'App\x20Code\x20cannot\x20be\x20empty'};if(_0xdb8f40['length']>0x64)return{'valid':![],'message':_0x1ac813(0x11d)};if(!/^[A-Za-z0-9_-]+$/[_0x1ac813(0x11a)](_0xdb8f40))return{'valid':![],'message':_0x1ac813(0x116)};return{'valid':!![]};}function a50_0x1329(_0x5235b7,_0x134d1d){_0x5235b7=_0x5235b7-0x116;const _0x4f1f11=a50_0x4f1f();let _0x13295f=_0x4f1f11[_0x5235b7];return _0x13295f;}function a50_0x4f1f(){const _0x26f9f6=['259650gMvwMu','366308gXMcqW','App\x20Code\x20cannot\x20exceed\x20100\x20characters','trim','375184etPFaC','2996910mpLGvB','5pKpWfc','39TtxJmc','70391cYhJBz','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','56hRqcPu','1118925butpIV','2818bHASRJ','test'];a50_0x4f1f=function(){return _0x26f9f6;};return a50_0x4f1f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a51_0x36faac=a51_0x581b;(function(_0x4a2f5e,_0x2a4241){const _0x4aa61e=a51_0x581b,_0x6f7f84=_0x4a2f5e();while(!![]){try{const _0x1f914d=parseInt(_0x4aa61e(0x1c4))/0x1+parseInt(_0x4aa61e(0x1c9))/0x2+-parseInt(_0x4aa61e(0x1be))/0x3*(parseInt(_0x4aa61e(0x1c7))/0x4)+-parseInt(_0x4aa61e(0x1ca))/0x5*(-parseInt(_0x4aa61e(0x1c8))/0x6)+parseInt(_0x4aa61e(0x1b4))/0x7*(parseInt(_0x4aa61e(0x1c1))/0x8)+parseInt(_0x4aa61e(0x1b0))/0x9+-parseInt(_0x4aa61e(0x1c3))/0xa;if(_0x1f914d===_0x2a4241)break;else _0x6f7f84['push'](_0x6f7f84['shift']());}catch(_0x42652e){_0x6f7f84['push'](_0x6f7f84['shift']());}}}(a51_0x4e46,0xce625));import{CliErrors}from'../../errors.js';function a51_0x581b(_0x11ad1f,_0x4b9c23){_0x11ad1f=_0x11ad1f-0x1ad;const _0x4e4658=a51_0x4e46();let _0x581bdc=_0x4e4658[_0x11ad1f];return _0x581bdc;}import{CLI_BIN_NAME,isTopLevelConfigKey,readScopedConfig,resolveWriteScope,writeScopedConfig}from'../../commands/config/shared.js';const LEGACY_DELETABLE_KEYS=new Set([a51_0x36faac(0x1b9)]),EXTRA_DELETABLE_KEYS=new Set(['defaultApp']);function a51_0x4e46(){const _0x35eb59=['1078014krIOSY','Top-level\x20key\x20\x22','trim','1180hBAsrp','1146FnULgq','1017526hEJATq','1250wyTxfC','write','global','call','Delete\x20from\x20global\x20config\x20(~/.rabetbase.json)','5978664tzgoGv','key','Project','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','443086mCknrn','validation','delete','riskLevel','has','inherit','prototype','Use\x20workspace\x20commands\x20to\x20modify\x20apps\x20and\x20their\x20default\x20selection.','Top-level\x20config\x20key;\x20legacy\x20inherit\x20is\x20accepted\x20for\x20migration','bool','12744hnGNcV','args','Global','184gjQEYP','\x22\x20is\x20not\x20deletable.','16561680QXHBeO'];a51_0x4e46=function(){return _0x35eb59;};return a51_0x4e46();}async function execute(_0x16c364){const _0x4ac3d6=a51_0x36faac,_0x50d93e=_0x16c364[_0x4ac3d6(0x1bf)][0x0]?.[_0x4ac3d6(0x1c6)]();if(!_0x50d93e)throw CliErrors['validation']('Missing\x20key\x20argument.','Usage:\x20'+CLI_BIN_NAME+'\x20config\x20delete\x20<key>\x20[--global]');if(_0x50d93e===_0x4ac3d6(0x1b7))throw CliErrors[_0x4ac3d6(0x1b5)](_0x4ac3d6(0x1b3));if(!isTopLevelConfigKey(_0x50d93e)&&!EXTRA_DELETABLE_KEYS[_0x4ac3d6(0x1b8)](_0x50d93e)&&!LEGACY_DELETABLE_KEYS[_0x4ac3d6(0x1b8)](_0x50d93e))throw CliErrors[_0x4ac3d6(0x1b5)](_0x4ac3d6(0x1c5)+_0x50d93e+_0x4ac3d6(0x1c2),_0x4ac3d6(0x1bb));const _0x466a38=resolveWriteScope({'global':_0x16c364[_0x4ac3d6(0x1bd)](_0x4ac3d6(0x1ad))}),_0x555b30=readScopedConfig(_0x466a38),_0x3c2b9d=Object[_0x4ac3d6(0x1ba)]['hasOwnProperty'][_0x4ac3d6(0x1ae)](_0x555b30,_0x50d93e);_0x3c2b9d&&(delete _0x555b30[_0x50d93e],writeScopedConfig(_0x555b30,_0x466a38));const _0xce02b5=_0x466a38===_0x4ac3d6(0x1ad)?_0x4ac3d6(0x1c0):_0x4ac3d6(0x1b2);return{'ok':!![],'message':_0x3c2b9d?'✓\x20'+_0xce02b5+'\x20'+_0x50d93e+'\x20deleted':'✓\x20'+_0xce02b5+'\x20'+_0x50d93e+'\x20already\x20absent','data':{'key':_0x50d93e,'scope':_0x466a38,'changed':_0x3c2b9d}};}export const configDeleteDefinition={'service':'config','command':a51_0x36faac(0x1b6),'description':'Delete\x20a\x20config\x20value\x20from\x20one\x20scope','risk':a51_0x36faac(0x1cb),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a51_0x36faac(0x1b1),'description':a51_0x36faac(0x1bc),'required':!![]}],'flags':[{'name':a51_0x36faac(0x1ad),'type':'boolean','description':a51_0x36faac(0x1af),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a52_0x395137=a52_0x4a8c;(function(_0x14b649,_0x4e2b10){const _0x30873c=a52_0x4a8c,_0x5cf8a5=_0x14b649();while(!![]){try{const _0x3a6649=parseInt(_0x30873c(0x172))/0x1+parseInt(_0x30873c(0x17e))/0x2+-parseInt(_0x30873c(0x185))/0x3*(-parseInt(_0x30873c(0x176))/0x4)+-parseInt(_0x30873c(0x17a))/0x5*(parseInt(_0x30873c(0x181))/0x6)+parseInt(_0x30873c(0x173))/0x7+-parseInt(_0x30873c(0x178))/0x8*(parseInt(_0x30873c(0x180))/0x9)+-parseInt(_0x30873c(0x17d))/0xa;if(_0x3a6649===_0x4e2b10)break;else _0x5cf8a5['push'](_0x5cf8a5['shift']());}catch(_0x4a6d56){_0x5cf8a5['push'](_0x5cf8a5['shift']());}}}(a52_0x2ae0,0x590c7));import{CliErrors}from'../../errors.js';function a52_0x2ae0(){const _0x10e190=['818342KVJaQf','Missing\x20key.','9pkPcXE','4278rmJUnU','read','key','Usage:\x20','887613sSLIQY','app','Get\x20a\x20config\x20value\x20by\x20key','213425egJQgX','4698960nXwGAq','appcode','get','4QUCsWN','object','4903112DcYkVH','\x20config\x20get\x20--key\x20<key>','1200xdndvL','validation','string','4409950lZlwoW'];a52_0x2ae0=function(){return _0x10e190;};return a52_0x2ae0();}import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a52_0x4a8c(_0x132f6f,_0x216e97){_0x132f6f=_0x132f6f-0x170;const _0x2ae0f1=a52_0x2ae0();let _0x4a8c4f=_0x2ae0f1[_0x132f6f];return _0x4a8c4f;}import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x3f8f63){const _0x1a0dd6=a52_0x4a8c,_0x1cf69c=_0x3f8f63['str'](_0x1a0dd6(0x183));if(!_0x1cf69c)throw CliErrors['validation'](_0x1a0dd6(0x17f),_0x1a0dd6(0x184)+CLI_BIN_NAME+_0x1a0dd6(0x179));const _0x23293c=readConfig(),_0x262a4c=_0x1cf69c===_0x1a0dd6(0x170)?_0x1a0dd6(0x174):_0x1cf69c,_0x344d86=_0x23293c[_0x262a4c];if(_0x344d86===undefined)throw CliErrors[_0x1a0dd6(0x17b)]('Key\x20not\x20found:\x20'+_0x1cf69c);return{'ok':!![],'data':typeof _0x344d86==='object'?_0x344d86:{[_0x262a4c]:_0x344d86},'message':typeof _0x344d86===_0x1a0dd6(0x177)?undefined:String(_0x344d86)};}export const configGetDefinition={'service':'config','command':a52_0x395137(0x175),'description':a52_0x395137(0x171),'risk':a52_0x395137(0x182),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a52_0x395137(0x183),'type':a52_0x395137(0x17c),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x32bc18,_0x42f5aa){const _0x4b5d11=a53_0x4401,_0x2132ee=_0x32bc18();while(!![]){try{const _0x51d3ca=parseInt(_0x4b5d11(0x91))/0x1*(parseInt(_0x4b5d11(0x8e))/0x2)+parseInt(_0x4b5d11(0x90))/0x3+-parseInt(_0x4b5d11(0x97))/0x4+parseInt(_0x4b5d11(0x96))/0x5+-parseInt(_0x4b5d11(0x93))/0x6*(parseInt(_0x4b5d11(0x8f))/0x7)+-parseInt(_0x4b5d11(0x95))/0x8+-parseInt(_0x4b5d11(0x94))/0x9*(parseInt(_0x4b5d11(0x92))/0xa);if(_0x51d3ca===_0x42f5aa)break;else _0x2132ee['push'](_0x2132ee['shift']());}catch(_0x2cddbf){_0x2132ee['push'](_0x2132ee['shift']());}}}(a53_0x6b79,0x2e6fa));function a53_0x4401(_0x2f370a,_0x4cf3ba){_0x2f370a=_0x2f370a-0x8e;const _0x6b79a7=a53_0x6b79();let _0x44010d=_0x6b79a7[_0x2f370a];return _0x44010d;}import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';import{configDeleteDefinition}from'../../commands/config/delete.js';import{configInitDefinition}from'../../commands/config/init.js';export const configDefinitions=[configInitDefinition,configListDefinition,configGetDefinition,configSetDefinition,configDeleteDefinition];function a53_0x6b79(){const _0x11a147=['852423mcnjwY','3467sxdqHi','20sHizpK','35124zXisae','467595oovOSx','414352dzOJlV','1291230hkmVVE','1413396EzBcse','104tOzosR','28tJZPmH'];a53_0x6b79=function(){return _0x11a147;};return a53_0x6b79();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a54_0x4017(_0x5af0fb,_0x381777){_0x5af0fb=_0x5af0fb-0x96;const _0x4671a9=a54_0x4671();let _0x40178c=_0x4671a9[_0x5af0fb];return _0x40178c;}const a54_0x22e924=a54_0x4017;(function(_0x37bb61,_0x1fbd85){const _0x4b317f=a54_0x4017,_0xb57902=_0x37bb61();while(!![]){try{const _0x55c423=parseInt(_0x4b317f(0xb7))/0x1+parseInt(_0x4b317f(0x99))/0x2*(parseInt(_0x4b317f(0xae))/0x3)+-parseInt(_0x4b317f(0x96))/0x4*(parseInt(_0x4b317f(0xa5))/0x5)+-parseInt(_0x4b317f(0x9c))/0x6+-parseInt(_0x4b317f(0xbc))/0x7*(-parseInt(_0x4b317f(0x9d))/0x8)+parseInt(_0x4b317f(0xbf))/0x9+-parseInt(_0x4b317f(0xb9))/0xa;if(_0x55c423===_0x1fbd85)break;else _0xb57902['push'](_0xb57902['shift']());}catch(_0x1cadf7){_0xb57902['push'](_0xb57902['shift']());}}}(a54_0x4671,0x282d5));import{select}from'@inquirer/prompts';import{CliErrors}from'../../errors.js';import{readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{DOMAIN_CONFIG_FIELDS,LEGACY_DOMAIN_CONFIG_FIELDS,resolveDomainFlags}from'../../config/domain-config.js';import{DEFAULT_LOVRABET_REGION,ENABLED_LOVRABET_REGION_VALUES,isEnabledLovrabetRegion}from'../../constant/region.js';export const configInitFlags=[{'name':'region','type':a54_0x22e924(0xbe),'description':a54_0x22e924(0x9e),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},{'name':a54_0x22e924(0xac),'type':a54_0x22e924(0xbe),'description':a54_0x22e924(0xb1)},{'name':a54_0x22e924(0xa8),'type':a54_0x22e924(0xbe),'description':a54_0x22e924(0xc1)},{'name':a54_0x22e924(0xb8),'type':'string','description':a54_0x22e924(0xb4)},{'name':a54_0x22e924(0xa7),'type':'string','description':'Custom\x20Runtime\x20HTTPS\x20origin'},{'name':'skill-domain','type':a54_0x22e924(0xbe),'description':a54_0x22e924(0x9b)},{'name':'kb-domain','type':a54_0x22e924(0xbe),'description':a54_0x22e924(0xb5)},{'name':a54_0x22e924(0xb0),'type':a54_0x22e924(0xbe),'description':a54_0x22e924(0xa2)}];async function resolveRegion(_0x1a3642){const _0x15aa43=a54_0x22e924,_0x59392f=_0x1a3642['str'](_0x15aa43(0xb6));if(_0x59392f){if(!isEnabledLovrabetRegion(_0x59392f))throw CliErrors[_0x15aa43(0x98)](_0x15aa43(0xa3)+_0x59392f+_0x15aa43(0xaa),_0x15aa43(0xc4)+ENABLED_LOVRABET_REGION_VALUES['join'](',\x20'));return _0x59392f;}if(_0x1a3642[_0x15aa43(0xbb)])return DEFAULT_LOVRABET_REGION;try{return await select({'message':_0x15aa43(0xb2),'default':DEFAULT_LOVRABET_REGION,'choices':[{'name':_0x15aa43(0x9a),'value':'cn'},{'name':_0x15aa43(0xa9),'value':'id'}]});}catch(_0xaf939b){if(_0xaf939b?.[_0x15aa43(0xba)]===_0x15aa43(0xaf))throw CliErrors[_0x15aa43(0x97)]();throw _0xaf939b;}}export async function executeConfigInit(_0x2a78be){const _0x1412ef=a54_0x22e924,_0x2a9954=resolveDomainFlags(_0x2a78be),_0x2333f4=Object[_0x1412ef(0xc0)](_0x2a9954)[_0x1412ef(0xc3)]>0x0;if(_0x2333f4&&_0x2a78be[_0x1412ef(0xbd)](_0x1412ef(0xb6)))throw CliErrors[_0x1412ef(0x98)](_0x1412ef(0xa6));const _0x4f6d13=readScopedConfig(_0x1412ef(0x9f));for(const _0x14c58b of DOMAIN_CONFIG_FIELDS)delete _0x4f6d13[_0x14c58b];for(const _0x3d5352 of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x4f6d13[_0x3d5352];let _0x40fb1d=null;if(_0x2333f4)delete _0x4f6d13[_0x1412ef(0xb6)],Object[_0x1412ef(0xa1)](_0x4f6d13,_0x2a9954);else{_0x40fb1d=await resolveRegion(_0x2a78be);if(_0x40fb1d===DEFAULT_LOVRABET_REGION)delete _0x4f6d13[_0x1412ef(0xb6)];else _0x4f6d13[_0x1412ef(0xb6)]=_0x40fb1d;}return writeScopedConfig(_0x4f6d13,'global'),{'ok':!![],'message':_0x2333f4?_0x1412ef(0xab)+Object[_0x1412ef(0xc0)](_0x2a9954)[_0x1412ef(0xa0)](',\x20')+'.':'Rabetbase\x20connection\x20configured\x20for\x20region:\x20'+_0x40fb1d+'.','data':{'mode':_0x2333f4?'independent':'official','region':_0x40fb1d,'domains':_0x2a9954}};}function a54_0x4671(){const _0x185d72=['api-domain','1089710HLSCzy','name','nonInteractive','875yixxbo','str','string','1266498PONpIR','keys','Custom\x20User\x20HTTPS\x20origin','config','length','Available\x20regions:\x20','4456AQYwmb','cancelled','validation','1096XTNJqI','Mainland\x20China\x20(cn)','Custom\x20SkillHub\x20HTTPS\x20origin','1840542FxtSmW','20968OGORsK','Official\x20Lovrabet\x20region:\x20cn\x20or\x20id','global','join','assign','Custom\x20Lovrabet\x20workspace\x20HTTPS\x20origin','Region\x20\x22','Initialize\x20the\x20global\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','1295PIOMuZ','Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.','runtime-domain','user-domain','Indonesia\x20(id)','\x22\x20is\x20not\x20currently\x20available.','Rabetbase\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20','domain-config','write','741HYzAMn','ExitPromptError','app-domain','Independent-deployment\x20Domain\x20JSON\x20file','Select\x20Lovrabet\x20region','Updates\x20the\x20global\x20Rabetbase\x20region\x20or\x20independent-deployment\x20domain\x20configuration.\x20Cookie,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','Custom\x20platform\x20API\x20HTTPS\x20origin','Custom\x20knowledge-base\x20HTTPS\x20origin','region','265116YKWksP'];a54_0x4671=function(){return _0x185d72;};return a54_0x4671();}export const configInitDefinition={'service':a54_0x22e924(0xc2),'command':'init','description':a54_0x22e924(0xa4),'risk':a54_0x22e924(0xad),'confirmationDescription':a54_0x22e924(0xb3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a55_0x119a5e=a55_0x66c8;(function(_0xa17f42,_0x2c5b51){const _0x88c45f=a55_0x66c8,_0x153515=_0xa17f42();while(!![]){try{const _0x1ea79c=parseInt(_0x88c45f(0x142))/0x1+-parseInt(_0x88c45f(0x13c))/0x2+-parseInt(_0x88c45f(0x139))/0x3+-parseInt(_0x88c45f(0x13b))/0x4+parseInt(_0x88c45f(0x13d))/0x5+parseInt(_0x88c45f(0x13f))/0x6*(parseInt(_0x88c45f(0x143))/0x7)+parseInt(_0x88c45f(0x13a))/0x8*(-parseInt(_0x88c45f(0x138))/0x9);if(_0x1ea79c===_0x2c5b51)break;else _0x153515['push'](_0x153515['shift']());}catch(_0x38256d){_0x153515['push'](_0x153515['shift']());}}}(a55_0x166f,0xd3198));import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';function a55_0x66c8(_0x44b4c6,_0x3eb523){_0x44b4c6=_0x44b4c6-0x138;const _0x166f11=a55_0x166f();let _0x66c876=_0x166f11[_0x44b4c6];return _0x66c876;}function a55_0x166f(){const _0x4afc2e=['bool','426CjLPrw','boolean','global','1495436vBCHIz','56357mOtzHH','57654GpvzlB','496653FhotSG','392lDoXeV','4576388CksNJK','1439694XsiQDD','5704980AbckWF'];a55_0x166f=function(){return _0x4afc2e;};return a55_0x166f();}async function execute(_0x2445a1){const _0x1a1f71=a55_0x66c8,_0x2f57fc=_0x2445a1[_0x1a1f71(0x13e)]('global')?readScopedConfig(_0x1a1f71(0x141)):readConfig();return{'ok':!![],'data':_0x2f57fc};}export const configListDefinition={'service':'config','command':'list','description':'List\x20all\x20config\x20values','risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'global','type':a55_0x119a5e(0x140),'description':'Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a56_0x383948=a56_0x4670;(function(_0x380b5e,_0x14ccad){const _0x33232b=a56_0x4670,_0x16bddb=_0x380b5e();while(!![]){try{const _0x191adb=parseInt(_0x33232b(0x94))/0x1*(parseInt(_0x33232b(0xb8))/0x2)+-parseInt(_0x33232b(0xae))/0x3*(-parseInt(_0x33232b(0x9d))/0x4)+parseInt(_0x33232b(0xa3))/0x5*(parseInt(_0x33232b(0xa7))/0x6)+parseInt(_0x33232b(0xc3))/0x7+-parseInt(_0x33232b(0xa4))/0x8+parseInt(_0x33232b(0x9c))/0x9+parseInt(_0x33232b(0xa2))/0xa*(-parseInt(_0x33232b(0xab))/0xb);if(_0x191adb===_0x14ccad)break;else _0x16bddb['push'](_0x16bddb['shift']());}catch(_0x6a2941){_0x16bddb['push'](_0x16bddb['shift']());}}}(a56_0x4255,0x63491));import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';import{DOMAIN_CONFIG_FIELDS,normalizeDomainOrigin}from'../../config/domain-config.js';function a56_0x4670(_0x97e0cb,_0x5e8bb4){_0x97e0cb=_0x97e0cb-0x94;const _0x42551a=a56_0x4255();let _0x4670fc=_0x42551a[_0x97e0cb];return _0x4670fc;}function a56_0x4255(){const _0x3fb5d2=['includes','length','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','\x22.\x20Allowed:\x20','set','join','keys','Project','\x20set\x20to:\x20','Top-level\x20key\x20\x22','1970332woPRcz','apps','1PAkxih','riskLevel','string','env','Missing\x20key.','bool','value','validation','3438612LpLfcK','2553016DgpKNh','key','Invalid\x20value\x20for\x20\x22','global','appcode','1530SJIENn','2527690WMObmC','3900368dSCSbk','Missing\x20value.','app','6NeHvui','\x20(stored\x20as\x20a\x20single\x20app\x20profile)','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','103345lQfvKL','locale','`,\x20`','3TROPXR','Usage:\x20','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','\x20appcode\x20set\x20to:\x20','Invalid\x20locale\x20value.','Set\x20a\x20config\x20value','config','write','str','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','1048636NWdexS'];a56_0x4255=function(){return _0x3fb5d2;};return a56_0x4255();}async function execute(_0x4080a1){const _0x2cf3d1=a56_0x4670,_0x1491c9=_0x4080a1[_0x2cf3d1(0xb6)]('key'),_0x25ad38=_0x4080a1[_0x2cf3d1(0xb6)]('value');if(!_0x1491c9)throw CliErrors[_0x2cf3d1(0x9b)](_0x2cf3d1(0x98),_0x2cf3d1(0xaf)+CLI_BIN_NAME+_0x2cf3d1(0xb7));if(_0x25ad38===undefined||_0x25ad38==='')throw CliErrors['validation'](_0x2cf3d1(0xa5),_0x2cf3d1(0xaf)+CLI_BIN_NAME+_0x2cf3d1(0xb7));let _0x119dd2=_0x1491c9,_0x6a4f65=_0x25ad38;if(_0x25ad38[_0x2cf3d1(0xba)]>0x1f4)throw CliErrors[_0x2cf3d1(0x9b)]('Config\x20value\x20is\x20invalid\x20or\x20too\x20long.');if(_0x1491c9===_0x2cf3d1(0x95))throw CliErrors[_0x2cf3d1(0x9b)]('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(!isTopLevelConfigKey(_0x1491c9))throw CliErrors[_0x2cf3d1(0x9b)](_0x2cf3d1(0xc2)+_0x1491c9+'\x22\x20is\x20not\x20settable.','Settable\x20top-level\x20keys:\x20'+getTopLevelConfigKeySummary());if(CONFIG_ENUM_VALUES[_0x1491c9]&&!CONFIG_ENUM_VALUES[_0x1491c9][_0x2cf3d1(0xb9)](_0x25ad38))throw CliErrors[_0x2cf3d1(0x9b)](_0x2cf3d1(0x9f)+_0x1491c9+_0x2cf3d1(0xbc)+CONFIG_ENUM_VALUES[_0x1491c9][_0x2cf3d1(0xbe)](',\x20'));if(_0x1491c9==='locale'&&!normalizeLocale(_0x25ad38))throw CliErrors[_0x2cf3d1(0x9b)](_0x2cf3d1(0xb2),_0x2cf3d1(0xa9));DOMAIN_CONFIG_FIELDS[_0x2cf3d1(0xb9)](_0x1491c9)&&(_0x6a4f65=normalizeDomainOrigin(_0x1491c9,_0x25ad38));const _0x18bc03={'global':_0x4080a1[_0x2cf3d1(0x99)](_0x2cf3d1(0xa0))},_0x233593=resolveWriteScope(_0x18bc03),_0x13475a=readScopedConfig(_0x233593);_0x1491c9===_0x2cf3d1(0xa6)&&(_0x119dd2='appcode',delete _0x13475a[_0x2cf3d1(0xa6)]);_0x1491c9===_0x2cf3d1(0xac)&&(_0x6a4f65=normalizeLocale(_0x25ad38));if(_0x1491c9===_0x2cf3d1(0x97)){_0x6a4f65=normalizeEnv(_0x25ad38);if(!isProduction(_0x6a4f65)&&!isDaily(_0x6a4f65))throw CliErrors[_0x2cf3d1(0x9b)]('Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.',_0x2cf3d1(0xb0));}if(_0x1491c9===_0x2cf3d1(0xa1)){const _0x2960ca=_0x13475a[_0x2cf3d1(0xc4)]&&typeof _0x13475a[_0x2cf3d1(0xc4)]==='object'?Object[_0x2cf3d1(0xbf)](_0x13475a[_0x2cf3d1(0xc4)]):[];if(_0x2960ca['length']>0x0)throw CliErrors[_0x2cf3d1(0x9b)](_0x2cf3d1(0xbb),'Use\x20`'+CLI_BIN_NAME+'\x20workspace\x20add\x20<name>\x20--appcode\x20'+_0x6a4f65+_0x2cf3d1(0xad)+CLI_BIN_NAME+'\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.');const _0xa00a67=buildCanonicalProjectConfig({..._0x13475a},{'appCodes':[_0x6a4f65],'env':typeof _0x13475a['env']===_0x2cf3d1(0x96)?_0x13475a['env']:undefined});writeScopedConfig(_0xa00a67,_0x233593);const _0x421a88=_0x233593===_0x2cf3d1(0xa0)?'Global':_0x2cf3d1(0xc0);return{'ok':!![],'message':'✓\x20'+_0x421a88+_0x2cf3d1(0xb1)+_0x6a4f65+_0x2cf3d1(0xa8)};}_0x13475a[_0x119dd2]=_0x6a4f65,writeScopedConfig(_0x13475a,_0x233593);const _0x33755d=_0x233593==='global'?'Global':_0x2cf3d1(0xc0);return{'ok':!![],'message':'✓\x20'+_0x33755d+'\x20'+_0x119dd2+_0x2cf3d1(0xc1)+_0x6a4f65};}export const configSetDefinition={'service':a56_0x383948(0xb4),'command':a56_0x383948(0xbd),'description':a56_0x383948(0xb3),'risk':a56_0x383948(0xb5),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a56_0x383948(0x9e),'type':a56_0x383948(0x96),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a56_0x383948(0x9a),'type':a56_0x383948(0x96),'description':'Config\x20value','required':!![]},{'name':'global','type':'boolean','description':a56_0x383948(0xaa),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x202755,_0x3d37bf){var _0x1c0429=a57_0x3ef1,_0x37640d=_0x202755();while(!![]){try{var _0x4e7af7=-parseInt(_0x1c0429(0xf0))/0x1+-parseInt(_0x1c0429(0xfc))/0x2*(-parseInt(_0x1c0429(0xfb))/0x3)+-parseInt(_0x1c0429(0xf2))/0x4+parseInt(_0x1c0429(0xf4))/0x5*(-parseInt(_0x1c0429(0xf9))/0x6)+parseInt(_0x1c0429(0xf5))/0x7+parseInt(_0x1c0429(0xfa))/0x8+-parseInt(_0x1c0429(0xf7))/0x9*(parseInt(_0x1c0429(0xf8))/0xa);if(_0x4e7af7===_0x3d37bf)break;else _0x37640d['push'](_0x37640d['shift']());}catch(_0x8f5bfe){_0x37640d['push'](_0x37640d['shift']());}}}(a57_0x1a58,0xc6862));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export{CLI_BIN_NAME};function a57_0x1a58(){var _0x5e5d9f=['55CZdLFC','11254285RimyaZ','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','1936539ShUHUz','10wjNuHg','536592zJeieZ','2554864WJosWy','3219789gBtaRv','2jaNflm','33714BCIGZr','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','3818340lYInTs','project'];a57_0x1a58=function(){return _0x5e5d9f;};return a57_0x1a58();}export{normalizeLocale};function a57_0x3ef1(_0xef34b2,_0x237d9f){_0xef34b2=_0xef34b2-0xf0;var _0x1a5834=a57_0x1a58();var _0x3ef132=_0x1a5834[_0xef34b2];return _0x3ef132;}export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x5875ea){var _0x71735f=a57_0x3ef1;if(_0x5875ea['global'])return'global';if(!isInProject())throw CliErrors['validation'](_0x71735f(0xf6),_0x71735f(0xf1)+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20first.');return _0x71735f(0xf3);}export function readScopedConfig(_0x355f86){return readConfigFile(resolveWriteConfigPath(_0x355f86));}export function writeScopedConfig(_0x47965d,_0x54d048){writeConfigFile(resolveWriteConfigPath(_0x54d048),_0x47965d);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a58_0x31d537=a58_0x1c50;(function(_0x1f1d89,_0x108e9e){const _0x223249=a58_0x1c50,_0x1990cb=_0x1f1d89();while(!![]){try{const _0x142733=parseInt(_0x223249(0x69))/0x1*(parseInt(_0x223249(0x68))/0x2)+-parseInt(_0x223249(0x86))/0x3+parseInt(_0x223249(0xa1))/0x4+parseInt(_0x223249(0x6a))/0x5*(parseInt(_0x223249(0x96))/0x6)+-parseInt(_0x223249(0x85))/0x7*(-parseInt(_0x223249(0x8e))/0x8)+-parseInt(_0x223249(0x80))/0x9+-parseInt(_0x223249(0xa2))/0xa;if(_0x142733===_0x108e9e)break;else _0x1990cb['push'](_0x1990cb['shift']());}catch(_0x3c82ab){_0x1990cb['push'](_0x1990cb['shift']());}}}(a58_0x12a2,0xd8f66));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const BACKEND_PATH='/smartapi/question/er-config/business-group/edit',UNGROUPED_BUSINESS_GROUP='ungrouped';export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x55bdf2,input:_0x4b32a8,dryRun:_0xbb5951}){const _0x2e6d09=a58_0x1c50;validateInput(_0x4b32a8);const _0x7da147=normalizeBusinessGroupArgument(_0x4b32a8['businessGroup']),_0x736a52=await getDatasetDetail(_0x4b32a8[_0x2e6d09(0x79)]),_0x16da19=resolveBusinessGroupDataset(_0x736a52,_0x4b32a8[_0x2e6d09(0x79)]),_0x3a4f20=loadCurrentBusinessGroup(_0x736a52,_0x16da19);assertExpectedBusinessGroup(_0x3a4f20,_0x4b32a8['expectBusinessGroup']);const _0x2f021e=buildBackendPayload(_0x55bdf2,_0x16da19,_0x7da147),_0x11c902=_0x3a4f20!==_0x7da147;let _0x247b90;if(_0x11c902&&!_0xbb5951){await updateErBusinessGroup(_0x2f021e);const _0x2777cc=await getDatasetDetail(_0x16da19['code']),_0x4ef18f=resolveBusinessGroupDataset(_0x2777cc,_0x16da19[_0x2e6d09(0x79)]),_0x467121=loadCurrentBusinessGroup(_0x2777cc,_0x4ef18f);if(_0x467121!==_0x7da147)throw CliErrors[_0x2e6d09(0x6f)](_0x2e6d09(0x90),_0x2e6d09(0xa4)+JSON[_0x2e6d09(0x6b)](_0x7da147)+',\x20actual\x20'+JSON[_0x2e6d09(0x6b)](_0x467121)+'.');_0x247b90={'verified':!![],'status':_0x2e6d09(0x7c),'afterReadback':{'businessGroup':_0x467121}};}else!_0x11c902&&(_0x247b90={'verified':!![],'status':'unchanged','afterReadback':{'businessGroup':_0x3a4f20}});const _0x37e1aa={'operation':_0x2e6d09(0x93),'appCode':_0x55bdf2,'selector':{'code':_0x16da19[_0x2e6d09(0x79)]},'dataset':_0x16da19,'before':{'businessGroup':_0x3a4f20},'after':{'businessGroup':_0x7da147},'changed':_0x11c902,'dryRun':_0xbb5951,'submitted':_0x11c902&&!_0xbb5951,'backend':{'method':_0x2e6d09(0x9e),'path':BACKEND_PATH,'payload':_0x2f021e},..._0x247b90?{'verification':_0x247b90}:{},'warnings':[]};return{'ok':!![],'data':_0x37e1aa,'message':_0x11c902?_0xbb5951?_0x2e6d09(0x87)+_0x16da19[_0x2e6d09(0x79)]:'Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20'+_0x16da19[_0x2e6d09(0x79)]:_0x2e6d09(0xa0)+_0x16da19['code']};}function a58_0x1c50(_0x1c0feb,_0x280921){_0x1c0feb=_0x1c0feb-0x66;const _0x12a2a2=a58_0x12a2();let _0x1c50c0=_0x12a2a2[_0x1c0feb];return _0x1c50c0;}function a58_0x12a2(){const _0x5253bb=['--business-group\x20is\x20required','number','str','source','found','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed,\x20or\x20the\x20reserved\x20value\x20ungrouped\x20to\x20clear\x20it','POST','write','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','5543936FdCVqb','13506570VRbPSN','extend','Expected\x20','businessGroup','--code\x20is\x20required','datasetCode','429266xUoIhQ','1XHcuop','6921675oCTWfg','stringify','isArray','isFinite','dataset','apiError','object','call','parse','backend','validation','keys','modelId','message','dbtableConfig','code','METADATA','business-group-update','matched','appCode','prototype','string','1227411KMfzHH','trim','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','toUpperCase','value','2185162SiEQUT','2764212JNCzGA','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','datasetId','sourceType','Business\x20scenario\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.','modelCode','payload','hasOwnProperty','8txpmbF','expect-business-group','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','name','data','update','DB_TABLE','Expectation\x20mismatch\x20at\x20businessGroup','6PsPsxw','Update\x20business\x20scenario\x20group'];a58_0x12a2=function(){return _0x5253bb;};return a58_0x12a2();}export const datasetBusinessGroupUpdate={'service':'dataset','command':a58_0x31d537(0x7b),'description':a58_0x31d537(0x97),'risk':a58_0x31d537(0x9f),'flags':[CODE_FLAG,{'name':'business-group','type':a58_0x31d537(0x7f),'required':!![],'description':a58_0x31d537(0x9d)},{'name':a58_0x31d537(0x8f),'type':a58_0x31d537(0x7f),'required':![],'description':'Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3a4264){validateInput(readBusinessGroupUpdateInput(_0x3a4264));},async 'dryRun'(_0x1a0ba8){const _0x3d5170=a58_0x31d537,_0x51f374=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x1a0ba8[_0x3d5170(0x7d)],'input':readBusinessGroupUpdateInput(_0x1a0ba8),'dryRun':!![]});return{'method':_0x3d5170(0x9e),'url':BACKEND_PATH,'body':_0x51f374[_0x3d5170(0x92)][_0x3d5170(0x73)][_0x3d5170(0x8c)],'description':_0x51f374[_0x3d5170(0x77)],..._0x51f374[_0x3d5170(0x92)]};},async 'execute'(_0x1d9c83){return buildDatasetBusinessGroupUpdateResult({'appCode':_0x1d9c83['appCode'],'input':readBusinessGroupUpdateInput(_0x1d9c83),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x2f8ae7){const _0x5cf16d=a58_0x31d537,_0xf2db01=_0x2f8ae7[_0x5cf16d(0x9a)](_0x5cf16d(0x8f));return{'code':trim(_0x2f8ae7[_0x5cf16d(0x9a)]('code')),'businessGroup':_0x2f8ae7[_0x5cf16d(0x9a)]('business-group'),'expectBusinessGroup':_0xf2db01===undefined||_0xf2db01===''?undefined:_0xf2db01};}function validateInput(_0x2ef43f){const _0x1fb0e2=a58_0x31d537;if(!trim(_0x2ef43f[_0x1fb0e2(0x79)]))throw CliErrors[_0x1fb0e2(0x74)](_0x1fb0e2(0x66));if(_0x2ef43f[_0x1fb0e2(0xa5)]===undefined)throw CliErrors[_0x1fb0e2(0x74)](_0x1fb0e2(0x98));}function resolveBusinessGroupDataset(_0x21275d,_0x3d3303){const _0x88b78d=a58_0x31d537,_0x9e18fb=asPlainObject(_0x21275d[_0x88b78d(0x6e)]),_0x4e98fc=asPlainObject(_0x21275d[_0x88b78d(0x78)]),_0x2a4212=resolveSourceType(_0x21275d,_0x9e18fb,_0x4e98fc),_0x1dee90=firstString(_0x21275d[_0x88b78d(0x8b)],_0x21275d[_0x88b78d(0x79)],_0x9e18fb[_0x88b78d(0x67)],_0x3d3303)||_0x3d3303;return{'id':firstNumber(_0x21275d[_0x88b78d(0x76)],_0x21275d['id'],_0x9e18fb['datasetId'])??firstString(_0x21275d[_0x88b78d(0x76)],_0x21275d['id'],_0x9e18fb[_0x88b78d(0x88)])??null,'code':_0x1dee90,'name':firstString(_0x21275d[_0x88b78d(0x91)],_0x9e18fb['datasetName'],_0x9e18fb['name'])||null,'sourceType':_0x2a4212};}function resolveSourceType(_0x347aa4,_0x3277ce,_0x16d07c){const _0x18c5fd=a58_0x31d537,_0x4c58af=firstString(_0x347aa4[_0x18c5fd(0x9b)],_0x347aa4[_0x18c5fd(0x89)],_0x3277ce[_0x18c5fd(0x9b)],_0x3277ce[_0x18c5fd(0x89)])?.['trim']()[_0x18c5fd(0x83)]();if(_0x4c58af===_0x18c5fd(0x94)||_0x4c58af===_0x18c5fd(0x7a))return _0x4c58af;if(Object[_0x18c5fd(0x75)](_0x16d07c)['length']>0x0)return _0x18c5fd(0x94);throw CliErrors[_0x18c5fd(0x74)](_0x18c5fd(0x82));}function loadCurrentBusinessGroup(_0x146dfe,_0x2469f0){const _0x48ee5a=a58_0x31d537,_0x207aad=readBusinessGroupFromDatasetDetail(_0x146dfe,_0x2469f0[_0x48ee5a(0x89)]);if(_0x207aad[_0x48ee5a(0x9c)])return normalizeBusinessGroup(_0x207aad[_0x48ee5a(0x84)]);if(_0x2469f0[_0x48ee5a(0x89)]===_0x48ee5a(0x7a))return'';throw CliErrors[_0x48ee5a(0x74)]('Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.',_0x48ee5a(0x8a));}function readBusinessGroupFromDatasetDetail(_0x2e2f5a,_0x1744b5){const _0x113544=a58_0x31d537,_0x29c20d=asPlainObject(_0x2e2f5a[_0x113544(0x6e)]),_0x39b07a=firstPresent(_0x2e2f5a[_0x113544(0xa5)]);if(_0x39b07a[_0x113544(0x9c)])return _0x39b07a;const _0x128d9b=firstPresent(_0x29c20d[_0x113544(0xa5)]);if(_0x128d9b[_0x113544(0x9c)])return _0x128d9b;if(_0x1744b5===_0x113544(0x94))return{'found':![]};const _0xa26b82=readBusinessGroupFromExtend(_0x2e2f5a[_0x113544(0xa3)]);if(_0xa26b82[_0x113544(0x9c)])return _0xa26b82;return readBusinessGroupFromExtend(_0x29c20d[_0x113544(0xa3)]);}function readBusinessGroupFromExtend(_0x4ceb5f){const _0x5beba4=a58_0x31d537;if(_0x4ceb5f===undefined||_0x4ceb5f===null||_0x4ceb5f==='')return{'found':![]};if(typeof _0x4ceb5f==='string')try{const _0x7faa2f=JSON[_0x5beba4(0x72)](_0x4ceb5f);return readBusinessGroupFromExtend(_0x7faa2f);}catch{return{'found':![]};}const _0x23d41f=asPlainObject(_0x4ceb5f);if(Object[_0x5beba4(0x7e)][_0x5beba4(0x8d)][_0x5beba4(0x71)](_0x23d41f,_0x5beba4(0xa5)))return{'found':!![],'value':_0x23d41f[_0x5beba4(0xa5)]};return{'found':![]};}function firstPresent(..._0x119513){for(const _0x3f415a of _0x119513){if(_0x3f415a!==undefined&&_0x3f415a!==null)return{'found':!![],'value':_0x3f415a};}return{'found':![]};}function assertExpectedBusinessGroup(_0x4e42e2,_0x4c72ec){const _0x2f4105=a58_0x31d537;if(_0x4c72ec===undefined)return;const _0x4584d9=normalizeBusinessGroupArgument(_0x4c72ec);if(_0x4e42e2!==_0x4584d9)throw CliErrors[_0x2f4105(0x74)](_0x2f4105(0x95),_0x2f4105(0xa4)+JSON[_0x2f4105(0x6b)](_0x4584d9)+',\x20actual\x20'+JSON[_0x2f4105(0x6b)](_0x4e42e2));}function buildBackendPayload(_0x2f61b3,_0x33c6bd,_0x5e5ae6){const _0x49af49=a58_0x31d537;return{'appCode':_0x2f61b3,'datasetCode':_0x33c6bd[_0x49af49(0x79)],'businessGroup':_0x5e5ae6};}function normalizeBusinessGroup(_0x17d763){const _0x2678cd=a58_0x31d537;if(_0x17d763===undefined||_0x17d763===null)return'';return String(_0x17d763)[_0x2678cd(0x81)]();}function normalizeBusinessGroupArgument(_0x46a47b){const _0xc814a6=normalizeBusinessGroup(_0x46a47b);return _0xc814a6===UNGROUPED_BUSINESS_GROUP?'':_0xc814a6;}function asPlainObject(_0x46f655){const _0x2ec22e=a58_0x31d537;if(!_0x46f655||typeof _0x46f655!==_0x2ec22e(0x70)||Array[_0x2ec22e(0x6c)](_0x46f655))return{};return _0x46f655;}function firstString(..._0x5253fe){const _0x2ce427=a58_0x31d537;for(const _0x4e0c60 of _0x5253fe){if(typeof _0x4e0c60===_0x2ce427(0x7f)&&_0x4e0c60[_0x2ce427(0x81)]())return _0x4e0c60[_0x2ce427(0x81)]();if(typeof _0x4e0c60===_0x2ce427(0x99)&&Number[_0x2ce427(0x6d)](_0x4e0c60))return String(_0x4e0c60);}return undefined;}function firstNumber(..._0x151c50){const _0x47b113=a58_0x31d537;for(const _0x577122 of _0x151c50){if(typeof _0x577122===_0x47b113(0x99)&&Number['isFinite'](_0x577122))return _0x577122;if(typeof _0x577122===_0x47b113(0x7f)&&_0x577122[_0x47b113(0x81)]()&&Number['isFinite'](Number(_0x577122)))return Number(_0x577122);}return null;}function trim(_0x47a3eb){const _0x54e9d8=a58_0x31d537;return String(_0x47a3eb||'')[_0x54e9d8(0x81)]();}
|
|
1
|
+
const a58_0x3f0364=a58_0x3e8a;(function(_0x4ad3b6,_0x1a7b9c){const _0x4e0045=a58_0x3e8a,_0x3a60b6=_0x4ad3b6();while(!![]){try{const _0x36cdb3=parseInt(_0x4e0045(0x1bc))/0x1+parseInt(_0x4e0045(0x1d6))/0x2*(parseInt(_0x4e0045(0x1d5))/0x3)+parseInt(_0x4e0045(0x1e2))/0x4+parseInt(_0x4e0045(0x1a7))/0x5+-parseInt(_0x4e0045(0x1dd))/0x6*(parseInt(_0x4e0045(0x1d0))/0x7)+-parseInt(_0x4e0045(0x1ca))/0x8+-parseInt(_0x4e0045(0x1cb))/0x9;if(_0x36cdb3===_0x1a7b9c)break;else _0x3a60b6['push'](_0x3a60b6['shift']());}catch(_0x37c21b){_0x3a60b6['push'](_0x3a60b6['shift']());}}}(a58_0x36a4,0xbf737));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateErBusinessGroup}from'../../core/api-client.js';function a58_0x36a4(){const _0x1431ab=['No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','ungrouped','code','validation','10083vEpUwm','604JGxWCa','appCode','datasetId','Expected\x20','hasOwnProperty','isFinite','data','26214EcndRN','Business\x20scenario\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.','POST','write','matched','6229668EOULyW','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed,\x20or\x20the\x20reserved\x20value\x20ungrouped\x20to\x20clear\x20it','parse','--business-group\x20is\x20required','2703640szzfIg','DB_TABLE','extend','expect-business-group','found','str','/smartapi/question/er-config/business-group/edit','--code\x20is\x20required','business-group','backend','Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing','dataset','call','value','payload','Expectation\x20mismatch\x20at\x20businessGroup','trim','source','length','dbtableConfig','apiError','338012oYaZoN','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','string','message','businessGroup','stringify','modelCode','sourceType','datasetCode','number','datasetName','Update\x20business\x20scenario\x20group','name','9907224DVYdBo','9868941QVrsVN',',\x20actual\x20','METADATA','unchanged','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','532AfFcwb'];a58_0x36a4=function(){return _0x1431ab;};return a58_0x36a4();}import{CliErrors}from'../../errors.js';const BACKEND_PATH=a58_0x3f0364(0x1ad),UNGROUPED_BUSINESS_GROUP=a58_0x3f0364(0x1d2);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x36475b,input:_0x368204,dryRun:_0x15d4eb}){const _0x22d656=a58_0x3f0364;validateInput(_0x368204);const _0x4e111f=normalizeBusinessGroupArgument(_0x368204['businessGroup']),_0x4f52d2=await getDatasetDetail(_0x368204[_0x22d656(0x1d3)]),_0x5c790b=resolveBusinessGroupDataset(_0x4f52d2,_0x368204[_0x22d656(0x1d3)]),_0x27dc15=loadCurrentBusinessGroup(_0x4f52d2,_0x5c790b);assertExpectedBusinessGroup(_0x27dc15,_0x368204['expectBusinessGroup']);const _0x115a1b=buildBackendPayload(_0x36475b,_0x5c790b,_0x4e111f),_0x291997=_0x27dc15!==_0x4e111f;let _0x32bb4f;if(_0x291997&&!_0x15d4eb){await updateErBusinessGroup(_0x115a1b);const _0x12b209=await getDatasetDetail(_0x5c790b['code']),_0x4ab811=resolveBusinessGroupDataset(_0x12b209,_0x5c790b[_0x22d656(0x1d3)]),_0x3d572a=loadCurrentBusinessGroup(_0x12b209,_0x4ab811);if(_0x3d572a!==_0x4e111f)throw CliErrors[_0x22d656(0x1bb)](_0x22d656(0x1cf),_0x22d656(0x1d9)+JSON[_0x22d656(0x1c2)](_0x4e111f)+_0x22d656(0x1cc)+JSON[_0x22d656(0x1c2)](_0x3d572a)+'.');_0x32bb4f={'verified':!![],'status':_0x22d656(0x1e1),'afterReadback':{'businessGroup':_0x3d572a}};}else!_0x291997&&(_0x32bb4f={'verified':!![],'status':_0x22d656(0x1ce),'afterReadback':{'businessGroup':_0x27dc15}});const _0xafa9b6={'operation':'update','appCode':_0x36475b,'selector':{'code':_0x5c790b[_0x22d656(0x1d3)]},'dataset':_0x5c790b,'before':{'businessGroup':_0x27dc15},'after':{'businessGroup':_0x4e111f},'changed':_0x291997,'dryRun':_0x15d4eb,'submitted':_0x291997&&!_0x15d4eb,'backend':{'method':_0x22d656(0x1df),'path':BACKEND_PATH,'payload':_0x115a1b},..._0x32bb4f?{'verification':_0x32bb4f}:{},'warnings':[]};return{'ok':!![],'data':_0xafa9b6,'message':_0x291997?_0x15d4eb?_0x22d656(0x1bd)+_0x5c790b[_0x22d656(0x1d3)]:'Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20'+_0x5c790b[_0x22d656(0x1d3)]:_0x22d656(0x1d1)+_0x5c790b[_0x22d656(0x1d3)]};}export const datasetBusinessGroupUpdate={'service':a58_0x3f0364(0x1b2),'command':'business-group-update','description':a58_0x3f0364(0x1c8),'risk':a58_0x3f0364(0x1e0),'flags':[CODE_FLAG,{'name':a58_0x3f0364(0x1af),'type':'string','required':!![],'description':a58_0x3f0364(0x1e3)},{'name':a58_0x3f0364(0x1aa),'type':a58_0x3f0364(0x1bf),'required':![],'description':a58_0x3f0364(0x1b1)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3b9797){validateInput(readBusinessGroupUpdateInput(_0x3b9797));},async 'dryRun'(_0x109d6b){const _0x586b38=a58_0x3f0364,_0x2e295a=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x109d6b[_0x586b38(0x1d7)],'input':readBusinessGroupUpdateInput(_0x109d6b),'dryRun':!![]});return{'method':'POST','url':BACKEND_PATH,'body':_0x2e295a[_0x586b38(0x1dc)][_0x586b38(0x1b0)][_0x586b38(0x1b5)],'description':_0x2e295a[_0x586b38(0x1c0)],..._0x2e295a[_0x586b38(0x1dc)]};},async 'execute'(_0x58f305){const _0x4184d3=a58_0x3f0364;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x58f305[_0x4184d3(0x1d7)],'input':readBusinessGroupUpdateInput(_0x58f305),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x24b493){const _0x15cddd=a58_0x3f0364,_0x2ddbc7=_0x24b493[_0x15cddd(0x1ac)](_0x15cddd(0x1aa));return{'code':trim(_0x24b493['str'](_0x15cddd(0x1d3))),'businessGroup':_0x24b493[_0x15cddd(0x1ac)](_0x15cddd(0x1af)),'expectBusinessGroup':_0x2ddbc7===undefined||_0x2ddbc7===''?undefined:_0x2ddbc7};}function validateInput(_0x4c0a84){const _0x4ae2eb=a58_0x3f0364;if(!trim(_0x4c0a84[_0x4ae2eb(0x1d3)]))throw CliErrors[_0x4ae2eb(0x1d4)](_0x4ae2eb(0x1ae));if(_0x4c0a84['businessGroup']===undefined)throw CliErrors['validation'](_0x4ae2eb(0x1a6));}function resolveBusinessGroupDataset(_0x5cc217,_0xec4440){const _0x43e5b9=a58_0x3f0364,_0x577e3c=asPlainObject(_0x5cc217[_0x43e5b9(0x1b2)]),_0x4bf064=asPlainObject(_0x5cc217[_0x43e5b9(0x1ba)]),_0x232f4a=resolveSourceType(_0x5cc217,_0x577e3c,_0x4bf064),_0x1431bf=firstString(_0x5cc217[_0x43e5b9(0x1c3)],_0x5cc217[_0x43e5b9(0x1d3)],_0x577e3c[_0x43e5b9(0x1c5)],_0xec4440)||_0xec4440;return{'id':firstNumber(_0x5cc217['modelId'],_0x5cc217['id'],_0x577e3c['datasetId'])??firstString(_0x5cc217['modelId'],_0x5cc217['id'],_0x577e3c[_0x43e5b9(0x1d8)])??null,'code':_0x1431bf,'name':firstString(_0x5cc217[_0x43e5b9(0x1c9)],_0x577e3c[_0x43e5b9(0x1c7)],_0x577e3c[_0x43e5b9(0x1c9)])||null,'sourceType':_0x232f4a};}function resolveSourceType(_0x40a7d6,_0x5d0369,_0x57dd6a){const _0x4f12f3=a58_0x3f0364,_0x4fb66d=firstString(_0x40a7d6[_0x4f12f3(0x1b8)],_0x40a7d6[_0x4f12f3(0x1c4)],_0x5d0369[_0x4f12f3(0x1b8)],_0x5d0369[_0x4f12f3(0x1c4)])?.[_0x4f12f3(0x1b7)]()['toUpperCase']();if(_0x4fb66d===_0x4f12f3(0x1a8)||_0x4fb66d===_0x4f12f3(0x1cd))return _0x4fb66d;if(Object['keys'](_0x57dd6a)[_0x4f12f3(0x1b9)]>0x0)return _0x4f12f3(0x1a8);throw CliErrors[_0x4f12f3(0x1d4)](_0x4f12f3(0x1be));}function loadCurrentBusinessGroup(_0x2830bd,_0x22eb1f){const _0x1b474d=a58_0x3f0364,_0x54ba82=readBusinessGroupFromDatasetDetail(_0x2830bd,_0x22eb1f['sourceType']);if(_0x54ba82[_0x1b474d(0x1ab)])return normalizeBusinessGroup(_0x54ba82[_0x1b474d(0x1b4)]);if(_0x22eb1f[_0x1b474d(0x1c4)]===_0x1b474d(0x1cd))return'';throw CliErrors[_0x1b474d(0x1d4)]('Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.',_0x1b474d(0x1de));}function readBusinessGroupFromDatasetDetail(_0x3f0011,_0x41004f){const _0x59f08b=a58_0x3f0364,_0x3799b4=asPlainObject(_0x3f0011[_0x59f08b(0x1b2)]),_0x367da7=firstPresent(_0x3f0011[_0x59f08b(0x1c1)]);if(_0x367da7['found'])return _0x367da7;const _0x148280=firstPresent(_0x3799b4[_0x59f08b(0x1c1)]);if(_0x148280[_0x59f08b(0x1ab)])return _0x148280;if(_0x41004f===_0x59f08b(0x1a8))return{'found':![]};const _0x41311b=readBusinessGroupFromExtend(_0x3f0011[_0x59f08b(0x1a9)]);if(_0x41311b['found'])return _0x41311b;return readBusinessGroupFromExtend(_0x3799b4[_0x59f08b(0x1a9)]);}function readBusinessGroupFromExtend(_0x4909ad){const _0x31e5bd=a58_0x3f0364;if(_0x4909ad===undefined||_0x4909ad===null||_0x4909ad==='')return{'found':![]};if(typeof _0x4909ad===_0x31e5bd(0x1bf))try{const _0x514aba=JSON[_0x31e5bd(0x1e4)](_0x4909ad);return readBusinessGroupFromExtend(_0x514aba);}catch{return{'found':![]};}const _0x1f549e=asPlainObject(_0x4909ad);if(Object['prototype'][_0x31e5bd(0x1da)][_0x31e5bd(0x1b3)](_0x1f549e,_0x31e5bd(0x1c1)))return{'found':!![],'value':_0x1f549e[_0x31e5bd(0x1c1)]};return{'found':![]};}function firstPresent(..._0x5db198){for(const _0x240ad0 of _0x5db198){if(_0x240ad0!==undefined&&_0x240ad0!==null)return{'found':!![],'value':_0x240ad0};}return{'found':![]};}function a58_0x3e8a(_0x649732,_0xaf468c){_0x649732=_0x649732-0x1a6;const _0x36a4b9=a58_0x36a4();let _0x3e8ac8=_0x36a4b9[_0x649732];return _0x3e8ac8;}function assertExpectedBusinessGroup(_0x256648,_0x2bb2d7){const _0x5ace63=a58_0x3f0364;if(_0x2bb2d7===undefined)return;const _0x4a1599=normalizeBusinessGroupArgument(_0x2bb2d7);if(_0x256648!==_0x4a1599)throw CliErrors[_0x5ace63(0x1d4)](_0x5ace63(0x1b6),_0x5ace63(0x1d9)+JSON[_0x5ace63(0x1c2)](_0x4a1599)+_0x5ace63(0x1cc)+JSON[_0x5ace63(0x1c2)](_0x256648));}function buildBackendPayload(_0x3f3245,_0x18e166,_0x349851){const _0xc036fb=a58_0x3f0364;return{'appCode':_0x3f3245,'datasetCode':_0x18e166[_0xc036fb(0x1d3)],'businessGroup':_0x349851};}function normalizeBusinessGroup(_0x197f60){const _0x5b2326=a58_0x3f0364;if(_0x197f60===undefined||_0x197f60===null)return'';return String(_0x197f60)[_0x5b2326(0x1b7)]();}function normalizeBusinessGroupArgument(_0x112dfe){const _0x4ad919=normalizeBusinessGroup(_0x112dfe);return _0x4ad919===UNGROUPED_BUSINESS_GROUP?'':_0x4ad919;}function asPlainObject(_0x4f16e5){if(!_0x4f16e5||typeof _0x4f16e5!=='object'||Array['isArray'](_0x4f16e5))return{};return _0x4f16e5;}function firstString(..._0x91e6ff){const _0x41a288=a58_0x3f0364;for(const _0x453afc of _0x91e6ff){if(typeof _0x453afc===_0x41a288(0x1bf)&&_0x453afc[_0x41a288(0x1b7)]())return _0x453afc[_0x41a288(0x1b7)]();if(typeof _0x453afc===_0x41a288(0x1c6)&&Number[_0x41a288(0x1db)](_0x453afc))return String(_0x453afc);}return undefined;}function firstNumber(..._0x10a53f){const _0x54e438=a58_0x3f0364;for(const _0x52f46b of _0x10a53f){if(typeof _0x52f46b===_0x54e438(0x1c6)&&Number[_0x54e438(0x1db)](_0x52f46b))return _0x52f46b;if(typeof _0x52f46b===_0x54e438(0x1bf)&&_0x52f46b['trim']()&&Number[_0x54e438(0x1db)](Number(_0x52f46b)))return Number(_0x52f46b);}return null;}function trim(_0x236b64){const _0x57adff=a58_0x3f0364;return String(_0x236b64||'')[_0x57adff(0x1b7)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a59_0x551c(){const _0x4659d6=['num','dbid','3vmUUOC','76503GQWWsW','120468CDPblc','business-groups','1495769YwQDfR','20BvISby','25cFqZol','List\x20DB_TABLE\x20dataset\x20business\x20groups\x20for\x20a\x20database\x20connection;\x20does\x20not\x20include\x20METADATA','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','89042rTdfIr','1156280ZwfPis','number','1339898clBqri','dataset','1012264eTGuht','9cVkqui','DB_TABLE','\x20business\x20group(s)\x20for\x20database\x20connection\x20','read'];a59_0x551c=function(){return _0x4659d6;};return a59_0x551c();}const a59_0x23cd4e=a59_0xd3c5;(function(_0xb0cfb5,_0x527e48){const _0x54bd42=a59_0xd3c5,_0x42e2e1=_0xb0cfb5();while(!![]){try{const _0x503ee0=parseInt(_0x54bd42(0x10a))/0x1+-parseInt(_0x54bd42(0xfd))/0x2+-parseInt(_0x54bd42(0x109))/0x3*(-parseInt(_0x54bd42(0x102))/0x4)+parseInt(_0x54bd42(0xfa))/0x5*(parseInt(_0x54bd42(0x10b))/0x6)+parseInt(_0x54bd42(0x100))/0x7+-parseInt(_0x54bd42(0xfe))/0x8*(parseInt(_0x54bd42(0x103))/0x9)+-parseInt(_0x54bd42(0x10e))/0xa*(parseInt(_0x54bd42(0x10d))/0xb);if(_0x503ee0===_0x527e48)break;else _0x42e2e1['push'](_0x42e2e1['shift']());}catch(_0x30d854){_0x42e2e1['push'](_0x42e2e1['shift']());}}}(a59_0x551c,0x27267));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getErBusinessGroupSummary}from'../../core/api-client.js';function a59_0xd3c5(_0x34b35f,_0x102374){_0x34b35f=_0x34b35f-0xfa;const _0x551c49=a59_0x551c();let _0xd3c5ab=_0x551c49[_0x34b35f];return _0xd3c5ab;}export const datasetBusinessGroups={'service':a59_0x23cd4e(0x101),'command':a59_0x23cd4e(0x10c),'description':a59_0x23cd4e(0xfb),'risk':a59_0x23cd4e(0x106),'flags':[{'name':a59_0x23cd4e(0x108),'type':a59_0x23cd4e(0xff),'required':!![],'description':a59_0x23cd4e(0xfc)},APPCODE_FLAG_OPTIONAL],async 'execute'(_0x3752a2){const _0x211dc1=a59_0x23cd4e,_0x339873=_0x3752a2[_0x211dc1(0x107)]('dbid'),_0x30ff43=await getErBusinessGroupSummary(_0x3752a2['appCode'],_0x339873);return{'ok':!![],'data':{..._0x30ff43,'scope':_0x211dc1(0x104)},'message':'Found\x20'+_0x30ff43['groups']['length']+_0x211dc1(0x105)+_0x339873};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a60_0x565e9a=a60_0x197f;(function(_0x1afb3d,_0x439d84){const _0x42fade=a60_0x197f,_0x6d7c27=_0x1afb3d();while(!![]){try{const _0x5bc1e6=parseInt(_0x42fade(0x107))/0x1+parseInt(_0x42fade(0x114))/0x2*(-parseInt(_0x42fade(0x10d))/0x3)+parseInt(_0x42fade(0x109))/0x4+-parseInt(_0x42fade(0x120))/0x5*(-parseInt(_0x42fade(0x122))/0x6)+parseInt(_0x42fade(0x10e))/0x7*(parseInt(_0x42fade(0x10c))/0x8)+parseInt(_0x42fade(0x125))/0x9+-parseInt(_0x42fade(0x106))/0xa;if(_0x5bc1e6===_0x439d84)break;else _0x6d7c27['push'](_0x6d7c27['shift']());}catch(_0x193154){_0x6d7c27['push'](_0x6d7c27['shift']());}}}(a60_0x2264,0x366b0));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a60_0x565e9a(0x118),'filter':a60_0x565e9a(0x115),'getOne':a60_0x565e9a(0x10f)};function a60_0x2264(){const _0x1a00d8=['filter','dbtableConfig','getOne','modelCode','Reason:\x20schema\x20introspection\x20and\x20custom\x20SQL\x20require\x20source=DB_TABLE,\x20dbtableConfig.dbId,\x20dbtableConfig.tableName,\x20and\x20a\x20database\x20connection\x20context.','dbtable','\x20and\x20has\x20no\x20DB_TABLE\x20data-source\x20context\x20for\x20','95wpdhLj','object','139284KnKlZG','join','SQL\x20schema\x20validation','2626479qzFgVS','METADATA','validation','To\x20inspect\x20real\x20runtime\x20rows,\x20switch\x20to\x20lovrabet\x20CLI:\x20','dbId','Upgrade\x20or\x20migrate\x20this\x20dataset\x20to\x20a\x20DB_TABLE\x20dataset,\x20then\x20continue\x20with\x20the\x20new\x20dataset\x20code.','5416850eFyKjk','68135HLXXar','source','351716dfyhiX','datasetCode','tableName','14984pvzMbu','21peveVk','826FcCuNj','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','The\x20current\x20dataset\x20\x22','UNKNOWN','dataset','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','98684nKfiLJ','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','datasetName','\x20is\x20','lovrabet'];a60_0x2264=function(){return _0x1a00d8;};return a60_0x2264();}function a60_0x197f(_0x15d690,_0x2206e8){_0x15d690=_0x15d690-0x101;const _0x2264f9=a60_0x2264();let _0x197f48=_0x2264f9[_0x15d690];return _0x197f48;}export const RUNTIME_DATA_ACCESS_SUMMARY=a60_0x565e9a(0x113);function valueToString(_0x4bbf36){return _0x4bbf36==null?'':String(_0x4bbf36)['trim']();}function getDatasetCode(_0x48c5e4){const _0x5bdb8f=a60_0x565e9a;return valueToString(_0x48c5e4['code']??_0x48c5e4[_0x5bdb8f(0x11c)]??_0x48c5e4[_0x5bdb8f(0x112)]?.[_0x5bdb8f(0x10a)]);}function getDatasetName(_0x1ee976){const _0x31cda0=a60_0x565e9a;return valueToString(_0x1ee976['name']??_0x1ee976[_0x31cda0(0x112)]?.[_0x31cda0(0x116)])||'unknown';}function getDatasetSource(_0x2557f7){const _0x4cfc3c=a60_0x565e9a;return valueToString(_0x2557f7[_0x4cfc3c(0x108)]??_0x2557f7['dataset']?.['sourceType'])['toUpperCase']();}function getDbtableConfig(_0x13300d){const _0x4863cc=a60_0x565e9a,_0x115e42=_0x13300d[_0x4863cc(0x11a)]??_0x13300d[_0x4863cc(0x11e)];return _0x115e42&&typeof _0x115e42===_0x4863cc(0x121)?_0x115e42:{};}export function isDbTableBackedDataset(_0x4ffef6){const _0x1b97bb=a60_0x565e9a,_0x7eeb1f=getDatasetSource(_0x4ffef6);if(_0x7eeb1f===_0x1b97bb(0x101))return![];const _0x481b52=getDbtableConfig(_0x4ffef6),_0x19f2fe=_0x481b52[_0x1b97bb(0x104)]??_0x481b52['id'],_0x5734c3=valueToString(_0x481b52[_0x1b97bb(0x10b)]??_0x4ffef6['tableName']??_0x4ffef6[_0x1b97bb(0x112)]?.[_0x1b97bb(0x10b)]);return _0x19f2fe!==undefined&&_0x19f2fe!==null&&_0x5734c3['length']>0x0;}export function filterDbTableBackedDatasets(_0x12de33){const _0x33f6bb=a60_0x565e9a;return _0x12de33[_0x33f6bb(0x119)](_0x56d3e3=>isDbTableBackedDataset(_0x56d3e3));}export function buildDbTableBackedRequirementMessage(_0x15b2a7,_0x40d5b6=a60_0x565e9a(0x124)){const _0x252bb3=a60_0x565e9a,_0x59ef63=getDatasetSource(_0x15b2a7)||_0x252bb3(0x111),_0x4bd9d3=getDatasetName(_0x15b2a7),_0x26adc3=getDatasetCode(_0x15b2a7),_0x578678=_0x26adc3?'\x20('+_0x26adc3+')':'';return[_0x252bb3(0x110)+_0x4bd9d3+'\x22'+_0x578678+_0x252bb3(0x117)+_0x59ef63+_0x252bb3(0x11f)+_0x40d5b6+'.',_0x252bb3(0x11d),_0x252bb3(0x105),_0x252bb3(0x103)+RUNTIME_DATA_ACCESS_COMMANDS['filter']+';\x20'+RUNTIME_DATA_ACCESS_COMMANDS[_0x252bb3(0x11b)]+'.'][_0x252bb3(0x123)]('\x20');}export function assertDatasetIsDbTableBacked(_0x43ae67,_0x255008){const _0x12e6f5=a60_0x565e9a;if(!isDbTableBackedDataset(_0x43ae67))throw CliErrors[_0x12e6f5(0x102)](buildDbTableBackedRequirementMessage(_0x43ae67,_0x255008));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a61_0x5f0ddb=a61_0x3405;(function(_0x2a4340,_0x3c0cf6){const _0x220e74=a61_0x3405,_0x104850=_0x2a4340();while(!![]){try{const _0x32a6d2=parseInt(_0x220e74(0x11c))/0x1*(parseInt(_0x220e74(0xf5))/0x2)+-parseInt(_0x220e74(0xf3))/0x3*(-parseInt(_0x220e74(0xef))/0x4)+-parseInt(_0x220e74(0x105))/0x5+-parseInt(_0x220e74(0x11d))/0x6*(-parseInt(_0x220e74(0xfc))/0x7)+parseInt(_0x220e74(0xe9))/0x8+parseInt(_0x220e74(0x11b))/0x9*(-parseInt(_0x220e74(0xfe))/0xa)+parseInt(_0x220e74(0x110))/0xb*(-parseInt(_0x220e74(0x10d))/0xc);if(_0x32a6d2===_0x3c0cf6)break;else _0x104850['push'](_0x104850['shift']());}catch(_0x47d80a){_0x104850['push'](_0x104850['shift']());}}}(a61_0x2cae,0xd7a21));import{deleteDataset,getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a61_0x3405(_0x3604ad,_0x271339){_0x3604ad=_0x3604ad-0xe2;const _0x2cae88=a61_0x2cae();let _0x3405f5=_0x2cae88[_0x3604ad];return _0x3405f5;}import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DATASET_ID_FLAG={'name':'id','type':a61_0x5f0ddb(0xeb),'description':'Dataset\x20id'},DBID_FLAG={'name':a61_0x5f0ddb(0xe5),'type':a61_0x5f0ddb(0xeb),'description':'Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id'},CONFIRM_FLAG={'name':'confirm','type':'boolean','description':a61_0x5f0ddb(0xe8)},CASCADE_FLAG={'name':a61_0x5f0ddb(0xfb),'type':'boolean','description':a61_0x5f0ddb(0xf6)},EXPECTED_COUNT_FLAG={'name':a61_0x5f0ddb(0xfa),'type':a61_0x5f0ddb(0xeb),'description':a61_0x5f0ddb(0xff)};export const datasetDelete={'service':'dataset','command':a61_0x5f0ddb(0xf1),'description':a61_0x5f0ddb(0x101),'risk':a61_0x5f0ddb(0xf8),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CASCADE_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x200fc0){const _0x1e4e05=a61_0x5f0ddb,_0x238ba7=_0x200fc0[_0x1e4e05(0xf7)]('id'),_0x49f467=_0x200fc0['str']('code'),_0x157042=_0x200fc0[_0x1e4e05(0xf7)]('dbid'),_0x1bcc78=[_0x238ba7>0x0,Boolean(_0x49f467),_0x157042>0x0][_0x1e4e05(0xfd)](Boolean);if(_0x1bcc78[_0x1e4e05(0xf9)]===0x0)throw CliErrors[_0x1e4e05(0x116)](_0x1e4e05(0x10e));if(_0x1bcc78[_0x1e4e05(0xf9)]>0x1)throw CliErrors[_0x1e4e05(0x116)]('Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.');},async 'dryRun'(_0x32e791){const _0x5bb48=a61_0x5f0ddb,_0x4b88e2=await resolveTargets(_0x32e791),_0x5aa897=_0x32e791[_0x5bb48(0x113)]('cascade');return{'method':_0x5bb48(0xe6),'url':_0x5bb48(0xec)+(_0x5aa897?'true':'false'),'body':{'count':_0x4b88e2['length'],'cascade':_0x5aa897,'datasets':_0x4b88e2},'description':_0x5aa897?_0x5bb48(0x118)+_0x4b88e2[_0x5bb48(0xf9)]+_0x5bb48(0x115):_0x5bb48(0xe4)+_0x4b88e2[_0x5bb48(0xf9)]+_0x5bb48(0xea)};},async 'execute'(_0x4fcdfa){const _0x5a3c22=a61_0x5f0ddb;if(!_0x4fcdfa[_0x5a3c22(0x113)]('confirm'))throw CliErrors[_0x5a3c22(0x116)](_0x5a3c22(0xf0),_0x5a3c22(0x10a));const _0x4979d6=await resolveTargets(_0x4fcdfa),_0x294f71=_0x4fcdfa[_0x5a3c22(0x113)](_0x5a3c22(0xfb)),_0x5c48e2=[],_0x16e1e7=[];for(const _0x3b3af8 of _0x4979d6){try{await deleteDataset(_0x3b3af8['id'],_0x294f71),_0x5c48e2[_0x5a3c22(0xe7)](_0x3b3af8);}catch(_0x47285d){_0x16e1e7[_0x5a3c22(0xe7)]({..._0x3b3af8,'error':_0x47285d instanceof Error?_0x47285d[_0x5a3c22(0x111)]:String(_0x47285d)});}}if(_0x16e1e7[_0x5a3c22(0xf9)]>0x0){const _0x39354a=buildPageRestoreCommands(_0x4fcdfa['appCode'],_0x294f71?_0x5c48e2:[]);return{'ok':![],'data':{'requested':_0x4979d6[_0x5a3c22(0xf9)],'cascade':_0x294f71,'deletedCount':_0x5c48e2[_0x5a3c22(0xf9)],'failedCount':_0x16e1e7[_0x5a3c22(0xf9)],'deleted':_0x5c48e2,'failed':_0x16e1e7,'pageRestoreCommands':_0x39354a},'message':'Deleted\x20'+_0x5c48e2[_0x5a3c22(0xf9)]+'/'+_0x4979d6['length']+_0x5a3c22(0x119)+_0x16e1e7[_0x5a3c22(0xf9)]+'\x20failed'};}return{'ok':!![],'data':{'requested':_0x4979d6[_0x5a3c22(0xf9)],'cascade':_0x294f71,'deletedCount':_0x5c48e2[_0x5a3c22(0xf9)],'deleted':_0x5c48e2,'pageRestoreCommands':buildPageRestoreCommands(_0x4fcdfa[_0x5a3c22(0x112)],_0x294f71?_0x5c48e2:[])},'message':_0x5a3c22(0x100)+_0x5c48e2[_0x5a3c22(0xf9)]+'\x20dataset(s)'};}};async function resolveTargets(_0x4a6ae9){const _0x575ee6=a61_0x5f0ddb,_0x8fa139=_0x4a6ae9[_0x575ee6(0xf7)]('id'),_0x5a64ec=_0x4a6ae9[_0x575ee6(0x104)]('code'),_0x504769=_0x4a6ae9[_0x575ee6(0xf7)](_0x575ee6(0xe5));let _0x3bf53d;_0x5a64ec?(_0x3bf53d=await listDatasets(_0x4a6ae9[_0x575ee6(0x112)],{'code':_0x5a64ec}),_0x3bf53d=_0x3bf53d[_0x575ee6(0xfd)](_0x3d0dbd=>_0x3d0dbd[_0x575ee6(0x114)]===_0x5a64ec)):(_0x3bf53d=await listDatasets(_0x4a6ae9[_0x575ee6(0x112)]),_0x8fa139>0x0&&(_0x3bf53d=_0x3bf53d['filter'](_0x26430e=>_0x26430e['id']===_0x8fa139)),_0x504769>0x0&&(_0x3bf53d=_0x3bf53d[_0x575ee6(0xfd)](_0x1a995b=>_0x1a995b[_0x575ee6(0xed)]?.['dbId']===_0x504769)));const _0x4e2afb=[];for(const _0x2bf086 of _0x3bf53d){const _0x15b253=await getDatasetDetail(_0x2bf086[_0x575ee6(0x114)]),_0x444f03=Array[_0x575ee6(0x107)](_0x15b253['relatedPageInfoList'])?_0x15b253['relatedPageInfoList'][_0x575ee6(0xfd)](_0x35c6ba=>_0x35c6ba!=null&&typeof _0x35c6ba===_0x575ee6(0xee)&&_0x35c6ba[_0x575ee6(0x117)]!==!![]):[];_0x4e2afb[_0x575ee6(0xe7)](normalizeTarget(_0x2bf086,_0x444f03));}if(_0x4e2afb['length']===0x0){const _0x4eaa46=_0x5a64ec||(_0x8fa139>0x0?'id='+_0x8fa139:'dbid='+_0x504769);throw CliErrors['validation'](_0x575ee6(0x11a)+_0x4eaa46+'.');}const _0x228978=_0x4a6ae9[_0x575ee6(0xf7)](_0x575ee6(0xfa));if(_0x228978>0x0&&_0x4e2afb[_0x575ee6(0xf9)]!==_0x228978)throw CliErrors[_0x575ee6(0x116)]('Matched\x20'+_0x4e2afb[_0x575ee6(0xf9)]+'\x20dataset(s),\x20but\x20--expected-count\x20is\x20'+_0x228978+'.');return _0x4e2afb;}function normalizeTarget(_0xe175a3,_0x2ee535){const _0x54ecd5=a61_0x5f0ddb,_0x13f001=_0xe175a3['dbtableConfig']??{},_0x18491a=_0x2ee535[_0x54ecd5(0xe2)](_0xd8f71c=>{const _0x2fd4b3=_0x54ecd5;if(_0xd8f71c==null||typeof _0xd8f71c!==_0x2fd4b3(0xee))return null;const _0x1874de=_0xd8f71c,_0x1c41c7=Number(_0x1874de['id']);if(!Number[_0x2fd4b3(0xe3)](_0x1c41c7)||_0x1c41c7<=0x0)return null;const _0x479649=_0x1874de[_0x2fd4b3(0xf2)]??_0x1874de[_0x2fd4b3(0x10c)];return{'id':_0x1c41c7,..._0x479649?{'name':String(_0x479649)}:{},..._0x1874de[_0x2fd4b3(0x109)]?{'type':String(_0x1874de[_0x2fd4b3(0x109)])}:{}};})[_0x54ecd5(0xfd)](_0xe4488=>_0xe4488!==null);return{'id':_0xe175a3['id'],'code':_0xe175a3['code'],'name':_0xe175a3['name'],'description':_0xe175a3[_0x54ecd5(0x108)],'source':_0xe175a3[_0x54ecd5(0x10b)],'dbId':_0x13f001[_0x54ecd5(0x103)],'dbName':_0x13f001[_0x54ecd5(0x106)],'tableName':_0x13f001[_0x54ecd5(0xf4)],'relatedPageCount':_0x18491a['length'],'relatedPages':_0x18491a};}function buildPageRestoreCommands(_0x210f72,_0x3b1a5a){const _0x2a1dcf=a61_0x5f0ddb,_0x232f65=new Set();for(const _0x965b80 of _0x3b1a5a){for(const _0x441b5e of _0x965b80[_0x2a1dcf(0x102)])_0x232f65[_0x2a1dcf(0x10f)](_0x441b5e['id']);}return[..._0x232f65]['map'](_0x490460=>'rabetbase\x20page\x20restore\x20--id\x20'+_0x490460+'\x20--appcode\x20'+_0x210f72);}function a61_0x2cae(){const _0x59ed26=['message','appCode','bool','code','\x20dataset(s)\x20and\x20their\x20listed\x20related\x20pages/menus.\x20Restore\x20each\x20Dataset\x20first,\x20then\x20restore\x20pages\x20explicitly\x20when\x20needed.','validation','deleted','Would\x20delete\x20','\x20dataset(s);\x20','No\x20undeleted\x20dataset\x20found\x20for\x20','9RpTURE','1737434FXLRzR','1146npnAsb','map','isInteger','Would\x20safely\x20delete\x20','dbid','POST','push','Required\x20to\x20execute\x20dataset\x20deletion','8783192YQEkhS','\x20dataset(s)\x20without\x20cascading\x20to\x20pages.\x20The\x20server\x20blocks\x20a\x20Dataset\x20that\x20still\x20has\x20related\x20pages.','number','/smartapi/dataset/delete?cascade=','dbtableConfig','object','4AsKnnH','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','delete','title','4301496WDAgkD','tableName','2qmJzrt','Also\x20delete\x20related\x20pages\x20and\x20menus;\x20requires\x20explicit\x20--confirm','num','high-risk-write','length','expected-count','cascade','64722XlXaGk','filter','2298710fqAYtU','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','Deleted\x20','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','relatedPages','dbId','str','4542940SXegmj','dbName','isArray','description','type','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','source','name','31092NmnzVV','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','add','17039lEDqcR'];a61_0x2cae=function(){return _0x59ed26;};return a61_0x2cae();}
|