@lovrabet/rabetbase-cli 2.5.1-beta.2 → 2.5.1-beta.4
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/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/deployment-sync.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-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/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 +2 -2
- package/skills/rabetbase/references/rabetbase-config.md +1 -1
- package/skills/rabetbase/references/rabetbase-doctor.md +1 -1
- package/skills/rabetbase/references/rabetbase-kb.md +8 -7
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x147e01,_0x1f6d50){const _0x49cc25=a49_0x1d2c,_0x100d2c=_0x147e01();while(!![]){try{const _0x14ab59=parseInt(_0x49cc25(0x1f0))/0x1+parseInt(_0x49cc25(0x1f1))/0x2*(-parseInt(_0x49cc25(0x1fd))/0x3)+parseInt(_0x49cc25(0x1f2))/0x4+-parseInt(_0x49cc25(0x1f5))/0x5+parseInt(_0x49cc25(0x1f3))/0x6+parseInt(_0x49cc25(0x1f9))/0x7*(-parseInt(_0x49cc25(0x1ec))/0x8)+parseInt(_0x49cc25(0x1f7))/0x9;if(_0x14ab59===_0x1f6d50)break;else _0x100d2c['push'](_0x100d2c['shift']());}catch(_0x23e68f){_0x100d2c['push'](_0x100d2c['shift']());}}}(a49_0x46f0,0xec005));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function a49_0x1d2c(_0x40769c,_0x4ce72c){_0x40769c=_0x40769c-0x1ec;const _0x46f0f1=a49_0x46f0();let _0x1d2c12=_0x46f0f1[_0x40769c];return _0x1d2c12;}function formatBytes(_0x43a83b){const _0x429bd1=a49_0x1d2c;if(_0x43a83b>=BYTES_PER_MB){const _0x2e1f79=Math[_0x429bd1(0x1fa)](_0x43a83b/BYTES_PER_MB*0x64)/0x64;return _0x2e1f79[_0x429bd1(0x1f8)](0x2)+_0x429bd1(0x1fb);}return _0x43a83b+'\x20B';}function a49_0x46f0(){const _0x14657f=['ceil','\x20MB','File\x20not\x20found:\x20','2944284AVXtfw','8Tbbgkv','isFile','File\x20is\x20not\x20a\x20regular\x20file:\x20','validation','829634Hornfo','2qONNjA','3334852JAGMOy','945468YqIZOE','size','5344985ZcAQCm','trim','17288415dGvuul','toFixed','5073418ePVhQB'];a49_0x46f0=function(){return _0x14657f;};return a49_0x46f0();}export function requireDevelopmentUploadFile(_0x3ef15e,_0x285cf5){const _0x1ff5d8=a49_0x1d2c,_0x2d2256=_0x3ef15e[_0x1ff5d8(0x1f6)]();if(!_0x2d2256)throw CliErrors['validation'](_0x285cf5+'\x20path\x20is\x20required.');if(!existsSync(_0x2d2256))throw CliErrors['validation'](_0x1ff5d8(0x1fc)+_0x2d2256);const _0xd3b0c6=statSync(_0x2d2256);if(!_0xd3b0c6[_0x1ff5d8(0x1ed)]())throw CliErrors[_0x1ff5d8(0x1ef)](_0x1ff5d8(0x1ee)+_0x2d2256);if(_0xd3b0c6[_0x1ff5d8(0x1f4)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x1ff5d8(0x1ef)]('File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20'+_0x2d2256+'\x20('+formatBytes(_0xd3b0c6[_0x1ff5d8(0x1f4)])+')');return{'path':_0x2d2256,'size':_0xd3b0c6['size']};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a50_0x470f(_0x4044e0,_0x11ca7a){_0x4044e0=_0x4044e0-0x14b;const _0x1e0e9c=a50_0x1e0e();let _0x470f20=_0x1e0e9c[_0x4044e0];return _0x470f20;}function a50_0x1e0e(){const _0x135605=['996tdnfQw','9VxeDmg','2084190ALEuVP','5644itNvFu','test','1158498udYliw','10hTFkSP','4429236KQFUtP','App\x20Code\x20cannot\x20exceed\x20100\x20characters','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','trim','length','7497972uuJBrN','94ZEdeuJ','7214JmBYcU','11IJQmCh','4983608dRtoFI'];a50_0x1e0e=function(){return _0x135605;};return a50_0x1e0e();}(function(_0x595bc7,_0x2f2c9d){const _0x51d53a=a50_0x470f,_0x2cb1a5=_0x595bc7();while(!![]){try{const _0x3c3d50=parseInt(_0x51d53a(0x155))/0x1*(parseInt(_0x51d53a(0x154))/0x2)+parseInt(_0x51d53a(0x158))/0x3*(parseInt(_0x51d53a(0x15b))/0x4)+-parseInt(_0x51d53a(0x14d))/0x5*(-parseInt(_0x51d53a(0x14c))/0x6)+-parseInt(_0x51d53a(0x14e))/0x7+-parseInt(_0x51d53a(0x157))/0x8*(-parseInt(_0x51d53a(0x159))/0x9)+-parseInt(_0x51d53a(0x15a))/0xa+-parseInt(_0x51d53a(0x156))/0xb*(parseInt(_0x51d53a(0x153))/0xc);if(_0x3c3d50===_0x2f2c9d)break;else _0x2cb1a5['push'](_0x2cb1a5['shift']());}catch(_0x2a47af){_0x2cb1a5['push'](_0x2cb1a5['shift']());}}}(a50_0x1e0e,0x559a5));export function validateAppcode(_0xee650f){const _0xe60f29=a50_0x470f,_0xb9f8e3=_0xee650f[_0xe60f29(0x151)]();if(!_0xb9f8e3)return{'valid':![],'message':'App\x20Code\x20cannot\x20be\x20empty'};if(_0xb9f8e3[_0xe60f29(0x152)]>0x64)return{'valid':![],'message':_0xe60f29(0x14f)};if(!/^[A-Za-z0-9_-]+$/[_0xe60f29(0x14b)](_0xb9f8e3))return{'valid':![],'message':_0xe60f29(0x150)};return{'valid':!![]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a51_0x5d021a=a51_0x2ffc;(function(_0x2ce4b8,_0x4a9068){const _0x3261f6=a51_0x2ffc,_0x767348=_0x2ce4b8();while(!![]){try{const _0x9e6f19=-parseInt(_0x3261f6(0xd9))/0x1+-parseInt(_0x3261f6(0xd1))/0x2*(-parseInt(_0x3261f6(0xdb))/0x3)+parseInt(_0x3261f6(0xb9))/0x4+-parseInt(_0x3261f6(0xd4))/0x5+parseInt(_0x3261f6(0xc1))/0x6*(parseInt(_0x3261f6(0xd2))/0x7)+parseInt(_0x3261f6(0xc0))/0x8*(parseInt(_0x3261f6(0xc3))/0x9)+-parseInt(_0x3261f6(0xc5))/0xa*(parseInt(_0x3261f6(0xbb))/0xb);if(_0x9e6f19===_0x4a9068)break;else _0x767348['push'](_0x767348['shift']());}catch(_0x561f6f){_0x767348['push'](_0x767348['shift']());}}}(a51_0x37c6,0x941a8));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,isTopLevelConfigKey,readScopedConfig,resolveWriteScope,writeScopedConfig}from'../../commands/config/shared.js';function a51_0x2ffc(_0x9b0a03,_0x308066){_0x9b0a03=_0x9b0a03-0xb9;const _0x37c6fd=a51_0x37c6();let _0x2ffc6f=_0x37c6fd[_0x9b0a03];return _0x2ffc6f;}const LEGACY_DELETABLE_KEYS=new Set([a51_0x5d021a(0xce)]),EXTRA_DELETABLE_KEYS=new Set([a51_0x5d021a(0xc4)]);async function execute(_0x5d2d11){const _0x3fdd9b=a51_0x5d021a,_0x21c2ae=_0x5d2d11[_0x3fdd9b(0xc2)][0x0]?.['trim']();if(!_0x21c2ae)throw CliErrors['validation'](_0x3fdd9b(0xd0),_0x3fdd9b(0xdd)+CLI_BIN_NAME+_0x3fdd9b(0xde));if(_0x21c2ae===_0x3fdd9b(0xd8))throw CliErrors[_0x3fdd9b(0xbd)](_0x3fdd9b(0xbe));if(!isTopLevelConfigKey(_0x21c2ae)&&!EXTRA_DELETABLE_KEYS['has'](_0x21c2ae)&&!LEGACY_DELETABLE_KEYS[_0x3fdd9b(0xc7)](_0x21c2ae))throw CliErrors[_0x3fdd9b(0xbd)](_0x3fdd9b(0xdc)+_0x21c2ae+_0x3fdd9b(0xd6),_0x3fdd9b(0xd5));const _0xb07672=resolveWriteScope({'global':_0x5d2d11['bool']('global')}),_0xb61752=readScopedConfig(_0xb07672),_0x108486=Object[_0x3fdd9b(0xda)][_0x3fdd9b(0xca)]['call'](_0xb61752,_0x21c2ae);_0x108486&&(delete _0xb61752[_0x21c2ae],writeScopedConfig(_0xb61752,_0xb07672));const _0x2c97ea=_0xb07672===_0x3fdd9b(0xbf)?_0x3fdd9b(0xcc):_0x3fdd9b(0xcd);return{'ok':!![],'message':_0x108486?'✓\x20'+_0x2c97ea+'\x20'+_0x21c2ae+_0x3fdd9b(0xbc):'✓\x20'+_0x2c97ea+'\x20'+_0x21c2ae+_0x3fdd9b(0xc6),'data':{'key':_0x21c2ae,'scope':_0xb07672,'changed':_0x108486}};}export const configDeleteDefinition={'service':a51_0x5d021a(0xc9),'command':a51_0x5d021a(0xd3),'description':a51_0x5d021a(0xc8),'risk':a51_0x5d021a(0xcb),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a51_0x5d021a(0xcf),'description':a51_0x5d021a(0xba),'required':!![]}],'flags':[{'name':a51_0x5d021a(0xbf),'type':'boolean','description':a51_0x5d021a(0xd7),'default':![]}],'execute':execute};function a51_0x37c6(){const _0xf496d1=['Global','Project','inherit','key','Missing\x20key\x20argument.','6dcEFsI','1453382UyGfXQ','delete','2743540HTjeST','Use\x20workspace\x20commands\x20to\x20modify\x20apps\x20and\x20their\x20default\x20selection.','\x22\x20is\x20not\x20deletable.','Delete\x20from\x20global\x20config\x20(~/.rabetbase.json)','riskLevel','525787UkspVl','prototype','815286pzHcgc','Top-level\x20key\x20\x22','Usage:\x20','\x20config\x20delete\x20<key>\x20[--global]','4344684moWYXz','Top-level\x20config\x20key;\x20legacy\x20inherit\x20is\x20accepted\x20for\x20migration','11yvxFPa','\x20deleted','validation','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','global','2795248ezLFwF','18WPippA','args','18GXiDhk','defaultApp','15420200Kulpnv','\x20already\x20absent','has','Delete\x20a\x20config\x20value\x20from\x20one\x20scope','config','hasOwnProperty','write'];a51_0x37c6=function(){return _0xf496d1;};return a51_0x37c6();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a52_0x3887ce=a52_0x16c7;(function(_0xc2a080,_0x5c3672){const _0x29ec30=a52_0x16c7,_0x2196ee=_0xc2a080();while(!![]){try{const _0x3dc801=-parseInt(_0x29ec30(0x185))/0x1+parseInt(_0x29ec30(0x18f))/0x2*(parseInt(_0x29ec30(0x18a))/0x3)+-parseInt(_0x29ec30(0x17f))/0x4+-parseInt(_0x29ec30(0x17d))/0x5+-parseInt(_0x29ec30(0x180))/0x6*(parseInt(_0x29ec30(0x181))/0x7)+-parseInt(_0x29ec30(0x18e))/0x8+-parseInt(_0x29ec30(0x189))/0x9*(-parseInt(_0x29ec30(0x188))/0xa);if(_0x3dc801===_0x5c3672)break;else _0x2196ee['push'](_0x2196ee['shift']());}catch(_0x659090){_0x2196ee['push'](_0x2196ee['shift']());}}}(a52_0x351b,0x8b429));import{CliErrors}from'../../errors.js';function a52_0x16c7(_0xdf700d,_0x185ba5){_0xdf700d=_0xdf700d-0x17b;const _0x351bbf=a52_0x351b();let _0x16c761=_0x351bbf[_0xdf700d];return _0x16c761;}function a52_0x351b(){const _0x13e575=['\x20config\x20get\x20--key\x20<key>','Key\x20not\x20found:\x20','appcode','6507272SCKNKq','6QoWsDW','validation','Get\x20a\x20config\x20value\x20by\x20key','4272475fPDrbL','str','2808492CHBUPv','18qeQFGs','841435OUFuYt','key','object','get','366965taWXrP','Missing\x20key.','config','17666430DYyhBQ','18ATmNOj','134730izWUsU'];a52_0x351b=function(){return _0x13e575;};return a52_0x351b();}import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x39bad8){const _0x525a4d=a52_0x16c7,_0x39f1eb=_0x39bad8[_0x525a4d(0x17e)](_0x525a4d(0x182));if(!_0x39f1eb)throw CliErrors['validation'](_0x525a4d(0x186),'Usage:\x20'+CLI_BIN_NAME+_0x525a4d(0x18b));const _0x566384=readConfig(),_0x35b961=_0x39f1eb==='app'?_0x525a4d(0x18d):_0x39f1eb,_0x3aa308=_0x566384[_0x35b961];if(_0x3aa308===undefined)throw CliErrors[_0x525a4d(0x17b)](_0x525a4d(0x18c)+_0x39f1eb);return{'ok':!![],'data':typeof _0x3aa308===_0x525a4d(0x183)?_0x3aa308:{[_0x35b961]:_0x3aa308},'message':typeof _0x3aa308===_0x525a4d(0x183)?undefined:String(_0x3aa308)};}export const configGetDefinition={'service':a52_0x3887ce(0x187),'command':a52_0x3887ce(0x184),'description':a52_0x3887ce(0x17c),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a52_0x3887ce(0x182),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x39bdde,_0x3021c9){const _0x54f5b1=a53_0x1ee5,_0xaf486b=_0x39bdde();while(!![]){try{const _0x53ee28=-parseInt(_0x54f5b1(0x128))/0x1*(parseInt(_0x54f5b1(0x12e))/0x2)+-parseInt(_0x54f5b1(0x12a))/0x3*(-parseInt(_0x54f5b1(0x124))/0x4)+-parseInt(_0x54f5b1(0x12c))/0x5*(-parseInt(_0x54f5b1(0x126))/0x6)+parseInt(_0x54f5b1(0x129))/0x7*(-parseInt(_0x54f5b1(0x12f))/0x8)+parseInt(_0x54f5b1(0x130))/0x9+-parseInt(_0x54f5b1(0x12b))/0xa*(parseInt(_0x54f5b1(0x127))/0xb)+-parseInt(_0x54f5b1(0x125))/0xc*(-parseInt(_0x54f5b1(0x12d))/0xd);if(_0x53ee28===_0x3021c9)break;else _0xaf486b['push'](_0xaf486b['shift']());}catch(_0x49902e){_0xaf486b['push'](_0xaf486b['shift']());}}}(a53_0x4093,0xba91c));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';function a53_0x1ee5(_0x4e0006,_0x5d1418){_0x4e0006=_0x4e0006-0x124;const _0x409394=a53_0x4093();let _0x1ee566=_0x409394[_0x4e0006];return _0x1ee566;}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_0x4093(){const _0x3f6ebd=['287112wABcOY','571284gdjgNT','9042YaZHSH','978625jQucjq','62867fAdEIL','4287FOopPm','11420JMIFoT','15FuDlZT','468MWinql','2EPaakD','232wRAwJt','3358377DUcFtK','3980eGmhZB'];a53_0x4093=function(){return _0x3f6ebd;};return a53_0x4093();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a54_0x42874e=a54_0xd3a3;(function(_0x16473a,_0x2eebe2){const _0x49eb51=a54_0xd3a3,_0x1a20c4=_0x16473a();while(!![]){try{const _0x13138a=-parseInt(_0x49eb51(0x160))/0x1*(-parseInt(_0x49eb51(0x162))/0x2)+-parseInt(_0x49eb51(0x14a))/0x3+-parseInt(_0x49eb51(0x155))/0x4+parseInt(_0x49eb51(0x13a))/0x5*(-parseInt(_0x49eb51(0x14c))/0x6)+parseInt(_0x49eb51(0x158))/0x7+parseInt(_0x49eb51(0x161))/0x8+parseInt(_0x49eb51(0x144))/0x9;if(_0x13138a===_0x2eebe2)break;else _0x1a20c4['push'](_0x1a20c4['shift']());}catch(_0x3c2082){_0x1a20c4['push'](_0x1a20c4['shift']());}}}(a54_0x466e,0xb8a96));import{select}from'@inquirer/prompts';import{CliErrors}from'../../errors.js';import{readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{DOMAIN_CONFIG_FIELDS,LEGACY_DOMAIN_CONFIG_FIELDS,resolveDomainFlags}from'../../config/domain-config.js';import{DEFAULT_LOVRABET_REGION,ENABLED_LOVRABET_REGION_VALUES,isEnabledLovrabetRegion}from'../../constant/region.js';export const configInitFlags=[{'name':a54_0x42874e(0x13c),'type':a54_0x42874e(0x14e),'description':a54_0x42874e(0x154),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},{'name':'domain-config','type':a54_0x42874e(0x14e),'description':a54_0x42874e(0x148)},{'name':a54_0x42874e(0x14b),'type':a54_0x42874e(0x14e),'description':a54_0x42874e(0x139)},{'name':a54_0x42874e(0x157),'type':a54_0x42874e(0x14e),'description':a54_0x42874e(0x145)},{'name':a54_0x42874e(0x159),'type':'string','description':a54_0x42874e(0x15f)},{'name':'skill-domain','type':a54_0x42874e(0x14e),'description':'Custom\x20SkillHub\x20HTTPS\x20origin'},{'name':a54_0x42874e(0x13e),'type':a54_0x42874e(0x14e),'description':'Custom\x20knowledge-base\x20HTTPS\x20origin'},{'name':'app-domain','type':a54_0x42874e(0x14e),'description':a54_0x42874e(0x142)},{'name':'local-domain','type':a54_0x42874e(0x14e),'description':a54_0x42874e(0x163)},{'name':'certificate-domain','type':a54_0x42874e(0x14e),'description':'Custom\x20certificate\x20service\x20HTTPS\x20origin'}];function a54_0xd3a3(_0x483823,_0x4b8698){_0x483823=_0x483823-0x139;const _0x466e5f=a54_0x466e();let _0xd3a35b=_0x466e5f[_0x483823];return _0xd3a35b;}async function resolveRegion(_0x25d85d){const _0x2fa739=a54_0x42874e,_0x558134=_0x25d85d['str'](_0x2fa739(0x13c));if(_0x558134){if(!isEnabledLovrabetRegion(_0x558134))throw CliErrors['validation'](_0x2fa739(0x15c)+_0x558134+'\x22\x20is\x20not\x20currently\x20available.',_0x2fa739(0x13f)+ENABLED_LOVRABET_REGION_VALUES[_0x2fa739(0x143)](',\x20'));return _0x558134;}if(_0x25d85d[_0x2fa739(0x165)])return DEFAULT_LOVRABET_REGION;try{return await select({'message':'Select\x20Lovrabet\x20region','default':DEFAULT_LOVRABET_REGION,'choices':[{'name':_0x2fa739(0x150),'value':'cn'},{'name':'Indonesia\x20(id)','value':'id'}]});}catch(_0xec6c8d){if(_0xec6c8d?.['name']===_0x2fa739(0x156))throw CliErrors['cancelled']();throw _0xec6c8d;}}export async function executeConfigInit(_0x5e95f8){const _0x514fb2=a54_0x42874e,_0x520eb9=resolveDomainFlags(_0x5e95f8),_0x4faa5a=Object[_0x514fb2(0x13d)](_0x520eb9)['length']>0x0;if(_0x4faa5a&&_0x5e95f8[_0x514fb2(0x152)](_0x514fb2(0x13c)))throw CliErrors[_0x514fb2(0x15b)](_0x514fb2(0x15a));if(!!_0x520eb9[_0x514fb2(0x153)]!==!!_0x520eb9[_0x514fb2(0x15e)])throw CliErrors[_0x514fb2(0x15b)]('Independent\x20deployment\x20requires\x20--local-domain\x20and\x20--certificate-domain\x20together.');const _0x58f110=readScopedConfig(_0x514fb2(0x147));for(const _0x30b74e of DOMAIN_CONFIG_FIELDS)delete _0x58f110[_0x30b74e];for(const _0x69ae99 of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x58f110[_0x69ae99];let _0x1ad7d7=null;if(_0x4faa5a)delete _0x58f110[_0x514fb2(0x13c)],Object[_0x514fb2(0x14f)](_0x58f110,_0x520eb9);else{_0x1ad7d7=await resolveRegion(_0x5e95f8);if(_0x1ad7d7===DEFAULT_LOVRABET_REGION)delete _0x58f110[_0x514fb2(0x13c)];else _0x58f110[_0x514fb2(0x13c)]=_0x1ad7d7;}return writeScopedConfig(_0x58f110,'global'),{'ok':!![],'message':_0x4faa5a?_0x514fb2(0x140)+Object[_0x514fb2(0x13d)](_0x520eb9)[_0x514fb2(0x143)](',\x20')+'.':_0x514fb2(0x146)+_0x1ad7d7+'.','data':{'mode':_0x4faa5a?_0x514fb2(0x151):_0x514fb2(0x164),'region':_0x1ad7d7,'domains':_0x520eb9}};}export const configInitDefinition={'service':a54_0x42874e(0x141),'command':a54_0x42874e(0x149),'description':a54_0x42874e(0x13b),'risk':a54_0x42874e(0x14d),'confirmationDescription':a54_0x42874e(0x15d),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};function a54_0x466e(){const _0x870f48=['2302803DYJJEU','Custom\x20platform\x20API\x20HTTPS\x20origin','Rabetbase\x20connection\x20configured\x20for\x20region:\x20','global','Independent-deployment\x20Domain\x20JSON\x20file','init','2897664ecBxEF','user-domain','2716818sOmcvI','write','string','assign','Mainland\x20China\x20(cn)','independent','str','localDomain','Official\x20Lovrabet\x20region:\x20cn\x20or\x20id','1402964psIDeT','ExitPromptError','api-domain','4179434OcwqsC','runtime-domain','Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.','validation','Region\x20\x22','Updates\x20the\x20global\x20Rabetbase\x20region\x20or\x20independent-deployment\x20domain\x20configuration.\x20Cookie,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','certificateDomain','Custom\x20Runtime\x20HTTPS\x20origin','106739jHXOlL','9113456tMITEz','10dKzgFP','Custom\x20local\x20callback\x20HTTPS\x20origin','official','nonInteractive','Custom\x20User\x20HTTPS\x20origin','5eKtKZF','Initialize\x20the\x20global\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','region','keys','kb-domain','Available\x20regions:\x20','Rabetbase\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20','config','Custom\x20Lovrabet\x20workspace\x20HTTPS\x20origin','join'];a54_0x466e=function(){return _0x870f48;};return a54_0x466e();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a55_0x55a75a=a55_0x26ea;function a55_0x2fbd(){const _0xa05b7b=['bool','595916EuxEEW','1161223iMexJc','77fMcqad','2225496qqCGHD','config','global','1340424oGaqCY','16cTRpxL','3363318bPirrQ','read','1lBUwAv','boolean','1451285UFEiKn','3bhhlFo','List\x20all\x20config\x20values','70DmPeFJ','559530FAmLfl'];a55_0x2fbd=function(){return _0xa05b7b;};return a55_0x2fbd();}(function(_0x2d8c57,_0x1adb0f){const _0x364a3d=a55_0x26ea,_0x4b7861=_0x2d8c57();while(!![]){try{const _0x242374=-parseInt(_0x364a3d(0x1d8))/0x1*(parseInt(_0x364a3d(0x1ce))/0x2)+parseInt(_0x364a3d(0x1c9))/0x3*(parseInt(_0x364a3d(0x1d4))/0x4)+parseInt(_0x364a3d(0x1c8))/0x5+-parseInt(_0x364a3d(0x1d6))/0x6+parseInt(_0x364a3d(0x1cf))/0x7*(-parseInt(_0x364a3d(0x1d5))/0x8)+-parseInt(_0x364a3d(0x1cc))/0x9*(parseInt(_0x364a3d(0x1cb))/0xa)+parseInt(_0x364a3d(0x1d0))/0xb*(parseInt(_0x364a3d(0x1d1))/0xc);if(_0x242374===_0x1adb0f)break;else _0x4b7861['push'](_0x4b7861['shift']());}catch(_0x4500c1){_0x4b7861['push'](_0x4b7861['shift']());}}}(a55_0x2fbd,0x48c6a));import{readScopedConfig}from'../../commands/config/shared.js';function a55_0x26ea(_0x4eb146,_0x9db6f9){_0x4eb146=_0x4eb146-0x1c7;const _0x2fbddf=a55_0x2fbd();let _0x26ea34=_0x2fbddf[_0x4eb146];return _0x26ea34;}import{readConfig}from'../../utils/config.js';async function execute(_0x2781bc){const _0x23e561=a55_0x26ea,_0x36ea75=_0x2781bc[_0x23e561(0x1cd)](_0x23e561(0x1d3))?readScopedConfig(_0x23e561(0x1d3)):readConfig();return{'ok':!![],'data':_0x36ea75};}export const configListDefinition={'service':a55_0x55a75a(0x1d2),'command':'list','description':a55_0x55a75a(0x1ca),'risk':a55_0x55a75a(0x1d7),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a55_0x55a75a(0x1d3),'type':a55_0x55a75a(0x1c7),'description':'Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a56_0x5b9b00=a56_0x1da3;(function(_0x34e1e1,_0x20e08f){const _0xa5ff1a=a56_0x1da3,_0x5a7894=_0x34e1e1();while(!![]){try{const _0xf579c1=parseInt(_0xa5ff1a(0x18b))/0x1*(parseInt(_0xa5ff1a(0x19c))/0x2)+-parseInt(_0xa5ff1a(0x1a9))/0x3*(parseInt(_0xa5ff1a(0x1b3))/0x4)+-parseInt(_0xa5ff1a(0x195))/0x5+parseInt(_0xa5ff1a(0x1aa))/0x6*(parseInt(_0xa5ff1a(0x1b6))/0x7)+parseInt(_0xa5ff1a(0x19d))/0x8+parseInt(_0xa5ff1a(0x19e))/0x9+parseInt(_0xa5ff1a(0x18f))/0xa*(-parseInt(_0xa5ff1a(0x1a6))/0xb);if(_0xf579c1===_0x20e08f)break;else _0x5a7894['push'](_0x5a7894['shift']());}catch(_0xb6b15e){_0x5a7894['push'](_0x5a7894['shift']());}}}(a56_0xfa87,0x42e33));import{CliErrors}from'../../errors.js';function a56_0x1da3(_0x3cc64a,_0xaf6e3b){_0x3cc64a=_0x3cc64a-0x183;const _0xfa8706=a56_0xfa87();let _0x1da3dc=_0xfa8706[_0x3cc64a];return _0x1da3dc;}import{buildCanonicalProjectConfig}from'../../config/schema.js';function a56_0xfa87(){const _0x479b9f=['string','validation','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','Project','set','\x22.\x20Allowed:\x20','Top-level\x20key\x20\x22','74qGfcXm','Global','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','config','8234540wmbzPI','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','env','str','global','includes','123110DiYKOm','boolean','join','`,\x20`','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','Missing\x20value.','Settable\x20top-level\x20keys:\x20','11698qmnxgZ','1344832ftDlaH','3426174WVjHVb','\x20(stored\x20as\x20a\x20single\x20app\x20profile)','Missing\x20key.','length','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','key','appcode','value','11AIWtcm','locale','keys','15ZnCZmm','847518LZvqcz','Invalid\x20locale\x20value.','\x20set\x20to:\x20','write','Config\x20value','\x20appcode\x20set\x20to:\x20','bool','Set\x20a\x20config\x20value','Usage:\x20','113660edbXQF','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','apps','14KsdVjz','Invalid\x20value\x20for\x20\x22','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.'];a56_0xfa87=function(){return _0x479b9f;};return a56_0xfa87();}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(_0x424a29){const _0x4cbef8=a56_0x1da3,_0x2f8caa=_0x424a29[_0x4cbef8(0x192)]('key'),_0x1a877d=_0x424a29['str'](_0x4cbef8(0x1a5));if(!_0x2f8caa)throw CliErrors[_0x4cbef8(0x185)](_0x4cbef8(0x1a0),_0x4cbef8(0x1b2)+CLI_BIN_NAME+'\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>');if(_0x1a877d===undefined||_0x1a877d==='')throw CliErrors['validation'](_0x4cbef8(0x19a),_0x4cbef8(0x1b2)+CLI_BIN_NAME+_0x4cbef8(0x186));let _0x132d50=_0x2f8caa,_0xa69ecb=_0x1a877d;if(_0x1a877d['length']>0x1f4)throw CliErrors[_0x4cbef8(0x185)](_0x4cbef8(0x18d));if(_0x2f8caa==='riskLevel')throw CliErrors[_0x4cbef8(0x185)](_0x4cbef8(0x190));if(!isTopLevelConfigKey(_0x2f8caa))throw CliErrors[_0x4cbef8(0x185)](_0x4cbef8(0x18a)+_0x2f8caa+'\x22\x20is\x20not\x20settable.',_0x4cbef8(0x19b)+getTopLevelConfigKeySummary());if(CONFIG_ENUM_VALUES[_0x2f8caa]&&!CONFIG_ENUM_VALUES[_0x2f8caa][_0x4cbef8(0x194)](_0x1a877d))throw CliErrors[_0x4cbef8(0x185)](_0x4cbef8(0x1b7)+_0x2f8caa+_0x4cbef8(0x189)+CONFIG_ENUM_VALUES[_0x2f8caa][_0x4cbef8(0x197)](',\x20'));if(_0x2f8caa==='locale'&&!normalizeLocale(_0x1a877d))throw CliErrors[_0x4cbef8(0x185)](_0x4cbef8(0x1ab),'Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US');DOMAIN_CONFIG_FIELDS[_0x4cbef8(0x194)](_0x2f8caa)&&(_0xa69ecb=normalizeDomainOrigin(_0x2f8caa,_0x1a877d));const _0x38f93d={'global':_0x424a29[_0x4cbef8(0x1b0)](_0x4cbef8(0x193))},_0x3848ab=resolveWriteScope(_0x38f93d),_0x7beed8=readScopedConfig(_0x3848ab);_0x2f8caa==='app'&&(_0x132d50=_0x4cbef8(0x1a4),delete _0x7beed8['app']);_0x2f8caa===_0x4cbef8(0x1a7)&&(_0xa69ecb=normalizeLocale(_0x1a877d));if(_0x2f8caa===_0x4cbef8(0x191)){_0xa69ecb=normalizeEnv(_0x1a877d);if(!isProduction(_0xa69ecb)&&!isDaily(_0xa69ecb))throw CliErrors[_0x4cbef8(0x185)](_0x4cbef8(0x183),_0x4cbef8(0x199));}if(_0x2f8caa==='appcode'){const _0x3c069f=_0x7beed8[_0x4cbef8(0x1b5)]&&typeof _0x7beed8['apps']==='object'?Object[_0x4cbef8(0x1a8)](_0x7beed8[_0x4cbef8(0x1b5)]):[];if(_0x3c069f[_0x4cbef8(0x1a1)]>0x0)throw CliErrors['validation'](_0x4cbef8(0x1a2),'Use\x20`'+CLI_BIN_NAME+'\x20workspace\x20add\x20<name>\x20--appcode\x20'+_0xa69ecb+_0x4cbef8(0x198)+CLI_BIN_NAME+'\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.');const _0x3a4c88=buildCanonicalProjectConfig({..._0x7beed8},{'appCodes':[_0xa69ecb],'env':typeof _0x7beed8[_0x4cbef8(0x191)]===_0x4cbef8(0x184)?_0x7beed8[_0x4cbef8(0x191)]:undefined});writeScopedConfig(_0x3a4c88,_0x3848ab);const _0x16639=_0x3848ab===_0x4cbef8(0x193)?'Global':_0x4cbef8(0x187);return{'ok':!![],'message':'✓\x20'+_0x16639+_0x4cbef8(0x1af)+_0xa69ecb+_0x4cbef8(0x19f)};}_0x7beed8[_0x132d50]=_0xa69ecb,writeScopedConfig(_0x7beed8,_0x3848ab);const _0x2f6d3c=_0x3848ab===_0x4cbef8(0x193)?_0x4cbef8(0x18c):_0x4cbef8(0x187);return{'ok':!![],'message':'✓\x20'+_0x2f6d3c+'\x20'+_0x132d50+_0x4cbef8(0x1ac)+_0xa69ecb};}export const configSetDefinition={'service':a56_0x5b9b00(0x18e),'command':a56_0x5b9b00(0x188),'description':a56_0x5b9b00(0x1b1),'risk':a56_0x5b9b00(0x1ad),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a56_0x5b9b00(0x1a3),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]},{'name':a56_0x5b9b00(0x1a5),'type':a56_0x5b9b00(0x184),'description':a56_0x5b9b00(0x1ae),'required':!![]},{'name':a56_0x5b9b00(0x193),'type':a56_0x5b9b00(0x196),'description':a56_0x5b9b00(0x1b4),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x37f80f,_0x21f710){var _0xf95c14=a57_0x5ce9,_0x1869a8=_0x37f80f();while(!![]){try{var _0x5e6128=parseInt(_0xf95c14(0x9b))/0x1+-parseInt(_0xf95c14(0x9a))/0x2+parseInt(_0xf95c14(0x96))/0x3*(parseInt(_0xf95c14(0x97))/0x4)+parseInt(_0xf95c14(0x98))/0x5+-parseInt(_0xf95c14(0x99))/0x6*(parseInt(_0xf95c14(0x9f))/0x7)+-parseInt(_0xf95c14(0x94))/0x8*(-parseInt(_0xf95c14(0x9d))/0x9)+parseInt(_0xf95c14(0xa0))/0xa;if(_0x5e6128===_0x21f710)break;else _0x1869a8['push'](_0x1869a8['shift']());}catch(_0x25ed1a){_0x1869a8['push'](_0x1869a8['shift']());}}}(a57_0x377c,0xddf14));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';function a57_0x377c(){var _0xb1ba04=['8468UjXJOd','8407955zXgwZQ','64542lVdzTQ','3411078VUaFlV','1093661vXLuIX','\x20workspace\x20init\x20--appcode\x20<code>`\x20first.','266031vxvole','project','1169VzxHPN','1465360ysHCEB','global','328hqVUPR','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','393aLiHaj'];a57_0x377c=function(){return _0xb1ba04;};return a57_0x377c();}import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';function a57_0x5ce9(_0x3b134c,_0x39209d){_0x3b134c=_0x3b134c-0x94;var _0x377c51=a57_0x377c();var _0x5ce99a=_0x377c51[_0x3b134c];return _0x5ce99a;}export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x42ae6e){var _0x54c9ca=a57_0x5ce9;if(_0x42ae6e['global'])return _0x54c9ca(0xa1);if(!isInProject())throw CliErrors['validation']('Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).',_0x54c9ca(0x95)+CLI_BIN_NAME+_0x54c9ca(0x9c));return _0x54c9ca(0x9e);}export function readScopedConfig(_0x679b54){return readConfigFile(resolveWriteConfigPath(_0x679b54));}export function writeScopedConfig(_0x430313,_0x30c509){writeConfigFile(resolveWriteConfigPath(_0x30c509),_0x430313);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a58_0x3fa0e3=a58_0xe106;(function(_0x202f79,_0xe5228b){const _0x2868cc=a58_0xe106,_0x1d8b31=_0x202f79();while(!![]){try{const _0x37b319=-parseInt(_0x2868cc(0xc0))/0x1+parseInt(_0x2868cc(0x9c))/0x2*(parseInt(_0x2868cc(0xb0))/0x3)+-parseInt(_0x2868cc(0x98))/0x4*(-parseInt(_0x2868cc(0xcc))/0x5)+parseInt(_0x2868cc(0x92))/0x6+-parseInt(_0x2868cc(0x85))/0x7*(-parseInt(_0x2868cc(0x87))/0x8)+parseInt(_0x2868cc(0xc9))/0x9*(parseInt(_0x2868cc(0xae))/0xa)+parseInt(_0x2868cc(0xa2))/0xb*(-parseInt(_0x2868cc(0xca))/0xc);if(_0x37b319===_0xe5228b)break;else _0x1d8b31['push'](_0x1d8b31['shift']());}catch(_0x4e6ca3){_0x1d8b31['push'](_0x1d8b31['shift']());}}}(a58_0x2314,0x4dc36));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';function a58_0x2314(){const _0x186a9d=['dbId','/smartapi/question/er-config/business-group/edit','sourceType','Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.','path','532746fCKtCR','code','expect-business-group','trim','datasetCode','METADATA','Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing','name','dbtableConfig','3887604jbjxFF','11059320dgtetH','validation','910NVXFab','parse','DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.','call','--business-group\x20is\x20required','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','apiError','847ZYugOv','businessGroup','6704IbUrfY','number','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','stringify','/smartapi/dblink/updateTableBusinessGroup','--code\x20is\x20required','dbTableSelector','Expected\x20','tableName','isArray','value','964068BxQgHR','--business-group\x20must\x20not\x20be\x20blank','business-group-update','str','message','modelCode','11908cIUifh','unchanged','db-table','update','8SHLQYp','kind','DB_TABLE','data','found','isFinite','11EyVkZn','method',',\x20actual\x20','expectBusinessGroup','source','POST','toUpperCase','Update\x20business\x20scenario\x20group','business-group','backend','Expectation\x20mismatch\x20at\x20businessGroup','matched','10uRFRvj','string','402771LCUNHX','dataset','prototype','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','modelId','dbLinkId','payload','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it','Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.','extend'];a58_0x2314=function(){return _0x186a9d;};return a58_0x2314();}import{getDatasetDetail,updateDbTableBusinessGroup,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const DB_TABLE_BACKEND_PATH=a58_0x3fa0e3(0x8b),METADATA_BACKEND_PATH=a58_0x3fa0e3(0xbc),UNGROUPED_BUSINESS_GROUP='ungrouped';export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x4620c4,input:_0x2dae33,dryRun:_0x551ab8}){const _0x111ef6=a58_0x3fa0e3;validateInput(_0x2dae33);const _0x2d10af=normalizeBusinessGroupArgument(_0x2dae33[_0x111ef6(0x86)]),_0x1bc7a9=await getDatasetDetail(_0x2dae33['code']),_0x4d96da=resolveBusinessGroupDataset(_0x1bc7a9,_0x2dae33['code']);assertBusinessGroupUpdateSupported(_0x4d96da,_0x2d10af);const _0x490d5b=loadCurrentBusinessGroup(_0x1bc7a9,_0x4d96da);assertExpectedBusinessGroup(_0x490d5b,_0x2dae33[_0x111ef6(0xa5)]);const _0x46381f=buildBackendPlan(_0x4620c4,_0x4d96da,_0x2d10af),_0x18fff6=_0x490d5b!==_0x2d10af;let _0x3b3beb;if(_0x18fff6&&!_0x551ab8){_0x46381f[_0x111ef6(0x9d)]==='db-table'?await updateDbTableBusinessGroup(_0x46381f[_0x111ef6(0xb7)]):await updateErBusinessGroup(_0x46381f[_0x111ef6(0xb7)]);const _0x12cd4f=await getDatasetDetail(_0x4d96da['code']),_0x1ea37a=resolveBusinessGroupDataset(_0x12cd4f,_0x4d96da[_0x111ef6(0xc1)]),_0x418447=loadCurrentBusinessGroup(_0x12cd4f,_0x1ea37a);if(_0x418447!==_0x2d10af)throw CliErrors[_0x111ef6(0x84)](_0x111ef6(0xb3),_0x111ef6(0x8e)+JSON[_0x111ef6(0x8a)](displayBusinessGroup(_0x2d10af))+_0x111ef6(0xa4)+JSON['stringify'](displayBusinessGroup(_0x418447))+'.');_0x3b3beb={'verified':!![],'status':_0x111ef6(0xad),'afterReadback':{'businessGroup':displayBusinessGroup(_0x418447)}};}else!_0x18fff6&&(_0x3b3beb={'verified':!![],'status':_0x111ef6(0x99),'afterReadback':{'businessGroup':displayBusinessGroup(_0x490d5b)}});const _0x5456eb={'operation':_0x111ef6(0x9b),'appCode':_0x4620c4,'selector':{'code':_0x4d96da['code']},'dataset':{'id':_0x4d96da['id'],'code':_0x4d96da['code'],'name':_0x4d96da[_0x111ef6(0xc7)],'sourceType':_0x4d96da['sourceType']},'before':{'businessGroup':displayBusinessGroup(_0x490d5b)},'after':{'businessGroup':displayBusinessGroup(_0x2d10af)},'changed':_0x18fff6,'dryRun':_0x551ab8,'submitted':_0x18fff6&&!_0x551ab8,'backend':{'method':_0x46381f['method'],'path':_0x46381f[_0x111ef6(0xbf)],'payload':_0x46381f[_0x111ef6(0xb7)]},..._0x3b3beb?{'verification':_0x3b3beb}:{},'warnings':[]};return{'ok':!![],'data':_0x5456eb,'message':_0x18fff6?_0x551ab8?_0x111ef6(0x83)+_0x4d96da[_0x111ef6(0xc1)]:'Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20'+_0x4d96da[_0x111ef6(0xc1)]:_0x111ef6(0x89)+_0x4d96da[_0x111ef6(0xc1)]};}export const datasetBusinessGroupUpdate={'service':a58_0x3fa0e3(0xb1),'command':a58_0x3fa0e3(0x94),'description':a58_0x3fa0e3(0xa9),'risk':'write','flags':[CODE_FLAG,{'name':a58_0x3fa0e3(0xaa),'type':a58_0x3fa0e3(0xaf),'required':!![],'description':a58_0x3fa0e3(0xb8)},{'name':a58_0x3fa0e3(0xc2),'type':a58_0x3fa0e3(0xaf),'required':![],'description':a58_0x3fa0e3(0xc6)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2bde7a){validateInput(readBusinessGroupUpdateInput(_0x2bde7a));},async 'dryRun'(_0x2eb3be){const _0x562873=a58_0x3fa0e3,_0x31d2b2=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x2eb3be['appCode'],'input':readBusinessGroupUpdateInput(_0x2eb3be),'dryRun':!![]});return{'method':_0x31d2b2[_0x562873(0x9f)][_0x562873(0xab)][_0x562873(0xa3)],'url':_0x31d2b2[_0x562873(0x9f)][_0x562873(0xab)]['path'],'body':_0x31d2b2['data'][_0x562873(0xab)][_0x562873(0xb7)],'description':_0x31d2b2[_0x562873(0x96)],..._0x31d2b2[_0x562873(0x9f)]};},async 'execute'(_0x412841){return buildDatasetBusinessGroupUpdateResult({'appCode':_0x412841['appCode'],'input':readBusinessGroupUpdateInput(_0x412841),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x4ebb7e){const _0x31a923=a58_0x3fa0e3,_0x3ba025=_0x4ebb7e['str']('expect-business-group');return{'code':trim(_0x4ebb7e['str'](_0x31a923(0xc1))),'businessGroup':_0x4ebb7e[_0x31a923(0x95)](_0x31a923(0xaa)),'expectBusinessGroup':_0x3ba025===undefined||_0x3ba025===''?undefined:_0x3ba025};}function validateInput(_0xcf4c79){const _0x58e107=a58_0x3fa0e3;if(!trim(_0xcf4c79[_0x58e107(0xc1)]))throw CliErrors[_0x58e107(0xcb)](_0x58e107(0x8c));if(_0xcf4c79[_0x58e107(0x86)]===undefined)throw CliErrors[_0x58e107(0xcb)](_0x58e107(0x82));if(!trim(_0xcf4c79[_0x58e107(0x86)]))throw CliErrors[_0x58e107(0xcb)](_0x58e107(0x93));}function assertBusinessGroupUpdateSupported(_0x451dd0,_0x55d872){const _0x53c329=a58_0x3fa0e3;if(_0x451dd0[_0x53c329(0xbd)]==='DB_TABLE'&&!_0x55d872)throw CliErrors[_0x53c329(0xcb)](_0x53c329(0xb9));}function resolveBusinessGroupDataset(_0x27c02b,_0x14a76f){const _0x516a63=a58_0x3fa0e3,_0x19e819=asPlainObject(_0x27c02b[_0x516a63(0xb1)]),_0x51f41d=asPlainObject(_0x27c02b[_0x516a63(0xc8)]),_0x243c85=resolveSourceType(_0x27c02b,_0x19e819,_0x51f41d),_0x38d953=firstString(_0x27c02b[_0x516a63(0x97)],_0x27c02b['code'],_0x19e819[_0x516a63(0xc4)],_0x14a76f)||_0x14a76f;return{'id':firstNumber(_0x27c02b[_0x516a63(0xb5)],_0x27c02b['id'],_0x19e819['datasetId'])??firstString(_0x27c02b[_0x516a63(0xb5)],_0x27c02b['id'],_0x19e819['datasetId'])??null,'code':_0x38d953,'name':firstString(_0x27c02b[_0x516a63(0xc7)],_0x19e819['datasetName'],_0x19e819['name'])||null,'sourceType':_0x243c85,'dbTableSelector':_0x243c85===_0x516a63(0x9e)?{'dbLinkId':firstNumber(_0x51f41d[_0x516a63(0xbb)]),'tableName':firstString(_0x51f41d[_0x516a63(0x8f)])||null}:null};}function resolveSourceType(_0x27f39a,_0x2f5455,_0x15b47d){const _0x2790a8=a58_0x3fa0e3,_0x3e10f6=firstString(_0x27f39a['source'],_0x27f39a[_0x2790a8(0xbd)],_0x2f5455[_0x2790a8(0xa6)],_0x2f5455[_0x2790a8(0xbd)])?.['trim']()[_0x2790a8(0xa8)]();if(_0x3e10f6===_0x2790a8(0x9e)||_0x3e10f6===_0x2790a8(0xc5))return _0x3e10f6;if(Object['keys'](_0x15b47d)['length']>0x0)return _0x2790a8(0x9e);throw CliErrors[_0x2790a8(0xcb)](_0x2790a8(0xb4));}function a58_0xe106(_0x40575f,_0x250ab3){_0x40575f=_0x40575f-0x82;const _0x23143c=a58_0x2314();let _0xe1060c=_0x23143c[_0x40575f];return _0xe1060c;}function loadCurrentBusinessGroup(_0x1fc675,_0x4b2b5e){const _0x28f0a6=a58_0x3fa0e3,_0x46ff85=readBusinessGroupFromDatasetDetail(_0x1fc675,_0x4b2b5e['sourceType']);if(_0x46ff85[_0x28f0a6(0xa0)])return normalizeBusinessGroup(_0x46ff85[_0x28f0a6(0x91)]);return'';}function readBusinessGroupFromDatasetDetail(_0x434077,_0x969a02){const _0x311496=a58_0x3fa0e3,_0x2e890c=asPlainObject(_0x434077['dataset']),_0x2ac8df=firstPresent(_0x434077[_0x311496(0x86)]);if(_0x2ac8df[_0x311496(0xa0)])return _0x2ac8df;const _0xe2ebdb=firstPresent(_0x2e890c['businessGroup']);if(_0xe2ebdb['found'])return _0xe2ebdb;if(_0x969a02===_0x311496(0x9e))return{'found':![]};const _0x4b0b02=readBusinessGroupFromExtend(_0x434077[_0x311496(0xba)]);if(_0x4b0b02['found'])return _0x4b0b02;return readBusinessGroupFromExtend(_0x2e890c['extend']);}function readBusinessGroupFromExtend(_0x4e4f48){const _0x4cddcf=a58_0x3fa0e3;if(_0x4e4f48===undefined||_0x4e4f48===null||_0x4e4f48==='')return{'found':![]};if(typeof _0x4e4f48===_0x4cddcf(0xaf))try{const _0x581a20=JSON[_0x4cddcf(0xcd)](_0x4e4f48);return readBusinessGroupFromExtend(_0x581a20);}catch{return{'found':![]};}const _0x3a9381=asPlainObject(_0x4e4f48);if(Object[_0x4cddcf(0xb2)]['hasOwnProperty'][_0x4cddcf(0xcf)](_0x3a9381,'businessGroup'))return{'found':!![],'value':_0x3a9381[_0x4cddcf(0x86)]};return{'found':![]};}function firstPresent(..._0x34c843){for(const _0x3c7605 of _0x34c843){if(_0x3c7605!==undefined&&_0x3c7605!==null)return{'found':!![],'value':_0x3c7605};}return{'found':![]};}function assertExpectedBusinessGroup(_0x4b4b3c,_0xc2e317){const _0x4f3825=a58_0x3fa0e3;if(_0xc2e317===undefined)return;const _0x1fb836=normalizeBusinessGroupArgument(_0xc2e317);if(_0x4b4b3c!==_0x1fb836)throw CliErrors[_0x4f3825(0xcb)](_0x4f3825(0xac),'Expected\x20'+JSON[_0x4f3825(0x8a)](_0x1fb836)+_0x4f3825(0xa4)+JSON['stringify'](_0x4b4b3c));}function buildBackendPlan(_0x265c9a,_0x3e1628,_0x432f5d){const _0x2481c9=a58_0x3fa0e3;if(_0x3e1628[_0x2481c9(0xbd)]===_0x2481c9(0x9e)){if(!_0x3e1628[_0x2481c9(0x8d)]||_0x3e1628[_0x2481c9(0x8d)][_0x2481c9(0xb6)]===null||!_0x3e1628[_0x2481c9(0x8d)][_0x2481c9(0x8f)])throw CliErrors[_0x2481c9(0xcb)](_0x2481c9(0xce),_0x2481c9(0xbe));return{'kind':_0x2481c9(0x9a),'method':_0x2481c9(0xa7),'path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x3e1628[_0x2481c9(0x8d)][_0x2481c9(0xb6)],'tableName':_0x3e1628[_0x2481c9(0x8d)][_0x2481c9(0x8f)],'businessGroup':_0x432f5d}};}return{'kind':'metadata','method':_0x2481c9(0xa7),'path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x265c9a,'datasetCode':_0x3e1628[_0x2481c9(0xc1)],'businessGroup':_0x432f5d}};}function normalizeBusinessGroup(_0x5a5450){if(_0x5a5450===undefined||_0x5a5450===null)return'';return String(_0x5a5450)['trim']();}function normalizeBusinessGroupArgument(_0x299f13){const _0x419ba9=normalizeBusinessGroup(_0x299f13);return _0x419ba9===UNGROUPED_BUSINESS_GROUP?'':_0x419ba9;}function displayBusinessGroup(_0x2298d6){return _0x2298d6||UNGROUPED_BUSINESS_GROUP;}function asPlainObject(_0x380258){const _0x3be073=a58_0x3fa0e3;if(!_0x380258||typeof _0x380258!=='object'||Array[_0x3be073(0x90)](_0x380258))return{};return _0x380258;}function firstString(..._0x5075e4){const _0x282d24=a58_0x3fa0e3;for(const _0x9fd15f of _0x5075e4){if(typeof _0x9fd15f===_0x282d24(0xaf)&&_0x9fd15f[_0x282d24(0xc3)]())return _0x9fd15f[_0x282d24(0xc3)]();if(typeof _0x9fd15f===_0x282d24(0x88)&&Number[_0x282d24(0xa1)](_0x9fd15f))return String(_0x9fd15f);}return undefined;}function firstNumber(..._0x3c45d2){const _0x2acd57=a58_0x3fa0e3;for(const _0x3f87a1 of _0x3c45d2){if(typeof _0x3f87a1===_0x2acd57(0x88)&&Number[_0x2acd57(0xa1)](_0x3f87a1))return _0x3f87a1;if(typeof _0x3f87a1===_0x2acd57(0xaf)&&_0x3f87a1[_0x2acd57(0xc3)]()&&Number[_0x2acd57(0xa1)](Number(_0x3f87a1)))return Number(_0x3f87a1);}return null;}function trim(_0x22da97){const _0x1c55d7=a58_0x3fa0e3;return String(_0x22da97||'')[_0x1c55d7(0xc3)]();}
|
|
1
|
+
const a58_0x2eb086=a58_0x31ed;(function(_0x4b0c19,_0x4e5d0f){const _0x48e5d=a58_0x31ed,_0x356180=_0x4b0c19();while(!![]){try{const _0x8a2b69=-parseInt(_0x48e5d(0x126))/0x1+-parseInt(_0x48e5d(0x128))/0x2*(-parseInt(_0x48e5d(0x138))/0x3)+parseInt(_0x48e5d(0x12b))/0x4+-parseInt(_0x48e5d(0x11f))/0x5+-parseInt(_0x48e5d(0x13b))/0x6+-parseInt(_0x48e5d(0x107))/0x7+parseInt(_0x48e5d(0x103))/0x8;if(_0x8a2b69===_0x4e5d0f)break;else _0x356180['push'](_0x356180['shift']());}catch(_0x25ad09){_0x356180['push'](_0x356180['shift']());}}}(a58_0x57d7,0xbd1ac));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_0x2eb086(0x12a),METADATA_BACKEND_PATH=a58_0x2eb086(0x141),UNGROUPED_BUSINESS_GROUP=a58_0x2eb086(0x127);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x430fc6,input:_0x384223,dryRun:_0xeac25}){const _0x3de637=a58_0x2eb086;validateInput(_0x384223);const _0x188f99=normalizeBusinessGroupArgument(_0x384223[_0x3de637(0x11c)]),_0xcd2eee=await getDatasetDetail(_0x384223[_0x3de637(0x142)]),_0x13d60=resolveBusinessGroupDataset(_0xcd2eee,_0x384223['code']);assertBusinessGroupUpdateSupported(_0x13d60,_0x188f99);const _0x34ab94=loadCurrentBusinessGroup(_0xcd2eee,_0x13d60);assertExpectedBusinessGroup(_0x34ab94,_0x384223[_0x3de637(0x10f)]);const _0x21c275=buildBackendPlan(_0x430fc6,_0x13d60,_0x188f99),_0x2898d0=_0x34ab94!==_0x188f99;let _0x37dcfb;if(_0x2898d0&&!_0xeac25){_0x21c275['kind']==='db-table'?await updateDbTableBusinessGroup(_0x21c275[_0x3de637(0x129)]):await updateErBusinessGroup(_0x21c275['payload']);const _0x2a3ce8=await getDatasetDetail(_0x13d60['code']),_0x36cf21=resolveBusinessGroupDataset(_0x2a3ce8,_0x13d60[_0x3de637(0x142)]),_0x32f366=loadCurrentBusinessGroup(_0x2a3ce8,_0x36cf21);if(_0x32f366!==_0x188f99)throw CliErrors[_0x3de637(0x139)](_0x3de637(0x13e),'Expected\x20'+JSON['stringify'](displayBusinessGroup(_0x188f99))+_0x3de637(0x13a)+JSON[_0x3de637(0x104)](displayBusinessGroup(_0x32f366))+'.');_0x37dcfb={'verified':!![],'status':_0x3de637(0x140),'afterReadback':{'businessGroup':displayBusinessGroup(_0x32f366)}};}else!_0x2898d0&&(_0x37dcfb={'verified':!![],'status':_0x3de637(0x133),'afterReadback':{'businessGroup':displayBusinessGroup(_0x34ab94)}});const _0x5b1dd1={'operation':_0x3de637(0x115),'appCode':_0x430fc6,'selector':{'code':_0x13d60[_0x3de637(0x142)]},'dataset':{'id':_0x13d60['id'],'code':_0x13d60[_0x3de637(0x142)],'name':_0x13d60[_0x3de637(0x11b)],'sourceType':_0x13d60[_0x3de637(0xff)]},'before':{'businessGroup':displayBusinessGroup(_0x34ab94)},'after':{'businessGroup':displayBusinessGroup(_0x188f99)},'changed':_0x2898d0,'dryRun':_0xeac25,'submitted':_0x2898d0&&!_0xeac25,'backend':{'method':_0x21c275['method'],'path':_0x21c275['path'],'payload':_0x21c275[_0x3de637(0x129)]},..._0x37dcfb?{'verification':_0x37dcfb}:{},'warnings':[]};return{'ok':!![],'data':_0x5b1dd1,'message':_0x2898d0?_0xeac25?_0x3de637(0x118)+_0x13d60[_0x3de637(0x142)]:_0x3de637(0x137)+_0x13d60[_0x3de637(0x142)]:'No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20'+_0x13d60[_0x3de637(0x142)]};}export const datasetBusinessGroupUpdate={'service':a58_0x2eb086(0x132),'command':a58_0x2eb086(0x13c),'description':a58_0x2eb086(0x10c),'risk':a58_0x2eb086(0x114),'flags':[CODE_FLAG,{'name':a58_0x2eb086(0x13d),'type':a58_0x2eb086(0x11e),'required':!![],'description':a58_0x2eb086(0x12d)},{'name':a58_0x2eb086(0x12f),'type':a58_0x2eb086(0x11e),'required':![],'description':a58_0x2eb086(0x105)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x11a816){validateInput(readBusinessGroupUpdateInput(_0x11a816));},async 'dryRun'(_0x456ff8){const _0x39de06=a58_0x2eb086,_0x47f975=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x456ff8[_0x39de06(0x10d)],'input':readBusinessGroupUpdateInput(_0x456ff8),'dryRun':!![]});return{'method':_0x47f975[_0x39de06(0x135)][_0x39de06(0x136)]['method'],'url':_0x47f975[_0x39de06(0x135)]['backend']['path'],'body':_0x47f975[_0x39de06(0x135)][_0x39de06(0x136)][_0x39de06(0x129)],'description':_0x47f975[_0x39de06(0x10e)],..._0x47f975[_0x39de06(0x135)]};},async 'execute'(_0x1586cf){const _0x46716f=a58_0x2eb086;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x1586cf[_0x46716f(0x10d)],'input':readBusinessGroupUpdateInput(_0x1586cf),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x587e2e){const _0x438aa3=a58_0x2eb086,_0x4e3a8c=_0x587e2e[_0x438aa3(0x101)](_0x438aa3(0x12f));return{'code':trim(_0x587e2e[_0x438aa3(0x101)](_0x438aa3(0x142))),'businessGroup':_0x587e2e[_0x438aa3(0x101)](_0x438aa3(0x13d)),'expectBusinessGroup':_0x4e3a8c===undefined||_0x4e3a8c===''?undefined:_0x4e3a8c};}function validateInput(_0x5333ee){const _0x34d154=a58_0x2eb086;if(!trim(_0x5333ee[_0x34d154(0x142)]))throw CliErrors['validation'](_0x34d154(0x125));if(_0x5333ee[_0x34d154(0x11c)]===undefined)throw CliErrors[_0x34d154(0x120)](_0x34d154(0x131));if(!trim(_0x5333ee[_0x34d154(0x11c)]))throw CliErrors[_0x34d154(0x120)]('--business-group\x20must\x20not\x20be\x20blank');}function a58_0x57d7(){const _0x5a4d05=['dbTableSelector','dbLinkId','datasetId','Expectation\x20mismatch\x20at\x20businessGroup','sourceType','dbtableConfig','str','datasetCode','4261104PKLaGs','stringify','Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing','dbId','6227970wXNEPQ','call','prototype','modelCode','extend','Update\x20business\x20scenario\x20group','appCode','message','expectBusinessGroup','toUpperCase','source','Expected\x20','DB_TABLE','write','update','parse','tableName','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.','db-table','name','businessGroup','trim','string','3590645odTTqx','validation','hasOwnProperty','isFinite','isArray','METADATA','--code\x20is\x20required','520860KgxzOc','ungrouped','2136938qHSQIh','payload','/smartapi/dblink/updateTableBusinessGroup','6079888PNQwNq','datasetName','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it','number','expect-business-group','found','--business-group\x20is\x20required','dataset','unchanged','POST','data','backend','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','3nsMeuR','apiError',',\x20actual\x20','1306848FRPhTb','business-group-update','business-group','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','length','matched','/smartapi/question/er-config/business-group/edit','code'];a58_0x57d7=function(){return _0x5a4d05;};return a58_0x57d7();}function assertBusinessGroupUpdateSupported(_0x1815d3,_0x7171b4){const _0x486d63=a58_0x2eb086;if(_0x1815d3[_0x486d63(0xff)]===_0x486d63(0x113)&&!_0x7171b4)throw CliErrors[_0x486d63(0x120)]('Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.');}function resolveBusinessGroupDataset(_0x7a5481,_0x5075af){const _0x26b1b5=a58_0x2eb086,_0x3af2da=asPlainObject(_0x7a5481[_0x26b1b5(0x132)]),_0x4e3cb5=asPlainObject(_0x7a5481[_0x26b1b5(0x100)]),_0x57c512=resolveSourceType(_0x7a5481,_0x3af2da,_0x4e3cb5),_0x3f4c50=firstString(_0x7a5481[_0x26b1b5(0x10a)],_0x7a5481[_0x26b1b5(0x142)],_0x3af2da[_0x26b1b5(0x102)],_0x5075af)||_0x5075af;return{'id':firstNumber(_0x7a5481['modelId'],_0x7a5481['id'],_0x3af2da[_0x26b1b5(0x145)])??firstString(_0x7a5481['modelId'],_0x7a5481['id'],_0x3af2da[_0x26b1b5(0x145)])??null,'code':_0x3f4c50,'name':firstString(_0x7a5481[_0x26b1b5(0x11b)],_0x3af2da[_0x26b1b5(0x12c)],_0x3af2da[_0x26b1b5(0x11b)])||null,'sourceType':_0x57c512,'dbTableSelector':_0x57c512===_0x26b1b5(0x113)?{'dbLinkId':firstNumber(_0x4e3cb5[_0x26b1b5(0x106)]),'tableName':firstString(_0x4e3cb5['tableName'])||null}:null};}function resolveSourceType(_0x3c5b54,_0x5cb20e,_0x403211){const _0x4fda5e=a58_0x2eb086,_0x1df1e0=firstString(_0x3c5b54[_0x4fda5e(0x111)],_0x3c5b54[_0x4fda5e(0xff)],_0x5cb20e[_0x4fda5e(0x111)],_0x5cb20e['sourceType'])?.[_0x4fda5e(0x11d)]()[_0x4fda5e(0x110)]();if(_0x1df1e0===_0x4fda5e(0x113)||_0x1df1e0===_0x4fda5e(0x124))return _0x1df1e0;if(Object['keys'](_0x403211)[_0x4fda5e(0x13f)]>0x0)return'DB_TABLE';throw CliErrors['validation']('Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.');}function loadCurrentBusinessGroup(_0x5d7dba,_0x1765c8){const _0x46ab0a=a58_0x2eb086,_0x21785e=readBusinessGroupFromDatasetDetail(_0x5d7dba,_0x1765c8[_0x46ab0a(0xff)]);if(_0x21785e[_0x46ab0a(0x130)])return normalizeBusinessGroup(_0x21785e['value']);return'';}function readBusinessGroupFromDatasetDetail(_0xaec4b,_0x141076){const _0x3f962e=a58_0x2eb086,_0x1315bd=asPlainObject(_0xaec4b[_0x3f962e(0x132)]),_0x4453c0=firstPresent(_0xaec4b[_0x3f962e(0x11c)]);if(_0x4453c0['found'])return _0x4453c0;const _0x430b23=firstPresent(_0x1315bd['businessGroup']);if(_0x430b23['found'])return _0x430b23;if(_0x141076===_0x3f962e(0x113))return{'found':![]};const _0x137af4=readBusinessGroupFromExtend(_0xaec4b['extend']);if(_0x137af4[_0x3f962e(0x130)])return _0x137af4;return readBusinessGroupFromExtend(_0x1315bd[_0x3f962e(0x10b)]);}function readBusinessGroupFromExtend(_0x33d015){const _0x2bd914=a58_0x2eb086;if(_0x33d015===undefined||_0x33d015===null||_0x33d015==='')return{'found':![]};if(typeof _0x33d015===_0x2bd914(0x11e))try{const _0x4a418f=JSON[_0x2bd914(0x116)](_0x33d015);return readBusinessGroupFromExtend(_0x4a418f);}catch{return{'found':![]};}const _0x28f18e=asPlainObject(_0x33d015);if(Object[_0x2bd914(0x109)][_0x2bd914(0x121)][_0x2bd914(0x108)](_0x28f18e,'businessGroup'))return{'found':!![],'value':_0x28f18e['businessGroup']};return{'found':![]};}function firstPresent(..._0x261426){for(const _0x5eccfb of _0x261426){if(_0x5eccfb!==undefined&&_0x5eccfb!==null)return{'found':!![],'value':_0x5eccfb};}return{'found':![]};}function assertExpectedBusinessGroup(_0x54ed23,_0x8b46ba){const _0xf7b3fc=a58_0x2eb086;if(_0x8b46ba===undefined)return;const _0x4c840e=normalizeBusinessGroupArgument(_0x8b46ba);if(_0x54ed23!==_0x4c840e)throw CliErrors[_0xf7b3fc(0x120)](_0xf7b3fc(0xfe),_0xf7b3fc(0x112)+JSON[_0xf7b3fc(0x104)](_0x4c840e)+_0xf7b3fc(0x13a)+JSON[_0xf7b3fc(0x104)](_0x54ed23));}function buildBackendPlan(_0xd44350,_0x3c30d1,_0x40bc97){const _0x514064=a58_0x2eb086;if(_0x3c30d1[_0x514064(0xff)]==='DB_TABLE'){if(!_0x3c30d1[_0x514064(0x143)]||_0x3c30d1[_0x514064(0x143)]['dbLinkId']===null||!_0x3c30d1[_0x514064(0x143)][_0x514064(0x117)])throw CliErrors[_0x514064(0x120)]('DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.',_0x514064(0x119));return{'kind':_0x514064(0x11a),'method':_0x514064(0x134),'path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x3c30d1[_0x514064(0x143)][_0x514064(0x144)],'tableName':_0x3c30d1[_0x514064(0x143)]['tableName'],'businessGroup':_0x40bc97}};}return{'kind':'metadata','method':_0x514064(0x134),'path':METADATA_BACKEND_PATH,'payload':{'appCode':_0xd44350,'datasetCode':_0x3c30d1[_0x514064(0x142)],'businessGroup':_0x40bc97}};}function a58_0x31ed(_0x691bb1,_0x353d3a){_0x691bb1=_0x691bb1-0xfe;const _0x57d7d2=a58_0x57d7();let _0x31edb1=_0x57d7d2[_0x691bb1];return _0x31edb1;}function normalizeBusinessGroup(_0x19a5f7){if(_0x19a5f7===undefined||_0x19a5f7===null)return'';return String(_0x19a5f7)['trim']();}function normalizeBusinessGroupArgument(_0x5b2a0e){const _0x48ec22=normalizeBusinessGroup(_0x5b2a0e);return _0x48ec22===UNGROUPED_BUSINESS_GROUP?'':_0x48ec22;}function displayBusinessGroup(_0x5427b7){return _0x5427b7||UNGROUPED_BUSINESS_GROUP;}function asPlainObject(_0x40bb92){const _0x4ae787=a58_0x2eb086;if(!_0x40bb92||typeof _0x40bb92!=='object'||Array[_0x4ae787(0x123)](_0x40bb92))return{};return _0x40bb92;}function firstString(..._0x3ac27a){const _0x2f2d75=a58_0x2eb086;for(const _0x4b032b of _0x3ac27a){if(typeof _0x4b032b===_0x2f2d75(0x11e)&&_0x4b032b[_0x2f2d75(0x11d)]())return _0x4b032b['trim']();if(typeof _0x4b032b==='number'&&Number[_0x2f2d75(0x122)](_0x4b032b))return String(_0x4b032b);}return undefined;}function firstNumber(..._0xe26a9d){const _0x325de4=a58_0x2eb086;for(const _0xee2ef2 of _0xe26a9d){if(typeof _0xee2ef2===_0x325de4(0x12e)&&Number[_0x325de4(0x122)](_0xee2ef2))return _0xee2ef2;if(typeof _0xee2ef2===_0x325de4(0x11e)&&_0xee2ef2[_0x325de4(0x11d)]()&&Number[_0x325de4(0x122)](Number(_0xee2ef2)))return Number(_0xee2ef2);}return null;}function trim(_0x38e126){const _0x35e025=a58_0x2eb086;return String(_0x38e126||'')[_0x35e025(0x11d)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a59_0x4daacd=a59_0x3dae;(function(_0x2ef238,_0x2e96f6){const _0x4653d2=a59_0x3dae,_0x7bb6c9=_0x2ef238();while(!![]){try{const _0x1ee7dd=parseInt(_0x4653d2(0x198))/0x1+-parseInt(_0x4653d2(0x18d))/0x2+-parseInt(_0x4653d2(0x192))/0x3+-parseInt(_0x4653d2(0x19c))/0x4+-parseInt(_0x4653d2(0x19e))/0x5*(-parseInt(_0x4653d2(0x191))/0x6)+parseInt(_0x4653d2(0x195))/0x7+parseInt(_0x4653d2(0x19f))/0x8;if(_0x1ee7dd===_0x2e96f6)break;else _0x7bb6c9['push'](_0x7bb6c9['shift']());}catch(_0x95686e){_0x7bb6c9['push'](_0x7bb6c9['shift']());}}}(a59_0x5673,0x45831));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getErBusinessGroupSummary}from'../../core/api-client.js';function a59_0x3dae(_0x4f439e,_0x496dc9){_0x4f439e=_0x4f439e-0x18c;const _0x5673fb=a59_0x5673();let _0x3dae3a=_0x5673fb[_0x4f439e];return _0x3dae3a;}function a59_0x5673(){const _0x33391b=['trim','business-groups','4800VuXayy','125172LHZiQq','Found\x20','length','1388730rZvmXE','List\x20DB_TABLE\x20dataset\x20business\x20groups\x20for\x20a\x20database\x20connection;\x20does\x20not\x20include\x20METADATA','number','530122BoQLke','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','businessGroup','\x20business\x20group(s)\x20for\x20database\x20connection\x20','2133288uGIrdt','dbid','5JtmNhk','5151856wnntGd','num','1027054eKPZGB','ungrouped'];a59_0x5673=function(){return _0x33391b;};return a59_0x5673();}export const datasetBusinessGroups={'service':'dataset','command':a59_0x4daacd(0x190),'description':a59_0x4daacd(0x196),'risk':'read','flags':[{'name':'dbid','type':a59_0x4daacd(0x197),'required':!![],'description':a59_0x4daacd(0x199)},APPCODE_FLAG_OPTIONAL],async 'execute'(_0x6d515b){const _0x3a2790=a59_0x4daacd,_0x30ba37=_0x6d515b[_0x3a2790(0x18c)](_0x3a2790(0x19d)),_0x400453=await getErBusinessGroupSummary(_0x6d515b['appCode'],_0x30ba37),_0x3b2028=_0x400453['groups']['map'](_0x16a80f=>({..._0x16a80f,'businessGroup':_0x16a80f[_0x3a2790(0x19a)][_0x3a2790(0x18f)]()||_0x3a2790(0x18e)}));return{'ok':!![],'data':{..._0x400453,'groups':_0x3b2028,'scope':'DB_TABLE'},'message':_0x3a2790(0x193)+_0x3b2028[_0x3a2790(0x194)]+_0x3a2790(0x19b)+_0x30ba37};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a60_0xe453f5=a60_0x4f33;(function(_0x4caa12,_0x2afc60){const _0x55402a=a60_0x4f33,_0x1cea79=_0x4caa12();while(!![]){try{const _0x3ed57a=parseInt(_0x55402a(0x18e))/0x1*(parseInt(_0x55402a(0x190))/0x2)+-parseInt(_0x55402a(0x195))/0x3*(-parseInt(_0x55402a(0x17a))/0x4)+-parseInt(_0x55402a(0x188))/0x5*(-parseInt(_0x55402a(0x186))/0x6)+-parseInt(_0x55402a(0x196))/0x7+parseInt(_0x55402a(0x185))/0x8*(-parseInt(_0x55402a(0x183))/0x9)+-parseInt(_0x55402a(0x17f))/0xa+parseInt(_0x55402a(0x177))/0xb;if(_0x3ed57a===_0x2afc60)break;else _0x1cea79['push'](_0x1cea79['shift']());}catch(_0x35b2a9){_0x1cea79['push'](_0x1cea79['shift']());}}}(a60_0x3bd4,0xc0a86));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':'lovrabet','filter':a60_0xe453f5(0x191),'getOne':a60_0xe453f5(0x18c)};export const RUNTIME_DATA_ACCESS_SUMMARY=a60_0xe453f5(0x18b);function valueToString(_0x45e3e3){return _0x45e3e3==null?'':String(_0x45e3e3)['trim']();}function a60_0x3bd4(){const _0x1fc6ab=['914488sasomw','getOne','code','modelCode','dbtable','434000IxLBAE','dataset','METADATA','dbId','9oGVVUM','join','3048328zROZHs','3234630BvPKhn','SQL\x20schema\x20validation','5kPadUg','validation','name','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','filter','26qsFkyj','datasetCode','41926hXCwgf','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','\x20is\x20','unknown','tableName','3jphbgg','9045148fynhiR','To\x20inspect\x20real\x20runtime\x20rows,\x20switch\x20to\x20lovrabet\x20CLI:\x20','13122626LVazyd','sourceType','The\x20current\x20dataset\x20\x22'];a60_0x3bd4=function(){return _0x1fc6ab;};return a60_0x3bd4();}function getDatasetCode(_0x41ab8a){const _0x306b85=a60_0xe453f5;return valueToString(_0x41ab8a[_0x306b85(0x17c)]??_0x41ab8a[_0x306b85(0x17d)]??_0x41ab8a[_0x306b85(0x180)]?.[_0x306b85(0x18f)]);}function getDatasetName(_0x58aec8){const _0x1c79b3=a60_0xe453f5;return valueToString(_0x58aec8[_0x1c79b3(0x18a)]??_0x58aec8[_0x1c79b3(0x180)]?.['datasetName'])||_0x1c79b3(0x193);}function getDatasetSource(_0x4ef55e){const _0x34787=a60_0xe453f5;return valueToString(_0x4ef55e['source']??_0x4ef55e[_0x34787(0x180)]?.[_0x34787(0x178)])['toUpperCase']();}function getDbtableConfig(_0x37bf46){const _0x2442b9=a60_0xe453f5,_0x13a8af=_0x37bf46['dbtableConfig']??_0x37bf46[_0x2442b9(0x17e)];return _0x13a8af&&typeof _0x13a8af==='object'?_0x13a8af:{};}export function isDbTableBackedDataset(_0x1c40da){const _0x39d286=a60_0xe453f5,_0x1308a9=getDatasetSource(_0x1c40da);if(_0x1308a9===_0x39d286(0x181))return![];const _0x38cef4=getDbtableConfig(_0x1c40da),_0x32b67=_0x38cef4[_0x39d286(0x182)]??_0x38cef4['id'],_0x40eaa5=valueToString(_0x38cef4[_0x39d286(0x194)]??_0x1c40da[_0x39d286(0x194)]??_0x1c40da[_0x39d286(0x180)]?.[_0x39d286(0x194)]);return _0x32b67!==undefined&&_0x32b67!==null&&_0x40eaa5['length']>0x0;}export function filterDbTableBackedDatasets(_0x11c745){const _0x3e85b5=a60_0xe453f5;return _0x11c745[_0x3e85b5(0x18d)](_0x534c39=>isDbTableBackedDataset(_0x534c39));}export function buildDbTableBackedRequirementMessage(_0x59dbdd,_0xf51359=a60_0xe453f5(0x187)){const _0x52e24f=a60_0xe453f5,_0x1e562d=getDatasetSource(_0x59dbdd)||'UNKNOWN',_0x5e6739=getDatasetName(_0x59dbdd),_0x3c1f52=getDatasetCode(_0x59dbdd),_0x188a11=_0x3c1f52?'\x20('+_0x3c1f52+')':'';return[_0x52e24f(0x179)+_0x5e6739+'\x22'+_0x188a11+_0x52e24f(0x192)+_0x1e562d+'\x20and\x20has\x20no\x20DB_TABLE\x20data-source\x20context\x20for\x20'+_0xf51359+'.','Reason:\x20schema\x20introspection\x20and\x20custom\x20SQL\x20require\x20source=DB_TABLE,\x20dbtableConfig.dbId,\x20dbtableConfig.tableName,\x20and\x20a\x20database\x20connection\x20context.','Upgrade\x20or\x20migrate\x20this\x20dataset\x20to\x20a\x20DB_TABLE\x20dataset,\x20then\x20continue\x20with\x20the\x20new\x20dataset\x20code.',_0x52e24f(0x197)+RUNTIME_DATA_ACCESS_COMMANDS[_0x52e24f(0x18d)]+';\x20'+RUNTIME_DATA_ACCESS_COMMANDS[_0x52e24f(0x17b)]+'.'][_0x52e24f(0x184)]('\x20');}function a60_0x4f33(_0x3c27e9,_0x5cb352){_0x3c27e9=_0x3c27e9-0x177;const _0x3bd429=a60_0x3bd4();let _0x4f335c=_0x3bd429[_0x3c27e9];return _0x4f335c;}export function assertDatasetIsDbTableBacked(_0x2acab8,_0x2e6e6b){const _0xbc7ca4=a60_0xe453f5;if(!isDbTableBackedDataset(_0x2acab8))throw CliErrors[_0xbc7ca4(0x189)](buildDbTableBackedRequirementMessage(_0x2acab8,_0x2e6e6b));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a61_0x4d10b4=a61_0x37c2;(function(_0x3bb3d6,_0x8be8ee){const _0xff76d6=a61_0x37c2,_0x1db4c9=_0x3bb3d6();while(!![]){try{const _0x5b903e=-parseInt(_0xff76d6(0x1ca))/0x1+-parseInt(_0xff76d6(0x1ec))/0x2*(parseInt(_0xff76d6(0x201))/0x3)+-parseInt(_0xff76d6(0x200))/0x4*(-parseInt(_0xff76d6(0x1f5))/0x5)+-parseInt(_0xff76d6(0x1c0))/0x6*(parseInt(_0xff76d6(0x1e7))/0x7)+parseInt(_0xff76d6(0x1ef))/0x8+parseInt(_0xff76d6(0x1ea))/0x9*(parseInt(_0xff76d6(0x1ff))/0xa)+parseInt(_0xff76d6(0x1fe))/0xb*(parseInt(_0xff76d6(0x1cb))/0xc);if(_0x5b903e===_0x8be8ee)break;else _0x1db4c9['push'](_0x1db4c9['shift']());}catch(_0x526e02){_0x1db4c9['push'](_0x1db4c9['shift']());}}}(a61_0x378a,0x931d2));function a61_0x378a(){const _0x422268=['875675KXaiWV','13166136GLFODY','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','code','expected-count','id=','No\x20undeleted\x20dataset\x20found\x20for\x20','map','dbid','isInteger','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','relatedPageInfoList','dbid=','boolean','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','dbName','name','title','dbId','Also\x20delete\x20related\x20pages\x20and\x20menus;\x20requires\x20explicit\x20--confirm','num','cascade','\x20--appcode\x20','str','source','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','Would\x20delete\x20','dbtableConfig','type','1098937QlIaqc','object','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','2633139yUsKTV','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','26PNLaaq','length','confirm','5510336cOBjRX','filter','appCode','rabetbase\x20page\x20restore\x20--id\x20','bool','Would\x20safely\x20delete\x20','25rrwRMp','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','delete','dataset','validation','Required\x20to\x20execute\x20dataset\x20deletion','message','\x20failed','isArray','11eWtPDO','30SeOiEd','638596TmKviz','240399WsnLpZ','POST','/smartapi/dataset/delete?cascade=','relatedPages','36MmgqlI','add','number','push','Deleted\x20','Dataset\x20id','high-risk-write','Matched\x20','\x20dataset(s)','\x20dataset(s);\x20'];a61_0x378a=function(){return _0x422268;};return a61_0x378a();}import{deleteDataset,getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a61_0x37c2(_0x680cc1,_0x1254da){_0x680cc1=_0x680cc1-0x1be;const _0x378a18=a61_0x378a();let _0x37c2e6=_0x378a18[_0x680cc1];return _0x37c2e6;}import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DATASET_ID_FLAG={'name':'id','type':a61_0x4d10b4(0x1c2),'description':a61_0x4d10b4(0x1c5)},DBID_FLAG={'name':a61_0x4d10b4(0x1d2),'type':a61_0x4d10b4(0x1c2),'description':a61_0x4d10b4(0x1d8)},CONFIRM_FLAG={'name':a61_0x4d10b4(0x1ee),'type':'boolean','description':a61_0x4d10b4(0x1fa)},CASCADE_FLAG={'name':a61_0x4d10b4(0x1df),'type':a61_0x4d10b4(0x1d7),'description':a61_0x4d10b4(0x1dd)},EXPECTED_COUNT_FLAG={'name':a61_0x4d10b4(0x1ce),'type':'number','description':a61_0x4d10b4(0x1eb)};export const datasetDelete={'service':a61_0x4d10b4(0x1f8),'command':a61_0x4d10b4(0x1f7),'description':'Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','risk':a61_0x4d10b4(0x1c6),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CASCADE_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3ae92f){const _0x46759a=a61_0x4d10b4,_0x3aa58b=_0x3ae92f[_0x46759a(0x1de)]('id'),_0x947297=_0x3ae92f[_0x46759a(0x1e1)]('code'),_0x430479=_0x3ae92f[_0x46759a(0x1de)](_0x46759a(0x1d2)),_0x49b519=[_0x3aa58b>0x0,Boolean(_0x947297),_0x430479>0x0][_0x46759a(0x1f0)](Boolean);if(_0x49b519[_0x46759a(0x1ed)]===0x0)throw CliErrors['validation'](_0x46759a(0x1d4));if(_0x49b519['length']>0x1)throw CliErrors[_0x46759a(0x1f9)](_0x46759a(0x1e3));},async 'dryRun'(_0x2c4442){const _0x491417=a61_0x4d10b4,_0x114d93=await resolveTargets(_0x2c4442),_0x4ff7c4=_0x2c4442['bool'](_0x491417(0x1df));return{'method':_0x491417(0x202),'url':_0x491417(0x1be)+(_0x4ff7c4?'true':'false'),'body':{'count':_0x114d93['length'],'cascade':_0x4ff7c4,'datasets':_0x114d93},'description':_0x4ff7c4?_0x491417(0x1e4)+_0x114d93['length']+'\x20dataset(s)\x20and\x20their\x20listed\x20related\x20pages/menus.\x20Restore\x20each\x20Dataset\x20first,\x20then\x20restore\x20pages\x20explicitly\x20when\x20needed.':_0x491417(0x1f4)+_0x114d93['length']+'\x20dataset(s)\x20without\x20cascading\x20to\x20pages.\x20The\x20server\x20blocks\x20a\x20Dataset\x20that\x20still\x20has\x20related\x20pages.'};},async 'execute'(_0x50cc34){const _0x4abe8a=a61_0x4d10b4;if(!_0x50cc34[_0x4abe8a(0x1f3)]('confirm'))throw CliErrors[_0x4abe8a(0x1f9)](_0x4abe8a(0x1e9),_0x4abe8a(0x1cc));const _0x187f15=await resolveTargets(_0x50cc34),_0x2e450a=_0x50cc34[_0x4abe8a(0x1f3)](_0x4abe8a(0x1df)),_0x32e6bc=[],_0x256fef=[];for(const _0x1394a7 of _0x187f15){try{await deleteDataset(_0x1394a7['id'],_0x2e450a),_0x32e6bc['push'](_0x1394a7);}catch(_0xa38969){_0x256fef[_0x4abe8a(0x1c3)]({..._0x1394a7,'error':_0xa38969 instanceof Error?_0xa38969[_0x4abe8a(0x1fb)]:String(_0xa38969)});}}if(_0x256fef['length']>0x0){const _0x56995d=buildPageRestoreCommands(_0x50cc34[_0x4abe8a(0x1f1)],_0x2e450a?_0x32e6bc:[]);return{'ok':![],'data':{'requested':_0x187f15[_0x4abe8a(0x1ed)],'cascade':_0x2e450a,'deletedCount':_0x32e6bc[_0x4abe8a(0x1ed)],'failedCount':_0x256fef['length'],'deleted':_0x32e6bc,'failed':_0x256fef,'pageRestoreCommands':_0x56995d},'message':_0x4abe8a(0x1c4)+_0x32e6bc['length']+'/'+_0x187f15[_0x4abe8a(0x1ed)]+_0x4abe8a(0x1c9)+_0x256fef[_0x4abe8a(0x1ed)]+_0x4abe8a(0x1fc)};}return{'ok':!![],'data':{'requested':_0x187f15[_0x4abe8a(0x1ed)],'cascade':_0x2e450a,'deletedCount':_0x32e6bc[_0x4abe8a(0x1ed)],'deleted':_0x32e6bc,'pageRestoreCommands':buildPageRestoreCommands(_0x50cc34[_0x4abe8a(0x1f1)],_0x2e450a?_0x32e6bc:[])},'message':'Deleted\x20'+_0x32e6bc[_0x4abe8a(0x1ed)]+_0x4abe8a(0x1c8)};}};async function resolveTargets(_0xabcf6e){const _0x37b8bc=a61_0x4d10b4,_0x594997=_0xabcf6e[_0x37b8bc(0x1de)]('id'),_0x3a7c65=_0xabcf6e[_0x37b8bc(0x1e1)](_0x37b8bc(0x1cd)),_0xe3fc1e=_0xabcf6e[_0x37b8bc(0x1de)](_0x37b8bc(0x1d2));let _0x545506;_0x3a7c65?(_0x545506=await listDatasets(_0xabcf6e[_0x37b8bc(0x1f1)],{'code':_0x3a7c65}),_0x545506=_0x545506[_0x37b8bc(0x1f0)](_0x4e7dff=>_0x4e7dff[_0x37b8bc(0x1cd)]===_0x3a7c65)):(_0x545506=await listDatasets(_0xabcf6e[_0x37b8bc(0x1f1)]),_0x594997>0x0&&(_0x545506=_0x545506[_0x37b8bc(0x1f0)](_0x3822f8=>_0x3822f8['id']===_0x594997)),_0xe3fc1e>0x0&&(_0x545506=_0x545506[_0x37b8bc(0x1f0)](_0x499257=>_0x499257[_0x37b8bc(0x1e5)]?.[_0x37b8bc(0x1dc)]===_0xe3fc1e)));const _0x222167=[];for(const _0x4e46dc of _0x545506){const _0x3f9c47=await getDatasetDetail(_0x4e46dc['code']),_0x2130f0=Array[_0x37b8bc(0x1fd)](_0x3f9c47[_0x37b8bc(0x1d5)])?_0x3f9c47['relatedPageInfoList'][_0x37b8bc(0x1f0)](_0x549c95=>_0x549c95!=null&&typeof _0x549c95==='object'&&_0x549c95['deleted']!==!![]):[];_0x222167[_0x37b8bc(0x1c3)](normalizeTarget(_0x4e46dc,_0x2130f0));}if(_0x222167[_0x37b8bc(0x1ed)]===0x0){const _0x100234=_0x3a7c65||(_0x594997>0x0?_0x37b8bc(0x1cf)+_0x594997:_0x37b8bc(0x1d6)+_0xe3fc1e);throw CliErrors['validation'](_0x37b8bc(0x1d0)+_0x100234+'.');}const _0x18f554=_0xabcf6e[_0x37b8bc(0x1de)](_0x37b8bc(0x1ce));if(_0x18f554>0x0&&_0x222167['length']!==_0x18f554)throw CliErrors['validation'](_0x37b8bc(0x1c7)+_0x222167[_0x37b8bc(0x1ed)]+_0x37b8bc(0x1f6)+_0x18f554+'.');return _0x222167;}function normalizeTarget(_0x5d3af6,_0x5d3102){const _0x1e5123=a61_0x4d10b4,_0x155430=_0x5d3af6['dbtableConfig']??{},_0x483231=_0x5d3102[_0x1e5123(0x1d1)](_0x4fd097=>{const _0x5a7a51=_0x1e5123;if(_0x4fd097==null||typeof _0x4fd097!==_0x5a7a51(0x1e8))return null;const _0x54aba5=_0x4fd097,_0x24e18a=Number(_0x54aba5['id']);if(!Number[_0x5a7a51(0x1d3)](_0x24e18a)||_0x24e18a<=0x0)return null;const _0x78d7b9=_0x54aba5[_0x5a7a51(0x1db)]??_0x54aba5[_0x5a7a51(0x1da)];return{'id':_0x24e18a,..._0x78d7b9?{'name':String(_0x78d7b9)}:{},..._0x54aba5[_0x5a7a51(0x1e6)]?{'type':String(_0x54aba5[_0x5a7a51(0x1e6)])}:{}};})[_0x1e5123(0x1f0)](_0x2da2de=>_0x2da2de!==null);return{'id':_0x5d3af6['id'],'code':_0x5d3af6[_0x1e5123(0x1cd)],'name':_0x5d3af6[_0x1e5123(0x1da)],'description':_0x5d3af6['description'],'source':_0x5d3af6[_0x1e5123(0x1e2)],'dbId':_0x155430['dbId'],'dbName':_0x155430[_0x1e5123(0x1d9)],'tableName':_0x155430['tableName'],'relatedPageCount':_0x483231[_0x1e5123(0x1ed)],'relatedPages':_0x483231};}function buildPageRestoreCommands(_0x2790c9,_0x2e990c){const _0x39aa54=a61_0x4d10b4,_0x450d4f=new Set();for(const _0x53c948 of _0x2e990c){for(const _0x31db22 of _0x53c948[_0x39aa54(0x1bf)])_0x450d4f[_0x39aa54(0x1c1)](_0x31db22['id']);}return[..._0x450d4f][_0x39aa54(0x1d1)](_0xbc6a22=>_0x39aa54(0x1f2)+_0xbc6a22+_0x39aa54(0x1e0)+_0x2790c9);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a62_0x47b372=a62_0x51cc;function a62_0x3a82(){const _0xf1acc6=['1113665zSaLwO','197256rNcpvt','fields','validateRules','modelCode','entries','dbName','updateTimeField','modifierIdField','logicField','formatRules','tableComment','9zLHjTY','detail','modelId','1vUCiQN','push','6258AjbSlJ','operations','2748cWHCBL','length','afterScriptId','toFieldLabel','name','393086BAHzoB','dbId','code','extend','11092LLMCip','filter','createTimeField','type','doType','object','deprecated','required','tableName','read','string','dataset','indexes','pkField','responseFields','relationId','bizRelationType','columnCodeListWithDeleted','isArray','493280gxmuJC','requestFields','datasetKey','options','main_sub','trim','displayName','relations','17754QjDtZy','responseBody','map','method','source','path','toDatasetName','host','labelField','15NsefiY','requestBody','modifierNameField','alias','1146brmtTK','sourceType','allFields','allFieldNames','description','beforeScriptId','deleted','properties','toTableName','toDatasetCode','parse','split'];a62_0x3a82=function(){return _0xf1acc6;};return a62_0x3a82();}(function(_0x2a13,_0x36471a){const _0x3892dc=a62_0x51cc,_0x48c796=_0x2a13();while(!![]){try{const _0xb35e5f=-parseInt(_0x3892dc(0x1e5))/0x1*(parseInt(_0x3892dc(0x1ee))/0x2)+parseInt(_0x3892dc(0x1c6))/0x3*(-parseInt(_0x3892dc(0x1f2))/0x4)+parseInt(_0x3892dc(0x1d6))/0x5+-parseInt(_0x3892dc(0x1ca))/0x6*(parseInt(_0x3892dc(0x1e7))/0x7)+-parseInt(_0x3892dc(0x1d7))/0x8+parseInt(_0x3892dc(0x1e2))/0x9*(-parseInt(_0x3892dc(0x1b5))/0xa)+-parseInt(_0x3892dc(0x1bd))/0xb*(-parseInt(_0x3892dc(0x1e9))/0xc);if(_0xb35e5f===_0x36471a)break;else _0x48c796['push'](_0x48c796['shift']());}catch(_0x153c84){_0x48c796['push'](_0x48c796['shift']());}}}(a62_0x3a82,0x217e8));import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0x405403){const _0x1ddd65=a62_0x51cc;if(_0x405403['deleted'])return null;const _0x2c68a2=Boolean(_0x405403['displayName']!==undefined||_0x405403[_0x1ddd65(0x1f6)]!==undefined);let _0x1abd4e={};if(!_0x2c68a2&&typeof _0x405403[_0x1ddd65(0x1f1)]==='string')try{_0x1abd4e=JSON['parse'](_0x405403[_0x1ddd65(0x1f1)]);}catch{}const _0x1f6649=_0x2c68a2?_0x405403[_0x1ddd65(0x1ed)]:_0x405403[_0x1ddd65(0x1f0)],_0x249306=_0x2c68a2?_0x405403[_0x1ddd65(0x1bb)]:_0x405403[_0x1ddd65(0x1ed)],_0x442de9=_0x2c68a2?_0x405403[_0x1ddd65(0x1f6)]:_0x405403[_0x1ddd65(0x1f5)]||_0x405403['dataType'],_0x439819=_0x2c68a2?_0x405403[_0x1ddd65(0x1af)]===!![]:_0x1abd4e[_0x1ddd65(0x1af)]===!![],_0x55e579=_0x2c68a2?_0x405403[_0x1ddd65(0x1f9)]===!![]:_0x1abd4e[_0x1ddd65(0x1f9)]===!![],_0x1d0e61=_0x2c68a2?_0x405403[_0x1ddd65(0x1b8)]??null:_0x1abd4e[_0x1ddd65(0x1b8)]??null,_0x58be0a={'name':_0x1f6649,'displayName':_0x249306||_0x1f6649,'type':_0x442de9,'dbType':_0x405403['dbType'],'pk':_0x439819,'required':_0x55e579,'deprecated':_0x405403[_0x1ddd65(0x1f8)]===!![],'description':_0x405403['description']||undefined};return Array[_0x1ddd65(0x1b4)](_0x1d0e61)&&_0x1d0e61[_0x1ddd65(0x1ea)]>0x0&&(_0x58be0a['options']=_0x1d0e61),_0x58be0a;}function parseJsonMaybe(_0x5c602d){const _0x3a9c42=a62_0x51cc;if(typeof _0x5c602d!==_0x3a9c42(0x1fc))return _0x5c602d;try{return JSON[_0x3a9c42(0x1d4)](_0x5c602d);}catch{return _0x5c602d;}}function normalizeOperationEntry(_0x1ba4d0,_0x59ee16){const _0xdea849=a62_0x51cc;if(!_0x59ee16||typeof _0x59ee16!==_0xdea849(0x1f7))return null;if(!_0x59ee16[_0xdea849(0x1c0)]||!_0x59ee16[_0xdea849(0x1c2)])return null;const _0x60a90={'name':_0x1ba4d0,'method':_0x59ee16['method'],'path':_0x59ee16['path']};if(_0x59ee16[_0xdea849(0x1c4)])_0x60a90[_0xdea849(0x1c4)]=_0x59ee16[_0xdea849(0x1c4)];if(_0x59ee16[_0xdea849(0x1c7)]!=null){const _0xbd0e3e=parseJsonMaybe(_0x59ee16[_0xdea849(0x1c7)]);_0x60a90[_0xdea849(0x1c7)]=_0xbd0e3e;}if(_0x59ee16['responseBody']!=null){const _0x51e353=parseJsonMaybe(_0x59ee16['responseBody']);_0x60a90[_0xdea849(0x1be)]=_0x51e353;}if(_0x59ee16[_0xdea849(0x1cf)]!=null)_0x60a90['beforeScriptId']=_0x59ee16['beforeScriptId'];if(_0x59ee16[_0xdea849(0x1eb)]!=null)_0x60a90['afterScriptId']=_0x59ee16[_0xdea849(0x1eb)];if(Array[_0xdea849(0x1b4)](_0x59ee16[_0xdea849(0x1b6)]))_0x60a90[_0xdea849(0x1b6)]=_0x59ee16['requestFields'];if(Array[_0xdea849(0x1b4)](_0x59ee16[_0xdea849(0x1b0)]))_0x60a90[_0xdea849(0x1b0)]=_0x59ee16[_0xdea849(0x1b0)];return _0x60a90;}function summarizeDbtable(_0x18ac9c){const _0x46873f=a62_0x51cc,_0x4d974c={},_0x314165=[_0x46873f(0x1ef),_0x46873f(0x1dc),'tableName',_0x46873f(0x1b7),_0x46873f(0x1af),'allFields',_0x46873f(0x1df),_0x46873f(0x1f4),_0x46873f(0x1dd),'creatorIdField','creatorNameField',_0x46873f(0x1de),_0x46873f(0x1c8),_0x46873f(0x1c5),'dblinkInfoDTO'];for(const _0x50bf46 of _0x314165){if(_0x18ac9c[_0x50bf46]!==undefined)_0x4d974c[_0x50bf46]=_0x18ac9c[_0x50bf46];}return typeof _0x4d974c['allFields']===_0x46873f(0x1fc)&&_0x4d974c[_0x46873f(0x1cc)][_0x46873f(0x1ea)]>0x0&&(_0x4d974c[_0x46873f(0x1cd)]=_0x4d974c['allFields'][_0x46873f(0x1d5)](',')[_0x46873f(0x1bf)](_0x3bb354=>_0x3bb354[_0x46873f(0x1ba)]())[_0x46873f(0x1f3)](Boolean)),_0x4d974c;}function a62_0x51cc(_0x361f33,_0xf2c851){_0x361f33=_0x361f33-0x1ad;const _0x3a82ec=a62_0x3a82();let _0x51cca6=_0x3a82ec[_0x361f33];return _0x51cca6;}function normalizeRelatedPages(_0x4785ba){const _0x3839a2=a62_0x51cc;if(!Array[_0x3839a2(0x1b4)](_0x4785ba))return[];return _0x4785ba[_0x3839a2(0x1f3)](_0x9fbfd6=>_0x9fbfd6&&typeof _0x9fbfd6===_0x3839a2(0x1f7))['map'](_0x1a828a=>({'id':_0x1a828a['id'],'type':_0x1a828a['type'],'code':_0x1a828a['code'],'title':_0x1a828a['title'],'deleted':_0x1a828a[_0x3839a2(0x1d0)]===!![]}));}export const datasetDetail={'service':a62_0x47b372(0x1ad),'command':a62_0x47b372(0x1e3),'description':'Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','risk':a62_0x47b372(0x1fb),'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a62_0x47b372(0x1c9),'type':a62_0x47b372(0x1fc),'description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically'}],async 'execute'(_0x24289a){const _0x361f5c=a62_0x47b372,_0x56cfa7=await getDatasetDetail(_0x24289a['str'](_0x361f5c(0x1f0))),_0x156b4f=Array[_0x361f5c(0x1b4)](_0x56cfa7[_0x361f5c(0x1d8)])?_0x56cfa7[_0x361f5c(0x1d8)]:Array['isArray'](_0x56cfa7[_0x361f5c(0x1d1)])?_0x56cfa7[_0x361f5c(0x1d1)]:[],_0x109238=_0x156b4f['map'](_0x358e74=>normalizeField(_0x358e74))[_0x361f5c(0x1f3)](_0x3c6b7c=>_0x3c6b7c!==null),_0x11602c=_0x56cfa7[_0x361f5c(0x1e8)]??{},_0x129bb5=[];for(const [_0x1f00e1,_0x24cf4e]of Object[_0x361f5c(0x1db)](_0x11602c)){const _0x558be6=normalizeOperationEntry(_0x1f00e1,_0x24cf4e);if(_0x558be6)_0x129bb5[_0x361f5c(0x1e6)](_0x558be6);}const _0x4ea6e0=_0x56cfa7['dbtableConfig']??{},_0xc61d3f=_0x56cfa7[_0x361f5c(0x1ad)]??{},_0x3c5355=_0x4ea6e0[_0x361f5c(0x1ef)]!=null?{'id':_0x4ea6e0[_0x361f5c(0x1ef)],'name':_0x4ea6e0['dbName']??null}:undefined;let _0x278f0a;return typeof _0x56cfa7['extend']===_0x361f5c(0x1fc)&&(_0x278f0a=parseJsonMaybe(_0x56cfa7[_0x361f5c(0x1f1)])),{'ok':!![],'data':{'id':_0x56cfa7[_0x361f5c(0x1e4)]??_0x56cfa7['id'],'name':_0x56cfa7[_0x361f5c(0x1ed)],'code':_0x56cfa7[_0x361f5c(0x1da)]||_0x56cfa7[_0x361f5c(0x1f0)],'doVersion':_0x56cfa7['doVersion'],'description':_0x56cfa7[_0x361f5c(0x1ce)]||_0xc61d3f[_0x361f5c(0x1e1)]||undefined,'source':_0x56cfa7[_0x361f5c(0x1c1)]||_0xc61d3f[_0x361f5c(0x1cb)],'table':_0x4ea6e0[_0x361f5c(0x1fa)]||_0xc61d3f[_0x361f5c(0x1fa)],'datasetKey':_0x4ea6e0[_0x361f5c(0x1b7)],'pk':_0x4ea6e0[_0x361f5c(0x1af)],'db':_0x3c5355,'dbtable':summarizeDbtable(_0x4ea6e0),'fields':_0x109238,'operations':_0x129bb5,'indexes':Array[_0x361f5c(0x1b4)](_0xc61d3f['indexes'])?_0xc61d3f[_0x361f5c(0x1ae)]:[],'relations':Array[_0x361f5c(0x1b4)](_0x56cfa7[_0x361f5c(0x1bc)])?_0x56cfa7[_0x361f5c(0x1bc)][_0x361f5c(0x1bf)](_0x1f82b4=>({..._0x1f82b4[_0x361f5c(0x1b1)]!=null?{'relationId':_0x1f82b4[_0x361f5c(0x1b1)]}:{},'fromDataset':_0x56cfa7[_0x361f5c(0x1ed)],'fromCode':_0x56cfa7[_0x361f5c(0x1da)]||_0x56cfa7['code'],'fromTable':_0x4ea6e0['tableName']||_0xc61d3f[_0x361f5c(0x1fa)],'fromField':_0x1f82b4['fromField'],'toDataset':_0x1f82b4[_0x361f5c(0x1c3)],'toCode':_0x1f82b4[_0x361f5c(0x1d3)],'toTable':_0x1f82b4[_0x361f5c(0x1d2)],'toField':_0x1f82b4['toField'],'labelField':_0x1f82b4[_0x361f5c(0x1ec)]||undefined,'cardinality':_0x1f82b4['cardinality']||undefined,'bizRelationType':_0x1f82b4[_0x361f5c(0x1b2)]===_0x361f5c(0x1b9)?'main_sub':null})):[],'relatedPages':normalizeRelatedPages(_0x56cfa7['relatedPageInfoList']),...Array[_0x361f5c(0x1b4)](_0x56cfa7[_0x361f5c(0x1b3)])?{'columnCodeListWithDeleted':_0x56cfa7[_0x361f5c(0x1b3)]}:{},'formatRules':Array[_0x361f5c(0x1b4)](_0x56cfa7['formatRules'])?_0x56cfa7[_0x361f5c(0x1e0)]:[],'validateRules':Array[_0x361f5c(0x1b4)](_0x56cfa7[_0x361f5c(0x1d9)])?_0x56cfa7[_0x361f5c(0x1d9)]:[],..._0x278f0a!==undefined?{'extend':_0x278f0a}:{},'stats':{'fieldCount':_0x109238['length'],'operationCount':_0x129bb5[_0x361f5c(0x1ea)]}}};}};
|