@lovrabet/lovrabet-cli 2.3.5 → 2.3.6-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +10 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/access-error.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/raw-flags.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-import/auto-id-runner.d.ts +3 -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.d.ts +3 -0
- package/lib/services/dataset-import/image-bytes.js +1 -0
- package/lib/services/dataset-import/image-ooxml.d.ts +10 -0
- package/lib/services/dataset-import/image-ooxml.js +1 -0
- package/lib/services/dataset-import/image-runner.d.ts +48 -0
- package/lib/services/dataset-import/image-runner.js +1 -0
- package/lib/services/dataset-import/metadata.js +1 -1
- package/lib/services/dataset-import/preview.js +1 -1
- package/lib/services/dataset-import/runner.d.ts +10 -1
- package/lib/services/dataset-import/runner.js +1 -1
- package/lib/services/dataset-import/types.d.ts +28 -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 +4 -1
- package/skills/lovrabet/SKILL.md +3 -1
- package/skills/lovrabet/references/lovrabet-excel-import.md +19 -0
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
function a27_0x1feb(){const _0x4a930a=['now','code','\x20\x20\x20\x20METADATA\x20datasets\x20do\x20not\x20support\x20aggregate\x20or\x20Custom\x20SQL','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20id\x20may\x20be\x20a\x20single\x20value\x20or\x20array.\x20','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','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\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','\x20\x20\x20\x20JOIN\x20and\x20cross-table\x20aggregation\x20require\x20an\x20existing\x20trusted\x20Custom\x20SQL','description','\x20\x20\x20\x20METADATA:\x20use\x20lovrabet\x20data\x20import-excel\x20with\x20checkpoint\x20recovery.','read','high-risk-write','\x20\x20\x20\x20This\x20command\x20sends\x20one\x20prepared\x20batch;\x20it\x20does\x20not\x20read\x20XLSX\x20or\x20split\x20batches.','\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}','data\x20','\x20on\x20dataset\x20','\x20\x20AGGREGATE\x20ALIAS\x20BOUNDARY','\x20\x20WHERE\x20OPERATORS','delete','operation','paramsHint','\x20\x20\x20\x20$endWith\x20\x20\x20\x20\x20Ends\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22email\x22:{\x22$endWith\x22:\x22@example.com\x22}}','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','POST','\x20\x20\x20\x20and\x20increment\x20only\x20currentPage.\x20Use\x20a\x20stable\x20unique\x20orderBy\x20field\x20to\x20avoid\x20duplicates\x20or\x20gaps.','write','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$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}}','aggregate','Delete\x20data\x20records\x20(non-interactive\x20mode\x20requires\x20--yes)','getOne','1317428Vmtmmt','Deletes\x20business\x20records\x20from\x20the\x20current\x20app\x20dataset.\x20This\x20may\x20not\x20be\x20recoverable.','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','7559388SHpjIr','\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}}','Create\x20multiple\x20records\x20in\x20the\x20dataset\x20in\x20one\x20request','12HwNyhC','\x20\x20\x20\x20Page\x201:\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','\x20\x20\x20\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}','update','paramsRequired','\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','754930EsetgN','\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}]','str','join','\x20\x20EXAMPLES','\x20\x20\x20\x20$or\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Any\x20condition\x20matches\x20\x20{\x22$or\x22:[{\x22status\x22:{\x22$eq\x22:\x22active\x22}},{\x22status\x22:{\x22$eq\x22:\x22pending\x22}}]}','\x20\x20\x20\x20Page\x20numbers\x20start\x20at\x201.\x20To\x20fetch\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged','\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\x20orderBy\x20may\x20reference\x20aggregate\x20output\x20aliases','\x20\x20\x20\x20then\x20convert\x20rows\x20to\x20JSON\x20and\x20split\x20within\x20the\x20target\x20API\x20row/byte\x20and\x20local\x20argument\x20limits.','Example:\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x20\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','\x20\x20\x20\x20$gt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$gt\x22:100}}','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','\x20\x20\x20\x20Built-in\x20Skill\x20guide:\x20references/lovrabet-db-table-excel-import.md','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','command','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','\x20\x20\x20\x20Verify\x20the\x20response\x20paging.currentPage/pageSize\x20and\x20that\x20tableData\x20satisfies\x20where\x20before\x20drawing\x20conclusions.','\x20\x20PAGINATION','\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}','Get\x20a\x20single\x20record\x20by\x20ID','\x20\x20\x20\x20Non-Excel\x20batchCreate\x20remains\x20available\x20for\x20METADATA\x20and\x20DB_TABLE.','dryRun','\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}','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','batchCreate','length','\x20\x20\x20\x20aggregate\x20supports\x20a\x20single\x20DB_TABLE\x20dataset\x20only','\x20completed\x20in\x20','Create\x20one\x20record\x20in\x20the\x20dataset','\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\x20PARAMS\x20STRUCTURE','filter','body','helpExtra','3568664hwHRvo','risk','batch','3776510atpQXG','1869710oXLXmc','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','\x20\x20\x20\x20DB_TABLE:\x20inspect\x20dataset\x20detail,\x20validate\x20the\x20full\x20file\x20and\x20confirmed\x20unique\x20business\x20keys,','\x20\x20\x20\x20--dry-run\x20previews\x20the\x20request\x20only;\x20it\x20does\x20not\x20validate\x20server\x20constraints\x20or\x20write\x20permissions.','Preview:\x20data\x20','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return\x20alongside\x20aggregates,\x20e.g.\x20[\x22status\x22,\x22region\x22]','1711530XOvHPA','Writes\x20one\x20new\x20business\x20record\x20to\x20the\x20current\x20app\x20dataset.\x20It\x20is\x20saved\x20immediately\x20after\x20confirmation.','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20distinct\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22,\x22distinct\x22:true}','\x20\x20AGGREGATE\x20TYPES','\x20\x20\x20\x20No\x20import\x20checkpoint,\x20--resume,\x20automatic\x20upsert,\x20or\x20atomic\x20rollback\x20guarantee.','\x20\x20\x20\x20having\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Post-aggregation\x20filters\x20using\x20real\x20dataset\x20fields,\x20e.g.\x20{\x22category_id\x22:{\x22$notNull\x22:true}}','\x20\x20\x20\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\x20LOGICAL\x20COMBINATORS','Writes\x20multiple\x20new\x20business\x20records\x20to\x20the\x20current\x20app\x20dataset.\x20They\x20are\x20saved\x20immediately\x20after\x20confirmation.','\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}}','params','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','data','\x20\x20\x20\x20Do\x20NOT\x20use\x20--where,\x20--select,\x20--order-by,\x20--current-page,\x20--page,\x20or\x20--page-size\x20as\x20CLI\x20flags.','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','\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]','8INlaqN','map'];a27_0x1feb=function(){return _0x4a930a;};return a27_0x1feb();}const a27_0x1a2f74=a27_0x587c;(function(_0x1ce8cf,_0x5c1309){const _0x56be66=a27_0x587c,_0x322667=_0x1ce8cf();while(!![]){try{const _0x25ca37=-parseInt(_0x56be66(0xe8))/0x1+-parseInt(_0x56be66(0x10f))/0x2+-parseInt(_0x56be66(0x116))/0x3+parseInt(_0x56be66(0x10b))/0x4+-parseInt(_0x56be66(0x10e))/0x5*(-parseInt(_0x56be66(0x14d))/0x6)+-parseInt(_0x56be66(0x147))/0x7+-parseInt(_0x56be66(0x126))/0x8*(-parseInt(_0x56be66(0x14a))/0x9);if(_0x25ca37===_0x5c1309)break;else _0x322667['push'](_0x322667['shift']());}catch(_0x3fceff){_0x322667['push'](_0x322667['shift']());}}}(a27_0x1feb,0xc1e5b));import{dataImportExcel}from'./import-excel.js';function a27_0x587c(_0x4663af,_0x2a876c){_0x4663af=_0x4663af-0xe6;const _0x1feb97=a27_0x1feb();let _0x587c97=_0x1feb97[_0x4663af];return _0x587c97;}import{executeData}from'../../core/sdk-client.js';import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{requireAnyOf}from'../../commands/common/constraints.js';import{parseJsonParams,parseJsonParamsValue,parseBatchCreateItemsFromParams,parseUpdateIdsFromParams,normalizeUpdateParamsForRuntime}from'../../utils/params.js';import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':a27_0x1a2f74(0x108),'operation':'filter','risk':a27_0x1a2f74(0x132),'paramsRequired':![],'description':'Filter\x20dataset\x20records\x20with\x20query\x20conditions','paramsHint':a27_0x1a2f74(0x12c)+a27_0x1a2f74(0xf8),'helpExtra':[a27_0x1a2f74(0x139),a27_0x1a2f74(0x11f),'\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_0x1a2f74(0xf3),a27_0x1a2f74(0xef),a27_0x1a2f74(0x143),'\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_0x1a2f74(0x106),a27_0x1a2f74(0x14b),'\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_0x1a2f74(0x13d),'',a27_0x1a2f74(0x11d),'\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}}]}',a27_0x1a2f74(0xed),'',a27_0x1a2f74(0x110),'\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)',a27_0x1a2f74(0x125),'\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]',a27_0x1a2f74(0x12e),a27_0x1a2f74(0xf4),'',a27_0x1a2f74(0xfa),'\x20\x20\x20\x20Filtering\x20and\x20pagination\x20are\x20controlled\x20only\x20via\x20one\x20JSON\x20object\x20in\x20--params.',a27_0x1a2f74(0x123),a27_0x1a2f74(0xee),a27_0x1a2f74(0x140),a27_0x1a2f74(0x14e),'\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_0x1a2f74(0xf9)]['join']('\x0a')},{'command':'getOne','operation':a27_0x1a2f74(0x146),'risk':a27_0x1a2f74(0x132),'paramsRequired':!![],'description':a27_0x1a2f74(0xfc),'paramsHint':a27_0x1a2f74(0x100)},{'command':'create','operation':'create','risk':a27_0x1a2f74(0x141),'paramsRequired':!![],'description':a27_0x1a2f74(0x105),'confirmationDescription':a27_0x1a2f74(0x117),'paramsHint':'JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27'},{'command':a27_0x1a2f74(0x101),'operation':a27_0x1a2f74(0x101),'risk':a27_0x1a2f74(0x141),'paramsRequired':!![],'description':a27_0x1a2f74(0x14c),'helpExtra':['\x20\x20EXCEL\x20ROUTES',a27_0x1a2f74(0x131),a27_0x1a2f74(0x112),a27_0x1a2f74(0xf1),a27_0x1a2f74(0x134),a27_0x1a2f74(0x113),'\x20\x20\x20\x20Record\x20each\x20batch\x20and\x20verify\x20its\x20IDs\x20or\x20unique\x20business\x20keys\x20before\x20continuing.','\x20\x20\x20\x20Stop\x20on\x20unknown\x20outcomes\x20or\x20conflicts;\x20reconcile\x20before\x20retrying,\x20never\x20blindly\x20resend\x20a\x20batch.',a27_0x1a2f74(0x11a),a27_0x1a2f74(0xf5),a27_0x1a2f74(0xfd)][a27_0x1a2f74(0xeb)]('\x0a'),'confirmationDescription':a27_0x1a2f74(0x11e),'paramsHint':a27_0x1a2f74(0x142)},{'command':a27_0x1a2f74(0x150),'operation':'update','risk':a27_0x1a2f74(0x141),'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_0x1a2f74(0x12b)+a27_0x1a2f74(0x12d)},{'command':a27_0x1a2f74(0x13a),'operation':'delete','risk':a27_0x1a2f74(0x133),'paramsRequired':!![],'description':a27_0x1a2f74(0x145),'confirmationDescription':a27_0x1a2f74(0x148),'paramsHint':a27_0x1a2f74(0x100)},{'command':a27_0x1a2f74(0x144),'operation':'aggregate','risk':a27_0x1a2f74(0x132),'paramsRequired':![],'description':a27_0x1a2f74(0x111),'paramsHint':a27_0x1a2f74(0x149)+a27_0x1a2f74(0xf2),'helpExtra':[a27_0x1a2f74(0x119),a27_0x1a2f74(0xff),a27_0x1a2f74(0xfb),a27_0x1a2f74(0x118),a27_0x1a2f74(0x14f),'\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_0x1a2f74(0x11c),a27_0x1a2f74(0x135),'',a27_0x1a2f74(0x107),a27_0x1a2f74(0x115),a27_0x1a2f74(0x121),a27_0x1a2f74(0xf6),a27_0x1a2f74(0xe7),a27_0x1a2f74(0x11b),a27_0x1a2f74(0xe9),'',a27_0x1a2f74(0x138),'\x20\x20\x20\x20aggregate[].alias\x20defines\x20the\x20output\x20field\x20name\x20only','\x20\x20\x20\x20select/where/having/groupBy\x20must\x20use\x20real\x20dataset\x20fields',a27_0x1a2f74(0xf0),'','\x20\x20DATASET\x20BOUNDARY',a27_0x1a2f74(0x103),a27_0x1a2f74(0x12a),a27_0x1a2f74(0x12f),'\x20\x20\x20\x20choose\x20the\x20capability\x20before\x20execution;\x20never\x20fall\x20back\x20at\x20runtime','',a27_0x1a2f74(0xec),a27_0x1a2f74(0x124),'\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_0x1a2f74(0x13e),'\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\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.']['join']('\x0a')}];function makeDataCommand(_0x2927a5){const _0x3c6e20=a27_0x1a2f74,_0x1bab85='data\x20'+_0x2927a5['command'],_0x4671bb={'service':_0x3c6e20(0x122),'command':_0x2927a5[_0x3c6e20(0xf7)],'description':_0x2927a5['description'],'risk':_0x2927a5[_0x3c6e20(0x10c)],..._0x2927a5['confirmationDescription']?{'confirmationDescription':_0x2927a5['confirmationDescription']}:{},'helpExtra':_0x2927a5[_0x3c6e20(0x10a)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x2927a5[_0x3c6e20(0x13c)]}],'validate':async _0x66ee84=>{const _0x44cae3=_0x3c6e20;_0x2927a5[_0x44cae3(0xe6)]&&requireAnyOf(_0x66ee84,[_0x44cae3(0x120)],_0x1bab85),_0x2927a5[_0x44cae3(0x13b)]==='batchCreate'&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x66ee84[_0x44cae3(0xea)](_0x44cae3(0x120)))),_0x2927a5[_0x44cae3(0x13b)]===_0x44cae3(0x150)&&parseUpdateIdsFromParams(parseJsonParams(_0x66ee84[_0x44cae3(0xea)](_0x44cae3(0x120)))??{});},async 'execute'(_0x4efb11){const _0x14d78e=_0x3c6e20,_0x4492e4=_0x4efb11[_0x14d78e(0xea)](_0x14d78e(0x129)),_0x3e1ed6=_0x2927a5[_0x14d78e(0x13b)]===_0x14d78e(0x101)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x4efb11[_0x14d78e(0xea)]('params'))):parseJsonParams(_0x4efb11[_0x14d78e(0xea)](_0x14d78e(0x120)))??{},_0x2a5bb5=_0x2927a5[_0x14d78e(0x13b)]===_0x14d78e(0x150)?parseUpdateIdsFromParams(_0x3e1ed6):undefined,_0x5995b6=_0x2a5bb5?normalizeUpdateParamsForRuntime(_0x3e1ed6,_0x2a5bb5):_0x3e1ed6,_0x36f5be=Date[_0x14d78e(0x128)](),_0x43eb73=await executeData(_0x4492e4,_0x2927a5['operation'],_0x5995b6),_0x421f11=Date[_0x14d78e(0x128)]()-_0x36f5be,_0x1efdf8=_0x2a5bb5&&_0x2a5bb5[_0x14d78e(0x102)]>0x1?buildBatchUpdateResult(_0x2a5bb5,_0x43eb73):_0x43eb73;return{'ok':!![],'data':{'result':_0x1efdf8,'elapsed':_0x421f11},'message':_0x14d78e(0x136)+_0x2927a5[_0x14d78e(0xf7)]+_0x14d78e(0x104)+_0x421f11+'ms'};}};return _0x2927a5[_0x3c6e20(0x10c)]!==_0x3c6e20(0x132)&&(_0x4671bb[_0x3c6e20(0xfe)]=async _0x152e7e=>{const _0x341bbe=_0x3c6e20,_0x16a286=_0x152e7e[_0x341bbe(0xea)](_0x341bbe(0x129)),_0x52932d=_0x2927a5[_0x341bbe(0x13b)]===_0x341bbe(0x101)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x152e7e[_0x341bbe(0xea)]('params'))):parseJsonParams(_0x152e7e[_0x341bbe(0xea)](_0x341bbe(0x120)))??{};let _0x46fb24=_0x52932d;if(_0x2927a5[_0x341bbe(0x13b)]==='update'){const _0x21d9fb=parseUpdateIdsFromParams(_0x52932d);_0x46fb24=normalizeUpdateParamsForRuntime(_0x52932d,_0x21d9fb);}return dryRun(_0x341bbe(0x13f),'/api/{appCode}/'+_0x16a286+'/'+_0x2927a5[_0x341bbe(0x13b)])[_0x341bbe(0x109)](_0x46fb24)[_0x341bbe(0x130)](_0x341bbe(0x114)+_0x2927a5[_0x341bbe(0xf7)]+_0x341bbe(0x137)+_0x16a286)['build']();}),_0x4671bb;}export const dataDefinitions=[...specs[a27_0x1a2f74(0x127)](makeDataCommand),dataImportExcel];function buildBatchUpdateResult(_0x5f03ba,_0x29a10e){const _0x5dbc66=a27_0x1a2f74;return{'operation':_0x5dbc66(0x150),'mode':_0x5dbc66(0x10d),'ids':_0x5f03ba,'total':_0x5f03ba[_0x5dbc66(0x102)],'result':_0x29a10e};}
|
|
1
|
+
const a27_0x32346a=a27_0x24e4;(function(_0x1649ea,_0x5181b7){const _0x2580ae=a27_0x24e4,_0x21f1a7=_0x1649ea();while(!![]){try{const _0x5c2e2c=parseInt(_0x2580ae(0x1b9))/0x1*(parseInt(_0x2580ae(0x1bb))/0x2)+-parseInt(_0x2580ae(0x1bf))/0x3+parseInt(_0x2580ae(0x1f9))/0x4*(parseInt(_0x2580ae(0x1e9))/0x5)+-parseInt(_0x2580ae(0x1aa))/0x6*(parseInt(_0x2580ae(0x1da))/0x7)+parseInt(_0x2580ae(0x1c5))/0x8*(parseInt(_0x2580ae(0x1d6))/0x9)+parseInt(_0x2580ae(0x1f1))/0xa*(parseInt(_0x2580ae(0x1df))/0xb)+-parseInt(_0x2580ae(0x1db))/0xc;if(_0x5c2e2c===_0x5181b7)break;else _0x21f1a7['push'](_0x21f1a7['shift']());}catch(_0x56b4c3){_0x21f1a7['push'](_0x21f1a7['shift']());}}}(a27_0x4ac0,0xdda19));function a27_0x24e4(_0x568309,_0x50dda5){_0x568309=_0x568309-0x18f;const _0x4ac042=a27_0x4ac0();let _0x24e4a6=_0x4ac042[_0x568309];return _0x24e4a6;}function a27_0x4ac0(){const _0x15880d=['\x20\x20\x20\x20Verify\x20the\x20response\x20paging.currentPage/pageSize\x20and\x20that\x20tableData\x20satisfies\x20where\x20before\x20drawing\x20conclusions.','confirmationDescription','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','\x20\x20\x20\x20Filtering\x20and\x20pagination\x20are\x20controlled\x20only\x20via\x20one\x20JSON\x20object\x20in\x20--params.','\x20\x20\x20\x20aggregate\x20supports\x20a\x20single\x20DB_TABLE\x20dataset\x20only','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','16YDIRCs','\x20\x20EXCEL\x20ROUTES','Create\x20one\x20record\x20in\x20the\x20dataset','dryRun','filter','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','\x20\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','\x20\x20\x20\x20DB_TABLE:\x20inspect\x20dataset\x20detail,\x20validate\x20the\x20full\x20file\x20and\x20confirmed\x20unique\x20business\x20keys,','read','\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}}','update','\x20\x20DATASET\x20BOUNDARY','\x20\x20\x20\x20choose\x20the\x20capability\x20before\x20execution;\x20never\x20fall\x20back\x20at\x20runtime','\x20\x20\x20\x20SUM\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Sum\x20of\x20column\x20values\x20\x20\x20\x20\x20{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}','\x20\x20\x20\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}','command','/api/{appCode}/','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','\x20\x20\x20\x20and\x20increment\x20only\x20currentPage.\x20Use\x20a\x20stable\x20unique\x20orderBy\x20field\x20to\x20avoid\x20duplicates\x20or\x20gaps.','now','\x20\x20\x20\x20Built-in\x20Skill\x20guide:\x20references/lovrabet-db-table-excel-import.md','build','body','\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}','Writes\x20multiple\x20new\x20business\x20records\x20to\x20the\x20current\x20app\x20dataset.\x20They\x20are\x20saved\x20immediately\x20after\x20confirmation.','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','\x20\x20\x20\x20$startWith\x20\x20\x20Starts\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$startWith\x22:\x22Mr.\x22}}','\x20\x20\x20\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}','258iCpLkH','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','\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\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','Preview:\x20data\x20','data','\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$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}}','Examples:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27,\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22completed\x22}\x27','create','batchCreate','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20id\x20may\x20be\x20a\x20single\x20value\x20or\x20array.\x20','join','high-risk-write','operation','4264VAmGnt','helpExtra','146HWGPPr','\x20\x20\x20\x20then\x20convert\x20rows\x20to\x20JSON\x20and\x20split\x20within\x20the\x20target\x20API\x20row/byte\x20and\x20local\x20argument\x20limits.','\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','write','1876467xjxkhG','description','str','\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]}}','paramsHint','\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}]','2934312bMwlLC','\x20\x20\x20\x20Page\x20numbers\x20start\x20at\x201.\x20To\x20fetch\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged','\x20\x20\x20\x20MIN\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Minimum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MIN\x22,\x22alias\x22:\x22min_price\x22}','\x20\x20\x20\x20orderBy\x20may\x20reference\x20aggregate\x20output\x20aliases','code','Changes\x20an\x20existing\x20business\x20record\x20in\x20the\x20current\x20app\x20dataset.\x20The\x20new\x20values\x20are\x20saved\x20immediately\x20after\x20confirmation.','params','\x20\x20\x20\x20No\x20import\x20checkpoint,\x20--resume,\x20automatic\x20upsert,\x20or\x20atomic\x20rollback\x20guarantee.','\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\x20select/where/having/groupBy\x20must\x20use\x20real\x20dataset\x20fields','\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\x20having\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Post-aggregation\x20filters\x20using\x20real\x20dataset\x20fields,\x20e.g.\x20{\x22category_id\x22:{\x22$notNull\x22:true}}','\x20\x20\x20\x20aggregate[].alias\x20defines\x20the\x20output\x20field\x20name\x20only','\x20\x20\x20\x20$contain\x20\x20\x20\x20\x20Substring\x20match\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$contain\x22:\x22test\x22}}','\x20\x20\x20\x20--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','Get\x20a\x20single\x20record\x20by\x20ID','\x20\x20PAGINATION','36PKeSDD','Writes\x20one\x20new\x20business\x20record\x20to\x20the\x20current\x20app\x20dataset.\x20It\x20is\x20saved\x20immediately\x20after\x20confirmation.','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','Update\x20an\x20existing\x20data\x20record','3738fgnFUJ','23508864lTsgIx','\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\x20--dry-run\x20previews\x20the\x20request\x20only;\x20it\x20does\x20not\x20validate\x20server\x20constraints\x20or\x20write\x20permissions.','batch','462022FkpyNM','\x20\x20WHERE\x20OPERATORS','getOne','\x20\x20EXAMPLES','\x20on\x20dataset\x20','data\x20','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','\x20\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\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}','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','281030ZTIQWE','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','\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}','aggregate','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\x20$endWith\x20\x20\x20\x20\x20Ends\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22email\x22:{\x22$endWith\x22:\x22@example.com\x22}}','\x20\x20\x20\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}}]}','360HHaBEo'];a27_0x4ac0=function(){return _0x15880d;};return a27_0x4ac0();}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':a27_0x32346a(0x190),'operation':a27_0x32346a(0x190),'risk':'read','paramsRequired':![],'description':'Filter\x20dataset\x20records\x20with\x20query\x20conditions','paramsHint':a27_0x32346a(0x1e8)+a27_0x32346a(0x1ab),'helpExtra':[a27_0x32346a(0x1e0),a27_0x32346a(0x1cd),a27_0x32346a(0x1cf),a27_0x32346a(0x1b1),a27_0x32346a(0x1ac),a27_0x32346a(0x1b0),a27_0x32346a(0x196),a27_0x32346a(0x1c2),a27_0x32346a(0x1d2),a27_0x32346a(0x1a8),a27_0x32346a(0x1ef),'','\x20\x20LOGICAL\x20COMBINATORS',a27_0x32346a(0x1f0),'\x20\x20\x20\x20$or\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Any\x20condition\x20matches\x20\x20{\x22$or\x22:[{\x22status\x22:{\x22$eq\x22:\x22active\x22}},{\x22status\x22:{\x22$eq\x22:\x22pending\x22}}]}','',a27_0x32346a(0x1a7),a27_0x32346a(0x1f4),a27_0x32346a(0x193),a27_0x32346a(0x1dc),a27_0x32346a(0x1d8),'\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','',a27_0x32346a(0x1d5),a27_0x32346a(0x1f6),'\x20\x20\x20\x20Do\x20NOT\x20use\x20--where,\x20--select,\x20--order-by,\x20--current-page,\x20--page,\x20or\x20--page-size\x20as\x20CLI\x20flags.',a27_0x32346a(0x1c6),a27_0x32346a(0x19f),'\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_0x32346a(0x1bd),a27_0x32346a(0x1f2)][a27_0x32346a(0x1b6)]('\x0a')},{'command':a27_0x32346a(0x1e1),'operation':a27_0x32346a(0x1e1),'risk':'read','paramsRequired':!![],'description':a27_0x32346a(0x1d4),'paramsHint':a27_0x32346a(0x1f8)},{'command':a27_0x32346a(0x1b3),'operation':'create','risk':a27_0x32346a(0x1be),'paramsRequired':!![],'description':a27_0x32346a(0x1fb),'confirmationDescription':a27_0x32346a(0x1d7),'paramsHint':a27_0x32346a(0x19e)},{'command':a27_0x32346a(0x1b4),'operation':'batchCreate','risk':a27_0x32346a(0x1be),'paramsRequired':!![],'description':'Create\x20multiple\x20records\x20in\x20the\x20dataset\x20in\x20one\x20request','helpExtra':[a27_0x32346a(0x1fa),'\x20\x20\x20\x20METADATA:\x20use\x20lovrabet\x20data\x20import-excel\x20with\x20checkpoint\x20recovery.',a27_0x32346a(0x194),a27_0x32346a(0x1bc),'\x20\x20\x20\x20This\x20command\x20sends\x20one\x20prepared\x20batch;\x20it\x20does\x20not\x20read\x20XLSX\x20or\x20split\x20batches.',a27_0x32346a(0x1dd),'\x20\x20\x20\x20Record\x20each\x20batch\x20and\x20verify\x20its\x20IDs\x20or\x20unique\x20business\x20keys\x20before\x20continuing.','\x20\x20\x20\x20Stop\x20on\x20unknown\x20outcomes\x20or\x20conflicts;\x20reconcile\x20before\x20retrying,\x20never\x20blindly\x20resend\x20a\x20batch.',a27_0x32346a(0x1cc),a27_0x32346a(0x1a1),'\x20\x20\x20\x20Non-Excel\x20batchCreate\x20remains\x20available\x20for\x20METADATA\x20and\x20DB_TABLE.'][a27_0x32346a(0x1b6)]('\x0a'),'confirmationDescription':a27_0x32346a(0x1a5),'paramsHint':a27_0x32346a(0x1f5)},{'command':'update','operation':a27_0x32346a(0x197),'risk':a27_0x32346a(0x1be),'paramsRequired':!![],'description':a27_0x32346a(0x1d9),'confirmationDescription':a27_0x32346a(0x1ca),'paramsHint':a27_0x32346a(0x1b5)+a27_0x32346a(0x1b2)},{'command':'delete','operation':'delete','risk':a27_0x32346a(0x1b7),'paramsRequired':!![],'description':a27_0x32346a(0x1ee),'confirmationDescription':'Deletes\x20business\x20records\x20from\x20the\x20current\x20app\x20dataset.\x20This\x20may\x20not\x20be\x20recoverable.','paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':a27_0x32346a(0x1ec),'operation':a27_0x32346a(0x1ec),'risk':'read','paramsRequired':![],'description':a27_0x32346a(0x1a6),'paramsHint':'JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20'+a27_0x32346a(0x1ed),'helpExtra':['\x20\x20AGGREGATE\x20TYPES',a27_0x32346a(0x19a),a27_0x32346a(0x1a9),a27_0x32346a(0x19b),a27_0x32346a(0x1eb),a27_0x32346a(0x1a4),a27_0x32346a(0x1e7),a27_0x32346a(0x1c7),'','\x20\x20PARAMS\x20STRUCTURE','\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]',a27_0x32346a(0x1ea),a27_0x32346a(0x1e5),a27_0x32346a(0x1e6),a27_0x32346a(0x1d0),a27_0x32346a(0x1c4),'','\x20\x20AGGREGATE\x20ALIAS\x20BOUNDARY',a27_0x32346a(0x1d1),a27_0x32346a(0x1ce),a27_0x32346a(0x1c8),'',a27_0x32346a(0x198),a27_0x32346a(0x1f7),'\x20\x20\x20\x20METADATA\x20datasets\x20do\x20not\x20support\x20aggregate\x20or\x20Custom\x20SQL','\x20\x20\x20\x20JOIN\x20and\x20cross-table\x20aggregation\x20require\x20an\x20existing\x20trusted\x20Custom\x20SQL',a27_0x32346a(0x199),'',a27_0x32346a(0x1e2),'\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status',a27_0x32346a(0x191),'',a27_0x32346a(0x1ad),a27_0x32346a(0x1d3),'',a27_0x32346a(0x192)][a27_0x32346a(0x1b6)]('\x0a')}];function makeDataCommand(_0x351a4f){const _0x2e3275=a27_0x32346a,_0x4f83ad=_0x2e3275(0x1e4)+_0x351a4f['command'],_0x21e136={'service':_0x2e3275(0x1af),'command':_0x351a4f['command'],'description':_0x351a4f['description'],'risk':_0x351a4f['risk'],..._0x351a4f['confirmationDescription']?{'confirmationDescription':_0x351a4f[_0x2e3275(0x1f3)]}:{},'helpExtra':_0x351a4f[_0x2e3275(0x1ba)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x351a4f[_0x2e3275(0x1c3)]}],'validate':async _0x208a89=>{const _0x29b108=_0x2e3275;_0x351a4f['paramsRequired']&&requireAnyOf(_0x208a89,[_0x29b108(0x1cb)],_0x4f83ad),_0x351a4f[_0x29b108(0x1b8)]===_0x29b108(0x1b4)&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x208a89[_0x29b108(0x1c1)]('params'))),_0x351a4f[_0x29b108(0x1b8)]===_0x29b108(0x197)&&parseUpdateIdsFromParams(parseJsonParams(_0x208a89[_0x29b108(0x1c1)](_0x29b108(0x1cb)))??{});},async 'execute'(_0x490d6e){const _0x42d85f=_0x2e3275,_0x33d0fa=_0x490d6e[_0x42d85f(0x1c1)](_0x42d85f(0x1c9)),_0x551902=_0x351a4f[_0x42d85f(0x1b8)]==='batchCreate'?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x490d6e[_0x42d85f(0x1c1)]('params'))):parseJsonParams(_0x490d6e['str'](_0x42d85f(0x1cb)))??{},_0x764d1f=_0x351a4f[_0x42d85f(0x1b8)]===_0x42d85f(0x197)?parseUpdateIdsFromParams(_0x551902):undefined,_0x20ccf7=_0x764d1f?normalizeUpdateParamsForRuntime(_0x551902,_0x764d1f):_0x551902,_0x59b5df=Date[_0x42d85f(0x1a0)](),_0x419a20=await executeData(_0x33d0fa,_0x351a4f['operation'],_0x20ccf7),_0x22de08=Date[_0x42d85f(0x1a0)]()-_0x59b5df,_0x4cfa3b=_0x764d1f&&_0x764d1f['length']>0x1?buildBatchUpdateResult(_0x764d1f,_0x419a20):_0x419a20;return{'ok':!![],'data':{'result':_0x4cfa3b,'elapsed':_0x22de08},'message':_0x42d85f(0x1e4)+_0x351a4f[_0x42d85f(0x19c)]+'\x20completed\x20in\x20'+_0x22de08+'ms'};}};return _0x351a4f['risk']!==_0x2e3275(0x195)&&(_0x21e136[_0x2e3275(0x18f)]=async _0x378d9f=>{const _0x4917db=_0x2e3275,_0x2dad1a=_0x378d9f['str'](_0x4917db(0x1c9)),_0x21c839=_0x351a4f[_0x4917db(0x1b8)]==='batchCreate'?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x378d9f[_0x4917db(0x1c1)](_0x4917db(0x1cb)))):parseJsonParams(_0x378d9f[_0x4917db(0x1c1)](_0x4917db(0x1cb)))??{};let _0x32e6f7=_0x21c839;if(_0x351a4f['operation']===_0x4917db(0x197)){const _0x553ca1=parseUpdateIdsFromParams(_0x21c839);_0x32e6f7=normalizeUpdateParamsForRuntime(_0x21c839,_0x553ca1);}return dryRun('POST',_0x4917db(0x19d)+_0x2dad1a+'/'+_0x351a4f[_0x4917db(0x1b8)])[_0x4917db(0x1a3)](_0x32e6f7)[_0x4917db(0x1c0)](_0x4917db(0x1ae)+_0x351a4f[_0x4917db(0x19c)]+_0x4917db(0x1e3)+_0x2dad1a)[_0x4917db(0x1a2)]();}),_0x21e136;}export const dataDefinitions=[...specs['map'](makeDataCommand),dataImportExcel];function buildBatchUpdateResult(_0x4cea5a,_0x2d397f){const _0x1fe50c=a27_0x32346a;return{'operation':'update','mode':_0x1fe50c(0x1de),'ids':_0x4cea5a,'total':_0x4cea5a['length'],'result':_0x2d397f};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a28_0x3b05e4=a28_0x2fec;(function(_0x29208b,_0x25dd56){const _0x4fbb70=a28_0x2fec,_0x2a1c85=_0x29208b();while(!![]){try{const _0x54f4a6=-parseInt(_0x4fbb70(0x1ec))/0x1+parseInt(_0x4fbb70(0x1fa))/0x2*(parseInt(_0x4fbb70(0x20a))/0x3)+-parseInt(_0x4fbb70(0x1fb))/0x4+parseInt(_0x4fbb70(0x1d3))/0x5+parseInt(_0x4fbb70(0x1ee))/0x6+-parseInt(_0x4fbb70(0x1d7))/0x7+parseInt(_0x4fbb70(0x1d6))/0x8*(parseInt(_0x4fbb70(0x20d))/0x9);if(_0x54f4a6===_0x25dd56)break;else _0x2a1c85['push'](_0x2a1c85['shift']());}catch(_0xa2cdb){_0x2a1c85['push'](_0x2a1c85['shift']());}}}(a28_0x2ea5,0xe5fe2));import{getDatasetDetail,listDatasets}from'../../core/api-client.js';function a28_0x2ea5(){const _0x1234c3=['afterScriptId','tableComment','relations','required','detail','indexes','method','push','name','creatorNameField','35139RXUNuA','modelCode','path','642717wfszuT','displayName','logicField','allFields','appCode','dataset','pkField','map','Get\x20dataset\x20detail\x20including\x20fields,\x20relations,\x20and\x20operations','doType','dbId','object','trim','2651305iIvlZy','length','host','24yaUIsa','6464640EZvGYG','doVersion','relatedPageInfoList','isArray','options','updateTimeField','deleted','datasetKey','title','modelId','dataType','responseFields','str','beforeScriptId','string','filter','split','dbtableConfig','requestFields','find','description','807638HNdfHu','dblinkInfoDTO','10607058kIEdmc','responseBody','columnCodeListWithDeleted','code','extend','sourceType','modifierIdField','operations','tableName','dbName','validateRules','read','82FCoWGx','1277472PAbHrv','parse','requestBody','dbType','type'];a28_0x2ea5=function(){return _0x1234c3;};return a28_0x2ea5();}import{CODE_FLAG}from'../../commands/common/flags.js';function normalizeField(_0x451185){const _0x27b66e=a28_0x2fec;if(_0x451185[_0x27b66e(0x1dd)])return null;const _0x20825c=Boolean(_0x451185[_0x27b66e(0x20e)]!==undefined||_0x451185[_0x27b66e(0x216)]!==undefined);let _0x311435={};if(!_0x20825c&&typeof _0x451185[_0x27b66e(0x1f2)]===_0x27b66e(0x1e5))try{_0x311435=JSON[_0x27b66e(0x1fc)](_0x451185[_0x27b66e(0x1f2)]);}catch{}const _0x62334c=_0x20825c?_0x451185[_0x27b66e(0x208)]:_0x451185[_0x27b66e(0x1f1)],_0x4d6a12=_0x20825c?_0x451185['displayName']:_0x451185[_0x27b66e(0x208)],_0x3dd817=_0x20825c?_0x451185[_0x27b66e(0x216)]:_0x451185['type']||_0x451185[_0x27b66e(0x1e1)],_0xf8f100=_0x20825c?_0x451185[_0x27b66e(0x213)]===!![]:_0x311435[_0x27b66e(0x213)]===!![],_0x4c5093=_0x20825c?_0x451185[_0x27b66e(0x203)]===!![]:_0x311435[_0x27b66e(0x203)]===!![],_0x4cf3ec=_0x20825c?_0x451185[_0x27b66e(0x1db)]??null:_0x311435[_0x27b66e(0x1db)]??null,_0x4de25e={'name':_0x62334c,'displayName':_0x4d6a12||_0x62334c,'type':_0x3dd817,'dbType':_0x451185[_0x27b66e(0x1fe)],'pk':_0xf8f100,'required':_0x4c5093,'description':_0x451185[_0x27b66e(0x1eb)]||undefined};return Array[_0x27b66e(0x1da)](_0x4cf3ec)&&_0x4cf3ec[_0x27b66e(0x1d4)]>0x0&&(_0x4de25e['options']=_0x4cf3ec),_0x4de25e;}function parseJsonMaybe(_0x5093fb){const _0xe430f5=a28_0x2fec;if(typeof _0x5093fb!==_0xe430f5(0x1e5))return _0x5093fb;try{return JSON['parse'](_0x5093fb);}catch{return _0x5093fb;}}function normalizeOperationEntry(_0x52f20b,_0x28f7bb){const _0x5582e9=a28_0x2fec;if(!_0x28f7bb||typeof _0x28f7bb!==_0x5582e9(0x1d1))return null;if(!_0x28f7bb[_0x5582e9(0x206)]||!_0x28f7bb[_0x5582e9(0x20c)])return null;const _0x1774b1={'name':_0x52f20b,'method':_0x28f7bb['method'],'path':_0x28f7bb['path']};if(_0x28f7bb[_0x5582e9(0x1d5)])_0x1774b1['host']=_0x28f7bb[_0x5582e9(0x1d5)];if(_0x28f7bb[_0x5582e9(0x1fd)]!=null)_0x1774b1[_0x5582e9(0x1fd)]=parseJsonMaybe(_0x28f7bb['requestBody']);if(_0x28f7bb[_0x5582e9(0x1ef)]!=null)_0x1774b1[_0x5582e9(0x1ef)]=parseJsonMaybe(_0x28f7bb[_0x5582e9(0x1ef)]);if(_0x28f7bb['beforeScriptId']!=null)_0x1774b1[_0x5582e9(0x1e4)]=_0x28f7bb[_0x5582e9(0x1e4)];if(_0x28f7bb[_0x5582e9(0x200)]!=null)_0x1774b1[_0x5582e9(0x200)]=_0x28f7bb[_0x5582e9(0x200)];if(Array['isArray'](_0x28f7bb[_0x5582e9(0x1e9)]))_0x1774b1[_0x5582e9(0x1e9)]=_0x28f7bb[_0x5582e9(0x1e9)];if(Array[_0x5582e9(0x1da)](_0x28f7bb[_0x5582e9(0x1e2)]))_0x1774b1[_0x5582e9(0x1e2)]=_0x28f7bb['responseFields'];return _0x1774b1;}function summarizeDbtable(_0x272c94){const _0x51ac52=a28_0x2fec,_0x500184={},_0x1243e6=[_0x51ac52(0x217),'dbName',_0x51ac52(0x1f6),_0x51ac52(0x1de),_0x51ac52(0x213),_0x51ac52(0x210),_0x51ac52(0x20f),'createTimeField',_0x51ac52(0x1dc),'creatorIdField',_0x51ac52(0x209),_0x51ac52(0x1f4),'modifierNameField','labelField',_0x51ac52(0x1ed)];for(const _0x5d13aa of _0x1243e6){if(_0x272c94[_0x5d13aa]!==undefined)_0x500184[_0x5d13aa]=_0x272c94[_0x5d13aa];}return typeof _0x500184[_0x51ac52(0x210)]===_0x51ac52(0x1e5)&&_0x500184['allFields'][_0x51ac52(0x1d4)]>0x0&&(_0x500184['allFieldNames']=_0x500184[_0x51ac52(0x210)]['split'](',')[_0x51ac52(0x214)](_0x17d542=>_0x17d542[_0x51ac52(0x1d2)]())['filter'](Boolean)),_0x500184;}function normalizeRelatedPages(_0x592140){const _0x1a3ee0=a28_0x2fec;if(!Array[_0x1a3ee0(0x1da)](_0x592140))return[];return _0x592140[_0x1a3ee0(0x1e6)](_0x553e70=>_0x553e70&&typeof _0x553e70===_0x1a3ee0(0x1d1))[_0x1a3ee0(0x214)](_0x5e3542=>({'id':_0x5e3542['id'],'type':_0x5e3542[_0x1a3ee0(0x1ff)],'code':_0x5e3542['code'],'title':_0x5e3542[_0x1a3ee0(0x1df)],'deleted':_0x5e3542[_0x1a3ee0(0x1dd)]===!![]}));}function normalizeFallbackFieldName(_0x1bacc7,_0x1fb6ae){const _0x46ba69=a28_0x2fec,_0x5a428d=_0x1bacc7[_0x46ba69(0x1d2)]();if(!_0x5a428d)return null;return{'name':_0x5a428d,'displayName':_0x5a428d,'type':undefined,'dbType':undefined,'pk':_0x5a428d===_0x1fb6ae,'required':![],'description':undefined};}async function loadListFieldFallback(_0x750f06,_0x5b08c1){const _0x409129=a28_0x2fec;if(!_0x750f06||!_0x5b08c1)return[];try{const _0x2c11f3=await listDatasets(_0x750f06,{'code':_0x5b08c1}),_0x58564c=_0x2c11f3[_0x409129(0x1ea)](_0x3cb6ef=>_0x3cb6ef[_0x409129(0x1f1)]===_0x5b08c1)??_0x2c11f3[0x0],_0x3f96fe=_0x58564c?.[_0x409129(0x1e8)]??{},_0x272388=typeof _0x3f96fe[_0x409129(0x210)]===_0x409129(0x1e5)?_0x3f96fe['allFields'][_0x409129(0x1e7)](','):[];return _0x272388[_0x409129(0x214)](_0x563c2f=>normalizeFallbackFieldName(_0x563c2f,_0x3f96fe['pkField']))['filter'](_0x15d7d1=>_0x15d7d1!==null);}catch{return[];}}function a28_0x2fec(_0x1e59dd,_0xf5c8d7){_0x1e59dd=_0x1e59dd-0x1d1;const _0x2ea500=a28_0x2ea5();let _0x2fece8=_0x2ea500[_0x1e59dd];return _0x2fece8;}export const datasetDetail={'service':'dataset','command':a28_0x3b05e4(0x204),'description':a28_0x3b05e4(0x215),'risk':a28_0x3b05e4(0x1f9),'flags':[CODE_FLAG],async 'execute'(_0x28e5dc){const _0x2b0869=a28_0x3b05e4,_0x21eeaf=await getDatasetDetail(_0x28e5dc[_0x2b0869(0x1e3)](_0x2b0869(0x1f1))),_0x2fdeb3=Array[_0x2b0869(0x1da)](_0x21eeaf['fields'])?_0x21eeaf['fields']:Array[_0x2b0869(0x1da)](_0x21eeaf['properties'])?_0x21eeaf['properties']:[];let _0x2ee1ae=_0x2fdeb3[_0x2b0869(0x214)](_0x83ac4e=>normalizeField(_0x83ac4e))[_0x2b0869(0x1e6)](_0x5c85ad=>_0x5c85ad!==null);_0x2ee1ae['length']===0x0&&(_0x2ee1ae=await loadListFieldFallback(_0x28e5dc[_0x2b0869(0x211)],_0x28e5dc[_0x2b0869(0x1e3)]('code')));const _0x35a3f7=_0x21eeaf[_0x2b0869(0x1f5)]??{},_0x147f0a=[];for(const [_0x8e3be5,_0x4b286d]of Object['entries'](_0x35a3f7)){const _0x34f7b2=normalizeOperationEntry(_0x8e3be5,_0x4b286d);if(_0x34f7b2)_0x147f0a[_0x2b0869(0x207)](_0x34f7b2);}const _0x19b0a1=_0x21eeaf[_0x2b0869(0x1e8)]??{},_0x55bc37=_0x21eeaf[_0x2b0869(0x212)]??{},_0xe92316=_0x19b0a1[_0x2b0869(0x217)]!=null?{'id':_0x19b0a1[_0x2b0869(0x217)],'name':_0x19b0a1[_0x2b0869(0x1f7)]??null}:undefined;let _0x3b6574;return typeof _0x21eeaf['extend']===_0x2b0869(0x1e5)&&(_0x3b6574=parseJsonMaybe(_0x21eeaf[_0x2b0869(0x1f2)])),{'ok':!![],'data':{'id':_0x21eeaf[_0x2b0869(0x1e0)]??_0x21eeaf['id'],'name':_0x21eeaf[_0x2b0869(0x208)],'code':_0x21eeaf[_0x2b0869(0x20b)]||_0x21eeaf['code'],'doVersion':_0x21eeaf[_0x2b0869(0x1d8)],'description':_0x21eeaf[_0x2b0869(0x1eb)]||_0x55bc37[_0x2b0869(0x201)]||undefined,'source':_0x21eeaf['source']||_0x55bc37[_0x2b0869(0x1f3)],'table':_0x19b0a1['tableName']||_0x55bc37[_0x2b0869(0x1f6)],'datasetKey':_0x19b0a1[_0x2b0869(0x1de)],'pk':_0x19b0a1[_0x2b0869(0x213)],'db':_0xe92316,'dbtable':summarizeDbtable(_0x19b0a1),'fields':_0x2ee1ae,'operations':_0x147f0a,'indexes':Array[_0x2b0869(0x1da)](_0x55bc37['indexes'])?_0x55bc37[_0x2b0869(0x205)]:[],'relations':_0x21eeaf[_0x2b0869(0x202)]??null,'relatedPages':normalizeRelatedPages(_0x21eeaf[_0x2b0869(0x1d9)]),...Array[_0x2b0869(0x1da)](_0x21eeaf[_0x2b0869(0x1f0)])?{'columnCodeListWithDeleted':_0x21eeaf['columnCodeListWithDeleted']}:{},'formatRules':Array[_0x2b0869(0x1da)](_0x21eeaf['formatRules'])?_0x21eeaf['formatRules']:[],'validateRules':Array[_0x2b0869(0x1da)](_0x21eeaf['validateRules'])?_0x21eeaf[_0x2b0869(0x1f8)]:[],..._0x3b6574!==undefined?{'extend':_0x3b6574}:{},'stats':{'fieldCount':_0x2ee1ae[_0x2b0869(0x1d4)],'operationCount':_0x147f0a[_0x2b0869(0x1d4)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x39a44c,_0x161631){const _0x56627e=a29_0x3fe8,_0x3e0413=_0x39a44c();while(!![]){try{const _0x23dffd=parseInt(_0x56627e(0x121))/0x1+parseInt(_0x56627e(0x11e))/0x2+-parseInt(_0x56627e(0x127))/0x3+-parseInt(_0x56627e(0x120))/0x4+-parseInt(_0x56627e(0x122))/0x5*(parseInt(_0x56627e(0x124))/0x6)+parseInt(_0x56627e(0x11f))/0x7*(parseInt(_0x56627e(0x126))/0x8)+-parseInt(_0x56627e(0x125))/0x9*(-parseInt(_0x56627e(0x123))/0xa);if(_0x23dffd===_0x161631)break;else _0x3e0413['push'](_0x3e0413['shift']());}catch(_0xbda66c){_0x3e0413['push'](_0x3e0413['shift']());}}}(a29_0x189c,0xbd248));import{datasetList}from'../../commands/dataset/list.js';import{datasetDetail}from'../../commands/dataset/detail.js';function a29_0x189c(){const _0x5369a8=['48WbKlgK','9euoMIi','16mnMAfx','3503394kYJLdH','2755378SAObxN','2763229AfIlaA','5838500iehesh','100821yyamXj','264765yfhHPm','15577710ooiGmR'];a29_0x189c=function(){return _0x5369a8;};return a29_0x189c();}function a29_0x3fe8(_0x13cd10,_0x37c08b){_0x13cd10=_0x13cd10-0x11e;const _0x189c53=a29_0x189c();let _0x3fe80f=_0x189c53[_0x13cd10];return _0x3fe80f;}import{datasetSdkDoc}from'../../commands/dataset/sdk-doc.js';export const datasetDefinitions=[datasetList,datasetDetail,datasetSdkDoc];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a30_0x102cb5=a30_0x52ae;(function(_0x58085f,_0x20f71d){const _0x5b1e0c=a30_0x52ae,_0x1be1cf=_0x58085f();while(!![]){try{const _0x3a4866=-parseInt(_0x5b1e0c(0x167))/0x1+-parseInt(_0x5b1e0c(0x15f))/0x2+-parseInt(_0x5b1e0c(0x158))/0x3*(parseInt(_0x5b1e0c(0x169))/0x4)+parseInt(_0x5b1e0c(0x163))/0x5*(parseInt(_0x5b1e0c(0x159))/0x6)+parseInt(_0x5b1e0c(0x15e))/0x7+-parseInt(_0x5b1e0c(0x152))/0x8*(parseInt(_0x5b1e0c(0x164))/0x9)+-parseInt(_0x5b1e0c(0x156))/0xa*(-parseInt(_0x5b1e0c(0x161))/0xb);if(_0x3a4866===_0x20f71d)break;else _0x1be1cf['push'](_0x1be1cf['shift']());}catch(_0x615ccc){_0x1be1cf['push'](_0x1be1cf['shift']());}}}(a30_0x3ecd,0xaa25d));import{listDatasets}from'../../core/api-client.js';function a30_0x52ae(_0x4d8b7d,_0x79917f){_0x4d8b7d=_0x4d8b7d-0x14d;const _0x3ecd01=a30_0x3ecd();let _0x52aeb4=_0x3ecd01[_0x4d8b7d];return _0x52aeb4;}function a30_0x3ecd(){const _0x1b166e=['allFields','66iJOmEE','length','1229945DmLIFO','9gmaabx','tableName','dataset','664499gCvJEZ','dbtableConfig','376816BgfaCM','appCode','string','list','trim','Filter\x20by\x20dataset\x20code\x20(server-side\x20exact\x20match)','9826480rJBnxU','str','code','map','3566410lUYKoI','description','39OGFXrK','24riAiaT','List\x20datasets\x20in\x20the\x20app\x20(supports\x20server-side\x20name/code\x20filtering)','name','Filter\x20by\x20dataset\x20name\x20(server-side\x20fuzzy\x20match)','read','7870464VdRnPg','867536aYHBCQ'];a30_0x3ecd=function(){return _0x1b166e;};return a30_0x3ecd();}import{CODE_FLAG}from'../../commands/common/flags.js';export const datasetList={'service':a30_0x102cb5(0x166),'command':a30_0x102cb5(0x14f),'description':a30_0x102cb5(0x15a),'risk':a30_0x102cb5(0x15d),'flags':[{'name':a30_0x102cb5(0x15b),'type':a30_0x102cb5(0x14e),'description':a30_0x102cb5(0x15c)},{...CODE_FLAG,'required':![],'description':a30_0x102cb5(0x151)}],async 'execute'(_0x134a95){const _0x1b77d9=a30_0x102cb5,_0xc25b71=_0x134a95[_0x1b77d9(0x153)](_0x1b77d9(0x15b)),_0x3ea0e5=_0x134a95[_0x1b77d9(0x153)]('code'),_0x466feb=await listDatasets(_0x134a95[_0x1b77d9(0x14d)],{..._0xc25b71&&{'name':_0xc25b71},..._0x3ea0e5&&{'code':_0x3ea0e5}});return{'ok':!![],'data':{'total':_0x466feb[_0x1b77d9(0x162)],'datasets':_0x466feb[_0x1b77d9(0x155)](_0x4cd123=>{const _0x37a1fd=_0x1b77d9,_0x1e86a8=_0x4cd123[_0x37a1fd(0x168)]??{};return{'id':_0x4cd123['id'],'code':_0x4cd123[_0x37a1fd(0x154)],'name':_0x4cd123['name'],'source':_0x4cd123['source'],'description':_0x4cd123[_0x37a1fd(0x157)],'table':_0x1e86a8[_0x37a1fd(0x165)],'datasetKey':_0x1e86a8['datasetKey'],'pk':_0x1e86a8['pkField'],'fields':_0x1e86a8[_0x37a1fd(0x160)]?_0x1e86a8[_0x37a1fd(0x160)]['split'](',')[_0x37a1fd(0x155)](_0x3c1efd=>_0x3c1efd[_0x37a1fd(0x150)]()):[]};})}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a31_0x53f7(){const _0x1d539f=['appCode','8rvzGVI','14968TKgJoz','1970375bQwanF','99186jzBWzm','trim','1830661LVNpoS','30wzdPoG','1278GyXzpK','sdk-doc','read','dataset','12246744vImkeH','1ztfPZB','Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.','523234wTNaVu','code','660HhchSY','18385TDJopp'];a31_0x53f7=function(){return _0x1d539f;};return a31_0x53f7();}function a31_0x8842(_0x11d25d,_0x559efc){_0x11d25d=_0x11d25d-0xb5;const _0x53f7e8=a31_0x53f7();let _0x884279=_0x53f7e8[_0x11d25d];return _0x884279;}const a31_0x526ee8=a31_0x8842;(function(_0x25898e,_0x73b7bf){const _0x152be3=a31_0x8842,_0x1f1ba9=_0x25898e();while(!![]){try{const _0x472b12=-parseInt(_0x152be3(0xbe))/0x1*(-parseInt(_0x152be3(0xc0))/0x2)+-parseInt(_0x152be3(0xb5))/0x3*(parseInt(_0x152be3(0xc5))/0x4)+parseInt(_0x152be3(0xc3))/0x5*(-parseInt(_0x152be3(0xc2))/0x6)+parseInt(_0x152be3(0xb7))/0x7+-parseInt(_0x152be3(0xc6))/0x8*(parseInt(_0x152be3(0xb9))/0x9)+-parseInt(_0x152be3(0xb8))/0xa*(parseInt(_0x152be3(0xc7))/0xb)+parseInt(_0x152be3(0xbd))/0xc;if(_0x472b12===_0x73b7bf)break;else _0x1f1ba9['push'](_0x1f1ba9['shift']());}catch(_0x49bf8c){_0x1f1ba9['push'](_0x1f1ba9['shift']());}}}(a31_0x53f7,0x41ee3));import{getDatasetSdkUsageDoc}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';const DEFAULT_MARKDOWN='#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0aNo\x20SDK\x20usage\x20documentation\x20is\x20available.';export function formatDatasetSdkMarkdown(_0x4232dc){const _0x3e5f64=a31_0x8842,_0x517e7a=typeof _0x4232dc==='string'?_0x4232dc[_0x3e5f64(0xb6)]():'';return _0x517e7a||DEFAULT_MARKDOWN;}export const datasetSdkDoc={'service':a31_0x526ee8(0xbc),'command':a31_0x526ee8(0xba),'description':'Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','risk':a31_0x526ee8(0xbb),'flags':[{...CODE_FLAG,'description':a31_0x526ee8(0xbf)}],async 'execute'(_0x45b8fe){const _0x133fe2=a31_0x526ee8,_0x1dd212=_0x45b8fe['str'](_0x133fe2(0xc1)),_0x355264=await getDatasetSdkUsageDoc(_0x1dd212,_0x45b8fe[_0x133fe2(0xc4)]);return{'ok':!![],'data':{'code':_0x1dd212,'appCode':_0x45b8fe[_0x133fe2(0xc4)],'markdown':formatDatasetSdkMarkdown(_0x355264)}};}};
|
package/lib/commands/doctor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a32_0x4c780a=a32_0x550e;(function(_0xb92347,_0x37b126){const _0x5645ad=a32_0x550e,_0x544c63=_0xb92347();while(!![]){try{const _0x3ff0f2=-parseInt(_0x5645ad(0x102))/0x1+-parseInt(_0x5645ad(0x110))/0x2*(parseInt(_0x5645ad(0x134))/0x3)+-parseInt(_0x5645ad(0x13e))/0x4*(parseInt(_0x5645ad(0x143))/0x5)+-parseInt(_0x5645ad(0xfd))/0x6+parseInt(_0x5645ad(0x124))/0x7+-parseInt(_0x5645ad(0x121))/0x8*(parseInt(_0x5645ad(0xfe))/0x9)+-parseInt(_0x5645ad(0x104))/0xa*(-parseInt(_0x5645ad(0xcf))/0xb);if(_0x3ff0f2===_0x37b126)break;else _0x544c63['push'](_0x544c63['shift']());}catch(_0x8b5994){_0x544c63['push'](_0x544c63['shift']());}}}(a32_0x1c2d,0x697d7));import a32_0x652e18 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';function a32_0x1c2d(){const _0x46a3e5=['\x20\x20Skill\x20Version:\x20\x20\x20','✓\x20current','\x20\x20Installed\x20Path:\x20\x20','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','\x20\x20region:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Auth','padEnd','red','(set,\x20length=','\x20\x20app\x20locale:\x20\x20\x20\x20\x20\x20','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','installedPath','\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','services','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','arch','\x20(accessKey)','message','join','yellow','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','(no\x20file)','state','(removed\x20—\x20cookie\x20auth\x20disabled)','\x20\x20Config\x20Files','\x20\x20Repair\x20project:\x20\x20','status','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','\x20\x20Config\x20JSON','(invalid)','project','gray','appCode','locale','\x20config\x20delete\x20region','\x20\x20Service\x20Tree','globalConfig','✗\x20Invalid','⚠\x20Empty\x20(treated\x20as\x20{})','doctor','4823226lSdjBT','18wfGMpD','not\x20configured','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','prototype','764787cUsINb','ClientAk','30593180zWjbdk','\x20\x20skillDomain:\x20\x20\x20\x20\x20','includes','\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20Imported\x20from:\x20','packageVersion','\x20config\x20init','green','(none)','\x20\x20auth\x20(effective):\x20','(unnamed)','accessKey','61144ghJzCl','log','Project','(missing)','hasOwnProperty','✗\x20Invalid\x20JSON','\x20\x20Package\x20Version:\x20','length','check','reason','✓\x20Valid\x20JSON','\x20\x20Legacy\x20inherit:\x20\x20\x20','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','bold','\x20\x20Routing\x20Configuration','\x20\x20Country/Region\x20Configuration','2965624vvKvaW','\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','missing','4121145FgViTt','✓\x20Loaded','currentApp','repairCommand','Diagnose\x20CLI\x20configuration\x20and\x20environment','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','ignored\x20in\x20','\x20\x20Merged\x20Config','routing','inherit','read','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','skillVersion','pageSize','format','⚠\x20Empty','81nuriis','\x20config\x20delete\x20routing\x20--global','region','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','current','verbose','\x20doctor','\x20commands)','\x20\x20Repair\x20global:\x20\x20\x20','\x20\x20runtimeDomain:\x20\x20\x20','56kutgZv','defaultApp','global','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','raw','28735WCqEio','serviceCount','call','\x20\x20─','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','(not\x20found)','\x20\x20Session\x20check:\x20\x20\x20','\x20\x20Built-in\x20Skill','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','repeat','\x20config\x20delete\x20routing','platform','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','commandCount','11JkuXkJ','projectConfig','Global','Unavailable\x20until\x20routing\x20configuration\x20is\x20repaired','\x20config\x20delete\x20inherit'];a32_0x1c2d=function(){return _0x46a3e5;};return a32_0x1c2d();}import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';function a32_0x550e(_0x3b5c58,_0x47abf6){_0x3b5c58=_0x3b5c58-0xc6;const _0x1c2d4a=a32_0x1c2d();let _0x550e0a=_0x1c2d4a[_0x3b5c58];return _0x550e0a;}import{getCliVersion}from'../utils/version.js';import{getApiDomain,getKbServiceDomain,getRuntimeDomain,getSkillDomain,getUserDomain}from'../constant/domain.js';import{normalizeLovrabetRegion}from'../constant/region.js';import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile,loadRawConfigLayers}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{inspectServiceRegistry}from'../commands/service/registry.js';import{inspectBuiltinSkill}from'../skills/builtin-skill.js';async function execute(_0x4f19a9){const _0xc14250=a32_0x550e,_0x15a815=getCliVersion(),_0x4cfd30=buildConfigFromFlags({});let _0x196d4f,_0x2c6f3c;try{_0x196d4f=normalizeLovrabetRegion(_0x4cfd30[_0xc14250(0x142)][_0xc14250(0x136)]);}catch(_0x21ecc9){_0x2c6f3c=_0x21ecc9 instanceof Error?_0x21ecc9:new Error(String(_0x21ecc9));}let _0x2c5676;if(!_0x2c6f3c)try{await initGlobalEnvironment(_0x4cfd30);}catch(_0x337e80){_0x2c5676=_0x337e80 instanceof Error?_0x337e80:new Error(String(_0x337e80));}console[_0xc14250(0x111)](),console[_0xc14250(0x111)](a32_0x652e18[_0xc14250(0x11e)](CLI_BIN_NAME+_0xc14250(0x13a))),console[_0xc14250(0x111)](a32_0x652e18['gray']('─'[_0xc14250(0xca)](0x32))),console[_0xc14250(0x111)](_0xc14250(0xf0)+_0x15a815),console[_0xc14250(0x111)]('\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+process['version']),console[_0xc14250(0x111)](_0xc14250(0x141)+process[_0xc14250(0xcc)]+'\x20'+process[_0xc14250(0xe4)]);const _0x58e179=inspectBuiltinSkill();console[_0xc14250(0x111)](),console[_0xc14250(0x111)](a32_0x652e18['bold'](_0xc14250(0xc8))),console[_0xc14250(0x111)](a32_0x652e18[_0xc14250(0xf4)](_0xc14250(0x146)[_0xc14250(0xca)](0x1e))),console['log'](_0xc14250(0x122)+(_0x58e179[_0xc14250(0xeb)]===_0xc14250(0x138)?a32_0x652e18['green'](_0xc14250(0xd5)):a32_0x652e18[_0xc14250(0xdb)]('✗\x20'+_0x58e179['state']))),console[_0xc14250(0x111)](_0xc14250(0x116)+_0x58e179[_0xc14250(0x109)]),console['log'](_0xc14250(0xd4)+(_0x58e179[_0xc14250(0x130)]||a32_0x652e18[_0xc14250(0xf4)](_0xc14250(0x113)))),console['log'](_0xc14250(0xd6)+(_0x58e179[_0xc14250(0xdf)]||a32_0x652e18[_0xc14250(0xf4)](_0xc14250(0xc6))));_0x58e179['state']!==_0xc14250(0x138)&&console[_0xc14250(0x111)](_0xc14250(0xe0)+_0x58e179[_0xc14250(0x127)]);_0x58e179[_0xc14250(0x119)]&&console[_0xc14250(0x111)]('\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x58e179[_0xc14250(0x119)]);console[_0xc14250(0x111)](),console[_0xc14250(0x111)](a32_0x652e18['bold'](_0xc14250(0xed))),console[_0xc14250(0x111)](a32_0x652e18['gray']('\x20\x20─'[_0xc14250(0xca)](0x1e)));const _0x356207=getGlobalConfigPath(),_0xab441b=getProjectConfigPath();console['log']('\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x356207||a32_0x652e18[_0xc14250(0xf4)]('(not\x20found)'))),console['log'](_0xc14250(0x12f)+(_0xab441b||a32_0x652e18['gray']('(not\x20found)'))),console[_0xc14250(0x111)](),console[_0xc14250(0x111)](a32_0x652e18[_0xc14250(0x11e)](_0xc14250(0xf1))),console[_0xc14250(0x111)](a32_0x652e18[_0xc14250(0xf4)](_0xc14250(0x146)[_0xc14250(0xca)](0x1e)));const _0x4e8ed9=(_0x35517f,_0x4e2e48)=>{const _0x1c348d=_0xc14250;if(!_0x4e2e48){console['log']('\x20\x20'+_0x35517f[_0x1c348d(0xda)](0x11)+'\x20'+a32_0x652e18['gray'](_0x1c348d(0xea)));return;}const _0x1826f8=inspectCliConfigJsonFile(_0x4e2e48);if(_0x1826f8[_0x1c348d(0xef)]==='ok')console['log']('\x20\x20'+_0x35517f[_0x1c348d(0xda)](0x11)+'\x20'+a32_0x652e18['green'](_0x1c348d(0x11a)));else{if(_0x1826f8[_0x1c348d(0xef)]==='empty')console['log']('\x20\x20'+_0x35517f[_0x1c348d(0xda)](0x11)+'\x20'+a32_0x652e18[_0x1c348d(0xe8)](_0x1c348d(0xfb)));else _0x1826f8[_0x1c348d(0xef)]===_0x1c348d(0x123)?console[_0x1c348d(0x111)]('\x20\x20'+_0x35517f[_0x1c348d(0xda)](0x11)+'\x20'+a32_0x652e18['gray'](_0x1c348d(0x113))):(console[_0x1c348d(0x111)]('\x20\x20'+_0x35517f[_0x1c348d(0xda)](0x11)+'\x20'+a32_0x652e18[_0x1c348d(0xdb)](_0x1c348d(0x115))),console[_0x1c348d(0x111)]('\x20\x20'+''['padEnd'](0x11)+'\x20'+a32_0x652e18[_0x1c348d(0xdb)](_0x1826f8[_0x1c348d(0xe6)])));}};_0x4e8ed9(_0xc14250(0xd1),_0x356207),_0x4e8ed9(_0xc14250(0x112),_0xab441b);const _0x19c69f=loadRawConfigLayers(),_0x40ac39=[Object['prototype']['hasOwnProperty'][_0xc14250(0x145)](_0x19c69f[_0xc14250(0xf9)],_0xc14250(0x12d))?_0xc14250(0x140):null,Object[_0xc14250(0x101)]['hasOwnProperty'][_0xc14250(0x145)](_0x19c69f[_0xc14250(0xd0)],_0xc14250(0x12d))?_0xc14250(0xf3):null]['filter'](Boolean);_0x40ac39[_0xc14250(0x117)]>0x0&&(console[_0xc14250(0x111)](_0xc14250(0x11b)+a32_0x652e18[_0xc14250(0xe8)](_0xc14250(0x12a)+_0x40ac39[_0xc14250(0xe7)]('\x20+\x20')+'\x20config')),_0x40ac39[_0xc14250(0x106)](_0xc14250(0xf3))&&console[_0xc14250(0x111)]('\x20\x20Repair\x20project:\x20\x20\x20'+CLI_BIN_NAME+_0xc14250(0xd3)),_0x40ac39[_0xc14250(0x106)](_0xc14250(0x140))&&console[_0xc14250(0x111)]('\x20\x20Repair\x20global:\x20\x20\x20\x20'+CLI_BIN_NAME+'\x20config\x20delete\x20inherit\x20--global'));_0x2c5676&&(console['log'](),console[_0xc14250(0x111)](a32_0x652e18[_0xc14250(0x11e)](_0xc14250(0x11f))),console[_0xc14250(0x111)](a32_0x652e18[_0xc14250(0xf4)](_0xc14250(0x146)[_0xc14250(0xca)](0x1e))),console[_0xc14250(0x111)](_0xc14250(0xcd)+a32_0x652e18['red'](_0xc14250(0xfa))),console[_0xc14250(0x111)](_0xc14250(0x107)+_0x2c5676['message']),Object['prototype']['hasOwnProperty'][_0xc14250(0x145)](_0x19c69f[_0xc14250(0xd0)],_0xc14250(0x12c))&&console[_0xc14250(0x111)](_0xc14250(0xee)+CLI_BIN_NAME+_0xc14250(0xcb)),Object[_0xc14250(0x101)][_0xc14250(0x114)][_0xc14250(0x145)](_0x19c69f['globalConfig'],'routing')&&console[_0xc14250(0x111)](_0xc14250(0x13c)+CLI_BIN_NAME+_0xc14250(0x135)));_0x2c6f3c&&(console[_0xc14250(0x111)](),console[_0xc14250(0x111)](a32_0x652e18[_0xc14250(0x11e)](_0xc14250(0x120))),console[_0xc14250(0x111)](a32_0x652e18[_0xc14250(0xf4)](_0xc14250(0x146)[_0xc14250(0xca)](0x1e))),console[_0xc14250(0x111)](_0xc14250(0xcd)+a32_0x652e18[_0xc14250(0xdb)](_0xc14250(0xfa))),console['log'](_0xc14250(0x107)+_0x2c6f3c['message']),Object[_0xc14250(0x101)][_0xc14250(0x114)][_0xc14250(0x145)](_0x19c69f['projectConfig'],'region')&&console['log'](_0xc14250(0xee)+CLI_BIN_NAME+_0xc14250(0xf7)),Object[_0xc14250(0x101)][_0xc14250(0x114)][_0xc14250(0x145)](_0x19c69f[_0xc14250(0xf9)],_0xc14250(0x136))&&console['log']('\x20\x20Repair\x20global:\x20\x20\x20'+CLI_BIN_NAME+_0xc14250(0x10a)));console['log'](),console[_0xc14250(0x111)](a32_0x652e18['bold'](_0xc14250(0x12b))),console['log'](a32_0x652e18[_0xc14250(0xf4)](_0xc14250(0x146)[_0xc14250(0xca)](0x1e))),console['log'](_0xc14250(0xe2)+(_0x4cfd30[_0xc14250(0xf5)]||a32_0x652e18[_0xc14250(0xdb)]('(not\x20set)'))),console[_0xc14250(0x111)](_0xc14250(0xd8)+(_0x196d4f??a32_0x652e18[_0xc14250(0xdb)](_0xc14250(0xf2)))),console['log'](_0xc14250(0xdd)+_0x4cfd30[_0xc14250(0xf6)]),console[_0xc14250(0x111)](_0xc14250(0xd7)+(_0x4cfd30[_0xc14250(0x13f)]||a32_0x652e18['gray'](_0xc14250(0x10c)))),console[_0xc14250(0x111)](_0xc14250(0x100)+(_0x4cfd30[_0xc14250(0x126)]||a32_0x652e18['gray']('(none)'))),console[_0xc14250(0x111)](_0xc14250(0x137)+(_0x4cfd30[_0xc14250(0x132)]||a32_0x652e18[_0xc14250(0xf4)]('(default:\x20'+DEFAULT_CONFIG_VALUES[_0xc14250(0x132)]+')'))),console[_0xc14250(0x111)]('\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x4cfd30[_0xc14250(0x131)]??a32_0x652e18['gray']('(default)'))),console['log'](_0xc14250(0xe9)+_0x4cfd30['riskLevel']),console[_0xc14250(0x111)](_0xc14250(0x129)+_0x4cfd30[_0xc14250(0x139)]),console['log'](_0xc14250(0x10d)+AUTH_MODE[_0xc14250(0x103)]),console['log'](_0xc14250(0x147)+(_0x4cfd30[_0xc14250(0x10f)]?a32_0x652e18[_0xc14250(0x10b)](_0xc14250(0xdc)+_0x4cfd30[_0xc14250(0x10f)]['length']+')'):a32_0x652e18[_0xc14250(0xf4)](_0xc14250(0x10c)))),console[_0xc14250(0x111)](),console[_0xc14250(0x111)](a32_0x652e18[_0xc14250(0x11e)]('\x20\x20API\x20Endpoints')),console[_0xc14250(0x111)](a32_0x652e18[_0xc14250(0xf4)]('\x20\x20─'[_0xc14250(0xca)](0x1e)));_0x2c5676||_0x2c6f3c?console[_0xc14250(0x111)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a32_0x652e18['red'](_0xc14250(0xd2))):(console[_0xc14250(0x111)](_0xc14250(0xde)+getApiDomain()),console[_0xc14250(0x111)](_0xc14250(0x148)+getUserDomain()),console[_0xc14250(0x111)](_0xc14250(0x13d)+getRuntimeDomain()),console[_0xc14250(0x111)](_0xc14250(0x105)+getSkillDomain()),console[_0xc14250(0x111)]('\x20\x20kbServiceDomain:\x20'+(getKbServiceDomain()??_0xc14250(0xff))));console[_0xc14250(0x111)](),console['log'](a32_0x652e18[_0xc14250(0x11e)](_0xc14250(0xf8))),console['log'](a32_0x652e18[_0xc14250(0xf4)]('\x20\x20─'[_0xc14250(0xca)](0x1e)));const _0x388b38=inspectServiceRegistry();console[_0xc14250(0x111)](_0xc14250(0x11c)+_0x388b38['registryPath']),console[_0xc14250(0x111)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+formatServiceRegistryStatus(_0x388b38)),console[_0xc14250(0x111)](_0xc14250(0xc9)+_0x388b38[_0xc14250(0x144)]),console['log'](_0xc14250(0x11d)+_0x388b38[_0xc14250(0xce)]);for(const _0x361a96 of _0x388b38[_0xc14250(0xe1)]){console[_0xc14250(0x111)]('\x20\x20'+(_0x361a96['serviceCode']+':')[_0xc14250(0xda)](0x11)+'\x20'+(_0x361a96['name']||a32_0x652e18[_0xc14250(0xf4)](_0xc14250(0x10e)))+'\x20('+_0x361a96[_0xc14250(0xce)]+_0xc14250(0x13b)),console[_0xc14250(0x111)]('\x20\x20'+''[_0xc14250(0xda)](0x11)+_0xc14250(0x108)+_0x361a96['source']['path']);}return console[_0xc14250(0x111)](),console[_0xc14250(0x111)](a32_0x652e18[_0xc14250(0x11e)](_0xc14250(0xd9))),console[_0xc14250(0x111)](a32_0x652e18[_0xc14250(0xf4)](_0xc14250(0x146)['repeat'](0x1e))),console['log'](_0xc14250(0xe3)+a32_0x652e18[_0xc14250(0x10b)](AUTH_MODE[_0xc14250(0x103)]+_0xc14250(0xe5))),console[_0xc14250(0x111)](_0xc14250(0xc7)+a32_0x652e18[_0xc14250(0xf4)](_0xc14250(0xec))),console[_0xc14250(0x111)](),{'ok':!![]};}function formatServiceRegistryStatus(_0x2e00f5){const _0x9136e3=a32_0x550e;if(_0x2e00f5['status']==='ok')return a32_0x652e18[_0x9136e3(0x10b)](_0x9136e3(0x125));if(_0x2e00f5['status']===_0x9136e3(0x123))return a32_0x652e18[_0x9136e3(0xf4)]('(not\x20found)');if(_0x2e00f5[_0x9136e3(0xef)]==='empty')return a32_0x652e18[_0x9136e3(0xe8)](_0x9136e3(0x133));return a32_0x652e18[_0x9136e3(0xdb)](_0x9136e3(0xfa)+(_0x2e00f5['message']?':\x20'+_0x2e00f5[_0x9136e3(0xe6)]:''));}export const doctorDefinition={'service':a32_0x4c780a(0xfc),'command':a32_0x4c780a(0x118),'description':a32_0x4c780a(0x128),'risk':a32_0x4c780a(0x12e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
1
|
+
const a32_0x442916=a32_0x4318;(function(_0x13ca00,_0x559a9f){const _0x22a725=a32_0x4318,_0x4e3dd2=_0x13ca00();while(!![]){try{const _0x2b94da=parseInt(_0x22a725(0x134))/0x1+-parseInt(_0x22a725(0x104))/0x2*(parseInt(_0x22a725(0xd8))/0x3)+parseInt(_0x22a725(0x108))/0x4+parseInt(_0x22a725(0x105))/0x5*(parseInt(_0x22a725(0x12b))/0x6)+parseInt(_0x22a725(0xe9))/0x7+parseInt(_0x22a725(0xcf))/0x8+-parseInt(_0x22a725(0xc3))/0x9;if(_0x2b94da===_0x559a9f)break;else _0x4e3dd2['push'](_0x4e3dd2['shift']());}catch(_0x283ded){_0x4e3dd2['push'](_0x4e3dd2['shift']());}}}(a32_0x30a8,0xa0370));import a32_0x404b0d from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{getCliVersion}from'../utils/version.js';function a32_0x30a8(){const _0x41c175=['(not\x20found)','108wwfCtS','\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','✓\x20Valid\x20JSON','bold','skillVersion','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','format','\x20doctor','713696usFBML','\x20\x20kbServiceDomain:\x20','✗\x20Invalid\x20JSON','(missing)','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','state','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','(invalid)','yellow','\x20config\x20delete\x20routing\x20--global','currentApp','\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Skill\x20Version:\x20\x20\x20','repairCommand','project','31986621PNRiKD','region','\x20\x20Merged\x20Config','routing','\x20config','hasOwnProperty','pageSize','packageVersion','(set,\x20length=','\x20config\x20delete\x20routing','\x20\x20runtimeDomain:\x20\x20\x20','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','10211464OWopQL','(none)','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20auth\x20(effective):\x20','\x20\x20Repair\x20global:\x20\x20\x20','inherit','gray','\x20+\x20','registryPath','90TdgfZz','\x20(accessKey)','globalConfig','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','join','\x20Imported\x20from:\x20','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','missing','\x20\x20skillDomain:\x20\x20\x20\x20\x20','\x20\x20Built-in\x20Skill','\x20\x20Service\x20Tree','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','\x20commands)','not\x20configured','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','current','path','7741867moNaXb','⚠\x20Empty','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Repair\x20project:\x20\x20','check','filter','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','accessKey','projectConfig','\x20config\x20delete\x20region','\x20\x20Session\x20check:\x20\x20\x20','\x20\x20Legacy\x20inherit:\x20\x20\x20','status','red','read','✓\x20Loaded','\x20\x20Installed\x20Path:\x20\x20','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','\x20\x20Country/Region\x20Configuration','prototype','⚠\x20Empty\x20(treated\x20as\x20{})','padEnd','\x20\x20API\x20Endpoints','repeat','raw','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Config\x20JSON','75934mNhfpt','312280HYnrEF','name','call','4516004ylGTVp','riskLevel','\x20\x20app\x20locale:\x20\x20\x20\x20\x20\x20','ignored\x20in\x20','\x20\x20Repair\x20project:\x20\x20\x20','installedPath','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','reason','✗\x20Invalid','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','Unavailable\x20until\x20routing\x20configuration\x20is\x20repaired','locale','message','includes','empty','Project','global','commandCount','doctor','✓\x20current','\x20config\x20delete\x20inherit','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','defaultApp','(unnamed)','log','\x20\x20─','version','\x20\x20Config\x20Files','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(default)','serviceCount','arch','green','ClientAk'];a32_0x30a8=function(){return _0x41c175;};return a32_0x30a8();}function a32_0x4318(_0x4afa00,_0x295516){_0x4afa00=_0x4afa00-0xba;const _0x30a8b6=a32_0x30a8();let _0x431876=_0x30a8b6[_0x4afa00];return _0x431876;}import{getApiDomain,getKbServiceDomain,getRuntimeDomain,getSkillDomain,getUserDomain}from'../constant/domain.js';import{normalizeLovrabetRegion}from'../constant/region.js';import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile,loadRawConfigLayers}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{inspectServiceRegistry}from'../commands/service/registry.js';import{inspectBuiltinSkill}from'../skills/builtin-skill.js';async function execute(_0x94a0ef){const _0x496e06=a32_0x4318,_0xa32ac4=getCliVersion(),_0x5c88a9=buildConfigFromFlags({});let _0x31d86e,_0xab894a;try{_0x31d86e=normalizeLovrabetRegion(_0x5c88a9[_0x496e06(0x101)][_0x496e06(0xc4)]);}catch(_0x4ee850){_0xab894a=_0x4ee850 instanceof Error?_0x4ee850:new Error(String(_0x4ee850));}let _0x4e4a05;if(!_0xab894a)try{await initGlobalEnvironment(_0x5c88a9);}catch(_0x5a983d){_0x4e4a05=_0x5a983d instanceof Error?_0x5a983d:new Error(String(_0x5a983d));}console['log'](),console[_0x496e06(0x120)](a32_0x404b0d[_0x496e06(0x12e)](CLI_BIN_NAME+_0x496e06(0x133))),console[_0x496e06(0x120)](a32_0x404b0d[_0x496e06(0xd5)]('─'[_0x496e06(0x100)](0x32))),console[_0x496e06(0x120)](_0x496e06(0x131)+_0xa32ac4),console[_0x496e06(0x120)](_0x496e06(0x11d)+process[_0x496e06(0x122)]),console['log'](_0x496e06(0x130)+process['platform']+'\x20'+process[_0x496e06(0x127)]);const _0x59685b=inspectBuiltinSkill();console[_0x496e06(0x120)](),console[_0x496e06(0x120)](a32_0x404b0d[_0x496e06(0x12e)](_0x496e06(0xe1))),console[_0x496e06(0x120)](a32_0x404b0d[_0x496e06(0xd5)](_0x496e06(0x121)[_0x496e06(0x100)](0x1e))),console[_0x496e06(0x120)]('\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x59685b[_0x496e06(0x139)]===_0x496e06(0xe7)?a32_0x404b0d[_0x496e06(0x128)](_0x496e06(0x11b)):a32_0x404b0d['red']('✗\x20'+_0x59685b[_0x496e06(0x139)]))),console[_0x496e06(0x120)]('\x20\x20Package\x20Version:\x20'+_0x59685b[_0x496e06(0xca)]),console['log'](_0x496e06(0xc0)+(_0x59685b[_0x496e06(0x12f)]||a32_0x404b0d[_0x496e06(0xd5)](_0x496e06(0x137)))),console[_0x496e06(0x120)](_0x496e06(0xf9)+(_0x59685b[_0x496e06(0x10d)]||a32_0x404b0d['gray'](_0x496e06(0x12a))));_0x59685b[_0x496e06(0x139)]!==_0x496e06(0xe7)&&console[_0x496e06(0x120)](_0x496e06(0xbf)+_0x59685b[_0x496e06(0xc1)]);_0x59685b[_0x496e06(0x10f)]&&console[_0x496e06(0x120)](_0x496e06(0x12c)+_0x59685b[_0x496e06(0x10f)]);console[_0x496e06(0x120)](),console[_0x496e06(0x120)](a32_0x404b0d[_0x496e06(0x12e)](_0x496e06(0x123))),console[_0x496e06(0x120)](a32_0x404b0d[_0x496e06(0xd5)](_0x496e06(0x121)['repeat'](0x1e)));const _0xdd253d=getGlobalConfigPath(),_0x3f8f1c=getProjectConfigPath();console[_0x496e06(0x120)](_0x496e06(0xce)+(_0xdd253d||a32_0x404b0d[_0x496e06(0xd5)](_0x496e06(0x12a)))),console[_0x496e06(0x120)](_0x496e06(0x102)+(_0x3f8f1c||a32_0x404b0d['gray'](_0x496e06(0x12a)))),console[_0x496e06(0x120)](),console[_0x496e06(0x120)](a32_0x404b0d[_0x496e06(0x12e)](_0x496e06(0x103))),console[_0x496e06(0x120)](a32_0x404b0d[_0x496e06(0xd5)](_0x496e06(0x121)['repeat'](0x1e)));const _0x56c57f=(_0x40e7a8,_0x1c9a21)=>{const _0x1a3465=_0x496e06;if(!_0x1c9a21){console[_0x1a3465(0x120)]('\x20\x20'+_0x40e7a8[_0x1a3465(0xfe)](0x11)+'\x20'+a32_0x404b0d['gray']('(no\x20file)'));return;}const _0x4fabde=inspectCliConfigJsonFile(_0x1c9a21);if(_0x4fabde[_0x1a3465(0xf5)]==='ok')console[_0x1a3465(0x120)]('\x20\x20'+_0x40e7a8[_0x1a3465(0xfe)](0x11)+'\x20'+a32_0x404b0d[_0x1a3465(0x128)](_0x1a3465(0x12d)));else{if(_0x4fabde[_0x1a3465(0xf5)]===_0x1a3465(0x116))console['log']('\x20\x20'+_0x40e7a8[_0x1a3465(0xfe)](0x11)+'\x20'+a32_0x404b0d[_0x1a3465(0xbc)](_0x1a3465(0xfd)));else _0x4fabde[_0x1a3465(0xf5)]==='missing'?console[_0x1a3465(0x120)]('\x20\x20'+_0x40e7a8[_0x1a3465(0xfe)](0x11)+'\x20'+a32_0x404b0d[_0x1a3465(0xd5)](_0x1a3465(0x137))):(console[_0x1a3465(0x120)]('\x20\x20'+_0x40e7a8[_0x1a3465(0xfe)](0x11)+'\x20'+a32_0x404b0d[_0x1a3465(0xf6)](_0x1a3465(0x136))),console['log']('\x20\x20'+''[_0x1a3465(0xfe)](0x11)+'\x20'+a32_0x404b0d[_0x1a3465(0xf6)](_0x4fabde[_0x1a3465(0x114)])));}};_0x56c57f('Global',_0xdd253d),_0x56c57f(_0x496e06(0x117),_0x3f8f1c);const _0x4196c0=loadRawConfigLayers(),_0x218685=[Object['prototype'][_0x496e06(0xc8)][_0x496e06(0x107)](_0x4196c0[_0x496e06(0xda)],_0x496e06(0xd4))?_0x496e06(0x118):null,Object[_0x496e06(0xfc)][_0x496e06(0xc8)][_0x496e06(0x107)](_0x4196c0[_0x496e06(0xf1)],_0x496e06(0xd4))?_0x496e06(0xc2):null][_0x496e06(0xee)](Boolean);_0x218685['length']>0x0&&(console[_0x496e06(0x120)](_0x496e06(0xf4)+a32_0x404b0d[_0x496e06(0xbc)](_0x496e06(0x10b)+_0x218685[_0x496e06(0xdc)](_0x496e06(0xd6))+_0x496e06(0xc7))),_0x218685[_0x496e06(0x115)](_0x496e06(0xc2))&&console[_0x496e06(0x120)](_0x496e06(0x10c)+CLI_BIN_NAME+_0x496e06(0x11c)),_0x218685[_0x496e06(0x115)](_0x496e06(0x118))&&console[_0x496e06(0x120)]('\x20\x20Repair\x20global:\x20\x20\x20\x20'+CLI_BIN_NAME+'\x20config\x20delete\x20inherit\x20--global'));_0x4e4a05&&(console[_0x496e06(0x120)](),console[_0x496e06(0x120)](a32_0x404b0d[_0x496e06(0x12e)]('\x20\x20Routing\x20Configuration')),console[_0x496e06(0x120)](a32_0x404b0d[_0x496e06(0xd5)](_0x496e06(0x121)[_0x496e06(0x100)](0x1e))),console[_0x496e06(0x120)](_0x496e06(0x124)+a32_0x404b0d[_0x496e06(0xf6)]('✗\x20Invalid')),console[_0x496e06(0x120)]('\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x4e4a05[_0x496e06(0x114)]),Object[_0x496e06(0xfc)][_0x496e06(0xc8)][_0x496e06(0x107)](_0x4196c0['projectConfig'],_0x496e06(0xc6))&&console[_0x496e06(0x120)](_0x496e06(0xec)+CLI_BIN_NAME+_0x496e06(0xcc)),Object['prototype'][_0x496e06(0xc8)][_0x496e06(0x107)](_0x4196c0[_0x496e06(0xda)],_0x496e06(0xc6))&&console[_0x496e06(0x120)]('\x20\x20Repair\x20global:\x20\x20\x20'+CLI_BIN_NAME+_0x496e06(0xbd)));_0xab894a&&(console[_0x496e06(0x120)](),console[_0x496e06(0x120)](a32_0x404b0d[_0x496e06(0x12e)](_0x496e06(0xfb))),console['log'](a32_0x404b0d[_0x496e06(0xd5)](_0x496e06(0x121)[_0x496e06(0x100)](0x1e))),console['log'](_0x496e06(0x124)+a32_0x404b0d['red'](_0x496e06(0x110))),console[_0x496e06(0x120)]('\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0xab894a['message']),Object['prototype'][_0x496e06(0xc8)][_0x496e06(0x107)](_0x4196c0[_0x496e06(0xf1)],_0x496e06(0xc4))&&console['log'](_0x496e06(0xec)+CLI_BIN_NAME+_0x496e06(0xf2)),Object[_0x496e06(0xfc)][_0x496e06(0xc8)][_0x496e06(0x107)](_0x4196c0[_0x496e06(0xda)],'region')&&console['log'](_0x496e06(0xd3)+CLI_BIN_NAME+'\x20config\x20init'));console[_0x496e06(0x120)](),console['log'](a32_0x404b0d[_0x496e06(0x12e)](_0x496e06(0xc5))),console[_0x496e06(0x120)](a32_0x404b0d[_0x496e06(0xd5)]('\x20\x20─'['repeat'](0x1e))),console[_0x496e06(0x120)](_0x496e06(0x10e)+(_0x5c88a9['appCode']||a32_0x404b0d[_0x496e06(0xf6)]('(not\x20set)'))),console[_0x496e06(0x120)]('\x20\x20region:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x31d86e??a32_0x404b0d[_0x496e06(0xf6)](_0x496e06(0xbb)))),console[_0x496e06(0x120)](_0x496e06(0x10a)+_0x5c88a9[_0x496e06(0x113)]),console[_0x496e06(0x120)](_0x496e06(0xdb)+(_0x5c88a9[_0x496e06(0x11e)]||a32_0x404b0d[_0x496e06(0xd5)](_0x496e06(0xd0)))),console['log'](_0x496e06(0xfa)+(_0x5c88a9[_0x496e06(0xbe)]||a32_0x404b0d[_0x496e06(0xd5)](_0x496e06(0xd0)))),console[_0x496e06(0x120)]('\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x5c88a9[_0x496e06(0x132)]||a32_0x404b0d[_0x496e06(0xd5)]('(default:\x20'+DEFAULT_CONFIG_VALUES[_0x496e06(0x132)]+')'))),console[_0x496e06(0x120)](_0x496e06(0xd1)+(_0x5c88a9[_0x496e06(0xc9)]??a32_0x404b0d[_0x496e06(0xd5)](_0x496e06(0x125)))),console[_0x496e06(0x120)](_0x496e06(0x138)+_0x5c88a9[_0x496e06(0x109)]),console[_0x496e06(0x120)](_0x496e06(0xba)+_0x5c88a9['verbose']),console[_0x496e06(0x120)](_0x496e06(0xd2)+AUTH_MODE[_0x496e06(0x129)]),console[_0x496e06(0x120)](_0x496e06(0xe6)+(_0x5c88a9[_0x496e06(0xf0)]?a32_0x404b0d[_0x496e06(0x128)](_0x496e06(0xcb)+_0x5c88a9[_0x496e06(0xf0)]['length']+')'):a32_0x404b0d['gray'](_0x496e06(0xd0)))),console[_0x496e06(0x120)](),console[_0x496e06(0x120)](a32_0x404b0d['bold'](_0x496e06(0xff))),console[_0x496e06(0x120)](a32_0x404b0d[_0x496e06(0xd5)](_0x496e06(0x121)['repeat'](0x1e)));_0x4e4a05||_0xab894a?console[_0x496e06(0x120)](_0x496e06(0x124)+a32_0x404b0d[_0x496e06(0xf6)](_0x496e06(0x112))):(console[_0x496e06(0x120)](_0x496e06(0x111)+getApiDomain()),console[_0x496e06(0x120)](_0x496e06(0x13a)+getUserDomain()),console[_0x496e06(0x120)](_0x496e06(0xcd)+getRuntimeDomain()),console[_0x496e06(0x120)](_0x496e06(0xe0)+getSkillDomain()),console[_0x496e06(0x120)](_0x496e06(0x135)+(getKbServiceDomain()??_0x496e06(0xe5))));console[_0x496e06(0x120)](),console[_0x496e06(0x120)](a32_0x404b0d[_0x496e06(0x12e)](_0x496e06(0xe2))),console[_0x496e06(0x120)](a32_0x404b0d[_0x496e06(0xd5)](_0x496e06(0x121)[_0x496e06(0x100)](0x1e)));const _0x589b0a=inspectServiceRegistry();console[_0x496e06(0x120)](_0x496e06(0xe3)+_0x589b0a[_0x496e06(0xd7)]),console[_0x496e06(0x120)](_0x496e06(0x124)+formatServiceRegistryStatus(_0x589b0a)),console[_0x496e06(0x120)](_0x496e06(0xef)+_0x589b0a[_0x496e06(0x126)]),console[_0x496e06(0x120)](_0x496e06(0xeb)+_0x589b0a[_0x496e06(0x119)]);for(const _0x29c7bb of _0x589b0a['services']){console[_0x496e06(0x120)]('\x20\x20'+(_0x29c7bb['serviceCode']+':')[_0x496e06(0xfe)](0x11)+'\x20'+(_0x29c7bb[_0x496e06(0x106)]||a32_0x404b0d[_0x496e06(0xd5)](_0x496e06(0x11f)))+'\x20('+_0x29c7bb[_0x496e06(0x119)]+_0x496e06(0xe4)),console[_0x496e06(0x120)]('\x20\x20'+''[_0x496e06(0xfe)](0x11)+_0x496e06(0xdd)+_0x29c7bb['source'][_0x496e06(0xe8)]);}return console[_0x496e06(0x120)](),console[_0x496e06(0x120)](a32_0x404b0d[_0x496e06(0x12e)]('\x20\x20Auth')),console[_0x496e06(0x120)](a32_0x404b0d[_0x496e06(0xd5)]('\x20\x20─'[_0x496e06(0x100)](0x1e))),console[_0x496e06(0x120)](_0x496e06(0xde)+a32_0x404b0d[_0x496e06(0x128)](AUTH_MODE[_0x496e06(0x129)]+_0x496e06(0xd9))),console[_0x496e06(0x120)](_0x496e06(0xf3)+a32_0x404b0d['gray']('(removed\x20—\x20cookie\x20auth\x20disabled)')),console['log'](),{'ok':!![]};}function formatServiceRegistryStatus(_0x5e6924){const _0x37b3ed=a32_0x4318;if(_0x5e6924[_0x37b3ed(0xf5)]==='ok')return a32_0x404b0d[_0x37b3ed(0x128)](_0x37b3ed(0xf8));if(_0x5e6924['status']===_0x37b3ed(0xdf))return a32_0x404b0d[_0x37b3ed(0xd5)](_0x37b3ed(0x12a));if(_0x5e6924[_0x37b3ed(0xf5)]==='empty')return a32_0x404b0d['yellow'](_0x37b3ed(0xea));return a32_0x404b0d['red'](_0x37b3ed(0x110)+(_0x5e6924[_0x37b3ed(0x114)]?':\x20'+_0x5e6924['message']:''));}export const doctorDefinition={'service':a32_0x442916(0x11a),'command':a32_0x442916(0xed),'description':'Diagnose\x20CLI\x20configuration\x20and\x20environment','risk':a32_0x442916(0xf7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a33_0xa76771=a33_0x4d15;(function(_0x2a6a21,_0x2eaf97){const _0x2601b7=a33_0x4d15,_0x252251=_0x2a6a21();while(!![]){try{const _0x70482a=parseInt(_0x2601b7(0x169))/0x1+-parseInt(_0x2601b7(0x156))/0x2*(-parseInt(_0x2601b7(0x152))/0x3)+parseInt(_0x2601b7(0x14a))/0x4*(parseInt(_0x2601b7(0x160))/0x5)+-parseInt(_0x2601b7(0x166))/0x6*(parseInt(_0x2601b7(0x148))/0x7)+-parseInt(_0x2601b7(0x15a))/0x8*(parseInt(_0x2601b7(0x159))/0x9)+parseInt(_0x2601b7(0x158))/0xa*(-parseInt(_0x2601b7(0x14b))/0xb)+parseInt(_0x2601b7(0x163))/0xc;if(_0x70482a===_0x2eaf97)break;else _0x252251['push'](_0x252251['shift']());}catch(_0x1c686d){_0x252251['push'](_0x252251['shift']());}}}(a33_0x3741,0x8a1c8));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';function a33_0x4d15(_0xff0e20,_0x3a82e2){_0xff0e20=_0xff0e20-0x147;const _0x37411b=a33_0x3741();let _0x4d155d=_0x37411b[_0xff0e20];return _0x4d155d;}import{queryRuntimeFileUrl,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const FILE_FLAG={'name':a33_0xa76771(0x155),'type':'string','required':!![],'description':a33_0xa76771(0x14e)},FILEPATH_FLAG={'name':a33_0xa76771(0x16a),'type':a33_0xa76771(0x16d),'required':!![],'description':a33_0xa76771(0x153)},DOWNLOAD_FLAG={'name':a33_0xa76771(0x168),'type':'boolean','description':'Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL'},LONG_TERM_FLAG={'name':a33_0xa76771(0x15c),'type':a33_0xa76771(0x165),'description':a33_0xa76771(0x16c)};function requireFilePath(_0x4b82dd){const _0x1329c2=a33_0xa76771,_0x4d5e3d=_0x4b82dd['trim']();if(!_0x4d5e3d)throw CliErrors[_0x1329c2(0x147)](_0x1329c2(0x164));return _0x4d5e3d;}function a33_0x3741(){const _0xa7952=['458005wLLGZF','appCode','query-url','3974964bfhfzV','filePath\x20is\x20required.','boolean','30GXCuGV','description','download','831415VhSJbO','filepath','filePath','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','string','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','validation','344694nEtjzj','body','20iVqcYK','143PKpzho','Uploaded\x20file:\x20','Preview:\x20upload\x20','Path\x20to\x20the\x20local\x20file\x20to\x20upload','/client/uploadFile','upload','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','53727YiqOUq','Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','path','file','86ZTmYul','bool','790810wncTWC','115281JxVyFy','344PzMIry','\x20to\x20runtime\x20app\x20','long-term','read','str','build'];a33_0x3741=function(){return _0xa7952;};return a33_0x3741();}const fileUpload={'service':'file','command':a33_0xa76771(0x150),'description':a33_0xa76771(0x151),'risk':a33_0xa76771(0x15d),'flags':[FILE_FLAG],async 'dryRun'(_0x5273a5){const _0x5d2248=a33_0xa76771,_0x288008=requireRuntimeUploadFile(_0x5273a5['str'](_0x5d2248(0x155)),'File');return dryRun('POST',_0x5d2248(0x14f))[_0x5d2248(0x149)]({'appCode':_0x5273a5[_0x5d2248(0x161)],'multipart':{'file':_0x288008}})[_0x5d2248(0x167)](_0x5d2248(0x14d)+_0x288008[_0x5d2248(0x154)]+_0x5d2248(0x15b)+_0x5273a5[_0x5d2248(0x161)])[_0x5d2248(0x15f)]();},async 'execute'(_0x2131e3){const _0x281fa3=a33_0xa76771,_0x328759=requireRuntimeUploadFile(_0x2131e3[_0x281fa3(0x15e)](_0x281fa3(0x155)),'File'),_0xaf4853=await uploadRuntimeFile(_0x2131e3[_0x281fa3(0x161)],_0x328759['path']);return{'ok':!![],'data':_0xaf4853,'message':_0xaf4853['filePath']?_0x281fa3(0x14c)+_0xaf4853[_0x281fa3(0x16b)]+'.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.':_0x281fa3(0x16e)};}},fileQueryUrl={'service':a33_0xa76771(0x155),'command':a33_0xa76771(0x162),'description':'Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','risk':a33_0xa76771(0x15d),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x4e8b17){const _0x45b8ee=a33_0xa76771,_0x41e844=requireFilePath(_0x4e8b17[_0x45b8ee(0x15e)](_0x45b8ee(0x16a))),_0x24ba53=await queryRuntimeFileUrl(_0x41e844,{'download':_0x4e8b17[_0x45b8ee(0x157)](_0x45b8ee(0x168)),'longTerm':_0x4e8b17[_0x45b8ee(0x157)](_0x45b8ee(0x15c))});return{'ok':!![],'data':_0x24ba53};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
|
package/lib/commands/init.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a34_0x414ee2=a34_0x257d;(function(_0x2139df,_0x4d02e2){const _0x2192f7=a34_0x257d,_0x24287d=_0x2139df();while(!![]){try{const _0x37ebd4=-parseInt(_0x2192f7(0x7c))/0x1+-parseInt(_0x2192f7(0x7d))/0x2*(parseInt(_0x2192f7(0x97))/0x3)+-parseInt(_0x2192f7(0x9c))/0x4*(parseInt(_0x2192f7(0xa4))/0x5)+parseInt(_0x2192f7(0x7b))/0x6+-parseInt(_0x2192f7(0xa5))/0x7+parseInt(_0x2192f7(0x8a))/0x8+parseInt(_0x2192f7(0x9a))/0x9;if(_0x37ebd4===_0x4d02e2)break;else _0x24287d['push'](_0x24287d['shift']());}catch(_0x1d22fb){_0x24287d['push'](_0x24287d['shift']());}}}(a34_0x3459,0x39973));import{existsSync,readFileSync}from'node:fs';import{resolve,isAbsolute}from'node:path';import{CliErrors}from'../errors.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{IMPORTABLE_RUNTIME_CONFIG_KEYS}from'../config/schema.js';import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../context.js';import{PRODUCT_CONFIG}from'../constant/product.js';function a34_0x3459(){const _0x5ef4e3=['log','defaultApp','137313tSYQcu','object','global','6135552WJEVQN','\x20\x20config:\x20\x20','7024JkKDyd','appcode','env','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','string','Override\x20imported\x20default\x20env','\x22.\x20Allowed:\x20','includes','295ptpyjT','1183280DyeilY','Invalid\x20env\x20\x22','879486IHjhpP','411335CKdELR','2aBPbsW','Failed\x20to\x20parse\x20source\x20file:\x20','cwd',')\x20instead\x20of\x20project','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','newConfigFileName','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','Skip\x20confirmation\x20when\x20overwriting','message','entries','apps','file','join','1098656GOgBWp','Override\x20imported\x20default\x20appcode','riskLevel','parse','project','Write\x20to\x20global\x20(~/','app','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`.','validation','\x20\x20default:\x20','boolean'];a34_0x3459=function(){return _0x5ef4e3;};return a34_0x3459();}export const appImportFlagDefs=[{'name':a34_0x414ee2(0x88),'type':a34_0x414ee2(0xa0),'description':'Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','required':!![]},{'name':'appcode','type':a34_0x414ee2(0xa0),'description':a34_0x414ee2(0x8b)},{'name':a34_0x414ee2(0x9e),'type':'string','description':a34_0x414ee2(0xa1),'enum':[...RUNTIME_ENV_VALUES]},{'name':a34_0x414ee2(0x99),'type':a34_0x414ee2(0x94),'description':a34_0x414ee2(0x8f)+PRODUCT_CONFIG[a34_0x414ee2(0x82)]+a34_0x414ee2(0x80),'default':![]},{'name':'yes','type':a34_0x414ee2(0x94),'description':a34_0x414ee2(0x84),'default':![]}];export async function runAppImport(_0x2c1104){const _0x29a068=a34_0x414ee2,_0x26852a=_0x2c1104[_0x29a068(0x99)]?_0x29a068(0x99):_0x29a068(0x8e),_0x14545e=resolveWriteConfigPath(_0x26852a);await runFromImport(_0x2c1104,_0x14545e);}async function runFromImport(_0x304f98,_0x40a2db){const _0xadfcc9=a34_0x414ee2,_0x22aea9=resolveFilePath(_0x304f98[_0xadfcc9(0x88)]);if(!existsSync(_0x22aea9))throw CliErrors[_0xadfcc9(0x92)]('Source\x20file\x20not\x20found:\x20'+_0x22aea9);const _0x146209=readSourceFile(_0x22aea9),_0x3256ca=convertToRuntimeConfig(_0x146209);_0x304f98['appcode']&&(_0x3256ca[_0xadfcc9(0x9d)]=String(_0x304f98['appcode']));_0x304f98[_0xadfcc9(0x9e)]&&(_0x3256ca[_0xadfcc9(0x9e)]=resolveImportEnv(_0x304f98));if(!_0x3256ca[_0xadfcc9(0x9d)])throw CliErrors['validation'](_0xadfcc9(0x83),_0xadfcc9(0x91));await writeImportConfig(_0x40a2db,_0x3256ca,_0x304f98),console[_0xadfcc9(0x95)]('Imported\x20from\x20'+_0x22aea9),console[_0xadfcc9(0x95)](_0xadfcc9(0x9b)+_0x40a2db),console[_0xadfcc9(0x95)]('\x20\x20appcode:\x20'+_0x3256ca['appcode']);if(_0x3256ca[_0xadfcc9(0x96)])console['log'](_0xadfcc9(0x93)+_0x3256ca[_0xadfcc9(0x96)]);}function a34_0x257d(_0x28646b,_0x4eff5e){_0x28646b=_0x28646b-0x7b;const _0x345934=a34_0x3459();let _0x257da1=_0x345934[_0x28646b];return _0x257da1;}function convertToRuntimeConfig(_0x37c339){const _0xc7c7f3=a34_0x414ee2;if(_0x37c339[_0xc7c7f3(0x87)]&&typeof _0x37c339[_0xc7c7f3(0x87)]===_0xc7c7f3(0x98))throw CliErrors[_0xc7c7f3(0x92)](_0xc7c7f3(0x81),_0xc7c7f3(0x9f));const _0x3cd968={};for(const _0x4aceb8 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x37c339[_0x4aceb8]!==undefined&&(_0x3cd968[_0x4aceb8]=_0x37c339[_0x4aceb8]);}return!_0x3cd968['riskLevel']&&(_0x3cd968['riskLevel']=DEFAULT_CONFIG_VALUES[_0xc7c7f3(0x8c)]),_0x3cd968;}async function writeImportConfig(_0x11633d,_0xc54f8e,_0x1f8d79){const _0x10bed4=a34_0x414ee2;let _0x3f867c={};existsSync(_0x11633d)&&!_0x1f8d79['yes']&&(_0x3f867c=readConfigFile(_0x11633d));for(const [_0x1b4263,_0x2e228e]of Object[_0x10bed4(0x86)](_0xc54f8e)){_0x2e228e!==undefined&&(_0x3f867c[_0x1b4263]=_0x2e228e);}if(_0x3f867c[_0x10bed4(0x90)])delete _0x3f867c[_0x10bed4(0x90)];writeConfigFile(_0x11633d,_0x3f867c);}function resolveFilePath(_0x57aba6){const _0x233ca7=a34_0x414ee2;return isAbsolute(_0x57aba6)?_0x57aba6:resolve(process[_0x233ca7(0x7f)](),_0x57aba6);}function readSourceFile(_0x628f51){const _0x58c2e4=a34_0x414ee2;try{const _0x37cfc1=readFileSync(_0x628f51,{'encoding':'utf8'});return JSON[_0x58c2e4(0x8d)](_0x37cfc1);}catch(_0x2f0db4){throw CliErrors[_0x58c2e4(0x92)](_0x58c2e4(0x7e)+_0x2f0db4[_0x58c2e4(0x85)]);}}function resolveImportEnv(_0x5828c1){const _0x297e22=a34_0x414ee2,_0x2f1f9b=_0x5828c1[_0x297e22(0x9e)];if(_0x2f1f9b===undefined||_0x2f1f9b==='')return DEFAULT_CONFIG_VALUES[_0x297e22(0x9e)];if(!RUNTIME_ENV_VALUES[_0x297e22(0xa3)](_0x2f1f9b))throw CliErrors[_0x297e22(0x92)](_0x297e22(0xa6)+_0x2f1f9b+_0x297e22(0xa2)+RUNTIME_ENV_VALUES[_0x297e22(0x89)](',\x20'));return _0x2f1f9b;}
|
package/lib/commands/kb/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a35_0x26e6e7=a35_0xef24;(function(_0x84807,_0x195481){const _0x134271=a35_0xef24,_0x3cc3c0=_0x84807();while(!![]){try{const _0x7f06ce=-parseInt(_0x134271(0x21e))/0x1+parseInt(_0x134271(0x212))/0x2+-parseInt(_0x134271(0x1f4))/0x3+-parseInt(_0x134271(0x1fa))/0x4+-parseInt(_0x134271(0x20e))/0x5*(parseInt(_0x134271(0x207))/0x6)+parseInt(_0x134271(0x208))/0x7*(-parseInt(_0x134271(0x1f8))/0x8)+-parseInt(_0x134271(0x227))/0x9*(-parseInt(_0x134271(0x214))/0xa);if(_0x7f06ce===_0x195481)break;else _0x3cc3c0['push'](_0x3cc3c0['shift']());}catch(_0x30ad30){_0x3cc3c0['push'](_0x3cc3c0['shift']());}}}(a35_0x3eda,0xbcd05));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalKnowledgeBaseItem,getPersonalKnowledgeBaseItem,listPersonalKnowledgeBaseItems,updatePersonalKnowledgeBaseItem}from'../../core/api-client.js';import{searchDirectKnowledge,normalizeKbServiceOrigin}from'../../core/kb-search-client.js';function a35_0xef24(_0x1db970,_0x474d8a){_0x1db970=_0x1db970-0x1ef;const _0x3edabf=a35_0x3eda();let _0xef2467=_0x3edabf[_0x1db970];return _0xef2467;}import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{getKbServiceDomain}from'../../constant/domain.js';import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':a35_0x26e6e7(0x22a),'type':'string','required':!![],'description':a35_0x26e6e7(0x229)},FILE_FLAG={'name':'file','type':a35_0x26e6e7(0x1fe),'required':!![],'description':'Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file'},QUERY_FLAG={'name':a35_0x26e6e7(0x203),'type':'string','required':!![],'description':a35_0x26e6e7(0x206)},TOPK_FLAG={'name':a35_0x26e6e7(0x224),'type':'number','description':a35_0x26e6e7(0x201)};function a35_0x3eda(){const _0x479c3a=['signal','File\x20not\x20found:\x20','validation','/update','flag','KB\x20Service\x20is\x20not\x20configured\x20for\x20knowledge\x20search.','POST','2695875CiCRYY','Updated\x20KB\x20entry\x20','str','File\x20is\x20not\x20a\x20regular\x20file:\x20','784pqAMaX','search','2488604kfeJhP','read','body','Replaces\x20the\x20personal\x20knowledge-base\x20entry\x20body\x20with\x20local\x20file\x20content\x20and\x20triggers\x20retrieval\x20sync.','string','file','appCode','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','query','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','create','Search\x20query\x20for\x20visible\x20public,\x20company,\x20and\x20personal\x20knowledge','591258GkuZDQ','85771GQuLlO','description','Personal\x20knowledge-base\x20entry\x20ID','num','updateTime','accessKey','75YagKKy','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','Created\x20KB\x20entry\x20','Override\x20the\x20existing\x20entry\x20title','2708548vPCfLo','--topk\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.','10wlEoDG','scope','update','version','Configure\x20kbServiceDomain\x20in\x20the\x20connection\x20settings,\x20or\x20pass\x20`--kb-service-url\x20<https-origin>`\x20for\x20this\x20request.','list','/client/knowledge-base/personal/create','File\x20path\x20is\x20required.','Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20','userId','1513417FDSSXW','Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','Search\x20query\x20is\x20required.','trim','isFile','Optional\x20trusted\x20KB\x20Service\x20HTTPS\x20origin\x20for\x20this\x20request\x20only','topk','write','createTime','46190151zPQpCI','/client/knowledge-base/personal/','Personal\x20knowledge-base\x20entry\x20title','title','ragStatus','kb-service-url','verbose','length','build'];a35_0x3eda=function(){return _0x479c3a;};return a35_0x3eda();}function readKnowledgeFile(_0x181224){const _0x362c85=a35_0x26e6e7;if(!_0x181224)throw CliErrors[_0x362c85(0x1ef)](_0x362c85(0x21b));if(!existsSync(_0x181224))throw CliErrors[_0x362c85(0x1ef)](_0x362c85(0x231)+_0x181224);if(!statSync(_0x181224)[_0x362c85(0x222)]())throw CliErrors[_0x362c85(0x1ef)](_0x362c85(0x1f7)+_0x181224);return readFileSync(_0x181224,'utf8');}function summarizePersonalItem(_0x377e22){const _0x244247=a35_0x26e6e7;return{'id':_0x377e22['id'],'title':_0x377e22[_0x244247(0x22a)],'version':_0x377e22[_0x244247(0x217)],'ragStatus':_0x377e22[_0x244247(0x22b)],'ragErrorMessage':_0x377e22['ragErrorMessage'],'updateTime':_0x377e22[_0x244247(0x20c)]};}function detailPersonalItem(_0x14ba73){const _0x295373=a35_0x26e6e7;return{'id':_0x14ba73['id'],'appCode':_0x14ba73['appCode'],'scope':_0x14ba73[_0x295373(0x215)],'userId':_0x14ba73[_0x295373(0x21d)],'title':_0x14ba73[_0x295373(0x22a)],'content':_0x14ba73['content']??'','version':_0x14ba73[_0x295373(0x217)],'ragStatus':_0x14ba73[_0x295373(0x22b)],'ragErrorMessage':_0x14ba73['ragErrorMessage'],'createTime':_0x14ba73[_0x295373(0x226)],'updateTime':_0x14ba73['updateTime']};}function readTopK(_0x2c1ce0){const _0x2a941e=a35_0x26e6e7,_0x2a758b=_0x2c1ce0[_0x2a941e(0x1f1)](_0x2a941e(0x224));if(_0x2a758b===undefined||_0x2a758b===null||_0x2a758b==='')return undefined;const _0x24e302=_0x2c1ce0['num'](_0x2a941e(0x224));if(!Number['isSafeInteger'](_0x24e302)||_0x24e302<0x1||_0x24e302>0x32)throw CliErrors[_0x2a941e(0x1ef)](_0x2a941e(0x213));return _0x24e302;}const kbList={'service':'kb','command':a35_0x26e6e7(0x219),'description':a35_0x26e6e7(0x20f),'risk':a35_0x26e6e7(0x1fb),'flags':[VERBOSE_FLAG],async 'execute'(_0x29b675){const _0x3b11f4=a35_0x26e6e7,_0x63de8b=await listPersonalKnowledgeBaseItems(_0x29b675[_0x3b11f4(0x200)]);if(_0x29b675['bool'](_0x3b11f4(0x22d)))return{'ok':!![],'data':{'total':_0x63de8b[_0x3b11f4(0x22e)],'items':_0x63de8b}};return{'ok':!![],'data':{'total':_0x63de8b[_0x3b11f4(0x22e)],'items':_0x63de8b['map'](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':'detail','description':a35_0x26e6e7(0x202),'risk':'read','flags':[{...ID_FLAG,'description':a35_0x26e6e7(0x20a)}],async 'execute'(_0x3bf98f){const _0x26c55b=a35_0x26e6e7,_0x130e57=await getPersonalKnowledgeBaseItem(_0x3bf98f[_0x26c55b(0x20b)]('id'),_0x3bf98f[_0x26c55b(0x200)]);return{'ok':!![],'data':detailPersonalItem(_0x130e57)};}},kbCreate={'service':'kb','command':a35_0x26e6e7(0x205),'description':a35_0x26e6e7(0x21f),'risk':a35_0x26e6e7(0x225),'confirmationDescription':'Saves\x20local\x20file\x20content\x20as\x20a\x20personal\x20knowledge-base\x20entry\x20and\x20starts\x20retrieval\x20sync.','flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x591e60){const _0x59bf32=a35_0x26e6e7,_0x2a05e7=_0x591e60['str'](_0x59bf32(0x22a)),_0x310903=readKnowledgeFile(_0x591e60[_0x59bf32(0x1f6)](_0x59bf32(0x1ff))),_0xd2ab0=await createPersonalKnowledgeBaseItem(_0x591e60[_0x59bf32(0x200)],{'title':_0x2a05e7,'content':_0x310903});return{'ok':!![],'data':summarizePersonalItem(_0xd2ab0),'message':_0x59bf32(0x210)+_0xd2ab0['id']+'\x20('+_0xd2ab0[_0x59bf32(0x22a)]+')'};},async 'dryRun'(_0xd59cea){const _0x312495=a35_0x26e6e7,_0x3ce749=_0xd59cea[_0x312495(0x1f6)](_0x312495(0x22a)),_0x271869=readKnowledgeFile(_0xd59cea[_0x312495(0x1f6)]('file'));return dryRun(_0x312495(0x1f3),_0x312495(0x21a))['body']({'appCode':_0xd59cea[_0x312495(0x200)],'title':_0x3ce749,'content':_0x271869})[_0x312495(0x209)](_0x312495(0x204)+_0x3ce749+'\x22')[_0x312495(0x22f)]();}},kbUpdate={'service':'kb','command':a35_0x26e6e7(0x216),'description':'Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','risk':a35_0x26e6e7(0x225),'confirmationDescription':a35_0x26e6e7(0x1fd),'flags':[{...ID_FLAG,'description':'Personal\x20knowledge-base\x20entry\x20ID'},{...TITLE_FLAG,'required':![],'description':a35_0x26e6e7(0x211)},FILE_FLAG],async 'execute'(_0x283858){const _0x536308=a35_0x26e6e7,_0x1f9aff=_0x283858[_0x536308(0x20b)]('id'),_0x27e2=readKnowledgeFile(_0x283858[_0x536308(0x1f6)]('file')),_0x4a531b=_0x283858['str']('title')||(await getPersonalKnowledgeBaseItem(_0x1f9aff,_0x283858['appCode']))[_0x536308(0x22a)],_0x1f1c50=await updatePersonalKnowledgeBaseItem(_0x1f9aff,_0x283858[_0x536308(0x200)],{'title':_0x4a531b,'content':_0x27e2});return{'ok':!![],'data':summarizePersonalItem(_0x1f1c50),'message':_0x536308(0x1f5)+_0x1f1c50['id']+'\x20('+_0x1f1c50['title']+')'};},async 'dryRun'(_0x28a2e3){const _0xb4b2ca=a35_0x26e6e7,_0x569dfd=_0x28a2e3[_0xb4b2ca(0x20b)]('id'),_0x2a51ea=readKnowledgeFile(_0x28a2e3[_0xb4b2ca(0x1f6)](_0xb4b2ca(0x1ff))),_0x424c94=_0x28a2e3[_0xb4b2ca(0x1f6)](_0xb4b2ca(0x22a))||(await getPersonalKnowledgeBaseItem(_0x569dfd,_0x28a2e3['appCode']))[_0xb4b2ca(0x22a)];return dryRun(_0xb4b2ca(0x1f3),_0xb4b2ca(0x228)+_0x569dfd+_0xb4b2ca(0x1f0))[_0xb4b2ca(0x1fc)]({'appCode':_0x28a2e3['appCode'],'title':_0x424c94,'content':_0x2a51ea})[_0xb4b2ca(0x209)](_0xb4b2ca(0x21c)+_0x569dfd)['build']();}};function readSearchServiceUrl(_0x70962e){const _0x15c56a=a35_0x26e6e7;if(_0x70962e['flag'](_0x15c56a(0x22c))!==undefined)return normalizeKbServiceOrigin(_0x70962e[_0x15c56a(0x1f6)](_0x15c56a(0x22c)));const _0x1ada91=getKbServiceDomain();if(!_0x1ada91)throw CliErrors[_0x15c56a(0x1ef)](_0x15c56a(0x1f2),_0x15c56a(0x218));return normalizeKbServiceOrigin(_0x1ada91);}const kbSearch={'service':'kb','command':a35_0x26e6e7(0x1f9),'description':'Search\x20visible\x20public,\x20company,\x20and\x20personal\x20knowledge','risk':a35_0x26e6e7(0x1fb),'flags':[QUERY_FLAG,TOPK_FLAG,{'name':a35_0x26e6e7(0x22c),'type':'string','required':![],'description':a35_0x26e6e7(0x223)}],async 'validate'(_0x369427){const _0x445f84=a35_0x26e6e7;if(!_0x369427['str'](_0x445f84(0x203))['trim']())throw CliErrors[_0x445f84(0x1ef)](_0x445f84(0x220));readTopK(_0x369427),readSearchServiceUrl(_0x369427);},async 'execute'(_0x3d5450){const _0x5db292=a35_0x26e6e7,_0x505aab=_0x3d5450[_0x5db292(0x1f6)]('query')[_0x5db292(0x221)](),_0x362675=readTopK(_0x3d5450),_0x4ebe12=readSearchServiceUrl(_0x3d5450),_0x290e6a={'appCode':_0x3d5450['appCode'],'accessKey':_0x3d5450[_0x5db292(0x20d)]??'','query':_0x505aab,..._0x362675!==undefined?{'topK':_0x362675}:{},'signal':_0x3d5450[_0x5db292(0x230)]},_0x46b730=await searchDirectKnowledge({..._0x290e6a,'serviceUrl':_0x4ebe12});return{'ok':!![],'data':_0x46b730};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
|
|
1
|
+
const a35_0x535084=a35_0x3678;(function(_0x32b56b,_0x2949b9){const _0x6ccf63=a35_0x3678,_0x54ba64=_0x32b56b();while(!![]){try{const _0x9c4d6a=parseInt(_0x6ccf63(0xf1))/0x1+parseInt(_0x6ccf63(0xe5))/0x2+-parseInt(_0x6ccf63(0xff))/0x3+parseInt(_0x6ccf63(0xd3))/0x4*(-parseInt(_0x6ccf63(0xf8))/0x5)+parseInt(_0x6ccf63(0xcb))/0x6+parseInt(_0x6ccf63(0xf9))/0x7*(-parseInt(_0x6ccf63(0xd6))/0x8)+parseInt(_0x6ccf63(0xf0))/0x9;if(_0x9c4d6a===_0x2949b9)break;else _0x54ba64['push'](_0x54ba64['shift']());}catch(_0x4215bb){_0x54ba64['push'](_0x54ba64['shift']());}}}(a35_0x38c3,0xd1e74));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalKnowledgeBaseItem,getPersonalKnowledgeBaseItem,listPersonalKnowledgeBaseItems,updatePersonalKnowledgeBaseItem}from'../../core/api-client.js';function a35_0x3678(_0x394f91,_0x97e231){_0x394f91=_0x394f91-0xc5;const _0x38c3aa=a35_0x38c3();let _0x3678fd=_0x38c3aa[_0x394f91];return _0x3678fd;}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':a35_0x535084(0xd8),'type':a35_0x535084(0x102),'required':!![],'description':a35_0x535084(0xe4)},FILE_FLAG={'name':a35_0x535084(0xe7),'type':'string','required':!![],'description':a35_0x535084(0x104)},QUERY_FLAG={'name':a35_0x535084(0xec),'type':a35_0x535084(0x102),'required':!![],'description':a35_0x535084(0xe1)},TOPK_FLAG={'name':a35_0x535084(0xeb),'type':'number','description':a35_0x535084(0xf4)};function readKnowledgeFile(_0x1759ad){const _0x5844c7=a35_0x535084;if(!_0x1759ad)throw CliErrors[_0x5844c7(0xc5)](_0x5844c7(0xe2));if(!existsSync(_0x1759ad))throw CliErrors[_0x5844c7(0xc5)](_0x5844c7(0xdc)+_0x1759ad);if(!statSync(_0x1759ad)['isFile']())throw CliErrors['validation']('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x1759ad);return readFileSync(_0x1759ad,'utf8');}function summarizePersonalItem(_0x20792c){const _0x52a5f9=a35_0x535084;return{'id':_0x20792c['id'],'title':_0x20792c['title'],'version':_0x20792c[_0x52a5f9(0xfc)],'ragStatus':_0x20792c[_0x52a5f9(0xdb)],'ragErrorMessage':_0x20792c[_0x52a5f9(0xd5)],'updateTime':_0x20792c[_0x52a5f9(0xfb)]};}function detailPersonalItem(_0x3e8153){const _0xc47aa4=a35_0x535084;return{'id':_0x3e8153['id'],'appCode':_0x3e8153[_0xc47aa4(0xfa)],'scope':_0x3e8153['scope'],'userId':_0x3e8153[_0xc47aa4(0xee)],'title':_0x3e8153['title'],'content':_0x3e8153[_0xc47aa4(0xd0)]??'','version':_0x3e8153[_0xc47aa4(0xfc)],'ragStatus':_0x3e8153['ragStatus'],'ragErrorMessage':_0x3e8153['ragErrorMessage'],'createTime':_0x3e8153['createTime'],'updateTime':_0x3e8153[_0xc47aa4(0xfb)]};}function readTopK(_0x5ca1c9){const _0x1ca65b=a35_0x535084,_0x303d6d=_0x5ca1c9['flag'](_0x1ca65b(0xeb));if(_0x303d6d===undefined||_0x303d6d===null||_0x303d6d==='')return undefined;const _0x108d7b=_0x5ca1c9[_0x1ca65b(0xcc)]('topk');if(!Number[_0x1ca65b(0xca)](_0x108d7b)||_0x108d7b<0x1||_0x108d7b>0x32)throw CliErrors[_0x1ca65b(0xc5)](_0x1ca65b(0xdd));return _0x108d7b;}const kbList={'service':'kb','command':'list','description':a35_0x535084(0xfd),'risk':a35_0x535084(0xcd),'flags':[VERBOSE_FLAG],async 'execute'(_0x4aff97){const _0x689673=a35_0x535084,_0x152d4b=await listPersonalKnowledgeBaseItems(_0x4aff97['appCode']);if(_0x4aff97[_0x689673(0xe6)](_0x689673(0xcf)))return{'ok':!![],'data':{'total':_0x152d4b[_0x689673(0xf2)],'items':_0x152d4b}};return{'ok':!![],'data':{'total':_0x152d4b[_0x689673(0xf2)],'items':_0x152d4b['map'](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a35_0x535084(0xce),'description':a35_0x535084(0xf7),'risk':a35_0x535084(0xcd),'flags':[{...ID_FLAG,'description':a35_0x535084(0xe3)}],async 'execute'(_0x29540d){const _0x4dc79f=a35_0x535084,_0x488ebe=await getPersonalKnowledgeBaseItem(_0x29540d[_0x4dc79f(0xcc)]('id'),_0x29540d[_0x4dc79f(0xfa)]);return{'ok':!![],'data':detailPersonalItem(_0x488ebe)};}},kbCreate={'service':'kb','command':a35_0x535084(0xc7),'description':a35_0x535084(0x100),'risk':a35_0x535084(0xd9),'confirmationDescription':'Saves\x20local\x20file\x20content\x20as\x20a\x20personal\x20knowledge-base\x20entry\x20and\x20starts\x20retrieval\x20sync.','flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x342bc8){const _0x23e774=a35_0x535084,_0x40a12f=_0x342bc8[_0x23e774(0xef)](_0x23e774(0xd8)),_0x2d2bac=readKnowledgeFile(_0x342bc8['str']('file')),_0x14966d=await createPersonalKnowledgeBaseItem(_0x342bc8[_0x23e774(0xfa)],{'title':_0x40a12f,'content':_0x2d2bac});return{'ok':!![],'data':summarizePersonalItem(_0x14966d),'message':'Created\x20KB\x20entry\x20'+_0x14966d['id']+'\x20('+_0x14966d[_0x23e774(0xd8)]+')'};},async 'dryRun'(_0x5f5dea){const _0x3644c0=a35_0x535084,_0x3e2e2b=_0x5f5dea[_0x3644c0(0xef)](_0x3644c0(0xd8)),_0x5e6145=readKnowledgeFile(_0x5f5dea[_0x3644c0(0xef)](_0x3644c0(0xe7)));return dryRun(_0x3644c0(0xde),_0x3644c0(0xd4))[_0x3644c0(0xc6)]({'appCode':_0x5f5dea['appCode'],'title':_0x3e2e2b,'content':_0x5e6145})[_0x3644c0(0xe0)](_0x3644c0(0xfe)+_0x3e2e2b+'\x22')[_0x3644c0(0xe8)]();}},kbUpdate={'service':'kb','command':a35_0x535084(0xd2),'description':a35_0x535084(0xf5),'risk':a35_0x535084(0xd9),'confirmationDescription':'Replaces\x20the\x20personal\x20knowledge-base\x20entry\x20body\x20with\x20local\x20file\x20content\x20and\x20triggers\x20retrieval\x20sync.','flags':[{...ID_FLAG,'description':'Personal\x20knowledge-base\x20entry\x20ID'},{...TITLE_FLAG,'required':![],'description':a35_0x535084(0x101)},FILE_FLAG],async 'execute'(_0x1074ed){const _0x13307a=a35_0x535084,_0x150223=_0x1074ed[_0x13307a(0xcc)]('id'),_0x445340=readKnowledgeFile(_0x1074ed[_0x13307a(0xef)](_0x13307a(0xe7))),_0x30723b=_0x1074ed[_0x13307a(0xef)](_0x13307a(0xd8))||(await getPersonalKnowledgeBaseItem(_0x150223,_0x1074ed[_0x13307a(0xfa)]))[_0x13307a(0xd8)],_0x3b19b6=await updatePersonalKnowledgeBaseItem(_0x150223,_0x1074ed[_0x13307a(0xfa)],{'title':_0x30723b,'content':_0x445340});return{'ok':!![],'data':summarizePersonalItem(_0x3b19b6),'message':_0x13307a(0xf6)+_0x3b19b6['id']+'\x20('+_0x3b19b6['title']+')'};},async 'dryRun'(_0x1259b3){const _0x3672bd=a35_0x535084,_0x288a3f=_0x1259b3['num']('id'),_0x204a29=readKnowledgeFile(_0x1259b3[_0x3672bd(0xef)](_0x3672bd(0xe7))),_0x45b4d2=_0x1259b3[_0x3672bd(0xef)](_0x3672bd(0xd8))||(await getPersonalKnowledgeBaseItem(_0x288a3f,_0x1259b3['appCode']))[_0x3672bd(0xd8)];return dryRun(_0x3672bd(0xde),'/client/knowledge-base/personal/'+_0x288a3f+_0x3672bd(0xd1))[_0x3672bd(0xc6)]({'appCode':_0x1259b3[_0x3672bd(0xfa)],'title':_0x45b4d2,'content':_0x204a29})['description']('Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20'+_0x288a3f)[_0x3672bd(0xe8)]();}};function readSearchServiceUrl(_0xcca1ee){const _0x322339=a35_0x535084;if(_0xcca1ee[_0x322339(0xf3)](_0x322339(0x103))!==undefined)return normalizeKbServiceOrigin(_0xcca1ee[_0x322339(0xef)]('kb-service-url'));const _0x898932=getKbServiceDomain();if(!_0x898932)throw CliErrors[_0x322339(0xc5)](_0x322339(0xda),_0x322339(0xc9));return normalizeKbServiceOrigin(_0x898932);}function a35_0x38c3(){const _0x2975f0=['accessKey','topk','query','Search\x20visible\x20public,\x20company,\x20and\x20personal\x20knowledge','userId','str','9981648tPYbwu','149119llEIVl','length','flag','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','Updated\x20KB\x20entry\x20','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','531210WgxbcU','18179TeXEve','appCode','updateTime','version','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','3493134NqIvLK','Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','Override\x20the\x20existing\x20entry\x20title','string','kb-service-url','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','Search\x20query\x20is\x20required.','validation','body','create','trim','Configure\x20kbServiceDomain\x20in\x20the\x20connection\x20settings,\x20or\x20pass\x20`--kb-service-url\x20<https-origin>`\x20for\x20this\x20request.','isSafeInteger','4767894dekMAu','num','read','detail','verbose','content','/update','update','8cJEqRF','/client/knowledge-base/personal/create','ragErrorMessage','56KRYERf','signal','title','write','KB\x20Service\x20is\x20not\x20configured\x20for\x20knowledge\x20search.','ragStatus','File\x20not\x20found:\x20','--topk\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.','POST','search','description','Search\x20query\x20for\x20visible\x20public,\x20company,\x20and\x20personal\x20knowledge','File\x20path\x20is\x20required.','Personal\x20knowledge-base\x20entry\x20ID','Personal\x20knowledge-base\x20entry\x20title','403930YDkTEz','bool','file','build','Optional\x20trusted\x20KB\x20Service\x20HTTPS\x20origin\x20for\x20this\x20request\x20only'];a35_0x38c3=function(){return _0x2975f0;};return a35_0x38c3();}const kbSearch={'service':'kb','command':a35_0x535084(0xdf),'description':a35_0x535084(0xed),'risk':a35_0x535084(0xcd),'flags':[QUERY_FLAG,TOPK_FLAG,{'name':a35_0x535084(0x103),'type':a35_0x535084(0x102),'required':![],'description':a35_0x535084(0xe9)}],async 'validate'(_0x390012){const _0x3eeaf0=a35_0x535084;if(!_0x390012[_0x3eeaf0(0xef)](_0x3eeaf0(0xec))[_0x3eeaf0(0xc8)]())throw CliErrors[_0x3eeaf0(0xc5)](_0x3eeaf0(0x105));readTopK(_0x390012),readSearchServiceUrl(_0x390012);},async 'execute'(_0x5ac927){const _0x47f53e=a35_0x535084,_0xd8352a=_0x5ac927['str'](_0x47f53e(0xec))['trim'](),_0x210848=readTopK(_0x5ac927),_0xa2cab5=readSearchServiceUrl(_0x5ac927),_0x13065b={'appCode':_0x5ac927['appCode'],'accessKey':_0x5ac927[_0x47f53e(0xea)]??'','query':_0xd8352a,..._0x210848!==undefined?{'topK':_0x210848}:{},'signal':_0x5ac927[_0x47f53e(0xd7)]},_0x4c22ca=await searchDirectKnowledge({..._0x13065b,'serviceUrl':_0xa2cab5});return{'ok':!![],'data':_0x4c22ca};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a36_0x37bb(_0x45c08a,_0x2c3901){_0x45c08a=_0x45c08a-0x13c;const _0x47f9b9=a36_0x47f9();let _0x37bb11=_0x47f9b9[_0x45c08a];return _0x37bb11;}const a36_0x5c88e2=a36_0x37bb;(function(_0x53cd2e,_0x119c17){const _0x29962c=a36_0x37bb,_0x53f44b=_0x53cd2e();while(!![]){try{const _0x369bc6=-parseInt(_0x29962c(0x14b))/0x1+parseInt(_0x29962c(0x158))/0x2*(parseInt(_0x29962c(0x140))/0x3)+parseInt(_0x29962c(0x14d))/0x4+-parseInt(_0x29962c(0x145))/0x5+parseInt(_0x29962c(0x14e))/0x6*(parseInt(_0x29962c(0x155))/0x7)+-parseInt(_0x29962c(0x15a))/0x8*(parseInt(_0x29962c(0x151))/0x9)+-parseInt(_0x29962c(0x156))/0xa*(-parseInt(_0x29962c(0x153))/0xb);if(_0x369bc6===_0x119c17)break;else _0x53f44b['push'](_0x53f44b['shift']());}catch(_0x53ac74){_0x53f44b['push'](_0x53f44b['shift']());}}}(a36_0x47f9,0x4630e));import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function a36_0x47f9(){const _0x73d9f8=['121QpeIjG','readLogs','4151iCrOXH','386930YCrmiL','success','858842xbVzCz','keys','3950216ADngAH','level','stringify','details','forEach','3xtSxVF','toLocaleString','\x20logs:\x0a','message','log','1471130qIlKHX','length','*\x20No\x20logs\x20found','duration','\x20\x20\x20Time:\x20','logs','374393RbtISV','timestamp','382192RGDfuc','5052NFvvTw','read','View\x20command\x20history\x20logs','9TNtGhs','\x20\x20\x20Details:\x20'];a36_0x47f9=function(){return _0x73d9f8;};return a36_0x47f9();}function printLogs(_0x1d3d18){const _0x1e7bb1=a36_0x37bb;if(_0x1d3d18[_0x1e7bb1(0x146)]===0x0){console[_0x1e7bb1(0x144)](_0x1e7bb1(0x147));return;}console['log']('*\x20'+CLI_DISPLAY_NAME+_0x1e7bb1(0x142)),_0x1d3d18[_0x1e7bb1(0x13f)]((_0x4a39bb,_0x281475)=>{const _0x327864=_0x1e7bb1,_0x461bb6=new Date(_0x4a39bb[_0x327864(0x14c)])[_0x327864(0x141)]('en-US'),_0x2eba3e=_0x4a39bb[_0x327864(0x13c)]===_0x327864(0x157)?'√':_0x4a39bb[_0x327864(0x13c)]==='error'?'×':_0x4a39bb[_0x327864(0x13c)]==='warn'?'!':'i';console[_0x327864(0x144)](_0x281475+0x1+'.\x20'+_0x2eba3e+'\x20['+_0x4a39bb['command']+']\x20'+_0x4a39bb[_0x327864(0x143)]),console[_0x327864(0x144)](_0x327864(0x149)+_0x461bb6),_0x4a39bb[_0x327864(0x148)]&&console['log']('\x20\x20\x20Duration:\x20'+_0x4a39bb[_0x327864(0x148)]+'ms'),_0x4a39bb[_0x327864(0x13e)]&&Object[_0x327864(0x159)](_0x4a39bb['details'])[_0x327864(0x146)]>0x0&&console[_0x327864(0x144)](_0x327864(0x152)+JSON[_0x327864(0x13d)](_0x4a39bb[_0x327864(0x13e)],null,0x2)),console[_0x327864(0x144)]('');});}export const logsDefinitions=[{'service':a36_0x5c88e2(0x14a),'command':'show','description':a36_0x5c88e2(0x150),'risk':a36_0x5c88e2(0x14f),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x3dae67){const _0x52a9ae=a36_0x5c88e2;return printLogs(logger[_0x52a9ae(0x154)]()),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a37_0x433aa4=a37_0x2399;(function(_0x50eced,_0xaa40e5){const _0x5b6f73=a37_0x2399,_0x5823ba=_0x50eced();while(!![]){try{const _0x140162=-parseInt(_0x5b6f73(0x1a9))/0x1*(parseInt(_0x5b6f73(0x198))/0x2)+-parseInt(_0x5b6f73(0x19b))/0x3+-parseInt(_0x5b6f73(0x1a4))/0x4*(-parseInt(_0x5b6f73(0x195))/0x5)+-parseInt(_0x5b6f73(0x1a1))/0x6*(-parseInt(_0x5b6f73(0x197))/0x7)+parseInt(_0x5b6f73(0x1a7))/0x8*(-parseInt(_0x5b6f73(0x193))/0x9)+-parseInt(_0x5b6f73(0x194))/0xa*(-parseInt(_0x5b6f73(0x1a8))/0xb)+parseInt(_0x5b6f73(0x19e))/0xc;if(_0x140162===_0xaa40e5)break;else _0x5823ba['push'](_0x5823ba['shift']());}catch(_0x6745d6){_0x5823ba['push'](_0x5823ba['shift']());}}}(a37_0x25a1,0x7bab6));import{listNotificationChannelConfigs}from'../../core/api-client.js';function a37_0x2399(_0x3ee3c5,_0x155152){_0x3ee3c5=_0x3ee3c5-0x193;const _0x25a141=a37_0x25a1();let _0x239967=_0x25a141[_0x3ee3c5];return _0x239967;}import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';function a37_0x25a1(){const _0x4d4ab3=['13402068joSMUH','read','EMAIL','198JhoStJ','map','string','11136UtiBEl','Notification\x20channel\x20type','Found\x20','152zlCwpZ','11qzcToF','76366JYGUSJ','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','400347jaSrag','3791120wfnDQb','420fkjNuq','config-list','67690MNdXgn','8SlgCRR','length','appCode','1175178EMRzSX','type','\x20notification\x20config(s)'];a37_0x25a1=function(){return _0x4d4ab3;};return a37_0x25a1();}export const notificationConfigList={'service':'notification','command':a37_0x433aa4(0x196),'description':a37_0x433aa4(0x1aa),'risk':a37_0x433aa4(0x19f),'flags':[{'name':a37_0x433aa4(0x19c),'type':a37_0x433aa4(0x1a3),'description':a37_0x433aa4(0x1a5),'enum':NOTIFICATION_CHANNEL_TYPES,'default':a37_0x433aa4(0x1a0)}],async 'validate'(_0x5ba7fe){readNotificationChannelType(_0x5ba7fe);},async 'execute'(_0x18d859){const _0x14a5a1=a37_0x433aa4,_0x3c9f41=readNotificationChannelType(_0x18d859),_0x31e957=await listNotificationChannelConfigs(_0x18d859[_0x14a5a1(0x19a)],_0x3c9f41),_0x18eaa4=_0x31e957[_0x14a5a1(0x1a2)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x18d859[_0x14a5a1(0x19a)],'channelType':_0x3c9f41,'count':_0x18eaa4[_0x14a5a1(0x199)],'configs':_0x18eaa4},'message':_0x14a5a1(0x1a6)+_0x18eaa4[_0x14a5a1(0x199)]+'\x20'+_0x3c9f41+_0x14a5a1(0x19d)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5ce044,_0x869e51){const _0x58d190=a38_0xce54,_0x5c66be=_0x5ce044();while(!![]){try{const _0x2fa71d=parseInt(_0x58d190(0x1dc))/0x1*(parseInt(_0x58d190(0x1d6))/0x2)+parseInt(_0x58d190(0x1d7))/0x3+-parseInt(_0x58d190(0x1db))/0x4+parseInt(_0x58d190(0x1dd))/0x5*(parseInt(_0x58d190(0x1d8))/0x6)+parseInt(_0x58d190(0x1d5))/0x7+-parseInt(_0x58d190(0x1da))/0x8+-parseInt(_0x58d190(0x1d9))/0x9*(parseInt(_0x58d190(0x1d4))/0xa);if(_0x2fa71d===_0x869e51)break;else _0x5c66be['push'](_0x5c66be['shift']());}catch(_0x22eca0){_0x5c66be['push'](_0x5c66be['shift']());}}}(a38_0x5ea7,0xcce03));function a38_0xce54(_0x2872ca,_0x25e8d8){_0x2872ca=_0x2872ca-0x1d4;const _0x5ea793=a38_0x5ea7();let _0xce5412=_0x5ea793[_0x2872ca];return _0xce5412;}import{notificationConfigList}from'../../commands/notification/config-list.js';export const notificationDefinitions=[notificationConfigList];function a38_0x5ea7(){const _0x3bfa44=['4259848xvdVJG','1663392nngAnM','1QCXDQf','43985sPQBGD','2723530PRMRSJ','5928279gRNUut','2051150iLxpiU','2350359IzYlXX','708lOKmLZ','63NLTtfn'];a38_0x5ea7=function(){return _0x3bfa44;};return a38_0x5ea7();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a39_0x47b99b=a39_0x5d18;function a39_0x2978(){const _0x11b260=['15806JkMVTX','1801288zXcoIe','join','str','2316rvZYip','\x20is\x20missing\x20required\x20field\x20\x22','validation','2285280DQCVco','type','object','1920998NjxOSQ','isArray','Invalid\x20--type:\x20','WECOM','Item\x20','EMAIL','trim','apiError','description','14846048kHDkvv','FEISHU','DINGTALK','configCode','Allowed\x20values:\x20','WEBHOOK','Invalid\x20notification\x20config\x20response.','2802039leHDmk','216963InWYJo','configName','string'];a39_0x2978=function(){return _0x11b260;};return a39_0x2978();}(function(_0x867004,_0x44b8e1){const _0x1fc4b5=a39_0x5d18,_0x1f8354=_0x867004();while(!![]){try{const _0x5b7c4f=-parseInt(_0x1fc4b5(0x19a))/0x1+-parseInt(_0x1fc4b5(0x1a7))/0x2+-parseInt(_0x1fc4b5(0x199))/0x3+-parseInt(_0x1fc4b5(0x19e))/0x4+parseInt(_0x1fc4b5(0x1a4))/0x5+-parseInt(_0x1fc4b5(0x1a1))/0x6*(-parseInt(_0x1fc4b5(0x19d))/0x7)+parseInt(_0x1fc4b5(0x192))/0x8;if(_0x5b7c4f===_0x44b8e1)break;else _0x1f8354['push'](_0x1f8354['shift']());}catch(_0x2ddee7){_0x1f8354['push'](_0x1f8354['shift']());}}}(a39_0x2978,0x9800b));import{CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=[a39_0x47b99b(0x18e),a39_0x47b99b(0x193),a39_0x47b99b(0x194),a39_0x47b99b(0x1aa),a39_0x47b99b(0x197)];export function readNotificationChannelType(_0xc0a6de){const _0x558508=a39_0x47b99b,_0x2d5310=_0xc0a6de[_0x558508(0x1a0)](_0x558508(0x1a5))[_0x558508(0x18f)]()||_0x558508(0x18e);if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x2d5310))throw CliErrors[_0x558508(0x1a3)](_0x558508(0x1a9)+_0x2d5310,_0x558508(0x196)+NOTIFICATION_CHANNEL_TYPES[_0x558508(0x19f)](',\x20')+'.');return _0x2d5310;}export function projectNotificationListConfig(_0x542df0,_0x55f1d4){const _0x4ad6e5=a39_0x47b99b,_0x27ce66=requireResponseObject(_0x542df0,_0x55f1d4);return{'configCode':requireResponseString(_0x27ce66[_0x4ad6e5(0x195)],'configCode',_0x55f1d4),'configName':requireResponseString(_0x27ce66[_0x4ad6e5(0x19b)],_0x4ad6e5(0x19b),_0x55f1d4),'channelType':requireResponseString(_0x27ce66['channelType'],'channelType',_0x55f1d4),'description':normalizeNullableString(_0x27ce66[_0x4ad6e5(0x191)])};}function requireResponseObject(_0x5b621f,_0x5248e1){const _0x189ec0=a39_0x47b99b;if(typeof _0x5b621f!==_0x189ec0(0x1a6)||_0x5b621f===null||Array[_0x189ec0(0x1a8)](_0x5b621f))throw CliErrors['apiError'](_0x189ec0(0x198),'Item\x20'+(_0x5248e1+0x1)+'\x20must\x20be\x20an\x20object.');return _0x5b621f;}function requireResponseString(_0x5ea2e5,_0x166b03,_0x29eaa8){const _0x4698c5=a39_0x47b99b;if(typeof _0x5ea2e5!=='string'||!_0x5ea2e5[_0x4698c5(0x18f)]())throw CliErrors[_0x4698c5(0x190)](_0x4698c5(0x198),_0x4698c5(0x18d)+(_0x29eaa8+0x1)+_0x4698c5(0x1a2)+_0x166b03+'\x22.');return _0x5ea2e5[_0x4698c5(0x18f)]();}function a39_0x5d18(_0x43d3a3,_0x31796c){_0x43d3a3=_0x43d3a3-0x18d;const _0x2978ca=a39_0x2978();let _0x5d189b=_0x2978ca[_0x43d3a3];return _0x5d189b;}function normalizeNullableString(_0x37f739){const _0x2d3a08=a39_0x47b99b;return typeof _0x37f739===_0x2d3a08(0x19c)&&_0x37f739['trim']()?_0x37f739[_0x2d3a08(0x18f)]():null;}
|