@lovrabet/rabetbase-cli 2.5.2-beta.5 → 2.5.2-beta.6
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/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.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/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +0 -17
- 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/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +5 -6
- package/skills/rabetbase/references/rabetbase-deployment-sync-all.md +56 -0
- package/skills/rabetbase.manifest.json +4 -4
- package/lib/commands/deployment/auto-sync.d.ts +0 -20
- package/lib/commands/deployment/auto-sync.js +0 -1
- package/lib/commands/deployment/sync.d.ts +0 -2
- package/lib/commands/deployment/sync.js +0 -1
- package/skills/rabetbase/references/rabetbase-deployment-sync.md +0 -100
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1183cd,_0x5ca714){const _0x599601=a49_0x54b6,_0x5d3d40=_0x1183cd();while(!![]){try{const _0x308da8=parseInt(_0x599601(0x182))/0x1+-parseInt(_0x599601(0x177))/0x2+parseInt(_0x599601(0x180))/0x3+-parseInt(_0x599601(0x17e))/0x4*(-parseInt(_0x599601(0x17a))/0x5)+-parseInt(_0x599601(0x183))/0x6+-parseInt(_0x599601(0x17d))/0x7+-parseInt(_0x599601(0x186))/0x8*(-parseInt(_0x599601(0x184))/0x9);if(_0x308da8===_0x5ca714)break;else _0x5d3d40['push'](_0x5d3d40['shift']());}catch(_0x338f76){_0x5d3d40['push'](_0x5d3d40['shift']());}}}(a49_0x5aaf,0xb3aeb));import{existsSync,statSync}from'node:fs';function a49_0x54b6(_0x5c2e9d,_0x18eb27){_0x5c2e9d=_0x5c2e9d-0x176;const _0x5aaf94=a49_0x5aaf();let _0x54b61a=_0x5aaf94[_0x5c2e9d];return _0x54b61a;}function a49_0x5aaf(){const _0x5ecb41=['File\x20is\x20not\x20a\x20regular\x20file:\x20','207080ohJaCZ','8162754uEIScx','404010lfbLEV','validation','304zRnnyE','size','428564VNHtcx','trim','ceil','205aeVSSt','toFixed','File\x20not\x20found:\x20','5838455LNEtUX','46280OjXYdL','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','2272545dBVdUq'];a49_0x5aaf=function(){return _0x5ecb41;};return a49_0x5aaf();}import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x406f7c){const _0x4e2d65=a49_0x54b6;if(_0x406f7c>=BYTES_PER_MB){const _0x2576a8=Math[_0x4e2d65(0x179)](_0x406f7c/BYTES_PER_MB*0x64)/0x64;return _0x2576a8[_0x4e2d65(0x17b)](0x2)+'\x20MB';}return _0x406f7c+'\x20B';}export function requireDevelopmentUploadFile(_0x354065,_0x3a7322){const _0x377004=a49_0x54b6,_0x3df3dd=_0x354065[_0x377004(0x178)]();if(!_0x3df3dd)throw CliErrors[_0x377004(0x185)](_0x3a7322+'\x20path\x20is\x20required.');if(!existsSync(_0x3df3dd))throw CliErrors[_0x377004(0x185)](_0x377004(0x17c)+_0x3df3dd);const _0x45f541=statSync(_0x3df3dd);if(!_0x45f541['isFile']())throw CliErrors[_0x377004(0x185)](_0x377004(0x181)+_0x3df3dd);if(_0x45f541[_0x377004(0x176)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors['validation'](_0x377004(0x17f)+_0x3df3dd+'\x20('+formatBytes(_0x45f541[_0x377004(0x176)])+')');return{'path':_0x3df3dd,'size':_0x45f541[_0x377004(0x176)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xc45d4,_0x25f94d){const _0x21de21=a50_0xa27b,_0x1dc550=_0xc45d4();while(!![]){try{const _0x1c2d33=-parseInt(_0x21de21(0x1d1))/0x1*(parseInt(_0x21de21(0x1ce))/0x2)+-parseInt(_0x21de21(0x1d2))/0x3*(-parseInt(_0x21de21(0x1d0))/0x4)+parseInt(_0x21de21(0x1d7))/0x5+parseInt(_0x21de21(0x1d8))/0x6*(-parseInt(_0x21de21(0x1d9))/0x7)+-parseInt(_0x21de21(0x1d4))/0x8+-parseInt(_0x21de21(0x1d3))/0x9+parseInt(_0x21de21(0x1d5))/0xa;if(_0x1c2d33===_0x25f94d)break;else _0x1dc550['push'](_0x1dc550['shift']());}catch(_0x26d140){_0x1dc550['push'](_0x1dc550['shift']());}}}(a50_0x2c6c,0x3b479));function a50_0xa27b(_0x5c0ddb,_0x226b37){_0x5c0ddb=_0x5c0ddb-0x1cb;const _0x2c6c54=a50_0x2c6c();let _0xa27bd5=_0x2c6c54[_0x5c0ddb];return _0xa27bd5;}function a50_0x2c6c(){const _0x22e979=['3871xZCCks','App\x20Code\x20cannot\x20exceed\x20100\x20characters','test','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','2eugkMD','length','4MzudYq','165145BQmZsn','550167WrKaqp','1464210jbsoWi','1912232EoIqkj','5713410snRvcj','trim','2152150PORkYe','4074mAXVkr'];a50_0x2c6c=function(){return _0x22e979;};return a50_0x2c6c();}export function validateAppcode(_0x2859d2){const _0x41ee60=a50_0xa27b,_0x304319=_0x2859d2[_0x41ee60(0x1d6)]();if(!_0x304319)return{'valid':![],'message':'App\x20Code\x20cannot\x20be\x20empty'};if(_0x304319[_0x41ee60(0x1cf)]>0x64)return{'valid':![],'message':_0x41ee60(0x1cb)};if(!/^[A-Za-z0-9_-]+$/[_0x41ee60(0x1cc)](_0x304319))return{'valid':![],'message':_0x41ee60(0x1cd)};return{'valid':!![]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a51_0x2aec40=a51_0x3478;(function(_0xabf5f,_0x12faca){const _0x6fd29b=a51_0x3478,_0x59bccc=_0xabf5f();while(!![]){try{const _0x5ad023=-parseInt(_0x6fd29b(0x1f8))/0x1*(-parseInt(_0x6fd29b(0x210))/0x2)+parseInt(_0x6fd29b(0x20b))/0x3+parseInt(_0x6fd29b(0x206))/0x4*(parseInt(_0x6fd29b(0x1f4))/0x5)+-parseInt(_0x6fd29b(0x20d))/0x6+parseInt(_0x6fd29b(0x201))/0x7+-parseInt(_0x6fd29b(0x1f7))/0x8+parseInt(_0x6fd29b(0x1fc))/0x9*(-parseInt(_0x6fd29b(0x211))/0xa);if(_0x5ad023===_0x12faca)break;else _0x59bccc['push'](_0x59bccc['shift']());}catch(_0x2dd4a8){_0x59bccc['push'](_0x59bccc['shift']());}}}(a51_0x3355,0xa4806));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,isTopLevelConfigKey,readScopedConfig,resolveWriteScope,writeScopedConfig}from'../../commands/config/shared.js';function a51_0x3478(_0x2d0c58,_0x54a79d){_0x2d0c58=_0x2d0c58-0x1ef;const _0x3355f1=a51_0x3355();let _0x3478a1=_0x3355f1[_0x2d0c58];return _0x3478a1;}const LEGACY_DELETABLE_KEYS=new Set([a51_0x2aec40(0x202)]),EXTRA_DELETABLE_KEYS=new Set([a51_0x2aec40(0x1f6),a51_0x2aec40(0x1ff)]);async function execute(_0x4243a8){const _0x1487ff=a51_0x2aec40,_0x1a5658=_0x4243a8[_0x1487ff(0x1fb)][0x0]?.[_0x1487ff(0x204)]();if(!_0x1a5658)throw CliErrors['validation'](_0x1487ff(0x203),_0x1487ff(0x1fd)+CLI_BIN_NAME+_0x1487ff(0x207));if(_0x1a5658===_0x1487ff(0x200))throw CliErrors[_0x1487ff(0x1f3)](_0x1487ff(0x1fa));if(!isTopLevelConfigKey(_0x1a5658)&&!EXTRA_DELETABLE_KEYS[_0x1487ff(0x208)](_0x1a5658)&&!LEGACY_DELETABLE_KEYS['has'](_0x1a5658))throw CliErrors['validation'](_0x1487ff(0x212)+_0x1a5658+'\x22\x20is\x20not\x20deletable.',_0x1487ff(0x1f9));const _0x340c5d=resolveWriteScope({'global':_0x4243a8[_0x1487ff(0x213)]('global')}),_0x37bde5=readScopedConfig(_0x340c5d),_0x371268=Object[_0x1487ff(0x209)][_0x1487ff(0x1f2)][_0x1487ff(0x20f)](_0x37bde5,_0x1a5658);_0x371268&&(delete _0x37bde5[_0x1a5658],writeScopedConfig(_0x37bde5,_0x340c5d));const _0x57f857=_0x340c5d===_0x1487ff(0x205)?_0x1487ff(0x20c):_0x1487ff(0x1f0);return{'ok':!![],'message':_0x371268?'✓\x20'+_0x57f857+'\x20'+_0x1a5658+_0x1487ff(0x1f5):'✓\x20'+_0x57f857+'\x20'+_0x1a5658+'\x20already\x20absent','data':{'key':_0x1a5658,'scope':_0x340c5d,'changed':_0x371268}};}function a51_0x3355(){const _0x268955=['7278924WxRBLo','Delete\x20from\x20global\x20config\x20(~/.rabetbase.json)','call','1109302sQkUhV','6232090UGJubq','Top-level\x20key\x20\x22','bool','Top-level\x20config\x20key;\x20legacy\x20inherit\x20is\x20accepted\x20for\x20migration','Project','delete','hasOwnProperty','validation','5gBQHZs','\x20deleted','defaultApp','1192760dAjHew','2yeyCJm','Use\x20workspace\x20commands\x20to\x20modify\x20apps\x20and\x20their\x20default\x20selection.','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','args','27ylRLZy','Usage:\x20','Delete\x20a\x20config\x20value\x20from\x20one\x20scope','routing','riskLevel','8542471uTdzcF','inherit','Missing\x20key\x20argument.','trim','global','3691456mKcXlx','\x20config\x20delete\x20<key>\x20[--global]','has','prototype','key','1959465mBEhHT','Global'];a51_0x3355=function(){return _0x268955;};return a51_0x3355();}export const configDeleteDefinition={'service':'config','command':a51_0x2aec40(0x1f1),'description':a51_0x2aec40(0x1fe),'risk':'write','requiresAuth':![],'requiresAppCode':![],'args':[{'name':a51_0x2aec40(0x20a),'description':a51_0x2aec40(0x1ef),'required':!![]}],'flags':[{'name':a51_0x2aec40(0x205),'type':'boolean','description':a51_0x2aec40(0x20e),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a52_0x4d2bb4=a52_0x5409;(function(_0x465611,_0x19f095){const _0x13f4d3=a52_0x5409,_0x40fc46=_0x465611();while(!![]){try{const _0x28be1c=-parseInt(_0x13f4d3(0x1d5))/0x1+-parseInt(_0x13f4d3(0x1dc))/0x2+parseInt(_0x13f4d3(0x1d3))/0x3+parseInt(_0x13f4d3(0x1e0))/0x4+parseInt(_0x13f4d3(0x1d2))/0x5+-parseInt(_0x13f4d3(0x1d4))/0x6*(parseInt(_0x13f4d3(0x1da))/0x7)+-parseInt(_0x13f4d3(0x1d9))/0x8*(parseInt(_0x13f4d3(0x1de))/0x9);if(_0x28be1c===_0x19f095)break;else _0x40fc46['push'](_0x40fc46['shift']());}catch(_0x5f0248){_0x40fc46['push'](_0x40fc46['shift']());}}}(a52_0x10e6,0xf3525));import{CliErrors}from'../../errors.js';function a52_0x5409(_0x30ff33,_0x186881){_0x30ff33=_0x30ff33-0x1ce;const _0x10e6f5=a52_0x10e6();let _0x54095e=_0x10e6f5[_0x30ff33];return _0x54095e;}import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x4d626d){const _0x1b733a=a52_0x5409,_0x4f5b5c=_0x4d626d['str'](_0x1b733a(0x1dd));if(!_0x4f5b5c)throw CliErrors[_0x1b733a(0x1d8)](_0x1b733a(0x1d1),_0x1b733a(0x1d6)+CLI_BIN_NAME+_0x1b733a(0x1df));const _0x54cb18=readConfig(),_0x145ea5=_0x4f5b5c==='app'?'appcode':_0x4f5b5c,_0x374d44=_0x54cb18[_0x145ea5];if(_0x374d44===undefined)throw CliErrors[_0x1b733a(0x1d8)](_0x1b733a(0x1db)+_0x4f5b5c);return{'ok':!![],'data':typeof _0x374d44===_0x1b733a(0x1cf)?_0x374d44:{[_0x145ea5]:_0x374d44},'message':typeof _0x374d44==='object'?undefined:String(_0x374d44)};}export const configGetDefinition={'service':a52_0x4d2bb4(0x1d7),'command':a52_0x4d2bb4(0x1ce),'description':'Get\x20a\x20config\x20value\x20by\x20key','risk':a52_0x4d2bb4(0x1d0),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a52_0x4d2bb4(0x1dd),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};function a52_0x10e6(){const _0x5e2550=['2671672UNafOU','key','140517HdzvKS','\x20config\x20get\x20--key\x20<key>','4895072cdKYqD','get','object','read','Missing\x20key.','8304420TVFDCF','3189018pneFhf','11370uHtYRQ','868177SxJorg','Usage:\x20','config','validation','40AmLxay','2471XllFHW','Key\x20not\x20found:\x20'];a52_0x10e6=function(){return _0x5e2550;};return a52_0x10e6();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x40479e,_0xb27f0b){const _0x4b9095=a53_0x2355,_0x8f8003=_0x40479e();while(!![]){try{const _0x1bfcb7=parseInt(_0x4b9095(0x6f))/0x1*(parseInt(_0x4b9095(0x70))/0x2)+-parseInt(_0x4b9095(0x6c))/0x3+parseInt(_0x4b9095(0x74))/0x4+parseInt(_0x4b9095(0x72))/0x5*(parseInt(_0x4b9095(0x6e))/0x6)+parseInt(_0x4b9095(0x6d))/0x7+parseInt(_0x4b9095(0x73))/0x8+-parseInt(_0x4b9095(0x71))/0x9;if(_0x1bfcb7===_0xb27f0b)break;else _0x8f8003['push'](_0x8f8003['shift']());}catch(_0x470411){_0x8f8003['push'](_0x8f8003['shift']());}}}(a53_0x25e2,0x4f6be));function a53_0x25e2(){const _0x129586=['104406NOrBkx','296289hbakEH','4oREhUG','10284930XpwgvJ','20EsHGcj','308208QLqQWx','2233632xctuxl','425037aBAyeh','2454501FOSiuK'];a53_0x25e2=function(){return _0x129586;};return a53_0x25e2();}import{configListDefinition}from'../../commands/config/list.js';function a53_0x2355(_0x2d8e7a,_0x38783d){_0x2d8e7a=_0x2d8e7a-0x6c;const _0x25e22c=a53_0x25e2();let _0x235590=_0x25e22c[_0x2d8e7a];return _0x235590;}import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';import{configDeleteDefinition}from'../../commands/config/delete.js';import{configInitDefinition}from'../../commands/config/init.js';export const configDefinitions=[configInitDefinition,configListDefinition,configGetDefinition,configSetDefinition,configDeleteDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a54_0x5d4c20=a54_0x5066;(function(_0x1d3410,_0x17893a){const _0x492d28=a54_0x5066,_0x15e7ad=_0x1d3410();while(!![]){try{const _0x1b00d5=-parseInt(_0x492d28(0xb9))/0x1*(parseInt(_0x492d28(0xe3))/0x2)+parseInt(_0x492d28(0xb6))/0x3*(parseInt(_0x492d28(0xac))/0x4)+-parseInt(_0x492d28(0xb2))/0x5+parseInt(_0x492d28(0xd6))/0x6*(-parseInt(_0x492d28(0xad))/0x7)+parseInt(_0x492d28(0xb3))/0x8+-parseInt(_0x492d28(0xdd))/0x9*(parseInt(_0x492d28(0xb4))/0xa)+-parseInt(_0x492d28(0xca))/0xb*(-parseInt(_0x492d28(0xcd))/0xc);if(_0x1b00d5===_0x17893a)break;else _0x15e7ad['push'](_0x15e7ad['shift']());}catch(_0x32cc0c){_0x15e7ad['push'](_0x15e7ad['shift']());}}}(a54_0x5566,0x38db7));import{select}from'@inquirer/prompts';import{CliErrors}from'../../errors.js';import{readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{DOMAIN_CONFIG_FIELDS,LEGACY_DOMAIN_CONFIG_FIELDS,resolveDomainConfigInput}from'../../config/domain-config.js';import{ENTERPRISE_ROUTING_KIND,ENTERPRISE_ROUTING_PROTOCOL}from'../../generated/routing-contract.js';import{DEFAULT_LOVRABET_REGION,ENABLED_LOVRABET_REGION_VALUES,isEnabledLovrabetRegion}from'../../constant/region.js';import{getOfficialRoutingProfile}from'../../constant/routing-profile.js';import{GLOBAL_SCOPE_FLAG}from'../../commands/common/flags.js';export const configInitFlags=[GLOBAL_SCOPE_FLAG,{'name':a54_0x5d4c20(0xbc),'type':a54_0x5d4c20(0xb5),'description':a54_0x5d4c20(0xe7)+ENABLED_LOVRABET_REGION_VALUES[a54_0x5d4c20(0xdf)](',\x20'),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},{'name':'domain-config','type':'string','description':a54_0x5d4c20(0xe4)},{'name':'user-domain','type':'string','description':'Custom\x20User\x20HTTPS\x20origin'},{'name':a54_0x5d4c20(0xe0),'type':a54_0x5d4c20(0xb5),'description':a54_0x5d4c20(0xcb)},{'name':a54_0x5d4c20(0xae),'type':a54_0x5d4c20(0xb5),'description':a54_0x5d4c20(0xcc)},{'name':a54_0x5d4c20(0xda),'type':a54_0x5d4c20(0xb5),'description':'Custom\x20SkillHub\x20HTTPS\x20origin'},{'name':a54_0x5d4c20(0xb7),'type':'string','description':'Custom\x20knowledge-base\x20HTTPS\x20origin'},{'name':a54_0x5d4c20(0xd2),'type':'string','description':'Custom\x20Lovrabet\x20workspace\x20HTTPS\x20origin'},{'name':a54_0x5d4c20(0xd5),'type':'string','description':a54_0x5d4c20(0xbd)},{'name':'certificate-domain','type':a54_0x5d4c20(0xb5),'description':a54_0x5d4c20(0xc3)}];async function resolveRegion(_0x4da920){const _0x3604c7=a54_0x5d4c20,_0xf2083b=_0x4da920[_0x3604c7(0xce)](_0x3604c7(0xbc));if(_0xf2083b){if(!isEnabledLovrabetRegion(_0xf2083b))throw CliErrors[_0x3604c7(0xc8)](_0x3604c7(0xd9)+_0xf2083b+'\x22\x20is\x20not\x20currently\x20available.','Available\x20regions:\x20'+ENABLED_LOVRABET_REGION_VALUES['join'](',\x20'));return _0xf2083b;}if(_0x4da920['nonInteractive'])return DEFAULT_LOVRABET_REGION;try{return await select({'message':_0x3604c7(0xdc),'default':DEFAULT_LOVRABET_REGION,'choices':ENABLED_LOVRABET_REGION_VALUES[_0x3604c7(0xd7)](_0x13bc2d=>({'name':getOfficialRoutingProfile(_0x13bc2d)[_0x3604c7(0xdb)]+'\x20('+_0x13bc2d+')','value':_0x13bc2d}))});}catch(_0x3199b4){if(_0x3199b4?.[_0x3604c7(0xd1)]===_0x3604c7(0xb0))throw CliErrors[_0x3604c7(0xd8)]();throw _0x3199b4;}}function a54_0x5566(){const _0x2ebb1a=['Official\x20Lovrabet\x20region:\x20','120iHVqks','91imzlmB','runtime-domain','official','ExitPromptError','keys','2048580zmUzSK','322928StHOVH','180720nvViPS','string','45786rtqmRJ','kb-domain','Updates\x20the\x20selected\x20Rabetbase\x20region\x20or\x20independent-deployment\x20Domain\x20configuration.\x20Cookie,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','154412OKeXjt','project','write','region','Custom\x20local\x20callback\x20HTTPS\x20origin','bool','routing','mode','domains','Independent\x20deployment\x20requires\x20--local-domain\x20and\x20--certificate-domain\x20together.','Custom\x20certificate\x20service\x20HTTPS\x20origin','localDomain','Initialize\x20the\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','certificateDomain','assign','validation','global','152537UFQrdQ','Custom\x20platform\x20API\x20HTTPS\x20origin','Custom\x20Runtime\x20HTTPS\x20origin','732rHDWhy','str','init','config','name','app-domain','length','Rabetbase\x20connection\x20configured\x20for\x20region:\x20','local-domain','147876ABPRtj','map','cancelled','Region\x20\x22','skill-domain','label','Select\x20Lovrabet\x20region','36oTsiLT','Rabetbase\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20','join','api-domain','enterprise-v1','independent','4NRRdVw','Independent-deployment\x20Domain\x20JSON\x20file','cdn','manifestDomains'];a54_0x5566=function(){return _0x2ebb1a;};return a54_0x5566();}export async function executeConfigInit(_0x529f11){const _0xf4690b=a54_0x5d4c20,_0x557226=resolveDomainConfigInput(_0x529f11),_0x345feb=_0x557226[_0xf4690b(0xc1)],_0x5917fe=Object[_0xf4690b(0xb1)](_0x345feb)[_0xf4690b(0xd3)]>0x0;if(_0x5917fe&&_0x529f11[_0xf4690b(0xce)](_0xf4690b(0xbc)))throw CliErrors[_0xf4690b(0xc8)]('Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.');if(!!_0x345feb[_0xf4690b(0xc4)]!==!!_0x345feb[_0xf4690b(0xc6)])throw CliErrors['validation'](_0xf4690b(0xc2));const _0x27b8d4=_0x529f11[_0xf4690b(0xbe)](_0xf4690b(0xc9))?'global':_0xf4690b(0xba),_0x5e759d=readScopedConfig(_0x27b8d4);for(const _0x276ffc of DOMAIN_CONFIG_FIELDS)delete _0x5e759d[_0x276ffc];for(const _0x37d3d4 of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x5e759d[_0x37d3d4];delete _0x5e759d['routing'];let _0x3dbd10=null;if(_0x5917fe)delete _0x5e759d[_0xf4690b(0xbc)],_0x557226[_0xf4690b(0xc0)]===_0xf4690b(0xe1)?_0x5e759d[_0xf4690b(0xbf)]={'protocol':ENTERPRISE_ROUTING_PROTOCOL,'kind':ENTERPRISE_ROUTING_KIND,'domains':_0x557226[_0xf4690b(0xe6)],'cdn':_0x557226[_0xf4690b(0xe5)]}:Object[_0xf4690b(0xc7)](_0x5e759d,_0x345feb);else{_0x3dbd10=await resolveRegion(_0x529f11);if(_0x3dbd10===DEFAULT_LOVRABET_REGION)delete _0x5e759d[_0xf4690b(0xbc)];else _0x5e759d['region']=_0x3dbd10;}return writeScopedConfig(_0x5e759d,_0x27b8d4),{'ok':!![],'message':_0x5917fe?_0xf4690b(0xde)+Object['keys'](_0x557226[_0xf4690b(0xc0)]===_0xf4690b(0xe1)?_0x557226[_0xf4690b(0xe6)]:_0x345feb)['join'](',\x20')+'.':_0xf4690b(0xd4)+_0x3dbd10+'.','data':{'mode':_0x5917fe?_0xf4690b(0xe2):_0xf4690b(0xaf),'protocol':_0x557226['mode']===_0xf4690b(0xe1)?ENTERPRISE_ROUTING_PROTOCOL:undefined,'region':_0x3dbd10,'domains':_0x345feb,'cdn':_0x557226[_0xf4690b(0xc0)]===_0xf4690b(0xe1)?_0x557226['cdn']:undefined}};}function a54_0x5066(_0x1c2add,_0x3b7963){_0x1c2add=_0x1c2add-0xac;const _0x5566f9=a54_0x5566();let _0x506656=_0x5566f9[_0x1c2add];return _0x506656;}export const configInitDefinition={'service':a54_0x5d4c20(0xd0),'command':a54_0x5d4c20(0xcf),'description':a54_0x5d4c20(0xc5),'risk':a54_0x5d4c20(0xbb),'confirmationDescription':a54_0x5d4c20(0xb8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a55_0xc439(_0x4dee97,_0x48c2aa){_0x4dee97=_0x4dee97-0xd5;const _0x941da4=a55_0x941d();let _0xc439eb=_0x941da4[_0x4dee97];return _0xc439eb;}const a55_0x4d9093=a55_0xc439;(function(_0x4c6095,_0x1a38c9){const _0x4c2b99=a55_0xc439,_0xac2eeb=_0x4c6095();while(!![]){try{const _0x54b4fd=-parseInt(_0x4c2b99(0xe1))/0x1*(-parseInt(_0x4c2b99(0xdb))/0x2)+parseInt(_0x4c2b99(0xd5))/0x3+parseInt(_0x4c2b99(0xe5))/0x4*(-parseInt(_0x4c2b99(0xde))/0x5)+parseInt(_0x4c2b99(0xd6))/0x6+parseInt(_0x4c2b99(0xd8))/0x7*(-parseInt(_0x4c2b99(0xd7))/0x8)+parseInt(_0x4c2b99(0xe0))/0x9+-parseInt(_0x4c2b99(0xd9))/0xa;if(_0x54b4fd===_0x1a38c9)break;else _0xac2eeb['push'](_0xac2eeb['shift']());}catch(_0x16cdaf){_0xac2eeb['push'](_0xac2eeb['shift']());}}}(a55_0x941d,0x39ea7));import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x2cac4b){const _0x4ff54f=a55_0xc439,_0x1152a6=_0x2cac4b[_0x4ff54f(0xe2)]('global')?readScopedConfig(_0x4ff54f(0xda)):readConfig();return{'ok':!![],'data':_0x1152a6};}export const configListDefinition={'service':a55_0x4d9093(0xdd),'command':a55_0x4d9093(0xdf),'description':a55_0x4d9093(0xe3),'risk':a55_0x4d9093(0xe4),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a55_0x4d9093(0xda),'type':a55_0x4d9093(0xdc),'description':'Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','default':![]}],'execute':execute};function a55_0x941d(){const _0x781474=['global','1258PJdaFS','boolean','config','745IHDfvl','list','3733326pNXJzF','271BSDOVI','bool','List\x20all\x20config\x20values','read','1168LAlkXj','274818xNKRjf','792180XRGjdD','8nvYbnu','911953AuPoYj','3978990OmlZzc'];a55_0x941d=function(){return _0x781474;};return a55_0x941d();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a56_0x5ae3b8=a56_0x1397;(function(_0x2fe736,_0x4cb9be){const _0x52d0de=a56_0x1397,_0x3233b8=_0x2fe736();while(!![]){try{const _0x17be7b=-parseInt(_0x52d0de(0xb3))/0x1+-parseInt(_0x52d0de(0xc2))/0x2+parseInt(_0x52d0de(0xbf))/0x3*(parseInt(_0x52d0de(0x9b))/0x4)+parseInt(_0x52d0de(0xb0))/0x5+-parseInt(_0x52d0de(0xa5))/0x6+parseInt(_0x52d0de(0xa7))/0x7+parseInt(_0x52d0de(0x99))/0x8*(-parseInt(_0x52d0de(0xad))/0x9);if(_0x17be7b===_0x4cb9be)break;else _0x3233b8['push'](_0x3233b8['shift']());}catch(_0x177c66){_0x3233b8['push'](_0x3233b8['shift']());}}}(a56_0x5266,0x3ddd6));import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';function a56_0x1397(_0x48596f,_0x3488f7){_0x48596f=_0x48596f-0x98;const _0x52666a=a56_0x5266();let _0x139725=_0x52666a[_0x48596f];return _0x139725;}function a56_0x5266(){const _0x31db18=['key','Invalid\x20value\x20for\x20\x22','\x20appcode\x20set\x20to:\x20','str','`,\x20`','117174NJtIFC','keys','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','450164SlztyL','bool','locale','object','4146584KOMrVF','appcode','28ynPAiJ','Invalid\x20locale\x20value.','set','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','Global','apps','boolean','app','Missing\x20value.','includes','1068648RmOFFx','env','3527412kbcbFt','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','length','Config\x20value','Settable\x20top-level\x20keys:\x20','Use\x20`','9kbwown','validation','global','2511340YJwiLC','config','\x22.\x20Allowed:\x20','104679gNypfm','string','join','Set\x20a\x20config\x20value','Usage:\x20','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.'];a56_0x5266=function(){return _0x31db18;};return a56_0x5266();}import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';import{DOMAIN_CONFIG_FIELDS,normalizeDomainOrigin}from'../../config/domain-config.js';async function execute(_0x133638){const _0x207292=a56_0x1397,_0x31d9b4=_0x133638['str'](_0x207292(0xba)),_0x2143b8=_0x133638[_0x207292(0xbd)]('value');if(!_0x31d9b4)throw CliErrors[_0x207292(0xae)]('Missing\x20key.',_0x207292(0xb7)+CLI_BIN_NAME+_0x207292(0xc1));if(_0x2143b8===undefined||_0x2143b8==='')throw CliErrors['validation'](_0x207292(0xa3),_0x207292(0xb7)+CLI_BIN_NAME+_0x207292(0xc1));let _0x152b61=_0x31d9b4,_0x1c9a6e=_0x2143b8;if(_0x2143b8[_0x207292(0xa9)]>0x1f4)throw CliErrors[_0x207292(0xae)](_0x207292(0xb8));if(_0x31d9b4==='riskLevel')throw CliErrors[_0x207292(0xae)]('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(!isTopLevelConfigKey(_0x31d9b4))throw CliErrors['validation']('Top-level\x20key\x20\x22'+_0x31d9b4+'\x22\x20is\x20not\x20settable.',_0x207292(0xab)+getTopLevelConfigKeySummary());if(CONFIG_ENUM_VALUES[_0x31d9b4]&&!CONFIG_ENUM_VALUES[_0x31d9b4][_0x207292(0xa4)](_0x2143b8))throw CliErrors[_0x207292(0xae)](_0x207292(0xbb)+_0x31d9b4+_0x207292(0xb2)+CONFIG_ENUM_VALUES[_0x31d9b4][_0x207292(0xb5)](',\x20'));if(_0x31d9b4===_0x207292(0xc4)&&!normalizeLocale(_0x2143b8))throw CliErrors['validation'](_0x207292(0x9c),_0x207292(0x9e));DOMAIN_CONFIG_FIELDS[_0x207292(0xa4)](_0x31d9b4)&&(_0x1c9a6e=normalizeDomainOrigin(_0x31d9b4,_0x2143b8));const _0x400483={'global':_0x133638[_0x207292(0xc3)]('global')},_0x42d77d=resolveWriteScope(_0x400483),_0x2d8b2f=readScopedConfig(_0x42d77d);_0x31d9b4===_0x207292(0xa2)&&(_0x152b61=_0x207292(0x9a),delete _0x2d8b2f['app']);_0x31d9b4===_0x207292(0xc4)&&(_0x1c9a6e=normalizeLocale(_0x2143b8));if(_0x31d9b4===_0x207292(0xa6)){_0x1c9a6e=normalizeEnv(_0x2143b8);if(!isProduction(_0x1c9a6e)&&!isDaily(_0x1c9a6e))throw CliErrors[_0x207292(0xae)](_0x207292(0xb9),'Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.');}if(_0x31d9b4===_0x207292(0x9a)){const _0x12226d=_0x2d8b2f[_0x207292(0xa0)]&&typeof _0x2d8b2f['apps']===_0x207292(0x98)?Object[_0x207292(0xc0)](_0x2d8b2f[_0x207292(0xa0)]):[];if(_0x12226d[_0x207292(0xa9)]>0x0)throw CliErrors['validation'](_0x207292(0xa8),_0x207292(0xac)+CLI_BIN_NAME+'\x20workspace\x20add\x20<name>\x20--appcode\x20'+_0x1c9a6e+_0x207292(0xbe)+CLI_BIN_NAME+'\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.');const _0x31881e=buildCanonicalProjectConfig({..._0x2d8b2f},{'appCodes':[_0x1c9a6e],'env':typeof _0x2d8b2f[_0x207292(0xa6)]===_0x207292(0xb4)?_0x2d8b2f[_0x207292(0xa6)]:undefined});writeScopedConfig(_0x31881e,_0x42d77d);const _0x1eb7ec=_0x42d77d===_0x207292(0xaf)?_0x207292(0x9f):'Project';return{'ok':!![],'message':'✓\x20'+_0x1eb7ec+_0x207292(0xbc)+_0x1c9a6e+'\x20(stored\x20as\x20a\x20single\x20app\x20profile)'};}_0x2d8b2f[_0x152b61]=_0x1c9a6e,writeScopedConfig(_0x2d8b2f,_0x42d77d);const _0x437e16=_0x42d77d===_0x207292(0xaf)?_0x207292(0x9f):'Project';return{'ok':!![],'message':'✓\x20'+_0x437e16+'\x20'+_0x152b61+'\x20set\x20to:\x20'+_0x1c9a6e};}export const configSetDefinition={'service':a56_0x5ae3b8(0xb1),'command':a56_0x5ae3b8(0x9d),'description':a56_0x5ae3b8(0xb6),'risk':'write','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':'string','description':getConfigCommandKeyDescription(),'required':!![]},{'name':'value','type':a56_0x5ae3b8(0xb4),'description':a56_0x5ae3b8(0xaa),'required':!![]},{'name':a56_0x5ae3b8(0xaf),'type':a56_0x5ae3b8(0xa1),'description':'Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xaf0843,_0x1b47d1){var _0x361d01=a57_0xb612,_0x2bc88b=_0xaf0843();while(!![]){try{var _0x1f081e=-parseInt(_0x361d01(0x1c2))/0x1*(-parseInt(_0x361d01(0x1c0))/0x2)+parseInt(_0x361d01(0x1bc))/0x3*(parseInt(_0x361d01(0x1b9))/0x4)+-parseInt(_0x361d01(0x1c3))/0x5*(-parseInt(_0x361d01(0x1bd))/0x6)+parseInt(_0x361d01(0x1bb))/0x7+parseInt(_0x361d01(0x1ba))/0x8+-parseInt(_0x361d01(0x1c4))/0x9+-parseInt(_0x361d01(0x1c8))/0xa;if(_0x1f081e===_0x1b47d1)break;else _0x2bc88b['push'](_0x2bc88b['shift']());}catch(_0x3c2105){_0x2bc88b['push'](_0x2bc88b['shift']());}}}(a57_0x59c8,0x5080d));function a57_0xb612(_0x564c4e,_0x424a2f){_0x564c4e=_0x564c4e-0x1b9;var _0x59c8d6=a57_0x59c8();var _0xb612c0=_0x59c8d6[_0x564c4e];return _0xb612c0;}function a57_0x59c8(){var _0xe172d8=['global','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','12888880LJyCOy','4IJOcjG','769624cWlaEi','1711066aOdevT','1419039ImughX','954NJhiZk','\x20workspace\x20init\x20--appcode\x20<code>`\x20first.','project','7016iFOwMt','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','113oVHfuS','20105LnefFa','2076912uLgkQg','validation'];a57_0x59c8=function(){return _0xe172d8;};return a57_0x59c8();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x282efb){var _0x36dff4=a57_0xb612;if(_0x282efb[_0x36dff4(0x1c6)])return _0x36dff4(0x1c6);if(!isInProject())throw CliErrors[_0x36dff4(0x1c5)](_0x36dff4(0x1c1),_0x36dff4(0x1c7)+CLI_BIN_NAME+_0x36dff4(0x1be));return _0x36dff4(0x1bf);}export function readScopedConfig(_0x1fa9d7){return readConfigFile(resolveWriteConfigPath(_0x1fa9d7));}export function writeScopedConfig(_0x52cb2c,_0x4c7411){writeConfigFile(resolveWriteConfigPath(_0x4c7411),_0x52cb2c);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a58_0x5239a5=a58_0x2c41;(function(_0x290733,_0x3e0f2a){const _0x2e47fb=a58_0x2c41,_0x35b394=_0x290733();while(!![]){try{const _0x3aa1a9=parseInt(_0x2e47fb(0xfa))/0x1*(parseInt(_0x2e47fb(0xef))/0x2)+-parseInt(_0x2e47fb(0xd2))/0x3+parseInt(_0x2e47fb(0xeb))/0x4*(-parseInt(_0x2e47fb(0xb5))/0x5)+parseInt(_0x2e47fb(0xd6))/0x6*(parseInt(_0x2e47fb(0xc1))/0x7)+parseInt(_0x2e47fb(0xe9))/0x8+parseInt(_0x2e47fb(0xc0))/0x9*(-parseInt(_0x2e47fb(0xb4))/0xa)+-parseInt(_0x2e47fb(0xcb))/0xb*(-parseInt(_0x2e47fb(0xed))/0xc);if(_0x3aa1a9===_0x3e0f2a)break;else _0x35b394['push'](_0x35b394['shift']());}catch(_0x5a7b6a){_0x35b394['push'](_0x35b394['shift']());}}}(a58_0x1149,0x8dc36));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_0x5239a5(0xd7),METADATA_BACKEND_PATH='/smartapi/question/er-config/business-group/edit',UNGROUPED_BUSINESS_GROUP=a58_0x5239a5(0xde);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x232496,input:_0x591884,dryRun:_0x2d579f}){const _0x1317aa=a58_0x5239a5;validateInput(_0x591884);const _0x1a8843=normalizeBusinessGroupArgument(_0x591884[_0x1317aa(0xfb)]),_0x118872=await getDatasetDetail(_0x591884[_0x1317aa(0xbe)]),_0x4375ed=resolveBusinessGroupDataset(_0x118872,_0x591884['code']);assertBusinessGroupUpdateSupported(_0x4375ed,_0x1a8843);const _0xec95de=loadCurrentBusinessGroup(_0x118872,_0x4375ed);assertExpectedBusinessGroup(_0xec95de,_0x591884[_0x1317aa(0xd0)]);const _0x3d7b56=buildBackendPlan(_0x232496,_0x4375ed,_0x1a8843),_0x2017b5=_0xec95de!==_0x1a8843;let _0x88db9;if(_0x2017b5&&!_0x2d579f){_0x3d7b56[_0x1317aa(0xf6)]===_0x1317aa(0xc9)?await updateDbTableBusinessGroup(_0x3d7b56[_0x1317aa(0xe3)]):await updateErBusinessGroup(_0x3d7b56['payload']);const _0x883cf3=await getDatasetDetail(_0x4375ed[_0x1317aa(0xbe)]),_0x38371b=resolveBusinessGroupDataset(_0x883cf3,_0x4375ed[_0x1317aa(0xbe)]),_0x3b1f33=loadCurrentBusinessGroup(_0x883cf3,_0x38371b);if(_0x3b1f33!==_0x1a8843)throw CliErrors[_0x1317aa(0xb6)]('Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','Expected\x20'+JSON[_0x1317aa(0xbd)](displayBusinessGroup(_0x1a8843))+_0x1317aa(0xf4)+JSON['stringify'](displayBusinessGroup(_0x3b1f33))+'.');_0x88db9={'verified':!![],'status':'matched','afterReadback':{'businessGroup':displayBusinessGroup(_0x3b1f33)}};}else!_0x2017b5&&(_0x88db9={'verified':!![],'status':_0x1317aa(0xe7),'afterReadback':{'businessGroup':displayBusinessGroup(_0xec95de)}});const _0x3b01b8={'operation':'update','appCode':_0x232496,'selector':{'code':_0x4375ed[_0x1317aa(0xbe)]},'dataset':{'id':_0x4375ed['id'],'code':_0x4375ed['code'],'name':_0x4375ed[_0x1317aa(0xd5)],'sourceType':_0x4375ed[_0x1317aa(0xf7)]},'before':{'businessGroup':displayBusinessGroup(_0xec95de)},'after':{'businessGroup':displayBusinessGroup(_0x1a8843)},'changed':_0x2017b5,'dryRun':_0x2d579f,'submitted':_0x2017b5&&!_0x2d579f,'backend':{'method':_0x3d7b56['method'],'path':_0x3d7b56['path'],'payload':_0x3d7b56['payload']},..._0x88db9?{'verification':_0x88db9}:{},'warnings':[]};return{'ok':!![],'data':_0x3b01b8,'message':_0x2017b5?_0x2d579f?_0x1317aa(0xb1)+_0x4375ed[_0x1317aa(0xbe)]:_0x1317aa(0xf9)+_0x4375ed[_0x1317aa(0xbe)]:_0x1317aa(0xdd)+_0x4375ed[_0x1317aa(0xbe)]};}export const datasetBusinessGroupUpdate={'service':a58_0x5239a5(0xea),'command':a58_0x5239a5(0xcf),'description':'Update\x20business\x20scenario\x20group','risk':'write','flags':[CODE_FLAG,{'name':a58_0x5239a5(0xda),'type':'string','required':!![],'description':'Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it'},{'name':'expect-business-group','type':'string','required':![],'description':a58_0x5239a5(0xe5)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2023b7){validateInput(readBusinessGroupUpdateInput(_0x2023b7));},async 'dryRun'(_0x5376cf){const _0x302fd4=a58_0x5239a5,_0x1cd231=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x5376cf[_0x302fd4(0xc2)],'input':readBusinessGroupUpdateInput(_0x5376cf),'dryRun':!![]});return{'method':_0x1cd231[_0x302fd4(0xe0)][_0x302fd4(0xe2)]['method'],'url':_0x1cd231[_0x302fd4(0xe0)][_0x302fd4(0xe2)][_0x302fd4(0xcd)],'body':_0x1cd231[_0x302fd4(0xe0)]['backend'][_0x302fd4(0xe3)],'description':_0x1cd231[_0x302fd4(0xdc)],..._0x1cd231['data']};},async 'execute'(_0x44da53){const _0x43ac96=a58_0x5239a5;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x44da53[_0x43ac96(0xc2)],'input':readBusinessGroupUpdateInput(_0x44da53),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0xf61df5){const _0x25c235=a58_0x5239a5,_0x2d427f=_0xf61df5[_0x25c235(0xc4)](_0x25c235(0xf1));return{'code':trim(_0xf61df5[_0x25c235(0xc4)](_0x25c235(0xbe))),'businessGroup':_0xf61df5['str'](_0x25c235(0xda)),'expectBusinessGroup':_0x2d427f===undefined||_0x2d427f===''?undefined:_0x2d427f};}function validateInput(_0x5441bf){const _0x74b3d4=a58_0x5239a5;if(!trim(_0x5441bf['code']))throw CliErrors['validation'](_0x74b3d4(0xec));if(_0x5441bf['businessGroup']===undefined)throw CliErrors[_0x74b3d4(0xf0)]('--business-group\x20is\x20required');if(!trim(_0x5441bf[_0x74b3d4(0xfb)]))throw CliErrors['validation'](_0x74b3d4(0xd8));}function assertBusinessGroupUpdateSupported(_0x4ff213,_0x5dc1c1){const _0x585b9b=a58_0x5239a5;if(_0x4ff213[_0x585b9b(0xf7)]===_0x585b9b(0xe1)&&!_0x5dc1c1)throw CliErrors['validation'](_0x585b9b(0xce));}function resolveBusinessGroupDataset(_0x346b73,_0x1e345a){const _0x561b31=a58_0x5239a5,_0x5773a1=asPlainObject(_0x346b73[_0x561b31(0xea)]),_0x24e896=asPlainObject(_0x346b73['dbtableConfig']),_0xfb4cf2=resolveSourceType(_0x346b73,_0x5773a1,_0x24e896),_0x338cdf=firstString(_0x346b73[_0x561b31(0xbb)],_0x346b73[_0x561b31(0xbe)],_0x5773a1[_0x561b31(0xc6)],_0x1e345a)||_0x1e345a;return{'id':firstNumber(_0x346b73[_0x561b31(0xc8)],_0x346b73['id'],_0x5773a1['datasetId'])??firstString(_0x346b73[_0x561b31(0xc8)],_0x346b73['id'],_0x5773a1[_0x561b31(0xb3)])??null,'code':_0x338cdf,'name':firstString(_0x346b73[_0x561b31(0xd5)],_0x5773a1[_0x561b31(0xe4)],_0x5773a1['name'])||null,'sourceType':_0xfb4cf2,'dbTableSelector':_0xfb4cf2===_0x561b31(0xe1)?{'dbLinkId':firstNumber(_0x24e896[_0x561b31(0xba)]),'tableName':firstString(_0x24e896[_0x561b31(0xc7)])||null}:null};}function resolveSourceType(_0x5ae8e4,_0x164a50,_0xb25024){const _0x5a0942=a58_0x5239a5,_0x3b48cd=firstString(_0x5ae8e4['source'],_0x5ae8e4[_0x5a0942(0xf7)],_0x164a50['source'],_0x164a50[_0x5a0942(0xf7)])?.[_0x5a0942(0xbc)]()[_0x5a0942(0xdb)]();if(_0x3b48cd===_0x5a0942(0xe1)||_0x3b48cd===_0x5a0942(0xf2))return _0x3b48cd;if(Object[_0x5a0942(0xf3)](_0xb25024)[_0x5a0942(0xd4)]>0x0)return'DB_TABLE';throw CliErrors[_0x5a0942(0xf0)](_0x5a0942(0xb2));}function loadCurrentBusinessGroup(_0xe070df,_0x11b403){const _0x526427=a58_0x5239a5,_0x248aa9=readBusinessGroupFromDatasetDetail(_0xe070df,_0x11b403[_0x526427(0xf7)]);if(_0x248aa9[_0x526427(0xc5)])return normalizeBusinessGroup(_0x248aa9['value']);return'';}function readBusinessGroupFromDatasetDetail(_0x52456f,_0x294c24){const _0x348681=a58_0x5239a5,_0x3abf6d=asPlainObject(_0x52456f[_0x348681(0xea)]),_0x5ab22f=firstPresent(_0x52456f['businessGroup']);if(_0x5ab22f[_0x348681(0xc5)])return _0x5ab22f;const _0x79e770=firstPresent(_0x3abf6d[_0x348681(0xfb)]);if(_0x79e770[_0x348681(0xc5)])return _0x79e770;if(_0x294c24===_0x348681(0xe1))return{'found':![]};const _0x1e360d=readBusinessGroupFromExtend(_0x52456f[_0x348681(0xd3)]);if(_0x1e360d[_0x348681(0xc5)])return _0x1e360d;return readBusinessGroupFromExtend(_0x3abf6d[_0x348681(0xd3)]);}function readBusinessGroupFromExtend(_0x416cc8){const _0x547f99=a58_0x5239a5;if(_0x416cc8===undefined||_0x416cc8===null||_0x416cc8==='')return{'found':![]};if(typeof _0x416cc8===_0x547f99(0xb8))try{const _0x3da4ea=JSON[_0x547f99(0xf8)](_0x416cc8);return readBusinessGroupFromExtend(_0x3da4ea);}catch{return{'found':![]};}const _0x237b75=asPlainObject(_0x416cc8);if(Object[_0x547f99(0xe6)][_0x547f99(0xcc)][_0x547f99(0xd1)](_0x237b75,_0x547f99(0xfb)))return{'found':!![],'value':_0x237b75[_0x547f99(0xfb)]};return{'found':![]};}function firstPresent(..._0x41a9df){for(const _0x389131 of _0x41a9df){if(_0x389131!==undefined&&_0x389131!==null)return{'found':!![],'value':_0x389131};}return{'found':![]};}function assertExpectedBusinessGroup(_0x42e1a7,_0x40c3ed){const _0x33c7f1=a58_0x5239a5;if(_0x40c3ed===undefined)return;const _0x540d3d=normalizeBusinessGroupArgument(_0x40c3ed);if(_0x42e1a7!==_0x540d3d)throw CliErrors[_0x33c7f1(0xf0)](_0x33c7f1(0xe8),_0x33c7f1(0xdf)+JSON[_0x33c7f1(0xbd)](_0x540d3d)+_0x33c7f1(0xf4)+JSON[_0x33c7f1(0xbd)](_0x42e1a7));}function a58_0x1149(){const _0x4a0776=['extend','length','name','6rGJEFv','/smartapi/dblink/updateTableBusinessGroup','--business-group\x20must\x20not\x20be\x20blank','metadata','business-group','toUpperCase','message','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','ungrouped','Expected\x20','data','DB_TABLE','backend','payload','datasetName','Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing','prototype','unchanged','Expectation\x20mismatch\x20at\x20businessGroup','1152656PIQPwn','dataset','4xTnbvx','--code\x20is\x20required','101964eQggIu','isFinite','1070074vfWsWJ','validation','expect-business-group','METADATA','keys',',\x20actual\x20','dbTableSelector','kind','sourceType','parse','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','1PYJTuY','businessGroup','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.','datasetId','220fQwxSv','4848315cmIbQh','apiError','DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.','string','number','dbId','modelCode','trim','stringify','code','isArray','427383OFjvrB','1498798VJOYoU','appCode','dbLinkId','str','found','datasetCode','tableName','modelId','db-table','object','2827dcCSFd','hasOwnProperty','path','Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.','business-group-update','expectBusinessGroup','call','1445769qZLXcx'];a58_0x1149=function(){return _0x4a0776;};return a58_0x1149();}function buildBackendPlan(_0x1b185f,_0x2c63ee,_0x1ba3e8){const _0x340fbf=a58_0x5239a5;if(_0x2c63ee[_0x340fbf(0xf7)]===_0x340fbf(0xe1)){if(!_0x2c63ee['dbTableSelector']||_0x2c63ee[_0x340fbf(0xf5)]['dbLinkId']===null||!_0x2c63ee[_0x340fbf(0xf5)][_0x340fbf(0xc7)])throw CliErrors[_0x340fbf(0xf0)](_0x340fbf(0xb7),'Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.');return{'kind':_0x340fbf(0xc9),'method':'POST','path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0x2c63ee[_0x340fbf(0xf5)][_0x340fbf(0xc3)],'tableName':_0x2c63ee['dbTableSelector'][_0x340fbf(0xc7)],'businessGroup':_0x1ba3e8}};}return{'kind':_0x340fbf(0xd9),'method':'POST','path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x1b185f,'datasetCode':_0x2c63ee[_0x340fbf(0xbe)],'businessGroup':_0x1ba3e8}};}function normalizeBusinessGroup(_0x1a47aa){const _0x3261be=a58_0x5239a5;if(_0x1a47aa===undefined||_0x1a47aa===null)return'';return String(_0x1a47aa)[_0x3261be(0xbc)]();}function normalizeBusinessGroupArgument(_0x37b9c0){const _0x574262=normalizeBusinessGroup(_0x37b9c0);return _0x574262===UNGROUPED_BUSINESS_GROUP?'':_0x574262;}function displayBusinessGroup(_0x3be721){return _0x3be721||UNGROUPED_BUSINESS_GROUP;}function a58_0x2c41(_0x3f77cf,_0x19b87b){_0x3f77cf=_0x3f77cf-0xb1;const _0x114904=a58_0x1149();let _0x2c419f=_0x114904[_0x3f77cf];return _0x2c419f;}function asPlainObject(_0x74415b){const _0x2c9d26=a58_0x5239a5;if(!_0x74415b||typeof _0x74415b!==_0x2c9d26(0xca)||Array[_0x2c9d26(0xbf)](_0x74415b))return{};return _0x74415b;}function firstString(..._0x5ac43c){const _0xe8f6a3=a58_0x5239a5;for(const _0x4a2b2d of _0x5ac43c){if(typeof _0x4a2b2d==='string'&&_0x4a2b2d[_0xe8f6a3(0xbc)]())return _0x4a2b2d[_0xe8f6a3(0xbc)]();if(typeof _0x4a2b2d==='number'&&Number[_0xe8f6a3(0xee)](_0x4a2b2d))return String(_0x4a2b2d);}return undefined;}function firstNumber(..._0x467628){const _0x2937c2=a58_0x5239a5;for(const _0x29832b of _0x467628){if(typeof _0x29832b===_0x2937c2(0xb9)&&Number['isFinite'](_0x29832b))return _0x29832b;if(typeof _0x29832b===_0x2937c2(0xb8)&&_0x29832b[_0x2937c2(0xbc)]()&&Number[_0x2937c2(0xee)](Number(_0x29832b)))return Number(_0x29832b);}return null;}function trim(_0x2f5e50){const _0x422fdd=a58_0x5239a5;return String(_0x2f5e50||'')[_0x422fdd(0xbc)]();}
|
|
1
|
+
const a58_0x379cb0=a58_0x57ec;(function(_0x3e58a8,_0x470b49){const _0x1834e9=a58_0x57ec,_0x196d9c=_0x3e58a8();while(!![]){try{const _0x70cda5=parseInt(_0x1834e9(0x126))/0x1+-parseInt(_0x1834e9(0x130))/0x2+parseInt(_0x1834e9(0x103))/0x3*(parseInt(_0x1834e9(0xf8))/0x4)+parseInt(_0x1834e9(0x117))/0x5+parseInt(_0x1834e9(0x12b))/0x6+-parseInt(_0x1834e9(0x113))/0x7*(-parseInt(_0x1834e9(0x131))/0x8)+-parseInt(_0x1834e9(0x12d))/0x9*(parseInt(_0x1834e9(0x12e))/0xa);if(_0x70cda5===_0x470b49)break;else _0x196d9c['push'](_0x196d9c['shift']());}catch(_0x639b56){_0x196d9c['push'](_0x196d9c['shift']());}}}(a58_0x476c,0xbefc3));import{APPCODE_FLAG_OPTIONAL,CODE_FLAG}from'../../commands/common/flags.js';function a58_0x57ec(_0x2b587d,_0x3e9a3c){_0x2b587d=_0x2b587d-0xf8;const _0x476cd8=a58_0x476c();let _0x57ec1b=_0x476cd8[_0x2b587d];return _0x57ec1b;}import{getDatasetDetail,updateDbTableBusinessGroup,updateErBusinessGroup}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const DB_TABLE_BACKEND_PATH=a58_0x379cb0(0x104),METADATA_BACKEND_PATH=a58_0x379cb0(0x121),UNGROUPED_BUSINESS_GROUP=a58_0x379cb0(0x11f);export async function buildDatasetBusinessGroupUpdateResult({appCode:_0x4b5580,input:_0x1eba9c,dryRun:_0x4f9b8e}){const _0x267621=a58_0x379cb0;validateInput(_0x1eba9c);const _0x28c981=normalizeBusinessGroupArgument(_0x1eba9c['businessGroup']),_0xca3dcc=await getDatasetDetail(_0x1eba9c['code']),_0x59a569=resolveBusinessGroupDataset(_0xca3dcc,_0x1eba9c[_0x267621(0xf9)]);assertBusinessGroupUpdateSupported(_0x59a569,_0x28c981);const _0x1c9150=loadCurrentBusinessGroup(_0xca3dcc,_0x59a569);assertExpectedBusinessGroup(_0x1c9150,_0x1eba9c['expectBusinessGroup']);const _0x12d5e0=buildBackendPlan(_0x4b5580,_0x59a569,_0x28c981),_0x1f9b41=_0x1c9150!==_0x28c981;let _0x82d80b;if(_0x1f9b41&&!_0x4f9b8e){_0x12d5e0[_0x267621(0xfb)]===_0x267621(0x133)?await updateDbTableBusinessGroup(_0x12d5e0[_0x267621(0xfa)]):await updateErBusinessGroup(_0x12d5e0[_0x267621(0xfa)]);const _0x258cd2=await getDatasetDetail(_0x59a569['code']),_0x24ad4b=resolveBusinessGroupDataset(_0x258cd2,_0x59a569['code']),_0x33b0b3=loadCurrentBusinessGroup(_0x258cd2,_0x24ad4b);if(_0x33b0b3!==_0x28c981)throw CliErrors[_0x267621(0xfd)](_0x267621(0x111),_0x267621(0x137)+JSON[_0x267621(0x12f)](displayBusinessGroup(_0x28c981))+_0x267621(0x100)+JSON[_0x267621(0x12f)](displayBusinessGroup(_0x33b0b3))+'.');_0x82d80b={'verified':!![],'status':_0x267621(0x13e),'afterReadback':{'businessGroup':displayBusinessGroup(_0x33b0b3)}};}else!_0x1f9b41&&(_0x82d80b={'verified':!![],'status':_0x267621(0xff),'afterReadback':{'businessGroup':displayBusinessGroup(_0x1c9150)}});const _0x53f6be={'operation':'update','appCode':_0x4b5580,'selector':{'code':_0x59a569['code']},'dataset':{'id':_0x59a569['id'],'code':_0x59a569['code'],'name':_0x59a569['name'],'sourceType':_0x59a569[_0x267621(0x140)]},'before':{'businessGroup':displayBusinessGroup(_0x1c9150)},'after':{'businessGroup':displayBusinessGroup(_0x28c981)},'changed':_0x1f9b41,'dryRun':_0x4f9b8e,'submitted':_0x1f9b41&&!_0x4f9b8e,'backend':{'method':_0x12d5e0[_0x267621(0x134)],'path':_0x12d5e0[_0x267621(0x101)],'payload':_0x12d5e0[_0x267621(0xfa)]},..._0x82d80b?{'verification':_0x82d80b}:{},'warnings':[]};return{'ok':!![],'data':_0x53f6be,'message':_0x1f9b41?_0x4f9b8e?_0x267621(0x106)+_0x59a569['code']:_0x267621(0x128)+_0x59a569[_0x267621(0xf9)]:_0x267621(0x110)+_0x59a569[_0x267621(0xf9)]};}export const datasetBusinessGroupUpdate={'service':a58_0x379cb0(0x118),'command':a58_0x379cb0(0x114),'description':a58_0x379cb0(0x116),'risk':a58_0x379cb0(0x13a),'flags':[CODE_FLAG,{'name':a58_0x379cb0(0xfc),'type':a58_0x379cb0(0x12c),'required':!![],'description':a58_0x379cb0(0x136)},{'name':'expect-business-group','type':a58_0x379cb0(0x12c),'required':![],'description':a58_0x379cb0(0x13d)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x40793f){validateInput(readBusinessGroupUpdateInput(_0x40793f));},async 'dryRun'(_0x53a90b){const _0x55141d=a58_0x379cb0,_0x37a511=await buildDatasetBusinessGroupUpdateResult({'appCode':_0x53a90b[_0x55141d(0x135)],'input':readBusinessGroupUpdateInput(_0x53a90b),'dryRun':!![]});return{'method':_0x37a511[_0x55141d(0x10a)][_0x55141d(0x11a)][_0x55141d(0x134)],'url':_0x37a511[_0x55141d(0x10a)][_0x55141d(0x11a)][_0x55141d(0x101)],'body':_0x37a511[_0x55141d(0x10a)]['backend'][_0x55141d(0xfa)],'description':_0x37a511['message'],..._0x37a511[_0x55141d(0x10a)]};},async 'execute'(_0x3c42de){const _0x45f7fa=a58_0x379cb0;return buildDatasetBusinessGroupUpdateResult({'appCode':_0x3c42de[_0x45f7fa(0x135)],'input':readBusinessGroupUpdateInput(_0x3c42de),'dryRun':![]});}};function readBusinessGroupUpdateInput(_0x221184){const _0x306ab2=a58_0x379cb0,_0x15fb7b=_0x221184[_0x306ab2(0xfe)](_0x306ab2(0x11e));return{'code':trim(_0x221184[_0x306ab2(0xfe)](_0x306ab2(0xf9))),'businessGroup':_0x221184[_0x306ab2(0xfe)](_0x306ab2(0xfc)),'expectBusinessGroup':_0x15fb7b===undefined||_0x15fb7b===''?undefined:_0x15fb7b};}function validateInput(_0xbd00c0){const _0x5251c5=a58_0x379cb0;if(!trim(_0xbd00c0[_0x5251c5(0xf9)]))throw CliErrors[_0x5251c5(0x129)]('--code\x20is\x20required');if(_0xbd00c0['businessGroup']===undefined)throw CliErrors[_0x5251c5(0x129)]('--business-group\x20is\x20required');if(!trim(_0xbd00c0[_0x5251c5(0x107)]))throw CliErrors[_0x5251c5(0x129)](_0x5251c5(0x125));}function assertBusinessGroupUpdateSupported(_0x2a3555,_0x1030dc){const _0x5b3fc5=a58_0x379cb0;if(_0x2a3555[_0x5b3fc5(0x140)]===_0x5b3fc5(0x112)&&!_0x1030dc)throw CliErrors[_0x5b3fc5(0x129)](_0x5b3fc5(0x10d));}function resolveBusinessGroupDataset(_0x40fc99,_0x524750){const _0x11080c=a58_0x379cb0,_0x46b413=asPlainObject(_0x40fc99['dataset']),_0x51ba61=asPlainObject(_0x40fc99['dbtableConfig']),_0x4063ce=resolveSourceType(_0x40fc99,_0x46b413,_0x51ba61),_0x57f7c1=firstString(_0x40fc99[_0x11080c(0x12a)],_0x40fc99[_0x11080c(0xf9)],_0x46b413[_0x11080c(0x11d)],_0x524750)||_0x524750;return{'id':firstNumber(_0x40fc99[_0x11080c(0x122)],_0x40fc99['id'],_0x46b413['datasetId'])??firstString(_0x40fc99[_0x11080c(0x122)],_0x40fc99['id'],_0x46b413['datasetId'])??null,'code':_0x57f7c1,'name':firstString(_0x40fc99[_0x11080c(0x123)],_0x46b413[_0x11080c(0x119)],_0x46b413[_0x11080c(0x123)])||null,'sourceType':_0x4063ce,'dbTableSelector':_0x4063ce==='DB_TABLE'?{'dbLinkId':firstNumber(_0x51ba61[_0x11080c(0x127)]),'tableName':firstString(_0x51ba61[_0x11080c(0x13c)])||null}:null};}function a58_0x476c(){const _0x5ef55e=['business-group-update','POST','Update\x20business\x20scenario\x20group','5391685aUhITM','dataset','datasetName','backend','found','parse','datasetCode','expect-business-group','ungrouped','number','/smartapi/question/er-config/business-group/edit','modelId','name','dbTableSelector','--business-group\x20must\x20not\x20be\x20blank','37544pdibVU','dbId','Updated\x20business\x20scenario\x20group\x20for\x20dataset\x20','validation','modelCode','3390966lsYWof','string','117lruiKB','2270810BqBBtj','stringify','175814BrLEaG','10232SWXhFv','dbLinkId','db-table','method','appCode','Business\x20scenario\x20group\x20(not\x20technical):\x20use\x20<scenario>,\x20<domain>---<scenario>\x20when\x20needed;\x20METADATA\x20accepts\x20ungrouped\x20to\x20clear\x20it','Expected\x20','DB_TABLE\x20dataset\x20requires\x20dbtableConfig.dbId\x20and\x20tableName.','toUpperCase','write','prototype','tableName','Expected\x20current\x20business\x20scenario\x20group;\x20use\x20ungrouped\x20to\x20expect\x20no\x20group;\x20mismatch\x20aborts\x20without\x20writing','matched','Expectation\x20mismatch\x20at\x20businessGroup','sourceType','151408MZiLYa','code','payload','kind','business-group','apiError','str','unchanged',',\x20actual\x20','path','extend','51OlSwQx','/smartapi/dblink/updateTableBusinessGroup','METADATA','Dry-run:\x20business\x20scenario\x20group\x20would\x20change\x20for\x20dataset\x20','businessGroup','trim','source','data','length','isFinite','Clearing\x20business\x20scenario\x20groups\x20is\x20not\x20supported\x20for\x20DB_TABLE\x20datasets.','value','isArray','No\x20changes\x20for\x20business\x20scenario\x20group\x20on\x20dataset\x20','Business\x20scenario\x20group\x20update\x20did\x20not\x20match\x20dataset\x20detail\x20readback.','DB_TABLE','8197WWLFSl'];a58_0x476c=function(){return _0x5ef55e;};return a58_0x476c();}function resolveSourceType(_0x3c35b3,_0x18dc12,_0x20b246){const _0xc8150=a58_0x379cb0,_0x5b5850=firstString(_0x3c35b3[_0xc8150(0x109)],_0x3c35b3[_0xc8150(0x140)],_0x18dc12[_0xc8150(0x109)],_0x18dc12[_0xc8150(0x140)])?.['trim']()[_0xc8150(0x139)]();if(_0x5b5850===_0xc8150(0x112)||_0x5b5850===_0xc8150(0x105))return _0x5b5850;if(Object['keys'](_0x20b246)[_0xc8150(0x10b)]>0x0)return _0xc8150(0x112);throw CliErrors[_0xc8150(0x129)]('Dataset\x20sourceType\x20is\x20required\x20and\x20must\x20be\x20DB_TABLE\x20or\x20METADATA.');}function loadCurrentBusinessGroup(_0x297277,_0x3c2709){const _0xad952f=a58_0x379cb0,_0x372f38=readBusinessGroupFromDatasetDetail(_0x297277,_0x3c2709[_0xad952f(0x140)]);if(_0x372f38['found'])return normalizeBusinessGroup(_0x372f38[_0xad952f(0x10e)]);return'';}function readBusinessGroupFromDatasetDetail(_0x5dff80,_0x4ebd8d){const _0x1797a1=a58_0x379cb0,_0x3cbd3d=asPlainObject(_0x5dff80[_0x1797a1(0x118)]),_0x110f31=firstPresent(_0x5dff80[_0x1797a1(0x107)]);if(_0x110f31['found'])return _0x110f31;const _0x10233f=firstPresent(_0x3cbd3d['businessGroup']);if(_0x10233f[_0x1797a1(0x11b)])return _0x10233f;if(_0x4ebd8d===_0x1797a1(0x112))return{'found':![]};const _0x4b7120=readBusinessGroupFromExtend(_0x5dff80['extend']);if(_0x4b7120['found'])return _0x4b7120;return readBusinessGroupFromExtend(_0x3cbd3d[_0x1797a1(0x102)]);}function readBusinessGroupFromExtend(_0x56a5b3){const _0x394138=a58_0x379cb0;if(_0x56a5b3===undefined||_0x56a5b3===null||_0x56a5b3==='')return{'found':![]};if(typeof _0x56a5b3===_0x394138(0x12c))try{const _0x4cb570=JSON[_0x394138(0x11c)](_0x56a5b3);return readBusinessGroupFromExtend(_0x4cb570);}catch{return{'found':![]};}const _0x378de8=asPlainObject(_0x56a5b3);if(Object[_0x394138(0x13b)]['hasOwnProperty']['call'](_0x378de8,_0x394138(0x107)))return{'found':!![],'value':_0x378de8['businessGroup']};return{'found':![]};}function firstPresent(..._0x379080){for(const _0x2fa1a1 of _0x379080){if(_0x2fa1a1!==undefined&&_0x2fa1a1!==null)return{'found':!![],'value':_0x2fa1a1};}return{'found':![]};}function assertExpectedBusinessGroup(_0x346d74,_0x2733e7){const _0x2a1f52=a58_0x379cb0;if(_0x2733e7===undefined)return;const _0x39876e=normalizeBusinessGroupArgument(_0x2733e7);if(_0x346d74!==_0x39876e)throw CliErrors[_0x2a1f52(0x129)](_0x2a1f52(0x13f),_0x2a1f52(0x137)+JSON['stringify'](_0x39876e)+_0x2a1f52(0x100)+JSON[_0x2a1f52(0x12f)](_0x346d74));}function buildBackendPlan(_0x5af109,_0xfceb27,_0x13f4e8){const _0x132233=a58_0x379cb0;if(_0xfceb27['sourceType']===_0x132233(0x112)){if(!_0xfceb27[_0x132233(0x124)]||_0xfceb27[_0x132233(0x124)][_0x132233(0x132)]===null||!_0xfceb27['dbTableSelector'][_0x132233(0x13c)])throw CliErrors[_0x132233(0x129)](_0x132233(0x138),'Run\x20dataset\x20detail\x20and\x20complete\x20database\x20analysis\x20before\x20updating\x20the\x20business\x20group.');return{'kind':_0x132233(0x133),'method':_0x132233(0x115),'path':DB_TABLE_BACKEND_PATH,'payload':{'dbLinkId':_0xfceb27[_0x132233(0x124)][_0x132233(0x132)],'tableName':_0xfceb27[_0x132233(0x124)]['tableName'],'businessGroup':_0x13f4e8}};}return{'kind':'metadata','method':_0x132233(0x115),'path':METADATA_BACKEND_PATH,'payload':{'appCode':_0x5af109,'datasetCode':_0xfceb27[_0x132233(0xf9)],'businessGroup':_0x13f4e8}};}function normalizeBusinessGroup(_0x19d416){const _0x1d6d34=a58_0x379cb0;if(_0x19d416===undefined||_0x19d416===null)return'';return String(_0x19d416)[_0x1d6d34(0x108)]();}function normalizeBusinessGroupArgument(_0xeb85d5){const _0x1426a1=normalizeBusinessGroup(_0xeb85d5);return _0x1426a1===UNGROUPED_BUSINESS_GROUP?'':_0x1426a1;}function displayBusinessGroup(_0x3f4916){return _0x3f4916||UNGROUPED_BUSINESS_GROUP;}function asPlainObject(_0x2f9648){const _0x1488f2=a58_0x379cb0;if(!_0x2f9648||typeof _0x2f9648!=='object'||Array[_0x1488f2(0x10f)](_0x2f9648))return{};return _0x2f9648;}function firstString(..._0x2b2169){const _0x54e41c=a58_0x379cb0;for(const _0xef380c of _0x2b2169){if(typeof _0xef380c===_0x54e41c(0x12c)&&_0xef380c[_0x54e41c(0x108)]())return _0xef380c[_0x54e41c(0x108)]();if(typeof _0xef380c===_0x54e41c(0x120)&&Number[_0x54e41c(0x10c)](_0xef380c))return String(_0xef380c);}return undefined;}function firstNumber(..._0x6f66c5){const _0x40819b=a58_0x379cb0;for(const _0x163e76 of _0x6f66c5){if(typeof _0x163e76===_0x40819b(0x120)&&Number[_0x40819b(0x10c)](_0x163e76))return _0x163e76;if(typeof _0x163e76===_0x40819b(0x12c)&&_0x163e76[_0x40819b(0x108)]()&&Number[_0x40819b(0x10c)](Number(_0x163e76)))return Number(_0x163e76);}return null;}function trim(_0x33ff83){const _0x26e5c5=a58_0x379cb0;return String(_0x33ff83||'')[_0x26e5c5(0x108)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a59_0xbfc33a=a59_0xe9a3;(function(_0x141854,_0x446571){const _0x22c04d=a59_0xe9a3,_0x38e817=_0x141854();while(!![]){try{const _0x10dca8=-parseInt(_0x22c04d(0x1e9))/0x1+-parseInt(_0x22c04d(0x1ed))/0x2*(-parseInt(_0x22c04d(0x1f4))/0x3)+-parseInt(_0x22c04d(0x1ea))/0x4+parseInt(_0x22c04d(0x1f7))/0x5+-parseInt(_0x22c04d(0x1f3))/0x6+parseInt(_0x22c04d(0x1eb))/0x7*(parseInt(_0x22c04d(0x1fd))/0x8)+-parseInt(_0x22c04d(0x1e8))/0x9;if(_0x10dca8===_0x446571)break;else _0x38e817['push'](_0x38e817['shift']());}catch(_0x3028c9){_0x38e817['push'](_0x38e817['shift']());}}}(a59_0x1931,0x20b2e));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a59_0xe9a3(_0x1e426c,_0x2eceaf){_0x1e426c=_0x1e426c-0x1e8;const _0x19315b=a59_0x1931();let _0xe9a3f3=_0x19315b[_0x1e426c];return _0xe9a3f3;}import{getErBusinessGroupSummary}from'../../core/api-client.js';function a59_0x1931(){const _0x2c1123=['List\x20DB_TABLE\x20dataset\x20business\x20groups\x20for\x20a\x20database\x20connection;\x20does\x20not\x20include\x20METADATA','1273295XifhvQ','num','appCode','number','dbid','length','192088hJgccL','DB_TABLE','1432674XsPTMJ','92180nljSME','228960YSkRly','7xMfsRG','ungrouped','365326adrchR','businessGroup','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','dataset','business-groups','read','112758psxURy','3wiVQcK','groups'];a59_0x1931=function(){return _0x2c1123;};return a59_0x1931();}export const datasetBusinessGroups={'service':a59_0xbfc33a(0x1f0),'command':a59_0xbfc33a(0x1f1),'description':a59_0xbfc33a(0x1f6),'risk':a59_0xbfc33a(0x1f2),'flags':[{'name':a59_0xbfc33a(0x1fb),'type':a59_0xbfc33a(0x1fa),'required':!![],'description':a59_0xbfc33a(0x1ef)},APPCODE_FLAG_OPTIONAL],async 'execute'(_0x25e4a7){const _0x4bf46f=a59_0xbfc33a,_0x36b87f=_0x25e4a7[_0x4bf46f(0x1f8)](_0x4bf46f(0x1fb)),_0x21bee3=await getErBusinessGroupSummary(_0x25e4a7[_0x4bf46f(0x1f9)],_0x36b87f),_0x53609b=_0x21bee3[_0x4bf46f(0x1f5)]['map'](_0x19b068=>({..._0x19b068,'businessGroup':_0x19b068[_0x4bf46f(0x1ee)]['trim']()||_0x4bf46f(0x1ec)}));return{'ok':!![],'data':{..._0x21bee3,'groups':_0x53609b,'scope':_0x4bf46f(0x1fe)},'message':'Found\x20'+_0x53609b[_0x4bf46f(0x1fc)]+'\x20business\x20group(s)\x20for\x20database\x20connection\x20'+_0x36b87f};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a60_0xf05a92=a60_0x3dd1;(function(_0x4b102c,_0x401a3b){const _0x52a0bc=a60_0x3dd1,_0x5c38e3=_0x4b102c();while(!![]){try{const _0x386084=parseInt(_0x52a0bc(0x16f))/0x1*(parseInt(_0x52a0bc(0x176))/0x2)+parseInt(_0x52a0bc(0x160))/0x3*(-parseInt(_0x52a0bc(0x177))/0x4)+-parseInt(_0x52a0bc(0x15f))/0x5*(parseInt(_0x52a0bc(0x166))/0x6)+parseInt(_0x52a0bc(0x173))/0x7*(-parseInt(_0x52a0bc(0x174))/0x8)+-parseInt(_0x52a0bc(0x165))/0x9+-parseInt(_0x52a0bc(0x169))/0xa+parseInt(_0x52a0bc(0x167))/0xb;if(_0x386084===_0x401a3b)break;else _0x5c38e3['push'](_0x5c38e3['shift']());}catch(_0x377b58){_0x5c38e3['push'](_0x5c38e3['shift']());}}}(a60_0x3e4c,0x5201a));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a60_0xf05a92(0x163),'filter':a60_0xf05a92(0x16b),'getOne':'lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress'};function a60_0x3dd1(_0x32ac09,_0x516bd9){_0x32ac09=_0x32ac09-0x15b;const _0x3e4c54=a60_0x3e4c();let _0x3dd1fb=_0x3e4c54[_0x32ac09];return _0x3dd1fb;}export const RUNTIME_DATA_ACCESS_SUMMARY=a60_0xf05a92(0x15e);function valueToString(_0x253c5f){const _0xbad4cc=a60_0xf05a92;return _0x253c5f==null?'':String(_0x253c5f)[_0xbad4cc(0x161)]();}function getDatasetCode(_0x7b43fb){const _0x2ab80b=a60_0xf05a92;return valueToString(_0x7b43fb[_0x2ab80b(0x168)]??_0x7b43fb['modelCode']??_0x7b43fb['dataset']?.[_0x2ab80b(0x170)]);}function getDatasetName(_0x3c0007){const _0x562915=a60_0xf05a92;return valueToString(_0x3c0007[_0x562915(0x164)]??_0x3c0007[_0x562915(0x178)]?.[_0x562915(0x16c)])||_0x562915(0x162);}function getDatasetSource(_0x1d3f0e){const _0x19b4cf=a60_0xf05a92;return valueToString(_0x1d3f0e[_0x19b4cf(0x15b)]??_0x1d3f0e[_0x19b4cf(0x178)]?.['sourceType'])[_0x19b4cf(0x17a)]();}function getDbtableConfig(_0x353ef1){const _0x4ed582=a60_0xf05a92,_0x295f98=_0x353ef1[_0x4ed582(0x15d)]??_0x353ef1['dbtable'];return _0x295f98&&typeof _0x295f98==='object'?_0x295f98:{};}export function isDbTableBackedDataset(_0x1fbecf){const _0x3d3f8b=a60_0xf05a92,_0x77a010=getDatasetSource(_0x1fbecf);if(_0x77a010===_0x3d3f8b(0x172))return![];const _0x33846b=getDbtableConfig(_0x1fbecf),_0x37adf5=_0x33846b[_0x3d3f8b(0x175)]??_0x33846b['id'],_0xe2f4aa=valueToString(_0x33846b[_0x3d3f8b(0x179)]??_0x1fbecf[_0x3d3f8b(0x179)]??_0x1fbecf[_0x3d3f8b(0x178)]?.['tableName']);return _0x37adf5!==undefined&&_0x37adf5!==null&&_0xe2f4aa['length']>0x0;}export function filterDbTableBackedDatasets(_0x11cf5c){return _0x11cf5c['filter'](_0x3cf1d3=>isDbTableBackedDataset(_0x3cf1d3));}export function buildDbTableBackedRequirementMessage(_0x43d815,_0x540989='SQL\x20schema\x20validation'){const _0x1e9237=a60_0xf05a92,_0x811fbf=getDatasetSource(_0x43d815)||_0x1e9237(0x16d),_0x5b00be=getDatasetName(_0x43d815),_0x3080b2=getDatasetCode(_0x43d815),_0x491db5=_0x3080b2?'\x20('+_0x3080b2+')':'';return['The\x20current\x20dataset\x20\x22'+_0x5b00be+'\x22'+_0x491db5+'\x20is\x20'+_0x811fbf+_0x1e9237(0x15c)+_0x540989+'.',_0x1e9237(0x17b),'Upgrade\x20or\x20migrate\x20this\x20dataset\x20to\x20a\x20DB_TABLE\x20dataset,\x20then\x20continue\x20with\x20the\x20new\x20dataset\x20code.',_0x1e9237(0x16a)+RUNTIME_DATA_ACCESS_COMMANDS[_0x1e9237(0x16e)]+';\x20'+RUNTIME_DATA_ACCESS_COMMANDS[_0x1e9237(0x171)]+'.']['join']('\x20');}export function assertDatasetIsDbTableBacked(_0x2e0d8a,_0x423529){if(!isDbTableBackedDataset(_0x2e0d8a))throw CliErrors['validation'](buildDbTableBackedRequirementMessage(_0x2e0d8a,_0x423529));}function a60_0x3e4c(){const _0x58a720=['lovrabet','name','4243761UWDDXa','530580IENjAk','16045161HUUXdg','code','1283160rBTEws','To\x20inspect\x20real\x20runtime\x20rows,\x20switch\x20to\x20lovrabet\x20CLI:\x20','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','datasetName','UNKNOWN','filter','562607dApUQy','datasetCode','getOne','METADATA','647269IWmDVq','8ZzMIoH','dbId','2CzroNw','79916cncvGU','dataset','tableName','toUpperCase','Reason:\x20schema\x20introspection\x20and\x20custom\x20SQL\x20require\x20source=DB_TABLE,\x20dbtableConfig.dbId,\x20dbtableConfig.tableName,\x20and\x20a\x20database\x20connection\x20context.','source','\x20and\x20has\x20no\x20DB_TABLE\x20data-source\x20context\x20for\x20','dbtableConfig','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','20EahHAp','96vuZhvA','trim','unknown'];a60_0x3e4c=function(){return _0x58a720;};return a60_0x3e4c();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a61_0x32e01e=a61_0x216f;(function(_0x35f2eb,_0x317d69){const _0x588ce0=a61_0x216f,_0x540057=_0x35f2eb();while(!![]){try{const _0x3857ce=parseInt(_0x588ce0(0x19d))/0x1*(-parseInt(_0x588ce0(0x173))/0x2)+-parseInt(_0x588ce0(0x16b))/0x3+parseInt(_0x588ce0(0x18c))/0x4+parseInt(_0x588ce0(0x16e))/0x5*(-parseInt(_0x588ce0(0x182))/0x6)+-parseInt(_0x588ce0(0x186))/0x7*(-parseInt(_0x588ce0(0x16d))/0x8)+-parseInt(_0x588ce0(0x191))/0x9+parseInt(_0x588ce0(0x16f))/0xa;if(_0x3857ce===_0x317d69)break;else _0x540057['push'](_0x540057['shift']());}catch(_0x5745bb){_0x540057['push'](_0x540057['shift']());}}}(a61_0x2d69,0x471c2));import{deleteDataset,getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DATASET_ID_FLAG={'name':'id','type':a61_0x32e01e(0x181),'description':'Dataset\x20id'},DBID_FLAG={'name':a61_0x32e01e(0x169),'type':'number','description':a61_0x32e01e(0x1a0)},CONFIRM_FLAG={'name':a61_0x32e01e(0x19f),'type':a61_0x32e01e(0x198),'description':a61_0x32e01e(0x175)},CASCADE_FLAG={'name':'cascade','type':a61_0x32e01e(0x198),'description':a61_0x32e01e(0x17c)},EXPECTED_COUNT_FLAG={'name':'expected-count','type':a61_0x32e01e(0x181),'description':a61_0x32e01e(0x183)};export const datasetDelete={'service':'dataset','command':a61_0x32e01e(0x18a),'description':a61_0x32e01e(0x184),'risk':a61_0x32e01e(0x166),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CASCADE_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2bc41a){const _0x401463=a61_0x32e01e,_0x3f6954=_0x2bc41a['num']('id'),_0x447519=_0x2bc41a[_0x401463(0x161)](_0x401463(0x172)),_0x6519fe=_0x2bc41a['num'](_0x401463(0x169)),_0x44dab6=[_0x3f6954>0x0,Boolean(_0x447519),_0x6519fe>0x0]['filter'](Boolean);if(_0x44dab6[_0x401463(0x196)]===0x0)throw CliErrors[_0x401463(0x17a)](_0x401463(0x199));if(_0x44dab6[_0x401463(0x196)]>0x1)throw CliErrors[_0x401463(0x17a)](_0x401463(0x192));},async 'dryRun'(_0x278a0d){const _0x38e8b7=a61_0x32e01e,_0x438536=await resolveTargets(_0x278a0d),_0x23380a=_0x278a0d[_0x38e8b7(0x177)](_0x38e8b7(0x162));return{'method':_0x38e8b7(0x16c),'url':_0x38e8b7(0x16a)+(_0x23380a?_0x38e8b7(0x195):'false'),'body':{'count':_0x438536[_0x38e8b7(0x196)],'cascade':_0x23380a,'datasets':_0x438536},'description':_0x23380a?'Would\x20delete\x20'+_0x438536[_0x38e8b7(0x196)]+_0x38e8b7(0x18e):_0x38e8b7(0x179)+_0x438536['length']+'\x20dataset(s)\x20without\x20cascading\x20to\x20pages.\x20The\x20server\x20blocks\x20a\x20Dataset\x20that\x20still\x20has\x20related\x20pages.'};},async 'execute'(_0x67099a){const _0x1b034a=a61_0x32e01e;if(!_0x67099a['bool']('confirm'))throw CliErrors[_0x1b034a(0x17a)](_0x1b034a(0x194),_0x1b034a(0x18b));const _0x5253ba=await resolveTargets(_0x67099a),_0xcfd8e9=_0x67099a[_0x1b034a(0x177)]('cascade'),_0x5630b5=[],_0x38ffa2=[];for(const _0x537991 of _0x5253ba){try{await deleteDataset(_0x537991['id'],_0xcfd8e9),_0x5630b5[_0x1b034a(0x190)](_0x537991);}catch(_0x3dfa97){_0x38ffa2[_0x1b034a(0x190)]({..._0x537991,'error':_0x3dfa97 instanceof Error?_0x3dfa97[_0x1b034a(0x185)]:String(_0x3dfa97)});}}if(_0x38ffa2['length']>0x0){const _0xb7d6e5=buildPageRestoreCommands(_0x67099a[_0x1b034a(0x167)],_0xcfd8e9?_0x5630b5:[]);return{'ok':![],'data':{'requested':_0x5253ba['length'],'cascade':_0xcfd8e9,'deletedCount':_0x5630b5[_0x1b034a(0x196)],'failedCount':_0x38ffa2[_0x1b034a(0x196)],'deleted':_0x5630b5,'failed':_0x38ffa2,'pageRestoreCommands':_0xb7d6e5},'message':_0x1b034a(0x19b)+_0x5630b5[_0x1b034a(0x196)]+'/'+_0x5253ba[_0x1b034a(0x196)]+_0x1b034a(0x19e)+_0x38ffa2[_0x1b034a(0x196)]+'\x20failed'};}return{'ok':!![],'data':{'requested':_0x5253ba[_0x1b034a(0x196)],'cascade':_0xcfd8e9,'deletedCount':_0x5630b5[_0x1b034a(0x196)],'deleted':_0x5630b5,'pageRestoreCommands':buildPageRestoreCommands(_0x67099a[_0x1b034a(0x167)],_0xcfd8e9?_0x5630b5:[])},'message':_0x1b034a(0x19b)+_0x5630b5['length']+'\x20dataset(s)'};}};async function resolveTargets(_0x1b1ba1){const _0x515af0=a61_0x32e01e,_0x323ee4=_0x1b1ba1[_0x515af0(0x174)]('id'),_0x10ec78=_0x1b1ba1[_0x515af0(0x161)](_0x515af0(0x172)),_0x4cb5b1=_0x1b1ba1[_0x515af0(0x174)](_0x515af0(0x169));let _0x47ff8b;_0x10ec78?(_0x47ff8b=await listDatasets(_0x1b1ba1[_0x515af0(0x167)],{'code':_0x10ec78}),_0x47ff8b=_0x47ff8b[_0x515af0(0x176)](_0x1cd388=>_0x1cd388[_0x515af0(0x172)]===_0x10ec78)):(_0x47ff8b=await listDatasets(_0x1b1ba1[_0x515af0(0x167)]),_0x323ee4>0x0&&(_0x47ff8b=_0x47ff8b[_0x515af0(0x176)](_0x32c568=>_0x32c568['id']===_0x323ee4)),_0x4cb5b1>0x0&&(_0x47ff8b=_0x47ff8b[_0x515af0(0x176)](_0x601b7b=>_0x601b7b[_0x515af0(0x17f)]?.[_0x515af0(0x17b)]===_0x4cb5b1)));const _0x26fe11=[];for(const _0x17b7bc of _0x47ff8b){const _0x1f614d=await getDatasetDetail(_0x17b7bc['code']),_0x318b0b=Array[_0x515af0(0x171)](_0x1f614d['relatedPageInfoList'])?_0x1f614d[_0x515af0(0x17d)][_0x515af0(0x176)](_0x4da071=>_0x4da071!=null&&typeof _0x4da071==='object'&&_0x4da071['deleted']!==!![]):[];_0x26fe11[_0x515af0(0x190)](normalizeTarget(_0x17b7bc,_0x318b0b));}if(_0x26fe11[_0x515af0(0x196)]===0x0){const _0x3166a6=_0x10ec78||(_0x323ee4>0x0?_0x515af0(0x193)+_0x323ee4:_0x515af0(0x178)+_0x4cb5b1);throw CliErrors[_0x515af0(0x17a)]('No\x20undeleted\x20dataset\x20found\x20for\x20'+_0x3166a6+'.');}const _0x25cf4a=_0x1b1ba1[_0x515af0(0x174)](_0x515af0(0x17e));if(_0x25cf4a>0x0&&_0x26fe11['length']!==_0x25cf4a)throw CliErrors['validation']('Matched\x20'+_0x26fe11[_0x515af0(0x196)]+_0x515af0(0x189)+_0x25cf4a+'.');return _0x26fe11;}function a61_0x2d69(){const _0x389a74=['Also\x20delete\x20related\x20pages\x20and\x20menus;\x20requires\x20explicit\x20--confirm','relatedPageInfoList','expected-count','dbtableConfig','object','number','6yCdyPc','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','message','147Lslpsz','rabetbase\x20page\x20restore\x20--id\x20','title','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','delete','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','662176USdYKR','add','\x20dataset(s)\x20and\x20their\x20listed\x20related\x20pages/menus.\x20Restore\x20each\x20Dataset\x20first,\x20then\x20restore\x20pages\x20explicitly\x20when\x20needed.','isInteger','push','1100007LZwCuZ','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','id=','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','true','length','description','boolean','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','relatedPages','Deleted\x20','tableName','146921qmWNUf','\x20dataset(s);\x20','confirm','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','str','cascade','dbName','type','map','high-risk-write','appCode','source','dbid','/smartapi/dataset/delete?cascade=','455556lCjXmj','POST','86568wCNvQo','2078110jhNuGb','7350990PMGARf','name','isArray','code','2BpkeQE','num','Required\x20to\x20execute\x20dataset\x20deletion','filter','bool','dbid=','Would\x20safely\x20delete\x20','validation','dbId'];a61_0x2d69=function(){return _0x389a74;};return a61_0x2d69();}function normalizeTarget(_0x4f82e1,_0x40c8c7){const _0x139fb6=a61_0x32e01e,_0x5a54f2=_0x4f82e1[_0x139fb6(0x17f)]??{},_0x283d69=_0x40c8c7[_0x139fb6(0x165)](_0x3a57df=>{const _0x23f73d=_0x139fb6;if(_0x3a57df==null||typeof _0x3a57df!==_0x23f73d(0x180))return null;const _0x497753=_0x3a57df,_0x27aa31=Number(_0x497753['id']);if(!Number[_0x23f73d(0x18f)](_0x27aa31)||_0x27aa31<=0x0)return null;const _0x4da4bf=_0x497753[_0x23f73d(0x188)]??_0x497753[_0x23f73d(0x170)];return{'id':_0x27aa31,..._0x4da4bf?{'name':String(_0x4da4bf)}:{},..._0x497753[_0x23f73d(0x164)]?{'type':String(_0x497753[_0x23f73d(0x164)])}:{}};})['filter'](_0x512d9f=>_0x512d9f!==null);return{'id':_0x4f82e1['id'],'code':_0x4f82e1[_0x139fb6(0x172)],'name':_0x4f82e1[_0x139fb6(0x170)],'description':_0x4f82e1[_0x139fb6(0x197)],'source':_0x4f82e1[_0x139fb6(0x168)],'dbId':_0x5a54f2[_0x139fb6(0x17b)],'dbName':_0x5a54f2[_0x139fb6(0x163)],'tableName':_0x5a54f2[_0x139fb6(0x19c)],'relatedPageCount':_0x283d69['length'],'relatedPages':_0x283d69};}function a61_0x216f(_0x4297ca,_0x8b3581){_0x4297ca=_0x4297ca-0x161;const _0x2d695d=a61_0x2d69();let _0x216f6c=_0x2d695d[_0x4297ca];return _0x216f6c;}function buildPageRestoreCommands(_0x129a00,_0x38fc02){const _0x53588f=a61_0x32e01e,_0x3df446=new Set();for(const _0x6dfe89 of _0x38fc02){for(const _0x37937f of _0x6dfe89[_0x53588f(0x19a)])_0x3df446[_0x53588f(0x18d)](_0x37937f['id']);}return[..._0x3df446][_0x53588f(0x165)](_0x2c1612=>_0x53588f(0x187)+_0x2c1612+'\x20--appcode\x20'+_0x129a00);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a62_0x3b4a(_0x1c766b,_0x52746b){_0x1c766b=_0x1c766b-0xaa;const _0x421d64=a62_0x421d();let _0x3b4a2a=_0x421d64[_0x1c766b];return _0x3b4a2a;}const a62_0xe8cce0=a62_0x3b4a;(function(_0x14078f,_0x146e72){const _0x18fc31=a62_0x3b4a,_0x46dc9b=_0x14078f();while(!![]){try{const _0x40f243=parseInt(_0x18fc31(0xbd))/0x1*(parseInt(_0x18fc31(0xb9))/0x2)+-parseInt(_0x18fc31(0xc1))/0x3+parseInt(_0x18fc31(0xab))/0x4+-parseInt(_0x18fc31(0xe1))/0x5*(-parseInt(_0x18fc31(0xed))/0x6)+-parseInt(_0x18fc31(0xfd))/0x7*(-parseInt(_0x18fc31(0xb5))/0x8)+parseInt(_0x18fc31(0xf2))/0x9*(-parseInt(_0x18fc31(0xbb))/0xa)+-parseInt(_0x18fc31(0xb2))/0xb*(-parseInt(_0x18fc31(0xbc))/0xc);if(_0x40f243===_0x146e72)break;else _0x46dc9b['push'](_0x46dc9b['shift']());}catch(_0x3ae792){_0x46dc9b['push'](_0x46dc9b['shift']());}}}(a62_0x421d,0x34a5d));import{getDatasetDetail}from'../../core/api-client.js';function a62_0x421d(){const _0xa6b563=['18EbElqi','method','map','parse','responseFields','18pUWzAH','path','title','indexes','updateTimeField','options','type','operations','filter','datasetKey','source','9870DLEbxM','dbName','afterScriptId','902996DqNsla','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','displayName','fields','bizRelationType','toFieldLabel','modelCode','11xQIlxs','extend','deprecated','232AnakTL','split','cardinality','deleted','412158CImbdb','str','1242750qPvBrm','385548svtxjf','1zKVKmb','alias','modelId','dbtableConfig','743613nJdMbV','beforeScriptId','creatorIdField','dbId','creatorNameField','required','validateRules','dataType','modifierIdField','toField','toDatasetCode','push','relations','requestBody','columnCodeListWithDeleted','sourceType','requestFields','dataset','responseBody','properties','code','relationId','formatRules','length','host','doType','doVersion','pkField','name','string','entries','trim','345365FjvlfO','createTimeField','tableComment','allFields','tableName','isArray','modifierNameField','object','toTableName','dblinkInfoDTO','main_sub','dbType'];a62_0x421d=function(){return _0xa6b563;};return a62_0x421d();}import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function normalizeField(_0x3510f7){const _0x32d366=a62_0x3b4a;if(_0x3510f7['deleted'])return null;const _0xfe7191=Boolean(_0x3510f7[_0x32d366(0xad)]!==undefined||_0x3510f7[_0x32d366(0xda)]!==undefined);let _0x2ab95a={};if(!_0xfe7191&&typeof _0x3510f7[_0x32d366(0xb3)]===_0x32d366(0xde))try{_0x2ab95a=JSON[_0x32d366(0xf0)](_0x3510f7['extend']);}catch{}const _0x50a17a=_0xfe7191?_0x3510f7[_0x32d366(0xdd)]:_0x3510f7[_0x32d366(0xd5)],_0x582298=_0xfe7191?_0x3510f7[_0x32d366(0xad)]:_0x3510f7[_0x32d366(0xdd)],_0x5b734b=_0xfe7191?_0x3510f7[_0x32d366(0xda)]:_0x3510f7[_0x32d366(0xf8)]||_0x3510f7[_0x32d366(0xc8)],_0x34e6cb=_0xfe7191?_0x3510f7[_0x32d366(0xdc)]===!![]:_0x2ab95a[_0x32d366(0xdc)]===!![],_0x3a39a0=_0xfe7191?_0x3510f7[_0x32d366(0xc6)]===!![]:_0x2ab95a[_0x32d366(0xc6)]===!![],_0x13c751=_0xfe7191?_0x3510f7[_0x32d366(0xf7)]??null:_0x2ab95a[_0x32d366(0xf7)]??null,_0x450e6b={'name':_0x50a17a,'displayName':_0x582298||_0x50a17a,'type':_0x5b734b,'dbType':_0x3510f7[_0x32d366(0xec)],'pk':_0x34e6cb,'required':_0x3a39a0,'deprecated':_0x3510f7[_0x32d366(0xb4)]===!![],'description':_0x3510f7['description']||undefined};return Array[_0x32d366(0xe6)](_0x13c751)&&_0x13c751[_0x32d366(0xd8)]>0x0&&(_0x450e6b[_0x32d366(0xf7)]=_0x13c751),_0x450e6b;}function parseJsonMaybe(_0x200c3a){const _0x33ba95=a62_0x3b4a;if(typeof _0x200c3a!==_0x33ba95(0xde))return _0x200c3a;try{return JSON[_0x33ba95(0xf0)](_0x200c3a);}catch{return _0x200c3a;}}function normalizeOperationEntry(_0x5881e3,_0x243283){const _0x5d08ac=a62_0x3b4a;if(!_0x243283||typeof _0x243283!=='object')return null;if(!_0x243283[_0x5d08ac(0xee)]||!_0x243283['path'])return null;const _0x5707d8={'name':_0x5881e3,'method':_0x243283[_0x5d08ac(0xee)],'path':_0x243283[_0x5d08ac(0xf3)]};if(_0x243283[_0x5d08ac(0xd9)])_0x5707d8[_0x5d08ac(0xd9)]=_0x243283['host'];if(_0x243283[_0x5d08ac(0xce)]!=null){const _0x35cde1=parseJsonMaybe(_0x243283[_0x5d08ac(0xce)]);_0x5707d8[_0x5d08ac(0xce)]=_0x35cde1;}if(_0x243283['responseBody']!=null){const _0x2cfd8c=parseJsonMaybe(_0x243283[_0x5d08ac(0xd3)]);_0x5707d8[_0x5d08ac(0xd3)]=_0x2cfd8c;}if(_0x243283[_0x5d08ac(0xc2)]!=null)_0x5707d8[_0x5d08ac(0xc2)]=_0x243283['beforeScriptId'];if(_0x243283[_0x5d08ac(0xaa)]!=null)_0x5707d8['afterScriptId']=_0x243283[_0x5d08ac(0xaa)];if(Array['isArray'](_0x243283[_0x5d08ac(0xd1)]))_0x5707d8[_0x5d08ac(0xd1)]=_0x243283[_0x5d08ac(0xd1)];if(Array[_0x5d08ac(0xe6)](_0x243283[_0x5d08ac(0xf1)]))_0x5707d8['responseFields']=_0x243283['responseFields'];return _0x5707d8;}function summarizeDbtable(_0xa7661a){const _0x123dbb=a62_0x3b4a,_0xf8c503={},_0x393d58=[_0x123dbb(0xc4),_0x123dbb(0xfe),_0x123dbb(0xe5),_0x123dbb(0xfb),_0x123dbb(0xdc),_0x123dbb(0xe4),'logicField',_0x123dbb(0xe2),_0x123dbb(0xf6),_0x123dbb(0xc3),_0x123dbb(0xc5),_0x123dbb(0xc9),_0x123dbb(0xe7),'labelField',_0x123dbb(0xea)];for(const _0x290e9a of _0x393d58){if(_0xa7661a[_0x290e9a]!==undefined)_0xf8c503[_0x290e9a]=_0xa7661a[_0x290e9a];}return typeof _0xf8c503['allFields']===_0x123dbb(0xde)&&_0xf8c503[_0x123dbb(0xe4)][_0x123dbb(0xd8)]>0x0&&(_0xf8c503['allFieldNames']=_0xf8c503[_0x123dbb(0xe4)][_0x123dbb(0xb6)](',')[_0x123dbb(0xef)](_0x1e98d5=>_0x1e98d5[_0x123dbb(0xe0)]())[_0x123dbb(0xfa)](Boolean)),_0xf8c503;}function normalizeRelatedPages(_0x310d93){const _0x15df9e=a62_0x3b4a;if(!Array['isArray'](_0x310d93))return[];return _0x310d93[_0x15df9e(0xfa)](_0x34bfb5=>_0x34bfb5&&typeof _0x34bfb5===_0x15df9e(0xe8))['map'](_0x464754=>({'id':_0x464754['id'],'type':_0x464754['type'],'code':_0x464754[_0x15df9e(0xd5)],'title':_0x464754[_0x15df9e(0xf4)],'deleted':_0x464754[_0x15df9e(0xb8)]===!![]}));}export const datasetDetail={'service':a62_0xe8cce0(0xd2),'command':'detail','description':a62_0xe8cce0(0xac),'risk':'read','flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a62_0xe8cce0(0xbe),'type':a62_0xe8cce0(0xde),'description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically'}],async 'execute'(_0x3d1e66){const _0x506758=a62_0xe8cce0,_0x53ea7e=await getDatasetDetail(_0x3d1e66[_0x506758(0xba)](_0x506758(0xd5))),_0x652d5c=Array[_0x506758(0xe6)](_0x53ea7e[_0x506758(0xae)])?_0x53ea7e[_0x506758(0xae)]:Array[_0x506758(0xe6)](_0x53ea7e[_0x506758(0xd4)])?_0x53ea7e['properties']:[],_0xace90c=_0x652d5c['map'](_0x50e6d4=>normalizeField(_0x50e6d4))[_0x506758(0xfa)](_0x1d6991=>_0x1d6991!==null),_0x30fd6e=_0x53ea7e[_0x506758(0xf9)]??{},_0xb18b3=[];for(const [_0xba95f1,_0x30f754]of Object[_0x506758(0xdf)](_0x30fd6e)){const _0x298b8e=normalizeOperationEntry(_0xba95f1,_0x30f754);if(_0x298b8e)_0xb18b3[_0x506758(0xcc)](_0x298b8e);}const _0x4a217b=_0x53ea7e[_0x506758(0xc0)]??{},_0x385477=_0x53ea7e[_0x506758(0xd2)]??{},_0x5730f4=_0x4a217b[_0x506758(0xc4)]!=null?{'id':_0x4a217b[_0x506758(0xc4)],'name':_0x4a217b[_0x506758(0xfe)]??null}:undefined;let _0x56352d;return typeof _0x53ea7e[_0x506758(0xb3)]==='string'&&(_0x56352d=parseJsonMaybe(_0x53ea7e[_0x506758(0xb3)])),{'ok':!![],'data':{'id':_0x53ea7e[_0x506758(0xbf)]??_0x53ea7e['id'],'name':_0x53ea7e[_0x506758(0xdd)],'code':_0x53ea7e['modelCode']||_0x53ea7e[_0x506758(0xd5)],'doVersion':_0x53ea7e[_0x506758(0xdb)],'description':_0x53ea7e['description']||_0x385477[_0x506758(0xe3)]||undefined,'source':_0x53ea7e[_0x506758(0xfc)]||_0x385477[_0x506758(0xd0)],'table':_0x4a217b[_0x506758(0xe5)]||_0x385477[_0x506758(0xe5)],'datasetKey':_0x4a217b['datasetKey'],'pk':_0x4a217b[_0x506758(0xdc)],'db':_0x5730f4,'dbtable':summarizeDbtable(_0x4a217b),'fields':_0xace90c,'operations':_0xb18b3,'indexes':Array[_0x506758(0xe6)](_0x385477[_0x506758(0xf5)])?_0x385477[_0x506758(0xf5)]:[],'relations':Array[_0x506758(0xe6)](_0x53ea7e[_0x506758(0xcd)])?_0x53ea7e[_0x506758(0xcd)][_0x506758(0xef)](_0x75b998=>({..._0x75b998['relationId']!=null?{'relationId':_0x75b998[_0x506758(0xd6)]}:{},'fromDataset':_0x53ea7e[_0x506758(0xdd)],'fromCode':_0x53ea7e[_0x506758(0xb1)]||_0x53ea7e[_0x506758(0xd5)],'fromTable':_0x4a217b[_0x506758(0xe5)]||_0x385477['tableName'],'fromField':_0x75b998['fromField'],'toDataset':_0x75b998['toDatasetName'],'toCode':_0x75b998[_0x506758(0xcb)],'toTable':_0x75b998[_0x506758(0xe9)],'toField':_0x75b998[_0x506758(0xca)],'labelField':_0x75b998[_0x506758(0xb0)]||undefined,'cardinality':_0x75b998[_0x506758(0xb7)]||undefined,'bizRelationType':_0x75b998[_0x506758(0xaf)]===_0x506758(0xeb)?_0x506758(0xeb):null})):[],'relatedPages':normalizeRelatedPages(_0x53ea7e['relatedPageInfoList']),...Array[_0x506758(0xe6)](_0x53ea7e['columnCodeListWithDeleted'])?{'columnCodeListWithDeleted':_0x53ea7e[_0x506758(0xcf)]}:{},'formatRules':Array[_0x506758(0xe6)](_0x53ea7e[_0x506758(0xd7)])?_0x53ea7e['formatRules']:[],'validateRules':Array[_0x506758(0xe6)](_0x53ea7e[_0x506758(0xc7)])?_0x53ea7e[_0x506758(0xc7)]:[],..._0x56352d!==undefined?{'extend':_0x56352d}:{},'stats':{'fieldCount':_0xace90c['length'],'operationCount':_0xb18b3[_0x506758(0xd8)]}}};}};
|