@lovrabet/lovrabet-cli 2.3.10-beta.3 → 2.3.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/approval/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/import-excel.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/issue/context.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/permit/dataset-get.js +1 -1
- package/lib/commands/permit/dataset-set.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/diagram.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/diagram.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/user-account/bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-sdk-errors.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/access-error.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/raw-flags.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-import/auto-id-runner.js +1 -1
- package/lib/services/dataset-import/excel-reader.js +1 -1
- package/lib/services/dataset-import/image-bytes.js +1 -1
- package/lib/services/dataset-import/image-ooxml.js +1 -1
- package/lib/services/dataset-import/image-runner.js +1 -1
- package/lib/services/dataset-import/metadata.js +1 -1
- package/lib/services/dataset-import/preview.js +1 -1
- package/lib/services/dataset-import/runner.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/utils/access-key-redaction.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/positive-safe-integer.js +1 -1
- package/lib/utils/redaction.js +1 -1
- package/lib/utils/runtime-user-id.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/lovrabet/SKILL.md +1 -1
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const a27_0x365366=a27_0x1764;(function(_0xbdb010,_0xff6cc1){const _0x29302c=a27_0x1764,_0x11038d=_0xbdb010();while(!![]){try{const _0x233c89=-parseInt(_0x29302c(0x106))/0x1+-parseInt(_0x29302c(0xec))/0x2*(-parseInt(_0x29302c(0xf6))/0x3)+-parseInt(_0x29302c(0xf3))/0x4*(parseInt(_0x29302c(0x13a))/0x5)+-parseInt(_0x29302c(0x11b))/0x6*(-parseInt(_0x29302c(0xe0))/0x7)+parseInt(_0x29302c(0x10f))/0x8+parseInt(_0x29302c(0xe5))/0x9*(-parseInt(_0x29302c(0x109))/0xa)+-parseInt(_0x29302c(0x138))/0xb*(-parseInt(_0x29302c(0x113))/0xc);if(_0x233c89===_0xff6cc1)break;else _0x11038d['push'](_0x11038d['shift']());}catch(_0x573fb5){_0x11038d['push'](_0x11038d['shift']());}}}(a27_0x188f,0xaa3f2));import{dataImportExcel}from'./import-excel.js';function a27_0x188f(){const _0x2756c3=['Preview:\x20data\x20','join','\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]','2280PgmoJY','\x20\x20\x20\x20select/where/having/groupBy\x20must\x20use\x20real\x20dataset\x20fields','\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}','build','\x20\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','helpExtra','confirmationDescription','732FFGtZK','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','Writes\x20one\x20new\x20business\x20record\x20to\x20the\x20current\x20app\x20dataset.\x20It\x20is\x20saved\x20immediately\x20after\x20confirmation.','data','POST','\x20\x20\x20\x20then\x20convert\x20rows\x20to\x20JSON\x20and\x20split\x20within\x20the\x20target\x20API\x20row/byte\x20and\x20local\x20argument\x20limits.','\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}]','Deletes\x20business\x20records\x20from\x20the\x20current\x20app\x20dataset.\x20This\x20may\x20not\x20be\x20recoverable.','aggregate','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','\x20\x20EXAMPLES','\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\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20distinct\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22,\x22distinct\x22:true}','\x20\x20\x20\x20Stop\x20on\x20unknown\x20outcomes\x20or\x20conflicts;\x20reconcile\x20before\x20retrying,\x20never\x20blindly\x20resend\x20a\x20batch.','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','batchCreate','\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$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\x20JOIN\x20and\x20cross-table\x20aggregation\x20require\x20an\x20existing\x20trusted\x20Custom\x20SQL','\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\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','command','\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.','write','\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\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return\x20alongside\x20aggregates,\x20e.g.\x20[\x22status\x22,\x22region\x22]','length','112288BAGASY','now','110coVvsr','\x20\x20\x20\x20orderBy\x20may\x20reference\x20aggregate\x20output\x20aliases','\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}}','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','filter','\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}}','create','\x20\x20\x20\x20No\x20import\x20checkpoint,\x20--resume,\x20automatic\x20upsert,\x20or\x20atomic\x20rollback\x20guarantee.','\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\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','\x20completed\x20in\x20','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Average\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg_score\x22}','\x20\x20\x20\x20--dry-run\x20previews\x20the\x20request\x20only;\x20it\x20does\x20not\x20validate\x20server\x20constraints\x20or\x20write\x20permissions.','params','body','Get\x20a\x20single\x20record\x20by\x20ID','\x20\x20\x20\x20aggregate\x20supports\x20a\x20single\x20DB_TABLE\x20dataset\x20only','update','2569LNShya','delete','dryRun','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}}','1107CVFMEP','\x20\x20AGGREGATE\x20ALIAS\x20BOUNDARY','\x20\x20\x20\x20MIN\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Minimum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MIN\x22,\x22alias\x22:\x22min_price\x22}','risk','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','\x20\x20\x20\x20This\x20command\x20sends\x20one\x20prepared\x20batch;\x20it\x20does\x20not\x20read\x20XLSX\x20or\x20split\x20batches.','14vkFfuE','data\x20','\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\x20Verify\x20the\x20response\x20paging.currentPage/pageSize\x20and\x20that\x20tableData\x20satisfies\x20where\x20before\x20drawing\x20conclusions.','\x20\x20\x20\x20Built-in\x20Skill\x20guide:\x20references/lovrabet-db-table-excel-import.md','\x20on\x20dataset\x20','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','8852Hvfmkn','\x20\x20\x20\x20Record\x20each\x20batch\x20and\x20verify\x20its\x20IDs\x20or\x20unique\x20business\x20keys\x20before\x20continuing.','\x20\x20AGGREGATE\x20TYPES','88110hMtaQM','\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}}]}','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\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}}','description','Create\x20one\x20record\x20in\x20the\x20dataset','\x20\x20\x20\x20METADATA:\x20use\x20lovrabet\x20data\x20import-excel\x20with\x20checkpoint\x20recovery.','str','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','\x20\x20\x20\x20choose\x20the\x20capability\x20before\x20execution;\x20never\x20fall\x20back\x20at\x20runtime','\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}}','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20id\x20may\x20be\x20a\x20single\x20value\x20or\x20array.\x20','\x20\x20\x20\x20Page\x20numbers\x20start\x20at\x201.\x20To\x20fetch\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged','Update\x20an\x20existing\x20data\x20record','high-risk-write','373264pktFWx','operation','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','92450QLJQJL','\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}','code','\x20\x20\x20\x20METADATA\x20datasets\x20do\x20not\x20support\x20aggregate\x20or\x20Custom\x20SQL','getOne','\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}','532248zJxTVS'];a27_0x188f=function(){return _0x2756c3;};return a27_0x188f();}import{executeData}from'../../core/sdk-client.js';import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';function a27_0x1764(_0x592795,_0x4b2e79){_0x592795=_0x592795-0xde;const _0x188f59=a27_0x188f();let _0x17641e=_0x188f59[_0x592795];return _0x17641e;}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_0x365366(0x13e),'operation':a27_0x365366(0x13e),'risk':a27_0x365366(0xe3),'paramsRequired':![],'description':'Filter\x20dataset\x20records\x20with\x20query\x20conditions','paramsHint':a27_0x365366(0xff)+a27_0x365366(0xf8),'helpExtra':['\x20\x20WHERE\x20OPERATORS',a27_0x365366(0x101),a27_0x365366(0x12e),a27_0x365366(0xfa),'\x20\x20\x20\x20$gte\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20or\x20equal\x20\x20{\x22amount\x22:{\x22$gte\x22:100}}',a27_0x365366(0xee),a27_0x365366(0xe4),a27_0x365366(0x127),a27_0x365366(0x142),a27_0x365366(0x13c),'\x20\x20\x20\x20$endWith\x20\x20\x20\x20\x20Ends\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22email\x22:{\x22$endWith\x22:\x22@example.com\x22}}','','\x20\x20LOGICAL\x20COMBINATORS',a27_0x365366(0xf7),a27_0x365366(0x135),'','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)',a27_0x365366(0xea),a27_0x365366(0x112),a27_0x365366(0x122),a27_0x365366(0x11c),a27_0x365366(0x108),'','\x20\x20PAGINATION','\x20\x20\x20\x20Filtering\x20and\x20pagination\x20are\x20controlled\x20only\x20via\x20one\x20JSON\x20object\x20in\x20--params.',a27_0x365366(0x133),a27_0x365366(0x103),'\x20\x20\x20\x20and\x20increment\x20only\x20currentPage.\x20Use\x20a\x20stable\x20unique\x20orderBy\x20field\x20to\x20avoid\x20duplicates\x20or\x20gaps.',a27_0x365366(0x130),a27_0x365366(0x143),a27_0x365366(0xef)][a27_0x365366(0x111)]('\x0a')},{'command':a27_0x365366(0x10d),'operation':a27_0x365366(0x10d),'risk':a27_0x365366(0xe3),'paramsRequired':!![],'description':a27_0x365366(0x149),'paramsHint':a27_0x365366(0xf9)},{'command':a27_0x365366(0x140),'operation':a27_0x365366(0x140),'risk':a27_0x365366(0x134),'paramsRequired':!![],'description':a27_0x365366(0xfc),'confirmationDescription':a27_0x365366(0x11e),'paramsHint':a27_0x365366(0x13d)},{'command':a27_0x365366(0x12c),'operation':a27_0x365366(0x12c),'risk':a27_0x365366(0x134),'paramsRequired':!![],'description':'Create\x20multiple\x20records\x20in\x20the\x20dataset\x20in\x20one\x20request','helpExtra':['\x20\x20EXCEL\x20ROUTES',a27_0x365366(0xfd),'\x20\x20\x20\x20DB_TABLE:\x20inspect\x20dataset\x20detail,\x20validate\x20the\x20full\x20file\x20and\x20confirmed\x20unique\x20business\x20keys,',a27_0x365366(0x121),a27_0x365366(0xeb),a27_0x365366(0x146),a27_0x365366(0xf4),a27_0x365366(0x12a),a27_0x365366(0x141),a27_0x365366(0xf0),'\x20\x20\x20\x20Non-Excel\x20batchCreate\x20remains\x20available\x20for\x20METADATA\x20and\x20DB_TABLE.']['join']('\x0a'),'confirmationDescription':'Writes\x20multiple\x20new\x20business\x20records\x20to\x20the\x20current\x20app\x20dataset.\x20They\x20are\x20saved\x20immediately\x20after\x20confirmation.','paramsHint':a27_0x365366(0xe9)},{'command':'update','operation':a27_0x365366(0xdf),'risk':a27_0x365366(0x134),'paramsRequired':!![],'description':a27_0x365366(0x104),'confirmationDescription':'Changes\x20an\x20existing\x20business\x20record\x20in\x20the\x20current\x20app\x20dataset.\x20The\x20new\x20values\x20are\x20saved\x20immediately\x20after\x20confirmation.','paramsHint':a27_0x365366(0x102)+'Examples:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27,\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22completed\x22}\x27'},{'command':a27_0x365366(0xe1),'operation':'delete','risk':a27_0x365366(0x105),'paramsRequired':!![],'description':'Delete\x20data\x20records\x20(non-interactive\x20mode\x20requires\x20--yes)','confirmationDescription':a27_0x365366(0x123),'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':a27_0x365366(0x124),'operation':a27_0x365366(0x124),'risk':a27_0x365366(0xe3),'paramsRequired':![],'description':a27_0x365366(0xf2),'paramsHint':a27_0x365366(0x125)+'Example:\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x20\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','helpExtra':[a27_0x365366(0xf5),a27_0x365366(0x10a),'\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20of\x20records\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}',a27_0x365366(0x129),a27_0x365366(0x145),a27_0x365366(0x10e),a27_0x365366(0x115),a27_0x365366(0xe7),'','\x20\x20PARAMS\x20STRUCTURE',a27_0x365366(0x136),a27_0x365366(0x131),a27_0x365366(0x12b),a27_0x365366(0x118),a27_0x365366(0x13f),'\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order;\x20may\x20reference\x20aggregate\x20output\x20aliases,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','',a27_0x365366(0xe6),'\x20\x20\x20\x20aggregate[].alias\x20defines\x20the\x20output\x20field\x20name\x20only',a27_0x365366(0x114),a27_0x365366(0x13b),'','\x20\x20DATASET\x20BOUNDARY',a27_0x365366(0xde),a27_0x365366(0x10c),a27_0x365366(0x12f),a27_0x365366(0x100),'',a27_0x365366(0x126),'\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status',a27_0x365366(0x12d),'',a27_0x365366(0x11d),'\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[\x22region\x22],\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}}}\x27','',a27_0x365366(0x117)]['join']('\x0a')}];function makeDataCommand(_0x43882f){const _0x3efa98=a27_0x365366,_0x1ba237=_0x3efa98(0xed)+_0x43882f[_0x3efa98(0x132)],_0x3eacfa={'service':_0x3efa98(0x11f),'command':_0x43882f[_0x3efa98(0x132)],'description':_0x43882f[_0x3efa98(0xfb)],'risk':_0x43882f[_0x3efa98(0xe8)],..._0x43882f[_0x3efa98(0x11a)]?{'confirmationDescription':_0x43882f[_0x3efa98(0x11a)]}:{},'helpExtra':_0x43882f[_0x3efa98(0x119)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x43882f[_0x3efa98(0x128)]}],'validate':async _0x1908dd=>{const _0x11c9ab=_0x3efa98;_0x43882f['paramsRequired']&&requireAnyOf(_0x1908dd,[_0x11c9ab(0x147)],_0x1ba237),_0x43882f['operation']===_0x11c9ab(0x12c)&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x1908dd[_0x11c9ab(0xfe)](_0x11c9ab(0x147)))),_0x43882f[_0x11c9ab(0x107)]===_0x11c9ab(0xdf)&&parseUpdateIdsFromParams(parseJsonParams(_0x1908dd[_0x11c9ab(0xfe)](_0x11c9ab(0x147)))??{});},async 'execute'(_0x238371){const _0x1f93cb=_0x3efa98,_0x61297=_0x238371[_0x1f93cb(0xfe)](_0x1f93cb(0x10b)),_0x21f76b=_0x43882f[_0x1f93cb(0x107)]===_0x1f93cb(0x12c)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x238371[_0x1f93cb(0xfe)]('params'))):parseJsonParams(_0x238371[_0x1f93cb(0xfe)](_0x1f93cb(0x147)))??{},_0x4c88e2=_0x43882f[_0x1f93cb(0x107)]===_0x1f93cb(0xdf)?parseUpdateIdsFromParams(_0x21f76b):undefined,_0x257aca=_0x4c88e2?normalizeUpdateParamsForRuntime(_0x21f76b,_0x4c88e2):_0x21f76b,_0x26b8c4=Date[_0x1f93cb(0x139)](),_0x172040=await executeData(_0x61297,_0x43882f['operation'],_0x257aca),_0x3bcd93=Date[_0x1f93cb(0x139)]()-_0x26b8c4,_0x4f58a4=_0x4c88e2&&_0x4c88e2['length']>0x1?buildBatchUpdateResult(_0x4c88e2,_0x172040):_0x172040;return{'ok':!![],'data':{'result':_0x4f58a4,'elapsed':_0x3bcd93},'message':'data\x20'+_0x43882f['command']+_0x1f93cb(0x144)+_0x3bcd93+'ms'};}};return _0x43882f[_0x3efa98(0xe8)]!==_0x3efa98(0xe3)&&(_0x3eacfa[_0x3efa98(0xe2)]=async _0x2d5850=>{const _0x42944d=_0x3efa98,_0xc18eea=_0x2d5850[_0x42944d(0xfe)](_0x42944d(0x10b)),_0x4a1abe=_0x43882f[_0x42944d(0x107)]===_0x42944d(0x12c)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x2d5850[_0x42944d(0xfe)]('params'))):parseJsonParams(_0x2d5850['str'](_0x42944d(0x147)))??{};let _0x3c0186=_0x4a1abe;if(_0x43882f[_0x42944d(0x107)]===_0x42944d(0xdf)){const _0x4f1299=parseUpdateIdsFromParams(_0x4a1abe);_0x3c0186=normalizeUpdateParamsForRuntime(_0x4a1abe,_0x4f1299);}return dryRun(_0x42944d(0x120),'/api/{appCode}/'+_0xc18eea+'/'+_0x43882f[_0x42944d(0x107)])[_0x42944d(0x148)](_0x3c0186)['description'](_0x42944d(0x110)+_0x43882f[_0x42944d(0x132)]+_0x42944d(0xf1)+_0xc18eea)[_0x42944d(0x116)]();}),_0x3eacfa;}export const dataDefinitions=[...specs['map'](makeDataCommand),dataImportExcel];function buildBatchUpdateResult(_0x30174f,_0x383988){const _0x2dd12b=a27_0x365366;return{'operation':_0x2dd12b(0xdf),'mode':'batch','ids':_0x30174f,'total':_0x30174f[_0x2dd12b(0x137)],'result':_0x383988};}
|
|
1
|
+
const a27_0x41dcb0=a27_0x61dc;(function(_0x445616,_0x17b4ef){const _0x36c049=a27_0x61dc,_0x58a507=_0x445616();while(!![]){try{const _0x3740e0=-parseInt(_0x36c049(0xec))/0x1+-parseInt(_0x36c049(0x13a))/0x2*(-parseInt(_0x36c049(0x10b))/0x3)+-parseInt(_0x36c049(0x128))/0x4+parseInt(_0x36c049(0xf5))/0x5+parseInt(_0x36c049(0x11a))/0x6*(parseInt(_0x36c049(0x120))/0x7)+parseInt(_0x36c049(0x134))/0x8+-parseInt(_0x36c049(0x13e))/0x9*(parseInt(_0x36c049(0x140))/0xa);if(_0x3740e0===_0x17b4ef)break;else _0x58a507['push'](_0x58a507['shift']());}catch(_0x139ee5){_0x58a507['push'](_0x58a507['shift']());}}}(a27_0x362e,0x4b2b1));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';function a27_0x61dc(_0x3203e4,_0x204b8a){_0x3203e4=_0x3203e4-0xe8;const _0x362ecb=a27_0x362e();let _0x61dcb7=_0x362ecb[_0x3203e4];return _0x61dcb7;}import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':'filter','operation':a27_0x41dcb0(0x12d),'risk':a27_0x41dcb0(0x104),'paramsRequired':![],'description':a27_0x41dcb0(0x121),'paramsHint':a27_0x41dcb0(0xfa)+'Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','helpExtra':['\x20\x20WHERE\x20OPERATORS',a27_0x41dcb0(0x13d),a27_0x41dcb0(0x108),'\x20\x20\x20\x20$gt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$gt\x22:100}}','\x20\x20\x20\x20$gte\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20or\x20equal\x20\x20{\x22amount\x22:{\x22$gte\x22:100}}',a27_0x41dcb0(0xef),a27_0x41dcb0(0x126),'\x20\x20\x20\x20$in\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Value\x20in\x20set\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22country\x22:{\x22$in\x22:[\x22CN\x22,\x22US\x22]}}','\x20\x20\x20\x20$contain\x20\x20\x20\x20\x20Substring\x20match\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$contain\x22:\x22test\x22}}',a27_0x41dcb0(0x116),a27_0x41dcb0(0xf1),'',a27_0x41dcb0(0x11f),a27_0x41dcb0(0xe9),'\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_0x41dcb0(0xeb),a27_0x41dcb0(0xf2),a27_0x41dcb0(0x14a),a27_0x41dcb0(0x112),'\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','','\x20\x20PAGINATION',a27_0x41dcb0(0x127),'\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_0x41dcb0(0x13b),a27_0x41dcb0(0xfe),a27_0x41dcb0(0x131),a27_0x41dcb0(0x11d),a27_0x41dcb0(0x13f)][a27_0x41dcb0(0xfc)]('\x0a')},{'command':a27_0x41dcb0(0x100),'operation':a27_0x41dcb0(0x100),'risk':'read','paramsRequired':!![],'description':a27_0x41dcb0(0xe8),'paramsHint':a27_0x41dcb0(0xf7)},{'command':a27_0x41dcb0(0x143),'operation':a27_0x41dcb0(0x143),'risk':a27_0x41dcb0(0x14d),'paramsRequired':!![],'description':a27_0x41dcb0(0x12b),'confirmationDescription':a27_0x41dcb0(0x114),'paramsHint':a27_0x41dcb0(0x129)},{'command':a27_0x41dcb0(0x111),'operation':a27_0x41dcb0(0x111),'risk':'write','paramsRequired':!![],'description':a27_0x41dcb0(0x10c),'helpExtra':['\x20\x20EXCEL\x20ROUTES',a27_0x41dcb0(0x12e),a27_0x41dcb0(0x113),'\x20\x20\x20\x20then\x20convert\x20rows\x20to\x20JSON\x20and\x20split\x20within\x20the\x20target\x20API\x20row/byte\x20and\x20local\x20argument\x20limits.',a27_0x41dcb0(0xfb),a27_0x41dcb0(0x10e),'\x20\x20\x20\x20Record\x20each\x20batch\x20and\x20verify\x20its\x20IDs\x20or\x20unique\x20business\x20keys\x20before\x20continuing.',a27_0x41dcb0(0x109),a27_0x41dcb0(0x12f),a27_0x41dcb0(0xf9),a27_0x41dcb0(0x124)][a27_0x41dcb0(0xfc)]('\x0a'),'confirmationDescription':a27_0x41dcb0(0xee),'paramsHint':a27_0x41dcb0(0x12c)},{'command':a27_0x41dcb0(0x142),'operation':a27_0x41dcb0(0x142),'risk':'write','paramsRequired':!![],'description':'Update\x20an\x20existing\x20data\x20record','confirmationDescription':a27_0x41dcb0(0x141),'paramsHint':a27_0x41dcb0(0x10f)+a27_0x41dcb0(0x138)},{'command':a27_0x41dcb0(0x115),'operation':a27_0x41dcb0(0x115),'risk':'high-risk-write','paramsRequired':!![],'description':'Delete\x20data\x20records\x20(non-interactive\x20mode\x20requires\x20--yes)','confirmationDescription':'Deletes\x20business\x20records\x20from\x20the\x20current\x20app\x20dataset.\x20This\x20may\x20not\x20be\x20recoverable.','paramsHint':a27_0x41dcb0(0xf7)},{'command':a27_0x41dcb0(0x118),'operation':a27_0x41dcb0(0x118),'risk':'read','paramsRequired':![],'description':a27_0x41dcb0(0xea),'paramsHint':a27_0x41dcb0(0x10d)+a27_0x41dcb0(0x132),'helpExtra':[a27_0x41dcb0(0x117),a27_0x41dcb0(0x14e),a27_0x41dcb0(0x135),a27_0x41dcb0(0x123),a27_0x41dcb0(0xf4),'\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_0x41dcb0(0x139),a27_0x41dcb0(0xf8),'',a27_0x41dcb0(0x146),'\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_0x41dcb0(0xff),a27_0x41dcb0(0xf3),a27_0x41dcb0(0x110),a27_0x41dcb0(0x14b),'\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order;\x20may\x20reference\x20aggregate\x20output\x20aliases,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','','\x20\x20AGGREGATE\x20ALIAS\x20BOUNDARY','\x20\x20\x20\x20aggregate[].alias\x20defines\x20the\x20output\x20field\x20name\x20only','\x20\x20\x20\x20select/where/having/groupBy\x20must\x20use\x20real\x20dataset\x20fields',a27_0x41dcb0(0x125),'','\x20\x20DATASET\x20BOUNDARY',a27_0x41dcb0(0x148),'\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_0x41dcb0(0x144),'',a27_0x41dcb0(0xed),a27_0x41dcb0(0x137),a27_0x41dcb0(0x13c),'','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter',a27_0x41dcb0(0x119),'',a27_0x41dcb0(0x101)][a27_0x41dcb0(0xfc)]('\x0a')}];function makeDataCommand(_0x598c4f){const _0x203dfc=a27_0x41dcb0,_0x5b6906=_0x203dfc(0x149)+_0x598c4f[_0x203dfc(0x11c)],_0x24c87b={'service':_0x203dfc(0x12a),'command':_0x598c4f[_0x203dfc(0x11c)],'description':_0x598c4f[_0x203dfc(0x136)],'risk':_0x598c4f[_0x203dfc(0x147)],..._0x598c4f[_0x203dfc(0x107)]?{'confirmationDescription':_0x598c4f['confirmationDescription']}:{},'helpExtra':_0x598c4f[_0x203dfc(0x145)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x598c4f[_0x203dfc(0x11b)]}],'validate':async _0x226a53=>{const _0x5b4998=_0x203dfc;_0x598c4f[_0x5b4998(0x102)]&&requireAnyOf(_0x226a53,[_0x5b4998(0x10a)],_0x5b6906),_0x598c4f['operation']==='batchCreate'&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x226a53[_0x5b4998(0xf0)](_0x5b4998(0x10a)))),_0x598c4f[_0x5b4998(0x122)]===_0x5b4998(0x142)&&parseUpdateIdsFromParams(parseJsonParams(_0x226a53[_0x5b4998(0xf0)]('params'))??{});},async 'execute'(_0x1b0b72){const _0xc5a1f5=_0x203dfc,_0x38cad5=_0x1b0b72[_0xc5a1f5(0xf0)](_0xc5a1f5(0x14c)),_0x271e33=_0x598c4f['operation']==='batchCreate'?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x1b0b72[_0xc5a1f5(0xf0)](_0xc5a1f5(0x10a)))):parseJsonParams(_0x1b0b72[_0xc5a1f5(0xf0)](_0xc5a1f5(0x10a)))??{},_0x2741b3=_0x598c4f[_0xc5a1f5(0x122)]==='update'?parseUpdateIdsFromParams(_0x271e33):undefined,_0x1b5942=_0x2741b3?normalizeUpdateParamsForRuntime(_0x271e33,_0x2741b3):_0x271e33,_0x32972e=Date[_0xc5a1f5(0x106)](),_0x48458a=await executeData(_0x38cad5,_0x598c4f['operation'],_0x1b5942),_0x536d3b=Date[_0xc5a1f5(0x106)]()-_0x32972e,_0x26eca1=_0x2741b3&&_0x2741b3['length']>0x1?buildBatchUpdateResult(_0x2741b3,_0x48458a):_0x48458a;return{'ok':!![],'data':{'result':_0x26eca1,'elapsed':_0x536d3b},'message':'data\x20'+_0x598c4f[_0xc5a1f5(0x11c)]+_0xc5a1f5(0xfd)+_0x536d3b+'ms'};}};return _0x598c4f[_0x203dfc(0x147)]!=='read'&&(_0x24c87b['dryRun']=async _0x123ec3=>{const _0x1eb875=_0x203dfc,_0x2f1f49=_0x123ec3[_0x1eb875(0xf0)](_0x1eb875(0x14c)),_0x2f14fc=_0x598c4f[_0x1eb875(0x122)]==='batchCreate'?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x123ec3[_0x1eb875(0xf0)](_0x1eb875(0x10a)))):parseJsonParams(_0x123ec3[_0x1eb875(0xf0)](_0x1eb875(0x10a)))??{};let _0x2d4fe3=_0x2f14fc;if(_0x598c4f[_0x1eb875(0x122)]===_0x1eb875(0x142)){const _0x1cd75e=parseUpdateIdsFromParams(_0x2f14fc);_0x2d4fe3=normalizeUpdateParamsForRuntime(_0x2f14fc,_0x1cd75e);}return dryRun('POST',_0x1eb875(0x130)+_0x2f1f49+'/'+_0x598c4f[_0x1eb875(0x122)])[_0x1eb875(0x11e)](_0x2d4fe3)[_0x1eb875(0x136)](_0x1eb875(0x103)+_0x598c4f[_0x1eb875(0x11c)]+_0x1eb875(0x105)+_0x2f1f49)[_0x1eb875(0x133)]();}),_0x24c87b;}export const dataDefinitions=[...specs['map'](makeDataCommand),dataImportExcel];function a27_0x362e(){const _0x14c9f0=['\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','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\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}','2MnEalx','\x20\x20\x20\x20Page\x20numbers\x20start\x20at\x201.\x20To\x20fetch\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged','\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$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}}','9TBoCoX','\x20\x20\x20\x20Verify\x20the\x20response\x20paging.currentPage/pageSize\x20and\x20that\x20tableData\x20satisfies\x20where\x20before\x20drawing\x20conclusions.','2138060IMxVgW','Changes\x20an\x20existing\x20business\x20record\x20in\x20the\x20current\x20app\x20dataset.\x20The\x20new\x20values\x20are\x20saved\x20immediately\x20after\x20confirmation.','update','create','\x20\x20\x20\x20choose\x20the\x20capability\x20before\x20execution;\x20never\x20fall\x20back\x20at\x20runtime','helpExtra','\x20\x20PARAMS\x20STRUCTURE','risk','\x20\x20\x20\x20aggregate\x20supports\x20a\x20single\x20DB_TABLE\x20dataset\x20only','data\x20','\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\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}}','code','write','\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}','Get\x20a\x20single\x20record\x20by\x20ID','\x20\x20\x20\x20$and\x20\x20\x20\x20\x20\x20\x20\x20\x20All\x20conditions\x20match\x20\x20\x20{\x22$and\x22:[{\x22age\x22:{\x22$gte\x22:18}},{\x22status\x22:{\x22$eq\x22:\x22active\x22}}]}','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','354650djrfuq','\x20\x20EXAMPLES','Writes\x20multiple\x20new\x20business\x20records\x20to\x20the\x20current\x20app\x20dataset.\x20They\x20are\x20saved\x20immediately\x20after\x20confirmation.','\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}}','str','\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\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','\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\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}','2108745dLNijG','batch','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','\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\x20Built-in\x20Skill\x20guide:\x20references/lovrabet-db-table-excel-import.md','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','\x20\x20\x20\x20This\x20command\x20sends\x20one\x20prepared\x20batch;\x20it\x20does\x20not\x20read\x20XLSX\x20or\x20split\x20batches.','join','\x20completed\x20in\x20','\x20\x20\x20\x20and\x20increment\x20only\x20currentPage.\x20Use\x20a\x20stable\x20unique\x20orderBy\x20field\x20to\x20avoid\x20duplicates\x20or\x20gaps.','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','getOne','\x20\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','paramsRequired','Preview:\x20data\x20','read','\x20on\x20dataset\x20','now','confirmationDescription','\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\x20Stop\x20on\x20unknown\x20outcomes\x20or\x20conflicts;\x20reconcile\x20before\x20retrying,\x20never\x20blindly\x20resend\x20a\x20batch.','params','651699XmFBfV','Create\x20multiple\x20records\x20in\x20the\x20dataset\x20in\x20one\x20request','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','\x20\x20\x20\x20--dry-run\x20previews\x20the\x20request\x20only;\x20it\x20does\x20not\x20validate\x20server\x20constraints\x20or\x20write\x20permissions.','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20id\x20may\x20be\x20a\x20single\x20value\x20or\x20array.\x20','\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','batchCreate','\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\x20DB_TABLE:\x20inspect\x20dataset\x20detail,\x20validate\x20the\x20full\x20file\x20and\x20confirmed\x20unique\x20business\x20keys,','Writes\x20one\x20new\x20business\x20record\x20to\x20the\x20current\x20app\x20dataset.\x20It\x20is\x20saved\x20immediately\x20after\x20confirmation.','delete','\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\x20AGGREGATE\x20TYPES','aggregate','\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','8994eevSEe','paramsHint','command','\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','body','\x20\x20LOGICAL\x20COMBINATORS','2513vPrvoy','Filter\x20dataset\x20records\x20with\x20query\x20conditions','operation','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20distinct\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22,\x22distinct\x22:true}','\x20\x20\x20\x20Non-Excel\x20batchCreate\x20remains\x20available\x20for\x20METADATA\x20and\x20DB_TABLE.','\x20\x20\x20\x20orderBy\x20may\x20reference\x20aggregate\x20output\x20aliases','\x20\x20\x20\x20$lte\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20or\x20equal\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lte\x22:1000}}','\x20\x20\x20\x20Filtering\x20and\x20pagination\x20are\x20controlled\x20only\x20via\x20one\x20JSON\x20object\x20in\x20--params.','1267044Cjgefm','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','data','Create\x20one\x20record\x20in\x20the\x20dataset','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','filter','\x20\x20\x20\x20METADATA:\x20use\x20lovrabet\x20data\x20import-excel\x20with\x20checkpoint\x20recovery.','\x20\x20\x20\x20No\x20import\x20checkpoint,\x20--resume,\x20automatic\x20upsert,\x20or\x20atomic\x20rollback\x20guarantee.','/api/{appCode}/','\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','Example:\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x20\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','build','127864tAgjVR','\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}','description'];a27_0x362e=function(){return _0x14c9f0;};return a27_0x362e();}function buildBatchUpdateResult(_0x178993,_0x11c96c){const _0x44e4d7=a27_0x41dcb0;return{'operation':_0x44e4d7(0x142),'mode':_0x44e4d7(0xf6),'ids':_0x178993,'total':_0x178993['length'],'result':_0x11c96c};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a28_0x54fd(){const _0x2ab812=['updateTimeField','required','12MebdIw','4520956KZfuxs','responseBody','112tNheCZ','doVersion','requestBody','object','deleted','475135BglSoA','validateRules','13116uQXNSW','allFields','title','code','extend','modifierNameField','parse','11270000PDCygV','afterScriptId','modifierIdField','447SXThSh','logicField','source','displayName','requestFields','dblinkInfoDTO','allFieldNames','str','host','dbName','length','type','responseFields','push','columnCodeListWithDeleted','sourceType','modelId','map','options','filter','doType','name','creatorNameField','string','pkField','dbId','947100KiNjHi','entries','path','isArray','trim','33eefzDE','creatorIdField','description','properties','beforeScriptId','method','apiError','labelField','Get\x20dataset\x20detail\x20including\x20fields,\x20relations,\x20and\x20operations','tableName','split','312201hQSiWW','dbtableConfig','Dataset\x20detail\x20must\x20be\x20an\x20object.','appCode','modelCode','find','dataType','indexes','73524WerKln','operations','datasetKey','48pwKcFL','dataset'];a28_0x54fd=function(){return _0x2ab812;};return a28_0x54fd();}const a28_0x2c65ab=a28_0x4254;(function(_0x1b209f,_0x52625a){const _0x34b8bf=a28_0x4254,_0x317965=_0x1b209f();while(!![]){try{const _0x180add=-parseInt(_0x34b8bf(0x7b))/0x1*(-parseInt(_0x34b8bf(0x8e))/0x2)+parseInt(_0x34b8bf(0xa9))/0x3*(-parseInt(_0x34b8bf(0x9f))/0x4)+-parseInt(_0x34b8bf(0x9d))/0x5*(-parseInt(_0x34b8bf(0x91))/0x6)+-parseInt(_0x34b8bf(0xa6))/0x7+-parseInt(_0x34b8bf(0x98))/0x8*(-parseInt(_0x34b8bf(0x86))/0x9)+parseInt(_0x34b8bf(0x76))/0xa+-parseInt(_0x34b8bf(0x96))/0xb*(-parseInt(_0x34b8bf(0x95))/0xc);if(_0x180add===_0x52625a)break;else _0x317965['push'](_0x317965['shift']());}catch(_0x1c8e2e){_0x317965['push'](_0x317965['shift']());}}}(a28_0x54fd,0xd375f));import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';function isRecord(_0x237782){const _0x512ce3=a28_0x4254;return _0x237782!==null&&typeof _0x237782===_0x512ce3(0x9b)&&!Array[_0x512ce3(0x79)](_0x237782);}function normalizeField(_0x23af01){const _0x5cebd8=a28_0x4254;if(_0x23af01['deleted'])return null;const _0x5e41a5=Boolean(_0x23af01[_0x5cebd8(0xac)]!==undefined||_0x23af01[_0x5cebd8(0xbd)]!==undefined);let _0x2783bc={};if(!_0x5e41a5&&typeof _0x23af01[_0x5cebd8(0xa3)]===_0x5cebd8(0x73))try{_0x2783bc=JSON[_0x5cebd8(0xa5)](_0x23af01['extend']);}catch{}const _0x1a235d=_0x5e41a5?_0x23af01['name']:_0x23af01[_0x5cebd8(0xa2)],_0x3d1ee7=_0x5e41a5?_0x23af01[_0x5cebd8(0xac)]:_0x23af01[_0x5cebd8(0x71)],_0x5abd15=_0x5e41a5?_0x23af01['doType']:_0x23af01[_0x5cebd8(0xb4)]||_0x23af01[_0x5cebd8(0x8c)],_0x2ae65d=_0x5e41a5?_0x23af01[_0x5cebd8(0x74)]===!![]:_0x2783bc[_0x5cebd8(0x74)]===!![],_0x1c2a85=_0x5e41a5?_0x23af01[_0x5cebd8(0x94)]===!![]:_0x2783bc[_0x5cebd8(0x94)]===!![],_0x221434=_0x5e41a5?_0x23af01[_0x5cebd8(0xbb)]??null:_0x2783bc[_0x5cebd8(0xbb)]??null,_0xd285aa={'name':_0x1a235d,'displayName':_0x3d1ee7||_0x1a235d,'type':_0x5abd15,'dbType':_0x23af01['dbType'],'pk':_0x2ae65d,'required':_0x1c2a85,'description':_0x23af01[_0x5cebd8(0x7d)]||undefined};return Array[_0x5cebd8(0x79)](_0x221434)&&_0x221434[_0x5cebd8(0xb3)]>0x0&&(_0xd285aa[_0x5cebd8(0xbb)]=_0x221434),_0xd285aa;}function parseJsonMaybe(_0x345736){const _0x35cd1c=a28_0x4254;if(typeof _0x345736!==_0x35cd1c(0x73))return _0x345736;try{return JSON[_0x35cd1c(0xa5)](_0x345736);}catch{return _0x345736;}}function normalizeOperationEntry(_0x15f31d,_0x127cc7){const _0x31f523=a28_0x4254;if(!_0x127cc7||typeof _0x127cc7!==_0x31f523(0x9b))return null;if(!_0x127cc7['method']||!_0x127cc7[_0x31f523(0x78)])return null;const _0x4e4629={'name':_0x15f31d,'method':_0x127cc7[_0x31f523(0x80)],'path':_0x127cc7[_0x31f523(0x78)]};if(_0x127cc7[_0x31f523(0xb1)])_0x4e4629[_0x31f523(0xb1)]=_0x127cc7[_0x31f523(0xb1)];if(_0x127cc7[_0x31f523(0x9a)]!=null)_0x4e4629[_0x31f523(0x9a)]=parseJsonMaybe(_0x127cc7[_0x31f523(0x9a)]);if(_0x127cc7['responseBody']!=null)_0x4e4629['responseBody']=parseJsonMaybe(_0x127cc7[_0x31f523(0x97)]);if(_0x127cc7[_0x31f523(0x7f)]!=null)_0x4e4629['beforeScriptId']=_0x127cc7[_0x31f523(0x7f)];if(_0x127cc7[_0x31f523(0xa7)]!=null)_0x4e4629[_0x31f523(0xa7)]=_0x127cc7[_0x31f523(0xa7)];if(Array[_0x31f523(0x79)](_0x127cc7['requestFields']))_0x4e4629[_0x31f523(0xad)]=_0x127cc7[_0x31f523(0xad)];if(Array[_0x31f523(0x79)](_0x127cc7['responseFields']))_0x4e4629[_0x31f523(0xb5)]=_0x127cc7['responseFields'];return _0x4e4629;}function summarizeDbtable(_0x5c767f){const _0x37e14c=a28_0x4254,_0x36ff3a={},_0x475d3f=[_0x37e14c(0x75),_0x37e14c(0xb2),_0x37e14c(0x84),_0x37e14c(0x90),_0x37e14c(0x74),'allFields',_0x37e14c(0xaa),'createTimeField',_0x37e14c(0x93),_0x37e14c(0x7c),_0x37e14c(0x72),_0x37e14c(0xa8),_0x37e14c(0xa4),_0x37e14c(0x82),_0x37e14c(0xae)];for(const _0x3b94a7 of _0x475d3f){if(_0x5c767f[_0x3b94a7]!==undefined)_0x36ff3a[_0x3b94a7]=_0x5c767f[_0x3b94a7];}return typeof _0x36ff3a['allFields']===_0x37e14c(0x73)&&_0x36ff3a[_0x37e14c(0xa0)][_0x37e14c(0xb3)]>0x0&&(_0x36ff3a[_0x37e14c(0xaf)]=_0x36ff3a[_0x37e14c(0xa0)][_0x37e14c(0x85)](',')[_0x37e14c(0xba)](_0x3b7f8d=>_0x3b7f8d[_0x37e14c(0x7a)]())[_0x37e14c(0xbc)](Boolean)),_0x36ff3a;}function normalizeRelatedPages(_0x376392){const _0x1a8c49=a28_0x4254;if(!Array[_0x1a8c49(0x79)](_0x376392))return[];return _0x376392[_0x1a8c49(0xbc)](_0x18a98=>_0x18a98&&typeof _0x18a98==='object')[_0x1a8c49(0xba)](_0x43c3f9=>({'id':_0x43c3f9['id'],'type':_0x43c3f9[_0x1a8c49(0xb4)],'code':_0x43c3f9[_0x1a8c49(0xa2)],'title':_0x43c3f9[_0x1a8c49(0xa1)],'deleted':_0x43c3f9[_0x1a8c49(0x9c)]===!![]}));}function a28_0x4254(_0x5bbe1a,_0x5b688e){_0x5bbe1a=_0x5bbe1a-0x71;const _0x54fd1d=a28_0x54fd();let _0x425440=_0x54fd1d[_0x5bbe1a];return _0x425440;}function normalizeFallbackFieldName(_0x1de3d5,_0xc87906){const _0x5187b1=a28_0x4254,_0xdad7de=_0x1de3d5[_0x5187b1(0x7a)]();if(!_0xdad7de)return null;return{'name':_0xdad7de,'displayName':_0xdad7de,'type':undefined,'dbType':undefined,'pk':_0xdad7de===_0xc87906,'required':![],'description':undefined};}async function loadListFieldFallback(_0x201a5b,_0x3ce69e){const _0x10b202=a28_0x4254;if(!_0x201a5b||!_0x3ce69e)return[];try{const _0x3a6878=await listDatasets(_0x201a5b,{'code':_0x3ce69e}),_0x28bbfd=_0x3a6878[_0x10b202(0x8b)](_0x306100=>_0x306100['code']===_0x3ce69e)??_0x3a6878[0x0],_0x20eaa2=_0x28bbfd?.[_0x10b202(0x87)]??{},_0x5f4c94=typeof _0x20eaa2[_0x10b202(0xa0)]==='string'?_0x20eaa2[_0x10b202(0xa0)][_0x10b202(0x85)](','):[];return _0x5f4c94[_0x10b202(0xba)](_0x2a1a1b=>normalizeFallbackFieldName(_0x2a1a1b,_0x20eaa2['pkField']))[_0x10b202(0xbc)](_0x6d4cd1=>_0x6d4cd1!==null);}catch{return[];}}export const datasetDetail={'service':a28_0x2c65ab(0x92),'command':'detail','description':a28_0x2c65ab(0x83),'risk':'read','flags':[CODE_FLAG],async 'execute'(_0x2d45ac){const _0xeee3e1=a28_0x2c65ab,_0x32edcc=await getDatasetDetail(_0x2d45ac[_0xeee3e1(0xb0)]('code'));if(!isRecord(_0x32edcc))throw CliErrors[_0xeee3e1(0x81)](_0xeee3e1(0x88));const _0x96b5d1=Array[_0xeee3e1(0x79)](_0x32edcc['fields'])?_0x32edcc['fields']:Array[_0xeee3e1(0x79)](_0x32edcc['properties'])?_0x32edcc[_0xeee3e1(0x7e)]:[];let _0xa18634=_0x96b5d1[_0xeee3e1(0xba)](_0x1bf28d=>normalizeField(_0x1bf28d))[_0xeee3e1(0xbc)](_0x5b6670=>_0x5b6670!==null);_0xa18634[_0xeee3e1(0xb3)]===0x0&&(_0xa18634=await loadListFieldFallback(_0x2d45ac[_0xeee3e1(0x89)],_0x2d45ac[_0xeee3e1(0xb0)](_0xeee3e1(0xa2))));const _0x5ca136=_0x32edcc[_0xeee3e1(0x8f)]??{},_0x570945=[];for(const [_0x26c5ff,_0xcda0d4]of Object[_0xeee3e1(0x77)](_0x5ca136)){const _0x4304d7=normalizeOperationEntry(_0x26c5ff,_0xcda0d4);if(_0x4304d7)_0x570945[_0xeee3e1(0xb6)](_0x4304d7);}const _0x28d01f=isRecord(_0x32edcc['dbtableConfig'])?_0x32edcc['dbtableConfig']:{},_0x1ba148=isRecord(_0x32edcc['dataset'])?_0x32edcc[_0xeee3e1(0x92)]:{},_0x534096=_0x28d01f[_0xeee3e1(0x75)]!=null?{'id':_0x28d01f[_0xeee3e1(0x75)],'name':_0x28d01f[_0xeee3e1(0xb2)]??null}:undefined;let _0x54e1dd;return typeof _0x32edcc['extend']===_0xeee3e1(0x73)&&(_0x54e1dd=parseJsonMaybe(_0x32edcc[_0xeee3e1(0xa3)])),{'ok':!![],'data':{'id':_0x32edcc[_0xeee3e1(0xb9)]??_0x32edcc['id'],'name':_0x32edcc['name'],'code':_0x32edcc[_0xeee3e1(0x8a)]||_0x32edcc['code'],'doVersion':_0x32edcc[_0xeee3e1(0x99)],'description':_0x32edcc[_0xeee3e1(0x7d)]||_0x1ba148['tableComment']||undefined,'source':_0x32edcc[_0xeee3e1(0xab)]||_0x1ba148[_0xeee3e1(0xb8)],'table':_0x28d01f[_0xeee3e1(0x84)]||_0x1ba148[_0xeee3e1(0x84)],'datasetKey':_0x28d01f[_0xeee3e1(0x90)],'pk':_0x28d01f[_0xeee3e1(0x74)],'db':_0x534096,'dbtable':summarizeDbtable(_0x28d01f),'fields':_0xa18634,'operations':_0x570945,'indexes':Array[_0xeee3e1(0x79)](_0x1ba148[_0xeee3e1(0x8d)])?_0x1ba148['indexes']:[],'relations':_0x32edcc['relations']??null,'relatedPages':normalizeRelatedPages(_0x32edcc['relatedPageInfoList']),...Array[_0xeee3e1(0x79)](_0x32edcc['columnCodeListWithDeleted'])?{'columnCodeListWithDeleted':_0x32edcc[_0xeee3e1(0xb7)]}:{},'formatRules':Array[_0xeee3e1(0x79)](_0x32edcc['formatRules'])?_0x32edcc['formatRules']:[],'validateRules':Array[_0xeee3e1(0x79)](_0x32edcc[_0xeee3e1(0x9e)])?_0x32edcc[_0xeee3e1(0x9e)]:[],..._0x54e1dd!==undefined?{'extend':_0x54e1dd}:{},'stats':{'fieldCount':_0xa18634[_0xeee3e1(0xb3)],'operationCount':_0x570945['length']}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x6b76b5,_0x5144e1){const _0x22ac2c=a29_0x15fd,_0x2a319d=_0x6b76b5();while(!![]){try{const _0x52341f=-parseInt(_0x22ac2c(0x1a0))/0x1+-parseInt(_0x22ac2c(0x1a1))/0x2*(parseInt(_0x22ac2c(0x1a5))/0x3)+parseInt(_0x22ac2c(0x1a2))/0x4+parseInt(_0x22ac2c(0x1a7))/0x5+parseInt(_0x22ac2c(0x1a4))/0x6+-parseInt(_0x22ac2c(0x1a6))/0x7+parseInt(_0x22ac2c(0x1a3))/0x8;if(_0x52341f===_0x5144e1)break;else _0x2a319d['push'](_0x2a319d['shift']());}catch(_0x230b82){_0x2a319d['push'](_0x2a319d['shift']());}}}(a29_0x22e0,0xb4cca));function a29_0x22e0(){const _0x3e0bf0=['30CmqMNB','4086691wjfNKc','4279765nZhiRc','956303QcmtQV','87772fVxGUA','5413920oVPPAI','1584064pqqMOV','1872534sAEOIO'];a29_0x22e0=function(){return _0x3e0bf0;};return a29_0x22e0();}import{datasetList}from'../../commands/dataset/list.js';import{datasetDetail}from'../../commands/dataset/detail.js';function a29_0x15fd(_0x5003b4,_0x4ad86b){_0x5003b4=_0x5003b4-0x1a0;const _0x22e0a5=a29_0x22e0();let _0x15fdc5=_0x22e0a5[_0x5003b4];return _0x15fdc5;}import{datasetSdkDoc}from'../../commands/dataset/sdk-doc.js';export const datasetDefinitions=[datasetList,datasetDetail,datasetSdkDoc];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a30_0x57a2fb=a30_0x1dea;(function(_0x1bea47,_0x3ffa3d){const _0x5c820f=a30_0x1dea,_0x470be2=_0x1bea47();while(!![]){try{const _0x4c01bb=-parseInt(_0x5c820f(0x91))/0x1*(parseInt(_0x5c820f(0xa1))/0x2)+-parseInt(_0x5c820f(0xa5))/0x3+parseInt(_0x5c820f(0xa9))/0x4*(-parseInt(_0x5c820f(0x94))/0x5)+parseInt(_0x5c820f(0x9a))/0x6*(parseInt(_0x5c820f(0x8d))/0x7)+-parseInt(_0x5c820f(0xa6))/0x8*(parseInt(_0x5c820f(0x9e))/0x9)+-parseInt(_0x5c820f(0x92))/0xa*(-parseInt(_0x5c820f(0x97))/0xb)+parseInt(_0x5c820f(0xa2))/0xc;if(_0x4c01bb===_0x3ffa3d)break;else _0x470be2['push'](_0x470be2['shift']());}catch(_0x189081){_0x470be2['push'](_0x470be2['shift']());}}}(a30_0x9b2c,0x4cd1c));function a30_0x1dea(_0x2e90d5,_0x595129){_0x2e90d5=_0x2e90d5-0x8b;const _0x9b2c7b=a30_0x9b2c();let _0x1dea2e=_0x9b2c7b[_0x2e90d5];return _0x1dea2e;}function a30_0x9b2c(){const _0x82398=['158824ysrhJT','code','length','2421748gLTnNu','list','Filter\x20by\x20dataset\x20name\x20(server-side\x20fuzzy\x20match)','name','split','7ZOPsNh','description','trim','pkField','29CpxFjD','1350StVdQP','string','5LNxwCv','Filter\x20by\x20dataset\x20code\x20(server-side\x20exact\x20match)','tableName','1925zdJzvU','List\x20datasets\x20in\x20the\x20app\x20(server-side\x20name/code/table-name\x20filters\x20combine\x20with\x20AND)','str','883938doHoqh','map','dataset','dbtableConfig','279fqRZfh','Filter\x20by\x20physical\x20table\x20name\x20(server-side\x20prefix\x20match;\x20SQL\x20LIKE\x20wildcards\x20%\x20and\x20_\x20apply)','allFields','10490vlugrf','25712196ncJpDM','appCode','source','1877982VLoiot'];a30_0x9b2c=function(){return _0x82398;};return a30_0x9b2c();}import{listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';export const datasetList={'service':a30_0x57a2fb(0x9c),'command':a30_0x57a2fb(0xaa),'description':a30_0x57a2fb(0x98),'risk':'read','flags':[{'name':a30_0x57a2fb(0x8b),'type':a30_0x57a2fb(0x93),'description':a30_0x57a2fb(0xab)},{'name':'table-name','type':a30_0x57a2fb(0x93),'description':a30_0x57a2fb(0x9f)},{...CODE_FLAG,'required':![],'description':a30_0x57a2fb(0x95)}],async 'execute'(_0x4c064d){const _0x20e3fd=a30_0x57a2fb,_0x1e8ec5=_0x4c064d[_0x20e3fd(0x99)]('name'),_0x207ceb=_0x4c064d[_0x20e3fd(0x99)](_0x20e3fd(0xa7)),_0x2b1fd4=_0x4c064d[_0x20e3fd(0x99)]('table-name'),_0x4ea44f=await listDatasets(_0x4c064d[_0x20e3fd(0xa3)],{..._0x1e8ec5&&{'name':_0x1e8ec5},..._0x207ceb&&{'code':_0x207ceb},..._0x2b1fd4&&{'tableName':_0x2b1fd4}});return{'ok':!![],'data':{'total':_0x4ea44f[_0x20e3fd(0xa8)],'datasets':_0x4ea44f[_0x20e3fd(0x9b)](_0x5bd2de=>{const _0x47cc38=_0x20e3fd,_0x2ff874=_0x5bd2de[_0x47cc38(0x9d)]??{};return{'id':_0x5bd2de['id'],'code':_0x5bd2de[_0x47cc38(0xa7)],'name':_0x5bd2de['name'],'source':_0x5bd2de[_0x47cc38(0xa4)],'description':_0x5bd2de[_0x47cc38(0x8e)],'table':_0x2ff874[_0x47cc38(0x96)],'datasetKey':_0x2ff874['datasetKey'],'pk':_0x2ff874[_0x47cc38(0x90)],'fields':_0x2ff874[_0x47cc38(0xa0)]?_0x2ff874[_0x47cc38(0xa0)][_0x47cc38(0x8c)](',')[_0x47cc38(0x9b)](_0x5820d6=>_0x5820d6[_0x47cc38(0x8f)]()):[]};})}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a31_0x26b064=a31_0x41b6;(function(_0x4a480a,_0x324113){const _0x18dbc8=a31_0x41b6,_0x232027=_0x4a480a();while(!![]){try{const _0x442f00=parseInt(_0x18dbc8(0x171))/0x1+parseInt(_0x18dbc8(0x172))/0x2+-parseInt(_0x18dbc8(0x174))/0x3+-parseInt(_0x18dbc8(0x16a))/0x4+parseInt(_0x18dbc8(0x16c))/0x5+parseInt(_0x18dbc8(0x169))/0x6*(-parseInt(_0x18dbc8(0x16f))/0x7)+-parseInt(_0x18dbc8(0x168))/0x8*(-parseInt(_0x18dbc8(0x170))/0x9);if(_0x442f00===_0x324113)break;else _0x232027['push'](_0x232027['shift']());}catch(_0x486d38){_0x232027['push'](_0x232027['shift']());}}}(a31_0x1f19,0x1fea2));import{getDatasetSdkUsageDoc}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function a31_0x1f19(){const _0x2ffc78=['813491rPifpW','3198969sZNwYp','968YEDzRX','162882mefvpl','sdk-doc','212172RMVzaB','trim','str','8xrAWje','6ASUuqZ','873640DaGzdj','string','491095TSvlxd','Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','code'];a31_0x1f19=function(){return _0x2ffc78;};return a31_0x1f19();}const DEFAULT_MARKDOWN='#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0aNo\x20SDK\x20usage\x20documentation\x20is\x20available.';function a31_0x41b6(_0x586e2f,_0x1ec04f){_0x586e2f=_0x586e2f-0x167;const _0x1f193a=a31_0x1f19();let _0x41b6a7=_0x1f193a[_0x586e2f];return _0x41b6a7;}export function formatDatasetSdkMarkdown(_0x53ad33){const _0xf8b136=a31_0x41b6,_0x5aa1fb=typeof _0x53ad33===_0xf8b136(0x16b)?_0x53ad33[_0xf8b136(0x175)]():'';return _0x5aa1fb||DEFAULT_MARKDOWN;}export const datasetSdkDoc={'service':'dataset','command':a31_0x26b064(0x173),'description':a31_0x26b064(0x16d),'risk':'read','flags':[{...CODE_FLAG,'description':'Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.'}],async 'execute'(_0x5b87b4){const _0x4d8415=a31_0x26b064,_0x4b5d98=_0x5b87b4[_0x4d8415(0x167)](_0x4d8415(0x16e)),_0x4cf121=await getDatasetSdkUsageDoc(_0x4b5d98,_0x5b87b4['appCode']);return{'ok':!![],'data':{'code':_0x4b5d98,'appCode':_0x5b87b4['appCode'],'markdown':formatDatasetSdkMarkdown(_0x4cf121)}};}};
|
package/lib/commands/doctor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a32_0x231fd9=a32_0x3c2f;(function(_0xe1eb45,_0x2ae341){const _0x5ed81a=a32_0x3c2f,_0x30954a=_0xe1eb45();while(!![]){try{const _0x32a147=parseInt(_0x5ed81a(0x10c))/0x1*(-parseInt(_0x5ed81a(0xb9))/0x2)+-parseInt(_0x5ed81a(0xf6))/0x3*(parseInt(_0x5ed81a(0x10e))/0x4)+-parseInt(_0x5ed81a(0xa4))/0x5+-parseInt(_0x5ed81a(0xd2))/0x6*(parseInt(_0x5ed81a(0x119))/0x7)+parseInt(_0x5ed81a(0xd7))/0x8+parseInt(_0x5ed81a(0xbe))/0x9+-parseInt(_0x5ed81a(0xea))/0xa*(-parseInt(_0x5ed81a(0x11c))/0xb);if(_0x32a147===_0x2ae341)break;else _0x30954a['push'](_0x30954a['shift']());}catch(_0x1e0b3c){_0x30954a['push'](_0x30954a['shift']());}}}(a32_0x4278,0x2aadb));import a32_0x42b3f0 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{getCliVersion}from'../utils/version.js';import{getApiDomain,getKbServiceDomain,getRuntimeDomain,getSkillDomain,getUserDomain}from'../constant/domain.js';import{normalizeLovrabetRegion}from'../constant/region.js';import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile,loadRawConfigLayers}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{inspectServiceRegistry}from'../commands/service/registry.js';import{inspectBuiltinSkill}from'../skills/builtin-skill.js';function a32_0x4278(){const _0x148631=['\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Legacy\x20inherit:\x20\x20\x20','537850gcmyWW','\x20\x20Config\x20Files','gray','\x20\x20Built-in\x20Skill','\x20+\x20','\x20\x20skillDomain:\x20\x20\x20\x20\x20','(default:\x20','riskLevel','message','includes','\x20\x20AK\x20source:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Package\x20Version:\x20','status','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20─','\x20\x20Merged\x20Config','packageVersion','accessKey','red','\x20\x20Config\x20JSON','prototype','11734FLusZE','accessKeySource','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','verbose','\x20\x20Auth','1063755auLveR','ClientAk','\x20commands)','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','log','✓\x20Loaded','str','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(invalid)','call','\x20\x20Repair\x20project:\x20\x20','green','✓\x20Valid\x20JSON','projectConfig','\x20\x20Country/Region\x20Configuration','\x20\x20Repair\x20global:\x20\x20\x20','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','missing','150gAcJWr','appCode','defaultApp','(default)','region','2640672WcGDFg','read','\x20config\x20delete\x20region','yellow','\x20config\x20init','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','locale','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','globalConfig','\x20config\x20delete\x20inherit\x20--global','\x20config\x20delete\x20routing\x20--global','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','state','platform','appcode','commandCount','global','✗\x20Invalid','repairCommand','1640wnjRQq','\x20\x20runtimeDomain:\x20\x20\x20','name','currentApp','\x20config','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','serviceCount','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','\x20\x20Routing\x20Configuration','\x20config\x20delete\x20routing','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','\x20config\x20delete\x20inherit','42ggNfcT','(none)','doctor','path','project','length','raw','filter','Project','Global','(not\x20found)','current','repeat','not\x20configured','\x20Imported\x20from:\x20','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','join','registryPath','hasOwnProperty','format','services','✓\x20current','53HMfvRb','\x20\x20Repair\x20project:\x20\x20\x20','6620TWLiHe','✗\x20Invalid\x20JSON','\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Unavailable\x20until\x20routing\x20configuration\x20is\x20repaired','version','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','arch','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','⚠\x20Empty','\x20\x20Repair\x20global:\x20\x20\x20\x20','inherit','80647XmAscz','app','(missing)','30602fBwnPg','\x20(accessKey)','installedPath','\x20\x20Installed\x20Path:\x20\x20','bold','ignored\x20in\x20','\x20\x20Skill\x20Version:\x20\x20\x20','routing','(unnamed)','padEnd','\x20\x20kbServiceDomain:\x20'];a32_0x4278=function(){return _0x148631;};return a32_0x4278();}async function execute(_0x16d79b){const _0x22ef33=a32_0x3c2f,_0x324433=getCliVersion(),_0x1d5c3e=buildConfigFromFlags({'app':_0x16d79b[_0x22ef33(0xc4)]?.(_0x22ef33(0x11a)),'appcode':_0x16d79b[_0x22ef33(0xc4)]?.(_0x22ef33(0xe5)),'env':_0x16d79b[_0x22ef33(0xc4)]?.('env')});let _0x28aa7e,_0x1c6cdf;try{_0x28aa7e=normalizeLovrabetRegion(_0x1d5c3e[_0x22ef33(0xfc)][_0x22ef33(0xd6)]);}catch(_0x283b6f){_0x1c6cdf=_0x283b6f instanceof Error?_0x283b6f:new Error(String(_0x283b6f));}let _0x5ab578;if(!_0x1c6cdf)try{await initGlobalEnvironment(_0x1d5c3e);}catch(_0x1f36c9){_0x5ab578=_0x1f36c9 instanceof Error?_0x1f36c9:new Error(String(_0x1f36c9));}console[_0x22ef33(0xc2)](),console[_0x22ef33(0xc2)](a32_0x42b3f0['bold'](CLI_BIN_NAME+'\x20doctor')),console[_0x22ef33(0xc2)](a32_0x42b3f0[_0x22ef33(0xa6)]('─'[_0x22ef33(0x102)](0x32))),console[_0x22ef33(0xc2)]('\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20'+_0x324433),console['log']('\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x22ef33(0x112)]),console[_0x22ef33(0xc2)](_0x22ef33(0xf4)+process[_0x22ef33(0xe4)]+'\x20'+process[_0x22ef33(0x114)]);const _0x1e3f38=inspectBuiltinSkill();console[_0x22ef33(0xc2)](),console[_0x22ef33(0xc2)](a32_0x42b3f0[_0x22ef33(0x120)](_0x22ef33(0xa7))),console[_0x22ef33(0xc2)](a32_0x42b3f0[_0x22ef33(0xa6)]('\x20\x20─'['repeat'](0x1e))),console['log'](_0x22ef33(0x110)+(_0x1e3f38[_0x22ef33(0xe3)]===_0x22ef33(0x101)?a32_0x42b3f0['green'](_0x22ef33(0x10b)):a32_0x42b3f0[_0x22ef33(0xb6)]('✗\x20'+_0x1e3f38['state']))),console[_0x22ef33(0xc2)](_0x22ef33(0xaf)+_0x1e3f38[_0x22ef33(0xb4)]),console[_0x22ef33(0xc2)](_0x22ef33(0x122)+(_0x1e3f38['skillVersion']||a32_0x42b3f0['gray'](_0x22ef33(0x11b)))),console[_0x22ef33(0xc2)](_0x22ef33(0x11f)+(_0x1e3f38[_0x22ef33(0x11e)]||a32_0x42b3f0[_0x22ef33(0xa6)]('(not\x20found)')));_0x1e3f38[_0x22ef33(0xe3)]!==_0x22ef33(0x101)&&console['log']('\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1e3f38[_0x22ef33(0xe9)]);_0x1e3f38['reason']&&console['log'](_0x22ef33(0xc6)+_0x1e3f38['reason']);console[_0x22ef33(0xc2)](),console[_0x22ef33(0xc2)](a32_0x42b3f0[_0x22ef33(0x120)](_0x22ef33(0xa5))),console[_0x22ef33(0xc2)](a32_0x42b3f0[_0x22ef33(0xa6)](_0x22ef33(0xb2)['repeat'](0x1e)));const _0x94db51=getGlobalConfigPath(),_0x25a5bf=getProjectConfigPath();console['log'](_0x22ef33(0xef)+(_0x94db51||a32_0x42b3f0[_0x22ef33(0xa6)]('(not\x20found)'))),console[_0x22ef33(0xc2)](_0x22ef33(0x115)+(_0x25a5bf||a32_0x42b3f0[_0x22ef33(0xa6)](_0x22ef33(0x100)))),console['log'](),console[_0x22ef33(0xc2)](a32_0x42b3f0[_0x22ef33(0x120)](_0x22ef33(0xb7))),console[_0x22ef33(0xc2)](a32_0x42b3f0[_0x22ef33(0xa6)]('\x20\x20─'[_0x22ef33(0x102)](0x1e)));const _0x69f916=(_0x518e67,_0x5391f4)=>{const _0x2cc349=_0x22ef33;if(!_0x5391f4){console[_0x2cc349(0xc2)]('\x20\x20'+_0x518e67[_0x2cc349(0xa0)](0x11)+'\x20'+a32_0x42b3f0[_0x2cc349(0xa6)]('(no\x20file)'));return;}const _0x30452c=inspectCliConfigJsonFile(_0x5391f4);if(_0x30452c[_0x2cc349(0xb0)]==='ok')console[_0x2cc349(0xc2)]('\x20\x20'+_0x518e67[_0x2cc349(0xa0)](0x11)+'\x20'+a32_0x42b3f0[_0x2cc349(0xca)](_0x2cc349(0xcb)));else{if(_0x30452c[_0x2cc349(0xb0)]==='empty')console['log']('\x20\x20'+_0x518e67['padEnd'](0x11)+'\x20'+a32_0x42b3f0[_0x2cc349(0xda)]('⚠\x20Empty\x20(treated\x20as\x20{})'));else _0x30452c[_0x2cc349(0xb0)]===_0x2cc349(0xd1)?console[_0x2cc349(0xc2)]('\x20\x20'+_0x518e67[_0x2cc349(0xa0)](0x11)+'\x20'+a32_0x42b3f0[_0x2cc349(0xa6)](_0x2cc349(0x11b))):(console['log']('\x20\x20'+_0x518e67[_0x2cc349(0xa0)](0x11)+'\x20'+a32_0x42b3f0['red'](_0x2cc349(0x10f))),console[_0x2cc349(0xc2)]('\x20\x20'+''['padEnd'](0x11)+'\x20'+a32_0x42b3f0[_0x2cc349(0xb6)](_0x30452c['message'])));}};_0x69f916(_0x22ef33(0xff),_0x94db51),_0x69f916(_0x22ef33(0xfe),_0x25a5bf);const _0x20943e=loadRawConfigLayers(),_0x3f16b8=[Object[_0x22ef33(0xb8)][_0x22ef33(0x108)][_0x22ef33(0xc8)](_0x20943e[_0x22ef33(0xdf)],_0x22ef33(0x118))?_0x22ef33(0xe7):null,Object[_0x22ef33(0xb8)][_0x22ef33(0x108)][_0x22ef33(0xc8)](_0x20943e['projectConfig'],_0x22ef33(0x118))?_0x22ef33(0xfa):null][_0x22ef33(0xfd)](Boolean);_0x3f16b8[_0x22ef33(0xfb)]>0x0&&(console[_0x22ef33(0xc2)](_0x22ef33(0xa3)+a32_0x42b3f0['yellow'](_0x22ef33(0x121)+_0x3f16b8[_0x22ef33(0x106)](_0x22ef33(0xa8))+_0x22ef33(0xee))),_0x3f16b8[_0x22ef33(0xad)](_0x22ef33(0xfa))&&console['log'](_0x22ef33(0x10d)+CLI_BIN_NAME+_0x22ef33(0xf5)),_0x3f16b8[_0x22ef33(0xad)]('global')&&console[_0x22ef33(0xc2)](_0x22ef33(0x117)+CLI_BIN_NAME+_0x22ef33(0xe0)));_0x5ab578&&(console[_0x22ef33(0xc2)](),console['log'](a32_0x42b3f0[_0x22ef33(0x120)](_0x22ef33(0xf2))),console['log'](a32_0x42b3f0[_0x22ef33(0xa6)]('\x20\x20─'[_0x22ef33(0x102)](0x1e))),console[_0x22ef33(0xc2)](_0x22ef33(0xc5)+a32_0x42b3f0[_0x22ef33(0xb6)](_0x22ef33(0xe8))),console[_0x22ef33(0xc2)](_0x22ef33(0xc6)+_0x5ab578[_0x22ef33(0xac)]),Object['prototype'][_0x22ef33(0x108)]['call'](_0x20943e['projectConfig'],'routing')&&console[_0x22ef33(0xc2)]('\x20\x20Repair\x20project:\x20\x20'+CLI_BIN_NAME+_0x22ef33(0xf3)),Object[_0x22ef33(0xb8)][_0x22ef33(0x108)][_0x22ef33(0xc8)](_0x20943e[_0x22ef33(0xdf)],_0x22ef33(0x9e))&&console[_0x22ef33(0xc2)](_0x22ef33(0xce)+CLI_BIN_NAME+_0x22ef33(0xe1)));_0x1c6cdf&&(console[_0x22ef33(0xc2)](),console[_0x22ef33(0xc2)](a32_0x42b3f0[_0x22ef33(0x120)](_0x22ef33(0xcd))),console[_0x22ef33(0xc2)](a32_0x42b3f0['gray'](_0x22ef33(0xb2)[_0x22ef33(0x102)](0x1e))),console[_0x22ef33(0xc2)](_0x22ef33(0xc5)+a32_0x42b3f0[_0x22ef33(0xb6)](_0x22ef33(0xe8))),console[_0x22ef33(0xc2)]('\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1c6cdf[_0x22ef33(0xac)]),Object[_0x22ef33(0xb8)][_0x22ef33(0x108)][_0x22ef33(0xc8)](_0x20943e[_0x22ef33(0xcc)],_0x22ef33(0xd6))&&console[_0x22ef33(0xc2)](_0x22ef33(0xc9)+CLI_BIN_NAME+_0x22ef33(0xd9)),Object[_0x22ef33(0xb8)][_0x22ef33(0x108)][_0x22ef33(0xc8)](_0x20943e[_0x22ef33(0xdf)],_0x22ef33(0xd6))&&console['log'](_0x22ef33(0xce)+CLI_BIN_NAME+_0x22ef33(0xdb)));console[_0x22ef33(0xc2)](),console[_0x22ef33(0xc2)](a32_0x42b3f0[_0x22ef33(0x120)](_0x22ef33(0xb3))),console[_0x22ef33(0xc2)](a32_0x42b3f0[_0x22ef33(0xa6)](_0x22ef33(0xb2)[_0x22ef33(0x102)](0x1e))),console[_0x22ef33(0xc2)](_0x22ef33(0xde)+(_0x1d5c3e[_0x22ef33(0xd3)]||a32_0x42b3f0[_0x22ef33(0xb6)]('(not\x20set)'))),console[_0x22ef33(0xc2)]('\x20\x20region:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x28aa7e??a32_0x42b3f0[_0x22ef33(0xb6)](_0x22ef33(0xc7)))),console['log']('\x20\x20app\x20locale:\x20\x20\x20\x20\x20\x20'+_0x1d5c3e[_0x22ef33(0xdd)]),console['log'](_0x22ef33(0xd0)+(_0x1d5c3e[_0x22ef33(0xd4)]||a32_0x42b3f0['gray'](_0x22ef33(0xf7)))),console[_0x22ef33(0xc2)](_0x22ef33(0xf1)+(_0x1d5c3e[_0x22ef33(0xed)]||a32_0x42b3f0[_0x22ef33(0xa6)](_0x22ef33(0xf7)))),console[_0x22ef33(0xc2)](_0x22ef33(0xe2)+(_0x1d5c3e['format']||a32_0x42b3f0[_0x22ef33(0xa6)](_0x22ef33(0xaa)+DEFAULT_CONFIG_VALUES[_0x22ef33(0x109)]+')'))),console[_0x22ef33(0xc2)](_0x22ef33(0xcf)+(_0x1d5c3e['pageSize']??a32_0x42b3f0[_0x22ef33(0xa6)](_0x22ef33(0xd5)))),console[_0x22ef33(0xc2)](_0x22ef33(0xbb)+_0x1d5c3e[_0x22ef33(0xab)]),console[_0x22ef33(0xc2)]('\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1d5c3e[_0x22ef33(0xbc)]),console[_0x22ef33(0xc2)]('\x20\x20auth\x20(effective):\x20'+AUTH_MODE[_0x22ef33(0xbf)]);if(_0x1d5c3e[_0x22ef33(0xba)])console[_0x22ef33(0xc2)](_0x22ef33(0xae)+_0x1d5c3e[_0x22ef33(0xba)]);console[_0x22ef33(0xc2)]('\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20'+(_0x1d5c3e[_0x22ef33(0xb5)]?a32_0x42b3f0[_0x22ef33(0xca)]('(set,\x20length='+_0x1d5c3e['accessKey'][_0x22ef33(0xfb)]+')'):a32_0x42b3f0[_0x22ef33(0xa6)](_0x22ef33(0xf7)))),console[_0x22ef33(0xc2)](),console[_0x22ef33(0xc2)](a32_0x42b3f0[_0x22ef33(0x120)]('\x20\x20API\x20Endpoints')),console[_0x22ef33(0xc2)](a32_0x42b3f0[_0x22ef33(0xa6)](_0x22ef33(0xb2)[_0x22ef33(0x102)](0x1e)));_0x5ab578||_0x1c6cdf?console['log'](_0x22ef33(0xc5)+a32_0x42b3f0['red'](_0x22ef33(0x111))):(console[_0x22ef33(0xc2)](_0x22ef33(0xa2)+getApiDomain()),console['log'](_0x22ef33(0x113)+getUserDomain()),console[_0x22ef33(0xc2)](_0x22ef33(0xeb)+getRuntimeDomain()),console[_0x22ef33(0xc2)](_0x22ef33(0xa9)+getSkillDomain()),console['log'](_0x22ef33(0xa1)+(getKbServiceDomain()??_0x22ef33(0x103))));console[_0x22ef33(0xc2)](),console['log'](a32_0x42b3f0[_0x22ef33(0x120)]('\x20\x20Service\x20Tree')),console[_0x22ef33(0xc2)](a32_0x42b3f0[_0x22ef33(0xa6)](_0x22ef33(0xb2)['repeat'](0x1e)));const _0x4039bc=inspectServiceRegistry();console[_0x22ef33(0xc2)](_0x22ef33(0x105)+_0x4039bc[_0x22ef33(0x107)]),console[_0x22ef33(0xc2)](_0x22ef33(0xc5)+formatServiceRegistryStatus(_0x4039bc)),console['log'](_0x22ef33(0xdc)+_0x4039bc[_0x22ef33(0xf0)]),console[_0x22ef33(0xc2)](_0x22ef33(0xb1)+_0x4039bc[_0x22ef33(0xe6)]);for(const _0x43a529 of _0x4039bc[_0x22ef33(0x10a)]){console[_0x22ef33(0xc2)]('\x20\x20'+(_0x43a529['serviceCode']+':')['padEnd'](0x11)+'\x20'+(_0x43a529[_0x22ef33(0xec)]||a32_0x42b3f0['gray'](_0x22ef33(0x9f)))+'\x20('+_0x43a529[_0x22ef33(0xe6)]+_0x22ef33(0xc0)),console['log']('\x20\x20'+''[_0x22ef33(0xa0)](0x11)+_0x22ef33(0x104)+_0x43a529['source'][_0x22ef33(0xf9)]);}return console[_0x22ef33(0xc2)](),console[_0x22ef33(0xc2)](a32_0x42b3f0[_0x22ef33(0x120)](_0x22ef33(0xbd))),console['log'](a32_0x42b3f0[_0x22ef33(0xa6)](_0x22ef33(0xb2)[_0x22ef33(0x102)](0x1e))),console[_0x22ef33(0xc2)](_0x22ef33(0xc1)+a32_0x42b3f0[_0x22ef33(0xca)](AUTH_MODE[_0x22ef33(0xbf)]+_0x22ef33(0x11d))),console[_0x22ef33(0xc2)]('\x20\x20Session\x20check:\x20\x20\x20'+a32_0x42b3f0['gray']('(removed\x20—\x20cookie\x20auth\x20disabled)')),console[_0x22ef33(0xc2)](),{'ok':!![]};}function a32_0x3c2f(_0x403bf1,_0x119b7a){_0x403bf1=_0x403bf1-0x9e;const _0x427863=a32_0x4278();let _0x3c2f7c=_0x427863[_0x403bf1];return _0x3c2f7c;}function formatServiceRegistryStatus(_0x1a4fa3){const _0x3897ae=a32_0x3c2f;if(_0x1a4fa3[_0x3897ae(0xb0)]==='ok')return a32_0x42b3f0[_0x3897ae(0xca)](_0x3897ae(0xc3));if(_0x1a4fa3['status']===_0x3897ae(0xd1))return a32_0x42b3f0[_0x3897ae(0xa6)](_0x3897ae(0x100));if(_0x1a4fa3[_0x3897ae(0xb0)]==='empty')return a32_0x42b3f0['yellow'](_0x3897ae(0x116));return a32_0x42b3f0[_0x3897ae(0xb6)](_0x3897ae(0xe8)+(_0x1a4fa3['message']?':\x20'+_0x1a4fa3[_0x3897ae(0xac)]:''));}export const doctorDefinition={'service':a32_0x231fd9(0xf8),'command':'check','description':'Diagnose\x20CLI\x20configuration\x20and\x20environment','risk':a32_0x231fd9(0xd8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
1
|
+
const a32_0x3d0797=a32_0x14b2;(function(_0x471000,_0x438d38){const _0x1e8950=a32_0x14b2,_0x74499d=_0x471000();while(!![]){try{const _0x57e6f7=parseInt(_0x1e8950(0x151))/0x1+parseInt(_0x1e8950(0xf0))/0x2+-parseInt(_0x1e8950(0x128))/0x3+-parseInt(_0x1e8950(0x111))/0x4*(parseInt(_0x1e8950(0x137))/0x5)+parseInt(_0x1e8950(0x14a))/0x6+-parseInt(_0x1e8950(0x132))/0x7+parseInt(_0x1e8950(0x102))/0x8;if(_0x57e6f7===_0x438d38)break;else _0x74499d['push'](_0x74499d['shift']());}catch(_0x4b910f){_0x74499d['push'](_0x74499d['shift']());}}}(a32_0x4880,0xaaf36));function a32_0x14b2(_0x3fec85,_0x2be078){_0x3fec85=_0x3fec85-0xe8;const _0x488061=a32_0x4880();let _0x14b29a=_0x488061[_0x3fec85];return _0x14b29a;}import a32_0x3f0175 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{getCliVersion}from'../utils/version.js';import{getApiDomain,getKbServiceDomain,getRuntimeDomain,getSkillDomain,getUserDomain}from'../constant/domain.js';import{normalizeLovrabetRegion}from'../constant/region.js';import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile,loadRawConfigLayers}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{inspectServiceRegistry}from'../commands/service/registry.js';function a32_0x4880(){const _0x38667d=['\x20\x20Config\x20JSON','path','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','globalConfig','accessKeySource','prototype','5386220OBeaDV','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','verbose','ignored\x20in\x20','20035jiJaDe','project','green','(no\x20file)','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','(not\x20set)','⚠\x20Empty\x20(treated\x20as\x20{})','projectConfig','✓\x20current','\x20\x20auth\x20(effective):\x20','read','call','serviceCount','repeat','\x20\x20Repair\x20global:\x20\x20\x20\x20','\x20config\x20delete\x20routing','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','✗\x20Invalid','currentApp','4350294ybUbYX','\x20doctor','Diagnose\x20CLI\x20configuration\x20and\x20environment','arch','✓\x20Loaded','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','582883jvzaJA','log','(invalid)','check','str','inherit','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','region','empty','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','length','message','\x20\x20Skill\x20Version:\x20\x20\x20','\x20\x20Legacy\x20inherit:\x20\x20\x20','appCode','installedPath','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','\x20(accessKey)','not\x20configured','red','includes','hasOwnProperty','\x20\x20Built-in\x20Skill','\x20config\x20init','61878VhKbAW','\x20config','yellow','\x20\x20region:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','✓\x20Valid\x20JSON','\x20+\x20','ClientAk','\x20\x20Package\x20Version:\x20','serviceCode','locale','repairCommand','missing','gray','bold','\x20\x20Session\x20check:\x20\x20\x20','reason','⚠\x20Empty','3975368viDxoG','padEnd','registryPath','commandCount','global','status','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20kbServiceDomain:\x20','\x20\x20AK\x20source:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Repair\x20project:\x20\x20','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','raw','(set,\x20length=','(default)','Unavailable\x20until\x20routing\x20configuration\x20is\x20repaired','212HhyBtu','riskLevel','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','app','doctor','routing','current','\x20config\x20delete\x20routing\x20--global','filter','\x20\x20runtimeDomain:\x20\x20\x20','accessKey','version','state','services','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Repair\x20global:\x20\x20\x20','\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(missing)','format','(none)','source','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Service\x20Tree','461241ZRqtSV','\x20\x20app\x20locale:\x20\x20\x20\x20\x20\x20','\x20\x20─','(default:\x20'];a32_0x4880=function(){return _0x38667d;};return a32_0x4880();}import{inspectBuiltinSkill}from'../skills/builtin-skill.js';async function execute(_0x5cae04){const _0x32c22a=a32_0x14b2,_0x91ed48=getCliVersion(),_0x42dc53=buildConfigFromFlags({'app':_0x5cae04[_0x32c22a(0x155)]?.(_0x32c22a(0x114)),'appcode':_0x5cae04[_0x32c22a(0x155)]?.('appcode'),'env':_0x5cae04[_0x32c22a(0x155)]?.('env')});let _0x2f444a,_0x6f9a25;try{_0x2f444a=normalizeLovrabetRegion(_0x42dc53[_0x32c22a(0x10d)][_0x32c22a(0x158)]);}catch(_0x56af86){_0x6f9a25=_0x56af86 instanceof Error?_0x56af86:new Error(String(_0x56af86));}let _0x1509ec;if(!_0x6f9a25)try{await initGlobalEnvironment(_0x42dc53);}catch(_0x272d38){_0x1509ec=_0x272d38 instanceof Error?_0x272d38:new Error(String(_0x272d38));}console['log'](),console['log'](a32_0x3f0175[_0x32c22a(0xfe)](CLI_BIN_NAME+_0x32c22a(0x14b))),console[_0x32c22a(0x152)](a32_0x3f0175[_0x32c22a(0xfd)]('─'['repeat'](0x32))),console['log'](_0x32c22a(0x14f)+_0x91ed48),console[_0x32c22a(0x152)](_0x32c22a(0x10c)+process[_0x32c22a(0x11c)]),console[_0x32c22a(0x152)](_0x32c22a(0x108)+process['platform']+'\x20'+process[_0x32c22a(0x14d)]);const _0x3f3c9c=inspectBuiltinSkill();console[_0x32c22a(0x152)](),console['log'](a32_0x3f0175[_0x32c22a(0xfe)](_0x32c22a(0xee))),console['log'](a32_0x3f0175[_0x32c22a(0xfd)]('\x20\x20─'[_0x32c22a(0x144)](0x1e))),console['log'](_0x32c22a(0x150)+(_0x3f3c9c[_0x32c22a(0x11d)]===_0x32c22a(0x117)?a32_0x3f0175[_0x32c22a(0x139)](_0x32c22a(0x13f)):a32_0x3f0175['red']('✗\x20'+_0x3f3c9c['state']))),console[_0x32c22a(0x152)](_0x32c22a(0xf8)+_0x3f3c9c['packageVersion']),console['log'](_0x32c22a(0x15d)+(_0x3f3c9c['skillVersion']||a32_0x3f0175[_0x32c22a(0xfd)](_0x32c22a(0x122)))),console[_0x32c22a(0x152)]('\x20\x20Installed\x20Path:\x20\x20'+(_0x3f3c9c[_0x32c22a(0x160)]||a32_0x3f0175['gray']('(not\x20found)')));_0x3f3c9c[_0x32c22a(0x11d)]!==_0x32c22a(0x117)&&console[_0x32c22a(0x152)]('\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3f3c9c[_0x32c22a(0xfb)]);_0x3f3c9c[_0x32c22a(0x100)]&&console['log']('\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3f3c9c['reason']);console[_0x32c22a(0x152)](),console[_0x32c22a(0x152)](a32_0x3f0175[_0x32c22a(0xfe)]('\x20\x20Config\x20Files')),console[_0x32c22a(0x152)](a32_0x3f0175['gray'](_0x32c22a(0x12a)[_0x32c22a(0x144)](0x1e)));const _0x39fda5=getGlobalConfigPath(),_0x22fde8=getProjectConfigPath();console[_0x32c22a(0x152)](_0x32c22a(0x15a)+(_0x39fda5||a32_0x3f0175[_0x32c22a(0xfd)]('(not\x20found)'))),console[_0x32c22a(0x152)](_0x32c22a(0x126)+(_0x22fde8||a32_0x3f0175[_0x32c22a(0xfd)]('(not\x20found)'))),console[_0x32c22a(0x152)](),console['log'](a32_0x3f0175[_0x32c22a(0xfe)](_0x32c22a(0x12c))),console[_0x32c22a(0x152)](a32_0x3f0175[_0x32c22a(0xfd)]('\x20\x20─'['repeat'](0x1e)));const _0x455e22=(_0x2a48d5,_0x2808d1)=>{const _0x4d61bd=_0x32c22a;if(!_0x2808d1){console['log']('\x20\x20'+_0x2a48d5[_0x4d61bd(0x103)](0x11)+'\x20'+a32_0x3f0175[_0x4d61bd(0xfd)](_0x4d61bd(0x13a)));return;}const _0x5c7c1e=inspectCliConfigJsonFile(_0x2808d1);if(_0x5c7c1e[_0x4d61bd(0x107)]==='ok')console[_0x4d61bd(0x152)]('\x20\x20'+_0x2a48d5[_0x4d61bd(0x103)](0x11)+'\x20'+a32_0x3f0175['green'](_0x4d61bd(0xf5)));else{if(_0x5c7c1e[_0x4d61bd(0x107)]==='empty')console['log']('\x20\x20'+_0x2a48d5[_0x4d61bd(0x103)](0x11)+'\x20'+a32_0x3f0175[_0x4d61bd(0xf2)](_0x4d61bd(0x13d)));else _0x5c7c1e[_0x4d61bd(0x107)]===_0x4d61bd(0xfc)?console[_0x4d61bd(0x152)]('\x20\x20'+_0x2a48d5['padEnd'](0x11)+'\x20'+a32_0x3f0175['gray']('(missing)')):(console[_0x4d61bd(0x152)]('\x20\x20'+_0x2a48d5[_0x4d61bd(0x103)](0x11)+'\x20'+a32_0x3f0175[_0x4d61bd(0xeb)]('✗\x20Invalid\x20JSON')),console[_0x4d61bd(0x152)]('\x20\x20'+''['padEnd'](0x11)+'\x20'+a32_0x3f0175[_0x4d61bd(0xeb)](_0x5c7c1e[_0x4d61bd(0x15c)])));}};_0x455e22('Global',_0x39fda5),_0x455e22('Project',_0x22fde8);const _0x2a2708=loadRawConfigLayers(),_0x44c1c1=[Object[_0x32c22a(0x131)][_0x32c22a(0xed)][_0x32c22a(0x142)](_0x2a2708[_0x32c22a(0x12f)],_0x32c22a(0x156))?_0x32c22a(0x106):null,Object[_0x32c22a(0x131)][_0x32c22a(0xed)][_0x32c22a(0x142)](_0x2a2708[_0x32c22a(0x13e)],_0x32c22a(0x156))?_0x32c22a(0x138):null][_0x32c22a(0x119)](Boolean);_0x44c1c1[_0x32c22a(0x15b)]>0x0&&(console[_0x32c22a(0x152)](_0x32c22a(0x15e)+a32_0x3f0175[_0x32c22a(0xf2)](_0x32c22a(0x136)+_0x44c1c1['join'](_0x32c22a(0xf6))+_0x32c22a(0xf1))),_0x44c1c1[_0x32c22a(0xec)]('project')&&console['log']('\x20\x20Repair\x20project:\x20\x20\x20'+CLI_BIN_NAME+'\x20config\x20delete\x20inherit'),_0x44c1c1['includes'](_0x32c22a(0x106))&&console[_0x32c22a(0x152)](_0x32c22a(0x145)+CLI_BIN_NAME+'\x20config\x20delete\x20inherit\x20--global'));_0x1509ec&&(console[_0x32c22a(0x152)](),console[_0x32c22a(0x152)](a32_0x3f0175[_0x32c22a(0xfe)]('\x20\x20Routing\x20Configuration')),console[_0x32c22a(0x152)](a32_0x3f0175[_0x32c22a(0xfd)](_0x32c22a(0x12a)[_0x32c22a(0x144)](0x1e))),console[_0x32c22a(0x152)](_0x32c22a(0xf4)+a32_0x3f0175['red'](_0x32c22a(0x148))),console['log'](_0x32c22a(0x121)+_0x1509ec[_0x32c22a(0x15c)]),Object[_0x32c22a(0x131)][_0x32c22a(0xed)][_0x32c22a(0x142)](_0x2a2708[_0x32c22a(0x13e)],_0x32c22a(0x116))&&console[_0x32c22a(0x152)](_0x32c22a(0x10b)+CLI_BIN_NAME+_0x32c22a(0x146)),Object[_0x32c22a(0x131)]['hasOwnProperty'][_0x32c22a(0x142)](_0x2a2708[_0x32c22a(0x12f)],_0x32c22a(0x116))&&console[_0x32c22a(0x152)](_0x32c22a(0x120)+CLI_BIN_NAME+_0x32c22a(0x118)));_0x6f9a25&&(console[_0x32c22a(0x152)](),console[_0x32c22a(0x152)](a32_0x3f0175['bold']('\x20\x20Country/Region\x20Configuration')),console[_0x32c22a(0x152)](a32_0x3f0175[_0x32c22a(0xfd)](_0x32c22a(0x12a)[_0x32c22a(0x144)](0x1e))),console[_0x32c22a(0x152)](_0x32c22a(0xf4)+a32_0x3f0175['red'](_0x32c22a(0x148))),console[_0x32c22a(0x152)](_0x32c22a(0x121)+_0x6f9a25[_0x32c22a(0x15c)]),Object[_0x32c22a(0x131)][_0x32c22a(0xed)]['call'](_0x2a2708[_0x32c22a(0x13e)],_0x32c22a(0x158))&&console[_0x32c22a(0x152)](_0x32c22a(0x10b)+CLI_BIN_NAME+'\x20config\x20delete\x20region'),Object[_0x32c22a(0x131)][_0x32c22a(0xed)]['call'](_0x2a2708['globalConfig'],_0x32c22a(0x158))&&console['log']('\x20\x20Repair\x20global:\x20\x20\x20'+CLI_BIN_NAME+_0x32c22a(0xef)));console[_0x32c22a(0x152)](),console[_0x32c22a(0x152)](a32_0x3f0175['bold']('\x20\x20Merged\x20Config')),console['log'](a32_0x3f0175[_0x32c22a(0xfd)](_0x32c22a(0x12a)['repeat'](0x1e))),console[_0x32c22a(0x152)](_0x32c22a(0x113)+(_0x42dc53[_0x32c22a(0x15f)]||a32_0x3f0175[_0x32c22a(0xeb)](_0x32c22a(0x13c)))),console[_0x32c22a(0x152)](_0x32c22a(0xf3)+(_0x2f444a??a32_0x3f0175['red'](_0x32c22a(0x153)))),console[_0x32c22a(0x152)](_0x32c22a(0x129)+_0x42dc53[_0x32c22a(0xfa)]),console[_0x32c22a(0x152)](_0x32c22a(0x134)+(_0x42dc53['defaultApp']||a32_0x3f0175[_0x32c22a(0xfd)](_0x32c22a(0x124)))),console[_0x32c22a(0x152)]('\x20\x20currentApp:\x20\x20\x20\x20\x20\x20'+(_0x42dc53[_0x32c22a(0x149)]||a32_0x3f0175[_0x32c22a(0xfd)](_0x32c22a(0x124)))),console['log'](_0x32c22a(0x157)+(_0x42dc53[_0x32c22a(0x123)]||a32_0x3f0175[_0x32c22a(0xfd)](_0x32c22a(0x12b)+DEFAULT_CONFIG_VALUES[_0x32c22a(0x123)]+')'))),console[_0x32c22a(0x152)](_0x32c22a(0x13b)+(_0x42dc53['pageSize']??a32_0x3f0175[_0x32c22a(0xfd)](_0x32c22a(0x10f)))),console[_0x32c22a(0x152)]('\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20'+_0x42dc53[_0x32c22a(0x112)]),console[_0x32c22a(0x152)](_0x32c22a(0x133)+_0x42dc53[_0x32c22a(0x135)]),console[_0x32c22a(0x152)](_0x32c22a(0x140)+AUTH_MODE[_0x32c22a(0xf7)]);if(_0x42dc53[_0x32c22a(0x130)])console[_0x32c22a(0x152)](_0x32c22a(0x10a)+_0x42dc53[_0x32c22a(0x130)]);console['log'](_0x32c22a(0x147)+(_0x42dc53[_0x32c22a(0x11b)]?a32_0x3f0175[_0x32c22a(0x139)](_0x32c22a(0x10e)+_0x42dc53[_0x32c22a(0x11b)][_0x32c22a(0x15b)]+')'):a32_0x3f0175[_0x32c22a(0xfd)](_0x32c22a(0x124)))),console[_0x32c22a(0x152)](),console[_0x32c22a(0x152)](a32_0x3f0175[_0x32c22a(0xfe)]('\x20\x20API\x20Endpoints')),console[_0x32c22a(0x152)](a32_0x3f0175[_0x32c22a(0xfd)](_0x32c22a(0x12a)[_0x32c22a(0x144)](0x1e)));_0x1509ec||_0x6f9a25?console[_0x32c22a(0x152)](_0x32c22a(0xf4)+a32_0x3f0175[_0x32c22a(0xeb)](_0x32c22a(0x110))):(console['log']('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console[_0x32c22a(0x152)]('\x20\x20userDomain:\x20\x20\x20\x20\x20\x20'+getUserDomain()),console[_0x32c22a(0x152)](_0x32c22a(0x11a)+getRuntimeDomain()),console[_0x32c22a(0x152)]('\x20\x20skillDomain:\x20\x20\x20\x20\x20'+getSkillDomain()),console[_0x32c22a(0x152)](_0x32c22a(0x109)+(getKbServiceDomain()??_0x32c22a(0xea))));console['log'](),console[_0x32c22a(0x152)](a32_0x3f0175[_0x32c22a(0xfe)](_0x32c22a(0x127))),console['log'](a32_0x3f0175[_0x32c22a(0xfd)](_0x32c22a(0x12a)[_0x32c22a(0x144)](0x1e)));const _0x1cc1bc=inspectServiceRegistry();console[_0x32c22a(0x152)](_0x32c22a(0x11f)+_0x1cc1bc[_0x32c22a(0x104)]),console[_0x32c22a(0x152)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+formatServiceRegistryStatus(_0x1cc1bc)),console[_0x32c22a(0x152)](_0x32c22a(0xe8)+_0x1cc1bc[_0x32c22a(0x143)]),console[_0x32c22a(0x152)](_0x32c22a(0x12e)+_0x1cc1bc[_0x32c22a(0x105)]);for(const _0x91fff0 of _0x1cc1bc[_0x32c22a(0x11e)]){console[_0x32c22a(0x152)]('\x20\x20'+(_0x91fff0[_0x32c22a(0xf9)]+':')[_0x32c22a(0x103)](0x11)+'\x20'+(_0x91fff0['name']||a32_0x3f0175[_0x32c22a(0xfd)]('(unnamed)'))+'\x20('+_0x91fff0[_0x32c22a(0x105)]+'\x20commands)'),console[_0x32c22a(0x152)]('\x20\x20'+''[_0x32c22a(0x103)](0x11)+'\x20Imported\x20from:\x20'+_0x91fff0[_0x32c22a(0x125)][_0x32c22a(0x12d)]);}return console['log'](),console[_0x32c22a(0x152)](a32_0x3f0175[_0x32c22a(0xfe)]('\x20\x20Auth')),console[_0x32c22a(0x152)](a32_0x3f0175['gray'](_0x32c22a(0x12a)['repeat'](0x1e))),console[_0x32c22a(0x152)]('\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a32_0x3f0175[_0x32c22a(0x139)](AUTH_MODE[_0x32c22a(0xf7)]+_0x32c22a(0xe9))),console[_0x32c22a(0x152)](_0x32c22a(0xff)+a32_0x3f0175[_0x32c22a(0xfd)]('(removed\x20—\x20cookie\x20auth\x20disabled)')),console[_0x32c22a(0x152)](),{'ok':!![]};}function formatServiceRegistryStatus(_0x4abc4d){const _0x371211=a32_0x14b2;if(_0x4abc4d['status']==='ok')return a32_0x3f0175[_0x371211(0x139)](_0x371211(0x14e));if(_0x4abc4d[_0x371211(0x107)]===_0x371211(0xfc))return a32_0x3f0175[_0x371211(0xfd)]('(not\x20found)');if(_0x4abc4d['status']===_0x371211(0x159))return a32_0x3f0175['yellow'](_0x371211(0x101));return a32_0x3f0175['red'](_0x371211(0x148)+(_0x4abc4d[_0x371211(0x15c)]?':\x20'+_0x4abc4d[_0x371211(0x15c)]:''));}export const doctorDefinition={'service':a32_0x3d0797(0x115),'command':a32_0x3d0797(0x154),'description':a32_0x3d0797(0x14c),'risk':a32_0x3d0797(0x141),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a33_0x56df(_0x1e9dce,_0x28353a){_0x1e9dce=_0x1e9dce-0x9c;const _0x1bab12=a33_0x1bab();let _0x56dfa0=_0x1bab12[_0x1e9dce];return _0x56dfa0;}const a33_0xd12ad6=a33_0x56df;(function(_0x11a687,_0x3ef76e){const _0x3d59e6=a33_0x56df,_0x29e4b0=_0x11a687();while(!![]){try{const _0x13178e=-parseInt(_0x3d59e6(0xb4))/0x1+parseInt(_0x3d59e6(0xae))/0x2+parseInt(_0x3d59e6(0xbd))/0x3+parseInt(_0x3d59e6(0xb3))/0x4*(parseInt(_0x3d59e6(0xa8))/0x5)+parseInt(_0x3d59e6(0xb9))/0x6+parseInt(_0x3d59e6(0xaf))/0x7*(parseInt(_0x3d59e6(0xa6))/0x8)+-parseInt(_0x3d59e6(0xa2))/0x9;if(_0x13178e===_0x3ef76e)break;else _0x29e4b0['push'](_0x29e4b0['shift']());}catch(_0x31a959){_0x29e4b0['push'](_0x29e4b0['shift']());}}}(a33_0x1bab,0x49654));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const FILE_FLAG={'name':a33_0xd12ad6(0xbf),'type':a33_0xd12ad6(0xb1),'required':!![],'description':a33_0xd12ad6(0xa9)},FILEPATH_FLAG={'name':a33_0xd12ad6(0xb0),'type':a33_0xd12ad6(0xb1),'required':!![],'description':'Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data'},DOWNLOAD_FLAG={'name':a33_0xd12ad6(0xab),'type':a33_0xd12ad6(0x9c),'description':a33_0xd12ad6(0xb7)},LONG_TERM_FLAG={'name':a33_0xd12ad6(0xb5),'type':'boolean','description':a33_0xd12ad6(0xad)};function requireFilePath(_0x1294ee){const _0x5ae71a=a33_0xd12ad6,_0x38bdc8=_0x1294ee[_0x5ae71a(0xa1)]();if(!_0x38bdc8)throw CliErrors[_0x5ae71a(0xa0)](_0x5ae71a(0xba));return _0x38bdc8;}function a33_0x1bab(){const _0x35993d=['1154526VsPnDh','7RbtWYf','filepath','string','/client/uploadFile','44VtHKHg','428173MTaioT','long-term','filePath','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','1959078AEmjkG','filePath\x20is\x20required.','appCode','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','1389213CTNQAZ','File','file','upload','Preview:\x20upload\x20','boolean','bool','body','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','validation','trim','10962009FmGhHp','Uploaded\x20file:\x20','str','path','2862832HHLtCT','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','100955WyTzXv','Path\x20to\x20the\x20local\x20file\x20to\x20upload','read','download','description','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML'];a33_0x1bab=function(){return _0x35993d;};return a33_0x1bab();}const fileUpload={'service':'file','command':a33_0xd12ad6(0xc0),'description':a33_0xd12ad6(0x9f),'risk':'read','flags':[FILE_FLAG],async 'dryRun'(_0x58c4e4){const _0x275e37=a33_0xd12ad6,_0xe16f67=requireRuntimeUploadFile(_0x58c4e4[_0x275e37(0xa4)](_0x275e37(0xbf)),_0x275e37(0xbe));return dryRun('POST',_0x275e37(0xb2))[_0x275e37(0x9e)]({'appCode':_0x58c4e4['appCode'],'multipart':{'file':_0xe16f67}})[_0x275e37(0xac)](_0x275e37(0xc1)+_0xe16f67[_0x275e37(0xa5)]+'\x20to\x20runtime\x20app\x20'+_0x58c4e4[_0x275e37(0xbb)])['build']();},async 'execute'(_0x54a1aa){const _0x14a134=a33_0xd12ad6,_0x1417ea=requireRuntimeUploadFile(_0x54a1aa[_0x14a134(0xa4)](_0x14a134(0xbf)),'File'),_0x14ca9f=await uploadRuntimeFile(_0x54a1aa[_0x14a134(0xbb)],_0x1417ea[_0x14a134(0xa5)]);return{'ok':!![],'data':_0x14ca9f,'message':_0x14ca9f['filePath']?_0x14a134(0xa3)+_0x14ca9f[_0x14a134(0xb6)]+_0x14a134(0xbc):_0x14a134(0xb8)};}},fileQueryUrl={'service':a33_0xd12ad6(0xbf),'command':'query-url','description':a33_0xd12ad6(0xa7),'risk':a33_0xd12ad6(0xaa),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x236808){const _0xe114ca=a33_0xd12ad6,_0x4d0763=requireFilePath(_0x236808['str'](_0xe114ca(0xb0))),_0x11a0ac=await queryRuntimeFileUrl(_0x4d0763,{'download':_0x236808['bool'](_0xe114ca(0xab)),'longTerm':_0x236808[_0xe114ca(0x9d)](_0xe114ca(0xb5))});return{'ok':!![],'data':_0x11a0ac};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
|
package/lib/commands/init.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a34_0xaa4f1f=a34_0xff8b;(function(_0x763ee,_0x571869){const _0x53f63e=a34_0xff8b,_0x1969f0=_0x763ee();while(!![]){try{const _0x4aafbb=-parseInt(_0x53f63e(0x120))/0x1+parseInt(_0x53f63e(0x148))/0x2*(parseInt(_0x53f63e(0x140))/0x3)+-parseInt(_0x53f63e(0x13e))/0x4+-parseInt(_0x53f63e(0x126))/0x5*(parseInt(_0x53f63e(0x147))/0x6)+-parseInt(_0x53f63e(0x132))/0x7*(parseInt(_0x53f63e(0x12b))/0x8)+parseInt(_0x53f63e(0x130))/0x9+parseInt(_0x53f63e(0x143))/0xa;if(_0x4aafbb===_0x571869)break;else _0x1969f0['push'](_0x1969f0['shift']());}catch(_0x35f20f){_0x1969f0['push'](_0x1969f0['shift']());}}}(a34_0x3706,0x4e762));function a34_0xff8b(_0x5c0744,_0x23795d){_0x5c0744=_0x5c0744-0x11f;const _0x3706dc=a34_0x3706();let _0xff8b0c=_0x3706dc[_0x5c0744];return _0xff8b0c;}import{existsSync,readFileSync}from'node:fs';import{resolve,isAbsolute}from'node:path';function a34_0x3706(){const _0x2fdda0=['utf8','3215YukdEe','\x20\x20appcode:\x20','Imported\x20from\x20','log','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','256umrBkt','cwd','app','file','Write\x20to\x20global\x20(~/','3783213IhMwNZ','project','105938BOczpW','defaultApp','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','global','\x20\x20config:\x20\x20','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','Skip\x20confirmation\x20when\x20overwriting','\x20\x20default:\x20','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','appcode','boolean','string','2308656pacUGe','newConfigFileName','332994zBHoxw','apps','Source\x20file\x20not\x20found:\x20','12807370ISlrTH','yes','env','includes','306wsMNXG','6zjXSWU','Failed\x20to\x20parse\x20source\x20file:\x20','618465bLfEvD','riskLevel','Override\x20imported\x20default\x20env','validation','join'];a34_0x3706=function(){return _0x2fdda0;};return a34_0x3706();}import{CliErrors}from'../errors.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{IMPORTABLE_RUNTIME_CONFIG_KEYS}from'../config/schema.js';import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../context.js';import{PRODUCT_CONFIG}from'../constant/product.js';export const appImportFlagDefs=[{'name':'file','type':'string','description':a34_0xaa4f1f(0x12a),'required':!![]},{'name':a34_0xaa4f1f(0x13b),'type':'string','description':'Override\x20imported\x20default\x20appcode'},{'name':a34_0xaa4f1f(0x145),'type':a34_0xaa4f1f(0x13d),'description':a34_0xaa4f1f(0x122),'enum':[...RUNTIME_ENV_VALUES]},{'name':a34_0xaa4f1f(0x135),'type':a34_0xaa4f1f(0x13c),'description':a34_0xaa4f1f(0x12f)+PRODUCT_CONFIG[a34_0xaa4f1f(0x13f)]+')\x20instead\x20of\x20project','default':![]},{'name':'yes','type':a34_0xaa4f1f(0x13c),'description':a34_0xaa4f1f(0x138),'default':![]}];export async function runAppImport(_0x3526c1){const _0x3d54fe=a34_0xaa4f1f,_0x34a06f=_0x3526c1[_0x3d54fe(0x135)]?_0x3d54fe(0x135):_0x3d54fe(0x131),_0x840ce2=resolveWriteConfigPath(_0x34a06f);await runFromImport(_0x3526c1,_0x840ce2);}async function runFromImport(_0x843a3b,_0x101ad6){const _0x4958b8=a34_0xaa4f1f,_0x3275ee=resolveFilePath(_0x843a3b[_0x4958b8(0x12e)]);if(!existsSync(_0x3275ee))throw CliErrors['validation'](_0x4958b8(0x142)+_0x3275ee);const _0x1dae76=readSourceFile(_0x3275ee),_0x122cac=convertToRuntimeConfig(_0x1dae76);_0x843a3b['appcode']&&(_0x122cac[_0x4958b8(0x13b)]=String(_0x843a3b[_0x4958b8(0x13b)]));_0x843a3b[_0x4958b8(0x145)]&&(_0x122cac[_0x4958b8(0x145)]=resolveImportEnv(_0x843a3b));if(!_0x122cac[_0x4958b8(0x13b)])throw CliErrors[_0x4958b8(0x123)](_0x4958b8(0x13a),'Provide\x20--appcode\x20<code>\x20or\x20use\x20an\x20upgraded\x20.rabetbase.json\x20with\x20top-level\x20appcode.\x20Legacy\x20files\x20must\x20be\x20upgraded\x20first\x20with\x20`rabetbase\x20project\x20upgrade`.');await writeImportConfig(_0x101ad6,_0x122cac,_0x843a3b),console[_0x4958b8(0x129)](_0x4958b8(0x128)+_0x3275ee),console[_0x4958b8(0x129)](_0x4958b8(0x136)+_0x101ad6),console['log'](_0x4958b8(0x127)+_0x122cac[_0x4958b8(0x13b)]);if(_0x122cac[_0x4958b8(0x133)])console[_0x4958b8(0x129)](_0x4958b8(0x139)+_0x122cac[_0x4958b8(0x133)]);}function convertToRuntimeConfig(_0x28dd6c){const _0x4e3088=a34_0xaa4f1f;if(_0x28dd6c[_0x4e3088(0x141)]&&typeof _0x28dd6c['apps']==='object')throw CliErrors[_0x4e3088(0x123)](_0x4e3088(0x134),_0x4e3088(0x137));const _0x2c342d={};for(const _0x43b5e4 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x28dd6c[_0x43b5e4]!==undefined&&(_0x2c342d[_0x43b5e4]=_0x28dd6c[_0x43b5e4]);}return!_0x2c342d[_0x4e3088(0x121)]&&(_0x2c342d['riskLevel']=DEFAULT_CONFIG_VALUES[_0x4e3088(0x121)]),_0x2c342d;}async function writeImportConfig(_0x5104d8,_0x4ccb2b,_0x970296){const _0x592de9=a34_0xaa4f1f;let _0x5e798f={};existsSync(_0x5104d8)&&!_0x970296[_0x592de9(0x144)]&&(_0x5e798f=readConfigFile(_0x5104d8));for(const [_0x1a77e0,_0x39628b]of Object['entries'](_0x4ccb2b)){_0x39628b!==undefined&&(_0x5e798f[_0x1a77e0]=_0x39628b);}if(_0x5e798f[_0x592de9(0x12d)])delete _0x5e798f[_0x592de9(0x12d)];writeConfigFile(_0x5104d8,_0x5e798f);}function resolveFilePath(_0x28cf10){const _0x381358=a34_0xaa4f1f;return isAbsolute(_0x28cf10)?_0x28cf10:resolve(process[_0x381358(0x12c)](),_0x28cf10);}function readSourceFile(_0x37386a){const _0x5cc612=a34_0xaa4f1f;try{const _0x15be57=readFileSync(_0x37386a,{'encoding':_0x5cc612(0x125)});return JSON['parse'](_0x15be57);}catch(_0xd7c30b){throw CliErrors[_0x5cc612(0x123)](_0x5cc612(0x11f)+_0xd7c30b['message']);}}function resolveImportEnv(_0x5a96c9){const _0xe20c77=a34_0xaa4f1f,_0xf70642=_0x5a96c9['env'];if(_0xf70642===undefined||_0xf70642==='')return DEFAULT_CONFIG_VALUES[_0xe20c77(0x145)];if(!RUNTIME_ENV_VALUES[_0xe20c77(0x146)](_0xf70642))throw CliErrors[_0xe20c77(0x123)]('Invalid\x20env\x20\x22'+_0xf70642+'\x22.\x20Allowed:\x20'+RUNTIME_ENV_VALUES[_0xe20c77(0x124)](',\x20'));return _0xf70642;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x7329d4,_0x1974cd){const _0x1f22a9=a35_0x7cef,_0x267667=_0x7329d4();while(!![]){try{const _0x4ae34d=parseInt(_0x1f22a9(0x1d3))/0x1+-parseInt(_0x1f22a9(0x1e6))/0x2+parseInt(_0x1f22a9(0x1da))/0x3+-parseInt(_0x1f22a9(0x1dd))/0x4*(parseInt(_0x1f22a9(0x1e5))/0x5)+-parseInt(_0x1f22a9(0x1e3))/0x6*(-parseInt(_0x1f22a9(0x1d4))/0x7)+-parseInt(_0x1f22a9(0x1dc))/0x8+-parseInt(_0x1f22a9(0x1db))/0x9*(parseInt(_0x1f22a9(0x1e1))/0xa);if(_0x4ae34d===_0x1974cd)break;else _0x267667['push'](_0x267667['shift']());}catch(_0x1b378c){_0x267667['push'](_0x267667['shift']());}}}(a35_0x3468,0x571ec));function a35_0x3468(){const _0x26e0ea=['559854rrDqfS','userName','1324715pIBNVn','202026GOoIyO','email','username','nickname','222938LGcAzq','49JbuyJT','envName','name','@lovrabet/lovrabet-cli','mergedCli','tenantCode','1311201TOUoXo','9RKINnW','2319784vNkObw','4FlpayN','production','appCode','userId','3003950EjqcCj','nickName'];a35_0x3468=function(){return _0x26e0ea;};return a35_0x3468();}import{platform,release,arch}from'node:os';import{getLoginUserInfo}from'../../core/api-client.js';function a35_0x7cef(_0x660193,_0x42f0b1){_0x660193=_0x660193-0x1d0;const _0x346867=a35_0x3468();let _0x7cef67=_0x346867[_0x660193];return _0x7cef67;}import{getCliVersion}from'../../utils/version.js';export async function getIssueReportContext(_0x663698,_0x3ae40f){const _0x59973a=a35_0x7cef,_0x1bc111=_0x3ae40f?undefined:await getLoginUserInfo();return{'serviceName':_0x59973a(0x1d7),'serviceVersion':getCliVersion(),'environment':_0x663698[_0x59973a(0x1d5)]??_0x59973a(0x1de),'appCode':_0x663698[_0x59973a(0x1df)]||_0x663698[_0x59973a(0x1d8)]?.['appCode'],'os':platform()+'\x20'+release()+'\x20'+arch(),'terminal':process.env.TERM,'user':_0x1bc111?{'id':String(_0x1bc111['id']??_0x1bc111[_0x59973a(0x1e0)]??''),'username':_0x1bc111[_0x59973a(0x1d1)]??_0x1bc111[_0x59973a(0x1e4)]??_0x1bc111['loginName'],'nickname':_0x1bc111[_0x59973a(0x1d2)]??_0x1bc111[_0x59973a(0x1e2)]??_0x1bc111[_0x59973a(0x1d6)]??undefined,'email':_0x1bc111[_0x59973a(0x1d0)]??undefined,'tenantCode':_0x1bc111[_0x59973a(0x1d9)]}:undefined};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a36_0x550b(){const _0x1e61f1=['17521ZHypvs','1191897mVIkZB','6212LhQnEI','274284KFZAYT','1602mOXMHq','551536zEimit','2757232BbQqiu','130aLDbeu','3608980cldtMf','1557BJuwoe'];a36_0x550b=function(){return _0x1e61f1;};return a36_0x550b();}(function(_0x50f705,_0x5d4a0b){const _0x89eb98=a36_0x2ab7,_0x1ad0c9=_0x50f705();while(!![]){try{const _0x5f1e59=-parseInt(_0x89eb98(0x88))/0x1+parseInt(_0x89eb98(0x86))/0x2+-parseInt(_0x89eb98(0x8c))/0x3*(parseInt(_0x89eb98(0x85))/0x4)+-parseInt(_0x89eb98(0x8b))/0x5+-parseInt(_0x89eb98(0x87))/0x6*(-parseInt(_0x89eb98(0x8d))/0x7)+parseInt(_0x89eb98(0x89))/0x8+-parseInt(_0x89eb98(0x84))/0x9*(-parseInt(_0x89eb98(0x8a))/0xa);if(_0x5f1e59===_0x5d4a0b)break;else _0x1ad0c9['push'](_0x1ad0c9['shift']());}catch(_0x446ba7){_0x1ad0c9['push'](_0x1ad0c9['shift']());}}}(a36_0x550b,0xc1743));function a36_0x2ab7(_0x1a35dd,_0x2f2fb4){_0x1a35dd=_0x1a35dd-0x84;const _0x550b06=a36_0x550b();let _0x2ab7b9=_0x550b06[_0x1a35dd];return _0x2ab7b9;}import{issueReport}from'./report.js';export const issueDefinitions=[issueReport];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a37_0x39fc66=a37_0x5323;(function(_0x2d3849,_0x203ffc){const _0x515039=a37_0x5323,_0x4fee36=_0x2d3849();while(!![]){try{const _0x289e70=parseInt(_0x515039(0x1d6))/0x1*(-parseInt(_0x515039(0x1f6))/0x2)+-parseInt(_0x515039(0x1d5))/0x3+-parseInt(_0x515039(0x1ea))/0x4*(parseInt(_0x515039(0x1ce))/0x5)+parseInt(_0x515039(0x1d3))/0x6+-parseInt(_0x515039(0x1cf))/0x7*(-parseInt(_0x515039(0x1df))/0x8)+parseInt(_0x515039(0x1dd))/0x9+parseInt(_0x515039(0x1d2))/0xa*(parseInt(_0x515039(0x1f7))/0xb);if(_0x289e70===_0x203ffc)break;else _0x4fee36['push'](_0x4fee36['shift']());}catch(_0x30dc43){_0x4fee36['push'](_0x4fee36['shift']());}}}(a37_0x43ee,0x85db8));import{existsSync}from'node:fs';function a37_0x43ee(){const _0x325d69=['logData','descriptionFilePath','Failed\x20to\x20submit\x20issue\x20log:\x20','1156iNMScN','Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.','Report\x20a\x20problem\x20log\x20with\x20title\x20and\x20markdown\x20context','file','apiError','descriptionSource','title','issue','string','length','message','Submit\x20the\x20issue\x20description\x20and\x20diagnostic\x20context\x20as\x20a\x20problem\x20log.','6aElLNM','2228743BzxbzQ','descriptionSource:\x20','redactions:\x20','redactionCount','Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.','sanitize','inline','descriptionFile:\x20','originalBytes','utf8','File\x20not\x20found:\x20','report','One-line\x20issue\x20summary','str','1865QXJqWV','7CvPiVd','POST','filter','40CQAKQN','3439668iizwbu','Issue\x20log\x20submitted','3150636DlLVlO','177669yjmeQO','trim','truncated','Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)','cwd','\x20bytes','Submit\x20a\x20problem\x20log','5786073TyWkxA','redactionKinds','1701352PnWbBc','validation','traceName','truncated:\x20original\x20','join','Cannot\x20read\x20issue\x20description\x20file:\x20','spanName','description'];a37_0x43ee=function(){return _0x325d69;};return a37_0x43ee();}import{readFile}from'node:fs/promises';function a37_0x5323(_0x4581ed,_0x248e9b){_0x4581ed=_0x4581ed-0x1ca;const _0x43ee1a=a37_0x43ee();let _0x532365=_0x43ee1a[_0x4581ed];return _0x532365;}import{resolve}from'node:path';import{CliErrors}from'../../errors.js';import{reportIssue}from'@lovrabet/cli-framework';import{getIssueReportContext}from'./context.js';const DESCRIPTION_FILE_FLAG='description-file';export const issueReport={'service':a37_0x39fc66(0x1f1),'command':a37_0x39fc66(0x1cb),'description':a37_0x39fc66(0x1ec),'risk':'read','confirmationDescription':a37_0x39fc66(0x1f5),'requiresAuth':!![],'requiresAppCode':![],'defaultOutputFormat':'compress','flags':[{'name':a37_0x39fc66(0x1f0),'type':a37_0x39fc66(0x1f2),'required':!![],'description':a37_0x39fc66(0x1cc)},{'name':a37_0x39fc66(0x1e6),'type':'string','description':a37_0x39fc66(0x1d9)},{'name':DESCRIPTION_FILE_FLAG,'type':'string','description':'Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description'}],async 'validate'(_0x3bac68){const _0x52f0fa=a37_0x39fc66,_0x59167f=_0x3bac68[_0x52f0fa(0x1cd)](_0x52f0fa(0x1f0))[_0x52f0fa(0x1d7)](),_0x5f3bf2=_0x3bac68[_0x52f0fa(0x1cd)](_0x52f0fa(0x1e6))[_0x52f0fa(0x1d7)](),_0x258afa=_0x3bac68[_0x52f0fa(0x1cd)](DESCRIPTION_FILE_FLAG)['trim']();if(!_0x59167f)throw CliErrors['flagMissing'](_0x52f0fa(0x1f0),_0x52f0fa(0x1fb));const _0x25663f=_0x5f3bf2[_0x52f0fa(0x1f3)]>0x0,_0x4d1ef5=_0x258afa[_0x52f0fa(0x1f3)]>0x0;if(_0x25663f===_0x4d1ef5)throw CliErrors[_0x52f0fa(0x1e0)](_0x52f0fa(0x1eb),'Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.');if(_0x4d1ef5){const _0x3fd171=resolve(process[_0x52f0fa(0x1da)](),_0x258afa);if(!existsSync(_0x3fd171))throw CliErrors[_0x52f0fa(0x1e0)](_0x52f0fa(0x1ca)+_0x3fd171);}},async 'dryRun'(_0x4856db){const _0x4f5bbb=a37_0x39fc66,_0x2032e2=await prepareIssueReport(_0x4856db,!![]);return{'method':_0x4f5bbb(0x1d0),'url':'otel://'+_0x2032e2[_0x4f5bbb(0x1e1)]+'/'+_0x2032e2[_0x4f5bbb(0x1e5)],'body':{'traceName':_0x2032e2[_0x4f5bbb(0x1e1)],'spanName':_0x2032e2[_0x4f5bbb(0x1e5)],'logData':_0x2032e2['logData']},'description':[_0x4f5bbb(0x1dc),_0x4f5bbb(0x1f8)+_0x2032e2[_0x4f5bbb(0x1ef)],_0x2032e2[_0x4f5bbb(0x1e8)]?_0x4f5bbb(0x1fe)+_0x2032e2[_0x4f5bbb(0x1e8)]:null,_0x2032e2['sanitize'][_0x4f5bbb(0x1d8)]?_0x4f5bbb(0x1e2)+_0x2032e2[_0x4f5bbb(0x1fc)][_0x4f5bbb(0x1ff)]+_0x4f5bbb(0x1db):null,_0x2032e2[_0x4f5bbb(0x1fc)]['redactionCount']>0x0?_0x4f5bbb(0x1f9)+_0x2032e2[_0x4f5bbb(0x1fc)][_0x4f5bbb(0x1fa)]+'\x20('+_0x2032e2[_0x4f5bbb(0x1fc)][_0x4f5bbb(0x1de)]['join'](',\x20')+')':null][_0x4f5bbb(0x1d1)](Boolean)[_0x4f5bbb(0x1e3)]('\x0a')};},async 'execute'(_0x5c34f7){const _0x23b3b0=a37_0x39fc66,_0x486c9b=await prepareIssueReport(_0x5c34f7,![]);return{'ok':!![],'message':_0x486c9b['sanitize']['redactionCount']||_0x486c9b[_0x23b3b0(0x1fc)][_0x23b3b0(0x1d8)]?'Issue\x20log\x20submitted\x20(content\x20redacted\x20or\x20truncated)':_0x23b3b0(0x1d4),'data':{'traceName':_0x486c9b[_0x23b3b0(0x1e1)],'spanName':_0x486c9b[_0x23b3b0(0x1e5)],'logDataKeys':Object['keys'](_0x486c9b[_0x23b3b0(0x1e7)]),'issue':{'title':_0x486c9b[_0x23b3b0(0x1f0)],'descriptionLength':_0x486c9b['description'][_0x23b3b0(0x1f3)],'descriptionSource':_0x486c9b['descriptionSource'],..._0x486c9b[_0x23b3b0(0x1e8)]?{'descriptionFile':_0x486c9b['descriptionFilePath']}:{},'sanitize':{'originalBytes':_0x486c9b[_0x23b3b0(0x1fc)][_0x23b3b0(0x1ff)],'truncated':_0x486c9b[_0x23b3b0(0x1fc)][_0x23b3b0(0x1d8)],'redactions':_0x486c9b[_0x23b3b0(0x1fc)][_0x23b3b0(0x1fa)],'redactionKinds':_0x486c9b[_0x23b3b0(0x1fc)][_0x23b3b0(0x1de)]}}}};}};async function prepareIssueReport(_0x4672f2,_0x1bdfc0){const _0x4119c5=a37_0x39fc66;await issueReport['validate'](_0x4672f2);const _0x4e3f14=_0x4672f2['str'](DESCRIPTION_FILE_FLAG)[_0x4119c5(0x1d7)](),_0x28cbc7=_0x4e3f14?resolve(process[_0x4119c5(0x1da)](),_0x4e3f14):undefined;let _0x5612a4=_0x4672f2[_0x4119c5(0x1cd)](_0x4119c5(0x1e6));if(_0x28cbc7)try{_0x5612a4=await readFile(_0x28cbc7,_0x4119c5(0x200));}catch{throw CliErrors[_0x4119c5(0x1e0)](_0x4119c5(0x1e4)+_0x28cbc7);}if(!_0x5612a4[_0x4119c5(0x1d7)]())throw CliErrors['validation']('Issue\x20description\x20cannot\x20be\x20empty.');const _0x1f3f35=await getIssueReportContext(_0x4672f2,_0x1bdfc0);try{const _0x21b71e=await reportIssue({'title':_0x4672f2[_0x4119c5(0x1cd)]('title'),'description':_0x5612a4,'context':_0x1f3f35,'dryRun':_0x1bdfc0});return{..._0x21b71e,'descriptionSource':_0x28cbc7?_0x4119c5(0x1ed):_0x4119c5(0x1fd),'descriptionFilePath':_0x28cbc7};}catch(_0x21d759){throw CliErrors[_0x4119c5(0x1ee)](_0x4119c5(0x1e9)+(_0x21d759 instanceof Error?_0x21d759[_0x4119c5(0x1f4)]:String(_0x21d759)),'Check\x20your\x20login\x20and\x20network\x20connectivity.');}}
|
package/lib/commands/kb/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function a38_0x50ff(_0x2e35bd,_0x5cf883){_0x2e35bd=_0x2e35bd-0x129;const _0x59fdea=a38_0x59fd();let _0x50ff9e=_0x59fdea[_0x2e35bd];return _0x50ff9e;}const a38_0x772e9d=a38_0x50ff;(function(_0x2bc1b9,_0x32ee57){const _0x1df1a3=a38_0x50ff,_0x3c6e35=_0x2bc1b9();while(!![]){try{const _0x26f382=parseInt(_0x1df1a3(0x168))/0x1*(parseInt(_0x1df1a3(0x12d))/0x2)+parseInt(_0x1df1a3(0x147))/0x3+parseInt(_0x1df1a3(0x167))/0x4*(parseInt(_0x1df1a3(0x146))/0x5)+-parseInt(_0x1df1a3(0x163))/0x6+parseInt(_0x1df1a3(0x132))/0x7+-parseInt(_0x1df1a3(0x12b))/0x8*(-parseInt(_0x1df1a3(0x157))/0x9)+parseInt(_0x1df1a3(0x140))/0xa*(-parseInt(_0x1df1a3(0x149))/0xb);if(_0x26f382===_0x32ee57)break;else _0x3c6e35['push'](_0x3c6e35['shift']());}catch(_0x4927f7){_0x3c6e35['push'](_0x3c6e35['shift']());}}}(a38_0x59fd,0x24015));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalKnowledgeBaseItem,getPersonalKnowledgeBaseItem,listPersonalKnowledgeBaseItems,updatePersonalKnowledgeBaseItem}from'../../core/api-client.js';import{searchDirectKnowledge,normalizeKbServiceOrigin}from'../../core/kb-search-client.js';import{planPersonalKnowledgeWrite,withKbManagementOrigin}from'../../core/kb-management-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{getKbServiceDomain}from'../../constant/domain.js';import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':a38_0x772e9d(0x155),'type':'string','required':!![],'description':a38_0x772e9d(0x142)},FILE_FLAG={'name':a38_0x772e9d(0x166),'type':'string','required':!![],'description':a38_0x772e9d(0x158)},QUERY_FLAG={'name':a38_0x772e9d(0x16b),'type':a38_0x772e9d(0x144),'required':!![],'description':'Search\x20query\x20for\x20visible\x20public,\x20company,\x20and\x20personal\x20knowledge'},TOPK_FLAG={'name':a38_0x772e9d(0x15c),'type':a38_0x772e9d(0x13d),'description':'Maximum\x20number\x20of\x20search\x20hits\x20to\x20return'};function readKnowledgeFile(_0x5e5a80){const _0x41c01f=a38_0x772e9d;if(!_0x5e5a80)throw CliErrors[_0x41c01f(0x156)](_0x41c01f(0x16c));if(!existsSync(_0x5e5a80))throw CliErrors[_0x41c01f(0x156)]('File\x20not\x20found:\x20'+_0x5e5a80);if(!statSync(_0x5e5a80)['isFile']())throw CliErrors[_0x41c01f(0x156)](_0x41c01f(0x15b)+_0x5e5a80);return readFileSync(_0x5e5a80,_0x41c01f(0x14a));}function summarizePersonalItem(_0x430f9c){const _0x3b2284=a38_0x772e9d;return{'id':_0x430f9c['id'],'title':_0x430f9c[_0x3b2284(0x155)],'version':_0x430f9c[_0x3b2284(0x138)],'ragStatus':_0x430f9c[_0x3b2284(0x13a)],'ragErrorMessage':_0x430f9c[_0x3b2284(0x134)],'updateTime':_0x430f9c[_0x3b2284(0x12c)]};}function detailPersonalItem(_0x2e4860){const _0x483fd6=a38_0x772e9d;return{'id':_0x2e4860['id'],'appCode':_0x2e4860[_0x483fd6(0x13c)],'scope':_0x2e4860[_0x483fd6(0x153)],'userId':_0x2e4860['userId'],'title':_0x2e4860['title'],'content':_0x2e4860['content'],'version':_0x2e4860[_0x483fd6(0x138)],'ragStatus':_0x2e4860[_0x483fd6(0x13a)],'ragErrorMessage':_0x2e4860['ragErrorMessage'],'createTime':_0x2e4860['createTime'],'updateTime':_0x2e4860[_0x483fd6(0x12c)]};}function readTopK(_0x22a1eb){const _0x95d2ff=a38_0x772e9d,_0x201d78=_0x22a1eb[_0x95d2ff(0x162)]('topk');if(_0x201d78===undefined||_0x201d78===null||_0x201d78==='')return undefined;const _0x7e9fae=_0x22a1eb['num']('topk');if(!Number[_0x95d2ff(0x16a)](_0x7e9fae)||_0x7e9fae<0x1||_0x7e9fae>0x32)throw CliErrors[_0x95d2ff(0x156)](_0x95d2ff(0x14f));return _0x7e9fae;}const kbList={'service':'kb','command':'list','description':a38_0x772e9d(0x14e),'risk':a38_0x772e9d(0x161),'flags':[VERBOSE_FLAG],async 'execute'(_0x5d4bcc){const _0x247e8e=a38_0x772e9d,_0x75e2ef=await listPersonalKnowledgeBaseItems(_0x5d4bcc['appCode'],_0x5d4bcc[_0x247e8e(0x135)]);if(_0x5d4bcc[_0x247e8e(0x148)](_0x247e8e(0x13e)))return{'ok':!![],'data':{'total':_0x75e2ef[_0x247e8e(0x15d)],'items':_0x75e2ef}};return{'ok':!![],'data':{'total':_0x75e2ef[_0x247e8e(0x15d)],'items':_0x75e2ef['map'](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a38_0x772e9d(0x169),'description':a38_0x772e9d(0x13f),'risk':a38_0x772e9d(0x161),'flags':[{...ID_FLAG,'type':a38_0x772e9d(0x144),'description':a38_0x772e9d(0x137)}],async 'execute'(_0x14a00a){const _0x531f5e=a38_0x772e9d,_0x3b0db0=await getPersonalKnowledgeBaseItem(_0x14a00a[_0x531f5e(0x139)]('id'),_0x14a00a['appCode'],_0x14a00a[_0x531f5e(0x135)]);return{'ok':!![],'data':detailPersonalItem(_0x3b0db0)};}},kbCreate={'service':'kb','command':a38_0x772e9d(0x12f),'description':a38_0x772e9d(0x130),'risk':a38_0x772e9d(0x159),'confirmationDescription':a38_0x772e9d(0x14c),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x5a9d51){const _0xa6049e=a38_0x772e9d,_0x4f4c7c=_0x5a9d51[_0xa6049e(0x139)](_0xa6049e(0x155)),_0x51eebd=readKnowledgeFile(_0x5a9d51[_0xa6049e(0x139)](_0xa6049e(0x166))),_0x4bc80e=await createPersonalKnowledgeBaseItem(_0x5a9d51[_0xa6049e(0x13c)],{'title':_0x4f4c7c,'content':_0x51eebd},_0x5a9d51[_0xa6049e(0x135)]);return{'ok':!![],'data':summarizePersonalItem(_0x4bc80e),'message':_0xa6049e(0x154)+_0x4bc80e['id']+'\x20('+_0x4bc80e[_0xa6049e(0x155)]+')'};},async 'dryRun'(_0x15fa65){const _0x4074a5=a38_0x772e9d,_0x2f8778=_0x15fa65[_0x4074a5(0x139)](_0x4074a5(0x155)),_0x4d0d01=readKnowledgeFile(_0x15fa65[_0x4074a5(0x139)](_0x4074a5(0x166))),_0x5a57e3=planPersonalKnowledgeWrite(_0x15fa65[_0x4074a5(0x13c)],{'title':_0x2f8778,'content':_0x4d0d01});return dryRun(_0x5a57e3[_0x4074a5(0x164)],_0x5a57e3[_0x4074a5(0x15e)])[_0x4074a5(0x160)](JSON[_0x4074a5(0x143)](_0x5a57e3['jsonBody']))[_0x4074a5(0x136)](_0x4074a5(0x129)+_0x2f8778+'\x22')[_0x4074a5(0x12e)]();}},kbUpdate={'service':'kb','command':a38_0x772e9d(0x15f),'description':a38_0x772e9d(0x16d),'risk':a38_0x772e9d(0x159),'confirmationDescription':a38_0x772e9d(0x14d),'flags':[{...ID_FLAG,'type':a38_0x772e9d(0x144),'description':'Personal\x20knowledge-base\x20entry\x20ID'},{...TITLE_FLAG,'required':![],'description':a38_0x772e9d(0x15a)},FILE_FLAG],async 'execute'(_0x4ecb7e){const _0x497900=a38_0x772e9d,_0x2581d1=_0x4ecb7e[_0x497900(0x139)]('id'),_0x3d0498=readKnowledgeFile(_0x4ecb7e[_0x497900(0x139)](_0x497900(0x166))),_0x16633b=_0x4ecb7e[_0x497900(0x139)](_0x497900(0x155))||undefined,_0x1ea050=await updatePersonalKnowledgeBaseItem(_0x2581d1,_0x4ecb7e[_0x497900(0x13c)],{'title':_0x16633b,'content':_0x3d0498},_0x4ecb7e[_0x497900(0x135)]);return{'ok':!![],'data':summarizePersonalItem(_0x1ea050),'message':'Updated\x20KB\x20entry\x20'+_0x1ea050['id']+'\x20('+_0x1ea050[_0x497900(0x155)]+')'};},async 'dryRun'(_0x47424c){const _0x3c4031=a38_0x772e9d,_0x3e1d6d=_0x47424c['str']('id'),_0x4d4c3a=readKnowledgeFile(_0x47424c[_0x3c4031(0x139)]('file')),_0x52dbbe=await getPersonalKnowledgeBaseItem(_0x3e1d6d,_0x47424c[_0x3c4031(0x13c)],_0x47424c[_0x3c4031(0x135)]),_0x1e96b3=_0x47424c['str']('title')||_0x52dbbe['title'],_0x32f6f3=planPersonalKnowledgeWrite(_0x47424c[_0x3c4031(0x13c)],{'title':_0x1e96b3,'content':_0x4d4c3a},_0x3e1d6d,_0x52dbbe[_0x3c4031(0x138)]);return dryRun(_0x32f6f3['method'],_0x32f6f3[_0x3c4031(0x15e)])['body'](JSON[_0x3c4031(0x143)](_0x32f6f3[_0x3c4031(0x141)]))[_0x3c4031(0x136)](_0x3c4031(0x131)+_0x3e1d6d)[_0x3c4031(0x12e)]();}};function a38_0x59fd(){const _0x4df4b8=['version','str','ragStatus','Search\x20visible\x20public,\x20company,\x20and\x20personal\x20knowledge','appCode','number','verbose','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','80030wUwVSM','jsonBody','Personal\x20knowledge-base\x20entry\x20title','parse','string','trim','5DLDTdn','653757ZnCQVA','bool','792zmMmEj','utf8','kb-service-url','Saves\x20local\x20file\x20content\x20as\x20a\x20personal\x20knowledge-base\x20entry\x20and\x20starts\x20retrieval\x20sync.','Replaces\x20the\x20personal\x20knowledge-base\x20entry\x20body\x20with\x20local\x20file\x20content\x20and\x20triggers\x20retrieval\x20sync.','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','--topk\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.','Configure\x20kbServiceDomain\x20in\x20the\x20connection\x20settings,\x20or\x20pass\x20`--kb-service-url\x20<https-origin>`\x20for\x20this\x20request.','accessKey','map','scope','Created\x20KB\x20entry\x20','title','validation','1850445BATCAi','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','write','Override\x20the\x20existing\x20entry\x20title','File\x20is\x20not\x20a\x20regular\x20file:\x20','topk','length','path','update','body','read','flag','1186188ONvahg','method','search','file','916772HcqSpr','13771mnGFSI','detail','isSafeInteger','query','File\x20path\x20is\x20required.','Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','dryRun','8xhCLfW','updateTime','4btLOJR','build','create','Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20','1687924fXtwQt','execute','ragErrorMessage','signal','description','Personal\x20knowledge-base\x20entry\x20ID'];a38_0x59fd=function(){return _0x4df4b8;};return a38_0x59fd();}function readSearchServiceUrl(_0x15adb8){const _0x4a9d11=a38_0x772e9d;if(_0x15adb8['flag'](_0x4a9d11(0x14b))!==undefined)return normalizeKbServiceOrigin(_0x15adb8['str']('kb-service-url'));const _0x75170=getKbServiceDomain();if(!_0x75170)throw CliErrors[_0x4a9d11(0x156)]('KB\x20Service\x20is\x20not\x20configured\x20for\x20knowledge\x20search.',_0x4a9d11(0x150));return normalizeKbServiceOrigin(_0x75170);}const kbSearch={'service':'kb','command':a38_0x772e9d(0x165),'description':a38_0x772e9d(0x13b),'risk':a38_0x772e9d(0x161),'flags':[QUERY_FLAG,TOPK_FLAG,{'name':a38_0x772e9d(0x14b),'type':a38_0x772e9d(0x144),'required':![],'description':'Optional\x20trusted\x20KB\x20Service\x20HTTPS\x20origin\x20for\x20this\x20request\x20only'}],async 'validate'(_0x1a775f){const _0x37a18c=a38_0x772e9d;if(!_0x1a775f[_0x37a18c(0x139)](_0x37a18c(0x16b))['trim']())throw CliErrors[_0x37a18c(0x156)]('Search\x20query\x20is\x20required.');readTopK(_0x1a775f),readSearchServiceUrl(_0x1a775f);},async 'execute'(_0x2620de){const _0x10c655=a38_0x772e9d,_0x34de7b=_0x2620de['str'](_0x10c655(0x16b))[_0x10c655(0x145)](),_0xb80ce5=readTopK(_0x2620de),_0x43760d=readSearchServiceUrl(_0x2620de),_0x1d8d2e={'appCode':_0x2620de[_0x10c655(0x13c)],'accessKey':_0x2620de[_0x10c655(0x151)]??'','query':_0x34de7b,..._0xb80ce5!==undefined?{'topK':_0xb80ce5}:{},'signal':_0x2620de[_0x10c655(0x135)]},_0x519273=await searchDirectKnowledge({..._0x1d8d2e,'serviceUrl':_0x43760d});return{'ok':!![],'data':_0x519273};}};function managementCommand(_0x301a3b){const _0x268986=a38_0x772e9d;return{..._0x301a3b,'execute':_0x4591de=>withKbManagementOrigin(()=>_0x301a3b[_0x268986(0x133)](_0x4591de)),..._0x301a3b[_0x268986(0x12a)]?{'dryRun':_0x5b1b84=>withKbManagementOrigin(()=>_0x301a3b[_0x268986(0x12a)](_0x5b1b84))}:{}};}export const kbDefinitions=[...[kbList,kbDetail,kbCreate,kbUpdate][a38_0x772e9d(0x152)](managementCommand),kbSearch];
|
|
1
|
+
const a38_0x26925b=a38_0xb290;function a38_0x4d4a(){const _0x41d9d3=['84680GFefxc','bool','Search\x20visible\x20public,\x20company,\x20and\x20personal\x20knowledge','File\x20is\x20not\x20a\x20regular\x20file:\x20','path','808530ydIrUR','search','detail','KB\x20Service\x20is\x20not\x20configured\x20for\x20knowledge\x20search.','build','signal','Replaces\x20the\x20personal\x20knowledge-base\x20entry\x20body\x20with\x20local\x20file\x20content\x20and\x20triggers\x20retrieval\x20sync.','Search\x20query\x20is\x20required.','body','str','file','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','length','read','90yTHgIS','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','list','Configure\x20kbServiceDomain\x20in\x20the\x20connection\x20settings,\x20or\x20pass\x20`--kb-service-url\x20<https-origin>`\x20for\x20this\x20request.','map','version','ragErrorMessage','203146ofGIna','File\x20not\x20found:\x20','createTime','1090138HjnxLK','dryRun','create','File\x20path\x20is\x20required.','topk','flag','Saves\x20local\x20file\x20content\x20as\x20a\x20personal\x20knowledge-base\x20entry\x20and\x20starts\x20retrieval\x20sync.','scope','query','588465JKWPsX','accessKey','description','kb-service-url','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','2OyoTIQ','utf8','Updated\x20KB\x20entry\x20','update','parse','Override\x20the\x20existing\x20entry\x20title','updateTime','Search\x20query\x20for\x20visible\x20public,\x20company,\x20and\x20personal\x20knowledge','write','execute','256976ZNRype','string','method','6EGwUpn','Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','validation','trim','verbose','495308AWQEKx','content','jsonBody','Personal\x20knowledge-base\x20entry\x20ID','title','appCode','Created\x20KB\x20entry\x20'];a38_0x4d4a=function(){return _0x41d9d3;};return a38_0x4d4a();}function a38_0xb290(_0x206bc4,_0x70b24b){_0x206bc4=_0x206bc4-0x1cf;const _0x4d4a58=a38_0x4d4a();let _0xb2907=_0x4d4a58[_0x206bc4];return _0xb2907;}(function(_0x3a8089,_0x2cca71){const _0x294d8a=a38_0xb290,_0xedd6ae=_0x3a8089();while(!![]){try{const _0x2b2ee0=-parseInt(_0x294d8a(0x1f9))/0x1*(parseInt(_0x294d8a(0x20a))/0x2)+parseInt(_0x294d8a(0x205))/0x3+-parseInt(_0x294d8a(0x1d8))/0x4+parseInt(_0x294d8a(0x1e4))/0x5+parseInt(_0x294d8a(0x1d3))/0x6*(parseInt(_0x294d8a(0x1fc))/0x7)+parseInt(_0x294d8a(0x1d0))/0x8+parseInt(_0x294d8a(0x1f2))/0x9*(-parseInt(_0x294d8a(0x1df))/0xa);if(_0x2b2ee0===_0x2cca71)break;else _0xedd6ae['push'](_0xedd6ae['shift']());}catch(_0x16d1ef){_0xedd6ae['push'](_0xedd6ae['shift']());}}}(a38_0x4d4a,0x20bb0));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalKnowledgeBaseItem,getPersonalKnowledgeBaseItem,listPersonalKnowledgeBaseItems,updatePersonalKnowledgeBaseItem}from'../../core/api-client.js';import{searchDirectKnowledge,normalizeKbServiceOrigin}from'../../core/kb-search-client.js';import{planPersonalKnowledgeWrite,withKbManagementOrigin}from'../../core/kb-management-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{getKbServiceDomain}from'../../constant/domain.js';import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':a38_0x26925b(0x1dc),'type':a38_0x26925b(0x1d1),'required':!![],'description':'Personal\x20knowledge-base\x20entry\x20title'},FILE_FLAG={'name':a38_0x26925b(0x1ee),'type':a38_0x26925b(0x1d1),'required':!![],'description':a38_0x26925b(0x1f3)},QUERY_FLAG={'name':a38_0x26925b(0x204),'type':a38_0x26925b(0x1d1),'required':!![],'description':a38_0x26925b(0x211)},TOPK_FLAG={'name':a38_0x26925b(0x200),'type':'number','description':a38_0x26925b(0x1ef)};function readKnowledgeFile(_0x3eb843){const _0x4c7601=a38_0x26925b;if(!_0x3eb843)throw CliErrors[_0x4c7601(0x1d5)](_0x4c7601(0x1ff));if(!existsSync(_0x3eb843))throw CliErrors['validation'](_0x4c7601(0x1fa)+_0x3eb843);if(!statSync(_0x3eb843)['isFile']())throw CliErrors[_0x4c7601(0x1d5)](_0x4c7601(0x1e2)+_0x3eb843);return readFileSync(_0x3eb843,_0x4c7601(0x20b));}function summarizePersonalItem(_0x36c332){const _0x13db65=a38_0x26925b;return{'id':_0x36c332['id'],'title':_0x36c332[_0x13db65(0x1dc)],'version':_0x36c332['version'],'ragStatus':_0x36c332['ragStatus'],'ragErrorMessage':_0x36c332[_0x13db65(0x1f8)],'updateTime':_0x36c332[_0x13db65(0x210)]};}function detailPersonalItem(_0x30a533){const _0x557f68=a38_0x26925b;return{'id':_0x30a533['id'],'appCode':_0x30a533[_0x557f68(0x1dd)],'scope':_0x30a533[_0x557f68(0x203)],'userId':_0x30a533['userId'],'title':_0x30a533[_0x557f68(0x1dc)],'content':_0x30a533[_0x557f68(0x1d9)],'version':_0x30a533[_0x557f68(0x1f7)],'ragStatus':_0x30a533['ragStatus'],'ragErrorMessage':_0x30a533[_0x557f68(0x1f8)],'createTime':_0x30a533[_0x557f68(0x1fb)],'updateTime':_0x30a533[_0x557f68(0x210)]};}function readTopK(_0x1ca1c4){const _0x33fa24=a38_0x26925b,_0xfe1abe=_0x1ca1c4['flag'](_0x33fa24(0x200));if(_0xfe1abe===undefined||_0xfe1abe===null||_0xfe1abe==='')return undefined;const _0x1cc864=_0x1ca1c4['num'](_0x33fa24(0x200));if(!Number['isSafeInteger'](_0x1cc864)||_0x1cc864<0x1||_0x1cc864>0x32)throw CliErrors[_0x33fa24(0x1d5)]('--topk\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.');return _0x1cc864;}const kbList={'service':'kb','command':a38_0x26925b(0x1f4),'description':'List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','risk':'read','flags':[VERBOSE_FLAG],async 'execute'(_0x2555ac){const _0x434fed=a38_0x26925b,_0x3cb0fb=await listPersonalKnowledgeBaseItems(_0x2555ac['appCode'],_0x2555ac[_0x434fed(0x1e9)]);if(_0x2555ac[_0x434fed(0x1e0)](_0x434fed(0x1d7)))return{'ok':!![],'data':{'total':_0x3cb0fb[_0x434fed(0x1f0)],'items':_0x3cb0fb}};return{'ok':!![],'data':{'total':_0x3cb0fb[_0x434fed(0x1f0)],'items':_0x3cb0fb[_0x434fed(0x1f6)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a38_0x26925b(0x1e6),'description':a38_0x26925b(0x209),'risk':a38_0x26925b(0x1f1),'flags':[{...ID_FLAG,'type':a38_0x26925b(0x1d1),'description':a38_0x26925b(0x1db)}],async 'execute'(_0x373696){const _0x3f2f00=a38_0x26925b,_0x2cc959=await getPersonalKnowledgeBaseItem(_0x373696['str']('id'),_0x373696[_0x3f2f00(0x1dd)],_0x373696[_0x3f2f00(0x1e9)]);return{'ok':!![],'data':detailPersonalItem(_0x2cc959)};}},kbCreate={'service':'kb','command':a38_0x26925b(0x1fe),'description':a38_0x26925b(0x1d4),'risk':'write','confirmationDescription':a38_0x26925b(0x202),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x18074d){const _0x509e87=a38_0x26925b,_0xe51320=_0x18074d[_0x509e87(0x1ed)](_0x509e87(0x1dc)),_0x61a476=readKnowledgeFile(_0x18074d[_0x509e87(0x1ed)](_0x509e87(0x1ee))),_0x4910e2=await createPersonalKnowledgeBaseItem(_0x18074d[_0x509e87(0x1dd)],{'title':_0xe51320,'content':_0x61a476},_0x18074d[_0x509e87(0x1e9)]);return{'ok':!![],'data':summarizePersonalItem(_0x4910e2),'message':_0x509e87(0x1de)+_0x4910e2['id']+'\x20('+_0x4910e2[_0x509e87(0x1dc)]+')'};},async 'dryRun'(_0x454fc3){const _0x4fdb5b=a38_0x26925b,_0x1ab8f8=_0x454fc3['str'](_0x4fdb5b(0x1dc)),_0x4bc78e=readKnowledgeFile(_0x454fc3['str'](_0x4fdb5b(0x1ee))),_0x43297b=planPersonalKnowledgeWrite(_0x454fc3['appCode'],{'title':_0x1ab8f8,'content':_0x4bc78e});return dryRun(_0x43297b['method'],_0x43297b['path'])['body'](JSON[_0x4fdb5b(0x20e)](_0x43297b[_0x4fdb5b(0x1da)]))[_0x4fdb5b(0x207)]('Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22'+_0x1ab8f8+'\x22')[_0x4fdb5b(0x1e8)]();}},kbUpdate={'service':'kb','command':a38_0x26925b(0x20d),'description':'Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','risk':a38_0x26925b(0x212),'confirmationDescription':a38_0x26925b(0x1ea),'flags':[{...ID_FLAG,'type':a38_0x26925b(0x1d1),'description':a38_0x26925b(0x1db)},{...TITLE_FLAG,'required':![],'description':a38_0x26925b(0x20f)},FILE_FLAG],async 'execute'(_0x981aba){const _0xb44fb=a38_0x26925b,_0x31198a=_0x981aba['str']('id'),_0x457fcb=readKnowledgeFile(_0x981aba[_0xb44fb(0x1ed)](_0xb44fb(0x1ee))),_0x70d9f9=_0x981aba[_0xb44fb(0x1ed)](_0xb44fb(0x1dc))||undefined,_0x2547d6=await updatePersonalKnowledgeBaseItem(_0x31198a,_0x981aba[_0xb44fb(0x1dd)],{'title':_0x70d9f9,'content':_0x457fcb},_0x981aba['signal']);return{'ok':!![],'data':summarizePersonalItem(_0x2547d6),'message':_0xb44fb(0x20c)+_0x2547d6['id']+'\x20('+_0x2547d6[_0xb44fb(0x1dc)]+')'};},async 'dryRun'(_0x5e5e60){const _0xef300e=a38_0x26925b,_0x279e22=_0x5e5e60[_0xef300e(0x1ed)]('id'),_0x4c375b=readKnowledgeFile(_0x5e5e60[_0xef300e(0x1ed)](_0xef300e(0x1ee))),_0x4147c2=await getPersonalKnowledgeBaseItem(_0x279e22,_0x5e5e60['appCode'],_0x5e5e60[_0xef300e(0x1e9)]),_0x1f6056=_0x5e5e60[_0xef300e(0x1ed)]('title')||_0x4147c2[_0xef300e(0x1dc)],_0x4e5b62=planPersonalKnowledgeWrite(_0x5e5e60['appCode'],{'title':_0x1f6056,'content':_0x4c375b},_0x279e22,_0x4147c2[_0xef300e(0x1f7)]);return dryRun(_0x4e5b62[_0xef300e(0x1d2)],_0x4e5b62[_0xef300e(0x1e3)])[_0xef300e(0x1ec)](JSON[_0xef300e(0x20e)](_0x4e5b62[_0xef300e(0x1da)]))[_0xef300e(0x207)]('Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20'+_0x279e22)[_0xef300e(0x1e8)]();}};function readSearchServiceUrl(_0x55547d){const _0x11af21=a38_0x26925b;if(_0x55547d[_0x11af21(0x201)]('kb-service-url')!==undefined)return normalizeKbServiceOrigin(_0x55547d[_0x11af21(0x1ed)](_0x11af21(0x208)));const _0x45939e=getKbServiceDomain();if(!_0x45939e)throw CliErrors[_0x11af21(0x1d5)](_0x11af21(0x1e7),_0x11af21(0x1f5));return normalizeKbServiceOrigin(_0x45939e);}const kbSearch={'service':'kb','command':a38_0x26925b(0x1e5),'description':a38_0x26925b(0x1e1),'risk':'read','flags':[QUERY_FLAG,TOPK_FLAG,{'name':a38_0x26925b(0x208),'type':'string','required':![],'description':'Optional\x20trusted\x20KB\x20Service\x20HTTPS\x20origin\x20for\x20this\x20request\x20only'}],async 'validate'(_0x215e29){const _0x54e96f=a38_0x26925b;if(!_0x215e29[_0x54e96f(0x1ed)](_0x54e96f(0x204))[_0x54e96f(0x1d6)]())throw CliErrors['validation'](_0x54e96f(0x1eb));readTopK(_0x215e29),readSearchServiceUrl(_0x215e29);},async 'execute'(_0x4e1878){const _0x5773ce=a38_0x26925b,_0x50c156=_0x4e1878[_0x5773ce(0x1ed)](_0x5773ce(0x204))[_0x5773ce(0x1d6)](),_0x39c6ae=readTopK(_0x4e1878),_0x2583fa=readSearchServiceUrl(_0x4e1878),_0x500d84={'appCode':_0x4e1878[_0x5773ce(0x1dd)],'accessKey':_0x4e1878[_0x5773ce(0x206)]??'','query':_0x50c156,..._0x39c6ae!==undefined?{'topK':_0x39c6ae}:{},'signal':_0x4e1878[_0x5773ce(0x1e9)]},_0x16ebb7=await searchDirectKnowledge({..._0x500d84,'serviceUrl':_0x2583fa});return{'ok':!![],'data':_0x16ebb7};}};function managementCommand(_0x392ea3){const _0x2b37de=a38_0x26925b;return{..._0x392ea3,'execute':_0x7459d5=>withKbManagementOrigin(()=>_0x392ea3[_0x2b37de(0x1cf)](_0x7459d5)),..._0x392ea3[_0x2b37de(0x1fd)]?{'dryRun':_0x1a355f=>withKbManagementOrigin(()=>_0x392ea3[_0x2b37de(0x1fd)](_0x1a355f))}:{}};}export const kbDefinitions=[...[kbList,kbDetail,kbCreate,kbUpdate][a38_0x26925b(0x1f6)](managementCommand),kbSearch];
|