@lovrabet/lovrabet-cli 2.3.6-beta.2 → 2.3.6-beta.3
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 +33 -2
- 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 +17 -0
- package/lib/core/kb-management-client.js +1 -0
- 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 +1 -1
- package/skills/lovrabet/references/lovrabet-kb-workflow.md +7 -3
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
function a27_0xf6d7(_0x1cabe3,_0x2a3ebb){_0x1cabe3=_0x1cabe3-0x9b;const _0x2c2d66=a27_0x2c2d();let _0xf6d798=_0x2c2d66[_0x1cabe3];return _0xf6d798;}const a27_0x2dfab1=a27_0xf6d7;function a27_0x2c2d(){const _0x10eb4c=['\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','510435yByldF','Delete\x20data\x20records\x20(non-interactive\x20mode\x20requires\x20--yes)','\x20\x20\x20\x20then\x20convert\x20rows\x20to\x20JSON\x20and\x20split\x20within\x20the\x20target\x20API\x20row/byte\x20and\x20local\x20argument\x20limits.','\x20\x20\x20\x20METADATA\x20datasets\x20do\x20not\x20support\x20aggregate\x20or\x20Custom\x20SQL','\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\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','\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]','Create\x20multiple\x20records\x20in\x20the\x20dataset\x20in\x20one\x20request','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','aggregate','142010Zrjxsu','getOne','\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\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}','confirmationDescription','257152znJFCq','read','update','\x20\x20EXCEL\x20ROUTES','\x20\x20\x20\x20select/where/having/groupBy\x20must\x20use\x20real\x20dataset\x20fields','\x20\x20\x20\x20aggregate\x20supports\x20a\x20single\x20DB_TABLE\x20dataset\x20only','\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}','body','\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\x20JOIN\x20and\x20cross-table\x20aggregation\x20require\x20an\x20existing\x20trusted\x20Custom\x20SQL','\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\x20No\x20import\x20checkpoint,\x20--resume,\x20automatic\x20upsert,\x20or\x20atomic\x20rollback\x20guarantee.','\x20\x20\x20\x20Built-in\x20Skill\x20guide:\x20references/lovrabet-db-table-excel-import.md','\x20\x20WHERE\x20OPERATORS','375767OVKUXX','\x20\x20\x20\x20aggregate[].alias\x20defines\x20the\x20output\x20field\x20name\x20only','batch','\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$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}}]}','170XBUyfr','\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$startWith\x20\x20\x20Starts\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$startWith\x22:\x22Mr.\x22}}','1825920FDLgQl','\x20\x20AGGREGATE\x20TYPES','write','params','\x20\x20\x20\x20Non-Excel\x20batchCreate\x20remains\x20available\x20for\x20METADATA\x20and\x20DB_TABLE.','Create\x20one\x20record\x20in\x20the\x20dataset','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','Writes\x20one\x20new\x20business\x20record\x20to\x20the\x20current\x20app\x20dataset.\x20It\x20is\x20saved\x20immediately\x20after\x20confirmation.','build','\x20\x20EXAMPLES','\x20\x20\x20\x20$lt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lt\x22:1000}}','\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','\x20\x20\x20\x20$gte\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20or\x20equal\x20\x20{\x22amount\x22:{\x22$gte\x22:100}}','\x20\x20\x20\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}}','delete','171BecsJE','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\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\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','\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}}','command','\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\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','data\x20','\x20\x20LOGICAL\x20COMBINATORS','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','\x20\x20\x20\x20and\x20increment\x20only\x20currentPage.\x20Use\x20a\x20stable\x20unique\x20orderBy\x20field\x20to\x20avoid\x20duplicates\x20or\x20gaps.','\x20\x20\x20\x20METADATA:\x20use\x20lovrabet\x20data\x20import-excel\x20with\x20checkpoint\x20recovery.','\x20\x20\x20\x20--dry-run\x20previews\x20the\x20request\x20only;\x20it\x20does\x20not\x20validate\x20server\x20constraints\x20or\x20write\x20permissions.','description','dryRun','code','\x20\x20\x20\x20Record\x20each\x20batch\x20and\x20verify\x20its\x20IDs\x20or\x20unique\x20business\x20keys\x20before\x20continuing.','\x20\x20PARAMS\x20STRUCTURE','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','batchCreate','\x20\x20PAGINATION','create','\x20\x20\x20\x20choose\x20the\x20capability\x20before\x20execution;\x20never\x20fall\x20back\x20at\x20runtime','data','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','Update\x20an\x20existing\x20data\x20record','Example:\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x20\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','Filter\x20dataset\x20records\x20with\x20query\x20conditions','\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}}','Get\x20a\x20single\x20record\x20by\x20ID','now','helpExtra','\x20on\x20dataset\x20','\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}]','paramsHint','paramsRequired','Changes\x20an\x20existing\x20business\x20record\x20in\x20the\x20current\x20app\x20dataset.\x20The\x20new\x20values\x20are\x20saved\x20immediately\x20after\x20confirmation.','10QmSzTx','\x20\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','filter','high-risk-write','Deletes\x20business\x20records\x20from\x20the\x20current\x20app\x20dataset.\x20This\x20may\x20not\x20be\x20recoverable.','\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\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','\x20\x20\x20\x20orderBy\x20may\x20reference\x20aggregate\x20output\x20aliases','2138FVrblw','\x20\x20\x20\x20Stop\x20on\x20unknown\x20outcomes\x20or\x20conflicts;\x20reconcile\x20before\x20retrying,\x20never\x20blindly\x20resend\x20a\x20batch.','\x20\x20\x20\x20Filtering\x20and\x20pagination\x20are\x20controlled\x20only\x20via\x20one\x20JSON\x20object\x20in\x20--params.','length','operation','\x20\x20DATASET\x20BOUNDARY','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','str','8WFVOVn','4243338nbTZbd','risk'];a27_0x2c2d=function(){return _0x10eb4c;};return a27_0x2c2d();}(function(_0x1654f1,_0x1de0f9){const _0x121dd0=a27_0xf6d7,_0x4af25f=_0x1654f1();while(!![]){try{const _0x45756c=-parseInt(_0x121dd0(0x100))/0x1*(-parseInt(_0x121dd0(0xc0))/0x2)+-parseInt(_0x121dd0(0x9e))/0x3+parseInt(_0x121dd0(0xad))/0x4*(-parseInt(_0x121dd0(0xf8))/0x5)+-parseInt(_0x121dd0(0xc3))/0x6+-parseInt(_0x121dd0(0xbb))/0x7*(parseInt(_0x121dd0(0x109))/0x8)+-parseInt(_0x121dd0(0xd2))/0x9*(-parseInt(_0x121dd0(0xa8))/0xa)+parseInt(_0x121dd0(0x9b))/0xb;if(_0x45756c===_0x1de0f9)break;else _0x4af25f['push'](_0x4af25f['shift']());}catch(_0x4d0e35){_0x4af25f['push'](_0x4af25f['shift']());}}}(a27_0x2c2d,0x2c169));import{dataImportExcel}from'./import-excel.js';import{executeData}from'../../core/sdk-client.js';import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{requireAnyOf}from'../../commands/common/constraints.js';import{parseJsonParams,parseJsonParamsValue,parseBatchCreateItemsFromParams,parseUpdateIdsFromParams,normalizeUpdateParamsForRuntime}from'../../utils/params.js';import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':'filter','operation':a27_0x2dfab1(0xfa),'risk':a27_0x2dfab1(0xae),'paramsRequired':![],'description':a27_0x2dfab1(0xee),'paramsHint':'JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20'+a27_0x2dfab1(0xe5),'helpExtra':[a27_0x2dfab1(0xba),a27_0x2dfab1(0xd6),'\x20\x20\x20\x20$ne\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Not\x20equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22status\x22:{\x22$ne\x22:\x22deleted\x22}}','\x20\x20\x20\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_0x2dfab1(0xcf),a27_0x2dfab1(0xcd),'\x20\x20\x20\x20$lte\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20or\x20equal\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lte\x22:1000}}',a27_0x2dfab1(0xbe),a27_0x2dfab1(0xd8),a27_0x2dfab1(0xc2),a27_0x2dfab1(0xef),'',a27_0x2dfab1(0xdb),a27_0x2dfab1(0xfd),a27_0x2dfab1(0xbf),'',a27_0x2dfab1(0xd9),a27_0x2dfab1(0xeb),'\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]',a27_0x2dfab1(0xf4),a27_0x2dfab1(0xdc),a27_0x2dfab1(0xa3),'',a27_0x2dfab1(0xe7),a27_0x2dfab1(0x102),a27_0x2dfab1(0xa2),'\x20\x20\x20\x20Page\x20numbers\x20start\x20at\x201.\x20To\x20fetch\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged',a27_0x2dfab1(0xdd),'\x20\x20\x20\x20Page\x201:\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:1,\x22pageSize\x22:20}\x27',a27_0x2dfab1(0xaa),'\x20\x20\x20\x20Verify\x20the\x20response\x20paging.currentPage/pageSize\x20and\x20that\x20tableData\x20satisfies\x20where\x20before\x20drawing\x20conclusions.']['join']('\x0a')},{'command':a27_0x2dfab1(0xa9),'operation':a27_0x2dfab1(0xa9),'risk':a27_0x2dfab1(0xae),'paramsRequired':!![],'description':a27_0x2dfab1(0xf0),'paramsHint':a27_0x2dfab1(0xa6)},{'command':a27_0x2dfab1(0xe8),'operation':a27_0x2dfab1(0xe8),'risk':'write','paramsRequired':!![],'description':a27_0x2dfab1(0xc8),'confirmationDescription':a27_0x2dfab1(0xca),'paramsHint':'JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27'},{'command':a27_0x2dfab1(0xe6),'operation':a27_0x2dfab1(0xe6),'risk':a27_0x2dfab1(0xc5),'paramsRequired':!![],'description':a27_0x2dfab1(0xa5),'helpExtra':[a27_0x2dfab1(0xb0),a27_0x2dfab1(0xde),'\x20\x20\x20\x20DB_TABLE:\x20inspect\x20dataset\x20detail,\x20validate\x20the\x20full\x20file\x20and\x20confirmed\x20unique\x20business\x20keys,',a27_0x2dfab1(0xa0),'\x20\x20\x20\x20This\x20command\x20sends\x20one\x20prepared\x20batch;\x20it\x20does\x20not\x20read\x20XLSX\x20or\x20split\x20batches.',a27_0x2dfab1(0xdf),a27_0x2dfab1(0xe3),a27_0x2dfab1(0x101),a27_0x2dfab1(0xb8),a27_0x2dfab1(0xb9),a27_0x2dfab1(0xc7)]['join']('\x0a'),'confirmationDescription':'Writes\x20multiple\x20new\x20business\x20records\x20to\x20the\x20current\x20app\x20dataset.\x20They\x20are\x20saved\x20immediately\x20after\x20confirmation.','paramsHint':a27_0x2dfab1(0x106)},{'command':a27_0x2dfab1(0xaf),'operation':a27_0x2dfab1(0xaf),'risk':a27_0x2dfab1(0xc5),'paramsRequired':!![],'description':a27_0x2dfab1(0xec),'confirmationDescription':a27_0x2dfab1(0xf7),'paramsHint':'JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20id\x20may\x20be\x20a\x20single\x20value\x20or\x20array.\x20'+a27_0x2dfab1(0xd3)},{'command':a27_0x2dfab1(0xd1),'operation':a27_0x2dfab1(0xd1),'risk':a27_0x2dfab1(0xfb),'paramsRequired':!![],'description':a27_0x2dfab1(0x9f),'confirmationDescription':a27_0x2dfab1(0xfc),'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':'aggregate','operation':a27_0x2dfab1(0xa7),'risk':a27_0x2dfab1(0xae),'paramsRequired':![],'description':a27_0x2dfab1(0xc9),'paramsHint':a27_0x2dfab1(0xd5)+a27_0x2dfab1(0xed),'helpExtra':[a27_0x2dfab1(0xc4),a27_0x2dfab1(0xab),'\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_0x2dfab1(0xd4),a27_0x2dfab1(0xb3),a27_0x2dfab1(0xb7),'\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\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_0x2dfab1(0xe4),a27_0x2dfab1(0xa4),a27_0x2dfab1(0xfe),'\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)',a27_0x2dfab1(0xce),a27_0x2dfab1(0xd0),a27_0x2dfab1(0xc1),'','\x20\x20AGGREGATE\x20ALIAS\x20BOUNDARY',a27_0x2dfab1(0xbc),a27_0x2dfab1(0xb1),a27_0x2dfab1(0xff),'',a27_0x2dfab1(0x105),a27_0x2dfab1(0xb2),a27_0x2dfab1(0xa1),a27_0x2dfab1(0xb6),a27_0x2dfab1(0xe9),'',a27_0x2dfab1(0xcc),a27_0x2dfab1(0x107),a27_0x2dfab1(0xb5),'','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter',a27_0x2dfab1(0x9d),'',a27_0x2dfab1(0xf9)]['join']('\x0a')}];function makeDataCommand(_0x9c54e2){const _0x1851d7=a27_0x2dfab1,_0x66d4b7=_0x1851d7(0xda)+_0x9c54e2[_0x1851d7(0xd7)],_0x17a838={'service':_0x1851d7(0xea),'command':_0x9c54e2[_0x1851d7(0xd7)],'description':_0x9c54e2[_0x1851d7(0xe0)],'risk':_0x9c54e2[_0x1851d7(0x9c)],..._0x9c54e2['confirmationDescription']?{'confirmationDescription':_0x9c54e2[_0x1851d7(0xac)]}:{},'helpExtra':_0x9c54e2[_0x1851d7(0xf2)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x9c54e2[_0x1851d7(0xf5)]}],'validate':async _0x1c2abd=>{const _0x435dd6=_0x1851d7;_0x9c54e2[_0x435dd6(0xf6)]&&requireAnyOf(_0x1c2abd,['params'],_0x66d4b7),_0x9c54e2[_0x435dd6(0x104)]==='batchCreate'&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x1c2abd[_0x435dd6(0x108)](_0x435dd6(0xc6)))),_0x9c54e2[_0x435dd6(0x104)]===_0x435dd6(0xaf)&&parseUpdateIdsFromParams(parseJsonParams(_0x1c2abd['str']('params'))??{});},async 'execute'(_0xa54976){const _0x54fa39=_0x1851d7,_0x575c52=_0xa54976['str']('code'),_0x1ae875=_0x9c54e2['operation']==='batchCreate'?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0xa54976['str']('params'))):parseJsonParams(_0xa54976[_0x54fa39(0x108)](_0x54fa39(0xc6)))??{},_0x5ed78d=_0x9c54e2[_0x54fa39(0x104)]===_0x54fa39(0xaf)?parseUpdateIdsFromParams(_0x1ae875):undefined,_0x4f6412=_0x5ed78d?normalizeUpdateParamsForRuntime(_0x1ae875,_0x5ed78d):_0x1ae875,_0x183964=Date['now'](),_0x516d7a=await executeData(_0x575c52,_0x9c54e2[_0x54fa39(0x104)],_0x4f6412),_0x193367=Date[_0x54fa39(0xf1)]()-_0x183964,_0x4899c0=_0x5ed78d&&_0x5ed78d[_0x54fa39(0x103)]>0x1?buildBatchUpdateResult(_0x5ed78d,_0x516d7a):_0x516d7a;return{'ok':!![],'data':{'result':_0x4899c0,'elapsed':_0x193367},'message':'data\x20'+_0x9c54e2[_0x54fa39(0xd7)]+'\x20completed\x20in\x20'+_0x193367+'ms'};}};return _0x9c54e2['risk']!==_0x1851d7(0xae)&&(_0x17a838[_0x1851d7(0xe1)]=async _0x260b13=>{const _0x4da3dd=_0x1851d7,_0xdfce7f=_0x260b13['str'](_0x4da3dd(0xe2)),_0x2a59d5=_0x9c54e2[_0x4da3dd(0x104)]===_0x4da3dd(0xe6)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x260b13[_0x4da3dd(0x108)](_0x4da3dd(0xc6)))):parseJsonParams(_0x260b13[_0x4da3dd(0x108)](_0x4da3dd(0xc6)))??{};let _0x12e103=_0x2a59d5;if(_0x9c54e2[_0x4da3dd(0x104)]===_0x4da3dd(0xaf)){const _0x388699=parseUpdateIdsFromParams(_0x2a59d5);_0x12e103=normalizeUpdateParamsForRuntime(_0x2a59d5,_0x388699);}return dryRun('POST','/api/{appCode}/'+_0xdfce7f+'/'+_0x9c54e2[_0x4da3dd(0x104)])[_0x4da3dd(0xb4)](_0x12e103)[_0x4da3dd(0xe0)]('Preview:\x20data\x20'+_0x9c54e2[_0x4da3dd(0xd7)]+_0x4da3dd(0xf3)+_0xdfce7f)[_0x4da3dd(0xcb)]();}),_0x17a838;}export const dataDefinitions=[...specs['map'](makeDataCommand),dataImportExcel];function buildBatchUpdateResult(_0x55372a,_0x7b8024){const _0x4ea8a7=a27_0x2dfab1;return{'operation':_0x4ea8a7(0xaf),'mode':_0x4ea8a7(0xbd),'ids':_0x55372a,'total':_0x55372a[_0x4ea8a7(0x103)],'result':_0x7b8024};}
|
|
1
|
+
function a27_0x3d08(_0x373d06,_0x518781){_0x373d06=_0x373d06-0x1c9;const _0x40658d=a27_0x4065();let _0x3d0891=_0x40658d[_0x373d06];return _0x3d0891;}const a27_0xad014=a27_0x3d08;(function(_0x56dc4b,_0x11628a){const _0x5c1d1c=a27_0x3d08,_0x223e96=_0x56dc4b();while(!![]){try{const _0xd2f67d=parseInt(_0x5c1d1c(0x1c9))/0x1+parseInt(_0x5c1d1c(0x1fd))/0x2+parseInt(_0x5c1d1c(0x211))/0x3+parseInt(_0x5c1d1c(0x1cd))/0x4*(-parseInt(_0x5c1d1c(0x1d8))/0x5)+-parseInt(_0x5c1d1c(0x202))/0x6+-parseInt(_0x5c1d1c(0x1f9))/0x7+parseInt(_0x5c1d1c(0x1ee))/0x8*(-parseInt(_0x5c1d1c(0x215))/0x9);if(_0xd2f67d===_0x11628a)break;else _0x223e96['push'](_0x223e96['shift']());}catch(_0x5f3afd){_0x223e96['push'](_0x223e96['shift']());}}}(a27_0x4065,0x7e385));import{dataImportExcel}from'./import-excel.js';import{executeData}from'../../core/sdk-client.js';function a27_0x4065(){const _0x31cc59=['Create\x20one\x20record\x20in\x20the\x20dataset','\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}}]}','confirmationDescription','update','\x20\x20\x20\x20then\x20convert\x20rows\x20to\x20JSON\x20and\x20split\x20within\x20the\x20target\x20API\x20row/byte\x20and\x20local\x20argument\x20limits.','paramsRequired','\x20\x20PARAMS\x20STRUCTURE','dryRun','\x20\x20\x20\x20No\x20import\x20checkpoint,\x20--resume,\x20automatic\x20upsert,\x20or\x20atomic\x20rollback\x20guarantee.','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','\x20\x20\x20\x20Verify\x20the\x20response\x20paging.currentPage/pageSize\x20and\x20that\x20tableData\x20satisfies\x20where\x20before\x20drawing\x20conclusions.','Deletes\x20business\x20records\x20from\x20the\x20current\x20app\x20dataset.\x20This\x20may\x20not\x20be\x20recoverable.','\x20\x20\x20\x20--dry-run\x20previews\x20the\x20request\x20only;\x20it\x20does\x20not\x20validate\x20server\x20constraints\x20or\x20write\x20permissions.','Create\x20multiple\x20records\x20in\x20the\x20dataset\x20in\x20one\x20request','aggregate','\x20\x20\x20\x20$lt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lt\x22:1000}}','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[\x22region\x22],\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}}}\x27','\x20\x20\x20\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}}','Filter\x20dataset\x20records\x20with\x20query\x20conditions','16WRzIKP','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\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\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}','Preview:\x20data\x20','operation','risk','\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}}','Example:\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x20\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)','\x20\x20\x20\x20aggregate\x20supports\x20a\x20single\x20DB_TABLE\x20dataset\x20only','5972701rwqksX','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\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\x20DATASET\x20BOUNDARY','2039320RSpoOP','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20id\x20may\x20be\x20a\x20single\x20value\x20or\x20array.\x20','\x20\x20\x20\x20and\x20increment\x20only\x20currentPage.\x20Use\x20a\x20stable\x20unique\x20orderBy\x20field\x20to\x20avoid\x20duplicates\x20or\x20gaps.','\x20\x20EXAMPLES','write','1782150mlocZw','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','delete','read','\x20\x20\x20\x20JOIN\x20and\x20cross-table\x20aggregation\x20require\x20an\x20existing\x20trusted\x20Custom\x20SQL','\x20\x20\x20\x20Stop\x20on\x20unknown\x20outcomes\x20or\x20conflicts;\x20reconcile\x20before\x20retrying,\x20never\x20blindly\x20resend\x20a\x20batch.','batch','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','create','filter','now','\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]','Get\x20a\x20single\x20record\x20by\x20ID','\x20\x20AGGREGATE\x20TYPES','command','1791108XxLWgH','\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\x20AGGREGATE\x20ALIAS\x20BOUNDARY','\x20\x20\x20\x20Filtering\x20and\x20pagination\x20are\x20controlled\x20only\x20via\x20one\x20JSON\x20object\x20in\x20--params.','175626twwEsD','POST','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','\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$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}}','data','\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\x20This\x20command\x20sends\x20one\x20prepared\x20batch;\x20it\x20does\x20not\x20read\x20XLSX\x20or\x20split\x20batches.','\x20\x20\x20\x20$gte\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20or\x20equal\x20\x20{\x22amount\x22:{\x22$gte\x22:100}}','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','\x20\x20\x20\x20DB_TABLE:\x20inspect\x20dataset\x20detail,\x20validate\x20the\x20full\x20file\x20and\x20confirmed\x20unique\x20business\x20keys,','map','data\x20','description','\x20\x20WHERE\x20OPERATORS','getOne','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','\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\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return\x20alongside\x20aggregates,\x20e.g.\x20[\x22status\x22,\x22region\x22]','code','\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}','batchCreate','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','\x20\x20\x20\x20$or\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Any\x20condition\x20matches\x20\x20{\x22$or\x22:[{\x22status\x22:{\x22$eq\x22:\x22active\x22}},{\x22status\x22:{\x22$eq\x22:\x22pending\x22}}]}','757265CiefPF','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]','\x20\x20\x20\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}','join','48djlhop','params','\x20\x20\x20\x20METADATA\x20datasets\x20do\x20not\x20support\x20aggregate\x20or\x20Custom\x20SQL','Writes\x20multiple\x20new\x20business\x20records\x20to\x20the\x20current\x20app\x20dataset.\x20They\x20are\x20saved\x20immediately\x20after\x20confirmation.','\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}}','length','str','\x20completed\x20in\x20','body','\x20\x20\x20\x20orderBy\x20may\x20reference\x20aggregate\x20output\x20aliases','high-risk-write','278195rdbtlu'];a27_0x4065=function(){return _0x31cc59;};return a27_0x4065();}import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{requireAnyOf}from'../../commands/common/constraints.js';import{parseJsonParams,parseJsonParamsValue,parseBatchCreateItemsFromParams,parseUpdateIdsFromParams,normalizeUpdateParamsForRuntime}from'../../utils/params.js';import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':'filter','operation':a27_0xad014(0x20b),'risk':a27_0xad014(0x205),'paramsRequired':![],'description':a27_0xad014(0x1ed),'paramsHint':a27_0xad014(0x1ef)+a27_0xad014(0x203),'helpExtra':[a27_0xad014(0x223),'\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\x20$ne\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Not\x20equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22status\x22:{\x22$ne\x22:\x22deleted\x22}}',a27_0xad014(0x1d1),a27_0xad014(0x21d),a27_0xad014(0x1e9),a27_0xad014(0x1f5),a27_0xad014(0x218),a27_0xad014(0x21b),'\x20\x20\x20\x20$startWith\x20\x20\x20Starts\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$startWith\x22:\x22Mr.\x22}}',a27_0xad014(0x219),'','\x20\x20LOGICAL\x20COMBINATORS',a27_0xad014(0x1da),a27_0xad014(0x22c),'',a27_0xad014(0x209),a27_0xad014(0x1fa),a27_0xad014(0x20d),a27_0xad014(0x1ca),a27_0xad014(0x21e),'\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','','\x20\x20PAGINATION',a27_0xad014(0x214),a27_0xad014(0x212),'\x20\x20\x20\x20Page\x20numbers\x20start\x20at\x201.\x20To\x20fetch\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged',a27_0xad014(0x1ff),a27_0xad014(0x1fb),'\x20\x20\x20\x20Page\x202:\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:2,\x22pageSize\x22:20}\x27',a27_0xad014(0x1e4)][a27_0xad014(0x1cc)]('\x0a')},{'command':a27_0xad014(0x224),'operation':a27_0xad014(0x224),'risk':a27_0xad014(0x205),'paramsRequired':!![],'description':a27_0xad014(0x20e),'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':a27_0xad014(0x20a),'operation':a27_0xad014(0x20a),'risk':a27_0xad014(0x201),'paramsRequired':!![],'description':a27_0xad014(0x1d9),'confirmationDescription':'Writes\x20one\x20new\x20business\x20record\x20to\x20the\x20current\x20app\x20dataset.\x20It\x20is\x20saved\x20immediately\x20after\x20confirmation.','paramsHint':a27_0xad014(0x22b)},{'command':a27_0xad014(0x22a),'operation':a27_0xad014(0x22a),'risk':a27_0xad014(0x201),'paramsRequired':!![],'description':a27_0xad014(0x1e7),'helpExtra':['\x20\x20EXCEL\x20ROUTES','\x20\x20\x20\x20METADATA:\x20use\x20lovrabet\x20data\x20import-excel\x20with\x20checkpoint\x20recovery.',a27_0xad014(0x21f),a27_0xad014(0x1dd),a27_0xad014(0x21c),a27_0xad014(0x1e6),'\x20\x20\x20\x20Record\x20each\x20batch\x20and\x20verify\x20its\x20IDs\x20or\x20unique\x20business\x20keys\x20before\x20continuing.',a27_0xad014(0x207),a27_0xad014(0x1e1),'\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.']['join']('\x0a'),'confirmationDescription':a27_0xad014(0x1d0),'paramsHint':'JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27'},{'command':'update','operation':a27_0xad014(0x1dc),'risk':a27_0xad014(0x201),'paramsRequired':!![],'description':'Update\x20an\x20existing\x20data\x20record','confirmationDescription':'Changes\x20an\x20existing\x20business\x20record\x20in\x20the\x20current\x20app\x20dataset.\x20The\x20new\x20values\x20are\x20saved\x20immediately\x20after\x20confirmation.','paramsHint':a27_0xad014(0x1fe)+'Examples:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27,\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22completed\x22}\x27'},{'command':'delete','operation':a27_0xad014(0x204),'risk':a27_0xad014(0x1d7),'paramsRequired':!![],'description':a27_0xad014(0x1f7),'confirmationDescription':a27_0xad014(0x1e5),'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':a27_0xad014(0x1e8),'operation':a27_0xad014(0x1e8),'risk':a27_0xad014(0x205),'paramsRequired':![],'description':a27_0xad014(0x217),'paramsHint':a27_0xad014(0x1e3)+a27_0xad014(0x1f6),'helpExtra':[a27_0xad014(0x20f),'\x20\x20\x20\x20SUM\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Sum\x20of\x20column\x20values\x20\x20\x20\x20\x20{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}',a27_0xad014(0x1cb),a27_0xad014(0x1f1),a27_0xad014(0x229),'\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}',a27_0xad014(0x226),'\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_0xad014(0x1df),a27_0xad014(0x227),'\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)',a27_0xad014(0x1e2),a27_0xad014(0x1f0),a27_0xad014(0x1ec),'\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}]','',a27_0xad014(0x213),'\x20\x20\x20\x20aggregate[].alias\x20defines\x20the\x20output\x20field\x20name\x20only','\x20\x20\x20\x20select/where/having/groupBy\x20must\x20use\x20real\x20dataset\x20fields',a27_0xad014(0x1d6),'',a27_0xad014(0x1fc),a27_0xad014(0x1f8),a27_0xad014(0x1cf),a27_0xad014(0x206),'\x20\x20\x20\x20choose\x20the\x20capability\x20before\x20execution;\x20never\x20fall\x20back\x20at\x20runtime','',a27_0xad014(0x200),a27_0xad014(0x1ea),'\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','',a27_0xad014(0x225),a27_0xad014(0x1eb),'','\x20\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.'][a27_0xad014(0x1cc)]('\x0a')}];function makeDataCommand(_0x5a0d5b){const _0x17abb8=a27_0xad014,_0x133878=_0x17abb8(0x221)+_0x5a0d5b[_0x17abb8(0x210)],_0x5ef572={'service':_0x17abb8(0x21a),'command':_0x5a0d5b[_0x17abb8(0x210)],'description':_0x5a0d5b['description'],'risk':_0x5a0d5b[_0x17abb8(0x1f4)],..._0x5a0d5b['confirmationDescription']?{'confirmationDescription':_0x5a0d5b[_0x17abb8(0x1db)]}:{},'helpExtra':_0x5a0d5b['helpExtra'],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x5a0d5b['paramsHint']}],'validate':async _0x2f6c5b=>{const _0x5868bd=_0x17abb8;_0x5a0d5b[_0x5868bd(0x1de)]&&requireAnyOf(_0x2f6c5b,[_0x5868bd(0x1ce)],_0x133878),_0x5a0d5b[_0x5868bd(0x1f3)]==='batchCreate'&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x2f6c5b[_0x5868bd(0x1d3)](_0x5868bd(0x1ce)))),_0x5a0d5b[_0x5868bd(0x1f3)]==='update'&&parseUpdateIdsFromParams(parseJsonParams(_0x2f6c5b['str'](_0x5868bd(0x1ce)))??{});},async 'execute'(_0x3940ef){const _0xa65942=_0x17abb8,_0xdf6c2e=_0x3940ef[_0xa65942(0x1d3)](_0xa65942(0x228)),_0x48cb71=_0x5a0d5b[_0xa65942(0x1f3)]===_0xa65942(0x22a)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x3940ef['str'](_0xa65942(0x1ce)))):parseJsonParams(_0x3940ef['str'](_0xa65942(0x1ce)))??{},_0x4bc1b3=_0x5a0d5b[_0xa65942(0x1f3)]==='update'?parseUpdateIdsFromParams(_0x48cb71):undefined,_0x400358=_0x4bc1b3?normalizeUpdateParamsForRuntime(_0x48cb71,_0x4bc1b3):_0x48cb71,_0x12c405=Date['now'](),_0x145589=await executeData(_0xdf6c2e,_0x5a0d5b[_0xa65942(0x1f3)],_0x400358),_0x26913a=Date[_0xa65942(0x20c)]()-_0x12c405,_0x89a478=_0x4bc1b3&&_0x4bc1b3[_0xa65942(0x1d2)]>0x1?buildBatchUpdateResult(_0x4bc1b3,_0x145589):_0x145589;return{'ok':!![],'data':{'result':_0x89a478,'elapsed':_0x26913a},'message':_0xa65942(0x221)+_0x5a0d5b[_0xa65942(0x210)]+_0xa65942(0x1d4)+_0x26913a+'ms'};}};return _0x5a0d5b[_0x17abb8(0x1f4)]!==_0x17abb8(0x205)&&(_0x5ef572[_0x17abb8(0x1e0)]=async _0x385f32=>{const _0x1d824e=_0x17abb8,_0x35b01f=_0x385f32[_0x1d824e(0x1d3)](_0x1d824e(0x228)),_0x4eb76a=_0x5a0d5b[_0x1d824e(0x1f3)]===_0x1d824e(0x22a)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x385f32[_0x1d824e(0x1d3)](_0x1d824e(0x1ce)))):parseJsonParams(_0x385f32[_0x1d824e(0x1d3)](_0x1d824e(0x1ce)))??{};let _0x3b6d22=_0x4eb76a;if(_0x5a0d5b[_0x1d824e(0x1f3)]===_0x1d824e(0x1dc)){const _0x3cf1e7=parseUpdateIdsFromParams(_0x4eb76a);_0x3b6d22=normalizeUpdateParamsForRuntime(_0x4eb76a,_0x3cf1e7);}return dryRun(_0x1d824e(0x216),'/api/{appCode}/'+_0x35b01f+'/'+_0x5a0d5b['operation'])[_0x1d824e(0x1d5)](_0x3b6d22)[_0x1d824e(0x222)](_0x1d824e(0x1f2)+_0x5a0d5b[_0x1d824e(0x210)]+'\x20on\x20dataset\x20'+_0x35b01f)['build']();}),_0x5ef572;}export const dataDefinitions=[...specs[a27_0xad014(0x220)](makeDataCommand),dataImportExcel];function buildBatchUpdateResult(_0x3e67a7,_0x23c1c7){const _0x1667c0=a27_0xad014;return{'operation':'update','mode':_0x1667c0(0x208),'ids':_0x3e67a7,'total':_0x3e67a7[_0x1667c0(0x1d2)],'result':_0x23c1c7};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a28_0x3dbac9=a28_0x2344;(function(_0x570a18,_0x3c5992){const _0x41a342=a28_0x2344,_0x322ad0=_0x570a18();while(!![]){try{const _0xdf7807=-parseInt(_0x41a342(0xdd))/0x1+parseInt(_0x41a342(0xc1))/0x2+-parseInt(_0x41a342(0xbb))/0x3*(-parseInt(_0x41a342(0xbf))/0x4)+-parseInt(_0x41a342(0xb5))/0x5+parseInt(_0x41a342(0xa4))/0x6+-parseInt(_0x41a342(0xbd))/0x7*(-parseInt(_0x41a342(0xd6))/0x8)+-parseInt(_0x41a342(0xba))/0x9;if(_0xdf7807===_0x3c5992)break;else _0x322ad0['push'](_0x322ad0['shift']());}catch(_0x1277ed){_0x322ad0['push'](_0x322ad0['shift']());}}}(a28_0x3c1f,0xaf9b4));import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function a28_0x2344(_0x23dde1,_0x506c05){_0x23dde1=_0x23dde1-0x9c;const _0x3c1f37=a28_0x3c1f();let _0x234495=_0x3c1f37[_0x23dde1];return _0x234495;}function normalizeField(_0x30bb05){const _0x619801=a28_0x2344;if(_0x30bb05[_0x619801(0xb2)])return null;const _0x1733f5=Boolean(_0x30bb05[_0x619801(0xb3)]!==undefined||_0x30bb05[_0x619801(0xcd)]!==undefined);let _0x15e65a={};if(!_0x1733f5&&typeof _0x30bb05[_0x619801(0xc8)]===_0x619801(0xcc))try{_0x15e65a=JSON[_0x619801(0xd9)](_0x30bb05[_0x619801(0xc8)]);}catch{}const _0x588c45=_0x1733f5?_0x30bb05[_0x619801(0xc9)]:_0x30bb05[_0x619801(0xd8)],_0x5b767d=_0x1733f5?_0x30bb05['displayName']:_0x30bb05['name'],_0x22b904=_0x1733f5?_0x30bb05[_0x619801(0xcd)]:_0x30bb05[_0x619801(0xc0)]||_0x30bb05[_0x619801(0xd3)],_0x39f49e=_0x1733f5?_0x30bb05[_0x619801(0xb8)]===!![]:_0x15e65a[_0x619801(0xb8)]===!![],_0x11add3=_0x1733f5?_0x30bb05[_0x619801(0xdc)]===!![]:_0x15e65a[_0x619801(0xdc)]===!![],_0x487993=_0x1733f5?_0x30bb05[_0x619801(0xad)]??null:_0x15e65a['options']??null,_0x3ca059={'name':_0x588c45,'displayName':_0x5b767d||_0x588c45,'type':_0x22b904,'dbType':_0x30bb05[_0x619801(0xaf)],'pk':_0x39f49e,'required':_0x11add3,'description':_0x30bb05['description']||undefined};return Array[_0x619801(0xb0)](_0x487993)&&_0x487993[_0x619801(0xb6)]>0x0&&(_0x3ca059[_0x619801(0xad)]=_0x487993),_0x3ca059;}function parseJsonMaybe(_0x5a244f){const _0x23ee7b=a28_0x2344;if(typeof _0x5a244f!=='string')return _0x5a244f;try{return JSON[_0x23ee7b(0xd9)](_0x5a244f);}catch{return _0x5a244f;}}function normalizeOperationEntry(_0x871b59,_0x282a1c){const _0x545532=a28_0x2344;if(!_0x282a1c||typeof _0x282a1c!==_0x545532(0xae))return null;if(!_0x282a1c[_0x545532(0xd1)]||!_0x282a1c[_0x545532(0xc7)])return null;const _0x1a5436={'name':_0x871b59,'method':_0x282a1c['method'],'path':_0x282a1c[_0x545532(0xc7)]};if(_0x282a1c[_0x545532(0xb9)])_0x1a5436[_0x545532(0xb9)]=_0x282a1c['host'];if(_0x282a1c['requestBody']!=null)_0x1a5436[_0x545532(0xa5)]=parseJsonMaybe(_0x282a1c[_0x545532(0xa5)]);if(_0x282a1c[_0x545532(0xdf)]!=null)_0x1a5436[_0x545532(0xdf)]=parseJsonMaybe(_0x282a1c[_0x545532(0xdf)]);if(_0x282a1c[_0x545532(0xde)]!=null)_0x1a5436[_0x545532(0xde)]=_0x282a1c[_0x545532(0xde)];if(_0x282a1c[_0x545532(0xa0)]!=null)_0x1a5436[_0x545532(0xa0)]=_0x282a1c[_0x545532(0xa0)];if(Array[_0x545532(0xb0)](_0x282a1c[_0x545532(0xa9)]))_0x1a5436['requestFields']=_0x282a1c[_0x545532(0xa9)];if(Array['isArray'](_0x282a1c[_0x545532(0xc4)]))_0x1a5436[_0x545532(0xc4)]=_0x282a1c[_0x545532(0xc4)];return _0x1a5436;}function summarizeDbtable(_0x2bc70a){const _0x59ce1f=a28_0x2344,_0x4510fd={},_0x94a19b=[_0x59ce1f(0xa1),_0x59ce1f(0xb1),_0x59ce1f(0x9e),'datasetKey','pkField',_0x59ce1f(0xce),_0x59ce1f(0xab),'createTimeField',_0x59ce1f(0xd7),_0x59ce1f(0xdb),'creatorNameField',_0x59ce1f(0xca),_0x59ce1f(0xcb),_0x59ce1f(0xc3),_0x59ce1f(0xd4)];for(const _0x372be3 of _0x94a19b){if(_0x2bc70a[_0x372be3]!==undefined)_0x4510fd[_0x372be3]=_0x2bc70a[_0x372be3];}return typeof _0x4510fd[_0x59ce1f(0xce)]===_0x59ce1f(0xcc)&&_0x4510fd['allFields'][_0x59ce1f(0xb6)]>0x0&&(_0x4510fd['allFieldNames']=_0x4510fd[_0x59ce1f(0xce)][_0x59ce1f(0xa6)](',')['map'](_0xd872eb=>_0xd872eb[_0x59ce1f(0xbe)]())[_0x59ce1f(0x9f)](Boolean)),_0x4510fd;}function normalizeRelatedPages(_0x2e4a72){const _0x3542f1=a28_0x2344;if(!Array[_0x3542f1(0xb0)](_0x2e4a72))return[];return _0x2e4a72['filter'](_0x32852f=>_0x32852f&&typeof _0x32852f===_0x3542f1(0xae))[_0x3542f1(0xcf)](_0x5c7a74=>({'id':_0x5c7a74['id'],'type':_0x5c7a74['type'],'code':_0x5c7a74[_0x3542f1(0xd8)],'title':_0x5c7a74[_0x3542f1(0xac)],'deleted':_0x5c7a74['deleted']===!![]}));}function normalizeFallbackFieldName(_0x22ea4d,_0x50e86e){const _0x244370=_0x22ea4d['trim']();if(!_0x244370)return null;return{'name':_0x244370,'displayName':_0x244370,'type':undefined,'dbType':undefined,'pk':_0x244370===_0x50e86e,'required':![],'description':undefined};}async function loadListFieldFallback(_0x303494,_0x425a00){const _0x55fb42=a28_0x2344;if(!_0x303494||!_0x425a00)return[];try{const _0x4deaba=await listDatasets(_0x303494,{'code':_0x425a00}),_0xd07d7b=_0x4deaba[_0x55fb42(0xaa)](_0x1d1f9f=>_0x1d1f9f[_0x55fb42(0xd8)]===_0x425a00)??_0x4deaba[0x0],_0xe73201=_0xd07d7b?.['dbtableConfig']??{},_0x8e8ca8=typeof _0xe73201['allFields']===_0x55fb42(0xcc)?_0xe73201[_0x55fb42(0xce)][_0x55fb42(0xa6)](','):[];return _0x8e8ca8[_0x55fb42(0xcf)](_0x2aeb63=>normalizeFallbackFieldName(_0x2aeb63,_0xe73201[_0x55fb42(0xb8)]))[_0x55fb42(0x9f)](_0xdadc5c=>_0xdadc5c!==null);}catch{return[];}}export const datasetDetail={'service':a28_0x3dbac9(0xd0),'command':a28_0x3dbac9(0xe2),'description':a28_0x3dbac9(0xb4),'risk':'read','flags':[CODE_FLAG],async 'execute'(_0x572f6a){const _0xcb8500=a28_0x3dbac9,_0x16559e=await getDatasetDetail(_0x572f6a[_0xcb8500(0xd5)](_0xcb8500(0xd8))),_0x3f9d93=Array[_0xcb8500(0xb0)](_0x16559e[_0xcb8500(0xbc)])?_0x16559e['fields']:Array[_0xcb8500(0xb0)](_0x16559e[_0xcb8500(0xb7)])?_0x16559e['properties']:[];let _0x1a397b=_0x3f9d93[_0xcb8500(0xcf)](_0x28d193=>normalizeField(_0x28d193))[_0xcb8500(0x9f)](_0x84ffb6=>_0x84ffb6!==null);_0x1a397b[_0xcb8500(0xb6)]===0x0&&(_0x1a397b=await loadListFieldFallback(_0x572f6a[_0xcb8500(0xa3)],_0x572f6a[_0xcb8500(0xd5)]('code')));const _0x55e0ce=_0x16559e[_0xcb8500(0xda)]??{},_0x4d6709=[];for(const [_0xfb6e0c,_0x1ed069]of Object['entries'](_0x55e0ce)){const _0x2831f6=normalizeOperationEntry(_0xfb6e0c,_0x1ed069);if(_0x2831f6)_0x4d6709['push'](_0x2831f6);}const _0x4b04c5=_0x16559e[_0xcb8500(0x9c)]??{},_0xe783c3=_0x16559e[_0xcb8500(0xd0)]??{},_0x209f4b=_0x4b04c5[_0xcb8500(0xa1)]!=null?{'id':_0x4b04c5[_0xcb8500(0xa1)],'name':_0x4b04c5[_0xcb8500(0xb1)]??null}:undefined;let _0x17e017;return typeof _0x16559e[_0xcb8500(0xc8)]===_0xcb8500(0xcc)&&(_0x17e017=parseJsonMaybe(_0x16559e[_0xcb8500(0xc8)])),{'ok':!![],'data':{'id':_0x16559e['modelId']??_0x16559e['id'],'name':_0x16559e[_0xcb8500(0xc9)],'code':_0x16559e[_0xcb8500(0x9d)]||_0x16559e[_0xcb8500(0xd8)],'doVersion':_0x16559e['doVersion'],'description':_0x16559e[_0xcb8500(0xc2)]||_0xe783c3[_0xcb8500(0xc6)]||undefined,'source':_0x16559e[_0xcb8500(0xd2)]||_0xe783c3['sourceType'],'table':_0x4b04c5[_0xcb8500(0x9e)]||_0xe783c3['tableName'],'datasetKey':_0x4b04c5[_0xcb8500(0xe1)],'pk':_0x4b04c5['pkField'],'db':_0x209f4b,'dbtable':summarizeDbtable(_0x4b04c5),'fields':_0x1a397b,'operations':_0x4d6709,'indexes':Array[_0xcb8500(0xb0)](_0xe783c3[_0xcb8500(0xc5)])?_0xe783c3[_0xcb8500(0xc5)]:[],'relations':_0x16559e[_0xcb8500(0xa8)]??null,'relatedPages':normalizeRelatedPages(_0x16559e[_0xcb8500(0xa7)]),...Array[_0xcb8500(0xb0)](_0x16559e[_0xcb8500(0xe0)])?{'columnCodeListWithDeleted':_0x16559e[_0xcb8500(0xe0)]}:{},'formatRules':Array[_0xcb8500(0xb0)](_0x16559e[_0xcb8500(0xa2)])?_0x16559e[_0xcb8500(0xa2)]:[],'validateRules':Array[_0xcb8500(0xb0)](_0x16559e['validateRules'])?_0x16559e['validateRules']:[],..._0x17e017!==undefined?{'extend':_0x17e017}:{},'stats':{'fieldCount':_0x1a397b[_0xcb8500(0xb6)],'operationCount':_0x4d6709[_0xcb8500(0xb6)]}}};}};function a28_0x3c1f(){const _0x324517=['path','extend','name','modifierIdField','modifierNameField','string','doType','allFields','map','dataset','method','source','dataType','dblinkInfoDTO','str','1716072XdHtwG','updateTimeField','code','parse','operations','creatorIdField','required','440863dHuGYH','beforeScriptId','responseBody','columnCodeListWithDeleted','datasetKey','detail','dbtableConfig','modelCode','tableName','filter','afterScriptId','dbId','formatRules','appCode','365658AjOkSS','requestBody','split','relatedPageInfoList','relations','requestFields','find','logicField','title','options','object','dbType','isArray','dbName','deleted','displayName','Get\x20dataset\x20detail\x20including\x20fields,\x20relations,\x20and\x20operations','4365705zsUIQn','length','properties','pkField','host','3426813FEgueh','3DnSsPF','fields','7USFItN','trim','4396156YllxCJ','type','2079108tsfKgx','description','labelField','responseFields','indexes','tableComment'];a28_0x3c1f=function(){return _0x324517;};return a28_0x3c1f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a29_0x59fe(){const _0x2f23b9=['52oWLNUT','3829ELLTkb','5198900GdDryo','789320FoYDdr','7962757mwqbBv','325ZryUAe','3690sHDPBb','10988khoQEQ','320358pgeGNr','162YEghlv','154CnFxVW','10uyQkgg','6204LAKSuU'];a29_0x59fe=function(){return _0x2f23b9;};return a29_0x59fe();}(function(_0x12c33f,_0x908d5d){const _0x4a38ef=a29_0x96f8,_0xb1564d=_0x12c33f();while(!![]){try{const _0x4261d0=parseInt(_0x4a38ef(0x158))/0x1*(-parseInt(_0x4a38ef(0x162))/0x2)+-parseInt(_0x4a38ef(0x163))/0x3*(-parseInt(_0x4a38ef(0x15b))/0x4)+-parseInt(_0x4a38ef(0x15d))/0x5+parseInt(_0x4a38ef(0x161))/0x6*(parseInt(_0x4a38ef(0x15c))/0x7)+parseInt(_0x4a38ef(0x15e))/0x8*(parseInt(_0x4a38ef(0x157))/0x9)+parseInt(_0x4a38ef(0x159))/0xa*(-parseInt(_0x4a38ef(0x15f))/0xb)+-parseInt(_0x4a38ef(0x15a))/0xc*(-parseInt(_0x4a38ef(0x160))/0xd);if(_0x4261d0===_0x908d5d)break;else _0xb1564d['push'](_0xb1564d['shift']());}catch(_0x1d7608){_0xb1564d['push'](_0xb1564d['shift']());}}}(a29_0x59fe,0xdca5f));function a29_0x96f8(_0x31eea7,_0x292c7f){_0x31eea7=_0x31eea7-0x157;const _0x59fef7=a29_0x59fe();let _0x96f880=_0x59fef7[_0x31eea7];return _0x96f880;}import{datasetList}from'../../commands/dataset/list.js';import{datasetDetail}from'../../commands/dataset/detail.js';import{datasetSdkDoc}from'../../commands/dataset/sdk-doc.js';export const datasetDefinitions=[datasetList,datasetDetail,datasetSdkDoc];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a30_0x5933(){const _0x3531ca=['4637991zuxdMy','dataset','Filter\x20by\x20dataset\x20name\x20(server-side\x20fuzzy\x20match)','appCode','List\x20datasets\x20in\x20the\x20app\x20(server-side\x20name/code/table-name\x20filters\x20combine\x20with\x20AND)','Filter\x20by\x20physical\x20table\x20name\x20(server-side\x20prefix\x20match;\x20SQL\x20LIKE\x20wildcards\x20%\x20and\x20_\x20apply)','pkField','list','3596520voToEW','table-name','2WtavIS','Filter\x20by\x20dataset\x20code\x20(server-side\x20exact\x20match)','allFields','trim','139175vVsfhv','3658060SzBUoJ','source','551382nTpAqi','datasetKey','7026696iGnYPB','read','split','4206960TtuFaK','name','string','description','map','str','code','188riLjGB','length'];a30_0x5933=function(){return _0x3531ca;};return a30_0x5933();}function a30_0x1c02(_0x455685,_0x38c338){_0x455685=_0x455685-0xd5;const _0x5933dc=a30_0x5933();let _0x1c0209=_0x5933dc[_0x455685];return _0x1c0209;}const a30_0x425438=a30_0x1c02;(function(_0x52bde5,_0x3d5ec2){const _0x567ef8=a30_0x1c02,_0x3fafd1=_0x52bde5();while(!![]){try{const _0x463a9d=parseInt(_0x567ef8(0xd7))/0x1*(-parseInt(_0x567ef8(0xde))/0x2)+-parseInt(_0x567ef8(0xec))/0x3+parseInt(_0x567ef8(0xea))/0x4*(parseInt(_0x567ef8(0xdb))/0x5)+parseInt(_0x567ef8(0xe0))/0x6+-parseInt(_0x567ef8(0xdc))/0x7+parseInt(_0x567ef8(0xd5))/0x8+parseInt(_0x567ef8(0xe3))/0x9;if(_0x463a9d===_0x3d5ec2)break;else _0x3fafd1['push'](_0x3fafd1['shift']());}catch(_0x3f13a5){_0x3fafd1['push'](_0x3fafd1['shift']());}}}(a30_0x5933,0xbd8d7));import{listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';export const datasetList={'service':a30_0x425438(0xed),'command':a30_0x425438(0xf3),'description':a30_0x425438(0xf0),'risk':a30_0x425438(0xe1),'flags':[{'name':a30_0x425438(0xe4),'type':'string','description':a30_0x425438(0xee)},{'name':a30_0x425438(0xd6),'type':a30_0x425438(0xe5),'description':a30_0x425438(0xf1)},{...CODE_FLAG,'required':![],'description':a30_0x425438(0xd8)}],async 'execute'(_0x468e6d){const _0x5275f1=a30_0x425438,_0x3e4dda=_0x468e6d['str'](_0x5275f1(0xe4)),_0x1e93d1=_0x468e6d['str'](_0x5275f1(0xe9)),_0x3a34b7=_0x468e6d[_0x5275f1(0xe8)](_0x5275f1(0xd6)),_0x245e97=await listDatasets(_0x468e6d[_0x5275f1(0xef)],{..._0x3e4dda&&{'name':_0x3e4dda},..._0x1e93d1&&{'code':_0x1e93d1},..._0x3a34b7&&{'tableName':_0x3a34b7}});return{'ok':!![],'data':{'total':_0x245e97[_0x5275f1(0xeb)],'datasets':_0x245e97['map'](_0x1e5ef5=>{const _0x26368a=_0x5275f1,_0x580f1b=_0x1e5ef5['dbtableConfig']??{};return{'id':_0x1e5ef5['id'],'code':_0x1e5ef5[_0x26368a(0xe9)],'name':_0x1e5ef5[_0x26368a(0xe4)],'source':_0x1e5ef5[_0x26368a(0xdd)],'description':_0x1e5ef5[_0x26368a(0xe6)],'table':_0x580f1b['tableName'],'datasetKey':_0x580f1b[_0x26368a(0xdf)],'pk':_0x580f1b[_0x26368a(0xf2)],'fields':_0x580f1b[_0x26368a(0xd9)]?_0x580f1b[_0x26368a(0xd9)][_0x26368a(0xe2)](',')[_0x26368a(0xe7)](_0x442a19=>_0x442a19[_0x26368a(0xda)]()):[]};})}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a31_0x4d3633=a31_0x2b96;(function(_0x3de671,_0xa7728d){const _0x38f966=a31_0x2b96,_0x21cd2f=_0x3de671();while(!![]){try{const _0x2007da=parseInt(_0x38f966(0x147))/0x1+parseInt(_0x38f966(0x143))/0x2+-parseInt(_0x38f966(0x138))/0x3+-parseInt(_0x38f966(0x144))/0x4*(-parseInt(_0x38f966(0x141))/0x5)+-parseInt(_0x38f966(0x146))/0x6+parseInt(_0x38f966(0x13b))/0x7+-parseInt(_0x38f966(0x139))/0x8*(parseInt(_0x38f966(0x13e))/0x9);if(_0x2007da===_0xa7728d)break;else _0x21cd2f['push'](_0x21cd2f['shift']());}catch(_0x245992){_0x21cd2f['push'](_0x21cd2f['shift']());}}}(a31_0x375c,0xd9730));import{getDatasetSdkUsageDoc}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';const DEFAULT_MARKDOWN=a31_0x4d3633(0x140);function a31_0x2b96(_0x41330e,_0x9ced67){_0x41330e=_0x41330e-0x138;const _0x375c5d=a31_0x375c();let _0x2b96c3=_0x375c5d[_0x41330e];return _0x2b96c3;}export function formatDatasetSdkMarkdown(_0x37dedc){const _0x1413d5=a31_0x4d3633,_0xdeec16=typeof _0x37dedc===_0x1413d5(0x148)?_0x37dedc[_0x1413d5(0x13d)]():'';return _0xdeec16||DEFAULT_MARKDOWN;}export const datasetSdkDoc={'service':a31_0x4d3633(0x13a),'command':a31_0x4d3633(0x14a),'description':'Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','risk':a31_0x4d3633(0x149),'flags':[{...CODE_FLAG,'description':a31_0x4d3633(0x142)}],async 'execute'(_0x125d62){const _0x52e205=a31_0x4d3633,_0x3064d5=_0x125d62[_0x52e205(0x13c)](_0x52e205(0x145)),_0x2c2995=await getDatasetSdkUsageDoc(_0x3064d5,_0x125d62[_0x52e205(0x13f)]);return{'ok':!![],'data':{'code':_0x3064d5,'appCode':_0x125d62[_0x52e205(0x13f)],'markdown':formatDatasetSdkMarkdown(_0x2c2995)}};}};function a31_0x375c(){const _0x1c2163=['12cuwUXF','code','3400422VzpBzc','333842TovXKA','string','read','sdk-doc','412701pUpYrC','8hQfXME','dataset','7800884bZAqJq','str','trim','13030506KBaHWU','appCode','#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0aNo\x20SDK\x20usage\x20documentation\x20is\x20available.','1911700yaPNaG','Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.','895072XKhAtb'];a31_0x375c=function(){return _0x1c2163;};return a31_0x375c();}
|
package/lib/commands/doctor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a32_0x41e846=a32_0x27f9;(function(_0x40976c,_0x364f92){const _0x8f3fc6=a32_0x27f9,_0x4f86c1=_0x40976c();while(!![]){try{const _0x2d93fe=parseInt(_0x8f3fc6(0xd6))/0x1+-parseInt(_0x8f3fc6(0x12b))/0x2+-parseInt(_0x8f3fc6(0x10b))/0x3+-parseInt(_0x8f3fc6(0xf0))/0x4+-parseInt(_0x8f3fc6(0x112))/0x5*(parseInt(_0x8f3fc6(0x11b))/0x6)+-parseInt(_0x8f3fc6(0x126))/0x7*(parseInt(_0x8f3fc6(0x10c))/0x8)+parseInt(_0x8f3fc6(0x103))/0x9*(parseInt(_0x8f3fc6(0x121))/0xa);if(_0x2d93fe===_0x364f92)break;else _0x4f86c1['push'](_0x4f86c1['shift']());}catch(_0x4a5fca){_0x4f86c1['push'](_0x4f86c1['shift']());}}}(a32_0x4f3c,0xc258a));import a32_0x404556 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{getCliVersion}from'../utils/version.js';import{getApiDomain,getKbServiceDomain,getRuntimeDomain,getSkillDomain,getUserDomain}from'../constant/domain.js';import{normalizeLovrabetRegion}from'../constant/region.js';import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile,loadRawConfigLayers}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{inspectServiceRegistry}from'../commands/service/registry.js';import{inspectBuiltinSkill}from'../skills/builtin-skill.js';function a32_0x4f3c(){const _0x1619c7=['globalConfig','repeat','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','commandCount','message','(default)','current','hasOwnProperty','\x20\x20Country/Region\x20Configuration','\x20\x20runtimeDomain:\x20\x20\x20','green','includes','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','packageVersion','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','check','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20skillDomain:\x20\x20\x20\x20\x20','ClientAk','name','services','arch','accessKey','path','(no\x20file)','(removed\x20—\x20cookie\x20auth\x20disabled)','red','\x20\x20auth\x20(effective):\x20','global','inherit','1557290UqhXWx','length','state','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','Unavailable\x20until\x20routing\x20configuration\x20is\x20repaired','version','region','registryPath','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20API\x20Endpoints','routing','project','\x20\x20Repair\x20project:\x20\x20','bold','\x20\x20Repair\x20project:\x20\x20\x20','✓\x20Loaded','\x20config\x20init','(not\x20set)','\x20\x20region:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(invalid)','Global','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','✓\x20current','\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','status','187632qfiJOZ','(missing)','verbose','\x20config\x20delete\x20routing\x20--global','doctor','\x20\x20Config\x20Files','\x20\x20Service\x20Tree','\x20\x20─','\x20\x20Built-in\x20Skill','currentApp','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','padEnd','yellow','(none)','skillVersion','installedPath','\x20\x20Auth','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20config\x20delete\x20inherit\x20--global','9MRoMoF','\x20\x20kbServiceDomain:\x20','prototype','format','gray','\x20\x20Config\x20JSON','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Installed\x20Path:\x20\x20','1055679KqoQDH','724712MekLob','defaultApp','✗\x20Invalid','\x20config','join','\x20config\x20delete\x20routing','57220QwTCGV','\x20doctor','appCode','riskLevel','serviceCount','pageSize','✓\x20Valid\x20JSON','Diagnose\x20CLI\x20configuration\x20and\x20environment','\x20+\x20','642XIWGwp','\x20\x20Repair\x20global:\x20\x20\x20\x20','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','reason','log','18732920fRGYAI','\x20\x20Repair\x20global:\x20\x20\x20','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','(unnamed)','call','70Maxqjm','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','projectConfig','(not\x20found)','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','210682VTUjsg'];a32_0x4f3c=function(){return _0x1619c7;};return a32_0x4f3c();}async function execute(_0x1135ba){const _0x2a7b11=a32_0x27f9,_0x3b4e2b=getCliVersion(),_0x37f7e9=buildConfigFromFlags({});let _0x4c8cd5,_0x45e191;try{_0x4c8cd5=normalizeLovrabetRegion(_0x37f7e9['raw'][_0x2a7b11(0xdc)]);}catch(_0x5017f1){_0x45e191=_0x5017f1 instanceof Error?_0x5017f1:new Error(String(_0x5017f1));}let _0xcf991b;if(!_0x45e191)try{await initGlobalEnvironment(_0x37f7e9);}catch(_0x3fdfb8){_0xcf991b=_0x3fdfb8 instanceof Error?_0x3fdfb8:new Error(String(_0x3fdfb8));}console[_0x2a7b11(0x120)](),console['log'](a32_0x404556['bold'](CLI_BIN_NAME+_0x2a7b11(0x113))),console[_0x2a7b11(0x120)](a32_0x404556[_0x2a7b11(0x107)]('─'[_0x2a7b11(0x12d)](0x32))),console[_0x2a7b11(0x120)](_0x2a7b11(0xeb)+_0x3b4e2b),console[_0x2a7b11(0x120)](_0x2a7b11(0xc7)+process[_0x2a7b11(0xdb)]),console[_0x2a7b11(0x120)](_0x2a7b11(0xc5)+process['platform']+'\x20'+process[_0x2a7b11(0xcd)]);const _0x3c0b37=inspectBuiltinSkill();console[_0x2a7b11(0x120)](),console[_0x2a7b11(0x120)](a32_0x404556[_0x2a7b11(0xe3)](_0x2a7b11(0xf8))),console[_0x2a7b11(0x120)](a32_0x404556[_0x2a7b11(0x107)](_0x2a7b11(0xf7)[_0x2a7b11(0x12d)](0x1e))),console[_0x2a7b11(0x120)](_0x2a7b11(0xed)+(_0x3c0b37[_0x2a7b11(0xd8)]===_0x2a7b11(0x132)?a32_0x404556[_0x2a7b11(0xc1)](_0x2a7b11(0xec)):a32_0x404556[_0x2a7b11(0xd2)]('✗\x20'+_0x3c0b37['state']))),console[_0x2a7b11(0x120)]('\x20\x20Package\x20Version:\x20'+_0x3c0b37[_0x2a7b11(0xc4)]),console['log']('\x20\x20Skill\x20Version:\x20\x20\x20'+(_0x3c0b37[_0x2a7b11(0xfe)]||a32_0x404556[_0x2a7b11(0x107)]('(missing)'))),console['log'](_0x2a7b11(0x10a)+(_0x3c0b37[_0x2a7b11(0xff)]||a32_0x404556[_0x2a7b11(0x107)](_0x2a7b11(0x129))));_0x3c0b37[_0x2a7b11(0xd8)]!=='current'&&console[_0x2a7b11(0x120)]('\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3c0b37['repairCommand']);_0x3c0b37['reason']&&console[_0x2a7b11(0x120)](_0x2a7b11(0xee)+_0x3c0b37[_0x2a7b11(0x11f)]);console[_0x2a7b11(0x120)](),console[_0x2a7b11(0x120)](a32_0x404556[_0x2a7b11(0xe3)](_0x2a7b11(0xf5))),console[_0x2a7b11(0x120)](a32_0x404556[_0x2a7b11(0x107)](_0x2a7b11(0xf7)[_0x2a7b11(0x12d)](0x1e)));const _0x2df744=getGlobalConfigPath(),_0x139417=getProjectConfigPath();console[_0x2a7b11(0x120)](_0x2a7b11(0xc3)+(_0x2df744||a32_0x404556['gray'](_0x2a7b11(0x129)))),console[_0x2a7b11(0x120)](_0x2a7b11(0xde)+(_0x139417||a32_0x404556['gray'](_0x2a7b11(0x129)))),console['log'](),console[_0x2a7b11(0x120)](a32_0x404556[_0x2a7b11(0xe3)](_0x2a7b11(0x108))),console[_0x2a7b11(0x120)](a32_0x404556['gray'](_0x2a7b11(0xf7)['repeat'](0x1e)));const _0x3368c4=(_0xe053c1,_0x53394a)=>{const _0xfad711=_0x2a7b11;if(!_0x53394a){console[_0xfad711(0x120)]('\x20\x20'+_0xe053c1[_0xfad711(0xfb)](0x11)+'\x20'+a32_0x404556[_0xfad711(0x107)](_0xfad711(0xd0)));return;}const _0x2e316a=inspectCliConfigJsonFile(_0x53394a);if(_0x2e316a[_0xfad711(0xef)]==='ok')console[_0xfad711(0x120)]('\x20\x20'+_0xe053c1[_0xfad711(0xfb)](0x11)+'\x20'+a32_0x404556[_0xfad711(0xc1)](_0xfad711(0x118)));else{if(_0x2e316a[_0xfad711(0xef)]==='empty')console[_0xfad711(0x120)]('\x20\x20'+_0xe053c1[_0xfad711(0xfb)](0x11)+'\x20'+a32_0x404556[_0xfad711(0xfc)]('⚠\x20Empty\x20(treated\x20as\x20{})'));else _0x2e316a[_0xfad711(0xef)]==='missing'?console[_0xfad711(0x120)]('\x20\x20'+_0xe053c1[_0xfad711(0xfb)](0x11)+'\x20'+a32_0x404556['gray'](_0xfad711(0xf1))):(console['log']('\x20\x20'+_0xe053c1[_0xfad711(0xfb)](0x11)+'\x20'+a32_0x404556[_0xfad711(0xd2)]('✗\x20Invalid\x20JSON')),console['log']('\x20\x20'+''[_0xfad711(0xfb)](0x11)+'\x20'+a32_0x404556['red'](_0x2e316a[_0xfad711(0x130)])));}};_0x3368c4(_0x2a7b11(0xea),_0x2df744),_0x3368c4('Project',_0x139417);const _0x251c8d=loadRawConfigLayers(),_0x2cc7f0=[Object[_0x2a7b11(0x105)][_0x2a7b11(0x133)]['call'](_0x251c8d[_0x2a7b11(0x12c)],'inherit')?'global':null,Object['prototype'][_0x2a7b11(0x133)]['call'](_0x251c8d[_0x2a7b11(0x128)],_0x2a7b11(0xd5))?_0x2a7b11(0xe1):null]['filter'](Boolean);_0x2cc7f0['length']>0x0&&(console[_0x2a7b11(0x120)]('\x20\x20Legacy\x20inherit:\x20\x20\x20'+a32_0x404556[_0x2a7b11(0xfc)]('ignored\x20in\x20'+_0x2cc7f0[_0x2a7b11(0x110)](_0x2a7b11(0x11a))+_0x2a7b11(0x10f))),_0x2cc7f0[_0x2a7b11(0xc2)]('project')&&console[_0x2a7b11(0x120)](_0x2a7b11(0xe4)+CLI_BIN_NAME+'\x20config\x20delete\x20inherit'),_0x2cc7f0[_0x2a7b11(0xc2)](_0x2a7b11(0xd4))&&console[_0x2a7b11(0x120)](_0x2a7b11(0x11c)+CLI_BIN_NAME+_0x2a7b11(0x102)));_0xcf991b&&(console[_0x2a7b11(0x120)](),console[_0x2a7b11(0x120)](a32_0x404556[_0x2a7b11(0xe3)]('\x20\x20Routing\x20Configuration')),console[_0x2a7b11(0x120)](a32_0x404556['gray']('\x20\x20─'[_0x2a7b11(0x12d)](0x1e))),console['log'](_0x2a7b11(0x11e)+a32_0x404556['red'](_0x2a7b11(0x10e))),console[_0x2a7b11(0x120)]('\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0xcf991b[_0x2a7b11(0x130)]),Object['prototype']['hasOwnProperty'][_0x2a7b11(0x125)](_0x251c8d['projectConfig'],_0x2a7b11(0xe0))&&console[_0x2a7b11(0x120)](_0x2a7b11(0xe2)+CLI_BIN_NAME+_0x2a7b11(0x111)),Object[_0x2a7b11(0x105)][_0x2a7b11(0x133)][_0x2a7b11(0x125)](_0x251c8d[_0x2a7b11(0x12c)],_0x2a7b11(0xe0))&&console[_0x2a7b11(0x120)](_0x2a7b11(0x122)+CLI_BIN_NAME+_0x2a7b11(0xf3)));_0x45e191&&(console[_0x2a7b11(0x120)](),console[_0x2a7b11(0x120)](a32_0x404556[_0x2a7b11(0xe3)](_0x2a7b11(0xbf))),console[_0x2a7b11(0x120)](a32_0x404556[_0x2a7b11(0x107)](_0x2a7b11(0xf7)[_0x2a7b11(0x12d)](0x1e))),console[_0x2a7b11(0x120)](_0x2a7b11(0x11e)+a32_0x404556[_0x2a7b11(0xd2)](_0x2a7b11(0x10e))),console['log'](_0x2a7b11(0xee)+_0x45e191[_0x2a7b11(0x130)]),Object['prototype'][_0x2a7b11(0x133)][_0x2a7b11(0x125)](_0x251c8d[_0x2a7b11(0x128)],_0x2a7b11(0xdc))&&console[_0x2a7b11(0x120)](_0x2a7b11(0xe2)+CLI_BIN_NAME+'\x20config\x20delete\x20region'),Object[_0x2a7b11(0x105)][_0x2a7b11(0x133)][_0x2a7b11(0x125)](_0x251c8d[_0x2a7b11(0x12c)],_0x2a7b11(0xdc))&&console[_0x2a7b11(0x120)](_0x2a7b11(0x122)+CLI_BIN_NAME+_0x2a7b11(0xe6)));console[_0x2a7b11(0x120)](),console[_0x2a7b11(0x120)](a32_0x404556[_0x2a7b11(0xe3)]('\x20\x20Merged\x20Config')),console[_0x2a7b11(0x120)](a32_0x404556[_0x2a7b11(0x107)](_0x2a7b11(0xf7)[_0x2a7b11(0x12d)](0x1e))),console[_0x2a7b11(0x120)]('\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x37f7e9[_0x2a7b11(0x114)]||a32_0x404556[_0x2a7b11(0xd2)](_0x2a7b11(0xe7)))),console[_0x2a7b11(0x120)](_0x2a7b11(0xe8)+(_0x4c8cd5??a32_0x404556[_0x2a7b11(0xd2)](_0x2a7b11(0xe9)))),console[_0x2a7b11(0x120)]('\x20\x20app\x20locale:\x20\x20\x20\x20\x20\x20'+_0x37f7e9['locale']),console[_0x2a7b11(0x120)]('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0x37f7e9[_0x2a7b11(0x10d)]||a32_0x404556[_0x2a7b11(0x107)]('(none)'))),console[_0x2a7b11(0x120)]('\x20\x20currentApp:\x20\x20\x20\x20\x20\x20'+(_0x37f7e9[_0x2a7b11(0xf9)]||a32_0x404556[_0x2a7b11(0x107)](_0x2a7b11(0xfd)))),console['log'](_0x2a7b11(0x12e)+(_0x37f7e9[_0x2a7b11(0x106)]||a32_0x404556[_0x2a7b11(0x107)]('(default:\x20'+DEFAULT_CONFIG_VALUES[_0x2a7b11(0x106)]+')'))),console['log'](_0x2a7b11(0xfa)+(_0x37f7e9[_0x2a7b11(0x117)]??a32_0x404556[_0x2a7b11(0x107)](_0x2a7b11(0x131)))),console[_0x2a7b11(0x120)](_0x2a7b11(0xd9)+_0x37f7e9[_0x2a7b11(0x115)]),console[_0x2a7b11(0x120)](_0x2a7b11(0x101)+_0x37f7e9[_0x2a7b11(0xf2)]),console[_0x2a7b11(0x120)](_0x2a7b11(0xd3)+AUTH_MODE[_0x2a7b11(0xca)]),console['log'](_0x2a7b11(0x11d)+(_0x37f7e9[_0x2a7b11(0xce)]?a32_0x404556[_0x2a7b11(0xc1)]('(set,\x20length='+_0x37f7e9[_0x2a7b11(0xce)][_0x2a7b11(0xd7)]+')'):a32_0x404556[_0x2a7b11(0x107)]('(none)'))),console['log'](),console[_0x2a7b11(0x120)](a32_0x404556[_0x2a7b11(0xe3)](_0x2a7b11(0xdf))),console[_0x2a7b11(0x120)](a32_0x404556[_0x2a7b11(0x107)](_0x2a7b11(0xf7)[_0x2a7b11(0x12d)](0x1e)));_0xcf991b||_0x45e191?console[_0x2a7b11(0x120)](_0x2a7b11(0x11e)+a32_0x404556[_0x2a7b11(0xd2)](_0x2a7b11(0xda))):(console[_0x2a7b11(0x120)]('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console[_0x2a7b11(0x120)](_0x2a7b11(0x127)+getUserDomain()),console[_0x2a7b11(0x120)](_0x2a7b11(0xc0)+getRuntimeDomain()),console[_0x2a7b11(0x120)](_0x2a7b11(0xc9)+getSkillDomain()),console[_0x2a7b11(0x120)](_0x2a7b11(0x104)+(getKbServiceDomain()??'not\x20configured')));console[_0x2a7b11(0x120)](),console[_0x2a7b11(0x120)](a32_0x404556[_0x2a7b11(0xe3)](_0x2a7b11(0xf6))),console[_0x2a7b11(0x120)](a32_0x404556['gray'](_0x2a7b11(0xf7)[_0x2a7b11(0x12d)](0x1e)));const _0x5cf379=inspectServiceRegistry();console[_0x2a7b11(0x120)](_0x2a7b11(0x12a)+_0x5cf379[_0x2a7b11(0xdd)]),console[_0x2a7b11(0x120)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+formatServiceRegistryStatus(_0x5cf379)),console['log'](_0x2a7b11(0x123)+_0x5cf379[_0x2a7b11(0x116)]),console[_0x2a7b11(0x120)](_0x2a7b11(0xc8)+_0x5cf379[_0x2a7b11(0x12f)]);for(const _0x50ed81 of _0x5cf379[_0x2a7b11(0xcc)]){console[_0x2a7b11(0x120)]('\x20\x20'+(_0x50ed81['serviceCode']+':')[_0x2a7b11(0xfb)](0x11)+'\x20'+(_0x50ed81[_0x2a7b11(0xcb)]||a32_0x404556['gray'](_0x2a7b11(0x124)))+'\x20('+_0x50ed81[_0x2a7b11(0x12f)]+'\x20commands)'),console[_0x2a7b11(0x120)]('\x20\x20'+''[_0x2a7b11(0xfb)](0x11)+'\x20Imported\x20from:\x20'+_0x50ed81['source'][_0x2a7b11(0xcf)]);}return console[_0x2a7b11(0x120)](),console[_0x2a7b11(0x120)](a32_0x404556[_0x2a7b11(0xe3)](_0x2a7b11(0x100))),console[_0x2a7b11(0x120)](a32_0x404556[_0x2a7b11(0x107)]('\x20\x20─'[_0x2a7b11(0x12d)](0x1e))),console['log'](_0x2a7b11(0x109)+a32_0x404556[_0x2a7b11(0xc1)](AUTH_MODE[_0x2a7b11(0xca)]+'\x20(accessKey)')),console[_0x2a7b11(0x120)]('\x20\x20Session\x20check:\x20\x20\x20'+a32_0x404556['gray'](_0x2a7b11(0xd1))),console[_0x2a7b11(0x120)](),{'ok':!![]};}function formatServiceRegistryStatus(_0x1e8f84){const _0x294ab0=a32_0x27f9;if(_0x1e8f84['status']==='ok')return a32_0x404556[_0x294ab0(0xc1)](_0x294ab0(0xe5));if(_0x1e8f84[_0x294ab0(0xef)]==='missing')return a32_0x404556[_0x294ab0(0x107)](_0x294ab0(0x129));if(_0x1e8f84[_0x294ab0(0xef)]==='empty')return a32_0x404556[_0x294ab0(0xfc)]('⚠\x20Empty');return a32_0x404556['red']('✗\x20Invalid'+(_0x1e8f84[_0x294ab0(0x130)]?':\x20'+_0x1e8f84['message']:''));}function a32_0x27f9(_0x5aadd7,_0xeacc76){_0x5aadd7=_0x5aadd7-0xbf;const _0x4f3cff=a32_0x4f3c();let _0x27f9c9=_0x4f3cff[_0x5aadd7];return _0x27f9c9;}export const doctorDefinition={'service':a32_0x41e846(0xf4),'command':a32_0x41e846(0xc6),'description':a32_0x41e846(0x119),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
1
|
+
const a32_0xf3aefd=a32_0x3225;(function(_0x2d6d0e,_0x1e2dd1){const _0x1da494=a32_0x3225,_0x4faa8a=_0x2d6d0e();while(!![]){try{const _0x52fa53=parseInt(_0x1da494(0x205))/0x1*(parseInt(_0x1da494(0x20f))/0x2)+parseInt(_0x1da494(0x20d))/0x3+parseInt(_0x1da494(0x23f))/0x4+-parseInt(_0x1da494(0x1f4))/0x5*(parseInt(_0x1da494(0x21f))/0x6)+-parseInt(_0x1da494(0x241))/0x7+-parseInt(_0x1da494(0x1ed))/0x8*(parseInt(_0x1da494(0x200))/0x9)+parseInt(_0x1da494(0x240))/0xa*(parseInt(_0x1da494(0x1f8))/0xb);if(_0x52fa53===_0x1e2dd1)break;else _0x4faa8a['push'](_0x4faa8a['shift']());}catch(_0x617215){_0x4faa8a['push'](_0x4faa8a['shift']());}}}(a32_0x53ef,0xcfd22));import a32_0x1c4e40 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{getCliVersion}from'../utils/version.js';import{getApiDomain,getKbServiceDomain,getRuntimeDomain,getSkillDomain,getUserDomain}from'../constant/domain.js';function a32_0x3225(_0x69e695,_0x55cdd4){_0x69e695=_0x69e695-0x1cf;const _0x53efde=a32_0x53ef();let _0x322508=_0x53efde[_0x69e695];return _0x322508;}import{normalizeLovrabetRegion}from'../constant/region.js';import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile,loadRawConfigLayers}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{inspectServiceRegistry}from'../commands/service/registry.js';import{inspectBuiltinSkill}from'../skills/builtin-skill.js';function a32_0x53ef(){const _0x30dd5a=['empty','\x20+\x20','format','(invalid)','\x20\x20Session\x20check:\x20\x20\x20','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','(not\x20found)','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','global','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','6385216tQQXcu','3130gYMxfp','5021716kXjZqB','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','(set,\x20length=','\x20\x20auth\x20(effective):\x20','bold','pageSize','read','\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Country/Region\x20Configuration','\x20\x20app\x20locale:\x20\x20\x20\x20\x20\x20','(missing)','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','appCode','current','red','✓\x20Valid\x20JSON','\x20\x20Installed\x20Path:\x20\x20','\x20config','prototype','repairCommand','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','platform','gray','raw','routing','\x20\x20Skill\x20Version:\x20\x20\x20','packageVersion','\x20\x20Merged\x20Config','\x20config\x20init','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','hasOwnProperty','\x20\x20Repair\x20project:\x20\x20','riskLevel','(default:\x20','\x20\x20Built-in\x20Skill','registryPath','\x20config\x20delete\x20inherit\x20--global','region','Diagnose\x20CLI\x20configuration\x20and\x20environment','✗\x20Invalid\x20JSON','16lIHlzT','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','\x20commands)','accessKey','skillVersion','✓\x20Loaded','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','2279445tkTmoH','Project','\x20\x20Repair\x20global:\x20\x20\x20','\x20doctor','15213ftgfoe','installedPath','repeat','message','Unavailable\x20until\x20routing\x20configuration\x20is\x20repaired','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','defaultApp','5289201bAKROd','not\x20configured','\x20config\x20delete\x20region','yellow','inherit','231mWChHQ','reason','state','services','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(none)','arch','filter','3244683zINTha','project','8666mZfsUS','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','includes','serviceCount','\x20\x20Config\x20JSON','⚠\x20Empty','\x20\x20Service\x20Tree','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','missing','\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','globalConfig','padEnd','commandCount','log','name','projectConfig','18JFWESl','✓\x20current','version','\x20(accessKey)','call','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','⚠\x20Empty\x20(treated\x20as\x20{})','(not\x20set)','✗\x20Invalid','status','serviceCode','length','ClientAk','\x20config\x20delete\x20inherit','\x20\x20runtimeDomain:\x20\x20\x20','\x20\x20Repair\x20global:\x20\x20\x20\x20','\x20\x20─','green','\x20config\x20delete\x20routing\x20--global','\x20config\x20delete\x20routing','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Auth'];a32_0x53ef=function(){return _0x30dd5a;};return a32_0x53ef();}async function execute(_0x30265d){const _0x3c4996=a32_0x3225,_0x22d062=getCliVersion(),_0x514a66=buildConfigFromFlags({});let _0x3959ec,_0x84df37;try{_0x3959ec=normalizeLovrabetRegion(_0x514a66[_0x3c4996(0x1dc)][_0x3c4996(0x1ea)]);}catch(_0x351a8a){_0x84df37=_0x351a8a instanceof Error?_0x351a8a:new Error(String(_0x351a8a));}let _0x16ebe3;if(!_0x84df37)try{await initGlobalEnvironment(_0x514a66);}catch(_0x222781){_0x16ebe3=_0x222781 instanceof Error?_0x222781:new Error(String(_0x222781));}console['log'](),console[_0x3c4996(0x21c)](a32_0x1c4e40[_0x3c4996(0x246)](CLI_BIN_NAME+_0x3c4996(0x1f7))),console[_0x3c4996(0x21c)](a32_0x1c4e40[_0x3c4996(0x1db)]('─'['repeat'](0x32))),console[_0x3c4996(0x21c)]('\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20'+_0x22d062),console['log'](_0x3c4996(0x209)+process[_0x3c4996(0x221)]),console[_0x3c4996(0x21c)](_0x3c4996(0x1d0)+process[_0x3c4996(0x1da)]+'\x20'+process[_0x3c4996(0x20b)]);const _0x46d8bc=inspectBuiltinSkill();console[_0x3c4996(0x21c)](),console[_0x3c4996(0x21c)](a32_0x1c4e40[_0x3c4996(0x246)](_0x3c4996(0x1e7))),console[_0x3c4996(0x21c)](a32_0x1c4e40[_0x3c4996(0x1db)](_0x3c4996(0x22f)[_0x3c4996(0x1fa)](0x1e))),console[_0x3c4996(0x21c)](_0x3c4996(0x218)+(_0x46d8bc[_0x3c4996(0x207)]===_0x3c4996(0x1d2)?a32_0x1c4e40[_0x3c4996(0x230)](_0x3c4996(0x220)):a32_0x1c4e40['red']('✗\x20'+_0x46d8bc['state']))),console['log']('\x20\x20Package\x20Version:\x20'+_0x46d8bc[_0x3c4996(0x1df)]),console['log'](_0x3c4996(0x1de)+(_0x46d8bc[_0x3c4996(0x1f1)]||a32_0x1c4e40[_0x3c4996(0x1db)](_0x3c4996(0x1cf)))),console[_0x3c4996(0x21c)](_0x3c4996(0x1d5)+(_0x46d8bc[_0x3c4996(0x1f9)]||a32_0x1c4e40[_0x3c4996(0x1db)]('(not\x20found)')));_0x46d8bc[_0x3c4996(0x207)]!==_0x3c4996(0x1d2)&&console[_0x3c4996(0x21c)]('\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x46d8bc[_0x3c4996(0x1d8)]);_0x46d8bc['reason']&&console[_0x3c4996(0x21c)]('\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x46d8bc[_0x3c4996(0x206)]);console[_0x3c4996(0x21c)](),console['log'](a32_0x1c4e40[_0x3c4996(0x246)]('\x20\x20Config\x20Files')),console[_0x3c4996(0x21c)](a32_0x1c4e40[_0x3c4996(0x1db)](_0x3c4996(0x22f)[_0x3c4996(0x1fa)](0x1e)));const _0x58013f=getGlobalConfigPath(),_0x5da3d6=getProjectConfigPath();console[_0x3c4996(0x21c)]('\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x58013f||a32_0x1c4e40['gray'](_0x3c4996(0x23b)))),console[_0x3c4996(0x21c)](_0x3c4996(0x233)+(_0x5da3d6||a32_0x1c4e40[_0x3c4996(0x1db)](_0x3c4996(0x23b)))),console[_0x3c4996(0x21c)](),console[_0x3c4996(0x21c)](a32_0x1c4e40[_0x3c4996(0x246)](_0x3c4996(0x213))),console[_0x3c4996(0x21c)](a32_0x1c4e40[_0x3c4996(0x1db)](_0x3c4996(0x22f)['repeat'](0x1e)));const _0xaa19be=(_0x2b04f8,_0x3f9b44)=>{const _0x5e3e6d=_0x3c4996;if(!_0x3f9b44){console['log']('\x20\x20'+_0x2b04f8[_0x5e3e6d(0x21a)](0x11)+'\x20'+a32_0x1c4e40[_0x5e3e6d(0x1db)]('(no\x20file)'));return;}const _0x5e1b2b=inspectCliConfigJsonFile(_0x3f9b44);if(_0x5e1b2b[_0x5e3e6d(0x228)]==='ok')console[_0x5e3e6d(0x21c)]('\x20\x20'+_0x2b04f8['padEnd'](0x11)+'\x20'+a32_0x1c4e40[_0x5e3e6d(0x230)](_0x5e3e6d(0x1d4)));else{if(_0x5e1b2b['status']===_0x5e3e6d(0x235))console[_0x5e3e6d(0x21c)]('\x20\x20'+_0x2b04f8[_0x5e3e6d(0x21a)](0x11)+'\x20'+a32_0x1c4e40[_0x5e3e6d(0x203)](_0x5e3e6d(0x225)));else _0x5e1b2b[_0x5e3e6d(0x228)]==='missing'?console[_0x5e3e6d(0x21c)]('\x20\x20'+_0x2b04f8['padEnd'](0x11)+'\x20'+a32_0x1c4e40[_0x5e3e6d(0x1db)](_0x5e3e6d(0x1cf))):(console[_0x5e3e6d(0x21c)]('\x20\x20'+_0x2b04f8[_0x5e3e6d(0x21a)](0x11)+'\x20'+a32_0x1c4e40[_0x5e3e6d(0x1d3)](_0x5e3e6d(0x1ec))),console[_0x5e3e6d(0x21c)]('\x20\x20'+''[_0x5e3e6d(0x21a)](0x11)+'\x20'+a32_0x1c4e40[_0x5e3e6d(0x1d3)](_0x5e1b2b[_0x5e3e6d(0x1fb)])));}};_0xaa19be('Global',_0x58013f),_0xaa19be(_0x3c4996(0x1f5),_0x5da3d6);const _0x19cf8e=loadRawConfigLayers(),_0x44f679=[Object[_0x3c4996(0x1d7)][_0x3c4996(0x1e3)][_0x3c4996(0x223)](_0x19cf8e[_0x3c4996(0x219)],_0x3c4996(0x204))?_0x3c4996(0x23d):null,Object[_0x3c4996(0x1d7)][_0x3c4996(0x1e3)]['call'](_0x19cf8e[_0x3c4996(0x21e)],_0x3c4996(0x204))?_0x3c4996(0x20e):null][_0x3c4996(0x20c)](Boolean);_0x44f679[_0x3c4996(0x22a)]>0x0&&(console[_0x3c4996(0x21c)]('\x20\x20Legacy\x20inherit:\x20\x20\x20'+a32_0x1c4e40[_0x3c4996(0x203)]('ignored\x20in\x20'+_0x44f679['join'](_0x3c4996(0x236))+_0x3c4996(0x1d6))),_0x44f679[_0x3c4996(0x211)](_0x3c4996(0x20e))&&console[_0x3c4996(0x21c)]('\x20\x20Repair\x20project:\x20\x20\x20'+CLI_BIN_NAME+_0x3c4996(0x22c)),_0x44f679[_0x3c4996(0x211)](_0x3c4996(0x23d))&&console[_0x3c4996(0x21c)](_0x3c4996(0x22e)+CLI_BIN_NAME+_0x3c4996(0x1e9)));_0x16ebe3&&(console['log'](),console[_0x3c4996(0x21c)](a32_0x1c4e40[_0x3c4996(0x246)]('\x20\x20Routing\x20Configuration')),console['log'](a32_0x1c4e40[_0x3c4996(0x1db)](_0x3c4996(0x22f)[_0x3c4996(0x1fa)](0x1e))),console[_0x3c4996(0x21c)](_0x3c4996(0x1d9)+a32_0x1c4e40[_0x3c4996(0x1d3)](_0x3c4996(0x227))),console[_0x3c4996(0x21c)](_0x3c4996(0x249)+_0x16ebe3[_0x3c4996(0x1fb)]),Object[_0x3c4996(0x1d7)]['hasOwnProperty'][_0x3c4996(0x223)](_0x19cf8e[_0x3c4996(0x21e)],_0x3c4996(0x1dd))&&console[_0x3c4996(0x21c)](_0x3c4996(0x1e4)+CLI_BIN_NAME+_0x3c4996(0x232)),Object[_0x3c4996(0x1d7)][_0x3c4996(0x1e3)][_0x3c4996(0x223)](_0x19cf8e['globalConfig'],'routing')&&console[_0x3c4996(0x21c)](_0x3c4996(0x1f6)+CLI_BIN_NAME+_0x3c4996(0x231)));_0x84df37&&(console[_0x3c4996(0x21c)](),console[_0x3c4996(0x21c)](a32_0x1c4e40[_0x3c4996(0x246)](_0x3c4996(0x24a))),console[_0x3c4996(0x21c)](a32_0x1c4e40[_0x3c4996(0x1db)](_0x3c4996(0x22f)[_0x3c4996(0x1fa)](0x1e))),console['log'](_0x3c4996(0x1d9)+a32_0x1c4e40[_0x3c4996(0x1d3)](_0x3c4996(0x227))),console[_0x3c4996(0x21c)](_0x3c4996(0x249)+_0x84df37[_0x3c4996(0x1fb)]),Object[_0x3c4996(0x1d7)][_0x3c4996(0x1e3)][_0x3c4996(0x223)](_0x19cf8e['projectConfig'],'region')&&console['log']('\x20\x20Repair\x20project:\x20\x20'+CLI_BIN_NAME+_0x3c4996(0x202)),Object[_0x3c4996(0x1d7)][_0x3c4996(0x1e3)][_0x3c4996(0x223)](_0x19cf8e[_0x3c4996(0x219)],_0x3c4996(0x1ea))&&console[_0x3c4996(0x21c)](_0x3c4996(0x1f6)+CLI_BIN_NAME+_0x3c4996(0x1e1)));console[_0x3c4996(0x21c)](),console[_0x3c4996(0x21c)](a32_0x1c4e40['bold'](_0x3c4996(0x1e0))),console['log'](a32_0x1c4e40['gray'](_0x3c4996(0x22f)[_0x3c4996(0x1fa)](0x1e))),console[_0x3c4996(0x21c)](_0x3c4996(0x23a)+(_0x514a66[_0x3c4996(0x1d1)]||a32_0x1c4e40[_0x3c4996(0x1d3)](_0x3c4996(0x226)))),console[_0x3c4996(0x21c)]('\x20\x20region:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x3959ec??a32_0x1c4e40[_0x3c4996(0x1d3)](_0x3c4996(0x238)))),console[_0x3c4996(0x21c)](_0x3c4996(0x24b)+_0x514a66['locale']),console[_0x3c4996(0x21c)](_0x3c4996(0x1ee)+(_0x514a66[_0x3c4996(0x1ff)]||a32_0x1c4e40[_0x3c4996(0x1db)]('(none)'))),console[_0x3c4996(0x21c)](_0x3c4996(0x1e2)+(_0x514a66['currentApp']||a32_0x1c4e40[_0x3c4996(0x1db)]('(none)'))),console[_0x3c4996(0x21c)](_0x3c4996(0x1fe)+(_0x514a66[_0x3c4996(0x237)]||a32_0x1c4e40[_0x3c4996(0x1db)](_0x3c4996(0x1e6)+DEFAULT_CONFIG_VALUES[_0x3c4996(0x237)]+')'))),console[_0x3c4996(0x21c)](_0x3c4996(0x1fd)+(_0x514a66[_0x3c4996(0x247)]??a32_0x1c4e40[_0x3c4996(0x1db)]('(default)'))),console[_0x3c4996(0x21c)](_0x3c4996(0x1f3)+_0x514a66[_0x3c4996(0x1e5)]),console[_0x3c4996(0x21c)](_0x3c4996(0x216)+_0x514a66['verbose']),console[_0x3c4996(0x21c)](_0x3c4996(0x245)+AUTH_MODE['ClientAk']),console['log'](_0x3c4996(0x243)+(_0x514a66[_0x3c4996(0x1f0)]?a32_0x1c4e40['green'](_0x3c4996(0x244)+_0x514a66['accessKey'][_0x3c4996(0x22a)]+')'):a32_0x1c4e40['gray'](_0x3c4996(0x20a)))),console[_0x3c4996(0x21c)](),console['log'](a32_0x1c4e40[_0x3c4996(0x246)]('\x20\x20API\x20Endpoints')),console[_0x3c4996(0x21c)](a32_0x1c4e40['gray']('\x20\x20─'[_0x3c4996(0x1fa)](0x1e)));_0x16ebe3||_0x84df37?console[_0x3c4996(0x21c)](_0x3c4996(0x1d9)+a32_0x1c4e40['red'](_0x3c4996(0x1fc))):(console[_0x3c4996(0x21c)](_0x3c4996(0x242)+getApiDomain()),console['log'](_0x3c4996(0x23c)+getUserDomain()),console[_0x3c4996(0x21c)](_0x3c4996(0x22d)+getRuntimeDomain()),console['log']('\x20\x20skillDomain:\x20\x20\x20\x20\x20'+getSkillDomain()),console[_0x3c4996(0x21c)]('\x20\x20kbServiceDomain:\x20'+(getKbServiceDomain()??_0x3c4996(0x201))));console['log'](),console[_0x3c4996(0x21c)](a32_0x1c4e40[_0x3c4996(0x246)](_0x3c4996(0x215))),console[_0x3c4996(0x21c)](a32_0x1c4e40[_0x3c4996(0x1db)](_0x3c4996(0x22f)[_0x3c4996(0x1fa)](0x1e)));const _0x1de0a2=inspectServiceRegistry();console[_0x3c4996(0x21c)](_0x3c4996(0x224)+_0x1de0a2[_0x3c4996(0x1e8)]),console[_0x3c4996(0x21c)](_0x3c4996(0x1d9)+formatServiceRegistryStatus(_0x1de0a2)),console['log'](_0x3c4996(0x210)+_0x1de0a2[_0x3c4996(0x212)]),console[_0x3c4996(0x21c)]('\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1de0a2[_0x3c4996(0x21b)]);for(const _0x12da76 of _0x1de0a2[_0x3c4996(0x208)]){console[_0x3c4996(0x21c)]('\x20\x20'+(_0x12da76[_0x3c4996(0x229)]+':')['padEnd'](0x11)+'\x20'+(_0x12da76[_0x3c4996(0x21d)]||a32_0x1c4e40['gray']('(unnamed)'))+'\x20('+_0x12da76['commandCount']+_0x3c4996(0x1ef)),console[_0x3c4996(0x21c)]('\x20\x20'+''[_0x3c4996(0x21a)](0x11)+'\x20Imported\x20from:\x20'+_0x12da76['source']['path']);}return console[_0x3c4996(0x21c)](),console['log'](a32_0x1c4e40[_0x3c4996(0x246)](_0x3c4996(0x234))),console[_0x3c4996(0x21c)](a32_0x1c4e40[_0x3c4996(0x1db)](_0x3c4996(0x22f)['repeat'](0x1e))),console[_0x3c4996(0x21c)](_0x3c4996(0x23e)+a32_0x1c4e40[_0x3c4996(0x230)](AUTH_MODE[_0x3c4996(0x22b)]+_0x3c4996(0x222))),console[_0x3c4996(0x21c)](_0x3c4996(0x239)+a32_0x1c4e40['gray']('(removed\x20—\x20cookie\x20auth\x20disabled)')),console[_0x3c4996(0x21c)](),{'ok':!![]};}function formatServiceRegistryStatus(_0x3402f2){const _0x575cef=a32_0x3225;if(_0x3402f2['status']==='ok')return a32_0x1c4e40[_0x575cef(0x230)](_0x575cef(0x1f2));if(_0x3402f2[_0x575cef(0x228)]===_0x575cef(0x217))return a32_0x1c4e40[_0x575cef(0x1db)]('(not\x20found)');if(_0x3402f2['status']===_0x575cef(0x235))return a32_0x1c4e40[_0x575cef(0x203)](_0x575cef(0x214));return a32_0x1c4e40[_0x575cef(0x1d3)](_0x575cef(0x227)+(_0x3402f2[_0x575cef(0x1fb)]?':\x20'+_0x3402f2['message']:''));}export const doctorDefinition={'service':'doctor','command':'check','description':a32_0xf3aefd(0x1eb),'risk':a32_0xf3aefd(0x248),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a33_0x131277=a33_0x16ba;function a33_0x292b(){const _0x2accfb=['4RjNelk','341860SfsNPx','Uploaded\x20file:\x20','663798PXaRzS','/client/uploadFile','Path\x20to\x20the\x20local\x20file\x20to\x20upload','string','long-term','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','file','body','filePath','287gqCjhb','490068qWCrjR','bool','description','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','File','boolean','validation','20OYuLTi','trim','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','download','appCode','path','11ZdhEGl','filePath\x20is\x20required.','filepath','Preview:\x20upload\x20','554746vRwmkM','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','1488468qcqzNk','3fqXObu','query-url','read','str','17880URoISf','1501205xtwPNZ'];a33_0x292b=function(){return _0x2accfb;};return a33_0x292b();}(function(_0x504641,_0x5d168e){const _0x1b5ab1=a33_0x16ba,_0x5f5ab8=_0x504641();while(!![]){try{const _0x3abc1b=-parseInt(_0x1b5ab1(0x177))/0x1+parseInt(_0x1b5ab1(0x16d))/0x2*(parseInt(_0x1b5ab1(0x170))/0x3)+parseInt(_0x1b5ab1(0x176))/0x4*(parseInt(_0x1b5ab1(0x175))/0x5)+-parseInt(_0x1b5ab1(0x179))/0x6+parseInt(_0x1b5ab1(0x15a))/0x7*(parseInt(_0x1b5ab1(0x174))/0x8)+-parseInt(_0x1b5ab1(0x15b))/0x9*(-parseInt(_0x1b5ab1(0x163))/0xa)+parseInt(_0x1b5ab1(0x169))/0xb*(-parseInt(_0x1b5ab1(0x16f))/0xc);if(_0x3abc1b===_0x5d168e)break;else _0x5f5ab8['push'](_0x5f5ab8['shift']());}catch(_0x5812be){_0x5f5ab8['push'](_0x5f5ab8['shift']());}}}(a33_0x292b,0x31395));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,uploadRuntimeFile}from'../../core/api-client.js';function a33_0x16ba(_0x40dc5d,_0x702d96){_0x40dc5d=_0x40dc5d-0x154;const _0x292b4d=a33_0x292b();let _0x16ba5c=_0x292b4d[_0x40dc5d];return _0x16ba5c;}import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const FILE_FLAG={'name':a33_0x131277(0x157),'type':a33_0x131277(0x154),'required':!![],'description':a33_0x131277(0x17b)},FILEPATH_FLAG={'name':a33_0x131277(0x16b),'type':a33_0x131277(0x154),'required':!![],'description':'Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data'},DOWNLOAD_FLAG={'name':a33_0x131277(0x166),'type':'boolean','description':a33_0x131277(0x156)},LONG_TERM_FLAG={'name':a33_0x131277(0x155),'type':a33_0x131277(0x161),'description':'Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML'};function requireFilePath(_0x314670){const _0x376522=a33_0x131277,_0x163916=_0x314670[_0x376522(0x164)]();if(!_0x163916)throw CliErrors[_0x376522(0x162)](_0x376522(0x16a));return _0x163916;}const fileUpload={'service':a33_0x131277(0x157),'command':'upload','description':a33_0x131277(0x165),'risk':a33_0x131277(0x172),'flags':[FILE_FLAG],async 'dryRun'(_0x359e64){const _0x8943bf=a33_0x131277,_0x5ac32a=requireRuntimeUploadFile(_0x359e64[_0x8943bf(0x173)](_0x8943bf(0x157)),_0x8943bf(0x160));return dryRun('POST',_0x8943bf(0x17a))[_0x8943bf(0x158)]({'appCode':_0x359e64['appCode'],'multipart':{'file':_0x5ac32a}})[_0x8943bf(0x15d)](_0x8943bf(0x16c)+_0x5ac32a[_0x8943bf(0x168)]+'\x20to\x20runtime\x20app\x20'+_0x359e64[_0x8943bf(0x167)])['build']();},async 'execute'(_0x332a3f){const _0x44a8fc=a33_0x131277,_0x49e36f=requireRuntimeUploadFile(_0x332a3f[_0x44a8fc(0x173)](_0x44a8fc(0x157)),_0x44a8fc(0x160)),_0x4677ce=await uploadRuntimeFile(_0x332a3f['appCode'],_0x49e36f[_0x44a8fc(0x168)]);return{'ok':!![],'data':_0x4677ce,'message':_0x4677ce[_0x44a8fc(0x159)]?_0x44a8fc(0x178)+_0x4677ce[_0x44a8fc(0x159)]+_0x44a8fc(0x16e):_0x44a8fc(0x15e)};}},fileQueryUrl={'service':a33_0x131277(0x157),'command':a33_0x131277(0x171),'description':a33_0x131277(0x15f),'risk':a33_0x131277(0x172),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x5b81cf){const _0x15d28f=a33_0x131277,_0xac23ad=requireFilePath(_0x5b81cf['str'](_0x15d28f(0x16b))),_0x1e3274=await queryRuntimeFileUrl(_0xac23ad,{'download':_0x5b81cf['bool']('download'),'longTerm':_0x5b81cf[_0x15d28f(0x15c)]('long-term')});return{'ok':!![],'data':_0x1e3274};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
|
package/lib/commands/init.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a34_0xdc36c4=a34_0x31bb;(function(_0x4c5079,_0x19077a){const _0x46c5bb=a34_0x31bb,_0x15bf30=_0x4c5079();while(!![]){try{const _0x43b265=parseInt(_0x46c5bb(0x135))/0x1*(parseInt(_0x46c5bb(0x12a))/0x2)+-parseInt(_0x46c5bb(0x136))/0x3*(-parseInt(_0x46c5bb(0x120))/0x4)+-parseInt(_0x46c5bb(0x141))/0x5+-parseInt(_0x46c5bb(0x11a))/0x6*(parseInt(_0x46c5bb(0x12b))/0x7)+-parseInt(_0x46c5bb(0x137))/0x8*(parseInt(_0x46c5bb(0x145))/0x9)+-parseInt(_0x46c5bb(0x11c))/0xa*(-parseInt(_0x46c5bb(0x133))/0xb)+parseInt(_0x46c5bb(0x12f))/0xc;if(_0x43b265===_0x19077a)break;else _0x15bf30['push'](_0x15bf30['shift']());}catch(_0x5c8e59){_0x15bf30['push'](_0x15bf30['shift']());}}}(a34_0x1597,0xd7d2c));function a34_0x1597(){const _0x4fcc71=['Skip\x20confirmation\x20when\x20overwriting','10mdWEhs','string','env','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','5444lSeBfB','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`.','\x22.\x20Allowed:\x20','utf8','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','newConfigFileName','Failed\x20to\x20parse\x20source\x20file:\x20','app','\x20\x20appcode:\x20','riskLevel','926546zNchzQ','4060JLlIDr','yes','Source\x20file\x20not\x20found:\x20','defaultApp','31442544czoaJA','\x20\x20config:\x20\x20','entries','file','8273177idOdqs','appcode','1bJpIIE','1047CEnZyg','664OkORum','object','project',')\x20instead\x20of\x20project','cwd','Invalid\x20env\x20\x22','boolean','Write\x20to\x20global\x20(~/','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','validation','8512100zMAOKX','Override\x20imported\x20default\x20env','parse','message','19287FfxISc','join','log','global','Override\x20imported\x20default\x20appcode','15996iGmmoz'];a34_0x1597=function(){return _0x4fcc71;};return a34_0x1597();}import{existsSync,readFileSync}from'node:fs';import{resolve,isAbsolute}from'node:path';function a34_0x31bb(_0x260ef5,_0x4e5dd4){_0x260ef5=_0x260ef5-0x117;const _0x15971d=a34_0x1597();let _0x31bb8b=_0x15971d[_0x260ef5];return _0x31bb8b;}import{CliErrors}from'../errors.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{IMPORTABLE_RUNTIME_CONFIG_KEYS}from'../config/schema.js';import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../context.js';import{PRODUCT_CONFIG}from'../constant/product.js';export const appImportFlagDefs=[{'name':a34_0xdc36c4(0x132),'type':a34_0xdc36c4(0x11d),'description':a34_0xdc36c4(0x11f),'required':!![]},{'name':a34_0xdc36c4(0x134),'type':'string','description':a34_0xdc36c4(0x119)},{'name':a34_0xdc36c4(0x11e),'type':a34_0xdc36c4(0x11d),'description':a34_0xdc36c4(0x142),'enum':[...RUNTIME_ENV_VALUES]},{'name':a34_0xdc36c4(0x118),'type':'boolean','description':a34_0xdc36c4(0x13e)+PRODUCT_CONFIG[a34_0xdc36c4(0x125)]+a34_0xdc36c4(0x13a),'default':![]},{'name':a34_0xdc36c4(0x12c),'type':a34_0xdc36c4(0x13d),'description':a34_0xdc36c4(0x11b),'default':![]}];export async function runAppImport(_0x925e0){const _0x28cb48=a34_0xdc36c4,_0x10e733=_0x925e0[_0x28cb48(0x118)]?_0x28cb48(0x118):_0x28cb48(0x139),_0x365406=resolveWriteConfigPath(_0x10e733);await runFromImport(_0x925e0,_0x365406);}async function runFromImport(_0x77a2e0,_0x1ce260){const _0xbd03de=a34_0xdc36c4,_0x13cc27=resolveFilePath(_0x77a2e0[_0xbd03de(0x132)]);if(!existsSync(_0x13cc27))throw CliErrors[_0xbd03de(0x140)](_0xbd03de(0x12d)+_0x13cc27);const _0x3e0ad4=readSourceFile(_0x13cc27),_0x276b38=convertToRuntimeConfig(_0x3e0ad4);_0x77a2e0[_0xbd03de(0x134)]&&(_0x276b38[_0xbd03de(0x134)]=String(_0x77a2e0[_0xbd03de(0x134)]));_0x77a2e0[_0xbd03de(0x11e)]&&(_0x276b38[_0xbd03de(0x11e)]=resolveImportEnv(_0x77a2e0));if(!_0x276b38[_0xbd03de(0x134)])throw CliErrors[_0xbd03de(0x140)](_0xbd03de(0x124),_0xbd03de(0x121));await writeImportConfig(_0x1ce260,_0x276b38,_0x77a2e0),console[_0xbd03de(0x117)]('Imported\x20from\x20'+_0x13cc27),console['log'](_0xbd03de(0x130)+_0x1ce260),console[_0xbd03de(0x117)](_0xbd03de(0x128)+_0x276b38[_0xbd03de(0x134)]);if(_0x276b38[_0xbd03de(0x12e)])console['log']('\x20\x20default:\x20'+_0x276b38['defaultApp']);}function convertToRuntimeConfig(_0x1d07d6){const _0x27414a=a34_0xdc36c4;if(_0x1d07d6['apps']&&typeof _0x1d07d6['apps']===_0x27414a(0x138))throw CliErrors[_0x27414a(0x140)](_0x27414a(0x13f),'Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.');const _0x147aab={};for(const _0x2b2d16 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x1d07d6[_0x2b2d16]!==undefined&&(_0x147aab[_0x2b2d16]=_0x1d07d6[_0x2b2d16]);}return!_0x147aab[_0x27414a(0x129)]&&(_0x147aab[_0x27414a(0x129)]=DEFAULT_CONFIG_VALUES['riskLevel']),_0x147aab;}async function writeImportConfig(_0x132f1d,_0x28f393,_0x8b630a){const _0x3dd81d=a34_0xdc36c4;let _0x25aaae={};existsSync(_0x132f1d)&&!_0x8b630a[_0x3dd81d(0x12c)]&&(_0x25aaae=readConfigFile(_0x132f1d));for(const [_0x587c1d,_0x885c06]of Object[_0x3dd81d(0x131)](_0x28f393)){_0x885c06!==undefined&&(_0x25aaae[_0x587c1d]=_0x885c06);}if(_0x25aaae['app'])delete _0x25aaae[_0x3dd81d(0x127)];writeConfigFile(_0x132f1d,_0x25aaae);}function resolveFilePath(_0x23baf2){const _0x11958b=a34_0xdc36c4;return isAbsolute(_0x23baf2)?_0x23baf2:resolve(process[_0x11958b(0x13b)](),_0x23baf2);}function readSourceFile(_0x4c5b78){const _0x57b4fc=a34_0xdc36c4;try{const _0x1f4f62=readFileSync(_0x4c5b78,{'encoding':_0x57b4fc(0x123)});return JSON[_0x57b4fc(0x143)](_0x1f4f62);}catch(_0x519fd5){throw CliErrors['validation'](_0x57b4fc(0x126)+_0x519fd5[_0x57b4fc(0x144)]);}}function resolveImportEnv(_0x259e0f){const _0x528055=a34_0xdc36c4,_0x22a4ee=_0x259e0f[_0x528055(0x11e)];if(_0x22a4ee===undefined||_0x22a4ee==='')return DEFAULT_CONFIG_VALUES['env'];if(!RUNTIME_ENV_VALUES['includes'](_0x22a4ee))throw CliErrors[_0x528055(0x140)](_0x528055(0x13c)+_0x22a4ee+_0x528055(0x122)+RUNTIME_ENV_VALUES[_0x528055(0x146)](',\x20'));return _0x22a4ee;}
|
package/lib/commands/kb/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a35_0x33d88e=a35_0x1362;function a35_0x580c(){const _0x2b284b=['3636318VWThcK','4016097NiRdlE','Personal\x20knowledge-base\x20entry\x20ID','num','Personal\x20knowledge-base\x20entry\x20title','31946299DamYoT','list','read','84oamsPf','body','version','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','4022BuFWDS','20coBKeE','Configure\x20kbServiceDomain\x20in\x20the\x20connection\x20settings,\x20or\x20pass\x20`--kb-service-url\x20<https-origin>`\x20for\x20this\x20request.','39426AjYhOw','10dPKlCn','Search\x20query\x20for\x20visible\x20public,\x20company,\x20and\x20personal\x20knowledge','string','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','appCode','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','content','/client/knowledge-base/personal/create','KB\x20Service\x20is\x20not\x20configured\x20for\x20knowledge\x20search.','Updated\x20KB\x20entry\x20','kb-service-url','Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20','write','title','isSafeInteger','signal','query','File\x20path\x20is\x20required.','str','6989976oPVzeJ','Search\x20visible\x20public,\x20company,\x20and\x20personal\x20knowledge','flag','/update','102771BmwxJc','251aRqPuJ','userId','description','File\x20is\x20not\x20a\x20regular\x20file:\x20','length','validation','create','file','accessKey','POST','topk','utf8','number','File\x20not\x20found:\x20','Search\x20query\x20is\x20required.','search','ragStatus','isFile','Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','build','verbose','Replaces\x20the\x20personal\x20knowledge-base\x20entry\x20body\x20with\x20local\x20file\x20content\x20and\x20triggers\x20retrieval\x20sync.'];a35_0x580c=function(){return _0x2b284b;};return a35_0x580c();}(function(_0x56b5d0,_0x4b6a34){const _0x2e8577=a35_0x1362,_0x46454c=_0x56b5d0();while(!![]){try{const _0x4c3c3d=parseInt(_0x2e8577(0x119))/0x1*(-parseInt(_0x2e8577(0x13b))/0x2)+-parseInt(_0x2e8577(0x118))/0x3*(parseInt(_0x2e8577(0x137))/0x4)+-parseInt(_0x2e8577(0x13f))/0x5*(-parseInt(_0x2e8577(0x13e))/0x6)+parseInt(_0x2e8577(0x12f))/0x7+-parseInt(_0x2e8577(0x114))/0x8+parseInt(_0x2e8577(0x130))/0x9*(-parseInt(_0x2e8577(0x13c))/0xa)+parseInt(_0x2e8577(0x134))/0xb;if(_0x4c3c3d===_0x4b6a34)break;else _0x46454c['push'](_0x46454c['shift']());}catch(_0x1aaceb){_0x46454c['push'](_0x46454c['shift']());}}}(a35_0x580c,0x6cff6));function a35_0x1362(_0x20ce52,_0x49cf18){_0x20ce52=_0x20ce52-0x104;const _0x580cae=a35_0x580c();let _0x1362fd=_0x580cae[_0x20ce52];return _0x1362fd;}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{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':'title','type':'string','required':!![],'description':a35_0x33d88e(0x133)},FILE_FLAG={'name':'file','type':a35_0x33d88e(0x141),'required':!![],'description':a35_0x33d88e(0x13a)},QUERY_FLAG={'name':a35_0x33d88e(0x111),'type':a35_0x33d88e(0x141),'required':!![],'description':a35_0x33d88e(0x140)},TOPK_FLAG={'name':a35_0x33d88e(0x123),'type':a35_0x33d88e(0x125),'description':a35_0x33d88e(0x104)};function readKnowledgeFile(_0xf80d33){const _0x547b62=a35_0x33d88e;if(!_0xf80d33)throw CliErrors[_0x547b62(0x11e)](_0x547b62(0x112));if(!existsSync(_0xf80d33))throw CliErrors[_0x547b62(0x11e)](_0x547b62(0x126)+_0xf80d33);if(!statSync(_0xf80d33)[_0x547b62(0x12a)]())throw CliErrors[_0x547b62(0x11e)](_0x547b62(0x11c)+_0xf80d33);return readFileSync(_0xf80d33,_0x547b62(0x124));}function summarizePersonalItem(_0x10640f){const _0x47b040=a35_0x33d88e;return{'id':_0x10640f['id'],'title':_0x10640f[_0x47b040(0x10e)],'version':_0x10640f[_0x47b040(0x139)],'ragStatus':_0x10640f[_0x47b040(0x129)],'ragErrorMessage':_0x10640f['ragErrorMessage'],'updateTime':_0x10640f['updateTime']};}function detailPersonalItem(_0x5dafa6){const _0x5dfb69=a35_0x33d88e;return{'id':_0x5dafa6['id'],'appCode':_0x5dafa6[_0x5dfb69(0x105)],'scope':_0x5dafa6['scope'],'userId':_0x5dafa6[_0x5dfb69(0x11a)],'title':_0x5dafa6[_0x5dfb69(0x10e)],'content':_0x5dafa6[_0x5dfb69(0x107)]??'','version':_0x5dafa6['version'],'ragStatus':_0x5dafa6[_0x5dfb69(0x129)],'ragErrorMessage':_0x5dafa6['ragErrorMessage'],'createTime':_0x5dafa6['createTime'],'updateTime':_0x5dafa6['updateTime']};}function readTopK(_0x45321c){const _0x3564fc=a35_0x33d88e,_0x48a1af=_0x45321c[_0x3564fc(0x116)](_0x3564fc(0x123));if(_0x48a1af===undefined||_0x48a1af===null||_0x48a1af==='')return undefined;const _0x38056b=_0x45321c[_0x3564fc(0x132)](_0x3564fc(0x123));if(!Number[_0x3564fc(0x10f)](_0x38056b)||_0x38056b<0x1||_0x38056b>0x32)throw CliErrors['validation']('--topk\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.');return _0x38056b;}const kbList={'service':'kb','command':a35_0x33d88e(0x135),'description':'List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','risk':a35_0x33d88e(0x136),'flags':[VERBOSE_FLAG],async 'execute'(_0x1a42e3){const _0x2e7ad4=a35_0x33d88e,_0xf9c054=await listPersonalKnowledgeBaseItems(_0x1a42e3[_0x2e7ad4(0x105)]);if(_0x1a42e3['bool'](_0x2e7ad4(0x12d)))return{'ok':!![],'data':{'total':_0xf9c054['length'],'items':_0xf9c054}};return{'ok':!![],'data':{'total':_0xf9c054[_0x2e7ad4(0x11d)],'items':_0xf9c054['map'](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':'detail','description':a35_0x33d88e(0x106),'risk':a35_0x33d88e(0x136),'flags':[{...ID_FLAG,'description':a35_0x33d88e(0x131)}],async 'execute'(_0x1c6ef4){const _0x5d0719=a35_0x33d88e,_0x4b1d0a=await getPersonalKnowledgeBaseItem(_0x1c6ef4['num']('id'),_0x1c6ef4[_0x5d0719(0x105)]);return{'ok':!![],'data':detailPersonalItem(_0x4b1d0a)};}},kbCreate={'service':'kb','command':a35_0x33d88e(0x11f),'description':a35_0x33d88e(0x12b),'risk':a35_0x33d88e(0x10d),'confirmationDescription':'Saves\x20local\x20file\x20content\x20as\x20a\x20personal\x20knowledge-base\x20entry\x20and\x20starts\x20retrieval\x20sync.','flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x5b885c){const _0x10e63c=a35_0x33d88e,_0x45b5ee=_0x5b885c[_0x10e63c(0x113)]('title'),_0x35125a=readKnowledgeFile(_0x5b885c['str']('file')),_0x23d2bb=await createPersonalKnowledgeBaseItem(_0x5b885c['appCode'],{'title':_0x45b5ee,'content':_0x35125a});return{'ok':!![],'data':summarizePersonalItem(_0x23d2bb),'message':'Created\x20KB\x20entry\x20'+_0x23d2bb['id']+'\x20('+_0x23d2bb[_0x10e63c(0x10e)]+')'};},async 'dryRun'(_0xea5b0f){const _0x1c4b83=a35_0x33d88e,_0x4bb7de=_0xea5b0f[_0x1c4b83(0x113)](_0x1c4b83(0x10e)),_0x413d6f=readKnowledgeFile(_0xea5b0f[_0x1c4b83(0x113)](_0x1c4b83(0x120)));return dryRun(_0x1c4b83(0x122),_0x1c4b83(0x108))[_0x1c4b83(0x138)]({'appCode':_0xea5b0f[_0x1c4b83(0x105)],'title':_0x4bb7de,'content':_0x413d6f})[_0x1c4b83(0x11b)]('Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22'+_0x4bb7de+'\x22')['build']();}},kbUpdate={'service':'kb','command':'update','description':'Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','risk':a35_0x33d88e(0x10d),'confirmationDescription':a35_0x33d88e(0x12e),'flags':[{...ID_FLAG,'description':a35_0x33d88e(0x131)},{...TITLE_FLAG,'required':![],'description':'Override\x20the\x20existing\x20entry\x20title'},FILE_FLAG],async 'execute'(_0x2fab69){const _0x5c5bf3=a35_0x33d88e,_0x7e4880=_0x2fab69['num']('id'),_0x5d472d=readKnowledgeFile(_0x2fab69[_0x5c5bf3(0x113)](_0x5c5bf3(0x120))),_0x367c1b=_0x2fab69[_0x5c5bf3(0x113)](_0x5c5bf3(0x10e))||(await getPersonalKnowledgeBaseItem(_0x7e4880,_0x2fab69['appCode']))[_0x5c5bf3(0x10e)],_0x221118=await updatePersonalKnowledgeBaseItem(_0x7e4880,_0x2fab69[_0x5c5bf3(0x105)],{'title':_0x367c1b,'content':_0x5d472d});return{'ok':!![],'data':summarizePersonalItem(_0x221118),'message':_0x5c5bf3(0x10a)+_0x221118['id']+'\x20('+_0x221118[_0x5c5bf3(0x10e)]+')'};},async 'dryRun'(_0x106237){const _0x5881f7=a35_0x33d88e,_0x169559=_0x106237[_0x5881f7(0x132)]('id'),_0x22f3f5=readKnowledgeFile(_0x106237[_0x5881f7(0x113)](_0x5881f7(0x120))),_0x5ed20b=_0x106237[_0x5881f7(0x113)](_0x5881f7(0x10e))||(await getPersonalKnowledgeBaseItem(_0x169559,_0x106237['appCode']))[_0x5881f7(0x10e)];return dryRun(_0x5881f7(0x122),'/client/knowledge-base/personal/'+_0x169559+_0x5881f7(0x117))['body']({'appCode':_0x106237[_0x5881f7(0x105)],'title':_0x5ed20b,'content':_0x22f3f5})[_0x5881f7(0x11b)](_0x5881f7(0x10c)+_0x169559)[_0x5881f7(0x12c)]();}};function readSearchServiceUrl(_0x1d04b5){const _0x46f8a4=a35_0x33d88e;if(_0x1d04b5['flag'](_0x46f8a4(0x10b))!==undefined)return normalizeKbServiceOrigin(_0x1d04b5[_0x46f8a4(0x113)]('kb-service-url'));const _0x762124=getKbServiceDomain();if(!_0x762124)throw CliErrors[_0x46f8a4(0x11e)](_0x46f8a4(0x109),_0x46f8a4(0x13d));return normalizeKbServiceOrigin(_0x762124);}const kbSearch={'service':'kb','command':a35_0x33d88e(0x128),'description':a35_0x33d88e(0x115),'risk':'read','flags':[QUERY_FLAG,TOPK_FLAG,{'name':a35_0x33d88e(0x10b),'type':a35_0x33d88e(0x141),'required':![],'description':'Optional\x20trusted\x20KB\x20Service\x20HTTPS\x20origin\x20for\x20this\x20request\x20only'}],async 'validate'(_0x151344){const _0x478f17=a35_0x33d88e;if(!_0x151344[_0x478f17(0x113)]('query')['trim']())throw CliErrors[_0x478f17(0x11e)](_0x478f17(0x127));readTopK(_0x151344),readSearchServiceUrl(_0x151344);},async 'execute'(_0x348281){const _0x339901=a35_0x33d88e,_0x367436=_0x348281[_0x339901(0x113)](_0x339901(0x111))['trim'](),_0x38dda5=readTopK(_0x348281),_0x2b37ce=readSearchServiceUrl(_0x348281),_0x26adfa={'appCode':_0x348281[_0x339901(0x105)],'accessKey':_0x348281[_0x339901(0x121)]??'','query':_0x367436,..._0x38dda5!==undefined?{'topK':_0x38dda5}:{},'signal':_0x348281[_0x339901(0x110)]},_0x53fe3a=await searchDirectKnowledge({..._0x26adfa,'serviceUrl':_0x2b37ce});return{'ok':!![],'data':_0x53fe3a};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
|
|
1
|
+
function a35_0x3d5c(){const _0xbfb4bc=['path','ragErrorMessage','ragStatus','22315010aWxEAh','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','verbose','3410955xYdIEG','Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20','Search\x20query\x20for\x20visible\x20public,\x20company,\x20and\x20personal\x20knowledge','3151956dkTyTO','string','Optional\x20trusted\x20KB\x20Service\x20HTTPS\x20origin\x20for\x20this\x20request\x20only','accessKey','search','Personal\x20knowledge-base\x20entry\x20ID','detail','/client/knowledge-base/personal','9SuKXGz','map','number','description','isFile','kb-service-url','isSafeInteger','title','str','updateTime','body','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','write','Replaces\x20the\x20personal\x20knowledge-base\x20entry\x20body\x20with\x20local\x20file\x20content\x20and\x20triggers\x20retrieval\x20sync.','appCode','trim','length','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','scope','Updated\x20KB\x20entry\x20','create','File\x20not\x20found:\x20','file','num','list','5512VtrlQS','Personal\x20knowledge-base\x20entry\x20title','4TJRqxC','4687530WdbKcD','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','838953zSZDql','POST','Saves\x20local\x20file\x20content\x20as\x20a\x20personal\x20knowledge-base\x20entry\x20and\x20starts\x20retrieval\x20sync.','1362942BZHUuS','read','Search\x20query\x20is\x20required.','version','userId','dryRun','content','build','update','signal','validation','Override\x20the\x20existing\x20entry\x20title','1722EPLPXJ','Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','topk','query','Search\x20visible\x20public,\x20company,\x20and\x20personal\x20knowledge'];a35_0x3d5c=function(){return _0xbfb4bc;};return a35_0x3d5c();}const a35_0x4a91ac=a35_0x20d7;function a35_0x20d7(_0x340853,_0x48b901){_0x340853=_0x340853-0x95;const _0x3d5c2b=a35_0x3d5c();let _0x20d7b1=_0x3d5c2b[_0x340853];return _0x20d7b1;}(function(_0x4bedf3,_0x3445e4){const _0x1e1489=a35_0x20d7,_0x4d3913=_0x4bedf3();while(!![]){try{const _0x1f8aec=-parseInt(_0x1e1489(0xbd))/0x1+parseInt(_0x1e1489(0xc0))/0x2+-parseInt(_0x1e1489(0xd7))/0x3+-parseInt(_0x1e1489(0xba))/0x4*(parseInt(_0x1e1489(0xbb))/0x5)+parseInt(_0x1e1489(0x97))/0x6+parseInt(_0x1e1489(0xcc))/0x7*(parseInt(_0x1e1489(0xb8))/0x8)+parseInt(_0x1e1489(0x9f))/0x9*(parseInt(_0x1e1489(0xd4))/0xa);if(_0x1f8aec===_0x3445e4)break;else _0x4d3913['push'](_0x4d3913['shift']());}catch(_0x3ae8d3){_0x4d3913['push'](_0x4d3913['shift']());}}}(a35_0x3d5c,0xa984c));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalKnowledgeBaseItem,getPersonalKnowledgeBaseItem,listPersonalKnowledgeBaseItems,updatePersonalKnowledgeBaseItem}from'../../core/api-client.js';import{searchDirectKnowledge,normalizeKbServiceOrigin}from'../../core/kb-search-client.js';import{planPersonalKnowledgeWrite,withKbManagementOrigin}from'../../core/kb-management-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{getKbServiceDomain}from'../../constant/domain.js';import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':'title','type':a35_0x4a91ac(0x98),'required':!![],'description':a35_0x4a91ac(0xb9)},FILE_FLAG={'name':a35_0x4a91ac(0xb5),'type':'string','required':!![],'description':a35_0x4a91ac(0xd5)},QUERY_FLAG={'name':a35_0x4a91ac(0xcf),'type':a35_0x4a91ac(0x98),'required':!![],'description':a35_0x4a91ac(0x96)},TOPK_FLAG={'name':a35_0x4a91ac(0xce),'type':a35_0x4a91ac(0xa1),'description':a35_0x4a91ac(0xaa)};function readKnowledgeFile(_0x20cef2){const _0x1ced98=a35_0x4a91ac;if(!_0x20cef2)throw CliErrors[_0x1ced98(0xca)]('File\x20path\x20is\x20required.');if(!existsSync(_0x20cef2))throw CliErrors[_0x1ced98(0xca)](_0x1ced98(0xb4)+_0x20cef2);if(!statSync(_0x20cef2)[_0x1ced98(0xa3)]())throw CliErrors[_0x1ced98(0xca)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x20cef2);return readFileSync(_0x20cef2,'utf8');}function summarizePersonalItem(_0x376ce8){const _0x2d4fc9=a35_0x4a91ac;return{'id':_0x376ce8['id'],'title':_0x376ce8['title'],'version':_0x376ce8[_0x2d4fc9(0xc3)],'ragStatus':_0x376ce8['ragStatus'],'ragErrorMessage':_0x376ce8[_0x2d4fc9(0xd2)],'updateTime':_0x376ce8[_0x2d4fc9(0xa8)]};}function detailPersonalItem(_0x3078e9){const _0x383506=a35_0x4a91ac;return{'id':_0x3078e9['id'],'appCode':_0x3078e9['appCode'],'scope':_0x3078e9[_0x383506(0xb1)],'userId':_0x3078e9[_0x383506(0xc4)],'title':_0x3078e9[_0x383506(0xa6)],'content':_0x3078e9[_0x383506(0xc6)],'version':_0x3078e9[_0x383506(0xc3)],'ragStatus':_0x3078e9[_0x383506(0xd3)],'ragErrorMessage':_0x3078e9[_0x383506(0xd2)],'createTime':_0x3078e9['createTime'],'updateTime':_0x3078e9[_0x383506(0xa8)]};}function readTopK(_0x2a95ff){const _0x4a1390=a35_0x4a91ac,_0x18247e=_0x2a95ff['flag'](_0x4a1390(0xce));if(_0x18247e===undefined||_0x18247e===null||_0x18247e==='')return undefined;const _0x2d780b=_0x2a95ff[_0x4a1390(0xb6)]('topk');if(!Number[_0x4a1390(0xa5)](_0x2d780b)||_0x2d780b<0x1||_0x2d780b>0x32)throw CliErrors[_0x4a1390(0xca)]('--topk\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.');return _0x2d780b;}const kbList={'service':'kb','command':a35_0x4a91ac(0xb7),'description':'List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','risk':a35_0x4a91ac(0xc1),'flags':[VERBOSE_FLAG],async 'execute'(_0xcf5bcb){const _0x2212a5=a35_0x4a91ac,_0x29b589=await listPersonalKnowledgeBaseItems(_0xcf5bcb[_0x2212a5(0xad)],_0xcf5bcb[_0x2212a5(0xc9)]);if(_0xcf5bcb['bool'](_0x2212a5(0xd6)))return{'ok':!![],'data':{'total':_0x29b589[_0x2212a5(0xaf)],'items':_0x29b589}};return{'ok':!![],'data':{'total':_0x29b589[_0x2212a5(0xaf)],'items':_0x29b589[_0x2212a5(0xa0)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a35_0x4a91ac(0x9d),'description':a35_0x4a91ac(0xbc),'risk':a35_0x4a91ac(0xc1),'flags':[{...ID_FLAG,'description':a35_0x4a91ac(0x9c)}],async 'execute'(_0x1dc997){const _0x239f4c=a35_0x4a91ac,_0xee0efa=await getPersonalKnowledgeBaseItem(_0x1dc997[_0x239f4c(0xb6)]('id'),_0x1dc997[_0x239f4c(0xad)],_0x1dc997[_0x239f4c(0xc9)]);return{'ok':!![],'data':detailPersonalItem(_0xee0efa)};}},kbCreate={'service':'kb','command':a35_0x4a91ac(0xb3),'description':a35_0x4a91ac(0xcd),'risk':a35_0x4a91ac(0xab),'confirmationDescription':a35_0x4a91ac(0xbf),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x34ad09){const _0x365adf=a35_0x4a91ac,_0x1020fa=_0x34ad09[_0x365adf(0xa7)](_0x365adf(0xa6)),_0x2771db=readKnowledgeFile(_0x34ad09[_0x365adf(0xa7)](_0x365adf(0xb5))),_0x521b7c=await createPersonalKnowledgeBaseItem(_0x34ad09[_0x365adf(0xad)],{'title':_0x1020fa,'content':_0x2771db},_0x34ad09[_0x365adf(0xc9)]);return{'ok':!![],'data':summarizePersonalItem(_0x521b7c),'message':'Created\x20KB\x20entry\x20'+_0x521b7c['id']+'\x20('+_0x521b7c[_0x365adf(0xa6)]+')'};},async 'dryRun'(_0x22401e){const _0x551c2c=a35_0x4a91ac,_0x30e8cb=_0x22401e['str'](_0x551c2c(0xa6)),_0x95e064=readKnowledgeFile(_0x22401e[_0x551c2c(0xa7)](_0x551c2c(0xb5))),_0x3f060a=planPersonalKnowledgeWrite(_0x22401e[_0x551c2c(0xad)],{'title':_0x30e8cb,'content':_0x95e064});return dryRun(_0x551c2c(0xbe),_0x551c2c(0x9e)+_0x3f060a[_0x551c2c(0xd1)])[_0x551c2c(0xa9)]({'appCode':_0x22401e['appCode'],'title':_0x30e8cb,'content':_0x95e064})[_0x551c2c(0xa2)](_0x551c2c(0xb0)+_0x30e8cb+'\x22')[_0x551c2c(0xc7)]();}},kbUpdate={'service':'kb','command':a35_0x4a91ac(0xc8),'description':'Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','risk':a35_0x4a91ac(0xab),'confirmationDescription':a35_0x4a91ac(0xac),'flags':[{...ID_FLAG,'description':a35_0x4a91ac(0x9c)},{...TITLE_FLAG,'required':![],'description':a35_0x4a91ac(0xcb)},FILE_FLAG],async 'execute'(_0x31e9bb){const _0x16abac=a35_0x4a91ac,_0x4f93db=_0x31e9bb[_0x16abac(0xb6)]('id'),_0x5bfb73=readKnowledgeFile(_0x31e9bb[_0x16abac(0xa7)]('file')),_0xcfb47b=_0x31e9bb[_0x16abac(0xa7)](_0x16abac(0xa6))||(await getPersonalKnowledgeBaseItem(_0x4f93db,_0x31e9bb[_0x16abac(0xad)],_0x31e9bb[_0x16abac(0xc9)]))[_0x16abac(0xa6)],_0x441b8b=await updatePersonalKnowledgeBaseItem(_0x4f93db,_0x31e9bb[_0x16abac(0xad)],{'title':_0xcfb47b,'content':_0x5bfb73},_0x31e9bb[_0x16abac(0xc9)]);return{'ok':!![],'data':summarizePersonalItem(_0x441b8b),'message':_0x16abac(0xb2)+_0x441b8b['id']+'\x20('+_0x441b8b['title']+')'};},async 'dryRun'(_0x41e2e3){const _0x34bc37=a35_0x4a91ac,_0x51bde0=_0x41e2e3[_0x34bc37(0xb6)]('id'),_0x3aae7c=readKnowledgeFile(_0x41e2e3[_0x34bc37(0xa7)]('file')),_0x4bbf75=_0x41e2e3[_0x34bc37(0xa7)](_0x34bc37(0xa6))||(await getPersonalKnowledgeBaseItem(_0x51bde0,_0x41e2e3['appCode'],_0x41e2e3[_0x34bc37(0xc9)]))[_0x34bc37(0xa6)],_0x2f4d69=planPersonalKnowledgeWrite(_0x41e2e3['appCode'],{'title':_0x4bbf75,'content':_0x3aae7c},_0x51bde0);return dryRun(_0x34bc37(0xbe),_0x34bc37(0x9e)+_0x2f4d69[_0x34bc37(0xd1)])[_0x34bc37(0xa9)]({'appCode':_0x41e2e3[_0x34bc37(0xad)],'title':_0x4bbf75,'content':_0x3aae7c})[_0x34bc37(0xa2)](_0x34bc37(0x95)+_0x51bde0)[_0x34bc37(0xc7)]();}};function readSearchServiceUrl(_0x4b2b5a){const _0x20b645=a35_0x4a91ac;if(_0x4b2b5a['flag'](_0x20b645(0xa4))!==undefined)return normalizeKbServiceOrigin(_0x4b2b5a[_0x20b645(0xa7)](_0x20b645(0xa4)));const _0x4a6ef0=getKbServiceDomain();if(!_0x4a6ef0)throw CliErrors['validation']('KB\x20Service\x20is\x20not\x20configured\x20for\x20knowledge\x20search.','Configure\x20kbServiceDomain\x20in\x20the\x20connection\x20settings,\x20or\x20pass\x20`--kb-service-url\x20<https-origin>`\x20for\x20this\x20request.');return normalizeKbServiceOrigin(_0x4a6ef0);}const kbSearch={'service':'kb','command':a35_0x4a91ac(0x9b),'description':a35_0x4a91ac(0xd0),'risk':a35_0x4a91ac(0xc1),'flags':[QUERY_FLAG,TOPK_FLAG,{'name':a35_0x4a91ac(0xa4),'type':a35_0x4a91ac(0x98),'required':![],'description':a35_0x4a91ac(0x99)}],async 'validate'(_0x43b7a9){const _0x175351=a35_0x4a91ac;if(!_0x43b7a9[_0x175351(0xa7)]('query')[_0x175351(0xae)]())throw CliErrors['validation'](_0x175351(0xc2));readTopK(_0x43b7a9),readSearchServiceUrl(_0x43b7a9);},async 'execute'(_0xe3f32e){const _0x584ee4=a35_0x4a91ac,_0x29bdfd=_0xe3f32e[_0x584ee4(0xa7)]('query')[_0x584ee4(0xae)](),_0x1ad126=readTopK(_0xe3f32e),_0x3dfde8=readSearchServiceUrl(_0xe3f32e),_0x4e0764={'appCode':_0xe3f32e[_0x584ee4(0xad)],'accessKey':_0xe3f32e[_0x584ee4(0x9a)]??'','query':_0x29bdfd,..._0x1ad126!==undefined?{'topK':_0x1ad126}:{},'signal':_0xe3f32e[_0x584ee4(0xc9)]},_0x516cff=await searchDirectKnowledge({..._0x4e0764,'serviceUrl':_0x3dfde8});return{'ok':!![],'data':_0x516cff};}};function managementCommand(_0x236fa2){const _0x3491df=a35_0x4a91ac;return{..._0x236fa2,'execute':_0x5d72dd=>withKbManagementOrigin(()=>_0x236fa2['execute'](_0x5d72dd)),..._0x236fa2[_0x3491df(0xc5)]?{'dryRun':_0x5ea598=>withKbManagementOrigin(()=>_0x236fa2[_0x3491df(0xc5)](_0x5ea598))}:{}};}export const kbDefinitions=[...[kbList,kbDetail,kbCreate,kbUpdate][a35_0x4a91ac(0xa0)](managementCommand),kbSearch];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a36_0x43fee3=a36_0x3a79;function a36_0x3a79(_0x139bcd,_0x20af7b){_0x139bcd=_0x139bcd-0x191;const _0x466f3f=a36_0x466f();let _0x3a7997=_0x466f3f[_0x139bcd];return _0x3a7997;}(function(_0x252b5c,_0x3626ae){const _0x584d89=a36_0x3a79,_0x23e8e7=_0x252b5c();while(!![]){try{const _0xb479b9=-parseInt(_0x584d89(0x19d))/0x1*(-parseInt(_0x584d89(0x1af))/0x2)+parseInt(_0x584d89(0x1b2))/0x3*(parseInt(_0x584d89(0x1b3))/0x4)+-parseInt(_0x584d89(0x19c))/0x5*(-parseInt(_0x584d89(0x19f))/0x6)+-parseInt(_0x584d89(0x1b1))/0x7*(parseInt(_0x584d89(0x1a8))/0x8)+parseInt(_0x584d89(0x1b0))/0x9+-parseInt(_0x584d89(0x1a7))/0xa*(parseInt(_0x584d89(0x1aa))/0xb)+-parseInt(_0x584d89(0x19b))/0xc;if(_0xb479b9===_0x3626ae)break;else _0x23e8e7['push'](_0x23e8e7['shift']());}catch(_0x3f1370){_0x23e8e7['push'](_0x23e8e7['shift']());}}}(a36_0x466f,0xf25c7));import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function printLogs(_0x459d61){const _0x5bfc23=a36_0x3a79;if(_0x459d61[_0x5bfc23(0x1ae)]===0x0){console[_0x5bfc23(0x19a)]('*\x20No\x20logs\x20found');return;}console['log']('*\x20'+CLI_DISPLAY_NAME+_0x5bfc23(0x191)),_0x459d61[_0x5bfc23(0x194)]((_0x1892a7,_0x16ed55)=>{const _0x335dee=_0x5bfc23,_0xb5bc2=new Date(_0x1892a7['timestamp'])[_0x335dee(0x1a2)](_0x335dee(0x192)),_0x189515=_0x1892a7[_0x335dee(0x1a9)]===_0x335dee(0x198)?'√':_0x1892a7[_0x335dee(0x1a9)]===_0x335dee(0x1a3)?'×':_0x1892a7['level']===_0x335dee(0x195)?'!':'i';console['log'](_0x16ed55+0x1+'.\x20'+_0x189515+'\x20['+_0x1892a7[_0x335dee(0x1a1)]+']\x20'+_0x1892a7[_0x335dee(0x199)]),console[_0x335dee(0x19a)](_0x335dee(0x197)+_0xb5bc2),_0x1892a7[_0x335dee(0x19e)]&&console[_0x335dee(0x19a)](_0x335dee(0x1ab)+_0x1892a7['duration']+'ms'),_0x1892a7[_0x335dee(0x1ad)]&&Object[_0x335dee(0x1ac)](_0x1892a7['details'])['length']>0x0&&console[_0x335dee(0x19a)](_0x335dee(0x196)+JSON[_0x335dee(0x1a4)](_0x1892a7[_0x335dee(0x1ad)],null,0x2)),console[_0x335dee(0x19a)]('');});}function a36_0x466f(){const _0x51cf63=['message','log','5148660vvtLgF','160sskMTV','304553pOqBSW','duration','138054EDJlyB','logs','command','toLocaleString','error','stringify','read','show','250PSVfke','3427208nxWUMv','level','512655RxMQbp','\x20\x20\x20Duration:\x20','keys','details','length','2VRFWxb','3034701CQNTJW','7HHaBLR','545754RjoBUH','36lWEWfq','View\x20command\x20history\x20logs','\x20logs:\x0a','en-US','readLogs','forEach','warn','\x20\x20\x20Details:\x20','\x20\x20\x20Time:\x20','success'];a36_0x466f=function(){return _0x51cf63;};return a36_0x466f();}export const logsDefinitions=[{'service':a36_0x43fee3(0x1a0),'command':a36_0x43fee3(0x1a6),'description':a36_0x43fee3(0x1b4),'risk':a36_0x43fee3(0x1a5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x370bde){const _0x395750=a36_0x43fee3;return printLogs(logger[_0x395750(0x193)]()),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a37_0x19961d=a37_0xaefc;function a37_0x4af9(){const _0x1301d7=['map','3418HatcbY','952086qpoOgc','read','3815372IbtdJM','3614842pNdbII','26181tdohvt','string','2930nBKzko','config-list','2816qTOsPi','notification','21826BIxDPi','4576392NYBXyY','type','appCode','EMAIL','228uDrYrs','Notification\x20channel\x20type','5rJOhpO','length'];a37_0x4af9=function(){return _0x1301d7;};return a37_0x4af9();}(function(_0x33ee6c,_0x4cd5b5){const _0x27dab9=a37_0xaefc,_0x2c7d75=_0x33ee6c();while(!![]){try{const _0x4e820e=-parseInt(_0x27dab9(0x1db))/0x1+-parseInt(_0x27dab9(0x1da))/0x2*(parseInt(_0x27dab9(0x1d5))/0x3)+-parseInt(_0x27dab9(0x1dd))/0x4*(-parseInt(_0x27dab9(0x1d7))/0x5)+parseInt(_0x27dab9(0x1d1))/0x6+-parseInt(_0x27dab9(0x1d0))/0x7*(-parseInt(_0x27dab9(0x1ce))/0x8)+parseInt(_0x27dab9(0x1ca))/0x9*(-parseInt(_0x27dab9(0x1cc))/0xa)+-parseInt(_0x27dab9(0x1de))/0xb;if(_0x4e820e===_0x4cd5b5)break;else _0x2c7d75['push'](_0x2c7d75['shift']());}catch(_0x386452){_0x2c7d75['push'](_0x2c7d75['shift']());}}}(a37_0x4af9,0x8690e));function a37_0xaefc(_0x23390f,_0x41db2c){_0x23390f=_0x23390f-0x1ca;const _0x4af92e=a37_0x4af9();let _0xaefcb6=_0x4af92e[_0x23390f];return _0xaefcb6;}import{listNotificationChannelConfigs}from'../../core/api-client.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a37_0x19961d(0x1cf),'command':a37_0x19961d(0x1cd),'description':'List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','risk':a37_0x19961d(0x1dc),'flags':[{'name':a37_0x19961d(0x1d2),'type':a37_0x19961d(0x1cb),'description':a37_0x19961d(0x1d6),'enum':NOTIFICATION_CHANNEL_TYPES,'default':a37_0x19961d(0x1d4)}],async 'validate'(_0x297428){readNotificationChannelType(_0x297428);},async 'execute'(_0xe4e3d6){const _0x3108ea=a37_0x19961d,_0x3441db=readNotificationChannelType(_0xe4e3d6),_0x502e94=await listNotificationChannelConfigs(_0xe4e3d6[_0x3108ea(0x1d3)],_0x3441db),_0x2bbab4=_0x502e94[_0x3108ea(0x1d9)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0xe4e3d6[_0x3108ea(0x1d3)],'channelType':_0x3441db,'count':_0x2bbab4[_0x3108ea(0x1d8)],'configs':_0x2bbab4},'message':'Found\x20'+_0x2bbab4[_0x3108ea(0x1d8)]+'\x20'+_0x3441db+'\x20notification\x20config(s)'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2f9cb5,_0x53ccd6){const _0x570515=a38_0x4473,_0x757f5f=_0x2f9cb5();while(!![]){try{const _0x2508b1=-parseInt(_0x570515(0x1f8))/0x1*(-parseInt(_0x570515(0x1f6))/0x2)+parseInt(_0x570515(0x1f5))/0x3+-parseInt(_0x570515(0x1fb))/0x4+parseInt(_0x570515(0x1f3))/0x5*(-parseInt(_0x570515(0x1f4))/0x6)+parseInt(_0x570515(0x1f7))/0x7*(parseInt(_0x570515(0x1f9))/0x8)+-parseInt(_0x570515(0x1f2))/0x9+parseInt(_0x570515(0x1fc))/0xa*(parseInt(_0x570515(0x1fa))/0xb);if(_0x2508b1===_0x53ccd6)break;else _0x757f5f['push'](_0x757f5f['shift']());}catch(_0x1aeb4e){_0x757f5f['push'](_0x757f5f['shift']());}}}(a38_0x42d0,0xb169e));import{notificationConfigList}from'../../commands/notification/config-list.js';function a38_0x4473(_0xe41851,_0x5329fa){_0xe41851=_0xe41851-0x1f2;const _0x42d0be=a38_0x42d0();let _0x447312=_0x42d0be[_0xe41851];return _0x447312;}export const notificationDefinitions=[notificationConfigList];function a38_0x42d0(){const _0x23232a=['7XXFpZu','36167UFtzcY','2210056yNevRn','22azQdxf','2511712SeahFo','4584270yFHJer','11030778slxsOz','5phEQKy','373038dDXQkB','2286435TQGQNC','38IAozwf'];a38_0x42d0=function(){return _0x23232a;};return a38_0x42d0();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a39_0x10a725=a39_0x20ad;(function(_0x3160e7,_0x2ce14e){const _0x39f4f9=a39_0x20ad,_0x58ea66=_0x3160e7();while(!![]){try{const _0x12089e=-parseInt(_0x39f4f9(0x11c))/0x1*(parseInt(_0x39f4f9(0x10c))/0x2)+-parseInt(_0x39f4f9(0x119))/0x3+-parseInt(_0x39f4f9(0x121))/0x4*(-parseInt(_0x39f4f9(0x112))/0x5)+parseInt(_0x39f4f9(0x10b))/0x6*(-parseInt(_0x39f4f9(0x124))/0x7)+parseInt(_0x39f4f9(0x115))/0x8+parseInt(_0x39f4f9(0x113))/0x9*(parseInt(_0x39f4f9(0x11b))/0xa)+-parseInt(_0x39f4f9(0x114))/0xb*(-parseInt(_0x39f4f9(0x120))/0xc);if(_0x12089e===_0x2ce14e)break;else _0x58ea66['push'](_0x58ea66['shift']());}catch(_0x4f4827){_0x58ea66['push'](_0x58ea66['shift']());}}}(a39_0x3129,0xa416d));function a39_0x3129(){const _0x4b1571=['object','configName','\x20must\x20be\x20an\x20object.','10NnBEoL','114138VpHsKf','11SkFrvL','9240200gKIwhq','WECOM','type','EMAIL','1831437ocPPrI','\x20is\x20missing\x20required\x20field\x20\x22','530EioRaI','4hUYLUL','isArray','Allowed\x20values:\x20','trim','4431972AJObjG','833364sTqgRz','configCode','includes','14lTzkly','Invalid\x20--type:\x20','Invalid\x20notification\x20config\x20response.','apiError','validation','join','str','2228196RXmDtU','293932jLbBXO','string','Item\x20'];a39_0x3129=function(){return _0x4b1571;};return a39_0x3129();}import{CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=[a39_0x10a725(0x118),'FEISHU','DINGTALK',a39_0x10a725(0x116),'WEBHOOK'];export function readNotificationChannelType(_0x78ca12){const _0x46d651=a39_0x10a725,_0x5cf78e=_0x78ca12[_0x46d651(0x10a)](_0x46d651(0x117))[_0x46d651(0x11f)]()||_0x46d651(0x118);if(!NOTIFICATION_CHANNEL_TYPES[_0x46d651(0x123)](_0x5cf78e))throw CliErrors[_0x46d651(0x108)](_0x46d651(0x125)+_0x5cf78e,_0x46d651(0x11e)+NOTIFICATION_CHANNEL_TYPES[_0x46d651(0x109)](',\x20')+'.');return _0x5cf78e;}export function projectNotificationListConfig(_0x4f6f2b,_0x596362){const _0x3e7f92=a39_0x10a725,_0x47ff3d=requireResponseObject(_0x4f6f2b,_0x596362);return{'configCode':requireResponseString(_0x47ff3d[_0x3e7f92(0x122)],_0x3e7f92(0x122),_0x596362),'configName':requireResponseString(_0x47ff3d[_0x3e7f92(0x110)],_0x3e7f92(0x110),_0x596362),'channelType':requireResponseString(_0x47ff3d['channelType'],'channelType',_0x596362),'description':normalizeNullableString(_0x47ff3d['description'])};}function requireResponseObject(_0x22140a,_0x8d44eb){const _0x3729f7=a39_0x10a725;if(typeof _0x22140a!==_0x3729f7(0x10f)||_0x22140a===null||Array[_0x3729f7(0x11d)](_0x22140a))throw CliErrors[_0x3729f7(0x107)]('Invalid\x20notification\x20config\x20response.',_0x3729f7(0x10e)+(_0x8d44eb+0x1)+_0x3729f7(0x111));return _0x22140a;}function requireResponseString(_0x3733f9,_0x5ae509,_0x24d077){const _0x5bf67d=a39_0x10a725;if(typeof _0x3733f9!==_0x5bf67d(0x10d)||!_0x3733f9[_0x5bf67d(0x11f)]())throw CliErrors[_0x5bf67d(0x107)](_0x5bf67d(0x106),_0x5bf67d(0x10e)+(_0x24d077+0x1)+_0x5bf67d(0x11a)+_0x5ae509+'\x22.');return _0x3733f9[_0x5bf67d(0x11f)]();}function a39_0x20ad(_0x19eff6,_0x2e6b56){_0x19eff6=_0x19eff6-0x106;const _0x312971=a39_0x3129();let _0x20ad7f=_0x312971[_0x19eff6];return _0x20ad7f;}function normalizeNullableString(_0x5e92e1){const _0x4dde34=a39_0x10a725;return typeof _0x5e92e1===_0x4dde34(0x10d)&&_0x5e92e1['trim']()?_0x5e92e1[_0x4dde34(0x11f)]():null;}
|