@lovrabet/lovrabet-cli 2.3.11 → 2.3.12-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/approval/index.js +1 -1
- package/lib/commands/artifact/index.d.ts +13 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/import-excel.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/issue/context.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/permit/dataset-get.js +1 -1
- package/lib/commands/permit/dataset-set.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/diagram.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/diagram.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/user-account/bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.d.ts +3 -2
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-sdk-errors.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/access-error.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/raw-flags.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-import/auto-id-runner.js +1 -1
- package/lib/services/dataset-import/excel-reader.js +1 -1
- package/lib/services/dataset-import/image-bytes.js +1 -1
- package/lib/services/dataset-import/image-ooxml.js +1 -1
- package/lib/services/dataset-import/image-runner.js +1 -1
- package/lib/services/dataset-import/metadata.js +1 -1
- package/lib/services/dataset-import/preview.js +1 -1
- package/lib/services/dataset-import/runner.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/utils/access-key-redaction.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/positive-safe-integer.js +1 -1
- package/lib/utils/redaction.js +1 -1
- package/lib/utils/runtime-user-id.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/lovrabet/SKILL.md +1 -1
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const a27_0x2d0f15=a27_0x4120;(function(_0x235c53,_0x5a2f9c){const _0x103a4c=a27_0x4120,_0x46d5d0=_0x235c53();while(!![]){try{const _0x56d158=-parseInt(_0x103a4c(0x12f))/0x1*(parseInt(_0x103a4c(0x144))/0x2)+-parseInt(_0x103a4c(0x13e))/0x3+parseInt(_0x103a4c(0x16b))/0x4+-parseInt(_0x103a4c(0x17c))/0x5*(parseInt(_0x103a4c(0x188))/0x6)+parseInt(_0x103a4c(0x13d))/0x7+parseInt(_0x103a4c(0x15c))/0x8+-parseInt(_0x103a4c(0x189))/0x9*(-parseInt(_0x103a4c(0x173))/0xa);if(_0x56d158===_0x5a2f9c)break;else _0x46d5d0['push'](_0x46d5d0['shift']());}catch(_0x547a30){_0x46d5d0['push'](_0x46d5d0['shift']());}}}(a27_0x26e4,0xb760b));import{dataImportExcel}from'./import-excel.js';import{executeData}from'../../core/sdk-client.js';import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{requireAnyOf}from'../../commands/common/constraints.js';import{parseJsonParams,parseJsonParamsValue,parseBatchCreateItemsFromParams,parseUpdateIdsFromParams,normalizeUpdateParamsForRuntime}from'../../utils/params.js';import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':'filter','operation':a27_0x2d0f15(0x12d),'risk':'read','paramsRequired':![],'description':a27_0x2d0f15(0x13c),'paramsHint':'JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20'+a27_0x2d0f15(0x156),'helpExtra':['\x20\x20WHERE\x20OPERATORS',a27_0x2d0f15(0x137),'\x20\x20\x20\x20$ne\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Not\x20equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22status\x22:{\x22$ne\x22:\x22deleted\x22}}',a27_0x2d0f15(0x16c),'\x20\x20\x20\x20$gte\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20or\x20equal\x20\x20{\x22amount\x22:{\x22$gte\x22:100}}',a27_0x2d0f15(0x131),'\x20\x20\x20\x20$lte\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20or\x20equal\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lte\x22:1000}}',a27_0x2d0f15(0x140),'\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_0x2d0f15(0x14e),a27_0x2d0f15(0x167),'',a27_0x2d0f15(0x165),a27_0x2d0f15(0x179),a27_0x2d0f15(0x157),'',a27_0x2d0f15(0x174),a27_0x2d0f15(0x12a),'\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_0x2d0f15(0x190),a27_0x2d0f15(0x178),'\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','',a27_0x2d0f15(0x161),a27_0x2d0f15(0x141),'\x20\x20\x20\x20Do\x20NOT\x20use\x20--where,\x20--select,\x20--order-by,\x20--current-page,\x20--page,\x20or\x20--page-size\x20as\x20CLI\x20flags.',a27_0x2d0f15(0x153),a27_0x2d0f15(0x164),'\x20\x20\x20\x20Page\x201:\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:1,\x22pageSize\x22:20}\x27',a27_0x2d0f15(0x14b),'\x20\x20\x20\x20Verify\x20the\x20response\x20paging.currentPage/pageSize\x20and\x20that\x20tableData\x20satisfies\x20where\x20before\x20drawing\x20conclusions.'][a27_0x2d0f15(0x159)]('\x0a')},{'command':a27_0x2d0f15(0x126),'operation':'getOne','risk':a27_0x2d0f15(0x15a),'paramsRequired':!![],'description':a27_0x2d0f15(0x182),'paramsHint':a27_0x2d0f15(0x12e)},{'command':a27_0x2d0f15(0x169),'operation':a27_0x2d0f15(0x169),'risk':a27_0x2d0f15(0x13b),'paramsRequired':!![],'description':a27_0x2d0f15(0x132),'confirmationDescription':a27_0x2d0f15(0x14d),'paramsHint':a27_0x2d0f15(0x17b)},{'command':a27_0x2d0f15(0x177),'operation':a27_0x2d0f15(0x177),'risk':a27_0x2d0f15(0x13b),'paramsRequired':!![],'description':a27_0x2d0f15(0x158),'helpExtra':['\x20\x20EXCEL\x20ROUTES',a27_0x2d0f15(0x172),a27_0x2d0f15(0x18c),a27_0x2d0f15(0x150),a27_0x2d0f15(0x17d),a27_0x2d0f15(0x17e),a27_0x2d0f15(0x127),'\x20\x20\x20\x20Stop\x20on\x20unknown\x20outcomes\x20or\x20conflicts;\x20reconcile\x20before\x20retrying,\x20never\x20blindly\x20resend\x20a\x20batch.',a27_0x2d0f15(0x170),'\x20\x20\x20\x20Built-in\x20Skill\x20guide:\x20references/lovrabet-db-table-excel-import.md','\x20\x20\x20\x20Non-Excel\x20batchCreate\x20remains\x20available\x20for\x20METADATA\x20and\x20DB_TABLE.'][a27_0x2d0f15(0x159)]('\x0a'),'confirmationDescription':a27_0x2d0f15(0x18a),'paramsHint':a27_0x2d0f15(0x18f)},{'command':a27_0x2d0f15(0x163),'operation':a27_0x2d0f15(0x163),'risk':a27_0x2d0f15(0x13b),'paramsRequired':!![],'description':'Update\x20an\x20existing\x20data\x20record','confirmationDescription':a27_0x2d0f15(0x166),'paramsHint':a27_0x2d0f15(0x191)+a27_0x2d0f15(0x139)},{'command':a27_0x2d0f15(0x133),'operation':'delete','risk':a27_0x2d0f15(0x128),'paramsRequired':!![],'description':a27_0x2d0f15(0x151),'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_0x2d0f15(0x171),'operation':a27_0x2d0f15(0x171),'risk':a27_0x2d0f15(0x15a),'paramsRequired':![],'description':a27_0x2d0f15(0x184),'paramsHint':'JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20'+a27_0x2d0f15(0x149),'helpExtra':[a27_0x2d0f15(0x176),a27_0x2d0f15(0x12c),a27_0x2d0f15(0x15d),a27_0x2d0f15(0x136),a27_0x2d0f15(0x13a),'\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Rounded\x20average\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg\x22,\x22round\x22:true,\x22precision\x22:2}','\x20\x20\x20\x20MAX\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Maximum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MAX\x22,\x22alias\x22:\x22max_price\x22}',a27_0x2d0f15(0x134),'',a27_0x2d0f15(0x17f),a27_0x2d0f15(0x154),a27_0x2d0f15(0x187),a27_0x2d0f15(0x18e),a27_0x2d0f15(0x185),a27_0x2d0f15(0x14c),a27_0x2d0f15(0x192),'',a27_0x2d0f15(0x138),a27_0x2d0f15(0x186),a27_0x2d0f15(0x14a),a27_0x2d0f15(0x143),'',a27_0x2d0f15(0x152),a27_0x2d0f15(0x168),a27_0x2d0f15(0x155),a27_0x2d0f15(0x175),a27_0x2d0f15(0x16e),'','\x20\x20EXAMPLES',a27_0x2d0f15(0x146),'\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter',a27_0x2d0f15(0x17a),'',a27_0x2d0f15(0x12b)]['join']('\x0a')}];function makeDataCommand(_0x48a181){const _0x1fff41=a27_0x2d0f15,_0x4167d9=_0x1fff41(0x181)+_0x48a181[_0x1fff41(0x183)],_0x2e1d0d={'service':_0x1fff41(0x147),'command':_0x48a181[_0x1fff41(0x183)],'description':_0x48a181[_0x1fff41(0x160)],'risk':_0x48a181[_0x1fff41(0x135)],..._0x48a181[_0x1fff41(0x15e)]?{'confirmationDescription':_0x48a181['confirmationDescription']}:{},'helpExtra':_0x48a181[_0x1fff41(0x18b)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x48a181[_0x1fff41(0x14f)]}],'validate':async _0x120b91=>{const _0x3bd635=_0x1fff41;_0x48a181[_0x3bd635(0x18d)]&&requireAnyOf(_0x120b91,[_0x3bd635(0x16f)],_0x4167d9),_0x48a181['operation']==='batchCreate'&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x120b91[_0x3bd635(0x180)]('params'))),_0x48a181[_0x3bd635(0x13f)]==='update'&&parseUpdateIdsFromParams(parseJsonParams(_0x120b91[_0x3bd635(0x180)](_0x3bd635(0x16f)))??{});},async 'execute'(_0x1e6909){const _0x979470=_0x1fff41,_0x332bc8=_0x1e6909[_0x979470(0x180)](_0x979470(0x148)),_0xf73260=_0x48a181['operation']===_0x979470(0x177)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x1e6909['str'](_0x979470(0x16f)))):parseJsonParams(_0x1e6909['str'](_0x979470(0x16f)))??{},_0x2419e8=_0x48a181[_0x979470(0x13f)]===_0x979470(0x163)?parseUpdateIdsFromParams(_0xf73260):undefined,_0x6d9d1f=_0x2419e8?normalizeUpdateParamsForRuntime(_0xf73260,_0x2419e8):_0xf73260,_0x5adec3=Date[_0x979470(0x15b)](),_0x2cbe14=await executeData(_0x332bc8,_0x48a181[_0x979470(0x13f)],_0x6d9d1f),_0x19a862=Date['now']()-_0x5adec3,_0x51020f=_0x2419e8&&_0x2419e8[_0x979470(0x16a)]>0x1?buildBatchUpdateResult(_0x2419e8,_0x2cbe14):_0x2cbe14;return{'ok':!![],'data':{'result':_0x51020f,'elapsed':_0x19a862},'message':_0x979470(0x181)+_0x48a181[_0x979470(0x183)]+_0x979470(0x142)+_0x19a862+'ms'};}};return _0x48a181[_0x1fff41(0x135)]!==_0x1fff41(0x15a)&&(_0x2e1d0d[_0x1fff41(0x16d)]=async _0x223050=>{const _0x53eb7b=_0x1fff41,_0x404985=_0x223050[_0x53eb7b(0x180)](_0x53eb7b(0x148)),_0x3e76d1=_0x48a181['operation']===_0x53eb7b(0x177)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x223050[_0x53eb7b(0x180)]('params'))):parseJsonParams(_0x223050['str'](_0x53eb7b(0x16f)))??{};let _0x17cc7d=_0x3e76d1;if(_0x48a181[_0x53eb7b(0x13f)]===_0x53eb7b(0x163)){const _0x2c3512=parseUpdateIdsFromParams(_0x3e76d1);_0x17cc7d=normalizeUpdateParamsForRuntime(_0x3e76d1,_0x2c3512);}return dryRun(_0x53eb7b(0x130),_0x53eb7b(0x193)+_0x404985+'/'+_0x48a181[_0x53eb7b(0x13f)])[_0x53eb7b(0x145)](_0x17cc7d)[_0x53eb7b(0x160)]('Preview:\x20data\x20'+_0x48a181['command']+_0x53eb7b(0x162)+_0x404985)[_0x53eb7b(0x15f)]();}),_0x2e1d0d;}export const dataDefinitions=[...specs[a27_0x2d0f15(0x129)](makeDataCommand),dataImportExcel];function buildBatchUpdateResult(_0xde7046,_0x10adaf){const _0x258af5=a27_0x2d0f15;return{'operation':'update','mode':'batch','ids':_0xde7046,'total':_0xde7046[_0x258af5(0x16a)],'result':_0x10adaf};}function a27_0x4120(_0x2179f7,_0x6b64e){_0x2179f7=_0x2179f7-0x126;const _0x26e4fd=a27_0x26e4();let _0x412039=_0x26e4fd[_0x2179f7];return _0x412039;}function a27_0x26e4(){const _0x1e8a3d=['2598885fgWTbv','operation','\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\x20Filtering\x20and\x20pagination\x20are\x20controlled\x20only\x20via\x20one\x20JSON\x20object\x20in\x20--params.','\x20completed\x20in\x20','\x20\x20\x20\x20orderBy\x20may\x20reference\x20aggregate\x20output\x20aliases','8dtvSDc','body','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','data','code','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\x20select/where/having/groupBy\x20must\x20use\x20real\x20dataset\x20fields','\x20\x20\x20\x20Page\x202:\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:2,\x22pageSize\x22:20}\x27','\x20\x20\x20\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}}','Writes\x20one\x20new\x20business\x20record\x20to\x20the\x20current\x20app\x20dataset.\x20It\x20is\x20saved\x20immediately\x20after\x20confirmation.','\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}}','paramsHint','\x20\x20\x20\x20then\x20convert\x20rows\x20to\x20JSON\x20and\x20split\x20within\x20the\x20target\x20API\x20row/byte\x20and\x20local\x20argument\x20limits.','Delete\x20data\x20records\x20(non-interactive\x20mode\x20requires\x20--yes)','\x20\x20DATASET\x20BOUNDARY','\x20\x20\x20\x20Page\x20numbers\x20start\x20at\x201.\x20To\x20fetch\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged','\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\x20METADATA\x20datasets\x20do\x20not\x20support\x20aggregate\x20or\x20Custom\x20SQL','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','\x20\x20\x20\x20$or\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Any\x20condition\x20matches\x20\x20{\x22$or\x22:[{\x22status\x22:{\x22$eq\x22:\x22active\x22}},{\x22status\x22:{\x22$eq\x22:\x22pending\x22}}]}','Create\x20multiple\x20records\x20in\x20the\x20dataset\x20in\x20one\x20request','join','read','now','684192QwDnrT','\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}','confirmationDescription','build','description','\x20\x20PAGINATION','\x20on\x20dataset\x20','update','\x20\x20\x20\x20and\x20increment\x20only\x20currentPage.\x20Use\x20a\x20stable\x20unique\x20orderBy\x20field\x20to\x20avoid\x20duplicates\x20or\x20gaps.','\x20\x20LOGICAL\x20COMBINATORS','Changes\x20an\x20existing\x20business\x20record\x20in\x20the\x20current\x20app\x20dataset.\x20The\x20new\x20values\x20are\x20saved\x20immediately\x20after\x20confirmation.','\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\x20aggregate\x20supports\x20a\x20single\x20DB_TABLE\x20dataset\x20only','create','length','1928896jpbaCe','\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}}','dryRun','\x20\x20\x20\x20choose\x20the\x20capability\x20before\x20execution;\x20never\x20fall\x20back\x20at\x20runtime','params','\x20\x20\x20\x20No\x20import\x20checkpoint,\x20--resume,\x20automatic\x20upsert,\x20or\x20atomic\x20rollback\x20guarantee.','aggregate','\x20\x20\x20\x20METADATA:\x20use\x20lovrabet\x20data\x20import-excel\x20with\x20checkpoint\x20recovery.','760290ptnHSt','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','\x20\x20\x20\x20JOIN\x20and\x20cross-table\x20aggregation\x20require\x20an\x20existing\x20trusted\x20Custom\x20SQL','\x20\x20AGGREGATE\x20TYPES','batchCreate','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','\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\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\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','35rxcNNp','\x20\x20\x20\x20This\x20command\x20sends\x20one\x20prepared\x20batch;\x20it\x20does\x20not\x20read\x20XLSX\x20or\x20split\x20batches.','\x20\x20\x20\x20--dry-run\x20previews\x20the\x20request\x20only;\x20it\x20does\x20not\x20validate\x20server\x20constraints\x20or\x20write\x20permissions.','\x20\x20PARAMS\x20STRUCTURE','str','data\x20','Get\x20a\x20single\x20record\x20by\x20ID','command','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','\x20\x20\x20\x20aggregate[].alias\x20defines\x20the\x20output\x20field\x20name\x20only','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','1199262CYNgGd','297flifoq','Writes\x20multiple\x20new\x20business\x20records\x20to\x20the\x20current\x20app\x20dataset.\x20They\x20are\x20saved\x20immediately\x20after\x20confirmation.','helpExtra','\x20\x20\x20\x20DB_TABLE:\x20inspect\x20dataset\x20detail,\x20validate\x20the\x20full\x20file\x20and\x20confirmed\x20unique\x20business\x20keys,','paramsRequired','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','\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}]','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20id\x20may\x20be\x20a\x20single\x20value\x20or\x20array.\x20','\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}]','/api/{appCode}/','getOne','\x20\x20\x20\x20Record\x20each\x20batch\x20and\x20verify\x20its\x20IDs\x20or\x20unique\x20business\x20keys\x20before\x20continuing.','high-risk-write','map','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','\x20\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','\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}','filter','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','150783MOznpB','POST','\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}}','Create\x20one\x20record\x20in\x20the\x20dataset','delete','\x20\x20\x20\x20MIN\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Minimum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MIN\x22,\x22alias\x22:\x22min_price\x22}','risk','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20distinct\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22,\x22distinct\x22:true}','\x20\x20\x20\x20$eq\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22age\x22:{\x22$eq\x22:18}}','\x20\x20AGGREGATE\x20ALIAS\x20BOUNDARY','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\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}','write','Filter\x20dataset\x20records\x20with\x20query\x20conditions','3800832pwVcuG'];a27_0x26e4=function(){return _0x1e8a3d;};return a27_0x26e4();}
|
|
1
|
+
const a27_0x5722d3=a27_0x1be6;(function(_0x5d1ae5,_0x3f8851){const _0x3f6ecf=a27_0x1be6,_0x27701d=_0x5d1ae5();while(!![]){try{const _0x39e7f3=parseInt(_0x3f6ecf(0x12b))/0x1+parseInt(_0x3f6ecf(0x152))/0x2*(parseInt(_0x3f6ecf(0x13b))/0x3)+parseInt(_0x3f6ecf(0x13f))/0x4*(parseInt(_0x3f6ecf(0x14e))/0x5)+-parseInt(_0x3f6ecf(0x154))/0x6+-parseInt(_0x3f6ecf(0x18d))/0x7*(parseInt(_0x3f6ecf(0x141))/0x8)+parseInt(_0x3f6ecf(0x128))/0x9*(-parseInt(_0x3f6ecf(0x18a))/0xa)+-parseInt(_0x3f6ecf(0x171))/0xb;if(_0x39e7f3===_0x3f8851)break;else _0x27701d['push'](_0x27701d['shift']());}catch(_0x26c2ee){_0x27701d['push'](_0x27701d['shift']());}}}(a27_0x2a56,0x2d3ac));import{dataImportExcel}from'./import-excel.js';function a27_0x1be6(_0x4b6823,_0x2760b2){_0x4b6823=_0x4b6823-0x128;const _0x2a5618=a27_0x2a56();let _0x1be6ec=_0x2a5618[_0x4b6823];return _0x1be6ec;}import{executeData}from'../../core/sdk-client.js';function a27_0x2a56(){const _0x1c5bd2=['\x20\x20\x20\x20DB_TABLE:\x20inspect\x20dataset\x20detail,\x20validate\x20the\x20full\x20file\x20and\x20confirmed\x20unique\x20business\x20keys,','/api/{appCode}/','1507968gxwuRa','create','filter','Examples:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27,\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22completed\x22}\x27','now','\x20\x20AGGREGATE\x20TYPES','dryRun','Delete\x20data\x20records\x20(non-interactive\x20mode\x20requires\x20--yes)','\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}','paramsHint','Update\x20an\x20existing\x20data\x20record','\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}','batch','\x20\x20\x20\x20JOIN\x20and\x20cross-table\x20aggregation\x20require\x20an\x20existing\x20trusted\x20Custom\x20SQL','\x20\x20\x20\x20Non-Excel\x20batchCreate\x20remains\x20available\x20for\x20METADATA\x20and\x20DB_TABLE.','\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\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','\x20\x20\x20\x20Built-in\x20Skill\x20guide:\x20references/lovrabet-db-table-excel-import.md','Create\x20one\x20record\x20in\x20the\x20dataset','\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\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Rounded\x20average\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg\x22,\x22round\x22:true,\x22precision\x22:2}','\x20\x20\x20\x20$gte\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20or\x20equal\x20\x20{\x22amount\x22:{\x22$gte\x22:100}}','30KspOgj','Writes\x20one\x20new\x20business\x20record\x20to\x20the\x20current\x20app\x20dataset.\x20It\x20is\x20saved\x20immediately\x20after\x20confirmation.','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','625268Pcstes','\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','command','aggregate','\x20\x20WHERE\x20OPERATORS','\x20\x20DATASET\x20BOUNDARY','\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$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}}]}','872766zJnmBC','\x20\x20\x20\x20aggregate\x20supports\x20a\x20single\x20DB_TABLE\x20dataset\x20only','\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}}','352056nRmexi','\x20\x20\x20\x20and\x20increment\x20only\x20currentPage.\x20Use\x20a\x20stable\x20unique\x20orderBy\x20field\x20to\x20avoid\x20duplicates\x20or\x20gaps.','data','\x20\x20\x20\x20MAX\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Maximum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MAX\x22,\x22alias\x22:\x22max_price\x22}','\x20\x20\x20\x20Stop\x20on\x20unknown\x20outcomes\x20or\x20conflicts;\x20reconcile\x20before\x20retrying,\x20never\x20blindly\x20resend\x20a\x20batch.','\x20\x20\x20\x20Page\x20numbers\x20start\x20at\x201.\x20To\x20fetch\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged','\x20\x20\x20\x20$startWith\x20\x20\x20Starts\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$startWith\x22:\x22Mr.\x22}}','\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','\x20\x20\x20\x20$contain\x20\x20\x20\x20\x20Substring\x20match\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$contain\x22:\x22test\x22}}','\x20\x20\x20\x20then\x20convert\x20rows\x20to\x20JSON\x20and\x20split\x20within\x20the\x20target\x20API\x20row/byte\x20and\x20local\x20argument\x20limits.','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','Example:\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x20\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','Filter\x20dataset\x20records\x20with\x20query\x20conditions','read','\x20\x20PARAMS\x20STRUCTURE','\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}}','237lIfWaO','\x20\x20\x20\x20$eq\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22age\x22:{\x22$eq\x22:18}}','\x20\x20\x20\x20$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}}','paramsRequired','4wYjJgJ','\x20\x20\x20\x20METADATA:\x20use\x20lovrabet\x20data\x20import-excel\x20with\x20checkpoint\x20recovery.','8dxlfEF','\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}]','confirmationDescription','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','update','\x20on\x20dataset\x20','write','risk','code','\x20\x20LOGICAL\x20COMBINATORS','delete','\x20\x20PAGINATION','\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','575095FawlpR','\x20\x20\x20\x20select/where/having/groupBy\x20must\x20use\x20real\x20dataset\x20fields','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','batchCreate','6782tskJuP','\x20\x20EXAMPLES','194220hHDoUX','length','Preview:\x20data\x20','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','body','\x20\x20AGGREGATE\x20ALIAS\x20BOUNDARY','POST','helpExtra','\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}}','data\x20','join','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','params','\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\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}','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','description','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','\x20\x20\x20\x20aggregate[].alias\x20defines\x20the\x20output\x20field\x20name\x20only','\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}}','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','operation','str','\x20\x20\x20\x20--dry-run\x20previews\x20the\x20request\x20only;\x20it\x20does\x20not\x20validate\x20server\x20constraints\x20or\x20write\x20permissions.','\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\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)'];a27_0x2a56=function(){return _0x1c5bd2;};return a27_0x2a56();}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_0x5722d3(0x173),'operation':'filter','risk':a27_0x5722d3(0x138),'paramsRequired':![],'description':a27_0x5722d3(0x137),'paramsHint':a27_0x5722d3(0x135)+a27_0x5722d3(0x18c),'helpExtra':[a27_0x5722d3(0x191),a27_0x5722d3(0x13c),a27_0x5722d3(0x12a),a27_0x5722d3(0x13a),a27_0x5722d3(0x189),a27_0x5722d3(0x13d),a27_0x5722d3(0x15c),a27_0x5722d3(0x193),a27_0x5722d3(0x133),a27_0x5722d3(0x131),a27_0x5722d3(0x167),'',a27_0x5722d3(0x14a),a27_0x5722d3(0x194),'\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_0x5722d3(0x187),a27_0x5722d3(0x16e),a27_0x5722d3(0x16d),a27_0x5722d3(0x142),a27_0x5722d3(0x15f),'\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','',a27_0x5722d3(0x14c),'\x20\x20\x20\x20Filtering\x20and\x20pagination\x20are\x20controlled\x20only\x20via\x20one\x20JSON\x20object\x20in\x20--params.','\x20\x20\x20\x20Do\x20NOT\x20use\x20--where,\x20--select,\x20--order-by,\x20--current-page,\x20--page,\x20or\x20--page-size\x20as\x20CLI\x20flags.',a27_0x5722d3(0x130),a27_0x5722d3(0x12c),a27_0x5722d3(0x18e),'\x20\x20\x20\x20Page\x202:\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:2,\x22pageSize\x22:20}\x27','\x20\x20\x20\x20Verify\x20the\x20response\x20paging.currentPage/pageSize\x20and\x20that\x20tableData\x20satisfies\x20where\x20before\x20drawing\x20conclusions.'][a27_0x5722d3(0x15e)]('\x0a')},{'command':'getOne','operation':'getOne','risk':'read','paramsRequired':!![],'description':'Get\x20a\x20single\x20record\x20by\x20ID','paramsHint':a27_0x5722d3(0x163)},{'command':a27_0x5722d3(0x172),'operation':'create','risk':a27_0x5722d3(0x147),'paramsRequired':!![],'description':a27_0x5722d3(0x185),'confirmationDescription':a27_0x5722d3(0x18b),'paramsHint':'JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27'},{'command':a27_0x5722d3(0x151),'operation':'batchCreate','risk':a27_0x5722d3(0x147),'paramsRequired':!![],'description':'Create\x20multiple\x20records\x20in\x20the\x20dataset\x20in\x20one\x20request','helpExtra':['\x20\x20EXCEL\x20ROUTES',a27_0x5722d3(0x140),a27_0x5722d3(0x16f),a27_0x5722d3(0x134),'\x20\x20\x20\x20This\x20command\x20sends\x20one\x20prepared\x20batch;\x20it\x20does\x20not\x20read\x20XLSX\x20or\x20split\x20batches.',a27_0x5722d3(0x16c),'\x20\x20\x20\x20Record\x20each\x20batch\x20and\x20verify\x20its\x20IDs\x20or\x20unique\x20business\x20keys\x20before\x20continuing.',a27_0x5722d3(0x12f),'\x20\x20\x20\x20No\x20import\x20checkpoint,\x20--resume,\x20automatic\x20upsert,\x20or\x20atomic\x20rollback\x20guarantee.',a27_0x5722d3(0x184),a27_0x5722d3(0x180)][a27_0x5722d3(0x15e)]('\x0a'),'confirmationDescription':'Writes\x20multiple\x20new\x20business\x20records\x20to\x20the\x20current\x20app\x20dataset.\x20They\x20are\x20saved\x20immediately\x20after\x20confirmation.','paramsHint':'JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27'},{'command':a27_0x5722d3(0x145),'operation':'update','risk':a27_0x5722d3(0x147),'paramsRequired':!![],'description':a27_0x5722d3(0x17b),'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'+a27_0x5722d3(0x174)},{'command':a27_0x5722d3(0x14b),'operation':a27_0x5722d3(0x14b),'risk':'high-risk-write','paramsRequired':!![],'description':a27_0x5722d3(0x178),'confirmationDescription':'Deletes\x20business\x20records\x20from\x20the\x20current\x20app\x20dataset.\x20This\x20may\x20not\x20be\x20recoverable.','paramsHint':a27_0x5722d3(0x163)},{'command':a27_0x5722d3(0x190),'operation':a27_0x5722d3(0x190),'risk':a27_0x5722d3(0x138),'paramsRequired':![],'description':a27_0x5722d3(0x144),'paramsHint':a27_0x5722d3(0x168)+a27_0x5722d3(0x136),'helpExtra':[a27_0x5722d3(0x176),a27_0x5722d3(0x17d),a27_0x5722d3(0x181),a27_0x5722d3(0x179),'\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_0x5722d3(0x188),a27_0x5722d3(0x12e),a27_0x5722d3(0x162),'',a27_0x5722d3(0x139),a27_0x5722d3(0x161),a27_0x5722d3(0x169),a27_0x5722d3(0x157),a27_0x5722d3(0x132),'\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}}',a27_0x5722d3(0x186),'',a27_0x5722d3(0x159),a27_0x5722d3(0x166),a27_0x5722d3(0x14f),a27_0x5722d3(0x17c),'',a27_0x5722d3(0x192),a27_0x5722d3(0x129),'\x20\x20\x20\x20METADATA\x20datasets\x20do\x20not\x20support\x20aggregate\x20or\x20Custom\x20SQL',a27_0x5722d3(0x17f),'\x20\x20\x20\x20choose\x20the\x20capability\x20before\x20execution;\x20never\x20fall\x20back\x20at\x20runtime','',a27_0x5722d3(0x153),a27_0x5722d3(0x183),a27_0x5722d3(0x165),'',a27_0x5722d3(0x150),a27_0x5722d3(0x14d),'',a27_0x5722d3(0x182)][a27_0x5722d3(0x15e)]('\x0a')}];function makeDataCommand(_0x536467){const _0x57fad4=a27_0x5722d3,_0x34922c=_0x57fad4(0x15d)+_0x536467[_0x57fad4(0x18f)],_0x3c69e2={'service':_0x57fad4(0x12d),'command':_0x536467['command'],'description':_0x536467[_0x57fad4(0x164)],'risk':_0x536467[_0x57fad4(0x148)],..._0x536467[_0x57fad4(0x143)]?{'confirmationDescription':_0x536467[_0x57fad4(0x143)]}:{},'helpExtra':_0x536467[_0x57fad4(0x15b)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x536467[_0x57fad4(0x17a)]}],'validate':async _0x22893a=>{const _0x45003f=_0x57fad4;_0x536467[_0x45003f(0x13e)]&&requireAnyOf(_0x22893a,['params'],_0x34922c),_0x536467['operation']===_0x45003f(0x151)&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x22893a[_0x45003f(0x16b)](_0x45003f(0x160)))),_0x536467['operation']==='update'&&parseUpdateIdsFromParams(parseJsonParams(_0x22893a[_0x45003f(0x16b)]('params'))??{});},async 'execute'(_0x100a71){const _0x1fc6e4=_0x57fad4,_0x12d482=_0x100a71['str']('code'),_0x2b73f8=_0x536467[_0x1fc6e4(0x16a)]===_0x1fc6e4(0x151)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x100a71[_0x1fc6e4(0x16b)](_0x1fc6e4(0x160)))):parseJsonParams(_0x100a71[_0x1fc6e4(0x16b)](_0x1fc6e4(0x160)))??{},_0x5913de=_0x536467[_0x1fc6e4(0x16a)]===_0x1fc6e4(0x145)?parseUpdateIdsFromParams(_0x2b73f8):undefined,_0x6db3d7=_0x5913de?normalizeUpdateParamsForRuntime(_0x2b73f8,_0x5913de):_0x2b73f8,_0xfdaf8e=Date[_0x1fc6e4(0x175)](),_0x2e5d6d=await executeData(_0x12d482,_0x536467[_0x1fc6e4(0x16a)],_0x6db3d7),_0x2e58b1=Date[_0x1fc6e4(0x175)]()-_0xfdaf8e,_0x2feaad=_0x5913de&&_0x5913de['length']>0x1?buildBatchUpdateResult(_0x5913de,_0x2e5d6d):_0x2e5d6d;return{'ok':!![],'data':{'result':_0x2feaad,'elapsed':_0x2e58b1},'message':_0x1fc6e4(0x15d)+_0x536467[_0x1fc6e4(0x18f)]+'\x20completed\x20in\x20'+_0x2e58b1+'ms'};}};return _0x536467['risk']!==_0x57fad4(0x138)&&(_0x3c69e2[_0x57fad4(0x177)]=async _0x1bf82e=>{const _0x5a1268=_0x57fad4,_0x36d1ad=_0x1bf82e['str'](_0x5a1268(0x149)),_0x864e8c=_0x536467[_0x5a1268(0x16a)]===_0x5a1268(0x151)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x1bf82e['str'](_0x5a1268(0x160)))):parseJsonParams(_0x1bf82e[_0x5a1268(0x16b)]('params'))??{};let _0x12c3ec=_0x864e8c;if(_0x536467['operation']===_0x5a1268(0x145)){const _0x14ef1b=parseUpdateIdsFromParams(_0x864e8c);_0x12c3ec=normalizeUpdateParamsForRuntime(_0x864e8c,_0x14ef1b);}return dryRun(_0x5a1268(0x15a),_0x5a1268(0x170)+_0x36d1ad+'/'+_0x536467[_0x5a1268(0x16a)])[_0x5a1268(0x158)](_0x12c3ec)[_0x5a1268(0x164)](_0x5a1268(0x156)+_0x536467[_0x5a1268(0x18f)]+_0x5a1268(0x146)+_0x36d1ad)['build']();}),_0x3c69e2;}export const dataDefinitions=[...specs['map'](makeDataCommand),dataImportExcel];function buildBatchUpdateResult(_0x18d3c6,_0x47d469){const _0x27df6e=a27_0x5722d3;return{'operation':_0x27df6e(0x145),'mode':_0x27df6e(0x17e),'ids':_0x18d3c6,'total':_0x18d3c6[_0x27df6e(0x155)],'result':_0x47d469};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a28_0x488b3a=a28_0x37e5;(function(_0x33dd72,_0x17076c){const _0x16318a=a28_0x37e5,_0x4139ec=_0x33dd72();while(!![]){try{const _0x13744e=parseInt(_0x16318a(0xac))/0x1+parseInt(_0x16318a(0x82))/0x2+-parseInt(_0x16318a(0xa8))/0x3+parseInt(_0x16318a(0x7d))/0x4+-parseInt(_0x16318a(0x90))/0x5+-parseInt(_0x16318a(0xa9))/0x6+parseInt(_0x16318a(0xb4))/0x7;if(_0x13744e===_0x17076c)break;else _0x4139ec['push'](_0x4139ec['shift']());}catch(_0x57899b){_0x4139ec['push'](_0x4139ec['shift']());}}}(a28_0x3ff9,0x67a2e));function a28_0x37e5(_0x443db0,_0x20fa08){_0x443db0=_0x443db0-0x6b;const _0x3ff971=a28_0x3ff9();let _0x37e57f=_0x3ff971[_0x443db0];return _0x37e57f;}import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';function isRecord(_0x17b339){const _0xd87f83=a28_0x37e5;return _0x17b339!==null&&typeof _0x17b339==='object'&&!Array[_0xd87f83(0xab)](_0x17b339);}function normalizeField(_0x1468c0){const _0x1f2b45=a28_0x37e5;if(_0x1468c0[_0x1f2b45(0x6e)])return null;const _0x467413=Boolean(_0x1468c0[_0x1f2b45(0x89)]!==undefined||_0x1468c0[_0x1f2b45(0x73)]!==undefined);let _0x99190a={};if(!_0x467413&&typeof _0x1468c0[_0x1f2b45(0x97)]===_0x1f2b45(0x76))try{_0x99190a=JSON['parse'](_0x1468c0[_0x1f2b45(0x97)]);}catch{}const _0x27ef50=_0x467413?_0x1468c0['name']:_0x1468c0[_0x1f2b45(0x80)],_0x398298=_0x467413?_0x1468c0[_0x1f2b45(0x89)]:_0x1468c0[_0x1f2b45(0x99)],_0x39079c=_0x467413?_0x1468c0['doType']:_0x1468c0[_0x1f2b45(0xa3)]||_0x1468c0[_0x1f2b45(0xa0)],_0x2e8013=_0x467413?_0x1468c0[_0x1f2b45(0xb3)]===!![]:_0x99190a['pkField']===!![],_0x1c84b5=_0x467413?_0x1468c0[_0x1f2b45(0xb1)]===!![]:_0x99190a['required']===!![],_0x13164a=_0x467413?_0x1468c0['options']??null:_0x99190a[_0x1f2b45(0x86)]??null,_0x14b806={'name':_0x27ef50,'displayName':_0x398298||_0x27ef50,'type':_0x39079c,'dbType':_0x1468c0[_0x1f2b45(0x6d)],'pk':_0x2e8013,'required':_0x1c84b5,'description':_0x1468c0[_0x1f2b45(0xb0)]||undefined};return Array[_0x1f2b45(0xab)](_0x13164a)&&_0x13164a['length']>0x0&&(_0x14b806['options']=_0x13164a),_0x14b806;}function parseJsonMaybe(_0x483970){const _0x3b833e=a28_0x37e5;if(typeof _0x483970!==_0x3b833e(0x76))return _0x483970;try{return JSON[_0x3b833e(0xa2)](_0x483970);}catch{return _0x483970;}}function normalizeOperationEntry(_0x5e1898,_0x4128d7){const _0x529319=a28_0x37e5;if(!_0x4128d7||typeof _0x4128d7!==_0x529319(0x83))return null;if(!_0x4128d7[_0x529319(0x8a)]||!_0x4128d7[_0x529319(0x9e)])return null;const _0x2f0e6c={'name':_0x5e1898,'method':_0x4128d7[_0x529319(0x8a)],'path':_0x4128d7[_0x529319(0x9e)]};if(_0x4128d7[_0x529319(0x6b)])_0x2f0e6c['host']=_0x4128d7['host'];if(_0x4128d7['requestBody']!=null)_0x2f0e6c['requestBody']=parseJsonMaybe(_0x4128d7[_0x529319(0x9b)]);if(_0x4128d7[_0x529319(0xad)]!=null)_0x2f0e6c[_0x529319(0xad)]=parseJsonMaybe(_0x4128d7[_0x529319(0xad)]);if(_0x4128d7[_0x529319(0xb2)]!=null)_0x2f0e6c['beforeScriptId']=_0x4128d7[_0x529319(0xb2)];if(_0x4128d7[_0x529319(0xa4)]!=null)_0x2f0e6c[_0x529319(0xa4)]=_0x4128d7[_0x529319(0xa4)];if(Array[_0x529319(0xab)](_0x4128d7[_0x529319(0x72)]))_0x2f0e6c[_0x529319(0x72)]=_0x4128d7[_0x529319(0x72)];if(Array[_0x529319(0xab)](_0x4128d7[_0x529319(0x8e)]))_0x2f0e6c['responseFields']=_0x4128d7[_0x529319(0x8e)];return _0x2f0e6c;}function summarizeDbtable(_0x1986bc){const _0x847c54=a28_0x37e5,_0x3c02cc={},_0x372748=[_0x847c54(0x8f),'dbName',_0x847c54(0x92),_0x847c54(0x74),'pkField','allFields',_0x847c54(0x88),_0x847c54(0x77),_0x847c54(0x70),'creatorIdField',_0x847c54(0xa7),_0x847c54(0x9f),_0x847c54(0x84),_0x847c54(0x98),'dblinkInfoDTO'];for(const _0x25cd77 of _0x372748){if(_0x1986bc[_0x25cd77]!==undefined)_0x3c02cc[_0x25cd77]=_0x1986bc[_0x25cd77];}return typeof _0x3c02cc[_0x847c54(0x7e)]===_0x847c54(0x76)&&_0x3c02cc['allFields']['length']>0x0&&(_0x3c02cc[_0x847c54(0xa6)]=_0x3c02cc[_0x847c54(0x7e)][_0x847c54(0x91)](',')[_0x847c54(0x93)](_0x492b55=>_0x492b55[_0x847c54(0x7a)]())['filter'](Boolean)),_0x3c02cc;}function normalizeRelatedPages(_0x2849e7){const _0x131882=a28_0x37e5;if(!Array[_0x131882(0xab)](_0x2849e7))return[];return _0x2849e7[_0x131882(0xa1)](_0x23fa7d=>_0x23fa7d&&typeof _0x23fa7d===_0x131882(0x83))[_0x131882(0x93)](_0x5c5fe2=>({'id':_0x5c5fe2['id'],'type':_0x5c5fe2['type'],'code':_0x5c5fe2[_0x131882(0x80)],'title':_0x5c5fe2['title'],'deleted':_0x5c5fe2[_0x131882(0x6e)]===!![]}));}function a28_0x3ff9(){const _0x28b31b=['responseBody','source','properties','description','required','beforeScriptId','pkField','5435024YmfELL','host','push','dbType','deleted','validateRules','updateTimeField','relatedPageInfoList','requestFields','doType','datasetKey','dbName','string','createTimeField','columnCodeListWithDeleted','fields','trim','entries','dbtableConfig','2795752FDRadg','allFields','Dataset\x20detail\x20must\x20be\x20an\x20object.','code','indexes','338316ZXFtrE','object','modifierNameField','sourceType','options','relations','logicField','displayName','method','formatRules','doVersion','apiError','responseFields','dbId','3555150HveAUK','split','tableName','map','find','read','length','extend','labelField','name','appCode','requestBody','modelId','dataset','path','modifierIdField','dataType','filter','parse','type','afterScriptId','Get\x20dataset\x20detail\x20including\x20fields,\x20relations,\x20and\x20operations','allFieldNames','creatorNameField','773871gzuuoT','4884288ZAYLpE','detail','isArray','563001NtNLvH'];a28_0x3ff9=function(){return _0x28b31b;};return a28_0x3ff9();}function normalizeFallbackFieldName(_0x13de75,_0xbe1b1a){const _0xbbd19b=a28_0x37e5,_0x2c6f17=_0x13de75[_0xbbd19b(0x7a)]();if(!_0x2c6f17)return null;return{'name':_0x2c6f17,'displayName':_0x2c6f17,'type':undefined,'dbType':undefined,'pk':_0x2c6f17===_0xbe1b1a,'required':![],'description':undefined};}async function loadListFieldFallback(_0x4d77e4,_0x4571a9){const _0x352abd=a28_0x37e5;if(!_0x4d77e4||!_0x4571a9)return[];try{const _0x20fc35=await listDatasets(_0x4d77e4,{'code':_0x4571a9}),_0x11bf69=_0x20fc35[_0x352abd(0x94)](_0xb4d6a4=>_0xb4d6a4[_0x352abd(0x80)]===_0x4571a9)??_0x20fc35[0x0],_0x41c7ab=_0x11bf69?.[_0x352abd(0x7c)]??{},_0x32d290=typeof _0x41c7ab[_0x352abd(0x7e)]==='string'?_0x41c7ab[_0x352abd(0x7e)][_0x352abd(0x91)](','):[];return _0x32d290[_0x352abd(0x93)](_0x1fee93=>normalizeFallbackFieldName(_0x1fee93,_0x41c7ab[_0x352abd(0xb3)]))[_0x352abd(0xa1)](_0xe91dad=>_0xe91dad!==null);}catch{return[];}}export const datasetDetail={'service':'dataset','command':a28_0x488b3a(0xaa),'description':a28_0x488b3a(0xa5),'risk':a28_0x488b3a(0x95),'flags':[CODE_FLAG],async 'execute'(_0x544470){const _0x2974e4=a28_0x488b3a,_0x228187=await getDatasetDetail(_0x544470['str'](_0x2974e4(0x80)));if(!isRecord(_0x228187))throw CliErrors[_0x2974e4(0x8d)](_0x2974e4(0x7f));const _0x57c008=Array[_0x2974e4(0xab)](_0x228187[_0x2974e4(0x79)])?_0x228187['fields']:Array[_0x2974e4(0xab)](_0x228187[_0x2974e4(0xaf)])?_0x228187[_0x2974e4(0xaf)]:[];let _0x475889=_0x57c008['map'](_0x146614=>normalizeField(_0x146614))[_0x2974e4(0xa1)](_0x8d0f2=>_0x8d0f2!==null);_0x475889['length']===0x0&&(_0x475889=await loadListFieldFallback(_0x544470[_0x2974e4(0x9a)],_0x544470['str'](_0x2974e4(0x80))));const _0x700241=_0x228187['operations']??{},_0xefb084=[];for(const [_0x1cab5b,_0x3c402d]of Object[_0x2974e4(0x7b)](_0x700241)){const _0x2869e3=normalizeOperationEntry(_0x1cab5b,_0x3c402d);if(_0x2869e3)_0xefb084[_0x2974e4(0x6c)](_0x2869e3);}const _0x198e2e=isRecord(_0x228187[_0x2974e4(0x7c)])?_0x228187[_0x2974e4(0x7c)]:{},_0x5bacc5=isRecord(_0x228187['dataset'])?_0x228187[_0x2974e4(0x9d)]:{},_0x5b6483=_0x198e2e[_0x2974e4(0x8f)]!=null?{'id':_0x198e2e[_0x2974e4(0x8f)],'name':_0x198e2e[_0x2974e4(0x75)]??null}:undefined;let _0xc19a11;return typeof _0x228187[_0x2974e4(0x97)]==='string'&&(_0xc19a11=parseJsonMaybe(_0x228187[_0x2974e4(0x97)])),{'ok':!![],'data':{'id':_0x228187[_0x2974e4(0x9c)]??_0x228187['id'],'name':_0x228187[_0x2974e4(0x99)],'code':_0x228187['modelCode']||_0x228187['code'],'doVersion':_0x228187[_0x2974e4(0x8c)],'description':_0x228187[_0x2974e4(0xb0)]||_0x5bacc5['tableComment']||undefined,'source':_0x228187[_0x2974e4(0xae)]||_0x5bacc5[_0x2974e4(0x85)],'table':_0x198e2e[_0x2974e4(0x92)]||_0x5bacc5[_0x2974e4(0x92)],'datasetKey':_0x198e2e[_0x2974e4(0x74)],'pk':_0x198e2e[_0x2974e4(0xb3)],'db':_0x5b6483,'dbtable':summarizeDbtable(_0x198e2e),'fields':_0x475889,'operations':_0xefb084,'indexes':Array[_0x2974e4(0xab)](_0x5bacc5[_0x2974e4(0x81)])?_0x5bacc5[_0x2974e4(0x81)]:[],'relations':_0x228187[_0x2974e4(0x87)]??null,'relatedPages':normalizeRelatedPages(_0x228187[_0x2974e4(0x71)]),...Array[_0x2974e4(0xab)](_0x228187[_0x2974e4(0x78)])?{'columnCodeListWithDeleted':_0x228187[_0x2974e4(0x78)]}:{},'formatRules':Array['isArray'](_0x228187[_0x2974e4(0x8b)])?_0x228187[_0x2974e4(0x8b)]:[],'validateRules':Array[_0x2974e4(0xab)](_0x228187[_0x2974e4(0x6f)])?_0x228187[_0x2974e4(0x6f)]:[],..._0xc19a11!==undefined?{'extend':_0xc19a11}:{},'stats':{'fieldCount':_0x475889['length'],'operationCount':_0xefb084[_0x2974e4(0x96)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a29_0x5072(_0x303c29,_0x1e6a5d){_0x303c29=_0x303c29-0x1b8;const _0x5f30cf=a29_0x5f30();let _0x50724f=_0x5f30cf[_0x303c29];return _0x50724f;}(function(_0x525659,_0x3b967f){const _0x59220e=a29_0x5072,_0x42a4b7=_0x525659();while(!![]){try{const _0x1599fc=-parseInt(_0x59220e(0x1be))/0x1*(-parseInt(_0x59220e(0x1b8))/0x2)+parseInt(_0x59220e(0x1bb))/0x3*(-parseInt(_0x59220e(0x1c1))/0x4)+parseInt(_0x59220e(0x1bc))/0x5+parseInt(_0x59220e(0x1ba))/0x6+-parseInt(_0x59220e(0x1c0))/0x7+parseInt(_0x59220e(0x1bd))/0x8+parseInt(_0x59220e(0x1b9))/0x9*(-parseInt(_0x59220e(0x1bf))/0xa);if(_0x1599fc===_0x3b967f)break;else _0x42a4b7['push'](_0x42a4b7['shift']());}catch(_0xc63b8f){_0x42a4b7['push'](_0x42a4b7['shift']());}}}(a29_0x5f30,0xd6b89));import{datasetList}from'../../commands/dataset/list.js';import{datasetDetail}from'../../commands/dataset/detail.js';function a29_0x5f30(){const _0x160777=['3735576yZCGZm','210315mADxTM','1277470ricRPh','2398208WRQuBZ','87251LMvzAW','14390AjSyWV','5378142nSKGFB','28pUGyPm','24UCczEm','540qiWVVP'];a29_0x5f30=function(){return _0x160777;};return a29_0x5f30();}import{datasetSdkDoc}from'../../commands/dataset/sdk-doc.js';export const datasetDefinitions=[datasetList,datasetDetail,datasetSdkDoc];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a30_0x1b12fe=a30_0x27d4;(function(_0x189e7e,_0x31b755){const _0x4a4126=a30_0x27d4,_0x4047b5=_0x189e7e();while(!![]){try{const _0x12ab96=-parseInt(_0x4a4126(0x1cd))/0x1+-parseInt(_0x4a4126(0x1cc))/0x2*(-parseInt(_0x4a4126(0x1e0))/0x3)+parseInt(_0x4a4126(0x1cf))/0x4+-parseInt(_0x4a4126(0x1d7))/0x5+parseInt(_0x4a4126(0x1e4))/0x6*(parseInt(_0x4a4126(0x1dd))/0x7)+-parseInt(_0x4a4126(0x1d9))/0x8+parseInt(_0x4a4126(0x1d6))/0x9;if(_0x12ab96===_0x31b755)break;else _0x4047b5['push'](_0x4047b5['shift']());}catch(_0x48c0cf){_0x4047b5['push'](_0x4047b5['shift']());}}}(a30_0x5615,0x77fad));import{listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function a30_0x27d4(_0x14efa7,_0x3dddba){_0x14efa7=_0x14efa7-0x1ca;const _0x56150c=a30_0x5615();let _0x27d493=_0x56150c[_0x14efa7];return _0x27d493;}function a30_0x5615(){const _0x51f7bb=['469536GMWZwQ','code','3780924NIXULr','appCode','dataset','allFields','str','split','Filter\x20by\x20physical\x20table\x20name\x20(server-side\x20prefix\x20match;\x20SQL\x20LIKE\x20wildcards\x20%\x20and\x20_\x20apply)','5381622zDPHbl','2536880NzRaMO','trim','6105592eOsMWc','string','pkField','name','9842pcuOAE','source','datasetKey','99489hbmjOd','list','map','dbtableConfig','2796eIwpVt','Filter\x20by\x20dataset\x20name\x20(server-side\x20fuzzy\x20match)','tableName','description','2RfnwXK'];a30_0x5615=function(){return _0x51f7bb;};return a30_0x5615();}export const datasetList={'service':a30_0x1b12fe(0x1d1),'command':a30_0x1b12fe(0x1e1),'description':'List\x20datasets\x20in\x20the\x20app\x20(server-side\x20name/code/table-name\x20filters\x20combine\x20with\x20AND)','risk':'read','flags':[{'name':a30_0x1b12fe(0x1dc),'type':a30_0x1b12fe(0x1da),'description':a30_0x1b12fe(0x1e5)},{'name':'table-name','type':a30_0x1b12fe(0x1da),'description':a30_0x1b12fe(0x1d5)},{...CODE_FLAG,'required':![],'description':'Filter\x20by\x20dataset\x20code\x20(server-side\x20exact\x20match)'}],async 'execute'(_0x2b072d){const _0x52b82c=a30_0x1b12fe,_0x836aee=_0x2b072d[_0x52b82c(0x1d3)](_0x52b82c(0x1dc)),_0x272f63=_0x2b072d['str']('code'),_0xbe5a9f=_0x2b072d[_0x52b82c(0x1d3)]('table-name'),_0x238075=await listDatasets(_0x2b072d[_0x52b82c(0x1d0)],{..._0x836aee&&{'name':_0x836aee},..._0x272f63&&{'code':_0x272f63},..._0xbe5a9f&&{'tableName':_0xbe5a9f}});return{'ok':!![],'data':{'total':_0x238075['length'],'datasets':_0x238075[_0x52b82c(0x1e2)](_0x1abd38=>{const _0x15665a=_0x52b82c,_0x3d23da=_0x1abd38[_0x15665a(0x1e3)]??{};return{'id':_0x1abd38['id'],'code':_0x1abd38[_0x15665a(0x1ce)],'name':_0x1abd38[_0x15665a(0x1dc)],'source':_0x1abd38[_0x15665a(0x1de)],'description':_0x1abd38[_0x15665a(0x1cb)],'table':_0x3d23da[_0x15665a(0x1ca)],'datasetKey':_0x3d23da[_0x15665a(0x1df)],'pk':_0x3d23da[_0x15665a(0x1db)],'fields':_0x3d23da[_0x15665a(0x1d2)]?_0x3d23da[_0x15665a(0x1d2)][_0x15665a(0x1d4)](',')[_0x15665a(0x1e2)](_0x46b2df=>_0x46b2df[_0x15665a(0x1d8)]()):[]};})}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a31_0xeddc2=a31_0x4f1e;(function(_0x3b8423,_0x4418b7){const _0x42a9b8=a31_0x4f1e,_0x3e21ae=_0x3b8423();while(!![]){try{const _0x5dd506=-parseInt(_0x42a9b8(0x1f7))/0x1*(-parseInt(_0x42a9b8(0x1ec))/0x2)+-parseInt(_0x42a9b8(0x1f5))/0x3*(parseInt(_0x42a9b8(0x1f9))/0x4)+parseInt(_0x42a9b8(0x1e8))/0x5*(-parseInt(_0x42a9b8(0x1ee))/0x6)+-parseInt(_0x42a9b8(0x1fa))/0x7+parseInt(_0x42a9b8(0x1eb))/0x8*(-parseInt(_0x42a9b8(0x1f6))/0x9)+-parseInt(_0x42a9b8(0x1f3))/0xa+parseInt(_0x42a9b8(0x1f8))/0xb;if(_0x5dd506===_0x4418b7)break;else _0x3e21ae['push'](_0x3e21ae['shift']());}catch(_0x136629){_0x3e21ae['push'](_0x3e21ae['shift']());}}}(a31_0x3fc6,0x68f14));function a31_0x4f1e(_0x352793,_0x13d9d4){_0x352793=_0x352793-0x1e8;const _0x3fc658=a31_0x3fc6();let _0x4f1e9c=_0x3fc658[_0x352793];return _0x4f1e9c;}import{getDatasetSdkUsageDoc}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';const DEFAULT_MARKDOWN=a31_0xeddc2(0x1ed);export function formatDatasetSdkMarkdown(_0x470eb3){const _0x238788=a31_0xeddc2,_0x213c7c=typeof _0x470eb3===_0x238788(0x1f0)?_0x470eb3['trim']():'';return _0x213c7c||DEFAULT_MARKDOWN;}export const datasetSdkDoc={'service':'dataset','command':a31_0xeddc2(0x1f2),'description':a31_0xeddc2(0x1ea),'risk':a31_0xeddc2(0x1f4),'flags':[{...CODE_FLAG,'description':a31_0xeddc2(0x1ef)}],async 'execute'(_0x546d5c){const _0xe25c63=a31_0xeddc2,_0x148141=_0x546d5c[_0xe25c63(0x1f1)]('code'),_0x7878b2=await getDatasetSdkUsageDoc(_0x148141,_0x546d5c['appCode']);return{'ok':!![],'data':{'code':_0x148141,'appCode':_0x546d5c[_0xe25c63(0x1e9)],'markdown':formatDatasetSdkMarkdown(_0x7878b2)}};}};function a31_0x3fc6(){const _0x1a775f=['Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.','string','str','sdk-doc','7547150wlAhdv','read','21WWKCBg','9OMCfPM','558696NcHVjm','28874505jUOjtn','434604mYSUqq','3076423tgnPrl','5qCIFvO','appCode','Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','5779576sWtief','2jyIPxC','#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0aNo\x20SDK\x20usage\x20documentation\x20is\x20available.','459594oQxkzX'];a31_0x3fc6=function(){return _0x1a775f;};return a31_0x3fc6();}
|
package/lib/commands/doctor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a32_0x3f3da0=a32_0x50bd;(function(_0x1051d2,_0x3b095e){const _0x4c05e8=a32_0x50bd,_0x2d1a1e=_0x1051d2();while(!![]){try{const _0x5a1155=parseInt(_0x4c05e8(0x1e5))/0x1+-parseInt(_0x4c05e8(0x1f2))/0x2+-parseInt(_0x4c05e8(0x1b6))/0x3+-parseInt(_0x4c05e8(0x1b8))/0x4*(-parseInt(_0x4c05e8(0x1b1))/0x5)+parseInt(_0x4c05e8(0x191))/0x6+parseInt(_0x4c05e8(0x19f))/0x7*(-parseInt(_0x4c05e8(0x1e1))/0x8)+-parseInt(_0x4c05e8(0x1d9))/0x9;if(_0x5a1155===_0x3b095e)break;else _0x2d1a1e['push'](_0x2d1a1e['shift']());}catch(_0x4c7db2){_0x2d1a1e['push'](_0x2d1a1e['shift']());}}}(a32_0x177f,0xd169b));import a32_0x4db792 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';function a32_0x50bd(_0x4cc4d9,_0x211a68){_0x4cc4d9=_0x4cc4d9-0x179;const _0x177f61=a32_0x177f();let _0x50bd72=_0x177f61[_0x4cc4d9];return _0x50bd72;}import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{getCliVersion}from'../utils/version.js';import{getApiDomain,getKbServiceDomain,getRuntimeDomain,getSkillDomain,getUserDomain}from'../constant/domain.js';import{normalizeLovrabetRegion}from'../constant/region.js';import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile,loadRawConfigLayers}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{inspectServiceRegistry}from'../commands/service/registry.js';import{inspectBuiltinSkill}from'../skills/builtin-skill.js';function a32_0x177f(){const _0x233035=['\x20config','\x20\x20Installed\x20Path:\x20\x20','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','(no\x20file)','\x20\x20Config\x20Files','\x20\x20app\x20locale:\x20\x20\x20\x20\x20\x20','call','empty','includes','length','✗\x20Invalid','\x20doctor','check','project','1498329bXlsFH','⚠\x20Empty\x20(treated\x20as\x20{})','(missing)','arch','prototype','reason','current','green','24CEZoBr','doctor','\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20(accessKey)','1290722fPIdkR','bold','\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','routing','not\x20configured','services','✓\x20Loaded','✗\x20Invalid\x20JSON','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','red','\x20\x20runtimeDomain:\x20\x20\x20','appcode','repeat','2350092MUdjwn','\x20\x20Built-in\x20Skill','\x20config\x20delete\x20routing','\x20\x20AK\x20source:\x20\x20\x20\x20\x20\x20\x20','Global','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','commandCount','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Merged\x20Config','skillVersion','⚠\x20Empty','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','inherit','pageSize','state','(default)','Diagnose\x20CLI\x20configuration\x20and\x20environment','\x20\x20Package\x20Version:\x20','accessKey','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','format','locale','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','filter','verbose','(none)','region','serviceCode','Project','read','projectConfig','platform','\x20config\x20delete\x20routing\x20--global','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','ClientAk','3908646ykUMXY','\x20\x20Config\x20JSON','app','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','\x20\x20auth\x20(effective):\x20','(set,\x20length=','repairCommand','defaultApp','accessKeySource','name','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','gray','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','581378xKyoVK','source','\x20config\x20delete\x20inherit\x20--global','\x20\x20Repair\x20global:\x20\x20\x20\x20','\x20\x20Service\x20Tree','\x20config\x20init','str','globalConfig','installedPath','(not\x20found)','Unavailable\x20until\x20routing\x20configuration\x20is\x20repaired','yellow','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','riskLevel','(default:\x20','\x20\x20─','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','385ngqILb','\x20\x20region:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Auth','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','(unnamed)','2059578MPymCG','\x20Imported\x20from:\x20','61964qmdddW','join','path','\x20\x20Repair\x20global:\x20\x20\x20','global','\x20\x20API\x20Endpoints','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','✓\x20Valid\x20JSON','status','log','env','appCode','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','missing','serviceCount','message','hasOwnProperty','padEnd','\x20\x20Legacy\x20inherit:\x20\x20\x20'];a32_0x177f=function(){return _0x233035;};return a32_0x177f();}async function execute(_0x4f4ed2){const _0x550326=a32_0x50bd,_0x3d3d9a=getCliVersion(),_0x238a39=buildConfigFromFlags({'app':_0x4f4ed2[_0x550326(0x1a5)]?.(_0x550326(0x193)),'appcode':_0x4f4ed2[_0x550326(0x1a5)]?.(_0x550326(0x1f0)),'env':_0x4f4ed2[_0x550326(0x1a5)]?.(_0x550326(0x1c2))});let _0x68293c,_0x259ccb;try{_0x68293c=normalizeLovrabetRegion(_0x238a39['raw'][_0x550326(0x188)]);}catch(_0x450901){_0x259ccb=_0x450901 instanceof Error?_0x450901:new Error(String(_0x450901));}let _0x31d121;if(!_0x259ccb)try{await initGlobalEnvironment(_0x238a39);}catch(_0x565ae6){_0x31d121=_0x565ae6 instanceof Error?_0x565ae6:new Error(String(_0x565ae6));}console[_0x550326(0x1c1)](),console['log'](a32_0x4db792[_0x550326(0x1e6)](CLI_BIN_NAME+_0x550326(0x1d6))),console[_0x550326(0x1c1)](a32_0x4db792['gray']('─'[_0x550326(0x1f1)](0x32))),console['log']('\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20'+_0x3d3d9a),console[_0x550326(0x1c1)](_0x550326(0x1ab)+process['version']),console[_0x550326(0x1c1)](_0x550326(0x1f7)+process[_0x550326(0x18d)]+'\x20'+process[_0x550326(0x1dc)]);const _0x359c61=inspectBuiltinSkill();console['log'](),console['log'](a32_0x4db792['bold'](_0x550326(0x1f3))),console[_0x550326(0x1c1)](a32_0x4db792[_0x550326(0x19d)](_0x550326(0x1ae)[_0x550326(0x1f1)](0x1e))),console[_0x550326(0x1c1)](_0x550326(0x1e3)+(_0x359c61['state']===_0x550326(0x1df)?a32_0x4db792[_0x550326(0x1e0)]('✓\x20current'):a32_0x4db792[_0x550326(0x1ee)]('✗\x20'+_0x359c61[_0x550326(0x17c)]))),console['log'](_0x550326(0x17f)+_0x359c61['packageVersion']),console['log']('\x20\x20Skill\x20Version:\x20\x20\x20'+(_0x359c61[_0x550326(0x1fb)]||a32_0x4db792[_0x550326(0x19d)](_0x550326(0x1db)))),console[_0x550326(0x1c1)](_0x550326(0x1cc)+(_0x359c61[_0x550326(0x1a7)]||a32_0x4db792[_0x550326(0x19d)](_0x550326(0x1a8))));_0x359c61[_0x550326(0x17c)]!==_0x550326(0x1df)&&console[_0x550326(0x1c1)](_0x550326(0x1e7)+_0x359c61[_0x550326(0x197)]);_0x359c61[_0x550326(0x1de)]&&console[_0x550326(0x1c1)]('\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x359c61[_0x550326(0x1de)]);console[_0x550326(0x1c1)](),console['log'](a32_0x4db792[_0x550326(0x1e6)](_0x550326(0x1cf))),console[_0x550326(0x1c1)](a32_0x4db792[_0x550326(0x19d)](_0x550326(0x1ae)[_0x550326(0x1f1)](0x1e)));const _0x25593c=getGlobalConfigPath(),_0x3e49c4=getProjectConfigPath();console[_0x550326(0x1c1)](_0x550326(0x179)+(_0x25593c||a32_0x4db792['gray'](_0x550326(0x1a8)))),console[_0x550326(0x1c1)](_0x550326(0x1f9)+(_0x3e49c4||a32_0x4db792[_0x550326(0x19d)](_0x550326(0x1a8)))),console['log'](),console[_0x550326(0x1c1)](a32_0x4db792[_0x550326(0x1e6)](_0x550326(0x192))),console[_0x550326(0x1c1)](a32_0x4db792[_0x550326(0x19d)](_0x550326(0x1ae)[_0x550326(0x1f1)](0x1e)));const _0x21b5d7=(_0x2957a0,_0x5cf2e4)=>{const _0x222f91=_0x550326;if(!_0x5cf2e4){console[_0x222f91(0x1c1)]('\x20\x20'+_0x2957a0[_0x222f91(0x1c9)](0x11)+'\x20'+a32_0x4db792[_0x222f91(0x19d)](_0x222f91(0x1ce)));return;}const _0x1a63f6=inspectCliConfigJsonFile(_0x5cf2e4);if(_0x1a63f6[_0x222f91(0x1c0)]==='ok')console[_0x222f91(0x1c1)]('\x20\x20'+_0x2957a0[_0x222f91(0x1c9)](0x11)+'\x20'+a32_0x4db792['green'](_0x222f91(0x1bf)));else{if(_0x1a63f6[_0x222f91(0x1c0)]===_0x222f91(0x1d2))console[_0x222f91(0x1c1)]('\x20\x20'+_0x2957a0['padEnd'](0x11)+'\x20'+a32_0x4db792[_0x222f91(0x1aa)](_0x222f91(0x1da)));else _0x1a63f6[_0x222f91(0x1c0)]===_0x222f91(0x1c5)?console['log']('\x20\x20'+_0x2957a0[_0x222f91(0x1c9)](0x11)+'\x20'+a32_0x4db792['gray'](_0x222f91(0x1db))):(console[_0x222f91(0x1c1)]('\x20\x20'+_0x2957a0[_0x222f91(0x1c9)](0x11)+'\x20'+a32_0x4db792['red'](_0x222f91(0x1ec))),console[_0x222f91(0x1c1)]('\x20\x20'+''[_0x222f91(0x1c9)](0x11)+'\x20'+a32_0x4db792[_0x222f91(0x1ee)](_0x1a63f6['message'])));}};_0x21b5d7(_0x550326(0x1f6),_0x25593c),_0x21b5d7(_0x550326(0x18a),_0x3e49c4);const _0x2b239d=loadRawConfigLayers(),_0x16b02b=[Object['prototype'][_0x550326(0x1c8)][_0x550326(0x1d1)](_0x2b239d[_0x550326(0x1a6)],_0x550326(0x17a))?_0x550326(0x1bc):null,Object[_0x550326(0x1dd)]['hasOwnProperty']['call'](_0x2b239d[_0x550326(0x18c)],_0x550326(0x17a))?'project':null][_0x550326(0x185)](Boolean);_0x16b02b[_0x550326(0x1d4)]>0x0&&(console[_0x550326(0x1c1)](_0x550326(0x1ca)+a32_0x4db792['yellow']('ignored\x20in\x20'+_0x16b02b[_0x550326(0x1b9)]('\x20+\x20')+_0x550326(0x1cb))),_0x16b02b[_0x550326(0x1d3)](_0x550326(0x1d8))&&console[_0x550326(0x1c1)]('\x20\x20Repair\x20project:\x20\x20\x20'+CLI_BIN_NAME+'\x20config\x20delete\x20inherit'),_0x16b02b[_0x550326(0x1d3)](_0x550326(0x1bc))&&console[_0x550326(0x1c1)](_0x550326(0x1a2)+CLI_BIN_NAME+_0x550326(0x1a1)));_0x31d121&&(console[_0x550326(0x1c1)](),console[_0x550326(0x1c1)](a32_0x4db792[_0x550326(0x1e6)]('\x20\x20Routing\x20Configuration')),console[_0x550326(0x1c1)](a32_0x4db792[_0x550326(0x19d)](_0x550326(0x1ae)[_0x550326(0x1f1)](0x1e))),console[_0x550326(0x1c1)](_0x550326(0x19b)+a32_0x4db792['red'](_0x550326(0x1d5))),console[_0x550326(0x1c1)]('\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x31d121['message']),Object['prototype'][_0x550326(0x1c8)][_0x550326(0x1d1)](_0x2b239d['projectConfig'],_0x550326(0x1e8))&&console[_0x550326(0x1c1)]('\x20\x20Repair\x20project:\x20\x20'+CLI_BIN_NAME+_0x550326(0x1f4)),Object['prototype']['hasOwnProperty'][_0x550326(0x1d1)](_0x2b239d[_0x550326(0x1a6)],_0x550326(0x1e8))&&console['log'](_0x550326(0x1bb)+CLI_BIN_NAME+_0x550326(0x18e)));_0x259ccb&&(console[_0x550326(0x1c1)](),console['log'](a32_0x4db792['bold']('\x20\x20Country/Region\x20Configuration')),console[_0x550326(0x1c1)](a32_0x4db792[_0x550326(0x19d)]('\x20\x20─'[_0x550326(0x1f1)](0x1e))),console['log']('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a32_0x4db792[_0x550326(0x1ee)]('✗\x20Invalid')),console[_0x550326(0x1c1)]('\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x259ccb['message']),Object[_0x550326(0x1dd)][_0x550326(0x1c8)][_0x550326(0x1d1)](_0x2b239d['projectConfig'],_0x550326(0x188))&&console['log']('\x20\x20Repair\x20project:\x20\x20'+CLI_BIN_NAME+'\x20config\x20delete\x20region'),Object[_0x550326(0x1dd)]['hasOwnProperty'][_0x550326(0x1d1)](_0x2b239d[_0x550326(0x1a6)],_0x550326(0x188))&&console[_0x550326(0x1c1)]('\x20\x20Repair\x20global:\x20\x20\x20'+CLI_BIN_NAME+_0x550326(0x1a4)));console['log'](),console[_0x550326(0x1c1)](a32_0x4db792['bold'](_0x550326(0x1fa))),console[_0x550326(0x1c1)](a32_0x4db792[_0x550326(0x19d)](_0x550326(0x1ae)[_0x550326(0x1f1)](0x1e))),console['log'](_0x550326(0x1be)+(_0x238a39[_0x550326(0x1c3)]||a32_0x4db792[_0x550326(0x1ee)]('(not\x20set)'))),console['log'](_0x550326(0x1b2)+(_0x68293c??a32_0x4db792[_0x550326(0x1ee)]('(invalid)'))),console[_0x550326(0x1c1)](_0x550326(0x1d0)+_0x238a39[_0x550326(0x183)]),console[_0x550326(0x1c1)](_0x550326(0x1cd)+(_0x238a39[_0x550326(0x198)]||a32_0x4db792['gray'](_0x550326(0x187)))),console['log'](_0x550326(0x1ed)+(_0x238a39['currentApp']||a32_0x4db792['gray']('(none)'))),console[_0x550326(0x1c1)](_0x550326(0x1b0)+(_0x238a39['format']||a32_0x4db792['gray'](_0x550326(0x1ad)+DEFAULT_CONFIG_VALUES[_0x550326(0x182)]+')'))),console[_0x550326(0x1c1)](_0x550326(0x1b4)+(_0x238a39[_0x550326(0x17b)]??a32_0x4db792[_0x550326(0x19d)](_0x550326(0x17d)))),console[_0x550326(0x1c1)](_0x550326(0x1af)+_0x238a39[_0x550326(0x1ac)]),console[_0x550326(0x1c1)](_0x550326(0x181)+_0x238a39[_0x550326(0x186)]),console[_0x550326(0x1c1)](_0x550326(0x195)+AUTH_MODE[_0x550326(0x190)]);if(_0x238a39[_0x550326(0x199)])console[_0x550326(0x1c1)](_0x550326(0x1f5)+_0x238a39[_0x550326(0x199)]);console[_0x550326(0x1c1)](_0x550326(0x184)+(_0x238a39['accessKey']?a32_0x4db792['green'](_0x550326(0x196)+_0x238a39[_0x550326(0x180)][_0x550326(0x1d4)]+')'):a32_0x4db792[_0x550326(0x19d)]('(none)'))),console[_0x550326(0x1c1)](),console['log'](a32_0x4db792[_0x550326(0x1e6)](_0x550326(0x1bd))),console['log'](a32_0x4db792[_0x550326(0x19d)]('\x20\x20─'[_0x550326(0x1f1)](0x1e)));_0x31d121||_0x259ccb?console[_0x550326(0x1c1)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a32_0x4db792[_0x550326(0x1ee)](_0x550326(0x1a9))):(console['log'](_0x550326(0x194)+getApiDomain()),console[_0x550326(0x1c1)](_0x550326(0x19e)+getUserDomain()),console[_0x550326(0x1c1)](_0x550326(0x1ef)+getRuntimeDomain()),console['log']('\x20\x20skillDomain:\x20\x20\x20\x20\x20'+getSkillDomain()),console['log']('\x20\x20kbServiceDomain:\x20'+(getKbServiceDomain()??_0x550326(0x1e9))));console['log'](),console[_0x550326(0x1c1)](a32_0x4db792['bold'](_0x550326(0x1a3))),console[_0x550326(0x1c1)](a32_0x4db792[_0x550326(0x19d)](_0x550326(0x1ae)[_0x550326(0x1f1)](0x1e)));const _0x4b652b=inspectServiceRegistry();console[_0x550326(0x1c1)](_0x550326(0x19c)+_0x4b652b['registryPath']),console[_0x550326(0x1c1)](_0x550326(0x19b)+formatServiceRegistryStatus(_0x4b652b)),console[_0x550326(0x1c1)]('\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x4b652b[_0x550326(0x1c6)]),console[_0x550326(0x1c1)](_0x550326(0x18f)+_0x4b652b[_0x550326(0x1f8)]);for(const _0x405bf2 of _0x4b652b[_0x550326(0x1ea)]){console[_0x550326(0x1c1)]('\x20\x20'+(_0x405bf2[_0x550326(0x189)]+':')[_0x550326(0x1c9)](0x11)+'\x20'+(_0x405bf2[_0x550326(0x19a)]||a32_0x4db792['gray'](_0x550326(0x1b5)))+'\x20('+_0x405bf2[_0x550326(0x1f8)]+'\x20commands)'),console[_0x550326(0x1c1)]('\x20\x20'+''[_0x550326(0x1c9)](0x11)+_0x550326(0x1b7)+_0x405bf2[_0x550326(0x1a0)][_0x550326(0x1ba)]);}return console['log'](),console[_0x550326(0x1c1)](a32_0x4db792['bold'](_0x550326(0x1b3))),console[_0x550326(0x1c1)](a32_0x4db792['gray'](_0x550326(0x1ae)[_0x550326(0x1f1)](0x1e))),console[_0x550326(0x1c1)](_0x550326(0x1c4)+a32_0x4db792[_0x550326(0x1e0)](AUTH_MODE[_0x550326(0x190)]+_0x550326(0x1e4))),console[_0x550326(0x1c1)]('\x20\x20Session\x20check:\x20\x20\x20'+a32_0x4db792[_0x550326(0x19d)]('(removed\x20—\x20cookie\x20auth\x20disabled)')),console[_0x550326(0x1c1)](),{'ok':!![]};}function formatServiceRegistryStatus(_0x19be39){const _0x51d224=a32_0x50bd;if(_0x19be39[_0x51d224(0x1c0)]==='ok')return a32_0x4db792['green'](_0x51d224(0x1eb));if(_0x19be39['status']===_0x51d224(0x1c5))return a32_0x4db792[_0x51d224(0x19d)](_0x51d224(0x1a8));if(_0x19be39[_0x51d224(0x1c0)]==='empty')return a32_0x4db792[_0x51d224(0x1aa)](_0x51d224(0x1fc));return a32_0x4db792['red'](_0x51d224(0x1d5)+(_0x19be39['message']?':\x20'+_0x19be39[_0x51d224(0x1c7)]:''));}export const doctorDefinition={'service':a32_0x3f3da0(0x1e2),'command':a32_0x3f3da0(0x1d7),'description':a32_0x3f3da0(0x17e),'risk':a32_0x3f3da0(0x18b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
1
|
+
function a32_0x233a(){const _0xcfc05=['\x20\x20Legacy\x20inherit:\x20\x20\x20','\x20\x20runtimeDomain:\x20\x20\x20','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','str','\x20\x20API\x20Endpoints','reason','(missing)','projectConfig','status','repeat','\x20\x20region:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(set,\x20length=','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','services','bold','\x20\x20AK\x20source:\x20\x20\x20\x20\x20\x20\x20','✗\x20Invalid','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20(accessKey)','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','check','✓\x20current','\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','arch','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Auth','7465710rGgIHH','Project','\x20+\x20','currentApp','repairCommand','log','(none)','locale','env','\x20\x20Merged\x20Config','globalConfig','verbose','accessKey','region','read','82556BFXpGj','\x20config\x20delete\x20inherit','\x20\x20Routing\x20Configuration','\x20\x20Installed\x20Path:\x20\x20','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','✓\x20Loaded','routing','packageVersion','yellow','app','accessKeySource','\x20\x20kbServiceDomain:\x20','includes','call','\x20\x20Repair\x20project:\x20\x20\x20','\x20\x20Session\x20check:\x20\x20\x20','(not\x20set)','padEnd','commandCount','current','doctor','(removed\x20—\x20cookie\x20auth\x20disabled)','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','928765uHltYm','global','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','5048830reAIJY','\x20config','⚠\x20Empty\x20(treated\x20as\x20{})','message','join','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','(default:\x20','not\x20configured','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','format','\x20config\x20delete\x20region','\x20Imported\x20from:\x20','(not\x20found)','empty','\x20\x20Repair\x20project:\x20\x20','defaultApp','\x20\x20Skill\x20Version:\x20\x20\x20','\x20\x20auth\x20(effective):\x20','gray','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','state','\x20\x20─','raw','\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','6965938zqvZLr','(invalid)','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','2KflSBT','red','length','missing','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','2779971eEtFDQ','\x20config\x20init','\x20config\x20delete\x20inherit\x20--global','inherit','⚠\x20Empty','hasOwnProperty','filter','Unavailable\x20until\x20routing\x20configuration\x20is\x20repaired','\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','path','\x20\x20Repair\x20global:\x20\x20\x20','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Built-in\x20Skill','project','skillVersion','green','\x20doctor','prototype','\x20config\x20delete\x20routing\x20--global','\x20\x20Config\x20Files','registryPath','18076720UYeKsn','\x20commands)','(no\x20file)','\x20\x20Service\x20Tree','(default)','ClientAk','\x20\x20Package\x20Version:\x20'];a32_0x233a=function(){return _0xcfc05;};return a32_0x233a();}const a32_0x38096d=a32_0x2dde;(function(_0x1fba49,_0x5ae0fc){const _0x472ab6=a32_0x2dde,_0x42720d=_0x1fba49();while(!![]){try{const _0x4c5f71=parseInt(_0x472ab6(0x18b))/0x1+-parseInt(_0x472ab6(0x1a9))/0x2*(-parseInt(_0x472ab6(0x1ae))/0x3)+-parseInt(_0x472ab6(0x174))/0x4+-parseInt(_0x472ab6(0x18e))/0x5+parseInt(_0x472ab6(0x165))/0x6+parseInt(_0x472ab6(0x1a6))/0x7+-parseInt(_0x472ab6(0x1c3))/0x8;if(_0x4c5f71===_0x5ae0fc)break;else _0x42720d['push'](_0x42720d['shift']());}catch(_0x2dcb6a){_0x42720d['push'](_0x42720d['shift']());}}}(a32_0x233a,0xc47ee));import a32_0x54adbc from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{getCliVersion}from'../utils/version.js';import{getApiDomain,getKbServiceDomain,getRuntimeDomain,getSkillDomain,getUserDomain}from'../constant/domain.js';import{normalizeLovrabetRegion}from'../constant/region.js';import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile,loadRawConfigLayers}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{inspectServiceRegistry}from'../commands/service/registry.js';import{inspectBuiltinSkill}from'../skills/builtin-skill.js';function a32_0x2dde(_0x45a368,_0x5014f5){_0x45a368=_0x45a368-0x151;const _0x233af9=a32_0x233a();let _0x2ddeae=_0x233af9[_0x45a368];return _0x2ddeae;}async function execute(_0x1b8cca){const _0x570434=a32_0x2dde,_0x2c182f=getCliVersion(),_0x315825=buildConfigFromFlags({'app':_0x1b8cca['str']?.(_0x570434(0x17d)),'appcode':_0x1b8cca[_0x570434(0x1cd)]?.('appcode'),'env':_0x1b8cca[_0x570434(0x1cd)]?.(_0x570434(0x16d))});let _0x15a528,_0x908a83;try{_0x15a528=normalizeLovrabetRegion(_0x315825[_0x570434(0x1a4)][_0x570434(0x172)]);}catch(_0x17e1f9){_0x908a83=_0x17e1f9 instanceof Error?_0x17e1f9:new Error(String(_0x17e1f9));}let _0x5992bb;if(!_0x908a83)try{await initGlobalEnvironment(_0x315825);}catch(_0x1cb29d){_0x5992bb=_0x1cb29d instanceof Error?_0x1cb29d:new Error(String(_0x1cb29d));}console[_0x570434(0x16a)](),console[_0x570434(0x16a)](a32_0x54adbc[_0x570434(0x158)](CLI_BIN_NAME+_0x570434(0x1be))),console[_0x570434(0x16a)](a32_0x54adbc['gray']('─'[_0x570434(0x152)](0x32))),console['log'](_0x570434(0x193)+_0x2c182f),console[_0x570434(0x16a)](_0x570434(0x1cc)+process['version']),console['log'](_0x570434(0x1b9)+process['platform']+'\x20'+process[_0x570434(0x162)]);const _0x169b95=inspectBuiltinSkill();console[_0x570434(0x16a)](),console[_0x570434(0x16a)](a32_0x54adbc[_0x570434(0x158)](_0x570434(0x1ba))),console[_0x570434(0x16a)](a32_0x54adbc[_0x570434(0x1a0)](_0x570434(0x1a3)['repeat'](0x1e))),console[_0x570434(0x16a)](_0x570434(0x1b6)+(_0x169b95[_0x570434(0x1a2)]===_0x570434(0x187)?a32_0x54adbc[_0x570434(0x1bd)](_0x570434(0x160)):a32_0x54adbc[_0x570434(0x1aa)]('✗\x20'+_0x169b95['state']))),console[_0x570434(0x16a)](_0x570434(0x1c9)+_0x169b95[_0x570434(0x17b)]),console[_0x570434(0x16a)](_0x570434(0x19e)+(_0x169b95[_0x570434(0x1bc)]||a32_0x54adbc[_0x570434(0x1a0)](_0x570434(0x1d0)))),console[_0x570434(0x16a)](_0x570434(0x177)+(_0x169b95['installedPath']||a32_0x54adbc[_0x570434(0x1a0)](_0x570434(0x19a))));_0x169b95[_0x570434(0x1a2)]!==_0x570434(0x187)&&console[_0x570434(0x16a)](_0x570434(0x161)+_0x169b95[_0x570434(0x169)]);_0x169b95[_0x570434(0x1cf)]&&console['log']('\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x169b95[_0x570434(0x1cf)]);console[_0x570434(0x16a)](),console[_0x570434(0x16a)](a32_0x54adbc[_0x570434(0x158)](_0x570434(0x1c1))),console[_0x570434(0x16a)](a32_0x54adbc[_0x570434(0x1a0)](_0x570434(0x1a3)['repeat'](0x1e)));const _0xa22c3b=getGlobalConfigPath(),_0x205988=getProjectConfigPath();console[_0x570434(0x16a)]('\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0xa22c3b||a32_0x54adbc[_0x570434(0x1a0)](_0x570434(0x19a)))),console[_0x570434(0x16a)]('\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x205988||a32_0x54adbc['gray']('(not\x20found)'))),console['log'](),console[_0x570434(0x16a)](a32_0x54adbc[_0x570434(0x158)]('\x20\x20Config\x20JSON')),console['log'](a32_0x54adbc['gray'](_0x570434(0x1a3)[_0x570434(0x152)](0x1e)));const _0x9796d7=(_0x16cb73,_0x19efc1)=>{const _0x50a969=_0x570434;if(!_0x19efc1){console[_0x50a969(0x16a)]('\x20\x20'+_0x16cb73[_0x50a969(0x185)](0x11)+'\x20'+a32_0x54adbc[_0x50a969(0x1a0)](_0x50a969(0x1c5)));return;}const _0x1263d8=inspectCliConfigJsonFile(_0x19efc1);if(_0x1263d8['status']==='ok')console[_0x50a969(0x16a)]('\x20\x20'+_0x16cb73[_0x50a969(0x185)](0x11)+'\x20'+a32_0x54adbc[_0x50a969(0x1bd)]('✓\x20Valid\x20JSON'));else{if(_0x1263d8[_0x50a969(0x151)]===_0x50a969(0x19b))console[_0x50a969(0x16a)]('\x20\x20'+_0x16cb73[_0x50a969(0x185)](0x11)+'\x20'+a32_0x54adbc[_0x50a969(0x17c)](_0x50a969(0x190)));else _0x1263d8['status']===_0x50a969(0x1ac)?console[_0x50a969(0x16a)]('\x20\x20'+_0x16cb73[_0x50a969(0x185)](0x11)+'\x20'+a32_0x54adbc[_0x50a969(0x1a0)]('(missing)')):(console[_0x50a969(0x16a)]('\x20\x20'+_0x16cb73[_0x50a969(0x185)](0x11)+'\x20'+a32_0x54adbc[_0x50a969(0x1aa)]('✗\x20Invalid\x20JSON')),console[_0x50a969(0x16a)]('\x20\x20'+''[_0x50a969(0x185)](0x11)+'\x20'+a32_0x54adbc[_0x50a969(0x1aa)](_0x1263d8['message'])));}};_0x9796d7('Global',_0xa22c3b),_0x9796d7(_0x570434(0x166),_0x205988);const _0xaafb4c=loadRawConfigLayers(),_0x5b26fa=[Object[_0x570434(0x1bf)]['hasOwnProperty']['call'](_0xaafb4c['globalConfig'],'inherit')?_0x570434(0x18c):null,Object[_0x570434(0x1bf)][_0x570434(0x1b3)]['call'](_0xaafb4c[_0x570434(0x1d1)],_0x570434(0x1b1))?_0x570434(0x1bb):null][_0x570434(0x1b4)](Boolean);_0x5b26fa['length']>0x0&&(console['log'](_0x570434(0x1ca)+a32_0x54adbc[_0x570434(0x17c)]('ignored\x20in\x20'+_0x5b26fa[_0x570434(0x192)](_0x570434(0x167))+_0x570434(0x18f))),_0x5b26fa[_0x570434(0x180)](_0x570434(0x1bb))&&console[_0x570434(0x16a)](_0x570434(0x182)+CLI_BIN_NAME+_0x570434(0x175)),_0x5b26fa[_0x570434(0x180)](_0x570434(0x18c))&&console[_0x570434(0x16a)]('\x20\x20Repair\x20global:\x20\x20\x20\x20'+CLI_BIN_NAME+_0x570434(0x1b0)));_0x5992bb&&(console[_0x570434(0x16a)](),console[_0x570434(0x16a)](a32_0x54adbc['bold'](_0x570434(0x176))),console['log'](a32_0x54adbc[_0x570434(0x1a0)](_0x570434(0x1a3)[_0x570434(0x152)](0x1e))),console[_0x570434(0x16a)](_0x570434(0x156)+a32_0x54adbc[_0x570434(0x1aa)](_0x570434(0x15a))),console[_0x570434(0x16a)](_0x570434(0x1a5)+_0x5992bb['message']),Object[_0x570434(0x1bf)][_0x570434(0x1b3)][_0x570434(0x181)](_0xaafb4c[_0x570434(0x1d1)],'routing')&&console[_0x570434(0x16a)](_0x570434(0x19c)+CLI_BIN_NAME+'\x20config\x20delete\x20routing'),Object['prototype'][_0x570434(0x1b3)][_0x570434(0x181)](_0xaafb4c['globalConfig'],_0x570434(0x17a))&&console[_0x570434(0x16a)](_0x570434(0x1b8)+CLI_BIN_NAME+_0x570434(0x1c0)));_0x908a83&&(console[_0x570434(0x16a)](),console[_0x570434(0x16a)](a32_0x54adbc[_0x570434(0x158)]('\x20\x20Country/Region\x20Configuration')),console['log'](a32_0x54adbc[_0x570434(0x1a0)](_0x570434(0x1a3)[_0x570434(0x152)](0x1e))),console[_0x570434(0x16a)](_0x570434(0x156)+a32_0x54adbc['red'](_0x570434(0x15a))),console[_0x570434(0x16a)]('\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x908a83[_0x570434(0x191)]),Object[_0x570434(0x1bf)][_0x570434(0x1b3)][_0x570434(0x181)](_0xaafb4c[_0x570434(0x1d1)],_0x570434(0x172))&&console[_0x570434(0x16a)](_0x570434(0x19c)+CLI_BIN_NAME+_0x570434(0x198)),Object[_0x570434(0x1bf)][_0x570434(0x1b3)]['call'](_0xaafb4c[_0x570434(0x16f)],'region')&&console['log'](_0x570434(0x1b8)+CLI_BIN_NAME+_0x570434(0x1af)));console[_0x570434(0x16a)](),console[_0x570434(0x16a)](a32_0x54adbc['bold'](_0x570434(0x16e))),console[_0x570434(0x16a)](a32_0x54adbc[_0x570434(0x1a0)]('\x20\x20─'['repeat'](0x1e))),console[_0x570434(0x16a)](_0x570434(0x1ad)+(_0x315825['appCode']||a32_0x54adbc[_0x570434(0x1aa)](_0x570434(0x184)))),console[_0x570434(0x16a)](_0x570434(0x153)+(_0x15a528??a32_0x54adbc['red'](_0x570434(0x1a7)))),console[_0x570434(0x16a)]('\x20\x20app\x20locale:\x20\x20\x20\x20\x20\x20'+_0x315825[_0x570434(0x16c)]),console['log'](_0x570434(0x178)+(_0x315825[_0x570434(0x19d)]||a32_0x54adbc['gray']('(none)'))),console[_0x570434(0x16a)](_0x570434(0x1a1)+(_0x315825[_0x570434(0x168)]||a32_0x54adbc[_0x570434(0x1a0)](_0x570434(0x16b)))),console['log'](_0x570434(0x15b)+(_0x315825[_0x570434(0x197)]||a32_0x54adbc[_0x570434(0x1a0)](_0x570434(0x194)+DEFAULT_CONFIG_VALUES['format']+')'))),console[_0x570434(0x16a)]('\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x315825['pageSize']??a32_0x54adbc[_0x570434(0x1a0)](_0x570434(0x1c7)))),console[_0x570434(0x16a)](_0x570434(0x196)+_0x315825['riskLevel']),console[_0x570434(0x16a)](_0x570434(0x1a8)+_0x315825[_0x570434(0x170)]),console[_0x570434(0x16a)](_0x570434(0x19f)+AUTH_MODE[_0x570434(0x1c8)]);if(_0x315825[_0x570434(0x17e)])console[_0x570434(0x16a)](_0x570434(0x159)+_0x315825['accessKeySource']);console[_0x570434(0x16a)](_0x570434(0x15d)+(_0x315825[_0x570434(0x171)]?a32_0x54adbc[_0x570434(0x1bd)](_0x570434(0x154)+_0x315825[_0x570434(0x171)][_0x570434(0x1ab)]+')'):a32_0x54adbc[_0x570434(0x1a0)](_0x570434(0x16b)))),console['log'](),console[_0x570434(0x16a)](a32_0x54adbc[_0x570434(0x158)](_0x570434(0x1ce))),console[_0x570434(0x16a)](a32_0x54adbc[_0x570434(0x1a0)](_0x570434(0x1a3)[_0x570434(0x152)](0x1e)));_0x5992bb||_0x908a83?console['log'](_0x570434(0x156)+a32_0x54adbc[_0x570434(0x1aa)](_0x570434(0x1b5))):(console[_0x570434(0x16a)](_0x570434(0x18d)+getApiDomain()),console[_0x570434(0x16a)](_0x570434(0x155)+getUserDomain()),console[_0x570434(0x16a)](_0x570434(0x1cb)+getRuntimeDomain()),console[_0x570434(0x16a)]('\x20\x20skillDomain:\x20\x20\x20\x20\x20'+getSkillDomain()),console[_0x570434(0x16a)](_0x570434(0x17f)+(getKbServiceDomain()??_0x570434(0x195))));console[_0x570434(0x16a)](),console[_0x570434(0x16a)](a32_0x54adbc['bold'](_0x570434(0x1c6))),console[_0x570434(0x16a)](a32_0x54adbc[_0x570434(0x1a0)](_0x570434(0x1a3)[_0x570434(0x152)](0x1e)));const _0x3a8ae2=inspectServiceRegistry();console[_0x570434(0x16a)](_0x570434(0x15e)+_0x3a8ae2[_0x570434(0x1c2)]),console[_0x570434(0x16a)](_0x570434(0x156)+formatServiceRegistryStatus(_0x3a8ae2)),console[_0x570434(0x16a)](_0x570434(0x163)+_0x3a8ae2['serviceCount']),console[_0x570434(0x16a)](_0x570434(0x18a)+_0x3a8ae2[_0x570434(0x186)]);for(const _0x1deed8 of _0x3a8ae2[_0x570434(0x157)]){console[_0x570434(0x16a)]('\x20\x20'+(_0x1deed8['serviceCode']+':')['padEnd'](0x11)+'\x20'+(_0x1deed8['name']||a32_0x54adbc[_0x570434(0x1a0)]('(unnamed)'))+'\x20('+_0x1deed8[_0x570434(0x186)]+_0x570434(0x1c4)),console['log']('\x20\x20'+''[_0x570434(0x185)](0x11)+_0x570434(0x199)+_0x1deed8['source'][_0x570434(0x1b7)]);}return console[_0x570434(0x16a)](),console[_0x570434(0x16a)](a32_0x54adbc[_0x570434(0x158)](_0x570434(0x164))),console['log'](a32_0x54adbc[_0x570434(0x1a0)](_0x570434(0x1a3)[_0x570434(0x152)](0x1e))),console[_0x570434(0x16a)]('\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a32_0x54adbc[_0x570434(0x1bd)](AUTH_MODE['ClientAk']+_0x570434(0x15c))),console[_0x570434(0x16a)](_0x570434(0x183)+a32_0x54adbc[_0x570434(0x1a0)](_0x570434(0x189))),console[_0x570434(0x16a)](),{'ok':!![]};}function formatServiceRegistryStatus(_0x1490cc){const _0x45a4e0=a32_0x2dde;if(_0x1490cc[_0x45a4e0(0x151)]==='ok')return a32_0x54adbc[_0x45a4e0(0x1bd)](_0x45a4e0(0x179));if(_0x1490cc['status']===_0x45a4e0(0x1ac))return a32_0x54adbc['gray']('(not\x20found)');if(_0x1490cc['status']===_0x45a4e0(0x19b))return a32_0x54adbc[_0x45a4e0(0x17c)](_0x45a4e0(0x1b2));return a32_0x54adbc['red']('✗\x20Invalid'+(_0x1490cc[_0x45a4e0(0x191)]?':\x20'+_0x1490cc[_0x45a4e0(0x191)]:''));}export const doctorDefinition={'service':a32_0x38096d(0x188),'command':a32_0x38096d(0x15f),'description':'Diagnose\x20CLI\x20configuration\x20and\x20environment','risk':a32_0x38096d(0x173),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a33_0x385895=a33_0x15f5;(function(_0x8516eb,_0x17f363){const _0x206c23=a33_0x15f5,_0x5dd678=_0x8516eb();while(!![]){try{const _0x1fec56=-parseInt(_0x206c23(0x161))/0x1*(-parseInt(_0x206c23(0x154))/0x2)+-parseInt(_0x206c23(0x15a))/0x3+-parseInt(_0x206c23(0x151))/0x4+parseInt(_0x206c23(0x165))/0x5+-parseInt(_0x206c23(0x15d))/0x6+-parseInt(_0x206c23(0x163))/0x7+parseInt(_0x206c23(0x15f))/0x8;if(_0x1fec56===_0x17f363)break;else _0x5dd678['push'](_0x5dd678['shift']());}catch(_0x526627){_0x5dd678['push'](_0x5dd678['shift']());}}}(a33_0x16bf,0xe0234));function a33_0x16bf(){const _0x5d28ab=['Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','\x20to\x20runtime\x20app\x20','755764PltekH','bool','upload','685934cnEtXl','string','filePath','POST','str','validation','1651536qVOfhY','body','Uploaded\x20file:\x20','9899106oSRAFN','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','28922168OoGFPb','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','1CcTtan','filePath\x20is\x20required.','5465446yYqXzv','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','649560RNxxMb','Preview:\x20upload\x20','query-url','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','boolean','download','read','file','long-term','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','appCode','build','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','trim','File'];a33_0x16bf=function(){return _0x5d28ab;};return a33_0x16bf();}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_0x385895(0x147),'type':a33_0x385895(0x155),'required':!![],'description':'Path\x20to\x20the\x20local\x20file\x20to\x20upload'},FILEPATH_FLAG={'name':'filepath','type':a33_0x385895(0x155),'required':!![],'description':a33_0x385895(0x14f)},DOWNLOAD_FLAG={'name':a33_0x385895(0x145),'type':'boolean','description':a33_0x385895(0x14c)},LONG_TERM_FLAG={'name':'long-term','type':a33_0x385895(0x144),'description':a33_0x385895(0x164)};function a33_0x15f5(_0x1f05e4,_0x425d18){_0x1f05e4=_0x1f05e4-0x141;const _0x16bfae=a33_0x16bf();let _0x15f5e6=_0x16bfae[_0x1f05e4];return _0x15f5e6;}function requireFilePath(_0x361a8e){const _0x116f1f=a33_0x385895,_0x5a2ab7=_0x361a8e[_0x116f1f(0x14d)]();if(!_0x5a2ab7)throw CliErrors[_0x116f1f(0x159)](_0x116f1f(0x162));return _0x5a2ab7;}const fileUpload={'service':a33_0x385895(0x147),'command':a33_0x385895(0x153),'description':a33_0x385895(0x143),'risk':a33_0x385895(0x146),'flags':[FILE_FLAG],async 'dryRun'(_0x5194b4){const _0x345a88=a33_0x385895,_0x5338ad=requireRuntimeUploadFile(_0x5194b4['str'](_0x345a88(0x147)),_0x345a88(0x14e));return dryRun(_0x345a88(0x157),'/client/uploadFile')[_0x345a88(0x15b)]({'appCode':_0x5194b4[_0x345a88(0x14a)],'multipart':{'file':_0x5338ad}})['description'](_0x345a88(0x141)+_0x5338ad['path']+_0x345a88(0x150)+_0x5194b4[_0x345a88(0x14a)])[_0x345a88(0x14b)]();},async 'execute'(_0x3a41a6){const _0x3198f4=a33_0x385895,_0x2f449c=requireRuntimeUploadFile(_0x3a41a6[_0x3198f4(0x158)](_0x3198f4(0x147)),_0x3198f4(0x14e)),_0x49c7f3=await uploadRuntimeFile(_0x3a41a6[_0x3198f4(0x14a)],_0x2f449c['path']);return{'ok':!![],'data':_0x49c7f3,'message':_0x49c7f3['filePath']?_0x3198f4(0x15c)+_0x49c7f3[_0x3198f4(0x156)]+_0x3198f4(0x160):_0x3198f4(0x15e)};}},fileQueryUrl={'service':'file','command':a33_0x385895(0x142),'description':a33_0x385895(0x149),'risk':a33_0x385895(0x146),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x1d326f){const _0x21d5e4=a33_0x385895,_0x4c0b6e=requireFilePath(_0x1d326f['str']('filepath')),_0x54aa92=await queryRuntimeFileUrl(_0x4c0b6e,{'download':_0x1d326f[_0x21d5e4(0x152)](_0x21d5e4(0x145)),'longTerm':_0x1d326f[_0x21d5e4(0x152)](_0x21d5e4(0x148))});return{'ok':!![],'data':_0x54aa92};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
|
package/lib/commands/init.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a34_0x51c65d=a34_0x3b52;(function(_0x3d3bf9,_0x41fd7c){const _0x39f752=a34_0x3b52,_0x356654=_0x3d3bf9();while(!![]){try{const _0x1c2f7f=-parseInt(_0x39f752(0xe1))/0x1+parseInt(_0x39f752(0x101))/0x2*(parseInt(_0x39f752(0x105))/0x3)+-parseInt(_0x39f752(0xe3))/0x4+-parseInt(_0x39f752(0x107))/0x5+-parseInt(_0x39f752(0xf4))/0x6+-parseInt(_0x39f752(0xe4))/0x7*(-parseInt(_0x39f752(0xff))/0x8)+parseInt(_0x39f752(0xf5))/0x9*(parseInt(_0x39f752(0x103))/0xa);if(_0x1c2f7f===_0x41fd7c)break;else _0x356654['push'](_0x356654['shift']());}catch(_0x380ac1){_0x356654['push'](_0x356654['shift']());}}}(a34_0x4c72,0x2b635));import{existsSync,readFileSync}from'node:fs';import{resolve,isAbsolute}from'node:path';import{CliErrors}from'../errors.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{IMPORTABLE_RUNTIME_CONFIG_KEYS}from'../config/schema.js';import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../context.js';import{PRODUCT_CONFIG}from'../constant/product.js';export const appImportFlagDefs=[{'name':a34_0x51c65d(0xe9),'type':'string','description':a34_0x51c65d(0xee),'required':!![]},{'name':'appcode','type':a34_0x51c65d(0xe5),'description':'Override\x20imported\x20default\x20appcode'},{'name':'env','type':a34_0x51c65d(0xe5),'description':a34_0x51c65d(0xf2),'enum':[...RUNTIME_ENV_VALUES]},{'name':'global','type':a34_0x51c65d(0x108),'description':a34_0x51c65d(0xf3)+PRODUCT_CONFIG[a34_0x51c65d(0x106)]+')\x20instead\x20of\x20project','default':![]},{'name':a34_0x51c65d(0xea),'type':a34_0x51c65d(0x108),'description':a34_0x51c65d(0x100),'default':![]}];export async function runAppImport(_0x54533e){const _0x421e00=a34_0x51c65d,_0x5663c2=_0x54533e[_0x421e00(0xe6)]?_0x421e00(0xe6):_0x421e00(0xf0),_0x33c4f6=resolveWriteConfigPath(_0x5663c2);await runFromImport(_0x54533e,_0x33c4f6);}async function runFromImport(_0x594876,_0x51f2c9){const _0x3cadb8=a34_0x51c65d,_0x3b4ceb=resolveFilePath(_0x594876[_0x3cadb8(0xe9)]);if(!existsSync(_0x3b4ceb))throw CliErrors['validation'](_0x3cadb8(0xec)+_0x3b4ceb);const _0x177763=readSourceFile(_0x3b4ceb),_0x1a8aa4=convertToRuntimeConfig(_0x177763);_0x594876[_0x3cadb8(0xfb)]&&(_0x1a8aa4[_0x3cadb8(0xfb)]=String(_0x594876[_0x3cadb8(0xfb)]));_0x594876[_0x3cadb8(0xeb)]&&(_0x1a8aa4[_0x3cadb8(0xeb)]=resolveImportEnv(_0x594876));if(!_0x1a8aa4['appcode'])throw CliErrors[_0x3cadb8(0x102)](_0x3cadb8(0xed),_0x3cadb8(0xf7));await writeImportConfig(_0x51f2c9,_0x1a8aa4,_0x594876),console['log'](_0x3cadb8(0xe7)+_0x3b4ceb),console['log']('\x20\x20config:\x20\x20'+_0x51f2c9),console[_0x3cadb8(0xf8)]('\x20\x20appcode:\x20'+_0x1a8aa4[_0x3cadb8(0xfb)]);if(_0x1a8aa4['defaultApp'])console['log']('\x20\x20default:\x20'+_0x1a8aa4[_0x3cadb8(0xf6)]);}function convertToRuntimeConfig(_0x41a7ea){const _0x5ecf1a=a34_0x51c65d;if(_0x41a7ea[_0x5ecf1a(0xe2)]&&typeof _0x41a7ea[_0x5ecf1a(0xe2)]===_0x5ecf1a(0xfd))throw CliErrors[_0x5ecf1a(0x102)](_0x5ecf1a(0xf1),_0x5ecf1a(0xfa));const _0x3434d6={};for(const _0x49c10e of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x41a7ea[_0x49c10e]!==undefined&&(_0x3434d6[_0x49c10e]=_0x41a7ea[_0x49c10e]);}return!_0x3434d6[_0x5ecf1a(0xe8)]&&(_0x3434d6['riskLevel']=DEFAULT_CONFIG_VALUES[_0x5ecf1a(0xe8)]),_0x3434d6;}function a34_0x3b52(_0x2ad9aa,_0x12c6f1){_0x2ad9aa=_0x2ad9aa-0xe1;const _0x4c722a=a34_0x4c72();let _0x3b529a=_0x4c722a[_0x2ad9aa];return _0x3b529a;}async function writeImportConfig(_0x196db4,_0x449ded,_0x1df976){const _0x7c1d1b=a34_0x51c65d;let _0x53986f={};existsSync(_0x196db4)&&!_0x1df976[_0x7c1d1b(0xea)]&&(_0x53986f=readConfigFile(_0x196db4));for(const [_0x49db86,_0x41cda0]of Object[_0x7c1d1b(0xf9)](_0x449ded)){_0x41cda0!==undefined&&(_0x53986f[_0x49db86]=_0x41cda0);}if(_0x53986f[_0x7c1d1b(0xfe)])delete _0x53986f[_0x7c1d1b(0xfe)];writeConfigFile(_0x196db4,_0x53986f);}function resolveFilePath(_0x369aa5){return isAbsolute(_0x369aa5)?_0x369aa5:resolve(process['cwd'](),_0x369aa5);}function readSourceFile(_0x1abd35){const _0x4351f8=a34_0x51c65d;try{const _0x227dda=readFileSync(_0x1abd35,{'encoding':'utf8'});return JSON[_0x4351f8(0xef)](_0x227dda);}catch(_0x45e84){throw CliErrors['validation'](_0x4351f8(0x104)+_0x45e84['message']);}}function resolveImportEnv(_0x5974bf){const _0x4bdbcc=a34_0x51c65d,_0x39b52f=_0x5974bf[_0x4bdbcc(0xeb)];if(_0x39b52f===undefined||_0x39b52f==='')return DEFAULT_CONFIG_VALUES[_0x4bdbcc(0xeb)];if(!RUNTIME_ENV_VALUES['includes'](_0x39b52f))throw CliErrors[_0x4bdbcc(0x102)]('Invalid\x20env\x20\x22'+_0x39b52f+_0x4bdbcc(0xfc)+RUNTIME_ENV_VALUES['join'](',\x20'));return _0x39b52f;}function a34_0x4c72(){const _0x5657bb=['Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','appcode','\x22.\x20Allowed:\x20','object','app','37032uIErsT','Skip\x20confirmation\x20when\x20overwriting','2yuStvr','validation','3350vgeFvd','Failed\x20to\x20parse\x20source\x20file:\x20','141672SVqawl','newConfigFileName','327900tGLcMH','boolean','85637dWeTzo','apps','1217956gjSAyr','252OgMaWl','string','global','Imported\x20from\x20','riskLevel','file','yes','env','Source\x20file\x20not\x20found:\x20','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','parse','project','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','Override\x20imported\x20default\x20env','Write\x20to\x20global\x20(~/','447420bMvgkc','13275uPCcio','defaultApp','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`.','log','entries'];a34_0x4c72=function(){return _0x5657bb;};return a34_0x4c72();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x16b202,_0x1f3d8c){const _0x551fee=a35_0x582f,_0xf82c0b=_0x16b202();while(!![]){try{const _0x4ce34c=parseInt(_0x551fee(0xbf))/0x1+parseInt(_0x551fee(0xc6))/0x2+-parseInt(_0x551fee(0xc0))/0x3*(-parseInt(_0x551fee(0xc2))/0x4)+parseInt(_0x551fee(0xc7))/0x5+parseInt(_0x551fee(0xb7))/0x6*(parseInt(_0x551fee(0xc8))/0x7)+-parseInt(_0x551fee(0xba))/0x8+parseInt(_0x551fee(0xc4))/0x9*(-parseInt(_0x551fee(0xc1))/0xa);if(_0x4ce34c===_0x1f3d8c)break;else _0xf82c0b['push'](_0xf82c0b['shift']());}catch(_0x574e27){_0xf82c0b['push'](_0xf82c0b['shift']());}}}(a35_0x59f9,0xc8f70));import{platform,release,arch}from'node:os';function a35_0x59f9(){const _0x53ede8=['7OMCYrc','appCode','tenantCode','7911738Ynvkyb','@lovrabet/lovrabet-cli','name','5501008UGIaFH','mergedCli','nickName','envName','production','651165tzlDoi','24FWMelA','4110tuNMCp','604804fqgZYC','loginName','71406qprVAS','nickname','289870uqjmLA','7236605NToiEp'];a35_0x59f9=function(){return _0x53ede8;};return a35_0x59f9();}function a35_0x582f(_0xe2ae0e,_0x5b7364){_0xe2ae0e=_0xe2ae0e-0xb6;const _0x59f9bf=a35_0x59f9();let _0x582fe5=_0x59f9bf[_0xe2ae0e];return _0x582fe5;}import{getLoginUserInfo}from'../../core/api-client.js';import{getCliVersion}from'../../utils/version.js';export async function getIssueReportContext(_0x5df2b1,_0x4d6361){const _0x35311b=a35_0x582f,_0x3d02bf=_0x4d6361?undefined:await getLoginUserInfo();return{'serviceName':_0x35311b(0xb8),'serviceVersion':getCliVersion(),'environment':_0x5df2b1[_0x35311b(0xbd)]??_0x35311b(0xbe),'appCode':_0x5df2b1[_0x35311b(0xc9)]||_0x5df2b1[_0x35311b(0xbb)]?.[_0x35311b(0xc9)],'os':platform()+'\x20'+release()+'\x20'+arch(),'terminal':process.env.TERM,'user':_0x3d02bf?{'id':String(_0x3d02bf['id']??_0x3d02bf['userId']??''),'username':_0x3d02bf['username']??_0x3d02bf['userName']??_0x3d02bf[_0x35311b(0xc3)],'nickname':_0x3d02bf[_0x35311b(0xc5)]??_0x3d02bf[_0x35311b(0xbc)]??_0x3d02bf[_0x35311b(0xb9)]??undefined,'email':_0x3d02bf['email']??undefined,'tenantCode':_0x3d02bf[_0x35311b(0xb6)]}:undefined};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a36_0x1731(){const _0x8789ce=['796dlQaWM','10269zrUnAD','20019260gbBAGr','7KtIZAG','3899128hDjzIi','145845BtczVD','148224DPVolW','736694PlJKVv','6rtvPnB','5249034yPhrpH'];a36_0x1731=function(){return _0x8789ce;};return a36_0x1731();}function a36_0x5155(_0x169e19,_0x48819){_0x169e19=_0x169e19-0x11a;const _0x173135=a36_0x1731();let _0x5155f3=_0x173135[_0x169e19];return _0x5155f3;}(function(_0x4531ab,_0x4d2dca){const _0x45c7bb=a36_0x5155,_0x5d87fd=_0x4531ab();while(!![]){try{const _0x55cfb4=parseInt(_0x45c7bb(0x11f))/0x1+-parseInt(_0x45c7bb(0x11e))/0x2+parseInt(_0x45c7bb(0x123))/0x3*(parseInt(_0x45c7bb(0x122))/0x4)+-parseInt(_0x45c7bb(0x11d))/0x5*(parseInt(_0x45c7bb(0x120))/0x6)+-parseInt(_0x45c7bb(0x11b))/0x7*(-parseInt(_0x45c7bb(0x11c))/0x8)+parseInt(_0x45c7bb(0x121))/0x9+-parseInt(_0x45c7bb(0x11a))/0xa;if(_0x55cfb4===_0x4d2dca)break;else _0x5d87fd['push'](_0x5d87fd['shift']());}catch(_0xc63c5){_0x5d87fd['push'](_0x5d87fd['shift']());}}}(a36_0x1731,0x5d931));import{issueReport}from'./report.js';export const issueDefinitions=[issueReport];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a37_0x5e3e06=a37_0x1314;(function(_0x19b4e3,_0x5adf6c){const _0x529777=a37_0x1314,_0x21a443=_0x19b4e3();while(!![]){try{const _0x3e22d4=-parseInt(_0x529777(0x1d7))/0x1+parseInt(_0x529777(0x1fb))/0x2+-parseInt(_0x529777(0x1e4))/0x3+parseInt(_0x529777(0x204))/0x4+-parseInt(_0x529777(0x1da))/0x5+-parseInt(_0x529777(0x1f5))/0x6*(parseInt(_0x529777(0x1f2))/0x7)+parseInt(_0x529777(0x1f4))/0x8;if(_0x3e22d4===_0x5adf6c)break;else _0x21a443['push'](_0x21a443['shift']());}catch(_0x5420a9){_0x21a443['push'](_0x21a443['shift']());}}}(a37_0x438f,0x3829b));import{existsSync}from'node:fs';import{readFile}from'node:fs/promises';function a37_0x1314(_0x159552,_0x51173d){_0x159552=_0x159552-0x1d5;const _0x438faa=a37_0x438f();let _0x1314e4=_0x438faa[_0x159552];return _0x1314e4;}import{resolve}from'node:path';import{CliErrors}from'../../errors.js';import{reportIssue}from'@lovrabet/cli-framework';function a37_0x438f(){const _0x19510b=['Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.','join','length','88332bFbsom','string','read','originalBytes','spanName','sanitize','Issue\x20log\x20submitted\x20(content\x20redacted\x20or\x20truncated)','Report\x20a\x20problem\x20log\x20with\x20title\x20and\x20markdown\x20context','utf8','issue','descriptionFilePath','truncated','validation','trim','315ySIOYk','Submit\x20a\x20problem\x20log','1809032KhXaos','27402PHVQaB','report','traceName','redactions:\x20','redactionCount','descriptionSource','87054nuYuqN','redactionKinds','compress','Cannot\x20read\x20issue\x20description\x20file:\x20','description','Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)','truncated:\x20original\x20','File\x20not\x20found:\x20','file','1410132tZjhny','description-file','title','62017JzOTGd','Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.','Issue\x20log\x20submitted','475850NoUnaT','descriptionFile:\x20','keys','otel://','Submit\x20the\x20issue\x20description\x20and\x20diagnostic\x20context\x20as\x20a\x20problem\x20log.','logData','str'];a37_0x438f=function(){return _0x19510b;};return a37_0x438f();}import{getIssueReportContext}from'./context.js';const DESCRIPTION_FILE_FLAG=a37_0x5e3e06(0x1d5);export const issueReport={'service':a37_0x5e3e06(0x1ed),'command':a37_0x5e3e06(0x1f6),'description':a37_0x5e3e06(0x1eb),'risk':a37_0x5e3e06(0x1e6),'confirmationDescription':a37_0x5e3e06(0x1de),'requiresAuth':!![],'requiresAppCode':![],'defaultOutputFormat':a37_0x5e3e06(0x1fd),'flags':[{'name':a37_0x5e3e06(0x1d6),'type':'string','required':!![],'description':'One-line\x20issue\x20summary'},{'name':a37_0x5e3e06(0x1ff),'type':'string','description':a37_0x5e3e06(0x200)},{'name':DESCRIPTION_FILE_FLAG,'type':a37_0x5e3e06(0x1e5),'description':'Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description'}],async 'validate'(_0x433f70){const _0x5c6ea9=a37_0x5e3e06,_0x1e711c=_0x433f70[_0x5c6ea9(0x1e0)](_0x5c6ea9(0x1d6))[_0x5c6ea9(0x1f1)](),_0x4a0814=_0x433f70[_0x5c6ea9(0x1e0)](_0x5c6ea9(0x1ff))[_0x5c6ea9(0x1f1)](),_0xf1fd89=_0x433f70[_0x5c6ea9(0x1e0)](DESCRIPTION_FILE_FLAG)[_0x5c6ea9(0x1f1)]();if(!_0x1e711c)throw CliErrors['flagMissing'](_0x5c6ea9(0x1d6),_0x5c6ea9(0x1d8));const _0x501834=_0x4a0814[_0x5c6ea9(0x1e3)]>0x0,_0x19fc5c=_0xf1fd89[_0x5c6ea9(0x1e3)]>0x0;if(_0x501834===_0x19fc5c)throw CliErrors[_0x5c6ea9(0x1f0)](_0x5c6ea9(0x1e1),'Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.');if(_0x19fc5c){const _0x1c516b=resolve(process['cwd'](),_0xf1fd89);if(!existsSync(_0x1c516b))throw CliErrors[_0x5c6ea9(0x1f0)](_0x5c6ea9(0x202)+_0x1c516b);}},async 'dryRun'(_0x440c65){const _0x39d824=a37_0x5e3e06,_0x1aecfe=await prepareIssueReport(_0x440c65,!![]);return{'method':'POST','url':_0x39d824(0x1dd)+_0x1aecfe['traceName']+'/'+_0x1aecfe[_0x39d824(0x1e8)],'body':{'traceName':_0x1aecfe[_0x39d824(0x1f7)],'spanName':_0x1aecfe[_0x39d824(0x1e8)],'logData':_0x1aecfe[_0x39d824(0x1df)]},'description':[_0x39d824(0x1f3),'descriptionSource:\x20'+_0x1aecfe[_0x39d824(0x1fa)],_0x1aecfe[_0x39d824(0x1ee)]?_0x39d824(0x1db)+_0x1aecfe['descriptionFilePath']:null,_0x1aecfe['sanitize'][_0x39d824(0x1ef)]?_0x39d824(0x201)+_0x1aecfe[_0x39d824(0x1e9)][_0x39d824(0x1e7)]+'\x20bytes':null,_0x1aecfe[_0x39d824(0x1e9)][_0x39d824(0x1f9)]>0x0?_0x39d824(0x1f8)+_0x1aecfe[_0x39d824(0x1e9)]['redactionCount']+'\x20('+_0x1aecfe[_0x39d824(0x1e9)][_0x39d824(0x1fc)][_0x39d824(0x1e2)](',\x20')+')':null]['filter'](Boolean)[_0x39d824(0x1e2)]('\x0a')};},async 'execute'(_0x2f12d9){const _0x1bf199=a37_0x5e3e06,_0x2bb56d=await prepareIssueReport(_0x2f12d9,![]);return{'ok':!![],'message':_0x2bb56d['sanitize']['redactionCount']||_0x2bb56d[_0x1bf199(0x1e9)][_0x1bf199(0x1ef)]?_0x1bf199(0x1ea):_0x1bf199(0x1d9),'data':{'traceName':_0x2bb56d[_0x1bf199(0x1f7)],'spanName':_0x2bb56d['spanName'],'logDataKeys':Object[_0x1bf199(0x1dc)](_0x2bb56d[_0x1bf199(0x1df)]),'issue':{'title':_0x2bb56d[_0x1bf199(0x1d6)],'descriptionLength':_0x2bb56d[_0x1bf199(0x1ff)][_0x1bf199(0x1e3)],'descriptionSource':_0x2bb56d[_0x1bf199(0x1fa)],..._0x2bb56d[_0x1bf199(0x1ee)]?{'descriptionFile':_0x2bb56d['descriptionFilePath']}:{},'sanitize':{'originalBytes':_0x2bb56d[_0x1bf199(0x1e9)]['originalBytes'],'truncated':_0x2bb56d['sanitize'][_0x1bf199(0x1ef)],'redactions':_0x2bb56d[_0x1bf199(0x1e9)][_0x1bf199(0x1f9)],'redactionKinds':_0x2bb56d[_0x1bf199(0x1e9)][_0x1bf199(0x1fc)]}}}};}};async function prepareIssueReport(_0x2c591f,_0x2164f5){const _0x3485c8=a37_0x5e3e06;await issueReport['validate'](_0x2c591f);const _0x563f83=_0x2c591f[_0x3485c8(0x1e0)](DESCRIPTION_FILE_FLAG)[_0x3485c8(0x1f1)](),_0x20c8d9=_0x563f83?resolve(process['cwd'](),_0x563f83):undefined;let _0x52a667=_0x2c591f[_0x3485c8(0x1e0)](_0x3485c8(0x1ff));if(_0x20c8d9)try{_0x52a667=await readFile(_0x20c8d9,_0x3485c8(0x1ec));}catch{throw CliErrors[_0x3485c8(0x1f0)](_0x3485c8(0x1fe)+_0x20c8d9);}if(!_0x52a667[_0x3485c8(0x1f1)]())throw CliErrors[_0x3485c8(0x1f0)]('Issue\x20description\x20cannot\x20be\x20empty.');const _0x2aca46=await getIssueReportContext(_0x2c591f,_0x2164f5);try{const _0x59ece8=await reportIssue({'title':_0x2c591f['str'](_0x3485c8(0x1d6)),'description':_0x52a667,'context':_0x2aca46,'dryRun':_0x2164f5});return{..._0x59ece8,'descriptionSource':_0x20c8d9?_0x3485c8(0x203):'inline','descriptionFilePath':_0x20c8d9};}catch(_0x2929d0){throw CliErrors['apiError']('Failed\x20to\x20submit\x20issue\x20log:\x20'+(_0x2929d0 instanceof Error?_0x2929d0['message']:String(_0x2929d0)),'Check\x20your\x20login\x20and\x20network\x20connectivity.');}}
|
package/lib/commands/kb/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a38_0x4f7389=a38_0x1f56;(function(_0x14266a,_0x36ab15){const _0x3138e9=a38_0x1f56,_0x55185d=_0x14266a();while(!![]){try{const _0x597189=-parseInt(_0x3138e9(0x1f1))/0x1*(parseInt(_0x3138e9(0x201))/0x2)+parseInt(_0x3138e9(0x1cd))/0x3*(parseInt(_0x3138e9(0x200))/0x4)+parseInt(_0x3138e9(0x1ff))/0x5+parseInt(_0x3138e9(0x208))/0x6*(-parseInt(_0x3138e9(0x1fd))/0x7)+parseInt(_0x3138e9(0x202))/0x8*(-parseInt(_0x3138e9(0x1e1))/0x9)+parseInt(_0x3138e9(0x1ee))/0xa*(parseInt(_0x3138e9(0x1d6))/0xb)+-parseInt(_0x3138e9(0x1fe))/0xc;if(_0x597189===_0x36ab15)break;else _0x55185d['push'](_0x55185d['shift']());}catch(_0x62b08d){_0x55185d['push'](_0x55185d['shift']());}}}(a38_0x472d,0xd8af7));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalKnowledgeBaseItem,getPersonalKnowledgeBaseItem,listPersonalKnowledgeBaseItems,updatePersonalKnowledgeBaseItem}from'../../core/api-client.js';import{searchDirectKnowledge,normalizeKbServiceOrigin}from'../../core/kb-search-client.js';import{planPersonalKnowledgeWrite,withKbManagementOrigin}from'../../core/kb-management-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';function a38_0x472d(){const _0x1aad4a=['updateTime','method','ragStatus','createTime','number','map','Created\x20KB\x20entry\x20','length','file','Search\x20visible\x20public,\x20company,\x20and\x20personal\x20knowledge','836423aimxKS','19807836GpTGNB','5275350GNLZId','414028kdONLE','2620162jOhrcp','8WdZQLD','Configure\x20kbServiceDomain\x20in\x20the\x20connection\x20settings,\x20or\x20pass\x20`--kb-service-url\x20<https-origin>`\x20for\x20this\x20request.','build','title','write','dryRun','12aEpkOn','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','str','Search\x20query\x20for\x20visible\x20public,\x20company,\x20and\x20personal\x20knowledge','validation','Search\x20query\x20is\x20required.','Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20','create','jsonBody','--topk\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.','description','topk','Replaces\x20the\x20personal\x20knowledge-base\x20entry\x20body\x20with\x20local\x20file\x20content\x20and\x20triggers\x20retrieval\x20sync.','51szMFlS','version','Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','detail','flag','ragErrorMessage','Saves\x20local\x20file\x20content\x20as\x20a\x20personal\x20knowledge-base\x20entry\x20and\x20starts\x20retrieval\x20sync.','Updated\x20KB\x20entry\x20','3817BVAnIg','appCode','File\x20path\x20is\x20required.','isFile','isSafeInteger','content','File\x20not\x20found:\x20','bool','signal','body','KB\x20Service\x20is\x20not\x20configured\x20for\x20knowledge\x20search.','442413WTdfle','path','read','num','query','kb-service-url','update','utf8','Personal\x20knowledge-base\x20entry\x20ID','parse','list','string','Override\x20the\x20existing\x20entry\x20title','38090UqMpRu','accessKey','Optional\x20trusted\x20KB\x20Service\x20HTTPS\x20origin\x20for\x20this\x20request\x20only','1FxWSMK','trim'];a38_0x472d=function(){return _0x1aad4a;};return a38_0x472d();}import{getKbServiceDomain}from'../../constant/domain.js';import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':'title','type':a38_0x4f7389(0x1ec),'required':!![],'description':'Personal\x20knowledge-base\x20entry\x20title'},FILE_FLAG={'name':a38_0x4f7389(0x1fb),'type':a38_0x4f7389(0x1ec),'required':!![],'description':'Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file'},QUERY_FLAG={'name':a38_0x4f7389(0x1e5),'type':'string','required':!![],'description':a38_0x4f7389(0x20b)},TOPK_FLAG={'name':a38_0x4f7389(0x1cb),'type':a38_0x4f7389(0x1f7),'description':a38_0x4f7389(0x1d0)};function readKnowledgeFile(_0x3c479b){const _0x291f30=a38_0x4f7389;if(!_0x3c479b)throw CliErrors[_0x291f30(0x20c)](_0x291f30(0x1d8));if(!existsSync(_0x3c479b))throw CliErrors[_0x291f30(0x20c)](_0x291f30(0x1dc)+_0x3c479b);if(!statSync(_0x3c479b)[_0x291f30(0x1d9)]())throw CliErrors[_0x291f30(0x20c)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x3c479b);return readFileSync(_0x3c479b,_0x291f30(0x1e8));}function summarizePersonalItem(_0x4c99fd){const _0x53f073=a38_0x4f7389;return{'id':_0x4c99fd['id'],'title':_0x4c99fd[_0x53f073(0x205)],'version':_0x4c99fd[_0x53f073(0x1ce)],'ragStatus':_0x4c99fd[_0x53f073(0x1f5)],'ragErrorMessage':_0x4c99fd[_0x53f073(0x1d3)],'updateTime':_0x4c99fd[_0x53f073(0x1f3)]};}function detailPersonalItem(_0x48d589){const _0x960552=a38_0x4f7389;return{'id':_0x48d589['id'],'appCode':_0x48d589['appCode'],'scope':_0x48d589['scope'],'userId':_0x48d589['userId'],'title':_0x48d589['title'],'content':_0x48d589[_0x960552(0x1db)],'version':_0x48d589[_0x960552(0x1ce)],'ragStatus':_0x48d589[_0x960552(0x1f5)],'ragErrorMessage':_0x48d589[_0x960552(0x1d3)],'createTime':_0x48d589[_0x960552(0x1f6)],'updateTime':_0x48d589[_0x960552(0x1f3)]};}function readTopK(_0x1d3fa9){const _0x2cb182=a38_0x4f7389,_0x21c5c4=_0x1d3fa9[_0x2cb182(0x1d2)](_0x2cb182(0x1cb));if(_0x21c5c4===undefined||_0x21c5c4===null||_0x21c5c4==='')return undefined;const _0x3687b6=_0x1d3fa9[_0x2cb182(0x1e4)](_0x2cb182(0x1cb));if(!Number[_0x2cb182(0x1da)](_0x3687b6)||_0x3687b6<0x1||_0x3687b6>0x32)throw CliErrors[_0x2cb182(0x20c)](_0x2cb182(0x1c9));return _0x3687b6;}function a38_0x1f56(_0x41f086,_0x43a6f5){_0x41f086=_0x41f086-0x1c8;const _0x472d4c=a38_0x472d();let _0x1f5694=_0x472d4c[_0x41f086];return _0x1f5694;}const kbList={'service':'kb','command':a38_0x4f7389(0x1eb),'description':'List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','risk':'read','flags':[VERBOSE_FLAG],async 'execute'(_0x332b4c){const _0x4e04eb=a38_0x4f7389,_0x3ca4cf=await listPersonalKnowledgeBaseItems(_0x332b4c['appCode'],_0x332b4c[_0x4e04eb(0x1de)]);if(_0x332b4c[_0x4e04eb(0x1dd)]('verbose'))return{'ok':!![],'data':{'total':_0x3ca4cf[_0x4e04eb(0x1fa)],'items':_0x3ca4cf}};return{'ok':!![],'data':{'total':_0x3ca4cf['length'],'items':_0x3ca4cf['map'](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a38_0x4f7389(0x1d1),'description':a38_0x4f7389(0x209),'risk':a38_0x4f7389(0x1e3),'flags':[{...ID_FLAG,'type':a38_0x4f7389(0x1ec),'description':a38_0x4f7389(0x1e9)}],async 'execute'(_0x5c959a){const _0x35b593=a38_0x4f7389,_0x21bfd1=await getPersonalKnowledgeBaseItem(_0x5c959a[_0x35b593(0x20a)]('id'),_0x5c959a[_0x35b593(0x1d7)],_0x5c959a['signal']);return{'ok':!![],'data':detailPersonalItem(_0x21bfd1)};}},kbCreate={'service':'kb','command':a38_0x4f7389(0x20f),'description':a38_0x4f7389(0x1cf),'risk':a38_0x4f7389(0x206),'confirmationDescription':a38_0x4f7389(0x1d4),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x4def16){const _0x5bc657=a38_0x4f7389,_0x458b99=_0x4def16[_0x5bc657(0x20a)]('title'),_0x28b2f7=readKnowledgeFile(_0x4def16[_0x5bc657(0x20a)](_0x5bc657(0x1fb))),_0x448943=await createPersonalKnowledgeBaseItem(_0x4def16['appCode'],{'title':_0x458b99,'content':_0x28b2f7},_0x4def16['signal']);return{'ok':!![],'data':summarizePersonalItem(_0x448943),'message':_0x5bc657(0x1f9)+_0x448943['id']+'\x20('+_0x448943[_0x5bc657(0x205)]+')'};},async 'dryRun'(_0x5834c6){const _0x172732=a38_0x4f7389,_0x47400e=_0x5834c6[_0x172732(0x20a)]('title'),_0x2a9f62=readKnowledgeFile(_0x5834c6[_0x172732(0x20a)](_0x172732(0x1fb))),_0x5e3adf=planPersonalKnowledgeWrite(_0x5834c6[_0x172732(0x1d7)],{'title':_0x47400e,'content':_0x2a9f62});return dryRun(_0x5e3adf[_0x172732(0x1f4)],_0x5e3adf[_0x172732(0x1e2)])[_0x172732(0x1df)](JSON[_0x172732(0x1ea)](_0x5e3adf[_0x172732(0x1c8)]))[_0x172732(0x1ca)]('Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22'+_0x47400e+'\x22')[_0x172732(0x204)]();}},kbUpdate={'service':'kb','command':a38_0x4f7389(0x1e7),'description':'Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','risk':a38_0x4f7389(0x206),'confirmationDescription':a38_0x4f7389(0x1cc),'flags':[{...ID_FLAG,'type':a38_0x4f7389(0x1ec),'description':a38_0x4f7389(0x1e9)},{...TITLE_FLAG,'required':![],'description':a38_0x4f7389(0x1ed)},FILE_FLAG],async 'execute'(_0x5a69ce){const _0x8a2462=a38_0x4f7389,_0x25ccbe=_0x5a69ce[_0x8a2462(0x20a)]('id'),_0x421b75=readKnowledgeFile(_0x5a69ce[_0x8a2462(0x20a)]('file')),_0x3646a2=_0x5a69ce['str']('title')||undefined,_0x12b4ab=await updatePersonalKnowledgeBaseItem(_0x25ccbe,_0x5a69ce['appCode'],{'title':_0x3646a2,'content':_0x421b75},_0x5a69ce[_0x8a2462(0x1de)]);return{'ok':!![],'data':summarizePersonalItem(_0x12b4ab),'message':_0x8a2462(0x1d5)+_0x12b4ab['id']+'\x20('+_0x12b4ab[_0x8a2462(0x205)]+')'};},async 'dryRun'(_0x5b4d25){const _0x3f1fbc=a38_0x4f7389,_0x412dcf=_0x5b4d25['str']('id'),_0xce1ed3=readKnowledgeFile(_0x5b4d25[_0x3f1fbc(0x20a)](_0x3f1fbc(0x1fb))),_0x163783=await getPersonalKnowledgeBaseItem(_0x412dcf,_0x5b4d25[_0x3f1fbc(0x1d7)],_0x5b4d25['signal']),_0x4fec33=_0x5b4d25[_0x3f1fbc(0x20a)](_0x3f1fbc(0x205))||_0x163783['title'],_0x3c2110=planPersonalKnowledgeWrite(_0x5b4d25[_0x3f1fbc(0x1d7)],{'title':_0x4fec33,'content':_0xce1ed3},_0x412dcf,_0x163783[_0x3f1fbc(0x1ce)]);return dryRun(_0x3c2110[_0x3f1fbc(0x1f4)],_0x3c2110[_0x3f1fbc(0x1e2)])[_0x3f1fbc(0x1df)](JSON[_0x3f1fbc(0x1ea)](_0x3c2110[_0x3f1fbc(0x1c8)]))[_0x3f1fbc(0x1ca)](_0x3f1fbc(0x20e)+_0x412dcf)[_0x3f1fbc(0x204)]();}};function readSearchServiceUrl(_0x536199){const _0x17500e=a38_0x4f7389;if(_0x536199['flag']('kb-service-url')!==undefined)return normalizeKbServiceOrigin(_0x536199[_0x17500e(0x20a)]('kb-service-url'));const _0x1f646d=getKbServiceDomain();if(!_0x1f646d)throw CliErrors[_0x17500e(0x20c)](_0x17500e(0x1e0),_0x17500e(0x203));return normalizeKbServiceOrigin(_0x1f646d);}const kbSearch={'service':'kb','command':'search','description':a38_0x4f7389(0x1fc),'risk':a38_0x4f7389(0x1e3),'flags':[QUERY_FLAG,TOPK_FLAG,{'name':a38_0x4f7389(0x1e6),'type':a38_0x4f7389(0x1ec),'required':![],'description':a38_0x4f7389(0x1f0)}],async 'validate'(_0x3dafbe){const _0x2d315f=a38_0x4f7389;if(!_0x3dafbe[_0x2d315f(0x20a)](_0x2d315f(0x1e5))[_0x2d315f(0x1f2)]())throw CliErrors['validation'](_0x2d315f(0x20d));readTopK(_0x3dafbe),readSearchServiceUrl(_0x3dafbe);},async 'execute'(_0x5da80a){const _0x1fd3e2=a38_0x4f7389,_0x23d0d9=_0x5da80a[_0x1fd3e2(0x20a)](_0x1fd3e2(0x1e5))[_0x1fd3e2(0x1f2)](),_0x1ceeae=readTopK(_0x5da80a),_0x3dd9dc=readSearchServiceUrl(_0x5da80a),_0x3c57b1={'appCode':_0x5da80a[_0x1fd3e2(0x1d7)],'accessKey':_0x5da80a[_0x1fd3e2(0x1ef)]??'','query':_0x23d0d9,..._0x1ceeae!==undefined?{'topK':_0x1ceeae}:{},'signal':_0x5da80a['signal']},_0x5b89e3=await searchDirectKnowledge({..._0x3c57b1,'serviceUrl':_0x3dd9dc});return{'ok':!![],'data':_0x5b89e3};}};function managementCommand(_0x444bc4){const _0x787209=a38_0x4f7389;return{..._0x444bc4,'execute':_0x10eb7b=>withKbManagementOrigin(()=>_0x444bc4['execute'](_0x10eb7b)),..._0x444bc4[_0x787209(0x207)]?{'dryRun':_0x5e9ee6=>withKbManagementOrigin(()=>_0x444bc4['dryRun'](_0x5e9ee6))}:{}};}export const kbDefinitions=[...[kbList,kbDetail,kbCreate,kbUpdate][a38_0x4f7389(0x1f8)](managementCommand),kbSearch];
|
|
1
|
+
const a38_0x4ae2b2=a38_0x1bd5;(function(_0x47dc80,_0xf39894){const _0x438766=a38_0x1bd5,_0x5d3601=_0x47dc80();while(!![]){try{const _0x5a6b5e=parseInt(_0x438766(0x130))/0x1+parseInt(_0x438766(0x143))/0x2+-parseInt(_0x438766(0x157))/0x3+parseInt(_0x438766(0x13e))/0x4*(-parseInt(_0x438766(0x15b))/0x5)+-parseInt(_0x438766(0x120))/0x6+parseInt(_0x438766(0x142))/0x7*(parseInt(_0x438766(0x159))/0x8)+-parseInt(_0x438766(0x128))/0x9*(parseInt(_0x438766(0x126))/0xa);if(_0x5a6b5e===_0xf39894)break;else _0x5d3601['push'](_0x5d3601['shift']());}catch(_0x1e144e){_0x5d3601['push'](_0x5d3601['shift']());}}}(a38_0x7697,0xd4795));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalKnowledgeBaseItem,getPersonalKnowledgeBaseItem,listPersonalKnowledgeBaseItems,updatePersonalKnowledgeBaseItem}from'../../core/api-client.js';import{searchDirectKnowledge,normalizeKbServiceOrigin}from'../../core/kb-search-client.js';import{planPersonalKnowledgeWrite,withKbManagementOrigin}from'../../core/kb-management-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{getKbServiceDomain}from'../../constant/domain.js';import{dryRun}from'../../framework/dryrun.js';function a38_0x1bd5(_0x2edd7b,_0x1f1acb){_0x2edd7b=_0x2edd7b-0x11b;const _0x7697b9=a38_0x7697();let _0x1bd576=_0x7697b9[_0x2edd7b];return _0x1bd576;}const TITLE_FLAG={'name':'title','type':a38_0x4ae2b2(0x12b),'required':!![],'description':a38_0x4ae2b2(0x121)},FILE_FLAG={'name':'file','type':a38_0x4ae2b2(0x12b),'required':!![],'description':a38_0x4ae2b2(0x12f)},QUERY_FLAG={'name':a38_0x4ae2b2(0x12c),'type':a38_0x4ae2b2(0x12b),'required':!![],'description':'Search\x20query\x20for\x20visible\x20public,\x20company,\x20and\x20personal\x20knowledge'},TOPK_FLAG={'name':a38_0x4ae2b2(0x131),'type':a38_0x4ae2b2(0x11e),'description':a38_0x4ae2b2(0x129)};function readKnowledgeFile(_0x3f065c){const _0x559e9c=a38_0x4ae2b2;if(!_0x3f065c)throw CliErrors[_0x559e9c(0x14c)](_0x559e9c(0x149));if(!existsSync(_0x3f065c))throw CliErrors['validation'](_0x559e9c(0x15d)+_0x3f065c);if(!statSync(_0x3f065c)[_0x559e9c(0x139)]())throw CliErrors[_0x559e9c(0x14c)](_0x559e9c(0x141)+_0x3f065c);return readFileSync(_0x3f065c,_0x559e9c(0x15e));}function summarizePersonalItem(_0x436930){const _0x5a0bf8=a38_0x4ae2b2;return{'id':_0x436930['id'],'title':_0x436930['title'],'version':_0x436930['version'],'ragStatus':_0x436930[_0x5a0bf8(0x13c)],'ragErrorMessage':_0x436930['ragErrorMessage'],'updateTime':_0x436930[_0x5a0bf8(0x148)]};}function a38_0x7697(){const _0x5e1be1=['update','5YzJXHK','scope','File\x20not\x20found:\x20','utf8','write','trim','Saves\x20local\x20file\x20content\x20as\x20a\x20personal\x20knowledge-base\x20entry\x20and\x20starts\x20retrieval\x20sync.','search','number','jsonBody','5378052ZabCMj','Personal\x20knowledge-base\x20entry\x20title','read','createTime','file','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','30510ZFEJXF','appCode','927QgbilP','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','version','string','query','description','kb-service-url','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','593955nhiyQM','topk','execute','Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','content','str','flag','accessKey','signal','isFile','path','title','ragStatus','userId','728084ilQCTV','parse','method','File\x20is\x20not\x20a\x20regular\x20file:\x20','56LPafLO','3276446JjDdGv','create','list','map','build','updateTime','File\x20path\x20is\x20required.','bool','Configure\x20kbServiceDomain\x20in\x20the\x20connection\x20settings,\x20or\x20pass\x20`--kb-service-url\x20<https-origin>`\x20for\x20this\x20request.','validation','verbose','Replaces\x20the\x20personal\x20knowledge-base\x20entry\x20body\x20with\x20local\x20file\x20content\x20and\x20triggers\x20retrieval\x20sync.','num','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','dryRun','Search\x20query\x20is\x20required.','body','Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','length','Override\x20the\x20existing\x20entry\x20title','3793599tjaXTO','Created\x20KB\x20entry\x20','1295264etdPTN'];a38_0x7697=function(){return _0x5e1be1;};return a38_0x7697();}function detailPersonalItem(_0x560015){const _0x5eb03c=a38_0x4ae2b2;return{'id':_0x560015['id'],'appCode':_0x560015[_0x5eb03c(0x127)],'scope':_0x560015[_0x5eb03c(0x15c)],'userId':_0x560015[_0x5eb03c(0x13d)],'title':_0x560015['title'],'content':_0x560015[_0x5eb03c(0x134)],'version':_0x560015['version'],'ragStatus':_0x560015[_0x5eb03c(0x13c)],'ragErrorMessage':_0x560015['ragErrorMessage'],'createTime':_0x560015[_0x5eb03c(0x123)],'updateTime':_0x560015[_0x5eb03c(0x148)]};}function readTopK(_0x377955){const _0x57e3bd=a38_0x4ae2b2,_0x306ae7=_0x377955[_0x57e3bd(0x136)](_0x57e3bd(0x131));if(_0x306ae7===undefined||_0x306ae7===null||_0x306ae7==='')return undefined;const _0x57cfab=_0x377955[_0x57e3bd(0x14f)]('topk');if(!Number['isSafeInteger'](_0x57cfab)||_0x57cfab<0x1||_0x57cfab>0x32)throw CliErrors['validation']('--topk\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.');return _0x57cfab;}const kbList={'service':'kb','command':a38_0x4ae2b2(0x145),'description':a38_0x4ae2b2(0x125),'risk':a38_0x4ae2b2(0x122),'flags':[VERBOSE_FLAG],async 'execute'(_0x27b148){const _0x3d9afc=a38_0x4ae2b2,_0x4703be=await listPersonalKnowledgeBaseItems(_0x27b148[_0x3d9afc(0x127)],_0x27b148['signal']);if(_0x27b148[_0x3d9afc(0x14a)](_0x3d9afc(0x14d)))return{'ok':!![],'data':{'total':_0x4703be[_0x3d9afc(0x155)],'items':_0x4703be}};return{'ok':!![],'data':{'total':_0x4703be[_0x3d9afc(0x155)],'items':_0x4703be[_0x3d9afc(0x146)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':'detail','description':'Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','risk':a38_0x4ae2b2(0x122),'flags':[{...ID_FLAG,'type':'string','description':'Personal\x20knowledge-base\x20entry\x20ID'}],async 'execute'(_0x443324){const _0x5255bd=a38_0x4ae2b2,_0x4bd3f5=await getPersonalKnowledgeBaseItem(_0x443324[_0x5255bd(0x135)]('id'),_0x443324['appCode'],_0x443324['signal']);return{'ok':!![],'data':detailPersonalItem(_0x4bd3f5)};}},kbCreate={'service':'kb','command':a38_0x4ae2b2(0x144),'description':a38_0x4ae2b2(0x154),'risk':'write','confirmationDescription':a38_0x4ae2b2(0x11c),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x42f925){const _0x23a64d=a38_0x4ae2b2,_0x31a000=_0x42f925[_0x23a64d(0x135)]('title'),_0x1261df=readKnowledgeFile(_0x42f925[_0x23a64d(0x135)](_0x23a64d(0x124))),_0x4c7470=await createPersonalKnowledgeBaseItem(_0x42f925['appCode'],{'title':_0x31a000,'content':_0x1261df},_0x42f925[_0x23a64d(0x138)]);return{'ok':!![],'data':summarizePersonalItem(_0x4c7470),'message':_0x23a64d(0x158)+_0x4c7470['id']+'\x20('+_0x4c7470[_0x23a64d(0x13b)]+')'};},async 'dryRun'(_0x1b6317){const _0x4edece=a38_0x4ae2b2,_0x25d967=_0x1b6317[_0x4edece(0x135)](_0x4edece(0x13b)),_0x5b4aea=readKnowledgeFile(_0x1b6317['str']('file')),_0x57bf33=planPersonalKnowledgeWrite(_0x1b6317[_0x4edece(0x127)],{'title':_0x25d967,'content':_0x5b4aea});return dryRun(_0x57bf33[_0x4edece(0x140)],_0x57bf33[_0x4edece(0x13a)])[_0x4edece(0x153)](JSON[_0x4edece(0x13f)](_0x57bf33[_0x4edece(0x11f)]))[_0x4edece(0x12d)](_0x4edece(0x150)+_0x25d967+'\x22')['build']();}},kbUpdate={'service':'kb','command':a38_0x4ae2b2(0x15a),'description':a38_0x4ae2b2(0x133),'risk':a38_0x4ae2b2(0x15f),'confirmationDescription':a38_0x4ae2b2(0x14e),'flags':[{...ID_FLAG,'type':a38_0x4ae2b2(0x12b),'description':'Personal\x20knowledge-base\x20entry\x20ID'},{...TITLE_FLAG,'required':![],'description':a38_0x4ae2b2(0x156)},FILE_FLAG],async 'execute'(_0x551818){const _0x4e0f44=a38_0x4ae2b2,_0x4408b2=_0x551818[_0x4e0f44(0x135)]('id'),_0x319468=readKnowledgeFile(_0x551818['str'](_0x4e0f44(0x124))),_0x11a104=_0x551818[_0x4e0f44(0x135)](_0x4e0f44(0x13b))||undefined,_0x3f0c95=await updatePersonalKnowledgeBaseItem(_0x4408b2,_0x551818[_0x4e0f44(0x127)],{'title':_0x11a104,'content':_0x319468},_0x551818[_0x4e0f44(0x138)]);return{'ok':!![],'data':summarizePersonalItem(_0x3f0c95),'message':'Updated\x20KB\x20entry\x20'+_0x3f0c95['id']+'\x20('+_0x3f0c95[_0x4e0f44(0x13b)]+')'};},async 'dryRun'(_0x5021b9){const _0x1e6abb=a38_0x4ae2b2,_0x1fe110=_0x5021b9[_0x1e6abb(0x135)]('id'),_0x338047=readKnowledgeFile(_0x5021b9[_0x1e6abb(0x135)](_0x1e6abb(0x124))),_0x3fc5ea=await getPersonalKnowledgeBaseItem(_0x1fe110,_0x5021b9[_0x1e6abb(0x127)],_0x5021b9[_0x1e6abb(0x138)]),_0x18586d=_0x5021b9[_0x1e6abb(0x135)]('title')||_0x3fc5ea['title'],_0x267a30=planPersonalKnowledgeWrite(_0x5021b9['appCode'],{'title':_0x18586d,'content':_0x338047},_0x1fe110,_0x3fc5ea[_0x1e6abb(0x12a)]);return dryRun(_0x267a30[_0x1e6abb(0x140)],_0x267a30['path'])[_0x1e6abb(0x153)](JSON[_0x1e6abb(0x13f)](_0x267a30['jsonBody']))['description']('Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20'+_0x1fe110)[_0x1e6abb(0x147)]();}};function readSearchServiceUrl(_0x24b330){const _0x2e1003=a38_0x4ae2b2;if(_0x24b330['flag'](_0x2e1003(0x12e))!==undefined)return normalizeKbServiceOrigin(_0x24b330['str'](_0x2e1003(0x12e)));const _0x18e412=getKbServiceDomain();if(!_0x18e412)throw CliErrors[_0x2e1003(0x14c)]('KB\x20Service\x20is\x20not\x20configured\x20for\x20knowledge\x20search.',_0x2e1003(0x14b));return normalizeKbServiceOrigin(_0x18e412);}const kbSearch={'service':'kb','command':a38_0x4ae2b2(0x11d),'description':'Search\x20visible\x20public,\x20company,\x20and\x20personal\x20knowledge','risk':a38_0x4ae2b2(0x122),'flags':[QUERY_FLAG,TOPK_FLAG,{'name':a38_0x4ae2b2(0x12e),'type':'string','required':![],'description':'Optional\x20trusted\x20KB\x20Service\x20HTTPS\x20origin\x20for\x20this\x20request\x20only'}],async 'validate'(_0x4d1253){const _0x11619e=a38_0x4ae2b2;if(!_0x4d1253[_0x11619e(0x135)](_0x11619e(0x12c))[_0x11619e(0x11b)]())throw CliErrors[_0x11619e(0x14c)](_0x11619e(0x152));readTopK(_0x4d1253),readSearchServiceUrl(_0x4d1253);},async 'execute'(_0x44e5d1){const _0x547c4e=a38_0x4ae2b2,_0x295a5f=_0x44e5d1['str'](_0x547c4e(0x12c))['trim'](),_0x44a400=readTopK(_0x44e5d1),_0x283c72=readSearchServiceUrl(_0x44e5d1),_0x5babf6={'appCode':_0x44e5d1[_0x547c4e(0x127)],'accessKey':_0x44e5d1[_0x547c4e(0x137)]??'','query':_0x295a5f,..._0x44a400!==undefined?{'topK':_0x44a400}:{},'signal':_0x44e5d1[_0x547c4e(0x138)]},_0x2238f0=await searchDirectKnowledge({..._0x5babf6,'serviceUrl':_0x283c72});return{'ok':!![],'data':_0x2238f0};}};function managementCommand(_0x31290e){const _0x41c1f5=a38_0x4ae2b2;return{..._0x31290e,'execute':_0x24c365=>withKbManagementOrigin(()=>_0x31290e[_0x41c1f5(0x132)](_0x24c365)),..._0x31290e[_0x41c1f5(0x151)]?{'dryRun':_0x16fc95=>withKbManagementOrigin(()=>_0x31290e['dryRun'](_0x16fc95))}:{}};}export const kbDefinitions=[...[kbList,kbDetail,kbCreate,kbUpdate][a38_0x4ae2b2(0x146)](managementCommand),kbSearch];
|