@lovrabet/lovrabet-cli 2.3.11-beta.1 → 2.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/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.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/issue/context.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/report.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.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.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.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-sdk-errors.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- 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.js +1 -1
- 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 +1 -1
- package/skills/lovrabet/SKILL.md +1 -1
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const a27_0xf885df=a27_0x1100;function a27_0x1100(_0x4c97a5,_0x14aca7){_0x4c97a5=_0x4c97a5-0x161;const _0x3d2bb4=a27_0x3d2b();let _0x11006e=_0x3d2bb4[_0x4c97a5];return _0x11006e;}(function(_0x1a157d,_0x4d551a){const _0x159987=a27_0x1100,_0x5b2388=_0x1a157d();while(!![]){try{const _0x451144=-parseInt(_0x159987(0x18a))/0x1+parseInt(_0x159987(0x1a0))/0x2+parseInt(_0x159987(0x181))/0x3+parseInt(_0x159987(0x162))/0x4+parseInt(_0x159987(0x188))/0x5*(-parseInt(_0x159987(0x18e))/0x6)+parseInt(_0x159987(0x17f))/0x7+-parseInt(_0x159987(0x16f))/0x8;if(_0x451144===_0x4d551a)break;else _0x5b2388['push'](_0x5b2388['shift']());}catch(_0x1dd642){_0x5b2388['push'](_0x5b2388['shift']());}}}(a27_0x3d2b,0x72023));import{dataImportExcel}from'./import-excel.js';import{executeData}from'../../core/sdk-client.js';import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';function a27_0x3d2b(){const _0x14ec75=['join','12RaWLVQ','now','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20id\x20may\x20be\x20a\x20single\x20value\x20or\x20array.\x20','description','\x20\x20EXCEL\x20ROUTES','create','paramsRequired','/api/{appCode}/','params','\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}','getOne','delete','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','\x20\x20\x20\x20--dry-run\x20previews\x20the\x20request\x20only;\x20it\x20does\x20not\x20validate\x20server\x20constraints\x20or\x20write\x20permissions.','\x20\x20EXAMPLES','Delete\x20data\x20records\x20(non-interactive\x20mode\x20requires\x20--yes)','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','Example:\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x20\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','1498264APzKJA','write','\x20\x20PAGINATION','\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]}}','Filter\x20dataset\x20records\x20with\x20query\x20conditions','\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}}','Deletes\x20business\x20records\x20from\x20the\x20current\x20app\x20dataset.\x20This\x20may\x20not\x20be\x20recoverable.','\x20\x20\x20\x20Non-Excel\x20batchCreate\x20remains\x20available\x20for\x20METADATA\x20and\x20DB_TABLE.','\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','\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\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\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\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\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]','aggregate','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','\x20\x20AGGREGATE\x20ALIAS\x20BOUNDARY','\x20\x20\x20\x20choose\x20the\x20capability\x20before\x20execution;\x20never\x20fall\x20back\x20at\x20runtime','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','\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\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}}','\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}}','batchCreate','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','\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}]','Get\x20a\x20single\x20record\x20by\x20ID','\x20\x20\x20\x20JOIN\x20and\x20cross-table\x20aggregation\x20require\x20an\x20existing\x20trusted\x20Custom\x20SQL','\x20\x20\x20\x20Page\x20numbers\x20start\x20at\x201.\x20To\x20fetch\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged','update','\x20\x20\x20\x20Filtering\x20and\x20pagination\x20are\x20controlled\x20only\x20via\x20one\x20JSON\x20object\x20in\x20--params.','\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\x20Record\x20each\x20batch\x20and\x20verify\x20its\x20IDs\x20or\x20unique\x20business\x20keys\x20before\x20continuing.','Preview:\x20data\x20','read','\x20\x20\x20\x20select/where/having/groupBy\x20must\x20use\x20real\x20dataset\x20fields','\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\x20PARAMS\x20STRUCTURE','length','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','data\x20','\x20\x20\x20\x20This\x20command\x20sends\x20one\x20prepared\x20batch;\x20it\x20does\x20not\x20read\x20XLSX\x20or\x20split\x20batches.','2222436auBycS','batch','\x20\x20\x20\x20No\x20import\x20checkpoint,\x20--resume,\x20automatic\x20upsert,\x20or\x20atomic\x20rollback\x20guarantee.','\x20\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','\x20\x20\x20\x20aggregate[].alias\x20defines\x20the\x20output\x20field\x20name\x20only','data','\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\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','Create\x20multiple\x20records\x20in\x20the\x20dataset\x20in\x20one\x20request','\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\x20\x20\x20Stop\x20on\x20unknown\x20outcomes\x20or\x20conflicts;\x20reconcile\x20before\x20retrying,\x20never\x20blindly\x20resend\x20a\x20batch.','Writes\x20multiple\x20new\x20business\x20records\x20to\x20the\x20current\x20app\x20dataset.\x20They\x20are\x20saved\x20immediately\x20after\x20confirmation.','11541688LcSkWc','\x20\x20\x20\x20Verify\x20the\x20response\x20paging.currentPage/pageSize\x20and\x20that\x20tableData\x20satisfies\x20where\x20before\x20drawing\x20conclusions.','confirmationDescription','\x20completed\x20in\x20','\x20\x20WHERE\x20OPERATORS','\x20\x20\x20\x20orderBy\x20may\x20reference\x20aggregate\x20output\x20aliases','str','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','operation','command','filter','\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\x20Query\x20conditions\x20(see\x20operators\x20above)','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','\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}}]}','\x20\x20\x20\x20METADATA:\x20use\x20lovrabet\x20data\x20import-excel\x20with\x20checkpoint\x20recovery.','2410569XAjHsq','risk','1654866hbKjXk','code','\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\x20AGGREGATE\x20TYPES','\x20\x20\x20\x20DB_TABLE:\x20inspect\x20dataset\x20detail,\x20validate\x20the\x20full\x20file\x20and\x20confirmed\x20unique\x20business\x20keys,','map','Update\x20an\x20existing\x20data\x20record','669310QReEnO','build','23316bVpoPb','\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}}','high-risk-write'];a27_0x3d2b=function(){return _0x14ec75;};return a27_0x3d2b();}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_0xf885df(0x179),'operation':a27_0xf885df(0x179),'risk':a27_0xf885df(0x1c2),'paramsRequired':![],'description':a27_0xf885df(0x1a4),'paramsHint':'JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20'+a27_0xf885df(0x1b3),'helpExtra':[a27_0xf885df(0x173),'\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_0xf885df(0x1b6),a27_0xf885df(0x1a5),a27_0xf885df(0x169),a27_0xf885df(0x1a9),a27_0xf885df(0x18b),a27_0xf885df(0x1a3),'\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\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}}',a27_0xf885df(0x1c4),'','\x20\x20LOGICAL\x20COMBINATORS',a27_0xf885df(0x17d),'\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}}]}','',a27_0xf885df(0x166),a27_0xf885df(0x17b),a27_0xf885df(0x183),a27_0xf885df(0x1b4),a27_0xf885df(0x1b0),a27_0xf885df(0x19e),'',a27_0xf885df(0x1a2),a27_0xf885df(0x1be),'\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_0xf885df(0x1bc),'\x20\x20\x20\x20and\x20increment\x20only\x20currentPage.\x20Use\x20a\x20stable\x20unique\x20orderBy\x20field\x20to\x20avoid\x20duplicates\x20or\x20gaps.','\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',a27_0xf885df(0x1bf),a27_0xf885df(0x170)][a27_0xf885df(0x18d)]('\x0a')},{'command':a27_0xf885df(0x198),'operation':a27_0xf885df(0x198),'risk':a27_0xf885df(0x1c2),'paramsRequired':!![],'description':a27_0xf885df(0x1ba),'paramsHint':a27_0xf885df(0x176)},{'command':a27_0xf885df(0x193),'operation':a27_0xf885df(0x193),'risk':'write','paramsRequired':!![],'description':'Create\x20one\x20record\x20in\x20the\x20dataset','confirmationDescription':'Writes\x20one\x20new\x20business\x20record\x20to\x20the\x20current\x20app\x20dataset.\x20It\x20is\x20saved\x20immediately\x20after\x20confirmation.','paramsHint':a27_0xf885df(0x1af)},{'command':a27_0xf885df(0x1b7),'operation':a27_0xf885df(0x1b7),'risk':'write','paramsRequired':!![],'description':a27_0xf885df(0x16b),'helpExtra':[a27_0xf885df(0x192),a27_0xf885df(0x17e),a27_0xf885df(0x185),a27_0xf885df(0x17a),a27_0xf885df(0x161),a27_0xf885df(0x19b),a27_0xf885df(0x1c0),a27_0xf885df(0x16d),a27_0xf885df(0x164),'\x20\x20\x20\x20Built-in\x20Skill\x20guide:\x20references/lovrabet-db-table-excel-import.md',a27_0xf885df(0x1a7)][a27_0xf885df(0x18d)]('\x0a'),'confirmationDescription':a27_0xf885df(0x16e),'paramsHint':'JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27'},{'command':'update','operation':a27_0xf885df(0x1bd),'risk':a27_0xf885df(0x1a1),'paramsRequired':!![],'description':a27_0xf885df(0x187),'confirmationDescription':'Changes\x20an\x20existing\x20business\x20record\x20in\x20the\x20current\x20app\x20dataset.\x20The\x20new\x20values\x20are\x20saved\x20immediately\x20after\x20confirmation.','paramsHint':a27_0xf885df(0x190)+'Examples:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27,\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22completed\x22}\x27'},{'command':a27_0xf885df(0x199),'operation':a27_0xf885df(0x199),'risk':a27_0xf885df(0x18c),'paramsRequired':!![],'description':a27_0xf885df(0x19d),'confirmationDescription':a27_0xf885df(0x1a6),'paramsHint':a27_0xf885df(0x176)},{'command':a27_0xf885df(0x1ae),'operation':a27_0xf885df(0x1ae),'risk':a27_0xf885df(0x1c2),'paramsRequired':![],'description':a27_0xf885df(0x17c),'paramsHint':a27_0xf885df(0x1b8)+a27_0xf885df(0x19f),'helpExtra':[a27_0xf885df(0x184),'\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}',a27_0xf885df(0x197),'\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}','\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}',a27_0xf885df(0x1ab),'\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_0xf885df(0x1aa),'',a27_0xf885df(0x1c5),a27_0xf885df(0x1ad),a27_0xf885df(0x1c7),a27_0xf885df(0x16a),a27_0xf885df(0x1ac),a27_0xf885df(0x1b5),a27_0xf885df(0x1b9),'',a27_0xf885df(0x1b1),a27_0xf885df(0x167),a27_0xf885df(0x1c3),a27_0xf885df(0x174),'','\x20\x20DATASET\x20BOUNDARY','\x20\x20\x20\x20aggregate\x20supports\x20a\x20single\x20DB_TABLE\x20dataset\x20only','\x20\x20\x20\x20METADATA\x20datasets\x20do\x20not\x20support\x20aggregate\x20or\x20Custom\x20SQL',a27_0xf885df(0x1bb),a27_0xf885df(0x1b2),'',a27_0xf885df(0x19c),a27_0xf885df(0x19a),a27_0xf885df(0x1a8),'','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter',a27_0xf885df(0x16c),'',a27_0xf885df(0x165)][a27_0xf885df(0x18d)]('\x0a')}];function makeDataCommand(_0x5d21ed){const _0x1576ed=a27_0xf885df,_0x447615=_0x1576ed(0x1c8)+_0x5d21ed['command'],_0x2f9ec9={'service':_0x1576ed(0x168),'command':_0x5d21ed['command'],'description':_0x5d21ed['description'],'risk':_0x5d21ed['risk'],..._0x5d21ed[_0x1576ed(0x171)]?{'confirmationDescription':_0x5d21ed['confirmationDescription']}:{},'helpExtra':_0x5d21ed['helpExtra'],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x5d21ed['paramsHint']}],'validate':async _0x165a78=>{const _0x37c5ef=_0x1576ed;_0x5d21ed[_0x37c5ef(0x194)]&&requireAnyOf(_0x165a78,['params'],_0x447615),_0x5d21ed[_0x37c5ef(0x177)]===_0x37c5ef(0x1b7)&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x165a78[_0x37c5ef(0x175)](_0x37c5ef(0x196)))),_0x5d21ed[_0x37c5ef(0x177)]==='update'&&parseUpdateIdsFromParams(parseJsonParams(_0x165a78[_0x37c5ef(0x175)](_0x37c5ef(0x196)))??{});},async 'execute'(_0x5089ac){const _0x106d12=_0x1576ed,_0x4d164d=_0x5089ac[_0x106d12(0x175)](_0x106d12(0x182)),_0x5befdf=_0x5d21ed['operation']===_0x106d12(0x1b7)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x5089ac['str'](_0x106d12(0x196)))):parseJsonParams(_0x5089ac['str'](_0x106d12(0x196)))??{},_0x5c3216=_0x5d21ed['operation']===_0x106d12(0x1bd)?parseUpdateIdsFromParams(_0x5befdf):undefined,_0x493251=_0x5c3216?normalizeUpdateParamsForRuntime(_0x5befdf,_0x5c3216):_0x5befdf,_0xda2d06=Date[_0x106d12(0x18f)](),_0x50a3ac=await executeData(_0x4d164d,_0x5d21ed[_0x106d12(0x177)],_0x493251),_0x57d29a=Date['now']()-_0xda2d06,_0xbbee48=_0x5c3216&&_0x5c3216['length']>0x1?buildBatchUpdateResult(_0x5c3216,_0x50a3ac):_0x50a3ac;return{'ok':!![],'data':{'result':_0xbbee48,'elapsed':_0x57d29a},'message':'data\x20'+_0x5d21ed['command']+_0x106d12(0x172)+_0x57d29a+'ms'};}};return _0x5d21ed[_0x1576ed(0x180)]!=='read'&&(_0x2f9ec9['dryRun']=async _0x5e700e=>{const _0x17dda4=_0x1576ed,_0x474558=_0x5e700e[_0x17dda4(0x175)](_0x17dda4(0x182)),_0x1a8ae2=_0x5d21ed[_0x17dda4(0x177)]===_0x17dda4(0x1b7)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x5e700e[_0x17dda4(0x175)](_0x17dda4(0x196)))):parseJsonParams(_0x5e700e[_0x17dda4(0x175)]('params'))??{};let _0x47beb5=_0x1a8ae2;if(_0x5d21ed['operation']==='update'){const _0x51cf00=parseUpdateIdsFromParams(_0x1a8ae2);_0x47beb5=normalizeUpdateParamsForRuntime(_0x1a8ae2,_0x51cf00);}return dryRun('POST',_0x17dda4(0x195)+_0x474558+'/'+_0x5d21ed[_0x17dda4(0x177)])['body'](_0x47beb5)[_0x17dda4(0x191)](_0x17dda4(0x1c1)+_0x5d21ed[_0x17dda4(0x178)]+'\x20on\x20dataset\x20'+_0x474558)[_0x17dda4(0x189)]();}),_0x2f9ec9;}export const dataDefinitions=[...specs[a27_0xf885df(0x186)](makeDataCommand),dataImportExcel];function buildBatchUpdateResult(_0x51ba05,_0x5ef7ee){const _0x16181e=a27_0xf885df;return{'operation':'update','mode':_0x16181e(0x163),'ids':_0x51ba05,'total':_0x51ba05[_0x16181e(0x1c6)],'result':_0x5ef7ee};}
|
|
1
|
+
const a27_0x2d0f15=a27_0x4120;(function(_0x235c53,_0x5a2f9c){const _0x103a4c=a27_0x4120,_0x46d5d0=_0x235c53();while(!![]){try{const _0x56d158=-parseInt(_0x103a4c(0x12f))/0x1*(parseInt(_0x103a4c(0x144))/0x2)+-parseInt(_0x103a4c(0x13e))/0x3+parseInt(_0x103a4c(0x16b))/0x4+-parseInt(_0x103a4c(0x17c))/0x5*(parseInt(_0x103a4c(0x188))/0x6)+parseInt(_0x103a4c(0x13d))/0x7+parseInt(_0x103a4c(0x15c))/0x8+-parseInt(_0x103a4c(0x189))/0x9*(-parseInt(_0x103a4c(0x173))/0xa);if(_0x56d158===_0x5a2f9c)break;else _0x46d5d0['push'](_0x46d5d0['shift']());}catch(_0x547a30){_0x46d5d0['push'](_0x46d5d0['shift']());}}}(a27_0x26e4,0xb760b));import{dataImportExcel}from'./import-excel.js';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_0x2d0f15(0x12d),'risk':'read','paramsRequired':![],'description':a27_0x2d0f15(0x13c),'paramsHint':'JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20'+a27_0x2d0f15(0x156),'helpExtra':['\x20\x20WHERE\x20OPERATORS',a27_0x2d0f15(0x137),'\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_0x2d0f15(0x16c),'\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}}',a27_0x2d0f15(0x131),'\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_0x2d0f15(0x140),'\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}}',a27_0x2d0f15(0x14e),a27_0x2d0f15(0x167),'',a27_0x2d0f15(0x165),a27_0x2d0f15(0x179),a27_0x2d0f15(0x157),'',a27_0x2d0f15(0x174),a27_0x2d0f15(0x12a),'\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]',a27_0x2d0f15(0x190),a27_0x2d0f15(0x178),'\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','',a27_0x2d0f15(0x161),a27_0x2d0f15(0x141),'\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_0x2d0f15(0x153),a27_0x2d0f15(0x164),'\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',a27_0x2d0f15(0x14b),'\x20\x20\x20\x20Verify\x20the\x20response\x20paging.currentPage/pageSize\x20and\x20that\x20tableData\x20satisfies\x20where\x20before\x20drawing\x20conclusions.'][a27_0x2d0f15(0x159)]('\x0a')},{'command':a27_0x2d0f15(0x126),'operation':'getOne','risk':a27_0x2d0f15(0x15a),'paramsRequired':!![],'description':a27_0x2d0f15(0x182),'paramsHint':a27_0x2d0f15(0x12e)},{'command':a27_0x2d0f15(0x169),'operation':a27_0x2d0f15(0x169),'risk':a27_0x2d0f15(0x13b),'paramsRequired':!![],'description':a27_0x2d0f15(0x132),'confirmationDescription':a27_0x2d0f15(0x14d),'paramsHint':a27_0x2d0f15(0x17b)},{'command':a27_0x2d0f15(0x177),'operation':a27_0x2d0f15(0x177),'risk':a27_0x2d0f15(0x13b),'paramsRequired':!![],'description':a27_0x2d0f15(0x158),'helpExtra':['\x20\x20EXCEL\x20ROUTES',a27_0x2d0f15(0x172),a27_0x2d0f15(0x18c),a27_0x2d0f15(0x150),a27_0x2d0f15(0x17d),a27_0x2d0f15(0x17e),a27_0x2d0f15(0x127),'\x20\x20\x20\x20Stop\x20on\x20unknown\x20outcomes\x20or\x20conflicts;\x20reconcile\x20before\x20retrying,\x20never\x20blindly\x20resend\x20a\x20batch.',a27_0x2d0f15(0x170),'\x20\x20\x20\x20Built-in\x20Skill\x20guide:\x20references/lovrabet-db-table-excel-import.md','\x20\x20\x20\x20Non-Excel\x20batchCreate\x20remains\x20available\x20for\x20METADATA\x20and\x20DB_TABLE.'][a27_0x2d0f15(0x159)]('\x0a'),'confirmationDescription':a27_0x2d0f15(0x18a),'paramsHint':a27_0x2d0f15(0x18f)},{'command':a27_0x2d0f15(0x163),'operation':a27_0x2d0f15(0x163),'risk':a27_0x2d0f15(0x13b),'paramsRequired':!![],'description':'Update\x20an\x20existing\x20data\x20record','confirmationDescription':a27_0x2d0f15(0x166),'paramsHint':a27_0x2d0f15(0x191)+a27_0x2d0f15(0x139)},{'command':a27_0x2d0f15(0x133),'operation':'delete','risk':a27_0x2d0f15(0x128),'paramsRequired':!![],'description':a27_0x2d0f15(0x151),'confirmationDescription':'Deletes\x20business\x20records\x20from\x20the\x20current\x20app\x20dataset.\x20This\x20may\x20not\x20be\x20recoverable.','paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':a27_0x2d0f15(0x171),'operation':a27_0x2d0f15(0x171),'risk':a27_0x2d0f15(0x15a),'paramsRequired':![],'description':a27_0x2d0f15(0x184),'paramsHint':'JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20'+a27_0x2d0f15(0x149),'helpExtra':[a27_0x2d0f15(0x176),a27_0x2d0f15(0x12c),a27_0x2d0f15(0x15d),a27_0x2d0f15(0x136),a27_0x2d0f15(0x13a),'\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_0x2d0f15(0x134),'',a27_0x2d0f15(0x17f),a27_0x2d0f15(0x154),a27_0x2d0f15(0x187),a27_0x2d0f15(0x18e),a27_0x2d0f15(0x185),a27_0x2d0f15(0x14c),a27_0x2d0f15(0x192),'',a27_0x2d0f15(0x138),a27_0x2d0f15(0x186),a27_0x2d0f15(0x14a),a27_0x2d0f15(0x143),'',a27_0x2d0f15(0x152),a27_0x2d0f15(0x168),a27_0x2d0f15(0x155),a27_0x2d0f15(0x175),a27_0x2d0f15(0x16e),'','\x20\x20EXAMPLES',a27_0x2d0f15(0x146),'\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','','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter',a27_0x2d0f15(0x17a),'',a27_0x2d0f15(0x12b)]['join']('\x0a')}];function makeDataCommand(_0x48a181){const _0x1fff41=a27_0x2d0f15,_0x4167d9=_0x1fff41(0x181)+_0x48a181[_0x1fff41(0x183)],_0x2e1d0d={'service':_0x1fff41(0x147),'command':_0x48a181[_0x1fff41(0x183)],'description':_0x48a181[_0x1fff41(0x160)],'risk':_0x48a181[_0x1fff41(0x135)],..._0x48a181[_0x1fff41(0x15e)]?{'confirmationDescription':_0x48a181['confirmationDescription']}:{},'helpExtra':_0x48a181[_0x1fff41(0x18b)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x48a181[_0x1fff41(0x14f)]}],'validate':async _0x120b91=>{const _0x3bd635=_0x1fff41;_0x48a181[_0x3bd635(0x18d)]&&requireAnyOf(_0x120b91,[_0x3bd635(0x16f)],_0x4167d9),_0x48a181['operation']==='batchCreate'&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x120b91[_0x3bd635(0x180)]('params'))),_0x48a181[_0x3bd635(0x13f)]==='update'&&parseUpdateIdsFromParams(parseJsonParams(_0x120b91[_0x3bd635(0x180)](_0x3bd635(0x16f)))??{});},async 'execute'(_0x1e6909){const _0x979470=_0x1fff41,_0x332bc8=_0x1e6909[_0x979470(0x180)](_0x979470(0x148)),_0xf73260=_0x48a181['operation']===_0x979470(0x177)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x1e6909['str'](_0x979470(0x16f)))):parseJsonParams(_0x1e6909['str'](_0x979470(0x16f)))??{},_0x2419e8=_0x48a181[_0x979470(0x13f)]===_0x979470(0x163)?parseUpdateIdsFromParams(_0xf73260):undefined,_0x6d9d1f=_0x2419e8?normalizeUpdateParamsForRuntime(_0xf73260,_0x2419e8):_0xf73260,_0x5adec3=Date[_0x979470(0x15b)](),_0x2cbe14=await executeData(_0x332bc8,_0x48a181[_0x979470(0x13f)],_0x6d9d1f),_0x19a862=Date['now']()-_0x5adec3,_0x51020f=_0x2419e8&&_0x2419e8[_0x979470(0x16a)]>0x1?buildBatchUpdateResult(_0x2419e8,_0x2cbe14):_0x2cbe14;return{'ok':!![],'data':{'result':_0x51020f,'elapsed':_0x19a862},'message':_0x979470(0x181)+_0x48a181[_0x979470(0x183)]+_0x979470(0x142)+_0x19a862+'ms'};}};return _0x48a181[_0x1fff41(0x135)]!==_0x1fff41(0x15a)&&(_0x2e1d0d[_0x1fff41(0x16d)]=async _0x223050=>{const _0x53eb7b=_0x1fff41,_0x404985=_0x223050[_0x53eb7b(0x180)](_0x53eb7b(0x148)),_0x3e76d1=_0x48a181['operation']===_0x53eb7b(0x177)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x223050[_0x53eb7b(0x180)]('params'))):parseJsonParams(_0x223050['str'](_0x53eb7b(0x16f)))??{};let _0x17cc7d=_0x3e76d1;if(_0x48a181[_0x53eb7b(0x13f)]===_0x53eb7b(0x163)){const _0x2c3512=parseUpdateIdsFromParams(_0x3e76d1);_0x17cc7d=normalizeUpdateParamsForRuntime(_0x3e76d1,_0x2c3512);}return dryRun(_0x53eb7b(0x130),_0x53eb7b(0x193)+_0x404985+'/'+_0x48a181[_0x53eb7b(0x13f)])[_0x53eb7b(0x145)](_0x17cc7d)[_0x53eb7b(0x160)]('Preview:\x20data\x20'+_0x48a181['command']+_0x53eb7b(0x162)+_0x404985)[_0x53eb7b(0x15f)]();}),_0x2e1d0d;}export const dataDefinitions=[...specs[a27_0x2d0f15(0x129)](makeDataCommand),dataImportExcel];function buildBatchUpdateResult(_0xde7046,_0x10adaf){const _0x258af5=a27_0x2d0f15;return{'operation':'update','mode':'batch','ids':_0xde7046,'total':_0xde7046[_0x258af5(0x16a)],'result':_0x10adaf};}function a27_0x4120(_0x2179f7,_0x6b64e){_0x2179f7=_0x2179f7-0x126;const _0x26e4fd=a27_0x26e4();let _0x412039=_0x26e4fd[_0x2179f7];return _0x412039;}function a27_0x26e4(){const _0x1e8a3d=['2598885fgWTbv','operation','\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\x20Filtering\x20and\x20pagination\x20are\x20controlled\x20only\x20via\x20one\x20JSON\x20object\x20in\x20--params.','\x20completed\x20in\x20','\x20\x20\x20\x20orderBy\x20may\x20reference\x20aggregate\x20output\x20aliases','8dtvSDc','body','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','data','code','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\x20select/where/having/groupBy\x20must\x20use\x20real\x20dataset\x20fields','\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\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}}','Writes\x20one\x20new\x20business\x20record\x20to\x20the\x20current\x20app\x20dataset.\x20It\x20is\x20saved\x20immediately\x20after\x20confirmation.','\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}}','paramsHint','\x20\x20\x20\x20then\x20convert\x20rows\x20to\x20JSON\x20and\x20split\x20within\x20the\x20target\x20API\x20row/byte\x20and\x20local\x20argument\x20limits.','Delete\x20data\x20records\x20(non-interactive\x20mode\x20requires\x20--yes)','\x20\x20DATASET\x20BOUNDARY','\x20\x20\x20\x20Page\x20numbers\x20start\x20at\x201.\x20To\x20fetch\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged','\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]','\x20\x20\x20\x20METADATA\x20datasets\x20do\x20not\x20support\x20aggregate\x20or\x20Custom\x20SQL','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','\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}}]}','Create\x20multiple\x20records\x20in\x20the\x20dataset\x20in\x20one\x20request','join','read','now','684192QwDnrT','\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}','confirmationDescription','build','description','\x20\x20PAGINATION','\x20on\x20dataset\x20','update','\x20\x20\x20\x20and\x20increment\x20only\x20currentPage.\x20Use\x20a\x20stable\x20unique\x20orderBy\x20field\x20to\x20avoid\x20duplicates\x20or\x20gaps.','\x20\x20LOGICAL\x20COMBINATORS','Changes\x20an\x20existing\x20business\x20record\x20in\x20the\x20current\x20app\x20dataset.\x20The\x20new\x20values\x20are\x20saved\x20immediately\x20after\x20confirmation.','\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\x20\x20\x20aggregate\x20supports\x20a\x20single\x20DB_TABLE\x20dataset\x20only','create','length','1928896jpbaCe','\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}}','dryRun','\x20\x20\x20\x20choose\x20the\x20capability\x20before\x20execution;\x20never\x20fall\x20back\x20at\x20runtime','params','\x20\x20\x20\x20No\x20import\x20checkpoint,\x20--resume,\x20automatic\x20upsert,\x20or\x20atomic\x20rollback\x20guarantee.','aggregate','\x20\x20\x20\x20METADATA:\x20use\x20lovrabet\x20data\x20import-excel\x20with\x20checkpoint\x20recovery.','760290ptnHSt','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','\x20\x20\x20\x20JOIN\x20and\x20cross-table\x20aggregation\x20require\x20an\x20existing\x20trusted\x20Custom\x20SQL','\x20\x20AGGREGATE\x20TYPES','batchCreate','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','\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}}]}','\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','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','35rxcNNp','\x20\x20\x20\x20This\x20command\x20sends\x20one\x20prepared\x20batch;\x20it\x20does\x20not\x20read\x20XLSX\x20or\x20split\x20batches.','\x20\x20\x20\x20--dry-run\x20previews\x20the\x20request\x20only;\x20it\x20does\x20not\x20validate\x20server\x20constraints\x20or\x20write\x20permissions.','\x20\x20PARAMS\x20STRUCTURE','str','data\x20','Get\x20a\x20single\x20record\x20by\x20ID','command','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','\x20\x20\x20\x20aggregate[].alias\x20defines\x20the\x20output\x20field\x20name\x20only','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','1199262CYNgGd','297flifoq','Writes\x20multiple\x20new\x20business\x20records\x20to\x20the\x20current\x20app\x20dataset.\x20They\x20are\x20saved\x20immediately\x20after\x20confirmation.','helpExtra','\x20\x20\x20\x20DB_TABLE:\x20inspect\x20dataset\x20detail,\x20validate\x20the\x20full\x20file\x20and\x20confirmed\x20unique\x20business\x20keys,','paramsRequired','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','\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}]','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20id\x20may\x20be\x20a\x20single\x20value\x20or\x20array.\x20','\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}]','/api/{appCode}/','getOne','\x20\x20\x20\x20Record\x20each\x20batch\x20and\x20verify\x20its\x20IDs\x20or\x20unique\x20business\x20keys\x20before\x20continuing.','high-risk-write','map','\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#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','\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}','filter','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','150783MOznpB','POST','\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}}','Create\x20one\x20record\x20in\x20the\x20dataset','delete','\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}','risk','\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}','\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}}','\x20\x20AGGREGATE\x20ALIAS\x20BOUNDARY','Examples:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27,\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22completed\x22}\x27','\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}','write','Filter\x20dataset\x20records\x20with\x20query\x20conditions','3800832pwVcuG'];a27_0x26e4=function(){return _0x1e8a3d;};return a27_0x26e4();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a28_0xf20a7c=a28_0x1329;(function(_0x59e6c1,_0xd03b94){const _0x236bd8=a28_0x1329,_0x5e248b=_0x59e6c1();while(!![]){try{const _0x107052=-parseInt(_0x236bd8(0x193))/0x1+parseInt(_0x236bd8(0x1b6))/0x2+parseInt(_0x236bd8(0x1ad))/0x3*(-parseInt(_0x236bd8(0x175))/0x4)+parseInt(_0x236bd8(0x197))/0x5+parseInt(_0x236bd8(0x1b2))/0x6*(-parseInt(_0x236bd8(0x183))/0x7)+-parseInt(_0x236bd8(0x19b))/0x8*(-parseInt(_0x236bd8(0x19c))/0x9)+-parseInt(_0x236bd8(0x182))/0xa*(-parseInt(_0x236bd8(0x192))/0xb);if(_0x107052===_0xd03b94)break;else _0x5e248b['push'](_0x5e248b['shift']());}catch(_0x505f4e){_0x5e248b['push'](_0x5e248b['shift']());}}}(a28_0xc79a,0xa669b));import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';function isRecord(_0x55174d){return _0x55174d!==null&&typeof _0x55174d==='object'&&!Array['isArray'](_0x55174d);}function normalizeField(_0x3f1e8d){const _0x276f88=a28_0x1329;if(_0x3f1e8d[_0x276f88(0x179)])return null;const _0x4778f3=Boolean(_0x3f1e8d['displayName']!==undefined||_0x3f1e8d['doType']!==undefined);let _0x45ccfa={};if(!_0x4778f3&&typeof _0x3f1e8d['extend']===_0x276f88(0x1b9))try{_0x45ccfa=JSON[_0x276f88(0x1b5)](_0x3f1e8d['extend']);}catch{}const _0xf9b5b3=_0x4778f3?_0x3f1e8d[_0x276f88(0x180)]:_0x3f1e8d['code'],_0x3be81b=_0x4778f3?_0x3f1e8d[_0x276f88(0x176)]:_0x3f1e8d['name'],_0x42b317=_0x4778f3?_0x3f1e8d[_0x276f88(0x17f)]:_0x3f1e8d[_0x276f88(0x1a6)]||_0x3f1e8d['dataType'],_0x27eb44=_0x4778f3?_0x3f1e8d[_0x276f88(0x1a8)]===!![]:_0x45ccfa[_0x276f88(0x1a8)]===!![],_0x37e75a=_0x4778f3?_0x3f1e8d['required']===!![]:_0x45ccfa[_0x276f88(0x18a)]===!![],_0x4e4e7b=_0x4778f3?_0x3f1e8d['options']??null:_0x45ccfa[_0x276f88(0x198)]??null,_0x43c370={'name':_0xf9b5b3,'displayName':_0x3be81b||_0xf9b5b3,'type':_0x42b317,'dbType':_0x3f1e8d['dbType'],'pk':_0x27eb44,'required':_0x37e75a,'description':_0x3f1e8d[_0x276f88(0x196)]||undefined};return Array['isArray'](_0x4e4e7b)&&_0x4e4e7b['length']>0x0&&(_0x43c370['options']=_0x4e4e7b),_0x43c370;}function parseJsonMaybe(_0x536655){if(typeof _0x536655!=='string')return _0x536655;try{return JSON['parse'](_0x536655);}catch{return _0x536655;}}function a28_0x1329(_0x1d0be7,_0x32c4c2){_0x1d0be7=_0x1d0be7-0x173;const _0xc79ae0=a28_0xc79a();let _0x13290c=_0xc79ae0[_0x1d0be7];return _0x13290c;}function normalizeOperationEntry(_0x3c962d,_0x3dd0ca){const _0x36a245=a28_0x1329;if(!_0x3dd0ca||typeof _0x3dd0ca!==_0x36a245(0x17a))return null;if(!_0x3dd0ca[_0x36a245(0x17c)]||!_0x3dd0ca['path'])return null;const _0x24227b={'name':_0x3c962d,'method':_0x3dd0ca[_0x36a245(0x17c)],'path':_0x3dd0ca[_0x36a245(0x187)]};if(_0x3dd0ca[_0x36a245(0x1ab)])_0x24227b[_0x36a245(0x1ab)]=_0x3dd0ca['host'];if(_0x3dd0ca[_0x36a245(0x1a2)]!=null)_0x24227b[_0x36a245(0x1a2)]=parseJsonMaybe(_0x3dd0ca[_0x36a245(0x1a2)]);if(_0x3dd0ca[_0x36a245(0x199)]!=null)_0x24227b['responseBody']=parseJsonMaybe(_0x3dd0ca['responseBody']);if(_0x3dd0ca[_0x36a245(0x19d)]!=null)_0x24227b['beforeScriptId']=_0x3dd0ca['beforeScriptId'];if(_0x3dd0ca[_0x36a245(0x195)]!=null)_0x24227b[_0x36a245(0x195)]=_0x3dd0ca['afterScriptId'];if(Array[_0x36a245(0x185)](_0x3dd0ca[_0x36a245(0x19a)]))_0x24227b[_0x36a245(0x19a)]=_0x3dd0ca[_0x36a245(0x19a)];if(Array[_0x36a245(0x185)](_0x3dd0ca[_0x36a245(0x19e)]))_0x24227b[_0x36a245(0x19e)]=_0x3dd0ca['responseFields'];return _0x24227b;}function summarizeDbtable(_0x3bd406){const _0x4e7a0f=a28_0x1329,_0x4520ac={},_0x52a329=[_0x4e7a0f(0x188),_0x4e7a0f(0x1b0),'tableName',_0x4e7a0f(0x1b7),_0x4e7a0f(0x1a8),_0x4e7a0f(0x1bc),_0x4e7a0f(0x18e),_0x4e7a0f(0x18f),_0x4e7a0f(0x1ba),_0x4e7a0f(0x1b4),_0x4e7a0f(0x17d),_0x4e7a0f(0x17b),_0x4e7a0f(0x194),_0x4e7a0f(0x174),_0x4e7a0f(0x1aa)];for(const _0x225dff of _0x52a329){if(_0x3bd406[_0x225dff]!==undefined)_0x4520ac[_0x225dff]=_0x3bd406[_0x225dff];}return typeof _0x4520ac['allFields']===_0x4e7a0f(0x1b9)&&_0x4520ac[_0x4e7a0f(0x1bc)][_0x4e7a0f(0x1b8)]>0x0&&(_0x4520ac[_0x4e7a0f(0x1bb)]=_0x4520ac[_0x4e7a0f(0x1bc)][_0x4e7a0f(0x17e)](',')[_0x4e7a0f(0x1b1)](_0x3c27ed=>_0x3c27ed[_0x4e7a0f(0x178)]())[_0x4e7a0f(0x18c)](Boolean)),_0x4520ac;}function normalizeRelatedPages(_0x1d5015){const _0x140bd2=a28_0x1329;if(!Array[_0x140bd2(0x185)](_0x1d5015))return[];return _0x1d5015[_0x140bd2(0x18c)](_0x4fe97b=>_0x4fe97b&&typeof _0x4fe97b===_0x140bd2(0x17a))[_0x140bd2(0x1b1)](_0x128136=>({'id':_0x128136['id'],'type':_0x128136[_0x140bd2(0x1a6)],'code':_0x128136[_0x140bd2(0x19f)],'title':_0x128136[_0x140bd2(0x1a3)],'deleted':_0x128136[_0x140bd2(0x179)]===!![]}));}function normalizeFallbackFieldName(_0x5c74ad,_0x52ec5a){const _0xbfb05e=a28_0x1329,_0x4a005b=_0x5c74ad[_0xbfb05e(0x178)]();if(!_0x4a005b)return null;return{'name':_0x4a005b,'displayName':_0x4a005b,'type':undefined,'dbType':undefined,'pk':_0x4a005b===_0x52ec5a,'required':![],'description':undefined};}async function loadListFieldFallback(_0x40fb14,_0x2ce082){const _0xb42dc=a28_0x1329;if(!_0x40fb14||!_0x2ce082)return[];try{const _0x4c3927=await listDatasets(_0x40fb14,{'code':_0x2ce082}),_0x3adee2=_0x4c3927[_0xb42dc(0x1a4)](_0x576933=>_0x576933[_0xb42dc(0x19f)]===_0x2ce082)??_0x4c3927[0x0],_0x21a643=_0x3adee2?.[_0xb42dc(0x190)]??{},_0x168cac=typeof _0x21a643[_0xb42dc(0x1bc)]===_0xb42dc(0x1b9)?_0x21a643[_0xb42dc(0x1bc)][_0xb42dc(0x17e)](','):[];return _0x168cac[_0xb42dc(0x1b1)](_0x1a3b17=>normalizeFallbackFieldName(_0x1a3b17,_0x21a643[_0xb42dc(0x1a8)]))['filter'](_0x4f8a31=>_0x4f8a31!==null);}catch{return[];}}function a28_0xc79a(){const _0x3e14c8=['extend','path','dbId','push','required','str','filter','validateRules','logicField','createTimeField','dbtableConfig','source','43153VMUnQc','1253018kJVlvz','modifierNameField','afterScriptId','description','2587405qoHeQJ','options','responseBody','requestFields','2536304QkJWjC','9GEDBIx','beforeScriptId','responseFields','code','tableName','columnCodeListWithDeleted','requestBody','title','find','sourceType','type','indexes','pkField','relatedPageInfoList','dblinkInfoDTO','host','detail','954141dmrCnd','dataset','relations','dbName','map','46608NBkNfY','properties','creatorIdField','parse','1463496lPNMcC','datasetKey','length','string','updateTimeField','allFieldNames','allFields','Dataset\x20detail\x20must\x20be\x20an\x20object.','labelField','12QbnGtp','displayName','fields','trim','deleted','object','modifierIdField','method','creatorNameField','split','doType','name','modelId','3490CXhzpQ','42jiUqou','formatRules','isArray'];a28_0xc79a=function(){return _0x3e14c8;};return a28_0xc79a();}export const datasetDetail={'service':a28_0xf20a7c(0x1ae),'command':a28_0xf20a7c(0x1ac),'description':'Get\x20dataset\x20detail\x20including\x20fields,\x20relations,\x20and\x20operations','risk':'read','flags':[CODE_FLAG],async 'execute'(_0x59d196){const _0x756d88=a28_0xf20a7c,_0x27ce88=await getDatasetDetail(_0x59d196[_0x756d88(0x18b)](_0x756d88(0x19f)));if(!isRecord(_0x27ce88))throw CliErrors['apiError'](_0x756d88(0x173));const _0x12935c=Array[_0x756d88(0x185)](_0x27ce88[_0x756d88(0x177)])?_0x27ce88[_0x756d88(0x177)]:Array[_0x756d88(0x185)](_0x27ce88['properties'])?_0x27ce88[_0x756d88(0x1b3)]:[];let _0x2f3c8d=_0x12935c[_0x756d88(0x1b1)](_0x53d56e=>normalizeField(_0x53d56e))[_0x756d88(0x18c)](_0x493bb7=>_0x493bb7!==null);_0x2f3c8d[_0x756d88(0x1b8)]===0x0&&(_0x2f3c8d=await loadListFieldFallback(_0x59d196['appCode'],_0x59d196['str'](_0x756d88(0x19f))));const _0x4fc6a2=_0x27ce88['operations']??{},_0x1487ea=[];for(const [_0x469fb4,_0x56aaf5]of Object['entries'](_0x4fc6a2)){const _0x222613=normalizeOperationEntry(_0x469fb4,_0x56aaf5);if(_0x222613)_0x1487ea[_0x756d88(0x189)](_0x222613);}const _0x5acf4f=isRecord(_0x27ce88['dbtableConfig'])?_0x27ce88['dbtableConfig']:{},_0x467ab3=isRecord(_0x27ce88[_0x756d88(0x1ae)])?_0x27ce88[_0x756d88(0x1ae)]:{},_0xf2d93e=_0x5acf4f[_0x756d88(0x188)]!=null?{'id':_0x5acf4f[_0x756d88(0x188)],'name':_0x5acf4f[_0x756d88(0x1b0)]??null}:undefined;let _0x1f3473;return typeof _0x27ce88[_0x756d88(0x186)]==='string'&&(_0x1f3473=parseJsonMaybe(_0x27ce88[_0x756d88(0x186)])),{'ok':!![],'data':{'id':_0x27ce88[_0x756d88(0x181)]??_0x27ce88['id'],'name':_0x27ce88[_0x756d88(0x180)],'code':_0x27ce88['modelCode']||_0x27ce88['code'],'doVersion':_0x27ce88['doVersion'],'description':_0x27ce88[_0x756d88(0x196)]||_0x467ab3['tableComment']||undefined,'source':_0x27ce88[_0x756d88(0x191)]||_0x467ab3[_0x756d88(0x1a5)],'table':_0x5acf4f[_0x756d88(0x1a0)]||_0x467ab3['tableName'],'datasetKey':_0x5acf4f[_0x756d88(0x1b7)],'pk':_0x5acf4f[_0x756d88(0x1a8)],'db':_0xf2d93e,'dbtable':summarizeDbtable(_0x5acf4f),'fields':_0x2f3c8d,'operations':_0x1487ea,'indexes':Array[_0x756d88(0x185)](_0x467ab3[_0x756d88(0x1a7)])?_0x467ab3['indexes']:[],'relations':_0x27ce88[_0x756d88(0x1af)]??null,'relatedPages':normalizeRelatedPages(_0x27ce88[_0x756d88(0x1a9)]),...Array[_0x756d88(0x185)](_0x27ce88[_0x756d88(0x1a1)])?{'columnCodeListWithDeleted':_0x27ce88[_0x756d88(0x1a1)]}:{},'formatRules':Array[_0x756d88(0x185)](_0x27ce88[_0x756d88(0x184)])?_0x27ce88['formatRules']:[],'validateRules':Array[_0x756d88(0x185)](_0x27ce88[_0x756d88(0x18d)])?_0x27ce88[_0x756d88(0x18d)]:[],..._0x1f3473!==undefined?{'extend':_0x1f3473}:{},'stats':{'fieldCount':_0x2f3c8d[_0x756d88(0x1b8)],'operationCount':_0x1487ea[_0x756d88(0x1b8)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x46b6eb,_0x3c3f67){const _0x545cac=a29_0x3705,_0x423375=_0x46b6eb();while(!![]){try{const _0x2e72c4=-parseInt(_0x545cac(0x1bb))/0x1+-parseInt(_0x545cac(0x1b8))/0x2+parseInt(_0x545cac(0x1b9))/0x3+parseInt(_0x545cac(0x1b5))/0x4*(-parseInt(_0x545cac(0x1b7))/0x5)+parseInt(_0x545cac(0x1ba))/0x6+parseInt(_0x545cac(0x1b6))/0x7*(parseInt(_0x545cac(0x1bc))/0x8)+parseInt(_0x545cac(0x1bd))/0x9;if(_0x2e72c4===_0x3c3f67)break;else _0x423375['push'](_0x423375['shift']());}catch(_0x4e8ccb){_0x423375['push'](_0x423375['shift']());}}}(a29_0x11a9,0x2a168));function a29_0x3705(_0x1a238f,_0x5e0ea8){_0x1a238f=_0x1a238f-0x1b5;const _0x11a9d4=a29_0x11a9();let _0x370559=_0x11a9d4[_0x1a238f];return _0x370559;}function a29_0x11a9(){const _0xc963f9=['28758VAWqAK','97940IrHNZa','180952mOUrRT','382311pqtxEa','173956UEZMRD','70rZAtGs','35ukmVvH','13480ewYjZY','924099kWivqc'];a29_0x11a9=function(){return _0xc963f9;};return a29_0x11a9();}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_0x248f63=a30_0x38ed;function a30_0x38ed(_0xe44940,_0x553231){_0xe44940=_0xe44940-0x1be;const _0xa9cbbd=a30_0xa9cb();let _0x38ed87=_0xa9cbbd[_0xe44940];return _0x38ed87;}(function(_0x5b0645,_0x448771){const _0x368e4f=a30_0x38ed,_0x12764f=_0x5b0645();while(!![]){try{const _0x334885=parseInt(_0x368e4f(0x1ce))/0x1+parseInt(_0x368e4f(0x1c2))/0x2+-parseInt(_0x368e4f(0x1c6))/0x3+-parseInt(_0x368e4f(0x1c4))/0x4*(-parseInt(_0x368e4f(0x1d0))/0x5)+parseInt(_0x368e4f(0x1bf))/0x6*(parseInt(_0x368e4f(0x1c8))/0x7)+parseInt(_0x368e4f(0x1be))/0x8*(parseInt(_0x368e4f(0x1c9))/0x9)+-parseInt(_0x368e4f(0x1c0))/0xa;if(_0x334885===_0x448771)break;else _0x12764f['push'](_0x12764f['shift']());}catch(_0x78bc8d){_0x12764f['push'](_0x12764f['shift']());}}}(a30_0xa9cb,0x87901));import{listDatasets}from'../../core/api-client.js';function a30_0xa9cb(){const _0x44f9d9=['Filter\x20by\x20dataset\x20name\x20(server-side\x20fuzzy\x20match)','map','table-name','dataset','source','allFields','trim','read','pkField','Filter\x20by\x20physical\x20table\x20name\x20(server-side\x20prefix\x20match;\x20SQL\x20LIKE\x20wildcards\x20%\x20and\x20_\x20apply)','dbtableConfig','8EnFNCQ','6MrHzbN','26161770IMXiCA','tableName','1862162uFMeLn','name','3029812mTHzng','list','1056654kfoqYw','List\x20datasets\x20in\x20the\x20app\x20(server-side\x20name/code/table-name\x20filters\x20combine\x20with\x20AND)','4570517tBIJRp','2055978qJiblQ','split','str','string','length','953753mzXWeq','appCode','5NWFxOG','datasetKey','code','Filter\x20by\x20dataset\x20code\x20(server-side\x20exact\x20match)'];a30_0xa9cb=function(){return _0x44f9d9;};return a30_0xa9cb();}import{CODE_FLAG}from'../../commands/common/flags.js';export const datasetList={'service':a30_0x248f63(0x1d7),'command':a30_0x248f63(0x1c5),'description':a30_0x248f63(0x1c7),'risk':a30_0x248f63(0x1db),'flags':[{'name':a30_0x248f63(0x1c3),'type':a30_0x248f63(0x1cc),'description':a30_0x248f63(0x1d4)},{'name':a30_0x248f63(0x1d6),'type':a30_0x248f63(0x1cc),'description':a30_0x248f63(0x1dd)},{...CODE_FLAG,'required':![],'description':a30_0x248f63(0x1d3)}],async 'execute'(_0x186684){const _0x15f7c6=a30_0x248f63,_0x49d025=_0x186684[_0x15f7c6(0x1cb)](_0x15f7c6(0x1c3)),_0x3ef695=_0x186684[_0x15f7c6(0x1cb)](_0x15f7c6(0x1d2)),_0x24d6f7=_0x186684[_0x15f7c6(0x1cb)](_0x15f7c6(0x1d6)),_0x8e9c35=await listDatasets(_0x186684[_0x15f7c6(0x1cf)],{..._0x49d025&&{'name':_0x49d025},..._0x3ef695&&{'code':_0x3ef695},..._0x24d6f7&&{'tableName':_0x24d6f7}});return{'ok':!![],'data':{'total':_0x8e9c35[_0x15f7c6(0x1cd)],'datasets':_0x8e9c35[_0x15f7c6(0x1d5)](_0xdd4554=>{const _0x9d9fff=_0x15f7c6,_0x791344=_0xdd4554[_0x9d9fff(0x1de)]??{};return{'id':_0xdd4554['id'],'code':_0xdd4554[_0x9d9fff(0x1d2)],'name':_0xdd4554[_0x9d9fff(0x1c3)],'source':_0xdd4554[_0x9d9fff(0x1d8)],'description':_0xdd4554['description'],'table':_0x791344[_0x9d9fff(0x1c1)],'datasetKey':_0x791344[_0x9d9fff(0x1d1)],'pk':_0x791344[_0x9d9fff(0x1dc)],'fields':_0x791344[_0x9d9fff(0x1d9)]?_0x791344[_0x9d9fff(0x1d9)][_0x9d9fff(0x1ca)](',')[_0x9d9fff(0x1d5)](_0x579021=>_0x579021[_0x9d9fff(0x1da)]()):[]};})}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a31_0x4d4b14=a31_0x4d51;(function(_0x39b8f5,_0x5a1387){const _0x1041a2=a31_0x4d51,_0xdfa02d=_0x39b8f5();while(!![]){try{const _0x5ef5dc=-parseInt(_0x1041a2(0x1a4))/0x1+-parseInt(_0x1041a2(0x1a8))/0x2+-parseInt(_0x1041a2(0x1ae))/0x3*(-parseInt(_0x1041a2(0x1b0))/0x4)+parseInt(_0x1041a2(0x1a1))/0x5*(-parseInt(_0x1041a2(0x1a7))/0x6)+parseInt(_0x1041a2(0x1a9))/0x7+parseInt(_0x1041a2(0x1ac))/0x8+-parseInt(_0x1041a2(0x1a5))/0x9;if(_0x5ef5dc===_0x5a1387)break;else _0xdfa02d['push'](_0xdfa02d['shift']());}catch(_0x107e3d){_0xdfa02d['push'](_0xdfa02d['shift']());}}}(a31_0x538b,0x96827));function a31_0x4d51(_0x2f2060,_0x4c9ee5){_0x2f2060=_0x2f2060-0x1a1;const _0x538b63=a31_0x538b();let _0x4d5121=_0x538b63[_0x2f2060];return _0x4d5121;}import{getDatasetSdkUsageDoc}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';const DEFAULT_MARKDOWN='#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0aNo\x20SDK\x20usage\x20documentation\x20is\x20available.';export function formatDatasetSdkMarkdown(_0x249b5d){const _0x40d8fa=a31_0x4d51,_0x555a94=typeof _0x249b5d===_0x40d8fa(0x1ad)?_0x249b5d['trim']():'';return _0x555a94||DEFAULT_MARKDOWN;}function a31_0x538b(){const _0x361b83=['42hLrPAh','435800DlBfsw','2825858yiRMlr','dataset','str','2477784vwYWRi','string','831quiHHX','read','16244CqDAnF','sdk-doc','160015ISOTbi','Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','code','328852AQovHz','4059486FwAogu','appCode'];a31_0x538b=function(){return _0x361b83;};return a31_0x538b();}export const datasetSdkDoc={'service':a31_0x4d4b14(0x1aa),'command':a31_0x4d4b14(0x1b1),'description':a31_0x4d4b14(0x1a2),'risk':a31_0x4d4b14(0x1af),'flags':[{...CODE_FLAG,'description':'Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.'}],async 'execute'(_0x525168){const _0x279db7=a31_0x4d4b14,_0x4d1cba=_0x525168[_0x279db7(0x1ab)](_0x279db7(0x1a3)),_0x2dc23f=await getDatasetSdkUsageDoc(_0x4d1cba,_0x525168[_0x279db7(0x1a6)]);return{'ok':!![],'data':{'code':_0x4d1cba,'appCode':_0x525168[_0x279db7(0x1a6)],'markdown':formatDatasetSdkMarkdown(_0x2dc23f)}};}};
|
package/lib/commands/doctor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function a32_0x5e50(_0xf4b38a,_0x73d57){_0xf4b38a=_0xf4b38a-0x82;const _0x3da637=a32_0x3da6();let _0x5e5068=_0x3da637[_0xf4b38a];return _0x5e5068;}const a32_0x204b01=a32_0x5e50;(function(_0x2b172e,_0x46fe86){const _0x59d8cb=a32_0x5e50,_0x3914ac=_0x2b172e();while(!![]){try{const _0x3c86d2=parseInt(_0x59d8cb(0xec))/0x1+parseInt(_0x59d8cb(0xdb))/0x2*(-parseInt(_0x59d8cb(0xa6))/0x3)+parseInt(_0x59d8cb(0xbe))/0x4+parseInt(_0x59d8cb(0xb3))/0x5*(parseInt(_0x59d8cb(0xd3))/0x6)+-parseInt(_0x59d8cb(0xfa))/0x7*(-parseInt(_0x59d8cb(0x100))/0x8)+-parseInt(_0x59d8cb(0x111))/0x9*(-parseInt(_0x59d8cb(0x106))/0xa)+-parseInt(_0x59d8cb(0xa8))/0xb*(parseInt(_0x59d8cb(0xae))/0xc);if(_0x3c86d2===_0x46fe86)break;else _0x3914ac['push'](_0x3914ac['shift']());}catch(_0x263d1d){_0x3914ac['push'](_0x3914ac['shift']());}}}(a32_0x3da6,0x18890));import a32_0x5c2e89 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';function a32_0x3da6(){const _0x3ab394=['packageVersion','918114HVazkC','\x20\x20Repair\x20project:\x20\x20\x20','app','riskLevel','yellow','Global','not\x20configured','appCode','44ZgTECK','project','\x20doctor','read','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','Unavailable\x20until\x20routing\x20configuration\x20is\x20repaired','join','(no\x20file)','\x20config\x20delete\x20inherit','✓\x20Loaded','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','env','(unnamed)','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Skill\x20Version:\x20\x20\x20','\x20config\x20init','\x20\x20skillDomain:\x20\x20\x20\x20\x20','143585EIYqlD','serviceCode','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','(removed\x20—\x20cookie\x20auth\x20disabled)','repeat','\x20\x20region:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Config\x20Files','message','hasOwnProperty','accessKeySource','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','\x20config\x20delete\x20inherit\x20--global','1337XSQJml','\x20\x20Legacy\x20inherit:\x20\x20\x20','str','green','\x20config\x20delete\x20routing','name','1528HiQYsj','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Country/Region\x20Configuration','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','length','gray','13170EXFpXQ','log','\x20\x20Auth','Diagnose\x20CLI\x20configuration\x20and\x20environment','(not\x20found)','\x20\x20Built-in\x20Skill','locale','red','\x20\x20Repair\x20global:\x20\x20\x20','prototype','format','1233nLOQva','includes','reason','\x20config\x20delete\x20routing\x20--global','\x20config','(invalid)','state','ignored\x20in\x20','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','✗\x20Invalid','Project','current','inherit','region','repairCommand','(not\x20set)','(none)','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','\x20+\x20','commandCount','path','(default:\x20','status','⚠\x20Empty','\x20\x20Package\x20Version:\x20','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','missing','check','ClientAk','\x20\x20─','\x20\x20Service\x20Tree','empty','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','filter','accessKey','padEnd','✗\x20Invalid\x20JSON','11958dQpOGL','source','22aHFlCN','\x20(accessKey)','\x20Imported\x20from:\x20','⚠\x20Empty\x20(treated\x20as\x20{})','verbose','call','2079312INmEwa','\x20\x20API\x20Endpoints','\x20\x20Repair\x20global:\x20\x20\x20\x20','services','\x20\x20auth\x20(effective):\x20','5FQrmmq','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20AK\x20source:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Routing\x20Configuration','✓\x20Valid\x20JSON','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','pageSize','version','projectConfig','\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','84904mNTnGV','bold','\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Session\x20check:\x20\x20\x20','\x20\x20Repair\x20project:\x20\x20','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20config\x20delete\x20region','globalConfig','routing','arch','\x20\x20Config\x20JSON','currentApp','\x20\x20app\x20locale:\x20\x20\x20\x20\x20\x20','global','installedPath','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(missing)','(default)','\x20\x20runtimeDomain:\x20\x20\x20','defaultApp'];a32_0x3da6=function(){return _0x3ab394;};return a32_0x3da6();}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(_0x22b9a7){const _0x3cf453=a32_0x5e50,_0x3a8ca8=getCliVersion(),_0x3dcc25=buildConfigFromFlags({'app':_0x22b9a7['str']?.(_0x3cf453(0xd5)),'appcode':_0x22b9a7['str']?.('appcode'),'env':_0x22b9a7[_0x3cf453(0xfc)]?.(_0x3cf453(0xe6))});let _0x5bdb12,_0x8037c3;try{_0x5bdb12=normalizeLovrabetRegion(_0x3dcc25['raw']['region']);}catch(_0x16e6cf){_0x8037c3=_0x16e6cf instanceof Error?_0x16e6cf:new Error(String(_0x16e6cf));}let _0x57500d;if(!_0x8037c3)try{await initGlobalEnvironment(_0x3dcc25);}catch(_0x164de5){_0x57500d=_0x164de5 instanceof Error?_0x164de5:new Error(String(_0x164de5));}console[_0x3cf453(0x107)](),console[_0x3cf453(0x107)](a32_0x5c2e89[_0x3cf453(0xbf)](CLI_BIN_NAME+_0x3cf453(0xdd))),console[_0x3cf453(0x107)](a32_0x5c2e89[_0x3cf453(0x105)]('─'[_0x3cf453(0xf0)](0x32))),console[_0x3cf453(0x107)](_0x3cf453(0xe5)+_0x3a8ca8),console[_0x3cf453(0x107)](_0x3cf453(0xb6)+process[_0x3cf453(0xbb)]),console['log'](_0x3cf453(0xa1)+process['platform']+'\x20'+process[_0x3cf453(0xc7)]);const _0x595329=inspectBuiltinSkill();console[_0x3cf453(0x107)](),console[_0x3cf453(0x107)](a32_0x5c2e89[_0x3cf453(0xbf)](_0x3cf453(0x10b))),console[_0x3cf453(0x107)](a32_0x5c2e89[_0x3cf453(0x105)](_0x3cf453(0x9e)['repeat'](0x1e))),console[_0x3cf453(0x107)](_0x3cf453(0xbd)+(_0x595329[_0x3cf453(0x86)]===_0x3cf453(0x8b)?a32_0x5c2e89[_0x3cf453(0xfd)]('✓\x20current'):a32_0x5c2e89['red']('✗\x20'+_0x595329[_0x3cf453(0x86)]))),console[_0x3cf453(0x107)](_0x3cf453(0x98)+_0x595329[_0x3cf453(0xd2)]),console['log'](_0x3cf453(0xe9)+(_0x595329['skillVersion']||a32_0x5c2e89['gray'](_0x3cf453(0xce)))),console[_0x3cf453(0x107)]('\x20\x20Installed\x20Path:\x20\x20'+(_0x595329[_0x3cf453(0xcc)]||a32_0x5c2e89['gray']('(not\x20found)')));_0x595329[_0x3cf453(0x86)]!=='current'&&console[_0x3cf453(0x107)](_0x3cf453(0x9a)+_0x595329[_0x3cf453(0x8e)]);_0x595329['reason']&&console['log'](_0x3cf453(0xc0)+_0x595329[_0x3cf453(0x82)]);console[_0x3cf453(0x107)](),console[_0x3cf453(0x107)](a32_0x5c2e89[_0x3cf453(0xbf)](_0x3cf453(0xf3))),console[_0x3cf453(0x107)](a32_0x5c2e89[_0x3cf453(0x105)]('\x20\x20─'[_0x3cf453(0xf0)](0x1e)));const _0x102a8e=getGlobalConfigPath(),_0x13a9da=getProjectConfigPath();console[_0x3cf453(0x107)]('\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x102a8e||a32_0x5c2e89[_0x3cf453(0x105)](_0x3cf453(0x10a)))),console[_0x3cf453(0x107)](_0x3cf453(0x88)+(_0x13a9da||a32_0x5c2e89[_0x3cf453(0x105)](_0x3cf453(0x10a)))),console['log'](),console[_0x3cf453(0x107)](a32_0x5c2e89[_0x3cf453(0xbf)](_0x3cf453(0xc8))),console['log'](a32_0x5c2e89[_0x3cf453(0x105)](_0x3cf453(0x9e)[_0x3cf453(0xf0)](0x1e)));const _0x886b0d=(_0x450c1a,_0x1a77f0)=>{const _0xd3c851=_0x3cf453;if(!_0x1a77f0){console[_0xd3c851(0x107)]('\x20\x20'+_0x450c1a[_0xd3c851(0xa4)](0x11)+'\x20'+a32_0x5c2e89['gray'](_0xd3c851(0xe2)));return;}const _0x190e9c=inspectCliConfigJsonFile(_0x1a77f0);if(_0x190e9c[_0xd3c851(0x96)]==='ok')console[_0xd3c851(0x107)]('\x20\x20'+_0x450c1a['padEnd'](0x11)+'\x20'+a32_0x5c2e89[_0xd3c851(0xfd)](_0xd3c851(0xb8)));else{if(_0x190e9c[_0xd3c851(0x96)]==='empty')console[_0xd3c851(0x107)]('\x20\x20'+_0x450c1a['padEnd'](0x11)+'\x20'+a32_0x5c2e89['yellow'](_0xd3c851(0xab)));else _0x190e9c[_0xd3c851(0x96)]===_0xd3c851(0x9b)?console[_0xd3c851(0x107)]('\x20\x20'+_0x450c1a[_0xd3c851(0xa4)](0x11)+'\x20'+a32_0x5c2e89[_0xd3c851(0x105)]('(missing)')):(console[_0xd3c851(0x107)]('\x20\x20'+_0x450c1a[_0xd3c851(0xa4)](0x11)+'\x20'+a32_0x5c2e89[_0xd3c851(0x10d)](_0xd3c851(0xa5))),console[_0xd3c851(0x107)]('\x20\x20'+''[_0xd3c851(0xa4)](0x11)+'\x20'+a32_0x5c2e89[_0xd3c851(0x10d)](_0x190e9c[_0xd3c851(0xf4)])));}};_0x886b0d(_0x3cf453(0xd8),_0x102a8e),_0x886b0d(_0x3cf453(0x8a),_0x13a9da);const _0x3e31e9=loadRawConfigLayers(),_0x433bcf=[Object['prototype']['hasOwnProperty'][_0x3cf453(0xad)](_0x3e31e9[_0x3cf453(0xc5)],_0x3cf453(0x8c))?_0x3cf453(0xcb):null,Object[_0x3cf453(0x10f)][_0x3cf453(0xf5)][_0x3cf453(0xad)](_0x3e31e9[_0x3cf453(0xbc)],_0x3cf453(0x8c))?_0x3cf453(0xdc):null][_0x3cf453(0xa2)](Boolean);_0x433bcf[_0x3cf453(0x104)]>0x0&&(console['log'](_0x3cf453(0xfb)+a32_0x5c2e89['yellow'](_0x3cf453(0x87)+_0x433bcf[_0x3cf453(0xe1)](_0x3cf453(0x92))+_0x3cf453(0x84))),_0x433bcf[_0x3cf453(0x112)](_0x3cf453(0xdc))&&console[_0x3cf453(0x107)](_0x3cf453(0xd4)+CLI_BIN_NAME+_0x3cf453(0xe3)),_0x433bcf[_0x3cf453(0x112)](_0x3cf453(0xcb))&&console[_0x3cf453(0x107)](_0x3cf453(0xb0)+CLI_BIN_NAME+_0x3cf453(0xf9)));_0x57500d&&(console['log'](),console[_0x3cf453(0x107)](a32_0x5c2e89[_0x3cf453(0xbf)](_0x3cf453(0xb7))),console['log'](a32_0x5c2e89[_0x3cf453(0x105)](_0x3cf453(0x9e)[_0x3cf453(0xf0)](0x1e))),console[_0x3cf453(0x107)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a32_0x5c2e89[_0x3cf453(0x10d)](_0x3cf453(0x89))),console[_0x3cf453(0x107)](_0x3cf453(0xc0)+_0x57500d['message']),Object[_0x3cf453(0x10f)][_0x3cf453(0xf5)][_0x3cf453(0xad)](_0x3e31e9[_0x3cf453(0xbc)],_0x3cf453(0xc6))&&console[_0x3cf453(0x107)]('\x20\x20Repair\x20project:\x20\x20'+CLI_BIN_NAME+_0x3cf453(0xfe)),Object[_0x3cf453(0x10f)][_0x3cf453(0xf5)]['call'](_0x3e31e9['globalConfig'],_0x3cf453(0xc6))&&console[_0x3cf453(0x107)](_0x3cf453(0x10e)+CLI_BIN_NAME+_0x3cf453(0x83)));_0x8037c3&&(console[_0x3cf453(0x107)](),console['log'](a32_0x5c2e89[_0x3cf453(0xbf)](_0x3cf453(0x102))),console['log'](a32_0x5c2e89[_0x3cf453(0x105)](_0x3cf453(0x9e)[_0x3cf453(0xf0)](0x1e))),console['log'](_0x3cf453(0xf2)+a32_0x5c2e89['red'](_0x3cf453(0x89))),console[_0x3cf453(0x107)]('\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x8037c3['message']),Object[_0x3cf453(0x10f)][_0x3cf453(0xf5)]['call'](_0x3e31e9[_0x3cf453(0xbc)],_0x3cf453(0x8d))&&console['log'](_0x3cf453(0xc2)+CLI_BIN_NAME+_0x3cf453(0xc4)),Object[_0x3cf453(0x10f)]['hasOwnProperty'][_0x3cf453(0xad)](_0x3e31e9['globalConfig'],_0x3cf453(0x8d))&&console['log']('\x20\x20Repair\x20global:\x20\x20\x20'+CLI_BIN_NAME+_0x3cf453(0xea)));console[_0x3cf453(0x107)](),console[_0x3cf453(0x107)](a32_0x5c2e89[_0x3cf453(0xbf)]('\x20\x20Merged\x20Config')),console['log'](a32_0x5c2e89[_0x3cf453(0x105)](_0x3cf453(0x9e)['repeat'](0x1e))),console[_0x3cf453(0x107)](_0x3cf453(0xee)+(_0x3dcc25[_0x3cf453(0xda)]||a32_0x5c2e89['red'](_0x3cf453(0x8f)))),console[_0x3cf453(0x107)](_0x3cf453(0xf1)+(_0x5bdb12??a32_0x5c2e89[_0x3cf453(0x10d)](_0x3cf453(0x85)))),console[_0x3cf453(0x107)](_0x3cf453(0xca)+_0x3dcc25[_0x3cf453(0x10c)]),console[_0x3cf453(0x107)]('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0x3dcc25[_0x3cf453(0xd1)]||a32_0x5c2e89[_0x3cf453(0x105)](_0x3cf453(0x90)))),console[_0x3cf453(0x107)](_0x3cf453(0x99)+(_0x3dcc25[_0x3cf453(0xc9)]||a32_0x5c2e89[_0x3cf453(0x105)](_0x3cf453(0x90)))),console[_0x3cf453(0x107)](_0x3cf453(0x103)+(_0x3dcc25['format']||a32_0x5c2e89[_0x3cf453(0x105)](_0x3cf453(0x95)+DEFAULT_CONFIG_VALUES[_0x3cf453(0x110)]+')'))),console[_0x3cf453(0x107)](_0x3cf453(0xe8)+(_0x3dcc25[_0x3cf453(0xba)]??a32_0x5c2e89['gray'](_0x3cf453(0xcf)))),console['log'](_0x3cf453(0xdf)+_0x3dcc25[_0x3cf453(0xd6)]),console['log'](_0x3cf453(0xc3)+_0x3dcc25[_0x3cf453(0xac)]),console[_0x3cf453(0x107)](_0x3cf453(0xb2)+AUTH_MODE[_0x3cf453(0x9d)]);if(_0x3dcc25[_0x3cf453(0xf6)])console[_0x3cf453(0x107)](_0x3cf453(0xb5)+_0x3dcc25[_0x3cf453(0xf6)]);console[_0x3cf453(0x107)](_0x3cf453(0xf8)+(_0x3dcc25['accessKey']?a32_0x5c2e89[_0x3cf453(0xfd)]('(set,\x20length='+_0x3dcc25[_0x3cf453(0xa3)][_0x3cf453(0x104)]+')'):a32_0x5c2e89[_0x3cf453(0x105)](_0x3cf453(0x90)))),console[_0x3cf453(0x107)](),console['log'](a32_0x5c2e89[_0x3cf453(0xbf)](_0x3cf453(0xaf))),console['log'](a32_0x5c2e89[_0x3cf453(0x105)](_0x3cf453(0x9e)[_0x3cf453(0xf0)](0x1e)));_0x57500d||_0x8037c3?console[_0x3cf453(0x107)](_0x3cf453(0xf2)+a32_0x5c2e89[_0x3cf453(0x10d)](_0x3cf453(0xe0))):(console[_0x3cf453(0x107)](_0x3cf453(0x101)+getApiDomain()),console['log'](_0x3cf453(0x91)+getUserDomain()),console['log'](_0x3cf453(0xd0)+getRuntimeDomain()),console[_0x3cf453(0x107)](_0x3cf453(0xeb)+getSkillDomain()),console['log']('\x20\x20kbServiceDomain:\x20'+(getKbServiceDomain()??_0x3cf453(0xd9))));console[_0x3cf453(0x107)](),console['log'](a32_0x5c2e89['bold'](_0x3cf453(0x9f))),console[_0x3cf453(0x107)](a32_0x5c2e89[_0x3cf453(0x105)](_0x3cf453(0x9e)[_0x3cf453(0xf0)](0x1e)));const _0x4569f3=inspectServiceRegistry();console[_0x3cf453(0x107)](_0x3cf453(0xb9)+_0x4569f3['registryPath']),console[_0x3cf453(0x107)](_0x3cf453(0xf2)+formatServiceRegistryStatus(_0x4569f3)),console[_0x3cf453(0x107)](_0x3cf453(0xf7)+_0x4569f3['serviceCount']),console[_0x3cf453(0x107)](_0x3cf453(0xb4)+_0x4569f3[_0x3cf453(0x93)]);for(const _0x374001 of _0x4569f3[_0x3cf453(0xb1)]){console[_0x3cf453(0x107)]('\x20\x20'+(_0x374001[_0x3cf453(0xed)]+':')[_0x3cf453(0xa4)](0x11)+'\x20'+(_0x374001[_0x3cf453(0xff)]||a32_0x5c2e89[_0x3cf453(0x105)](_0x3cf453(0xe7)))+'\x20('+_0x374001['commandCount']+'\x20commands)'),console[_0x3cf453(0x107)]('\x20\x20'+''['padEnd'](0x11)+_0x3cf453(0xaa)+_0x374001[_0x3cf453(0xa7)][_0x3cf453(0x94)]);}return console[_0x3cf453(0x107)](),console[_0x3cf453(0x107)](a32_0x5c2e89[_0x3cf453(0xbf)](_0x3cf453(0x108))),console[_0x3cf453(0x107)](a32_0x5c2e89['gray']('\x20\x20─'[_0x3cf453(0xf0)](0x1e))),console['log'](_0x3cf453(0xcd)+a32_0x5c2e89['green'](AUTH_MODE[_0x3cf453(0x9d)]+_0x3cf453(0xa9))),console['log'](_0x3cf453(0xc1)+a32_0x5c2e89[_0x3cf453(0x105)](_0x3cf453(0xef))),console[_0x3cf453(0x107)](),{'ok':!![]};}function formatServiceRegistryStatus(_0x5db379){const _0x3fb80d=a32_0x5e50;if(_0x5db379[_0x3fb80d(0x96)]==='ok')return a32_0x5c2e89[_0x3fb80d(0xfd)](_0x3fb80d(0xe4));if(_0x5db379[_0x3fb80d(0x96)]===_0x3fb80d(0x9b))return a32_0x5c2e89[_0x3fb80d(0x105)](_0x3fb80d(0x10a));if(_0x5db379[_0x3fb80d(0x96)]===_0x3fb80d(0xa0))return a32_0x5c2e89[_0x3fb80d(0xd7)](_0x3fb80d(0x97));return a32_0x5c2e89['red'](_0x3fb80d(0x89)+(_0x5db379['message']?':\x20'+_0x5db379['message']:''));}export const doctorDefinition={'service':'doctor','command':a32_0x204b01(0x9c),'description':a32_0x204b01(0x109),'risk':a32_0x204b01(0xde),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
1
|
+
const a32_0x3f3da0=a32_0x50bd;(function(_0x1051d2,_0x3b095e){const _0x4c05e8=a32_0x50bd,_0x2d1a1e=_0x1051d2();while(!![]){try{const _0x5a1155=parseInt(_0x4c05e8(0x1e5))/0x1+-parseInt(_0x4c05e8(0x1f2))/0x2+-parseInt(_0x4c05e8(0x1b6))/0x3+-parseInt(_0x4c05e8(0x1b8))/0x4*(-parseInt(_0x4c05e8(0x1b1))/0x5)+parseInt(_0x4c05e8(0x191))/0x6+parseInt(_0x4c05e8(0x19f))/0x7*(-parseInt(_0x4c05e8(0x1e1))/0x8)+-parseInt(_0x4c05e8(0x1d9))/0x9;if(_0x5a1155===_0x3b095e)break;else _0x2d1a1e['push'](_0x2d1a1e['shift']());}catch(_0x4c7db2){_0x2d1a1e['push'](_0x2d1a1e['shift']());}}}(a32_0x177f,0xd169b));import a32_0x4db792 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';function a32_0x50bd(_0x4cc4d9,_0x211a68){_0x4cc4d9=_0x4cc4d9-0x179;const _0x177f61=a32_0x177f();let _0x50bd72=_0x177f61[_0x4cc4d9];return _0x50bd72;}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';function a32_0x177f(){const _0x233035=['\x20config','\x20\x20Installed\x20Path:\x20\x20','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','(no\x20file)','\x20\x20Config\x20Files','\x20\x20app\x20locale:\x20\x20\x20\x20\x20\x20','call','empty','includes','length','✗\x20Invalid','\x20doctor','check','project','1498329bXlsFH','⚠\x20Empty\x20(treated\x20as\x20{})','(missing)','arch','prototype','reason','current','green','24CEZoBr','doctor','\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20(accessKey)','1290722fPIdkR','bold','\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','routing','not\x20configured','services','✓\x20Loaded','✗\x20Invalid\x20JSON','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','red','\x20\x20runtimeDomain:\x20\x20\x20','appcode','repeat','2350092MUdjwn','\x20\x20Built-in\x20Skill','\x20config\x20delete\x20routing','\x20\x20AK\x20source:\x20\x20\x20\x20\x20\x20\x20','Global','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','commandCount','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Merged\x20Config','skillVersion','⚠\x20Empty','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','inherit','pageSize','state','(default)','Diagnose\x20CLI\x20configuration\x20and\x20environment','\x20\x20Package\x20Version:\x20','accessKey','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','format','locale','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','filter','verbose','(none)','region','serviceCode','Project','read','projectConfig','platform','\x20config\x20delete\x20routing\x20--global','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','ClientAk','3908646ykUMXY','\x20\x20Config\x20JSON','app','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','\x20\x20auth\x20(effective):\x20','(set,\x20length=','repairCommand','defaultApp','accessKeySource','name','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','gray','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','581378xKyoVK','source','\x20config\x20delete\x20inherit\x20--global','\x20\x20Repair\x20global:\x20\x20\x20\x20','\x20\x20Service\x20Tree','\x20config\x20init','str','globalConfig','installedPath','(not\x20found)','Unavailable\x20until\x20routing\x20configuration\x20is\x20repaired','yellow','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','riskLevel','(default:\x20','\x20\x20─','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','385ngqILb','\x20\x20region:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Auth','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','(unnamed)','2059578MPymCG','\x20Imported\x20from:\x20','61964qmdddW','join','path','\x20\x20Repair\x20global:\x20\x20\x20','global','\x20\x20API\x20Endpoints','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','✓\x20Valid\x20JSON','status','log','env','appCode','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','missing','serviceCount','message','hasOwnProperty','padEnd','\x20\x20Legacy\x20inherit:\x20\x20\x20'];a32_0x177f=function(){return _0x233035;};return a32_0x177f();}async function execute(_0x4f4ed2){const _0x550326=a32_0x50bd,_0x3d3d9a=getCliVersion(),_0x238a39=buildConfigFromFlags({'app':_0x4f4ed2[_0x550326(0x1a5)]?.(_0x550326(0x193)),'appcode':_0x4f4ed2[_0x550326(0x1a5)]?.(_0x550326(0x1f0)),'env':_0x4f4ed2[_0x550326(0x1a5)]?.(_0x550326(0x1c2))});let _0x68293c,_0x259ccb;try{_0x68293c=normalizeLovrabetRegion(_0x238a39['raw'][_0x550326(0x188)]);}catch(_0x450901){_0x259ccb=_0x450901 instanceof Error?_0x450901:new Error(String(_0x450901));}let _0x31d121;if(!_0x259ccb)try{await initGlobalEnvironment(_0x238a39);}catch(_0x565ae6){_0x31d121=_0x565ae6 instanceof Error?_0x565ae6:new Error(String(_0x565ae6));}console[_0x550326(0x1c1)](),console['log'](a32_0x4db792[_0x550326(0x1e6)](CLI_BIN_NAME+_0x550326(0x1d6))),console[_0x550326(0x1c1)](a32_0x4db792['gray']('─'[_0x550326(0x1f1)](0x32))),console['log']('\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20'+_0x3d3d9a),console[_0x550326(0x1c1)](_0x550326(0x1ab)+process['version']),console[_0x550326(0x1c1)](_0x550326(0x1f7)+process[_0x550326(0x18d)]+'\x20'+process[_0x550326(0x1dc)]);const _0x359c61=inspectBuiltinSkill();console['log'](),console['log'](a32_0x4db792['bold'](_0x550326(0x1f3))),console[_0x550326(0x1c1)](a32_0x4db792[_0x550326(0x19d)](_0x550326(0x1ae)[_0x550326(0x1f1)](0x1e))),console[_0x550326(0x1c1)](_0x550326(0x1e3)+(_0x359c61['state']===_0x550326(0x1df)?a32_0x4db792[_0x550326(0x1e0)]('✓\x20current'):a32_0x4db792[_0x550326(0x1ee)]('✗\x20'+_0x359c61[_0x550326(0x17c)]))),console['log'](_0x550326(0x17f)+_0x359c61['packageVersion']),console['log']('\x20\x20Skill\x20Version:\x20\x20\x20'+(_0x359c61[_0x550326(0x1fb)]||a32_0x4db792[_0x550326(0x19d)](_0x550326(0x1db)))),console[_0x550326(0x1c1)](_0x550326(0x1cc)+(_0x359c61[_0x550326(0x1a7)]||a32_0x4db792[_0x550326(0x19d)](_0x550326(0x1a8))));_0x359c61[_0x550326(0x17c)]!==_0x550326(0x1df)&&console[_0x550326(0x1c1)](_0x550326(0x1e7)+_0x359c61[_0x550326(0x197)]);_0x359c61[_0x550326(0x1de)]&&console[_0x550326(0x1c1)]('\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x359c61[_0x550326(0x1de)]);console[_0x550326(0x1c1)](),console['log'](a32_0x4db792[_0x550326(0x1e6)](_0x550326(0x1cf))),console[_0x550326(0x1c1)](a32_0x4db792[_0x550326(0x19d)](_0x550326(0x1ae)[_0x550326(0x1f1)](0x1e)));const _0x25593c=getGlobalConfigPath(),_0x3e49c4=getProjectConfigPath();console[_0x550326(0x1c1)](_0x550326(0x179)+(_0x25593c||a32_0x4db792['gray'](_0x550326(0x1a8)))),console[_0x550326(0x1c1)](_0x550326(0x1f9)+(_0x3e49c4||a32_0x4db792[_0x550326(0x19d)](_0x550326(0x1a8)))),console['log'](),console[_0x550326(0x1c1)](a32_0x4db792[_0x550326(0x1e6)](_0x550326(0x192))),console[_0x550326(0x1c1)](a32_0x4db792[_0x550326(0x19d)](_0x550326(0x1ae)[_0x550326(0x1f1)](0x1e)));const _0x21b5d7=(_0x2957a0,_0x5cf2e4)=>{const _0x222f91=_0x550326;if(!_0x5cf2e4){console[_0x222f91(0x1c1)]('\x20\x20'+_0x2957a0[_0x222f91(0x1c9)](0x11)+'\x20'+a32_0x4db792[_0x222f91(0x19d)](_0x222f91(0x1ce)));return;}const _0x1a63f6=inspectCliConfigJsonFile(_0x5cf2e4);if(_0x1a63f6[_0x222f91(0x1c0)]==='ok')console[_0x222f91(0x1c1)]('\x20\x20'+_0x2957a0[_0x222f91(0x1c9)](0x11)+'\x20'+a32_0x4db792['green'](_0x222f91(0x1bf)));else{if(_0x1a63f6[_0x222f91(0x1c0)]===_0x222f91(0x1d2))console[_0x222f91(0x1c1)]('\x20\x20'+_0x2957a0['padEnd'](0x11)+'\x20'+a32_0x4db792[_0x222f91(0x1aa)](_0x222f91(0x1da)));else _0x1a63f6[_0x222f91(0x1c0)]===_0x222f91(0x1c5)?console['log']('\x20\x20'+_0x2957a0[_0x222f91(0x1c9)](0x11)+'\x20'+a32_0x4db792['gray'](_0x222f91(0x1db))):(console[_0x222f91(0x1c1)]('\x20\x20'+_0x2957a0[_0x222f91(0x1c9)](0x11)+'\x20'+a32_0x4db792['red'](_0x222f91(0x1ec))),console[_0x222f91(0x1c1)]('\x20\x20'+''[_0x222f91(0x1c9)](0x11)+'\x20'+a32_0x4db792[_0x222f91(0x1ee)](_0x1a63f6['message'])));}};_0x21b5d7(_0x550326(0x1f6),_0x25593c),_0x21b5d7(_0x550326(0x18a),_0x3e49c4);const _0x2b239d=loadRawConfigLayers(),_0x16b02b=[Object['prototype'][_0x550326(0x1c8)][_0x550326(0x1d1)](_0x2b239d[_0x550326(0x1a6)],_0x550326(0x17a))?_0x550326(0x1bc):null,Object[_0x550326(0x1dd)]['hasOwnProperty']['call'](_0x2b239d[_0x550326(0x18c)],_0x550326(0x17a))?'project':null][_0x550326(0x185)](Boolean);_0x16b02b[_0x550326(0x1d4)]>0x0&&(console[_0x550326(0x1c1)](_0x550326(0x1ca)+a32_0x4db792['yellow']('ignored\x20in\x20'+_0x16b02b[_0x550326(0x1b9)]('\x20+\x20')+_0x550326(0x1cb))),_0x16b02b[_0x550326(0x1d3)](_0x550326(0x1d8))&&console[_0x550326(0x1c1)]('\x20\x20Repair\x20project:\x20\x20\x20'+CLI_BIN_NAME+'\x20config\x20delete\x20inherit'),_0x16b02b[_0x550326(0x1d3)](_0x550326(0x1bc))&&console[_0x550326(0x1c1)](_0x550326(0x1a2)+CLI_BIN_NAME+_0x550326(0x1a1)));_0x31d121&&(console[_0x550326(0x1c1)](),console[_0x550326(0x1c1)](a32_0x4db792[_0x550326(0x1e6)]('\x20\x20Routing\x20Configuration')),console[_0x550326(0x1c1)](a32_0x4db792[_0x550326(0x19d)](_0x550326(0x1ae)[_0x550326(0x1f1)](0x1e))),console[_0x550326(0x1c1)](_0x550326(0x19b)+a32_0x4db792['red'](_0x550326(0x1d5))),console[_0x550326(0x1c1)]('\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x31d121['message']),Object['prototype'][_0x550326(0x1c8)][_0x550326(0x1d1)](_0x2b239d['projectConfig'],_0x550326(0x1e8))&&console[_0x550326(0x1c1)]('\x20\x20Repair\x20project:\x20\x20'+CLI_BIN_NAME+_0x550326(0x1f4)),Object['prototype']['hasOwnProperty'][_0x550326(0x1d1)](_0x2b239d[_0x550326(0x1a6)],_0x550326(0x1e8))&&console['log'](_0x550326(0x1bb)+CLI_BIN_NAME+_0x550326(0x18e)));_0x259ccb&&(console[_0x550326(0x1c1)](),console['log'](a32_0x4db792['bold']('\x20\x20Country/Region\x20Configuration')),console[_0x550326(0x1c1)](a32_0x4db792[_0x550326(0x19d)]('\x20\x20─'[_0x550326(0x1f1)](0x1e))),console['log']('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a32_0x4db792[_0x550326(0x1ee)]('✗\x20Invalid')),console[_0x550326(0x1c1)]('\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x259ccb['message']),Object[_0x550326(0x1dd)][_0x550326(0x1c8)][_0x550326(0x1d1)](_0x2b239d['projectConfig'],_0x550326(0x188))&&console['log']('\x20\x20Repair\x20project:\x20\x20'+CLI_BIN_NAME+'\x20config\x20delete\x20region'),Object[_0x550326(0x1dd)]['hasOwnProperty'][_0x550326(0x1d1)](_0x2b239d[_0x550326(0x1a6)],_0x550326(0x188))&&console[_0x550326(0x1c1)]('\x20\x20Repair\x20global:\x20\x20\x20'+CLI_BIN_NAME+_0x550326(0x1a4)));console['log'](),console[_0x550326(0x1c1)](a32_0x4db792['bold'](_0x550326(0x1fa))),console[_0x550326(0x1c1)](a32_0x4db792[_0x550326(0x19d)](_0x550326(0x1ae)[_0x550326(0x1f1)](0x1e))),console['log'](_0x550326(0x1be)+(_0x238a39[_0x550326(0x1c3)]||a32_0x4db792[_0x550326(0x1ee)]('(not\x20set)'))),console['log'](_0x550326(0x1b2)+(_0x68293c??a32_0x4db792[_0x550326(0x1ee)]('(invalid)'))),console[_0x550326(0x1c1)](_0x550326(0x1d0)+_0x238a39[_0x550326(0x183)]),console[_0x550326(0x1c1)](_0x550326(0x1cd)+(_0x238a39[_0x550326(0x198)]||a32_0x4db792['gray'](_0x550326(0x187)))),console['log'](_0x550326(0x1ed)+(_0x238a39['currentApp']||a32_0x4db792['gray']('(none)'))),console[_0x550326(0x1c1)](_0x550326(0x1b0)+(_0x238a39['format']||a32_0x4db792['gray'](_0x550326(0x1ad)+DEFAULT_CONFIG_VALUES[_0x550326(0x182)]+')'))),console[_0x550326(0x1c1)](_0x550326(0x1b4)+(_0x238a39[_0x550326(0x17b)]??a32_0x4db792[_0x550326(0x19d)](_0x550326(0x17d)))),console[_0x550326(0x1c1)](_0x550326(0x1af)+_0x238a39[_0x550326(0x1ac)]),console[_0x550326(0x1c1)](_0x550326(0x181)+_0x238a39[_0x550326(0x186)]),console[_0x550326(0x1c1)](_0x550326(0x195)+AUTH_MODE[_0x550326(0x190)]);if(_0x238a39[_0x550326(0x199)])console[_0x550326(0x1c1)](_0x550326(0x1f5)+_0x238a39[_0x550326(0x199)]);console[_0x550326(0x1c1)](_0x550326(0x184)+(_0x238a39['accessKey']?a32_0x4db792['green'](_0x550326(0x196)+_0x238a39[_0x550326(0x180)][_0x550326(0x1d4)]+')'):a32_0x4db792[_0x550326(0x19d)]('(none)'))),console[_0x550326(0x1c1)](),console['log'](a32_0x4db792[_0x550326(0x1e6)](_0x550326(0x1bd))),console['log'](a32_0x4db792[_0x550326(0x19d)]('\x20\x20─'[_0x550326(0x1f1)](0x1e)));_0x31d121||_0x259ccb?console[_0x550326(0x1c1)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a32_0x4db792[_0x550326(0x1ee)](_0x550326(0x1a9))):(console['log'](_0x550326(0x194)+getApiDomain()),console[_0x550326(0x1c1)](_0x550326(0x19e)+getUserDomain()),console[_0x550326(0x1c1)](_0x550326(0x1ef)+getRuntimeDomain()),console['log']('\x20\x20skillDomain:\x20\x20\x20\x20\x20'+getSkillDomain()),console['log']('\x20\x20kbServiceDomain:\x20'+(getKbServiceDomain()??_0x550326(0x1e9))));console['log'](),console[_0x550326(0x1c1)](a32_0x4db792['bold'](_0x550326(0x1a3))),console[_0x550326(0x1c1)](a32_0x4db792[_0x550326(0x19d)](_0x550326(0x1ae)[_0x550326(0x1f1)](0x1e)));const _0x4b652b=inspectServiceRegistry();console[_0x550326(0x1c1)](_0x550326(0x19c)+_0x4b652b['registryPath']),console[_0x550326(0x1c1)](_0x550326(0x19b)+formatServiceRegistryStatus(_0x4b652b)),console[_0x550326(0x1c1)]('\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x4b652b[_0x550326(0x1c6)]),console[_0x550326(0x1c1)](_0x550326(0x18f)+_0x4b652b[_0x550326(0x1f8)]);for(const _0x405bf2 of _0x4b652b[_0x550326(0x1ea)]){console[_0x550326(0x1c1)]('\x20\x20'+(_0x405bf2[_0x550326(0x189)]+':')[_0x550326(0x1c9)](0x11)+'\x20'+(_0x405bf2[_0x550326(0x19a)]||a32_0x4db792['gray'](_0x550326(0x1b5)))+'\x20('+_0x405bf2[_0x550326(0x1f8)]+'\x20commands)'),console[_0x550326(0x1c1)]('\x20\x20'+''[_0x550326(0x1c9)](0x11)+_0x550326(0x1b7)+_0x405bf2[_0x550326(0x1a0)][_0x550326(0x1ba)]);}return console['log'](),console[_0x550326(0x1c1)](a32_0x4db792['bold'](_0x550326(0x1b3))),console[_0x550326(0x1c1)](a32_0x4db792['gray'](_0x550326(0x1ae)[_0x550326(0x1f1)](0x1e))),console[_0x550326(0x1c1)](_0x550326(0x1c4)+a32_0x4db792[_0x550326(0x1e0)](AUTH_MODE[_0x550326(0x190)]+_0x550326(0x1e4))),console[_0x550326(0x1c1)]('\x20\x20Session\x20check:\x20\x20\x20'+a32_0x4db792[_0x550326(0x19d)]('(removed\x20—\x20cookie\x20auth\x20disabled)')),console[_0x550326(0x1c1)](),{'ok':!![]};}function formatServiceRegistryStatus(_0x19be39){const _0x51d224=a32_0x50bd;if(_0x19be39[_0x51d224(0x1c0)]==='ok')return a32_0x4db792['green'](_0x51d224(0x1eb));if(_0x19be39['status']===_0x51d224(0x1c5))return a32_0x4db792[_0x51d224(0x19d)](_0x51d224(0x1a8));if(_0x19be39[_0x51d224(0x1c0)]==='empty')return a32_0x4db792[_0x51d224(0x1aa)](_0x51d224(0x1fc));return a32_0x4db792['red'](_0x51d224(0x1d5)+(_0x19be39['message']?':\x20'+_0x19be39[_0x51d224(0x1c7)]:''));}export const doctorDefinition={'service':a32_0x3f3da0(0x1e2),'command':a32_0x3f3da0(0x1d7),'description':a32_0x3f3da0(0x17e),'risk':a32_0x3f3da0(0x18b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a33_0x50baf7=a33_0x3a84;(function(_0x57433b,_0x18aa4e){const _0xf5965=a33_0x3a84,_0x2c1685=_0x57433b();while(!![]){try{const _0x5d092b=parseInt(_0xf5965(0x1ac))/0x1*(-parseInt(_0xf5965(0x1a6))/0x2)+parseInt(_0xf5965(0x193))/0x3+-parseInt(_0xf5965(0x1a9))/0x4+-parseInt(_0xf5965(0x19a))/0x5+-parseInt(_0xf5965(0x19d))/0x6+parseInt(_0xf5965(0x1a5))/0x7*(-parseInt(_0xf5965(0x199))/0x8)+-parseInt(_0xf5965(0x19b))/0x9*(-parseInt(_0xf5965(0x198))/0xa);if(_0x5d092b===_0x18aa4e)break;else _0x2c1685['push'](_0x2c1685['shift']());}catch(_0x5dc108){_0x2c1685['push'](_0x2c1685['shift']());}}}(a33_0x7976,0xcbc9c));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,uploadRuntimeFile}from'../../core/api-client.js';function a33_0x7976(){const _0x595ea1=['long-term','4335108iwSXdr','string','upload','2AkoMTQ','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','appCode','boolean','bool','str','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','File','build','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','filePath','POST','985680GjLitr','\x20to\x20runtime\x20app\x20','Preview:\x20upload\x20','filepath','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','510aXDEOa','67304ympnKI','1631515aWDffH','585207qeOXlw','description','1031412sNFaAP','body','read','validation','path','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','file','download','7RCvCxD','1219622ARfyxE','/client/uploadFile'];a33_0x7976=function(){return _0x595ea1;};return a33_0x7976();}import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a33_0x3a84(_0x53a621,_0x5551d5){_0x53a621=_0x53a621-0x188;const _0x7976f=a33_0x7976();let _0x3a8403=_0x7976f[_0x53a621];return _0x3a8403;}const FILE_FLAG={'name':a33_0x50baf7(0x1a3),'type':'string','required':!![],'description':'Path\x20to\x20the\x20local\x20file\x20to\x20upload'},FILEPATH_FLAG={'name':a33_0x50baf7(0x196),'type':a33_0x50baf7(0x1aa),'required':!![],'description':'Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data'},DOWNLOAD_FLAG={'name':a33_0x50baf7(0x1a4),'type':'boolean','description':a33_0x50baf7(0x190)},LONG_TERM_FLAG={'name':a33_0x50baf7(0x1a8),'type':a33_0x50baf7(0x18a),'description':a33_0x50baf7(0x188)};function requireFilePath(_0x543176){const _0x2d174c=a33_0x50baf7,_0x5aaf33=_0x543176['trim']();if(!_0x5aaf33)throw CliErrors[_0x2d174c(0x1a0)]('filePath\x20is\x20required.');return _0x5aaf33;}const fileUpload={'service':a33_0x50baf7(0x1a3),'command':a33_0x50baf7(0x1ab),'description':a33_0x50baf7(0x18d),'risk':a33_0x50baf7(0x19f),'flags':[FILE_FLAG],async 'dryRun'(_0x16f725){const _0x589acd=a33_0x50baf7,_0x2f58c6=requireRuntimeUploadFile(_0x16f725[_0x589acd(0x18c)](_0x589acd(0x1a3)),_0x589acd(0x18e));return dryRun(_0x589acd(0x192),_0x589acd(0x1a7))[_0x589acd(0x19e)]({'appCode':_0x16f725['appCode'],'multipart':{'file':_0x2f58c6}})[_0x589acd(0x19c)](_0x589acd(0x195)+_0x2f58c6[_0x589acd(0x1a1)]+_0x589acd(0x194)+_0x16f725[_0x589acd(0x189)])[_0x589acd(0x18f)]();},async 'execute'(_0x16a58c){const _0x8db9a2=a33_0x50baf7,_0x455716=requireRuntimeUploadFile(_0x16a58c['str'](_0x8db9a2(0x1a3)),_0x8db9a2(0x18e)),_0x4f7b41=await uploadRuntimeFile(_0x16a58c['appCode'],_0x455716[_0x8db9a2(0x1a1)]);return{'ok':!![],'data':_0x4f7b41,'message':_0x4f7b41['filePath']?'Uploaded\x20file:\x20'+_0x4f7b41[_0x8db9a2(0x191)]+_0x8db9a2(0x197):_0x8db9a2(0x1a2)};}},fileQueryUrl={'service':a33_0x50baf7(0x1a3),'command':'query-url','description':'Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','risk':a33_0x50baf7(0x19f),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x458b6a){const _0x4e43c4=a33_0x50baf7,_0x30aab8=requireFilePath(_0x458b6a[_0x4e43c4(0x18c)](_0x4e43c4(0x196))),_0x311557=await queryRuntimeFileUrl(_0x30aab8,{'download':_0x458b6a[_0x4e43c4(0x18b)](_0x4e43c4(0x1a4)),'longTerm':_0x458b6a[_0x4e43c4(0x18b)](_0x4e43c4(0x1a8))});return{'ok':!![],'data':_0x311557};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
|
package/lib/commands/init.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a34_0x20a16e=a34_0xe3bd;(function(_0x460289,_0x4e9e0b){const _0x301bf0=a34_0xe3bd,_0x1a31f0=_0x460289();while(!![]){try{const _0x8b449b=parseInt(_0x301bf0(0x1a6))/0x1+parseInt(_0x301bf0(0x1ba))/0x2+parseInt(_0x301bf0(0x19b))/0x3*(parseInt(_0x301bf0(0x1c6))/0x4)+-parseInt(_0x301bf0(0x1ac))/0x5+-parseInt(_0x301bf0(0x1b0))/0x6*(parseInt(_0x301bf0(0x1c0))/0x7)+parseInt(_0x301bf0(0x1a1))/0x8+-parseInt(_0x301bf0(0x19a))/0x9;if(_0x8b449b===_0x4e9e0b)break;else _0x1a31f0['push'](_0x1a31f0['shift']());}catch(_0x24200c){_0x1a31f0['push'](_0x1a31f0['shift']());}}}(a34_0x23f0,0x770a7));function a34_0x23f0(){const _0x3199cd=['1219158uodYSO','appcode','riskLevel','log','env','Override\x20imported\x20default\x20appcode','app','\x20\x20appcode:\x20','Override\x20imported\x20default\x20env','file','1424064PZIVZV','validation','\x20\x20config:\x20\x20','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','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`.','newConfigFileName','7IzgUQE','\x22.\x20Allowed:\x20','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','defaultApp','apps','Source\x20file\x20not\x20found:\x20','4aBSpjp','14267682TXcFhA','146202wwGpfX','Skip\x20confirmation\x20when\x20overwriting','message','join','Invalid\x20env\x20\x22','Write\x20to\x20global\x20(~/','7709008evbnWu','yes','object','utf8','entries','825974Vasewi',')\x20instead\x20of\x20project','boolean','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','cwd','string','1371420JRyFmG','global','includes','project'];a34_0x23f0=function(){return _0x3199cd;};return a34_0x23f0();}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';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':a34_0x20a16e(0x1b9),'type':a34_0x20a16e(0x1ab),'description':'Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','required':!![]},{'name':a34_0x20a16e(0x1b1),'type':a34_0x20a16e(0x1ab),'description':a34_0x20a16e(0x1b5)},{'name':a34_0x20a16e(0x1b4),'type':a34_0x20a16e(0x1ab),'description':a34_0x20a16e(0x1b8),'enum':[...RUNTIME_ENV_VALUES]},{'name':a34_0x20a16e(0x1ad),'type':a34_0x20a16e(0x1a8),'description':a34_0x20a16e(0x1a0)+PRODUCT_CONFIG[a34_0x20a16e(0x1bf)]+a34_0x20a16e(0x1a7),'default':![]},{'name':a34_0x20a16e(0x1a2),'type':a34_0x20a16e(0x1a8),'description':a34_0x20a16e(0x19c),'default':![]}];export async function runAppImport(_0x4a1687){const _0x4649f8=a34_0x20a16e,_0x2f5d95=_0x4a1687[_0x4649f8(0x1ad)]?'global':_0x4649f8(0x1af),_0x299ae2=resolveWriteConfigPath(_0x2f5d95);await runFromImport(_0x4a1687,_0x299ae2);}function a34_0xe3bd(_0x2b76e9,_0x5618cd){_0x2b76e9=_0x2b76e9-0x19a;const _0x23f09e=a34_0x23f0();let _0xe3bdfe=_0x23f09e[_0x2b76e9];return _0xe3bdfe;}async function runFromImport(_0xe23054,_0x1f8329){const _0x424b4b=a34_0x20a16e,_0x847bd9=resolveFilePath(_0xe23054[_0x424b4b(0x1b9)]);if(!existsSync(_0x847bd9))throw CliErrors[_0x424b4b(0x1bb)](_0x424b4b(0x1c5)+_0x847bd9);const _0x5aff54=readSourceFile(_0x847bd9),_0x897f72=convertToRuntimeConfig(_0x5aff54);_0xe23054[_0x424b4b(0x1b1)]&&(_0x897f72[_0x424b4b(0x1b1)]=String(_0xe23054[_0x424b4b(0x1b1)]));_0xe23054[_0x424b4b(0x1b4)]&&(_0x897f72['env']=resolveImportEnv(_0xe23054));if(!_0x897f72[_0x424b4b(0x1b1)])throw CliErrors[_0x424b4b(0x1bb)](_0x424b4b(0x1bd),_0x424b4b(0x1be));await writeImportConfig(_0x1f8329,_0x897f72,_0xe23054),console['log']('Imported\x20from\x20'+_0x847bd9),console[_0x424b4b(0x1b3)](_0x424b4b(0x1bc)+_0x1f8329),console[_0x424b4b(0x1b3)](_0x424b4b(0x1b7)+_0x897f72[_0x424b4b(0x1b1)]);if(_0x897f72[_0x424b4b(0x1c3)])console[_0x424b4b(0x1b3)]('\x20\x20default:\x20'+_0x897f72[_0x424b4b(0x1c3)]);}function convertToRuntimeConfig(_0x55ea99){const _0x53a5a5=a34_0x20a16e;if(_0x55ea99['apps']&&typeof _0x55ea99[_0x53a5a5(0x1c4)]===_0x53a5a5(0x1a3))throw CliErrors[_0x53a5a5(0x1bb)](_0x53a5a5(0x1c2),_0x53a5a5(0x1a9));const _0x23d376={};for(const _0x25dc18 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x55ea99[_0x25dc18]!==undefined&&(_0x23d376[_0x25dc18]=_0x55ea99[_0x25dc18]);}return!_0x23d376[_0x53a5a5(0x1b2)]&&(_0x23d376[_0x53a5a5(0x1b2)]=DEFAULT_CONFIG_VALUES[_0x53a5a5(0x1b2)]),_0x23d376;}async function writeImportConfig(_0x2a5635,_0x14803c,_0x5d572b){const _0x5f1a03=a34_0x20a16e;let _0x52b44={};existsSync(_0x2a5635)&&!_0x5d572b[_0x5f1a03(0x1a2)]&&(_0x52b44=readConfigFile(_0x2a5635));for(const [_0x145739,_0x87d379]of Object[_0x5f1a03(0x1a5)](_0x14803c)){_0x87d379!==undefined&&(_0x52b44[_0x145739]=_0x87d379);}if(_0x52b44[_0x5f1a03(0x1b6)])delete _0x52b44[_0x5f1a03(0x1b6)];writeConfigFile(_0x2a5635,_0x52b44);}function resolveFilePath(_0x4954e8){const _0x268402=a34_0x20a16e;return isAbsolute(_0x4954e8)?_0x4954e8:resolve(process[_0x268402(0x1aa)](),_0x4954e8);}function readSourceFile(_0x5cc18c){const _0x359967=a34_0x20a16e;try{const _0x353337=readFileSync(_0x5cc18c,{'encoding':_0x359967(0x1a4)});return JSON['parse'](_0x353337);}catch(_0x31e70d){throw CliErrors[_0x359967(0x1bb)]('Failed\x20to\x20parse\x20source\x20file:\x20'+_0x31e70d[_0x359967(0x19d)]);}}function resolveImportEnv(_0x6f8ffe){const _0xeb0a73=a34_0x20a16e,_0x611de2=_0x6f8ffe[_0xeb0a73(0x1b4)];if(_0x611de2===undefined||_0x611de2==='')return DEFAULT_CONFIG_VALUES['env'];if(!RUNTIME_ENV_VALUES[_0xeb0a73(0x1ae)](_0x611de2))throw CliErrors['validation'](_0xeb0a73(0x19f)+_0x611de2+_0xeb0a73(0x1c1)+RUNTIME_ENV_VALUES[_0xeb0a73(0x19e)](',\x20'));return _0x611de2;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a35_0x14c5(_0x5c5cfe,_0x4b6bbd){_0x5c5cfe=_0x5c5cfe-0x1cb;const _0x53f495=a35_0x53f4();let _0x14c59f=_0x53f495[_0x5c5cfe];return _0x14c59f;}(function(_0x208316,_0x4ee8f5){const _0x589e42=a35_0x14c5,_0x3e1caa=_0x208316();while(!![]){try{const _0x172f45=parseInt(_0x589e42(0x1d7))/0x1*(parseInt(_0x589e42(0x1da))/0x2)+parseInt(_0x589e42(0x1d8))/0x3*(-parseInt(_0x589e42(0x1cb))/0x4)+parseInt(_0x589e42(0x1cf))/0x5*(-parseInt(_0x589e42(0x1de))/0x6)+-parseInt(_0x589e42(0x1d6))/0x7+parseInt(_0x589e42(0x1ce))/0x8+parseInt(_0x589e42(0x1cc))/0x9+parseInt(_0x589e42(0x1d5))/0xa;if(_0x172f45===_0x4ee8f5)break;else _0x3e1caa['push'](_0x3e1caa['shift']());}catch(_0x96c92f){_0x3e1caa['push'](_0x3e1caa['shift']());}}}(a35_0x53f4,0x7e476));function a35_0x53f4(){const _0x335475=['tenantCode','13016080PzddvX','6026678niPgIo','109567xxThOH','636891xeDajW','email','10tZHlYv','mergedCli','nickName','appCode','12sxMSnR','12ikPkkf','6216984SjKldK','userName','3122064PiVbZA','2288485ENvvfN','production','name','loginName','envName'];a35_0x53f4=function(){return _0x335475;};return a35_0x53f4();}import{platform,release,arch}from'node:os';import{getLoginUserInfo}from'../../core/api-client.js';import{getCliVersion}from'../../utils/version.js';export async function getIssueReportContext(_0x289e66,_0x33efdf){const _0x3a54a6=a35_0x14c5,_0x296832=_0x33efdf?undefined:await getLoginUserInfo();return{'serviceName':'@lovrabet/lovrabet-cli','serviceVersion':getCliVersion(),'environment':_0x289e66[_0x3a54a6(0x1d3)]??_0x3a54a6(0x1d0),'appCode':_0x289e66[_0x3a54a6(0x1dd)]||_0x289e66[_0x3a54a6(0x1db)]?.['appCode'],'os':platform()+'\x20'+release()+'\x20'+arch(),'terminal':process.env.TERM,'user':_0x296832?{'id':String(_0x296832['id']??_0x296832['userId']??''),'username':_0x296832['username']??_0x296832[_0x3a54a6(0x1cd)]??_0x296832[_0x3a54a6(0x1d2)],'nickname':_0x296832['nickname']??_0x296832[_0x3a54a6(0x1dc)]??_0x296832[_0x3a54a6(0x1d1)]??undefined,'email':_0x296832[_0x3a54a6(0x1d9)]??undefined,'tenantCode':_0x296832[_0x3a54a6(0x1d4)]}:undefined};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3e88de,_0x16b484){const _0x19f2dc=a36_0x401e,_0xd8d28b=_0x3e88de();while(!![]){try{const _0x57c5c6=parseInt(_0x19f2dc(0x1d5))/0x1*(-parseInt(_0x19f2dc(0x1ce))/0x2)+-parseInt(_0x19f2dc(0x1cf))/0x3*(parseInt(_0x19f2dc(0x1d7))/0x4)+-parseInt(_0x19f2dc(0x1d3))/0x5+parseInt(_0x19f2dc(0x1d9))/0x6*(parseInt(_0x19f2dc(0x1d2))/0x7)+-parseInt(_0x19f2dc(0x1cd))/0x8*(-parseInt(_0x19f2dc(0x1d1))/0x9)+parseInt(_0x19f2dc(0x1d0))/0xa*(parseInt(_0x19f2dc(0x1d4))/0xb)+parseInt(_0x19f2dc(0x1d8))/0xc*(-parseInt(_0x19f2dc(0x1d6))/0xd);if(_0x57c5c6===_0x16b484)break;else _0xd8d28b['push'](_0xd8d28b['shift']());}catch(_0x3100d5){_0xd8d28b['push'](_0xd8d28b['shift']());}}}(a36_0x5069,0x7211d));function a36_0x5069(){const _0xdaaee3=['48102dmmnXh','2480jTBklg','2AuunRV','2127PbIOYY','37830Mrwuvd','24678REPgtD','812fbmwje','530125zlxKix','2090wndTQj','137729LtjCRI','156SWdjoB','1852wIgIWK','1459512kktuaQ'];a36_0x5069=function(){return _0xdaaee3;};return a36_0x5069();}function a36_0x401e(_0x591f4c,_0x33c6ca){_0x591f4c=_0x591f4c-0x1cd;const _0x506988=a36_0x5069();let _0x401e2d=_0x506988[_0x591f4c];return _0x401e2d;}import{issueReport}from'./report.js';export const issueDefinitions=[issueReport];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a37_0x202d5f=a37_0x4dd8;function a37_0x3900(){const _0x5d0141=['string','utf8','File\x20not\x20found:\x20','str','6365780TgSDsT','join','compress','apiError','Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.','Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.','message','redactions:\x20','Failed\x20to\x20submit\x20issue\x20log:\x20','trim','truncated','20191550LboeCx','192058NALmca','originalBytes','validation','spanName','redactionKinds','Issue\x20description\x20cannot\x20be\x20empty.','Submit\x20a\x20problem\x20log','Cannot\x20read\x20issue\x20description\x20file:\x20','30940diCmqe','Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)','keys','One-line\x20issue\x20summary','5159061nuooap','Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description','Submit\x20the\x20issue\x20description\x20and\x20diagnostic\x20context\x20as\x20a\x20problem\x20log.','file','descriptionFilePath','descriptionSource','redactionCount','cwd','Report\x20a\x20problem\x20log\x20with\x20title\x20and\x20markdown\x20context','sanitize','logData','descriptionSource:\x20','report','\x20bytes','8CwaKYj','2070168CAeXPp','15xgKYrd','4627045xGMDcv','Issue\x20log\x20submitted\x20(content\x20redacted\x20or\x20truncated)','title','1212wSSgjr','POST','filter','traceName','description','length'];a37_0x3900=function(){return _0x5d0141;};return a37_0x3900();}(function(_0x5e6585,_0x247591){const _0x16ec73=a37_0x4dd8,_0x2ce7b6=_0x5e6585();while(!![]){try{const _0x461b5e=parseInt(_0x16ec73(0x1b5))/0x1*(-parseInt(_0x16ec73(0x199))/0x2)+parseInt(_0x16ec73(0x1b4))/0x3+-parseInt(_0x16ec73(0x18d))/0x4+parseInt(_0x16ec73(0x180))/0x5+parseInt(_0x16ec73(0x183))/0x6*(parseInt(_0x16ec73(0x1a1))/0x7)+-parseInt(_0x16ec73(0x1b3))/0x8*(parseInt(_0x16ec73(0x1a5))/0x9)+parseInt(_0x16ec73(0x198))/0xa;if(_0x461b5e===_0x247591)break;else _0x2ce7b6['push'](_0x2ce7b6['shift']());}catch(_0x21a83b){_0x2ce7b6['push'](_0x2ce7b6['shift']());}}}(a37_0x3900,0xe12ef));import{existsSync}from'node:fs';import{readFile}from'node:fs/promises';import{resolve}from'node:path';function a37_0x4dd8(_0x36f332,_0x5756b4){_0x36f332=_0x36f332-0x180;const _0x390014=a37_0x3900();let _0x4dd8cf=_0x390014[_0x36f332];return _0x4dd8cf;}import{CliErrors}from'../../errors.js';import{reportIssue}from'@lovrabet/cli-framework';import{getIssueReportContext}from'./context.js';const DESCRIPTION_FILE_FLAG='description-file';export const issueReport={'service':'issue','command':a37_0x202d5f(0x1b1),'description':a37_0x202d5f(0x1ad),'risk':'read','confirmationDescription':a37_0x202d5f(0x1a7),'requiresAuth':!![],'requiresAppCode':![],'defaultOutputFormat':a37_0x202d5f(0x18f),'flags':[{'name':a37_0x202d5f(0x182),'type':'string','required':!![],'description':a37_0x202d5f(0x1a4)},{'name':a37_0x202d5f(0x187),'type':'string','description':a37_0x202d5f(0x1a2)},{'name':DESCRIPTION_FILE_FLAG,'type':a37_0x202d5f(0x189),'description':a37_0x202d5f(0x1a6)}],async 'validate'(_0x1b6111){const _0x576b38=a37_0x202d5f,_0x58c533=_0x1b6111[_0x576b38(0x18c)](_0x576b38(0x182))[_0x576b38(0x196)](),_0x187346=_0x1b6111[_0x576b38(0x18c)](_0x576b38(0x187))[_0x576b38(0x196)](),_0x47b293=_0x1b6111[_0x576b38(0x18c)](DESCRIPTION_FILE_FLAG)['trim']();if(!_0x58c533)throw CliErrors['flagMissing'](_0x576b38(0x182),'Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.');const _0x5ac879=_0x187346[_0x576b38(0x188)]>0x0,_0x188e34=_0x47b293[_0x576b38(0x188)]>0x0;if(_0x5ac879===_0x188e34)throw CliErrors[_0x576b38(0x19b)](_0x576b38(0x192),_0x576b38(0x191));if(_0x188e34){const _0x37a95e=resolve(process[_0x576b38(0x1ac)](),_0x47b293);if(!existsSync(_0x37a95e))throw CliErrors[_0x576b38(0x19b)](_0x576b38(0x18b)+_0x37a95e);}},async 'dryRun'(_0x4c6315){const _0x49f68c=a37_0x202d5f,_0x3b925e=await prepareIssueReport(_0x4c6315,!![]);return{'method':_0x49f68c(0x184),'url':'otel://'+_0x3b925e[_0x49f68c(0x186)]+'/'+_0x3b925e['spanName'],'body':{'traceName':_0x3b925e['traceName'],'spanName':_0x3b925e[_0x49f68c(0x19c)],'logData':_0x3b925e[_0x49f68c(0x1af)]},'description':[_0x49f68c(0x19f),_0x49f68c(0x1b0)+_0x3b925e['descriptionSource'],_0x3b925e[_0x49f68c(0x1a9)]?'descriptionFile:\x20'+_0x3b925e[_0x49f68c(0x1a9)]:null,_0x3b925e[_0x49f68c(0x1ae)][_0x49f68c(0x197)]?'truncated:\x20original\x20'+_0x3b925e[_0x49f68c(0x1ae)][_0x49f68c(0x19a)]+_0x49f68c(0x1b2):null,_0x3b925e[_0x49f68c(0x1ae)][_0x49f68c(0x1ab)]>0x0?_0x49f68c(0x194)+_0x3b925e[_0x49f68c(0x1ae)][_0x49f68c(0x1ab)]+'\x20('+_0x3b925e['sanitize'][_0x49f68c(0x19d)][_0x49f68c(0x18e)](',\x20')+')':null][_0x49f68c(0x185)](Boolean)[_0x49f68c(0x18e)]('\x0a')};},async 'execute'(_0xbc8132){const _0x397735=a37_0x202d5f,_0x21a17a=await prepareIssueReport(_0xbc8132,![]);return{'ok':!![],'message':_0x21a17a[_0x397735(0x1ae)][_0x397735(0x1ab)]||_0x21a17a[_0x397735(0x1ae)][_0x397735(0x197)]?_0x397735(0x181):'Issue\x20log\x20submitted','data':{'traceName':_0x21a17a['traceName'],'spanName':_0x21a17a['spanName'],'logDataKeys':Object[_0x397735(0x1a3)](_0x21a17a[_0x397735(0x1af)]),'issue':{'title':_0x21a17a[_0x397735(0x182)],'descriptionLength':_0x21a17a['description'][_0x397735(0x188)],'descriptionSource':_0x21a17a[_0x397735(0x1aa)],..._0x21a17a[_0x397735(0x1a9)]?{'descriptionFile':_0x21a17a[_0x397735(0x1a9)]}:{},'sanitize':{'originalBytes':_0x21a17a[_0x397735(0x1ae)][_0x397735(0x19a)],'truncated':_0x21a17a[_0x397735(0x1ae)][_0x397735(0x197)],'redactions':_0x21a17a['sanitize'][_0x397735(0x1ab)],'redactionKinds':_0x21a17a[_0x397735(0x1ae)][_0x397735(0x19d)]}}}};}};async function prepareIssueReport(_0x3219cf,_0x3819af){const _0x1b7943=a37_0x202d5f;await issueReport['validate'](_0x3219cf);const _0x386400=_0x3219cf[_0x1b7943(0x18c)](DESCRIPTION_FILE_FLAG)[_0x1b7943(0x196)](),_0x413daf=_0x386400?resolve(process['cwd'](),_0x386400):undefined;let _0x5af1c5=_0x3219cf['str'](_0x1b7943(0x187));if(_0x413daf)try{_0x5af1c5=await readFile(_0x413daf,_0x1b7943(0x18a));}catch{throw CliErrors[_0x1b7943(0x19b)](_0x1b7943(0x1a0)+_0x413daf);}if(!_0x5af1c5[_0x1b7943(0x196)]())throw CliErrors[_0x1b7943(0x19b)](_0x1b7943(0x19e));const _0x388d7b=await getIssueReportContext(_0x3219cf,_0x3819af);try{const _0x723348=await reportIssue({'title':_0x3219cf['str'](_0x1b7943(0x182)),'description':_0x5af1c5,'context':_0x388d7b,'dryRun':_0x3819af});return{..._0x723348,'descriptionSource':_0x413daf?_0x1b7943(0x1a8):'inline','descriptionFilePath':_0x413daf};}catch(_0x570a83){throw CliErrors[_0x1b7943(0x190)](_0x1b7943(0x195)+(_0x570a83 instanceof Error?_0x570a83[_0x1b7943(0x193)]:String(_0x570a83)),'Check\x20your\x20login\x20and\x20network\x20connectivity.');}}
|
package/lib/commands/kb/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a38_0xed29b0=a38_0x10fb;(function(_0x4bb9d2,_0x2b49e6){const _0x10977c=a38_0x10fb,_0x419070=_0x4bb9d2();while(!![]){try{const _0x31bcbb=-parseInt(_0x10977c(0x1fe))/0x1+parseInt(_0x10977c(0x21c))/0x2*(parseInt(_0x10977c(0x1e6))/0x3)+parseInt(_0x10977c(0x1db))/0x4*(parseInt(_0x10977c(0x1de))/0x5)+-parseInt(_0x10977c(0x1ed))/0x6+-parseInt(_0x10977c(0x211))/0x7*(-parseInt(_0x10977c(0x1e1))/0x8)+parseInt(_0x10977c(0x1e0))/0x9*(parseInt(_0x10977c(0x202))/0xa)+parseInt(_0x10977c(0x1f9))/0xb*(-parseInt(_0x10977c(0x203))/0xc);if(_0x31bcbb===_0x2b49e6)break;else _0x419070['push'](_0x419070['shift']());}catch(_0x4ce7f4){_0x419070['push'](_0x419070['shift']());}}}(a38_0x4886,0xe2053));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';import{getKbServiceDomain}from'../../constant/domain.js';function a38_0x4886(){const _0x5d3378=['method','bool','3060946pUsfbT','content','path','string','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','Created\x20KB\x20entry\x20','4616628KvTdev','query','number','5uLdrVq','createTime','954729vlNZUu','7824noTdrc','flag','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','topk','--topk\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.','3QTYsrm','File\x20not\x20found:\x20','map','Search\x20query\x20for\x20visible\x20public,\x20company,\x20and\x20personal\x20knowledge','Configure\x20kbServiceDomain\x20in\x20the\x20connection\x20settings,\x20or\x20pass\x20`--kb-service-url\x20<https-origin>`\x20for\x20this\x20request.','length','Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','6992448CVzpeY','Personal\x20knowledge-base\x20entry\x20ID','description','accessKey','verbose','userId','kb-service-url','file','isSafeInteger','appCode','dryRun','build','22yPzGFv','body','isFile','list','parse','206343BYyTXh','Search\x20visible\x20public,\x20company,\x20and\x20personal\x20knowledge','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','updateTime','120mFPqvF','10717404FVyQdf','Replaces\x20the\x20personal\x20knowledge-base\x20entry\x20body\x20with\x20local\x20file\x20content\x20and\x20triggers\x20retrieval\x20sync.','Updated\x20KB\x20entry\x20','signal','File\x20path\x20is\x20required.','ragErrorMessage','jsonBody','search','read','trim','scope','title','Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20','str','903gocVOm','validation','detail','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','write','Override\x20the\x20existing\x20entry\x20title','Search\x20query\x20is\x20required.','ragStatus','version'];a38_0x4886=function(){return _0x5d3378;};return a38_0x4886();}import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':a38_0xed29b0(0x20e),'type':a38_0xed29b0(0x1d8),'required':!![],'description':'Personal\x20knowledge-base\x20entry\x20title'},FILE_FLAG={'name':a38_0xed29b0(0x1f4),'type':a38_0xed29b0(0x1d8),'required':!![],'description':'Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file'},QUERY_FLAG={'name':'query','type':a38_0xed29b0(0x1d8),'required':!![],'description':a38_0xed29b0(0x1e9)},TOPK_FLAG={'name':'topk','type':a38_0xed29b0(0x1dd),'description':a38_0xed29b0(0x1d9)};function readKnowledgeFile(_0x249a6d){const _0x3f8436=a38_0xed29b0;if(!_0x249a6d)throw CliErrors['validation'](_0x3f8436(0x207));if(!existsSync(_0x249a6d))throw CliErrors[_0x3f8436(0x212)](_0x3f8436(0x1e7)+_0x249a6d);if(!statSync(_0x249a6d)[_0x3f8436(0x1fb)]())throw CliErrors[_0x3f8436(0x212)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x249a6d);return readFileSync(_0x249a6d,'utf8');}function summarizePersonalItem(_0x2c2ed8){const _0xc9234a=a38_0xed29b0;return{'id':_0x2c2ed8['id'],'title':_0x2c2ed8[_0xc9234a(0x20e)],'version':_0x2c2ed8[_0xc9234a(0x219)],'ragStatus':_0x2c2ed8['ragStatus'],'ragErrorMessage':_0x2c2ed8[_0xc9234a(0x208)],'updateTime':_0x2c2ed8[_0xc9234a(0x201)]};}function detailPersonalItem(_0x35675){const _0x45eb83=a38_0xed29b0;return{'id':_0x35675['id'],'appCode':_0x35675[_0x45eb83(0x1f6)],'scope':_0x35675[_0x45eb83(0x20d)],'userId':_0x35675[_0x45eb83(0x1f2)],'title':_0x35675[_0x45eb83(0x20e)],'content':_0x35675[_0x45eb83(0x21d)],'version':_0x35675[_0x45eb83(0x219)],'ragStatus':_0x35675[_0x45eb83(0x218)],'ragErrorMessage':_0x35675[_0x45eb83(0x208)],'createTime':_0x35675[_0x45eb83(0x1df)],'updateTime':_0x35675[_0x45eb83(0x201)]};}function readTopK(_0x2b8b80){const _0x11b3d2=a38_0xed29b0,_0x5c6e2d=_0x2b8b80[_0x11b3d2(0x1e2)]('topk');if(_0x5c6e2d===undefined||_0x5c6e2d===null||_0x5c6e2d==='')return undefined;const _0x2d8616=_0x2b8b80['num'](_0x11b3d2(0x1e4));if(!Number[_0x11b3d2(0x1f5)](_0x2d8616)||_0x2d8616<0x1||_0x2d8616>0x32)throw CliErrors[_0x11b3d2(0x212)](_0x11b3d2(0x1e5));return _0x2d8616;}function a38_0x10fb(_0xfaec96,_0x5bb6f2){_0xfaec96=_0xfaec96-0x1d8;const _0x4886cb=a38_0x4886();let _0x10fb92=_0x4886cb[_0xfaec96];return _0x10fb92;}const kbList={'service':'kb','command':a38_0xed29b0(0x1fc),'description':a38_0xed29b0(0x1e3),'risk':a38_0xed29b0(0x20b),'flags':[VERBOSE_FLAG],async 'execute'(_0x437704){const _0x5e9d39=a38_0xed29b0,_0xc1836d=await listPersonalKnowledgeBaseItems(_0x437704['appCode'],_0x437704[_0x5e9d39(0x206)]);if(_0x437704[_0x5e9d39(0x21b)](_0x5e9d39(0x1f1)))return{'ok':!![],'data':{'total':_0xc1836d[_0x5e9d39(0x1eb)],'items':_0xc1836d}};return{'ok':!![],'data':{'total':_0xc1836d[_0x5e9d39(0x1eb)],'items':_0xc1836d[_0x5e9d39(0x1e8)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a38_0xed29b0(0x213),'description':a38_0xed29b0(0x214),'risk':a38_0xed29b0(0x20b),'flags':[{...ID_FLAG,'type':a38_0xed29b0(0x1d8),'description':a38_0xed29b0(0x1ee)}],async 'execute'(_0x39350f){const _0x5d869c=a38_0xed29b0,_0x5e2d89=await getPersonalKnowledgeBaseItem(_0x39350f[_0x5d869c(0x210)]('id'),_0x39350f[_0x5d869c(0x1f6)],_0x39350f[_0x5d869c(0x206)]);return{'ok':!![],'data':detailPersonalItem(_0x5e2d89)};}},kbCreate={'service':'kb','command':'create','description':a38_0xed29b0(0x1ec),'risk':a38_0xed29b0(0x215),'confirmationDescription':'Saves\x20local\x20file\x20content\x20as\x20a\x20personal\x20knowledge-base\x20entry\x20and\x20starts\x20retrieval\x20sync.','flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x3ab590){const _0x3effab=a38_0xed29b0,_0x4f8783=_0x3ab590[_0x3effab(0x210)](_0x3effab(0x20e)),_0x490be4=readKnowledgeFile(_0x3ab590['str'](_0x3effab(0x1f4))),_0x563d10=await createPersonalKnowledgeBaseItem(_0x3ab590[_0x3effab(0x1f6)],{'title':_0x4f8783,'content':_0x490be4},_0x3ab590[_0x3effab(0x206)]);return{'ok':!![],'data':summarizePersonalItem(_0x563d10),'message':_0x3effab(0x1da)+_0x563d10['id']+'\x20('+_0x563d10['title']+')'};},async 'dryRun'(_0x41f9d3){const _0x447808=a38_0xed29b0,_0x3cfedb=_0x41f9d3[_0x447808(0x210)](_0x447808(0x20e)),_0x6bc0b6=readKnowledgeFile(_0x41f9d3[_0x447808(0x210)](_0x447808(0x1f4))),_0x184341=planPersonalKnowledgeWrite(_0x41f9d3['appCode'],{'title':_0x3cfedb,'content':_0x6bc0b6});return dryRun(_0x184341[_0x447808(0x21a)],_0x184341['path'])[_0x447808(0x1fa)](JSON[_0x447808(0x1fd)](_0x184341[_0x447808(0x209)]))['description'](_0x447808(0x200)+_0x3cfedb+'\x22')[_0x447808(0x1f8)]();}},kbUpdate={'service':'kb','command':'update','description':'Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','risk':a38_0xed29b0(0x215),'confirmationDescription':a38_0xed29b0(0x204),'flags':[{...ID_FLAG,'type':'string','description':a38_0xed29b0(0x1ee)},{...TITLE_FLAG,'required':![],'description':a38_0xed29b0(0x216)},FILE_FLAG],async 'execute'(_0x2a216d){const _0x2f4483=a38_0xed29b0,_0x2d9d5a=_0x2a216d[_0x2f4483(0x210)]('id'),_0x2f98b2=readKnowledgeFile(_0x2a216d[_0x2f4483(0x210)]('file')),_0x36398f=_0x2a216d['str']('title')||undefined,_0x4a459f=await updatePersonalKnowledgeBaseItem(_0x2d9d5a,_0x2a216d[_0x2f4483(0x1f6)],{'title':_0x36398f,'content':_0x2f98b2},_0x2a216d['signal']);return{'ok':!![],'data':summarizePersonalItem(_0x4a459f),'message':_0x2f4483(0x205)+_0x4a459f['id']+'\x20('+_0x4a459f[_0x2f4483(0x20e)]+')'};},async 'dryRun'(_0x471fbc){const _0xcf9c5d=a38_0xed29b0,_0x167fa2=_0x471fbc['str']('id'),_0x6c5f1a=readKnowledgeFile(_0x471fbc['str'](_0xcf9c5d(0x1f4))),_0x3b32c1=await getPersonalKnowledgeBaseItem(_0x167fa2,_0x471fbc['appCode'],_0x471fbc[_0xcf9c5d(0x206)]),_0x1a6d03=_0x471fbc[_0xcf9c5d(0x210)](_0xcf9c5d(0x20e))||_0x3b32c1[_0xcf9c5d(0x20e)],_0x29286a=planPersonalKnowledgeWrite(_0x471fbc[_0xcf9c5d(0x1f6)],{'title':_0x1a6d03,'content':_0x6c5f1a},_0x167fa2,_0x3b32c1[_0xcf9c5d(0x219)]);return dryRun(_0x29286a['method'],_0x29286a[_0xcf9c5d(0x21e)])[_0xcf9c5d(0x1fa)](JSON['parse'](_0x29286a[_0xcf9c5d(0x209)]))[_0xcf9c5d(0x1ef)](_0xcf9c5d(0x20f)+_0x167fa2)[_0xcf9c5d(0x1f8)]();}};function readSearchServiceUrl(_0x42ec70){const _0x45ea5a=a38_0xed29b0;if(_0x42ec70[_0x45ea5a(0x1e2)](_0x45ea5a(0x1f3))!==undefined)return normalizeKbServiceOrigin(_0x42ec70[_0x45ea5a(0x210)](_0x45ea5a(0x1f3)));const _0x24b277=getKbServiceDomain();if(!_0x24b277)throw CliErrors[_0x45ea5a(0x212)]('KB\x20Service\x20is\x20not\x20configured\x20for\x20knowledge\x20search.',_0x45ea5a(0x1ea));return normalizeKbServiceOrigin(_0x24b277);}const kbSearch={'service':'kb','command':a38_0xed29b0(0x20a),'description':a38_0xed29b0(0x1ff),'risk':a38_0xed29b0(0x20b),'flags':[QUERY_FLAG,TOPK_FLAG,{'name':a38_0xed29b0(0x1f3),'type':a38_0xed29b0(0x1d8),'required':![],'description':'Optional\x20trusted\x20KB\x20Service\x20HTTPS\x20origin\x20for\x20this\x20request\x20only'}],async 'validate'(_0x3b8b69){const _0xbd0390=a38_0xed29b0;if(!_0x3b8b69['str'](_0xbd0390(0x1dc))[_0xbd0390(0x20c)]())throw CliErrors[_0xbd0390(0x212)](_0xbd0390(0x217));readTopK(_0x3b8b69),readSearchServiceUrl(_0x3b8b69);},async 'execute'(_0x2c73e4){const _0x182656=a38_0xed29b0,_0x53d24d=_0x2c73e4[_0x182656(0x210)](_0x182656(0x1dc))[_0x182656(0x20c)](),_0x162977=readTopK(_0x2c73e4),_0x4a87c0=readSearchServiceUrl(_0x2c73e4),_0x98e753={'appCode':_0x2c73e4[_0x182656(0x1f6)],'accessKey':_0x2c73e4[_0x182656(0x1f0)]??'','query':_0x53d24d,..._0x162977!==undefined?{'topK':_0x162977}:{},'signal':_0x2c73e4[_0x182656(0x206)]},_0x39cee7=await searchDirectKnowledge({..._0x98e753,'serviceUrl':_0x4a87c0});return{'ok':!![],'data':_0x39cee7};}};function managementCommand(_0x5b473b){const _0x14bb1d=a38_0xed29b0;return{..._0x5b473b,'execute':_0x5af169=>withKbManagementOrigin(()=>_0x5b473b['execute'](_0x5af169)),..._0x5b473b[_0x14bb1d(0x1f7)]?{'dryRun':_0x22fd4f=>withKbManagementOrigin(()=>_0x5b473b[_0x14bb1d(0x1f7)](_0x22fd4f))}:{}};}export const kbDefinitions=[...[kbList,kbDetail,kbCreate,kbUpdate][a38_0xed29b0(0x1e8)](managementCommand),kbSearch];
|
|
1
|
+
const a38_0x4f7389=a38_0x1f56;(function(_0x14266a,_0x36ab15){const _0x3138e9=a38_0x1f56,_0x55185d=_0x14266a();while(!![]){try{const _0x597189=-parseInt(_0x3138e9(0x1f1))/0x1*(parseInt(_0x3138e9(0x201))/0x2)+parseInt(_0x3138e9(0x1cd))/0x3*(parseInt(_0x3138e9(0x200))/0x4)+parseInt(_0x3138e9(0x1ff))/0x5+parseInt(_0x3138e9(0x208))/0x6*(-parseInt(_0x3138e9(0x1fd))/0x7)+parseInt(_0x3138e9(0x202))/0x8*(-parseInt(_0x3138e9(0x1e1))/0x9)+parseInt(_0x3138e9(0x1ee))/0xa*(parseInt(_0x3138e9(0x1d6))/0xb)+-parseInt(_0x3138e9(0x1fe))/0xc;if(_0x597189===_0x36ab15)break;else _0x55185d['push'](_0x55185d['shift']());}catch(_0x62b08d){_0x55185d['push'](_0x55185d['shift']());}}}(a38_0x472d,0xd8af7));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 a38_0x472d(){const _0x1aad4a=['updateTime','method','ragStatus','createTime','number','map','Created\x20KB\x20entry\x20','length','file','Search\x20visible\x20public,\x20company,\x20and\x20personal\x20knowledge','836423aimxKS','19807836GpTGNB','5275350GNLZId','414028kdONLE','2620162jOhrcp','8WdZQLD','Configure\x20kbServiceDomain\x20in\x20the\x20connection\x20settings,\x20or\x20pass\x20`--kb-service-url\x20<https-origin>`\x20for\x20this\x20request.','build','title','write','dryRun','12aEpkOn','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','str','Search\x20query\x20for\x20visible\x20public,\x20company,\x20and\x20personal\x20knowledge','validation','Search\x20query\x20is\x20required.','Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20','create','jsonBody','--topk\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.','description','topk','Replaces\x20the\x20personal\x20knowledge-base\x20entry\x20body\x20with\x20local\x20file\x20content\x20and\x20triggers\x20retrieval\x20sync.','51szMFlS','version','Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','detail','flag','ragErrorMessage','Saves\x20local\x20file\x20content\x20as\x20a\x20personal\x20knowledge-base\x20entry\x20and\x20starts\x20retrieval\x20sync.','Updated\x20KB\x20entry\x20','3817BVAnIg','appCode','File\x20path\x20is\x20required.','isFile','isSafeInteger','content','File\x20not\x20found:\x20','bool','signal','body','KB\x20Service\x20is\x20not\x20configured\x20for\x20knowledge\x20search.','442413WTdfle','path','read','num','query','kb-service-url','update','utf8','Personal\x20knowledge-base\x20entry\x20ID','parse','list','string','Override\x20the\x20existing\x20entry\x20title','38090UqMpRu','accessKey','Optional\x20trusted\x20KB\x20Service\x20HTTPS\x20origin\x20for\x20this\x20request\x20only','1FxWSMK','trim'];a38_0x472d=function(){return _0x1aad4a;};return a38_0x472d();}import{getKbServiceDomain}from'../../constant/domain.js';import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':'title','type':a38_0x4f7389(0x1ec),'required':!![],'description':'Personal\x20knowledge-base\x20entry\x20title'},FILE_FLAG={'name':a38_0x4f7389(0x1fb),'type':a38_0x4f7389(0x1ec),'required':!![],'description':'Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file'},QUERY_FLAG={'name':a38_0x4f7389(0x1e5),'type':'string','required':!![],'description':a38_0x4f7389(0x20b)},TOPK_FLAG={'name':a38_0x4f7389(0x1cb),'type':a38_0x4f7389(0x1f7),'description':a38_0x4f7389(0x1d0)};function readKnowledgeFile(_0x3c479b){const _0x291f30=a38_0x4f7389;if(!_0x3c479b)throw CliErrors[_0x291f30(0x20c)](_0x291f30(0x1d8));if(!existsSync(_0x3c479b))throw CliErrors[_0x291f30(0x20c)](_0x291f30(0x1dc)+_0x3c479b);if(!statSync(_0x3c479b)[_0x291f30(0x1d9)]())throw CliErrors[_0x291f30(0x20c)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x3c479b);return readFileSync(_0x3c479b,_0x291f30(0x1e8));}function summarizePersonalItem(_0x4c99fd){const _0x53f073=a38_0x4f7389;return{'id':_0x4c99fd['id'],'title':_0x4c99fd[_0x53f073(0x205)],'version':_0x4c99fd[_0x53f073(0x1ce)],'ragStatus':_0x4c99fd[_0x53f073(0x1f5)],'ragErrorMessage':_0x4c99fd[_0x53f073(0x1d3)],'updateTime':_0x4c99fd[_0x53f073(0x1f3)]};}function detailPersonalItem(_0x48d589){const _0x960552=a38_0x4f7389;return{'id':_0x48d589['id'],'appCode':_0x48d589['appCode'],'scope':_0x48d589['scope'],'userId':_0x48d589['userId'],'title':_0x48d589['title'],'content':_0x48d589[_0x960552(0x1db)],'version':_0x48d589[_0x960552(0x1ce)],'ragStatus':_0x48d589[_0x960552(0x1f5)],'ragErrorMessage':_0x48d589[_0x960552(0x1d3)],'createTime':_0x48d589[_0x960552(0x1f6)],'updateTime':_0x48d589[_0x960552(0x1f3)]};}function readTopK(_0x1d3fa9){const _0x2cb182=a38_0x4f7389,_0x21c5c4=_0x1d3fa9[_0x2cb182(0x1d2)](_0x2cb182(0x1cb));if(_0x21c5c4===undefined||_0x21c5c4===null||_0x21c5c4==='')return undefined;const _0x3687b6=_0x1d3fa9[_0x2cb182(0x1e4)](_0x2cb182(0x1cb));if(!Number[_0x2cb182(0x1da)](_0x3687b6)||_0x3687b6<0x1||_0x3687b6>0x32)throw CliErrors[_0x2cb182(0x20c)](_0x2cb182(0x1c9));return _0x3687b6;}function a38_0x1f56(_0x41f086,_0x43a6f5){_0x41f086=_0x41f086-0x1c8;const _0x472d4c=a38_0x472d();let _0x1f5694=_0x472d4c[_0x41f086];return _0x1f5694;}const kbList={'service':'kb','command':a38_0x4f7389(0x1eb),'description':'List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','risk':'read','flags':[VERBOSE_FLAG],async 'execute'(_0x332b4c){const _0x4e04eb=a38_0x4f7389,_0x3ca4cf=await listPersonalKnowledgeBaseItems(_0x332b4c['appCode'],_0x332b4c[_0x4e04eb(0x1de)]);if(_0x332b4c[_0x4e04eb(0x1dd)]('verbose'))return{'ok':!![],'data':{'total':_0x3ca4cf[_0x4e04eb(0x1fa)],'items':_0x3ca4cf}};return{'ok':!![],'data':{'total':_0x3ca4cf['length'],'items':_0x3ca4cf['map'](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a38_0x4f7389(0x1d1),'description':a38_0x4f7389(0x209),'risk':a38_0x4f7389(0x1e3),'flags':[{...ID_FLAG,'type':a38_0x4f7389(0x1ec),'description':a38_0x4f7389(0x1e9)}],async 'execute'(_0x5c959a){const _0x35b593=a38_0x4f7389,_0x21bfd1=await getPersonalKnowledgeBaseItem(_0x5c959a[_0x35b593(0x20a)]('id'),_0x5c959a[_0x35b593(0x1d7)],_0x5c959a['signal']);return{'ok':!![],'data':detailPersonalItem(_0x21bfd1)};}},kbCreate={'service':'kb','command':a38_0x4f7389(0x20f),'description':a38_0x4f7389(0x1cf),'risk':a38_0x4f7389(0x206),'confirmationDescription':a38_0x4f7389(0x1d4),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x4def16){const _0x5bc657=a38_0x4f7389,_0x458b99=_0x4def16[_0x5bc657(0x20a)]('title'),_0x28b2f7=readKnowledgeFile(_0x4def16[_0x5bc657(0x20a)](_0x5bc657(0x1fb))),_0x448943=await createPersonalKnowledgeBaseItem(_0x4def16['appCode'],{'title':_0x458b99,'content':_0x28b2f7},_0x4def16['signal']);return{'ok':!![],'data':summarizePersonalItem(_0x448943),'message':_0x5bc657(0x1f9)+_0x448943['id']+'\x20('+_0x448943[_0x5bc657(0x205)]+')'};},async 'dryRun'(_0x5834c6){const _0x172732=a38_0x4f7389,_0x47400e=_0x5834c6[_0x172732(0x20a)]('title'),_0x2a9f62=readKnowledgeFile(_0x5834c6[_0x172732(0x20a)](_0x172732(0x1fb))),_0x5e3adf=planPersonalKnowledgeWrite(_0x5834c6[_0x172732(0x1d7)],{'title':_0x47400e,'content':_0x2a9f62});return dryRun(_0x5e3adf[_0x172732(0x1f4)],_0x5e3adf[_0x172732(0x1e2)])[_0x172732(0x1df)](JSON[_0x172732(0x1ea)](_0x5e3adf[_0x172732(0x1c8)]))[_0x172732(0x1ca)]('Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22'+_0x47400e+'\x22')[_0x172732(0x204)]();}},kbUpdate={'service':'kb','command':a38_0x4f7389(0x1e7),'description':'Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','risk':a38_0x4f7389(0x206),'confirmationDescription':a38_0x4f7389(0x1cc),'flags':[{...ID_FLAG,'type':a38_0x4f7389(0x1ec),'description':a38_0x4f7389(0x1e9)},{...TITLE_FLAG,'required':![],'description':a38_0x4f7389(0x1ed)},FILE_FLAG],async 'execute'(_0x5a69ce){const _0x8a2462=a38_0x4f7389,_0x25ccbe=_0x5a69ce[_0x8a2462(0x20a)]('id'),_0x421b75=readKnowledgeFile(_0x5a69ce[_0x8a2462(0x20a)]('file')),_0x3646a2=_0x5a69ce['str']('title')||undefined,_0x12b4ab=await updatePersonalKnowledgeBaseItem(_0x25ccbe,_0x5a69ce['appCode'],{'title':_0x3646a2,'content':_0x421b75},_0x5a69ce[_0x8a2462(0x1de)]);return{'ok':!![],'data':summarizePersonalItem(_0x12b4ab),'message':_0x8a2462(0x1d5)+_0x12b4ab['id']+'\x20('+_0x12b4ab[_0x8a2462(0x205)]+')'};},async 'dryRun'(_0x5b4d25){const _0x3f1fbc=a38_0x4f7389,_0x412dcf=_0x5b4d25['str']('id'),_0xce1ed3=readKnowledgeFile(_0x5b4d25[_0x3f1fbc(0x20a)](_0x3f1fbc(0x1fb))),_0x163783=await getPersonalKnowledgeBaseItem(_0x412dcf,_0x5b4d25[_0x3f1fbc(0x1d7)],_0x5b4d25['signal']),_0x4fec33=_0x5b4d25[_0x3f1fbc(0x20a)](_0x3f1fbc(0x205))||_0x163783['title'],_0x3c2110=planPersonalKnowledgeWrite(_0x5b4d25[_0x3f1fbc(0x1d7)],{'title':_0x4fec33,'content':_0xce1ed3},_0x412dcf,_0x163783[_0x3f1fbc(0x1ce)]);return dryRun(_0x3c2110[_0x3f1fbc(0x1f4)],_0x3c2110[_0x3f1fbc(0x1e2)])[_0x3f1fbc(0x1df)](JSON[_0x3f1fbc(0x1ea)](_0x3c2110[_0x3f1fbc(0x1c8)]))[_0x3f1fbc(0x1ca)](_0x3f1fbc(0x20e)+_0x412dcf)[_0x3f1fbc(0x204)]();}};function readSearchServiceUrl(_0x536199){const _0x17500e=a38_0x4f7389;if(_0x536199['flag']('kb-service-url')!==undefined)return normalizeKbServiceOrigin(_0x536199[_0x17500e(0x20a)]('kb-service-url'));const _0x1f646d=getKbServiceDomain();if(!_0x1f646d)throw CliErrors[_0x17500e(0x20c)](_0x17500e(0x1e0),_0x17500e(0x203));return normalizeKbServiceOrigin(_0x1f646d);}const kbSearch={'service':'kb','command':'search','description':a38_0x4f7389(0x1fc),'risk':a38_0x4f7389(0x1e3),'flags':[QUERY_FLAG,TOPK_FLAG,{'name':a38_0x4f7389(0x1e6),'type':a38_0x4f7389(0x1ec),'required':![],'description':a38_0x4f7389(0x1f0)}],async 'validate'(_0x3dafbe){const _0x2d315f=a38_0x4f7389;if(!_0x3dafbe[_0x2d315f(0x20a)](_0x2d315f(0x1e5))[_0x2d315f(0x1f2)]())throw CliErrors['validation'](_0x2d315f(0x20d));readTopK(_0x3dafbe),readSearchServiceUrl(_0x3dafbe);},async 'execute'(_0x5da80a){const _0x1fd3e2=a38_0x4f7389,_0x23d0d9=_0x5da80a[_0x1fd3e2(0x20a)](_0x1fd3e2(0x1e5))[_0x1fd3e2(0x1f2)](),_0x1ceeae=readTopK(_0x5da80a),_0x3dd9dc=readSearchServiceUrl(_0x5da80a),_0x3c57b1={'appCode':_0x5da80a[_0x1fd3e2(0x1d7)],'accessKey':_0x5da80a[_0x1fd3e2(0x1ef)]??'','query':_0x23d0d9,..._0x1ceeae!==undefined?{'topK':_0x1ceeae}:{},'signal':_0x5da80a['signal']},_0x5b89e3=await searchDirectKnowledge({..._0x3c57b1,'serviceUrl':_0x3dd9dc});return{'ok':!![],'data':_0x5b89e3};}};function managementCommand(_0x444bc4){const _0x787209=a38_0x4f7389;return{..._0x444bc4,'execute':_0x10eb7b=>withKbManagementOrigin(()=>_0x444bc4['execute'](_0x10eb7b)),..._0x444bc4[_0x787209(0x207)]?{'dryRun':_0x5e9ee6=>withKbManagementOrigin(()=>_0x444bc4['dryRun'](_0x5e9ee6))}:{}};}export const kbDefinitions=[...[kbList,kbDetail,kbCreate,kbUpdate][a38_0x4f7389(0x1f8)](managementCommand),kbSearch];
|