@lovrabet/rabetbase-cli 2.5.1-beta.5 → 2.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.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-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/auto-sync.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync.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/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/deployment-sync.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +0 -16
- 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/kb-search-client.d.ts +30 -0
- package/lib/core/kb-search-client.js +1 -0
- 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.d.ts +1 -0
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +3 -3
- package/skills/rabetbase/references/rabetbase-config.md +1 -1
- package/skills/rabetbase/references/rabetbase-database-template.md +36 -0
- package/skills/rabetbase/references/rabetbase-doctor.md +1 -1
- package/skills/rabetbase/references/rabetbase-kb.md +8 -7
- package/skills/rabetbase/references/rabetbase-rule.md +15 -0
- package/skills/rabetbase.manifest.json +4 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a48_0x2f267f=a48_0x3b91;function a48_0x3b91(_0xa09e8e,_0x454e2a){_0xa09e8e=_0xa09e8e-0xa8;const _0x13823f=a48_0x1382();let _0x3b915d=_0x13823f[_0xa09e8e];return _0x3b915d;}(function(_0x483c2a,_0x42b6e){const _0x4e3a1a=a48_0x3b91,_0x3b843e=_0x483c2a();while(!![]){try{const _0x199695=-parseInt(_0x4e3a1a(0xbc))/0x1+-parseInt(_0x4e3a1a(0xaa))/0x2*(parseInt(_0x4e3a1a(0xaf))/0x3)+-parseInt(_0x4e3a1a(0xbb))/0x4+-parseInt(_0x4e3a1a(0xb9))/0x5*(-parseInt(_0x4e3a1a(0xb3))/0x6)+parseInt(_0x4e3a1a(0xb8))/0x7+parseInt(_0x4e3a1a(0xb1))/0x8*(parseInt(_0x4e3a1a(0xc4))/0x9)+parseInt(_0x4e3a1a(0xc2))/0xa*(parseInt(_0x4e3a1a(0xc3))/0xb);if(_0x199695===_0x42b6e)break;else _0x3b843e['push'](_0x3b843e['shift']());}catch(_0x140124){_0x3b843e['push'](_0x3b843e['shift']());}}}(a48_0x1382,0x9d142));export const GLOBAL_SCOPE_FLAG={'name':a48_0x2f267f(0xb4),'type':a48_0x2f267f(0xab),'default':![],'description':a48_0x2f267f(0xc0)};export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':a48_0x2f267f(0xae)};export const CODE_FLAG={'name':a48_0x2f267f(0xbe),'type':a48_0x2f267f(0xbd),'required':!![],'description':a48_0x2f267f(0xad),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a48_0x2f267f(0xb6),'description':a48_0x2f267f(0xad)};export const SQLCODE_FLAG={'name':a48_0x2f267f(0xac),'type':a48_0x2f267f(0xbd),'required':!![],'description':a48_0x2f267f(0xa9),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a48_0x2f267f(0xb0)}};export const APPCODE_FLAG_OPTIONAL={'name':a48_0x2f267f(0xbf),'type':a48_0x2f267f(0xbd),'required':![],'description':'App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)'};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a48_0x2f267f(0xa8)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a48_0x2f267f(0xba),'required':!![],'description':'Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)'};export const DB_TYPE_FLAG={'name':a48_0x2f267f(0xb7),'type':a48_0x2f267f(0xbd),'required':!![],'description':a48_0x2f267f(0xc1),'enum':[a48_0x2f267f(0xc5),a48_0x2f267f(0xb5)]};export const SKIP_CONNECTION_TEST_FLAG={'name':a48_0x2f267f(0xb2),'type':a48_0x2f267f(0xab),'description':'Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update'};function a48_0x1382(){const _0x4775b9=['5QYBJYa','number','1665756jlWIGY','739978WiXuTm','string','code','appcode','Write\x20to\x20the\x20global\x20configuration','Database\x20product\x20type','140NBpLux','575971BZzevN','559539IHSfJy','MYSQL','App\x20code\x20(e.g.\x20app-xxxxx)','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','7426KvhzUQ','boolean','sqlcode','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)','243NqfOBv','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','64ttDuDS','skip-connection-test','3912426bSlpJM','global','POSTGRESQL','datasetcode','dbtype','1526497aURFaB'];a48_0x1382=function(){return _0x4775b9;};return a48_0x1382();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x6388a,_0x30fab5){const _0xe44c8f=a49_0x2a44,_0x352397=_0x6388a();while(!![]){try{const _0x305b53=parseInt(_0xe44c8f(0x15f))/0x1+parseInt(_0xe44c8f(0x160))/0x2*(-parseInt(_0xe44c8f(0x167))/0x3)+-parseInt(_0xe44c8f(0x169))/0x4*(-parseInt(_0xe44c8f(0x170))/0x5)+parseInt(_0xe44c8f(0x16e))/0x6+parseInt(_0xe44c8f(0x16c))/0x7*(-parseInt(_0xe44c8f(0x16a))/0x8)+parseInt(_0xe44c8f(0x164))/0x9*(-parseInt(_0xe44c8f(0x165))/0xa)+parseInt(_0xe44c8f(0x163))/0xb;if(_0x305b53===_0x30fab5)break;else _0x352397['push'](_0x352397['shift']());}catch(_0x172ade){_0x352397['push'](_0x352397['shift']());}}}(a49_0x31a1,0xe631f));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';function a49_0x31a1(){const _0x2d3e90=['3PDFpEm','trim','544716PXZSQR','4168LyDbXr','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','17115tpOZpq','File\x20not\x20found:\x20','10734750rbAQOJ','size','20qliObp','105551fUBBYp','1902598qCbnLC','toFixed','isFile','19252970VFcMaV','9194751ayqrVZ','10rHSbcX','validation'];a49_0x31a1=function(){return _0x2d3e90;};return a49_0x31a1();}const BYTES_PER_MB=0x400*0x400;function a49_0x2a44(_0x5898e6,_0x4fed0b){_0x5898e6=_0x5898e6-0x15f;const _0x31a1d7=a49_0x31a1();let _0x2a441e=_0x31a1d7[_0x5898e6];return _0x2a441e;}export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x3b90bb){const _0x5c8ce0=a49_0x2a44;if(_0x3b90bb>=BYTES_PER_MB){const _0xab0bed=Math['ceil'](_0x3b90bb/BYTES_PER_MB*0x64)/0x64;return _0xab0bed[_0x5c8ce0(0x161)](0x2)+'\x20MB';}return _0x3b90bb+'\x20B';}export function requireDevelopmentUploadFile(_0x43d2cd,_0x31f382){const _0x57535d=a49_0x2a44,_0x1555f6=_0x43d2cd[_0x57535d(0x168)]();if(!_0x1555f6)throw CliErrors[_0x57535d(0x166)](_0x31f382+'\x20path\x20is\x20required.');if(!existsSync(_0x1555f6))throw CliErrors[_0x57535d(0x166)](_0x57535d(0x16d)+_0x1555f6);const _0x2de483=statSync(_0x1555f6);if(!_0x2de483[_0x57535d(0x162)]())throw CliErrors[_0x57535d(0x166)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x1555f6);if(_0x2de483[_0x57535d(0x16f)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x57535d(0x166)](_0x57535d(0x16b)+_0x1555f6+'\x20('+formatBytes(_0x2de483['size'])+')');return{'path':_0x1555f6,'size':_0x2de483[_0x57535d(0x16f)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x27422a,_0x532392){const _0x276415=a50_0x4720,_0x1c5112=_0x27422a();while(!![]){try{const _0x561a2a=parseInt(_0x276415(0x107))/0x1*(-parseInt(_0x276415(0x100))/0x2)+parseInt(_0x276415(0x102))/0x3*(parseInt(_0x276415(0x103))/0x4)+parseInt(_0x276415(0x10a))/0x5+parseInt(_0x276415(0xff))/0x6*(parseInt(_0x276415(0x109))/0x7)+parseInt(_0x276415(0x108))/0x8*(parseInt(_0x276415(0xfc))/0x9)+parseInt(_0x276415(0x104))/0xa+-parseInt(_0x276415(0xfd))/0xb*(parseInt(_0x276415(0xfb))/0xc);if(_0x561a2a===_0x532392)break;else _0x1c5112['push'](_0x1c5112['shift']());}catch(_0xc37395){_0x1c5112['push'](_0x1c5112['shift']());}}}(a50_0x5665,0x5d9d6));function a50_0x4720(_0x4aada9,_0x241aa8){_0x4aada9=_0x4aada9-0xfb;const _0x5665f0=a50_0x5665();let _0x47204c=_0x5665f0[_0x4aada9];return _0x47204c;}export function validateAppcode(_0x747010){const _0x30aa86=a50_0x4720,_0xe755b3=_0x747010[_0x30aa86(0x101)]();if(!_0xe755b3)return{'valid':![],'message':_0x30aa86(0xfe)};if(_0xe755b3[_0x30aa86(0x106)]>0x64)return{'valid':![],'message':_0x30aa86(0x105)};if(!/^[A-Za-z0-9_-]+$/['test'](_0xe755b3))return{'valid':![],'message':'Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed'};return{'valid':!![]};}function a50_0x5665(){const _0x11efe2=['4948GiBvKj','trim','3hgJZbI','2331076LWVsjb','1305900NfkabP','App\x20Code\x20cannot\x20exceed\x20100\x20characters','length','29iXirQJ','16472yoAWQj','329vDpIWl','3548340pygVBx','12SPkDPM','3141nRoWrS','24707639AkQAmW','App\x20Code\x20cannot\x20be\x20empty','71454KdgSRI'];a50_0x5665=function(){return _0x11efe2;};return a50_0x5665();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a51_0x534a62=a51_0x4d7d;(function(_0x36c2f6,_0x175b27){const _0x220061=a51_0x4d7d,_0x360b30=_0x36c2f6();while(!![]){try{const _0x158f68=parseInt(_0x220061(0x185))/0x1+parseInt(_0x220061(0x194))/0x2*(-parseInt(_0x220061(0x18e))/0x3)+-parseInt(_0x220061(0x198))/0x4*(parseInt(_0x220061(0x180))/0x5)+parseInt(_0x220061(0x18a))/0x6+parseInt(_0x220061(0x17c))/0x7+-parseInt(_0x220061(0x187))/0x8+parseInt(_0x220061(0x184))/0x9*(-parseInt(_0x220061(0x190))/0xa);if(_0x158f68===_0x175b27)break;else _0x360b30['push'](_0x360b30['shift']());}catch(_0x5e0557){_0x360b30['push'](_0x360b30['shift']());}}}(a51_0x2975,0x3af2e));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,isTopLevelConfigKey,readScopedConfig,resolveWriteScope,writeScopedConfig}from'../../commands/config/shared.js';const LEGACY_DELETABLE_KEYS=new Set([a51_0x534a62(0x192)]),EXTRA_DELETABLE_KEYS=new Set(['defaultApp',a51_0x534a62(0x17f)]);async function execute(_0xe5e93e){const _0x53ab41=a51_0x534a62,_0x41acc4=_0xe5e93e[_0x53ab41(0x183)][0x0]?.[_0x53ab41(0x18b)]();if(!_0x41acc4)throw CliErrors[_0x53ab41(0x18f)](_0x53ab41(0x18c),_0x53ab41(0x179)+CLI_BIN_NAME+_0x53ab41(0x182));if(_0x41acc4==='riskLevel')throw CliErrors['validation']('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(!isTopLevelConfigKey(_0x41acc4)&&!EXTRA_DELETABLE_KEYS[_0x53ab41(0x189)](_0x41acc4)&&!LEGACY_DELETABLE_KEYS['has'](_0x41acc4))throw CliErrors[_0x53ab41(0x18f)]('Top-level\x20key\x20\x22'+_0x41acc4+'\x22\x20is\x20not\x20deletable.',_0x53ab41(0x196));const _0x34673e=resolveWriteScope({'global':_0xe5e93e['bool'](_0x53ab41(0x18d))}),_0x2f86e3=readScopedConfig(_0x34673e),_0x289185=Object[_0x53ab41(0x186)][_0x53ab41(0x17a)][_0x53ab41(0x197)](_0x2f86e3,_0x41acc4);_0x289185&&(delete _0x2f86e3[_0x41acc4],writeScopedConfig(_0x2f86e3,_0x34673e));const _0x2727fb=_0x34673e==='global'?_0x53ab41(0x17b):_0x53ab41(0x17e);return{'ok':!![],'message':_0x289185?'✓\x20'+_0x2727fb+'\x20'+_0x41acc4+_0x53ab41(0x188):'✓\x20'+_0x2727fb+'\x20'+_0x41acc4+_0x53ab41(0x177),'data':{'key':_0x41acc4,'scope':_0x34673e,'changed':_0x289185}};}function a51_0x4d7d(_0x5a92fa,_0x38dd25){_0x5a92fa=_0x5a92fa-0x177;const _0x2975ae=a51_0x2975();let _0x4d7d4d=_0x2975ae[_0x5a92fa];return _0x4d7d4d;}export const configDeleteDefinition={'service':a51_0x534a62(0x195),'command':a51_0x534a62(0x178),'description':a51_0x534a62(0x181),'risk':a51_0x534a62(0x17d),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a51_0x534a62(0x199),'description':a51_0x534a62(0x191),'required':!![]}],'flags':[{'name':'global','type':a51_0x534a62(0x19a),'description':a51_0x534a62(0x193),'default':![]}],'execute':execute};function a51_0x2975(){const _0x238383=['Project','routing','3265FofMgK','Delete\x20a\x20config\x20value\x20from\x20one\x20scope','\x20config\x20delete\x20<key>\x20[--global]','args','288DFeULq','211560SNULHp','prototype','465264bQhbNj','\x20deleted','has','1762086NgDCSq','trim','Missing\x20key\x20argument.','global','3nehKAI','validation','125210QjHRPA','Top-level\x20config\x20key;\x20legacy\x20inherit\x20is\x20accepted\x20for\x20migration','inherit','Delete\x20from\x20global\x20config\x20(~/.rabetbase.json)','146456xsGxyA','config','Use\x20workspace\x20commands\x20to\x20modify\x20apps\x20and\x20their\x20default\x20selection.','call','708yLliAj','key','boolean','\x20already\x20absent','delete','Usage:\x20','hasOwnProperty','Global','2686964YkuYhH','write'];a51_0x2975=function(){return _0x238383;};return a51_0x2975();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a52_0x43eb(_0x263188,_0x2b4b01){_0x263188=_0x263188-0x176;const _0x139e98=a52_0x139e();let _0x43eb07=_0x139e98[_0x263188];return _0x43eb07;}const a52_0x38f060=a52_0x43eb;(function(_0x12e5d2,_0x5c4fef){const _0x3f5c41=a52_0x43eb,_0x45703f=_0x12e5d2();while(!![]){try{const _0x537264=parseInt(_0x3f5c41(0x180))/0x1+-parseInt(_0x3f5c41(0x186))/0x2+parseInt(_0x3f5c41(0x183))/0x3*(-parseInt(_0x3f5c41(0x179))/0x4)+-parseInt(_0x3f5c41(0x18a))/0x5+parseInt(_0x3f5c41(0x185))/0x6*(parseInt(_0x3f5c41(0x181))/0x7)+parseInt(_0x3f5c41(0x177))/0x8*(parseInt(_0x3f5c41(0x17f))/0x9)+-parseInt(_0x3f5c41(0x17e))/0xa*(-parseInt(_0x3f5c41(0x188))/0xb);if(_0x537264===_0x5c4fef)break;else _0x45703f['push'](_0x45703f['shift']());}catch(_0x4b909c){_0x45703f['push'](_0x45703f['shift']());}}}(a52_0x139e,0x46f5b));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';function a52_0x139e(){const _0x576895=['2695SvwcaZ','config','15xfumOt','Get\x20a\x20config\x20value\x20by\x20key','6342GxaAiU','1095904NYOnDw','\x20config\x20get\x20--key\x20<key>','11CHiJuC','validation','2253065rTiiPl','Missing\x20key.','16iwssQs','object','362788EjNLHT','string','str','app','get','9627890RGIzYq','763119vseDNk','203385OChxvj'];a52_0x139e=function(){return _0x576895;};return a52_0x139e();}async function execute(_0x5f70bd){const _0x27183a=a52_0x43eb,_0x12bb8b=_0x5f70bd[_0x27183a(0x17b)]('key');if(!_0x12bb8b)throw CliErrors['validation'](_0x27183a(0x176),'Usage:\x20'+CLI_BIN_NAME+_0x27183a(0x187));const _0x127ea6=readConfig(),_0x116822=_0x12bb8b===_0x27183a(0x17c)?'appcode':_0x12bb8b,_0x322b26=_0x127ea6[_0x116822];if(_0x322b26===undefined)throw CliErrors[_0x27183a(0x189)]('Key\x20not\x20found:\x20'+_0x12bb8b);return{'ok':!![],'data':typeof _0x322b26===_0x27183a(0x178)?_0x322b26:{[_0x116822]:_0x322b26},'message':typeof _0x322b26==='object'?undefined:String(_0x322b26)};}export const configGetDefinition={'service':a52_0x38f060(0x182),'command':a52_0x38f060(0x17d),'description':a52_0x38f060(0x184),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a52_0x38f060(0x17a),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3ad994,_0x178bb7){const _0x21e8bd=a53_0x3b2c,_0x59b6d4=_0x3ad994();while(!![]){try{const _0x2f9ca4=-parseInt(_0x21e8bd(0xcb))/0x1*(-parseInt(_0x21e8bd(0xcd))/0x2)+-parseInt(_0x21e8bd(0xca))/0x3+-parseInt(_0x21e8bd(0xcf))/0x4*(-parseInt(_0x21e8bd(0xc9))/0x5)+-parseInt(_0x21e8bd(0xc7))/0x6+parseInt(_0x21e8bd(0xd0))/0x7*(-parseInt(_0x21e8bd(0xcc))/0x8)+parseInt(_0x21e8bd(0xc8))/0x9+parseInt(_0x21e8bd(0xce))/0xa;if(_0x2f9ca4===_0x178bb7)break;else _0x59b6d4['push'](_0x59b6d4['shift']());}catch(_0x34b574){_0x59b6d4['push'](_0x59b6d4['shift']());}}}(a53_0x4aa4,0x40de7));import{configListDefinition}from'../../commands/config/list.js';function a53_0x3b2c(_0x5bb506,_0x1a2cec){_0x5bb506=_0x5bb506-0xc7;const _0x4aa442=a53_0x4aa4();let _0x3b2c77=_0x4aa442[_0x5bb506];return _0x3b2c77;}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_0x4aa4(){const _0xfb1b03=['3097930myAGyw','10420PFpXXz','141638fDmDJV','2614434OYihVH','3685104CwllhC','745xmExta','325668byRXYu','28FJnSbZ','128rpvOTE','1882efSbRZ'];a53_0x4aa4=function(){return _0xfb1b03;};return a53_0x4aa4();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a54_0x4a68(_0x15cc91,_0x47965c){_0x15cc91=_0x15cc91-0xbe;const _0x5d8750=a54_0x5d87();let _0x4a68c8=_0x5d8750[_0x15cc91];return _0x4a68c8;}const a54_0xe4f5c7=a54_0x4a68;(function(_0x363e19,_0x41ca5a){const _0x32df75=a54_0x4a68,_0x1a4003=_0x363e19();while(!![]){try{const _0x4f3469=-parseInt(_0x32df75(0xcc))/0x1+-parseInt(_0x32df75(0xe0))/0x2+-parseInt(_0x32df75(0xd4))/0x3+-parseInt(_0x32df75(0xc8))/0x4+-parseInt(_0x32df75(0xcb))/0x5*(-parseInt(_0x32df75(0xdf))/0x6)+parseInt(_0x32df75(0xf0))/0x7*(-parseInt(_0x32df75(0xe4))/0x8)+parseInt(_0x32df75(0xce))/0x9*(parseInt(_0x32df75(0xfa))/0xa);if(_0x4f3469===_0x41ca5a)break;else _0x1a4003['push'](_0x1a4003['shift']());}catch(_0xc00649){_0x1a4003['push'](_0x1a4003['shift']());}}}(a54_0x5d87,0x702a0));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,resolveDomainConfigInput}from'../../config/domain-config.js';import{ENTERPRISE_ROUTING_KIND,ENTERPRISE_ROUTING_PROTOCOL}from'../../generated/routing-contract.js';import{DEFAULT_LOVRABET_REGION,ENABLED_LOVRABET_REGION_VALUES,isEnabledLovrabetRegion}from'../../constant/region.js';import{getOfficialRoutingProfile}from'../../constant/routing-profile.js';import{GLOBAL_SCOPE_FLAG}from'../../commands/common/flags.js';export const configInitFlags=[GLOBAL_SCOPE_FLAG,{'name':a54_0xe4f5c7(0xcd),'type':a54_0xe4f5c7(0xed),'description':a54_0xe4f5c7(0xca)+ENABLED_LOVRABET_REGION_VALUES[a54_0xe4f5c7(0xea)](',\x20'),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},{'name':'domain-config','type':a54_0xe4f5c7(0xed),'description':a54_0xe4f5c7(0xf4)},{'name':a54_0xe4f5c7(0xe9),'type':a54_0xe4f5c7(0xed),'description':a54_0xe4f5c7(0xd3)},{'name':a54_0xe4f5c7(0xda),'type':a54_0xe4f5c7(0xed),'description':a54_0xe4f5c7(0xd6)},{'name':'runtime-domain','type':'string','description':a54_0xe4f5c7(0xc0)},{'name':a54_0xe4f5c7(0xdd),'type':a54_0xe4f5c7(0xed),'description':a54_0xe4f5c7(0xe2)},{'name':a54_0xe4f5c7(0xbf),'type':a54_0xe4f5c7(0xed),'description':a54_0xe4f5c7(0xf7)},{'name':a54_0xe4f5c7(0xdb),'type':a54_0xe4f5c7(0xed),'description':a54_0xe4f5c7(0xc3)},{'name':'local-domain','type':a54_0xe4f5c7(0xed),'description':a54_0xe4f5c7(0xf9)},{'name':a54_0xe4f5c7(0xc9),'type':a54_0xe4f5c7(0xed),'description':a54_0xe4f5c7(0xd9)}];async function resolveRegion(_0x4c423c){const _0x25397d=a54_0xe4f5c7,_0x1618a6=_0x4c423c[_0x25397d(0xe3)](_0x25397d(0xcd));if(_0x1618a6){if(!isEnabledLovrabetRegion(_0x1618a6))throw CliErrors[_0x25397d(0xd2)]('Region\x20\x22'+_0x1618a6+_0x25397d(0xef),_0x25397d(0xc4)+ENABLED_LOVRABET_REGION_VALUES[_0x25397d(0xea)](',\x20'));return _0x1618a6;}if(_0x4c423c[_0x25397d(0xd0)])return DEFAULT_LOVRABET_REGION;try{return await select({'message':_0x25397d(0xf2),'default':DEFAULT_LOVRABET_REGION,'choices':ENABLED_LOVRABET_REGION_VALUES[_0x25397d(0xe6)](_0x68a55e=>({'name':getOfficialRoutingProfile(_0x68a55e)[_0x25397d(0xdc)]+'\x20('+_0x68a55e+')','value':_0x68a55e}))});}catch(_0x348741){if(_0x348741?.[_0x25397d(0xf5)]===_0x25397d(0xee))throw CliErrors['cancelled']();throw _0x348741;}}export async function executeConfigInit(_0x2bb1a2){const _0x30f429=a54_0xe4f5c7,_0x317ec1=resolveDomainConfigInput(_0x2bb1a2),_0x3db843=_0x317ec1[_0x30f429(0xc7)],_0x4fabe1=Object[_0x30f429(0xc6)](_0x3db843)[_0x30f429(0xc2)]>0x0;if(_0x4fabe1&&_0x2bb1a2[_0x30f429(0xe3)](_0x30f429(0xcd)))throw CliErrors[_0x30f429(0xd2)](_0x30f429(0xf8));if(!!_0x3db843[_0x30f429(0xbe)]!==!!_0x3db843[_0x30f429(0xe7)])throw CliErrors['validation'](_0x30f429(0xd5));const _0x58717c=_0x2bb1a2[_0x30f429(0xec)](_0x30f429(0xde))?_0x30f429(0xde):'project',_0x3252a9=readScopedConfig(_0x58717c);for(const _0x2863e5 of DOMAIN_CONFIG_FIELDS)delete _0x3252a9[_0x2863e5];for(const _0x56b74b of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x3252a9[_0x56b74b];delete _0x3252a9[_0x30f429(0xf1)];let _0x18f77c=null;if(_0x4fabe1)delete _0x3252a9[_0x30f429(0xcd)],_0x317ec1[_0x30f429(0xeb)]===_0x30f429(0xcf)?_0x3252a9[_0x30f429(0xf1)]={'protocol':ENTERPRISE_ROUTING_PROTOCOL,'kind':ENTERPRISE_ROUTING_KIND,'domains':_0x317ec1['manifestDomains'],'cdn':_0x317ec1[_0x30f429(0xd7)]}:Object[_0x30f429(0xe1)](_0x3252a9,_0x3db843);else{_0x18f77c=await resolveRegion(_0x2bb1a2);if(_0x18f77c===DEFAULT_LOVRABET_REGION)delete _0x3252a9[_0x30f429(0xcd)];else _0x3252a9['region']=_0x18f77c;}return writeScopedConfig(_0x3252a9,_0x58717c),{'ok':!![],'message':_0x4fabe1?'Rabetbase\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20'+Object[_0x30f429(0xc6)](_0x317ec1[_0x30f429(0xeb)]===_0x30f429(0xcf)?_0x317ec1['manifestDomains']:_0x3db843)[_0x30f429(0xea)](',\x20')+'.':_0x30f429(0xc5)+_0x18f77c+'.','data':{'mode':_0x4fabe1?_0x30f429(0xc1):_0x30f429(0xf6),'protocol':_0x317ec1[_0x30f429(0xeb)]==='enterprise-v1'?ENTERPRISE_ROUTING_PROTOCOL:undefined,'region':_0x18f77c,'domains':_0x3db843,'cdn':_0x317ec1[_0x30f429(0xeb)]===_0x30f429(0xcf)?_0x317ec1[_0x30f429(0xd7)]:undefined}};}function a54_0x5d87(){const _0x459002=['102312LkQMHe','certificate-domain','Official\x20Lovrabet\x20region:\x20','180710oDhAYR','602198fNorbU','region','4113PhBrAA','enterprise-v1','nonInteractive','write','validation','Custom\x20User\x20HTTPS\x20origin','404361HdAkKB','Independent\x20deployment\x20requires\x20--local-domain\x20and\x20--certificate-domain\x20together.','Custom\x20platform\x20API\x20HTTPS\x20origin','cdn','config','Custom\x20certificate\x20service\x20HTTPS\x20origin','api-domain','app-domain','label','skill-domain','global','90AioqKE','1639880jTrJQL','assign','Custom\x20SkillHub\x20HTTPS\x20origin','str','8qFargE','init','map','certificateDomain','Initialize\x20the\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','user-domain','join','mode','bool','string','ExitPromptError','\x22\x20is\x20not\x20currently\x20available.','3605812qqNfhR','routing','Select\x20Lovrabet\x20region','Updates\x20the\x20selected\x20Rabetbase\x20region\x20or\x20independent-deployment\x20Domain\x20configuration.\x20Cookie,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','Independent-deployment\x20Domain\x20JSON\x20file','name','official','Custom\x20knowledge-base\x20HTTPS\x20origin','Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.','Custom\x20local\x20callback\x20HTTPS\x20origin','44090oAApKE','localDomain','kb-domain','Custom\x20Runtime\x20HTTPS\x20origin','independent','length','Custom\x20Lovrabet\x20workspace\x20HTTPS\x20origin','Available\x20regions:\x20','Rabetbase\x20connection\x20configured\x20for\x20region:\x20','keys','domains'];a54_0x5d87=function(){return _0x459002;};return a54_0x5d87();}export const configInitDefinition={'service':a54_0xe4f5c7(0xd8),'command':a54_0xe4f5c7(0xe5),'description':a54_0xe4f5c7(0xe8),'risk':a54_0xe4f5c7(0xd1),'confirmationDescription':a54_0xe4f5c7(0xf3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a55_0x4c0cf3=a55_0x20c4;(function(_0x12be3f,_0x59d45c){const _0x417111=a55_0x20c4,_0x211cb2=_0x12be3f();while(!![]){try{const _0x214354=parseInt(_0x417111(0x98))/0x1+-parseInt(_0x417111(0xa4))/0x2+parseInt(_0x417111(0xa6))/0x3*(parseInt(_0x417111(0x9a))/0x4)+-parseInt(_0x417111(0xa1))/0x5*(parseInt(_0x417111(0x9d))/0x6)+-parseInt(_0x417111(0x9f))/0x7+-parseInt(_0x417111(0xa5))/0x8*(-parseInt(_0x417111(0x9c))/0x9)+parseInt(_0x417111(0xa3))/0xa;if(_0x214354===_0x59d45c)break;else _0x211cb2['push'](_0x211cb2['shift']());}catch(_0x2fd641){_0x211cb2['push'](_0x211cb2['shift']());}}}(a55_0x1e43,0x9338d));import{readScopedConfig}from'../../commands/config/shared.js';function a55_0x20c4(_0x3a973d,_0xb3be5a){_0x3a973d=_0x3a973d-0x97;const _0x1e4310=a55_0x1e43();let _0x20c460=_0x1e4310[_0x3a973d];return _0x20c460;}function a55_0x1e43(){const _0x30cfda=['List\x20all\x20config\x20values','1413996jyDKfV','read','9ThhEJJ','3221394myBNvh','global','6811875nzZqaa','bool','5wHyOOY','config','5637920svGHzo','711640JerIaY','6274336ZWaECI','3hkNFfE','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','list','767282dEpdTv'];a55_0x1e43=function(){return _0x30cfda;};return a55_0x1e43();}import{readConfig}from'../../utils/config.js';async function execute(_0x578e6d){const _0x4943e1=a55_0x20c4,_0x1e76fc=_0x578e6d[_0x4943e1(0xa0)](_0x4943e1(0x9e))?readScopedConfig(_0x4943e1(0x9e)):readConfig();return{'ok':!![],'data':_0x1e76fc};}export const configListDefinition={'service':a55_0x4c0cf3(0xa2),'command':a55_0x4c0cf3(0x97),'description':a55_0x4c0cf3(0x99),'risk':a55_0x4c0cf3(0x9b),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a55_0x4c0cf3(0x9e),'type':'boolean','description':a55_0x4c0cf3(0xa7),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a56_0x16dd06=a56_0x323a;(function(_0x534480,_0xf09ff5){const _0x812e85=a56_0x323a,_0x405c47=_0x534480();while(!![]){try{const _0x444d6b=-parseInt(_0x812e85(0x1e0))/0x1*(-parseInt(_0x812e85(0x205))/0x2)+-parseInt(_0x812e85(0x20e))/0x3*(-parseInt(_0x812e85(0x1e1))/0x4)+parseInt(_0x812e85(0x1f2))/0x5*(-parseInt(_0x812e85(0x1ef))/0x6)+parseInt(_0x812e85(0x1f8))/0x7*(parseInt(_0x812e85(0x1ee))/0x8)+-parseInt(_0x812e85(0x202))/0x9+parseInt(_0x812e85(0x1fd))/0xa*(parseInt(_0x812e85(0x1f5))/0xb)+-parseInt(_0x812e85(0x1fe))/0xc;if(_0x444d6b===_0xf09ff5)break;else _0x405c47['push'](_0x405c47['shift']());}catch(_0x181dd2){_0x405c47['push'](_0x405c47['shift']());}}}(a56_0x18e7,0xc0495));import{CliErrors}from'../../errors.js';function a56_0x323a(_0x50dee0,_0x399841){_0x50dee0=_0x50dee0-0x1da;const _0x18e752=a56_0x18e7();let _0x323a67=_0x18e752[_0x50dee0];return _0x323a67;}function a56_0x18e7(){const _0x376c0e=['write','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','Set\x20a\x20config\x20value','57zJuImj','\x20workspace\x20add\x20<name>\x20--appcode\x20','`,\x20`','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','apps','Use\x20`','\x20(stored\x20as\x20a\x20single\x20app\x20profile)','80329zzLpcJ','286788MBwLFJ','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','key','Invalid\x20value\x20for\x20\x22','config','env','length','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','Usage:\x20','Missing\x20key.','app','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','\x22.\x20Allowed:\x20','96wtEMlL','667686sZMCBM','string','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','5fMmcMe','str','\x20set\x20to:\x20','198451RGGoMp','riskLevel','set','772296fywVNR','Settable\x20top-level\x20keys:\x20','appcode','validation','keys','90GUIanp','21621252LGtasM','value','boolean','Project','4945824OrMXSv','Global','Top-level\x20key\x20\x22','10TpJZMB','bool','object','includes','global','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)'];a56_0x18e7=function(){return _0x376c0e;};return a56_0x18e7();}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';async function execute(_0x2ec2c7){const _0x48503a=a56_0x323a,_0x4aff4f=_0x2ec2c7['str']('key'),_0x37cbba=_0x2ec2c7[_0x48503a(0x1f3)](_0x48503a(0x1ff));if(!_0x4aff4f)throw CliErrors[_0x48503a(0x1fb)](_0x48503a(0x1ea),_0x48503a(0x1e9)+CLI_BIN_NAME+_0x48503a(0x1e2));if(_0x37cbba===undefined||_0x37cbba==='')throw CliErrors[_0x48503a(0x1fb)]('Missing\x20value.','Usage:\x20'+CLI_BIN_NAME+_0x48503a(0x1e2));let _0x5f3e7c=_0x4aff4f,_0x11e7e7=_0x37cbba;if(_0x37cbba['length']>0x1f4)throw CliErrors['validation']('Config\x20value\x20is\x20invalid\x20or\x20too\x20long.');if(_0x4aff4f===_0x48503a(0x1f6))throw CliErrors[_0x48503a(0x1fb)](_0x48503a(0x1e8));if(!isTopLevelConfigKey(_0x4aff4f))throw CliErrors[_0x48503a(0x1fb)](_0x48503a(0x204)+_0x4aff4f+'\x22\x20is\x20not\x20settable.',_0x48503a(0x1f9)+getTopLevelConfigKeySummary());if(CONFIG_ENUM_VALUES[_0x4aff4f]&&!CONFIG_ENUM_VALUES[_0x4aff4f][_0x48503a(0x208)](_0x37cbba))throw CliErrors[_0x48503a(0x1fb)](_0x48503a(0x1e4)+_0x4aff4f+_0x48503a(0x1ed)+CONFIG_ENUM_VALUES[_0x4aff4f]['join'](',\x20'));if(_0x4aff4f==='locale'&&!normalizeLocale(_0x37cbba))throw CliErrors[_0x48503a(0x1fb)]('Invalid\x20locale\x20value.','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US');DOMAIN_CONFIG_FIELDS[_0x48503a(0x208)](_0x4aff4f)&&(_0x11e7e7=normalizeDomainOrigin(_0x4aff4f,_0x37cbba));const _0x1be507={'global':_0x2ec2c7[_0x48503a(0x206)](_0x48503a(0x209))},_0x2b585b=resolveWriteScope(_0x1be507),_0x4e377e=readScopedConfig(_0x2b585b);_0x4aff4f==='app'&&(_0x5f3e7c=_0x48503a(0x1fa),delete _0x4e377e[_0x48503a(0x1eb)]);_0x4aff4f==='locale'&&(_0x11e7e7=normalizeLocale(_0x37cbba));if(_0x4aff4f==='env'){_0x11e7e7=normalizeEnv(_0x37cbba);if(!isProduction(_0x11e7e7)&&!isDaily(_0x11e7e7))throw CliErrors[_0x48503a(0x1fb)](_0x48503a(0x1f1),_0x48503a(0x1dc));}if(_0x4aff4f==='appcode'){const _0x6502ad=_0x4e377e[_0x48503a(0x1dd)]&&typeof _0x4e377e['apps']===_0x48503a(0x207)?Object[_0x48503a(0x1fc)](_0x4e377e[_0x48503a(0x1dd)]):[];if(_0x6502ad[_0x48503a(0x1e7)]>0x0)throw CliErrors[_0x48503a(0x1fb)](_0x48503a(0x1ec),_0x48503a(0x1de)+CLI_BIN_NAME+_0x48503a(0x1da)+_0x11e7e7+_0x48503a(0x1db)+CLI_BIN_NAME+_0x48503a(0x20c));const _0x444448=buildCanonicalProjectConfig({..._0x4e377e},{'appCodes':[_0x11e7e7],'env':typeof _0x4e377e['env']==='string'?_0x4e377e[_0x48503a(0x1e6)]:undefined});writeScopedConfig(_0x444448,_0x2b585b);const _0x2f5e9d=_0x2b585b===_0x48503a(0x209)?_0x48503a(0x203):_0x48503a(0x201);return{'ok':!![],'message':'✓\x20'+_0x2f5e9d+'\x20appcode\x20set\x20to:\x20'+_0x11e7e7+_0x48503a(0x1df)};}_0x4e377e[_0x5f3e7c]=_0x11e7e7,writeScopedConfig(_0x4e377e,_0x2b585b);const _0x14385a=_0x2b585b===_0x48503a(0x209)?_0x48503a(0x203):_0x48503a(0x201);return{'ok':!![],'message':'✓\x20'+_0x14385a+'\x20'+_0x5f3e7c+_0x48503a(0x1f4)+_0x11e7e7};}export const configSetDefinition={'service':a56_0x16dd06(0x1e5),'command':a56_0x16dd06(0x1f7),'description':a56_0x16dd06(0x20d),'risk':a56_0x16dd06(0x20b),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a56_0x16dd06(0x1e3),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]},{'name':'value','type':a56_0x16dd06(0x1f0),'description':'Config\x20value','required':!![]},{'name':a56_0x16dd06(0x209),'type':a56_0x16dd06(0x200),'description':a56_0x16dd06(0x20a),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x121838,_0x3cf8e0){var _0x18a28c=a57_0x4042,_0x5ef8ac=_0x121838();while(!![]){try{var _0x4b562d=-parseInt(_0x18a28c(0x76))/0x1+-parseInt(_0x18a28c(0x6e))/0x2*(parseInt(_0x18a28c(0x72))/0x3)+parseInt(_0x18a28c(0x6b))/0x4*(-parseInt(_0x18a28c(0x6a))/0x5)+-parseInt(_0x18a28c(0x6d))/0x6+-parseInt(_0x18a28c(0x6f))/0x7+parseInt(_0x18a28c(0x74))/0x8+-parseInt(_0x18a28c(0x73))/0x9*(-parseInt(_0x18a28c(0x6c))/0xa);if(_0x4b562d===_0x3cf8e0)break;else _0x5ef8ac['push'](_0x5ef8ac['shift']());}catch(_0x2f8aa3){_0x5ef8ac['push'](_0x5ef8ac['shift']());}}}(a57_0x245c,0x1ecd0));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';function a57_0x4042(_0x4ab75d,_0xb790c1){_0x4ab75d=_0x4ab75d-0x69;var _0x245c0b=a57_0x245c();var _0x40421b=_0x245c0b[_0x4ab75d];return _0x40421b;}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};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x16bb78){var _0xb6a396=a57_0x4042;if(_0x16bb78[_0xb6a396(0x70)])return _0xb6a396(0x70);if(!isInProject())throw CliErrors[_0xb6a396(0x71)](_0xb6a396(0x69),_0xb6a396(0x75)+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20first.');return'project';}export function readScopedConfig(_0x311281){return readConfigFile(resolveWriteConfigPath(_0x311281));}export function writeScopedConfig(_0x272dbc,_0x49c74b){writeConfigFile(resolveWriteConfigPath(_0x49c74b),_0x272dbc);}function a57_0x245c(){var _0x4ef589=['938714blYAOf','global','validation','188742kTTcSW','8811oqIIXH','1525224jfFRkG','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','21213hEgJEa','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','260EVSCTL','10896MosDEW','5090PUAKru','85110RBSyVM','8rXUVua'];a57_0x245c=function(){return _0x4ef589;};return a57_0x245c();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a58_0x34cc(){const _0x51a6fc=['--business-group\x20is\x20required','dbTableSelector','kind','toUpperCase','1006831MMbWsw','trim','message','businessGroup','modelCode','dbLinkId','isArray','195465afjHBm','sourceType','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','data','1596726rvuePs','hasOwnProperty','522999BNUGMu','32VXlUAt','Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.','value','isFinite','--code\x20is\x20required','expect-business-group','method',',\x20actual\x20','code','str','Expectation\x20mismatch\x20at\x20businessGroup','datasetName','name','POST','Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing','Update\x20business\x20scenario\x20group','business-group-update','dbtableConfig','apiError','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','string','datasetCode','2512741ArlBkc','60ZQsbWb','found','expectBusinessGroup','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','unchanged','object','--business-group\x20must\x20not\x20be\x20blank','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','tableName','prototype','Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.','89978WfDrdI','business-group','/smartapi/dblink/updateTableBusinessGroup','parse','10hkrSOY','modelId','length','DB_TABLE','backend','274074RvBkop','dataset','extend','stringify','number','payload','dbId','validation','call','write','keys','db-table','DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.','datasetId','3RPkOvE','METADATA','update','ungrouped'];a58_0x34cc=function(){return _0x51a6fc;};return a58_0x34cc();}const a58_0x42c080=a58_0x3971;(function(_0x56774e,_0xdbff4e){const _0x208e04=a58_0x3971,_0xd765e0=_0x56774e();while(!![]){try{const _0x24f5a1=parseInt(_0x208e04(0x166))/0x1+parseInt(_0x208e04(0x15d))/0x2*(parseInt(_0x208e04(0x125))/0x3)+-parseInt(_0x208e04(0x152))/0x4*(-parseInt(_0x208e04(0x134))/0x5)+-parseInt(_0x208e04(0x138))/0x6+-parseInt(_0x208e04(0x12d))/0x7*(parseInt(_0x208e04(0x13b))/0x8)+parseInt(_0x208e04(0x13a))/0x9*(parseInt(_0x208e04(0x161))/0xa)+parseInt(_0x208e04(0x151))/0xb;if(_0x24f5a1===_0xdbff4e)break;else _0xd765e0['push'](_0xd765e0['shift']());}catch(_0xfc00a){_0xd765e0['push'](_0xd765e0['shift']());}}}(a58_0x34cc,0x55953));function a58_0x3971(_0x1610b8,_0x48aa90){_0x1610b8=_0x1610b8-0x125;const _0x34ccc4=a58_0x34cc();let _0x397188=_0x34ccc4[_0x1610b8];return _0x397188;}import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateDbTableBusinessGroup,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const DB_TABLE_BACKEND_PATH=a58_0x42c080(0x15f),METADATA_BACKEND_PATH='/smartapi/question/er-config/business-group/edit',UNGROUPED_BUSINESS_GROUP=a58_0x42c080(0x128);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x3886af,input:_0x19f909,dryRun:_0x11d404}){const _0x1b6220=a58_0x42c080;validateInput(_0x19f909);const _0x254e68=normalizeBusinessGroupArgument(_0x19f909[_0x1b6220(0x130)]),_0x1ba527=await getDatasetDetail(_0x19f909[_0x1b6220(0x143)]),_0x25ea65=resolveBusinessGroupDataset(_0x1ba527,_0x19f909['code']);assertBusinessGroupUpdateSupported(_0x25ea65,_0x254e68);const _0x368b10=loadCurrentBusinessGroup(_0x1ba527,_0x25ea65);assertExpectedBusinessGroup(_0x368b10,_0x19f909[_0x1b6220(0x154)]);const _0x4c8676=buildBackendPlan(_0x3886af,_0x25ea65,_0x254e68),_0x3f455f=_0x368b10!==_0x254e68;let _0x56d1e9;if(_0x3f455f&&!_0x11d404){_0x4c8676[_0x1b6220(0x12b)]===_0x1b6220(0x171)?await updateDbTableBusinessGroup(_0x4c8676[_0x1b6220(0x16b)]):await updateErBusinessGroup(_0x4c8676[_0x1b6220(0x16b)]);const _0x492e4b=await getDatasetDetail(_0x25ea65[_0x1b6220(0x143)]),_0x515789=resolveBusinessGroupDataset(_0x492e4b,_0x25ea65[_0x1b6220(0x143)]),_0x28f8a3=loadCurrentBusinessGroup(_0x492e4b,_0x515789);if(_0x28f8a3!==_0x254e68)throw CliErrors[_0x1b6220(0x14d)](_0x1b6220(0x155),'Expected\x20'+JSON[_0x1b6220(0x169)](displayBusinessGroup(_0x254e68))+_0x1b6220(0x142)+JSON[_0x1b6220(0x169)](displayBusinessGroup(_0x28f8a3))+'.');_0x56d1e9={'verified':!![],'status':'matched','afterReadback':{'businessGroup':displayBusinessGroup(_0x28f8a3)}};}else!_0x3f455f&&(_0x56d1e9={'verified':!![],'status':_0x1b6220(0x156),'afterReadback':{'businessGroup':displayBusinessGroup(_0x368b10)}});const _0x5bf773={'operation':_0x1b6220(0x127),'appCode':_0x3886af,'selector':{'code':_0x25ea65[_0x1b6220(0x143)]},'dataset':{'id':_0x25ea65['id'],'code':_0x25ea65['code'],'name':_0x25ea65[_0x1b6220(0x147)],'sourceType':_0x25ea65[_0x1b6220(0x135)]},'before':{'businessGroup':displayBusinessGroup(_0x368b10)},'after':{'businessGroup':displayBusinessGroup(_0x254e68)},'changed':_0x3f455f,'dryRun':_0x11d404,'submitted':_0x3f455f&&!_0x11d404,'backend':{'method':_0x4c8676[_0x1b6220(0x141)],'path':_0x4c8676['path'],'payload':_0x4c8676['payload']},..._0x56d1e9?{'verification':_0x56d1e9}:{},'warnings':[]};return{'ok':!![],'data':_0x5bf773,'message':_0x3f455f?_0x11d404?_0x1b6220(0x136)+_0x25ea65[_0x1b6220(0x143)]:'Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20'+_0x25ea65[_0x1b6220(0x143)]:_0x1b6220(0x159)+_0x25ea65[_0x1b6220(0x143)]};}export const datasetBusinessGroupUpdate={'service':'dataset','command':a58_0x42c080(0x14b),'description':a58_0x42c080(0x14a),'risk':a58_0x42c080(0x16f),'flags':[CODE_FLAG,{'name':a58_0x42c080(0x15e),'type':a58_0x42c080(0x14f),'required':!![],'description':'Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it'},{'name':'expect-business-group','type':a58_0x42c080(0x14f),'required':![],'description':a58_0x42c080(0x149)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4c822b){validateInput(readBusinessGroupUpdateInput(_0x4c822b));},async 'dryRun'(_0x24b5bd){const _0x2c6d89=a58_0x42c080,_0x4448c1=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x24b5bd['appCode'],'input':readBusinessGroupUpdateInput(_0x24b5bd),'dryRun':!![]});return{'method':_0x4448c1['data'][_0x2c6d89(0x165)][_0x2c6d89(0x141)],'url':_0x4448c1['data'][_0x2c6d89(0x165)]['path'],'body':_0x4448c1['data'][_0x2c6d89(0x165)]['payload'],'description':_0x4448c1[_0x2c6d89(0x12f)],..._0x4448c1[_0x2c6d89(0x137)]};},async 'execute'(_0x31b039){return buildDatasetBusinessGroupUpdateResult({'appCode':_0x31b039['appCode'],'input':readBusinessGroupUpdateInput(_0x31b039),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x3f09a0){const _0x5926f8=a58_0x42c080,_0x516117=_0x3f09a0['str'](_0x5926f8(0x140));return{'code':trim(_0x3f09a0[_0x5926f8(0x144)]('code')),'businessGroup':_0x3f09a0[_0x5926f8(0x144)](_0x5926f8(0x15e)),'expectBusinessGroup':_0x516117===undefined||_0x516117===''?undefined:_0x516117};}function validateInput(_0x1c74d5){const _0x1249da=a58_0x42c080;if(!trim(_0x1c74d5['code']))throw CliErrors[_0x1249da(0x16d)](_0x1249da(0x13f));if(_0x1c74d5[_0x1249da(0x130)]===undefined)throw CliErrors['validation'](_0x1249da(0x129));if(!trim(_0x1c74d5[_0x1249da(0x130)]))throw CliErrors[_0x1249da(0x16d)](_0x1249da(0x158));}function assertBusinessGroupUpdateSupported(_0x38251b,_0x196278){const _0x3157e6=a58_0x42c080;if(_0x38251b['sourceType']===_0x3157e6(0x164)&&!_0x196278)throw CliErrors[_0x3157e6(0x16d)](_0x3157e6(0x13c));}function resolveBusinessGroupDataset(_0xef22e9,_0x13ff53){const _0x16e499=a58_0x42c080,_0x40366d=asPlainObject(_0xef22e9[_0x16e499(0x167)]),_0x10c782=asPlainObject(_0xef22e9[_0x16e499(0x14c)]),_0x109fb5=resolveSourceType(_0xef22e9,_0x40366d,_0x10c782),_0x5b30ef=firstString(_0xef22e9[_0x16e499(0x131)],_0xef22e9['code'],_0x40366d[_0x16e499(0x150)],_0x13ff53)||_0x13ff53;return{'id':firstNumber(_0xef22e9['modelId'],_0xef22e9['id'],_0x40366d[_0x16e499(0x173)])??firstString(_0xef22e9[_0x16e499(0x162)],_0xef22e9['id'],_0x40366d['datasetId'])??null,'code':_0x5b30ef,'name':firstString(_0xef22e9[_0x16e499(0x147)],_0x40366d[_0x16e499(0x146)],_0x40366d[_0x16e499(0x147)])||null,'sourceType':_0x109fb5,'dbTableSelector':_0x109fb5===_0x16e499(0x164)?{'dbLinkId':firstNumber(_0x10c782[_0x16e499(0x16c)]),'tableName':firstString(_0x10c782[_0x16e499(0x15a)])||null}:null};}function resolveSourceType(_0x4a627d,_0x2e3923,_0x404e12){const _0x34df45=a58_0x42c080,_0x125178=firstString(_0x4a627d['source'],_0x4a627d[_0x34df45(0x135)],_0x2e3923['source'],_0x2e3923['sourceType'])?.[_0x34df45(0x12e)]()[_0x34df45(0x12c)]();if(_0x125178===_0x34df45(0x164)||_0x125178===_0x34df45(0x126))return _0x125178;if(Object[_0x34df45(0x170)](_0x404e12)[_0x34df45(0x163)]>0x0)return _0x34df45(0x164);throw CliErrors[_0x34df45(0x16d)](_0x34df45(0x14e));}function loadCurrentBusinessGroup(_0x430a56,_0x2eb8d2){const _0x953035=a58_0x42c080,_0xa7cbc9=readBusinessGroupFromDatasetDetail(_0x430a56,_0x2eb8d2[_0x953035(0x135)]);if(_0xa7cbc9[_0x953035(0x153)])return normalizeBusinessGroup(_0xa7cbc9[_0x953035(0x13d)]);return'';}function readBusinessGroupFromDatasetDetail(_0x3a3061,_0x9539dc){const _0x9ec9ea=a58_0x42c080,_0x963bc7=asPlainObject(_0x3a3061[_0x9ec9ea(0x167)]),_0x53d305=firstPresent(_0x3a3061['businessGroup']);if(_0x53d305['found'])return _0x53d305;const _0xb35d8a=firstPresent(_0x963bc7[_0x9ec9ea(0x130)]);if(_0xb35d8a[_0x9ec9ea(0x153)])return _0xb35d8a;if(_0x9539dc===_0x9ec9ea(0x164))return{'found':![]};const _0x5b85a6=readBusinessGroupFromExtend(_0x3a3061[_0x9ec9ea(0x168)]);if(_0x5b85a6['found'])return _0x5b85a6;return readBusinessGroupFromExtend(_0x963bc7[_0x9ec9ea(0x168)]);}function readBusinessGroupFromExtend(_0x620b89){const _0x328c20=a58_0x42c080;if(_0x620b89===undefined||_0x620b89===null||_0x620b89==='')return{'found':![]};if(typeof _0x620b89==='string')try{const _0x442dd5=JSON[_0x328c20(0x160)](_0x620b89);return readBusinessGroupFromExtend(_0x442dd5);}catch{return{'found':![]};}const _0x4e60e3=asPlainObject(_0x620b89);if(Object[_0x328c20(0x15b)][_0x328c20(0x139)][_0x328c20(0x16e)](_0x4e60e3,_0x328c20(0x130)))return{'found':!![],'value':_0x4e60e3[_0x328c20(0x130)]};return{'found':![]};}function firstPresent(..._0x51a11d){for(const _0x33b35a of _0x51a11d){if(_0x33b35a!==undefined&&_0x33b35a!==null)return{'found':!![],'value':_0x33b35a};}return{'found':![]};}function assertExpectedBusinessGroup(_0x67ea2a,_0xe24558){const _0xd6823a=a58_0x42c080;if(_0xe24558===undefined)return;const _0x71ed41=normalizeBusinessGroupArgument(_0xe24558);if(_0x67ea2a!==_0x71ed41)throw CliErrors[_0xd6823a(0x16d)](_0xd6823a(0x145),'Expected\x20'+JSON[_0xd6823a(0x169)](_0x71ed41)+_0xd6823a(0x142)+JSON[_0xd6823a(0x169)](_0x67ea2a));}function buildBackendPlan(_0x251b87,_0x903e4c,_0x25227c){const _0x15cb27=a58_0x42c080;if(_0x903e4c[_0x15cb27(0x135)]===_0x15cb27(0x164)){if(!_0x903e4c[_0x15cb27(0x12a)]||_0x903e4c[_0x15cb27(0x12a)][_0x15cb27(0x132)]===null||!_0x903e4c[_0x15cb27(0x12a)][_0x15cb27(0x15a)])throw CliErrors[_0x15cb27(0x16d)](_0x15cb27(0x172),_0x15cb27(0x15c));return{'kind':_0x15cb27(0x171),'method':'POST','path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x903e4c['dbTableSelector'][_0x15cb27(0x132)],'tableName':_0x903e4c[_0x15cb27(0x12a)][_0x15cb27(0x15a)],'businessGroup':_0x25227c}};}return{'kind':'metadata','method':_0x15cb27(0x148),'path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x251b87,'datasetCode':_0x903e4c[_0x15cb27(0x143)],'businessGroup':_0x25227c}};}function normalizeBusinessGroup(_0x22b39f){const _0x522fdd=a58_0x42c080;if(_0x22b39f===undefined||_0x22b39f===null)return'';return String(_0x22b39f)[_0x522fdd(0x12e)]();}function normalizeBusinessGroupArgument(_0x2aef49){const _0x342712=normalizeBusinessGroup(_0x2aef49);return _0x342712===UNGROUPED_BUSINESS_GROUP?'':_0x342712;}function displayBusinessGroup(_0x4cffee){return _0x4cffee||UNGROUPED_BUSINESS_GROUP;}function asPlainObject(_0x133933){const _0x17174f=a58_0x42c080;if(!_0x133933||typeof _0x133933!==_0x17174f(0x157)||Array[_0x17174f(0x133)](_0x133933))return{};return _0x133933;}function firstString(..._0x38d06c){const _0x42bb50=a58_0x42c080;for(const _0x5b2de8 of _0x38d06c){if(typeof _0x5b2de8==='string'&&_0x5b2de8['trim']())return _0x5b2de8[_0x42bb50(0x12e)]();if(typeof _0x5b2de8===_0x42bb50(0x16a)&&Number[_0x42bb50(0x13e)](_0x5b2de8))return String(_0x5b2de8);}return undefined;}function firstNumber(..._0x2489fe){const _0x109036=a58_0x42c080;for(const _0x2dd7b2 of _0x2489fe){if(typeof _0x2dd7b2===_0x109036(0x16a)&&Number[_0x109036(0x13e)](_0x2dd7b2))return _0x2dd7b2;if(typeof _0x2dd7b2===_0x109036(0x14f)&&_0x2dd7b2['trim']()&&Number[_0x109036(0x13e)](Number(_0x2dd7b2)))return Number(_0x2dd7b2);}return null;}function trim(_0x37641d){return String(_0x37641d||'')['trim']();}
|
|
1
|
+
const a58_0x2edd1a=a58_0x42a7;(function(_0x6db595,_0x32e30e){const _0x1c3887=a58_0x42a7,_0x51d467=_0x6db595();while(!![]){try{const _0x367a3c=parseInt(_0x1c3887(0x1d8))/0x1+-parseInt(_0x1c3887(0x211))/0x2+-parseInt(_0x1c3887(0x213))/0x3+-parseInt(_0x1c3887(0x1d7))/0x4*(parseInt(_0x1c3887(0x218))/0x5)+-parseInt(_0x1c3887(0x1d4))/0x6+-parseInt(_0x1c3887(0x1ec))/0x7*(-parseInt(_0x1c3887(0x1df))/0x8)+-parseInt(_0x1c3887(0x1fc))/0x9*(-parseInt(_0x1c3887(0x1f9))/0xa);if(_0x367a3c===_0x32e30e)break;else _0x51d467['push'](_0x51d467['shift']());}catch(_0x4bfb06){_0x51d467['push'](_0x51d467['shift']());}}}(a58_0x22c3,0x2b4db));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,updateDbTableBusinessGroup,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const DB_TABLE_BACKEND_PATH=a58_0x2edd1a(0x1de),METADATA_BACKEND_PATH=a58_0x2edd1a(0x223),UNGROUPED_BUSINESS_GROUP=a58_0x2edd1a(0x1eb);function a58_0x22c3(){const _0x248439=['modelId','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it','expect-business-group','trim','ungrouped','673666TVisxM','appCode','--code\x20is\x20required','tableName','str','backend','datasetCode','Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.','businessGroup','hasOwnProperty','value','stringify','Update\x20business\x20scenario\x20group','14030fQlMdz','object','dbLinkId','6507EdJrcG','metadata','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','keys','sourceType','write','dbTableSelector','found','path','datasetName','Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing','isFinite','apiError','datasetId','message','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','dataset','--business-group\x20is\x20required','modelCode','expectBusinessGroup','prototype','654008klbDIT','isArray','730059ZJVjrZ','string',',\x20actual\x20','call','source','1472825fdgKsM','name','POST','--business-group\x20must\x20not\x20be\x20blank','matched','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','Expected\x20','payload','DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.','METADATA','/smartapi/question/er-config/business-group/edit','kind','data','1859322erMiFj','number','toUpperCase','4Lkfqhv','241573eMFgIB','validation','db-table','extend','dbId','business-group','/smartapi/dblink/updateTableBusinessGroup','8KltVel','update','method','code','DB_TABLE','Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.','length','parse'];a58_0x22c3=function(){return _0x248439;};return a58_0x22c3();}export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x9dd915,input:_0x130b40,dryRun:_0x29d152}){const _0xceb1f=a58_0x2edd1a;validateInput(_0x130b40);const _0x244f7f=normalizeBusinessGroupArgument(_0x130b40[_0xceb1f(0x1f4)]),_0x358baa=await getDatasetDetail(_0x130b40['code']),_0x2e769f=resolveBusinessGroupDataset(_0x358baa,_0x130b40['code']);assertBusinessGroupUpdateSupported(_0x2e769f,_0x244f7f);const _0x424819=loadCurrentBusinessGroup(_0x358baa,_0x2e769f);assertExpectedBusinessGroup(_0x424819,_0x130b40[_0xceb1f(0x20f)]);const _0x1411e6=buildBackendPlan(_0x9dd915,_0x2e769f,_0x244f7f),_0x36a67a=_0x424819!==_0x244f7f;let _0x578f95;if(_0x36a67a&&!_0x29d152){_0x1411e6[_0xceb1f(0x224)]===_0xceb1f(0x1da)?await updateDbTableBusinessGroup(_0x1411e6[_0xceb1f(0x220)]):await updateErBusinessGroup(_0x1411e6[_0xceb1f(0x220)]);const _0x25b614=await getDatasetDetail(_0x2e769f[_0xceb1f(0x1e2)]),_0x484926=resolveBusinessGroupDataset(_0x25b614,_0x2e769f[_0xceb1f(0x1e2)]),_0x3b52b7=loadCurrentBusinessGroup(_0x25b614,_0x484926);if(_0x3b52b7!==_0x244f7f)throw CliErrors[_0xceb1f(0x208)](_0xceb1f(0x21e),_0xceb1f(0x21f)+JSON[_0xceb1f(0x1f7)](displayBusinessGroup(_0x244f7f))+_0xceb1f(0x215)+JSON[_0xceb1f(0x1f7)](displayBusinessGroup(_0x3b52b7))+'.');_0x578f95={'verified':!![],'status':_0xceb1f(0x21c),'afterReadback':{'businessGroup':displayBusinessGroup(_0x3b52b7)}};}else!_0x36a67a&&(_0x578f95={'verified':!![],'status':'unchanged','afterReadback':{'businessGroup':displayBusinessGroup(_0x424819)}});const _0x185401={'operation':_0xceb1f(0x1e0),'appCode':_0x9dd915,'selector':{'code':_0x2e769f['code']},'dataset':{'id':_0x2e769f['id'],'code':_0x2e769f[_0xceb1f(0x1e2)],'name':_0x2e769f[_0xceb1f(0x219)],'sourceType':_0x2e769f[_0xceb1f(0x200)]},'before':{'businessGroup':displayBusinessGroup(_0x424819)},'after':{'businessGroup':displayBusinessGroup(_0x244f7f)},'changed':_0x36a67a,'dryRun':_0x29d152,'submitted':_0x36a67a&&!_0x29d152,'backend':{'method':_0x1411e6[_0xceb1f(0x1e1)],'path':_0x1411e6[_0xceb1f(0x204)],'payload':_0x1411e6[_0xceb1f(0x220)]},..._0x578f95?{'verification':_0x578f95}:{},'warnings':[]};return{'ok':!![],'data':_0x185401,'message':_0x36a67a?_0x29d152?_0xceb1f(0x1fe)+_0x2e769f[_0xceb1f(0x1e2)]:_0xceb1f(0x21d)+_0x2e769f[_0xceb1f(0x1e2)]:_0xceb1f(0x20b)+_0x2e769f['code']};}export const datasetBusinessGroupUpdate={'service':a58_0x2edd1a(0x20c),'command':'business-group-update','description':a58_0x2edd1a(0x1f8),'risk':a58_0x2edd1a(0x201),'flags':[CODE_FLAG,{'name':a58_0x2edd1a(0x1dd),'type':a58_0x2edd1a(0x214),'required':!![],'description':a58_0x2edd1a(0x1e8)},{'name':a58_0x2edd1a(0x1e9),'type':a58_0x2edd1a(0x214),'required':![],'description':a58_0x2edd1a(0x206)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x10ae8f){validateInput(readBusinessGroupUpdateInput(_0x10ae8f));},async 'dryRun'(_0x3d76d5){const _0xac0f5a=a58_0x2edd1a,_0x2a8bf9=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x3d76d5[_0xac0f5a(0x1ed)],'input':readBusinessGroupUpdateInput(_0x3d76d5),'dryRun':!![]});return{'method':_0x2a8bf9[_0xac0f5a(0x1d3)]['backend']['method'],'url':_0x2a8bf9['data'][_0xac0f5a(0x1f1)][_0xac0f5a(0x204)],'body':_0x2a8bf9['data'][_0xac0f5a(0x1f1)][_0xac0f5a(0x220)],'description':_0x2a8bf9[_0xac0f5a(0x20a)],..._0x2a8bf9[_0xac0f5a(0x1d3)]};},async 'execute'(_0x456d78){const _0x1a51b5=a58_0x2edd1a;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x456d78[_0x1a51b5(0x1ed)],'input':readBusinessGroupUpdateInput(_0x456d78),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x2e3dc3){const _0x3a5d66=a58_0x2edd1a,_0x30bb35=_0x2e3dc3[_0x3a5d66(0x1f0)](_0x3a5d66(0x1e9));return{'code':trim(_0x2e3dc3[_0x3a5d66(0x1f0)](_0x3a5d66(0x1e2))),'businessGroup':_0x2e3dc3['str'](_0x3a5d66(0x1dd)),'expectBusinessGroup':_0x30bb35===undefined||_0x30bb35===''?undefined:_0x30bb35};}function validateInput(_0x24f837){const _0x3aef4a=a58_0x2edd1a;if(!trim(_0x24f837[_0x3aef4a(0x1e2)]))throw CliErrors[_0x3aef4a(0x1d9)](_0x3aef4a(0x1ee));if(_0x24f837[_0x3aef4a(0x1f4)]===undefined)throw CliErrors['validation'](_0x3aef4a(0x20d));if(!trim(_0x24f837[_0x3aef4a(0x1f4)]))throw CliErrors[_0x3aef4a(0x1d9)](_0x3aef4a(0x21b));}function assertBusinessGroupUpdateSupported(_0x1ff37a,_0x1d00bf){const _0x207a4d=a58_0x2edd1a;if(_0x1ff37a[_0x207a4d(0x200)]==='DB_TABLE'&&!_0x1d00bf)throw CliErrors[_0x207a4d(0x1d9)](_0x207a4d(0x1f3));}function resolveBusinessGroupDataset(_0x4c099e,_0x32b9d3){const _0x27c64a=a58_0x2edd1a,_0xc36e67=asPlainObject(_0x4c099e[_0x27c64a(0x20c)]),_0x3690a6=asPlainObject(_0x4c099e['dbtableConfig']),_0x4f92ec=resolveSourceType(_0x4c099e,_0xc36e67,_0x3690a6),_0x45a0dd=firstString(_0x4c099e[_0x27c64a(0x20e)],_0x4c099e[_0x27c64a(0x1e2)],_0xc36e67[_0x27c64a(0x1f2)],_0x32b9d3)||_0x32b9d3;return{'id':firstNumber(_0x4c099e['modelId'],_0x4c099e['id'],_0xc36e67[_0x27c64a(0x209)])??firstString(_0x4c099e[_0x27c64a(0x1e7)],_0x4c099e['id'],_0xc36e67['datasetId'])??null,'code':_0x45a0dd,'name':firstString(_0x4c099e[_0x27c64a(0x219)],_0xc36e67[_0x27c64a(0x205)],_0xc36e67[_0x27c64a(0x219)])||null,'sourceType':_0x4f92ec,'dbTableSelector':_0x4f92ec===_0x27c64a(0x1e3)?{'dbLinkId':firstNumber(_0x3690a6[_0x27c64a(0x1dc)]),'tableName':firstString(_0x3690a6['tableName'])||null}:null};}function resolveSourceType(_0x390762,_0x2546fb,_0x14a1a1){const _0x361bcd=a58_0x2edd1a,_0x57b69b=firstString(_0x390762[_0x361bcd(0x217)],_0x390762[_0x361bcd(0x200)],_0x2546fb[_0x361bcd(0x217)],_0x2546fb[_0x361bcd(0x200)])?.[_0x361bcd(0x1ea)]()[_0x361bcd(0x1d6)]();if(_0x57b69b===_0x361bcd(0x1e3)||_0x57b69b===_0x361bcd(0x222))return _0x57b69b;if(Object[_0x361bcd(0x1ff)](_0x14a1a1)[_0x361bcd(0x1e5)]>0x0)return _0x361bcd(0x1e3);throw CliErrors[_0x361bcd(0x1d9)]('Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.');}function loadCurrentBusinessGroup(_0x3a2647,_0x551c2e){const _0x58edc9=a58_0x2edd1a,_0x51d71b=readBusinessGroupFromDatasetDetail(_0x3a2647,_0x551c2e['sourceType']);if(_0x51d71b[_0x58edc9(0x203)])return normalizeBusinessGroup(_0x51d71b[_0x58edc9(0x1f6)]);return'';}function readBusinessGroupFromDatasetDetail(_0x3aaebc,_0x360e8a){const _0x52fa4f=a58_0x2edd1a,_0x16457b=asPlainObject(_0x3aaebc[_0x52fa4f(0x20c)]),_0x194c5a=firstPresent(_0x3aaebc[_0x52fa4f(0x1f4)]);if(_0x194c5a['found'])return _0x194c5a;const _0x293b00=firstPresent(_0x16457b[_0x52fa4f(0x1f4)]);if(_0x293b00[_0x52fa4f(0x203)])return _0x293b00;if(_0x360e8a===_0x52fa4f(0x1e3))return{'found':![]};const _0x3d9ad4=readBusinessGroupFromExtend(_0x3aaebc[_0x52fa4f(0x1db)]);if(_0x3d9ad4[_0x52fa4f(0x203)])return _0x3d9ad4;return readBusinessGroupFromExtend(_0x16457b[_0x52fa4f(0x1db)]);}function readBusinessGroupFromExtend(_0x5c0afd){const _0x457606=a58_0x2edd1a;if(_0x5c0afd===undefined||_0x5c0afd===null||_0x5c0afd==='')return{'found':![]};if(typeof _0x5c0afd===_0x457606(0x214))try{const _0x5cc77f=JSON[_0x457606(0x1e6)](_0x5c0afd);return readBusinessGroupFromExtend(_0x5cc77f);}catch{return{'found':![]};}const _0x4eb3bb=asPlainObject(_0x5c0afd);if(Object[_0x457606(0x210)][_0x457606(0x1f5)][_0x457606(0x216)](_0x4eb3bb,'businessGroup'))return{'found':!![],'value':_0x4eb3bb['businessGroup']};return{'found':![]};}function firstPresent(..._0x2f7b88){for(const _0x41c3a8 of _0x2f7b88){if(_0x41c3a8!==undefined&&_0x41c3a8!==null)return{'found':!![],'value':_0x41c3a8};}return{'found':![]};}function assertExpectedBusinessGroup(_0x3ccbd9,_0x48f120){const _0x43679e=a58_0x2edd1a;if(_0x48f120===undefined)return;const _0x53afa7=normalizeBusinessGroupArgument(_0x48f120);if(_0x3ccbd9!==_0x53afa7)throw CliErrors[_0x43679e(0x1d9)]('Expectation\x20mismatch\x20at\x20businessGroup','Expected\x20'+JSON['stringify'](_0x53afa7)+_0x43679e(0x215)+JSON[_0x43679e(0x1f7)](_0x3ccbd9));}function buildBackendPlan(_0x4be4bd,_0x143c03,_0x35a2df){const _0x155daf=a58_0x2edd1a;if(_0x143c03[_0x155daf(0x200)]===_0x155daf(0x1e3)){if(!_0x143c03[_0x155daf(0x202)]||_0x143c03[_0x155daf(0x202)][_0x155daf(0x1fb)]===null||!_0x143c03[_0x155daf(0x202)][_0x155daf(0x1ef)])throw CliErrors[_0x155daf(0x1d9)](_0x155daf(0x221),_0x155daf(0x1e4));return{'kind':_0x155daf(0x1da),'method':_0x155daf(0x21a),'path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x143c03[_0x155daf(0x202)]['dbLinkId'],'tableName':_0x143c03[_0x155daf(0x202)]['tableName'],'businessGroup':_0x35a2df}};}return{'kind':_0x155daf(0x1fd),'method':_0x155daf(0x21a),'path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x4be4bd,'datasetCode':_0x143c03['code'],'businessGroup':_0x35a2df}};}function normalizeBusinessGroup(_0xfbb491){const _0x43cc17=a58_0x2edd1a;if(_0xfbb491===undefined||_0xfbb491===null)return'';return String(_0xfbb491)[_0x43cc17(0x1ea)]();}function normalizeBusinessGroupArgument(_0x23f718){const _0x4b3487=normalizeBusinessGroup(_0x23f718);return _0x4b3487===UNGROUPED_BUSINESS_GROUP?'':_0x4b3487;}function displayBusinessGroup(_0x117d4a){return _0x117d4a||UNGROUPED_BUSINESS_GROUP;}function asPlainObject(_0x494615){const _0x3db50b=a58_0x2edd1a;if(!_0x494615||typeof _0x494615!==_0x3db50b(0x1fa)||Array[_0x3db50b(0x212)](_0x494615))return{};return _0x494615;}function firstString(..._0x44b1a6){const _0x47d4a7=a58_0x2edd1a;for(const _0x18614f of _0x44b1a6){if(typeof _0x18614f===_0x47d4a7(0x214)&&_0x18614f['trim']())return _0x18614f[_0x47d4a7(0x1ea)]();if(typeof _0x18614f===_0x47d4a7(0x1d5)&&Number[_0x47d4a7(0x207)](_0x18614f))return String(_0x18614f);}return undefined;}function firstNumber(..._0x164ed6){const _0x3c6212=a58_0x2edd1a;for(const _0x146425 of _0x164ed6){if(typeof _0x146425==='number'&&Number[_0x3c6212(0x207)](_0x146425))return _0x146425;if(typeof _0x146425==='string'&&_0x146425['trim']()&&Number[_0x3c6212(0x207)](Number(_0x146425)))return Number(_0x146425);}return null;}function a58_0x42a7(_0x42ce3d,_0x49a8b8){_0x42ce3d=_0x42ce3d-0x1d3;const _0x22c36c=a58_0x22c3();let _0x42a744=_0x22c36c[_0x42ce3d];return _0x42a744;}function trim(_0x4056d3){return String(_0x4056d3||'')['trim']();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a59_0x2e3c(_0x2e465f,_0x413fc2){_0x2e465f=_0x2e465f-0xe3;const _0x32dcf1=a59_0x32dc();let _0x2e3c32=_0x32dcf1[_0x2e465f];return _0x2e3c32;}const a59_0x541840=a59_0x2e3c;(function(_0x529b38,_0x538f18){const _0x3809ce=a59_0x2e3c,_0x2e4c31=_0x529b38();while(!![]){try{const _0x14d187=-parseInt(_0x3809ce(0xee))/0x1+-parseInt(_0x3809ce(0xf0))/0x2*(parseInt(_0x3809ce(0xea))/0x3)+-parseInt(_0x3809ce(0xed))/0x4+-parseInt(_0x3809ce(0xfa))/0x5*(parseInt(_0x3809ce(0xe6))/0x6)+-parseInt(_0x3809ce(0xf9))/0x7*(parseInt(_0x3809ce(0xef))/0x8)+-parseInt(_0x3809ce(0xf8))/0x9*(-parseInt(_0x3809ce(0xe3))/0xa)+parseInt(_0x3809ce(0xf7))/0xb;if(_0x14d187===_0x538f18)break;else _0x2e4c31['push'](_0x2e4c31['shift']());}catch(_0x179d08){_0x2e4c31['push'](_0x2e4c31['shift']());}}}(a59_0x32dc,0x4e6b5));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getErBusinessGroupSummary}from'../../core/api-client.js';function a59_0x32dc(){const _0x365aba=['businessGroup','9WROFQz','Found\x20','dataset','24092Eqcvvv','305298SBadNH','272CrKmgO','189284mcBZOn','read','trim','business-groups','groups','\x20business\x20group(s)\x20for\x20database\x20connection\x20','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','19050680uGTorP','831285RybvLm','97272wLKouJ','1110vXzvts','20BCnVXl','map','dbid','14262WMqIYg','length','DB_TABLE'];a59_0x32dc=function(){return _0x365aba;};return a59_0x32dc();}export const datasetBusinessGroups={'service':a59_0x541840(0xec),'command':a59_0x541840(0xf3),'description':'List\x20DB_TABLE\x20dataset\x20business\x20groups\x20for\x20a\x20database\x20connection;\x20does\x20not\x20include\x20METADATA','risk':a59_0x541840(0xf1),'flags':[{'name':a59_0x541840(0xe5),'type':'number','required':!![],'description':a59_0x541840(0xf6)},APPCODE_FLAG_OPTIONAL],async 'execute'(_0x1b759e){const _0xe00d8c=a59_0x541840,_0x509fb7=_0x1b759e['num']('dbid'),_0x404c93=await getErBusinessGroupSummary(_0x1b759e['appCode'],_0x509fb7),_0x1d2527=_0x404c93[_0xe00d8c(0xf4)][_0xe00d8c(0xe4)](_0x2142d5=>({..._0x2142d5,'businessGroup':_0x2142d5[_0xe00d8c(0xe9)][_0xe00d8c(0xf2)]()||'ungrouped'}));return{'ok':!![],'data':{..._0x404c93,'groups':_0x1d2527,'scope':_0xe00d8c(0xe8)},'message':_0xe00d8c(0xeb)+_0x1d2527[_0xe00d8c(0xe7)]+_0xe00d8c(0xf5)+_0x509fb7};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a60_0x3de619=a60_0xb2de;(function(_0x4f66d8,_0xf87a1c){const _0x4899e2=a60_0xb2de,_0x53c896=_0x4f66d8();while(!![]){try{const _0x4fb732=-parseInt(_0x4899e2(0x11a))/0x1+parseInt(_0x4899e2(0x123))/0x2+-parseInt(_0x4899e2(0x10b))/0x3*(parseInt(_0x4899e2(0x114))/0x4)+-parseInt(_0x4899e2(0x11b))/0x5*(-parseInt(_0x4899e2(0x11e))/0x6)+-parseInt(_0x4899e2(0x10f))/0x7+-parseInt(_0x4899e2(0x107))/0x8*(-parseInt(_0x4899e2(0x106))/0x9)+parseInt(_0x4899e2(0x109))/0xa;if(_0x4fb732===_0xf87a1c)break;else _0x53c896['push'](_0x53c896['shift']());}catch(_0x3c8852){_0x53c896['push'](_0x53c896['shift']());}}}(a60_0x32de,0xc3aac));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a60_0x3de619(0x11d),'filter':'lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','getOne':'lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress'};export const RUNTIME_DATA_ACCESS_SUMMARY=a60_0x3de619(0x111);function valueToString(_0xf3936){return _0xf3936==null?'':String(_0xf3936)['trim']();}function getDatasetCode(_0xe87548){const _0x6e7f19=a60_0x3de619;return valueToString(_0xe87548['code']??_0xe87548[_0x6e7f19(0x122)]??_0xe87548[_0x6e7f19(0x11f)]?.[_0x6e7f19(0x119)]);}function a60_0xb2de(_0x5aa602,_0x239d6c){_0x5aa602=_0x5aa602-0x105;const _0x32de18=a60_0x32de();let _0xb2de5=_0x32de18[_0x5aa602];return _0xb2de5;}function getDatasetName(_0x3f0fed){const _0x3804ad=a60_0x3de619;return valueToString(_0x3f0fed[_0x3804ad(0x117)]??_0x3f0fed[_0x3804ad(0x11f)]?.[_0x3804ad(0x113)])||'unknown';}function getDatasetSource(_0x45715d){const _0x224136=a60_0x3de619;return valueToString(_0x45715d[_0x224136(0x10c)]??_0x45715d[_0x224136(0x11f)]?.['sourceType'])[_0x224136(0x108)]();}function getDbtableConfig(_0x16b1af){const _0x43e9d0=a60_0x3de619,_0x3c07f6=_0x16b1af[_0x43e9d0(0x110)]??_0x16b1af[_0x43e9d0(0x112)];return _0x3c07f6&&typeof _0x3c07f6===_0x43e9d0(0x10d)?_0x3c07f6:{};}export function isDbTableBackedDataset(_0x5048f7){const _0x497e66=a60_0x3de619,_0x44297a=getDatasetSource(_0x5048f7);if(_0x44297a==='METADATA')return![];const _0x588493=getDbtableConfig(_0x5048f7),_0x4209fe=_0x588493[_0x497e66(0x105)]??_0x588493['id'],_0x57bc9b=valueToString(_0x588493['tableName']??_0x5048f7[_0x497e66(0x11c)]??_0x5048f7[_0x497e66(0x11f)]?.['tableName']);return _0x4209fe!==undefined&&_0x4209fe!==null&&_0x57bc9b[_0x497e66(0x118)]>0x0;}export function filterDbTableBackedDatasets(_0x327127){const _0x242d11=a60_0x3de619;return _0x327127[_0x242d11(0x116)](_0x5e2d1f=>isDbTableBackedDataset(_0x5e2d1f));}function a60_0x32de(){const _0x56e37e=['732763bUyfcw','15TeTHQQ','tableName','lovrabet','22566ZNiEmZ','dataset','validation','\x20and\x20has\x20no\x20DB_TABLE\x20data-source\x20context\x20for\x20','modelCode','2319012UlEltG','dbId','54063HGCzUm','296XhwuDe','toUpperCase','25651110sJXkJg','Upgrade\x20or\x20migrate\x20this\x20dataset\x20to\x20a\x20DB_TABLE\x20dataset,\x20then\x20continue\x20with\x20the\x20new\x20dataset\x20code.','171HyxItu','source','object','UNKNOWN','10223311wXknQs','dbtableConfig','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','dbtable','datasetName','67612mHHoCv','To\x20inspect\x20real\x20runtime\x20rows,\x20switch\x20to\x20lovrabet\x20CLI:\x20','filter','name','length','datasetCode'];a60_0x32de=function(){return _0x56e37e;};return a60_0x32de();}export function buildDbTableBackedRequirementMessage(_0x486353,_0x2aad56='SQL\x20schema\x20validation'){const _0x14d898=a60_0x3de619,_0x3918f8=getDatasetSource(_0x486353)||_0x14d898(0x10e),_0x298e01=getDatasetName(_0x486353),_0x25c50d=getDatasetCode(_0x486353),_0x5a6dd5=_0x25c50d?'\x20('+_0x25c50d+')':'';return['The\x20current\x20dataset\x20\x22'+_0x298e01+'\x22'+_0x5a6dd5+'\x20is\x20'+_0x3918f8+_0x14d898(0x121)+_0x2aad56+'.','Reason:\x20schema\x20introspection\x20and\x20custom\x20SQL\x20require\x20source=DB_TABLE,\x20dbtableConfig.dbId,\x20dbtableConfig.tableName,\x20and\x20a\x20database\x20connection\x20context.',_0x14d898(0x10a),_0x14d898(0x115)+RUNTIME_DATA_ACCESS_COMMANDS['filter']+';\x20'+RUNTIME_DATA_ACCESS_COMMANDS['getOne']+'.']['join']('\x20');}export function assertDatasetIsDbTableBacked(_0x128593,_0x2042ea){const _0x38a22c=a60_0x3de619;if(!isDbTableBackedDataset(_0x128593))throw CliErrors[_0x38a22c(0x120)](buildDbTableBackedRequirementMessage(_0x128593,_0x2042ea));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a61_0x40436f=a61_0xf396;(function(_0x128900,_0xe5306a){const _0x28b099=a61_0xf396,_0x4e4013=_0x128900();while(!![]){try{const _0x3e7054=parseInt(_0x28b099(0x19c))/0x1*(parseInt(_0x28b099(0x18e))/0x2)+parseInt(_0x28b099(0x17b))/0x3+-parseInt(_0x28b099(0x180))/0x4+parseInt(_0x28b099(0x192))/0x5+parseInt(_0x28b099(0x1a0))/0x6+-parseInt(_0x28b099(0x174))/0x7+-parseInt(_0x28b099(0x17d))/0x8;if(_0x3e7054===_0xe5306a)break;else _0x4e4013['push'](_0x4e4013['shift']());}catch(_0x1bf500){_0x4e4013['push'](_0x4e4013['shift']());}}}(a61_0x25a6,0x6e4fb));import{deleteDataset,getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a61_0x25a6(){const _0xe68c92=['Would\x20safely\x20delete\x20','2226972PjsQrB','dbid','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','object','id=','title','relatedPages','confirm','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','length','add','dbName','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','6amycZT','dbId','rabetbase\x20page\x20restore\x20--id\x20','Deleted\x20','3728955IuIbnw','expected-count','dbid=','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','false','type','relatedPageInfoList','\x20dataset(s);\x20','deleted','35034QwxQTr','dbtableConfig','cascade','num','3517548wpzJgq','appCode','\x20dataset(s)\x20and\x20their\x20listed\x20related\x20pages/menus.\x20Restore\x20each\x20Dataset\x20first,\x20then\x20restore\x20pages\x20explicitly\x20when\x20needed.','filter','validation','\x20dataset(s)\x20without\x20cascading\x20to\x20pages.\x20The\x20server\x20blocks\x20a\x20Dataset\x20that\x20still\x20has\x20related\x20pages.','code','name','map','dataset','isInteger','source','bool','str','Dataset\x20id','number','\x20dataset(s)','3640994VtkHDf','/smartapi/dataset/delete?cascade=','isArray','tableName','push','Required\x20to\x20execute\x20dataset\x20deletion','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','2237826hviQSZ','Would\x20delete\x20','5234984nQLNpy','boolean'];a61_0x25a6=function(){return _0xe68c92;};return a61_0x25a6();}const DATASET_ID_FLAG={'name':'id','type':'number','description':a61_0x40436f(0x1ae)},DBID_FLAG={'name':a61_0x40436f(0x181),'type':a61_0x40436f(0x172),'description':a61_0x40436f(0x17a)},CONFIRM_FLAG={'name':'confirm','type':'boolean','description':a61_0x40436f(0x179)},CASCADE_FLAG={'name':a61_0x40436f(0x19e),'type':a61_0x40436f(0x17e),'description':'Also\x20delete\x20related\x20pages\x20and\x20menus;\x20requires\x20explicit\x20--confirm'},EXPECTED_COUNT_FLAG={'name':a61_0x40436f(0x193),'type':a61_0x40436f(0x172),'description':a61_0x40436f(0x183)};export const datasetDelete={'service':a61_0x40436f(0x1a9),'command':'delete','description':a61_0x40436f(0x18d),'risk':'high-risk-write','flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CASCADE_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5e2b97){const _0x42ef55=a61_0x40436f,_0x587f2c=_0x5e2b97[_0x42ef55(0x19f)]('id'),_0x30ac09=_0x5e2b97[_0x42ef55(0x1ad)](_0x42ef55(0x1a6)),_0x175493=_0x5e2b97[_0x42ef55(0x19f)](_0x42ef55(0x181)),_0x55dbd0=[_0x587f2c>0x0,Boolean(_0x30ac09),_0x175493>0x0][_0x42ef55(0x1a3)](Boolean);if(_0x55dbd0[_0x42ef55(0x18a)]===0x0)throw CliErrors[_0x42ef55(0x1a4)]('One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.');if(_0x55dbd0[_0x42ef55(0x18a)]>0x1)throw CliErrors[_0x42ef55(0x1a4)](_0x42ef55(0x196));},async 'dryRun'(_0x56bcc3){const _0x2fd125=a61_0x40436f,_0x47067a=await resolveTargets(_0x56bcc3),_0x2fa49a=_0x56bcc3[_0x2fd125(0x1ac)](_0x2fd125(0x19e));return{'method':'POST','url':_0x2fd125(0x175)+(_0x2fa49a?'true':_0x2fd125(0x197)),'body':{'count':_0x47067a[_0x2fd125(0x18a)],'cascade':_0x2fa49a,'datasets':_0x47067a},'description':_0x2fa49a?_0x2fd125(0x17c)+_0x47067a[_0x2fd125(0x18a)]+_0x2fd125(0x1a2):_0x2fd125(0x17f)+_0x47067a[_0x2fd125(0x18a)]+_0x2fd125(0x1a5)};},async 'execute'(_0xa51ea1){const _0x42825f=a61_0x40436f;if(!_0xa51ea1['bool'](_0x42825f(0x188)))throw CliErrors[_0x42825f(0x1a4)](_0x42825f(0x189),_0x42825f(0x195));const _0x458477=await resolveTargets(_0xa51ea1),_0x3a4752=_0xa51ea1[_0x42825f(0x1ac)](_0x42825f(0x19e)),_0x1f7a42=[],_0xda217d=[];for(const _0x2ce32c of _0x458477){try{await deleteDataset(_0x2ce32c['id'],_0x3a4752),_0x1f7a42['push'](_0x2ce32c);}catch(_0x16c4f2){_0xda217d['push']({..._0x2ce32c,'error':_0x16c4f2 instanceof Error?_0x16c4f2['message']:String(_0x16c4f2)});}}if(_0xda217d[_0x42825f(0x18a)]>0x0){const _0x113ed3=buildPageRestoreCommands(_0xa51ea1[_0x42825f(0x1a1)],_0x3a4752?_0x1f7a42:[]);return{'ok':![],'data':{'requested':_0x458477[_0x42825f(0x18a)],'cascade':_0x3a4752,'deletedCount':_0x1f7a42['length'],'failedCount':_0xda217d[_0x42825f(0x18a)],'deleted':_0x1f7a42,'failed':_0xda217d,'pageRestoreCommands':_0x113ed3},'message':_0x42825f(0x191)+_0x1f7a42[_0x42825f(0x18a)]+'/'+_0x458477[_0x42825f(0x18a)]+_0x42825f(0x19a)+_0xda217d[_0x42825f(0x18a)]+'\x20failed'};}return{'ok':!![],'data':{'requested':_0x458477[_0x42825f(0x18a)],'cascade':_0x3a4752,'deletedCount':_0x1f7a42[_0x42825f(0x18a)],'deleted':_0x1f7a42,'pageRestoreCommands':buildPageRestoreCommands(_0xa51ea1[_0x42825f(0x1a1)],_0x3a4752?_0x1f7a42:[])},'message':'Deleted\x20'+_0x1f7a42[_0x42825f(0x18a)]+_0x42825f(0x173)};}};function a61_0xf396(_0x300191,_0xb94fb3){_0x300191=_0x300191-0x172;const _0x25a6fd=a61_0x25a6();let _0xf39655=_0x25a6fd[_0x300191];return _0xf39655;}async function resolveTargets(_0x1ba4c7){const _0x4a290c=a61_0x40436f,_0x1d496a=_0x1ba4c7[_0x4a290c(0x19f)]('id'),_0x403eb2=_0x1ba4c7['str'](_0x4a290c(0x1a6)),_0x4facf5=_0x1ba4c7[_0x4a290c(0x19f)](_0x4a290c(0x181));let _0x4a3cc1;_0x403eb2?(_0x4a3cc1=await listDatasets(_0x1ba4c7['appCode'],{'code':_0x403eb2}),_0x4a3cc1=_0x4a3cc1[_0x4a290c(0x1a3)](_0x5cc2fd=>_0x5cc2fd[_0x4a290c(0x1a6)]===_0x403eb2)):(_0x4a3cc1=await listDatasets(_0x1ba4c7[_0x4a290c(0x1a1)]),_0x1d496a>0x0&&(_0x4a3cc1=_0x4a3cc1[_0x4a290c(0x1a3)](_0x1cf0ee=>_0x1cf0ee['id']===_0x1d496a)),_0x4facf5>0x0&&(_0x4a3cc1=_0x4a3cc1[_0x4a290c(0x1a3)](_0x5a8057=>_0x5a8057[_0x4a290c(0x19d)]?.[_0x4a290c(0x18f)]===_0x4facf5)));const _0x2c9e59=[];for(const _0x4b3c69 of _0x4a3cc1){const _0x3b620b=await getDatasetDetail(_0x4b3c69[_0x4a290c(0x1a6)]),_0x34e51a=Array[_0x4a290c(0x176)](_0x3b620b[_0x4a290c(0x199)])?_0x3b620b[_0x4a290c(0x199)][_0x4a290c(0x1a3)](_0x56a3fb=>_0x56a3fb!=null&&typeof _0x56a3fb===_0x4a290c(0x184)&&_0x56a3fb[_0x4a290c(0x19b)]!==!![]):[];_0x2c9e59[_0x4a290c(0x178)](normalizeTarget(_0x4b3c69,_0x34e51a));}if(_0x2c9e59[_0x4a290c(0x18a)]===0x0){const _0x206a71=_0x403eb2||(_0x1d496a>0x0?_0x4a290c(0x185)+_0x1d496a:_0x4a290c(0x194)+_0x4facf5);throw CliErrors[_0x4a290c(0x1a4)]('No\x20undeleted\x20dataset\x20found\x20for\x20'+_0x206a71+'.');}const _0x19669d=_0x1ba4c7[_0x4a290c(0x19f)]('expected-count');if(_0x19669d>0x0&&_0x2c9e59[_0x4a290c(0x18a)]!==_0x19669d)throw CliErrors[_0x4a290c(0x1a4)]('Matched\x20'+_0x2c9e59[_0x4a290c(0x18a)]+_0x4a290c(0x182)+_0x19669d+'.');return _0x2c9e59;}function normalizeTarget(_0x167141,_0x3a289a){const _0x2d202d=a61_0x40436f,_0x10671=_0x167141['dbtableConfig']??{},_0x22b258=_0x3a289a[_0x2d202d(0x1a8)](_0x19bd6a=>{const _0x5b7b8c=_0x2d202d;if(_0x19bd6a==null||typeof _0x19bd6a!==_0x5b7b8c(0x184))return null;const _0x4478cf=_0x19bd6a,_0x593f96=Number(_0x4478cf['id']);if(!Number[_0x5b7b8c(0x1aa)](_0x593f96)||_0x593f96<=0x0)return null;const _0x389336=_0x4478cf[_0x5b7b8c(0x186)]??_0x4478cf[_0x5b7b8c(0x1a7)];return{'id':_0x593f96,..._0x389336?{'name':String(_0x389336)}:{},..._0x4478cf[_0x5b7b8c(0x198)]?{'type':String(_0x4478cf[_0x5b7b8c(0x198)])}:{}};})[_0x2d202d(0x1a3)](_0x1f4264=>_0x1f4264!==null);return{'id':_0x167141['id'],'code':_0x167141['code'],'name':_0x167141[_0x2d202d(0x1a7)],'description':_0x167141['description'],'source':_0x167141[_0x2d202d(0x1ab)],'dbId':_0x10671[_0x2d202d(0x18f)],'dbName':_0x10671[_0x2d202d(0x18c)],'tableName':_0x10671[_0x2d202d(0x177)],'relatedPageCount':_0x22b258['length'],'relatedPages':_0x22b258};}function buildPageRestoreCommands(_0x17208b,_0x2564e4){const _0x4710a2=a61_0x40436f,_0x575736=new Set();for(const _0x157496 of _0x2564e4){for(const _0x3749a2 of _0x157496[_0x4710a2(0x187)])_0x575736[_0x4710a2(0x18b)](_0x3749a2['id']);}return[..._0x575736][_0x4710a2(0x1a8)](_0x43e8e8=>_0x4710a2(0x190)+_0x43e8e8+'\x20--appcode\x20'+_0x17208b);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a62_0x393881=a62_0x35ad;(function(_0x2599ae,_0x30e1c3){const _0x14b3d9=a62_0x35ad,_0x25e4f6=_0x2599ae();while(!![]){try{const _0x502cf1=parseInt(_0x14b3d9(0x128))/0x1+-parseInt(_0x14b3d9(0xf7))/0x2*(-parseInt(_0x14b3d9(0xea))/0x3)+-parseInt(_0x14b3d9(0xfa))/0x4+-parseInt(_0x14b3d9(0xe2))/0x5*(parseInt(_0x14b3d9(0x107))/0x6)+parseInt(_0x14b3d9(0xe5))/0x7+parseInt(_0x14b3d9(0xfd))/0x8+-parseInt(_0x14b3d9(0xf1))/0x9;if(_0x502cf1===_0x30e1c3)break;else _0x25e4f6['push'](_0x25e4f6['shift']());}catch(_0x3bebe6){_0x25e4f6['push'](_0x25e4f6['shift']());}}}(a62_0x119b,0xc5789));import{getDatasetDetail}from'../../core/api-client.js';function a62_0x35ad(_0xec7383,_0x39d64e){_0xec7383=_0xec7383-0xd9;const _0x119bce=a62_0x119b();let _0x35ad0e=_0x119bce[_0xec7383];return _0x35ad0e;}function a62_0x119b(){const _0x4809eb=['name','createTimeField','source','requestFields','dbName','pkField','tableComment','doVersion','description','detail','dbtableConfig','958816RUwjaV','responseFields','beforeScriptId','path','relationId','isArray','fields','map','deprecated','dbId','1905CbayEp','sourceType','code','8956297rDgYEP','properties','host','options','cardinality','501GgNPYY','extend','tableName','allFieldNames','dataType','toTableName','alias','18165204eulURT','method','modifierIdField','operations','displayName','push','9326HCVBhS','labelField','parse','2747044OaGTIh','toFieldLabel','allFields','11763240oiNxmD','str','doType','validateRules','fromField','toDatasetName','relatedPageInfoList','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','formatRules','toField','15330AbNyMp','updateTimeField','responseBody','entries','title','columnCodeListWithDeleted','requestBody','datasetKey','string','length','main_sub','indexes','afterScriptId','deleted','modelId','object','modelCode','relations','dataset','type','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','filter'];a62_0x119b=function(){return _0x4809eb;};return a62_0x119b();}import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0x58792c){const _0x585cd5=a62_0x35ad;if(_0x58792c[_0x585cd5(0x114)])return null;const _0x4735c7=Boolean(_0x58792c[_0x585cd5(0xf5)]!==undefined||_0x58792c['doType']!==undefined);let _0x2f3092={};if(!_0x4735c7&&typeof _0x58792c[_0x585cd5(0xeb)]===_0x585cd5(0x10f))try{_0x2f3092=JSON[_0x585cd5(0xf9)](_0x58792c[_0x585cd5(0xeb)]);}catch{}const _0x26e224=_0x4735c7?_0x58792c[_0x585cd5(0x11d)]:_0x58792c['code'],_0x16d4a4=_0x4735c7?_0x58792c[_0x585cd5(0xf5)]:_0x58792c['name'],_0x2a11ed=_0x4735c7?_0x58792c[_0x585cd5(0xff)]:_0x58792c[_0x585cd5(0x11a)]||_0x58792c[_0x585cd5(0xee)],_0x224cf8=_0x4735c7?_0x58792c['pkField']===!![]:_0x2f3092[_0x585cd5(0x122)]===!![],_0x111cf7=_0x4735c7?_0x58792c['required']===!![]:_0x2f3092['required']===!![],_0x3a8c9f=_0x4735c7?_0x58792c['options']??null:_0x2f3092[_0x585cd5(0xe8)]??null,_0x3d9562={'name':_0x26e224,'displayName':_0x16d4a4||_0x26e224,'type':_0x2a11ed,'dbType':_0x58792c['dbType'],'pk':_0x224cf8,'required':_0x111cf7,'deprecated':_0x58792c[_0x585cd5(0xe0)]===!![],'description':_0x58792c[_0x585cd5(0x125)]||undefined};return Array[_0x585cd5(0xdd)](_0x3a8c9f)&&_0x3a8c9f[_0x585cd5(0x110)]>0x0&&(_0x3d9562[_0x585cd5(0xe8)]=_0x3a8c9f),_0x3d9562;}function parseJsonMaybe(_0x31fa86){const _0x2ce551=a62_0x35ad;if(typeof _0x31fa86!==_0x2ce551(0x10f))return _0x31fa86;try{return JSON[_0x2ce551(0xf9)](_0x31fa86);}catch{return _0x31fa86;}}function normalizeOperationEntry(_0x31fa12,_0x2f7061){const _0x46e440=a62_0x35ad;if(!_0x2f7061||typeof _0x2f7061!==_0x46e440(0x116))return null;if(!_0x2f7061['method']||!_0x2f7061[_0x46e440(0xdb)])return null;const _0x3f9471={'name':_0x31fa12,'method':_0x2f7061[_0x46e440(0xf2)],'path':_0x2f7061[_0x46e440(0xdb)]};if(_0x2f7061[_0x46e440(0xe7)])_0x3f9471[_0x46e440(0xe7)]=_0x2f7061[_0x46e440(0xe7)];if(_0x2f7061['requestBody']!=null){const _0x5cdcce=parseJsonMaybe(_0x2f7061['requestBody']);_0x3f9471[_0x46e440(0x10d)]=_0x5cdcce;}if(_0x2f7061[_0x46e440(0x109)]!=null){const _0x4722a6=parseJsonMaybe(_0x2f7061[_0x46e440(0x109)]);_0x3f9471[_0x46e440(0x109)]=_0x4722a6;}if(_0x2f7061[_0x46e440(0xda)]!=null)_0x3f9471[_0x46e440(0xda)]=_0x2f7061[_0x46e440(0xda)];if(_0x2f7061[_0x46e440(0x113)]!=null)_0x3f9471[_0x46e440(0x113)]=_0x2f7061['afterScriptId'];if(Array[_0x46e440(0xdd)](_0x2f7061[_0x46e440(0x120)]))_0x3f9471[_0x46e440(0x120)]=_0x2f7061['requestFields'];if(Array['isArray'](_0x2f7061[_0x46e440(0xd9)]))_0x3f9471[_0x46e440(0xd9)]=_0x2f7061[_0x46e440(0xd9)];return _0x3f9471;}function summarizeDbtable(_0x4281e2){const _0x5a45fa=a62_0x35ad,_0x312acb={},_0x282a6e=[_0x5a45fa(0xe1),_0x5a45fa(0x121),_0x5a45fa(0xec),_0x5a45fa(0x10e),_0x5a45fa(0x122),_0x5a45fa(0xfc),'logicField',_0x5a45fa(0x11e),_0x5a45fa(0x108),'creatorIdField','creatorNameField',_0x5a45fa(0xf3),'modifierNameField',_0x5a45fa(0xf8),'dblinkInfoDTO'];for(const _0x11bf50 of _0x282a6e){if(_0x4281e2[_0x11bf50]!==undefined)_0x312acb[_0x11bf50]=_0x4281e2[_0x11bf50];}return typeof _0x312acb[_0x5a45fa(0xfc)]==='string'&&_0x312acb['allFields'][_0x5a45fa(0x110)]>0x0&&(_0x312acb[_0x5a45fa(0xed)]=_0x312acb[_0x5a45fa(0xfc)]['split'](',')[_0x5a45fa(0xdf)](_0x1b7043=>_0x1b7043['trim']())[_0x5a45fa(0x11c)](Boolean)),_0x312acb;}function normalizeRelatedPages(_0x589a09){const _0x33a30d=a62_0x35ad;if(!Array['isArray'](_0x589a09))return[];return _0x589a09[_0x33a30d(0x11c)](_0xe5956f=>_0xe5956f&&typeof _0xe5956f==='object')[_0x33a30d(0xdf)](_0x1822a8=>({'id':_0x1822a8['id'],'type':_0x1822a8[_0x33a30d(0x11a)],'code':_0x1822a8['code'],'title':_0x1822a8[_0x33a30d(0x10b)],'deleted':_0x1822a8[_0x33a30d(0x114)]===!![]}));}export const datasetDetail={'service':'dataset','command':a62_0x393881(0x126),'description':a62_0x393881(0x104),'risk':'read','flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a62_0x393881(0xf0),'type':a62_0x393881(0x10f),'description':a62_0x393881(0x11b)}],async 'execute'(_0x1ea76d){const _0x3432de=a62_0x393881,_0x5d51a9=await getDatasetDetail(_0x1ea76d[_0x3432de(0xfe)](_0x3432de(0xe4))),_0x383822=Array[_0x3432de(0xdd)](_0x5d51a9[_0x3432de(0xde)])?_0x5d51a9['fields']:Array[_0x3432de(0xdd)](_0x5d51a9['properties'])?_0x5d51a9[_0x3432de(0xe6)]:[],_0x237655=_0x383822[_0x3432de(0xdf)](_0x1b2711=>normalizeField(_0x1b2711))[_0x3432de(0x11c)](_0x4953ef=>_0x4953ef!==null),_0x44724a=_0x5d51a9[_0x3432de(0xf4)]??{},_0x5203b9=[];for(const [_0x2340f7,_0x548214]of Object[_0x3432de(0x10a)](_0x44724a)){const _0x596cc4=normalizeOperationEntry(_0x2340f7,_0x548214);if(_0x596cc4)_0x5203b9[_0x3432de(0xf6)](_0x596cc4);}const _0x40c335=_0x5d51a9[_0x3432de(0x127)]??{},_0x4c3faf=_0x5d51a9[_0x3432de(0x119)]??{},_0x35bfc8=_0x40c335[_0x3432de(0xe1)]!=null?{'id':_0x40c335[_0x3432de(0xe1)],'name':_0x40c335[_0x3432de(0x121)]??null}:undefined;let _0x1a0de0;return typeof _0x5d51a9[_0x3432de(0xeb)]===_0x3432de(0x10f)&&(_0x1a0de0=parseJsonMaybe(_0x5d51a9[_0x3432de(0xeb)])),{'ok':!![],'data':{'id':_0x5d51a9[_0x3432de(0x115)]??_0x5d51a9['id'],'name':_0x5d51a9['name'],'code':_0x5d51a9[_0x3432de(0x117)]||_0x5d51a9[_0x3432de(0xe4)],'doVersion':_0x5d51a9[_0x3432de(0x124)],'description':_0x5d51a9[_0x3432de(0x125)]||_0x4c3faf[_0x3432de(0x123)]||undefined,'source':_0x5d51a9[_0x3432de(0x11f)]||_0x4c3faf[_0x3432de(0xe3)],'table':_0x40c335['tableName']||_0x4c3faf['tableName'],'datasetKey':_0x40c335[_0x3432de(0x10e)],'pk':_0x40c335[_0x3432de(0x122)],'db':_0x35bfc8,'dbtable':summarizeDbtable(_0x40c335),'fields':_0x237655,'operations':_0x5203b9,'indexes':Array[_0x3432de(0xdd)](_0x4c3faf[_0x3432de(0x112)])?_0x4c3faf[_0x3432de(0x112)]:[],'relations':Array['isArray'](_0x5d51a9[_0x3432de(0x118)])?_0x5d51a9[_0x3432de(0x118)][_0x3432de(0xdf)](_0x2cf7af=>({..._0x2cf7af[_0x3432de(0xdc)]!=null?{'relationId':_0x2cf7af[_0x3432de(0xdc)]}:{},'fromDataset':_0x5d51a9['name'],'fromCode':_0x5d51a9['modelCode']||_0x5d51a9[_0x3432de(0xe4)],'fromTable':_0x40c335['tableName']||_0x4c3faf['tableName'],'fromField':_0x2cf7af[_0x3432de(0x101)],'toDataset':_0x2cf7af[_0x3432de(0x102)],'toCode':_0x2cf7af['toDatasetCode'],'toTable':_0x2cf7af[_0x3432de(0xef)],'toField':_0x2cf7af[_0x3432de(0x106)],'labelField':_0x2cf7af[_0x3432de(0xfb)]||undefined,'cardinality':_0x2cf7af[_0x3432de(0xe9)]||undefined,'bizRelationType':_0x2cf7af['bizRelationType']===_0x3432de(0x111)?_0x3432de(0x111):null})):[],'relatedPages':normalizeRelatedPages(_0x5d51a9[_0x3432de(0x103)]),...Array[_0x3432de(0xdd)](_0x5d51a9[_0x3432de(0x10c)])?{'columnCodeListWithDeleted':_0x5d51a9[_0x3432de(0x10c)]}:{},'formatRules':Array[_0x3432de(0xdd)](_0x5d51a9[_0x3432de(0x105)])?_0x5d51a9[_0x3432de(0x105)]:[],'validateRules':Array['isArray'](_0x5d51a9[_0x3432de(0x100)])?_0x5d51a9[_0x3432de(0x100)]:[],..._0x1a0de0!==undefined?{'extend':_0x1a0de0}:{},'stats':{'fieldCount':_0x237655[_0x3432de(0x110)],'operationCount':_0x5203b9['length']}}};}};
|