@lovrabet/lovrabet-cli 2.3.4 → 2.3.5-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -1
- 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.d.ts +2 -0
- package/lib/commands/data/import-excel.js +1 -0
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/permit/dataset-get.js +1 -1
- package/lib/commands/permit/dataset-set.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/diagram.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/diagram.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/user-account/bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.d.ts +19 -5
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.d.ts +1 -0
- package/lib/errors.js +1 -1
- package/lib/framework/access-error.d.ts +5 -0
- package/lib/framework/access-error.js +1 -0
- 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.d.ts +2 -17
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-import/auto-id-runner.d.ts +25 -0
- package/lib/services/dataset-import/auto-id-runner.js +1 -0
- package/lib/services/dataset-import/excel-reader.d.ts +3 -0
- package/lib/services/dataset-import/excel-reader.js +1 -0
- package/lib/services/dataset-import/metadata.d.ts +2 -0
- package/lib/services/dataset-import/metadata.js +1 -0
- package/lib/services/dataset-import/preview.d.ts +4 -0
- package/lib/services/dataset-import/preview.js +1 -0
- package/lib/services/dataset-import/runner.d.ts +63 -0
- package/lib/services/dataset-import/runner.js +1 -0
- package/lib/services/dataset-import/types.d.ts +33 -0
- package/lib/services/dataset-import/types.js +1 -0
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/utils/access-key-redaction.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/positive-safe-integer.js +1 -1
- package/lib/utils/redaction.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +8 -3
- package/skills/lovrabet/SKILL.md +10 -5
- package/skills/lovrabet/guides/dataset-and-data-workflow.md +4 -2
- package/skills/lovrabet/guides/role-and-permission-workflow.md +14 -0
- package/skills/lovrabet/guides/sql-and-bff-workflow.md +1 -1
- package/skills/lovrabet/guides/troubleshooting.md +7 -1
- package/skills/lovrabet/references/instant-api-workflow.md +6 -2
- package/skills/lovrabet/references/lovrabet-approval-workflow.md +16 -2
- package/skills/lovrabet/references/lovrabet-bff-workflow.md +9 -0
- package/skills/lovrabet/references/lovrabet-db-table-excel-import.md +113 -0
- package/skills/lovrabet/references/lovrabet-excel-import.md +31 -0
- package/skills/lovrabet/references/lovrabet-kb-workflow.md +1 -1
- package/skills/lovrabet/references/lovrabet-personal-bff-workflow.md +2 -0
- package/skills/lovrabet.manifest.json +5 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
function a26_0x5a49(_0x15f06f,_0x2e402a){_0x15f06f=_0x15f06f-0xb3;const _0x4624d6=a26_0x4624();let _0x5a49bf=_0x4624d6[_0x15f06f];return _0x5a49bf;}const a26_0x9af0c2=a26_0x5a49;(function(_0x3b7a34,_0xc7c2b2){const _0x5ca88a=a26_0x5a49,_0x386419=_0x3b7a34();while(!![]){try{const _0x1d175c=parseInt(_0x5ca88a(0xdf))/0x1+-parseInt(_0x5ca88a(0xd0))/0x2*(parseInt(_0x5ca88a(0x11a))/0x3)+parseInt(_0x5ca88a(0xe1))/0x4*(parseInt(_0x5ca88a(0x118))/0x5)+parseInt(_0x5ca88a(0xe2))/0x6+-parseInt(_0x5ca88a(0xf8))/0x7*(parseInt(_0x5ca88a(0x109))/0x8)+parseInt(_0x5ca88a(0xbd))/0x9*(parseInt(_0x5ca88a(0xb4))/0xa)+-parseInt(_0x5ca88a(0xce))/0xb;if(_0x1d175c===_0xc7c2b2)break;else _0x386419['push'](_0x386419['shift']());}catch(_0x45ad70){_0x386419['push'](_0x386419['shift']());}}}(a26_0x4624,0x2199f));import{executeData}from'../../core/sdk-client.js';import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';function a26_0x4624(){const _0x5751c5=['\x20\x20\x20\x20choose\x20the\x20capability\x20before\x20execution;\x20never\x20fall\x20back\x20at\x20runtime','\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}','delete','\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\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','batchCreate','\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}','data','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','operation','\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','filter','14aMjDJY','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return\x20alongside\x20aggregates,\x20e.g.\x20[\x22status\x22,\x22region\x22]','\x20\x20\x20\x20Filtering\x20and\x20pagination\x20are\x20controlled\x20only\x20via\x20one\x20JSON\x20object\x20in\x20--params.','\x20\x20LOGICAL\x20COMBINATORS','\x20\x20\x20\x20and\x20increment\x20only\x20currentPage.\x20Use\x20a\x20stable\x20unique\x20orderBy\x20field\x20to\x20avoid\x20duplicates\x20or\x20gaps.','data\x20','length','\x20\x20PAGINATION','Deletes\x20business\x20records\x20from\x20the\x20current\x20app\x20dataset.\x20This\x20may\x20not\x20be\x20recoverable.','\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.','batch','\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}]','POST','\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\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20of\x20records\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}','\x20\x20DATASET\x20BOUNDARY','56136jlpByw','aggregate','\x20\x20\x20\x20orderBy\x20may\x20reference\x20aggregate\x20output\x20aliases','\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#\x20Count\x20orders\x20per\x20region\x20with\x20filter','\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]}}','params','now','read','\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}','Example:\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x20\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','\x20\x20\x20\x20$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}}','risk','\x20\x20\x20\x20aggregate\x20supports\x20a\x20single\x20DB_TABLE\x20dataset\x20only','35lSVbch','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','573jRQdFs','high-risk-write','451830zmtHHU','\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}}','getOne','\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}}','body','create','\x20\x20\x20\x20Page\x20numbers\x20start\x20at\x201.\x20To\x20fetch\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged','\x20\x20\x20\x20Verify\x20the\x20response\x20paging.currentPage/pageSize\x20and\x20that\x20tableData\x20satisfies\x20where\x20before\x20drawing\x20conclusions.','update','9fiKzsy','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\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}','Writes\x20one\x20new\x20business\x20record\x20to\x20the\x20current\x20app\x20dataset.\x20It\x20is\x20saved\x20immediately\x20after\x20confirmation.','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','write','\x20completed\x20in\x20','Writes\x20multiple\x20new\x20business\x20records\x20to\x20the\x20current\x20app\x20dataset.\x20They\x20are\x20saved\x20immediately\x20after\x20confirmation.','\x20on\x20dataset\x20','\x20\x20\x20\x20$and\x20\x20\x20\x20\x20\x20\x20\x20\x20All\x20conditions\x20match\x20\x20\x20{\x22$and\x22:[{\x22age\x22:{\x22$gte\x22:18}},{\x22status\x22:{\x22$eq\x22:\x22active\x22}}]}','helpExtra','\x20\x20\x20\x20JOIN\x20and\x20cross-table\x20aggregation\x20require\x20an\x20existing\x20trusted\x20Custom\x20SQL','\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--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','join','3066426iiQQFB','code','396dFegwK','description','\x20\x20PARAMS\x20STRUCTURE','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','command','Update\x20an\x20existing\x20data\x20record','str','confirmationDescription','/api/{appCode}/','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','\x20\x20\x20\x20$gt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$gt\x22:100}}','\x20\x20\x20\x20Page\x202:\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:2,\x22pageSize\x22:20}\x27','\x20\x20EXAMPLES','\x20\x20WHERE\x20OPERATORS','\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}]','155966MzqJyB','\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}}','66936tLEikD','899772PuooPl','\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}}','Delete\x20data\x20records\x20(non-interactive\x20mode\x20requires\x20--yes)','Filter\x20dataset\x20records\x20with\x20query\x20conditions','dryRun','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','\x20\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','\x20\x20\x20\x20$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}}','paramsHint'];a26_0x4624=function(){return _0x5751c5;};return a26_0x4624();}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':a26_0x9af0c2(0xf7),'operation':'filter','risk':a26_0x9af0c2(0x112),'paramsRequired':![],'description':a26_0x9af0c2(0xe5),'paramsHint':a26_0x9af0c2(0xf9)+a26_0x9af0c2(0xd9),'helpExtra':[a26_0x9af0c2(0xdd),a26_0x9af0c2(0xe9),a26_0x9af0c2(0xe3),a26_0x9af0c2(0xda),a26_0x9af0c2(0xe0),'\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}}',a26_0x9af0c2(0xb5),a26_0x9af0c2(0x10f),'\x20\x20\x20\x20$contain\x20\x20\x20\x20\x20Substring\x20match\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$contain\x22:\x22test\x22}}','\x20\x20\x20\x20$startWith\x20\x20\x20Starts\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$startWith\x22:\x22Mr.\x22}}',a26_0x9af0c2(0x115),'',a26_0x9af0c2(0xfc),a26_0x9af0c2(0xc8),'\x20\x20\x20\x20$or\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Any\x20condition\x20matches\x20\x20{\x22$or\x22:[{\x22status\x22:{\x22$eq\x22:\x22active\x22}},{\x22status\x22:{\x22$eq\x22:\x22pending\x22}}]}','','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)',a26_0x9af0c2(0x119),a26_0x9af0c2(0xee),a26_0x9af0c2(0xde),'\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)',a26_0x9af0c2(0xef),'',a26_0x9af0c2(0x100),a26_0x9af0c2(0xfb),a26_0x9af0c2(0x102),a26_0x9af0c2(0xba),a26_0x9af0c2(0xfd),a26_0x9af0c2(0xf6),a26_0x9af0c2(0xdb),a26_0x9af0c2(0xbb)][a26_0x9af0c2(0xcd)]('\x0a')},{'command':a26_0x9af0c2(0xb6),'operation':a26_0x9af0c2(0xb6),'risk':'read','paramsRequired':!![],'description':a26_0x9af0c2(0x10d),'paramsHint':a26_0x9af0c2(0xc1)},{'command':a26_0x9af0c2(0xb9),'operation':a26_0x9af0c2(0xb9),'risk':'write','paramsRequired':!![],'description':'Create\x20one\x20record\x20in\x20the\x20dataset','confirmationDescription':a26_0x9af0c2(0xc0),'paramsHint':a26_0x9af0c2(0xbe)},{'command':'batchCreate','operation':a26_0x9af0c2(0xf0),'risk':a26_0x9af0c2(0xc4),'paramsRequired':!![],'description':'Create\x20multiple\x20records\x20in\x20the\x20dataset\x20in\x20one\x20request','confirmationDescription':a26_0x9af0c2(0xc6),'paramsHint':a26_0x9af0c2(0xd3)},{'command':a26_0x9af0c2(0xbc),'operation':'update','risk':a26_0x9af0c2(0xc4),'paramsRequired':!![],'description':a26_0x9af0c2(0xd5),'confirmationDescription':'Changes\x20an\x20existing\x20business\x20record\x20in\x20the\x20current\x20app\x20dataset.\x20The\x20new\x20values\x20are\x20saved\x20immediately\x20after\x20confirmation.','paramsHint':'JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20id\x20may\x20be\x20a\x20single\x20value\x20or\x20array.\x20'+'Examples:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27,\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22completed\x22}\x27'},{'command':a26_0x9af0c2(0xed),'operation':'delete','risk':a26_0x9af0c2(0xb3),'paramsRequired':!![],'description':a26_0x9af0c2(0xe4),'confirmationDescription':a26_0x9af0c2(0x101),'paramsHint':a26_0x9af0c2(0xc1)},{'command':a26_0x9af0c2(0x10a),'operation':a26_0x9af0c2(0x10a),'risk':'read','paramsRequired':![],'description':a26_0x9af0c2(0xc2),'paramsHint':a26_0x9af0c2(0xe7)+a26_0x9af0c2(0x114),'helpExtra':['\x20\x20AGGREGATE\x20TYPES',a26_0x9af0c2(0x10c),a26_0x9af0c2(0x107),a26_0x9af0c2(0xec),a26_0x9af0c2(0x106),a26_0x9af0c2(0xf1),a26_0x9af0c2(0xbf),a26_0x9af0c2(0x113),'',a26_0x9af0c2(0xd2),a26_0x9af0c2(0xfa),a26_0x9af0c2(0xf3),a26_0x9af0c2(0xc3),a26_0x9af0c2(0xf4),a26_0x9af0c2(0xb7),a26_0x9af0c2(0x104),'','\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',a26_0x9af0c2(0x10b),'',a26_0x9af0c2(0x108),a26_0x9af0c2(0x117),'\x20\x20\x20\x20METADATA\x20datasets\x20do\x20not\x20support\x20aggregate\x20or\x20Custom\x20SQL',a26_0x9af0c2(0xca),a26_0x9af0c2(0xeb),'',a26_0x9af0c2(0xdc),'\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status',a26_0x9af0c2(0xcb),'',a26_0x9af0c2(0x10e),a26_0x9af0c2(0xcc),'',a26_0x9af0c2(0xe8)][a26_0x9af0c2(0xcd)]('\x0a')}];function makeDataCommand(_0x262193){const _0x56522a=a26_0x9af0c2,_0x1632a6='data\x20'+_0x262193[_0x56522a(0xd4)],_0x4acb29={'service':_0x56522a(0xf2),'command':_0x262193[_0x56522a(0xd4)],'description':_0x262193[_0x56522a(0xd1)],'risk':_0x262193[_0x56522a(0x116)],..._0x262193['confirmationDescription']?{'confirmationDescription':_0x262193[_0x56522a(0xd7)]}:{},'helpExtra':_0x262193[_0x56522a(0xc9)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x262193[_0x56522a(0xea)]}],'validate':async _0x2a9403=>{const _0x19c730=_0x56522a;_0x262193['paramsRequired']&&requireAnyOf(_0x2a9403,['params'],_0x1632a6),_0x262193['operation']==='batchCreate'&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x2a9403['str'](_0x19c730(0x110)))),_0x262193['operation']===_0x19c730(0xbc)&&parseUpdateIdsFromParams(parseJsonParams(_0x2a9403[_0x19c730(0xd6)](_0x19c730(0x110)))??{});},async 'execute'(_0x474a3c){const _0x50c06a=_0x56522a,_0xe2bfcd=_0x474a3c[_0x50c06a(0xd6)]('code'),_0x2c34d1=_0x262193[_0x50c06a(0xf5)]===_0x50c06a(0xf0)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x474a3c[_0x50c06a(0xd6)]('params'))):parseJsonParams(_0x474a3c[_0x50c06a(0xd6)](_0x50c06a(0x110)))??{},_0xea3817=_0x262193['operation']===_0x50c06a(0xbc)?parseUpdateIdsFromParams(_0x2c34d1):undefined,_0xb06c72=_0xea3817?normalizeUpdateParamsForRuntime(_0x2c34d1,_0xea3817):_0x2c34d1,_0x3426f3=Date[_0x50c06a(0x111)](),_0x57034b=await executeData(_0xe2bfcd,_0x262193['operation'],_0xb06c72),_0x4ff8e0=Date[_0x50c06a(0x111)]()-_0x3426f3,_0x4723ce=_0xea3817&&_0xea3817[_0x50c06a(0xff)]>0x1?buildBatchUpdateResult(_0xea3817,_0x57034b):_0x57034b;return{'ok':!![],'data':{'result':_0x4723ce,'elapsed':_0x4ff8e0},'message':_0x50c06a(0xfe)+_0x262193[_0x50c06a(0xd4)]+_0x50c06a(0xc5)+_0x4ff8e0+'ms'};}};return _0x262193['risk']!==_0x56522a(0x112)&&(_0x4acb29[_0x56522a(0xe6)]=async _0x5e829d=>{const _0x133abc=_0x56522a,_0x2edec5=_0x5e829d[_0x133abc(0xd6)](_0x133abc(0xcf)),_0x49b880=_0x262193[_0x133abc(0xf5)]===_0x133abc(0xf0)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x5e829d['str'](_0x133abc(0x110)))):parseJsonParams(_0x5e829d[_0x133abc(0xd6)](_0x133abc(0x110)))??{};let _0x487916=_0x49b880;if(_0x262193[_0x133abc(0xf5)]===_0x133abc(0xbc)){const _0x260e59=parseUpdateIdsFromParams(_0x49b880);_0x487916=normalizeUpdateParamsForRuntime(_0x49b880,_0x260e59);}return dryRun(_0x133abc(0x105),_0x133abc(0xd8)+_0x2edec5+'/'+_0x262193[_0x133abc(0xf5)])[_0x133abc(0xb8)](_0x487916)[_0x133abc(0xd1)]('Preview:\x20data\x20'+_0x262193[_0x133abc(0xd4)]+_0x133abc(0xc7)+_0x2edec5)['build']();}),_0x4acb29;}export const dataDefinitions=specs['map'](makeDataCommand);function buildBatchUpdateResult(_0x12f88e,_0x5a81bd){const _0x556e8a=a26_0x9af0c2;return{'operation':_0x556e8a(0xbc),'mode':_0x556e8a(0x103),'ids':_0x12f88e,'total':_0x12f88e[_0x556e8a(0xff)],'result':_0x5a81bd};}
|
|
1
|
+
const a27_0x2b1f92=a27_0x5cf6;(function(_0x1534ed,_0x204492){const _0x4bf623=a27_0x5cf6,_0x5ba095=_0x1534ed();while(!![]){try{const _0x17402b=-parseInt(_0x4bf623(0x16b))/0x1*(parseInt(_0x4bf623(0x161))/0x2)+parseInt(_0x4bf623(0x117))/0x3+-parseInt(_0x4bf623(0x166))/0x4*(parseInt(_0x4bf623(0x110))/0x5)+parseInt(_0x4bf623(0x11d))/0x6+parseInt(_0x4bf623(0x12f))/0x7*(parseInt(_0x4bf623(0x113))/0x8)+parseInt(_0x4bf623(0x124))/0x9*(parseInt(_0x4bf623(0x109))/0xa)+parseInt(_0x4bf623(0x135))/0xb;if(_0x17402b===_0x204492)break;else _0x5ba095['push'](_0x5ba095['shift']());}catch(_0x2fae44){_0x5ba095['push'](_0x5ba095['shift']());}}}(a27_0x35ac,0xe27aa));import{dataImportExcel}from'./import-excel.js';import{executeData}from'../../core/sdk-client.js';import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{requireAnyOf}from'../../commands/common/constraints.js';import{parseJsonParams,parseJsonParamsValue,parseBatchCreateItemsFromParams,parseUpdateIdsFromParams,normalizeUpdateParamsForRuntime}from'../../utils/params.js';import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':a27_0x2b1f92(0x167),'operation':a27_0x2b1f92(0x167),'risk':a27_0x2b1f92(0x148),'paramsRequired':![],'description':a27_0x2b1f92(0x163),'paramsHint':a27_0x2b1f92(0x157)+a27_0x2b1f92(0x16c),'helpExtra':[a27_0x2b1f92(0x10b),a27_0x2b1f92(0x127),a27_0x2b1f92(0x146),a27_0x2b1f92(0x168),a27_0x2b1f92(0x10a),a27_0x2b1f92(0x138),'\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\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_0x2b1f92(0x134),a27_0x2b1f92(0x13d),'',a27_0x2b1f92(0x11c),a27_0x2b1f92(0x15d),'\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_0x2b1f92(0x16f),a27_0x2b1f92(0x136),'\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]',a27_0x2b1f92(0x162),'\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)',a27_0x2b1f92(0x130),'','\x20\x20PAGINATION','\x20\x20\x20\x20Filtering\x20and\x20pagination\x20are\x20controlled\x20only\x20via\x20one\x20JSON\x20object\x20in\x20--params.',a27_0x2b1f92(0x12c),'\x20\x20\x20\x20Page\x20numbers\x20start\x20at\x201.\x20To\x20fetch\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged',a27_0x2b1f92(0x158),a27_0x2b1f92(0x14e),a27_0x2b1f92(0x120),a27_0x2b1f92(0x15b)][a27_0x2b1f92(0x14b)]('\x0a')},{'command':a27_0x2b1f92(0x133),'operation':a27_0x2b1f92(0x133),'risk':a27_0x2b1f92(0x148),'paramsRequired':!![],'description':a27_0x2b1f92(0x12e),'paramsHint':a27_0x2b1f92(0x154)},{'command':a27_0x2b1f92(0x11e),'operation':a27_0x2b1f92(0x11e),'risk':'write','paramsRequired':!![],'description':a27_0x2b1f92(0x173),'confirmationDescription':a27_0x2b1f92(0x14c),'paramsHint':a27_0x2b1f92(0x15a)},{'command':a27_0x2b1f92(0x151),'operation':'batchCreate','risk':a27_0x2b1f92(0x11a),'paramsRequired':!![],'description':'Create\x20multiple\x20records\x20in\x20the\x20dataset\x20in\x20one\x20request','helpExtra':[a27_0x2b1f92(0x132),'\x20\x20\x20\x20METADATA:\x20use\x20lovrabet\x20data\x20import-excel\x20with\x20checkpoint\x20recovery.',a27_0x2b1f92(0x14d),'\x20\x20\x20\x20then\x20convert\x20rows\x20to\x20JSON\x20and\x20split\x20within\x20the\x20target\x20API\x20row/byte\x20and\x20local\x20argument\x20limits.',a27_0x2b1f92(0x112),a27_0x2b1f92(0x126),a27_0x2b1f92(0x13e),a27_0x2b1f92(0x16d),a27_0x2b1f92(0x118),'\x20\x20\x20\x20Built-in\x20Skill\x20guide:\x20references/lovrabet-db-table-excel-import.md',a27_0x2b1f92(0x139)][a27_0x2b1f92(0x14b)]('\x0a'),'confirmationDescription':'Writes\x20multiple\x20new\x20business\x20records\x20to\x20the\x20current\x20app\x20dataset.\x20They\x20are\x20saved\x20immediately\x20after\x20confirmation.','paramsHint':a27_0x2b1f92(0x10e)},{'command':a27_0x2b1f92(0x13a),'operation':'update','risk':a27_0x2b1f92(0x11a),'paramsRequired':!![],'description':a27_0x2b1f92(0x121),'confirmationDescription':a27_0x2b1f92(0x147),'paramsHint':a27_0x2b1f92(0x12a)+a27_0x2b1f92(0x137)},{'command':a27_0x2b1f92(0x114),'operation':'delete','risk':'high-risk-write','paramsRequired':!![],'description':a27_0x2b1f92(0x115),'confirmationDescription':'Deletes\x20business\x20records\x20from\x20the\x20current\x20app\x20dataset.\x20This\x20may\x20not\x20be\x20recoverable.','paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':a27_0x2b1f92(0x145),'operation':'aggregate','risk':a27_0x2b1f92(0x148),'paramsRequired':![],'description':'Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','paramsHint':'JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20'+a27_0x2b1f92(0x156),'helpExtra':[a27_0x2b1f92(0x122),a27_0x2b1f92(0x15e),a27_0x2b1f92(0x160),a27_0x2b1f92(0x149),'\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Average\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg_score\x22}',a27_0x2b1f92(0x16e),a27_0x2b1f92(0x11b),a27_0x2b1f92(0x164),'','\x20\x20PARAMS\x20STRUCTURE',a27_0x2b1f92(0x171),'\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\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\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]',a27_0x2b1f92(0x15c),a27_0x2b1f92(0x152),'','\x20\x20AGGREGATE\x20ALIAS\x20BOUNDARY',a27_0x2b1f92(0x12d),a27_0x2b1f92(0x131),a27_0x2b1f92(0x143),'',a27_0x2b1f92(0x14a),a27_0x2b1f92(0x119),a27_0x2b1f92(0x150),a27_0x2b1f92(0x111),a27_0x2b1f92(0x13f),'',a27_0x2b1f92(0x16a),a27_0x2b1f92(0x159),a27_0x2b1f92(0x12b),'',a27_0x2b1f92(0x11f),a27_0x2b1f92(0x153),'',a27_0x2b1f92(0x141)][a27_0x2b1f92(0x14b)]('\x0a')}];function makeDataCommand(_0x2bb5ef){const _0x1e2b6e=a27_0x2b1f92,_0x5b6496=_0x1e2b6e(0x123)+_0x2bb5ef[_0x1e2b6e(0x169)],_0x45c772={'service':'data','command':_0x2bb5ef[_0x1e2b6e(0x169)],'description':_0x2bb5ef[_0x1e2b6e(0x116)],'risk':_0x2bb5ef[_0x1e2b6e(0x13c)],..._0x2bb5ef[_0x1e2b6e(0x13b)]?{'confirmationDescription':_0x2bb5ef[_0x1e2b6e(0x13b)]}:{},'helpExtra':_0x2bb5ef[_0x1e2b6e(0x10f)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x2bb5ef[_0x1e2b6e(0x14f)]}],'validate':async _0x412330=>{const _0x14f5f3=_0x1e2b6e;_0x2bb5ef['paramsRequired']&&requireAnyOf(_0x412330,[_0x14f5f3(0x10c)],_0x5b6496),_0x2bb5ef[_0x14f5f3(0x142)]===_0x14f5f3(0x151)&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x412330[_0x14f5f3(0x140)](_0x14f5f3(0x10c)))),_0x2bb5ef[_0x14f5f3(0x142)]===_0x14f5f3(0x13a)&&parseUpdateIdsFromParams(parseJsonParams(_0x412330['str'](_0x14f5f3(0x10c)))??{});},async 'execute'(_0x5abc2c){const _0x1ac24b=_0x1e2b6e,_0x289765=_0x5abc2c['str'](_0x1ac24b(0x129)),_0x42fd43=_0x2bb5ef[_0x1ac24b(0x142)]===_0x1ac24b(0x151)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x5abc2c[_0x1ac24b(0x140)]('params'))):parseJsonParams(_0x5abc2c['str'](_0x1ac24b(0x10c)))??{},_0x3c8461=_0x2bb5ef[_0x1ac24b(0x142)]===_0x1ac24b(0x13a)?parseUpdateIdsFromParams(_0x42fd43):undefined,_0x44f516=_0x3c8461?normalizeUpdateParamsForRuntime(_0x42fd43,_0x3c8461):_0x42fd43,_0x42d855=Date[_0x1ac24b(0x155)](),_0x382d6a=await executeData(_0x289765,_0x2bb5ef[_0x1ac24b(0x142)],_0x44f516),_0x34b6be=Date[_0x1ac24b(0x155)]()-_0x42d855,_0x4df15c=_0x3c8461&&_0x3c8461[_0x1ac24b(0x125)]>0x1?buildBatchUpdateResult(_0x3c8461,_0x382d6a):_0x382d6a;return{'ok':!![],'data':{'result':_0x4df15c,'elapsed':_0x34b6be},'message':_0x1ac24b(0x123)+_0x2bb5ef[_0x1ac24b(0x169)]+_0x1ac24b(0x15f)+_0x34b6be+'ms'};}};return _0x2bb5ef[_0x1e2b6e(0x13c)]!=='read'&&(_0x45c772['dryRun']=async _0x1a936d=>{const _0x193cd3=_0x1e2b6e,_0x3d1c12=_0x1a936d[_0x193cd3(0x140)]('code'),_0x1a6a86=_0x2bb5ef[_0x193cd3(0x142)]===_0x193cd3(0x151)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x1a936d['str'](_0x193cd3(0x10c)))):parseJsonParams(_0x1a936d['str']('params'))??{};let _0x2ff804=_0x1a6a86;if(_0x2bb5ef['operation']===_0x193cd3(0x13a)){const _0x2ea3cc=parseUpdateIdsFromParams(_0x1a6a86);_0x2ff804=normalizeUpdateParamsForRuntime(_0x1a6a86,_0x2ea3cc);}return dryRun(_0x193cd3(0x172),_0x193cd3(0x128)+_0x3d1c12+'/'+_0x2bb5ef[_0x193cd3(0x142)])[_0x193cd3(0x174)](_0x2ff804)[_0x193cd3(0x116)](_0x193cd3(0x170)+_0x2bb5ef[_0x193cd3(0x169)]+_0x193cd3(0x10d)+_0x3d1c12)[_0x193cd3(0x165)]();}),_0x45c772;}export const dataDefinitions=[...specs[a27_0x2b1f92(0x144)](makeDataCommand),dataImportExcel];function buildBatchUpdateResult(_0x3cb116,_0x37efb5){const _0x158d81=a27_0x2b1f92;return{'operation':_0x158d81(0x13a),'mode':'batch','ids':_0x3cb116,'total':_0x3cb116[_0x158d81(0x125)],'result':_0x37efb5};}function a27_0x5cf6(_0x677807,_0x1d977c){_0x677807=_0x677807-0x109;const _0x35ac93=a27_0x35ac();let _0x5cf695=_0x35ac93[_0x677807];return _0x5cf695;}function a27_0x35ac(){const _0x3a0d4c=['data\x20','3843sLwuWf','length','\x20\x20\x20\x20--dry-run\x20previews\x20the\x20request\x20only;\x20it\x20does\x20not\x20validate\x20server\x20constraints\x20or\x20write\x20permissions.','\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}}','/api/{appCode}/','code','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20id\x20may\x20be\x20a\x20single\x20value\x20or\x20array.\x20','\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\x20Do\x20NOT\x20use\x20--where,\x20--select,\x20--order-by,\x20--current-page,\x20--page,\x20or\x20--page-size\x20as\x20CLI\x20flags.','\x20\x20\x20\x20aggregate[].alias\x20defines\x20the\x20output\x20field\x20name\x20only','Get\x20a\x20single\x20record\x20by\x20ID','7SQhoXW','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','\x20\x20\x20\x20select/where/having/groupBy\x20must\x20use\x20real\x20dataset\x20fields','\x20\x20EXCEL\x20ROUTES','getOne','\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}}','13497000chyCxL','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','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\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\x20Non-Excel\x20batchCreate\x20remains\x20available\x20for\x20METADATA\x20and\x20DB_TABLE.','update','confirmationDescription','risk','\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\x20Record\x20each\x20batch\x20and\x20verify\x20its\x20IDs\x20or\x20unique\x20business\x20keys\x20before\x20continuing.','\x20\x20\x20\x20choose\x20the\x20capability\x20before\x20execution;\x20never\x20fall\x20back\x20at\x20runtime','str','\x20\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','operation','\x20\x20\x20\x20orderBy\x20may\x20reference\x20aggregate\x20output\x20aliases','map','aggregate','\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}}','Changes\x20an\x20existing\x20business\x20record\x20in\x20the\x20current\x20app\x20dataset.\x20The\x20new\x20values\x20are\x20saved\x20immediately\x20after\x20confirmation.','read','\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\x20DATASET\x20BOUNDARY','join','Writes\x20one\x20new\x20business\x20record\x20to\x20the\x20current\x20app\x20dataset.\x20It\x20is\x20saved\x20immediately\x20after\x20confirmation.','\x20\x20\x20\x20DB_TABLE:\x20inspect\x20dataset\x20detail,\x20validate\x20the\x20full\x20file\x20and\x20confirmed\x20unique\x20business\x20keys,','\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','paramsHint','\x20\x20\x20\x20METADATA\x20datasets\x20do\x20not\x20support\x20aggregate\x20or\x20Custom\x20SQL','batchCreate','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order;\x20may\x20reference\x20aggregate\x20output\x20aliases,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','\x20\x20\x20\x20--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','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','now','Example:\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x20\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','\x20\x20\x20\x20and\x20increment\x20only\x20currentPage.\x20Use\x20a\x20stable\x20unique\x20orderBy\x20field\x20to\x20avoid\x20duplicates\x20or\x20gaps.','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','\x20\x20\x20\x20Verify\x20the\x20response\x20paging.currentPage/pageSize\x20and\x20that\x20tableData\x20satisfies\x20where\x20before\x20drawing\x20conclusions.','\x20\x20\x20\x20having\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Post-aggregation\x20filters\x20using\x20real\x20dataset\x20fields,\x20e.g.\x20{\x22category_id\x22:{\x22$notNull\x22:true}}','\x20\x20\x20\x20$and\x20\x20\x20\x20\x20\x20\x20\x20\x20All\x20conditions\x20match\x20\x20\x20{\x22$and\x22:[{\x22age\x22:{\x22$gte\x22:18}},{\x22status\x22:{\x22$eq\x22:\x22active\x22}}]}','\x20\x20\x20\x20SUM\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Sum\x20of\x20column\x20values\x20\x20\x20\x20\x20{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}','\x20completed\x20in\x20','\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}','8MLSaEU','\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}]','Filter\x20dataset\x20records\x20with\x20query\x20conditions','\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}','build','3355788pzeGvZ','filter','\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}}','command','\x20\x20EXAMPLES','198158xDDdMT','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','\x20\x20\x20\x20Stop\x20on\x20unknown\x20outcomes\x20or\x20conflicts;\x20reconcile\x20before\x20retrying,\x20never\x20blindly\x20resend\x20a\x20batch.','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Rounded\x20average\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg\x22,\x22round\x22:true,\x22precision\x22:2}','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','Preview:\x20data\x20','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return\x20alongside\x20aggregates,\x20e.g.\x20[\x22status\x22,\x22region\x22]','POST','Create\x20one\x20record\x20in\x20the\x20dataset','body','8790CXpBVe','\x20\x20\x20\x20$gte\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20or\x20equal\x20\x20{\x22amount\x22:{\x22$gte\x22:100}}','\x20\x20WHERE\x20OPERATORS','params','\x20on\x20dataset\x20','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','helpExtra','10nMYAIu','\x20\x20\x20\x20JOIN\x20and\x20cross-table\x20aggregation\x20require\x20an\x20existing\x20trusted\x20Custom\x20SQL','\x20\x20\x20\x20This\x20command\x20sends\x20one\x20prepared\x20batch;\x20it\x20does\x20not\x20read\x20XLSX\x20or\x20split\x20batches.','2887816vodhIf','delete','Delete\x20data\x20records\x20(non-interactive\x20mode\x20requires\x20--yes)','description','3769842BFqVAT','\x20\x20\x20\x20No\x20import\x20checkpoint,\x20--resume,\x20automatic\x20upsert,\x20or\x20atomic\x20rollback\x20guarantee.','\x20\x20\x20\x20aggregate\x20supports\x20a\x20single\x20DB_TABLE\x20dataset\x20only','write','\x20\x20\x20\x20MAX\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Maximum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MAX\x22,\x22alias\x22:\x22max_price\x22}','\x20\x20LOGICAL\x20COMBINATORS','1069560cvAiRx','create','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','\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','Update\x20an\x20existing\x20data\x20record','\x20\x20AGGREGATE\x20TYPES'];a27_0x35ac=function(){return _0x3a0d4c;};return a27_0x35ac();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a28_0x339d(){const _0x4ab0a7=['422358XbcRrl','isArray','requestFields','modifierNameField','pkField','columnCodeListWithDeleted','220311FcumNF','read','options','labelField','displayName','createTimeField','filter','dblinkInfoDTO','dataset','path','Get\x20dataset\x20detail\x20including\x20fields,\x20relations,\x20and\x20operations','trim','logicField','16705DFtPes','operations','creatorNameField','host','split','method','str','12686960CssuNB','source','responseFields','properties','afterScriptId','find','extend','tableName','relatedPageInfoList','entries','push','required','deleted','doVersion','code','93736thItbU','8126160MSdpjW','object','updateTimeField','type','10sEdEgr','map','allFields','length','dbId','doType','formatRules','786CKYyVP','beforeScriptId','parse','responseBody','indexes','string','16vjLQxK','711ALNCEv','validateRules','modelCode','modifierIdField','requestBody','fields','datasetKey','dbName','name','modelId','dbtableConfig','5020716gEbpkW','allFieldNames'];a28_0x339d=function(){return _0x4ab0a7;};return a28_0x339d();}const a28_0x316619=a28_0x4e50;(function(_0x4a0fd6,_0x22f645){const _0x1ec44c=a28_0x4e50,_0x5d9a04=_0x4a0fd6();while(!![]){try{const _0x2e63cc=parseInt(_0x1ec44c(0x172))/0x1+-parseInt(_0x1ec44c(0x1a7))/0x2*(parseInt(_0x1ec44c(0x1b5))/0x3)+parseInt(_0x1ec44c(0x1b3))/0x4+parseInt(_0x1ec44c(0x17f))/0x5*(-parseInt(_0x1ec44c(0x1a1))/0x6)+parseInt(_0x1ec44c(0x196))/0x7+parseInt(_0x1ec44c(0x195))/0x8*(parseInt(_0x1ec44c(0x1a8))/0x9)+-parseInt(_0x1ec44c(0x19a))/0xa*(parseInt(_0x1ec44c(0x186))/0xb);if(_0x2e63cc===_0x22f645)break;else _0x5d9a04['push'](_0x5d9a04['shift']());}catch(_0x3be88a){_0x5d9a04['push'](_0x5d9a04['shift']());}}}(a28_0x339d,0xce396));import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function normalizeField(_0xb4e293){const _0x2bb0a4=a28_0x4e50;if(_0xb4e293[_0x2bb0a4(0x192)])return null;const _0x47ea11=Boolean(_0xb4e293['displayName']!==undefined||_0xb4e293[_0x2bb0a4(0x19f)]!==undefined);let _0x384efb={};if(!_0x47ea11&&typeof _0xb4e293['extend']===_0x2bb0a4(0x1a6))try{_0x384efb=JSON[_0x2bb0a4(0x1a3)](_0xb4e293['extend']);}catch{}const _0x53a184=_0x47ea11?_0xb4e293[_0x2bb0a4(0x1b0)]:_0xb4e293[_0x2bb0a4(0x194)],_0x3186be=_0x47ea11?_0xb4e293[_0x2bb0a4(0x176)]:_0xb4e293[_0x2bb0a4(0x1b0)],_0x960681=_0x47ea11?_0xb4e293['doType']:_0xb4e293[_0x2bb0a4(0x199)]||_0xb4e293['dataType'],_0x29fc0c=_0x47ea11?_0xb4e293['pkField']===!![]:_0x384efb[_0x2bb0a4(0x170)]===!![],_0x321a1e=_0x47ea11?_0xb4e293[_0x2bb0a4(0x191)]===!![]:_0x384efb[_0x2bb0a4(0x191)]===!![],_0x7dbce=_0x47ea11?_0xb4e293[_0x2bb0a4(0x174)]??null:_0x384efb['options']??null,_0x40462e={'name':_0x53a184,'displayName':_0x3186be||_0x53a184,'type':_0x960681,'dbType':_0xb4e293['dbType'],'pk':_0x29fc0c,'required':_0x321a1e,'description':_0xb4e293['description']||undefined};return Array[_0x2bb0a4(0x1b6)](_0x7dbce)&&_0x7dbce['length']>0x0&&(_0x40462e[_0x2bb0a4(0x174)]=_0x7dbce),_0x40462e;}function parseJsonMaybe(_0x264d0e){const _0x233396=a28_0x4e50;if(typeof _0x264d0e!==_0x233396(0x1a6))return _0x264d0e;try{return JSON[_0x233396(0x1a3)](_0x264d0e);}catch{return _0x264d0e;}}function normalizeOperationEntry(_0x13cd42,_0x48bdcd){const _0x3acc9d=a28_0x4e50;if(!_0x48bdcd||typeof _0x48bdcd!=='object')return null;if(!_0x48bdcd[_0x3acc9d(0x184)]||!_0x48bdcd[_0x3acc9d(0x17b)])return null;const _0x11bb3e={'name':_0x13cd42,'method':_0x48bdcd['method'],'path':_0x48bdcd[_0x3acc9d(0x17b)]};if(_0x48bdcd['host'])_0x11bb3e[_0x3acc9d(0x182)]=_0x48bdcd['host'];if(_0x48bdcd[_0x3acc9d(0x1ac)]!=null)_0x11bb3e[_0x3acc9d(0x1ac)]=parseJsonMaybe(_0x48bdcd[_0x3acc9d(0x1ac)]);if(_0x48bdcd[_0x3acc9d(0x1a4)]!=null)_0x11bb3e[_0x3acc9d(0x1a4)]=parseJsonMaybe(_0x48bdcd[_0x3acc9d(0x1a4)]);if(_0x48bdcd[_0x3acc9d(0x1a2)]!=null)_0x11bb3e[_0x3acc9d(0x1a2)]=_0x48bdcd[_0x3acc9d(0x1a2)];if(_0x48bdcd[_0x3acc9d(0x18a)]!=null)_0x11bb3e['afterScriptId']=_0x48bdcd[_0x3acc9d(0x18a)];if(Array['isArray'](_0x48bdcd['requestFields']))_0x11bb3e[_0x3acc9d(0x1b7)]=_0x48bdcd[_0x3acc9d(0x1b7)];if(Array[_0x3acc9d(0x1b6)](_0x48bdcd[_0x3acc9d(0x188)]))_0x11bb3e[_0x3acc9d(0x188)]=_0x48bdcd[_0x3acc9d(0x188)];return _0x11bb3e;}function summarizeDbtable(_0x5698db){const _0x231e66=a28_0x4e50,_0x110ee5={},_0x17f13b=[_0x231e66(0x19e),_0x231e66(0x1af),_0x231e66(0x18d),_0x231e66(0x1ae),_0x231e66(0x170),_0x231e66(0x19c),_0x231e66(0x17e),_0x231e66(0x177),_0x231e66(0x198),'creatorIdField',_0x231e66(0x181),_0x231e66(0x1ab),_0x231e66(0x1b8),_0x231e66(0x175),_0x231e66(0x179)];for(const _0x52f61c of _0x17f13b){if(_0x5698db[_0x52f61c]!==undefined)_0x110ee5[_0x52f61c]=_0x5698db[_0x52f61c];}return typeof _0x110ee5['allFields']===_0x231e66(0x1a6)&&_0x110ee5[_0x231e66(0x19c)][_0x231e66(0x19d)]>0x0&&(_0x110ee5[_0x231e66(0x1b4)]=_0x110ee5['allFields'][_0x231e66(0x183)](',')[_0x231e66(0x19b)](_0x24d8f4=>_0x24d8f4[_0x231e66(0x17d)]())['filter'](Boolean)),_0x110ee5;}function normalizeRelatedPages(_0x4ddaf3){const _0x5819ff=a28_0x4e50;if(!Array[_0x5819ff(0x1b6)](_0x4ddaf3))return[];return _0x4ddaf3[_0x5819ff(0x178)](_0x29dab0=>_0x29dab0&&typeof _0x29dab0===_0x5819ff(0x197))['map'](_0xaa2673=>({'id':_0xaa2673['id'],'type':_0xaa2673[_0x5819ff(0x199)],'code':_0xaa2673[_0x5819ff(0x194)],'title':_0xaa2673['title'],'deleted':_0xaa2673[_0x5819ff(0x192)]===!![]}));}function normalizeFallbackFieldName(_0x14ca74,_0x12394c){const _0x300ff0=a28_0x4e50,_0x53d7b2=_0x14ca74[_0x300ff0(0x17d)]();if(!_0x53d7b2)return null;return{'name':_0x53d7b2,'displayName':_0x53d7b2,'type':undefined,'dbType':undefined,'pk':_0x53d7b2===_0x12394c,'required':![],'description':undefined};}function a28_0x4e50(_0x32ab96,_0x3d3dc1){_0x32ab96=_0x32ab96-0x170;const _0x339d5f=a28_0x339d();let _0x4e509f=_0x339d5f[_0x32ab96];return _0x4e509f;}async function loadListFieldFallback(_0x5d5fb1,_0xf9ec0e){const _0x44bda2=a28_0x4e50;if(!_0x5d5fb1||!_0xf9ec0e)return[];try{const _0xc082df=await listDatasets(_0x5d5fb1,{'code':_0xf9ec0e}),_0x427698=_0xc082df[_0x44bda2(0x18b)](_0x7a76c4=>_0x7a76c4['code']===_0xf9ec0e)??_0xc082df[0x0],_0x94f9b5=_0x427698?.[_0x44bda2(0x1b2)]??{},_0xc79f19=typeof _0x94f9b5[_0x44bda2(0x19c)]===_0x44bda2(0x1a6)?_0x94f9b5['allFields'][_0x44bda2(0x183)](','):[];return _0xc79f19[_0x44bda2(0x19b)](_0x460ec6=>normalizeFallbackFieldName(_0x460ec6,_0x94f9b5[_0x44bda2(0x170)]))[_0x44bda2(0x178)](_0x324e47=>_0x324e47!==null);}catch{return[];}}export const datasetDetail={'service':a28_0x316619(0x17a),'command':'detail','description':a28_0x316619(0x17c),'risk':a28_0x316619(0x173),'flags':[CODE_FLAG],async 'execute'(_0x1e391e){const _0x11a208=a28_0x316619,_0x4d6565=await getDatasetDetail(_0x1e391e[_0x11a208(0x185)](_0x11a208(0x194))),_0xa5b0dc=Array['isArray'](_0x4d6565['fields'])?_0x4d6565[_0x11a208(0x1ad)]:Array[_0x11a208(0x1b6)](_0x4d6565[_0x11a208(0x189)])?_0x4d6565[_0x11a208(0x189)]:[];let _0x46d1f2=_0xa5b0dc[_0x11a208(0x19b)](_0x533703=>normalizeField(_0x533703))[_0x11a208(0x178)](_0x2893c1=>_0x2893c1!==null);_0x46d1f2[_0x11a208(0x19d)]===0x0&&(_0x46d1f2=await loadListFieldFallback(_0x1e391e['appCode'],_0x1e391e[_0x11a208(0x185)]('code')));const _0x55324e=_0x4d6565[_0x11a208(0x180)]??{},_0x22c590=[];for(const [_0x3ec017,_0x553ac5]of Object[_0x11a208(0x18f)](_0x55324e)){const _0x251107=normalizeOperationEntry(_0x3ec017,_0x553ac5);if(_0x251107)_0x22c590[_0x11a208(0x190)](_0x251107);}const _0x5c1bde=_0x4d6565['dbtableConfig']??{},_0x4da096=_0x4d6565['dataset']??{},_0x4e6584=_0x5c1bde[_0x11a208(0x19e)]!=null?{'id':_0x5c1bde[_0x11a208(0x19e)],'name':_0x5c1bde[_0x11a208(0x1af)]??null}:undefined;let _0x3474fd;return typeof _0x4d6565[_0x11a208(0x18c)]==='string'&&(_0x3474fd=parseJsonMaybe(_0x4d6565[_0x11a208(0x18c)])),{'ok':!![],'data':{'id':_0x4d6565[_0x11a208(0x1b1)]??_0x4d6565['id'],'name':_0x4d6565[_0x11a208(0x1b0)],'code':_0x4d6565[_0x11a208(0x1aa)]||_0x4d6565[_0x11a208(0x194)],'doVersion':_0x4d6565[_0x11a208(0x193)],'description':_0x4d6565['description']||_0x4da096['tableComment']||undefined,'source':_0x4d6565[_0x11a208(0x187)]||_0x4da096['sourceType'],'table':_0x5c1bde['tableName']||_0x4da096[_0x11a208(0x18d)],'datasetKey':_0x5c1bde['datasetKey'],'pk':_0x5c1bde['pkField'],'db':_0x4e6584,'dbtable':summarizeDbtable(_0x5c1bde),'fields':_0x46d1f2,'operations':_0x22c590,'indexes':Array['isArray'](_0x4da096[_0x11a208(0x1a5)])?_0x4da096[_0x11a208(0x1a5)]:[],'relations':_0x4d6565['relations']??null,'relatedPages':normalizeRelatedPages(_0x4d6565[_0x11a208(0x18e)]),...Array['isArray'](_0x4d6565[_0x11a208(0x171)])?{'columnCodeListWithDeleted':_0x4d6565[_0x11a208(0x171)]}:{},'formatRules':Array[_0x11a208(0x1b6)](_0x4d6565[_0x11a208(0x1a0)])?_0x4d6565[_0x11a208(0x1a0)]:[],'validateRules':Array[_0x11a208(0x1b6)](_0x4d6565[_0x11a208(0x1a9)])?_0x4d6565[_0x11a208(0x1a9)]:[],..._0x3474fd!==undefined?{'extend':_0x3474fd}:{},'stats':{'fieldCount':_0x46d1f2[_0x11a208(0x19d)],'operationCount':_0x22c590[_0x11a208(0x19d)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2d96f7,_0x209b26){const _0x23a6c2=a29_0x1618,_0x7d71a0=_0x2d96f7();while(!![]){try{const _0x2638e8=-parseInt(_0x23a6c2(0x143))/0x1*(parseInt(_0x23a6c2(0x13e))/0x2)+-parseInt(_0x23a6c2(0x147))/0x3*(parseInt(_0x23a6c2(0x145))/0x4)+parseInt(_0x23a6c2(0x142))/0x5+-parseInt(_0x23a6c2(0x144))/0x6+parseInt(_0x23a6c2(0x141))/0x7+-parseInt(_0x23a6c2(0x13d))/0x8*(parseInt(_0x23a6c2(0x13f))/0x9)+-parseInt(_0x23a6c2(0x146))/0xa*(-parseInt(_0x23a6c2(0x140))/0xb);if(_0x2638e8===_0x209b26)break;else _0x7d71a0['push'](_0x7d71a0['shift']());}catch(_0x2e1451){_0x7d71a0['push'](_0x7d71a0['shift']());}}}(a29_0x41d2,0xe0023));import{datasetList}from'../../commands/dataset/list.js';function a29_0x41d2(){const _0x93d5ce=['1577hzPWas','5268528RiNCIK','8DfwFQF','60ulQgyi','1248153HdlULV','40NZhuzc','2252vpDwbP','1325547iMFdAs','5928208ALapWt','2464812quPkGU','7770810wVNLZy'];a29_0x41d2=function(){return _0x93d5ce;};return a29_0x41d2();}import{datasetDetail}from'../../commands/dataset/detail.js';function a29_0x1618(_0x34b880,_0x24aeeb){_0x34b880=_0x34b880-0x13d;const _0x41d2ac=a29_0x41d2();let _0x161836=_0x41d2ac[_0x34b880];return _0x161836;}import{datasetSdkDoc}from'../../commands/dataset/sdk-doc.js';export const datasetDefinitions=[datasetList,datasetDetail,datasetSdkDoc];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a30_0x5df4e0=a30_0x2fc2;(function(_0x2ea898,_0x3f93f8){const _0x2abb4d=a30_0x2fc2,_0x3a7520=_0x2ea898();while(!![]){try{const _0x3ad12b=-parseInt(_0x2abb4d(0x93))/0x1*(-parseInt(_0x2abb4d(0x99))/0x2)+parseInt(_0x2abb4d(0x86))/0x3*(-parseInt(_0x2abb4d(0x9c))/0x4)+-parseInt(_0x2abb4d(0xa1))/0x5*(parseInt(_0x2abb4d(0x8c))/0x6)+parseInt(_0x2abb4d(0x92))/0x7+-parseInt(_0x2abb4d(0x89))/0x8*(-parseInt(_0x2abb4d(0x9a))/0x9)+parseInt(_0x2abb4d(0x9f))/0xa+-parseInt(_0x2abb4d(0x8a))/0xb;if(_0x3ad12b===_0x3f93f8)break;else _0x3a7520['push'](_0x3a7520['shift']());}catch(_0x515d49){_0x3a7520['push'](_0x3a7520['shift']());}}}(a30_0x51ca,0xe4868));function a30_0x51ca(){const _0x202ab1=['16462776jeQEti','description','402uzKAIP','Filter\x20by\x20dataset\x20name\x20(server-side\x20fuzzy\x20match)','dbtableConfig','List\x20datasets\x20in\x20the\x20app\x20(supports\x20server-side\x20name/code\x20filtering)','str','source','12605075AhIyxV','378493LsJMvr','datasetKey','allFields','appCode','list','map','2oTemxV','522NIAnxW','name','16RcNtyW','trim','tableName','17132080sIIgjb','Filter\x20by\x20dataset\x20code\x20(server-side\x20exact\x20match)','88640mbZzWq','string','length','1147293MDEBjb','pkField','split','173480AMBkvl'];a30_0x51ca=function(){return _0x202ab1;};return a30_0x51ca();}import{listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function a30_0x2fc2(_0x44ab5d,_0x2aafce){_0x44ab5d=_0x44ab5d-0x84;const _0x51ca4b=a30_0x51ca();let _0x2fc275=_0x51ca4b[_0x44ab5d];return _0x2fc275;}export const datasetList={'service':'dataset','command':a30_0x5df4e0(0x97),'description':a30_0x5df4e0(0x8f),'risk':'read','flags':[{'name':'name','type':a30_0x5df4e0(0x84),'description':a30_0x5df4e0(0x8d)},{...CODE_FLAG,'required':![],'description':a30_0x5df4e0(0xa0)}],async 'execute'(_0x59191e){const _0x4c39b2=a30_0x5df4e0,_0x3daf41=_0x59191e['str'](_0x4c39b2(0x9b)),_0x22f09d=_0x59191e[_0x4c39b2(0x90)]('code'),_0x41730c=await listDatasets(_0x59191e[_0x4c39b2(0x96)],{..._0x3daf41&&{'name':_0x3daf41},..._0x22f09d&&{'code':_0x22f09d}});return{'ok':!![],'data':{'total':_0x41730c[_0x4c39b2(0x85)],'datasets':_0x41730c[_0x4c39b2(0x98)](_0x43c9c3=>{const _0x1e6075=_0x4c39b2,_0x58784d=_0x43c9c3[_0x1e6075(0x8e)]??{};return{'id':_0x43c9c3['id'],'code':_0x43c9c3['code'],'name':_0x43c9c3[_0x1e6075(0x9b)],'source':_0x43c9c3[_0x1e6075(0x91)],'description':_0x43c9c3[_0x1e6075(0x8b)],'table':_0x58784d[_0x1e6075(0x9e)],'datasetKey':_0x58784d[_0x1e6075(0x94)],'pk':_0x58784d[_0x1e6075(0x87)],'fields':_0x58784d[_0x1e6075(0x95)]?_0x58784d[_0x1e6075(0x95)][_0x1e6075(0x88)](',')['map'](_0x33efce=>_0x33efce[_0x1e6075(0x9d)]()):[]};})}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a31_0x4539b1=a31_0x3ca3;(function(_0x18b861,_0x45b180){const _0x204ed4=a31_0x3ca3,_0x33564b=_0x18b861();while(!![]){try{const _0x56d39c=-parseInt(_0x204ed4(0x10c))/0x1+parseInt(_0x204ed4(0x112))/0x2+-parseInt(_0x204ed4(0x10f))/0x3+-parseInt(_0x204ed4(0x11a))/0x4*(parseInt(_0x204ed4(0x110))/0x5)+parseInt(_0x204ed4(0x11b))/0x6*(parseInt(_0x204ed4(0x114))/0x7)+-parseInt(_0x204ed4(0x11f))/0x8+-parseInt(_0x204ed4(0x113))/0x9*(-parseInt(_0x204ed4(0x118))/0xa);if(_0x56d39c===_0x45b180)break;else _0x33564b['push'](_0x33564b['shift']());}catch(_0x4af52f){_0x33564b['push'](_0x33564b['shift']());}}}(a31_0x292a,0x6f1cb));import{getDatasetSdkUsageDoc}from'../../core/api-client.js';function a31_0x292a(){const _0x2214a8=['#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0aNo\x20SDK\x20usage\x20documentation\x20is\x20available.','appCode','1451160lrDJOT','code','12YqnAvu','3035574YnfRhC','dataset','Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.','3125792oBwsjo','14222TIkOQJ','read','sdk-doc','2234871CGTylk','295255JxDDEu','string','1681788nIyUHu','27jQvpAV','7VkVzjE','trim'];a31_0x292a=function(){return _0x2214a8;};return a31_0x292a();}import{CODE_FLAG}from'../../commands/common/flags.js';const DEFAULT_MARKDOWN=a31_0x4539b1(0x116);export function formatDatasetSdkMarkdown(_0x183d28){const _0xa8b725=a31_0x4539b1,_0x30af64=typeof _0x183d28===_0xa8b725(0x111)?_0x183d28[_0xa8b725(0x115)]():'';return _0x30af64||DEFAULT_MARKDOWN;}function a31_0x3ca3(_0x463e70,_0x197270){_0x463e70=_0x463e70-0x10c;const _0x292a09=a31_0x292a();let _0x3ca3fb=_0x292a09[_0x463e70];return _0x3ca3fb;}export const datasetSdkDoc={'service':a31_0x4539b1(0x11c),'command':a31_0x4539b1(0x10e),'description':a31_0x4539b1(0x11d),'risk':a31_0x4539b1(0x10d),'flags':[{...CODE_FLAG,'description':a31_0x4539b1(0x11e)}],async 'execute'(_0x2da791){const _0x360b06=a31_0x4539b1,_0x480179=_0x2da791['str'](_0x360b06(0x119)),_0x43d5bf=await getDatasetSdkUsageDoc(_0x480179,_0x2da791[_0x360b06(0x117)]);return{'ok':!![],'data':{'code':_0x480179,'appCode':_0x2da791['appCode'],'markdown':formatDatasetSdkMarkdown(_0x43d5bf)}};}};
|
package/lib/commands/doctor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a31_0x506512=a31_0x242b;(function(_0x11c2f9,_0x4eb7ac){const _0x5c848e=a31_0x242b,_0xcd4d09=_0x11c2f9();while(!![]){try{const _0x27d41d=parseInt(_0x5c848e(0x214))/0x1+-parseInt(_0x5c848e(0x229))/0x2+-parseInt(_0x5c848e(0x1d0))/0x3*(parseInt(_0x5c848e(0x1e5))/0x4)+parseInt(_0x5c848e(0x23a))/0x5*(-parseInt(_0x5c848e(0x21f))/0x6)+-parseInt(_0x5c848e(0x1da))/0x7+parseInt(_0x5c848e(0x218))/0x8+parseInt(_0x5c848e(0x1e1))/0x9*(parseInt(_0x5c848e(0x21a))/0xa);if(_0x27d41d===_0x4eb7ac)break;else _0xcd4d09['push'](_0xcd4d09['shift']());}catch(_0x52b1b6){_0xcd4d09['push'](_0xcd4d09['shift']());}}}(a31_0x1b51,0x499c0));function a31_0x1b51(){const _0x3084a9=['\x20\x20auth\x20(effective):\x20','current','green','yellow','\x20\x20API\x20Endpoints','571396moGWCr','(invalid)','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','locale','3327136ttKRyj','\x20(accessKey)','470kCnsMd','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','(default:\x20','\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','1998LTrmue','project','not\x20configured','services','ClientAk','(set,\x20length=','includes','state','gray','installedPath','1007224pUMIfa','globalConfig','padEnd','raw','red','\x20config\x20init','empty','accessKey','\x20\x20region:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','appCode','\x20\x20Skill\x20Version:\x20\x20\x20','log','check','status','prototype','\x20\x20Repair\x20project:\x20\x20\x20','✓\x20current','185hSqKdf','\x20\x20─','Diagnose\x20CLI\x20configuration\x20and\x20environment','hasOwnProperty','routing','path','\x20\x20kbServiceDomain:\x20','\x20+\x20','serviceCode','✗\x20Invalid\x20JSON','length','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20app\x20locale:\x20\x20\x20\x20\x20\x20','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','format','\x20config','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','(unnamed)','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Global','\x20\x20Country/Region\x20Configuration','\x20\x20Merged\x20Config','skillVersion','84GZIpQa','⚠\x20Empty','\x20\x20runtimeDomain:\x20\x20\x20','(not\x20set)','riskLevel','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','call','Project','\x20config\x20delete\x20routing\x20--global','2042502LzWWsn','\x20\x20Service\x20Tree','bold','\x20\x20Built-in\x20Skill','platform','verbose','\x20config\x20delete\x20inherit','112257FkrJiL','\x20config\x20delete\x20routing','(none)','(no\x20file)','66328PWtKXI','join','inherit','(missing)','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','missing','message','serviceCount','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20config\x20delete\x20inherit\x20--global','projectConfig','ignored\x20in\x20','✗\x20Invalid','reason','\x20doctor','Unavailable\x20until\x20routing\x20configuration\x20is\x20repaired','\x20\x20Legacy\x20inherit:\x20\x20\x20','arch','global','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','\x20commands)','commandCount','\x20\x20Package\x20Version:\x20','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Repair\x20project:\x20\x20','doctor','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','name','registryPath','\x20\x20Routing\x20Configuration','region','\x20\x20Config\x20Files','\x20Imported\x20from:\x20','\x20\x20skillDomain:\x20\x20\x20\x20\x20','repeat','\x20\x20Repair\x20global:\x20\x20\x20\x20','\x20config\x20delete\x20region','⚠\x20Empty\x20(treated\x20as\x20{})','(removed\x20—\x20cookie\x20auth\x20disabled)','(default)','(not\x20found)','\x20\x20Session\x20check:\x20\x20\x20'];a31_0x1b51=function(){return _0x3084a9;};return a31_0x1b51();}import a31_0x81145 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 a31_0x242b(_0xd66f5a,_0x146bb6){_0xd66f5a=_0xd66f5a-0x1ce;const _0x1b5136=a31_0x1b51();let _0x242bfa=_0x1b5136[_0xd66f5a];return _0x242bfa;}async function execute(_0x48ec09){const _0x40dbb6=a31_0x242b,_0x393046=getCliVersion(),_0x1d10bc=buildConfigFromFlags({});let _0x2eb5bb,_0x16fe7d;try{_0x2eb5bb=normalizeLovrabetRegion(_0x1d10bc[_0x40dbb6(0x22c)][_0x40dbb6(0x203)]);}catch(_0x541509){_0x16fe7d=_0x541509 instanceof Error?_0x541509:new Error(String(_0x541509));}let _0x22e3f0;if(!_0x16fe7d)try{await initGlobalEnvironment(_0x1d10bc);}catch(_0x4a7095){_0x22e3f0=_0x4a7095 instanceof Error?_0x4a7095:new Error(String(_0x4a7095));}console[_0x40dbb6(0x234)](),console[_0x40dbb6(0x234)](a31_0x81145[_0x40dbb6(0x1dc)](CLI_BIN_NAME+_0x40dbb6(0x1f3))),console['log'](a31_0x81145[_0x40dbb6(0x227)]('─'[_0x40dbb6(0x207)](0x32))),console[_0x40dbb6(0x234)](_0x40dbb6(0x21e)+_0x393046),console[_0x40dbb6(0x234)](_0x40dbb6(0x216)+process['version']),console[_0x40dbb6(0x234)](_0x40dbb6(0x1d5)+process[_0x40dbb6(0x1de)]+'\x20'+process[_0x40dbb6(0x1f6)]);const _0x201df3=inspectBuiltinSkill();console[_0x40dbb6(0x234)](),console['log'](a31_0x81145['bold'](_0x40dbb6(0x1dd))),console[_0x40dbb6(0x234)](a31_0x81145[_0x40dbb6(0x227)](_0x40dbb6(0x23b)[_0x40dbb6(0x207)](0x1e))),console[_0x40dbb6(0x234)]('\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x201df3[_0x40dbb6(0x226)]===_0x40dbb6(0x210)?a31_0x81145[_0x40dbb6(0x211)](_0x40dbb6(0x239)):a31_0x81145[_0x40dbb6(0x22d)]('✗\x20'+_0x201df3[_0x40dbb6(0x226)]))),console['log'](_0x40dbb6(0x1fb)+_0x201df3['packageVersion']),console['log'](_0x40dbb6(0x233)+(_0x201df3[_0x40dbb6(0x1cf)]||a31_0x81145[_0x40dbb6(0x227)](_0x40dbb6(0x1e8)))),console[_0x40dbb6(0x234)]('\x20\x20Installed\x20Path:\x20\x20'+(_0x201df3[_0x40dbb6(0x228)]||a31_0x81145[_0x40dbb6(0x227)](_0x40dbb6(0x20d))));_0x201df3[_0x40dbb6(0x226)]!==_0x40dbb6(0x210)&&console[_0x40dbb6(0x234)]('\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x201df3['repairCommand']);_0x201df3[_0x40dbb6(0x1f2)]&&console[_0x40dbb6(0x234)](_0x40dbb6(0x21d)+_0x201df3[_0x40dbb6(0x1f2)]);console[_0x40dbb6(0x234)](),console['log'](a31_0x81145[_0x40dbb6(0x1dc)](_0x40dbb6(0x204))),console[_0x40dbb6(0x234)](a31_0x81145[_0x40dbb6(0x227)](_0x40dbb6(0x23b)[_0x40dbb6(0x207)](0x1e)));const _0x3aba2c=getGlobalConfigPath(),_0x1d2d43=getProjectConfigPath();console[_0x40dbb6(0x234)](_0x40dbb6(0x1ed)+(_0x3aba2c||a31_0x81145['gray']('(not\x20found)'))),console[_0x40dbb6(0x234)]('\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x1d2d43||a31_0x81145[_0x40dbb6(0x227)](_0x40dbb6(0x20d)))),console[_0x40dbb6(0x234)](),console[_0x40dbb6(0x234)](a31_0x81145[_0x40dbb6(0x1dc)]('\x20\x20Config\x20JSON')),console[_0x40dbb6(0x234)](a31_0x81145[_0x40dbb6(0x227)](_0x40dbb6(0x23b)[_0x40dbb6(0x207)](0x1e)));const _0x2002ad=(_0x684382,_0x386959)=>{const _0x492b8e=_0x40dbb6;if(!_0x386959){console['log']('\x20\x20'+_0x684382[_0x492b8e(0x22b)](0x11)+'\x20'+a31_0x81145[_0x492b8e(0x227)](_0x492b8e(0x1e4)));return;}const _0x27d2cb=inspectCliConfigJsonFile(_0x386959);if(_0x27d2cb[_0x492b8e(0x236)]==='ok')console[_0x492b8e(0x234)]('\x20\x20'+_0x684382[_0x492b8e(0x22b)](0x11)+'\x20'+a31_0x81145['green']('✓\x20Valid\x20JSON'));else{if(_0x27d2cb[_0x492b8e(0x236)]===_0x492b8e(0x22f))console[_0x492b8e(0x234)]('\x20\x20'+_0x684382[_0x492b8e(0x22b)](0x11)+'\x20'+a31_0x81145[_0x492b8e(0x212)](_0x492b8e(0x20a)));else _0x27d2cb[_0x492b8e(0x236)]===_0x492b8e(0x1ea)?console['log']('\x20\x20'+_0x684382[_0x492b8e(0x22b)](0x11)+'\x20'+a31_0x81145[_0x492b8e(0x227)](_0x492b8e(0x1e8))):(console[_0x492b8e(0x234)]('\x20\x20'+_0x684382[_0x492b8e(0x22b)](0x11)+'\x20'+a31_0x81145[_0x492b8e(0x22d)](_0x492b8e(0x243))),console['log']('\x20\x20'+''[_0x492b8e(0x22b)](0x11)+'\x20'+a31_0x81145[_0x492b8e(0x22d)](_0x27d2cb[_0x492b8e(0x1eb)])));}};_0x2002ad(_0x40dbb6(0x24e),_0x3aba2c),_0x2002ad(_0x40dbb6(0x1d8),_0x1d2d43);const _0x491448=loadRawConfigLayers(),_0x1a226e=[Object[_0x40dbb6(0x237)][_0x40dbb6(0x23d)][_0x40dbb6(0x1d7)](_0x491448[_0x40dbb6(0x22a)],_0x40dbb6(0x1e7))?_0x40dbb6(0x1f7):null,Object['prototype'][_0x40dbb6(0x23d)][_0x40dbb6(0x1d7)](_0x491448[_0x40dbb6(0x1ef)],_0x40dbb6(0x1e7))?_0x40dbb6(0x220):null]['filter'](Boolean);_0x1a226e['length']>0x0&&(console[_0x40dbb6(0x234)](_0x40dbb6(0x1f5)+a31_0x81145[_0x40dbb6(0x212)](_0x40dbb6(0x1f0)+_0x1a226e[_0x40dbb6(0x1e6)](_0x40dbb6(0x241))+_0x40dbb6(0x249))),_0x1a226e[_0x40dbb6(0x225)](_0x40dbb6(0x220))&&console['log'](_0x40dbb6(0x238)+CLI_BIN_NAME+_0x40dbb6(0x1e0)),_0x1a226e[_0x40dbb6(0x225)](_0x40dbb6(0x1f7))&&console['log'](_0x40dbb6(0x208)+CLI_BIN_NAME+_0x40dbb6(0x1ee)));_0x22e3f0&&(console[_0x40dbb6(0x234)](),console[_0x40dbb6(0x234)](a31_0x81145[_0x40dbb6(0x1dc)](_0x40dbb6(0x202))),console[_0x40dbb6(0x234)](a31_0x81145['gray'](_0x40dbb6(0x23b)[_0x40dbb6(0x207)](0x1e))),console[_0x40dbb6(0x234)](_0x40dbb6(0x24d)+a31_0x81145[_0x40dbb6(0x22d)](_0x40dbb6(0x1f1))),console[_0x40dbb6(0x234)]('\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x22e3f0['message']),Object[_0x40dbb6(0x237)][_0x40dbb6(0x23d)]['call'](_0x491448[_0x40dbb6(0x1ef)],_0x40dbb6(0x23e))&&console[_0x40dbb6(0x234)](_0x40dbb6(0x1fd)+CLI_BIN_NAME+_0x40dbb6(0x1e2)),Object[_0x40dbb6(0x237)][_0x40dbb6(0x23d)][_0x40dbb6(0x1d7)](_0x491448[_0x40dbb6(0x22a)],_0x40dbb6(0x23e))&&console[_0x40dbb6(0x234)]('\x20\x20Repair\x20global:\x20\x20\x20'+CLI_BIN_NAME+_0x40dbb6(0x1d9)));_0x16fe7d&&(console[_0x40dbb6(0x234)](),console['log'](a31_0x81145[_0x40dbb6(0x1dc)](_0x40dbb6(0x24f))),console[_0x40dbb6(0x234)](a31_0x81145[_0x40dbb6(0x227)](_0x40dbb6(0x23b)[_0x40dbb6(0x207)](0x1e))),console['log'](_0x40dbb6(0x24d)+a31_0x81145[_0x40dbb6(0x22d)](_0x40dbb6(0x1f1))),console['log'](_0x40dbb6(0x21d)+_0x16fe7d['message']),Object[_0x40dbb6(0x237)][_0x40dbb6(0x23d)][_0x40dbb6(0x1d7)](_0x491448[_0x40dbb6(0x1ef)],_0x40dbb6(0x203))&&console[_0x40dbb6(0x234)](_0x40dbb6(0x1fd)+CLI_BIN_NAME+_0x40dbb6(0x209)),Object[_0x40dbb6(0x237)][_0x40dbb6(0x23d)][_0x40dbb6(0x1d7)](_0x491448[_0x40dbb6(0x22a)],_0x40dbb6(0x203))&&console[_0x40dbb6(0x234)]('\x20\x20Repair\x20global:\x20\x20\x20'+CLI_BIN_NAME+_0x40dbb6(0x22e)));console[_0x40dbb6(0x234)](),console['log'](a31_0x81145['bold'](_0x40dbb6(0x1ce))),console['log'](a31_0x81145['gray'](_0x40dbb6(0x23b)['repeat'](0x1e))),console[_0x40dbb6(0x234)](_0x40dbb6(0x247)+(_0x1d10bc[_0x40dbb6(0x232)]||a31_0x81145[_0x40dbb6(0x22d)](_0x40dbb6(0x1d3)))),console['log'](_0x40dbb6(0x231)+(_0x2eb5bb??a31_0x81145['red'](_0x40dbb6(0x215)))),console[_0x40dbb6(0x234)](_0x40dbb6(0x246)+_0x1d10bc[_0x40dbb6(0x217)]),console['log']('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0x1d10bc['defaultApp']||a31_0x81145['gray']('(none)'))),console[_0x40dbb6(0x234)](_0x40dbb6(0x24a)+(_0x1d10bc['currentApp']||a31_0x81145['gray']('(none)'))),console[_0x40dbb6(0x234)](_0x40dbb6(0x1d6)+(_0x1d10bc[_0x40dbb6(0x248)]||a31_0x81145['gray'](_0x40dbb6(0x21c)+DEFAULT_CONFIG_VALUES[_0x40dbb6(0x248)]+')'))),console[_0x40dbb6(0x234)]('\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x1d10bc['pageSize']??a31_0x81145[_0x40dbb6(0x227)](_0x40dbb6(0x20c)))),console[_0x40dbb6(0x234)](_0x40dbb6(0x24b)+_0x1d10bc[_0x40dbb6(0x1d4)]),console[_0x40dbb6(0x234)]('\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1d10bc[_0x40dbb6(0x1df)]),console[_0x40dbb6(0x234)](_0x40dbb6(0x20f)+AUTH_MODE['ClientAk']),console[_0x40dbb6(0x234)](_0x40dbb6(0x1fc)+(_0x1d10bc[_0x40dbb6(0x230)]?a31_0x81145[_0x40dbb6(0x211)](_0x40dbb6(0x224)+_0x1d10bc[_0x40dbb6(0x230)][_0x40dbb6(0x244)]+')'):a31_0x81145[_0x40dbb6(0x227)](_0x40dbb6(0x1e3)))),console['log'](),console[_0x40dbb6(0x234)](a31_0x81145[_0x40dbb6(0x1dc)](_0x40dbb6(0x213))),console[_0x40dbb6(0x234)](a31_0x81145['gray'](_0x40dbb6(0x23b)[_0x40dbb6(0x207)](0x1e)));_0x22e3f0||_0x16fe7d?console[_0x40dbb6(0x234)](_0x40dbb6(0x24d)+a31_0x81145[_0x40dbb6(0x22d)](_0x40dbb6(0x1f4))):(console[_0x40dbb6(0x234)](_0x40dbb6(0x1f8)+getApiDomain()),console[_0x40dbb6(0x234)](_0x40dbb6(0x21b)+getUserDomain()),console[_0x40dbb6(0x234)](_0x40dbb6(0x1d2)+getRuntimeDomain()),console[_0x40dbb6(0x234)](_0x40dbb6(0x206)+getSkillDomain()),console[_0x40dbb6(0x234)](_0x40dbb6(0x240)+(getKbServiceDomain()??_0x40dbb6(0x221))));console['log'](),console[_0x40dbb6(0x234)](a31_0x81145[_0x40dbb6(0x1dc)](_0x40dbb6(0x1db))),console[_0x40dbb6(0x234)](a31_0x81145[_0x40dbb6(0x227)](_0x40dbb6(0x23b)[_0x40dbb6(0x207)](0x1e)));const _0x552f64=inspectServiceRegistry();console['log'](_0x40dbb6(0x1ff)+_0x552f64[_0x40dbb6(0x201)]),console[_0x40dbb6(0x234)](_0x40dbb6(0x24d)+formatServiceRegistryStatus(_0x552f64)),console[_0x40dbb6(0x234)]('\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x552f64[_0x40dbb6(0x1ec)]),console[_0x40dbb6(0x234)](_0x40dbb6(0x1e9)+_0x552f64[_0x40dbb6(0x1fa)]);for(const _0x564b46 of _0x552f64[_0x40dbb6(0x222)]){console[_0x40dbb6(0x234)]('\x20\x20'+(_0x564b46[_0x40dbb6(0x242)]+':')['padEnd'](0x11)+'\x20'+(_0x564b46[_0x40dbb6(0x200)]||a31_0x81145[_0x40dbb6(0x227)](_0x40dbb6(0x24c)))+'\x20('+_0x564b46[_0x40dbb6(0x1fa)]+_0x40dbb6(0x1f9)),console['log']('\x20\x20'+''[_0x40dbb6(0x22b)](0x11)+_0x40dbb6(0x205)+_0x564b46['source'][_0x40dbb6(0x23f)]);}return console[_0x40dbb6(0x234)](),console['log'](a31_0x81145[_0x40dbb6(0x1dc)]('\x20\x20Auth')),console[_0x40dbb6(0x234)](a31_0x81145[_0x40dbb6(0x227)](_0x40dbb6(0x23b)[_0x40dbb6(0x207)](0x1e))),console[_0x40dbb6(0x234)](_0x40dbb6(0x245)+a31_0x81145[_0x40dbb6(0x211)](AUTH_MODE[_0x40dbb6(0x223)]+_0x40dbb6(0x219))),console[_0x40dbb6(0x234)](_0x40dbb6(0x20e)+a31_0x81145[_0x40dbb6(0x227)](_0x40dbb6(0x20b))),console[_0x40dbb6(0x234)](),{'ok':!![]};}function formatServiceRegistryStatus(_0x2ae9d5){const _0xe98ba6=a31_0x242b;if(_0x2ae9d5['status']==='ok')return a31_0x81145[_0xe98ba6(0x211)]('✓\x20Loaded');if(_0x2ae9d5[_0xe98ba6(0x236)]==='missing')return a31_0x81145['gray'](_0xe98ba6(0x20d));if(_0x2ae9d5[_0xe98ba6(0x236)]===_0xe98ba6(0x22f))return a31_0x81145[_0xe98ba6(0x212)](_0xe98ba6(0x1d1));return a31_0x81145[_0xe98ba6(0x22d)](_0xe98ba6(0x1f1)+(_0x2ae9d5['message']?':\x20'+_0x2ae9d5[_0xe98ba6(0x1eb)]:''));}export const doctorDefinition={'service':a31_0x506512(0x1fe),'command':a31_0x506512(0x235),'description':a31_0x506512(0x23c),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
1
|
+
const a32_0x3ec301=a32_0x2664;(function(_0x2a81a6,_0x5e8401){const _0x5b7831=a32_0x2664,_0x26fe40=_0x2a81a6();while(!![]){try{const _0xd74274=-parseInt(_0x5b7831(0x21d))/0x1+parseInt(_0x5b7831(0x1e3))/0x2+parseInt(_0x5b7831(0x203))/0x3+parseInt(_0x5b7831(0x248))/0x4+parseInt(_0x5b7831(0x206))/0x5+-parseInt(_0x5b7831(0x22b))/0x6*(-parseInt(_0x5b7831(0x200))/0x7)+parseInt(_0x5b7831(0x23a))/0x8*(-parseInt(_0x5b7831(0x209))/0x9);if(_0xd74274===_0x5e8401)break;else _0x26fe40['push'](_0x26fe40['shift']());}catch(_0x20fee3){_0x26fe40['push'](_0x26fe40['shift']());}}}(a32_0x192f,0xdd850));import a32_0x2f0791 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{getCliVersion}from'../utils/version.js';import{getApiDomain,getKbServiceDomain,getRuntimeDomain,getSkillDomain,getUserDomain}from'../constant/domain.js';import{normalizeLovrabetRegion}from'../constant/region.js';function a32_0x192f(){const _0x334ec0=['5667960jzCBXM','green','path','32481OzlTen','repairCommand','✓\x20Valid\x20JSON','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','ClientAk','repeat','\x20\x20API\x20Endpoints','raw','\x20config\x20delete\x20region','(not\x20found)','\x20config\x20init','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','format','\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20config\x20delete\x20routing','(set,\x20length=','serviceCode','reason','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','(invalid)','544538nhfcQC','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','ignored\x20in\x20','commandCount','project','version','pageSize','\x20config\x20delete\x20routing\x20--global','(unnamed)','log','filter','\x20\x20Built-in\x20Skill','\x20\x20Routing\x20Configuration','\x20config','18CmnKcp','(default:\x20','\x20commands)','(none)','\x20\x20Config\x20Files','arch','empty','length','state','hasOwnProperty','Global','missing','name','read','\x20\x20Merged\x20Config','7880XpdCEM','source','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','\x20\x20Package\x20Version:\x20','defaultApp','\x20\x20Config\x20JSON','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','services','\x20config\x20delete\x20inherit','\x20\x20Repair\x20global:\x20\x20\x20\x20','\x20\x20kbServiceDomain:\x20','yellow','⚠\x20Empty','\x20\x20auth\x20(effective):\x20','1102132RjYhHA','skillVersion','region','current','riskLevel','\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','red','\x20Imported\x20from:\x20','Diagnose\x20CLI\x20configuration\x20and\x20environment','\x20\x20Repair\x20project:\x20\x20','registryPath','status','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','globalConfig','doctor','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Service\x20Tree','✓\x20Loaded','\x20\x20Session\x20check:\x20\x20\x20','prototype','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','packageVersion','(default)','\x20\x20Legacy\x20inherit:\x20\x20\x20','\x20+\x20','\x20doctor','\x20\x20Auth','padEnd','3210268twDAgs','✗\x20Invalid\x20JSON','\x20\x20Country/Region\x20Configuration','routing','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','includes','\x20\x20Installed\x20Path:\x20\x20','\x20\x20─','accessKey','\x20\x20skillDomain:\x20\x20\x20\x20\x20','platform','join','Unavailable\x20until\x20routing\x20configuration\x20is\x20repaired','✗\x20Invalid','currentApp','gray','✓\x20current','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','(missing)','message','projectConfig','global','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','(no\x20file)','inherit','call','bold','appCode','locale','1556443IMzbKg','verbose','\x20\x20app\x20locale:\x20\x20\x20\x20\x20\x20','3976323DhKrNu','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Repair\x20global:\x20\x20\x20'];a32_0x192f=function(){return _0x334ec0;};return a32_0x192f();}import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile,loadRawConfigLayers}from'../context.js';function a32_0x2664(_0x1565aa,_0xdb1945){_0x1565aa=_0x1565aa-0x1dd;const _0x192f73=a32_0x192f();let _0x2664bb=_0x192f73[_0x1565aa];return _0x2664bb;}import{AUTH_MODE}from'../constant/auth-mode.js';import{inspectServiceRegistry}from'../commands/service/registry.js';import{inspectBuiltinSkill}from'../skills/builtin-skill.js';async function execute(_0x518263){const _0x9a36d7=a32_0x2664,_0x6c4991=getCliVersion(),_0xc5f2b7=buildConfigFromFlags({});let _0x33f24d,_0x55f857;try{_0x33f24d=normalizeLovrabetRegion(_0xc5f2b7[_0x9a36d7(0x210)][_0x9a36d7(0x24a)]);}catch(_0xe5c198){_0x55f857=_0xe5c198 instanceof Error?_0xe5c198:new Error(String(_0xe5c198));}let _0x364afb;if(!_0x55f857)try{await initGlobalEnvironment(_0xc5f2b7);}catch(_0x54ad22){_0x364afb=_0x54ad22 instanceof Error?_0x54ad22:new Error(String(_0x54ad22));}console['log'](),console[_0x9a36d7(0x226)](a32_0x2f0791['bold'](CLI_BIN_NAME+_0x9a36d7(0x1e0))),console[_0x9a36d7(0x226)](a32_0x2f0791[_0x9a36d7(0x1f2)]('─'['repeat'](0x32))),console[_0x9a36d7(0x226)](_0x9a36d7(0x21b)+_0x6c4991),console['log'](_0x9a36d7(0x25d)+process[_0x9a36d7(0x222)]),console['log'](_0x9a36d7(0x1f4)+process[_0x9a36d7(0x1ed)]+'\x20'+process[_0x9a36d7(0x230)]);const _0x1683a5=inspectBuiltinSkill();console[_0x9a36d7(0x226)](),console['log'](a32_0x2f0791[_0x9a36d7(0x1fd)](_0x9a36d7(0x228))),console[_0x9a36d7(0x226)](a32_0x2f0791['gray']('\x20\x20─'[_0x9a36d7(0x20e)](0x1e))),console[_0x9a36d7(0x226)]('\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x1683a5['state']===_0x9a36d7(0x24b)?a32_0x2f0791[_0x9a36d7(0x207)](_0x9a36d7(0x1f3)):a32_0x2f0791[_0x9a36d7(0x24e)]('✗\x20'+_0x1683a5[_0x9a36d7(0x233)]))),console[_0x9a36d7(0x226)](_0x9a36d7(0x23d)+_0x1683a5[_0x9a36d7(0x25e)]),console['log']('\x20\x20Skill\x20Version:\x20\x20\x20'+(_0x1683a5[_0x9a36d7(0x249)]||a32_0x2f0791[_0x9a36d7(0x1f2)]('(missing)'))),console[_0x9a36d7(0x226)](_0x9a36d7(0x1e9)+(_0x1683a5['installedPath']||a32_0x2f0791['gray'](_0x9a36d7(0x212))));_0x1683a5[_0x9a36d7(0x233)]!==_0x9a36d7(0x24b)&&console[_0x9a36d7(0x226)](_0x9a36d7(0x24d)+_0x1683a5[_0x9a36d7(0x20a)]);_0x1683a5[_0x9a36d7(0x21a)]&&console['log']('\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1683a5['reason']);console[_0x9a36d7(0x226)](),console[_0x9a36d7(0x226)](a32_0x2f0791[_0x9a36d7(0x1fd)](_0x9a36d7(0x22f))),console[_0x9a36d7(0x226)](a32_0x2f0791[_0x9a36d7(0x1f2)]('\x20\x20─'['repeat'](0x1e)));const _0x556577=getGlobalConfigPath(),_0x176100=getProjectConfigPath();console[_0x9a36d7(0x226)]('\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x556577||a32_0x2f0791[_0x9a36d7(0x1f2)](_0x9a36d7(0x212)))),console['log'](_0x9a36d7(0x257)+(_0x176100||a32_0x2f0791[_0x9a36d7(0x1f2)](_0x9a36d7(0x212)))),console[_0x9a36d7(0x226)](),console[_0x9a36d7(0x226)](a32_0x2f0791['bold'](_0x9a36d7(0x23f))),console[_0x9a36d7(0x226)](a32_0x2f0791['gray'](_0x9a36d7(0x1ea)[_0x9a36d7(0x20e)](0x1e)));const _0x418551=(_0x53a02c,_0x2f6566)=>{const _0x5ee0f3=_0x9a36d7;if(!_0x2f6566){console['log']('\x20\x20'+_0x53a02c[_0x5ee0f3(0x1e2)](0x11)+'\x20'+a32_0x2f0791[_0x5ee0f3(0x1f2)](_0x5ee0f3(0x1fa)));return;}const _0xa041a0=inspectCliConfigJsonFile(_0x2f6566);if(_0xa041a0['status']==='ok')console['log']('\x20\x20'+_0x53a02c[_0x5ee0f3(0x1e2)](0x11)+'\x20'+a32_0x2f0791['green'](_0x5ee0f3(0x20b)));else{if(_0xa041a0[_0x5ee0f3(0x253)]==='empty')console['log']('\x20\x20'+_0x53a02c[_0x5ee0f3(0x1e2)](0x11)+'\x20'+a32_0x2f0791[_0x5ee0f3(0x245)]('⚠\x20Empty\x20(treated\x20as\x20{})'));else _0xa041a0['status']===_0x5ee0f3(0x236)?console['log']('\x20\x20'+_0x53a02c['padEnd'](0x11)+'\x20'+a32_0x2f0791[_0x5ee0f3(0x1f2)](_0x5ee0f3(0x1f5))):(console[_0x5ee0f3(0x226)]('\x20\x20'+_0x53a02c[_0x5ee0f3(0x1e2)](0x11)+'\x20'+a32_0x2f0791[_0x5ee0f3(0x24e)](_0x5ee0f3(0x1e4))),console[_0x5ee0f3(0x226)]('\x20\x20'+''['padEnd'](0x11)+'\x20'+a32_0x2f0791[_0x5ee0f3(0x24e)](_0xa041a0[_0x5ee0f3(0x1f6)])));}};_0x418551(_0x9a36d7(0x235),_0x556577),_0x418551('Project',_0x176100);const _0x32017f=loadRawConfigLayers(),_0x17881d=[Object[_0x9a36d7(0x25c)][_0x9a36d7(0x234)][_0x9a36d7(0x1fc)](_0x32017f[_0x9a36d7(0x255)],_0x9a36d7(0x1fb))?_0x9a36d7(0x1f8):null,Object[_0x9a36d7(0x25c)]['hasOwnProperty'][_0x9a36d7(0x1fc)](_0x32017f[_0x9a36d7(0x1f7)],'inherit')?_0x9a36d7(0x221):null][_0x9a36d7(0x227)](Boolean);_0x17881d[_0x9a36d7(0x232)]>0x0&&(console['log'](_0x9a36d7(0x1de)+a32_0x2f0791['yellow'](_0x9a36d7(0x21f)+_0x17881d[_0x9a36d7(0x1ee)](_0x9a36d7(0x1df))+_0x9a36d7(0x22a))),_0x17881d[_0x9a36d7(0x1e8)]('project')&&console[_0x9a36d7(0x226)]('\x20\x20Repair\x20project:\x20\x20\x20'+CLI_BIN_NAME+_0x9a36d7(0x242)),_0x17881d['includes'](_0x9a36d7(0x1f8))&&console[_0x9a36d7(0x226)](_0x9a36d7(0x243)+CLI_BIN_NAME+'\x20config\x20delete\x20inherit\x20--global'));_0x364afb&&(console[_0x9a36d7(0x226)](),console[_0x9a36d7(0x226)](a32_0x2f0791[_0x9a36d7(0x1fd)](_0x9a36d7(0x229))),console[_0x9a36d7(0x226)](a32_0x2f0791[_0x9a36d7(0x1f2)]('\x20\x20─'[_0x9a36d7(0x20e)](0x1e))),console[_0x9a36d7(0x226)](_0x9a36d7(0x1e7)+a32_0x2f0791['red'](_0x9a36d7(0x1f0))),console[_0x9a36d7(0x226)](_0x9a36d7(0x216)+_0x364afb['message']),Object['prototype'][_0x9a36d7(0x234)][_0x9a36d7(0x1fc)](_0x32017f[_0x9a36d7(0x1f7)],_0x9a36d7(0x1e6))&&console['log'](_0x9a36d7(0x251)+CLI_BIN_NAME+_0x9a36d7(0x217)),Object[_0x9a36d7(0x25c)]['hasOwnProperty'][_0x9a36d7(0x1fc)](_0x32017f[_0x9a36d7(0x255)],_0x9a36d7(0x1e6))&&console[_0x9a36d7(0x226)](_0x9a36d7(0x205)+CLI_BIN_NAME+_0x9a36d7(0x224)));_0x55f857&&(console[_0x9a36d7(0x226)](),console[_0x9a36d7(0x226)](a32_0x2f0791[_0x9a36d7(0x1fd)](_0x9a36d7(0x1e5))),console[_0x9a36d7(0x226)](a32_0x2f0791[_0x9a36d7(0x1f2)](_0x9a36d7(0x1ea)[_0x9a36d7(0x20e)](0x1e))),console[_0x9a36d7(0x226)](_0x9a36d7(0x1e7)+a32_0x2f0791['red'](_0x9a36d7(0x1f0))),console[_0x9a36d7(0x226)](_0x9a36d7(0x216)+_0x55f857[_0x9a36d7(0x1f6)]),Object[_0x9a36d7(0x25c)][_0x9a36d7(0x234)][_0x9a36d7(0x1fc)](_0x32017f[_0x9a36d7(0x1f7)],_0x9a36d7(0x24a))&&console[_0x9a36d7(0x226)](_0x9a36d7(0x251)+CLI_BIN_NAME+_0x9a36d7(0x211)),Object[_0x9a36d7(0x25c)]['hasOwnProperty']['call'](_0x32017f[_0x9a36d7(0x255)],_0x9a36d7(0x24a))&&console[_0x9a36d7(0x226)](_0x9a36d7(0x205)+CLI_BIN_NAME+_0x9a36d7(0x213)));console['log'](),console[_0x9a36d7(0x226)](a32_0x2f0791[_0x9a36d7(0x1fd)](_0x9a36d7(0x239))),console['log'](a32_0x2f0791[_0x9a36d7(0x1f2)]('\x20\x20─'[_0x9a36d7(0x20e)](0x1e))),console[_0x9a36d7(0x226)](_0x9a36d7(0x258)+(_0xc5f2b7[_0x9a36d7(0x1fe)]||a32_0x2f0791[_0x9a36d7(0x24e)]('(not\x20set)'))),console[_0x9a36d7(0x226)]('\x20\x20region:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x33f24d??a32_0x2f0791[_0x9a36d7(0x24e)](_0x9a36d7(0x21c)))),console['log'](_0x9a36d7(0x202)+_0xc5f2b7[_0x9a36d7(0x1ff)]),console[_0x9a36d7(0x226)]('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0xc5f2b7[_0x9a36d7(0x23e)]||a32_0x2f0791[_0x9a36d7(0x1f2)](_0x9a36d7(0x22e)))),console[_0x9a36d7(0x226)](_0x9a36d7(0x23c)+(_0xc5f2b7[_0x9a36d7(0x1f1)]||a32_0x2f0791[_0x9a36d7(0x1f2)](_0x9a36d7(0x22e)))),console[_0x9a36d7(0x226)](_0x9a36d7(0x214)+(_0xc5f2b7[_0x9a36d7(0x215)]||a32_0x2f0791[_0x9a36d7(0x1f2)](_0x9a36d7(0x22c)+DEFAULT_CONFIG_VALUES[_0x9a36d7(0x215)]+')'))),console['log']('\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0xc5f2b7[_0x9a36d7(0x223)]??a32_0x2f0791[_0x9a36d7(0x1f2)](_0x9a36d7(0x1dd)))),console[_0x9a36d7(0x226)](_0x9a36d7(0x21e)+_0xc5f2b7[_0x9a36d7(0x24c)]),console[_0x9a36d7(0x226)]('\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0xc5f2b7[_0x9a36d7(0x201)]),console['log'](_0x9a36d7(0x247)+AUTH_MODE[_0x9a36d7(0x20d)]),console['log'](_0x9a36d7(0x204)+(_0xc5f2b7[_0x9a36d7(0x1eb)]?a32_0x2f0791[_0x9a36d7(0x207)](_0x9a36d7(0x218)+_0xc5f2b7[_0x9a36d7(0x1eb)]['length']+')'):a32_0x2f0791[_0x9a36d7(0x1f2)](_0x9a36d7(0x22e)))),console[_0x9a36d7(0x226)](),console[_0x9a36d7(0x226)](a32_0x2f0791['bold'](_0x9a36d7(0x20f))),console[_0x9a36d7(0x226)](a32_0x2f0791[_0x9a36d7(0x1f2)](_0x9a36d7(0x1ea)['repeat'](0x1e)));_0x364afb||_0x55f857?console[_0x9a36d7(0x226)](_0x9a36d7(0x1e7)+a32_0x2f0791['red'](_0x9a36d7(0x1ef))):(console[_0x9a36d7(0x226)](_0x9a36d7(0x240)+getApiDomain()),console[_0x9a36d7(0x226)](_0x9a36d7(0x1f9)+getUserDomain()),console[_0x9a36d7(0x226)]('\x20\x20runtimeDomain:\x20\x20\x20'+getRuntimeDomain()),console[_0x9a36d7(0x226)](_0x9a36d7(0x1ec)+getSkillDomain()),console[_0x9a36d7(0x226)](_0x9a36d7(0x244)+(getKbServiceDomain()??'not\x20configured')));console[_0x9a36d7(0x226)](),console[_0x9a36d7(0x226)](a32_0x2f0791['bold'](_0x9a36d7(0x259))),console['log'](a32_0x2f0791[_0x9a36d7(0x1f2)]('\x20\x20─'['repeat'](0x1e)));const _0x9d2919=inspectServiceRegistry();console[_0x9a36d7(0x226)]('\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x9d2919[_0x9a36d7(0x252)]),console['log'](_0x9a36d7(0x1e7)+formatServiceRegistryStatus(_0x9d2919)),console[_0x9a36d7(0x226)](_0x9a36d7(0x20c)+_0x9d2919['serviceCount']),console[_0x9a36d7(0x226)](_0x9a36d7(0x254)+_0x9d2919[_0x9a36d7(0x220)]);for(const _0x3e8f66 of _0x9d2919[_0x9a36d7(0x241)]){console[_0x9a36d7(0x226)]('\x20\x20'+(_0x3e8f66[_0x9a36d7(0x219)]+':')[_0x9a36d7(0x1e2)](0x11)+'\x20'+(_0x3e8f66[_0x9a36d7(0x237)]||a32_0x2f0791[_0x9a36d7(0x1f2)](_0x9a36d7(0x225)))+'\x20('+_0x3e8f66['commandCount']+_0x9a36d7(0x22d)),console[_0x9a36d7(0x226)]('\x20\x20'+''[_0x9a36d7(0x1e2)](0x11)+_0x9a36d7(0x24f)+_0x3e8f66[_0x9a36d7(0x23b)][_0x9a36d7(0x208)]);}return console[_0x9a36d7(0x226)](),console[_0x9a36d7(0x226)](a32_0x2f0791[_0x9a36d7(0x1fd)](_0x9a36d7(0x1e1))),console[_0x9a36d7(0x226)](a32_0x2f0791[_0x9a36d7(0x1f2)](_0x9a36d7(0x1ea)[_0x9a36d7(0x20e)](0x1e))),console['log']('\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a32_0x2f0791[_0x9a36d7(0x207)](AUTH_MODE[_0x9a36d7(0x20d)]+'\x20(accessKey)')),console[_0x9a36d7(0x226)](_0x9a36d7(0x25b)+a32_0x2f0791['gray']('(removed\x20—\x20cookie\x20auth\x20disabled)')),console[_0x9a36d7(0x226)](),{'ok':!![]};}function formatServiceRegistryStatus(_0x1164cd){const _0x3cbf6d=a32_0x2664;if(_0x1164cd[_0x3cbf6d(0x253)]==='ok')return a32_0x2f0791[_0x3cbf6d(0x207)](_0x3cbf6d(0x25a));if(_0x1164cd[_0x3cbf6d(0x253)]===_0x3cbf6d(0x236))return a32_0x2f0791[_0x3cbf6d(0x1f2)](_0x3cbf6d(0x212));if(_0x1164cd[_0x3cbf6d(0x253)]===_0x3cbf6d(0x231))return a32_0x2f0791['yellow'](_0x3cbf6d(0x246));return a32_0x2f0791[_0x3cbf6d(0x24e)](_0x3cbf6d(0x1f0)+(_0x1164cd[_0x3cbf6d(0x1f6)]?':\x20'+_0x1164cd[_0x3cbf6d(0x1f6)]:''));}export const doctorDefinition={'service':a32_0x3ec301(0x256),'command':'check','description':a32_0x3ec301(0x250),'risk':a32_0x3ec301(0x238),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a33_0x1704(_0x4b3de2,_0x231171){_0x4b3de2=_0x4b3de2-0xed;const _0x2d9fd8=a33_0x2d9f();let _0x1704f1=_0x2d9fd8[_0x4b3de2];return _0x1704f1;}const a33_0x15c836=a33_0x1704;(function(_0x2f8fed,_0x48c1fd){const _0x30292b=a33_0x1704,_0x4a218e=_0x2f8fed();while(!![]){try{const _0x516fec=parseInt(_0x30292b(0xff))/0x1+-parseInt(_0x30292b(0xfe))/0x2+parseInt(_0x30292b(0x109))/0x3*(parseInt(_0x30292b(0x112))/0x4)+-parseInt(_0x30292b(0x10c))/0x5*(parseInt(_0x30292b(0x113))/0x6)+parseInt(_0x30292b(0xf0))/0x7*(-parseInt(_0x30292b(0x110))/0x8)+-parseInt(_0x30292b(0x103))/0x9*(-parseInt(_0x30292b(0xf6))/0xa)+-parseInt(_0x30292b(0x10e))/0xb;if(_0x516fec===_0x48c1fd)break;else _0x4a218e['push'](_0x4a218e['shift']());}catch(_0x2d443a){_0x4a218e['push'](_0x4a218e['shift']());}}}(a33_0x2d9f,0x34cf9));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_0x15c836(0xf8),'type':a33_0x15c836(0xf3),'required':!![],'description':'Path\x20to\x20the\x20local\x20file\x20to\x20upload'},FILEPATH_FLAG={'name':'filepath','type':a33_0x15c836(0xf3),'required':!![],'description':a33_0x15c836(0xfc)},DOWNLOAD_FLAG={'name':a33_0x15c836(0x10a),'type':a33_0x15c836(0xf4),'description':a33_0x15c836(0xef)},LONG_TERM_FLAG={'name':a33_0x15c836(0x106),'type':a33_0x15c836(0xf4),'description':a33_0x15c836(0x10d)};function requireFilePath(_0x4c06ee){const _0x3e3410=a33_0x15c836,_0x368128=_0x4c06ee[_0x3e3410(0xfb)]();if(!_0x368128)throw CliErrors[_0x3e3410(0x10f)](_0x3e3410(0xfa));return _0x368128;}function a33_0x2d9f(){const _0x1212c2=['12RoqMak','str','query-url','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','220759oAeELM','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','Preview:\x20upload\x20','string','boolean','Uploaded\x20file:\x20','37670gJSQje','description','file','read','filePath\x20is\x20required.','trim','Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','File','522520PlqUSY','400084SfJWTU','path','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','693WJfLuu','upload','/client/uploadFile','long-term','bool','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','219237bhdXow','download','body','823505HmrpNO','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','2387286dqRxZU','validation','8ZatpUZ','appCode','20hvQKvL'];a33_0x2d9f=function(){return _0x1212c2;};return a33_0x2d9f();}const fileUpload={'service':a33_0x15c836(0xf8),'command':a33_0x15c836(0x104),'description':a33_0x15c836(0x102),'risk':'read','flags':[FILE_FLAG],async 'dryRun'(_0x5953d3){const _0x23839a=a33_0x15c836,_0x1899c3=requireRuntimeUploadFile(_0x5953d3[_0x23839a(0xed)]('file'),_0x23839a(0xfd));return dryRun('POST',_0x23839a(0x105))[_0x23839a(0x10b)]({'appCode':_0x5953d3[_0x23839a(0x111)],'multipart':{'file':_0x1899c3}})[_0x23839a(0xf7)](_0x23839a(0xf2)+_0x1899c3[_0x23839a(0x100)]+'\x20to\x20runtime\x20app\x20'+_0x5953d3[_0x23839a(0x111)])['build']();},async 'execute'(_0x17e9ba){const _0x240460=a33_0x15c836,_0x121e72=requireRuntimeUploadFile(_0x17e9ba[_0x240460(0xed)](_0x240460(0xf8)),_0x240460(0xfd)),_0x32b4be=await uploadRuntimeFile(_0x17e9ba[_0x240460(0x111)],_0x121e72[_0x240460(0x100)]);return{'ok':!![],'data':_0x32b4be,'message':_0x32b4be['filePath']?_0x240460(0xf5)+_0x32b4be['filePath']+_0x240460(0x108):_0x240460(0x101)};}},fileQueryUrl={'service':a33_0x15c836(0xf8),'command':a33_0x15c836(0xee),'description':a33_0x15c836(0xf1),'risk':a33_0x15c836(0xf9),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x4d7ac4){const _0x5d0aa0=a33_0x15c836,_0x5586f2=requireFilePath(_0x4d7ac4[_0x5d0aa0(0xed)]('filepath')),_0xcdf627=await queryRuntimeFileUrl(_0x5586f2,{'download':_0x4d7ac4[_0x5d0aa0(0x107)](_0x5d0aa0(0x10a)),'longTerm':_0x4d7ac4[_0x5d0aa0(0x107)](_0x5d0aa0(0x106))});return{'ok':!![],'data':_0xcdf627};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
|
package/lib/commands/init.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a34_0x21e360=a34_0x27d8;(function(_0x3205a3,_0x28f0cc){const _0x3fe4f6=a34_0x27d8,_0x246fcd=_0x3205a3();while(!![]){try{const _0xe79c6b=-parseInt(_0x3fe4f6(0x170))/0x1+-parseInt(_0x3fe4f6(0x186))/0x2*(-parseInt(_0x3fe4f6(0x168))/0x3)+parseInt(_0x3fe4f6(0x163))/0x4*(-parseInt(_0x3fe4f6(0x173))/0x5)+parseInt(_0x3fe4f6(0x188))/0x6+-parseInt(_0x3fe4f6(0x171))/0x7*(parseInt(_0x3fe4f6(0x177))/0x8)+parseInt(_0x3fe4f6(0x17f))/0x9*(parseInt(_0x3fe4f6(0x17e))/0xa)+parseInt(_0x3fe4f6(0x169))/0xb*(parseInt(_0x3fe4f6(0x176))/0xc);if(_0xe79c6b===_0x28f0cc)break;else _0x246fcd['push'](_0x246fcd['shift']());}catch(_0x35ffed){_0x246fcd['push'](_0x246fcd['shift']());}}}(a34_0xb93c,0x45b59));import{existsSync,readFileSync}from'node:fs';import{resolve,isAbsolute}from'node:path';import{CliErrors}from'../errors.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';function a34_0x27d8(_0x4bf73f,_0x55570b){_0x4bf73f=_0x4bf73f-0x15f;const _0xb93cd9=a34_0xb93c();let _0x27d85c=_0xb93cd9[_0x4bf73f];return _0x27d85c;}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':a34_0x21e360(0x181),'description':a34_0x21e360(0x184),'required':!![]},{'name':a34_0x21e360(0x17a),'type':a34_0x21e360(0x181),'description':a34_0x21e360(0x16c)},{'name':'env','type':a34_0x21e360(0x181),'description':'Override\x20imported\x20default\x20env','enum':[...RUNTIME_ENV_VALUES]},{'name':a34_0x21e360(0x182),'type':a34_0x21e360(0x17d),'description':a34_0x21e360(0x183)+PRODUCT_CONFIG[a34_0x21e360(0x17b)]+')\x20instead\x20of\x20project','default':![]},{'name':a34_0x21e360(0x16a),'type':a34_0x21e360(0x17d),'description':a34_0x21e360(0x16e),'default':![]}];export async function runAppImport(_0x401c45){const _0x3cf87c=a34_0x21e360,_0x27e50b=_0x401c45[_0x3cf87c(0x182)]?'global':'project',_0x17dacf=resolveWriteConfigPath(_0x27e50b);await runFromImport(_0x401c45,_0x17dacf);}async function runFromImport(_0x291abb,_0x31ae56){const _0x205ff2=a34_0x21e360,_0x39e026=resolveFilePath(_0x291abb['file']);if(!existsSync(_0x39e026))throw CliErrors[_0x205ff2(0x179)](_0x205ff2(0x167)+_0x39e026);const _0x58e12b=readSourceFile(_0x39e026),_0x5aa0e7=convertToRuntimeConfig(_0x58e12b);_0x291abb[_0x205ff2(0x17a)]&&(_0x5aa0e7[_0x205ff2(0x17a)]=String(_0x291abb[_0x205ff2(0x17a)]));_0x291abb['env']&&(_0x5aa0e7[_0x205ff2(0x185)]=resolveImportEnv(_0x291abb));if(!_0x5aa0e7[_0x205ff2(0x17a)])throw CliErrors[_0x205ff2(0x179)](_0x205ff2(0x189),_0x205ff2(0x165));await writeImportConfig(_0x31ae56,_0x5aa0e7,_0x291abb),console['log']('Imported\x20from\x20'+_0x39e026),console[_0x205ff2(0x17c)](_0x205ff2(0x160)+_0x31ae56),console[_0x205ff2(0x17c)](_0x205ff2(0x164)+_0x5aa0e7[_0x205ff2(0x17a)]);if(_0x5aa0e7[_0x205ff2(0x180)])console[_0x205ff2(0x17c)](_0x205ff2(0x178)+_0x5aa0e7['defaultApp']);}function convertToRuntimeConfig(_0x436a34){const _0x3335ec=a34_0x21e360;if(_0x436a34[_0x3335ec(0x172)]&&typeof _0x436a34[_0x3335ec(0x172)]==='object')throw CliErrors[_0x3335ec(0x179)](_0x3335ec(0x175),_0x3335ec(0x16b));const _0x27f91e={};for(const _0x397f1c of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x436a34[_0x397f1c]!==undefined&&(_0x27f91e[_0x397f1c]=_0x436a34[_0x397f1c]);}return!_0x27f91e['riskLevel']&&(_0x27f91e[_0x3335ec(0x174)]=DEFAULT_CONFIG_VALUES[_0x3335ec(0x174)]),_0x27f91e;}async function writeImportConfig(_0x88615e,_0x305ad3,_0x3e2b9c){const _0x57d5b2=a34_0x21e360;let _0x4d1fbd={};existsSync(_0x88615e)&&!_0x3e2b9c[_0x57d5b2(0x16a)]&&(_0x4d1fbd=readConfigFile(_0x88615e));for(const [_0x4e822b,_0x542e3f]of Object['entries'](_0x305ad3)){_0x542e3f!==undefined&&(_0x4d1fbd[_0x4e822b]=_0x542e3f);}if(_0x4d1fbd[_0x57d5b2(0x166)])delete _0x4d1fbd[_0x57d5b2(0x166)];writeConfigFile(_0x88615e,_0x4d1fbd);}function a34_0xb93c(){const _0x9c1147=['Skip\x20confirmation\x20when\x20overwriting','parse','479506QHjBmt','14xkGaNq','apps','115KFqrRm','riskLevel','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','24GOkHrz','397976HfMHVm','\x20\x20default:\x20','validation','appcode','newConfigFileName','log','boolean','30OZHrAM','798534hAdZZq','defaultApp','string','global','Write\x20to\x20global\x20(~/','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','env','326460uBAnhk','join','2210826tGuCYt','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','utf8','\x20\x20config:\x20\x20','cwd','Invalid\x20env\x20\x22','51448mDjmRJ','\x20\x20appcode:\x20','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`.','app','Source\x20file\x20not\x20found:\x20','3pEjmxZ','1993618hSOpWT','yes','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','Override\x20imported\x20default\x20appcode','includes'];a34_0xb93c=function(){return _0x9c1147;};return a34_0xb93c();}function resolveFilePath(_0x5a692e){const _0x4631cf=a34_0x21e360;return isAbsolute(_0x5a692e)?_0x5a692e:resolve(process[_0x4631cf(0x161)](),_0x5a692e);}function readSourceFile(_0x4d8b83){const _0x527261=a34_0x21e360;try{const _0x5e3373=readFileSync(_0x4d8b83,{'encoding':_0x527261(0x15f)});return JSON[_0x527261(0x16f)](_0x5e3373);}catch(_0x4c53f9){throw CliErrors[_0x527261(0x179)]('Failed\x20to\x20parse\x20source\x20file:\x20'+_0x4c53f9['message']);}}function resolveImportEnv(_0x1cb679){const _0x841cc3=a34_0x21e360,_0x162c88=_0x1cb679[_0x841cc3(0x185)];if(_0x162c88===undefined||_0x162c88==='')return DEFAULT_CONFIG_VALUES[_0x841cc3(0x185)];if(!RUNTIME_ENV_VALUES[_0x841cc3(0x16d)](_0x162c88))throw CliErrors['validation'](_0x841cc3(0x162)+_0x162c88+'\x22.\x20Allowed:\x20'+RUNTIME_ENV_VALUES[_0x841cc3(0x187)](',\x20'));return _0x162c88;}
|
package/lib/commands/kb/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a34_0x56b2db=a34_0x3838;(function(_0x447457,_0x2973b8){const _0x1681af=a34_0x3838,_0x4ae92a=_0x447457();while(!![]){try{const _0x53ce5c=-parseInt(_0x1681af(0x1da))/0x1*(parseInt(_0x1681af(0x1b2))/0x2)+parseInt(_0x1681af(0x1c9))/0x3*(parseInt(_0x1681af(0x1ba))/0x4)+parseInt(_0x1681af(0x1f2))/0x5+-parseInt(_0x1681af(0x1f4))/0x6+-parseInt(_0x1681af(0x1f9))/0x7*(-parseInt(_0x1681af(0x1d8))/0x8)+-parseInt(_0x1681af(0x1d9))/0x9+-parseInt(_0x1681af(0x1b4))/0xa*(parseInt(_0x1681af(0x1f1))/0xb);if(_0x53ce5c===_0x2973b8)break;else _0x4ae92a['push'](_0x4ae92a['shift']());}catch(_0x1951e7){_0x4ae92a['push'](_0x4ae92a['shift']());}}}(a34_0x3c82,0xd93ee));function a34_0x3c82(){const _0x1f72d1=['version','55ehZUiM','8224415UvHDEP','topk','1027962aaIHuU','Personal\x20knowledge-base\x20entry\x20ID','write','build','isFile','7lsceFJ','appCode','Personal\x20knowledge-base\x20entry\x20title','25370vhMEab','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','2782810OtWKeV','number','ragErrorMessage','map','kb-service-url','ragStatus','16UQECGG','updateTime','--topk\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.','accessKey','POST','flag','utf8','string','length','Search\x20visible\x20public,\x20company,\x20and\x20personal\x20knowledge','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','create','file','File\x20is\x20not\x20a\x20regular\x20file:\x20','1293225UvVSNj','validation','Saves\x20local\x20file\x20content\x20as\x20a\x20personal\x20knowledge-base\x20entry\x20and\x20starts\x20retrieval\x20sync.','Configure\x20kbServiceDomain\x20in\x20the\x20connection\x20settings,\x20or\x20pass\x20`--kb-service-url\x20<https-origin>`\x20for\x20this\x20request.','query','scope','/update','str','/client/knowledge-base/personal/create','verbose','Created\x20KB\x20entry\x20','signal','isSafeInteger','Optional\x20trusted\x20KB\x20Service\x20HTTPS\x20origin\x20for\x20this\x20request\x20only','read','1993592QnLgXH','7866513hHgAlQ','23dYrfVn','createTime','num','list','Override\x20the\x20existing\x20entry\x20title','update','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','trim','search','Replaces\x20the\x20personal\x20knowledge-base\x20entry\x20body\x20with\x20local\x20file\x20content\x20and\x20triggers\x20retrieval\x20sync.','File\x20path\x20is\x20required.','description','title','/client/knowledge-base/personal/','body','detail','Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20','userId','content','File\x20not\x20found:\x20','KB\x20Service\x20is\x20not\x20configured\x20for\x20knowledge\x20search.'];a34_0x3c82=function(){return _0x1f72d1;};return a34_0x3c82();}import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalKnowledgeBaseItem,getPersonalKnowledgeBaseItem,listPersonalKnowledgeBaseItems,updatePersonalKnowledgeBaseItem}from'../../core/api-client.js';import{searchDirectKnowledge,normalizeKbServiceOrigin}from'../../core/kb-search-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{getKbServiceDomain}from'../../constant/domain.js';import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':a34_0x56b2db(0x1e7),'type':a34_0x56b2db(0x1c1),'required':!![],'description':a34_0x56b2db(0x1b1)},FILE_FLAG={'name':a34_0x56b2db(0x1c7),'type':'string','required':!![],'description':a34_0x56b2db(0x1e0)},QUERY_FLAG={'name':a34_0x56b2db(0x1cd),'type':a34_0x56b2db(0x1c1),'required':!![],'description':'Search\x20query\x20for\x20visible\x20public,\x20company,\x20and\x20personal\x20knowledge'},TOPK_FLAG={'name':'topk','type':a34_0x56b2db(0x1b5),'description':a34_0x56b2db(0x1b3)};function readKnowledgeFile(_0x1f0e7b){const _0x356685=a34_0x56b2db;if(!_0x1f0e7b)throw CliErrors[_0x356685(0x1ca)](_0x356685(0x1e5));if(!existsSync(_0x1f0e7b))throw CliErrors['validation'](_0x356685(0x1ee)+_0x1f0e7b);if(!statSync(_0x1f0e7b)[_0x356685(0x1f8)]())throw CliErrors['validation'](_0x356685(0x1c8)+_0x1f0e7b);return readFileSync(_0x1f0e7b,_0x356685(0x1c0));}function summarizePersonalItem(_0xd2991f){const _0x56e8fb=a34_0x56b2db;return{'id':_0xd2991f['id'],'title':_0xd2991f[_0x56e8fb(0x1e7)],'version':_0xd2991f[_0x56e8fb(0x1f0)],'ragStatus':_0xd2991f[_0x56e8fb(0x1b9)],'ragErrorMessage':_0xd2991f['ragErrorMessage'],'updateTime':_0xd2991f[_0x56e8fb(0x1bb)]};}function a34_0x3838(_0x7f21ee,_0x46f0f4){_0x7f21ee=_0x7f21ee-0x1b1;const _0x3c820d=a34_0x3c82();let _0x383862=_0x3c820d[_0x7f21ee];return _0x383862;}function detailPersonalItem(_0x43bc41){const _0x115e82=a34_0x56b2db;return{'id':_0x43bc41['id'],'appCode':_0x43bc41['appCode'],'scope':_0x43bc41[_0x115e82(0x1ce)],'userId':_0x43bc41[_0x115e82(0x1ec)],'title':_0x43bc41['title'],'content':_0x43bc41[_0x115e82(0x1ed)]??'','version':_0x43bc41[_0x115e82(0x1f0)],'ragStatus':_0x43bc41['ragStatus'],'ragErrorMessage':_0x43bc41[_0x115e82(0x1b6)],'createTime':_0x43bc41[_0x115e82(0x1db)],'updateTime':_0x43bc41[_0x115e82(0x1bb)]};}function readTopK(_0x978fac){const _0x27f5b7=a34_0x56b2db,_0x2aa781=_0x978fac[_0x27f5b7(0x1bf)](_0x27f5b7(0x1f3));if(_0x2aa781===undefined||_0x2aa781===null||_0x2aa781==='')return undefined;const _0x3a28c0=_0x978fac['num'](_0x27f5b7(0x1f3));if(!Number[_0x27f5b7(0x1d5)](_0x3a28c0)||_0x3a28c0<0x1||_0x3a28c0>0x32)throw CliErrors['validation'](_0x27f5b7(0x1bc));return _0x3a28c0;}const kbList={'service':'kb','command':a34_0x56b2db(0x1dd),'description':a34_0x56b2db(0x1e1),'risk':a34_0x56b2db(0x1d7),'flags':[VERBOSE_FLAG],async 'execute'(_0x1220fa){const _0x1f5fbf=a34_0x56b2db,_0x4546f9=await listPersonalKnowledgeBaseItems(_0x1220fa[_0x1f5fbf(0x1fa)]);if(_0x1220fa['bool'](_0x1f5fbf(0x1d2)))return{'ok':!![],'data':{'total':_0x4546f9[_0x1f5fbf(0x1c2)],'items':_0x4546f9}};return{'ok':!![],'data':{'total':_0x4546f9[_0x1f5fbf(0x1c2)],'items':_0x4546f9[_0x1f5fbf(0x1b7)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a34_0x56b2db(0x1ea),'description':'Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','risk':'read','flags':[{...ID_FLAG,'description':a34_0x56b2db(0x1f5)}],async 'execute'(_0x169743){const _0xb4ce34=a34_0x56b2db,_0x2e7428=await getPersonalKnowledgeBaseItem(_0x169743[_0xb4ce34(0x1dc)]('id'),_0x169743[_0xb4ce34(0x1fa)]);return{'ok':!![],'data':detailPersonalItem(_0x2e7428)};}},kbCreate={'service':'kb','command':a34_0x56b2db(0x1c6),'description':'Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','risk':a34_0x56b2db(0x1f6),'confirmationDescription':a34_0x56b2db(0x1cb),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x1b63c9){const _0x4eafe8=a34_0x56b2db,_0x426db0=_0x1b63c9[_0x4eafe8(0x1d0)](_0x4eafe8(0x1e7)),_0x32c490=readKnowledgeFile(_0x1b63c9['str'](_0x4eafe8(0x1c7))),_0x4a1b36=await createPersonalKnowledgeBaseItem(_0x1b63c9[_0x4eafe8(0x1fa)],{'title':_0x426db0,'content':_0x32c490});return{'ok':!![],'data':summarizePersonalItem(_0x4a1b36),'message':_0x4eafe8(0x1d3)+_0x4a1b36['id']+'\x20('+_0x4a1b36['title']+')'};},async 'dryRun'(_0x3eb37d){const _0x2ed1a1=a34_0x56b2db,_0x461e4e=_0x3eb37d['str'](_0x2ed1a1(0x1e7)),_0x4746db=readKnowledgeFile(_0x3eb37d[_0x2ed1a1(0x1d0)](_0x2ed1a1(0x1c7)));return dryRun(_0x2ed1a1(0x1be),_0x2ed1a1(0x1d1))[_0x2ed1a1(0x1e9)]({'appCode':_0x3eb37d['appCode'],'title':_0x461e4e,'content':_0x4746db})[_0x2ed1a1(0x1e6)](_0x2ed1a1(0x1c4)+_0x461e4e+'\x22')[_0x2ed1a1(0x1f7)]();}},kbUpdate={'service':'kb','command':a34_0x56b2db(0x1df),'description':a34_0x56b2db(0x1c5),'risk':'write','confirmationDescription':a34_0x56b2db(0x1e4),'flags':[{...ID_FLAG,'description':a34_0x56b2db(0x1f5)},{...TITLE_FLAG,'required':![],'description':a34_0x56b2db(0x1de)},FILE_FLAG],async 'execute'(_0x107937){const _0x4ac82c=a34_0x56b2db,_0x570d2b=_0x107937[_0x4ac82c(0x1dc)]('id'),_0x504f16=readKnowledgeFile(_0x107937['str'](_0x4ac82c(0x1c7))),_0x1077dc=_0x107937[_0x4ac82c(0x1d0)](_0x4ac82c(0x1e7))||(await getPersonalKnowledgeBaseItem(_0x570d2b,_0x107937[_0x4ac82c(0x1fa)]))['title'],_0x493255=await updatePersonalKnowledgeBaseItem(_0x570d2b,_0x107937[_0x4ac82c(0x1fa)],{'title':_0x1077dc,'content':_0x504f16});return{'ok':!![],'data':summarizePersonalItem(_0x493255),'message':'Updated\x20KB\x20entry\x20'+_0x493255['id']+'\x20('+_0x493255['title']+')'};},async 'dryRun'(_0xc35c27){const _0x312129=a34_0x56b2db,_0x1c0d3c=_0xc35c27[_0x312129(0x1dc)]('id'),_0x34964e=readKnowledgeFile(_0xc35c27['str'](_0x312129(0x1c7))),_0x2af662=_0xc35c27[_0x312129(0x1d0)](_0x312129(0x1e7))||(await getPersonalKnowledgeBaseItem(_0x1c0d3c,_0xc35c27[_0x312129(0x1fa)]))[_0x312129(0x1e7)];return dryRun(_0x312129(0x1be),_0x312129(0x1e8)+_0x1c0d3c+_0x312129(0x1cf))[_0x312129(0x1e9)]({'appCode':_0xc35c27[_0x312129(0x1fa)],'title':_0x2af662,'content':_0x34964e})[_0x312129(0x1e6)](_0x312129(0x1eb)+_0x1c0d3c)[_0x312129(0x1f7)]();}};function readSearchServiceUrl(_0x34c003){const _0x32c115=a34_0x56b2db;if(_0x34c003['flag'](_0x32c115(0x1b8))!==undefined)return normalizeKbServiceOrigin(_0x34c003['str'](_0x32c115(0x1b8)));const _0x3593be=getKbServiceDomain();if(!_0x3593be)throw CliErrors[_0x32c115(0x1ca)](_0x32c115(0x1ef),_0x32c115(0x1cc));return normalizeKbServiceOrigin(_0x3593be);}const kbSearch={'service':'kb','command':a34_0x56b2db(0x1e3),'description':a34_0x56b2db(0x1c3),'risk':a34_0x56b2db(0x1d7),'flags':[QUERY_FLAG,TOPK_FLAG,{'name':'kb-service-url','type':'string','required':![],'description':a34_0x56b2db(0x1d6)}],async 'validate'(_0xc79d88){const _0x2b0f80=a34_0x56b2db;if(!_0xc79d88[_0x2b0f80(0x1d0)](_0x2b0f80(0x1cd))[_0x2b0f80(0x1e2)]())throw CliErrors[_0x2b0f80(0x1ca)]('Search\x20query\x20is\x20required.');readTopK(_0xc79d88),readSearchServiceUrl(_0xc79d88);},async 'execute'(_0x2fac14){const _0x57d817=a34_0x56b2db,_0x4a3ab0=_0x2fac14['str'](_0x57d817(0x1cd))['trim'](),_0x36b39d=readTopK(_0x2fac14),_0x215f8f=readSearchServiceUrl(_0x2fac14),_0x22aefd={'appCode':_0x2fac14['appCode'],'accessKey':_0x2fac14[_0x57d817(0x1bd)]??'','query':_0x4a3ab0,..._0x36b39d!==undefined?{'topK':_0x36b39d}:{},'signal':_0x2fac14[_0x57d817(0x1d4)]},_0x61a451=await searchDirectKnowledge({..._0x22aefd,'serviceUrl':_0x215f8f});return{'ok':!![],'data':_0x61a451};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
|
|
1
|
+
const a35_0x29ff8c=a35_0x1754;(function(_0x3a3365,_0x324933){const _0x27dee9=a35_0x1754,_0x59ab15=_0x3a3365();while(!![]){try{const _0x40afd6=parseInt(_0x27dee9(0x138))/0x1*(-parseInt(_0x27dee9(0x136))/0x2)+parseInt(_0x27dee9(0x14f))/0x3+-parseInt(_0x27dee9(0x14e))/0x4+parseInt(_0x27dee9(0x126))/0x5+parseInt(_0x27dee9(0x151))/0x6+-parseInt(_0x27dee9(0x129))/0x7*(parseInt(_0x27dee9(0x119))/0x8)+-parseInt(_0x27dee9(0x11b))/0x9;if(_0x40afd6===_0x324933)break;else _0x59ab15['push'](_0x59ab15['shift']());}catch(_0x16d2b7){_0x59ab15['push'](_0x59ab15['shift']());}}}(a35_0xbd0e,0xc474d));import{existsSync,readFileSync,statSync}from'node:fs';function a35_0xbd0e(){const _0x1ae0c2=['update','File\x20not\x20found:\x20','userId','388616ObSFPn','Personal\x20knowledge-base\x20entry\x20title','2029644LICSfG','kb-service-url','ragErrorMessage','file','Search\x20visible\x20public,\x20company,\x20and\x20personal\x20knowledge','flag','Override\x20the\x20existing\x20entry\x20title','signal','create','Optional\x20trusted\x20KB\x20Service\x20HTTPS\x20origin\x20for\x20this\x20request\x20only','title','3351090iCGIrF','description','body','42ziDaLh','string','Created\x20KB\x20entry\x20','version','trim','KB\x20Service\x20is\x20not\x20configured\x20for\x20knowledge\x20search.','Search\x20query\x20for\x20visible\x20public,\x20company,\x20and\x20personal\x20knowledge','Configure\x20kbServiceDomain\x20in\x20the\x20connection\x20settings,\x20or\x20pass\x20`--kb-service-url\x20<https-origin>`\x20for\x20this\x20request.','query','POST','Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','search','Personal\x20knowledge-base\x20entry\x20ID','122NGICOu','num','7751pXEsoT','build','content','Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','ragStatus','File\x20path\x20is\x20required.','list','bool','read','number','map','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','utf8','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','updateTime','length','str','accessKey','Search\x20query\x20is\x20required.','appCode','topk','1193504eDJIdU','4084368VjmDWL','--topk\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.','367056XqIJLS','Replaces\x20the\x20personal\x20knowledge-base\x20entry\x20body\x20with\x20local\x20file\x20content\x20and\x20triggers\x20retrieval\x20sync.','/client/knowledge-base/personal/','write','isFile','verbose','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','validation','scope'];a35_0xbd0e=function(){return _0x1ae0c2;};return a35_0xbd0e();}import{createPersonalKnowledgeBaseItem,getPersonalKnowledgeBaseItem,listPersonalKnowledgeBaseItems,updatePersonalKnowledgeBaseItem}from'../../core/api-client.js';import{searchDirectKnowledge,normalizeKbServiceOrigin}from'../../core/kb-search-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{getKbServiceDomain}from'../../constant/domain.js';import{dryRun}from'../../framework/dryrun.js';function a35_0x1754(_0x3c2470,_0x3c3ee4){_0x3c2470=_0x3c2470-0x118;const _0xbd0eb2=a35_0xbd0e();let _0x17543f=_0xbd0eb2[_0x3c2470];return _0x17543f;}const TITLE_FLAG={'name':a35_0x29ff8c(0x125),'type':a35_0x29ff8c(0x12a),'required':!![],'description':a35_0x29ff8c(0x11a)},FILE_FLAG={'name':a35_0x29ff8c(0x11e),'type':a35_0x29ff8c(0x12a),'required':!![],'description':a35_0x29ff8c(0x144)},QUERY_FLAG={'name':a35_0x29ff8c(0x131),'type':'string','required':!![],'description':a35_0x29ff8c(0x12f)},TOPK_FLAG={'name':a35_0x29ff8c(0x14d),'type':a35_0x29ff8c(0x142),'description':'Maximum\x20number\x20of\x20search\x20hits\x20to\x20return'};function readKnowledgeFile(_0x38096f){const _0x3965db=a35_0x29ff8c;if(!_0x38096f)throw CliErrors[_0x3965db(0x158)](_0x3965db(0x13e));if(!existsSync(_0x38096f))throw CliErrors[_0x3965db(0x158)](_0x3965db(0x15b)+_0x38096f);if(!statSync(_0x38096f)[_0x3965db(0x155)]())throw CliErrors[_0x3965db(0x158)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x38096f);return readFileSync(_0x38096f,_0x3965db(0x145));}function summarizePersonalItem(_0x56364c){const _0x436838=a35_0x29ff8c;return{'id':_0x56364c['id'],'title':_0x56364c[_0x436838(0x125)],'version':_0x56364c['version'],'ragStatus':_0x56364c[_0x436838(0x13d)],'ragErrorMessage':_0x56364c['ragErrorMessage'],'updateTime':_0x56364c[_0x436838(0x147)]};}function detailPersonalItem(_0x10845e){const _0xe9da25=a35_0x29ff8c;return{'id':_0x10845e['id'],'appCode':_0x10845e['appCode'],'scope':_0x10845e[_0xe9da25(0x159)],'userId':_0x10845e[_0xe9da25(0x118)],'title':_0x10845e['title'],'content':_0x10845e[_0xe9da25(0x13a)]??'','version':_0x10845e[_0xe9da25(0x12c)],'ragStatus':_0x10845e[_0xe9da25(0x13d)],'ragErrorMessage':_0x10845e[_0xe9da25(0x11d)],'createTime':_0x10845e['createTime'],'updateTime':_0x10845e[_0xe9da25(0x147)]};}function readTopK(_0x548528){const _0x55be38=a35_0x29ff8c,_0x319337=_0x548528[_0x55be38(0x120)]('topk');if(_0x319337===undefined||_0x319337===null||_0x319337==='')return undefined;const _0x221345=_0x548528[_0x55be38(0x137)]('topk');if(!Number['isSafeInteger'](_0x221345)||_0x221345<0x1||_0x221345>0x32)throw CliErrors[_0x55be38(0x158)](_0x55be38(0x150));return _0x221345;}const kbList={'service':'kb','command':a35_0x29ff8c(0x13f),'description':a35_0x29ff8c(0x157),'risk':a35_0x29ff8c(0x141),'flags':[VERBOSE_FLAG],async 'execute'(_0x5a51c1){const _0x90e649=a35_0x29ff8c,_0x173a14=await listPersonalKnowledgeBaseItems(_0x5a51c1['appCode']);if(_0x5a51c1[_0x90e649(0x140)](_0x90e649(0x156)))return{'ok':!![],'data':{'total':_0x173a14[_0x90e649(0x148)],'items':_0x173a14}};return{'ok':!![],'data':{'total':_0x173a14[_0x90e649(0x148)],'items':_0x173a14[_0x90e649(0x143)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':'detail','description':a35_0x29ff8c(0x146),'risk':'read','flags':[{...ID_FLAG,'description':a35_0x29ff8c(0x135)}],async 'execute'(_0x486e57){const _0x3dcfd4=a35_0x29ff8c,_0x418043=await getPersonalKnowledgeBaseItem(_0x486e57[_0x3dcfd4(0x137)]('id'),_0x486e57[_0x3dcfd4(0x14c)]);return{'ok':!![],'data':detailPersonalItem(_0x418043)};}},kbCreate={'service':'kb','command':a35_0x29ff8c(0x123),'description':'Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','risk':a35_0x29ff8c(0x154),'confirmationDescription':'Saves\x20local\x20file\x20content\x20as\x20a\x20personal\x20knowledge-base\x20entry\x20and\x20starts\x20retrieval\x20sync.','flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x41cef5){const _0x3c3118=a35_0x29ff8c,_0x142c26=_0x41cef5[_0x3c3118(0x149)]('title'),_0x2d092a=readKnowledgeFile(_0x41cef5[_0x3c3118(0x149)](_0x3c3118(0x11e))),_0x36da17=await createPersonalKnowledgeBaseItem(_0x41cef5[_0x3c3118(0x14c)],{'title':_0x142c26,'content':_0x2d092a});return{'ok':!![],'data':summarizePersonalItem(_0x36da17),'message':_0x3c3118(0x12b)+_0x36da17['id']+'\x20('+_0x36da17[_0x3c3118(0x125)]+')'};},async 'dryRun'(_0xa24fb3){const _0x4e06d2=a35_0x29ff8c,_0x2f936c=_0xa24fb3[_0x4e06d2(0x149)](_0x4e06d2(0x125)),_0xf0041=readKnowledgeFile(_0xa24fb3['str'](_0x4e06d2(0x11e)));return dryRun(_0x4e06d2(0x132),'/client/knowledge-base/personal/create')[_0x4e06d2(0x128)]({'appCode':_0xa24fb3[_0x4e06d2(0x14c)],'title':_0x2f936c,'content':_0xf0041})[_0x4e06d2(0x127)](_0x4e06d2(0x13c)+_0x2f936c+'\x22')[_0x4e06d2(0x139)]();}},kbUpdate={'service':'kb','command':a35_0x29ff8c(0x15a),'description':a35_0x29ff8c(0x133),'risk':a35_0x29ff8c(0x154),'confirmationDescription':a35_0x29ff8c(0x152),'flags':[{...ID_FLAG,'description':a35_0x29ff8c(0x135)},{...TITLE_FLAG,'required':![],'description':a35_0x29ff8c(0x121)},FILE_FLAG],async 'execute'(_0x329143){const _0x47c2e1=a35_0x29ff8c,_0x2e8e44=_0x329143['num']('id'),_0x409a73=readKnowledgeFile(_0x329143['str']('file')),_0x446b87=_0x329143[_0x47c2e1(0x149)](_0x47c2e1(0x125))||(await getPersonalKnowledgeBaseItem(_0x2e8e44,_0x329143[_0x47c2e1(0x14c)]))[_0x47c2e1(0x125)],_0x429550=await updatePersonalKnowledgeBaseItem(_0x2e8e44,_0x329143['appCode'],{'title':_0x446b87,'content':_0x409a73});return{'ok':!![],'data':summarizePersonalItem(_0x429550),'message':'Updated\x20KB\x20entry\x20'+_0x429550['id']+'\x20('+_0x429550['title']+')'};},async 'dryRun'(_0x192a91){const _0x4ba1af=a35_0x29ff8c,_0x3902ea=_0x192a91[_0x4ba1af(0x137)]('id'),_0xef7863=readKnowledgeFile(_0x192a91[_0x4ba1af(0x149)](_0x4ba1af(0x11e))),_0x27b020=_0x192a91[_0x4ba1af(0x149)](_0x4ba1af(0x125))||(await getPersonalKnowledgeBaseItem(_0x3902ea,_0x192a91[_0x4ba1af(0x14c)]))[_0x4ba1af(0x125)];return dryRun('POST',_0x4ba1af(0x153)+_0x3902ea+'/update')[_0x4ba1af(0x128)]({'appCode':_0x192a91['appCode'],'title':_0x27b020,'content':_0xef7863})[_0x4ba1af(0x127)](_0x4ba1af(0x13b)+_0x3902ea)[_0x4ba1af(0x139)]();}};function readSearchServiceUrl(_0xfa914f){const _0x5d8c73=a35_0x29ff8c;if(_0xfa914f[_0x5d8c73(0x120)](_0x5d8c73(0x11c))!==undefined)return normalizeKbServiceOrigin(_0xfa914f[_0x5d8c73(0x149)](_0x5d8c73(0x11c)));const _0x35d79a=getKbServiceDomain();if(!_0x35d79a)throw CliErrors[_0x5d8c73(0x158)](_0x5d8c73(0x12e),_0x5d8c73(0x130));return normalizeKbServiceOrigin(_0x35d79a);}const kbSearch={'service':'kb','command':a35_0x29ff8c(0x134),'description':a35_0x29ff8c(0x11f),'risk':a35_0x29ff8c(0x141),'flags':[QUERY_FLAG,TOPK_FLAG,{'name':'kb-service-url','type':a35_0x29ff8c(0x12a),'required':![],'description':a35_0x29ff8c(0x124)}],async 'validate'(_0x4fada4){const _0x302745=a35_0x29ff8c;if(!_0x4fada4[_0x302745(0x149)](_0x302745(0x131))[_0x302745(0x12d)]())throw CliErrors[_0x302745(0x158)](_0x302745(0x14b));readTopK(_0x4fada4),readSearchServiceUrl(_0x4fada4);},async 'execute'(_0x380218){const _0x2f5f43=a35_0x29ff8c,_0x8090a1=_0x380218['str']('query')[_0x2f5f43(0x12d)](),_0x19a46a=readTopK(_0x380218),_0xaedc19=readSearchServiceUrl(_0x380218),_0xeadeb5={'appCode':_0x380218[_0x2f5f43(0x14c)],'accessKey':_0x380218[_0x2f5f43(0x14a)]??'','query':_0x8090a1,..._0x19a46a!==undefined?{'topK':_0x19a46a}:{},'signal':_0x380218[_0x2f5f43(0x122)]},_0x3f4f83=await searchDirectKnowledge({..._0xeadeb5,'serviceUrl':_0xaedc19});return{'ok':!![],'data':_0x3f4f83};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a36_0x3a88e7=a36_0x48a2;(function(_0x1a9602,_0x4b18d3){const _0x106e54=a36_0x48a2,_0x3f02e9=_0x1a9602();while(!![]){try{const _0x8b93cf=-parseInt(_0x106e54(0x16d))/0x1+parseInt(_0x106e54(0x182))/0x2+-parseInt(_0x106e54(0x17d))/0x3*(parseInt(_0x106e54(0x188))/0x4)+parseInt(_0x106e54(0x17b))/0x5+parseInt(_0x106e54(0x171))/0x6+parseInt(_0x106e54(0x181))/0x7*(parseInt(_0x106e54(0x176))/0x8)+-parseInt(_0x106e54(0x187))/0x9*(parseInt(_0x106e54(0x172))/0xa);if(_0x8b93cf===_0x4b18d3)break;else _0x3f02e9['push'](_0x3f02e9['shift']());}catch(_0x2e42fa){_0x3f02e9['push'](_0x3f02e9['shift']());}}}(a36_0x2761,0x58de8));function a36_0x48a2(_0x4513b9,_0x21f418){_0x4513b9=_0x4513b9-0x16c;const _0x27613b=a36_0x2761();let _0x48a2f7=_0x27613b[_0x4513b9];return _0x48a2f7;}import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function printLogs(_0x3a8554){const _0x30f856=a36_0x48a2;if(_0x3a8554[_0x30f856(0x17e)]===0x0){console['log'](_0x30f856(0x175));return;}console[_0x30f856(0x186)]('*\x20'+CLI_DISPLAY_NAME+'\x20logs:\x0a'),_0x3a8554[_0x30f856(0x17f)]((_0x57d7ea,_0x3d20db)=>{const _0x430052=_0x30f856,_0x273241=new Date(_0x57d7ea['timestamp'])[_0x430052(0x177)](_0x430052(0x174)),_0x55aea0=_0x57d7ea[_0x430052(0x170)]==='success'?'√':_0x57d7ea[_0x430052(0x170)]===_0x430052(0x180)?'×':_0x57d7ea[_0x430052(0x170)]===_0x430052(0x16e)?'!':'i';console[_0x430052(0x186)](_0x3d20db+0x1+'.\x20'+_0x55aea0+'\x20['+_0x57d7ea[_0x430052(0x173)]+']\x20'+_0x57d7ea[_0x430052(0x183)]),console[_0x430052(0x186)](_0x430052(0x16c)+_0x273241),_0x57d7ea[_0x430052(0x18a)]&&console['log']('\x20\x20\x20Duration:\x20'+_0x57d7ea['duration']+'ms'),_0x57d7ea[_0x430052(0x17c)]&&Object[_0x430052(0x179)](_0x57d7ea[_0x430052(0x17c)])[_0x430052(0x17e)]>0x0&&console[_0x430052(0x186)](_0x430052(0x189)+JSON['stringify'](_0x57d7ea['details'],null,0x2)),console[_0x430052(0x186)]('');});}function a36_0x2761(){const _0x2ed6cc=['log','441306BkCHjY','8XlIrzK','\x20\x20\x20Details:\x20','duration','\x20\x20\x20Time:\x20','11509RALJfU','warn','logs','level','1331508wyRatC','40elXSkW','command','en-US','*\x20No\x20logs\x20found','8NWYxvv','toLocaleString','read','keys','show','143275IaiHdk','details','338649TWjUEa','length','forEach','error','525273prHUfy','943614zsGkPo','message','readLogs','View\x20command\x20history\x20logs'];a36_0x2761=function(){return _0x2ed6cc;};return a36_0x2761();}export const logsDefinitions=[{'service':a36_0x3a88e7(0x16f),'command':a36_0x3a88e7(0x17a),'description':a36_0x3a88e7(0x185),'risk':a36_0x3a88e7(0x178),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x413174){const _0x3e3080=a36_0x3a88e7;return printLogs(logger[_0x3e3080(0x184)]()),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a37_0x611cd0=a37_0x4660;function a37_0x41f5(){const _0x3b1955=['List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','33738ziHXzs','Notification\x20channel\x20type','length','\x20notification\x20config(s)','3748xSYtbk','10KxZObv','Found\x20','6948424dvFwNs','346AkCFHq','127480wCOuiY','EMAIL','4271499QPmrUd','7RXiKiE','config-list','string','14192068jBLhyp','2730384htZjFu','appCode','65noPbgp'];a37_0x41f5=function(){return _0x3b1955;};return a37_0x41f5();}function a37_0x4660(_0x4c9963,_0x420d3d){_0x4c9963=_0x4c9963-0xb7;const _0x41f57d=a37_0x41f5();let _0x466058=_0x41f57d[_0x4c9963];return _0x466058;}(function(_0xa887bb,_0x552d1e){const _0x37af36=a37_0x4660,_0x18c65a=_0xa887bb();while(!![]){try{const _0x1fb62b=parseInt(_0x37af36(0xbd))/0x1*(-parseInt(_0x37af36(0xb9))/0x2)+parseInt(_0x37af36(0xc5))/0x3+-parseInt(_0x37af36(0xbe))/0x4*(-parseInt(_0x37af36(0xc7))/0x5)+-parseInt(_0x37af36(0xc9))/0x6*(parseInt(_0x37af36(0xc1))/0x7)+-parseInt(_0x37af36(0xbc))/0x8+parseInt(_0x37af36(0xc0))/0x9*(-parseInt(_0x37af36(0xba))/0xa)+parseInt(_0x37af36(0xc4))/0xb;if(_0x1fb62b===_0x552d1e)break;else _0x18c65a['push'](_0x18c65a['shift']());}catch(_0x5c684d){_0x18c65a['push'](_0x18c65a['shift']());}}}(a37_0x41f5,0x96bdb));import{listNotificationChannelConfigs}from'../../core/api-client.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':'notification','command':a37_0x611cd0(0xc2),'description':a37_0x611cd0(0xc8),'risk':'read','flags':[{'name':'type','type':a37_0x611cd0(0xc3),'description':a37_0x611cd0(0xca),'enum':NOTIFICATION_CHANNEL_TYPES,'default':a37_0x611cd0(0xbf)}],async 'validate'(_0x118b34){readNotificationChannelType(_0x118b34);},async 'execute'(_0x83c0bf){const _0x5ab6e3=a37_0x611cd0,_0x3f7240=readNotificationChannelType(_0x83c0bf),_0x5d5bcc=await listNotificationChannelConfigs(_0x83c0bf[_0x5ab6e3(0xc6)],_0x3f7240),_0x5467f0=_0x5d5bcc['map'](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x83c0bf[_0x5ab6e3(0xc6)],'channelType':_0x3f7240,'count':_0x5467f0[_0x5ab6e3(0xb7)],'configs':_0x5467f0},'message':_0x5ab6e3(0xbb)+_0x5467f0[_0x5ab6e3(0xb7)]+'\x20'+_0x3f7240+_0x5ab6e3(0xb8)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x414802,_0x37096f){const _0x244968=a38_0xf2a9,_0xb42f8e=_0x414802();while(!![]){try{const _0x3337c8=parseInt(_0x244968(0x1b2))/0x1+-parseInt(_0x244968(0x1ae))/0x2*(parseInt(_0x244968(0x1b6))/0x3)+-parseInt(_0x244968(0x1b5))/0x4+-parseInt(_0x244968(0x1b1))/0x5*(parseInt(_0x244968(0x1ad))/0x6)+parseInt(_0x244968(0x1b3))/0x7+parseInt(_0x244968(0x1b0))/0x8*(parseInt(_0x244968(0x1af))/0x9)+parseInt(_0x244968(0x1b4))/0xa;if(_0x3337c8===_0x37096f)break;else _0xb42f8e['push'](_0xb42f8e['shift']());}catch(_0x598fbf){_0xb42f8e['push'](_0xb42f8e['shift']());}}}(a38_0x3bf8,0x28978));import{notificationConfigList}from'../../commands/notification/config-list.js';function a38_0xf2a9(_0x235fe3,_0x58ef86){_0x235fe3=_0x235fe3-0x1ad;const _0x3bf8e8=a38_0x3bf8();let _0xf2a960=_0x3bf8e8[_0x235fe3];return _0xf2a960;}export const notificationDefinitions=[notificationConfigList];function a38_0x3bf8(){const _0x406031=['56842hEnoDO','1584XGjsFW','11496GzljkW','5czbLeH','93434AWgeOb','2072602rkmSla','157110hWxMdu','920060sJMlBo','3jXWFeZ','1400658fthnhm'];a38_0x3bf8=function(){return _0x406031;};return a38_0x3bf8();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a39_0x3965(){const _0x420eca=['FEISHU','1850547wPygpJ','797345rQmDeF','object','description','6FrysjN','EMAIL','Allowed\x20values:\x20','86692eDWuJu','3974179XqgtXr','configName','\x20is\x20missing\x20required\x20field\x20\x22','4ALiAcA','3614408eBvtmw','type','join','configCode','1YYxpoP','apiError','WEBHOOK','trim','str','92544jJonhU','WECOM','607310QqCZUg','Item\x20','18QytrZW','channelType','12mDRbHi','string','Invalid\x20--type:\x20','includes','Invalid\x20notification\x20config\x20response.'];a39_0x3965=function(){return _0x420eca;};return a39_0x3965();}const a39_0x2c9698=a39_0x5ab0;(function(_0x216069,_0x1c9529){const _0x4f2c35=a39_0x5ab0,_0x2e5aac=_0x216069();while(!![]){try{const _0x152ee8=parseInt(_0x4f2c35(0x8a))/0x1*(parseInt(_0x4f2c35(0x81))/0x2)+-parseInt(_0x4f2c35(0x9b))/0x3*(-parseInt(_0x4f2c35(0x85))/0x4)+parseInt(_0x4f2c35(0x9c))/0x5*(-parseInt(_0x4f2c35(0x9f))/0x6)+-parseInt(_0x4f2c35(0x86))/0x7+-parseInt(_0x4f2c35(0x8f))/0x8+-parseInt(_0x4f2c35(0x93))/0x9*(-parseInt(_0x4f2c35(0x91))/0xa)+-parseInt(_0x4f2c35(0x82))/0xb*(-parseInt(_0x4f2c35(0x95))/0xc);if(_0x152ee8===_0x1c9529)break;else _0x2e5aac['push'](_0x2e5aac['shift']());}catch(_0x5858ed){_0x2e5aac['push'](_0x2e5aac['shift']());}}}(a39_0x3965,0x6f38d));import{CliErrors}from'../../errors.js';function a39_0x5ab0(_0x336760,_0x5749c6){_0x336760=_0x336760-0x7f;const _0x396594=a39_0x3965();let _0x5ab0d6=_0x396594[_0x336760];return _0x5ab0d6;}export const NOTIFICATION_CHANNEL_TYPES=['EMAIL',a39_0x2c9698(0x9a),'DINGTALK',a39_0x2c9698(0x90),a39_0x2c9698(0x8c)];export function readNotificationChannelType(_0x37add3){const _0x45fff7=a39_0x2c9698,_0x3904ae=_0x37add3[_0x45fff7(0x8e)](_0x45fff7(0x87))[_0x45fff7(0x8d)]()||_0x45fff7(0x7f);if(!NOTIFICATION_CHANNEL_TYPES[_0x45fff7(0x98)](_0x3904ae))throw CliErrors['validation'](_0x45fff7(0x97)+_0x3904ae,_0x45fff7(0x80)+NOTIFICATION_CHANNEL_TYPES[_0x45fff7(0x88)](',\x20')+'.');return _0x3904ae;}export function projectNotificationListConfig(_0x3dfad7,_0x1168be){const _0x457429=a39_0x2c9698,_0x375dad=requireResponseObject(_0x3dfad7,_0x1168be);return{'configCode':requireResponseString(_0x375dad[_0x457429(0x89)],_0x457429(0x89),_0x1168be),'configName':requireResponseString(_0x375dad[_0x457429(0x83)],_0x457429(0x83),_0x1168be),'channelType':requireResponseString(_0x375dad[_0x457429(0x94)],_0x457429(0x94),_0x1168be),'description':normalizeNullableString(_0x375dad[_0x457429(0x9e)])};}function requireResponseObject(_0x6b1057,_0x5ac27f){const _0x39f1f5=a39_0x2c9698;if(typeof _0x6b1057!==_0x39f1f5(0x9d)||_0x6b1057===null||Array['isArray'](_0x6b1057))throw CliErrors[_0x39f1f5(0x8b)](_0x39f1f5(0x99),'Item\x20'+(_0x5ac27f+0x1)+'\x20must\x20be\x20an\x20object.');return _0x6b1057;}function requireResponseString(_0x551256,_0x1fa7fd,_0x176483){const _0x544047=a39_0x2c9698;if(typeof _0x551256!==_0x544047(0x96)||!_0x551256[_0x544047(0x8d)]())throw CliErrors[_0x544047(0x8b)](_0x544047(0x99),_0x544047(0x92)+(_0x176483+0x1)+_0x544047(0x84)+_0x1fa7fd+'\x22.');return _0x551256[_0x544047(0x8d)]();}function normalizeNullableString(_0x183dc2){const _0x147381=a39_0x2c9698;return typeof _0x183dc2===_0x147381(0x96)&&_0x183dc2[_0x147381(0x8d)]()?_0x183dc2[_0x147381(0x8d)]():null;}
|