@lovrabet/lovrabet-cli 2.3.6 → 2.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -11
- 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/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.d.ts +6 -6
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/kb-management-client.d.ts +5 -3
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.d.ts +6 -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/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 +2 -2
- package/skills/lovrabet/references/lovrabet-kb-workflow.md +9 -5
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const a27_0x11b4db=a27_0x4e61;function a27_0x4e61(_0x1f8cf9,_0x1d0770){_0x1f8cf9=_0x1f8cf9-0x174;const _0x2d5e18=a27_0x2d5e();let _0x4e61ba=_0x2d5e18[_0x1f8cf9];return _0x4e61ba;}(function(_0x543fe2,_0x262f46){const _0x466bc5=a27_0x4e61,_0x3178a3=_0x543fe2();while(!![]){try{const _0x2f3742=parseInt(_0x466bc5(0x1d9))/0x1*(parseInt(_0x466bc5(0x1b2))/0x2)+-parseInt(_0x466bc5(0x1db))/0x3*(parseInt(_0x466bc5(0x1b4))/0x4)+-parseInt(_0x466bc5(0x187))/0x5+parseInt(_0x466bc5(0x181))/0x6*(parseInt(_0x466bc5(0x18a))/0x7)+-parseInt(_0x466bc5(0x19e))/0x8*(parseInt(_0x466bc5(0x1c3))/0x9)+-parseInt(_0x466bc5(0x176))/0xa*(-parseInt(_0x466bc5(0x1bd))/0xb)+-parseInt(_0x466bc5(0x186))/0xc;if(_0x2f3742===_0x262f46)break;else _0x3178a3['push'](_0x3178a3['shift']());}catch(_0x3af861){_0x3178a3['push'](_0x3178a3['shift']());}}}(a27_0x2d5e,0x57322));import{dataImportExcel}from'./import-excel.js';function a27_0x2d5e(){const _0x94d999=['str','\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\x20\x20\x20choose\x20the\x20capability\x20before\x20execution;\x20never\x20fall\x20back\x20at\x20runtime','74193cErDeu','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','240fzlMXf','paramsRequired','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\x20Record\x20each\x20batch\x20and\x20verify\x20its\x20IDs\x20or\x20unique\x20business\x20keys\x20before\x20continuing.','POST','aggregate','\x20\x20EXCEL\x20ROUTES','\x20\x20AGGREGATE\x20ALIAS\x20BOUNDARY','Create\x20multiple\x20records\x20in\x20the\x20dataset\x20in\x20one\x20request','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order;\x20may\x20reference\x20aggregate\x20output\x20aliases,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','\x20\x20\x20\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}}','\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}]','10iAmrqO','\x20\x20\x20\x20METADATA:\x20use\x20lovrabet\x20data\x20import-excel\x20with\x20checkpoint\x20recovery.','\x20\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','filter','\x20\x20WHERE\x20OPERATORS','\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}}','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','Get\x20a\x20single\x20record\x20by\x20ID','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20id\x20may\x20be\x20a\x20single\x20value\x20or\x20array.\x20','\x20\x20\x20\x20aggregate[].alias\x20defines\x20the\x20output\x20field\x20name\x20only','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','4264428bAnaGs','params','paramsHint','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','6297828MZVfGj','2995825eDzhOU','data\x20','\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.','7MKAyiX','\x20\x20\x20\x20aggregate\x20supports\x20a\x20single\x20DB_TABLE\x20dataset\x20only','delete','read','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','Create\x20one\x20record\x20in\x20the\x20dataset','helpExtra','\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}}]}','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','code','\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','now','Changes\x20an\x20existing\x20business\x20record\x20in\x20the\x20current\x20app\x20dataset.\x20The\x20new\x20values\x20are\x20saved\x20immediately\x20after\x20confirmation.','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','\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\x20No\x20import\x20checkpoint,\x20--resume,\x20automatic\x20upsert,\x20or\x20atomic\x20rollback\x20guarantee.','confirmationDescription','/api/{appCode}/','getOne','\x20\x20\x20\x20then\x20convert\x20rows\x20to\x20JSON\x20and\x20split\x20within\x20the\x20target\x20API\x20row/byte\x20and\x20local\x20argument\x20limits.','156232Qvidoo','batch','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','\x20\x20\x20\x20METADATA\x20datasets\x20do\x20not\x20support\x20aggregate\x20or\x20Custom\x20SQL','\x20\x20EXAMPLES','risk','Writes\x20multiple\x20new\x20business\x20records\x20to\x20the\x20current\x20app\x20dataset.\x20They\x20are\x20saved\x20immediately\x20after\x20confirmation.','operation','write','map','Writes\x20one\x20new\x20business\x20record\x20to\x20the\x20current\x20app\x20dataset.\x20It\x20is\x20saved\x20immediately\x20after\x20confirmation.','Filter\x20dataset\x20records\x20with\x20query\x20conditions','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','\x20\x20\x20\x20This\x20command\x20sends\x20one\x20prepared\x20batch;\x20it\x20does\x20not\x20read\x20XLSX\x20or\x20split\x20batches.','\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\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\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}','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','length','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','10LFSoCk','\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]}}','7768VMtfkf','\x20\x20\x20\x20$startWith\x20\x20\x20Starts\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$startWith\x22:\x22Mr.\x22}}','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','\x20\x20LOGICAL\x20COMBINATORS','\x20\x20\x20\x20DB_TABLE:\x20inspect\x20dataset\x20detail,\x20validate\x20the\x20full\x20file\x20and\x20confirmed\x20unique\x20business\x20keys,','command','build','\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}','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','6962021dFCPPL','\x20\x20\x20\x20$or\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Any\x20condition\x20matches\x20\x20{\x22$or\x22:[{\x22status\x22:{\x22$eq\x22:\x22active\x22}},{\x22status\x22:{\x22$eq\x22:\x22pending\x22}}]}','\x20\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}}','join','\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\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}}','36nkugvq','\x20\x20\x20\x20Stop\x20on\x20unknown\x20outcomes\x20or\x20conflicts;\x20reconcile\x20before\x20retrying,\x20never\x20blindly\x20resend\x20a\x20batch.','description','\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','Delete\x20data\x20records\x20(non-interactive\x20mode\x20requires\x20--yes)','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\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Average\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg_score\x22}','\x20\x20\x20\x20Page\x20numbers\x20start\x20at\x201.\x20To\x20fetch\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged','\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#\x20Sum\x20amount\x20grouped\x20by\x20status','\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\x20PARAMS\x20STRUCTURE','batchCreate','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','\x20\x20\x20\x20SUM\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Sum\x20of\x20column\x20values\x20\x20\x20\x20\x20{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}','\x20\x20\x20\x20select/where/having/groupBy\x20must\x20use\x20real\x20dataset\x20fields','update','body','Preview:\x20data\x20'];a27_0x2d5e=function(){return _0x94d999;};return a27_0x2d5e();}import{executeData}from'../../core/sdk-client.js';import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{requireAnyOf}from'../../commands/common/constraints.js';import{parseJsonParams,parseJsonParamsValue,parseBatchCreateItemsFromParams,parseUpdateIdsFromParams,normalizeUpdateParamsForRuntime}from'../../utils/params.js';import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':a27_0x11b4db(0x179),'operation':a27_0x11b4db(0x179),'risk':a27_0x11b4db(0x18d),'paramsRequired':![],'description':a27_0x11b4db(0x1a9),'paramsHint':a27_0x11b4db(0x1aa)+a27_0x11b4db(0x1af),'helpExtra':[a27_0x11b4db(0x17a),a27_0x11b4db(0x1d7),a27_0x11b4db(0x1c2),'\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}}',a27_0x11b4db(0x17b),a27_0x11b4db(0x1bf),a27_0x11b4db(0x174),a27_0x11b4db(0x1b3),a27_0x11b4db(0x1ad),a27_0x11b4db(0x1b5),'\x20\x20\x20\x20$endWith\x20\x20\x20\x20\x20Ends\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22email\x22:{\x22$endWith\x22:\x22@example.com\x22}}','',a27_0x11b4db(0x1b7),a27_0x11b4db(0x191),a27_0x11b4db(0x1be),'',a27_0x11b4db(0x184),a27_0x11b4db(0x1bc),a27_0x11b4db(0x1a0),a27_0x11b4db(0x175),a27_0x11b4db(0x18e),a27_0x11b4db(0x180),'','\x20\x20PAGINATION','\x20\x20\x20\x20Filtering\x20and\x20pagination\x20are\x20controlled\x20only\x20via\x20one\x20JSON\x20object\x20in\x20--params.',a27_0x11b4db(0x189),a27_0x11b4db(0x1ca),'\x20\x20\x20\x20and\x20increment\x20only\x20currentPage.\x20Use\x20a\x20stable\x20unique\x20orderBy\x20field\x20to\x20avoid\x20duplicates\x20or\x20gaps.',a27_0x11b4db(0x194),a27_0x11b4db(0x1c1),'\x20\x20\x20\x20Verify\x20the\x20response\x20paging.currentPage/pageSize\x20and\x20that\x20tableData\x20satisfies\x20where\x20before\x20drawing\x20conclusions.'][a27_0x11b4db(0x1c0)]('\x0a')},{'command':a27_0x11b4db(0x19c),'operation':a27_0x11b4db(0x19c),'risk':a27_0x11b4db(0x18d),'paramsRequired':!![],'description':a27_0x11b4db(0x17d),'paramsHint':a27_0x11b4db(0x17c)},{'command':'create','operation':'create','risk':a27_0x11b4db(0x1a6),'paramsRequired':!![],'description':a27_0x11b4db(0x18f),'confirmationDescription':a27_0x11b4db(0x1a8),'paramsHint':a27_0x11b4db(0x185)},{'command':a27_0x11b4db(0x1cf),'operation':a27_0x11b4db(0x1cf),'risk':a27_0x11b4db(0x1a6),'paramsRequired':!![],'description':a27_0x11b4db(0x1e3),'helpExtra':[a27_0x11b4db(0x1e1),a27_0x11b4db(0x177),a27_0x11b4db(0x1b8),a27_0x11b4db(0x19d),a27_0x11b4db(0x1ab),'\x20\x20\x20\x20--dry-run\x20previews\x20the\x20request\x20only;\x20it\x20does\x20not\x20validate\x20server\x20constraints\x20or\x20write\x20permissions.',a27_0x11b4db(0x1de),a27_0x11b4db(0x1c4),a27_0x11b4db(0x199),'\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_0x11b4db(0x1c0)]('\x0a'),'confirmationDescription':a27_0x11b4db(0x1a4),'paramsHint':a27_0x11b4db(0x1d0)},{'command':a27_0x11b4db(0x1d3),'operation':a27_0x11b4db(0x1d3),'risk':a27_0x11b4db(0x1a6),'paramsRequired':!![],'description':'Update\x20an\x20existing\x20data\x20record','confirmationDescription':a27_0x11b4db(0x196),'paramsHint':a27_0x11b4db(0x17e)+a27_0x11b4db(0x1dd)},{'command':a27_0x11b4db(0x18c),'operation':a27_0x11b4db(0x18c),'risk':'high-risk-write','paramsRequired':!![],'description':a27_0x11b4db(0x1c7),'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_0x11b4db(0x1e0),'operation':a27_0x11b4db(0x1e0),'risk':a27_0x11b4db(0x18d),'paramsRequired':![],'description':a27_0x11b4db(0x192),'paramsHint':a27_0x11b4db(0x197)+a27_0x11b4db(0x1c8),'helpExtra':['\x20\x20AGGREGATE\x20TYPES',a27_0x11b4db(0x1d1),'\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}',a27_0x11b4db(0x1cd),a27_0x11b4db(0x1c9),a27_0x11b4db(0x1ae),a27_0x11b4db(0x1bb),'\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}','',a27_0x11b4db(0x1ce),a27_0x11b4db(0x1ac),a27_0x11b4db(0x1b6),a27_0x11b4db(0x1b1),a27_0x11b4db(0x198),a27_0x11b4db(0x1cb),a27_0x11b4db(0x1e4),'',a27_0x11b4db(0x1e2),a27_0x11b4db(0x17f),a27_0x11b4db(0x1d2),'\x20\x20\x20\x20orderBy\x20may\x20reference\x20aggregate\x20output\x20aliases','','\x20\x20DATASET\x20BOUNDARY',a27_0x11b4db(0x18b),a27_0x11b4db(0x1a1),'\x20\x20\x20\x20JOIN\x20and\x20cross-table\x20aggregation\x20require\x20an\x20existing\x20trusted\x20Custom\x20SQL',a27_0x11b4db(0x1d8),'',a27_0x11b4db(0x1a2),a27_0x11b4db(0x1cc),a27_0x11b4db(0x1c6),'',a27_0x11b4db(0x1da),'\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','',a27_0x11b4db(0x178)][a27_0x11b4db(0x1c0)]('\x0a')}];function makeDataCommand(_0x33104e){const _0x5d1641=a27_0x11b4db,_0x57da0d=_0x5d1641(0x188)+_0x33104e[_0x5d1641(0x1b9)],_0x126ca6={'service':'data','command':_0x33104e[_0x5d1641(0x1b9)],'description':_0x33104e[_0x5d1641(0x1c5)],'risk':_0x33104e[_0x5d1641(0x1a3)],..._0x33104e[_0x5d1641(0x19a)]?{'confirmationDescription':_0x33104e['confirmationDescription']}:{},'helpExtra':_0x33104e[_0x5d1641(0x190)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x33104e[_0x5d1641(0x183)]}],'validate':async _0x2d6c78=>{const _0xd41320=_0x5d1641;_0x33104e[_0xd41320(0x1dc)]&&requireAnyOf(_0x2d6c78,['params'],_0x57da0d),_0x33104e[_0xd41320(0x1a5)]==='batchCreate'&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x2d6c78[_0xd41320(0x1d6)]('params'))),_0x33104e[_0xd41320(0x1a5)]===_0xd41320(0x1d3)&&parseUpdateIdsFromParams(parseJsonParams(_0x2d6c78[_0xd41320(0x1d6)](_0xd41320(0x182)))??{});},async 'execute'(_0x10d057){const _0x12031b=_0x5d1641,_0x35444e=_0x10d057[_0x12031b(0x1d6)]('code'),_0x5bf01a=_0x33104e['operation']===_0x12031b(0x1cf)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x10d057[_0x12031b(0x1d6)]('params'))):parseJsonParams(_0x10d057[_0x12031b(0x1d6)](_0x12031b(0x182)))??{},_0x43ba57=_0x33104e[_0x12031b(0x1a5)]==='update'?parseUpdateIdsFromParams(_0x5bf01a):undefined,_0x112710=_0x43ba57?normalizeUpdateParamsForRuntime(_0x5bf01a,_0x43ba57):_0x5bf01a,_0xf87719=Date[_0x12031b(0x195)](),_0x44adb0=await executeData(_0x35444e,_0x33104e['operation'],_0x112710),_0x48de15=Date['now']()-_0xf87719,_0x3bac6d=_0x43ba57&&_0x43ba57[_0x12031b(0x1b0)]>0x1?buildBatchUpdateResult(_0x43ba57,_0x44adb0):_0x44adb0;return{'ok':!![],'data':{'result':_0x3bac6d,'elapsed':_0x48de15},'message':_0x12031b(0x188)+_0x33104e['command']+'\x20completed\x20in\x20'+_0x48de15+'ms'};}};return _0x33104e['risk']!==_0x5d1641(0x18d)&&(_0x126ca6['dryRun']=async _0x530a12=>{const _0x4fc107=_0x5d1641,_0xad6203=_0x530a12['str'](_0x4fc107(0x193)),_0x2e40cd=_0x33104e[_0x4fc107(0x1a5)]==='batchCreate'?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x530a12[_0x4fc107(0x1d6)](_0x4fc107(0x182)))):parseJsonParams(_0x530a12[_0x4fc107(0x1d6)]('params'))??{};let _0x158585=_0x2e40cd;if(_0x33104e['operation']===_0x4fc107(0x1d3)){const _0x53a21b=parseUpdateIdsFromParams(_0x2e40cd);_0x158585=normalizeUpdateParamsForRuntime(_0x2e40cd,_0x53a21b);}return dryRun(_0x4fc107(0x1df),_0x4fc107(0x19b)+_0xad6203+'/'+_0x33104e[_0x4fc107(0x1a5)])[_0x4fc107(0x1d4)](_0x158585)[_0x4fc107(0x1c5)](_0x4fc107(0x1d5)+_0x33104e[_0x4fc107(0x1b9)]+'\x20on\x20dataset\x20'+_0xad6203)[_0x4fc107(0x1ba)]();}),_0x126ca6;}export const dataDefinitions=[...specs[a27_0x11b4db(0x1a7)](makeDataCommand),dataImportExcel];function buildBatchUpdateResult(_0x4144ed,_0x4c1918){const _0x484814=a27_0x11b4db;return{'operation':'update','mode':_0x484814(0x19f),'ids':_0x4144ed,'total':_0x4144ed['length'],'result':_0x4c1918};}
|
|
1
|
+
const a27_0x363c6b=a27_0x26fd;(function(_0x3fc040,_0x392c35){const _0x54b7d4=a27_0x26fd,_0x3f16e1=_0x3fc040();while(!![]){try{const _0x3b97ae=parseInt(_0x54b7d4(0x217))/0x1*(-parseInt(_0x54b7d4(0x251))/0x2)+parseInt(_0x54b7d4(0x1f5))/0x3*(-parseInt(_0x54b7d4(0x1f1))/0x4)+-parseInt(_0x54b7d4(0x231))/0x5*(-parseInt(_0x54b7d4(0x214))/0x6)+-parseInt(_0x54b7d4(0x238))/0x7+parseInt(_0x54b7d4(0x1ec))/0x8*(parseInt(_0x54b7d4(0x223))/0x9)+-parseInt(_0x54b7d4(0x224))/0xa*(-parseInt(_0x54b7d4(0x237))/0xb)+-parseInt(_0x54b7d4(0x245))/0xc*(parseInt(_0x54b7d4(0x249))/0xd);if(_0x3b97ae===_0x392c35)break;else _0x3f16e1['push'](_0x3f16e1['shift']());}catch(_0x1d502f){_0x3f16e1['push'](_0x3f16e1['shift']());}}}(a27_0x6a18,0x36be8));import{dataImportExcel}from'./import-excel.js';function a27_0x26fd(_0x1eca33,_0x3894e6){_0x1eca33=_0x1eca33-0x1e5;const _0x6a181f=a27_0x6a18();let _0x26fd47=_0x6a181f[_0x1eca33];return _0x26fd47;}function a27_0x6a18(){const _0x780ec0=['JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20id\x20may\x20be\x20a\x20single\x20value\x20or\x20array.\x20','\x20\x20\x20\x20$and\x20\x20\x20\x20\x20\x20\x20\x20\x20All\x20conditions\x20match\x20\x20\x20{\x22$and\x22:[{\x22age\x22:{\x22$gte\x22:18}},{\x22status\x22:{\x22$eq\x22:\x22active\x22}}]}','length','\x20\x20\x20\x20$gte\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20or\x20equal\x20\x20{\x22amount\x22:{\x22$gte\x22:100}}','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','getOne','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return\x20alongside\x20aggregates,\x20e.g.\x20[\x22status\x22,\x22region\x22]','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','Example:\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x20\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','\x20\x20\x20\x20$in\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Value\x20in\x20set\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22country\x22:{\x22$in\x22:[\x22CN\x22,\x22US\x22]}}','\x20\x20\x20\x20Record\x20each\x20batch\x20and\x20verify\x20its\x20IDs\x20or\x20unique\x20business\x20keys\x20before\x20continuing.','\x20completed\x20in\x20','data\x20','update','command','\x20\x20\x20\x20and\x20increment\x20only\x20currentPage.\x20Use\x20a\x20stable\x20unique\x20orderBy\x20field\x20to\x20avoid\x20duplicates\x20or\x20gaps.','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Rounded\x20average\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg\x22,\x22round\x22:true,\x22precision\x22:2}','high-risk-write','Update\x20an\x20existing\x20data\x20record','\x20\x20\x20\x20aggregate[].alias\x20defines\x20the\x20output\x20field\x20name\x20only','\x20\x20PAGINATION','Deletes\x20business\x20records\x20from\x20the\x20current\x20app\x20dataset.\x20This\x20may\x20not\x20be\x20recoverable.','join','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','\x20\x20\x20\x20$gt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$gt\x22:100}}','risk','6vSkREA','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Average\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg_score\x22}','\x20\x20\x20\x20$lte\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20or\x20equal\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lte\x22:1000}}','1pmIRMX','\x20\x20\x20\x20No\x20import\x20checkpoint,\x20--resume,\x20automatic\x20upsert,\x20or\x20atomic\x20rollback\x20guarantee.','description','\x20\x20DATASET\x20BOUNDARY','\x20\x20\x20\x20orderBy\x20may\x20reference\x20aggregate\x20output\x20aliases','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','str','code','/api/{appCode}/','Changes\x20an\x20existing\x20business\x20record\x20in\x20the\x20current\x20app\x20dataset.\x20The\x20new\x20values\x20are\x20saved\x20immediately\x20after\x20confirmation.','batchCreate','write','108hbIruD','50QgIZiF','\x20\x20\x20\x20$startWith\x20\x20\x20Starts\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$startWith\x22:\x22Mr.\x22}}','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','\x20\x20AGGREGATE\x20ALIAS\x20BOUNDARY','\x20\x20\x20\x20--dry-run\x20previews\x20the\x20request\x20only;\x20it\x20does\x20not\x20validate\x20server\x20constraints\x20or\x20write\x20permissions.','\x20\x20\x20\x20Verify\x20the\x20response\x20paging.currentPage/pageSize\x20and\x20that\x20tableData\x20satisfies\x20where\x20before\x20drawing\x20conclusions.','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','\x20\x20\x20\x20$ne\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Not\x20equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22status\x22:{\x22$ne\x22:\x22deleted\x22}}','\x20\x20\x20\x20DB_TABLE:\x20inspect\x20dataset\x20detail,\x20validate\x20the\x20full\x20file\x20and\x20confirmed\x20unique\x20business\x20keys,','\x20on\x20dataset\x20','now','\x20\x20\x20\x20Non-Excel\x20batchCreate\x20remains\x20available\x20for\x20METADATA\x20and\x20DB_TABLE.','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[\x22region\x22],\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}}}\x27','1823615KHUcic','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','delete','aggregate','confirmationDescription','\x20\x20\x20\x20having\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Post-aggregation\x20filters\x20using\x20real\x20dataset\x20fields,\x20e.g.\x20{\x22category_id\x22:{\x22$notNull\x22:true}}','832271qWxYdG','244090UbnAZE','\x20\x20\x20\x20choose\x20the\x20capability\x20before\x20execution;\x20never\x20fall\x20back\x20at\x20runtime','body','\x20\x20\x20\x20METADATA:\x20use\x20lovrabet\x20data\x20import-excel\x20with\x20checkpoint\x20recovery.','params','\x20\x20\x20\x20Page\x20numbers\x20start\x20at\x201.\x20To\x20fetch\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged','Create\x20multiple\x20records\x20in\x20the\x20dataset\x20in\x20one\x20request','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','\x20\x20\x20\x20select/where/having/groupBy\x20must\x20use\x20real\x20dataset\x20fields','read','helpExtra','Delete\x20data\x20records\x20(non-interactive\x20mode\x20requires\x20--yes)','create','8076372JixNkP','\x20\x20EXCEL\x20ROUTES','\x20\x20\x20\x20SUM\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Sum\x20of\x20column\x20values\x20\x20\x20\x20\x20{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order;\x20may\x20reference\x20aggregate\x20output\x20aliases,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','13wWobVI','dryRun','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','\x20\x20\x20\x20$contain\x20\x20\x20\x20\x20Substring\x20match\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$contain\x22:\x22test\x22}}','\x20\x20\x20\x20JOIN\x20and\x20cross-table\x20aggregation\x20require\x20an\x20existing\x20trusted\x20Custom\x20SQL','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','Examples:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27,\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22completed\x22}\x27','data','193772knlKdp','operation','build','\x20\x20\x20\x20then\x20convert\x20rows\x20to\x20JSON\x20and\x20split\x20within\x20the\x20target\x20API\x20row/byte\x20and\x20local\x20argument\x20limits.','\x20\x20\x20\x20MIN\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Minimum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MIN\x22,\x22alias\x22:\x22min_price\x22}','\x20\x20AGGREGATE\x20TYPES','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','\x20\x20\x20\x20Built-in\x20Skill\x20guide:\x20references/lovrabet-db-table-excel-import.md','198584gxytnl','filter','\x20\x20\x20\x20aggregate\x20supports\x20a\x20single\x20DB_TABLE\x20dataset\x20only','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]','\x20\x20\x20\x20This\x20command\x20sends\x20one\x20prepared\x20batch;\x20it\x20does\x20not\x20read\x20XLSX\x20or\x20split\x20batches.','20HWhhWu','\x20\x20\x20\x20Filtering\x20and\x20pagination\x20are\x20controlled\x20only\x20via\x20one\x20JSON\x20object\x20in\x20--params.','\x20\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','\x20\x20\x20\x20$lt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lt\x22:1000}}','7131FmLXAx','paramsHint','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','Create\x20one\x20record\x20in\x20the\x20dataset'];a27_0x6a18=function(){return _0x780ec0;};return a27_0x6a18();}import{executeData}from'../../core/sdk-client.js';import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{requireAnyOf}from'../../commands/common/constraints.js';import{parseJsonParams,parseJsonParamsValue,parseBatchCreateItemsFromParams,parseUpdateIdsFromParams,normalizeUpdateParamsForRuntime}from'../../utils/params.js';import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':a27_0x363c6b(0x1ed),'operation':a27_0x363c6b(0x1ed),'risk':'read','paramsRequired':![],'description':'Filter\x20dataset\x20records\x20with\x20query\x20conditions','paramsHint':a27_0x363c6b(0x23f)+a27_0x363c6b(0x201),'helpExtra':['\x20\x20WHERE\x20OPERATORS','\x20\x20\x20\x20$eq\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22age\x22:{\x22$eq\x22:18}}',a27_0x363c6b(0x22b),a27_0x363c6b(0x212),a27_0x363c6b(0x1fc),a27_0x363c6b(0x1f4),a27_0x363c6b(0x216),a27_0x363c6b(0x203),a27_0x363c6b(0x24c),a27_0x363c6b(0x225),'\x20\x20\x20\x20$endWith\x20\x20\x20\x20\x20Ends\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22email\x22:{\x22$endWith\x22:\x22@example.com\x22}}','','\x20\x20LOGICAL\x20COMBINATORS',a27_0x363c6b(0x1fa),'\x20\x20\x20\x20$or\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Any\x20condition\x20matches\x20\x20{\x22$or\x22:[{\x22status\x22:{\x22$eq\x22:\x22active\x22}},{\x22status\x22:{\x22$eq\x22:\x22pending\x22}}]}','','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)',a27_0x363c6b(0x1fd),a27_0x363c6b(0x24e),a27_0x363c6b(0x1ef),'\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)',a27_0x363c6b(0x232),'',a27_0x363c6b(0x20e),a27_0x363c6b(0x1f2),'\x20\x20\x20\x20Do\x20NOT\x20use\x20--where,\x20--select,\x20--order-by,\x20--current-page,\x20--page,\x20or\x20--page-size\x20as\x20CLI\x20flags.',a27_0x363c6b(0x23d),a27_0x363c6b(0x209),'\x20\x20\x20\x20Page\x201:\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','\x20\x20\x20\x20Page\x202:\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:2,\x22pageSize\x22:20}\x27',a27_0x363c6b(0x229)][a27_0x363c6b(0x210)]('\x0a')},{'command':a27_0x363c6b(0x1fe),'operation':a27_0x363c6b(0x1fe),'risk':a27_0x363c6b(0x241),'paramsRequired':!![],'description':'Get\x20a\x20single\x20record\x20by\x20ID','paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':a27_0x363c6b(0x244),'operation':'create','risk':a27_0x363c6b(0x222),'paramsRequired':!![],'description':a27_0x363c6b(0x1f8),'confirmationDescription':'Writes\x20one\x20new\x20business\x20record\x20to\x20the\x20current\x20app\x20dataset.\x20It\x20is\x20saved\x20immediately\x20after\x20confirmation.','paramsHint':a27_0x363c6b(0x22a)},{'command':a27_0x363c6b(0x221),'operation':a27_0x363c6b(0x221),'risk':a27_0x363c6b(0x222),'paramsRequired':!![],'description':a27_0x363c6b(0x23e),'helpExtra':[a27_0x363c6b(0x246),a27_0x363c6b(0x23b),a27_0x363c6b(0x22c),a27_0x363c6b(0x1e7),a27_0x363c6b(0x1f0),a27_0x363c6b(0x228),a27_0x363c6b(0x204),'\x20\x20\x20\x20Stop\x20on\x20unknown\x20outcomes\x20or\x20conflicts;\x20reconcile\x20before\x20retrying,\x20never\x20blindly\x20resend\x20a\x20batch.',a27_0x363c6b(0x218),a27_0x363c6b(0x1eb),a27_0x363c6b(0x22f)][a27_0x363c6b(0x210)]('\x0a'),'confirmationDescription':'Writes\x20multiple\x20new\x20business\x20records\x20to\x20the\x20current\x20app\x20dataset.\x20They\x20are\x20saved\x20immediately\x20after\x20confirmation.','paramsHint':a27_0x363c6b(0x1ea)},{'command':'update','operation':a27_0x363c6b(0x207),'risk':a27_0x363c6b(0x222),'paramsRequired':!![],'description':a27_0x363c6b(0x20c),'confirmationDescription':a27_0x363c6b(0x220),'paramsHint':a27_0x363c6b(0x1f9)+a27_0x363c6b(0x24f)},{'command':'delete','operation':a27_0x363c6b(0x233),'risk':a27_0x363c6b(0x20b),'paramsRequired':!![],'description':a27_0x363c6b(0x243),'confirmationDescription':a27_0x363c6b(0x20f),'paramsHint':a27_0x363c6b(0x1ff)},{'command':'aggregate','operation':a27_0x363c6b(0x234),'risk':a27_0x363c6b(0x241),'paramsRequired':![],'description':'Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','paramsHint':a27_0x363c6b(0x24b)+a27_0x363c6b(0x202),'helpExtra':[a27_0x363c6b(0x1e9),a27_0x363c6b(0x247),'\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20of\x20records\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20distinct\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22,\x22distinct\x22:true}',a27_0x363c6b(0x215),a27_0x363c6b(0x20a),'\x20\x20\x20\x20MAX\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Maximum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MAX\x22,\x22alias\x22:\x22max_price\x22}',a27_0x363c6b(0x1e8),'','\x20\x20PARAMS\x20STRUCTURE',a27_0x363c6b(0x200),a27_0x363c6b(0x226),a27_0x363c6b(0x21c),'\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]',a27_0x363c6b(0x236),a27_0x363c6b(0x248),'',a27_0x363c6b(0x227),a27_0x363c6b(0x20d),a27_0x363c6b(0x240),a27_0x363c6b(0x21b),'',a27_0x363c6b(0x21a),a27_0x363c6b(0x1ee),'\x20\x20\x20\x20METADATA\x20datasets\x20do\x20not\x20support\x20aggregate\x20or\x20Custom\x20SQL',a27_0x363c6b(0x24d),a27_0x363c6b(0x239),'','\x20\x20EXAMPLES',a27_0x363c6b(0x211),'\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','',a27_0x363c6b(0x1f7),a27_0x363c6b(0x230),'',a27_0x363c6b(0x1f3)][a27_0x363c6b(0x210)]('\x0a')}];function makeDataCommand(_0x802889){const _0x549d3c=a27_0x363c6b,_0x4655fa=_0x549d3c(0x206)+_0x802889[_0x549d3c(0x208)],_0x21e9cf={'service':_0x549d3c(0x250),'command':_0x802889['command'],'description':_0x802889[_0x549d3c(0x219)],'risk':_0x802889[_0x549d3c(0x213)],..._0x802889[_0x549d3c(0x235)]?{'confirmationDescription':_0x802889['confirmationDescription']}:{},'helpExtra':_0x802889[_0x549d3c(0x242)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x802889[_0x549d3c(0x1f6)]}],'validate':async _0x241e5a=>{const _0x35cafd=_0x549d3c;_0x802889['paramsRequired']&&requireAnyOf(_0x241e5a,['params'],_0x4655fa),_0x802889[_0x35cafd(0x1e5)]===_0x35cafd(0x221)&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x241e5a['str'](_0x35cafd(0x23c)))),_0x802889[_0x35cafd(0x1e5)]==='update'&&parseUpdateIdsFromParams(parseJsonParams(_0x241e5a['str'](_0x35cafd(0x23c)))??{});},async 'execute'(_0x22f693){const _0x4db81e=_0x549d3c,_0x3341ad=_0x22f693['str'](_0x4db81e(0x21e)),_0xe1e59d=_0x802889['operation']===_0x4db81e(0x221)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x22f693[_0x4db81e(0x21d)](_0x4db81e(0x23c)))):parseJsonParams(_0x22f693[_0x4db81e(0x21d)]('params'))??{},_0x1a6c01=_0x802889[_0x4db81e(0x1e5)]===_0x4db81e(0x207)?parseUpdateIdsFromParams(_0xe1e59d):undefined,_0x4ef14c=_0x1a6c01?normalizeUpdateParamsForRuntime(_0xe1e59d,_0x1a6c01):_0xe1e59d,_0x1c2906=Date[_0x4db81e(0x22e)](),_0x239120=await executeData(_0x3341ad,_0x802889[_0x4db81e(0x1e5)],_0x4ef14c),_0x1275c4=Date['now']()-_0x1c2906,_0x2f79e6=_0x1a6c01&&_0x1a6c01[_0x4db81e(0x1fb)]>0x1?buildBatchUpdateResult(_0x1a6c01,_0x239120):_0x239120;return{'ok':!![],'data':{'result':_0x2f79e6,'elapsed':_0x1275c4},'message':_0x4db81e(0x206)+_0x802889[_0x4db81e(0x208)]+_0x4db81e(0x205)+_0x1275c4+'ms'};}};return _0x802889['risk']!==_0x549d3c(0x241)&&(_0x21e9cf[_0x549d3c(0x24a)]=async _0x4bde40=>{const _0x332324=_0x549d3c,_0x18c2d8=_0x4bde40['str'](_0x332324(0x21e)),_0x204094=_0x802889[_0x332324(0x1e5)]===_0x332324(0x221)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x4bde40[_0x332324(0x21d)](_0x332324(0x23c)))):parseJsonParams(_0x4bde40[_0x332324(0x21d)]('params'))??{};let _0xa97971=_0x204094;if(_0x802889[_0x332324(0x1e5)]===_0x332324(0x207)){const _0x291518=parseUpdateIdsFromParams(_0x204094);_0xa97971=normalizeUpdateParamsForRuntime(_0x204094,_0x291518);}return dryRun('POST',_0x332324(0x21f)+_0x18c2d8+'/'+_0x802889['operation'])[_0x332324(0x23a)](_0xa97971)['description']('Preview:\x20data\x20'+_0x802889[_0x332324(0x208)]+_0x332324(0x22d)+_0x18c2d8)[_0x332324(0x1e6)]();}),_0x21e9cf;}export const dataDefinitions=[...specs['map'](makeDataCommand),dataImportExcel];function buildBatchUpdateResult(_0x37e11d,_0x2ff330){const _0x40ccd1=a27_0x363c6b;return{'operation':_0x40ccd1(0x207),'mode':'batch','ids':_0x37e11d,'total':_0x37e11d[_0x40ccd1(0x1fb)],'result':_0x2ff330};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a28_0x50c098=a28_0x2987;(function(_0x31fd9d,_0x4e0aaf){const _0x47f0fd=a28_0x2987,_0x5c397d=_0x31fd9d();while(!![]){try{const _0x52dc25=-parseInt(_0x47f0fd(0x105))/0x1*(parseInt(_0x47f0fd(0x11a))/0x2)+-parseInt(_0x47f0fd(0x135))/0x3+-parseInt(_0x47f0fd(0x131))/0x4+parseInt(_0x47f0fd(0x111))/0x5+-parseInt(_0x47f0fd(0x13a))/0x6*(parseInt(_0x47f0fd(0x12f))/0x7)+-parseInt(_0x47f0fd(0xfb))/0x8+-parseInt(_0x47f0fd(0x112))/0x9*(-parseInt(_0x47f0fd(0xff))/0xa);if(_0x52dc25===_0x4e0aaf)break;else _0x5c397d['push'](_0x5c397d['shift']());}catch(_0x56a320){_0x5c397d['push'](_0x5c397d['shift']());}}}(a28_0x5da6,0xde81a));import{getDatasetDetail,listDatasets}from'../../core/api-client.js';function a28_0x5da6(){const _0x2d6a3d=['displayName','modifierNameField','method','isArray','deleted','requestBody','sourceType','type','split','str','createTimeField','dataType','columnCodeListWithDeleted','beforeScriptId','trim','dbName','required','relatedPageInfoList','string','name','216055CcdAAt','path','1890076boQfkJ','allFieldNames','responseFields','operations','4532292XieaAh','pkField','modelId','doType','extend','258RCpsUu','dbType','formatRules','push','validateRules','options','properties','appCode','source','dbtableConfig','tableName','12121248KBuNJo','object','creatorIdField','find','900TiUDIS','modifierIdField','afterScriptId','doVersion','responseBody','allFields','412449LIdrod','host','tableComment','code','creatorNameField','detail','labelField','description','parse','dataset','length','dblinkInfoDTO','4596840PvZdQZ','564255qeiqBv','dbId','indexes','filter','title','map','requestFields','datasetKey','4wPlPVz'];a28_0x5da6=function(){return _0x2d6a3d;};return a28_0x5da6();}import{CODE_FLAG}from'../../commands/common/flags.js';function normalizeField(_0x3136de){const _0x11e55e=a28_0x2987;if(_0x3136de[_0x11e55e(0x11f)])return null;const _0x3c2f51=Boolean(_0x3136de[_0x11e55e(0x11b)]!==undefined||_0x3136de[_0x11e55e(0x138)]!==undefined);let _0x11f562={};if(!_0x3c2f51&&typeof _0x3136de[_0x11e55e(0x139)]==='string')try{_0x11f562=JSON[_0x11e55e(0x10d)](_0x3136de[_0x11e55e(0x139)]);}catch{}const _0x147a16=_0x3c2f51?_0x3136de[_0x11e55e(0x12e)]:_0x3136de[_0x11e55e(0x108)],_0x482a3f=_0x3c2f51?_0x3136de['displayName']:_0x3136de[_0x11e55e(0x12e)],_0x418c75=_0x3c2f51?_0x3136de[_0x11e55e(0x138)]:_0x3136de[_0x11e55e(0x122)]||_0x3136de[_0x11e55e(0x126)],_0x2921e2=_0x3c2f51?_0x3136de[_0x11e55e(0x136)]===!![]:_0x11f562[_0x11e55e(0x136)]===!![],_0x311039=_0x3c2f51?_0x3136de[_0x11e55e(0x12b)]===!![]:_0x11f562[_0x11e55e(0x12b)]===!![],_0xe2848b=_0x3c2f51?_0x3136de[_0x11e55e(0xf5)]??null:_0x11f562[_0x11e55e(0xf5)]??null,_0x37a794={'name':_0x147a16,'displayName':_0x482a3f||_0x147a16,'type':_0x418c75,'dbType':_0x3136de[_0x11e55e(0x13b)],'pk':_0x2921e2,'required':_0x311039,'description':_0x3136de[_0x11e55e(0x10c)]||undefined};return Array[_0x11e55e(0x11e)](_0xe2848b)&&_0xe2848b[_0x11e55e(0x10f)]>0x0&&(_0x37a794[_0x11e55e(0xf5)]=_0xe2848b),_0x37a794;}function a28_0x2987(_0x3a40f6,_0x32a568){_0x3a40f6=_0x3a40f6-0xf5;const _0x5da64a=a28_0x5da6();let _0x298701=_0x5da64a[_0x3a40f6];return _0x298701;}function parseJsonMaybe(_0x4d5458){const _0x301912=a28_0x2987;if(typeof _0x4d5458!==_0x301912(0x12d))return _0x4d5458;try{return JSON[_0x301912(0x10d)](_0x4d5458);}catch{return _0x4d5458;}}function normalizeOperationEntry(_0xc6c319,_0x14338d){const _0xfe8fad=a28_0x2987;if(!_0x14338d||typeof _0x14338d!=='object')return null;if(!_0x14338d[_0xfe8fad(0x11d)]||!_0x14338d[_0xfe8fad(0x130)])return null;const _0x18952={'name':_0xc6c319,'method':_0x14338d[_0xfe8fad(0x11d)],'path':_0x14338d[_0xfe8fad(0x130)]};if(_0x14338d[_0xfe8fad(0x106)])_0x18952[_0xfe8fad(0x106)]=_0x14338d[_0xfe8fad(0x106)];if(_0x14338d[_0xfe8fad(0x120)]!=null)_0x18952[_0xfe8fad(0x120)]=parseJsonMaybe(_0x14338d[_0xfe8fad(0x120)]);if(_0x14338d[_0xfe8fad(0x103)]!=null)_0x18952['responseBody']=parseJsonMaybe(_0x14338d[_0xfe8fad(0x103)]);if(_0x14338d[_0xfe8fad(0x128)]!=null)_0x18952['beforeScriptId']=_0x14338d['beforeScriptId'];if(_0x14338d[_0xfe8fad(0x101)]!=null)_0x18952['afterScriptId']=_0x14338d[_0xfe8fad(0x101)];if(Array[_0xfe8fad(0x11e)](_0x14338d[_0xfe8fad(0x118)]))_0x18952['requestFields']=_0x14338d[_0xfe8fad(0x118)];if(Array['isArray'](_0x14338d[_0xfe8fad(0x133)]))_0x18952[_0xfe8fad(0x133)]=_0x14338d[_0xfe8fad(0x133)];return _0x18952;}function summarizeDbtable(_0x1b8830){const _0x421cd4=a28_0x2987,_0x328960={},_0x24b0c3=['dbId',_0x421cd4(0x12a),_0x421cd4(0xfa),'datasetKey',_0x421cd4(0x136),_0x421cd4(0x104),'logicField',_0x421cd4(0x125),'updateTimeField',_0x421cd4(0xfd),_0x421cd4(0x109),_0x421cd4(0x100),_0x421cd4(0x11c),_0x421cd4(0x10b),_0x421cd4(0x110)];for(const _0x5a5ac9 of _0x24b0c3){if(_0x1b8830[_0x5a5ac9]!==undefined)_0x328960[_0x5a5ac9]=_0x1b8830[_0x5a5ac9];}return typeof _0x328960[_0x421cd4(0x104)]===_0x421cd4(0x12d)&&_0x328960[_0x421cd4(0x104)][_0x421cd4(0x10f)]>0x0&&(_0x328960[_0x421cd4(0x132)]=_0x328960[_0x421cd4(0x104)][_0x421cd4(0x123)](',')[_0x421cd4(0x117)](_0x2920da=>_0x2920da['trim']())['filter'](Boolean)),_0x328960;}function normalizeRelatedPages(_0x4e9444){const _0x3cd253=a28_0x2987;if(!Array['isArray'](_0x4e9444))return[];return _0x4e9444['filter'](_0x43fc6f=>_0x43fc6f&&typeof _0x43fc6f===_0x3cd253(0xfc))[_0x3cd253(0x117)](_0x3e5da3=>({'id':_0x3e5da3['id'],'type':_0x3e5da3[_0x3cd253(0x122)],'code':_0x3e5da3[_0x3cd253(0x108)],'title':_0x3e5da3[_0x3cd253(0x116)],'deleted':_0x3e5da3[_0x3cd253(0x11f)]===!![]}));}function normalizeFallbackFieldName(_0x1f6be6,_0xd2201e){const _0x280f64=a28_0x2987,_0x210b92=_0x1f6be6[_0x280f64(0x129)]();if(!_0x210b92)return null;return{'name':_0x210b92,'displayName':_0x210b92,'type':undefined,'dbType':undefined,'pk':_0x210b92===_0xd2201e,'required':![],'description':undefined};}async function loadListFieldFallback(_0x1e7fd5,_0x4c81a8){const _0x3ffee3=a28_0x2987;if(!_0x1e7fd5||!_0x4c81a8)return[];try{const _0x53b74d=await listDatasets(_0x1e7fd5,{'code':_0x4c81a8}),_0x167002=_0x53b74d[_0x3ffee3(0xfe)](_0x38158b=>_0x38158b[_0x3ffee3(0x108)]===_0x4c81a8)??_0x53b74d[0x0],_0x34ecc7=_0x167002?.[_0x3ffee3(0xf9)]??{},_0x25457b=typeof _0x34ecc7['allFields']===_0x3ffee3(0x12d)?_0x34ecc7[_0x3ffee3(0x104)][_0x3ffee3(0x123)](','):[];return _0x25457b[_0x3ffee3(0x117)](_0x5f13da=>normalizeFallbackFieldName(_0x5f13da,_0x34ecc7[_0x3ffee3(0x136)]))[_0x3ffee3(0x115)](_0x1d372a=>_0x1d372a!==null);}catch{return[];}}export const datasetDetail={'service':a28_0x50c098(0x10e),'command':a28_0x50c098(0x10a),'description':'Get\x20dataset\x20detail\x20including\x20fields,\x20relations,\x20and\x20operations','risk':'read','flags':[CODE_FLAG],async 'execute'(_0x4a3511){const _0x508070=a28_0x50c098,_0x44b0e6=await getDatasetDetail(_0x4a3511[_0x508070(0x124)](_0x508070(0x108))),_0x4036ae=Array['isArray'](_0x44b0e6['fields'])?_0x44b0e6['fields']:Array[_0x508070(0x11e)](_0x44b0e6[_0x508070(0xf6)])?_0x44b0e6[_0x508070(0xf6)]:[];let _0x3d7d37=_0x4036ae[_0x508070(0x117)](_0x2d6876=>normalizeField(_0x2d6876))[_0x508070(0x115)](_0x491581=>_0x491581!==null);_0x3d7d37[_0x508070(0x10f)]===0x0&&(_0x3d7d37=await loadListFieldFallback(_0x4a3511[_0x508070(0xf7)],_0x4a3511['str'](_0x508070(0x108))));const _0x168d16=_0x44b0e6[_0x508070(0x134)]??{},_0x119ead=[];for(const [_0x3a3ac8,_0x160eba]of Object['entries'](_0x168d16)){const _0x46d1aa=normalizeOperationEntry(_0x3a3ac8,_0x160eba);if(_0x46d1aa)_0x119ead[_0x508070(0x13d)](_0x46d1aa);}const _0x1f74b6=_0x44b0e6[_0x508070(0xf9)]??{},_0x6c020b=_0x44b0e6[_0x508070(0x10e)]??{},_0x4e85d8=_0x1f74b6['dbId']!=null?{'id':_0x1f74b6[_0x508070(0x113)],'name':_0x1f74b6[_0x508070(0x12a)]??null}:undefined;let _0x41b5d5;return typeof _0x44b0e6[_0x508070(0x139)]==='string'&&(_0x41b5d5=parseJsonMaybe(_0x44b0e6[_0x508070(0x139)])),{'ok':!![],'data':{'id':_0x44b0e6[_0x508070(0x137)]??_0x44b0e6['id'],'name':_0x44b0e6[_0x508070(0x12e)],'code':_0x44b0e6['modelCode']||_0x44b0e6[_0x508070(0x108)],'doVersion':_0x44b0e6[_0x508070(0x102)],'description':_0x44b0e6['description']||_0x6c020b[_0x508070(0x107)]||undefined,'source':_0x44b0e6[_0x508070(0xf8)]||_0x6c020b[_0x508070(0x121)],'table':_0x1f74b6[_0x508070(0xfa)]||_0x6c020b[_0x508070(0xfa)],'datasetKey':_0x1f74b6[_0x508070(0x119)],'pk':_0x1f74b6['pkField'],'db':_0x4e85d8,'dbtable':summarizeDbtable(_0x1f74b6),'fields':_0x3d7d37,'operations':_0x119ead,'indexes':Array[_0x508070(0x11e)](_0x6c020b[_0x508070(0x114)])?_0x6c020b[_0x508070(0x114)]:[],'relations':_0x44b0e6['relations']??null,'relatedPages':normalizeRelatedPages(_0x44b0e6[_0x508070(0x12c)]),...Array[_0x508070(0x11e)](_0x44b0e6[_0x508070(0x127)])?{'columnCodeListWithDeleted':_0x44b0e6[_0x508070(0x127)]}:{},'formatRules':Array[_0x508070(0x11e)](_0x44b0e6[_0x508070(0x13c)])?_0x44b0e6[_0x508070(0x13c)]:[],'validateRules':Array[_0x508070(0x11e)](_0x44b0e6['validateRules'])?_0x44b0e6[_0x508070(0x13e)]:[],..._0x41b5d5!==undefined?{'extend':_0x41b5d5}:{},'stats':{'fieldCount':_0x3d7d37[_0x508070(0x10f)],'operationCount':_0x119ead[_0x508070(0x10f)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a29_0x374d(){const _0x440deb=['3KyXvfT','1643275hgWwtu','9qHqcrb','91220nBOuLQ','6ZtkODE','168226BTtFUj','4254145nrXcmS','11199940nPPoQs','1677544AcupSe','2525524LKrNjj'];a29_0x374d=function(){return _0x440deb;};return a29_0x374d();}(function(_0x17316e,_0x122d1d){const _0x28c356=a29_0x2fcd,_0x41543a=_0x17316e();while(!![]){try{const _0x2754c1=-parseInt(_0x28c356(0x19d))/0x1+-parseInt(_0x28c356(0x19b))/0x2*(parseInt(_0x28c356(0x1a2))/0x3)+parseInt(_0x28c356(0x1a1))/0x4+-parseInt(_0x28c356(0x1a3))/0x5*(parseInt(_0x28c356(0x19c))/0x6)+-parseInt(_0x28c356(0x19e))/0x7+-parseInt(_0x28c356(0x1a0))/0x8+-parseInt(_0x28c356(0x19a))/0x9*(-parseInt(_0x28c356(0x19f))/0xa);if(_0x2754c1===_0x122d1d)break;else _0x41543a['push'](_0x41543a['shift']());}catch(_0x3950bd){_0x41543a['push'](_0x41543a['shift']());}}}(a29_0x374d,0x5f920));import{datasetList}from'../../commands/dataset/list.js';import{datasetDetail}from'../../commands/dataset/detail.js';import{datasetSdkDoc}from'../../commands/dataset/sdk-doc.js';function a29_0x2fcd(_0x465a5e,_0x2fa3f4){_0x465a5e=_0x465a5e-0x19a;const _0x374de9=a29_0x374d();let _0x2fcdf0=_0x374de9[_0x465a5e];return _0x2fcdf0;}export const datasetDefinitions=[datasetList,datasetDetail,datasetSdkDoc];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a30_0x4d42d7=a30_0x46b9;(function(_0x18312d,_0x5d453c){const _0x17220c=a30_0x46b9,_0x3cbf14=_0x18312d();while(!![]){try{const _0x3f8864=parseInt(_0x17220c(0x1ed))/0x1+parseInt(_0x17220c(0x1ec))/0x2*(parseInt(_0x17220c(0x1f0))/0x3)+parseInt(_0x17220c(0x1e4))/0x4*(parseInt(_0x17220c(0x1ea))/0x5)+parseInt(_0x17220c(0x1eb))/0x6*(-parseInt(_0x17220c(0x1ef))/0x7)+-parseInt(_0x17220c(0x1e9))/0x8+-parseInt(_0x17220c(0x1d4))/0x9+-parseInt(_0x17220c(0x1d9))/0xa*(-parseInt(_0x17220c(0x1de))/0xb);if(_0x3f8864===_0x5d453c)break;else _0x3cbf14['push'](_0x3cbf14['shift']());}catch(_0x20e4bd){_0x3cbf14['push'](_0x3cbf14['shift']());}}}(a30_0x3717,0x6a9e2));import{listDatasets}from'../../core/api-client.js';function a30_0x46b9(_0x5bb33b,_0x5cfbf1){_0x5bb33b=_0x5bb33b-0x1d4;const _0x371768=a30_0x3717();let _0x46b9e1=_0x371768[_0x5bb33b];return _0x46b9e1;}import{CODE_FLAG}from'../../commands/common/flags.js';function a30_0x3717(){const _0x1c1bb7=['datasetKey','tableName','table-name','source','22fbVJOR','allFields','list','map','str','code','8uuPrQN','pkField','read','List\x20datasets\x20in\x20the\x20app\x20(server-side\x20name/code/table-name\x20filters\x20combine\x20with\x20AND)','Filter\x20by\x20dataset\x20name\x20(server-side\x20fuzzy\x20match)','6276296DGGgsI','1861030KFZHhn','5574xhXZVd','2IVLkPH','364982OPITHv','name','2849lQnMTu','1773561FkgriQ','dataset','7280397RNloCV','string','description','Filter\x20by\x20physical\x20table\x20name\x20(server-side\x20prefix\x20match;\x20SQL\x20LIKE\x20wildcards\x20%\x20and\x20_\x20apply)','length','3538490CTizTC'];a30_0x3717=function(){return _0x1c1bb7;};return a30_0x3717();}export const datasetList={'service':a30_0x4d42d7(0x1f1),'command':a30_0x4d42d7(0x1e0),'description':a30_0x4d42d7(0x1e7),'risk':a30_0x4d42d7(0x1e6),'flags':[{'name':'name','type':a30_0x4d42d7(0x1d5),'description':a30_0x4d42d7(0x1e8)},{'name':a30_0x4d42d7(0x1dc),'type':'string','description':a30_0x4d42d7(0x1d7)},{...CODE_FLAG,'required':![],'description':'Filter\x20by\x20dataset\x20code\x20(server-side\x20exact\x20match)'}],async 'execute'(_0xb29149){const _0x1b5cab=a30_0x4d42d7,_0x1f3353=_0xb29149[_0x1b5cab(0x1e2)]('name'),_0x491df7=_0xb29149[_0x1b5cab(0x1e2)](_0x1b5cab(0x1e3)),_0x28de92=_0xb29149[_0x1b5cab(0x1e2)](_0x1b5cab(0x1dc)),_0x735b5f=await listDatasets(_0xb29149['appCode'],{..._0x1f3353&&{'name':_0x1f3353},..._0x491df7&&{'code':_0x491df7},..._0x28de92&&{'tableName':_0x28de92}});return{'ok':!![],'data':{'total':_0x735b5f[_0x1b5cab(0x1d8)],'datasets':_0x735b5f[_0x1b5cab(0x1e1)](_0x416af0=>{const _0x2c9b1a=_0x1b5cab,_0x1f6119=_0x416af0['dbtableConfig']??{};return{'id':_0x416af0['id'],'code':_0x416af0[_0x2c9b1a(0x1e3)],'name':_0x416af0[_0x2c9b1a(0x1ee)],'source':_0x416af0[_0x2c9b1a(0x1dd)],'description':_0x416af0[_0x2c9b1a(0x1d6)],'table':_0x1f6119[_0x2c9b1a(0x1db)],'datasetKey':_0x1f6119[_0x2c9b1a(0x1da)],'pk':_0x1f6119[_0x2c9b1a(0x1e5)],'fields':_0x1f6119[_0x2c9b1a(0x1df)]?_0x1f6119[_0x2c9b1a(0x1df)]['split'](',')[_0x2c9b1a(0x1e1)](_0x50755d=>_0x50755d['trim']()):[]};})}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a31_0x2b5b05=a31_0x4477;(function(_0x4734ff,_0x44b88b){const _0x15ed00=a31_0x4477,_0x16ef66=_0x4734ff();while(!![]){try{const _0x119375=-parseInt(_0x15ed00(0x150))/0x1*(-parseInt(_0x15ed00(0x143))/0x2)+parseInt(_0x15ed00(0x140))/0x3*(-parseInt(_0x15ed00(0x14f))/0x4)+-parseInt(_0x15ed00(0x13f))/0x5+-parseInt(_0x15ed00(0x13e))/0x6+parseInt(_0x15ed00(0x142))/0x7*(parseInt(_0x15ed00(0x144))/0x8)+-parseInt(_0x15ed00(0x141))/0x9*(-parseInt(_0x15ed00(0x146))/0xa)+-parseInt(_0x15ed00(0x151))/0xb*(-parseInt(_0x15ed00(0x149))/0xc);if(_0x119375===_0x44b88b)break;else _0x16ef66['push'](_0x16ef66['shift']());}catch(_0x261de3){_0x16ef66['push'](_0x16ef66['shift']());}}}(a31_0x2fd0,0xdb417));import{getDatasetSdkUsageDoc}from'../../core/api-client.js';function a31_0x2fd0(){const _0x2e158b=['Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','code','sdk-doc','appCode','Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.','4XvqaYZ','76037iznJNV','2393578LrzMuu','3046752flZskS','8063410khytKm','2086995jIQjpO','81981VcoXsP','49nWnhCg','6qGuIYB','766232khRPdi','dataset','1180jfXqNQ','string','#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0aNo\x20SDK\x20usage\x20documentation\x20is\x20available.','96HEVpnV'];a31_0x2fd0=function(){return _0x2e158b;};return a31_0x2fd0();}function a31_0x4477(_0x262479,_0x2e4fbb){_0x262479=_0x262479-0x13e;const _0x2fd01e=a31_0x2fd0();let _0x44772e=_0x2fd01e[_0x262479];return _0x44772e;}import{CODE_FLAG}from'../../commands/common/flags.js';const DEFAULT_MARKDOWN=a31_0x2b5b05(0x148);export function formatDatasetSdkMarkdown(_0x278b78){const _0x57bf90=a31_0x2b5b05,_0x190825=typeof _0x278b78===_0x57bf90(0x147)?_0x278b78['trim']():'';return _0x190825||DEFAULT_MARKDOWN;}export const datasetSdkDoc={'service':a31_0x2b5b05(0x145),'command':a31_0x2b5b05(0x14c),'description':a31_0x2b5b05(0x14a),'risk':'read','flags':[{...CODE_FLAG,'description':a31_0x2b5b05(0x14e)}],async 'execute'(_0xc1b69){const _0xb398af=a31_0x2b5b05,_0xdf29b0=_0xc1b69['str'](_0xb398af(0x14b)),_0x17c224=await getDatasetSdkUsageDoc(_0xdf29b0,_0xc1b69[_0xb398af(0x14d)]);return{'ok':!![],'data':{'code':_0xdf29b0,'appCode':_0xc1b69[_0xb398af(0x14d)],'markdown':formatDatasetSdkMarkdown(_0x17c224)}};}};
|
package/lib/commands/doctor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a32_0x589b08=a32_0x2eb6;(function(_0x5101ab,_0x2c0f38){const _0x446e02=a32_0x2eb6,_0x4e30f3=_0x5101ab();while(!![]){try{const _0x15fe8a=-parseInt(_0x446e02(0x16d))/0x1+-parseInt(_0x446e02(0x1a9))/0x2*(parseInt(_0x446e02(0x189))/0x3)+-parseInt(_0x446e02(0x192))/0x4*(parseInt(_0x446e02(0x183))/0x5)+parseInt(_0x446e02(0x146))/0x6+-parseInt(_0x446e02(0x1bf))/0x7+parseInt(_0x446e02(0x187))/0x8+parseInt(_0x446e02(0x195))/0x9*(parseInt(_0x446e02(0x17e))/0xa);if(_0x15fe8a===_0x2c0f38)break;else _0x4e30f3['push'](_0x4e30f3['shift']());}catch(_0x29c1e0){_0x4e30f3['push'](_0x4e30f3['shift']());}}}(a32_0x25c5,0x31b32));import a32_0x41b36e from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{getCliVersion}from'../utils/version.js';import{getApiDomain,getKbServiceDomain,getRuntimeDomain,getSkillDomain,getUserDomain}from'../constant/domain.js';import{normalizeLovrabetRegion}from'../constant/region.js';function a32_0x2eb6(_0x49fd75,_0x168fc7){_0x49fd75=_0x49fd75-0x146;const _0x25c524=a32_0x25c5();let _0x2eb685=_0x25c524[_0x49fd75];return _0x2eb685;}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';function a32_0x25c5(){const _0x487aef=['\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','(none)','inherit','status','\x20\x20Config\x20Files','accessKey','Project','log','verbose','✗\x20Invalid','red','doctor','(no\x20file)','97866XblqFZ','format','filter','ClientAk','current','serviceCode','Unavailable\x20until\x20routing\x20configuration\x20is\x20repaired','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','reason','\x20\x20app\x20locale:\x20\x20\x20\x20\x20\x20','\x20config\x20delete\x20routing','\x20config\x20delete\x20inherit\x20--global','\x20\x20Repair\x20global:\x20\x20\x20','global','(invalid)','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','10YJyIwI','installedPath','\x20\x20Service\x20Tree','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','riskLevel','350JcVaVp','currentApp','(not\x20set)','region','2391312TuRGAF','(set,\x20length=','1059DPSXIm','Global','⚠\x20Empty','\x20\x20auth\x20(effective):\x20','\x20config\x20init','Diagnose\x20CLI\x20configuration\x20and\x20environment','arch','routing','project','21292RjAoJP','\x20config\x20delete\x20inherit','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','2412639dSaHsR','state','bold','(not\x20found)','registryPath','repeat','repairCommand','✓\x20current','\x20\x20Country/Region\x20Configuration','\x20config','(default:\x20','appCode','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','(removed\x20—\x20cookie\x20auth\x20disabled)','defaultApp','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20─','\x20\x20Legacy\x20inherit:\x20\x20\x20','\x20\x20kbServiceDomain:\x20','34LOgmqP','hasOwnProperty','globalConfig','\x20\x20API\x20Endpoints','\x20\x20Merged\x20Config','call','skillVersion','\x20+\x20','commandCount','(unnamed)','read','message','\x20\x20Built-in\x20Skill','\x20Imported\x20from:\x20','not\x20configured','\x20commands)','green','✓\x20Loaded','\x20\x20Repair\x20global:\x20\x20\x20\x20','\x20\x20Installed\x20Path:\x20\x20','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','gray','435890FPCDeu','\x20config\x20delete\x20region','\x20\x20runtimeDomain:\x20\x20\x20','(default)','1051992kRsUob','length','\x20(accessKey)','join','pageSize','path','\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','prototype','packageVersion','\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20region:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','padEnd','projectConfig','empty','name','✓\x20Valid\x20JSON','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','platform','\x20config\x20delete\x20routing\x20--global','✗\x20Invalid\x20JSON','\x20\x20Auth','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','\x20\x20Repair\x20project:\x20\x20','yellow'];a32_0x25c5=function(){return _0x487aef;};return a32_0x25c5();}import{inspectBuiltinSkill}from'../skills/builtin-skill.js';async function execute(_0x104cb7){const _0x3e6953=a32_0x2eb6,_0xee9779=getCliVersion(),_0x5b1baf=buildConfigFromFlags({});let _0x4fac56,_0x48b5fb;try{_0x4fac56=normalizeLovrabetRegion(_0x5b1baf['raw'][_0x3e6953(0x186)]);}catch(_0x27ee05){_0x48b5fb=_0x27ee05 instanceof Error?_0x27ee05:new Error(String(_0x27ee05));}let _0x48ed77;if(!_0x48b5fb)try{await initGlobalEnvironment(_0x5b1baf);}catch(_0xd67e69){_0x48ed77=_0xd67e69 instanceof Error?_0xd67e69:new Error(String(_0xd67e69));}console[_0x3e6953(0x167)](),console[_0x3e6953(0x167)](a32_0x41b36e[_0x3e6953(0x197)](CLI_BIN_NAME+'\x20doctor')),console[_0x3e6953(0x167)](a32_0x41b36e[_0x3e6953(0x1be)]('─'[_0x3e6953(0x19a)](0x32))),console['log'](_0x3e6953(0x15d)+_0xee9779),console[_0x3e6953(0x167)](_0x3e6953(0x174)+process['version']),console[_0x3e6953(0x167)]('\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x3e6953(0x159)]+'\x20'+process[_0x3e6953(0x18f)]);const _0x3e6a1c=inspectBuiltinSkill();console[_0x3e6953(0x167)](),console[_0x3e6953(0x167)](a32_0x41b36e['bold'](_0x3e6953(0x1b5))),console[_0x3e6953(0x167)](a32_0x41b36e[_0x3e6953(0x1be)](_0x3e6953(0x1a6)[_0x3e6953(0x19a)](0x1e))),console['log']('\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x3e6a1c[_0x3e6953(0x196)]===_0x3e6953(0x171)?a32_0x41b36e[_0x3e6953(0x1b9)](_0x3e6953(0x19c)):a32_0x41b36e[_0x3e6953(0x16a)]('✗\x20'+_0x3e6a1c['state']))),console['log']('\x20\x20Package\x20Version:\x20'+_0x3e6a1c[_0x3e6953(0x150)]),console[_0x3e6953(0x167)]('\x20\x20Skill\x20Version:\x20\x20\x20'+(_0x3e6a1c[_0x3e6953(0x1af)]||a32_0x41b36e['gray']('(missing)'))),console[_0x3e6953(0x167)](_0x3e6953(0x1bc)+(_0x3e6a1c[_0x3e6953(0x17f)]||a32_0x41b36e['gray'](_0x3e6953(0x198))));_0x3e6a1c[_0x3e6953(0x196)]!=='current'&&console[_0x3e6953(0x167)](_0x3e6953(0x14c)+_0x3e6a1c[_0x3e6953(0x19b)]);_0x3e6a1c[_0x3e6953(0x175)]&&console['log'](_0x3e6953(0x151)+_0x3e6a1c['reason']);console[_0x3e6953(0x167)](),console[_0x3e6953(0x167)](a32_0x41b36e['bold'](_0x3e6953(0x164))),console['log'](a32_0x41b36e['gray'](_0x3e6953(0x1a6)['repeat'](0x1e)));const _0x30f20d=getGlobalConfigPath(),_0x5070d5=getProjectConfigPath();console[_0x3e6953(0x167)](_0x3e6953(0x158)+(_0x30f20d||a32_0x41b36e[_0x3e6953(0x1be)](_0x3e6953(0x198)))),console[_0x3e6953(0x167)]('\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x5070d5||a32_0x41b36e[_0x3e6953(0x1be)]('(not\x20found)'))),console['log'](),console[_0x3e6953(0x167)](a32_0x41b36e['bold']('\x20\x20Config\x20JSON')),console[_0x3e6953(0x167)](a32_0x41b36e[_0x3e6953(0x1be)]('\x20\x20─'['repeat'](0x1e)));const _0x461ddc=(_0x3cb839,_0x2b4834)=>{const _0x321211=_0x3e6953;if(!_0x2b4834){console[_0x321211(0x167)]('\x20\x20'+_0x3cb839['padEnd'](0x11)+'\x20'+a32_0x41b36e[_0x321211(0x1be)](_0x321211(0x16c)));return;}const _0x5429a2=inspectCliConfigJsonFile(_0x2b4834);if(_0x5429a2[_0x321211(0x163)]==='ok')console[_0x321211(0x167)]('\x20\x20'+_0x3cb839['padEnd'](0x11)+'\x20'+a32_0x41b36e[_0x321211(0x1b9)](_0x321211(0x157)));else{if(_0x5429a2['status']===_0x321211(0x155))console['log']('\x20\x20'+_0x3cb839[_0x321211(0x153)](0x11)+'\x20'+a32_0x41b36e['yellow']('⚠\x20Empty\x20(treated\x20as\x20{})'));else _0x5429a2[_0x321211(0x163)]==='missing'?console[_0x321211(0x167)]('\x20\x20'+_0x3cb839[_0x321211(0x153)](0x11)+'\x20'+a32_0x41b36e[_0x321211(0x1be)]('(missing)')):(console[_0x321211(0x167)]('\x20\x20'+_0x3cb839[_0x321211(0x153)](0x11)+'\x20'+a32_0x41b36e['red'](_0x321211(0x15b))),console[_0x321211(0x167)]('\x20\x20'+''[_0x321211(0x153)](0x11)+'\x20'+a32_0x41b36e[_0x321211(0x16a)](_0x5429a2['message'])));}};_0x461ddc(_0x3e6953(0x18a),_0x30f20d),_0x461ddc(_0x3e6953(0x166),_0x5070d5);const _0xe83026=loadRawConfigLayers(),_0x3e5768=[Object[_0x3e6953(0x14f)][_0x3e6953(0x1aa)][_0x3e6953(0x1ae)](_0xe83026[_0x3e6953(0x1ab)],_0x3e6953(0x162))?_0x3e6953(0x17a):null,Object[_0x3e6953(0x14f)][_0x3e6953(0x1aa)][_0x3e6953(0x1ae)](_0xe83026['projectConfig'],_0x3e6953(0x162))?'project':null][_0x3e6953(0x16f)](Boolean);_0x3e5768[_0x3e6953(0x147)]>0x0&&(console[_0x3e6953(0x167)](_0x3e6953(0x1a7)+a32_0x41b36e[_0x3e6953(0x15f)]('ignored\x20in\x20'+_0x3e5768[_0x3e6953(0x149)](_0x3e6953(0x1b0))+_0x3e6953(0x19e))),_0x3e5768['includes'](_0x3e6953(0x191))&&console[_0x3e6953(0x167)]('\x20\x20Repair\x20project:\x20\x20\x20'+CLI_BIN_NAME+_0x3e6953(0x193)),_0x3e5768['includes']('global')&&console[_0x3e6953(0x167)](_0x3e6953(0x1bb)+CLI_BIN_NAME+_0x3e6953(0x178)));_0x48ed77&&(console[_0x3e6953(0x167)](),console[_0x3e6953(0x167)](a32_0x41b36e['bold']('\x20\x20Routing\x20Configuration')),console[_0x3e6953(0x167)](a32_0x41b36e[_0x3e6953(0x1be)]('\x20\x20─'[_0x3e6953(0x19a)](0x1e))),console[_0x3e6953(0x167)](_0x3e6953(0x1a4)+a32_0x41b36e['red']('✗\x20Invalid')),console[_0x3e6953(0x167)]('\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x48ed77['message']),Object['prototype']['hasOwnProperty'][_0x3e6953(0x1ae)](_0xe83026['projectConfig'],'routing')&&console[_0x3e6953(0x167)]('\x20\x20Repair\x20project:\x20\x20'+CLI_BIN_NAME+_0x3e6953(0x177)),Object[_0x3e6953(0x14f)][_0x3e6953(0x1aa)]['call'](_0xe83026[_0x3e6953(0x1ab)],_0x3e6953(0x190))&&console[_0x3e6953(0x167)]('\x20\x20Repair\x20global:\x20\x20\x20'+CLI_BIN_NAME+_0x3e6953(0x15a)));_0x48b5fb&&(console[_0x3e6953(0x167)](),console[_0x3e6953(0x167)](a32_0x41b36e['bold'](_0x3e6953(0x19d))),console[_0x3e6953(0x167)](a32_0x41b36e[_0x3e6953(0x1be)](_0x3e6953(0x1a6)[_0x3e6953(0x19a)](0x1e))),console['log'](_0x3e6953(0x1a4)+a32_0x41b36e[_0x3e6953(0x16a)](_0x3e6953(0x169))),console[_0x3e6953(0x167)]('\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x48b5fb[_0x3e6953(0x1b4)]),Object['prototype']['hasOwnProperty'][_0x3e6953(0x1ae)](_0xe83026[_0x3e6953(0x154)],_0x3e6953(0x186))&&console[_0x3e6953(0x167)](_0x3e6953(0x15e)+CLI_BIN_NAME+_0x3e6953(0x1c0)),Object[_0x3e6953(0x14f)][_0x3e6953(0x1aa)][_0x3e6953(0x1ae)](_0xe83026[_0x3e6953(0x1ab)],'region')&&console[_0x3e6953(0x167)](_0x3e6953(0x179)+CLI_BIN_NAME+_0x3e6953(0x18d)));console['log'](),console[_0x3e6953(0x167)](a32_0x41b36e['bold'](_0x3e6953(0x1ad))),console[_0x3e6953(0x167)](a32_0x41b36e[_0x3e6953(0x1be)](_0x3e6953(0x1a6)[_0x3e6953(0x19a)](0x1e))),console[_0x3e6953(0x167)](_0x3e6953(0x14d)+(_0x5b1baf[_0x3e6953(0x1a0)]||a32_0x41b36e[_0x3e6953(0x16a)](_0x3e6953(0x185)))),console[_0x3e6953(0x167)](_0x3e6953(0x152)+(_0x4fac56??a32_0x41b36e[_0x3e6953(0x16a)](_0x3e6953(0x17b)))),console[_0x3e6953(0x167)](_0x3e6953(0x176)+_0x5b1baf['locale']),console[_0x3e6953(0x167)](_0x3e6953(0x194)+(_0x5b1baf[_0x3e6953(0x1a3)]||a32_0x41b36e[_0x3e6953(0x1be)]('(none)'))),console['log']('\x20\x20currentApp:\x20\x20\x20\x20\x20\x20'+(_0x5b1baf[_0x3e6953(0x184)]||a32_0x41b36e[_0x3e6953(0x1be)](_0x3e6953(0x161)))),console[_0x3e6953(0x167)](_0x3e6953(0x1a5)+(_0x5b1baf[_0x3e6953(0x16e)]||a32_0x41b36e[_0x3e6953(0x1be)](_0x3e6953(0x19f)+DEFAULT_CONFIG_VALUES[_0x3e6953(0x16e)]+')'))),console[_0x3e6953(0x167)](_0x3e6953(0x160)+(_0x5b1baf[_0x3e6953(0x14a)]??a32_0x41b36e[_0x3e6953(0x1be)](_0x3e6953(0x1c2)))),console[_0x3e6953(0x167)](_0x3e6953(0x1bd)+_0x5b1baf[_0x3e6953(0x182)]),console[_0x3e6953(0x167)](_0x3e6953(0x14e)+_0x5b1baf[_0x3e6953(0x168)]),console[_0x3e6953(0x167)](_0x3e6953(0x18c)+AUTH_MODE[_0x3e6953(0x170)]),console[_0x3e6953(0x167)]('\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20'+(_0x5b1baf[_0x3e6953(0x165)]?a32_0x41b36e['green'](_0x3e6953(0x188)+_0x5b1baf[_0x3e6953(0x165)][_0x3e6953(0x147)]+')'):a32_0x41b36e[_0x3e6953(0x1be)]('(none)'))),console[_0x3e6953(0x167)](),console[_0x3e6953(0x167)](a32_0x41b36e[_0x3e6953(0x197)](_0x3e6953(0x1ac))),console['log'](a32_0x41b36e[_0x3e6953(0x1be)]('\x20\x20─'[_0x3e6953(0x19a)](0x1e)));_0x48ed77||_0x48b5fb?console['log'](_0x3e6953(0x1a4)+a32_0x41b36e['red'](_0x3e6953(0x173))):(console[_0x3e6953(0x167)](_0x3e6953(0x1a1)+getApiDomain()),console[_0x3e6953(0x167)]('\x20\x20userDomain:\x20\x20\x20\x20\x20\x20'+getUserDomain()),console[_0x3e6953(0x167)](_0x3e6953(0x1c1)+getRuntimeDomain()),console[_0x3e6953(0x167)]('\x20\x20skillDomain:\x20\x20\x20\x20\x20'+getSkillDomain()),console[_0x3e6953(0x167)](_0x3e6953(0x1a8)+(getKbServiceDomain()??_0x3e6953(0x1b7))));console[_0x3e6953(0x167)](),console[_0x3e6953(0x167)](a32_0x41b36e[_0x3e6953(0x197)](_0x3e6953(0x180))),console['log'](a32_0x41b36e[_0x3e6953(0x1be)]('\x20\x20─'[_0x3e6953(0x19a)](0x1e)));const _0x3085dc=inspectServiceRegistry();console[_0x3e6953(0x167)](_0x3e6953(0x181)+_0x3085dc[_0x3e6953(0x199)]),console[_0x3e6953(0x167)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+formatServiceRegistryStatus(_0x3085dc)),console['log']('\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3085dc['serviceCount']),console[_0x3e6953(0x167)](_0x3e6953(0x17d)+_0x3085dc[_0x3e6953(0x1b1)]);for(const _0x28ce4d of _0x3085dc['services']){console[_0x3e6953(0x167)]('\x20\x20'+(_0x28ce4d[_0x3e6953(0x172)]+':')[_0x3e6953(0x153)](0x11)+'\x20'+(_0x28ce4d[_0x3e6953(0x156)]||a32_0x41b36e['gray'](_0x3e6953(0x1b2)))+'\x20('+_0x28ce4d[_0x3e6953(0x1b1)]+_0x3e6953(0x1b8)),console[_0x3e6953(0x167)]('\x20\x20'+''[_0x3e6953(0x153)](0x11)+_0x3e6953(0x1b6)+_0x28ce4d['source'][_0x3e6953(0x14b)]);}return console[_0x3e6953(0x167)](),console[_0x3e6953(0x167)](a32_0x41b36e[_0x3e6953(0x197)](_0x3e6953(0x15c))),console[_0x3e6953(0x167)](a32_0x41b36e['gray']('\x20\x20─'[_0x3e6953(0x19a)](0x1e))),console[_0x3e6953(0x167)](_0x3e6953(0x17c)+a32_0x41b36e[_0x3e6953(0x1b9)](AUTH_MODE[_0x3e6953(0x170)]+_0x3e6953(0x148))),console['log']('\x20\x20Session\x20check:\x20\x20\x20'+a32_0x41b36e['gray'](_0x3e6953(0x1a2))),console[_0x3e6953(0x167)](),{'ok':!![]};}function formatServiceRegistryStatus(_0x3e9215){const _0x377347=a32_0x2eb6;if(_0x3e9215[_0x377347(0x163)]==='ok')return a32_0x41b36e[_0x377347(0x1b9)](_0x377347(0x1ba));if(_0x3e9215['status']==='missing')return a32_0x41b36e[_0x377347(0x1be)](_0x377347(0x198));if(_0x3e9215['status']==='empty')return a32_0x41b36e['yellow'](_0x377347(0x18b));return a32_0x41b36e[_0x377347(0x16a)](_0x377347(0x169)+(_0x3e9215[_0x377347(0x1b4)]?':\x20'+_0x3e9215[_0x377347(0x1b4)]:''));}export const doctorDefinition={'service':a32_0x589b08(0x16b),'command':'check','description':a32_0x589b08(0x18e),'risk':a32_0x589b08(0x1b3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
1
|
+
const a32_0x82e998=a32_0x2d11;(function(_0x2f3d00,_0x55cc09){const _0x59f829=a32_0x2d11,_0x46aa0f=_0x2f3d00();while(!![]){try{const _0xb68e4d=parseInt(_0x59f829(0x1a1))/0x1*(-parseInt(_0x59f829(0x1e3))/0x2)+parseInt(_0x59f829(0x205))/0x3+-parseInt(_0x59f829(0x1c3))/0x4+parseInt(_0x59f829(0x1ac))/0x5+-parseInt(_0x59f829(0x1b5))/0x6+parseInt(_0x59f829(0x1f0))/0x7*(parseInt(_0x59f829(0x210))/0x8)+parseInt(_0x59f829(0x1a5))/0x9;if(_0xb68e4d===_0x55cc09)break;else _0x46aa0f['push'](_0x46aa0f['shift']());}catch(_0x2e5322){_0x46aa0f['push'](_0x46aa0f['shift']());}}}(a32_0x3c23,0xc7f00));import a32_0x154379 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{getCliVersion}from'../utils/version.js';import{getApiDomain,getKbServiceDomain,getRuntimeDomain,getSkillDomain,getUserDomain}from'../constant/domain.js';function a32_0x2d11(_0x43d77f,_0xe43c11){_0x43d77f=_0x43d77f-0x199;const _0x3c232c=a32_0x3c23();let _0x2d11bf=_0x3c232c[_0x43d77f];return _0x2d11bf;}import{normalizeLovrabetRegion}from'../constant/region.js';function a32_0x3c23(){const _0x8e6161=['serviceCount','8728ZhQOLV','repairCommand','pageSize','\x20\x20Auth','yellow','bold','(set,\x20length=','length','✗\x20Invalid','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','Unavailable\x20until\x20routing\x20configuration\x20is\x20repaired','\x20\x20Config\x20JSON','2gKtieW','\x20\x20app\x20locale:\x20\x20\x20\x20\x20\x20','routing','\x20\x20runtimeDomain:\x20\x20\x20','18225639NDEwbo','doctor','\x20\x20API\x20Endpoints','\x20\x20auth\x20(effective):\x20','red','projectConfig','\x20\x20─','1908065Qmusgd','Global','commandCount','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','\x20\x20kbServiceDomain:\x20','empty','repeat','green','region','7550232MaUNCc','(invalid)','verbose','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20config\x20delete\x20routing\x20--global','(not\x20found)','\x20\x20Installed\x20Path:\x20\x20','(not\x20set)','missing','\x20\x20Merged\x20Config','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Country/Region\x20Configuration','current','4232420NLEmKh','skillVersion','accessKey','\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Repair\x20project:\x20\x20\x20','✓\x20current','path','read','\x20\x20Repair\x20global:\x20\x20\x20\x20','⚠\x20Empty\x20(treated\x20as\x20{})','inherit','\x20\x20Config\x20Files','\x20\x20Skill\x20Version:\x20\x20\x20','✗\x20Invalid\x20JSON','platform','padEnd','globalConfig','not\x20configured','gray','\x20config\x20init','\x20doctor','(removed\x20—\x20cookie\x20auth\x20disabled)','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','filter','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','call','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','✓\x20Loaded','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Repair\x20global:\x20\x20\x20','reason','848566DjCdsx','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','defaultApp','message','\x20Imported\x20from:\x20','serviceCode','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','appCode','format','\x20\x20Legacy\x20inherit:\x20\x20\x20','log','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','8743PIDAsZ','hasOwnProperty','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(none)','\x20commands)','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(default:\x20','✓\x20Valid\x20JSON','(missing)','raw','includes','\x20config\x20delete\x20routing','\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Diagnose\x20CLI\x20configuration\x20and\x20environment','global','\x20\x20Repair\x20project:\x20\x20','\x20\x20Built-in\x20Skill','status','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Package\x20Version:\x20','join','643932oROFGT','\x20\x20Session\x20check:\x20\x20\x20','\x20config\x20delete\x20inherit','prototype','\x20\x20Service\x20Tree','arch','locale','\x20\x20region:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','project','\x20+\x20'];a32_0x3c23=function(){return _0x8e6161;};return a32_0x3c23();}import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile,loadRawConfigLayers}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{inspectServiceRegistry}from'../commands/service/registry.js';import{inspectBuiltinSkill}from'../skills/builtin-skill.js';async function execute(_0x2a19ca){const _0x3be706=a32_0x2d11,_0x23f03d=getCliVersion(),_0x34a980=buildConfigFromFlags({});let _0x2eda6b,_0x238777;try{_0x2eda6b=normalizeLovrabetRegion(_0x34a980[_0x3be706(0x1f9)][_0x3be706(0x1b4)]);}catch(_0x10b288){_0x238777=_0x10b288 instanceof Error?_0x10b288:new Error(String(_0x10b288));}let _0x362cf6;if(!_0x238777)try{await initGlobalEnvironment(_0x34a980);}catch(_0x53b4a3){_0x362cf6=_0x53b4a3 instanceof Error?_0x53b4a3:new Error(String(_0x53b4a3));}console['log'](),console[_0x3be706(0x1ee)](a32_0x154379[_0x3be706(0x19a)](CLI_BIN_NAME+_0x3be706(0x1d7))),console[_0x3be706(0x1ee)](a32_0x154379['gray']('─'[_0x3be706(0x1b2)](0x32))),console['log'](_0x3be706(0x1af)+_0x23f03d),console[_0x3be706(0x1ee)]('\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+process['version']),console[_0x3be706(0x1ee)](_0x3be706(0x1c0)+process[_0x3be706(0x1d1)]+'\x20'+process[_0x3be706(0x20a)]);const _0x2f4901=inspectBuiltinSkill();console[_0x3be706(0x1ee)](),console[_0x3be706(0x1ee)](a32_0x154379[_0x3be706(0x19a)](_0x3be706(0x200))),console[_0x3be706(0x1ee)](a32_0x154379['gray'](_0x3be706(0x1ab)['repeat'](0x1e))),console[_0x3be706(0x1ee)](_0x3be706(0x1c6)+(_0x2f4901['state']===_0x3be706(0x1c2)?a32_0x154379[_0x3be706(0x1b3)](_0x3be706(0x1c8)):a32_0x154379[_0x3be706(0x1a9)]('✗\x20'+_0x2f4901['state']))),console['log'](_0x3be706(0x203)+_0x2f4901['packageVersion']),console[_0x3be706(0x1ee)](_0x3be706(0x1cf)+(_0x2f4901[_0x3be706(0x1c4)]||a32_0x154379[_0x3be706(0x1d5)](_0x3be706(0x1f8)))),console[_0x3be706(0x1ee)](_0x3be706(0x1bc)+(_0x2f4901['installedPath']||a32_0x154379['gray'](_0x3be706(0x1bb))));_0x2f4901['state']!==_0x3be706(0x1c2)&&console['log'](_0x3be706(0x1e5)+_0x2f4901[_0x3be706(0x211)]);_0x2f4901[_0x3be706(0x1e2)]&&console[_0x3be706(0x1ee)](_0x3be706(0x1fc)+_0x2f4901[_0x3be706(0x1e2)]);console[_0x3be706(0x1ee)](),console[_0x3be706(0x1ee)](a32_0x154379[_0x3be706(0x19a)](_0x3be706(0x1ce))),console[_0x3be706(0x1ee)](a32_0x154379[_0x3be706(0x1d5)](_0x3be706(0x1ab)[_0x3be706(0x1b2)](0x1e)));const _0x316248=getGlobalConfigPath(),_0x5ca411=getProjectConfigPath();console[_0x3be706(0x1ee)](_0x3be706(0x1f5)+(_0x316248||a32_0x154379[_0x3be706(0x1d5)](_0x3be706(0x1bb)))),console[_0x3be706(0x1ee)](_0x3be706(0x1ea)+(_0x5ca411||a32_0x154379['gray'](_0x3be706(0x1bb)))),console['log'](),console[_0x3be706(0x1ee)](a32_0x154379[_0x3be706(0x19a)](_0x3be706(0x1a0))),console[_0x3be706(0x1ee)](a32_0x154379[_0x3be706(0x1d5)](_0x3be706(0x1ab)[_0x3be706(0x1b2)](0x1e)));const _0x57e4b5=(_0xdff9fc,_0x28a37e)=>{const _0x3da626=_0x3be706;if(!_0x28a37e){console[_0x3da626(0x1ee)]('\x20\x20'+_0xdff9fc[_0x3da626(0x1d2)](0x11)+'\x20'+a32_0x154379['gray']('(no\x20file)'));return;}const _0x986da7=inspectCliConfigJsonFile(_0x28a37e);if(_0x986da7[_0x3da626(0x201)]==='ok')console[_0x3da626(0x1ee)]('\x20\x20'+_0xdff9fc[_0x3da626(0x1d2)](0x11)+'\x20'+a32_0x154379[_0x3da626(0x1b3)](_0x3da626(0x1f7)));else{if(_0x986da7[_0x3da626(0x201)]===_0x3da626(0x1b1))console[_0x3da626(0x1ee)]('\x20\x20'+_0xdff9fc[_0x3da626(0x1d2)](0x11)+'\x20'+a32_0x154379[_0x3da626(0x199)](_0x3da626(0x1cc)));else _0x986da7[_0x3da626(0x201)]===_0x3da626(0x1be)?console[_0x3da626(0x1ee)]('\x20\x20'+_0xdff9fc[_0x3da626(0x1d2)](0x11)+'\x20'+a32_0x154379['gray'](_0x3da626(0x1f8))):(console[_0x3da626(0x1ee)]('\x20\x20'+_0xdff9fc['padEnd'](0x11)+'\x20'+a32_0x154379['red'](_0x3da626(0x1d0))),console['log']('\x20\x20'+''['padEnd'](0x11)+'\x20'+a32_0x154379['red'](_0x986da7[_0x3da626(0x1e7)])));}};_0x57e4b5(_0x3be706(0x1ad),_0x316248),_0x57e4b5('Project',_0x5ca411);const _0x6aff54=loadRawConfigLayers(),_0x408d4c=[Object[_0x3be706(0x208)]['hasOwnProperty'][_0x3be706(0x1dc)](_0x6aff54[_0x3be706(0x1d3)],_0x3be706(0x1cd))?_0x3be706(0x1fe):null,Object[_0x3be706(0x208)]['hasOwnProperty'][_0x3be706(0x1dc)](_0x6aff54[_0x3be706(0x1aa)],_0x3be706(0x1cd))?_0x3be706(0x20d):null][_0x3be706(0x1da)](Boolean);_0x408d4c[_0x3be706(0x19c)]>0x0&&(console[_0x3be706(0x1ee)](_0x3be706(0x1ed)+a32_0x154379[_0x3be706(0x199)]('ignored\x20in\x20'+_0x408d4c[_0x3be706(0x204)](_0x3be706(0x20e))+'\x20config')),_0x408d4c[_0x3be706(0x1fa)](_0x3be706(0x20d))&&console[_0x3be706(0x1ee)](_0x3be706(0x1c7)+CLI_BIN_NAME+_0x3be706(0x207)),_0x408d4c[_0x3be706(0x1fa)](_0x3be706(0x1fe))&&console[_0x3be706(0x1ee)](_0x3be706(0x1cb)+CLI_BIN_NAME+'\x20config\x20delete\x20inherit\x20--global'));_0x362cf6&&(console[_0x3be706(0x1ee)](),console[_0x3be706(0x1ee)](a32_0x154379[_0x3be706(0x19a)]('\x20\x20Routing\x20Configuration')),console[_0x3be706(0x1ee)](a32_0x154379[_0x3be706(0x1d5)]('\x20\x20─'[_0x3be706(0x1b2)](0x1e))),console[_0x3be706(0x1ee)](_0x3be706(0x1d9)+a32_0x154379['red'](_0x3be706(0x19d))),console['log'](_0x3be706(0x1fc)+_0x362cf6[_0x3be706(0x1e7)]),Object[_0x3be706(0x208)]['hasOwnProperty']['call'](_0x6aff54['projectConfig'],'routing')&&console['log'](_0x3be706(0x1ff)+CLI_BIN_NAME+_0x3be706(0x1fb)),Object[_0x3be706(0x208)][_0x3be706(0x1f1)][_0x3be706(0x1dc)](_0x6aff54['globalConfig'],_0x3be706(0x1a3))&&console[_0x3be706(0x1ee)]('\x20\x20Repair\x20global:\x20\x20\x20'+CLI_BIN_NAME+_0x3be706(0x1ba)));_0x238777&&(console[_0x3be706(0x1ee)](),console[_0x3be706(0x1ee)](a32_0x154379['bold'](_0x3be706(0x1c1))),console['log'](a32_0x154379['gray']('\x20\x20─'['repeat'](0x1e))),console['log'](_0x3be706(0x1d9)+a32_0x154379['red'](_0x3be706(0x19d))),console[_0x3be706(0x1ee)]('\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x238777[_0x3be706(0x1e7)]),Object[_0x3be706(0x208)][_0x3be706(0x1f1)][_0x3be706(0x1dc)](_0x6aff54[_0x3be706(0x1aa)],_0x3be706(0x1b4))&&console[_0x3be706(0x1ee)](_0x3be706(0x1ff)+CLI_BIN_NAME+'\x20config\x20delete\x20region'),Object['prototype'][_0x3be706(0x1f1)][_0x3be706(0x1dc)](_0x6aff54[_0x3be706(0x1d3)],_0x3be706(0x1b4))&&console[_0x3be706(0x1ee)](_0x3be706(0x1e1)+CLI_BIN_NAME+_0x3be706(0x1d6)));console[_0x3be706(0x1ee)](),console['log'](a32_0x154379[_0x3be706(0x19a)](_0x3be706(0x1bf))),console[_0x3be706(0x1ee)](a32_0x154379[_0x3be706(0x1d5)]('\x20\x20─'[_0x3be706(0x1b2)](0x1e))),console[_0x3be706(0x1ee)]('\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x34a980[_0x3be706(0x1eb)]||a32_0x154379['red'](_0x3be706(0x1bd)))),console[_0x3be706(0x1ee)](_0x3be706(0x20c)+(_0x2eda6b??a32_0x154379[_0x3be706(0x1a9)](_0x3be706(0x1b6)))),console[_0x3be706(0x1ee)](_0x3be706(0x1a2)+_0x34a980[_0x3be706(0x20b)]),console['log'](_0x3be706(0x1dd)+(_0x34a980[_0x3be706(0x1e6)]||a32_0x154379[_0x3be706(0x1d5)]('(none)'))),console[_0x3be706(0x1ee)](_0x3be706(0x19e)+(_0x34a980['currentApp']||a32_0x154379[_0x3be706(0x1d5)](_0x3be706(0x1f3)))),console['log'](_0x3be706(0x1de)+(_0x34a980['format']||a32_0x154379[_0x3be706(0x1d5)](_0x3be706(0x1f6)+DEFAULT_CONFIG_VALUES[_0x3be706(0x1ec)]+')'))),console['log'](_0x3be706(0x1e4)+(_0x34a980[_0x3be706(0x212)]??a32_0x154379[_0x3be706(0x1d5)]('(default)'))),console[_0x3be706(0x1ee)](_0x3be706(0x1b9)+_0x34a980['riskLevel']),console[_0x3be706(0x1ee)](_0x3be706(0x1e0)+_0x34a980[_0x3be706(0x1b7)]),console[_0x3be706(0x1ee)](_0x3be706(0x1a8)+AUTH_MODE['ClientAk']),console[_0x3be706(0x1ee)](_0x3be706(0x1ef)+(_0x34a980[_0x3be706(0x1c5)]?a32_0x154379[_0x3be706(0x1b3)](_0x3be706(0x19b)+_0x34a980['accessKey'][_0x3be706(0x19c)]+')'):a32_0x154379[_0x3be706(0x1d5)](_0x3be706(0x1f3)))),console[_0x3be706(0x1ee)](),console[_0x3be706(0x1ee)](a32_0x154379[_0x3be706(0x19a)](_0x3be706(0x1a7))),console[_0x3be706(0x1ee)](a32_0x154379[_0x3be706(0x1d5)](_0x3be706(0x1ab)[_0x3be706(0x1b2)](0x1e)));_0x362cf6||_0x238777?console[_0x3be706(0x1ee)](_0x3be706(0x1d9)+a32_0x154379[_0x3be706(0x1a9)](_0x3be706(0x19f))):(console[_0x3be706(0x1ee)](_0x3be706(0x1db)+getApiDomain()),console[_0x3be706(0x1ee)]('\x20\x20userDomain:\x20\x20\x20\x20\x20\x20'+getUserDomain()),console['log'](_0x3be706(0x1a4)+getRuntimeDomain()),console['log']('\x20\x20skillDomain:\x20\x20\x20\x20\x20'+getSkillDomain()),console[_0x3be706(0x1ee)](_0x3be706(0x1b0)+(getKbServiceDomain()??_0x3be706(0x1d4))));console[_0x3be706(0x1ee)](),console[_0x3be706(0x1ee)](a32_0x154379[_0x3be706(0x19a)](_0x3be706(0x209))),console[_0x3be706(0x1ee)](a32_0x154379[_0x3be706(0x1d5)]('\x20\x20─'[_0x3be706(0x1b2)](0x1e)));const _0x1e39ab=inspectServiceRegistry();console[_0x3be706(0x1ee)](_0x3be706(0x1b8)+_0x1e39ab['registryPath']),console[_0x3be706(0x1ee)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+formatServiceRegistryStatus(_0x1e39ab)),console[_0x3be706(0x1ee)]('\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1e39ab[_0x3be706(0x20f)]),console[_0x3be706(0x1ee)](_0x3be706(0x202)+_0x1e39ab[_0x3be706(0x1ae)]);for(const _0x5b6651 of _0x1e39ab['services']){console[_0x3be706(0x1ee)]('\x20\x20'+(_0x5b6651[_0x3be706(0x1e9)]+':')[_0x3be706(0x1d2)](0x11)+'\x20'+(_0x5b6651['name']||a32_0x154379[_0x3be706(0x1d5)]('(unnamed)'))+'\x20('+_0x5b6651[_0x3be706(0x1ae)]+_0x3be706(0x1f4)),console[_0x3be706(0x1ee)]('\x20\x20'+''[_0x3be706(0x1d2)](0x11)+_0x3be706(0x1e8)+_0x5b6651['source'][_0x3be706(0x1c9)]);}return console[_0x3be706(0x1ee)](),console[_0x3be706(0x1ee)](a32_0x154379['bold'](_0x3be706(0x213))),console[_0x3be706(0x1ee)](a32_0x154379[_0x3be706(0x1d5)](_0x3be706(0x1ab)[_0x3be706(0x1b2)](0x1e))),console[_0x3be706(0x1ee)](_0x3be706(0x1f2)+a32_0x154379[_0x3be706(0x1b3)](AUTH_MODE['ClientAk']+'\x20(accessKey)')),console[_0x3be706(0x1ee)](_0x3be706(0x206)+a32_0x154379[_0x3be706(0x1d5)](_0x3be706(0x1d8))),console[_0x3be706(0x1ee)](),{'ok':!![]};}function formatServiceRegistryStatus(_0x256d34){const _0x4acde0=a32_0x2d11;if(_0x256d34[_0x4acde0(0x201)]==='ok')return a32_0x154379['green'](_0x4acde0(0x1df));if(_0x256d34[_0x4acde0(0x201)]===_0x4acde0(0x1be))return a32_0x154379[_0x4acde0(0x1d5)](_0x4acde0(0x1bb));if(_0x256d34[_0x4acde0(0x201)]===_0x4acde0(0x1b1))return a32_0x154379['yellow']('⚠\x20Empty');return a32_0x154379[_0x4acde0(0x1a9)](_0x4acde0(0x19d)+(_0x256d34['message']?':\x20'+_0x256d34[_0x4acde0(0x1e7)]:''));}export const doctorDefinition={'service':a32_0x82e998(0x1a6),'command':'check','description':a32_0x82e998(0x1fd),'risk':a32_0x82e998(0x1ca),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a33_0x311ba8=a33_0x3f88;(function(_0x3eb652,_0x2ee749){const _0x46f8a3=a33_0x3f88,_0x32aebd=_0x3eb652();while(!![]){try{const _0x4f3d2f=-parseInt(_0x46f8a3(0xd4))/0x1+parseInt(_0x46f8a3(0xd7))/0x2+-parseInt(_0x46f8a3(0xce))/0x3*(parseInt(_0x46f8a3(0xcc))/0x4)+-parseInt(_0x46f8a3(0xdc))/0x5*(parseInt(_0x46f8a3(0xde))/0x6)+parseInt(_0x46f8a3(0xe1))/0x7+-parseInt(_0x46f8a3(0xd1))/0x8+parseInt(_0x46f8a3(0xca))/0x9;if(_0x4f3d2f===_0x2ee749)break;else _0x32aebd['push'](_0x32aebd['shift']());}catch(_0x12e48a){_0x32aebd['push'](_0x32aebd['shift']());}}}(a33_0x3319,0xd5242));function a33_0x3f88(_0x19efd4,_0x175b2e){_0x19efd4=_0x19efd4-0xca;const _0x3319dc=a33_0x3319();let _0x3f8836=_0x3319dc[_0x19efd4];return _0x3f8836;}import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,uploadRuntimeFile}from'../../core/api-client.js';function a33_0x3319(){const _0x6f3d55=['1470016JhEweL','query-url','str','download','File','5TJIgrv','body','2316846hMPjao','Preview:\x20upload\x20','boolean','5878320VHjdjG','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','Path\x20to\x20the\x20local\x20file\x20to\x20upload','file','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','trim','string','filePath','filepath','validation','appCode','Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','bool','22120218DehsmO','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','2284752ZunNWS','read','9BNsUvL','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','filePath\x20is\x20required.','6307296jQmtDZ','build','\x20to\x20runtime\x20app\x20','271427siPnax','path','description'];a33_0x3319=function(){return _0x6f3d55;};return a33_0x3319();}import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const FILE_FLAG={'name':a33_0x311ba8(0xe4),'type':a33_0x311ba8(0xe7),'required':!![],'description':a33_0x311ba8(0xe3)},FILEPATH_FLAG={'name':a33_0x311ba8(0xe9),'type':a33_0x311ba8(0xe7),'required':!![],'description':a33_0x311ba8(0xec)},DOWNLOAD_FLAG={'name':a33_0x311ba8(0xda),'type':a33_0x311ba8(0xe0),'description':a33_0x311ba8(0xe5)},LONG_TERM_FLAG={'name':'long-term','type':a33_0x311ba8(0xe0),'description':a33_0x311ba8(0xcb)};function requireFilePath(_0x56fdbe){const _0x107827=a33_0x311ba8,_0x34aba4=_0x56fdbe[_0x107827(0xe6)]();if(!_0x34aba4)throw CliErrors[_0x107827(0xea)](_0x107827(0xd0));return _0x34aba4;}const fileUpload={'service':a33_0x311ba8(0xe4),'command':'upload','description':a33_0x311ba8(0xe2),'risk':'read','flags':[FILE_FLAG],async 'dryRun'(_0x282069){const _0x3c0d41=a33_0x311ba8,_0x3648bb=requireRuntimeUploadFile(_0x282069['str'](_0x3c0d41(0xe4)),'File');return dryRun('POST','/client/uploadFile')[_0x3c0d41(0xdd)]({'appCode':_0x282069[_0x3c0d41(0xeb)],'multipart':{'file':_0x3648bb}})[_0x3c0d41(0xd6)](_0x3c0d41(0xdf)+_0x3648bb[_0x3c0d41(0xd5)]+_0x3c0d41(0xd3)+_0x282069[_0x3c0d41(0xeb)])[_0x3c0d41(0xd2)]();},async 'execute'(_0x108263){const _0x5708bb=a33_0x311ba8,_0x346c04=requireRuntimeUploadFile(_0x108263[_0x5708bb(0xd9)]('file'),_0x5708bb(0xdb)),_0x8ba94d=await uploadRuntimeFile(_0x108263[_0x5708bb(0xeb)],_0x346c04['path']);return{'ok':!![],'data':_0x8ba94d,'message':_0x8ba94d[_0x5708bb(0xe8)]?'Uploaded\x20file:\x20'+_0x8ba94d['filePath']+'.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.':'Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.'};}},fileQueryUrl={'service':a33_0x311ba8(0xe4),'command':a33_0x311ba8(0xd8),'description':a33_0x311ba8(0xcf),'risk':a33_0x311ba8(0xcd),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x37656c){const _0x794e81=a33_0x311ba8,_0x31ec5=requireFilePath(_0x37656c[_0x794e81(0xd9)](_0x794e81(0xe9))),_0xcfff1e=await queryRuntimeFileUrl(_0x31ec5,{'download':_0x37656c['bool'](_0x794e81(0xda)),'longTerm':_0x37656c[_0x794e81(0xed)]('long-term')});return{'ok':!![],'data':_0xcfff1e};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
|
package/lib/commands/init.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a34_0x5d8578=a34_0x20ec;(function(_0x2badca,_0x320095){const _0x5d7d9a=a34_0x20ec,_0x3e0118=_0x2badca();while(!![]){try{const _0x55b9e6=-parseInt(_0x5d7d9a(0x1e7))/0x1*(parseInt(_0x5d7d9a(0x1f4))/0x2)+-parseInt(_0x5d7d9a(0x1d9))/0x3+parseInt(_0x5d7d9a(0x1d3))/0x4*(parseInt(_0x5d7d9a(0x1e0))/0x5)+-parseInt(_0x5d7d9a(0x1f0))/0x6+-parseInt(_0x5d7d9a(0x1db))/0x7+-parseInt(_0x5d7d9a(0x1e8))/0x8+parseInt(_0x5d7d9a(0x1ea))/0x9;if(_0x55b9e6===_0x320095)break;else _0x3e0118['push'](_0x3e0118['shift']());}catch(_0x1ad88a){_0x3e0118['push'](_0x3e0118['shift']());}}}(a34_0x13a3,0x9044b));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_0x5d8578(0x1e5),'type':a34_0x5d8578(0x1d6),'description':a34_0x5d8578(0x1dd),'required':!![]},{'name':a34_0x5d8578(0x1ed),'type':'string','description':'Override\x20imported\x20default\x20appcode'},{'name':a34_0x5d8578(0x1d4),'type':a34_0x5d8578(0x1d6),'description':a34_0x5d8578(0x1f2),'enum':[...RUNTIME_ENV_VALUES]},{'name':a34_0x5d8578(0x1ef),'type':a34_0x5d8578(0x1e6),'description':a34_0x5d8578(0x1d7)+PRODUCT_CONFIG['newConfigFileName']+a34_0x5d8578(0x1fa),'default':![]},{'name':'yes','type':a34_0x5d8578(0x1e6),'description':'Skip\x20confirmation\x20when\x20overwriting','default':![]}];function a34_0x13a3(){const _0x3317ef=['parse','238940eCEehX','app','validation','apps','defaultApp','file','boolean','1783AxRjKR','6459432gDLZXJ','log','38350593IHVbQe','entries','project','appcode','utf8','global','7025610fskgiC','Invalid\x20env\x20\x22','Override\x20imported\x20default\x20env','yes','644HiPpEk','\x20\x20config:\x20\x20','\x20\x20appcode:\x20','Source\x20file\x20not\x20found:\x20','Imported\x20from\x20','includes',')\x20instead\x20of\x20project','riskLevel','message','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','join','\x22.\x20Allowed:\x20','8SSYHZY','env','object','string','Write\x20to\x20global\x20(~/','\x20\x20default:\x20','2307006mMZOkI','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','3110366LfVPFK','cwd','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.'];a34_0x13a3=function(){return _0x3317ef;};return a34_0x13a3();}export async function runAppImport(_0x5ba841){const _0x2de84b=a34_0x5d8578,_0x48d2e1=_0x5ba841[_0x2de84b(0x1ef)]?_0x2de84b(0x1ef):_0x2de84b(0x1ec),_0x39df0c=resolveWriteConfigPath(_0x48d2e1);await runFromImport(_0x5ba841,_0x39df0c);}async function runFromImport(_0x4a0ddc,_0x356608){const _0x362af3=a34_0x5d8578,_0x16bd7a=resolveFilePath(_0x4a0ddc['file']);if(!existsSync(_0x16bd7a))throw CliErrors[_0x362af3(0x1e2)](_0x362af3(0x1f7)+_0x16bd7a);const _0x357045=readSourceFile(_0x16bd7a),_0x1a8139=convertToRuntimeConfig(_0x357045);_0x4a0ddc[_0x362af3(0x1ed)]&&(_0x1a8139[_0x362af3(0x1ed)]=String(_0x4a0ddc[_0x362af3(0x1ed)]));_0x4a0ddc['env']&&(_0x1a8139[_0x362af3(0x1d4)]=resolveImportEnv(_0x4a0ddc));if(!_0x1a8139['appcode'])throw CliErrors['validation'](_0x362af3(0x1de),'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`.');await writeImportConfig(_0x356608,_0x1a8139,_0x4a0ddc),console[_0x362af3(0x1e9)](_0x362af3(0x1f8)+_0x16bd7a),console[_0x362af3(0x1e9)](_0x362af3(0x1f5)+_0x356608),console[_0x362af3(0x1e9)](_0x362af3(0x1f6)+_0x1a8139[_0x362af3(0x1ed)]);if(_0x1a8139[_0x362af3(0x1e4)])console['log'](_0x362af3(0x1d8)+_0x1a8139[_0x362af3(0x1e4)]);}function convertToRuntimeConfig(_0x5ca210){const _0x4ad7ca=a34_0x5d8578;if(_0x5ca210[_0x4ad7ca(0x1e3)]&&typeof _0x5ca210[_0x4ad7ca(0x1e3)]===_0x4ad7ca(0x1d5))throw CliErrors[_0x4ad7ca(0x1e2)](_0x4ad7ca(0x1da),_0x4ad7ca(0x1d0));const _0x369036={};for(const _0x20c498 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x5ca210[_0x20c498]!==undefined&&(_0x369036[_0x20c498]=_0x5ca210[_0x20c498]);}return!_0x369036['riskLevel']&&(_0x369036[_0x4ad7ca(0x1fb)]=DEFAULT_CONFIG_VALUES['riskLevel']),_0x369036;}async function writeImportConfig(_0x3e7eae,_0x1b9c36,_0x10e3ba){const _0x5453c6=a34_0x5d8578;let _0x124ba3={};existsSync(_0x3e7eae)&&!_0x10e3ba[_0x5453c6(0x1f3)]&&(_0x124ba3=readConfigFile(_0x3e7eae));for(const [_0xa67144,_0x22efc2]of Object[_0x5453c6(0x1eb)](_0x1b9c36)){_0x22efc2!==undefined&&(_0x124ba3[_0xa67144]=_0x22efc2);}if(_0x124ba3[_0x5453c6(0x1e1)])delete _0x124ba3['app'];writeConfigFile(_0x3e7eae,_0x124ba3);}function a34_0x20ec(_0xcddd25,_0xa6a5ca){_0xcddd25=_0xcddd25-0x1cf;const _0x13a3fc=a34_0x13a3();let _0x20ec63=_0x13a3fc[_0xcddd25];return _0x20ec63;}function resolveFilePath(_0x1c8812){const _0x4049ba=a34_0x5d8578;return isAbsolute(_0x1c8812)?_0x1c8812:resolve(process[_0x4049ba(0x1dc)](),_0x1c8812);}function readSourceFile(_0x4b8e03){const _0x4eb4e7=a34_0x5d8578;try{const _0x1b4891=readFileSync(_0x4b8e03,{'encoding':_0x4eb4e7(0x1ee)});return JSON[_0x4eb4e7(0x1df)](_0x1b4891);}catch(_0x17f62f){throw CliErrors[_0x4eb4e7(0x1e2)]('Failed\x20to\x20parse\x20source\x20file:\x20'+_0x17f62f[_0x4eb4e7(0x1cf)]);}}function resolveImportEnv(_0x5b96b8){const _0x1db143=a34_0x5d8578,_0x7e8aaa=_0x5b96b8[_0x1db143(0x1d4)];if(_0x7e8aaa===undefined||_0x7e8aaa==='')return DEFAULT_CONFIG_VALUES['env'];if(!RUNTIME_ENV_VALUES[_0x1db143(0x1f9)](_0x7e8aaa))throw CliErrors[_0x1db143(0x1e2)](_0x1db143(0x1f1)+_0x7e8aaa+_0x1db143(0x1d2)+RUNTIME_ENV_VALUES[_0x1db143(0x1d1)](',\x20'));return _0x7e8aaa;}
|
package/lib/commands/kb/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a35_0x511339=a35_0x5554;(function(_0x2b2c8e,_0x448d4d){const _0x504467=a35_0x5554,_0x11db6b=_0x2b2c8e();while(!![]){try{const _0x446ba=parseInt(_0x504467(0xfa))/0x1*(-parseInt(_0x504467(0xd2))/0x2)+-parseInt(_0x504467(0xdd))/0x3*(parseInt(_0x504467(0xcc))/0x4)+-parseInt(_0x504467(0xd7))/0x5+parseInt(_0x504467(0xdf))/0x6+parseInt(_0x504467(0xc6))/0x7*(parseInt(_0x504467(0xeb))/0x8)+-parseInt(_0x504467(0xc8))/0x9*(-parseInt(_0x504467(0xdc))/0xa)+parseInt(_0x504467(0xef))/0xb;if(_0x446ba===_0x448d4d)break;else _0x11db6b['push'](_0x11db6b['shift']());}catch(_0x934cee){_0x11db6b['push'](_0x11db6b['shift']());}}}(a35_0x4d9e,0xec07c));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalKnowledgeBaseItem,getPersonalKnowledgeBaseItem,listPersonalKnowledgeBaseItems,updatePersonalKnowledgeBaseItem}from'../../core/api-client.js';function a35_0x5554(_0x2e9863,_0xee718){_0x2e9863=_0x2e9863-0xbb;const _0x4d9e8e=a35_0x4d9e();let _0x555470=_0x4d9e8e[_0x2e9863];return _0x555470;}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';import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':a35_0x511339(0xd4),'type':a35_0x511339(0xe9),'required':!![],'description':a35_0x511339(0xed)},FILE_FLAG={'name':a35_0x511339(0xe7),'type':a35_0x511339(0xe9),'required':!![],'description':a35_0x511339(0xf9)},QUERY_FLAG={'name':a35_0x511339(0xfb),'type':'string','required':!![],'description':a35_0x511339(0xbe)},TOPK_FLAG={'name':a35_0x511339(0xe8),'type':a35_0x511339(0xbd),'description':'Maximum\x20number\x20of\x20search\x20hits\x20to\x20return'};function a35_0x4d9e(){const _0x57ecdb=['Updated\x20KB\x20entry\x20','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','1791241cqEGhK','query','KB\x20Service\x20is\x20not\x20configured\x20for\x20knowledge\x20search.','str','body','dryRun','scope','accessKey','create','number','Search\x20query\x20for\x20visible\x20public,\x20company,\x20and\x20personal\x20knowledge','File\x20is\x20not\x20a\x20regular\x20file:\x20','Override\x20the\x20existing\x20entry\x20title','--topk\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.','execute','description','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','Saves\x20local\x20file\x20content\x20as\x20a\x20personal\x20knowledge-base\x20entry\x20and\x20starts\x20retrieval\x20sync.','21gsUFhV','map','18666cpJtRF','isFile','Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','num','24WjaQWH','ragStatus','/client/knowledge-base/personal','POST','read','build','2lsWHwg','ragErrorMessage','title','validation','version','1301285RsdOef','Personal\x20knowledge-base\x20entry\x20ID','length','kb-service-url','Configure\x20kbServiceDomain\x20in\x20the\x20connection\x20settings,\x20or\x20pass\x20`--kb-service-url\x20<https-origin>`\x20for\x20this\x20request.','2900kFAPuW','892236wTiAph','isSafeInteger','127140NRCbOd','write','Replaces\x20the\x20personal\x20knowledge-base\x20entry\x20body\x20with\x20local\x20file\x20content\x20and\x20triggers\x20retrieval\x20sync.','userId','detail','Created\x20KB\x20entry\x20','Optional\x20trusted\x20KB\x20Service\x20HTTPS\x20origin\x20for\x20this\x20request\x20only','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','file','topk','string','utf8','4865264DzIXhx','updateTime','Personal\x20knowledge-base\x20entry\x20title','signal','25911886MImQtv','content','flag','list','Search\x20visible\x20public,\x20company,\x20and\x20personal\x20knowledge','path','createTime','appCode','trim'];a35_0x4d9e=function(){return _0x57ecdb;};return a35_0x4d9e();}function readKnowledgeFile(_0x48cdd6){const _0x35798b=a35_0x511339;if(!_0x48cdd6)throw CliErrors['validation']('File\x20path\x20is\x20required.');if(!existsSync(_0x48cdd6))throw CliErrors[_0x35798b(0xd5)]('File\x20not\x20found:\x20'+_0x48cdd6);if(!statSync(_0x48cdd6)[_0x35798b(0xc9)]())throw CliErrors[_0x35798b(0xd5)](_0x35798b(0xbf)+_0x48cdd6);return readFileSync(_0x48cdd6,_0x35798b(0xea));}function summarizePersonalItem(_0x222740){const _0x3fc5cf=a35_0x511339;return{'id':_0x222740['id'],'title':_0x222740['title'],'version':_0x222740[_0x3fc5cf(0xd6)],'ragStatus':_0x222740['ragStatus'],'ragErrorMessage':_0x222740[_0x3fc5cf(0xd3)],'updateTime':_0x222740[_0x3fc5cf(0xec)]};}function detailPersonalItem(_0x59ac27){const _0x28d8cc=a35_0x511339;return{'id':_0x59ac27['id'],'appCode':_0x59ac27[_0x28d8cc(0xf6)],'scope':_0x59ac27[_0x28d8cc(0x100)],'userId':_0x59ac27[_0x28d8cc(0xe2)],'title':_0x59ac27[_0x28d8cc(0xd4)],'content':_0x59ac27[_0x28d8cc(0xf0)],'version':_0x59ac27['version'],'ragStatus':_0x59ac27[_0x28d8cc(0xcd)],'ragErrorMessage':_0x59ac27[_0x28d8cc(0xd3)],'createTime':_0x59ac27[_0x28d8cc(0xf5)],'updateTime':_0x59ac27['updateTime']};}function readTopK(_0x41fdd2){const _0x564f02=a35_0x511339,_0x52b503=_0x41fdd2['flag']('topk');if(_0x52b503===undefined||_0x52b503===null||_0x52b503==='')return undefined;const _0x2b2cfa=_0x41fdd2[_0x564f02(0xcb)](_0x564f02(0xe8));if(!Number[_0x564f02(0xde)](_0x2b2cfa)||_0x2b2cfa<0x1||_0x2b2cfa>0x32)throw CliErrors[_0x564f02(0xd5)](_0x564f02(0xc1));return _0x2b2cfa;}const kbList={'service':'kb','command':a35_0x511339(0xf2),'description':'List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','risk':a35_0x511339(0xd0),'flags':[VERBOSE_FLAG],async 'execute'(_0x445b62){const _0x4cf5d3=a35_0x511339,_0x18a5af=await listPersonalKnowledgeBaseItems(_0x445b62[_0x4cf5d3(0xf6)],_0x445b62[_0x4cf5d3(0xee)]);if(_0x445b62['bool']('verbose'))return{'ok':!![],'data':{'total':_0x18a5af['length'],'items':_0x18a5af}};return{'ok':!![],'data':{'total':_0x18a5af[_0x4cf5d3(0xd9)],'items':_0x18a5af[_0x4cf5d3(0xc7)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a35_0x511339(0xe3),'description':a35_0x511339(0xe6),'risk':a35_0x511339(0xd0),'flags':[{...ID_FLAG,'description':a35_0x511339(0xd8)}],async 'execute'(_0x5af017){const _0x40630f=a35_0x511339,_0x46e131=await getPersonalKnowledgeBaseItem(_0x5af017[_0x40630f(0xcb)]('id'),_0x5af017[_0x40630f(0xf6)],_0x5af017[_0x40630f(0xee)]);return{'ok':!![],'data':detailPersonalItem(_0x46e131)};}},kbCreate={'service':'kb','command':a35_0x511339(0xbc),'description':a35_0x511339(0xca),'risk':a35_0x511339(0xe0),'confirmationDescription':a35_0x511339(0xc5),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x184f83){const _0x371e41=a35_0x511339,_0x4094d1=_0x184f83[_0x371e41(0xfd)](_0x371e41(0xd4)),_0x1ffe11=readKnowledgeFile(_0x184f83['str'](_0x371e41(0xe7))),_0x451dce=await createPersonalKnowledgeBaseItem(_0x184f83[_0x371e41(0xf6)],{'title':_0x4094d1,'content':_0x1ffe11},_0x184f83[_0x371e41(0xee)]);return{'ok':!![],'data':summarizePersonalItem(_0x451dce),'message':_0x371e41(0xe4)+_0x451dce['id']+'\x20('+_0x451dce[_0x371e41(0xd4)]+')'};},async 'dryRun'(_0x36d6e3){const _0xafce7f=a35_0x511339,_0xfa5447=_0x36d6e3[_0xafce7f(0xfd)](_0xafce7f(0xd4)),_0x2cd2fe=readKnowledgeFile(_0x36d6e3[_0xafce7f(0xfd)](_0xafce7f(0xe7))),_0x5bfc49=planPersonalKnowledgeWrite(_0x36d6e3['appCode'],{'title':_0xfa5447,'content':_0x2cd2fe});return dryRun('POST',_0xafce7f(0xce)+_0x5bfc49['path'])['body']({'appCode':_0x36d6e3['appCode'],'title':_0xfa5447,'content':_0x2cd2fe})['description'](_0xafce7f(0xc4)+_0xfa5447+'\x22')['build']();}},kbUpdate={'service':'kb','command':'update','description':'Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','risk':'write','confirmationDescription':a35_0x511339(0xe1),'flags':[{...ID_FLAG,'description':'Personal\x20knowledge-base\x20entry\x20ID'},{...TITLE_FLAG,'required':![],'description':a35_0x511339(0xc0)},FILE_FLAG],async 'execute'(_0x367852){const _0x3cf1d1=a35_0x511339,_0x3e709e=_0x367852[_0x3cf1d1(0xcb)]('id'),_0x33e964=readKnowledgeFile(_0x367852[_0x3cf1d1(0xfd)]('file')),_0x41e539=_0x367852[_0x3cf1d1(0xfd)](_0x3cf1d1(0xd4))||(await getPersonalKnowledgeBaseItem(_0x3e709e,_0x367852[_0x3cf1d1(0xf6)],_0x367852['signal']))[_0x3cf1d1(0xd4)],_0x167131=await updatePersonalKnowledgeBaseItem(_0x3e709e,_0x367852['appCode'],{'title':_0x41e539,'content':_0x33e964},_0x367852[_0x3cf1d1(0xee)]);return{'ok':!![],'data':summarizePersonalItem(_0x167131),'message':_0x3cf1d1(0xf8)+_0x167131['id']+'\x20('+_0x167131['title']+')'};},async 'dryRun'(_0xc797fb){const _0x46f9b4=a35_0x511339,_0x287031=_0xc797fb[_0x46f9b4(0xcb)]('id'),_0x318c3c=readKnowledgeFile(_0xc797fb[_0x46f9b4(0xfd)](_0x46f9b4(0xe7))),_0x15c788=_0xc797fb[_0x46f9b4(0xfd)]('title')||(await getPersonalKnowledgeBaseItem(_0x287031,_0xc797fb[_0x46f9b4(0xf6)],_0xc797fb[_0x46f9b4(0xee)]))[_0x46f9b4(0xd4)],_0x3ac554=planPersonalKnowledgeWrite(_0xc797fb[_0x46f9b4(0xf6)],{'title':_0x15c788,'content':_0x318c3c},_0x287031);return dryRun(_0x46f9b4(0xcf),_0x46f9b4(0xce)+_0x3ac554[_0x46f9b4(0xf4)])[_0x46f9b4(0xfe)]({'appCode':_0xc797fb[_0x46f9b4(0xf6)],'title':_0x15c788,'content':_0x318c3c})[_0x46f9b4(0xc3)]('Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20'+_0x287031)[_0x46f9b4(0xd1)]();}};function readSearchServiceUrl(_0x3dc9a5){const _0x274a40=a35_0x511339;if(_0x3dc9a5[_0x274a40(0xf1)](_0x274a40(0xda))!==undefined)return normalizeKbServiceOrigin(_0x3dc9a5[_0x274a40(0xfd)]('kb-service-url'));const _0x5a2f5d=getKbServiceDomain();if(!_0x5a2f5d)throw CliErrors[_0x274a40(0xd5)](_0x274a40(0xfc),_0x274a40(0xdb));return normalizeKbServiceOrigin(_0x5a2f5d);}const kbSearch={'service':'kb','command':'search','description':a35_0x511339(0xf3),'risk':a35_0x511339(0xd0),'flags':[QUERY_FLAG,TOPK_FLAG,{'name':a35_0x511339(0xda),'type':a35_0x511339(0xe9),'required':![],'description':a35_0x511339(0xe5)}],async 'validate'(_0x3da291){const _0x687015=a35_0x511339;if(!_0x3da291[_0x687015(0xfd)](_0x687015(0xfb))[_0x687015(0xf7)]())throw CliErrors[_0x687015(0xd5)]('Search\x20query\x20is\x20required.');readTopK(_0x3da291),readSearchServiceUrl(_0x3da291);},async 'execute'(_0x376970){const _0x1f5765=a35_0x511339,_0x35b49b=_0x376970[_0x1f5765(0xfd)](_0x1f5765(0xfb))[_0x1f5765(0xf7)](),_0x47e5f5=readTopK(_0x376970),_0x485461=readSearchServiceUrl(_0x376970),_0xc10bed={'appCode':_0x376970[_0x1f5765(0xf6)],'accessKey':_0x376970[_0x1f5765(0xbb)]??'','query':_0x35b49b,..._0x47e5f5!==undefined?{'topK':_0x47e5f5}:{},'signal':_0x376970['signal']},_0x76fa99=await searchDirectKnowledge({..._0xc10bed,'serviceUrl':_0x485461});return{'ok':!![],'data':_0x76fa99};}};function managementCommand(_0x4ee6ee){const _0x8770cf=a35_0x511339;return{..._0x4ee6ee,'execute':_0x59d95e=>withKbManagementOrigin(()=>_0x4ee6ee[_0x8770cf(0xc2)](_0x59d95e)),..._0x4ee6ee[_0x8770cf(0xff)]?{'dryRun':_0x50f031=>withKbManagementOrigin(()=>_0x4ee6ee[_0x8770cf(0xff)](_0x50f031))}:{}};}export const kbDefinitions=[...[kbList,kbDetail,kbCreate,kbUpdate]['map'](managementCommand),kbSearch];
|
|
1
|
+
const a35_0x7a22bd=a35_0x2c13;(function(_0x444e46,_0x518779){const _0x288c6b=a35_0x2c13,_0x565bce=_0x444e46();while(!![]){try{const _0x4c2876=parseInt(_0x288c6b(0xec))/0x1*(-parseInt(_0x288c6b(0x128))/0x2)+parseInt(_0x288c6b(0xff))/0x3*(parseInt(_0x288c6b(0xf1))/0x4)+parseInt(_0x288c6b(0xea))/0x5+-parseInt(_0x288c6b(0x101))/0x6+-parseInt(_0x288c6b(0xe6))/0x7+parseInt(_0x288c6b(0xf2))/0x8*(-parseInt(_0x288c6b(0xef))/0x9)+parseInt(_0x288c6b(0x11a))/0xa;if(_0x4c2876===_0x518779)break;else _0x565bce['push'](_0x565bce['shift']());}catch(_0x4f7ed7){_0x565bce['push'](_0x565bce['shift']());}}}(a35_0xdc30,0xaec7d));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalKnowledgeBaseItem,getPersonalKnowledgeBaseItem,listPersonalKnowledgeBaseItems,updatePersonalKnowledgeBaseItem}from'../../core/api-client.js';import{searchDirectKnowledge,normalizeKbServiceOrigin}from'../../core/kb-search-client.js';function a35_0x2c13(_0x4ab914,_0x97af74){_0x4ab914=_0x4ab914-0xe4;const _0xdc3059=a35_0xdc30();let _0x2c1325=_0xdc3059[_0x4ab914];return _0x2c1325;}import{planPersonalKnowledgeWrite,withKbManagementOrigin}from'../../core/kb-management-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{getKbServiceDomain}from'../../constant/domain.js';import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':a35_0x7a22bd(0x117),'type':a35_0x7a22bd(0xfa),'required':!![],'description':a35_0x7a22bd(0x120)},FILE_FLAG={'name':a35_0x7a22bd(0x10e),'type':a35_0x7a22bd(0xfa),'required':!![],'description':'Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file'},QUERY_FLAG={'name':'query','type':a35_0x7a22bd(0xfa),'required':!![],'description':'Search\x20query\x20for\x20visible\x20public,\x20company,\x20and\x20personal\x20knowledge'},TOPK_FLAG={'name':a35_0x7a22bd(0x106),'type':a35_0x7a22bd(0xed),'description':a35_0x7a22bd(0xf9)};function readKnowledgeFile(_0x43bad0){const _0x48b601=a35_0x7a22bd;if(!_0x43bad0)throw CliErrors[_0x48b601(0xf0)](_0x48b601(0x119));if(!existsSync(_0x43bad0))throw CliErrors[_0x48b601(0xf0)](_0x48b601(0x123)+_0x43bad0);if(!statSync(_0x43bad0)[_0x48b601(0xf8)]())throw CliErrors['validation'](_0x48b601(0x10b)+_0x43bad0);return readFileSync(_0x43bad0,_0x48b601(0x125));}function summarizePersonalItem(_0x5d527e){const _0x3446ad=a35_0x7a22bd;return{'id':_0x5d527e['id'],'title':_0x5d527e[_0x3446ad(0x117)],'version':_0x5d527e[_0x3446ad(0x122)],'ragStatus':_0x5d527e[_0x3446ad(0xfd)],'ragErrorMessage':_0x5d527e[_0x3446ad(0x11b)],'updateTime':_0x5d527e[_0x3446ad(0x113)]};}function detailPersonalItem(_0x4650e0){const _0x41312d=a35_0x7a22bd;return{'id':_0x4650e0['id'],'appCode':_0x4650e0[_0x41312d(0xf4)],'scope':_0x4650e0[_0x41312d(0xf7)],'userId':_0x4650e0['userId'],'title':_0x4650e0[_0x41312d(0x117)],'content':_0x4650e0[_0x41312d(0x10f)],'version':_0x4650e0['version'],'ragStatus':_0x4650e0[_0x41312d(0xfd)],'ragErrorMessage':_0x4650e0[_0x41312d(0x11b)],'createTime':_0x4650e0['createTime'],'updateTime':_0x4650e0['updateTime']};}function readTopK(_0x1f5886){const _0x3c99b2=a35_0x7a22bd,_0x14bfcd=_0x1f5886[_0x3c99b2(0x115)](_0x3c99b2(0x106));if(_0x14bfcd===undefined||_0x14bfcd===null||_0x14bfcd==='')return undefined;const _0x524184=_0x1f5886['num'](_0x3c99b2(0x106));if(!Number[_0x3c99b2(0x10a)](_0x524184)||_0x524184<0x1||_0x524184>0x32)throw CliErrors['validation'](_0x3c99b2(0x111));return _0x524184;}const kbList={'service':'kb','command':a35_0x7a22bd(0xe8),'description':a35_0x7a22bd(0x11e),'risk':'read','flags':[VERBOSE_FLAG],async 'execute'(_0x51881c){const _0x480941=a35_0x7a22bd,_0x59543b=await listPersonalKnowledgeBaseItems(_0x51881c[_0x480941(0xf4)],_0x51881c['signal']);if(_0x51881c[_0x480941(0xeb)](_0x480941(0xe9)))return{'ok':!![],'data':{'total':_0x59543b['length'],'items':_0x59543b}};return{'ok':!![],'data':{'total':_0x59543b[_0x480941(0x10c)],'items':_0x59543b[_0x480941(0x102)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':'detail','description':a35_0x7a22bd(0x124),'risk':a35_0x7a22bd(0xfc),'flags':[{...ID_FLAG,'type':'string','description':a35_0x7a22bd(0x112)}],async 'execute'(_0x22134b){const _0x3fccfc=a35_0x7a22bd,_0x459619=await getPersonalKnowledgeBaseItem(_0x22134b[_0x3fccfc(0x118)]('id'),_0x22134b[_0x3fccfc(0xf4)],_0x22134b['signal']);return{'ok':!![],'data':detailPersonalItem(_0x459619)};}},kbCreate={'service':'kb','command':'create','description':a35_0x7a22bd(0xe4),'risk':a35_0x7a22bd(0x108),'confirmationDescription':a35_0x7a22bd(0x11f),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x392015){const _0x4d1137=a35_0x7a22bd,_0x347e72=_0x392015[_0x4d1137(0x118)](_0x4d1137(0x117)),_0x29fce6=readKnowledgeFile(_0x392015[_0x4d1137(0x118)](_0x4d1137(0x10e))),_0x2ecc33=await createPersonalKnowledgeBaseItem(_0x392015['appCode'],{'title':_0x347e72,'content':_0x29fce6},_0x392015[_0x4d1137(0xfe)]);return{'ok':!![],'data':summarizePersonalItem(_0x2ecc33),'message':_0x4d1137(0x127)+_0x2ecc33['id']+'\x20('+_0x2ecc33['title']+')'};},async 'dryRun'(_0x41ec9){const _0x51f83a=a35_0x7a22bd,_0x5651a6=_0x41ec9[_0x51f83a(0x118)](_0x51f83a(0x117)),_0x3a4288=readKnowledgeFile(_0x41ec9[_0x51f83a(0x118)](_0x51f83a(0x10e))),_0x1de072=planPersonalKnowledgeWrite(_0x41ec9['appCode'],{'title':_0x5651a6,'content':_0x3a4288});return dryRun(_0x1de072['method'],_0x1de072[_0x51f83a(0x11c)])[_0x51f83a(0xee)](JSON['parse'](_0x1de072[_0x51f83a(0x110)]))[_0x51f83a(0xe7)]('Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22'+_0x5651a6+'\x22')[_0x51f83a(0xf3)]();}},kbUpdate={'service':'kb','command':a35_0x7a22bd(0x114),'description':'Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','risk':a35_0x7a22bd(0x108),'confirmationDescription':'Replaces\x20the\x20personal\x20knowledge-base\x20entry\x20body\x20with\x20local\x20file\x20content\x20and\x20triggers\x20retrieval\x20sync.','flags':[{...ID_FLAG,'type':a35_0x7a22bd(0xfa),'description':a35_0x7a22bd(0x112)},{...TITLE_FLAG,'required':![],'description':a35_0x7a22bd(0xe5)},FILE_FLAG],async 'execute'(_0x569d38){const _0x7b55d6=a35_0x7a22bd,_0x5420da=_0x569d38[_0x7b55d6(0x118)]('id'),_0x9ade83=readKnowledgeFile(_0x569d38[_0x7b55d6(0x118)](_0x7b55d6(0x10e))),_0x5b8847=_0x569d38[_0x7b55d6(0x118)](_0x7b55d6(0x117))||undefined,_0x2f7e79=await updatePersonalKnowledgeBaseItem(_0x5420da,_0x569d38[_0x7b55d6(0xf4)],{'title':_0x5b8847,'content':_0x9ade83},_0x569d38[_0x7b55d6(0xfe)]);return{'ok':!![],'data':summarizePersonalItem(_0x2f7e79),'message':_0x7b55d6(0x116)+_0x2f7e79['id']+'\x20('+_0x2f7e79[_0x7b55d6(0x117)]+')'};},async 'dryRun'(_0x2060e2){const _0x2a14d9=a35_0x7a22bd,_0x4864b1=_0x2060e2[_0x2a14d9(0x118)]('id'),_0x164ae8=readKnowledgeFile(_0x2060e2[_0x2a14d9(0x118)](_0x2a14d9(0x10e))),_0xb5c36c=await getPersonalKnowledgeBaseItem(_0x4864b1,_0x2060e2[_0x2a14d9(0xf4)],_0x2060e2['signal']),_0x3144c9=_0x2060e2[_0x2a14d9(0x118)]('title')||_0xb5c36c['title'],_0x41d3f7=planPersonalKnowledgeWrite(_0x2060e2[_0x2a14d9(0xf4)],{'title':_0x3144c9,'content':_0x164ae8},_0x4864b1,_0xb5c36c[_0x2a14d9(0x122)]);return dryRun(_0x41d3f7[_0x2a14d9(0x107)],_0x41d3f7[_0x2a14d9(0x11c)])['body'](JSON[_0x2a14d9(0x126)](_0x41d3f7[_0x2a14d9(0x110)]))['description'](_0x2a14d9(0x121)+_0x4864b1)['build']();}};function readSearchServiceUrl(_0x160393){const _0x190dcf=a35_0x7a22bd;if(_0x160393['flag']('kb-service-url')!==undefined)return normalizeKbServiceOrigin(_0x160393['str'](_0x190dcf(0xf6)));const _0x484698=getKbServiceDomain();if(!_0x484698)throw CliErrors[_0x190dcf(0xf0)](_0x190dcf(0x104),_0x190dcf(0x11d));return normalizeKbServiceOrigin(_0x484698);}const kbSearch={'service':'kb','command':a35_0x7a22bd(0x10d),'description':a35_0x7a22bd(0xfb),'risk':a35_0x7a22bd(0xfc),'flags':[QUERY_FLAG,TOPK_FLAG,{'name':a35_0x7a22bd(0xf6),'type':a35_0x7a22bd(0xfa),'required':![],'description':'Optional\x20trusted\x20KB\x20Service\x20HTTPS\x20origin\x20for\x20this\x20request\x20only'}],async 'validate'(_0x1302ab){const _0x19a08a=a35_0x7a22bd;if(!_0x1302ab[_0x19a08a(0x118)]('query')[_0x19a08a(0x100)]())throw CliErrors['validation'](_0x19a08a(0x109));readTopK(_0x1302ab),readSearchServiceUrl(_0x1302ab);},async 'execute'(_0x3bbbea){const _0x286515=a35_0x7a22bd,_0xcca883=_0x3bbbea[_0x286515(0x118)]('query')[_0x286515(0x100)](),_0x220f30=readTopK(_0x3bbbea),_0x595352=readSearchServiceUrl(_0x3bbbea),_0x5503d2={'appCode':_0x3bbbea['appCode'],'accessKey':_0x3bbbea[_0x286515(0x103)]??'','query':_0xcca883,..._0x220f30!==undefined?{'topK':_0x220f30}:{},'signal':_0x3bbbea[_0x286515(0xfe)]},_0x580b66=await searchDirectKnowledge({..._0x5503d2,'serviceUrl':_0x595352});return{'ok':!![],'data':_0x580b66};}};function a35_0xdc30(){const _0x896984=['verbose','788625SmLBMp','bool','681779blWzVQ','number','body','265347UWcNdl','validation','140cuakbp','176UyKndX','build','appCode','execute','kb-service-url','scope','isFile','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','string','Search\x20visible\x20public,\x20company,\x20and\x20personal\x20knowledge','read','ragStatus','signal','60153AyrDMd','trim','3022068PcKiQZ','map','accessKey','KB\x20Service\x20is\x20not\x20configured\x20for\x20knowledge\x20search.','dryRun','topk','method','write','Search\x20query\x20is\x20required.','isSafeInteger','File\x20is\x20not\x20a\x20regular\x20file:\x20','length','search','file','content','jsonBody','--topk\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.','Personal\x20knowledge-base\x20entry\x20ID','updateTime','update','flag','Updated\x20KB\x20entry\x20','title','str','File\x20path\x20is\x20required.','37539550hTDSiO','ragErrorMessage','path','Configure\x20kbServiceDomain\x20in\x20the\x20connection\x20settings,\x20or\x20pass\x20`--kb-service-url\x20<https-origin>`\x20for\x20this\x20request.','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','Saves\x20local\x20file\x20content\x20as\x20a\x20personal\x20knowledge-base\x20entry\x20and\x20starts\x20retrieval\x20sync.','Personal\x20knowledge-base\x20entry\x20title','Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20','version','File\x20not\x20found:\x20','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','utf8','parse','Created\x20KB\x20entry\x20','4irJeLw','Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','Override\x20the\x20existing\x20entry\x20title','9671914PWpesT','description','list'];a35_0xdc30=function(){return _0x896984;};return a35_0xdc30();}function managementCommand(_0x1a7858){const _0x2a2642=a35_0x7a22bd;return{..._0x1a7858,'execute':_0x312a35=>withKbManagementOrigin(()=>_0x1a7858[_0x2a2642(0xf5)](_0x312a35)),..._0x1a7858['dryRun']?{'dryRun':_0x4e8523=>withKbManagementOrigin(()=>_0x1a7858[_0x2a2642(0x105)](_0x4e8523))}:{}};}export const kbDefinitions=[...[kbList,kbDetail,kbCreate,kbUpdate][a35_0x7a22bd(0x102)](managementCommand),kbSearch];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a36_0x5f3803=a36_0x5dd8;function a36_0xdd64(){const _0x414403=['110rbXUCI','1735122pSuzCR','details','186qZBmDQ','1230876ofPrEO','length','timestamp','873048kOxomy','\x20\x20\x20Duration:\x20','stringify','4212VbJghu','forEach','level','duration','success','en-US','45WmsEsV','\x20\x20\x20Details:\x20','keys','\x20logs:\x0a','\x20\x20\x20Time:\x20','logs','readLogs','909970LXyypE','41812USAVmG','9848JqRwWw','warn','log','6524cPmyaA','*\x20No\x20logs\x20found','7SWgHlL','command'];a36_0xdd64=function(){return _0x414403;};return a36_0xdd64();}(function(_0x260186,_0x4edc2f){const _0x5ab60a=a36_0x5dd8,_0x23c021=_0x260186();while(!![]){try{const _0x37f1f7=-parseInt(_0x5ab60a(0x96))/0x1*(parseInt(_0x5ab60a(0x8f))/0x2)+parseInt(_0x5ab60a(0x9a))/0x3+parseInt(_0x5ab60a(0x8b))/0x4*(-parseInt(_0x5ab60a(0x83))/0x5)+parseInt(_0x5ab60a(0x94))/0x6*(-parseInt(_0x5ab60a(0x91))/0x7)+-parseInt(_0x5ab60a(0x8c))/0x8*(-parseInt(_0x5ab60a(0x9d))/0x9)+parseInt(_0x5ab60a(0x8a))/0xa*(parseInt(_0x5ab60a(0x93))/0xb)+-parseInt(_0x5ab60a(0x97))/0xc;if(_0x37f1f7===_0x4edc2f)break;else _0x23c021['push'](_0x23c021['shift']());}catch(_0x25dcf2){_0x23c021['push'](_0x23c021['shift']());}}}(a36_0xdd64,0xa71ed));function a36_0x5dd8(_0x4f6981,_0x7d2f72){_0x4f6981=_0x4f6981-0x80;const _0xdd64b8=a36_0xdd64();let _0x5dd813=_0xdd64b8[_0x4f6981];return _0x5dd813;}import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function printLogs(_0xa1236){const _0x11bcc4=a36_0x5dd8;if(_0xa1236[_0x11bcc4(0x98)]===0x0){console[_0x11bcc4(0x8e)](_0x11bcc4(0x90));return;}console[_0x11bcc4(0x8e)]('*\x20'+CLI_DISPLAY_NAME+_0x11bcc4(0x86)),_0xa1236[_0x11bcc4(0x9e)]((_0x137bd5,_0x149157)=>{const _0x3b7d01=_0x11bcc4,_0x4e67ad=new Date(_0x137bd5[_0x3b7d01(0x99)])['toLocaleString'](_0x3b7d01(0x82)),_0x471a27=_0x137bd5[_0x3b7d01(0x9f)]===_0x3b7d01(0x81)?'√':_0x137bd5[_0x3b7d01(0x9f)]==='error'?'×':_0x137bd5[_0x3b7d01(0x9f)]===_0x3b7d01(0x8d)?'!':'i';console['log'](_0x149157+0x1+'.\x20'+_0x471a27+'\x20['+_0x137bd5[_0x3b7d01(0x92)]+']\x20'+_0x137bd5['message']),console[_0x3b7d01(0x8e)](_0x3b7d01(0x87)+_0x4e67ad),_0x137bd5['duration']&&console['log'](_0x3b7d01(0x9b)+_0x137bd5[_0x3b7d01(0x80)]+'ms'),_0x137bd5[_0x3b7d01(0x95)]&&Object[_0x3b7d01(0x85)](_0x137bd5[_0x3b7d01(0x95)])[_0x3b7d01(0x98)]>0x0&&console[_0x3b7d01(0x8e)](_0x3b7d01(0x84)+JSON[_0x3b7d01(0x9c)](_0x137bd5[_0x3b7d01(0x95)],null,0x2)),console[_0x3b7d01(0x8e)]('');});}export const logsDefinitions=[{'service':a36_0x5f3803(0x88),'command':'show','description':'View\x20command\x20history\x20logs','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x35f7bd){const _0x422a51=a36_0x5f3803;return printLogs(logger[_0x422a51(0x89)]()),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a37_0x16eec8=a37_0x555f;(function(_0xa0f00c,_0x405489){const _0x45e337=a37_0x555f,_0x1ca5d8=_0xa0f00c();while(!![]){try{const _0x317a2a=parseInt(_0x45e337(0x162))/0x1*(-parseInt(_0x45e337(0x165))/0x2)+parseInt(_0x45e337(0x16a))/0x3*(parseInt(_0x45e337(0x163))/0x4)+parseInt(_0x45e337(0x161))/0x5+-parseInt(_0x45e337(0x16d))/0x6+parseInt(_0x45e337(0x166))/0x7*(parseInt(_0x45e337(0x16e))/0x8)+parseInt(_0x45e337(0x170))/0x9+parseInt(_0x45e337(0x15c))/0xa*(-parseInt(_0x45e337(0x160))/0xb);if(_0x317a2a===_0x405489)break;else _0x1ca5d8['push'](_0x1ca5d8['shift']());}catch(_0x2553e3){_0x1ca5d8['push'](_0x1ca5d8['shift']());}}}(a37_0x58ca,0x989a8));function a37_0x58ca(){const _0x3e00d=['1391352zKyJKa','Notification\x20channel\x20type','3629637TByCxR','9455870NWwLTs','type','map','\x20notification\x20config(s)','11ShVZWD','3990300lZQrtO','312184NOYfcB','8xkLlnx','notification','6rHbeFH','21eNGOaK','EMAIL','appCode','config-list','1458618vAfawe','length','string','1129914ZpvgXa'];a37_0x58ca=function(){return _0x3e00d;};return a37_0x58ca();}import{listNotificationChannelConfigs}from'../../core/api-client.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';function a37_0x555f(_0x4ff5a2,_0x460df8){_0x4ff5a2=_0x4ff5a2-0x15c;const _0x58cac2=a37_0x58ca();let _0x555f64=_0x58cac2[_0x4ff5a2];return _0x555f64;}export const notificationConfigList={'service':a37_0x16eec8(0x164),'command':a37_0x16eec8(0x169),'description':'List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','risk':'read','flags':[{'name':a37_0x16eec8(0x15d),'type':a37_0x16eec8(0x16c),'description':a37_0x16eec8(0x16f),'enum':NOTIFICATION_CHANNEL_TYPES,'default':a37_0x16eec8(0x167)}],async 'validate'(_0x161748){readNotificationChannelType(_0x161748);},async 'execute'(_0xd73e4b){const _0x4d3ffe=a37_0x16eec8,_0x5ab206=readNotificationChannelType(_0xd73e4b),_0x465d63=await listNotificationChannelConfigs(_0xd73e4b[_0x4d3ffe(0x168)],_0x5ab206),_0x16df97=_0x465d63[_0x4d3ffe(0x15e)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0xd73e4b['appCode'],'channelType':_0x5ab206,'count':_0x16df97[_0x4d3ffe(0x16b)],'configs':_0x16df97},'message':'Found\x20'+_0x16df97[_0x4d3ffe(0x16b)]+'\x20'+_0x5ab206+_0x4d3ffe(0x15f)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a38_0x2c4b(){const _0x3849e6=['77qDviSs','149BQokyE','2546055RRhlAf','5166588bjcBXK','2717589RnAxib','368538nKjmSk','32rciHCt','28bldwai','12806iCPzPJ','1031841vkijeY','562930jqFvCl'];a38_0x2c4b=function(){return _0x3849e6;};return a38_0x2c4b();}function a38_0x2184(_0xcc7f13,_0x5856d4){_0xcc7f13=_0xcc7f13-0xbe;const _0x2c4bf1=a38_0x2c4b();let _0x21845a=_0x2c4bf1[_0xcc7f13];return _0x21845a;}(function(_0x134c53,_0x2970ab){const _0x56c6af=a38_0x2184,_0x338117=_0x134c53();while(!![]){try{const _0x200ca6=-parseInt(_0x56c6af(0xc7))/0x1*(parseInt(_0x56c6af(0xc3))/0x2)+parseInt(_0x56c6af(0xc0))/0x3*(parseInt(_0x56c6af(0xc2))/0x4)+-parseInt(_0x56c6af(0xc8))/0x5+parseInt(_0x56c6af(0xbe))/0x6+parseInt(_0x56c6af(0xbf))/0x7+-parseInt(_0x56c6af(0xc1))/0x8*(parseInt(_0x56c6af(0xc4))/0x9)+parseInt(_0x56c6af(0xc5))/0xa*(parseInt(_0x56c6af(0xc6))/0xb);if(_0x200ca6===_0x2970ab)break;else _0x338117['push'](_0x338117['shift']());}catch(_0x2cc218){_0x338117['push'](_0x338117['shift']());}}}(a38_0x2c4b,0x8df44));import{notificationConfigList}from'../../commands/notification/config-list.js';export const notificationDefinitions=[notificationConfigList];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a39_0x2d6e8e=a39_0xd8a5;(function(_0x2995b6,_0xdbf2df){const _0x245c89=a39_0xd8a5,_0x124c08=_0x2995b6();while(!![]){try{const _0x276c16=parseInt(_0x245c89(0x81))/0x1+parseInt(_0x245c89(0x98))/0x2*(-parseInt(_0x245c89(0x97))/0x3)+parseInt(_0x245c89(0x93))/0x4*(parseInt(_0x245c89(0x83))/0x5)+-parseInt(_0x245c89(0x7f))/0x6*(parseInt(_0x245c89(0x92))/0x7)+-parseInt(_0x245c89(0x96))/0x8+-parseInt(_0x245c89(0x8a))/0x9+parseInt(_0x245c89(0x8b))/0xa;if(_0x276c16===_0xdbf2df)break;else _0x124c08['push'](_0x124c08['shift']());}catch(_0x23d5eb){_0x124c08['push'](_0x124c08['shift']());}}}(a39_0x1c74,0xb733a));import{CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=[a39_0x2d6e8e(0x82),'FEISHU','DINGTALK',a39_0x2d6e8e(0x80),'WEBHOOK'];function a39_0xd8a5(_0x11681a,_0x269009){_0x11681a=_0x11681a-0x7f;const _0x1c740e=a39_0x1c74();let _0xd8a5d7=_0x1c740e[_0x11681a];return _0xd8a5d7;}export function readNotificationChannelType(_0xfe79dc){const _0x4bfdf8=a39_0x2d6e8e,_0x1a0f45=_0xfe79dc[_0x4bfdf8(0x86)](_0x4bfdf8(0x9b))['trim']()||_0x4bfdf8(0x82);if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x1a0f45))throw CliErrors[_0x4bfdf8(0x8c)](_0x4bfdf8(0x88)+_0x1a0f45,_0x4bfdf8(0x91)+NOTIFICATION_CHANNEL_TYPES[_0x4bfdf8(0x94)](',\x20')+'.');return _0x1a0f45;}function a39_0x1c74(){const _0x3afe9e=['channelType','type','isArray','12TZBuJp','WECOM','852012gOADtx','EMAIL','35TcdGtX','\x20must\x20be\x20an\x20object.','string','str','trim','Invalid\x20--type:\x20','\x20is\x20missing\x20required\x20field\x20\x22','11244987qeMsqN','44829690eizKIN','validation','object','Invalid\x20notification\x20config\x20response.','Item\x20','description','Allowed\x20values:\x20','5097813ETqYwM','328052kZTHPr','join','configCode','8482152PzylbX','4177344zkKrCm','2Jqtpvn','apiError'];a39_0x1c74=function(){return _0x3afe9e;};return a39_0x1c74();}export function projectNotificationListConfig(_0x494d64,_0x52be39){const _0x145a21=a39_0x2d6e8e,_0x21ae9a=requireResponseObject(_0x494d64,_0x52be39);return{'configCode':requireResponseString(_0x21ae9a[_0x145a21(0x95)],_0x145a21(0x95),_0x52be39),'configName':requireResponseString(_0x21ae9a['configName'],'configName',_0x52be39),'channelType':requireResponseString(_0x21ae9a[_0x145a21(0x9a)],'channelType',_0x52be39),'description':normalizeNullableString(_0x21ae9a[_0x145a21(0x90)])};}function requireResponseObject(_0x6e9e8e,_0x63561f){const _0x58b6cc=a39_0x2d6e8e;if(typeof _0x6e9e8e!==_0x58b6cc(0x8d)||_0x6e9e8e===null||Array[_0x58b6cc(0x9c)](_0x6e9e8e))throw CliErrors[_0x58b6cc(0x99)](_0x58b6cc(0x8e),'Item\x20'+(_0x63561f+0x1)+_0x58b6cc(0x84));return _0x6e9e8e;}function requireResponseString(_0x131fbb,_0x1f4e72,_0x42a77a){const _0x554201=a39_0x2d6e8e;if(typeof _0x131fbb!==_0x554201(0x85)||!_0x131fbb[_0x554201(0x87)]())throw CliErrors[_0x554201(0x99)]('Invalid\x20notification\x20config\x20response.',_0x554201(0x8f)+(_0x42a77a+0x1)+_0x554201(0x89)+_0x1f4e72+'\x22.');return _0x131fbb[_0x554201(0x87)]();}function normalizeNullableString(_0x2bbd29){const _0x5c6b12=a39_0x2d6e8e;return typeof _0x2bbd29===_0x5c6b12(0x85)&&_0x2bbd29['trim']()?_0x2bbd29[_0x5c6b12(0x87)]():null;}
|