@lovrabet/lovrabet-cli 2.3.6 → 2.3.7-beta.1
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_0x4ddba3=a27_0x4e32;(function(_0x26a1ea,_0xd7e7bc){const _0x4eb3d2=a27_0x4e32,_0x1fff23=_0x26a1ea();while(!![]){try{const _0x148cef=parseInt(_0x4eb3d2(0x1c1))/0x1+parseInt(_0x4eb3d2(0x1a0))/0x2+parseInt(_0x4eb3d2(0x1d0))/0x3+-parseInt(_0x4eb3d2(0x1cb))/0x4+-parseInt(_0x4eb3d2(0x173))/0x5+parseInt(_0x4eb3d2(0x1c7))/0x6*(-parseInt(_0x4eb3d2(0x174))/0x7)+parseInt(_0x4eb3d2(0x18c))/0x8;if(_0x148cef===_0xd7e7bc)break;else _0x1fff23['push'](_0x1fff23['shift']());}catch(_0x3c2c06){_0x1fff23['push'](_0x1fff23['shift']());}}}(a27_0x1422,0xc6806));import{dataImportExcel}from'./import-excel.js';import{executeData}from'../../core/sdk-client.js';import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{requireAnyOf}from'../../commands/common/constraints.js';function a27_0x1422(){const _0x317f63=['\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','getOne','write','6pJwmYZ','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','\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\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}}','3340880vZetuk','str','\x20\x20\x20\x20Verify\x20the\x20response\x20paging.currentPage/pageSize\x20and\x20that\x20tableData\x20satisfies\x20where\x20before\x20drawing\x20conclusions.','code','batchCreate','2823618BBhUZM','\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','length','body','\x20on\x20dataset\x20','\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]','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','Delete\x20data\x20records\x20(non-interactive\x20mode\x20requires\x20--yes)','\x20\x20\x20\x20Record\x20each\x20batch\x20and\x20verify\x20its\x20IDs\x20or\x20unique\x20business\x20keys\x20before\x20continuing.','1975280sqoEkn','10727591MJthGb','\x20\x20\x20\x20then\x20convert\x20rows\x20to\x20JSON\x20and\x20split\x20within\x20the\x20target\x20API\x20row/byte\x20and\x20local\x20argument\x20limits.','build','command','\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\x20JOIN\x20and\x20cross-table\x20aggregation\x20require\x20an\x20existing\x20trusted\x20Custom\x20SQL','\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}}','helpExtra','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Rounded\x20average\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg\x22,\x22round\x22:true,\x22precision\x22:2}','\x20\x20\x20\x20Non-Excel\x20batchCreate\x20remains\x20available\x20for\x20METADATA\x20and\x20DB_TABLE.','Create\x20one\x20record\x20in\x20the\x20dataset','\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]','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','delete','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','\x20\x20\x20\x20$and\x20\x20\x20\x20\x20\x20\x20\x20\x20All\x20conditions\x20match\x20\x20\x20{\x22$and\x22:[{\x22age\x22:{\x22$gte\x22:18}},{\x22status\x22:{\x22$eq\x22:\x22active\x22}}]}','\x20\x20\x20\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}','aggregate','filter','\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}','update','\x20\x20\x20\x20choose\x20the\x20capability\x20before\x20execution;\x20never\x20fall\x20back\x20at\x20runtime','\x20\x20\x20\x20and\x20increment\x20only\x20currentPage.\x20Use\x20a\x20stable\x20unique\x20orderBy\x20field\x20to\x20avoid\x20duplicates\x20or\x20gaps.','10205056lWZmyi','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','batch','\x20\x20\x20\x20orderBy\x20may\x20reference\x20aggregate\x20output\x20aliases','\x20\x20LOGICAL\x20COMBINATORS','\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\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','\x20\x20EXCEL\x20ROUTES','\x20\x20\x20\x20Stop\x20on\x20unknown\x20outcomes\x20or\x20conflicts;\x20reconcile\x20before\x20retrying,\x20never\x20blindly\x20resend\x20a\x20batch.','\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}]','join','\x20completed\x20in\x20','create','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','\x20\x20\x20\x20This\x20command\x20sends\x20one\x20prepared\x20batch;\x20it\x20does\x20not\x20read\x20XLSX\x20or\x20split\x20batches.','\x20\x20\x20\x20Do\x20NOT\x20use\x20--where,\x20--select,\x20--order-by,\x20--current-page,\x20--page,\x20or\x20--page-size\x20as\x20CLI\x20flags.','\x20\x20\x20\x20--dry-run\x20previews\x20the\x20request\x20only;\x20it\x20does\x20not\x20validate\x20server\x20constraints\x20or\x20write\x20permissions.','Example:\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x20\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','Deletes\x20business\x20records\x20from\x20the\x20current\x20app\x20dataset.\x20This\x20may\x20not\x20be\x20recoverable.','1423738qyFinV','\x20\x20EXAMPLES','Filter\x20dataset\x20records\x20with\x20query\x20conditions','\x20\x20PAGINATION','\x20\x20\x20\x20Built-in\x20Skill\x20guide:\x20references/lovrabet-db-table-excel-import.md','\x20\x20AGGREGATE\x20ALIAS\x20BOUNDARY','\x20\x20PARAMS\x20STRUCTURE','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','Preview:\x20data\x20','data\x20','\x20\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','dryRun','read','Changes\x20an\x20existing\x20business\x20record\x20in\x20the\x20current\x20app\x20dataset.\x20The\x20new\x20values\x20are\x20saved\x20immediately\x20after\x20confirmation.','Update\x20an\x20existing\x20data\x20record','confirmationDescription','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20id\x20may\x20be\x20a\x20single\x20value\x20or\x20array.\x20','params','\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\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','Get\x20a\x20single\x20record\x20by\x20ID','\x20\x20\x20\x20Filtering\x20and\x20pagination\x20are\x20controlled\x20only\x20via\x20one\x20JSON\x20object\x20in\x20--params.','description','operation','risk','\x20\x20\x20\x20No\x20import\x20checkpoint,\x20--resume,\x20automatic\x20upsert,\x20or\x20atomic\x20rollback\x20guarantee.','\x20\x20AGGREGATE\x20TYPES','\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}','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','\x20\x20\x20\x20METADATA:\x20use\x20lovrabet\x20data\x20import-excel\x20with\x20checkpoint\x20recovery.','\x20\x20\x20\x20aggregate[].alias\x20defines\x20the\x20output\x20field\x20name\x20only','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20of\x20records\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}','647144pjVXAT','/api/{appCode}/','now'];a27_0x1422=function(){return _0x317f63;};return a27_0x1422();}function a27_0x4e32(_0x47796b,_0x426537){_0x47796b=_0x47796b-0x170;const _0x1422c3=a27_0x1422();let _0x4e328b=_0x1422c3[_0x47796b];return _0x4e328b;}import{parseJsonParams,parseJsonParamsValue,parseBatchCreateItemsFromParams,parseUpdateIdsFromParams,normalizeUpdateParamsForRuntime}from'../../utils/params.js';import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':a27_0x4ddba3(0x187),'operation':a27_0x4ddba3(0x187),'risk':a27_0x4ddba3(0x1ac),'paramsRequired':![],'description':a27_0x4ddba3(0x1a2),'paramsHint':'JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20'+a27_0x4ddba3(0x180),'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_0x4ddba3(0x1ca),'\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}}','\x20\x20\x20\x20$gte\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20or\x20equal\x20\x20{\x22amount\x22:{\x22$gte\x22:100}}',a27_0x4ddba3(0x17a),a27_0x4ddba3(0x1b2),'\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\x20$contain\x20\x20\x20\x20\x20Substring\x20match\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$contain\x22:\x22test\x22}}','\x20\x20\x20\x20$startWith\x20\x20\x20Starts\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$startWith\x22:\x22Mr.\x22}}','\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_0x4ddba3(0x190),a27_0x4ddba3(0x184),'\x20\x20\x20\x20$or\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Any\x20condition\x20matches\x20\x20{\x22$or\x22:[{\x22status\x22:{\x22$eq\x22:\x22active\x22}},{\x22status\x22:{\x22$eq\x22:\x22pending\x22}}]}','',a27_0x4ddba3(0x1bf),'\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)',a27_0x4ddba3(0x17f),a27_0x4ddba3(0x195),a27_0x4ddba3(0x1a7),'\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','',a27_0x4ddba3(0x1a3),a27_0x4ddba3(0x1b5),a27_0x4ddba3(0x19b),'\x20\x20\x20\x20Page\x20numbers\x20start\x20at\x201.\x20To\x20fetch\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged',a27_0x4ddba3(0x18b),a27_0x4ddba3(0x1c9),a27_0x4ddba3(0x1b3),a27_0x4ddba3(0x1cd)][a27_0x4ddba3(0x196)]('\x0a')},{'command':a27_0x4ddba3(0x1c5),'operation':a27_0x4ddba3(0x1c5),'risk':'read','paramsRequired':!![],'description':a27_0x4ddba3(0x1b4),'paramsHint':a27_0x4ddba3(0x170)},{'command':a27_0x4ddba3(0x198),'operation':a27_0x4ddba3(0x198),'risk':a27_0x4ddba3(0x1c6),'paramsRequired':!![],'description':a27_0x4ddba3(0x17e),'confirmationDescription':'Writes\x20one\x20new\x20business\x20record\x20to\x20the\x20current\x20app\x20dataset.\x20It\x20is\x20saved\x20immediately\x20after\x20confirmation.','paramsHint':a27_0x4ddba3(0x19e)},{'command':'batchCreate','operation':a27_0x4ddba3(0x1cf),'risk':'write','paramsRequired':!![],'description':'Create\x20multiple\x20records\x20in\x20the\x20dataset\x20in\x20one\x20request','helpExtra':[a27_0x4ddba3(0x193),a27_0x4ddba3(0x1bd),'\x20\x20\x20\x20DB_TABLE:\x20inspect\x20dataset\x20detail,\x20validate\x20the\x20full\x20file\x20and\x20confirmed\x20unique\x20business\x20keys,',a27_0x4ddba3(0x175),a27_0x4ddba3(0x19a),a27_0x4ddba3(0x19c),a27_0x4ddba3(0x172),a27_0x4ddba3(0x194),a27_0x4ddba3(0x1b9),a27_0x4ddba3(0x1a4),a27_0x4ddba3(0x17d)][a27_0x4ddba3(0x196)]('\x0a'),'confirmationDescription':'Writes\x20multiple\x20new\x20business\x20records\x20to\x20the\x20current\x20app\x20dataset.\x20They\x20are\x20saved\x20immediately\x20after\x20confirmation.','paramsHint':a27_0x4ddba3(0x1bc)},{'command':a27_0x4ddba3(0x189),'operation':a27_0x4ddba3(0x189),'risk':'write','paramsRequired':!![],'description':a27_0x4ddba3(0x1ae),'confirmationDescription':a27_0x4ddba3(0x1ad),'paramsHint':a27_0x4ddba3(0x1b0)+'Examples:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27,\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22completed\x22}\x27'},{'command':a27_0x4ddba3(0x181),'operation':'delete','risk':'high-risk-write','paramsRequired':!![],'description':a27_0x4ddba3(0x171),'confirmationDescription':a27_0x4ddba3(0x19f),'paramsHint':a27_0x4ddba3(0x170)},{'command':a27_0x4ddba3(0x186),'operation':a27_0x4ddba3(0x186),'risk':a27_0x4ddba3(0x1ac),'paramsRequired':![],'description':'Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','paramsHint':a27_0x4ddba3(0x199)+a27_0x4ddba3(0x19d),'helpExtra':[a27_0x4ddba3(0x1ba),a27_0x4ddba3(0x185),a27_0x4ddba3(0x1c0),a27_0x4ddba3(0x1bb),'\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Average\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg_score\x22}',a27_0x4ddba3(0x17c),'\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_0x4ddba3(0x188),'',a27_0x4ddba3(0x1a6),a27_0x4ddba3(0x1d5),a27_0x4ddba3(0x1c8),a27_0x4ddba3(0x192),a27_0x4ddba3(0x1c4),a27_0x4ddba3(0x178),a27_0x4ddba3(0x191),'',a27_0x4ddba3(0x1a5),a27_0x4ddba3(0x1be),'\x20\x20\x20\x20select/where/having/groupBy\x20must\x20use\x20real\x20dataset\x20fields',a27_0x4ddba3(0x18f),'','\x20\x20DATASET\x20BOUNDARY','\x20\x20\x20\x20aggregate\x20supports\x20a\x20single\x20DB_TABLE\x20dataset\x20only','\x20\x20\x20\x20METADATA\x20datasets\x20do\x20not\x20support\x20aggregate\x20or\x20Custom\x20SQL',a27_0x4ddba3(0x179),a27_0x4ddba3(0x18a),'',a27_0x4ddba3(0x1a1),a27_0x4ddba3(0x18d),a27_0x4ddba3(0x182),'',a27_0x4ddba3(0x183),a27_0x4ddba3(0x1d1),'',a27_0x4ddba3(0x1aa)][a27_0x4ddba3(0x196)]('\x0a')}];function makeDataCommand(_0x527d4d){const _0x18b7ae=a27_0x4ddba3,_0x187c12=_0x18b7ae(0x1a9)+_0x527d4d[_0x18b7ae(0x177)],_0x54deb2={'service':'data','command':_0x527d4d[_0x18b7ae(0x177)],'description':_0x527d4d[_0x18b7ae(0x1b6)],'risk':_0x527d4d[_0x18b7ae(0x1b8)],..._0x527d4d[_0x18b7ae(0x1af)]?{'confirmationDescription':_0x527d4d[_0x18b7ae(0x1af)]}:{},'helpExtra':_0x527d4d[_0x18b7ae(0x17b)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x527d4d['paramsHint']}],'validate':async _0x25c08c=>{const _0x146ae4=_0x18b7ae;_0x527d4d['paramsRequired']&&requireAnyOf(_0x25c08c,[_0x146ae4(0x1b1)],_0x187c12),_0x527d4d[_0x146ae4(0x1b7)]===_0x146ae4(0x1cf)&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x25c08c[_0x146ae4(0x1cc)](_0x146ae4(0x1b1)))),_0x527d4d[_0x146ae4(0x1b7)]==='update'&&parseUpdateIdsFromParams(parseJsonParams(_0x25c08c[_0x146ae4(0x1cc)](_0x146ae4(0x1b1)))??{});},async 'execute'(_0x1660c2){const _0x2ff56d=_0x18b7ae,_0x6a21cc=_0x1660c2[_0x2ff56d(0x1cc)](_0x2ff56d(0x1ce)),_0x5b8d5a=_0x527d4d[_0x2ff56d(0x1b7)]==='batchCreate'?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x1660c2['str']('params'))):parseJsonParams(_0x1660c2[_0x2ff56d(0x1cc)]('params'))??{},_0x2c100f=_0x527d4d[_0x2ff56d(0x1b7)]===_0x2ff56d(0x189)?parseUpdateIdsFromParams(_0x5b8d5a):undefined,_0x42a948=_0x2c100f?normalizeUpdateParamsForRuntime(_0x5b8d5a,_0x2c100f):_0x5b8d5a,_0x18022f=Date[_0x2ff56d(0x1c3)](),_0x130ed0=await executeData(_0x6a21cc,_0x527d4d[_0x2ff56d(0x1b7)],_0x42a948),_0x1fae99=Date[_0x2ff56d(0x1c3)]()-_0x18022f,_0x5b58bc=_0x2c100f&&_0x2c100f['length']>0x1?buildBatchUpdateResult(_0x2c100f,_0x130ed0):_0x130ed0;return{'ok':!![],'data':{'result':_0x5b58bc,'elapsed':_0x1fae99},'message':_0x2ff56d(0x1a9)+_0x527d4d[_0x2ff56d(0x177)]+_0x2ff56d(0x197)+_0x1fae99+'ms'};}};return _0x527d4d['risk']!=='read'&&(_0x54deb2[_0x18b7ae(0x1ab)]=async _0x201fb4=>{const _0x4ddc98=_0x18b7ae,_0x370039=_0x201fb4[_0x4ddc98(0x1cc)]('code'),_0x38fa69=_0x527d4d[_0x4ddc98(0x1b7)]===_0x4ddc98(0x1cf)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x201fb4[_0x4ddc98(0x1cc)](_0x4ddc98(0x1b1)))):parseJsonParams(_0x201fb4[_0x4ddc98(0x1cc)](_0x4ddc98(0x1b1)))??{};let _0x420010=_0x38fa69;if(_0x527d4d[_0x4ddc98(0x1b7)]===_0x4ddc98(0x189)){const _0x52bc7f=parseUpdateIdsFromParams(_0x38fa69);_0x420010=normalizeUpdateParamsForRuntime(_0x38fa69,_0x52bc7f);}return dryRun('POST',_0x4ddc98(0x1c2)+_0x370039+'/'+_0x527d4d[_0x4ddc98(0x1b7)])[_0x4ddc98(0x1d3)](_0x420010)[_0x4ddc98(0x1b6)](_0x4ddc98(0x1a8)+_0x527d4d[_0x4ddc98(0x177)]+_0x4ddc98(0x1d4)+_0x370039)[_0x4ddc98(0x176)]();}),_0x54deb2;}export const dataDefinitions=[...specs['map'](makeDataCommand),dataImportExcel];function buildBatchUpdateResult(_0x5f4531,_0x36c9a5){const _0x4557a2=a27_0x4ddba3;return{'operation':_0x4557a2(0x189),'mode':_0x4557a2(0x18e),'ids':_0x5f4531,'total':_0x5f4531[_0x4557a2(0x1d2)],'result':_0x36c9a5};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a28_0x4dd098=a28_0x4667;(function(_0x144460,_0xd6918e){const _0x2a7948=a28_0x4667,_0x40985a=_0x144460();while(!![]){try{const _0x45fa71=-parseInt(_0x2a7948(0x70))/0x1*(parseInt(_0x2a7948(0xae))/0x2)+-parseInt(_0x2a7948(0x93))/0x3*(-parseInt(_0x2a7948(0xba))/0x4)+parseInt(_0x2a7948(0x9f))/0x5*(-parseInt(_0x2a7948(0x86))/0x6)+-parseInt(_0x2a7948(0xbb))/0x7*(-parseInt(_0x2a7948(0x96))/0x8)+parseInt(_0x2a7948(0xb3))/0x9*(parseInt(_0x2a7948(0xb6))/0xa)+parseInt(_0x2a7948(0x7f))/0xb*(-parseInt(_0x2a7948(0x82))/0xc)+parseInt(_0x2a7948(0x74))/0xd;if(_0x45fa71===_0xd6918e)break;else _0x40985a['push'](_0x40985a['shift']());}catch(_0x46af1b){_0x40985a['push'](_0x40985a['shift']());}}}(a28_0x4083,0xdd1f1));import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function normalizeField(_0x1e70cd){const _0x4b40ce=a28_0x4667;if(_0x1e70cd['deleted'])return null;const _0x570ed3=Boolean(_0x1e70cd[_0x4b40ce(0xbc)]!==undefined||_0x1e70cd[_0x4b40ce(0xb2)]!==undefined);let _0x479e87={};if(!_0x570ed3&&typeof _0x1e70cd[_0x4b40ce(0xa0)]===_0x4b40ce(0xa7))try{_0x479e87=JSON[_0x4b40ce(0xb8)](_0x1e70cd[_0x4b40ce(0xa0)]);}catch{}const _0x2ae998=_0x570ed3?_0x1e70cd[_0x4b40ce(0x81)]:_0x1e70cd[_0x4b40ce(0x92)],_0x169043=_0x570ed3?_0x1e70cd[_0x4b40ce(0xbc)]:_0x1e70cd[_0x4b40ce(0x81)],_0x19074f=_0x570ed3?_0x1e70cd[_0x4b40ce(0xb2)]:_0x1e70cd[_0x4b40ce(0xad)]||_0x1e70cd[_0x4b40ce(0xa5)],_0x3e3bbb=_0x570ed3?_0x1e70cd[_0x4b40ce(0x72)]===!![]:_0x479e87[_0x4b40ce(0x72)]===!![],_0x44078c=_0x570ed3?_0x1e70cd[_0x4b40ce(0xb0)]===!![]:_0x479e87[_0x4b40ce(0xb0)]===!![],_0x590441=_0x570ed3?_0x1e70cd[_0x4b40ce(0x77)]??null:_0x479e87['options']??null,_0xca7966={'name':_0x2ae998,'displayName':_0x169043||_0x2ae998,'type':_0x19074f,'dbType':_0x1e70cd['dbType'],'pk':_0x3e3bbb,'required':_0x44078c,'description':_0x1e70cd[_0x4b40ce(0xa6)]||undefined};return Array[_0x4b40ce(0x9a)](_0x590441)&&_0x590441[_0x4b40ce(0xa1)]>0x0&&(_0xca7966[_0x4b40ce(0x77)]=_0x590441),_0xca7966;}function parseJsonMaybe(_0x135a64){const _0x1cffb9=a28_0x4667;if(typeof _0x135a64!==_0x1cffb9(0xa7))return _0x135a64;try{return JSON[_0x1cffb9(0xb8)](_0x135a64);}catch{return _0x135a64;}}function normalizeOperationEntry(_0x2f2a6e,_0x100bc2){const _0x129b12=a28_0x4667;if(!_0x100bc2||typeof _0x100bc2!=='object')return null;if(!_0x100bc2[_0x129b12(0xb9)]||!_0x100bc2[_0x129b12(0x95)])return null;const _0x1f8ceb={'name':_0x2f2a6e,'method':_0x100bc2[_0x129b12(0xb9)],'path':_0x100bc2[_0x129b12(0x95)]};if(_0x100bc2[_0x129b12(0x71)])_0x1f8ceb[_0x129b12(0x71)]=_0x100bc2[_0x129b12(0x71)];if(_0x100bc2[_0x129b12(0x83)]!=null)_0x1f8ceb[_0x129b12(0x83)]=parseJsonMaybe(_0x100bc2[_0x129b12(0x83)]);if(_0x100bc2['responseBody']!=null)_0x1f8ceb['responseBody']=parseJsonMaybe(_0x100bc2[_0x129b12(0x90)]);if(_0x100bc2[_0x129b12(0x8e)]!=null)_0x1f8ceb[_0x129b12(0x8e)]=_0x100bc2['beforeScriptId'];if(_0x100bc2[_0x129b12(0x78)]!=null)_0x1f8ceb[_0x129b12(0x78)]=_0x100bc2['afterScriptId'];if(Array[_0x129b12(0x9a)](_0x100bc2[_0x129b12(0xb7)]))_0x1f8ceb[_0x129b12(0xb7)]=_0x100bc2[_0x129b12(0xb7)];if(Array[_0x129b12(0x9a)](_0x100bc2[_0x129b12(0x7e)]))_0x1f8ceb['responseFields']=_0x100bc2[_0x129b12(0x7e)];return _0x1f8ceb;}function a28_0x4083(){const _0x39f92e=['473rIAONq','creatorNameField','name','504492dlsnYC','requestBody','relations','sourceType','24psfTtY','relatedPageInfoList','split','modelId','map','dbId','indexes','updateTimeField','beforeScriptId','filter','responseBody','columnCodeListWithDeleted','code','24378ngbsaZ','source','path','13772376BVnnIB','fields','properties','datasetKey','isArray','dbtableConfig','tableComment','trim','dbName','2224135sIdZzO','extend','length','dataset','modelCode','validateRules','dataType','description','string','Get\x20dataset\x20detail\x20including\x20fields,\x20relations,\x20and\x20operations','find','formatRules','dblinkInfoDTO','object','type','106cfZQMK','labelField','required','allFields','doType','163377PGxBsM','createTimeField','entries','100VSawRb','requestFields','parse','method','800RKWVMa','7eHZJLL','displayName','doVersion','28867UlPSnY','host','pkField','modifierIdField','32427954goGOMj','deleted','modifierNameField','options','afterScriptId','str','logicField','read','appCode','tableName','responseFields'];a28_0x4083=function(){return _0x39f92e;};return a28_0x4083();}function summarizeDbtable(_0x593160){const _0x91c39b=a28_0x4667,_0x1e0ee8={},_0x4656f3=[_0x91c39b(0x8b),'dbName','tableName',_0x91c39b(0x99),_0x91c39b(0x72),'allFields',_0x91c39b(0x7a),_0x91c39b(0xb4),_0x91c39b(0x8d),'creatorIdField',_0x91c39b(0x80),_0x91c39b(0x73),_0x91c39b(0x76),_0x91c39b(0xaf),_0x91c39b(0xab)];for(const _0x29882d of _0x4656f3){if(_0x593160[_0x29882d]!==undefined)_0x1e0ee8[_0x29882d]=_0x593160[_0x29882d];}return typeof _0x1e0ee8[_0x91c39b(0xb1)]===_0x91c39b(0xa7)&&_0x1e0ee8[_0x91c39b(0xb1)][_0x91c39b(0xa1)]>0x0&&(_0x1e0ee8['allFieldNames']=_0x1e0ee8[_0x91c39b(0xb1)]['split'](',')[_0x91c39b(0x8a)](_0x3f3777=>_0x3f3777['trim']())[_0x91c39b(0x8f)](Boolean)),_0x1e0ee8;}function normalizeRelatedPages(_0x20f8f1){const _0xf8c15=a28_0x4667;if(!Array['isArray'](_0x20f8f1))return[];return _0x20f8f1[_0xf8c15(0x8f)](_0x540f67=>_0x540f67&&typeof _0x540f67===_0xf8c15(0xac))[_0xf8c15(0x8a)](_0x5eab2d=>({'id':_0x5eab2d['id'],'type':_0x5eab2d[_0xf8c15(0xad)],'code':_0x5eab2d[_0xf8c15(0x92)],'title':_0x5eab2d['title'],'deleted':_0x5eab2d[_0xf8c15(0x75)]===!![]}));}function normalizeFallbackFieldName(_0x2692b1,_0x2bee01){const _0x2d244f=a28_0x4667,_0x4f67b5=_0x2692b1[_0x2d244f(0x9d)]();if(!_0x4f67b5)return null;return{'name':_0x4f67b5,'displayName':_0x4f67b5,'type':undefined,'dbType':undefined,'pk':_0x4f67b5===_0x2bee01,'required':![],'description':undefined};}async function loadListFieldFallback(_0x577139,_0x49aa28){const _0x500651=a28_0x4667;if(!_0x577139||!_0x49aa28)return[];try{const _0xf592bb=await listDatasets(_0x577139,{'code':_0x49aa28}),_0x4e42ee=_0xf592bb[_0x500651(0xa9)](_0x124dfa=>_0x124dfa[_0x500651(0x92)]===_0x49aa28)??_0xf592bb[0x0],_0x108234=_0x4e42ee?.[_0x500651(0x9b)]??{},_0x1bb9ba=typeof _0x108234[_0x500651(0xb1)]===_0x500651(0xa7)?_0x108234[_0x500651(0xb1)][_0x500651(0x88)](','):[];return _0x1bb9ba['map'](_0x29b8dc=>normalizeFallbackFieldName(_0x29b8dc,_0x108234[_0x500651(0x72)]))[_0x500651(0x8f)](_0x22232c=>_0x22232c!==null);}catch{return[];}}function a28_0x4667(_0x5076b4,_0x3c2a83){_0x5076b4=_0x5076b4-0x70;const _0x4083f2=a28_0x4083();let _0x46670c=_0x4083f2[_0x5076b4];return _0x46670c;}export const datasetDetail={'service':a28_0x4dd098(0xa2),'command':'detail','description':a28_0x4dd098(0xa8),'risk':a28_0x4dd098(0x7b),'flags':[CODE_FLAG],async 'execute'(_0x51a7a1){const _0x42e301=a28_0x4dd098,_0x295550=await getDatasetDetail(_0x51a7a1[_0x42e301(0x79)](_0x42e301(0x92))),_0x52d430=Array[_0x42e301(0x9a)](_0x295550[_0x42e301(0x97)])?_0x295550[_0x42e301(0x97)]:Array[_0x42e301(0x9a)](_0x295550[_0x42e301(0x98)])?_0x295550[_0x42e301(0x98)]:[];let _0x307674=_0x52d430[_0x42e301(0x8a)](_0x2dd52e=>normalizeField(_0x2dd52e))['filter'](_0x185be8=>_0x185be8!==null);_0x307674[_0x42e301(0xa1)]===0x0&&(_0x307674=await loadListFieldFallback(_0x51a7a1[_0x42e301(0x7c)],_0x51a7a1[_0x42e301(0x79)](_0x42e301(0x92))));const _0x476209=_0x295550['operations']??{},_0x2953ba=[];for(const [_0x16117b,_0x35f211]of Object[_0x42e301(0xb5)](_0x476209)){const _0x204dd1=normalizeOperationEntry(_0x16117b,_0x35f211);if(_0x204dd1)_0x2953ba['push'](_0x204dd1);}const _0x4e3178=_0x295550[_0x42e301(0x9b)]??{},_0x25666b=_0x295550[_0x42e301(0xa2)]??{},_0x3b92a7=_0x4e3178[_0x42e301(0x8b)]!=null?{'id':_0x4e3178[_0x42e301(0x8b)],'name':_0x4e3178[_0x42e301(0x9e)]??null}:undefined;let _0x5b4c8b;return typeof _0x295550[_0x42e301(0xa0)]===_0x42e301(0xa7)&&(_0x5b4c8b=parseJsonMaybe(_0x295550[_0x42e301(0xa0)])),{'ok':!![],'data':{'id':_0x295550[_0x42e301(0x89)]??_0x295550['id'],'name':_0x295550[_0x42e301(0x81)],'code':_0x295550[_0x42e301(0xa3)]||_0x295550[_0x42e301(0x92)],'doVersion':_0x295550[_0x42e301(0xbd)],'description':_0x295550[_0x42e301(0xa6)]||_0x25666b[_0x42e301(0x9c)]||undefined,'source':_0x295550[_0x42e301(0x94)]||_0x25666b[_0x42e301(0x85)],'table':_0x4e3178[_0x42e301(0x7d)]||_0x25666b['tableName'],'datasetKey':_0x4e3178[_0x42e301(0x99)],'pk':_0x4e3178[_0x42e301(0x72)],'db':_0x3b92a7,'dbtable':summarizeDbtable(_0x4e3178),'fields':_0x307674,'operations':_0x2953ba,'indexes':Array[_0x42e301(0x9a)](_0x25666b['indexes'])?_0x25666b[_0x42e301(0x8c)]:[],'relations':_0x295550[_0x42e301(0x84)]??null,'relatedPages':normalizeRelatedPages(_0x295550[_0x42e301(0x87)]),...Array[_0x42e301(0x9a)](_0x295550[_0x42e301(0x91)])?{'columnCodeListWithDeleted':_0x295550[_0x42e301(0x91)]}:{},'formatRules':Array['isArray'](_0x295550[_0x42e301(0xaa)])?_0x295550['formatRules']:[],'validateRules':Array['isArray'](_0x295550['validateRules'])?_0x295550[_0x42e301(0xa4)]:[],..._0x5b4c8b!==undefined?{'extend':_0x5b4c8b}:{},'stats':{'fieldCount':_0x307674['length'],'operationCount':_0x2953ba[_0x42e301(0xa1)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1a3878,_0x12b319){const _0x1462fd=a29_0x5c38,_0x5a28f1=_0x1a3878();while(!![]){try{const _0x2cd6b8=-parseInt(_0x1462fd(0x17f))/0x1+parseInt(_0x1462fd(0x183))/0x2*(-parseInt(_0x1462fd(0x185))/0x3)+parseInt(_0x1462fd(0x180))/0x4+-parseInt(_0x1462fd(0x186))/0x5*(-parseInt(_0x1462fd(0x184))/0x6)+-parseInt(_0x1462fd(0x182))/0x7+parseInt(_0x1462fd(0x17e))/0x8+-parseInt(_0x1462fd(0x181))/0x9;if(_0x2cd6b8===_0x12b319)break;else _0x5a28f1['push'](_0x5a28f1['shift']());}catch(_0x24e88b){_0x5a28f1['push'](_0x5a28f1['shift']());}}}(a29_0x4874,0xae508));import{datasetList}from'../../commands/dataset/list.js';import{datasetDetail}from'../../commands/dataset/detail.js';import{datasetSdkDoc}from'../../commands/dataset/sdk-doc.js';export const datasetDefinitions=[datasetList,datasetDetail,datasetSdkDoc];function a29_0x5c38(_0x42dd52,_0x291cef){_0x42dd52=_0x42dd52-0x17e;const _0x487409=a29_0x4874();let _0x5c3891=_0x487409[_0x42dd52];return _0x5c3891;}function a29_0x4874(){const _0x15d49a=['3447184yrGCUz','5852637xeBWnR','2050741YSUOVT','3446qPjgsW','248652NEVMae','291YTlFXt','55DcPiMa','5159576IyfgWM','138226zeNhUD'];a29_0x4874=function(){return _0x15d49a;};return a29_0x4874();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a30_0x4cab8c=a30_0x2244;(function(_0x265037,_0x29af39){const _0x597d80=a30_0x2244,_0x458036=_0x265037();while(!![]){try{const _0x8f46c0=parseInt(_0x597d80(0x1cf))/0x1+-parseInt(_0x597d80(0x1d2))/0x2+-parseInt(_0x597d80(0x1c4))/0x3+parseInt(_0x597d80(0x1c2))/0x4*(parseInt(_0x597d80(0x1db))/0x5)+-parseInt(_0x597d80(0x1c8))/0x6+-parseInt(_0x597d80(0x1c6))/0x7*(-parseInt(_0x597d80(0x1df))/0x8)+-parseInt(_0x597d80(0x1ca))/0x9;if(_0x8f46c0===_0x29af39)break;else _0x458036['push'](_0x458036['shift']());}catch(_0x408edf){_0x458036['push'](_0x458036['shift']());}}}(a30_0xeeed,0xc1812));import{listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function a30_0x2244(_0x545bdc,_0x561f9e){_0x545bdc=_0x545bdc-0x1c0;const _0xeeed2f=a30_0xeeed();let _0x224450=_0xeeed2f[_0x545bdc];return _0x224450;}function a30_0xeeed(){const _0x5a165d=['7659324xQVmhm','list','split','Filter\x20by\x20physical\x20table\x20name\x20(server-side\x20prefix\x20match;\x20SQL\x20LIKE\x20wildcards\x20%\x20and\x20_\x20apply)','pkField','1403735cEXvYD','description','table-name','197938ZTDEct','read','string','Filter\x20by\x20dataset\x20code\x20(server-side\x20exact\x20match)','name','tableName','allFields','code','map','430dFVByt','source','str','datasetKey','88NhdVuM','length','dbtableConfig','47384LyfDKE','List\x20datasets\x20in\x20the\x20app\x20(server-side\x20name/code/table-name\x20filters\x20combine\x20with\x20AND)','1162611VnBIHV','appCode','815612HVnEBp','dataset','9444186jNfwKt','Filter\x20by\x20dataset\x20name\x20(server-side\x20fuzzy\x20match)'];a30_0xeeed=function(){return _0x5a165d;};return a30_0xeeed();}export const datasetList={'service':a30_0x4cab8c(0x1c7),'command':a30_0x4cab8c(0x1cb),'description':a30_0x4cab8c(0x1c3),'risk':a30_0x4cab8c(0x1d3),'flags':[{'name':a30_0x4cab8c(0x1d6),'type':a30_0x4cab8c(0x1d4),'description':a30_0x4cab8c(0x1c9)},{'name':a30_0x4cab8c(0x1d1),'type':a30_0x4cab8c(0x1d4),'description':a30_0x4cab8c(0x1cd)},{...CODE_FLAG,'required':![],'description':a30_0x4cab8c(0x1d5)}],async 'execute'(_0x75f31e){const _0x3b3cd5=a30_0x4cab8c,_0x1471ee=_0x75f31e[_0x3b3cd5(0x1dd)]('name'),_0x5aa683=_0x75f31e['str'](_0x3b3cd5(0x1d9)),_0x21a15a=_0x75f31e['str']('table-name'),_0x42a770=await listDatasets(_0x75f31e[_0x3b3cd5(0x1c5)],{..._0x1471ee&&{'name':_0x1471ee},..._0x5aa683&&{'code':_0x5aa683},..._0x21a15a&&{'tableName':_0x21a15a}});return{'ok':!![],'data':{'total':_0x42a770[_0x3b3cd5(0x1c0)],'datasets':_0x42a770[_0x3b3cd5(0x1da)](_0x176dfa=>{const _0x122f38=_0x3b3cd5,_0xd060a0=_0x176dfa[_0x122f38(0x1c1)]??{};return{'id':_0x176dfa['id'],'code':_0x176dfa[_0x122f38(0x1d9)],'name':_0x176dfa['name'],'source':_0x176dfa[_0x122f38(0x1dc)],'description':_0x176dfa[_0x122f38(0x1d0)],'table':_0xd060a0[_0x122f38(0x1d7)],'datasetKey':_0xd060a0[_0x122f38(0x1de)],'pk':_0xd060a0[_0x122f38(0x1ce)],'fields':_0xd060a0['allFields']?_0xd060a0[_0x122f38(0x1d8)][_0x122f38(0x1cc)](',')[_0x122f38(0x1da)](_0x1fd47d=>_0x1fd47d['trim']()):[]};})}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a31_0x4aa19e=a31_0x55bd;(function(_0x2f80f4,_0x456a07){const _0xc769ad=a31_0x55bd,_0x392080=_0x2f80f4();while(!![]){try{const _0x24b8a6=-parseInt(_0xc769ad(0x131))/0x1+-parseInt(_0xc769ad(0x13a))/0x2+-parseInt(_0xc769ad(0x133))/0x3+-parseInt(_0xc769ad(0x135))/0x4*(parseInt(_0xc769ad(0x138))/0x5)+parseInt(_0xc769ad(0x13d))/0x6*(-parseInt(_0xc769ad(0x13f))/0x7)+-parseInt(_0xc769ad(0x13c))/0x8+parseInt(_0xc769ad(0x139))/0x9;if(_0x24b8a6===_0x456a07)break;else _0x392080['push'](_0x392080['shift']());}catch(_0x59d4c0){_0x392080['push'](_0x392080['shift']());}}}(a31_0x3b6a,0x85a3c));import{getDatasetSdkUsageDoc}from'../../core/api-client.js';function a31_0x3b6a(){const _0x90d6fc=['4RGIZwN','code','Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.','4907545BJmFCp','40971933xZXUbw','833908wFfIwr','sdk-doc','5986064TDmxKS','4566LUsZzM','Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','8337kqdYOP','#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0aNo\x20SDK\x20usage\x20documentation\x20is\x20available.','928863XtKPzG','read','69342pTXJmp','str'];a31_0x3b6a=function(){return _0x90d6fc;};return a31_0x3b6a();}function a31_0x55bd(_0x6400e7,_0x19e992){_0x6400e7=_0x6400e7-0x131;const _0x3b6a37=a31_0x3b6a();let _0x55bdd2=_0x3b6a37[_0x6400e7];return _0x55bdd2;}import{CODE_FLAG}from'../../commands/common/flags.js';const DEFAULT_MARKDOWN=a31_0x4aa19e(0x140);export function formatDatasetSdkMarkdown(_0x1d938e){const _0x2937ba=typeof _0x1d938e==='string'?_0x1d938e['trim']():'';return _0x2937ba||DEFAULT_MARKDOWN;}export const datasetSdkDoc={'service':'dataset','command':a31_0x4aa19e(0x13b),'description':a31_0x4aa19e(0x13e),'risk':a31_0x4aa19e(0x132),'flags':[{...CODE_FLAG,'description':a31_0x4aa19e(0x137)}],async 'execute'(_0x291677){const _0x383f89=a31_0x4aa19e,_0x104885=_0x291677[_0x383f89(0x134)](_0x383f89(0x136)),_0x18ed50=await getDatasetSdkUsageDoc(_0x104885,_0x291677['appCode']);return{'ok':!![],'data':{'code':_0x104885,'appCode':_0x291677['appCode'],'markdown':formatDatasetSdkMarkdown(_0x18ed50)}};}};
|
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_0x1b935c=a32_0x1311;(function(_0x2f3444,_0x30222b){const _0x53c05c=a32_0x1311,_0x43219c=_0x2f3444();while(!![]){try{const _0x41c813=parseInt(_0x53c05c(0x223))/0x1*(-parseInt(_0x53c05c(0x24b))/0x2)+parseInt(_0x53c05c(0x1d5))/0x3+parseInt(_0x53c05c(0x21a))/0x4*(-parseInt(_0x53c05c(0x242))/0x5)+parseInt(_0x53c05c(0x1e2))/0x6+parseInt(_0x53c05c(0x222))/0x7*(-parseInt(_0x53c05c(0x1d9))/0x8)+-parseInt(_0x53c05c(0x240))/0x9+-parseInt(_0x53c05c(0x250))/0xa*(-parseInt(_0x53c05c(0x21f))/0xb);if(_0x41c813===_0x30222b)break;else _0x43219c['push'](_0x43219c['shift']());}catch(_0x2adfa4){_0x43219c['push'](_0x43219c['shift']());}}}(a32_0x38da,0x578a2));import a32_0x1f4f8d from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{getCliVersion}from'../utils/version.js';import{getApiDomain,getKbServiceDomain,getRuntimeDomain,getSkillDomain,getUserDomain}from'../constant/domain.js';import{normalizeLovrabetRegion}from'../constant/region.js';import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile,loadRawConfigLayers}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';function a32_0x1311(_0x1c8ca3,_0x1fde69){_0x1c8ca3=_0x1c8ca3-0x1d2;const _0x38da71=a32_0x38da();let _0x1311e0=_0x38da71[_0x1c8ca3];return _0x1311e0;}import{inspectServiceRegistry}from'../commands/service/registry.js';import{inspectBuiltinSkill}from'../skills/builtin-skill.js';async function execute(_0x49a47c){const _0x3c3f25=a32_0x1311,_0xe1f052=getCliVersion(),_0x1092f3=buildConfigFromFlags({});let _0x272d1f,_0x86f6d1;try{_0x272d1f=normalizeLovrabetRegion(_0x1092f3[_0x3c3f25(0x1ff)][_0x3c3f25(0x1fb)]);}catch(_0x5b0154){_0x86f6d1=_0x5b0154 instanceof Error?_0x5b0154:new Error(String(_0x5b0154));}let _0x2c11c2;if(!_0x86f6d1)try{await initGlobalEnvironment(_0x1092f3);}catch(_0xbf3f4d){_0x2c11c2=_0xbf3f4d instanceof Error?_0xbf3f4d:new Error(String(_0xbf3f4d));}console[_0x3c3f25(0x235)](),console[_0x3c3f25(0x235)](a32_0x1f4f8d[_0x3c3f25(0x1fd)](CLI_BIN_NAME+_0x3c3f25(0x244))),console['log'](a32_0x1f4f8d[_0x3c3f25(0x1dc)]('─'[_0x3c3f25(0x1f6)](0x32))),console[_0x3c3f25(0x235)](_0x3c3f25(0x23c)+_0xe1f052),console[_0x3c3f25(0x235)](_0x3c3f25(0x225)+process[_0x3c3f25(0x1d3)]),console['log'](_0x3c3f25(0x231)+process['platform']+'\x20'+process[_0x3c3f25(0x1ee)]);const _0xae6d89=inspectBuiltinSkill();console[_0x3c3f25(0x235)](),console[_0x3c3f25(0x235)](a32_0x1f4f8d['bold'](_0x3c3f25(0x21e))),console['log'](a32_0x1f4f8d[_0x3c3f25(0x1dc)](_0x3c3f25(0x1fc)['repeat'](0x1e))),console[_0x3c3f25(0x235)](_0x3c3f25(0x1d4)+(_0xae6d89[_0x3c3f25(0x1ed)]===_0x3c3f25(0x237)?a32_0x1f4f8d[_0x3c3f25(0x239)](_0x3c3f25(0x1ec)):a32_0x1f4f8d[_0x3c3f25(0x1f1)]('✗\x20'+_0xae6d89[_0x3c3f25(0x1ed)]))),console[_0x3c3f25(0x235)]('\x20\x20Package\x20Version:\x20'+_0xae6d89['packageVersion']),console[_0x3c3f25(0x235)](_0x3c3f25(0x230)+(_0xae6d89[_0x3c3f25(0x233)]||a32_0x1f4f8d[_0x3c3f25(0x1dc)](_0x3c3f25(0x22a)))),console[_0x3c3f25(0x235)]('\x20\x20Installed\x20Path:\x20\x20'+(_0xae6d89[_0x3c3f25(0x1d8)]||a32_0x1f4f8d[_0x3c3f25(0x1dc)](_0x3c3f25(0x245))));_0xae6d89[_0x3c3f25(0x1ed)]!==_0x3c3f25(0x237)&&console[_0x3c3f25(0x235)](_0x3c3f25(0x22d)+_0xae6d89[_0x3c3f25(0x246)]);_0xae6d89[_0x3c3f25(0x23a)]&&console[_0x3c3f25(0x235)](_0x3c3f25(0x213)+_0xae6d89['reason']);console['log'](),console[_0x3c3f25(0x235)](a32_0x1f4f8d[_0x3c3f25(0x1fd)](_0x3c3f25(0x206))),console['log'](a32_0x1f4f8d[_0x3c3f25(0x1dc)]('\x20\x20─'[_0x3c3f25(0x1f6)](0x1e)));const _0x50bab9=getGlobalConfigPath(),_0x4ebf99=getProjectConfigPath();console[_0x3c3f25(0x235)](_0x3c3f25(0x1ef)+(_0x50bab9||a32_0x1f4f8d['gray']('(not\x20found)'))),console[_0x3c3f25(0x235)](_0x3c3f25(0x20a)+(_0x4ebf99||a32_0x1f4f8d[_0x3c3f25(0x1dc)](_0x3c3f25(0x245)))),console[_0x3c3f25(0x235)](),console[_0x3c3f25(0x235)](a32_0x1f4f8d['bold'](_0x3c3f25(0x24f))),console[_0x3c3f25(0x235)](a32_0x1f4f8d['gray']('\x20\x20─'[_0x3c3f25(0x1f6)](0x1e)));const _0x59e074=(_0x5200f2,_0x49ce6b)=>{const _0x1551b9=_0x3c3f25;if(!_0x49ce6b){console[_0x1551b9(0x235)]('\x20\x20'+_0x5200f2['padEnd'](0x11)+'\x20'+a32_0x1f4f8d[_0x1551b9(0x1dc)](_0x1551b9(0x204)));return;}const _0x375d30=inspectCliConfigJsonFile(_0x49ce6b);if(_0x375d30[_0x1551b9(0x23b)]==='ok')console['log']('\x20\x20'+_0x5200f2['padEnd'](0x11)+'\x20'+a32_0x1f4f8d[_0x1551b9(0x239)]('✓\x20Valid\x20JSON'));else{if(_0x375d30[_0x1551b9(0x23b)]===_0x1551b9(0x201))console['log']('\x20\x20'+_0x5200f2[_0x1551b9(0x220)](0x11)+'\x20'+a32_0x1f4f8d['yellow'](_0x1551b9(0x24d)));else _0x375d30[_0x1551b9(0x23b)]===_0x1551b9(0x1dd)?console[_0x1551b9(0x235)]('\x20\x20'+_0x5200f2[_0x1551b9(0x220)](0x11)+'\x20'+a32_0x1f4f8d['gray']('(missing)')):(console['log']('\x20\x20'+_0x5200f2['padEnd'](0x11)+'\x20'+a32_0x1f4f8d[_0x1551b9(0x1f1)]('✗\x20Invalid\x20JSON')),console[_0x1551b9(0x235)]('\x20\x20'+''[_0x1551b9(0x220)](0x11)+'\x20'+a32_0x1f4f8d[_0x1551b9(0x1f1)](_0x375d30[_0x1551b9(0x1e9)])));}};_0x59e074(_0x3c3f25(0x251),_0x50bab9),_0x59e074(_0x3c3f25(0x1fa),_0x4ebf99);const _0x47421d=loadRawConfigLayers(),_0x2f9854=[Object['prototype'][_0x3c3f25(0x238)]['call'](_0x47421d[_0x3c3f25(0x1f9)],_0x3c3f25(0x20c))?_0x3c3f25(0x23d):null,Object[_0x3c3f25(0x1eb)][_0x3c3f25(0x238)][_0x3c3f25(0x208)](_0x47421d[_0x3c3f25(0x252)],'inherit')?_0x3c3f25(0x253):null][_0x3c3f25(0x24a)](Boolean);_0x2f9854['length']>0x0&&(console['log']('\x20\x20Legacy\x20inherit:\x20\x20\x20'+a32_0x1f4f8d['yellow']('ignored\x20in\x20'+_0x2f9854['join'](_0x3c3f25(0x23f))+_0x3c3f25(0x22f))),_0x2f9854[_0x3c3f25(0x20d)](_0x3c3f25(0x253))&&console[_0x3c3f25(0x235)](_0x3c3f25(0x1f8)+CLI_BIN_NAME+_0x3c3f25(0x20e)),_0x2f9854[_0x3c3f25(0x20d)](_0x3c3f25(0x23d))&&console[_0x3c3f25(0x235)](_0x3c3f25(0x202)+CLI_BIN_NAME+_0x3c3f25(0x1df)));_0x2c11c2&&(console[_0x3c3f25(0x235)](),console[_0x3c3f25(0x235)](a32_0x1f4f8d[_0x3c3f25(0x1fd)](_0x3c3f25(0x1de))),console[_0x3c3f25(0x235)](a32_0x1f4f8d[_0x3c3f25(0x1dc)](_0x3c3f25(0x1fc)[_0x3c3f25(0x1f6)](0x1e))),console[_0x3c3f25(0x235)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a32_0x1f4f8d[_0x3c3f25(0x1f1)](_0x3c3f25(0x209))),console[_0x3c3f25(0x235)](_0x3c3f25(0x213)+_0x2c11c2[_0x3c3f25(0x1e9)]),Object[_0x3c3f25(0x1eb)][_0x3c3f25(0x238)][_0x3c3f25(0x208)](_0x47421d[_0x3c3f25(0x252)],'routing')&&console[_0x3c3f25(0x235)](_0x3c3f25(0x203)+CLI_BIN_NAME+_0x3c3f25(0x1e5)),Object[_0x3c3f25(0x1eb)][_0x3c3f25(0x238)]['call'](_0x47421d[_0x3c3f25(0x1f9)],_0x3c3f25(0x1e6))&&console['log'](_0x3c3f25(0x211)+CLI_BIN_NAME+_0x3c3f25(0x1e0)));_0x86f6d1&&(console[_0x3c3f25(0x235)](),console[_0x3c3f25(0x235)](a32_0x1f4f8d['bold'](_0x3c3f25(0x1f4))),console[_0x3c3f25(0x235)](a32_0x1f4f8d[_0x3c3f25(0x1dc)](_0x3c3f25(0x1fc)[_0x3c3f25(0x1f6)](0x1e))),console['log']('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a32_0x1f4f8d['red']('✗\x20Invalid')),console[_0x3c3f25(0x235)](_0x3c3f25(0x213)+_0x86f6d1[_0x3c3f25(0x1e9)]),Object[_0x3c3f25(0x1eb)][_0x3c3f25(0x238)][_0x3c3f25(0x208)](_0x47421d[_0x3c3f25(0x252)],'region')&&console['log'](_0x3c3f25(0x203)+CLI_BIN_NAME+_0x3c3f25(0x22b)),Object[_0x3c3f25(0x1eb)][_0x3c3f25(0x238)]['call'](_0x47421d[_0x3c3f25(0x1f9)],_0x3c3f25(0x1fb))&&console[_0x3c3f25(0x235)](_0x3c3f25(0x211)+CLI_BIN_NAME+_0x3c3f25(0x1f7)));console['log'](),console[_0x3c3f25(0x235)](a32_0x1f4f8d[_0x3c3f25(0x1fd)](_0x3c3f25(0x228))),console[_0x3c3f25(0x235)](a32_0x1f4f8d[_0x3c3f25(0x1dc)]('\x20\x20─'['repeat'](0x1e))),console[_0x3c3f25(0x235)]('\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x1092f3[_0x3c3f25(0x248)]||a32_0x1f4f8d['red'](_0x3c3f25(0x234)))),console[_0x3c3f25(0x235)](_0x3c3f25(0x20b)+(_0x272d1f??a32_0x1f4f8d['red'](_0x3c3f25(0x210)))),console[_0x3c3f25(0x235)](_0x3c3f25(0x247)+_0x1092f3[_0x3c3f25(0x1f3)]),console['log'](_0x3c3f25(0x1e7)+(_0x1092f3[_0x3c3f25(0x20f)]||a32_0x1f4f8d['gray'](_0x3c3f25(0x21d)))),console[_0x3c3f25(0x235)]('\x20\x20currentApp:\x20\x20\x20\x20\x20\x20'+(_0x1092f3[_0x3c3f25(0x236)]||a32_0x1f4f8d['gray'](_0x3c3f25(0x21d)))),console[_0x3c3f25(0x235)]('\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x1092f3['format']||a32_0x1f4f8d['gray'](_0x3c3f25(0x221)+DEFAULT_CONFIG_VALUES[_0x3c3f25(0x226)]+')'))),console['log'](_0x3c3f25(0x1d6)+(_0x1092f3[_0x3c3f25(0x1e8)]??a32_0x1f4f8d[_0x3c3f25(0x1dc)](_0x3c3f25(0x1d7)))),console[_0x3c3f25(0x235)](_0x3c3f25(0x215)+_0x1092f3['riskLevel']),console[_0x3c3f25(0x235)](_0x3c3f25(0x219)+_0x1092f3[_0x3c3f25(0x1f2)]),console[_0x3c3f25(0x235)](_0x3c3f25(0x249)+AUTH_MODE[_0x3c3f25(0x1e4)]),console[_0x3c3f25(0x235)](_0x3c3f25(0x1fe)+(_0x1092f3[_0x3c3f25(0x1d2)]?a32_0x1f4f8d['green'](_0x3c3f25(0x24e)+_0x1092f3[_0x3c3f25(0x1d2)][_0x3c3f25(0x241)]+')'):a32_0x1f4f8d[_0x3c3f25(0x1dc)](_0x3c3f25(0x21d)))),console[_0x3c3f25(0x235)](),console[_0x3c3f25(0x235)](a32_0x1f4f8d[_0x3c3f25(0x1fd)](_0x3c3f25(0x218))),console[_0x3c3f25(0x235)](a32_0x1f4f8d[_0x3c3f25(0x1dc)](_0x3c3f25(0x1fc)[_0x3c3f25(0x1f6)](0x1e)));_0x2c11c2||_0x86f6d1?console[_0x3c3f25(0x235)](_0x3c3f25(0x212)+a32_0x1f4f8d[_0x3c3f25(0x1f1)](_0x3c3f25(0x24c))):(console['log']('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console[_0x3c3f25(0x235)](_0x3c3f25(0x217)+getUserDomain()),console[_0x3c3f25(0x235)](_0x3c3f25(0x200)+getRuntimeDomain()),console[_0x3c3f25(0x235)](_0x3c3f25(0x23e)+getSkillDomain()),console[_0x3c3f25(0x235)](_0x3c3f25(0x1f5)+(getKbServiceDomain()??_0x3c3f25(0x227))));console[_0x3c3f25(0x235)](),console[_0x3c3f25(0x235)](a32_0x1f4f8d['bold'](_0x3c3f25(0x254))),console[_0x3c3f25(0x235)](a32_0x1f4f8d[_0x3c3f25(0x1dc)](_0x3c3f25(0x1fc)[_0x3c3f25(0x1f6)](0x1e)));const _0x3f9659=inspectServiceRegistry();console[_0x3c3f25(0x235)](_0x3c3f25(0x243)+_0x3f9659[_0x3c3f25(0x22c)]),console['log']('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+formatServiceRegistryStatus(_0x3f9659)),console[_0x3c3f25(0x235)](_0x3c3f25(0x1db)+_0x3f9659[_0x3c3f25(0x229)]),console['log'](_0x3c3f25(0x21b)+_0x3f9659[_0x3c3f25(0x256)]);for(const _0x5cfab3 of _0x3f9659['services']){console[_0x3c3f25(0x235)]('\x20\x20'+(_0x5cfab3[_0x3c3f25(0x1f0)]+':')[_0x3c3f25(0x220)](0x11)+'\x20'+(_0x5cfab3['name']||a32_0x1f4f8d['gray'](_0x3c3f25(0x205)))+'\x20('+_0x5cfab3['commandCount']+_0x3c3f25(0x214)),console[_0x3c3f25(0x235)]('\x20\x20'+''[_0x3c3f25(0x220)](0x11)+_0x3c3f25(0x216)+_0x5cfab3['source']['path']);}return console[_0x3c3f25(0x235)](),console[_0x3c3f25(0x235)](a32_0x1f4f8d[_0x3c3f25(0x1fd)](_0x3c3f25(0x1e3))),console['log'](a32_0x1f4f8d[_0x3c3f25(0x1dc)](_0x3c3f25(0x1fc)[_0x3c3f25(0x1f6)](0x1e))),console[_0x3c3f25(0x235)]('\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a32_0x1f4f8d[_0x3c3f25(0x239)](AUTH_MODE[_0x3c3f25(0x1e4)]+_0x3c3f25(0x232))),console['log'](_0x3c3f25(0x207)+a32_0x1f4f8d[_0x3c3f25(0x1dc)](_0x3c3f25(0x22e))),console[_0x3c3f25(0x235)](),{'ok':!![]};}function formatServiceRegistryStatus(_0x50e270){const _0x341155=a32_0x1311;if(_0x50e270[_0x341155(0x23b)]==='ok')return a32_0x1f4f8d['green']('✓\x20Loaded');if(_0x50e270[_0x341155(0x23b)]===_0x341155(0x1dd))return a32_0x1f4f8d[_0x341155(0x1dc)](_0x341155(0x245));if(_0x50e270[_0x341155(0x23b)]===_0x341155(0x201))return a32_0x1f4f8d[_0x341155(0x224)](_0x341155(0x1ea));return a32_0x1f4f8d[_0x341155(0x1f1)](_0x341155(0x209)+(_0x50e270[_0x341155(0x1e9)]?':\x20'+_0x50e270[_0x341155(0x1e9)]:''));}function a32_0x38da(){const _0x5de3bd=['registryPath','\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(removed\x20—\x20cookie\x20auth\x20disabled)','\x20config','\x20\x20Skill\x20Version:\x20\x20\x20','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','\x20(accessKey)','skillVersion','(not\x20set)','log','currentApp','current','hasOwnProperty','green','reason','status','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','global','\x20\x20skillDomain:\x20\x20\x20\x20\x20','\x20+\x20','5844663PVJsBV','length','709415uArVpy','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','\x20doctor','(not\x20found)','repairCommand','\x20\x20app\x20locale:\x20\x20\x20\x20\x20\x20','appCode','\x20\x20auth\x20(effective):\x20','filter','37214OybDlh','Unavailable\x20until\x20routing\x20configuration\x20is\x20repaired','⚠\x20Empty\x20(treated\x20as\x20{})','(set,\x20length=','\x20\x20Config\x20JSON','130FnkgLd','Global','projectConfig','project','\x20\x20Service\x20Tree','check','commandCount','accessKey','version','\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','677985QczIgJ','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','(default)','installedPath','3415648Qvpbog','Diagnose\x20CLI\x20configuration\x20and\x20environment','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','gray','missing','\x20\x20Routing\x20Configuration','\x20config\x20delete\x20inherit\x20--global','\x20config\x20delete\x20routing\x20--global','doctor','2420388Meqsnb','\x20\x20Auth','ClientAk','\x20config\x20delete\x20routing','routing','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','pageSize','message','⚠\x20Empty','prototype','✓\x20current','state','arch','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','serviceCode','red','verbose','locale','\x20\x20Country/Region\x20Configuration','\x20\x20kbServiceDomain:\x20','repeat','\x20config\x20init','\x20\x20Repair\x20project:\x20\x20\x20','globalConfig','Project','region','\x20\x20─','bold','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','raw','\x20\x20runtimeDomain:\x20\x20\x20','empty','\x20\x20Repair\x20global:\x20\x20\x20\x20','\x20\x20Repair\x20project:\x20\x20','(no\x20file)','(unnamed)','\x20\x20Config\x20Files','\x20\x20Session\x20check:\x20\x20\x20','call','✗\x20Invalid','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20region:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','inherit','includes','\x20config\x20delete\x20inherit','defaultApp','(invalid)','\x20\x20Repair\x20global:\x20\x20\x20','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20commands)','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20Imported\x20from:\x20','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','\x20\x20API\x20Endpoints','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','20ROkryM','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','read','(none)','\x20\x20Built-in\x20Skill','1313367bsSgnU','padEnd','(default:\x20','7gEYtfU','2ceODXQ','yellow','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','format','not\x20configured','\x20\x20Merged\x20Config','serviceCount','(missing)','\x20config\x20delete\x20region'];a32_0x38da=function(){return _0x5de3bd;};return a32_0x38da();}export const doctorDefinition={'service':a32_0x1b935c(0x1e1),'command':a32_0x1b935c(0x255),'description':a32_0x1b935c(0x1da),'risk':a32_0x1b935c(0x21c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a33_0x3a2bb3=a33_0x4999;(function(_0x3589f3,_0x3b9959){const _0x23d598=a33_0x4999,_0x21750b=_0x3589f3();while(!![]){try{const _0x5e2588=parseInt(_0x23d598(0xfe))/0x1+-parseInt(_0x23d598(0x108))/0x2+-parseInt(_0x23d598(0xf4))/0x3*(-parseInt(_0x23d598(0xeb))/0x4)+-parseInt(_0x23d598(0x107))/0x5+-parseInt(_0x23d598(0x100))/0x6+parseInt(_0x23d598(0x102))/0x7+parseInt(_0x23d598(0xef))/0x8*(parseInt(_0x23d598(0xfc))/0x9);if(_0x5e2588===_0x3b9959)break;else _0x21750b['push'](_0x21750b['shift']());}catch(_0x472267){_0x21750b['push'](_0x21750b['shift']());}}}(a33_0x53d7,0x6fa6d));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a33_0x4999(_0x403df3,_0x1954d9){_0x403df3=_0x403df3-0xe8;const _0x53d701=a33_0x53d7();let _0x49991=_0x53d701[_0x403df3];return _0x49991;}const FILE_FLAG={'name':a33_0x3a2bb3(0xe9),'type':'string','required':!![],'description':'Path\x20to\x20the\x20local\x20file\x20to\x20upload'},FILEPATH_FLAG={'name':a33_0x3a2bb3(0x105),'type':a33_0x3a2bb3(0xf3),'required':!![],'description':'Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data'},DOWNLOAD_FLAG={'name':a33_0x3a2bb3(0xf5),'type':'boolean','description':'Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL'},LONG_TERM_FLAG={'name':a33_0x3a2bb3(0xf2),'type':a33_0x3a2bb3(0xf0),'description':a33_0x3a2bb3(0x101)};function a33_0x53d7(){const _0x14b1e5=['15328CNquIg','\x20to\x20runtime\x20app\x20','3008868nyKPnh','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','5642651UERsvN','Uploaded\x20file:\x20','POST','filepath','/client/uploadFile','3840520nQAzfI','810320rrXaoq','path','bool','file','str','3436jSOpJj','filePath','trim','appCode','3160DDIbPY','boolean','filePath\x20is\x20required.','long-term','string','2217gmpmeP','download','upload','build','validation','query-url','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','body','15399YFSvVJ','File'];a33_0x53d7=function(){return _0x14b1e5;};return a33_0x53d7();}function requireFilePath(_0x4b5691){const _0x96cb4a=a33_0x3a2bb3,_0x338796=_0x4b5691[_0x96cb4a(0xed)]();if(!_0x338796)throw CliErrors[_0x96cb4a(0xf8)](_0x96cb4a(0xf1));return _0x338796;}const fileUpload={'service':a33_0x3a2bb3(0xe9),'command':a33_0x3a2bb3(0xf6),'description':'Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','risk':'read','flags':[FILE_FLAG],async 'dryRun'(_0x51047d){const _0xd7aee0=a33_0x3a2bb3,_0x1dc828=requireRuntimeUploadFile(_0x51047d[_0xd7aee0(0xea)](_0xd7aee0(0xe9)),_0xd7aee0(0xfd));return dryRun(_0xd7aee0(0x104),_0xd7aee0(0x106))[_0xd7aee0(0xfb)]({'appCode':_0x51047d[_0xd7aee0(0xee)],'multipart':{'file':_0x1dc828}})['description']('Preview:\x20upload\x20'+_0x1dc828[_0xd7aee0(0x109)]+_0xd7aee0(0xff)+_0x51047d['appCode'])[_0xd7aee0(0xf7)]();},async 'execute'(_0xfdbe54){const _0x17f0a9=a33_0x3a2bb3,_0x4a09dc=requireRuntimeUploadFile(_0xfdbe54[_0x17f0a9(0xea)]('file'),'File'),_0x3e098c=await uploadRuntimeFile(_0xfdbe54['appCode'],_0x4a09dc[_0x17f0a9(0x109)]);return{'ok':!![],'data':_0x3e098c,'message':_0x3e098c[_0x17f0a9(0xec)]?_0x17f0a9(0x103)+_0x3e098c[_0x17f0a9(0xec)]+_0x17f0a9(0xfa):'Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.'};}},fileQueryUrl={'service':a33_0x3a2bb3(0xe9),'command':a33_0x3a2bb3(0xf9),'description':'Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','risk':'read','flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x211478){const _0x40e37c=a33_0x3a2bb3,_0x52ce9d=requireFilePath(_0x211478[_0x40e37c(0xea)](_0x40e37c(0x105))),_0x4ab50a=await queryRuntimeFileUrl(_0x52ce9d,{'download':_0x211478[_0x40e37c(0xe8)]('download'),'longTerm':_0x211478[_0x40e37c(0xe8)]('long-term')});return{'ok':!![],'data':_0x4ab50a};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
|
package/lib/commands/init.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a34_0x28ce12=a34_0xe140;(function(_0x192d29,_0x5fe21a){const _0x3f1842=a34_0xe140,_0x2ef26c=_0x192d29();while(!![]){try{const _0x1bebc3=parseInt(_0x3f1842(0x1da))/0x1+parseInt(_0x3f1842(0x1d8))/0x2+-parseInt(_0x3f1842(0x1d6))/0x3+parseInt(_0x3f1842(0x1f0))/0x4+parseInt(_0x3f1842(0x1d3))/0x5*(-parseInt(_0x3f1842(0x1e7))/0x6)+-parseInt(_0x3f1842(0x1f4))/0x7+-parseInt(_0x3f1842(0x1f9))/0x8;if(_0x1bebc3===_0x5fe21a)break;else _0x2ef26c['push'](_0x2ef26c['shift']());}catch(_0x47dd7f){_0x2ef26c['push'](_0x2ef26c['shift']());}}}(a34_0x99c0,0xa3171));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';function a34_0x99c0(){const _0x22cf30=['includes','Source\x20file\x20not\x20found:\x20','boolean','join','apps','validation','Invalid\x20env\x20\x22','yes','Imported\x20from\x20','Failed\x20to\x20parse\x20source\x20file:\x20','object','newConfigFileName','666lFxuNe','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`.','entries','file','Override\x20imported\x20default\x20appcode','riskLevel','Override\x20imported\x20default\x20env',')\x20instead\x20of\x20project','project','2990684yJtSdi','global','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','cwd','1375150ItzSyd','env','message','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','7799368rKPoCE','8780dOqFxG','defaultApp','log','3341805IadNrO','appcode','2500454vFbfBR','string','1150341oVwGlN'];a34_0x99c0=function(){return _0x22cf30;};return a34_0x99c0();}import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../context.js';import{PRODUCT_CONFIG}from'../constant/product.js';export const appImportFlagDefs=[{'name':a34_0x28ce12(0x1ea),'type':a34_0x28ce12(0x1d9),'description':a34_0x28ce12(0x1f8),'required':!![]},{'name':a34_0x28ce12(0x1d7),'type':'string','description':a34_0x28ce12(0x1eb)},{'name':a34_0x28ce12(0x1f5),'type':'string','description':a34_0x28ce12(0x1ed),'enum':[...RUNTIME_ENV_VALUES]},{'name':'global','type':a34_0x28ce12(0x1dd),'description':'Write\x20to\x20global\x20(~/'+PRODUCT_CONFIG[a34_0x28ce12(0x1e6)]+a34_0x28ce12(0x1ee),'default':![]},{'name':a34_0x28ce12(0x1e2),'type':a34_0x28ce12(0x1dd),'description':'Skip\x20confirmation\x20when\x20overwriting','default':![]}];export async function runAppImport(_0x275e0c){const _0x256958=a34_0x28ce12,_0x3cae7d=_0x275e0c['global']?_0x256958(0x1f1):_0x256958(0x1ef),_0x8c379c=resolveWriteConfigPath(_0x3cae7d);await runFromImport(_0x275e0c,_0x8c379c);}function a34_0xe140(_0x726010,_0x500a80){_0x726010=_0x726010-0x1d3;const _0x99c063=a34_0x99c0();let _0xe1406f=_0x99c063[_0x726010];return _0xe1406f;}async function runFromImport(_0x1757e1,_0x2f1ab9){const _0x1bad24=a34_0x28ce12,_0x573628=resolveFilePath(_0x1757e1[_0x1bad24(0x1ea)]);if(!existsSync(_0x573628))throw CliErrors[_0x1bad24(0x1e0)](_0x1bad24(0x1dc)+_0x573628);const _0x1bc8d6=readSourceFile(_0x573628),_0x20421f=convertToRuntimeConfig(_0x1bc8d6);_0x1757e1[_0x1bad24(0x1d7)]&&(_0x20421f[_0x1bad24(0x1d7)]=String(_0x1757e1[_0x1bad24(0x1d7)]));_0x1757e1[_0x1bad24(0x1f5)]&&(_0x20421f['env']=resolveImportEnv(_0x1757e1));if(!_0x20421f[_0x1bad24(0x1d7)])throw CliErrors[_0x1bad24(0x1e0)](_0x1bad24(0x1f2),_0x1bad24(0x1e8));await writeImportConfig(_0x2f1ab9,_0x20421f,_0x1757e1),console[_0x1bad24(0x1d5)](_0x1bad24(0x1e3)+_0x573628),console[_0x1bad24(0x1d5)]('\x20\x20config:\x20\x20'+_0x2f1ab9),console[_0x1bad24(0x1d5)]('\x20\x20appcode:\x20'+_0x20421f[_0x1bad24(0x1d7)]);if(_0x20421f[_0x1bad24(0x1d4)])console[_0x1bad24(0x1d5)]('\x20\x20default:\x20'+_0x20421f[_0x1bad24(0x1d4)]);}function convertToRuntimeConfig(_0x1dd2a3){const _0x170c67=a34_0x28ce12;if(_0x1dd2a3[_0x170c67(0x1df)]&&typeof _0x1dd2a3[_0x170c67(0x1df)]===_0x170c67(0x1e5))throw CliErrors[_0x170c67(0x1e0)]('Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.',_0x170c67(0x1f7));const _0x43d42f={};for(const _0x2d79e8 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x1dd2a3[_0x2d79e8]!==undefined&&(_0x43d42f[_0x2d79e8]=_0x1dd2a3[_0x2d79e8]);}return!_0x43d42f[_0x170c67(0x1ec)]&&(_0x43d42f[_0x170c67(0x1ec)]=DEFAULT_CONFIG_VALUES[_0x170c67(0x1ec)]),_0x43d42f;}async function writeImportConfig(_0x4ec265,_0x4849a7,_0x65f155){const _0xe0282f=a34_0x28ce12;let _0x3289ca={};existsSync(_0x4ec265)&&!_0x65f155[_0xe0282f(0x1e2)]&&(_0x3289ca=readConfigFile(_0x4ec265));for(const [_0x57de0b,_0x49293f]of Object[_0xe0282f(0x1e9)](_0x4849a7)){_0x49293f!==undefined&&(_0x3289ca[_0x57de0b]=_0x49293f);}if(_0x3289ca['app'])delete _0x3289ca['app'];writeConfigFile(_0x4ec265,_0x3289ca);}function resolveFilePath(_0x26997f){const _0x371d76=a34_0x28ce12;return isAbsolute(_0x26997f)?_0x26997f:resolve(process[_0x371d76(0x1f3)](),_0x26997f);}function readSourceFile(_0x449396){const _0x57ed0a=a34_0x28ce12;try{const _0x3a1e3c=readFileSync(_0x449396,{'encoding':'utf8'});return JSON['parse'](_0x3a1e3c);}catch(_0x3a8558){throw CliErrors[_0x57ed0a(0x1e0)](_0x57ed0a(0x1e4)+_0x3a8558[_0x57ed0a(0x1f6)]);}}function resolveImportEnv(_0x2882a1){const _0x1b39dc=a34_0x28ce12,_0x334350=_0x2882a1[_0x1b39dc(0x1f5)];if(_0x334350===undefined||_0x334350==='')return DEFAULT_CONFIG_VALUES[_0x1b39dc(0x1f5)];if(!RUNTIME_ENV_VALUES[_0x1b39dc(0x1db)](_0x334350))throw CliErrors[_0x1b39dc(0x1e0)](_0x1b39dc(0x1e1)+_0x334350+'\x22.\x20Allowed:\x20'+RUNTIME_ENV_VALUES[_0x1b39dc(0x1de)](',\x20'));return _0x334350;}
|
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_0x434d03=a35_0x49ae;(function(_0x2b8ed1,_0x1e94fa){const _0x23716a=a35_0x49ae,_0x121a2d=_0x2b8ed1();while(!![]){try{const _0x1dbc9a=parseInt(_0x23716a(0xea))/0x1*(-parseInt(_0x23716a(0xc8))/0x2)+parseInt(_0x23716a(0xc2))/0x3*(parseInt(_0x23716a(0xfe))/0x4)+parseInt(_0x23716a(0xf9))/0x5*(-parseInt(_0x23716a(0xbe))/0x6)+parseInt(_0x23716a(0xec))/0x7*(-parseInt(_0x23716a(0xe8))/0x8)+-parseInt(_0x23716a(0xbd))/0x9+parseInt(_0x23716a(0xf8))/0xa*(parseInt(_0x23716a(0xd5))/0xb)+parseInt(_0x23716a(0xed))/0xc;if(_0x1dbc9a===_0x1e94fa)break;else _0x121a2d['push'](_0x121a2d['shift']());}catch(_0x24eaf3){_0x121a2d['push'](_0x121a2d['shift']());}}}(a35_0x4341,0x40cc7));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalKnowledgeBaseItem,getPersonalKnowledgeBaseItem,listPersonalKnowledgeBaseItems,updatePersonalKnowledgeBaseItem}from'../../core/api-client.js';import{searchDirectKnowledge,normalizeKbServiceOrigin}from'../../core/kb-search-client.js';import{planPersonalKnowledgeWrite,withKbManagementOrigin}from'../../core/kb-management-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';function a35_0x49ae(_0x4f2565,_0x1593a8){_0x4f2565=_0x4f2565-0xb9;const _0x43416b=a35_0x4341();let _0x49ae05=_0x43416b[_0x4f2565];return _0x49ae05;}import{getKbServiceDomain}from'../../constant/domain.js';import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':a35_0x434d03(0xe7),'type':a35_0x434d03(0xd3),'required':!![],'description':a35_0x434d03(0xc3)},FILE_FLAG={'name':'file','type':a35_0x434d03(0xd3),'required':!![],'description':a35_0x434d03(0xc5)},QUERY_FLAG={'name':a35_0x434d03(0xf5),'type':a35_0x434d03(0xd3),'required':!![],'description':'Search\x20query\x20for\x20visible\x20public,\x20company,\x20and\x20personal\x20knowledge'},TOPK_FLAG={'name':'topk','type':a35_0x434d03(0x100),'description':a35_0x434d03(0xf2)};function readKnowledgeFile(_0x329a3c){const _0xb2b42f=a35_0x434d03;if(!_0x329a3c)throw CliErrors['validation'](_0xb2b42f(0xe6));if(!existsSync(_0x329a3c))throw CliErrors[_0xb2b42f(0xd6)](_0xb2b42f(0xd8)+_0x329a3c);if(!statSync(_0x329a3c)[_0xb2b42f(0xc9)]())throw CliErrors['validation']('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x329a3c);return readFileSync(_0x329a3c,_0xb2b42f(0xd1));}function summarizePersonalItem(_0x679074){const _0x9970c7=a35_0x434d03;return{'id':_0x679074['id'],'title':_0x679074['title'],'version':_0x679074[_0x9970c7(0xc0)],'ragStatus':_0x679074[_0x9970c7(0xbf)],'ragErrorMessage':_0x679074[_0x9970c7(0xf1)],'updateTime':_0x679074[_0x9970c7(0xe3)]};}function detailPersonalItem(_0x21c330){const _0x3a7639=a35_0x434d03;return{'id':_0x21c330['id'],'appCode':_0x21c330[_0x3a7639(0xde)],'scope':_0x21c330[_0x3a7639(0xf6)],'userId':_0x21c330['userId'],'title':_0x21c330[_0x3a7639(0xe7)],'content':_0x21c330[_0x3a7639(0xda)],'version':_0x21c330['version'],'ragStatus':_0x21c330['ragStatus'],'ragErrorMessage':_0x21c330[_0x3a7639(0xf1)],'createTime':_0x21c330[_0x3a7639(0xf0)],'updateTime':_0x21c330[_0x3a7639(0xe3)]};}function readTopK(_0x188ac8){const _0x374f09=a35_0x434d03,_0x26c3a7=_0x188ac8[_0x374f09(0xfa)](_0x374f09(0xc6));if(_0x26c3a7===undefined||_0x26c3a7===null||_0x26c3a7==='')return undefined;const _0x542c3d=_0x188ac8['num'](_0x374f09(0xc6));if(!Number[_0x374f09(0xdc)](_0x542c3d)||_0x542c3d<0x1||_0x542c3d>0x32)throw CliErrors[_0x374f09(0xd6)](_0x374f09(0xf3));return _0x542c3d;}const kbList={'service':'kb','command':'list','description':a35_0x434d03(0xcc),'risk':a35_0x434d03(0xce),'flags':[VERBOSE_FLAG],async 'execute'(_0xccc911){const _0x44bf0e=a35_0x434d03,_0x366eb5=await listPersonalKnowledgeBaseItems(_0xccc911[_0x44bf0e(0xde)],_0xccc911[_0x44bf0e(0xfd)]);if(_0xccc911[_0x44bf0e(0xeb)](_0x44bf0e(0xbb)))return{'ok':!![],'data':{'total':_0x366eb5['length'],'items':_0x366eb5}};return{'ok':!![],'data':{'total':_0x366eb5[_0x44bf0e(0xf7)],'items':_0x366eb5[_0x44bf0e(0xcb)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':'detail','description':a35_0x434d03(0xe5),'risk':a35_0x434d03(0xce),'flags':[{...ID_FLAG,'type':a35_0x434d03(0xd3),'description':a35_0x434d03(0xff)}],async 'execute'(_0x2bbad7){const _0x3eb9d2=a35_0x434d03,_0x4a47e3=await getPersonalKnowledgeBaseItem(_0x2bbad7[_0x3eb9d2(0xc1)]('id'),_0x2bbad7[_0x3eb9d2(0xde)],_0x2bbad7[_0x3eb9d2(0xfd)]);return{'ok':!![],'data':detailPersonalItem(_0x4a47e3)};}},kbCreate={'service':'kb','command':a35_0x434d03(0xcd),'description':a35_0x434d03(0xca),'risk':a35_0x434d03(0xdb),'confirmationDescription':a35_0x434d03(0xe1),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x45ca92){const _0x20b032=a35_0x434d03,_0x7b31fc=_0x45ca92['str'](_0x20b032(0xe7)),_0x5acf85=readKnowledgeFile(_0x45ca92[_0x20b032(0xc1)](_0x20b032(0xe0))),_0x4e4684=await createPersonalKnowledgeBaseItem(_0x45ca92[_0x20b032(0xde)],{'title':_0x7b31fc,'content':_0x5acf85},_0x45ca92['signal']);return{'ok':!![],'data':summarizePersonalItem(_0x4e4684),'message':_0x20b032(0xc7)+_0x4e4684['id']+'\x20('+_0x4e4684[_0x20b032(0xe7)]+')'};},async 'dryRun'(_0x2f190d){const _0x5bfd63=a35_0x434d03,_0x34a071=_0x2f190d[_0x5bfd63(0xc1)](_0x5bfd63(0xe7)),_0x4efc5e=readKnowledgeFile(_0x2f190d['str'](_0x5bfd63(0xe0))),_0x30ae3d=planPersonalKnowledgeWrite(_0x2f190d[_0x5bfd63(0xde)],{'title':_0x34a071,'content':_0x4efc5e});return dryRun(_0x30ae3d['method'],_0x30ae3d[_0x5bfd63(0xee)])[_0x5bfd63(0xf4)](JSON['parse'](_0x30ae3d[_0x5bfd63(0xdf)]))['description'](_0x5bfd63(0xe2)+_0x34a071+'\x22')[_0x5bfd63(0xd7)]();}},kbUpdate={'service':'kb','command':a35_0x434d03(0xba),'description':a35_0x434d03(0xef),'risk':'write','confirmationDescription':a35_0x434d03(0xb9),'flags':[{...ID_FLAG,'type':a35_0x434d03(0xd3),'description':a35_0x434d03(0xff)},{...TITLE_FLAG,'required':![],'description':a35_0x434d03(0xfb)},FILE_FLAG],async 'execute'(_0x3aed15){const _0x592b26=a35_0x434d03,_0x53b972=_0x3aed15[_0x592b26(0xc1)]('id'),_0x4331e1=readKnowledgeFile(_0x3aed15[_0x592b26(0xc1)](_0x592b26(0xe0))),_0x5babc9=_0x3aed15[_0x592b26(0xc1)]('title')||undefined,_0x5e4e18=await updatePersonalKnowledgeBaseItem(_0x53b972,_0x3aed15[_0x592b26(0xde)],{'title':_0x5babc9,'content':_0x4331e1},_0x3aed15['signal']);return{'ok':!![],'data':summarizePersonalItem(_0x5e4e18),'message':_0x592b26(0xe4)+_0x5e4e18['id']+'\x20('+_0x5e4e18[_0x592b26(0xe7)]+')'};},async 'dryRun'(_0x21d8ae){const _0x4fe282=a35_0x434d03,_0x1b4080=_0x21d8ae[_0x4fe282(0xc1)]('id'),_0x1bf194=readKnowledgeFile(_0x21d8ae['str'](_0x4fe282(0xe0))),_0x44c7ee=await getPersonalKnowledgeBaseItem(_0x1b4080,_0x21d8ae['appCode'],_0x21d8ae[_0x4fe282(0xfd)]),_0x57a29b=_0x21d8ae['str'](_0x4fe282(0xe7))||_0x44c7ee[_0x4fe282(0xe7)],_0xd5f3b7=planPersonalKnowledgeWrite(_0x21d8ae[_0x4fe282(0xde)],{'title':_0x57a29b,'content':_0x1bf194},_0x1b4080,_0x44c7ee['version']);return dryRun(_0xd5f3b7['method'],_0xd5f3b7[_0x4fe282(0xee)])[_0x4fe282(0xf4)](JSON[_0x4fe282(0xdd)](_0xd5f3b7[_0x4fe282(0xdf)]))[_0x4fe282(0xd4)](_0x4fe282(0xbc)+_0x1b4080)[_0x4fe282(0xd7)]();}};function readSearchServiceUrl(_0x524720){const _0x287d3e=a35_0x434d03;if(_0x524720[_0x287d3e(0xfa)](_0x287d3e(0xd9))!==undefined)return normalizeKbServiceOrigin(_0x524720[_0x287d3e(0xc1)](_0x287d3e(0xd9)));const _0x2bbe06=getKbServiceDomain();if(!_0x2bbe06)throw CliErrors[_0x287d3e(0xd6)](_0x287d3e(0xe9),_0x287d3e(0xd0));return normalizeKbServiceOrigin(_0x2bbe06);}function a35_0x4341(){const _0x1edf71=['3qhgxIv','Personal\x20knowledge-base\x20entry\x20title','Search\x20visible\x20public,\x20company,\x20and\x20personal\x20knowledge','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','topk','Created\x20KB\x20entry\x20','60qwshGI','isFile','Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','map','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','create','read','Search\x20query\x20is\x20required.','Configure\x20kbServiceDomain\x20in\x20the\x20connection\x20settings,\x20or\x20pass\x20`--kb-service-url\x20<https-origin>`\x20for\x20this\x20request.','utf8','Optional\x20trusted\x20KB\x20Service\x20HTTPS\x20origin\x20for\x20this\x20request\x20only','string','description','330nmzxGg','validation','build','File\x20not\x20found:\x20','kb-service-url','content','write','isSafeInteger','parse','appCode','jsonBody','file','Saves\x20local\x20file\x20content\x20as\x20a\x20personal\x20knowledge-base\x20entry\x20and\x20starts\x20retrieval\x20sync.','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','updateTime','Updated\x20KB\x20entry\x20','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','File\x20path\x20is\x20required.','title','6552FUSHHD','KB\x20Service\x20is\x20not\x20configured\x20for\x20knowledge\x20search.','16151JOBfEs','bool','2289sRiIev','7691484lawkbv','path','Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','createTime','ragErrorMessage','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','--topk\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.','body','query','scope','length','122910BfupZN','253855xBvRlq','flag','Override\x20the\x20existing\x20entry\x20title','dryRun','signal','2093812zodWxd','Personal\x20knowledge-base\x20entry\x20ID','number','Replaces\x20the\x20personal\x20knowledge-base\x20entry\x20body\x20with\x20local\x20file\x20content\x20and\x20triggers\x20retrieval\x20sync.','update','verbose','Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20','1439865ZkACiW','42qNXBGo','ragStatus','version','str'];a35_0x4341=function(){return _0x1edf71;};return a35_0x4341();}const kbSearch={'service':'kb','command':'search','description':a35_0x434d03(0xc4),'risk':a35_0x434d03(0xce),'flags':[QUERY_FLAG,TOPK_FLAG,{'name':a35_0x434d03(0xd9),'type':'string','required':![],'description':a35_0x434d03(0xd2)}],async 'validate'(_0x2ab39a){const _0x2b8110=a35_0x434d03;if(!_0x2ab39a['str']('query')['trim']())throw CliErrors[_0x2b8110(0xd6)](_0x2b8110(0xcf));readTopK(_0x2ab39a),readSearchServiceUrl(_0x2ab39a);},async 'execute'(_0x1d9be5){const _0x12c5f8=a35_0x434d03,_0x2c440f=_0x1d9be5['str'](_0x12c5f8(0xf5))['trim'](),_0x21d94b=readTopK(_0x1d9be5),_0x2c20ae=readSearchServiceUrl(_0x1d9be5),_0x1f7619={'appCode':_0x1d9be5[_0x12c5f8(0xde)],'accessKey':_0x1d9be5['accessKey']??'','query':_0x2c440f,..._0x21d94b!==undefined?{'topK':_0x21d94b}:{},'signal':_0x1d9be5['signal']},_0x3e6f7d=await searchDirectKnowledge({..._0x1f7619,'serviceUrl':_0x2c20ae});return{'ok':!![],'data':_0x3e6f7d};}};function managementCommand(_0x26b66b){const _0x26f401=a35_0x434d03;return{..._0x26b66b,'execute':_0x2b006e=>withKbManagementOrigin(()=>_0x26b66b['execute'](_0x2b006e)),..._0x26b66b[_0x26f401(0xfc)]?{'dryRun':_0xc3ff33=>withKbManagementOrigin(()=>_0x26b66b[_0x26f401(0xfc)](_0xc3ff33))}:{}};}export const kbDefinitions=[...[kbList,kbDetail,kbCreate,kbUpdate][a35_0x434d03(0xcb)](managementCommand),kbSearch];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a36_0x139fdd=a36_0x55ad;(function(_0x4309a8,_0x3c7799){const _0x425151=a36_0x55ad,_0x53c1a4=_0x4309a8();while(!![]){try{const _0x5dfacb=-parseInt(_0x425151(0x1f2))/0x1+-parseInt(_0x425151(0x1e6))/0x2+-parseInt(_0x425151(0x1f4))/0x3+parseInt(_0x425151(0x1f5))/0x4*(parseInt(_0x425151(0x1dd))/0x5)+-parseInt(_0x425151(0x1e5))/0x6+-parseInt(_0x425151(0x1dc))/0x7+parseInt(_0x425151(0x1ed))/0x8;if(_0x5dfacb===_0x3c7799)break;else _0x53c1a4['push'](_0x53c1a4['shift']());}catch(_0x29e070){_0x53c1a4['push'](_0x53c1a4['shift']());}}}(a36_0x862b,0x740fb));function a36_0x862b(){const _0x4adc1c=['*\x20No\x20logs\x20found','\x20\x20\x20Duration:\x20','5508174zwcYNk','10hRZvXG','View\x20command\x20history\x20logs','success','timestamp','duration','length','\x20\x20\x20Details:\x20','forEach','1879800MOCjiK','486342VeilJo','toLocaleString','readLogs','warn','error','show','en-US','17071640JQYiaw','log','command','keys','stringify','340550AXJjFw','\x20\x20\x20Time:\x20','1030857EvkLdF','737908kCwWfd','level','details'];a36_0x862b=function(){return _0x4adc1c;};return a36_0x862b();}function a36_0x55ad(_0x16218f,_0x106afc){_0x16218f=_0x16218f-0x1d9;const _0x862b1f=a36_0x862b();let _0x55ad51=_0x862b1f[_0x16218f];return _0x55ad51;}import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function printLogs(_0x1c65f0){const _0x2384a4=a36_0x55ad;if(_0x1c65f0[_0x2384a4(0x1e2)]===0x0){console[_0x2384a4(0x1ee)](_0x2384a4(0x1da));return;}console[_0x2384a4(0x1ee)]('*\x20'+CLI_DISPLAY_NAME+'\x20logs:\x0a'),_0x1c65f0[_0x2384a4(0x1e4)]((_0x323e2b,_0x31ae8b)=>{const _0x47678b=_0x2384a4,_0x194517=new Date(_0x323e2b[_0x47678b(0x1e0)])[_0x47678b(0x1e7)](_0x47678b(0x1ec)),_0x4c4d9a=_0x323e2b[_0x47678b(0x1f6)]===_0x47678b(0x1df)?'√':_0x323e2b[_0x47678b(0x1f6)]===_0x47678b(0x1ea)?'×':_0x323e2b[_0x47678b(0x1f6)]===_0x47678b(0x1e9)?'!':'i';console[_0x47678b(0x1ee)](_0x31ae8b+0x1+'.\x20'+_0x4c4d9a+'\x20['+_0x323e2b[_0x47678b(0x1ef)]+']\x20'+_0x323e2b['message']),console['log'](_0x47678b(0x1f3)+_0x194517),_0x323e2b['duration']&&console[_0x47678b(0x1ee)](_0x47678b(0x1db)+_0x323e2b[_0x47678b(0x1e1)]+'ms'),_0x323e2b[_0x47678b(0x1d9)]&&Object[_0x47678b(0x1f0)](_0x323e2b[_0x47678b(0x1d9)])['length']>0x0&&console[_0x47678b(0x1ee)](_0x47678b(0x1e3)+JSON[_0x47678b(0x1f1)](_0x323e2b[_0x47678b(0x1d9)],null,0x2)),console[_0x47678b(0x1ee)]('');});}export const logsDefinitions=[{'service':'logs','command':a36_0x139fdd(0x1eb),'description':a36_0x139fdd(0x1de),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x17f0b7){const _0x40cd10=a36_0x139fdd;return printLogs(logger[_0x40cd10(0x1e8)]()),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a37_0x193adb=a37_0x37b6;(function(_0x4f98ca,_0x4f9d0f){const _0x76cdaf=a37_0x37b6,_0x8fa96c=_0x4f98ca();while(!![]){try{const _0x3ece30=-parseInt(_0x76cdaf(0xb1))/0x1+-parseInt(_0x76cdaf(0xae))/0x2+parseInt(_0x76cdaf(0xb5))/0x3*(-parseInt(_0x76cdaf(0xb6))/0x4)+-parseInt(_0x76cdaf(0xb9))/0x5*(parseInt(_0x76cdaf(0xb2))/0x6)+parseInt(_0x76cdaf(0xb3))/0x7*(parseInt(_0x76cdaf(0xb4))/0x8)+parseInt(_0x76cdaf(0xaa))/0x9+-parseInt(_0x76cdaf(0xb0))/0xa*(-parseInt(_0x76cdaf(0xa9))/0xb);if(_0x3ece30===_0x4f9d0f)break;else _0x8fa96c['push'](_0x8fa96c['shift']());}catch(_0x30f265){_0x8fa96c['push'](_0x8fa96c['shift']());}}}(a37_0x11ed,0x7b7a8));import{listNotificationChannelConfigs}from'../../core/api-client.js';function a37_0x37b6(_0x49dd4a,_0x1a1b9b){_0x49dd4a=_0x49dd4a-0xa9;const _0x11ed4a=a37_0x11ed();let _0x37b6e3=_0x11ed4a[_0x49dd4a];return _0x37b6e3;}import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':'notification','command':a37_0x193adb(0xad),'description':'List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','risk':'read','flags':[{'name':a37_0x193adb(0xb8),'type':a37_0x193adb(0xbb),'description':'Notification\x20channel\x20type','enum':NOTIFICATION_CHANNEL_TYPES,'default':a37_0x193adb(0xac)}],async 'validate'(_0x1e365e){readNotificationChannelType(_0x1e365e);},async 'execute'(_0x5eb9ac){const _0x20866c=a37_0x193adb,_0x4d41f3=readNotificationChannelType(_0x5eb9ac),_0x488298=await listNotificationChannelConfigs(_0x5eb9ac[_0x20866c(0xab)],_0x4d41f3),_0x37f5e2=_0x488298['map'](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x5eb9ac[_0x20866c(0xab)],'channelType':_0x4d41f3,'count':_0x37f5e2[_0x20866c(0xaf)],'configs':_0x37f5e2},'message':_0x20866c(0xb7)+_0x37f5e2[_0x20866c(0xaf)]+'\x20'+_0x4d41f3+_0x20866c(0xba)};}};function a37_0x11ed(){const _0x36b97a=['1357905qhOdoO','\x20notification\x20config(s)','string','11tWpLbC','5716665UCbqmu','appCode','EMAIL','config-list','1259248tuXLGm','length','19880690OYFUaZ','647888cgcOUB','18rRDdvR','889YQASdU','17464tyrBRm','113427lLtySh','32aUloEI','Found\x20','type'];a37_0x11ed=function(){return _0x36b97a;};return a37_0x11ed();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x42a9c1,_0x4490c2){const _0x238a96=a38_0x5782,_0x3b25cd=_0x42a9c1();while(!![]){try{const _0xbac1a7=parseInt(_0x238a96(0x80))/0x1+-parseInt(_0x238a96(0x81))/0x2+parseInt(_0x238a96(0x89))/0x3*(-parseInt(_0x238a96(0x83))/0x4)+-parseInt(_0x238a96(0x8a))/0x5*(-parseInt(_0x238a96(0x85))/0x6)+parseInt(_0x238a96(0x87))/0x7*(-parseInt(_0x238a96(0x88))/0x8)+-parseInt(_0x238a96(0x86))/0x9*(-parseInt(_0x238a96(0x82))/0xa)+-parseInt(_0x238a96(0x84))/0xb;if(_0xbac1a7===_0x4490c2)break;else _0x3b25cd['push'](_0x3b25cd['shift']());}catch(_0x2c2e17){_0x3b25cd['push'](_0x3b25cd['shift']());}}}(a38_0xb7fc,0xd4650));import{notificationConfigList}from'../../commands/notification/config-list.js';function a38_0x5782(_0x2d42aa,_0x5245b0){_0x2d42aa=_0x2d42aa-0x80;const _0xb7fc1f=a38_0xb7fc();let _0x578230=_0xb7fc1f[_0x2d42aa];return _0x578230;}function a38_0xb7fc(){const _0x57da96=['1422872pnlXsW','1993914zORshj','3397419FZMhHk','70SbLqoh','10888DzOvZQ','538026lxFAEX','5JSIasj','834466xnTAnw','1496604VwThrl','30NoRLcI','12UDAEGw'];a38_0xb7fc=function(){return _0x57da96;};return a38_0xb7fc();}export const notificationDefinitions=[notificationConfigList];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a39_0x4cef(){const _0x1953b1=['Invalid\x20notification\x20config\x20response.','688296aKSaji','DINGTALK','join','isArray','423291AAXBMJ','3277113InHfpf','string','object','Item\x20','\x20must\x20be\x20an\x20object.','description','trim','EMAIL','str','751143jansHt','configName','includes','2677165TPlwqS','Allowed\x20values:\x20','2076432piODDJ','4qYjMLD','channelType','type','apiError','WEBHOOK','13631400nljOEh','Invalid\x20--type:\x20','configCode','\x20is\x20missing\x20required\x20field\x20\x22'];a39_0x4cef=function(){return _0x1953b1;};return a39_0x4cef();}const a39_0x39c580=a39_0x208a;(function(_0x3f4888,_0x485e67){const _0x5547d3=a39_0x208a,_0x3adf7e=_0x3f4888();while(!![]){try{const _0x5795db=-parseInt(_0x5547d3(0x15e))/0x1+-parseInt(_0x5547d3(0x15a))/0x2+-parseInt(_0x5547d3(0x168))/0x3+parseInt(_0x5547d3(0x150))/0x4*(parseInt(_0x5547d3(0x14d))/0x5)+-parseInt(_0x5547d3(0x14f))/0x6+-parseInt(_0x5547d3(0x15f))/0x7+parseInt(_0x5547d3(0x155))/0x8;if(_0x5795db===_0x485e67)break;else _0x3adf7e['push'](_0x3adf7e['shift']());}catch(_0x104c31){_0x3adf7e['push'](_0x3adf7e['shift']());}}}(a39_0x4cef,0x6370b));import{CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=[a39_0x39c580(0x166),'FEISHU',a39_0x39c580(0x15b),'WECOM',a39_0x39c580(0x154)];export function readNotificationChannelType(_0x1c081a){const _0xe56431=a39_0x39c580,_0x15b04d=_0x1c081a[_0xe56431(0x167)](_0xe56431(0x152))['trim']()||_0xe56431(0x166);if(!NOTIFICATION_CHANNEL_TYPES[_0xe56431(0x14c)](_0x15b04d))throw CliErrors['validation'](_0xe56431(0x156)+_0x15b04d,_0xe56431(0x14e)+NOTIFICATION_CHANNEL_TYPES[_0xe56431(0x15c)](',\x20')+'.');return _0x15b04d;}export function projectNotificationListConfig(_0x4a9feb,_0x158d46){const _0x5654e6=a39_0x39c580,_0x11ae6c=requireResponseObject(_0x4a9feb,_0x158d46);return{'configCode':requireResponseString(_0x11ae6c[_0x5654e6(0x157)],_0x5654e6(0x157),_0x158d46),'configName':requireResponseString(_0x11ae6c[_0x5654e6(0x14b)],_0x5654e6(0x14b),_0x158d46),'channelType':requireResponseString(_0x11ae6c[_0x5654e6(0x151)],_0x5654e6(0x151),_0x158d46),'description':normalizeNullableString(_0x11ae6c[_0x5654e6(0x164)])};}function a39_0x208a(_0x2d272e,_0x3e66c0){_0x2d272e=_0x2d272e-0x14b;const _0x4cef9a=a39_0x4cef();let _0x208a15=_0x4cef9a[_0x2d272e];return _0x208a15;}function requireResponseObject(_0x1fee04,_0x5d04f2){const _0x224fc9=a39_0x39c580;if(typeof _0x1fee04!==_0x224fc9(0x161)||_0x1fee04===null||Array[_0x224fc9(0x15d)](_0x1fee04))throw CliErrors[_0x224fc9(0x153)]('Invalid\x20notification\x20config\x20response.','Item\x20'+(_0x5d04f2+0x1)+_0x224fc9(0x163));return _0x1fee04;}function requireResponseString(_0x5eba93,_0x646938,_0xf4811e){const _0x3bd893=a39_0x39c580;if(typeof _0x5eba93!==_0x3bd893(0x160)||!_0x5eba93[_0x3bd893(0x165)]())throw CliErrors[_0x3bd893(0x153)](_0x3bd893(0x159),_0x3bd893(0x162)+(_0xf4811e+0x1)+_0x3bd893(0x158)+_0x646938+'\x22.');return _0x5eba93[_0x3bd893(0x165)]();}function normalizeNullableString(_0x558002){const _0x2fe061=a39_0x39c580;return typeof _0x558002===_0x2fe061(0x160)&&_0x558002[_0x2fe061(0x165)]()?_0x558002['trim']():null;}
|