@lovrabet/rabetbase-cli 2.5.0-beta.3 → 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.d.ts +13 -0
- package/lib/commands/db/table-diff-shared.js +1 -0
- 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.d.ts +1 -7
- 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 +6 -6
- package/skills/rabetbase/guides/database-connection-workflow.md +9 -9
- package/skills/rabetbase/references/rabetbase-config.md +2 -3
- package/skills/rabetbase/references/rabetbase-db-analyze.md +2 -2
- package/skills/rabetbase/references/rabetbase-db-diff-refresh.md +4 -3
- package/skills/rabetbase/references/rabetbase-db-diff.md +7 -22
- package/skills/rabetbase/references/rabetbase-db-tables.md +14 -2
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -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
|
-
|
|
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
|
-
const
|
|
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
|
-
(function(
|
|
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_0x26e644=a58_0x2cd3;(function(_0x4c8803,_0x597c37){const _0xe695b0=a58_0x2cd3,_0x10732d=_0x4c8803();while(!![]){try{const _0x42c811=-parseInt(_0xe695b0(0xb5))/0x1+-parseInt(_0xe695b0(0xaf))/0x2*(-parseInt(_0xe695b0(0xdf))/0x3)+-parseInt(_0xe695b0(0xa3))/0x4+parseInt(_0xe695b0(0xac))/0x5*(-parseInt(_0xe695b0(0xcd))/0x6)+-parseInt(_0xe695b0(0xcf))/0x7*(-parseInt(_0xe695b0(0xb1))/0x8)+parseInt(_0xe695b0(0xc7))/0x9+parseInt(_0xe695b0(0xc9))/0xa*(parseInt(_0xe695b0(0xd7))/0xb);if(_0x42c811===_0x597c37)break;else _0x10732d['push'](_0x10732d['shift']());}catch(_0x4bb0e4){_0x10732d['push'](_0x10732d['shift']());}}}(a58_0x5b6d,0xa0737));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';function a58_0x2cd3(_0x2c25e0,_0x385443){_0x2c25e0=_0x2c25e0-0xa0;const _0x5b6d4e=a58_0x5b6d();let _0x2cd336=_0x5b6d4e[_0x2c25e0];return _0x2cd336;}import{getDatasetDetail,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const BACKEND_PATH=a58_0x26e644(0xc2),UNGROUPED_BUSINESS_GROUP='ungrouped';export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x54edd4,input:_0xf6f245,dryRun:_0x23ed40}){const _0x4eaa52=a58_0x26e644;validateInput(_0xf6f245);const _0x59edfa=normalizeBusinessGroupArgument(_0xf6f245[_0x4eaa52(0xca)]),_0x4d7023=await getDatasetDetail(_0xf6f245[_0x4eaa52(0xc1)]),_0x1d5b29=resolveBusinessGroupDataset(_0x4d7023,_0xf6f245[_0x4eaa52(0xc1)]),_0x44518b=loadCurrentBusinessGroup(_0x4d7023,_0x1d5b29);assertExpectedBusinessGroup(_0x44518b,_0xf6f245['expectBusinessGroup']);const _0x3776ff=buildBackendPayload(_0x54edd4,_0x1d5b29,_0x59edfa),_0x3ec2b7=_0x44518b!==_0x59edfa;let _0x3fe1c9;if(_0x3ec2b7&&!_0x23ed40){await updateErBusinessGroup(_0x3776ff);const _0x10ade4=await getDatasetDetail(_0x1d5b29[_0x4eaa52(0xc1)]),_0x5e1632=resolveBusinessGroupDataset(_0x10ade4,_0x1d5b29['code']),_0x461187=loadCurrentBusinessGroup(_0x10ade4,_0x5e1632);if(_0x461187!==_0x59edfa)throw CliErrors[_0x4eaa52(0xbf)](_0x4eaa52(0xb4),_0x4eaa52(0xa4)+JSON['stringify'](_0x59edfa)+_0x4eaa52(0xbc)+JSON[_0x4eaa52(0xdd)](_0x461187)+'.');_0x3fe1c9={'verified':!![],'status':'matched','afterReadback':{'businessGroup':_0x461187}};}else!_0x3ec2b7&&(_0x3fe1c9={'verified':!![],'status':_0x4eaa52(0xbe),'afterReadback':{'businessGroup':_0x44518b}});const _0x520f94={'operation':'update','appCode':_0x54edd4,'selector':{'code':_0x1d5b29['code']},'dataset':_0x1d5b29,'before':{'businessGroup':_0x44518b},'after':{'businessGroup':_0x59edfa},'changed':_0x3ec2b7,'dryRun':_0x23ed40,'submitted':_0x3ec2b7&&!_0x23ed40,'backend':{'method':_0x4eaa52(0xc3),'path':BACKEND_PATH,'payload':_0x3776ff},..._0x3fe1c9?{'verification':_0x3fe1c9}:{},'warnings':[]};return{'ok':!![],'data':_0x520f94,'message':_0x3ec2b7?_0x23ed40?_0x4eaa52(0xba)+_0x1d5b29[_0x4eaa52(0xc1)]:'Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20'+_0x1d5b29[_0x4eaa52(0xc1)]:_0x4eaa52(0xbd)+_0x1d5b29[_0x4eaa52(0xc1)]};}export const datasetBusinessGroupUpdate={'service':a58_0x26e644(0xdc),'command':a58_0x26e644(0xb3),'description':a58_0x26e644(0xbb),'risk':a58_0x26e644(0xc6),'flags':[CODE_FLAG,{'name':a58_0x26e644(0xa7),'type':a58_0x26e644(0xd1),'required':!![],'description':a58_0x26e644(0xd5)},{'name':a58_0x26e644(0xad),'type':'string','required':![],'description':a58_0x26e644(0xae)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1e5e78){validateInput(readBusinessGroupUpdateInput(_0x1e5e78));},async 'dryRun'(_0xdef949){const _0x2e4566=a58_0x26e644,_0x47ff74=await buildDatasetBusinessGroupUpdateResult({'appCode':_0xdef949[_0x2e4566(0xab)],'input':readBusinessGroupUpdateInput(_0xdef949),'dryRun':!![]});return{'method':_0x2e4566(0xc3),'url':BACKEND_PATH,'body':_0x47ff74[_0x2e4566(0xd6)][_0x2e4566(0xa2)][_0x2e4566(0xcc)],'description':_0x47ff74['message'],..._0x47ff74[_0x2e4566(0xd6)]};},async 'execute'(_0x49546e){const _0x525874=a58_0x26e644;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x49546e[_0x525874(0xab)],'input':readBusinessGroupUpdateInput(_0x49546e),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x1157ea){const _0x5eca2b=a58_0x26e644,_0x4f23de=_0x1157ea[_0x5eca2b(0xc5)](_0x5eca2b(0xad));return{'code':trim(_0x1157ea[_0x5eca2b(0xc5)](_0x5eca2b(0xc1))),'businessGroup':_0x1157ea['str']('business-group'),'expectBusinessGroup':_0x4f23de===undefined||_0x4f23de===''?undefined:_0x4f23de};}function validateInput(_0x5c59b7){const _0x15c531=a58_0x26e644;if(!trim(_0x5c59b7[_0x15c531(0xc1)]))throw CliErrors[_0x15c531(0xd8)](_0x15c531(0xb2));if(_0x5c59b7['businessGroup']===undefined)throw CliErrors[_0x15c531(0xd8)](_0x15c531(0xdb));}function resolveBusinessGroupDataset(_0x354197,_0x14f2a6){const _0x3ed040=a58_0x26e644,_0x2bf8c1=asPlainObject(_0x354197[_0x3ed040(0xdc)]),_0x4da178=asPlainObject(_0x354197['dbtableConfig']),_0x5bbc83=resolveSourceType(_0x354197,_0x2bf8c1,_0x4da178),_0x2541dd=firstString(_0x354197['modelCode'],_0x354197[_0x3ed040(0xc1)],_0x2bf8c1[_0x3ed040(0xa8)],_0x14f2a6)||_0x14f2a6;return{'id':firstNumber(_0x354197[_0x3ed040(0xc8)],_0x354197['id'],_0x2bf8c1['datasetId'])??firstString(_0x354197[_0x3ed040(0xc8)],_0x354197['id'],_0x2bf8c1[_0x3ed040(0xd3)])??null,'code':_0x2541dd,'name':firstString(_0x354197[_0x3ed040(0xb7)],_0x2bf8c1[_0x3ed040(0xc0)],_0x2bf8c1[_0x3ed040(0xb7)])||null,'sourceType':_0x5bbc83};}function resolveSourceType(_0x38cf63,_0x5cf129,_0x3b0e60){const _0x172997=a58_0x26e644,_0x3a0528=firstString(_0x38cf63[_0x172997(0xd9)],_0x38cf63[_0x172997(0xb9)],_0x5cf129[_0x172997(0xd9)],_0x5cf129[_0x172997(0xb9)])?.[_0x172997(0xa0)]()[_0x172997(0xd0)]();if(_0x3a0528===_0x172997(0xa6)||_0x3a0528==='METADATA')return _0x3a0528;if(Object['keys'](_0x3b0e60)[_0x172997(0xa5)]>0x0)return _0x172997(0xa6);throw CliErrors['validation']('Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.');}function loadCurrentBusinessGroup(_0x5ded24,_0x49658c){const _0x4efee9=a58_0x26e644,_0xc74bae=readBusinessGroupFromDatasetDetail(_0x5ded24,_0x49658c[_0x4efee9(0xb9)]);if(_0xc74bae['found'])return normalizeBusinessGroup(_0xc74bae[_0x4efee9(0xb0)]);if(_0x49658c[_0x4efee9(0xb9)]===_0x4efee9(0xde))return'';throw CliErrors[_0x4efee9(0xd8)](_0x4efee9(0xd2),_0x4efee9(0xa9));}function readBusinessGroupFromDatasetDetail(_0x3a2f00,_0x1d78d5){const _0x41e65a=a58_0x26e644,_0x6b8446=asPlainObject(_0x3a2f00[_0x41e65a(0xdc)]),_0x54491b=firstPresent(_0x3a2f00[_0x41e65a(0xca)]);if(_0x54491b[_0x41e65a(0xb8)])return _0x54491b;const _0x5e7376=firstPresent(_0x6b8446[_0x41e65a(0xca)]);if(_0x5e7376['found'])return _0x5e7376;if(_0x1d78d5==='DB_TABLE')return{'found':![]};const _0x3e7605=readBusinessGroupFromExtend(_0x3a2f00[_0x41e65a(0xcb)]);if(_0x3e7605['found'])return _0x3e7605;return readBusinessGroupFromExtend(_0x6b8446['extend']);}function readBusinessGroupFromExtend(_0x495c11){const _0x1afc7c=a58_0x26e644;if(_0x495c11===undefined||_0x495c11===null||_0x495c11==='')return{'found':![]};if(typeof _0x495c11===_0x1afc7c(0xd1))try{const _0x11f36a=JSON[_0x1afc7c(0xa1)](_0x495c11);return readBusinessGroupFromExtend(_0x11f36a);}catch{return{'found':![]};}const _0x4f0d9d=asPlainObject(_0x495c11);if(Object[_0x1afc7c(0xce)]['hasOwnProperty'][_0x1afc7c(0xda)](_0x4f0d9d,_0x1afc7c(0xca)))return{'found':!![],'value':_0x4f0d9d[_0x1afc7c(0xca)]};return{'found':![]};}function a58_0x5b6d(){const _0x5d5c4b=['dataset','stringify','METADATA','1614ClJqEz','trim','parse','backend','3220632lQhjHi','Expected\x20','length','DB_TABLE','business-group','datasetCode','Business\x20scenario\x20group\x20readback\x20must\x20be\x20available\x20by\x20datasetCode;\x20upgrade\x20the\x20backend\x20read\x20contract\x20instead\x20of\x20using\x20dblinkId/tableName.','object','appCode','1759285iPhQru','expect-business-group','Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing','4190zNPhXe','value','7380592WPmNhi','--code\x20is\x20required','business-group-update','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','1300253vpKrBl','number','name','found','sourceType','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','Update\x20business\x20scenario\x20group',',\x20actual\x20','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','unchanged','apiError','datasetName','code','/smartapi/question/er-config/business-group/edit','POST','isArray','str','write','3847392cqCmvi','modelId','10uxocua','businessGroup','extend','payload','18GVJdqr','prototype','7XmDfuk','toUpperCase','string','Dataset\x20detail\x20does\x20not\x20expose\x20businessGroup.','datasetId','isFinite','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed,\x20or\x20the\x20reserved\x20value\x20ungrouped\x20to\x20clear\x20it','data','14751187hZSDvQ','validation','source','call','--business-group\x20is\x20required'];a58_0x5b6d=function(){return _0x5d5c4b;};return a58_0x5b6d();}function firstPresent(..._0x29fe6d){for(const _0x1bbeda of _0x29fe6d){if(_0x1bbeda!==undefined&&_0x1bbeda!==null)return{'found':!![],'value':_0x1bbeda};}return{'found':![]};}function assertExpectedBusinessGroup(_0x126a15,_0x221ee8){const _0x26894c=a58_0x26e644;if(_0x221ee8===undefined)return;const _0x54288b=normalizeBusinessGroupArgument(_0x221ee8);if(_0x126a15!==_0x54288b)throw CliErrors[_0x26894c(0xd8)]('Expectation\x20mismatch\x20at\x20businessGroup',_0x26894c(0xa4)+JSON[_0x26894c(0xdd)](_0x54288b)+',\x20actual\x20'+JSON['stringify'](_0x126a15));}function buildBackendPayload(_0x2ad9fb,_0x12d5b1,_0x571c97){const _0x5b570e=a58_0x26e644;return{'appCode':_0x2ad9fb,'datasetCode':_0x12d5b1[_0x5b570e(0xc1)],'businessGroup':_0x571c97};}function normalizeBusinessGroup(_0x77298a){if(_0x77298a===undefined||_0x77298a===null)return'';return String(_0x77298a)['trim']();}function normalizeBusinessGroupArgument(_0x17f343){const _0x95f7d0=normalizeBusinessGroup(_0x17f343);return _0x95f7d0===UNGROUPED_BUSINESS_GROUP?'':_0x95f7d0;}function asPlainObject(_0x5f06c8){const _0x90031a=a58_0x26e644;if(!_0x5f06c8||typeof _0x5f06c8!==_0x90031a(0xaa)||Array[_0x90031a(0xc4)](_0x5f06c8))return{};return _0x5f06c8;}function firstString(..._0x58ef1a){const _0x4b5132=a58_0x26e644;for(const _0x47e0f3 of _0x58ef1a){if(typeof _0x47e0f3==='string'&&_0x47e0f3[_0x4b5132(0xa0)]())return _0x47e0f3['trim']();if(typeof _0x47e0f3===_0x4b5132(0xb6)&&Number[_0x4b5132(0xd4)](_0x47e0f3))return String(_0x47e0f3);}return undefined;}function firstNumber(..._0xb9bda9){const _0x511151=a58_0x26e644;for(const _0x556e7f of _0xb9bda9){if(typeof _0x556e7f===_0x511151(0xb6)&&Number[_0x511151(0xd4)](_0x556e7f))return _0x556e7f;if(typeof _0x556e7f===_0x511151(0xd1)&&_0x556e7f[_0x511151(0xa0)]()&&Number['isFinite'](Number(_0x556e7f)))return Number(_0x556e7f);}return null;}function trim(_0x1a7636){const _0xfabfd6=a58_0x26e644;return String(_0x1a7636||'')[_0xfabfd6(0xa0)]();}
|
|
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
|
-
const
|
|
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
|
-
|
|
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();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a62_0x479680=a62_0x1b36;(function(_0x2682d4,_0x4c2323){const _0x3def3e=a62_0x1b36,_0x1da120=_0x2682d4();while(!![]){try{const _0x35a506=parseInt(_0x3def3e(0xc8))/0x1*(parseInt(_0x3def3e(0xcb))/0x2)+-parseInt(_0x3def3e(0xec))/0x3+parseInt(_0x3def3e(0xfc))/0x4*(-parseInt(_0x3def3e(0xbb))/0x5)+-parseInt(_0x3def3e(0xd4))/0x6*(parseInt(_0x3def3e(0xb6))/0x7)+parseInt(_0x3def3e(0xeb))/0x8+-parseInt(_0x3def3e(0x103))/0x9*(-parseInt(_0x3def3e(0xf2))/0xa)+-parseInt(_0x3def3e(0xf7))/0xb;if(_0x35a506===_0x4c2323)break;else _0x1da120['push'](_0x1da120['shift']());}catch(_0x41558e){_0x1da120['push'](_0x1da120['shift']());}}}(a62_0x53a7,0x94da0));import{getDatasetDetail}from'../../core/api-client.js';function a62_0x53a7(){const _0x217cae=['extend','dbtableConfig','labelField','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','5374032hddWMm','143601bWXQqV','fromField','description','map','push','dbName','7587440cswfjn','main_sub','responseBody','creatorIdField','allFields','1775015FAOaOv','allFieldNames','type','code','trim','65476hvGEnn','updateTimeField','modelId','alias','requestBody','beforeScriptId','string','9RjyyCe','dbId','split','afterScriptId','7zfyMlx','datasetKey','responseFields','options','requestFields','285xBXRlC','source','cardinality','read','path','host','displayName','relations','modifierIdField','method','toTableName','deprecated','dataType','4LJZUPx','object','creatorNameField','352390iulgSV','title','dbType','relationId','operations','parse','validateRules','toDatasetName','tableName','2299902KbPkNU','dataset','properties','columnCodeListWithDeleted','deleted','formatRules','isArray','indexes','modelCode','relatedPageInfoList','pkField','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','entries','length','required','name','doVersion','detail','filter'];a62_0x53a7=function(){return _0x217cae;};return a62_0x53a7();}import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0x39737e){const _0x21cc88=a62_0x1b36;if(_0x39737e[_0x21cc88(0xd8)])return null;const _0x3d084d=Boolean(_0x39737e[_0x21cc88(0xc1)]!==undefined||_0x39737e['doType']!==undefined);let _0x4c08a9={};if(!_0x3d084d&&typeof _0x39737e[_0x21cc88(0xe7)]===_0x21cc88(0x102))try{_0x4c08a9=JSON[_0x21cc88(0xd0)](_0x39737e[_0x21cc88(0xe7)]);}catch{}const _0x4ebcae=_0x3d084d?_0x39737e[_0x21cc88(0xe3)]:_0x39737e[_0x21cc88(0xfa)],_0x21015b=_0x3d084d?_0x39737e['displayName']:_0x39737e[_0x21cc88(0xe3)],_0x1d27b1=_0x3d084d?_0x39737e['doType']:_0x39737e[_0x21cc88(0xf9)]||_0x39737e[_0x21cc88(0xc7)],_0x5b7139=_0x3d084d?_0x39737e['pkField']===!![]:_0x4c08a9[_0x21cc88(0xde)]===!![],_0x403bcd=_0x3d084d?_0x39737e[_0x21cc88(0xe2)]===!![]:_0x4c08a9[_0x21cc88(0xe2)]===!![],_0x57807d=_0x3d084d?_0x39737e[_0x21cc88(0xb9)]??null:_0x4c08a9[_0x21cc88(0xb9)]??null,_0x576418={'name':_0x4ebcae,'displayName':_0x21015b||_0x4ebcae,'type':_0x1d27b1,'dbType':_0x39737e[_0x21cc88(0xcd)],'pk':_0x5b7139,'required':_0x403bcd,'deprecated':_0x39737e[_0x21cc88(0xc6)]===!![],'description':_0x39737e[_0x21cc88(0xee)]||undefined};return Array['isArray'](_0x57807d)&&_0x57807d[_0x21cc88(0xe1)]>0x0&&(_0x576418[_0x21cc88(0xb9)]=_0x57807d),_0x576418;}function parseJsonMaybe(_0x1bffa5){const _0x404fae=a62_0x1b36;if(typeof _0x1bffa5!=='string')return _0x1bffa5;try{return JSON[_0x404fae(0xd0)](_0x1bffa5);}catch{return _0x1bffa5;}}function normalizeOperationEntry(_0x34490a,_0x51c944){const _0x319a0d=a62_0x1b36;if(!_0x51c944||typeof _0x51c944!=='object')return null;if(!_0x51c944[_0x319a0d(0xc4)]||!_0x51c944[_0x319a0d(0xbf)])return null;const _0x58896b={'name':_0x34490a,'method':_0x51c944[_0x319a0d(0xc4)],'path':_0x51c944['path']};if(_0x51c944['host'])_0x58896b[_0x319a0d(0xc0)]=_0x51c944[_0x319a0d(0xc0)];if(_0x51c944[_0x319a0d(0x100)]!=null){const _0x458e83=parseJsonMaybe(_0x51c944['requestBody']);_0x58896b['requestBody']=_0x458e83;}if(_0x51c944[_0x319a0d(0xf4)]!=null){const _0x4ebcc8=parseJsonMaybe(_0x51c944[_0x319a0d(0xf4)]);_0x58896b[_0x319a0d(0xf4)]=_0x4ebcc8;}if(_0x51c944[_0x319a0d(0x101)]!=null)_0x58896b[_0x319a0d(0x101)]=_0x51c944[_0x319a0d(0x101)];if(_0x51c944[_0x319a0d(0xb5)]!=null)_0x58896b[_0x319a0d(0xb5)]=_0x51c944[_0x319a0d(0xb5)];if(Array[_0x319a0d(0xda)](_0x51c944[_0x319a0d(0xba)]))_0x58896b[_0x319a0d(0xba)]=_0x51c944[_0x319a0d(0xba)];if(Array['isArray'](_0x51c944['responseFields']))_0x58896b[_0x319a0d(0xb8)]=_0x51c944[_0x319a0d(0xb8)];return _0x58896b;}function summarizeDbtable(_0x3e03ab){const _0x5e0772=a62_0x1b36,_0x2ad5a9={},_0x4ca27b=[_0x5e0772(0x104),_0x5e0772(0xf1),'tableName','datasetKey',_0x5e0772(0xde),_0x5e0772(0xf6),'logicField','createTimeField',_0x5e0772(0xfd),_0x5e0772(0xf5),_0x5e0772(0xca),_0x5e0772(0xc3),'modifierNameField',_0x5e0772(0xe9),'dblinkInfoDTO'];for(const _0xb6a287 of _0x4ca27b){if(_0x3e03ab[_0xb6a287]!==undefined)_0x2ad5a9[_0xb6a287]=_0x3e03ab[_0xb6a287];}return typeof _0x2ad5a9['allFields']===_0x5e0772(0x102)&&_0x2ad5a9[_0x5e0772(0xf6)][_0x5e0772(0xe1)]>0x0&&(_0x2ad5a9[_0x5e0772(0xf8)]=_0x2ad5a9['allFields'][_0x5e0772(0x105)](',')[_0x5e0772(0xef)](_0x2a2596=>_0x2a2596[_0x5e0772(0xfb)]())[_0x5e0772(0xe6)](Boolean)),_0x2ad5a9;}function normalizeRelatedPages(_0x3b9a27){const _0x32a1ea=a62_0x1b36;if(!Array['isArray'](_0x3b9a27))return[];return _0x3b9a27[_0x32a1ea(0xe6)](_0x4ef09a=>_0x4ef09a&&typeof _0x4ef09a===_0x32a1ea(0xc9))[_0x32a1ea(0xef)](_0x112b48=>({'id':_0x112b48['id'],'type':_0x112b48['type'],'code':_0x112b48[_0x32a1ea(0xfa)],'title':_0x112b48[_0x32a1ea(0xcc)],'deleted':_0x112b48['deleted']===!![]}));}function a62_0x1b36(_0x482a50,_0x577d83){_0x482a50=_0x482a50-0xb5;const _0x53a71a=a62_0x53a7();let _0x1b3629=_0x53a71a[_0x482a50];return _0x1b3629;}export const datasetDetail={'service':a62_0x479680(0xd5),'command':a62_0x479680(0xe5),'description':a62_0x479680(0xea),'risk':a62_0x479680(0xbe),'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a62_0x479680(0xff),'type':'string','description':a62_0x479680(0xdf)}],async 'execute'(_0x1adefa){const _0x3519b5=a62_0x479680,_0x5150f1=await getDatasetDetail(_0x1adefa['str'](_0x3519b5(0xfa))),_0x37f76f=Array['isArray'](_0x5150f1['fields'])?_0x5150f1['fields']:Array[_0x3519b5(0xda)](_0x5150f1['properties'])?_0x5150f1[_0x3519b5(0xd6)]:[],_0x4c4026=_0x37f76f[_0x3519b5(0xef)](_0x5b8d44=>normalizeField(_0x5b8d44))[_0x3519b5(0xe6)](_0x13376a=>_0x13376a!==null),_0x1bb3e8=_0x5150f1[_0x3519b5(0xcf)]??{},_0x3c2863=[];for(const [_0x1a4579,_0x2572ed]of Object[_0x3519b5(0xe0)](_0x1bb3e8)){const _0x4df482=normalizeOperationEntry(_0x1a4579,_0x2572ed);if(_0x4df482)_0x3c2863[_0x3519b5(0xf0)](_0x4df482);}const _0x2b90a6=_0x5150f1[_0x3519b5(0xe8)]??{},_0x13ce8b=_0x5150f1[_0x3519b5(0xd5)]??{},_0x170165=_0x2b90a6[_0x3519b5(0x104)]!=null?{'id':_0x2b90a6[_0x3519b5(0x104)],'name':_0x2b90a6['dbName']??null}:undefined;let _0x55f6b8;return typeof _0x5150f1[_0x3519b5(0xe7)]===_0x3519b5(0x102)&&(_0x55f6b8=parseJsonMaybe(_0x5150f1[_0x3519b5(0xe7)])),{'ok':!![],'data':{'id':_0x5150f1[_0x3519b5(0xfe)]??_0x5150f1['id'],'name':_0x5150f1['name'],'code':_0x5150f1[_0x3519b5(0xdc)]||_0x5150f1[_0x3519b5(0xfa)],'doVersion':_0x5150f1[_0x3519b5(0xe4)],'description':_0x5150f1[_0x3519b5(0xee)]||_0x13ce8b['tableComment']||undefined,'source':_0x5150f1[_0x3519b5(0xbc)]||_0x13ce8b['sourceType'],'table':_0x2b90a6[_0x3519b5(0xd3)]||_0x13ce8b[_0x3519b5(0xd3)],'datasetKey':_0x2b90a6[_0x3519b5(0xb7)],'pk':_0x2b90a6['pkField'],'db':_0x170165,'dbtable':summarizeDbtable(_0x2b90a6),'fields':_0x4c4026,'operations':_0x3c2863,'indexes':Array[_0x3519b5(0xda)](_0x13ce8b[_0x3519b5(0xdb)])?_0x13ce8b[_0x3519b5(0xdb)]:[],'relations':Array[_0x3519b5(0xda)](_0x5150f1['relations'])?_0x5150f1[_0x3519b5(0xc2)][_0x3519b5(0xef)](_0x5d34e1=>({..._0x5d34e1[_0x3519b5(0xce)]!=null?{'relationId':_0x5d34e1[_0x3519b5(0xce)]}:{},'fromDataset':_0x5150f1['name'],'fromCode':_0x5150f1[_0x3519b5(0xdc)]||_0x5150f1[_0x3519b5(0xfa)],'fromTable':_0x2b90a6[_0x3519b5(0xd3)]||_0x13ce8b['tableName'],'fromField':_0x5d34e1[_0x3519b5(0xed)],'toDataset':_0x5d34e1[_0x3519b5(0xd2)],'toCode':_0x5d34e1['toDatasetCode'],'toTable':_0x5d34e1[_0x3519b5(0xc5)],'toField':_0x5d34e1['toField'],'labelField':_0x5d34e1['toFieldLabel']||undefined,'cardinality':_0x5d34e1[_0x3519b5(0xbd)]||undefined,'bizRelationType':_0x5d34e1['bizRelationType']===_0x3519b5(0xf3)?_0x3519b5(0xf3):null})):[],'relatedPages':normalizeRelatedPages(_0x5150f1[_0x3519b5(0xdd)]),...Array[_0x3519b5(0xda)](_0x5150f1[_0x3519b5(0xd7)])?{'columnCodeListWithDeleted':_0x5150f1[_0x3519b5(0xd7)]}:{},'formatRules':Array[_0x3519b5(0xda)](_0x5150f1[_0x3519b5(0xd9)])?_0x5150f1['formatRules']:[],'validateRules':Array[_0x3519b5(0xda)](_0x5150f1[_0x3519b5(0xd1)])?_0x5150f1[_0x3519b5(0xd1)]:[],..._0x55f6b8!==undefined?{'extend':_0x55f6b8}:{},'stats':{'fieldCount':_0x4c4026[_0x3519b5(0xe1)],'operationCount':_0x3c2863[_0x3519b5(0xe1)]}}};}};
|