@lovrabet/lovrabet-cli 2.3.7 → 2.3.8-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/approval/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/init.d.ts +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/import-excel.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/notification/config-list.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/permit/dataset-get.js +1 -1
- package/lib/commands/permit/dataset-set.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.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.d.ts +32 -6
- 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/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/diagram.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/diagram.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.d.ts +2 -4
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/user-account/bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.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/product.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.d.ts +20 -340
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/sdk-client.d.ts +7 -10
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/access-error.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.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/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/raw-flags.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.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/services/dataset-import/auto-id-runner.js +1 -1
- package/lib/services/dataset-import/excel-reader.js +1 -1
- package/lib/services/dataset-import/image-bytes.js +1 -1
- package/lib/services/dataset-import/image-ooxml.js +1 -1
- package/lib/services/dataset-import/image-runner.js +1 -1
- package/lib/services/dataset-import/metadata.js +1 -1
- package/lib/services/dataset-import/preview.js +1 -1
- package/lib/services/dataset-import/runner.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/utils/access-key-redaction.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/positive-safe-integer.js +1 -1
- package/lib/utils/redaction.js +1 -1
- package/lib/utils/runtime-user-id.d.ts +2 -0
- package/lib/utils/runtime-user-id.js +1 -0
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +3 -3
- package/skills/lovrabet/SKILL.md +2 -2
- package/skills/lovrabet/guides/role-and-permission-workflow.md +3 -2
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const a27_0x363c6b=a27_0x26fd;(function(_0x3fc040,_0x392c35){const _0x54b7d4=a27_0x26fd,_0x3f16e1=_0x3fc040();while(!![]){try{const _0x3b97ae=parseInt(_0x54b7d4(0x217))/0x1*(-parseInt(_0x54b7d4(0x251))/0x2)+parseInt(_0x54b7d4(0x1f5))/0x3*(-parseInt(_0x54b7d4(0x1f1))/0x4)+-parseInt(_0x54b7d4(0x231))/0x5*(-parseInt(_0x54b7d4(0x214))/0x6)+-parseInt(_0x54b7d4(0x238))/0x7+parseInt(_0x54b7d4(0x1ec))/0x8*(parseInt(_0x54b7d4(0x223))/0x9)+-parseInt(_0x54b7d4(0x224))/0xa*(-parseInt(_0x54b7d4(0x237))/0xb)+-parseInt(_0x54b7d4(0x245))/0xc*(parseInt(_0x54b7d4(0x249))/0xd);if(_0x3b97ae===_0x392c35)break;else _0x3f16e1['push'](_0x3f16e1['shift']());}catch(_0x1d502f){_0x3f16e1['push'](_0x3f16e1['shift']());}}}(a27_0x6a18,0x36be8));import{dataImportExcel}from'./import-excel.js';function a27_0x26fd(_0x1eca33,_0x3894e6){_0x1eca33=_0x1eca33-0x1e5;const _0x6a181f=a27_0x6a18();let _0x26fd47=_0x6a181f[_0x1eca33];return _0x26fd47;}function a27_0x6a18(){const _0x780ec0=['JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20id\x20may\x20be\x20a\x20single\x20value\x20or\x20array.\x20','\x20\x20\x20\x20$and\x20\x20\x20\x20\x20\x20\x20\x20\x20All\x20conditions\x20match\x20\x20\x20{\x22$and\x22:[{\x22age\x22:{\x22$gte\x22:18}},{\x22status\x22:{\x22$eq\x22:\x22active\x22}}]}','length','\x20\x20\x20\x20$gte\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20or\x20equal\x20\x20{\x22amount\x22:{\x22$gte\x22:100}}','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','getOne','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return\x20alongside\x20aggregates,\x20e.g.\x20[\x22status\x22,\x22region\x22]','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','Example:\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x20\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','\x20\x20\x20\x20$in\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Value\x20in\x20set\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22country\x22:{\x22$in\x22:[\x22CN\x22,\x22US\x22]}}','\x20\x20\x20\x20Record\x20each\x20batch\x20and\x20verify\x20its\x20IDs\x20or\x20unique\x20business\x20keys\x20before\x20continuing.','\x20completed\x20in\x20','data\x20','update','command','\x20\x20\x20\x20and\x20increment\x20only\x20currentPage.\x20Use\x20a\x20stable\x20unique\x20orderBy\x20field\x20to\x20avoid\x20duplicates\x20or\x20gaps.','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Rounded\x20average\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg\x22,\x22round\x22:true,\x22precision\x22:2}','high-risk-write','Update\x20an\x20existing\x20data\x20record','\x20\x20\x20\x20aggregate[].alias\x20defines\x20the\x20output\x20field\x20name\x20only','\x20\x20PAGINATION','Deletes\x20business\x20records\x20from\x20the\x20current\x20app\x20dataset.\x20This\x20may\x20not\x20be\x20recoverable.','join','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','\x20\x20\x20\x20$gt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$gt\x22:100}}','risk','6vSkREA','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Average\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg_score\x22}','\x20\x20\x20\x20$lte\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20or\x20equal\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lte\x22:1000}}','1pmIRMX','\x20\x20\x20\x20No\x20import\x20checkpoint,\x20--resume,\x20automatic\x20upsert,\x20or\x20atomic\x20rollback\x20guarantee.','description','\x20\x20DATASET\x20BOUNDARY','\x20\x20\x20\x20orderBy\x20may\x20reference\x20aggregate\x20output\x20aliases','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','str','code','/api/{appCode}/','Changes\x20an\x20existing\x20business\x20record\x20in\x20the\x20current\x20app\x20dataset.\x20The\x20new\x20values\x20are\x20saved\x20immediately\x20after\x20confirmation.','batchCreate','write','108hbIruD','50QgIZiF','\x20\x20\x20\x20$startWith\x20\x20\x20Starts\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$startWith\x22:\x22Mr.\x22}}','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','\x20\x20AGGREGATE\x20ALIAS\x20BOUNDARY','\x20\x20\x20\x20--dry-run\x20previews\x20the\x20request\x20only;\x20it\x20does\x20not\x20validate\x20server\x20constraints\x20or\x20write\x20permissions.','\x20\x20\x20\x20Verify\x20the\x20response\x20paging.currentPage/pageSize\x20and\x20that\x20tableData\x20satisfies\x20where\x20before\x20drawing\x20conclusions.','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','\x20\x20\x20\x20$ne\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Not\x20equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22status\x22:{\x22$ne\x22:\x22deleted\x22}}','\x20\x20\x20\x20DB_TABLE:\x20inspect\x20dataset\x20detail,\x20validate\x20the\x20full\x20file\x20and\x20confirmed\x20unique\x20business\x20keys,','\x20on\x20dataset\x20','now','\x20\x20\x20\x20Non-Excel\x20batchCreate\x20remains\x20available\x20for\x20METADATA\x20and\x20DB_TABLE.','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[\x22region\x22],\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}}}\x27','1823615KHUcic','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','delete','aggregate','confirmationDescription','\x20\x20\x20\x20having\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Post-aggregation\x20filters\x20using\x20real\x20dataset\x20fields,\x20e.g.\x20{\x22category_id\x22:{\x22$notNull\x22:true}}','832271qWxYdG','244090UbnAZE','\x20\x20\x20\x20choose\x20the\x20capability\x20before\x20execution;\x20never\x20fall\x20back\x20at\x20runtime','body','\x20\x20\x20\x20METADATA:\x20use\x20lovrabet\x20data\x20import-excel\x20with\x20checkpoint\x20recovery.','params','\x20\x20\x20\x20Page\x20numbers\x20start\x20at\x201.\x20To\x20fetch\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged','Create\x20multiple\x20records\x20in\x20the\x20dataset\x20in\x20one\x20request','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','\x20\x20\x20\x20select/where/having/groupBy\x20must\x20use\x20real\x20dataset\x20fields','read','helpExtra','Delete\x20data\x20records\x20(non-interactive\x20mode\x20requires\x20--yes)','create','8076372JixNkP','\x20\x20EXCEL\x20ROUTES','\x20\x20\x20\x20SUM\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Sum\x20of\x20column\x20values\x20\x20\x20\x20\x20{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order;\x20may\x20reference\x20aggregate\x20output\x20aliases,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','13wWobVI','dryRun','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','\x20\x20\x20\x20$contain\x20\x20\x20\x20\x20Substring\x20match\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$contain\x22:\x22test\x22}}','\x20\x20\x20\x20JOIN\x20and\x20cross-table\x20aggregation\x20require\x20an\x20existing\x20trusted\x20Custom\x20SQL','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','Examples:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27,\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22completed\x22}\x27','data','193772knlKdp','operation','build','\x20\x20\x20\x20then\x20convert\x20rows\x20to\x20JSON\x20and\x20split\x20within\x20the\x20target\x20API\x20row/byte\x20and\x20local\x20argument\x20limits.','\x20\x20\x20\x20MIN\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Minimum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MIN\x22,\x22alias\x22:\x22min_price\x22}','\x20\x20AGGREGATE\x20TYPES','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','\x20\x20\x20\x20Built-in\x20Skill\x20guide:\x20references/lovrabet-db-table-excel-import.md','198584gxytnl','filter','\x20\x20\x20\x20aggregate\x20supports\x20a\x20single\x20DB_TABLE\x20dataset\x20only','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]','\x20\x20\x20\x20This\x20command\x20sends\x20one\x20prepared\x20batch;\x20it\x20does\x20not\x20read\x20XLSX\x20or\x20split\x20batches.','20HWhhWu','\x20\x20\x20\x20Filtering\x20and\x20pagination\x20are\x20controlled\x20only\x20via\x20one\x20JSON\x20object\x20in\x20--params.','\x20\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','\x20\x20\x20\x20$lt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lt\x22:1000}}','7131FmLXAx','paramsHint','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','Create\x20one\x20record\x20in\x20the\x20dataset'];a27_0x6a18=function(){return _0x780ec0;};return a27_0x6a18();}import{executeData}from'../../core/sdk-client.js';import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{requireAnyOf}from'../../commands/common/constraints.js';import{parseJsonParams,parseJsonParamsValue,parseBatchCreateItemsFromParams,parseUpdateIdsFromParams,normalizeUpdateParamsForRuntime}from'../../utils/params.js';import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':a27_0x363c6b(0x1ed),'operation':a27_0x363c6b(0x1ed),'risk':'read','paramsRequired':![],'description':'Filter\x20dataset\x20records\x20with\x20query\x20conditions','paramsHint':a27_0x363c6b(0x23f)+a27_0x363c6b(0x201),'helpExtra':['\x20\x20WHERE\x20OPERATORS','\x20\x20\x20\x20$eq\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22age\x22:{\x22$eq\x22:18}}',a27_0x363c6b(0x22b),a27_0x363c6b(0x212),a27_0x363c6b(0x1fc),a27_0x363c6b(0x1f4),a27_0x363c6b(0x216),a27_0x363c6b(0x203),a27_0x363c6b(0x24c),a27_0x363c6b(0x225),'\x20\x20\x20\x20$endWith\x20\x20\x20\x20\x20Ends\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22email\x22:{\x22$endWith\x22:\x22@example.com\x22}}','','\x20\x20LOGICAL\x20COMBINATORS',a27_0x363c6b(0x1fa),'\x20\x20\x20\x20$or\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Any\x20condition\x20matches\x20\x20{\x22$or\x22:[{\x22status\x22:{\x22$eq\x22:\x22active\x22}},{\x22status\x22:{\x22$eq\x22:\x22pending\x22}}]}','','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)',a27_0x363c6b(0x1fd),a27_0x363c6b(0x24e),a27_0x363c6b(0x1ef),'\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)',a27_0x363c6b(0x232),'',a27_0x363c6b(0x20e),a27_0x363c6b(0x1f2),'\x20\x20\x20\x20Do\x20NOT\x20use\x20--where,\x20--select,\x20--order-by,\x20--current-page,\x20--page,\x20or\x20--page-size\x20as\x20CLI\x20flags.',a27_0x363c6b(0x23d),a27_0x363c6b(0x209),'\x20\x20\x20\x20Page\x201:\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','\x20\x20\x20\x20Page\x202:\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:2,\x22pageSize\x22:20}\x27',a27_0x363c6b(0x229)][a27_0x363c6b(0x210)]('\x0a')},{'command':a27_0x363c6b(0x1fe),'operation':a27_0x363c6b(0x1fe),'risk':a27_0x363c6b(0x241),'paramsRequired':!![],'description':'Get\x20a\x20single\x20record\x20by\x20ID','paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':a27_0x363c6b(0x244),'operation':'create','risk':a27_0x363c6b(0x222),'paramsRequired':!![],'description':a27_0x363c6b(0x1f8),'confirmationDescription':'Writes\x20one\x20new\x20business\x20record\x20to\x20the\x20current\x20app\x20dataset.\x20It\x20is\x20saved\x20immediately\x20after\x20confirmation.','paramsHint':a27_0x363c6b(0x22a)},{'command':a27_0x363c6b(0x221),'operation':a27_0x363c6b(0x221),'risk':a27_0x363c6b(0x222),'paramsRequired':!![],'description':a27_0x363c6b(0x23e),'helpExtra':[a27_0x363c6b(0x246),a27_0x363c6b(0x23b),a27_0x363c6b(0x22c),a27_0x363c6b(0x1e7),a27_0x363c6b(0x1f0),a27_0x363c6b(0x228),a27_0x363c6b(0x204),'\x20\x20\x20\x20Stop\x20on\x20unknown\x20outcomes\x20or\x20conflicts;\x20reconcile\x20before\x20retrying,\x20never\x20blindly\x20resend\x20a\x20batch.',a27_0x363c6b(0x218),a27_0x363c6b(0x1eb),a27_0x363c6b(0x22f)][a27_0x363c6b(0x210)]('\x0a'),'confirmationDescription':'Writes\x20multiple\x20new\x20business\x20records\x20to\x20the\x20current\x20app\x20dataset.\x20They\x20are\x20saved\x20immediately\x20after\x20confirmation.','paramsHint':a27_0x363c6b(0x1ea)},{'command':'update','operation':a27_0x363c6b(0x207),'risk':a27_0x363c6b(0x222),'paramsRequired':!![],'description':a27_0x363c6b(0x20c),'confirmationDescription':a27_0x363c6b(0x220),'paramsHint':a27_0x363c6b(0x1f9)+a27_0x363c6b(0x24f)},{'command':'delete','operation':a27_0x363c6b(0x233),'risk':a27_0x363c6b(0x20b),'paramsRequired':!![],'description':a27_0x363c6b(0x243),'confirmationDescription':a27_0x363c6b(0x20f),'paramsHint':a27_0x363c6b(0x1ff)},{'command':'aggregate','operation':a27_0x363c6b(0x234),'risk':a27_0x363c6b(0x241),'paramsRequired':![],'description':'Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','paramsHint':a27_0x363c6b(0x24b)+a27_0x363c6b(0x202),'helpExtra':[a27_0x363c6b(0x1e9),a27_0x363c6b(0x247),'\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20of\x20records\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20distinct\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22,\x22distinct\x22:true}',a27_0x363c6b(0x215),a27_0x363c6b(0x20a),'\x20\x20\x20\x20MAX\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Maximum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MAX\x22,\x22alias\x22:\x22max_price\x22}',a27_0x363c6b(0x1e8),'','\x20\x20PARAMS\x20STRUCTURE',a27_0x363c6b(0x200),a27_0x363c6b(0x226),a27_0x363c6b(0x21c),'\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]',a27_0x363c6b(0x236),a27_0x363c6b(0x248),'',a27_0x363c6b(0x227),a27_0x363c6b(0x20d),a27_0x363c6b(0x240),a27_0x363c6b(0x21b),'',a27_0x363c6b(0x21a),a27_0x363c6b(0x1ee),'\x20\x20\x20\x20METADATA\x20datasets\x20do\x20not\x20support\x20aggregate\x20or\x20Custom\x20SQL',a27_0x363c6b(0x24d),a27_0x363c6b(0x239),'','\x20\x20EXAMPLES',a27_0x363c6b(0x211),'\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','',a27_0x363c6b(0x1f7),a27_0x363c6b(0x230),'',a27_0x363c6b(0x1f3)][a27_0x363c6b(0x210)]('\x0a')}];function makeDataCommand(_0x802889){const _0x549d3c=a27_0x363c6b,_0x4655fa=_0x549d3c(0x206)+_0x802889[_0x549d3c(0x208)],_0x21e9cf={'service':_0x549d3c(0x250),'command':_0x802889['command'],'description':_0x802889[_0x549d3c(0x219)],'risk':_0x802889[_0x549d3c(0x213)],..._0x802889[_0x549d3c(0x235)]?{'confirmationDescription':_0x802889['confirmationDescription']}:{},'helpExtra':_0x802889[_0x549d3c(0x242)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x802889[_0x549d3c(0x1f6)]}],'validate':async _0x241e5a=>{const _0x35cafd=_0x549d3c;_0x802889['paramsRequired']&&requireAnyOf(_0x241e5a,['params'],_0x4655fa),_0x802889[_0x35cafd(0x1e5)]===_0x35cafd(0x221)&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x241e5a['str'](_0x35cafd(0x23c)))),_0x802889[_0x35cafd(0x1e5)]==='update'&&parseUpdateIdsFromParams(parseJsonParams(_0x241e5a['str'](_0x35cafd(0x23c)))??{});},async 'execute'(_0x22f693){const _0x4db81e=_0x549d3c,_0x3341ad=_0x22f693['str'](_0x4db81e(0x21e)),_0xe1e59d=_0x802889['operation']===_0x4db81e(0x221)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x22f693[_0x4db81e(0x21d)](_0x4db81e(0x23c)))):parseJsonParams(_0x22f693[_0x4db81e(0x21d)]('params'))??{},_0x1a6c01=_0x802889[_0x4db81e(0x1e5)]===_0x4db81e(0x207)?parseUpdateIdsFromParams(_0xe1e59d):undefined,_0x4ef14c=_0x1a6c01?normalizeUpdateParamsForRuntime(_0xe1e59d,_0x1a6c01):_0xe1e59d,_0x1c2906=Date[_0x4db81e(0x22e)](),_0x239120=await executeData(_0x3341ad,_0x802889[_0x4db81e(0x1e5)],_0x4ef14c),_0x1275c4=Date['now']()-_0x1c2906,_0x2f79e6=_0x1a6c01&&_0x1a6c01[_0x4db81e(0x1fb)]>0x1?buildBatchUpdateResult(_0x1a6c01,_0x239120):_0x239120;return{'ok':!![],'data':{'result':_0x2f79e6,'elapsed':_0x1275c4},'message':_0x4db81e(0x206)+_0x802889[_0x4db81e(0x208)]+_0x4db81e(0x205)+_0x1275c4+'ms'};}};return _0x802889['risk']!==_0x549d3c(0x241)&&(_0x21e9cf[_0x549d3c(0x24a)]=async _0x4bde40=>{const _0x332324=_0x549d3c,_0x18c2d8=_0x4bde40['str'](_0x332324(0x21e)),_0x204094=_0x802889[_0x332324(0x1e5)]===_0x332324(0x221)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x4bde40[_0x332324(0x21d)](_0x332324(0x23c)))):parseJsonParams(_0x4bde40[_0x332324(0x21d)]('params'))??{};let _0xa97971=_0x204094;if(_0x802889[_0x332324(0x1e5)]===_0x332324(0x207)){const _0x291518=parseUpdateIdsFromParams(_0x204094);_0xa97971=normalizeUpdateParamsForRuntime(_0x204094,_0x291518);}return dryRun('POST',_0x332324(0x21f)+_0x18c2d8+'/'+_0x802889['operation'])[_0x332324(0x23a)](_0xa97971)['description']('Preview:\x20data\x20'+_0x802889[_0x332324(0x208)]+_0x332324(0x22d)+_0x18c2d8)[_0x332324(0x1e6)]();}),_0x21e9cf;}export const dataDefinitions=[...specs['map'](makeDataCommand),dataImportExcel];function buildBatchUpdateResult(_0x37e11d,_0x2ff330){const _0x40ccd1=a27_0x363c6b;return{'operation':_0x40ccd1(0x207),'mode':'batch','ids':_0x37e11d,'total':_0x37e11d[_0x40ccd1(0x1fb)],'result':_0x2ff330};}
|
|
1
|
+
function a27_0x1ffb(_0xf8225d,_0x52e042){_0xf8225d=_0xf8225d-0x1de;const _0x5addcf=a27_0x5add();let _0x1ffbac=_0x5addcf[_0xf8225d];return _0x1ffbac;}const a27_0x3bf33a=a27_0x1ffb;(function(_0x29def1,_0x3d212f){const _0x318e95=a27_0x1ffb,_0x4c090f=_0x29def1();while(!![]){try{const _0x26a5e9=parseInt(_0x318e95(0x205))/0x1*(parseInt(_0x318e95(0x230))/0x2)+parseInt(_0x318e95(0x226))/0x3*(-parseInt(_0x318e95(0x1e4))/0x4)+parseInt(_0x318e95(0x21c))/0x5+-parseInt(_0x318e95(0x23e))/0x6+parseInt(_0x318e95(0x209))/0x7+parseInt(_0x318e95(0x20c))/0x8*(-parseInt(_0x318e95(0x1e2))/0x9)+parseInt(_0x318e95(0x21a))/0xa;if(_0x26a5e9===_0x3d212f)break;else _0x4c090f['push'](_0x4c090f['shift']());}catch(_0x4802e4){_0x4c090f['push'](_0x4c090f['shift']());}}}(a27_0x5add,0xb56de));import{dataImportExcel}from'./import-excel.js';function a27_0x5add(){const _0x5b1b69=['\x20\x20\x20\x20METADATA:\x20use\x20lovrabet\x20data\x20import-excel\x20with\x20checkpoint\x20recovery.','aggregate','\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','6cUdXRz','batch','\x20\x20EXAMPLES','\x20\x20\x20\x20Page\x202:\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:2,\x22pageSize\x22:20}\x27','\x20\x20\x20\x20Do\x20NOT\x20use\x20--where,\x20--select,\x20--order-by,\x20--current-page,\x20--page,\x20or\x20--page-size\x20as\x20CLI\x20flags.','\x20\x20\x20\x20SUM\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Sum\x20of\x20column\x20values\x20\x20\x20\x20\x20{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}','\x20\x20\x20\x20$eq\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22age\x22:{\x22$eq\x22:18}}','create','Filter\x20dataset\x20records\x20with\x20query\x20conditions','\x20\x20\x20\x20MIN\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Minimum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MIN\x22,\x22alias\x22:\x22min_price\x22}','882RNrvca','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','\x20\x20\x20\x20$startWith\x20\x20\x20Starts\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$startWith\x22:\x22Mr.\x22}}','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','\x20\x20\x20\x20aggregate[].alias\x20defines\x20the\x20output\x20field\x20name\x20only','read','body','Example:\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x20\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','Writes\x20one\x20new\x20business\x20record\x20to\x20the\x20current\x20app\x20dataset.\x20It\x20is\x20saved\x20immediately\x20after\x20confirmation.','\x20\x20\x20\x20Record\x20each\x20batch\x20and\x20verify\x20its\x20IDs\x20or\x20unique\x20business\x20keys\x20before\x20continuing.','\x20\x20\x20\x20Page\x201:\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','\x20on\x20dataset\x20','\x20\x20\x20\x20JOIN\x20and\x20cross-table\x20aggregation\x20require\x20an\x20existing\x20trusted\x20Custom\x20SQL','map','1386552LgZGNp','risk','POST','description','Deletes\x20business\x20records\x20from\x20the\x20current\x20app\x20dataset.\x20This\x20may\x20not\x20be\x20recoverable.','Get\x20a\x20single\x20record\x20by\x20ID','\x20\x20\x20\x20choose\x20the\x20capability\x20before\x20execution;\x20never\x20fall\x20back\x20at\x20runtime','length','command','getOne','paramsRequired','\x20\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order;\x20may\x20reference\x20aggregate\x20output\x20aliases,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20of\x20records\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}','\x20\x20LOGICAL\x20COMBINATORS','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','\x20\x20\x20\x20$contain\x20\x20\x20\x20\x20Substring\x20match\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$contain\x22:\x22test\x22}}','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return\x20alongside\x20aggregates,\x20e.g.\x20[\x22status\x22,\x22region\x22]','515547qAqvDo','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Average\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg_score\x22}','2693572zTwsMF','\x20\x20\x20\x20$gt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$gt\x22:100}}','params','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','join','Preview:\x20data\x20','Writes\x20multiple\x20new\x20business\x20records\x20to\x20the\x20current\x20app\x20dataset.\x20They\x20are\x20saved\x20immediately\x20after\x20confirmation.','\x20\x20\x20\x20DB_TABLE:\x20inspect\x20dataset\x20detail,\x20validate\x20the\x20full\x20file\x20and\x20confirmed\x20unique\x20business\x20keys,','\x20\x20PARAMS\x20STRUCTURE','Update\x20an\x20existing\x20data\x20record','\x20\x20\x20\x20select/where/having/groupBy\x20must\x20use\x20real\x20dataset\x20fields','str','helpExtra','\x20\x20\x20\x20then\x20convert\x20rows\x20to\x20JSON\x20and\x20split\x20within\x20the\x20target\x20API\x20row/byte\x20and\x20local\x20argument\x20limits.','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','build','write','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','\x20\x20\x20\x20Filtering\x20and\x20pagination\x20are\x20controlled\x20only\x20via\x20one\x20JSON\x20object\x20in\x20--params.','Changes\x20an\x20existing\x20business\x20record\x20in\x20the\x20current\x20app\x20dataset.\x20The\x20new\x20values\x20are\x20saved\x20immediately\x20after\x20confirmation.','\x20\x20DATASET\x20BOUNDARY','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20distinct\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22,\x22distinct\x22:true}','/api/{appCode}/','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','\x20\x20\x20\x20METADATA\x20datasets\x20do\x20not\x20support\x20aggregate\x20or\x20Custom\x20SQL','high-risk-write','\x20\x20\x20\x20$gte\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20or\x20equal\x20\x20{\x22amount\x22:{\x22$gte\x22:100}}','\x20\x20\x20\x20Stop\x20on\x20unknown\x20outcomes\x20or\x20conflicts;\x20reconcile\x20before\x20retrying,\x20never\x20blindly\x20resend\x20a\x20batch.','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','\x20\x20\x20\x20Verify\x20the\x20response\x20paging.currentPage/pageSize\x20and\x20that\x20tableData\x20satisfies\x20where\x20before\x20drawing\x20conclusions.','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[\x22region\x22],\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}}}\x27','\x20\x20WHERE\x20OPERATORS','2819YYQnUX','update','\x20\x20\x20\x20$or\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Any\x20condition\x20matches\x20\x20{\x22$or\x22:[{\x22status\x22:{\x22$eq\x22:\x22active\x22}},{\x22status\x22:{\x22$eq\x22:\x22pending\x22}}]}','batchCreate','5257364VgJLzN','delete','\x20\x20\x20\x20having\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Post-aggregation\x20filters\x20using\x20real\x20dataset\x20fields,\x20e.g.\x20{\x22category_id\x22:{\x22$notNull\x22:true}}','80eHdSFa','\x20\x20\x20\x20$in\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Value\x20in\x20set\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22country\x22:{\x22$in\x22:[\x22CN\x22,\x22US\x22]}}','Create\x20one\x20record\x20in\x20the\x20dataset','\x20\x20AGGREGATE\x20TYPES','confirmationDescription','filter','Create\x20multiple\x20records\x20in\x20the\x20dataset\x20in\x20one\x20request','operation','data\x20','now','paramsHint','\x20\x20\x20\x20--dry-run\x20previews\x20the\x20request\x20only;\x20it\x20does\x20not\x20validate\x20server\x20constraints\x20or\x20write\x20permissions.','\x20\x20\x20\x20No\x20import\x20checkpoint,\x20--resume,\x20automatic\x20upsert,\x20or\x20atomic\x20rollback\x20guarantee.','\x20\x20\x20\x20Built-in\x20Skill\x20guide:\x20references/lovrabet-db-table-excel-import.md','3052140kWydCw','\x20\x20\x20\x20aggregate\x20supports\x20a\x20single\x20DB_TABLE\x20dataset\x20only','2971985Exjmeh','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','\x20\x20\x20\x20Page\x20numbers\x20start\x20at\x201.\x20To\x20fetch\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','\x20\x20\x20\x20$and\x20\x20\x20\x20\x20\x20\x20\x20\x20All\x20conditions\x20match\x20\x20\x20{\x22$and\x22:[{\x22age\x22:{\x22$gte\x22:18}},{\x22status\x22:{\x22$eq\x22:\x22active\x22}}]}','code','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)'];a27_0x5add=function(){return _0x5b1b69;};return a27_0x5add();}import{executeData}from'../../core/sdk-client.js';import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{requireAnyOf}from'../../commands/common/constraints.js';import{parseJsonParams,parseJsonParamsValue,parseBatchCreateItemsFromParams,parseUpdateIdsFromParams,normalizeUpdateParamsForRuntime}from'../../utils/params.js';import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':'filter','operation':a27_0x3bf33a(0x211),'risk':a27_0x3bf33a(0x235),'paramsRequired':![],'description':a27_0x3bf33a(0x22e),'paramsHint':a27_0x3bf33a(0x1e7)+a27_0x3bf33a(0x21f),'helpExtra':[a27_0x3bf33a(0x204),a27_0x3bf33a(0x22c),'\x20\x20\x20\x20$ne\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Not\x20equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22status\x22:{\x22$ne\x22:\x22deleted\x22}}',a27_0x3bf33a(0x1e5),a27_0x3bf33a(0x1ff),'\x20\x20\x20\x20$lt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lt\x22:1000}}','\x20\x20\x20\x20$lte\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20or\x20equal\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lte\x22:1000}}',a27_0x3bf33a(0x20d),a27_0x3bf33a(0x1e0),a27_0x3bf33a(0x232),'\x20\x20\x20\x20$endWith\x20\x20\x20\x20\x20Ends\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22email\x22:{\x22$endWith\x22:\x22@example.com\x22}}','',a27_0x3bf33a(0x1de),a27_0x3bf33a(0x220),a27_0x3bf33a(0x207),'','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)',a27_0x3bf33a(0x1df),'\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]',a27_0x3bf33a(0x222),'\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','','\x20\x20PAGINATION',a27_0x3bf33a(0x1f6),a27_0x3bf33a(0x22a),a27_0x3bf33a(0x21e),'\x20\x20\x20\x20and\x20increment\x20only\x20currentPage.\x20Use\x20a\x20stable\x20unique\x20orderBy\x20field\x20to\x20avoid\x20duplicates\x20or\x20gaps.',a27_0x3bf33a(0x23a),a27_0x3bf33a(0x229),a27_0x3bf33a(0x202)][a27_0x3bf33a(0x1e8)]('\x0a')},{'command':a27_0x3bf33a(0x247),'operation':a27_0x3bf33a(0x247),'risk':a27_0x3bf33a(0x235),'paramsRequired':!![],'description':a27_0x3bf33a(0x243),'paramsHint':a27_0x3bf33a(0x1fb)},{'command':a27_0x3bf33a(0x22d),'operation':a27_0x3bf33a(0x22d),'risk':'write','paramsRequired':!![],'description':a27_0x3bf33a(0x20e),'confirmationDescription':a27_0x3bf33a(0x238),'paramsHint':'JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27'},{'command':a27_0x3bf33a(0x208),'operation':a27_0x3bf33a(0x208),'risk':'write','paramsRequired':!![],'description':a27_0x3bf33a(0x212),'helpExtra':['\x20\x20EXCEL\x20ROUTES',a27_0x3bf33a(0x223),a27_0x3bf33a(0x1eb),a27_0x3bf33a(0x1f1),'\x20\x20\x20\x20This\x20command\x20sends\x20one\x20prepared\x20batch;\x20it\x20does\x20not\x20read\x20XLSX\x20or\x20split\x20batches.',a27_0x3bf33a(0x217),a27_0x3bf33a(0x239),a27_0x3bf33a(0x200),a27_0x3bf33a(0x218),a27_0x3bf33a(0x219),'\x20\x20\x20\x20Non-Excel\x20batchCreate\x20remains\x20available\x20for\x20METADATA\x20and\x20DB_TABLE.']['join']('\x0a'),'confirmationDescription':a27_0x3bf33a(0x1ea),'paramsHint':a27_0x3bf33a(0x201)},{'command':a27_0x3bf33a(0x206),'operation':a27_0x3bf33a(0x206),'risk':a27_0x3bf33a(0x1f4),'paramsRequired':!![],'description':a27_0x3bf33a(0x1ed),'confirmationDescription':a27_0x3bf33a(0x1f7),'paramsHint':'JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20id\x20may\x20be\x20a\x20single\x20value\x20or\x20array.\x20'+'Examples:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27,\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22completed\x22}\x27'},{'command':'delete','operation':a27_0x3bf33a(0x20a),'risk':a27_0x3bf33a(0x1fe),'paramsRequired':!![],'description':'Delete\x20data\x20records\x20(non-interactive\x20mode\x20requires\x20--yes)','confirmationDescription':a27_0x3bf33a(0x242),'paramsHint':a27_0x3bf33a(0x1fb)},{'command':a27_0x3bf33a(0x224),'operation':'aggregate','risk':a27_0x3bf33a(0x235),'paramsRequired':![],'description':a27_0x3bf33a(0x1fc),'paramsHint':a27_0x3bf33a(0x233)+a27_0x3bf33a(0x237),'helpExtra':[a27_0x3bf33a(0x20f),a27_0x3bf33a(0x22b),a27_0x3bf33a(0x24b),a27_0x3bf33a(0x1f9),a27_0x3bf33a(0x1e3),'\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Rounded\x20average\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg\x22,\x22round\x22:true,\x22precision\x22:2}','\x20\x20\x20\x20MAX\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Maximum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MAX\x22,\x22alias\x22:\x22max_price\x22}',a27_0x3bf33a(0x22f),'',a27_0x3bf33a(0x1ec),a27_0x3bf33a(0x1e1),a27_0x3bf33a(0x231),a27_0x3bf33a(0x1f2),a27_0x3bf33a(0x225),a27_0x3bf33a(0x20b),a27_0x3bf33a(0x24a),'','\x20\x20AGGREGATE\x20ALIAS\x20BOUNDARY',a27_0x3bf33a(0x234),a27_0x3bf33a(0x1ee),'\x20\x20\x20\x20orderBy\x20may\x20reference\x20aggregate\x20output\x20aliases','',a27_0x3bf33a(0x1f8),a27_0x3bf33a(0x21b),a27_0x3bf33a(0x1fd),a27_0x3bf33a(0x23c),a27_0x3bf33a(0x244),'',a27_0x3bf33a(0x228),a27_0x3bf33a(0x1f5),'\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','',a27_0x3bf33a(0x21d),a27_0x3bf33a(0x203),'',a27_0x3bf33a(0x249)][a27_0x3bf33a(0x1e8)]('\x0a')}];function makeDataCommand(_0x241af0){const _0x232c0c=a27_0x3bf33a,_0x20bedb=_0x232c0c(0x214)+_0x241af0['command'],_0x3a05e0={'service':'data','command':_0x241af0[_0x232c0c(0x246)],'description':_0x241af0[_0x232c0c(0x241)],'risk':_0x241af0[_0x232c0c(0x23f)],..._0x241af0[_0x232c0c(0x210)]?{'confirmationDescription':_0x241af0[_0x232c0c(0x210)]}:{},'helpExtra':_0x241af0[_0x232c0c(0x1f0)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x241af0[_0x232c0c(0x216)]}],'validate':async _0x46ff08=>{const _0x1e452d=_0x232c0c;_0x241af0[_0x1e452d(0x248)]&&requireAnyOf(_0x46ff08,['params'],_0x20bedb),_0x241af0[_0x1e452d(0x213)]==='batchCreate'&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x46ff08[_0x1e452d(0x1ef)]('params'))),_0x241af0[_0x1e452d(0x213)]===_0x1e452d(0x206)&&parseUpdateIdsFromParams(parseJsonParams(_0x46ff08['str'](_0x1e452d(0x1e6)))??{});},async 'execute'(_0xa9233c){const _0x91ab08=_0x232c0c,_0xa1f5e9=_0xa9233c[_0x91ab08(0x1ef)](_0x91ab08(0x221)),_0xe3b283=_0x241af0[_0x91ab08(0x213)]===_0x91ab08(0x208)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0xa9233c[_0x91ab08(0x1ef)](_0x91ab08(0x1e6)))):parseJsonParams(_0xa9233c[_0x91ab08(0x1ef)](_0x91ab08(0x1e6)))??{},_0x29b15d=_0x241af0[_0x91ab08(0x213)]==='update'?parseUpdateIdsFromParams(_0xe3b283):undefined,_0x32eb99=_0x29b15d?normalizeUpdateParamsForRuntime(_0xe3b283,_0x29b15d):_0xe3b283,_0x492d12=Date[_0x91ab08(0x215)](),_0x1324ea=await executeData(_0xa1f5e9,_0x241af0[_0x91ab08(0x213)],_0x32eb99),_0x20fed5=Date[_0x91ab08(0x215)]()-_0x492d12,_0x58b50b=_0x29b15d&&_0x29b15d[_0x91ab08(0x245)]>0x1?buildBatchUpdateResult(_0x29b15d,_0x1324ea):_0x1324ea;return{'ok':!![],'data':{'result':_0x58b50b,'elapsed':_0x20fed5},'message':_0x91ab08(0x214)+_0x241af0['command']+'\x20completed\x20in\x20'+_0x20fed5+'ms'};}};return _0x241af0[_0x232c0c(0x23f)]!==_0x232c0c(0x235)&&(_0x3a05e0['dryRun']=async _0x474810=>{const _0x47c276=_0x232c0c,_0x2daa9d=_0x474810['str'](_0x47c276(0x221)),_0x5dd4e6=_0x241af0[_0x47c276(0x213)]===_0x47c276(0x208)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x474810[_0x47c276(0x1ef)]('params'))):parseJsonParams(_0x474810[_0x47c276(0x1ef)]('params'))??{};let _0x5d2d8a=_0x5dd4e6;if(_0x241af0['operation']===_0x47c276(0x206)){const _0x5ece80=parseUpdateIdsFromParams(_0x5dd4e6);_0x5d2d8a=normalizeUpdateParamsForRuntime(_0x5dd4e6,_0x5ece80);}return dryRun(_0x47c276(0x240),_0x47c276(0x1fa)+_0x2daa9d+'/'+_0x241af0[_0x47c276(0x213)])[_0x47c276(0x236)](_0x5d2d8a)[_0x47c276(0x241)](_0x47c276(0x1e9)+_0x241af0[_0x47c276(0x246)]+_0x47c276(0x23b)+_0x2daa9d)[_0x47c276(0x1f3)]();}),_0x3a05e0;}export const dataDefinitions=[...specs[a27_0x3bf33a(0x23d)](makeDataCommand),dataImportExcel];function buildBatchUpdateResult(_0x13e334,_0x55d9c2){const _0x834887=a27_0x3bf33a;return{'operation':'update','mode':_0x834887(0x227),'ids':_0x13e334,'total':_0x13e334[_0x834887(0x245)],'result':_0x55d9c2};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a28_0x4a30(){const _0x283f61=['responseFields','8ceQVmv','modifierIdField','dblinkInfoDTO','apiError','dbId','4809760LdKFEF','detail','datasetKey','allFields','afterScriptId','map','createTimeField','dataset','extend','parse','code','creatorNameField','tableName','isArray','3531234OZzXsI','updateTimeField','validateRules','indexes','filter','string','dataType','method','object','2036043bVkcwf','fields','name','host','trim','requestFields','read','push','split','type','options','required','logicField','modelCode','displayName','properties','description','str','responseBody','length','1084878DYFVEv','creatorIdField','8954162gOEWFi','Get\x20dataset\x20detail\x20including\x20fields,\x20relations,\x20and\x20operations','dbType','979819phKUvC','operations','appCode','path','pkField','beforeScriptId','allFieldNames','dbtableConfig','1176552XjZGmv','requestBody','doType','modelId','labelField','deleted','columnCodeListWithDeleted','formatRules','entries','dbName','relations','modifierNameField'];a28_0x4a30=function(){return _0x283f61;};return a28_0x4a30();}const a28_0x2a38a0=a28_0x4a62;(function(_0x5d6bab,_0x2171f3){const _0x56029d=a28_0x4a62,_0xfe66e5=_0x5d6bab();while(!![]){try{const _0x4bb424=parseInt(_0x56029d(0xd0))/0x1+-parseInt(_0x56029d(0xcb))/0x2+parseInt(_0x56029d(0xb7))/0x3+parseInt(_0x56029d(0x8e))/0x4+parseInt(_0x56029d(0xa0))/0x5+-parseInt(_0x56029d(0xae))/0x6+parseInt(_0x56029d(0xcd))/0x7*(-parseInt(_0x56029d(0x9b))/0x8);if(_0x4bb424===_0x2171f3)break;else _0xfe66e5['push'](_0xfe66e5['shift']());}catch(_0x1f9c37){_0xfe66e5['push'](_0xfe66e5['shift']());}}}(a28_0x4a30,0x7b27e));import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';function isRecord(_0x40ec5c){const _0x1b6899=a28_0x4a62;return _0x40ec5c!==null&&typeof _0x40ec5c==='object'&&!Array[_0x1b6899(0xad)](_0x40ec5c);}function normalizeField(_0x37f5b6){const _0x3fa6bb=a28_0x4a62;if(_0x37f5b6[_0x3fa6bb(0x93)])return null;const _0x9abda8=Boolean(_0x37f5b6['displayName']!==undefined||_0x37f5b6['doType']!==undefined);let _0x26dada={};if(!_0x9abda8&&typeof _0x37f5b6['extend']===_0x3fa6bb(0xb3))try{_0x26dada=JSON[_0x3fa6bb(0xa9)](_0x37f5b6[_0x3fa6bb(0xa8)]);}catch{}const _0x342399=_0x9abda8?_0x37f5b6[_0x3fa6bb(0xb9)]:_0x37f5b6[_0x3fa6bb(0xaa)],_0x2782be=_0x9abda8?_0x37f5b6[_0x3fa6bb(0xc5)]:_0x37f5b6[_0x3fa6bb(0xb9)],_0xd8fc22=_0x9abda8?_0x37f5b6[_0x3fa6bb(0x90)]:_0x37f5b6['type']||_0x37f5b6[_0x3fa6bb(0xb4)],_0x309444=_0x9abda8?_0x37f5b6['pkField']===!![]:_0x26dada[_0x3fa6bb(0x8a)]===!![],_0x3a78c8=_0x9abda8?_0x37f5b6[_0x3fa6bb(0xc2)]===!![]:_0x26dada[_0x3fa6bb(0xc2)]===!![],_0x1db2c7=_0x9abda8?_0x37f5b6[_0x3fa6bb(0xc1)]??null:_0x26dada[_0x3fa6bb(0xc1)]??null,_0x4fab12={'name':_0x342399,'displayName':_0x2782be||_0x342399,'type':_0xd8fc22,'dbType':_0x37f5b6[_0x3fa6bb(0xcf)],'pk':_0x309444,'required':_0x3a78c8,'description':_0x37f5b6[_0x3fa6bb(0xc7)]||undefined};return Array['isArray'](_0x1db2c7)&&_0x1db2c7[_0x3fa6bb(0xca)]>0x0&&(_0x4fab12[_0x3fa6bb(0xc1)]=_0x1db2c7),_0x4fab12;}function a28_0x4a62(_0x5eca85,_0x2cba13){_0x5eca85=_0x5eca85-0x88;const _0x4a3012=a28_0x4a30();let _0x4a623e=_0x4a3012[_0x5eca85];return _0x4a623e;}function parseJsonMaybe(_0x543534){const _0x53235e=a28_0x4a62;if(typeof _0x543534!==_0x53235e(0xb3))return _0x543534;try{return JSON[_0x53235e(0xa9)](_0x543534);}catch{return _0x543534;}}function normalizeOperationEntry(_0x112ea7,_0x1dc749){const _0x82661c=a28_0x4a62;if(!_0x1dc749||typeof _0x1dc749!==_0x82661c(0xb6))return null;if(!_0x1dc749[_0x82661c(0xb5)]||!_0x1dc749['path'])return null;const _0x2d332e={'name':_0x112ea7,'method':_0x1dc749[_0x82661c(0xb5)],'path':_0x1dc749[_0x82661c(0x89)]};if(_0x1dc749[_0x82661c(0xba)])_0x2d332e['host']=_0x1dc749[_0x82661c(0xba)];if(_0x1dc749[_0x82661c(0x8f)]!=null)_0x2d332e[_0x82661c(0x8f)]=parseJsonMaybe(_0x1dc749[_0x82661c(0x8f)]);if(_0x1dc749['responseBody']!=null)_0x2d332e['responseBody']=parseJsonMaybe(_0x1dc749[_0x82661c(0xc9)]);if(_0x1dc749[_0x82661c(0x8b)]!=null)_0x2d332e[_0x82661c(0x8b)]=_0x1dc749['beforeScriptId'];if(_0x1dc749[_0x82661c(0xa4)]!=null)_0x2d332e[_0x82661c(0xa4)]=_0x1dc749[_0x82661c(0xa4)];if(Array['isArray'](_0x1dc749[_0x82661c(0xbc)]))_0x2d332e[_0x82661c(0xbc)]=_0x1dc749[_0x82661c(0xbc)];if(Array[_0x82661c(0xad)](_0x1dc749[_0x82661c(0x9a)]))_0x2d332e[_0x82661c(0x9a)]=_0x1dc749[_0x82661c(0x9a)];return _0x2d332e;}function summarizeDbtable(_0x1d0aa9){const _0x4a22d7=a28_0x4a62,_0x3a663c={},_0x3c922c=[_0x4a22d7(0x9f),_0x4a22d7(0x97),'tableName',_0x4a22d7(0xa2),_0x4a22d7(0x8a),'allFields',_0x4a22d7(0xc3),_0x4a22d7(0xa6),_0x4a22d7(0xaf),_0x4a22d7(0xcc),_0x4a22d7(0xab),_0x4a22d7(0x9c),_0x4a22d7(0x99),_0x4a22d7(0x92),_0x4a22d7(0x9d)];for(const _0x1b09f7 of _0x3c922c){if(_0x1d0aa9[_0x1b09f7]!==undefined)_0x3a663c[_0x1b09f7]=_0x1d0aa9[_0x1b09f7];}return typeof _0x3a663c[_0x4a22d7(0xa3)]===_0x4a22d7(0xb3)&&_0x3a663c['allFields'][_0x4a22d7(0xca)]>0x0&&(_0x3a663c[_0x4a22d7(0x8c)]=_0x3a663c['allFields'][_0x4a22d7(0xbf)](',')[_0x4a22d7(0xa5)](_0x5bef3a=>_0x5bef3a['trim']())[_0x4a22d7(0xb2)](Boolean)),_0x3a663c;}function normalizeRelatedPages(_0x56bd36){const _0x291036=a28_0x4a62;if(!Array[_0x291036(0xad)](_0x56bd36))return[];return _0x56bd36['filter'](_0x59e56a=>_0x59e56a&&typeof _0x59e56a===_0x291036(0xb6))[_0x291036(0xa5)](_0x539a69=>({'id':_0x539a69['id'],'type':_0x539a69[_0x291036(0xc0)],'code':_0x539a69['code'],'title':_0x539a69['title'],'deleted':_0x539a69[_0x291036(0x93)]===!![]}));}function normalizeFallbackFieldName(_0x79925,_0x26b285){const _0x7bea8a=a28_0x4a62,_0xa4b7c8=_0x79925[_0x7bea8a(0xbb)]();if(!_0xa4b7c8)return null;return{'name':_0xa4b7c8,'displayName':_0xa4b7c8,'type':undefined,'dbType':undefined,'pk':_0xa4b7c8===_0x26b285,'required':![],'description':undefined};}async function loadListFieldFallback(_0x53f72a,_0x3de537){const _0x19ca2a=a28_0x4a62;if(!_0x53f72a||!_0x3de537)return[];try{const _0x251c8d=await listDatasets(_0x53f72a,{'code':_0x3de537}),_0x4a022d=_0x251c8d['find'](_0xa779a7=>_0xa779a7[_0x19ca2a(0xaa)]===_0x3de537)??_0x251c8d[0x0],_0x325da8=_0x4a022d?.[_0x19ca2a(0x8d)]??{},_0x14b79a=typeof _0x325da8[_0x19ca2a(0xa3)]===_0x19ca2a(0xb3)?_0x325da8[_0x19ca2a(0xa3)][_0x19ca2a(0xbf)](','):[];return _0x14b79a['map'](_0x342598=>normalizeFallbackFieldName(_0x342598,_0x325da8['pkField']))[_0x19ca2a(0xb2)](_0x328306=>_0x328306!==null);}catch{return[];}}export const datasetDetail={'service':a28_0x2a38a0(0xa7),'command':a28_0x2a38a0(0xa1),'description':a28_0x2a38a0(0xce),'risk':a28_0x2a38a0(0xbd),'flags':[CODE_FLAG],async 'execute'(_0x51fd62){const _0x53ad56=a28_0x2a38a0,_0x105096=await getDatasetDetail(_0x51fd62[_0x53ad56(0xc8)](_0x53ad56(0xaa)));if(!isRecord(_0x105096))throw CliErrors[_0x53ad56(0x9e)]('Dataset\x20detail\x20must\x20be\x20an\x20object.');const _0xe758bc=Array[_0x53ad56(0xad)](_0x105096[_0x53ad56(0xb8)])?_0x105096[_0x53ad56(0xb8)]:Array[_0x53ad56(0xad)](_0x105096['properties'])?_0x105096[_0x53ad56(0xc6)]:[];let _0x4b494e=_0xe758bc[_0x53ad56(0xa5)](_0x27d490=>normalizeField(_0x27d490))[_0x53ad56(0xb2)](_0x580f00=>_0x580f00!==null);_0x4b494e[_0x53ad56(0xca)]===0x0&&(_0x4b494e=await loadListFieldFallback(_0x51fd62[_0x53ad56(0x88)],_0x51fd62['str'](_0x53ad56(0xaa))));const _0x3aeee3=_0x105096[_0x53ad56(0xd1)]??{},_0x5c6b1f=[];for(const [_0x1b03f3,_0x4172d7]of Object[_0x53ad56(0x96)](_0x3aeee3)){const _0x5d426d=normalizeOperationEntry(_0x1b03f3,_0x4172d7);if(_0x5d426d)_0x5c6b1f[_0x53ad56(0xbe)](_0x5d426d);}const _0x402fda=isRecord(_0x105096[_0x53ad56(0x8d)])?_0x105096['dbtableConfig']:{},_0x54ad4c=isRecord(_0x105096['dataset'])?_0x105096['dataset']:{},_0x39cf80=_0x402fda[_0x53ad56(0x9f)]!=null?{'id':_0x402fda['dbId'],'name':_0x402fda[_0x53ad56(0x97)]??null}:undefined;let _0x3f40b3;return typeof _0x105096['extend']===_0x53ad56(0xb3)&&(_0x3f40b3=parseJsonMaybe(_0x105096[_0x53ad56(0xa8)])),{'ok':!![],'data':{'id':_0x105096[_0x53ad56(0x91)]??_0x105096['id'],'name':_0x105096[_0x53ad56(0xb9)],'code':_0x105096[_0x53ad56(0xc4)]||_0x105096[_0x53ad56(0xaa)],'doVersion':_0x105096['doVersion'],'description':_0x105096['description']||_0x54ad4c['tableComment']||undefined,'source':_0x105096['source']||_0x54ad4c['sourceType'],'table':_0x402fda[_0x53ad56(0xac)]||_0x54ad4c[_0x53ad56(0xac)],'datasetKey':_0x402fda[_0x53ad56(0xa2)],'pk':_0x402fda[_0x53ad56(0x8a)],'db':_0x39cf80,'dbtable':summarizeDbtable(_0x402fda),'fields':_0x4b494e,'operations':_0x5c6b1f,'indexes':Array[_0x53ad56(0xad)](_0x54ad4c['indexes'])?_0x54ad4c[_0x53ad56(0xb1)]:[],'relations':_0x105096[_0x53ad56(0x98)]??null,'relatedPages':normalizeRelatedPages(_0x105096['relatedPageInfoList']),...Array['isArray'](_0x105096['columnCodeListWithDeleted'])?{'columnCodeListWithDeleted':_0x105096[_0x53ad56(0x94)]}:{},'formatRules':Array['isArray'](_0x105096[_0x53ad56(0x95)])?_0x105096[_0x53ad56(0x95)]:[],'validateRules':Array['isArray'](_0x105096[_0x53ad56(0xb0)])?_0x105096[_0x53ad56(0xb0)]:[],..._0x3f40b3!==undefined?{'extend':_0x3f40b3}:{},'stats':{'fieldCount':_0x4b494e[_0x53ad56(0xca)],'operationCount':_0x5c6b1f[_0x53ad56(0xca)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a29_0x2e6c(_0x18dd41,_0x4fe307){_0x18dd41=_0x18dd41-0xbc;const _0x5f55a5=a29_0x5f55();let _0x2e6c18=_0x5f55a5[_0x18dd41];return _0x2e6c18;}function a29_0x5f55(){const _0x51957c=['668904UzuCgo','29855580DDBpAP','6583216DzSHzN','545xWSNVV','6Irgroh','2790663rMEdOQ','9rOJiZy','257264YZGiAU','43556guCAtc','5120759HcgmTc'];a29_0x5f55=function(){return _0x51957c;};return a29_0x5f55();}(function(_0x544f42,_0x299513){const _0x1f0b75=a29_0x2e6c,_0x31c524=_0x544f42();while(!![]){try{const _0x359519=parseInt(_0x1f0b75(0xc0))/0x1+-parseInt(_0x1f0b75(0xc3))/0x2+parseInt(_0x1f0b75(0xbe))/0x3+parseInt(_0x1f0b75(0xc1))/0x4*(parseInt(_0x1f0b75(0xbc))/0x5)+parseInt(_0x1f0b75(0xbd))/0x6*(parseInt(_0x1f0b75(0xc2))/0x7)+parseInt(_0x1f0b75(0xc5))/0x8+-parseInt(_0x1f0b75(0xbf))/0x9*(parseInt(_0x1f0b75(0xc4))/0xa);if(_0x359519===_0x299513)break;else _0x31c524['push'](_0x31c524['shift']());}catch(_0x4b7760){_0x31c524['push'](_0x31c524['shift']());}}}(a29_0x5f55,0x94a2f));import{datasetList}from'../../commands/dataset/list.js';import{datasetDetail}from'../../commands/dataset/detail.js';import{datasetSdkDoc}from'../../commands/dataset/sdk-doc.js';export const datasetDefinitions=[datasetList,datasetDetail,datasetSdkDoc];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a30_0x4c764c=a30_0x2da8;(function(_0x2a7012,_0x3f2802){const _0x8104=a30_0x2da8,_0x3b18e5=_0x2a7012();while(!![]){try{const _0x53f308=parseInt(_0x8104(0xfd))/0x1+parseInt(_0x8104(0xf6))/0x2*(parseInt(_0x8104(0xf1))/0x3)+parseInt(_0x8104(0x105))/0x4*(parseInt(_0x8104(0xf8))/0x5)+-parseInt(_0x8104(0xf5))/0x6*(parseInt(_0x8104(0xf9))/0x7)+parseInt(_0x8104(0xf3))/0x8+parseInt(_0x8104(0xf2))/0x9+parseInt(_0x8104(0xfe))/0xa*(-parseInt(_0x8104(0xf0))/0xb);if(_0x53f308===_0x3f2802)break;else _0x3b18e5['push'](_0x3b18e5['shift']());}catch(_0x58fa47){_0x3b18e5['push'](_0x3b18e5['shift']());}}}(a30_0x5df5,0x7acfc));function a30_0x5df5(){const _0x5ec275=['table-name','source','109080tzNSOW','List\x20datasets\x20in\x20the\x20app\x20(server-side\x20name/code/table-name\x20filters\x20combine\x20with\x20AND)','pkField','appCode','code','read','277893vbvMjW','33EiLLhj','8028576FOMenz','1708104LXjRTl','allFields','753828QSSHKF','27596FqfTiE','split','30oAirvL','49zJamYy','str','string','dataset','946784fZVhxq','390qIwBFp','name','datasetKey','description','dbtableConfig'];a30_0x5df5=function(){return _0x5ec275;};return a30_0x5df5();}function a30_0x2da8(_0x5d931d,_0x45d545){_0x5d931d=_0x5d931d-0xec;const _0x5df561=a30_0x5df5();let _0x2da82b=_0x5df561[_0x5d931d];return _0x2da82b;}import{listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';export const datasetList={'service':a30_0x4c764c(0xfc),'command':'list','description':a30_0x4c764c(0x106),'risk':a30_0x4c764c(0xef),'flags':[{'name':a30_0x4c764c(0xff),'type':a30_0x4c764c(0xfb),'description':'Filter\x20by\x20dataset\x20name\x20(server-side\x20fuzzy\x20match)'},{'name':a30_0x4c764c(0x103),'type':a30_0x4c764c(0xfb),'description':'Filter\x20by\x20physical\x20table\x20name\x20(server-side\x20prefix\x20match;\x20SQL\x20LIKE\x20wildcards\x20%\x20and\x20_\x20apply)'},{...CODE_FLAG,'required':![],'description':'Filter\x20by\x20dataset\x20code\x20(server-side\x20exact\x20match)'}],async 'execute'(_0x12315d){const _0x5b095c=a30_0x4c764c,_0x510a0a=_0x12315d[_0x5b095c(0xfa)](_0x5b095c(0xff)),_0x119cc8=_0x12315d['str']('code'),_0x408bbc=_0x12315d[_0x5b095c(0xfa)]('table-name'),_0x8e6db0=await listDatasets(_0x12315d[_0x5b095c(0xed)],{..._0x510a0a&&{'name':_0x510a0a},..._0x119cc8&&{'code':_0x119cc8},..._0x408bbc&&{'tableName':_0x408bbc}});return{'ok':!![],'data':{'total':_0x8e6db0['length'],'datasets':_0x8e6db0['map'](_0xb1922f=>{const _0x353bf2=_0x5b095c,_0x8ca925=_0xb1922f[_0x353bf2(0x102)]??{};return{'id':_0xb1922f['id'],'code':_0xb1922f[_0x353bf2(0xee)],'name':_0xb1922f[_0x353bf2(0xff)],'source':_0xb1922f[_0x353bf2(0x104)],'description':_0xb1922f[_0x353bf2(0x101)],'table':_0x8ca925['tableName'],'datasetKey':_0x8ca925[_0x353bf2(0x100)],'pk':_0x8ca925[_0x353bf2(0xec)],'fields':_0x8ca925[_0x353bf2(0xf4)]?_0x8ca925[_0x353bf2(0xf4)][_0x353bf2(0xf7)](',')['map'](_0x19330f=>_0x19330f['trim']()):[]};})}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a31_0x237439=a31_0x1e20;(function(_0x54be02,_0x43d7d8){const _0x762d69=a31_0x1e20,_0x1f0395=_0x54be02();while(!![]){try{const _0x3525b2=-parseInt(_0x762d69(0x1fb))/0x1*(parseInt(_0x762d69(0x1f4))/0x2)+parseInt(_0x762d69(0x1f2))/0x3*(-parseInt(_0x762d69(0x201))/0x4)+-parseInt(_0x762d69(0x1f9))/0x5*(parseInt(_0x762d69(0x1f6))/0x6)+-parseInt(_0x762d69(0x1f5))/0x7+-parseInt(_0x762d69(0x1f1))/0x8+parseInt(_0x762d69(0x202))/0x9+-parseInt(_0x762d69(0x1fd))/0xa*(-parseInt(_0x762d69(0x1ff))/0xb);if(_0x3525b2===_0x43d7d8)break;else _0x1f0395['push'](_0x1f0395['shift']());}catch(_0x4da86c){_0x1f0395['push'](_0x1f0395['shift']());}}}(a31_0xb51d,0x1c9da));import{getDatasetSdkUsageDoc}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';const DEFAULT_MARKDOWN=a31_0x237439(0x1fc);function a31_0x1e20(_0x780f60,_0x2b952f){_0x780f60=_0x780f60-0x1f0;const _0xb51da9=a31_0xb51d();let _0x1e2042=_0xb51da9[_0x780f60];return _0x1e2042;}export function formatDatasetSdkMarkdown(_0x8c9151){const _0x27c81c=a31_0x237439,_0xa00f6d=typeof _0x8c9151==='string'?_0x8c9151[_0x27c81c(0x200)]():'';return _0xa00f6d||DEFAULT_MARKDOWN;}export const datasetSdkDoc={'service':a31_0x237439(0x1f8),'command':a31_0x237439(0x1fa),'description':a31_0x237439(0x1f7),'risk':a31_0x237439(0x1f3),'flags':[{...CODE_FLAG,'description':a31_0x237439(0x1fe)}],async 'execute'(_0x294e91){const _0x478775=a31_0x237439,_0x4bf5d4=_0x294e91[_0x478775(0x203)](_0x478775(0x1f0)),_0x472252=await getDatasetSdkUsageDoc(_0x4bf5d4,_0x294e91[_0x478775(0x204)]);return{'ok':!![],'data':{'code':_0x4bf5d4,'appCode':_0x294e91['appCode'],'markdown':formatDatasetSdkMarkdown(_0x472252)}};}};function a31_0xb51d(){const _0x4a1161=['dataset','197040ElbNTh','sdk-doc','2HxqZmN','#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0aNo\x20SDK\x20usage\x20documentation\x20is\x20available.','3357630wWnnEL','Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.','22mzfYxV','trim','892280pRmlph','697482pWcQlu','str','appCode','code','433272mMDMYu','3Zklofw','read','188154NUmoQQ','613305HTcRRu','12wgQcQy','Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code'];a31_0xb51d=function(){return _0x4a1161;};return a31_0xb51d();}
|
package/lib/commands/doctor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a32_0x82e998=a32_0x2d11;(function(_0x2f3d00,_0x55cc09){const _0x59f829=a32_0x2d11,_0x46aa0f=_0x2f3d00();while(!![]){try{const _0xb68e4d=parseInt(_0x59f829(0x1a1))/0x1*(-parseInt(_0x59f829(0x1e3))/0x2)+parseInt(_0x59f829(0x205))/0x3+-parseInt(_0x59f829(0x1c3))/0x4+parseInt(_0x59f829(0x1ac))/0x5+-parseInt(_0x59f829(0x1b5))/0x6+parseInt(_0x59f829(0x1f0))/0x7*(parseInt(_0x59f829(0x210))/0x8)+parseInt(_0x59f829(0x1a5))/0x9;if(_0xb68e4d===_0x55cc09)break;else _0x46aa0f['push'](_0x46aa0f['shift']());}catch(_0x2e5322){_0x46aa0f['push'](_0x46aa0f['shift']());}}}(a32_0x3c23,0xc7f00));import a32_0x154379 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{getCliVersion}from'../utils/version.js';import{getApiDomain,getKbServiceDomain,getRuntimeDomain,getSkillDomain,getUserDomain}from'../constant/domain.js';function a32_0x2d11(_0x43d77f,_0xe43c11){_0x43d77f=_0x43d77f-0x199;const _0x3c232c=a32_0x3c23();let _0x2d11bf=_0x3c232c[_0x43d77f];return _0x2d11bf;}import{normalizeLovrabetRegion}from'../constant/region.js';function a32_0x3c23(){const _0x8e6161=['serviceCount','8728ZhQOLV','repairCommand','pageSize','\x20\x20Auth','yellow','bold','(set,\x20length=','length','✗\x20Invalid','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','Unavailable\x20until\x20routing\x20configuration\x20is\x20repaired','\x20\x20Config\x20JSON','2gKtieW','\x20\x20app\x20locale:\x20\x20\x20\x20\x20\x20','routing','\x20\x20runtimeDomain:\x20\x20\x20','18225639NDEwbo','doctor','\x20\x20API\x20Endpoints','\x20\x20auth\x20(effective):\x20','red','projectConfig','\x20\x20─','1908065Qmusgd','Global','commandCount','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','\x20\x20kbServiceDomain:\x20','empty','repeat','green','region','7550232MaUNCc','(invalid)','verbose','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20config\x20delete\x20routing\x20--global','(not\x20found)','\x20\x20Installed\x20Path:\x20\x20','(not\x20set)','missing','\x20\x20Merged\x20Config','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Country/Region\x20Configuration','current','4232420NLEmKh','skillVersion','accessKey','\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Repair\x20project:\x20\x20\x20','✓\x20current','path','read','\x20\x20Repair\x20global:\x20\x20\x20\x20','⚠\x20Empty\x20(treated\x20as\x20{})','inherit','\x20\x20Config\x20Files','\x20\x20Skill\x20Version:\x20\x20\x20','✗\x20Invalid\x20JSON','platform','padEnd','globalConfig','not\x20configured','gray','\x20config\x20init','\x20doctor','(removed\x20—\x20cookie\x20auth\x20disabled)','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','filter','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','call','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','✓\x20Loaded','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Repair\x20global:\x20\x20\x20','reason','848566DjCdsx','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','defaultApp','message','\x20Imported\x20from:\x20','serviceCode','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','appCode','format','\x20\x20Legacy\x20inherit:\x20\x20\x20','log','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','8743PIDAsZ','hasOwnProperty','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(none)','\x20commands)','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(default:\x20','✓\x20Valid\x20JSON','(missing)','raw','includes','\x20config\x20delete\x20routing','\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Diagnose\x20CLI\x20configuration\x20and\x20environment','global','\x20\x20Repair\x20project:\x20\x20','\x20\x20Built-in\x20Skill','status','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Package\x20Version:\x20','join','643932oROFGT','\x20\x20Session\x20check:\x20\x20\x20','\x20config\x20delete\x20inherit','prototype','\x20\x20Service\x20Tree','arch','locale','\x20\x20region:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','project','\x20+\x20'];a32_0x3c23=function(){return _0x8e6161;};return a32_0x3c23();}import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile,loadRawConfigLayers}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{inspectServiceRegistry}from'../commands/service/registry.js';import{inspectBuiltinSkill}from'../skills/builtin-skill.js';async function execute(_0x2a19ca){const _0x3be706=a32_0x2d11,_0x23f03d=getCliVersion(),_0x34a980=buildConfigFromFlags({});let _0x2eda6b,_0x238777;try{_0x2eda6b=normalizeLovrabetRegion(_0x34a980[_0x3be706(0x1f9)][_0x3be706(0x1b4)]);}catch(_0x10b288){_0x238777=_0x10b288 instanceof Error?_0x10b288:new Error(String(_0x10b288));}let _0x362cf6;if(!_0x238777)try{await initGlobalEnvironment(_0x34a980);}catch(_0x53b4a3){_0x362cf6=_0x53b4a3 instanceof Error?_0x53b4a3:new Error(String(_0x53b4a3));}console['log'](),console[_0x3be706(0x1ee)](a32_0x154379[_0x3be706(0x19a)](CLI_BIN_NAME+_0x3be706(0x1d7))),console[_0x3be706(0x1ee)](a32_0x154379['gray']('─'[_0x3be706(0x1b2)](0x32))),console['log'](_0x3be706(0x1af)+_0x23f03d),console[_0x3be706(0x1ee)]('\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+process['version']),console[_0x3be706(0x1ee)](_0x3be706(0x1c0)+process[_0x3be706(0x1d1)]+'\x20'+process[_0x3be706(0x20a)]);const _0x2f4901=inspectBuiltinSkill();console[_0x3be706(0x1ee)](),console[_0x3be706(0x1ee)](a32_0x154379[_0x3be706(0x19a)](_0x3be706(0x200))),console[_0x3be706(0x1ee)](a32_0x154379['gray'](_0x3be706(0x1ab)['repeat'](0x1e))),console[_0x3be706(0x1ee)](_0x3be706(0x1c6)+(_0x2f4901['state']===_0x3be706(0x1c2)?a32_0x154379[_0x3be706(0x1b3)](_0x3be706(0x1c8)):a32_0x154379[_0x3be706(0x1a9)]('✗\x20'+_0x2f4901['state']))),console['log'](_0x3be706(0x203)+_0x2f4901['packageVersion']),console[_0x3be706(0x1ee)](_0x3be706(0x1cf)+(_0x2f4901[_0x3be706(0x1c4)]||a32_0x154379[_0x3be706(0x1d5)](_0x3be706(0x1f8)))),console[_0x3be706(0x1ee)](_0x3be706(0x1bc)+(_0x2f4901['installedPath']||a32_0x154379['gray'](_0x3be706(0x1bb))));_0x2f4901['state']!==_0x3be706(0x1c2)&&console['log'](_0x3be706(0x1e5)+_0x2f4901[_0x3be706(0x211)]);_0x2f4901[_0x3be706(0x1e2)]&&console[_0x3be706(0x1ee)](_0x3be706(0x1fc)+_0x2f4901[_0x3be706(0x1e2)]);console[_0x3be706(0x1ee)](),console[_0x3be706(0x1ee)](a32_0x154379[_0x3be706(0x19a)](_0x3be706(0x1ce))),console[_0x3be706(0x1ee)](a32_0x154379[_0x3be706(0x1d5)](_0x3be706(0x1ab)[_0x3be706(0x1b2)](0x1e)));const _0x316248=getGlobalConfigPath(),_0x5ca411=getProjectConfigPath();console[_0x3be706(0x1ee)](_0x3be706(0x1f5)+(_0x316248||a32_0x154379[_0x3be706(0x1d5)](_0x3be706(0x1bb)))),console[_0x3be706(0x1ee)](_0x3be706(0x1ea)+(_0x5ca411||a32_0x154379['gray'](_0x3be706(0x1bb)))),console['log'](),console[_0x3be706(0x1ee)](a32_0x154379[_0x3be706(0x19a)](_0x3be706(0x1a0))),console[_0x3be706(0x1ee)](a32_0x154379[_0x3be706(0x1d5)](_0x3be706(0x1ab)[_0x3be706(0x1b2)](0x1e)));const _0x57e4b5=(_0xdff9fc,_0x28a37e)=>{const _0x3da626=_0x3be706;if(!_0x28a37e){console[_0x3da626(0x1ee)]('\x20\x20'+_0xdff9fc[_0x3da626(0x1d2)](0x11)+'\x20'+a32_0x154379['gray']('(no\x20file)'));return;}const _0x986da7=inspectCliConfigJsonFile(_0x28a37e);if(_0x986da7[_0x3da626(0x201)]==='ok')console[_0x3da626(0x1ee)]('\x20\x20'+_0xdff9fc[_0x3da626(0x1d2)](0x11)+'\x20'+a32_0x154379[_0x3da626(0x1b3)](_0x3da626(0x1f7)));else{if(_0x986da7[_0x3da626(0x201)]===_0x3da626(0x1b1))console[_0x3da626(0x1ee)]('\x20\x20'+_0xdff9fc[_0x3da626(0x1d2)](0x11)+'\x20'+a32_0x154379[_0x3da626(0x199)](_0x3da626(0x1cc)));else _0x986da7[_0x3da626(0x201)]===_0x3da626(0x1be)?console[_0x3da626(0x1ee)]('\x20\x20'+_0xdff9fc[_0x3da626(0x1d2)](0x11)+'\x20'+a32_0x154379['gray'](_0x3da626(0x1f8))):(console[_0x3da626(0x1ee)]('\x20\x20'+_0xdff9fc['padEnd'](0x11)+'\x20'+a32_0x154379['red'](_0x3da626(0x1d0))),console['log']('\x20\x20'+''['padEnd'](0x11)+'\x20'+a32_0x154379['red'](_0x986da7[_0x3da626(0x1e7)])));}};_0x57e4b5(_0x3be706(0x1ad),_0x316248),_0x57e4b5('Project',_0x5ca411);const _0x6aff54=loadRawConfigLayers(),_0x408d4c=[Object[_0x3be706(0x208)]['hasOwnProperty'][_0x3be706(0x1dc)](_0x6aff54[_0x3be706(0x1d3)],_0x3be706(0x1cd))?_0x3be706(0x1fe):null,Object[_0x3be706(0x208)]['hasOwnProperty'][_0x3be706(0x1dc)](_0x6aff54[_0x3be706(0x1aa)],_0x3be706(0x1cd))?_0x3be706(0x20d):null][_0x3be706(0x1da)](Boolean);_0x408d4c[_0x3be706(0x19c)]>0x0&&(console[_0x3be706(0x1ee)](_0x3be706(0x1ed)+a32_0x154379[_0x3be706(0x199)]('ignored\x20in\x20'+_0x408d4c[_0x3be706(0x204)](_0x3be706(0x20e))+'\x20config')),_0x408d4c[_0x3be706(0x1fa)](_0x3be706(0x20d))&&console[_0x3be706(0x1ee)](_0x3be706(0x1c7)+CLI_BIN_NAME+_0x3be706(0x207)),_0x408d4c[_0x3be706(0x1fa)](_0x3be706(0x1fe))&&console[_0x3be706(0x1ee)](_0x3be706(0x1cb)+CLI_BIN_NAME+'\x20config\x20delete\x20inherit\x20--global'));_0x362cf6&&(console[_0x3be706(0x1ee)](),console[_0x3be706(0x1ee)](a32_0x154379[_0x3be706(0x19a)]('\x20\x20Routing\x20Configuration')),console[_0x3be706(0x1ee)](a32_0x154379[_0x3be706(0x1d5)]('\x20\x20─'[_0x3be706(0x1b2)](0x1e))),console[_0x3be706(0x1ee)](_0x3be706(0x1d9)+a32_0x154379['red'](_0x3be706(0x19d))),console['log'](_0x3be706(0x1fc)+_0x362cf6[_0x3be706(0x1e7)]),Object[_0x3be706(0x208)]['hasOwnProperty']['call'](_0x6aff54['projectConfig'],'routing')&&console['log'](_0x3be706(0x1ff)+CLI_BIN_NAME+_0x3be706(0x1fb)),Object[_0x3be706(0x208)][_0x3be706(0x1f1)][_0x3be706(0x1dc)](_0x6aff54['globalConfig'],_0x3be706(0x1a3))&&console[_0x3be706(0x1ee)]('\x20\x20Repair\x20global:\x20\x20\x20'+CLI_BIN_NAME+_0x3be706(0x1ba)));_0x238777&&(console[_0x3be706(0x1ee)](),console[_0x3be706(0x1ee)](a32_0x154379['bold'](_0x3be706(0x1c1))),console['log'](a32_0x154379['gray']('\x20\x20─'['repeat'](0x1e))),console['log'](_0x3be706(0x1d9)+a32_0x154379['red'](_0x3be706(0x19d))),console[_0x3be706(0x1ee)]('\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x238777[_0x3be706(0x1e7)]),Object[_0x3be706(0x208)][_0x3be706(0x1f1)][_0x3be706(0x1dc)](_0x6aff54[_0x3be706(0x1aa)],_0x3be706(0x1b4))&&console[_0x3be706(0x1ee)](_0x3be706(0x1ff)+CLI_BIN_NAME+'\x20config\x20delete\x20region'),Object['prototype'][_0x3be706(0x1f1)][_0x3be706(0x1dc)](_0x6aff54[_0x3be706(0x1d3)],_0x3be706(0x1b4))&&console[_0x3be706(0x1ee)](_0x3be706(0x1e1)+CLI_BIN_NAME+_0x3be706(0x1d6)));console[_0x3be706(0x1ee)](),console['log'](a32_0x154379[_0x3be706(0x19a)](_0x3be706(0x1bf))),console[_0x3be706(0x1ee)](a32_0x154379[_0x3be706(0x1d5)]('\x20\x20─'[_0x3be706(0x1b2)](0x1e))),console[_0x3be706(0x1ee)]('\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x34a980[_0x3be706(0x1eb)]||a32_0x154379['red'](_0x3be706(0x1bd)))),console[_0x3be706(0x1ee)](_0x3be706(0x20c)+(_0x2eda6b??a32_0x154379[_0x3be706(0x1a9)](_0x3be706(0x1b6)))),console[_0x3be706(0x1ee)](_0x3be706(0x1a2)+_0x34a980[_0x3be706(0x20b)]),console['log'](_0x3be706(0x1dd)+(_0x34a980[_0x3be706(0x1e6)]||a32_0x154379[_0x3be706(0x1d5)]('(none)'))),console[_0x3be706(0x1ee)](_0x3be706(0x19e)+(_0x34a980['currentApp']||a32_0x154379[_0x3be706(0x1d5)](_0x3be706(0x1f3)))),console['log'](_0x3be706(0x1de)+(_0x34a980['format']||a32_0x154379[_0x3be706(0x1d5)](_0x3be706(0x1f6)+DEFAULT_CONFIG_VALUES[_0x3be706(0x1ec)]+')'))),console['log'](_0x3be706(0x1e4)+(_0x34a980[_0x3be706(0x212)]??a32_0x154379[_0x3be706(0x1d5)]('(default)'))),console[_0x3be706(0x1ee)](_0x3be706(0x1b9)+_0x34a980['riskLevel']),console[_0x3be706(0x1ee)](_0x3be706(0x1e0)+_0x34a980[_0x3be706(0x1b7)]),console[_0x3be706(0x1ee)](_0x3be706(0x1a8)+AUTH_MODE['ClientAk']),console[_0x3be706(0x1ee)](_0x3be706(0x1ef)+(_0x34a980[_0x3be706(0x1c5)]?a32_0x154379[_0x3be706(0x1b3)](_0x3be706(0x19b)+_0x34a980['accessKey'][_0x3be706(0x19c)]+')'):a32_0x154379[_0x3be706(0x1d5)](_0x3be706(0x1f3)))),console[_0x3be706(0x1ee)](),console[_0x3be706(0x1ee)](a32_0x154379[_0x3be706(0x19a)](_0x3be706(0x1a7))),console[_0x3be706(0x1ee)](a32_0x154379[_0x3be706(0x1d5)](_0x3be706(0x1ab)[_0x3be706(0x1b2)](0x1e)));_0x362cf6||_0x238777?console[_0x3be706(0x1ee)](_0x3be706(0x1d9)+a32_0x154379[_0x3be706(0x1a9)](_0x3be706(0x19f))):(console[_0x3be706(0x1ee)](_0x3be706(0x1db)+getApiDomain()),console[_0x3be706(0x1ee)]('\x20\x20userDomain:\x20\x20\x20\x20\x20\x20'+getUserDomain()),console['log'](_0x3be706(0x1a4)+getRuntimeDomain()),console['log']('\x20\x20skillDomain:\x20\x20\x20\x20\x20'+getSkillDomain()),console[_0x3be706(0x1ee)](_0x3be706(0x1b0)+(getKbServiceDomain()??_0x3be706(0x1d4))));console[_0x3be706(0x1ee)](),console[_0x3be706(0x1ee)](a32_0x154379[_0x3be706(0x19a)](_0x3be706(0x209))),console[_0x3be706(0x1ee)](a32_0x154379[_0x3be706(0x1d5)]('\x20\x20─'[_0x3be706(0x1b2)](0x1e)));const _0x1e39ab=inspectServiceRegistry();console[_0x3be706(0x1ee)](_0x3be706(0x1b8)+_0x1e39ab['registryPath']),console[_0x3be706(0x1ee)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+formatServiceRegistryStatus(_0x1e39ab)),console[_0x3be706(0x1ee)]('\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1e39ab[_0x3be706(0x20f)]),console[_0x3be706(0x1ee)](_0x3be706(0x202)+_0x1e39ab[_0x3be706(0x1ae)]);for(const _0x5b6651 of _0x1e39ab['services']){console[_0x3be706(0x1ee)]('\x20\x20'+(_0x5b6651[_0x3be706(0x1e9)]+':')[_0x3be706(0x1d2)](0x11)+'\x20'+(_0x5b6651['name']||a32_0x154379[_0x3be706(0x1d5)]('(unnamed)'))+'\x20('+_0x5b6651[_0x3be706(0x1ae)]+_0x3be706(0x1f4)),console[_0x3be706(0x1ee)]('\x20\x20'+''[_0x3be706(0x1d2)](0x11)+_0x3be706(0x1e8)+_0x5b6651['source'][_0x3be706(0x1c9)]);}return console[_0x3be706(0x1ee)](),console[_0x3be706(0x1ee)](a32_0x154379['bold'](_0x3be706(0x213))),console[_0x3be706(0x1ee)](a32_0x154379[_0x3be706(0x1d5)](_0x3be706(0x1ab)[_0x3be706(0x1b2)](0x1e))),console[_0x3be706(0x1ee)](_0x3be706(0x1f2)+a32_0x154379[_0x3be706(0x1b3)](AUTH_MODE['ClientAk']+'\x20(accessKey)')),console[_0x3be706(0x1ee)](_0x3be706(0x206)+a32_0x154379[_0x3be706(0x1d5)](_0x3be706(0x1d8))),console[_0x3be706(0x1ee)](),{'ok':!![]};}function formatServiceRegistryStatus(_0x256d34){const _0x4acde0=a32_0x2d11;if(_0x256d34[_0x4acde0(0x201)]==='ok')return a32_0x154379['green'](_0x4acde0(0x1df));if(_0x256d34[_0x4acde0(0x201)]===_0x4acde0(0x1be))return a32_0x154379[_0x4acde0(0x1d5)](_0x4acde0(0x1bb));if(_0x256d34[_0x4acde0(0x201)]===_0x4acde0(0x1b1))return a32_0x154379['yellow']('⚠\x20Empty');return a32_0x154379[_0x4acde0(0x1a9)](_0x4acde0(0x19d)+(_0x256d34['message']?':\x20'+_0x256d34[_0x4acde0(0x1e7)]:''));}export const doctorDefinition={'service':a32_0x82e998(0x1a6),'command':'check','description':a32_0x82e998(0x1fd),'risk':a32_0x82e998(0x1ca),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
1
|
+
const a32_0x25225f=a32_0x3159;function a32_0x3159(_0x20e1e4,_0x4cfd0a){_0x20e1e4=_0x20e1e4-0x1b4;const _0x581404=a32_0x5814();let _0x3159b3=_0x581404[_0x20e1e4];return _0x3159b3;}(function(_0x18a339,_0x2f604f){const _0x203740=a32_0x3159,_0x34f487=_0x18a339();while(!![]){try{const _0x176746=-parseInt(_0x203740(0x1c3))/0x1*(parseInt(_0x203740(0x1e5))/0x2)+-parseInt(_0x203740(0x1d7))/0x3+-parseInt(_0x203740(0x1eb))/0x4*(-parseInt(_0x203740(0x21b))/0x5)+-parseInt(_0x203740(0x219))/0x6+-parseInt(_0x203740(0x1cf))/0x7*(parseInt(_0x203740(0x222))/0x8)+-parseInt(_0x203740(0x1e8))/0x9*(-parseInt(_0x203740(0x1e4))/0xa)+parseInt(_0x203740(0x209))/0xb;if(_0x176746===_0x2f604f)break;else _0x34f487['push'](_0x34f487['shift']());}catch(_0x5630b7){_0x34f487['push'](_0x34f487['shift']());}}}(a32_0x5814,0xf0b9b));import a32_0x518bcf from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{getCliVersion}from'../utils/version.js';import{getApiDomain,getKbServiceDomain,getRuntimeDomain,getSkillDomain,getUserDomain}from'../constant/domain.js';import{normalizeLovrabetRegion}from'../constant/region.js';import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile,loadRawConfigLayers}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{inspectServiceRegistry}from'../commands/service/registry.js';import{inspectBuiltinSkill}from'../skills/builtin-skill.js';async function execute(_0x45105b){const _0x46bdec=a32_0x3159,_0xf75188=getCliVersion(),_0x7511ea=buildConfigFromFlags({});let _0x2a7ed1,_0x39c721;try{_0x2a7ed1=normalizeLovrabetRegion(_0x7511ea[_0x46bdec(0x22a)][_0x46bdec(0x1ff)]);}catch(_0x3c15cb){_0x39c721=_0x3c15cb instanceof Error?_0x3c15cb:new Error(String(_0x3c15cb));}let _0x2dd692;if(!_0x39c721)try{await initGlobalEnvironment(_0x7511ea);}catch(_0x306b14){_0x2dd692=_0x306b14 instanceof Error?_0x306b14:new Error(String(_0x306b14));}console[_0x46bdec(0x20c)](),console[_0x46bdec(0x20c)](a32_0x518bcf[_0x46bdec(0x224)](CLI_BIN_NAME+'\x20doctor')),console[_0x46bdec(0x20c)](a32_0x518bcf[_0x46bdec(0x213)]('─'[_0x46bdec(0x227)](0x32))),console['log'](_0x46bdec(0x1b7)+_0xf75188),console[_0x46bdec(0x20c)](_0x46bdec(0x226)+process['version']),console[_0x46bdec(0x20c)]('\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20'+process['platform']+'\x20'+process['arch']);const _0x220a7d=inspectBuiltinSkill();console['log'](),console[_0x46bdec(0x20c)](a32_0x518bcf[_0x46bdec(0x224)](_0x46bdec(0x1c0))),console['log'](a32_0x518bcf['gray'](_0x46bdec(0x202)['repeat'](0x1e))),console[_0x46bdec(0x20c)]('\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x220a7d[_0x46bdec(0x21c)]===_0x46bdec(0x1f0)?a32_0x518bcf[_0x46bdec(0x1c1)]('✓\x20current'):a32_0x518bcf['red']('✗\x20'+_0x220a7d[_0x46bdec(0x21c)]))),console[_0x46bdec(0x20c)](_0x46bdec(0x21d)+_0x220a7d['packageVersion']),console[_0x46bdec(0x20c)](_0x46bdec(0x1ef)+(_0x220a7d['skillVersion']||a32_0x518bcf[_0x46bdec(0x213)](_0x46bdec(0x1f5)))),console[_0x46bdec(0x20c)]('\x20\x20Installed\x20Path:\x20\x20'+(_0x220a7d['installedPath']||a32_0x518bcf[_0x46bdec(0x213)](_0x46bdec(0x1c2))));_0x220a7d['state']!==_0x46bdec(0x1f0)&&console['log'](_0x46bdec(0x1cc)+_0x220a7d[_0x46bdec(0x1b6)]);_0x220a7d[_0x46bdec(0x1bb)]&&console['log'](_0x46bdec(0x21f)+_0x220a7d[_0x46bdec(0x1bb)]);console['log'](),console[_0x46bdec(0x20c)](a32_0x518bcf[_0x46bdec(0x224)]('\x20\x20Config\x20Files')),console[_0x46bdec(0x20c)](a32_0x518bcf[_0x46bdec(0x213)](_0x46bdec(0x202)[_0x46bdec(0x227)](0x1e)));const _0x296c86=getGlobalConfigPath(),_0xaa85b6=getProjectConfigPath();console[_0x46bdec(0x20c)](_0x46bdec(0x1bc)+(_0x296c86||a32_0x518bcf[_0x46bdec(0x213)](_0x46bdec(0x1c2)))),console[_0x46bdec(0x20c)](_0x46bdec(0x1f7)+(_0xaa85b6||a32_0x518bcf['gray'](_0x46bdec(0x1c2)))),console['log'](),console[_0x46bdec(0x20c)](a32_0x518bcf[_0x46bdec(0x224)](_0x46bdec(0x1d4))),console[_0x46bdec(0x20c)](a32_0x518bcf['gray'](_0x46bdec(0x202)[_0x46bdec(0x227)](0x1e)));const _0x94aa88=(_0x473e2c,_0x199b9d)=>{const _0x27dcd8=_0x46bdec;if(!_0x199b9d){console[_0x27dcd8(0x20c)]('\x20\x20'+_0x473e2c[_0x27dcd8(0x1c4)](0x11)+'\x20'+a32_0x518bcf[_0x27dcd8(0x213)](_0x27dcd8(0x1f1)));return;}const _0x19a988=inspectCliConfigJsonFile(_0x199b9d);if(_0x19a988[_0x27dcd8(0x214)]==='ok')console[_0x27dcd8(0x20c)]('\x20\x20'+_0x473e2c[_0x27dcd8(0x1c4)](0x11)+'\x20'+a32_0x518bcf['green'](_0x27dcd8(0x1e9)));else{if(_0x19a988[_0x27dcd8(0x214)]===_0x27dcd8(0x212))console[_0x27dcd8(0x20c)]('\x20\x20'+_0x473e2c['padEnd'](0x11)+'\x20'+a32_0x518bcf['yellow'](_0x27dcd8(0x200)));else _0x19a988[_0x27dcd8(0x214)]===_0x27dcd8(0x208)?console['log']('\x20\x20'+_0x473e2c[_0x27dcd8(0x1c4)](0x11)+'\x20'+a32_0x518bcf[_0x27dcd8(0x213)](_0x27dcd8(0x1f5))):(console[_0x27dcd8(0x20c)]('\x20\x20'+_0x473e2c[_0x27dcd8(0x1c4)](0x11)+'\x20'+a32_0x518bcf['red'](_0x27dcd8(0x225))),console[_0x27dcd8(0x20c)]('\x20\x20'+''[_0x27dcd8(0x1c4)](0x11)+'\x20'+a32_0x518bcf['red'](_0x19a988[_0x27dcd8(0x1dd)])));}};_0x94aa88(_0x46bdec(0x1e6),_0x296c86),_0x94aa88(_0x46bdec(0x1ca),_0xaa85b6);const _0x21b87a=loadRawConfigLayers(),_0x1b7442=[Object[_0x46bdec(0x1d3)][_0x46bdec(0x1fd)][_0x46bdec(0x1e7)](_0x21b87a[_0x46bdec(0x1f4)],_0x46bdec(0x221))?'global':null,Object[_0x46bdec(0x1d3)][_0x46bdec(0x1fd)]['call'](_0x21b87a['projectConfig'],_0x46bdec(0x221))?_0x46bdec(0x21a):null][_0x46bdec(0x1df)](Boolean);_0x1b7442[_0x46bdec(0x1ee)]>0x0&&(console[_0x46bdec(0x20c)](_0x46bdec(0x1ba)+a32_0x518bcf['yellow'](_0x46bdec(0x204)+_0x1b7442[_0x46bdec(0x206)](_0x46bdec(0x1d5))+'\x20config')),_0x1b7442[_0x46bdec(0x1bd)]('project')&&console[_0x46bdec(0x20c)](_0x46bdec(0x229)+CLI_BIN_NAME+_0x46bdec(0x21e)),_0x1b7442[_0x46bdec(0x1bd)]('global')&&console[_0x46bdec(0x20c)](_0x46bdec(0x1bf)+CLI_BIN_NAME+'\x20config\x20delete\x20inherit\x20--global'));_0x2dd692&&(console['log'](),console[_0x46bdec(0x20c)](a32_0x518bcf['bold']('\x20\x20Routing\x20Configuration')),console[_0x46bdec(0x20c)](a32_0x518bcf[_0x46bdec(0x213)]('\x20\x20─'[_0x46bdec(0x227)](0x1e))),console[_0x46bdec(0x20c)](_0x46bdec(0x20a)+a32_0x518bcf[_0x46bdec(0x205)](_0x46bdec(0x1f3))),console[_0x46bdec(0x20c)](_0x46bdec(0x21f)+_0x2dd692[_0x46bdec(0x1dd)]),Object[_0x46bdec(0x1d3)]['hasOwnProperty']['call'](_0x21b87a['projectConfig'],'routing')&&console[_0x46bdec(0x20c)](_0x46bdec(0x1fe)+CLI_BIN_NAME+'\x20config\x20delete\x20routing'),Object[_0x46bdec(0x1d3)][_0x46bdec(0x1fd)][_0x46bdec(0x1e7)](_0x21b87a[_0x46bdec(0x1f4)],_0x46bdec(0x1f9))&&console[_0x46bdec(0x20c)](_0x46bdec(0x1b4)+CLI_BIN_NAME+_0x46bdec(0x220)));_0x39c721&&(console['log'](),console[_0x46bdec(0x20c)](a32_0x518bcf[_0x46bdec(0x224)](_0x46bdec(0x1cd))),console['log'](a32_0x518bcf[_0x46bdec(0x213)](_0x46bdec(0x202)[_0x46bdec(0x227)](0x1e))),console[_0x46bdec(0x20c)](_0x46bdec(0x20a)+a32_0x518bcf['red'](_0x46bdec(0x1f3))),console[_0x46bdec(0x20c)](_0x46bdec(0x21f)+_0x39c721[_0x46bdec(0x1dd)]),Object[_0x46bdec(0x1d3)][_0x46bdec(0x1fd)]['call'](_0x21b87a['projectConfig'],_0x46bdec(0x1ff))&&console[_0x46bdec(0x20c)](_0x46bdec(0x1fe)+CLI_BIN_NAME+'\x20config\x20delete\x20region'),Object[_0x46bdec(0x1d3)][_0x46bdec(0x1fd)]['call'](_0x21b87a['globalConfig'],_0x46bdec(0x1ff))&&console[_0x46bdec(0x20c)]('\x20\x20Repair\x20global:\x20\x20\x20'+CLI_BIN_NAME+'\x20config\x20init'));console[_0x46bdec(0x20c)](),console[_0x46bdec(0x20c)](a32_0x518bcf[_0x46bdec(0x224)](_0x46bdec(0x1d6))),console['log'](a32_0x518bcf[_0x46bdec(0x213)](_0x46bdec(0x202)[_0x46bdec(0x227)](0x1e))),console[_0x46bdec(0x20c)](_0x46bdec(0x217)+(_0x7511ea['appCode']||a32_0x518bcf['red'](_0x46bdec(0x215)))),console['log'](_0x46bdec(0x1ed)+(_0x2a7ed1??a32_0x518bcf[_0x46bdec(0x205)](_0x46bdec(0x1be)))),console[_0x46bdec(0x20c)](_0x46bdec(0x211)+_0x7511ea[_0x46bdec(0x1d1)]),console[_0x46bdec(0x20c)](_0x46bdec(0x1fc)+(_0x7511ea[_0x46bdec(0x20f)]||a32_0x518bcf[_0x46bdec(0x213)](_0x46bdec(0x1f2)))),console[_0x46bdec(0x20c)](_0x46bdec(0x1db)+(_0x7511ea[_0x46bdec(0x1d0)]||a32_0x518bcf[_0x46bdec(0x213)]('(none)'))),console[_0x46bdec(0x20c)]('\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x7511ea[_0x46bdec(0x1d2)]||a32_0x518bcf[_0x46bdec(0x213)]('(default:\x20'+DEFAULT_CONFIG_VALUES[_0x46bdec(0x1d2)]+')'))),console[_0x46bdec(0x20c)](_0x46bdec(0x1ce)+(_0x7511ea[_0x46bdec(0x223)]??a32_0x518bcf[_0x46bdec(0x213)](_0x46bdec(0x1dc)))),console[_0x46bdec(0x20c)](_0x46bdec(0x1c8)+_0x7511ea[_0x46bdec(0x1ea)]),console[_0x46bdec(0x20c)]('\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x7511ea[_0x46bdec(0x1da)]),console[_0x46bdec(0x20c)](_0x46bdec(0x203)+AUTH_MODE['ClientAk']),console[_0x46bdec(0x20c)](_0x46bdec(0x1e1)+(_0x7511ea['accessKey']?a32_0x518bcf[_0x46bdec(0x1c1)](_0x46bdec(0x1e2)+_0x7511ea['accessKey']['length']+')'):a32_0x518bcf[_0x46bdec(0x213)](_0x46bdec(0x1f2)))),console[_0x46bdec(0x20c)](),console[_0x46bdec(0x20c)](a32_0x518bcf[_0x46bdec(0x224)]('\x20\x20API\x20Endpoints')),console[_0x46bdec(0x20c)](a32_0x518bcf[_0x46bdec(0x213)](_0x46bdec(0x202)[_0x46bdec(0x227)](0x1e)));_0x2dd692||_0x39c721?console[_0x46bdec(0x20c)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a32_0x518bcf[_0x46bdec(0x205)](_0x46bdec(0x1d9))):(console[_0x46bdec(0x20c)](_0x46bdec(0x1c6)+getApiDomain()),console['log'](_0x46bdec(0x1fb)+getUserDomain()),console[_0x46bdec(0x20c)](_0x46bdec(0x228)+getRuntimeDomain()),console[_0x46bdec(0x20c)]('\x20\x20skillDomain:\x20\x20\x20\x20\x20'+getSkillDomain()),console[_0x46bdec(0x20c)]('\x20\x20kbServiceDomain:\x20'+(getKbServiceDomain()??_0x46bdec(0x1b9))));console['log'](),console[_0x46bdec(0x20c)](a32_0x518bcf[_0x46bdec(0x224)]('\x20\x20Service\x20Tree')),console['log'](a32_0x518bcf[_0x46bdec(0x213)](_0x46bdec(0x202)[_0x46bdec(0x227)](0x1e)));const _0x5f0c4f=inspectServiceRegistry();console['log'](_0x46bdec(0x1b8)+_0x5f0c4f[_0x46bdec(0x216)]),console[_0x46bdec(0x20c)](_0x46bdec(0x20a)+formatServiceRegistryStatus(_0x5f0c4f)),console[_0x46bdec(0x20c)]('\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x5f0c4f[_0x46bdec(0x20d)]),console[_0x46bdec(0x20c)](_0x46bdec(0x218)+_0x5f0c4f[_0x46bdec(0x20e)]);for(const _0x334e3d of _0x5f0c4f[_0x46bdec(0x1e3)]){console[_0x46bdec(0x20c)]('\x20\x20'+(_0x334e3d[_0x46bdec(0x1d8)]+':')['padEnd'](0x11)+'\x20'+(_0x334e3d[_0x46bdec(0x1cb)]||a32_0x518bcf[_0x46bdec(0x213)](_0x46bdec(0x1de)))+'\x20('+_0x334e3d[_0x46bdec(0x20e)]+_0x46bdec(0x1b5)),console['log']('\x20\x20'+''[_0x46bdec(0x1c4)](0x11)+_0x46bdec(0x20b)+_0x334e3d[_0x46bdec(0x1e0)][_0x46bdec(0x1fa)]);}return console[_0x46bdec(0x20c)](),console['log'](a32_0x518bcf['bold']('\x20\x20Auth')),console[_0x46bdec(0x20c)](a32_0x518bcf[_0x46bdec(0x213)](_0x46bdec(0x202)[_0x46bdec(0x227)](0x1e))),console['log'](_0x46bdec(0x1ec)+a32_0x518bcf[_0x46bdec(0x1c1)](AUTH_MODE[_0x46bdec(0x1f6)]+_0x46bdec(0x1c7))),console[_0x46bdec(0x20c)](_0x46bdec(0x207)+a32_0x518bcf[_0x46bdec(0x213)](_0x46bdec(0x1c9))),console[_0x46bdec(0x20c)](),{'ok':!![]};}function formatServiceRegistryStatus(_0x1e26a1){const _0x2fa7f8=a32_0x3159;if(_0x1e26a1['status']==='ok')return a32_0x518bcf[_0x2fa7f8(0x1c1)]('✓\x20Loaded');if(_0x1e26a1[_0x2fa7f8(0x214)]==='missing')return a32_0x518bcf[_0x2fa7f8(0x213)](_0x2fa7f8(0x1c2));if(_0x1e26a1[_0x2fa7f8(0x214)]===_0x2fa7f8(0x212))return a32_0x518bcf[_0x2fa7f8(0x201)]('⚠\x20Empty');return a32_0x518bcf[_0x2fa7f8(0x205)]('✗\x20Invalid'+(_0x1e26a1['message']?':\x20'+_0x1e26a1[_0x2fa7f8(0x1dd)]:''));}function a32_0x5814(){const _0x459899=['includes','(invalid)','\x20\x20Repair\x20global:\x20\x20\x20\x20','\x20\x20Built-in\x20Skill','green','(not\x20found)','3bEvYSo','padEnd','Diagnose\x20CLI\x20configuration\x20and\x20environment','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','\x20(accessKey)','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','(removed\x20—\x20cookie\x20auth\x20disabled)','Project','name','\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Country/Region\x20Configuration','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','9793UUqeDI','currentApp','locale','format','prototype','\x20\x20Config\x20JSON','\x20+\x20','\x20\x20Merged\x20Config','5459469fVpTNp','serviceCode','Unavailable\x20until\x20routing\x20configuration\x20is\x20repaired','verbose','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','(default)','message','(unnamed)','filter','source','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','(set,\x20length=','services','39550eBekST','775574YJgjDA','Global','call','2529wlGxck','✓\x20Valid\x20JSON','riskLevel','2200808vrClTM','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20region:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','length','\x20\x20Skill\x20Version:\x20\x20\x20','current','(no\x20file)','(none)','✗\x20Invalid','globalConfig','(missing)','ClientAk','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','doctor','routing','path','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','hasOwnProperty','\x20\x20Repair\x20project:\x20\x20','region','⚠\x20Empty\x20(treated\x20as\x20{})','yellow','\x20\x20─','\x20\x20auth\x20(effective):\x20','ignored\x20in\x20','red','join','\x20\x20Session\x20check:\x20\x20\x20','missing','42588931lgIKpl','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20Imported\x20from:\x20','log','serviceCount','commandCount','defaultApp','read','\x20\x20app\x20locale:\x20\x20\x20\x20\x20\x20','empty','gray','status','(not\x20set)','registryPath','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','10671150sTRsGd','project','10DHJeqw','state','\x20\x20Package\x20Version:\x20','\x20config\x20delete\x20inherit','\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20config\x20delete\x20routing\x20--global','inherit','1920tNRMgB','pageSize','bold','✗\x20Invalid\x20JSON','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','repeat','\x20\x20runtimeDomain:\x20\x20\x20','\x20\x20Repair\x20project:\x20\x20\x20','raw','\x20\x20Repair\x20global:\x20\x20\x20','\x20commands)','repairCommand','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','not\x20configured','\x20\x20Legacy\x20inherit:\x20\x20\x20','reason','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'];a32_0x5814=function(){return _0x459899;};return a32_0x5814();}export const doctorDefinition={'service':a32_0x25225f(0x1f8),'command':'check','description':a32_0x25225f(0x1c5),'risk':a32_0x25225f(0x210),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a33_0x11e2db=a33_0x421c;function a33_0x4d0e(){const _0x51132d=['4181751KpXjLz','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','Path\x20to\x20the\x20local\x20file\x20to\x20upload','read','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','file','1140208oxolvB','bool','Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','File','appCode','7943296wHZhiH','9lnYLhu','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','2515814GgCWiE','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','filePath','string','upload','filepath','str','boolean','path','\x20to\x20runtime\x20app\x20','description','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','long-term','validation','trim','14215SEmqFx','Uploaded\x20file:\x20','1116bwNWXj','307814NToQKt','Preview:\x20upload\x20','query-url','POST','body','8409078jBMWOV','download','/client/uploadFile'];a33_0x4d0e=function(){return _0x51132d;};return a33_0x4d0e();}(function(_0x942e70,_0x2309da){const _0x3934d0=a33_0x421c,_0x5efe6e=_0x942e70();while(!![]){try{const _0x50fa56=parseInt(_0x3934d0(0x1e3))/0x1*(parseInt(_0x3934d0(0x1f7))/0x2)+-parseInt(_0x3934d0(0x1ff))/0x3+-parseInt(_0x3934d0(0x205))/0x4+-parseInt(_0x3934d0(0x1f4))/0x5*(parseInt(_0x3934d0(0x1f6))/0x6)+-parseInt(_0x3934d0(0x1e5))/0x7+parseInt(_0x3934d0(0x1e2))/0x8+parseInt(_0x3934d0(0x1fc))/0x9;if(_0x50fa56===_0x2309da)break;else _0x5efe6e['push'](_0x5efe6e['shift']());}catch(_0x41b9bc){_0x5efe6e['push'](_0x5efe6e['shift']());}}}(a33_0x4d0e,0xb5f20));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';function a33_0x421c(_0x2d400b,_0x25ed94){_0x2d400b=_0x2d400b-0x1e0;const _0x4d0e4a=a33_0x4d0e();let _0x421c10=_0x4d0e4a[_0x2d400b];return _0x421c10;}import{queryRuntimeFileUrl,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const FILE_FLAG={'name':a33_0x11e2db(0x204),'type':a33_0x11e2db(0x1e8),'required':!![],'description':a33_0x11e2db(0x201)},FILEPATH_FLAG={'name':a33_0x11e2db(0x1ea),'type':a33_0x11e2db(0x1e8),'required':!![],'description':a33_0x11e2db(0x207)},DOWNLOAD_FLAG={'name':a33_0x11e2db(0x1fd),'type':'boolean','description':a33_0x11e2db(0x200)},LONG_TERM_FLAG={'name':a33_0x11e2db(0x1f1),'type':a33_0x11e2db(0x1ec),'description':a33_0x11e2db(0x1f0)};function requireFilePath(_0x117bef){const _0x407868=a33_0x11e2db,_0x342b53=_0x117bef[_0x407868(0x1f3)]();if(!_0x342b53)throw CliErrors[_0x407868(0x1f2)]('filePath\x20is\x20required.');return _0x342b53;}const fileUpload={'service':'file','command':a33_0x11e2db(0x1e9),'description':'Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','risk':a33_0x11e2db(0x202),'flags':[FILE_FLAG],async 'dryRun'(_0xf2b822){const _0x2ed98b=a33_0x11e2db,_0x2fc513=requireRuntimeUploadFile(_0xf2b822[_0x2ed98b(0x1eb)](_0x2ed98b(0x204)),'File');return dryRun(_0x2ed98b(0x1fa),_0x2ed98b(0x1fe))[_0x2ed98b(0x1fb)]({'appCode':_0xf2b822['appCode'],'multipart':{'file':_0x2fc513}})[_0x2ed98b(0x1ef)](_0x2ed98b(0x1f8)+_0x2fc513[_0x2ed98b(0x1ed)]+_0x2ed98b(0x1ee)+_0xf2b822[_0x2ed98b(0x1e1)])['build']();},async 'execute'(_0x15e18a){const _0x3971c6=a33_0x11e2db,_0x24561e=requireRuntimeUploadFile(_0x15e18a['str']('file'),_0x3971c6(0x1e0)),_0x4b2f0c=await uploadRuntimeFile(_0x15e18a[_0x3971c6(0x1e1)],_0x24561e[_0x3971c6(0x1ed)]);return{'ok':!![],'data':_0x4b2f0c,'message':_0x4b2f0c[_0x3971c6(0x1e7)]?_0x3971c6(0x1f5)+_0x4b2f0c[_0x3971c6(0x1e7)]+_0x3971c6(0x1e6):_0x3971c6(0x1e4)};}},fileQueryUrl={'service':a33_0x11e2db(0x204),'command':a33_0x11e2db(0x1f9),'description':a33_0x11e2db(0x203),'risk':'read','flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x42d488){const _0x115998=a33_0x11e2db,_0x4eb7be=requireFilePath(_0x42d488[_0x115998(0x1eb)](_0x115998(0x1ea))),_0x5e3231=await queryRuntimeFileUrl(_0x4eb7be,{'download':_0x42d488[_0x115998(0x206)]('download'),'longTerm':_0x42d488['bool'](_0x115998(0x1f1))});return{'ok':!![],'data':_0x5e3231};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
|
package/lib/commands/init.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a34_0x3a7b92=a34_0x28c4;(function(_0x12a988,_0x929f73){const _0x5ab9c1=a34_0x28c4,_0x48ab39=_0x12a988();while(!![]){try{const _0x4cc359=-parseInt(_0x5ab9c1(0x14a))/0x1+parseInt(_0x5ab9c1(0x13c))/0x2+parseInt(_0x5ab9c1(0x124))/0x3*(-parseInt(_0x5ab9c1(0x12c))/0x4)+-parseInt(_0x5ab9c1(0x128))/0x5+parseInt(_0x5ab9c1(0x122))/0x6*(-parseInt(_0x5ab9c1(0x145))/0x7)+-parseInt(_0x5ab9c1(0x133))/0x8*(-parseInt(_0x5ab9c1(0x12e))/0x9)+-parseInt(_0x5ab9c1(0x126))/0xa*(-parseInt(_0x5ab9c1(0x138))/0xb);if(_0x4cc359===_0x929f73)break;else _0x48ab39['push'](_0x48ab39['shift']());}catch(_0x458380){_0x48ab39['push'](_0x48ab39['shift']());}}}(a34_0x22de,0x31083));import{existsSync,readFileSync}from'node:fs';import{resolve,isAbsolute}from'node:path';import{CliErrors}from'../errors.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';function a34_0x22de(){const _0x46862a=['parse','riskLevel','236836RFMuAA','Override\x20imported\x20default\x20env','Invalid\x20env\x20\x22','boolean','yes','201468oPKKHs','Provide\x20--appcode\x20<code>\x20or\x20use\x20an\x20upgraded\x20.rabetbase.json\x20with\x20top-level\x20appcode.\x20Legacy\x20files\x20must\x20be\x20upgraded\x20first\x20with\x20`rabetbase\x20project\x20upgrade`.','3ESIheT','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','10RcbxDq','Source\x20file\x20not\x20found:\x20','479610IvZsdg','\x20\x20appcode:\x20','\x20\x20config:\x20\x20','project','785080nhFyiq','\x20\x20default:\x20','765lXIhsH','appcode','validation','Failed\x20to\x20parse\x20source\x20file:\x20','log','16696ObUuJo','cwd','apps','utf8','app','6413198aexdKP','global','string','entries','408992kwAwGx','Imported\x20from\x20','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','newConfigFileName','join','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','object','env','Override\x20imported\x20default\x20appcode','49QGobYW','defaultApp','\x22.\x20Allowed:\x20'];a34_0x22de=function(){return _0x46862a;};return a34_0x22de();}import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{IMPORTABLE_RUNTIME_CONFIG_KEYS}from'../config/schema.js';import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../context.js';import{PRODUCT_CONFIG}from'../constant/product.js';export const appImportFlagDefs=[{'name':'file','type':'string','description':a34_0x3a7b92(0x125),'required':!![]},{'name':a34_0x3a7b92(0x12f),'type':a34_0x3a7b92(0x13a),'description':a34_0x3a7b92(0x144)},{'name':a34_0x3a7b92(0x143),'type':a34_0x3a7b92(0x13a),'description':a34_0x3a7b92(0x11e),'enum':[...RUNTIME_ENV_VALUES]},{'name':a34_0x3a7b92(0x139),'type':a34_0x3a7b92(0x120),'description':'Write\x20to\x20global\x20(~/'+PRODUCT_CONFIG[a34_0x3a7b92(0x13f)]+')\x20instead\x20of\x20project','default':![]},{'name':a34_0x3a7b92(0x121),'type':a34_0x3a7b92(0x120),'description':'Skip\x20confirmation\x20when\x20overwriting','default':![]}];export async function runAppImport(_0x11e7e4){const _0x36849b=a34_0x3a7b92,_0x5d2a5c=_0x11e7e4[_0x36849b(0x139)]?_0x36849b(0x139):_0x36849b(0x12b),_0x4abd40=resolveWriteConfigPath(_0x5d2a5c);await runFromImport(_0x11e7e4,_0x4abd40);}async function runFromImport(_0x4fa781,_0x18919c){const _0x46e882=a34_0x3a7b92,_0x34d83b=resolveFilePath(_0x4fa781['file']);if(!existsSync(_0x34d83b))throw CliErrors[_0x46e882(0x130)](_0x46e882(0x127)+_0x34d83b);const _0x37f3f2=readSourceFile(_0x34d83b),_0x324e6f=convertToRuntimeConfig(_0x37f3f2);_0x4fa781[_0x46e882(0x12f)]&&(_0x324e6f[_0x46e882(0x12f)]=String(_0x4fa781[_0x46e882(0x12f)]));_0x4fa781[_0x46e882(0x143)]&&(_0x324e6f[_0x46e882(0x143)]=resolveImportEnv(_0x4fa781));if(!_0x324e6f[_0x46e882(0x12f)])throw CliErrors[_0x46e882(0x130)](_0x46e882(0x13e),_0x46e882(0x123));await writeImportConfig(_0x18919c,_0x324e6f,_0x4fa781),console['log'](_0x46e882(0x13d)+_0x34d83b),console['log'](_0x46e882(0x12a)+_0x18919c),console[_0x46e882(0x132)](_0x46e882(0x129)+_0x324e6f[_0x46e882(0x12f)]);if(_0x324e6f[_0x46e882(0x146)])console[_0x46e882(0x132)](_0x46e882(0x12d)+_0x324e6f[_0x46e882(0x146)]);}function convertToRuntimeConfig(_0x28a13a){const _0x107553=a34_0x3a7b92;if(_0x28a13a[_0x107553(0x135)]&&typeof _0x28a13a['apps']===_0x107553(0x142))throw CliErrors[_0x107553(0x130)](_0x107553(0x141),'Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.');const _0x56744c={};for(const _0x4d4bc4 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x28a13a[_0x4d4bc4]!==undefined&&(_0x56744c[_0x4d4bc4]=_0x28a13a[_0x4d4bc4]);}return!_0x56744c['riskLevel']&&(_0x56744c[_0x107553(0x149)]=DEFAULT_CONFIG_VALUES['riskLevel']),_0x56744c;}function a34_0x28c4(_0x435570,_0x2a7812){_0x435570=_0x435570-0x11e;const _0x22de9d=a34_0x22de();let _0x28c44f=_0x22de9d[_0x435570];return _0x28c44f;}async function writeImportConfig(_0x40e63f,_0x5c7d3c,_0x46955b){const _0x2fa0dd=a34_0x3a7b92;let _0x3344ea={};existsSync(_0x40e63f)&&!_0x46955b['yes']&&(_0x3344ea=readConfigFile(_0x40e63f));for(const [_0x1c3fdd,_0x5056a6]of Object[_0x2fa0dd(0x13b)](_0x5c7d3c)){_0x5056a6!==undefined&&(_0x3344ea[_0x1c3fdd]=_0x5056a6);}if(_0x3344ea[_0x2fa0dd(0x137)])delete _0x3344ea[_0x2fa0dd(0x137)];writeConfigFile(_0x40e63f,_0x3344ea);}function resolveFilePath(_0x36b411){const _0x2e9926=a34_0x3a7b92;return isAbsolute(_0x36b411)?_0x36b411:resolve(process[_0x2e9926(0x134)](),_0x36b411);}function readSourceFile(_0x5dc5b2){const _0x5340e0=a34_0x3a7b92;try{const _0xb9a60c=readFileSync(_0x5dc5b2,{'encoding':_0x5340e0(0x136)});return JSON[_0x5340e0(0x148)](_0xb9a60c);}catch(_0x535145){throw CliErrors[_0x5340e0(0x130)](_0x5340e0(0x131)+_0x535145['message']);}}function resolveImportEnv(_0x33230d){const _0xa26971=a34_0x3a7b92,_0x1f1de0=_0x33230d[_0xa26971(0x143)];if(_0x1f1de0===undefined||_0x1f1de0==='')return DEFAULT_CONFIG_VALUES[_0xa26971(0x143)];if(!RUNTIME_ENV_VALUES['includes'](_0x1f1de0))throw CliErrors['validation'](_0xa26971(0x11f)+_0x1f1de0+_0xa26971(0x147)+RUNTIME_ENV_VALUES[_0xa26971(0x140)](',\x20'));return _0x1f1de0;}
|
package/lib/commands/kb/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a35_0x7a22bd=a35_0x2c13;(function(_0x444e46,_0x518779){const _0x288c6b=a35_0x2c13,_0x565bce=_0x444e46();while(!![]){try{const _0x4c2876=parseInt(_0x288c6b(0xec))/0x1*(-parseInt(_0x288c6b(0x128))/0x2)+parseInt(_0x288c6b(0xff))/0x3*(parseInt(_0x288c6b(0xf1))/0x4)+parseInt(_0x288c6b(0xea))/0x5+-parseInt(_0x288c6b(0x101))/0x6+-parseInt(_0x288c6b(0xe6))/0x7+parseInt(_0x288c6b(0xf2))/0x8*(-parseInt(_0x288c6b(0xef))/0x9)+parseInt(_0x288c6b(0x11a))/0xa;if(_0x4c2876===_0x518779)break;else _0x565bce['push'](_0x565bce['shift']());}catch(_0x4f7ed7){_0x565bce['push'](_0x565bce['shift']());}}}(a35_0xdc30,0xaec7d));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalKnowledgeBaseItem,getPersonalKnowledgeBaseItem,listPersonalKnowledgeBaseItems,updatePersonalKnowledgeBaseItem}from'../../core/api-client.js';import{searchDirectKnowledge,normalizeKbServiceOrigin}from'../../core/kb-search-client.js';function a35_0x2c13(_0x4ab914,_0x97af74){_0x4ab914=_0x4ab914-0xe4;const _0xdc3059=a35_0xdc30();let _0x2c1325=_0xdc3059[_0x4ab914];return _0x2c1325;}import{planPersonalKnowledgeWrite,withKbManagementOrigin}from'../../core/kb-management-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{getKbServiceDomain}from'../../constant/domain.js';import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':a35_0x7a22bd(0x117),'type':a35_0x7a22bd(0xfa),'required':!![],'description':a35_0x7a22bd(0x120)},FILE_FLAG={'name':a35_0x7a22bd(0x10e),'type':a35_0x7a22bd(0xfa),'required':!![],'description':'Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file'},QUERY_FLAG={'name':'query','type':a35_0x7a22bd(0xfa),'required':!![],'description':'Search\x20query\x20for\x20visible\x20public,\x20company,\x20and\x20personal\x20knowledge'},TOPK_FLAG={'name':a35_0x7a22bd(0x106),'type':a35_0x7a22bd(0xed),'description':a35_0x7a22bd(0xf9)};function readKnowledgeFile(_0x43bad0){const _0x48b601=a35_0x7a22bd;if(!_0x43bad0)throw CliErrors[_0x48b601(0xf0)](_0x48b601(0x119));if(!existsSync(_0x43bad0))throw CliErrors[_0x48b601(0xf0)](_0x48b601(0x123)+_0x43bad0);if(!statSync(_0x43bad0)[_0x48b601(0xf8)]())throw CliErrors['validation'](_0x48b601(0x10b)+_0x43bad0);return readFileSync(_0x43bad0,_0x48b601(0x125));}function summarizePersonalItem(_0x5d527e){const _0x3446ad=a35_0x7a22bd;return{'id':_0x5d527e['id'],'title':_0x5d527e[_0x3446ad(0x117)],'version':_0x5d527e[_0x3446ad(0x122)],'ragStatus':_0x5d527e[_0x3446ad(0xfd)],'ragErrorMessage':_0x5d527e[_0x3446ad(0x11b)],'updateTime':_0x5d527e[_0x3446ad(0x113)]};}function detailPersonalItem(_0x4650e0){const _0x41312d=a35_0x7a22bd;return{'id':_0x4650e0['id'],'appCode':_0x4650e0[_0x41312d(0xf4)],'scope':_0x4650e0[_0x41312d(0xf7)],'userId':_0x4650e0['userId'],'title':_0x4650e0[_0x41312d(0x117)],'content':_0x4650e0[_0x41312d(0x10f)],'version':_0x4650e0['version'],'ragStatus':_0x4650e0[_0x41312d(0xfd)],'ragErrorMessage':_0x4650e0[_0x41312d(0x11b)],'createTime':_0x4650e0['createTime'],'updateTime':_0x4650e0['updateTime']};}function readTopK(_0x1f5886){const _0x3c99b2=a35_0x7a22bd,_0x14bfcd=_0x1f5886[_0x3c99b2(0x115)](_0x3c99b2(0x106));if(_0x14bfcd===undefined||_0x14bfcd===null||_0x14bfcd==='')return undefined;const _0x524184=_0x1f5886['num'](_0x3c99b2(0x106));if(!Number[_0x3c99b2(0x10a)](_0x524184)||_0x524184<0x1||_0x524184>0x32)throw CliErrors['validation'](_0x3c99b2(0x111));return _0x524184;}const kbList={'service':'kb','command':a35_0x7a22bd(0xe8),'description':a35_0x7a22bd(0x11e),'risk':'read','flags':[VERBOSE_FLAG],async 'execute'(_0x51881c){const _0x480941=a35_0x7a22bd,_0x59543b=await listPersonalKnowledgeBaseItems(_0x51881c[_0x480941(0xf4)],_0x51881c['signal']);if(_0x51881c[_0x480941(0xeb)](_0x480941(0xe9)))return{'ok':!![],'data':{'total':_0x59543b['length'],'items':_0x59543b}};return{'ok':!![],'data':{'total':_0x59543b[_0x480941(0x10c)],'items':_0x59543b[_0x480941(0x102)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':'detail','description':a35_0x7a22bd(0x124),'risk':a35_0x7a22bd(0xfc),'flags':[{...ID_FLAG,'type':'string','description':a35_0x7a22bd(0x112)}],async 'execute'(_0x22134b){const _0x3fccfc=a35_0x7a22bd,_0x459619=await getPersonalKnowledgeBaseItem(_0x22134b[_0x3fccfc(0x118)]('id'),_0x22134b[_0x3fccfc(0xf4)],_0x22134b['signal']);return{'ok':!![],'data':detailPersonalItem(_0x459619)};}},kbCreate={'service':'kb','command':'create','description':a35_0x7a22bd(0xe4),'risk':a35_0x7a22bd(0x108),'confirmationDescription':a35_0x7a22bd(0x11f),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x392015){const _0x4d1137=a35_0x7a22bd,_0x347e72=_0x392015[_0x4d1137(0x118)](_0x4d1137(0x117)),_0x29fce6=readKnowledgeFile(_0x392015[_0x4d1137(0x118)](_0x4d1137(0x10e))),_0x2ecc33=await createPersonalKnowledgeBaseItem(_0x392015['appCode'],{'title':_0x347e72,'content':_0x29fce6},_0x392015[_0x4d1137(0xfe)]);return{'ok':!![],'data':summarizePersonalItem(_0x2ecc33),'message':_0x4d1137(0x127)+_0x2ecc33['id']+'\x20('+_0x2ecc33['title']+')'};},async 'dryRun'(_0x41ec9){const _0x51f83a=a35_0x7a22bd,_0x5651a6=_0x41ec9[_0x51f83a(0x118)](_0x51f83a(0x117)),_0x3a4288=readKnowledgeFile(_0x41ec9[_0x51f83a(0x118)](_0x51f83a(0x10e))),_0x1de072=planPersonalKnowledgeWrite(_0x41ec9['appCode'],{'title':_0x5651a6,'content':_0x3a4288});return dryRun(_0x1de072['method'],_0x1de072[_0x51f83a(0x11c)])[_0x51f83a(0xee)](JSON['parse'](_0x1de072[_0x51f83a(0x110)]))[_0x51f83a(0xe7)]('Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22'+_0x5651a6+'\x22')[_0x51f83a(0xf3)]();}},kbUpdate={'service':'kb','command':a35_0x7a22bd(0x114),'description':'Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','risk':a35_0x7a22bd(0x108),'confirmationDescription':'Replaces\x20the\x20personal\x20knowledge-base\x20entry\x20body\x20with\x20local\x20file\x20content\x20and\x20triggers\x20retrieval\x20sync.','flags':[{...ID_FLAG,'type':a35_0x7a22bd(0xfa),'description':a35_0x7a22bd(0x112)},{...TITLE_FLAG,'required':![],'description':a35_0x7a22bd(0xe5)},FILE_FLAG],async 'execute'(_0x569d38){const _0x7b55d6=a35_0x7a22bd,_0x5420da=_0x569d38[_0x7b55d6(0x118)]('id'),_0x9ade83=readKnowledgeFile(_0x569d38[_0x7b55d6(0x118)](_0x7b55d6(0x10e))),_0x5b8847=_0x569d38[_0x7b55d6(0x118)](_0x7b55d6(0x117))||undefined,_0x2f7e79=await updatePersonalKnowledgeBaseItem(_0x5420da,_0x569d38[_0x7b55d6(0xf4)],{'title':_0x5b8847,'content':_0x9ade83},_0x569d38[_0x7b55d6(0xfe)]);return{'ok':!![],'data':summarizePersonalItem(_0x2f7e79),'message':_0x7b55d6(0x116)+_0x2f7e79['id']+'\x20('+_0x2f7e79[_0x7b55d6(0x117)]+')'};},async 'dryRun'(_0x2060e2){const _0x2a14d9=a35_0x7a22bd,_0x4864b1=_0x2060e2[_0x2a14d9(0x118)]('id'),_0x164ae8=readKnowledgeFile(_0x2060e2[_0x2a14d9(0x118)](_0x2a14d9(0x10e))),_0xb5c36c=await getPersonalKnowledgeBaseItem(_0x4864b1,_0x2060e2[_0x2a14d9(0xf4)],_0x2060e2['signal']),_0x3144c9=_0x2060e2[_0x2a14d9(0x118)]('title')||_0xb5c36c['title'],_0x41d3f7=planPersonalKnowledgeWrite(_0x2060e2[_0x2a14d9(0xf4)],{'title':_0x3144c9,'content':_0x164ae8},_0x4864b1,_0xb5c36c[_0x2a14d9(0x122)]);return dryRun(_0x41d3f7[_0x2a14d9(0x107)],_0x41d3f7[_0x2a14d9(0x11c)])['body'](JSON[_0x2a14d9(0x126)](_0x41d3f7[_0x2a14d9(0x110)]))['description'](_0x2a14d9(0x121)+_0x4864b1)['build']();}};function readSearchServiceUrl(_0x160393){const _0x190dcf=a35_0x7a22bd;if(_0x160393['flag']('kb-service-url')!==undefined)return normalizeKbServiceOrigin(_0x160393['str'](_0x190dcf(0xf6)));const _0x484698=getKbServiceDomain();if(!_0x484698)throw CliErrors[_0x190dcf(0xf0)](_0x190dcf(0x104),_0x190dcf(0x11d));return normalizeKbServiceOrigin(_0x484698);}const kbSearch={'service':'kb','command':a35_0x7a22bd(0x10d),'description':a35_0x7a22bd(0xfb),'risk':a35_0x7a22bd(0xfc),'flags':[QUERY_FLAG,TOPK_FLAG,{'name':a35_0x7a22bd(0xf6),'type':a35_0x7a22bd(0xfa),'required':![],'description':'Optional\x20trusted\x20KB\x20Service\x20HTTPS\x20origin\x20for\x20this\x20request\x20only'}],async 'validate'(_0x1302ab){const _0x19a08a=a35_0x7a22bd;if(!_0x1302ab[_0x19a08a(0x118)]('query')[_0x19a08a(0x100)]())throw CliErrors['validation'](_0x19a08a(0x109));readTopK(_0x1302ab),readSearchServiceUrl(_0x1302ab);},async 'execute'(_0x3bbbea){const _0x286515=a35_0x7a22bd,_0xcca883=_0x3bbbea[_0x286515(0x118)]('query')[_0x286515(0x100)](),_0x220f30=readTopK(_0x3bbbea),_0x595352=readSearchServiceUrl(_0x3bbbea),_0x5503d2={'appCode':_0x3bbbea['appCode'],'accessKey':_0x3bbbea[_0x286515(0x103)]??'','query':_0xcca883,..._0x220f30!==undefined?{'topK':_0x220f30}:{},'signal':_0x3bbbea[_0x286515(0xfe)]},_0x580b66=await searchDirectKnowledge({..._0x5503d2,'serviceUrl':_0x595352});return{'ok':!![],'data':_0x580b66};}};function a35_0xdc30(){const _0x896984=['verbose','788625SmLBMp','bool','681779blWzVQ','number','body','265347UWcNdl','validation','140cuakbp','176UyKndX','build','appCode','execute','kb-service-url','scope','isFile','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','string','Search\x20visible\x20public,\x20company,\x20and\x20personal\x20knowledge','read','ragStatus','signal','60153AyrDMd','trim','3022068PcKiQZ','map','accessKey','KB\x20Service\x20is\x20not\x20configured\x20for\x20knowledge\x20search.','dryRun','topk','method','write','Search\x20query\x20is\x20required.','isSafeInteger','File\x20is\x20not\x20a\x20regular\x20file:\x20','length','search','file','content','jsonBody','--topk\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.','Personal\x20knowledge-base\x20entry\x20ID','updateTime','update','flag','Updated\x20KB\x20entry\x20','title','str','File\x20path\x20is\x20required.','37539550hTDSiO','ragErrorMessage','path','Configure\x20kbServiceDomain\x20in\x20the\x20connection\x20settings,\x20or\x20pass\x20`--kb-service-url\x20<https-origin>`\x20for\x20this\x20request.','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','Saves\x20local\x20file\x20content\x20as\x20a\x20personal\x20knowledge-base\x20entry\x20and\x20starts\x20retrieval\x20sync.','Personal\x20knowledge-base\x20entry\x20title','Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20','version','File\x20not\x20found:\x20','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','utf8','parse','Created\x20KB\x20entry\x20','4irJeLw','Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','Override\x20the\x20existing\x20entry\x20title','9671914PWpesT','description','list'];a35_0xdc30=function(){return _0x896984;};return a35_0xdc30();}function managementCommand(_0x1a7858){const _0x2a2642=a35_0x7a22bd;return{..._0x1a7858,'execute':_0x312a35=>withKbManagementOrigin(()=>_0x1a7858[_0x2a2642(0xf5)](_0x312a35)),..._0x1a7858['dryRun']?{'dryRun':_0x4e8523=>withKbManagementOrigin(()=>_0x1a7858[_0x2a2642(0x105)](_0x4e8523))}:{}};}export const kbDefinitions=[...[kbList,kbDetail,kbCreate,kbUpdate][a35_0x7a22bd(0x102)](managementCommand),kbSearch];
|
|
1
|
+
const a35_0x44bc8c=a35_0x4d0e;(function(_0x59d81d,_0x4da766){const _0x4ad0a6=a35_0x4d0e,_0x115dcc=_0x59d81d();while(!![]){try{const _0x39985f=-parseInt(_0x4ad0a6(0x10d))/0x1+parseInt(_0x4ad0a6(0x137))/0x2*(parseInt(_0x4ad0a6(0x104))/0x3)+-parseInt(_0x4ad0a6(0x135))/0x4*(parseInt(_0x4ad0a6(0x114))/0x5)+-parseInt(_0x4ad0a6(0xf4))/0x6+parseInt(_0x4ad0a6(0x12a))/0x7*(parseInt(_0x4ad0a6(0x12d))/0x8)+parseInt(_0x4ad0a6(0x132))/0x9*(-parseInt(_0x4ad0a6(0x11a))/0xa)+parseInt(_0x4ad0a6(0xfd))/0xb;if(_0x39985f===_0x4da766)break;else _0x115dcc['push'](_0x115dcc['shift']());}catch(_0x1da90f){_0x115dcc['push'](_0x115dcc['shift']());}}}(a35_0x35a2,0xd00b1));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalKnowledgeBaseItem,getPersonalKnowledgeBaseItem,listPersonalKnowledgeBaseItems,updatePersonalKnowledgeBaseItem}from'../../core/api-client.js';import{searchDirectKnowledge,normalizeKbServiceOrigin}from'../../core/kb-search-client.js';import{planPersonalKnowledgeWrite,withKbManagementOrigin}from'../../core/kb-management-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';function a35_0x4d0e(_0x4bba5b,_0x29e01f){_0x4bba5b=_0x4bba5b-0xf1;const _0x35a233=a35_0x35a2();let _0x4d0eb7=_0x35a233[_0x4bba5b];return _0x4d0eb7;}import{getKbServiceDomain}from'../../constant/domain.js';function a35_0x35a2(){const _0x2557b2=['Search\x20query\x20for\x20visible\x20public,\x20company,\x20and\x20personal\x20knowledge','body','path','Saves\x20local\x20file\x20content\x20as\x20a\x20personal\x20knowledge-base\x20entry\x20and\x20starts\x20retrieval\x20sync.','description','1559244EIaoEP','Optional\x20trusted\x20KB\x20Service\x20HTTPS\x20origin\x20for\x20this\x20request\x20only','number','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','title','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','detail','Personal\x20knowledge-base\x20entry\x20ID','Configure\x20kbServiceDomain\x20in\x20the\x20connection\x20settings,\x20or\x20pass\x20`--kb-service-url\x20<https-origin>`\x20for\x20this\x20request.','16870073pPjDQI','file','map','createTime','--topk\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.','version','ragErrorMessage','9sajIje','string','topk','method','str','execute','scope','Override\x20the\x20existing\x20entry\x20title','File\x20is\x20not\x20a\x20regular\x20file:\x20','337909zeVnRO','update','appCode','query','write','Created\x20KB\x20entry\x20','File\x20not\x20found:\x20','4066625IGUTzF','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','read','Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20','validation','search','24010tGyBKL','verbose','signal','bool','Replaces\x20the\x20personal\x20knowledge-base\x20entry\x20body\x20with\x20local\x20file\x20content\x20and\x20triggers\x20retrieval\x20sync.','utf8','num','parse','Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','ragStatus','content','trim','kb-service-url','build','updateTime','flag','14ywjcCe','userId','Search\x20visible\x20public,\x20company,\x20and\x20personal\x20knowledge','3216784jkDfia','accessKey','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','length','Personal\x20knowledge-base\x20entry\x20title','2259XYUmJo','dryRun','isSafeInteger','8fHLAZc','KB\x20Service\x20is\x20not\x20configured\x20for\x20knowledge\x20search.','894260WOXsnS','isFile','Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file'];a35_0x35a2=function(){return _0x2557b2;};return a35_0x35a2();}import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':a35_0x44bc8c(0xf8),'type':a35_0x44bc8c(0x105),'required':!![],'description':a35_0x44bc8c(0x131)},FILE_FLAG={'name':'file','type':a35_0x44bc8c(0x105),'required':!![],'description':a35_0x44bc8c(0x115)},QUERY_FLAG={'name':a35_0x44bc8c(0x110),'type':'string','required':!![],'description':a35_0x44bc8c(0x13a)},TOPK_FLAG={'name':a35_0x44bc8c(0x106),'type':a35_0x44bc8c(0xf6),'description':a35_0x44bc8c(0xf7)};function readKnowledgeFile(_0x437941){const _0x5cf548=a35_0x44bc8c;if(!_0x437941)throw CliErrors['validation']('File\x20path\x20is\x20required.');if(!existsSync(_0x437941))throw CliErrors[_0x5cf548(0x118)](_0x5cf548(0x113)+_0x437941);if(!statSync(_0x437941)[_0x5cf548(0x138)]())throw CliErrors[_0x5cf548(0x118)](_0x5cf548(0x10c)+_0x437941);return readFileSync(_0x437941,_0x5cf548(0x11f));}function summarizePersonalItem(_0x4d64c0){const _0x4b8552=a35_0x44bc8c;return{'id':_0x4d64c0['id'],'title':_0x4d64c0[_0x4b8552(0xf8)],'version':_0x4d64c0[_0x4b8552(0x102)],'ragStatus':_0x4d64c0[_0x4b8552(0x123)],'ragErrorMessage':_0x4d64c0[_0x4b8552(0x103)],'updateTime':_0x4d64c0[_0x4b8552(0x128)]};}function detailPersonalItem(_0x24bd37){const _0x3e12e9=a35_0x44bc8c;return{'id':_0x24bd37['id'],'appCode':_0x24bd37['appCode'],'scope':_0x24bd37[_0x3e12e9(0x10a)],'userId':_0x24bd37[_0x3e12e9(0x12b)],'title':_0x24bd37[_0x3e12e9(0xf8)],'content':_0x24bd37[_0x3e12e9(0x124)],'version':_0x24bd37['version'],'ragStatus':_0x24bd37[_0x3e12e9(0x123)],'ragErrorMessage':_0x24bd37[_0x3e12e9(0x103)],'createTime':_0x24bd37[_0x3e12e9(0x100)],'updateTime':_0x24bd37['updateTime']};}function readTopK(_0x41559e){const _0x4d0d22=a35_0x44bc8c,_0x5c312a=_0x41559e[_0x4d0d22(0x129)](_0x4d0d22(0x106));if(_0x5c312a===undefined||_0x5c312a===null||_0x5c312a==='')return undefined;const _0x341ea1=_0x41559e[_0x4d0d22(0x120)]('topk');if(!Number[_0x4d0d22(0x134)](_0x341ea1)||_0x341ea1<0x1||_0x341ea1>0x32)throw CliErrors[_0x4d0d22(0x118)](_0x4d0d22(0x101));return _0x341ea1;}const kbList={'service':'kb','command':'list','description':a35_0x44bc8c(0xf9),'risk':a35_0x44bc8c(0x116),'flags':[VERBOSE_FLAG],async 'execute'(_0xdbaff){const _0x2a4ccb=a35_0x44bc8c,_0x2401d3=await listPersonalKnowledgeBaseItems(_0xdbaff['appCode'],_0xdbaff['signal']);if(_0xdbaff[_0x2a4ccb(0x11d)](_0x2a4ccb(0x11b)))return{'ok':!![],'data':{'total':_0x2401d3[_0x2a4ccb(0x130)],'items':_0x2401d3}};return{'ok':!![],'data':{'total':_0x2401d3['length'],'items':_0x2401d3['map'](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a35_0x44bc8c(0xfa),'description':a35_0x44bc8c(0x12f),'risk':'read','flags':[{...ID_FLAG,'type':a35_0x44bc8c(0x105),'description':a35_0x44bc8c(0xfb)}],async 'execute'(_0x15fd17){const _0x1a36ae=a35_0x44bc8c,_0x3e2f8a=await getPersonalKnowledgeBaseItem(_0x15fd17[_0x1a36ae(0x108)]('id'),_0x15fd17[_0x1a36ae(0x10f)],_0x15fd17[_0x1a36ae(0x11c)]);return{'ok':!![],'data':detailPersonalItem(_0x3e2f8a)};}},kbCreate={'service':'kb','command':'create','description':a35_0x44bc8c(0x139),'risk':a35_0x44bc8c(0x111),'confirmationDescription':a35_0x44bc8c(0xf2),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x40e993){const _0xe04e91=a35_0x44bc8c,_0x545fbc=_0x40e993[_0xe04e91(0x108)](_0xe04e91(0xf8)),_0x167358=readKnowledgeFile(_0x40e993[_0xe04e91(0x108)](_0xe04e91(0xfe))),_0xb5e2e1=await createPersonalKnowledgeBaseItem(_0x40e993[_0xe04e91(0x10f)],{'title':_0x545fbc,'content':_0x167358},_0x40e993['signal']);return{'ok':!![],'data':summarizePersonalItem(_0xb5e2e1),'message':_0xe04e91(0x112)+_0xb5e2e1['id']+'\x20('+_0xb5e2e1[_0xe04e91(0xf8)]+')'};},async 'dryRun'(_0x354183){const _0x390417=a35_0x44bc8c,_0x3a8525=_0x354183[_0x390417(0x108)](_0x390417(0xf8)),_0x87f3ae=readKnowledgeFile(_0x354183[_0x390417(0x108)](_0x390417(0xfe))),_0x3fdbd2=planPersonalKnowledgeWrite(_0x354183[_0x390417(0x10f)],{'title':_0x3a8525,'content':_0x87f3ae});return dryRun(_0x3fdbd2['method'],_0x3fdbd2['path'])[_0x390417(0x13b)](JSON['parse'](_0x3fdbd2['jsonBody']))[_0x390417(0xf3)]('Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22'+_0x3a8525+'\x22')[_0x390417(0x127)]();}},kbUpdate={'service':'kb','command':a35_0x44bc8c(0x10e),'description':a35_0x44bc8c(0x122),'risk':'write','confirmationDescription':a35_0x44bc8c(0x11e),'flags':[{...ID_FLAG,'type':a35_0x44bc8c(0x105),'description':a35_0x44bc8c(0xfb)},{...TITLE_FLAG,'required':![],'description':a35_0x44bc8c(0x10b)},FILE_FLAG],async 'execute'(_0x4b262b){const _0x19f3f5=a35_0x44bc8c,_0x226a44=_0x4b262b[_0x19f3f5(0x108)]('id'),_0x9c01d7=readKnowledgeFile(_0x4b262b[_0x19f3f5(0x108)](_0x19f3f5(0xfe))),_0x1eb305=_0x4b262b[_0x19f3f5(0x108)](_0x19f3f5(0xf8))||undefined,_0x52abcc=await updatePersonalKnowledgeBaseItem(_0x226a44,_0x4b262b[_0x19f3f5(0x10f)],{'title':_0x1eb305,'content':_0x9c01d7},_0x4b262b[_0x19f3f5(0x11c)]);return{'ok':!![],'data':summarizePersonalItem(_0x52abcc),'message':'Updated\x20KB\x20entry\x20'+_0x52abcc['id']+'\x20('+_0x52abcc['title']+')'};},async 'dryRun'(_0x10ffb9){const _0x1472a5=a35_0x44bc8c,_0x5c88a6=_0x10ffb9['str']('id'),_0x4d3e64=readKnowledgeFile(_0x10ffb9[_0x1472a5(0x108)](_0x1472a5(0xfe))),_0x48d1f8=await getPersonalKnowledgeBaseItem(_0x5c88a6,_0x10ffb9[_0x1472a5(0x10f)],_0x10ffb9[_0x1472a5(0x11c)]),_0x4a78b6=_0x10ffb9[_0x1472a5(0x108)](_0x1472a5(0xf8))||_0x48d1f8[_0x1472a5(0xf8)],_0x38d429=planPersonalKnowledgeWrite(_0x10ffb9['appCode'],{'title':_0x4a78b6,'content':_0x4d3e64},_0x5c88a6,_0x48d1f8['version']);return dryRun(_0x38d429[_0x1472a5(0x107)],_0x38d429[_0x1472a5(0xf1)])[_0x1472a5(0x13b)](JSON[_0x1472a5(0x121)](_0x38d429['jsonBody']))['description'](_0x1472a5(0x117)+_0x5c88a6)[_0x1472a5(0x127)]();}};function readSearchServiceUrl(_0x12209a){const _0x25cb27=a35_0x44bc8c;if(_0x12209a[_0x25cb27(0x129)]('kb-service-url')!==undefined)return normalizeKbServiceOrigin(_0x12209a[_0x25cb27(0x108)]('kb-service-url'));const _0x14b2e2=getKbServiceDomain();if(!_0x14b2e2)throw CliErrors['validation'](_0x25cb27(0x136),_0x25cb27(0xfc));return normalizeKbServiceOrigin(_0x14b2e2);}const kbSearch={'service':'kb','command':a35_0x44bc8c(0x119),'description':a35_0x44bc8c(0x12c),'risk':a35_0x44bc8c(0x116),'flags':[QUERY_FLAG,TOPK_FLAG,{'name':a35_0x44bc8c(0x126),'type':'string','required':![],'description':a35_0x44bc8c(0xf5)}],async 'validate'(_0x1e039e){const _0x5835d7=a35_0x44bc8c;if(!_0x1e039e[_0x5835d7(0x108)](_0x5835d7(0x110))['trim']())throw CliErrors['validation']('Search\x20query\x20is\x20required.');readTopK(_0x1e039e),readSearchServiceUrl(_0x1e039e);},async 'execute'(_0x1aa1d5){const _0x28ab05=a35_0x44bc8c,_0x3ce0b6=_0x1aa1d5[_0x28ab05(0x108)]('query')[_0x28ab05(0x125)](),_0x1e4b1=readTopK(_0x1aa1d5),_0x33368c=readSearchServiceUrl(_0x1aa1d5),_0x5e73f1={'appCode':_0x1aa1d5[_0x28ab05(0x10f)],'accessKey':_0x1aa1d5[_0x28ab05(0x12e)]??'','query':_0x3ce0b6,..._0x1e4b1!==undefined?{'topK':_0x1e4b1}:{},'signal':_0x1aa1d5[_0x28ab05(0x11c)]},_0x3d58df=await searchDirectKnowledge({..._0x5e73f1,'serviceUrl':_0x33368c});return{'ok':!![],'data':_0x3d58df};}};function managementCommand(_0x1a814f){const _0x97a6dc=a35_0x44bc8c;return{..._0x1a814f,'execute':_0x46e18d=>withKbManagementOrigin(()=>_0x1a814f[_0x97a6dc(0x109)](_0x46e18d)),..._0x1a814f[_0x97a6dc(0x133)]?{'dryRun':_0x39d759=>withKbManagementOrigin(()=>_0x1a814f[_0x97a6dc(0x133)](_0x39d759))}:{}};}export const kbDefinitions=[...[kbList,kbDetail,kbCreate,kbUpdate][a35_0x44bc8c(0xff)](managementCommand),kbSearch];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a36_0x46ff81=a36_0x2489;function a36_0x2489(_0x16cda0,_0x5d69b2){_0x16cda0=_0x16cda0-0xcb;const _0x70571d=a36_0x7057();let _0x248912=_0x70571d[_0x16cda0];return _0x248912;}(function(_0x3f3202,_0x4c9578){const _0x3f7609=a36_0x2489,_0xcac36d=_0x3f3202();while(!![]){try{const _0x2c0357=-parseInt(_0x3f7609(0xcf))/0x1*(-parseInt(_0x3f7609(0xcd))/0x2)+-parseInt(_0x3f7609(0xe5))/0x3+parseInt(_0x3f7609(0xe3))/0x4*(-parseInt(_0x3f7609(0xd4))/0x5)+-parseInt(_0x3f7609(0xdf))/0x6*(-parseInt(_0x3f7609(0xdd))/0x7)+parseInt(_0x3f7609(0xd6))/0x8+-parseInt(_0x3f7609(0xe2))/0x9*(parseInt(_0x3f7609(0xcc))/0xa)+parseInt(_0x3f7609(0xe4))/0xb;if(_0x2c0357===_0x4c9578)break;else _0xcac36d['push'](_0xcac36d['shift']());}catch(_0x69d933){_0xcac36d['push'](_0xcac36d['shift']());}}}(a36_0x7057,0x894c0));function a36_0x7057(){const _0x5ad53d=['details','5084830dFGumF','logs','5282440NjkkNJ','timestamp','\x20\x20\x20Duration:\x20','log','en-US','read','\x20\x20\x20Details:\x20','500059pfwIgx','duration','12BLeyON','keys','toLocaleString','9tWyPAH','4AyOyQM','9998527gobiVo','362025NHeDGM','stringify','\x20logs:\x0a','1748050UjAoTY','76PayIyu','level','4281EZTLpO','length','\x20\x20\x20Time:\x20','command'];a36_0x7057=function(){return _0x5ad53d;};return a36_0x7057();}import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function printLogs(_0x3134b4){const _0x57b649=a36_0x2489;if(_0x3134b4['length']===0x0){console[_0x57b649(0xd9)]('*\x20No\x20logs\x20found');return;}console['log']('*\x20'+CLI_DISPLAY_NAME+_0x57b649(0xcb)),_0x3134b4['forEach']((_0x521047,_0x2babd3)=>{const _0x4361ea=_0x57b649,_0x287d86=new Date(_0x521047[_0x4361ea(0xd7)])[_0x4361ea(0xe1)](_0x4361ea(0xda)),_0x31f80b=_0x521047[_0x4361ea(0xce)]==='success'?'√':_0x521047['level']==='error'?'×':_0x521047[_0x4361ea(0xce)]==='warn'?'!':'i';console[_0x4361ea(0xd9)](_0x2babd3+0x1+'.\x20'+_0x31f80b+'\x20['+_0x521047[_0x4361ea(0xd2)]+']\x20'+_0x521047['message']),console['log'](_0x4361ea(0xd1)+_0x287d86),_0x521047[_0x4361ea(0xde)]&&console[_0x4361ea(0xd9)](_0x4361ea(0xd8)+_0x521047[_0x4361ea(0xde)]+'ms'),_0x521047[_0x4361ea(0xd3)]&&Object[_0x4361ea(0xe0)](_0x521047[_0x4361ea(0xd3)])[_0x4361ea(0xd0)]>0x0&&console[_0x4361ea(0xd9)](_0x4361ea(0xdc)+JSON[_0x4361ea(0xe6)](_0x521047[_0x4361ea(0xd3)],null,0x2)),console[_0x4361ea(0xd9)]('');});}export const logsDefinitions=[{'service':a36_0x46ff81(0xd5),'command':'show','description':'View\x20command\x20history\x20logs','risk':a36_0x46ff81(0xdb),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x5196ac){return printLogs(logger['readLogs']()),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a37_0x187bf4=a37_0x45d2;(function(_0x53fc9e,_0x5d0ce7){const _0x12e83f=a37_0x45d2,_0x5efcd7=_0x53fc9e();while(!![]){try{const _0x58b9ff=-parseInt(_0x12e83f(0x165))/0x1*(-parseInt(_0x12e83f(0x161))/0x2)+-parseInt(_0x12e83f(0x16b))/0x3*(-parseInt(_0x12e83f(0x168))/0x4)+parseInt(_0x12e83f(0x16a))/0x5*(parseInt(_0x12e83f(0x167))/0x6)+parseInt(_0x12e83f(0x15c))/0x7*(-parseInt(_0x12e83f(0x15b))/0x8)+parseInt(_0x12e83f(0x16d))/0x9*(-parseInt(_0x12e83f(0x166))/0xa)+parseInt(_0x12e83f(0x15a))/0xb*(parseInt(_0x12e83f(0x16c))/0xc)+-parseInt(_0x12e83f(0x162))/0xd*(parseInt(_0x12e83f(0x15d))/0xe);if(_0x58b9ff===_0x5d0ce7)break;else _0x5efcd7['push'](_0x5efcd7['shift']());}catch(_0x2be4a2){_0x5efcd7['push'](_0x5efcd7['shift']());}}}(a37_0x4324,0x73a84));function a37_0x45d2(_0x278995,_0x5122a8){_0x278995=_0x278995-0x159;const _0x4324cd=a37_0x4324();let _0x45d210=_0x4324cd[_0x278995];return _0x45d210;}function a37_0x4324(){const _0x3f485f=['config-list','read','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','2thNEnh','43953zYBiIs','EMAIL','Found\x20','281551mKwAMh','410wTfJVN','5898luvyVu','143228Apypvp','string','3310RfjGKa','60QIwyWp','12SKZsAQ','85851znqVXp','map','Notification\x20channel\x20type','appCode','length','5180527TYCoQZ','992oVSQvt','38948MFQyJv','2338AGWYhL'];a37_0x4324=function(){return _0x3f485f;};return a37_0x4324();}import{listNotificationChannelConfigs}from'../../core/api-client.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':'notification','command':a37_0x187bf4(0x15e),'description':a37_0x187bf4(0x160),'risk':a37_0x187bf4(0x15f),'flags':[{'name':'type','type':a37_0x187bf4(0x169),'description':a37_0x187bf4(0x16f),'enum':NOTIFICATION_CHANNEL_TYPES,'default':a37_0x187bf4(0x163)}],async 'validate'(_0x269ad2){readNotificationChannelType(_0x269ad2);},async 'execute'(_0x88bc02){const _0x57f532=a37_0x187bf4,_0x2d0fdc=readNotificationChannelType(_0x88bc02),_0x5caf08=await listNotificationChannelConfigs(_0x88bc02[_0x57f532(0x170)],_0x2d0fdc),_0x15f0f7=_0x5caf08[_0x57f532(0x16e)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x88bc02['appCode'],'channelType':_0x2d0fdc,'count':_0x15f0f7[_0x57f532(0x159)],'configs':_0x15f0f7},'message':_0x57f532(0x164)+_0x15f0f7[_0x57f532(0x159)]+'\x20'+_0x2d0fdc+'\x20notification\x20config(s)'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a38_0x2076(_0x16eaaa,_0x2599b8){_0x16eaaa=_0x16eaaa-0x1ef;const _0x231d09=a38_0x231d();let _0x2076ea=_0x231d09[_0x16eaaa];return _0x2076ea;}function a38_0x231d(){const _0x594246=['6095840xrcmkg','2316927RnWTJj','29834208iCvdQD','8106574nzdBVE','4yoCBvd','2035344iNhiNJ','2347608QaxrVP','839276DutilT'];a38_0x231d=function(){return _0x594246;};return a38_0x231d();}(function(_0x571415,_0x2b459f){const _0x33d223=a38_0x2076,_0x5299e0=_0x571415();while(!![]){try{const _0x557f60=-parseInt(_0x33d223(0x1f4))/0x1+-parseInt(_0x33d223(0x1f2))/0x2+parseInt(_0x33d223(0x1f6))/0x3*(-parseInt(_0x33d223(0x1f1))/0x4)+-parseInt(_0x33d223(0x1f5))/0x5+-parseInt(_0x33d223(0x1f3))/0x6+parseInt(_0x33d223(0x1f0))/0x7+parseInt(_0x33d223(0x1ef))/0x8;if(_0x557f60===_0x2b459f)break;else _0x5299e0['push'](_0x5299e0['shift']());}catch(_0x21f55a){_0x5299e0['push'](_0x5299e0['shift']());}}}(a38_0x231d,0x9e1f1));import{notificationConfigList}from'../../commands/notification/config-list.js';export const notificationDefinitions=[notificationConfigList];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a39_0x3d531a=a39_0x4c17;(function(_0x3fc41a,_0x488f55){const _0x18906d=a39_0x4c17,_0x4941dd=_0x3fc41a();while(!![]){try{const _0x130274=-parseInt(_0x18906d(0x103))/0x1*(-parseInt(_0x18906d(0xf9))/0x2)+-parseInt(_0x18906d(0x106))/0x3+parseInt(_0x18906d(0xf8))/0x4+-parseInt(_0x18906d(0x108))/0x5+-parseInt(_0x18906d(0xf1))/0x6*(-parseInt(_0x18906d(0xfb))/0x7)+-parseInt(_0x18906d(0xf2))/0x8*(-parseInt(_0x18906d(0x10c))/0x9)+-parseInt(_0x18906d(0x109))/0xa;if(_0x130274===_0x488f55)break;else _0x4941dd['push'](_0x4941dd['shift']());}catch(_0x22431a){_0x4941dd['push'](_0x4941dd['shift']());}}}(a39_0x48ec,0x60736));function a39_0x4c17(_0x3e84e7,_0xf6745){_0x3e84e7=_0x3e84e7-0xf1;const _0x48ecc1=a39_0x48ec();let _0x4c17a3=_0x48ecc1[_0x3e84e7];return _0x4c17a3;}function a39_0x48ec(){const _0x58fe13=['WEBHOOK','6wfhZJR','16RkohRA','Invalid\x20notification\x20config\x20response.','isArray','join','Invalid\x20--type:\x20','trim','2623992snvQjj','2wIFQDQ','Allowed\x20values:\x20','3569377dtekmD','validation','apiError','object','includes','Item\x20','channelType','EMAIL','79641SJTWLW','WECOM','str','37788dJvWTb','DINGTALK','3946350OvxeSY','606480ywZsnN','\x20is\x20missing\x20required\x20field\x20\x22','description','54117ykBcGo'];a39_0x48ec=function(){return _0x58fe13;};return a39_0x48ec();}import{CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=[a39_0x3d531a(0x102),'FEISHU',a39_0x3d531a(0x107),a39_0x3d531a(0x104),a39_0x3d531a(0x10d)];export function readNotificationChannelType(_0x1351c8){const _0x338a1b=a39_0x3d531a,_0x448983=_0x1351c8[_0x338a1b(0x105)]('type')['trim']()||_0x338a1b(0x102);if(!NOTIFICATION_CHANNEL_TYPES[_0x338a1b(0xff)](_0x448983))throw CliErrors[_0x338a1b(0xfc)](_0x338a1b(0xf6)+_0x448983,_0x338a1b(0xfa)+NOTIFICATION_CHANNEL_TYPES[_0x338a1b(0xf5)](',\x20')+'.');return _0x448983;}export function projectNotificationListConfig(_0x18bde4,_0x3202bc){const _0x4ad519=a39_0x3d531a,_0x927bb=requireResponseObject(_0x18bde4,_0x3202bc);return{'configCode':requireResponseString(_0x927bb['configCode'],'configCode',_0x3202bc),'configName':requireResponseString(_0x927bb['configName'],'configName',_0x3202bc),'channelType':requireResponseString(_0x927bb[_0x4ad519(0x101)],'channelType',_0x3202bc),'description':normalizeNullableString(_0x927bb[_0x4ad519(0x10b)])};}function requireResponseObject(_0x55c7da,_0x2f20cc){const _0x2b5b8a=a39_0x3d531a;if(typeof _0x55c7da!==_0x2b5b8a(0xfe)||_0x55c7da===null||Array[_0x2b5b8a(0xf4)](_0x55c7da))throw CliErrors[_0x2b5b8a(0xfd)](_0x2b5b8a(0xf3),_0x2b5b8a(0x100)+(_0x2f20cc+0x1)+'\x20must\x20be\x20an\x20object.');return _0x55c7da;}function requireResponseString(_0x108e97,_0x420f94,_0x3360af){const _0x44dc58=a39_0x3d531a;if(typeof _0x108e97!=='string'||!_0x108e97['trim']())throw CliErrors[_0x44dc58(0xfd)](_0x44dc58(0xf3),_0x44dc58(0x100)+(_0x3360af+0x1)+_0x44dc58(0x10a)+_0x420f94+'\x22.');return _0x108e97['trim']();}function normalizeNullableString(_0x530e59){const _0x3eacb0=a39_0x3d531a;return typeof _0x530e59==='string'&&_0x530e59[_0x3eacb0(0xf7)]()?_0x530e59[_0x3eacb0(0xf7)]():null;}
|