@lovrabet/lovrabet-cli 2.0.9-beta.5 → 2.0.9-beta.7
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/app/cache.js +1 -1
- package/lib/commands/app/definitions.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/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/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/config/definitions.js +1 -1
- package/lib/commands/config/shared.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/doctor.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/skill/index.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/config/schema.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/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.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/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/types.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +3 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
const a16_0x387db2=a16_0x1544;function a16_0x4cdf(){const _0x4d3283=['map','Preview:\x20data\x20','delete','paramsHint','dryRun','Create\x20a\x20new\x20record\x20in\x20a\x20dataset','\x20\x20\x20\x20$in\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Value\x20in\x20set\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22country\x22:{\x22$in\x22:[\x22CN\x22,\x22US\x22]}}','create','463754BbrksK','\x20\x20\x20\x20Wrong:\x20\x20\x20\x20--page-size\x2010\x20\x20(this\x20is\x20not\x20a\x20valid\x20flag)','\x20\x20\x20\x20$gt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$gt\x22:100}}','description','params','now','data','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','\x20\x20\x20\x20$or\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Any\x20condition\x20matches\x20\x20{\x22$or\x22:[{\x22status\x22:{\x22$eq\x22:\x22active\x22}},{\x22status\x22:{\x22$eq\x22:\x22pending\x22}}]}','\x20\x20\x20\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}}','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','Get\x20a\x20single\x20record\x20by\x20ID','3860731swFGOF','write','Delete\x20a\x20record\x20(requires\x20--yes\x20in\x20non-interactive)','\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\x20$gte\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20or\x20equal\x20\x20{\x22amount\x22:{\x22$gte\x22:100}}','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','operation','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','2044375uWrUsg','\x20\x20AGGREGATE\x20TYPES','\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}}','POST','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Average\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg_score\x22}','batchCreate','/api/{appCode}/','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22field\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[\x22region\x22],\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}}}\x27','\x20\x20\x20\x20$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}}','getOne','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','956205kHlwMM','high-risk-write','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','filter','data\x20','2pelmux','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','read','code','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','1044496ehnChx','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20of\x20records\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}','command','build','Update\x20an\x20existing\x20record','\x20\x20LOGICAL\x20COMBINATORS','paramsRequired','aggregate','update','2351832eqaytm','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','join','Filter\x20dataset\x20records\x20with\x20query\x20conditions','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','\x20\x20\x20\x20Correct:\x20\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:10}\x27','9980127NgPmQS','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22field\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','\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{\x22field\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg\x22,\x22round\x22:true,\x22precision\x22:2}','\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\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','\x20on\x20dataset\x20','str','8wMMmoX','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','helpExtra','\x20\x20\x20\x20Pagination\x20is\x20controlled\x20via\x20JSON\x20in\x20--params.\x20Do\x20NOT\x20use\x20--page-size\x20as\x20a\x20CLI\x20flag.','risk','\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$contain\x20\x20\x20\x20\x20Substring\x20match\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$contain\x22:\x22test\x22}}','\x20\x20EXAMPLES','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20Example:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27'];a16_0x4cdf=function(){return _0x4d3283;};return a16_0x4cdf();}(function(_0x434c62,_0x199b23){const _0x506a0b=a16_0x1544,_0x506a4a=_0x434c62();while(!![]){try{const _0x541f23=parseInt(_0x506a0b(0x17d))/0x1*(parseInt(_0x506a0b(0x156))/0x2)+parseInt(_0x506a0b(0x178))/0x3+-parseInt(_0x506a0b(0x182))/0x4+-parseInt(_0x506a0b(0x16d))/0x5+-parseInt(_0x506a0b(0x136))/0x6+-parseInt(_0x506a0b(0x162))/0x7+parseInt(_0x506a0b(0x145))/0x8*(parseInt(_0x506a0b(0x13c))/0x9);if(_0x541f23===_0x199b23)break;else _0x506a4a['push'](_0x506a4a['shift']());}catch(_0x5207ed){_0x506a4a['push'](_0x506a4a['shift']());}}}(a16_0x4cdf,0x43d80));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}from'../../utils/params.js';import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':a16_0x387db2(0x17b),'operation':'filter','risk':'read','paramsRequired':![],'description':a16_0x387db2(0x139),'paramsHint':a16_0x387db2(0x167)+a16_0x387db2(0x160),'helpExtra':['\x20\x20WHERE\x20OPERATORS',a16_0x387db2(0x15f),a16_0x387db2(0x16f),a16_0x387db2(0x158),a16_0x387db2(0x166),'\x20\x20\x20\x20$lt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lt\x22:1000}}','\x20\x20\x20\x20$lte\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20or\x20equal\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lte\x22:1000}}',a16_0x387db2(0x154),a16_0x387db2(0x14b),a16_0x387db2(0x13f),a16_0x387db2(0x175),'',a16_0x387db2(0x187),a16_0x387db2(0x14a),a16_0x387db2(0x15e),'',a16_0x387db2(0x17e),a16_0x387db2(0x13a),a16_0x387db2(0x165),a16_0x387db2(0x140),a16_0x387db2(0x168),a16_0x387db2(0x142),'','\x20\x20PAGINATION',a16_0x387db2(0x148),a16_0x387db2(0x13b),a16_0x387db2(0x157)]['join']('\x0a')},{'command':a16_0x387db2(0x176),'operation':a16_0x387db2(0x176),'risk':a16_0x387db2(0x17f),'paramsRequired':!![],'description':a16_0x387db2(0x161),'paramsHint':a16_0x387db2(0x169)},{'command':a16_0x387db2(0x155),'operation':a16_0x387db2(0x155),'risk':a16_0x387db2(0x163),'paramsRequired':!![],'description':a16_0x387db2(0x153),'paramsHint':a16_0x387db2(0x146)},{'command':a16_0x387db2(0x172),'operation':'batchCreate','risk':a16_0x387db2(0x163),'paramsRequired':!![],'description':'Create\x20multiple\x20records\x20in\x20one\x20request\x20(SDK\x20batchCreate)','paramsHint':a16_0x387db2(0x137)},{'command':'update','operation':a16_0x387db2(0x18a),'risk':a16_0x387db2(0x163),'paramsRequired':!![],'description':a16_0x387db2(0x186),'paramsHint':a16_0x387db2(0x14d)},{'command':a16_0x387db2(0x150),'operation':'delete','risk':a16_0x387db2(0x179),'paramsRequired':!![],'description':a16_0x387db2(0x164),'paramsHint':a16_0x387db2(0x169)},{'command':a16_0x387db2(0x189),'operation':a16_0x387db2(0x189),'risk':'read','paramsRequired':![],'description':a16_0x387db2(0x141),'paramsHint':a16_0x387db2(0x177)+'Example:\x20\x27{\x22aggregate\x22:[{\x22field\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','helpExtra':[a16_0x387db2(0x16e),'\x20\x20\x20\x20SUM\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Sum\x20of\x20field\x20values\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}',a16_0x387db2(0x183),'\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20distinct\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22,\x22distinct\x22:true}',a16_0x387db2(0x171),a16_0x387db2(0x13e),'\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{\x22field\x22:\x22price\x22,\x22type\x22:\x22MAX\x22,\x22alias\x22:\x22max_price\x22}','\x20\x20\x20\x20MIN\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Minimum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22price\x22,\x22type\x22:\x22MIN\x22,\x22alias\x22:\x22min_price\x22}','','\x20\x20PARAMS\x20STRUCTURE','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return\x20alongside\x20aggregates,\x20e.g.\x20[\x22status\x22,\x22region\x22]',a16_0x387db2(0x17a),a16_0x387db2(0x16c),a16_0x387db2(0x16a),'\x20\x20\x20\x20having\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Post-aggregation\x20filter,\x20e.g.\x20{\x22total\x22:{\x22$gt\x22:1000}}',a16_0x387db2(0x181),'',a16_0x387db2(0x14c),'\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status',a16_0x387db2(0x13d),'',a16_0x387db2(0x15d),a16_0x387db2(0x174)][a16_0x387db2(0x138)]('\x0a')}];function a16_0x1544(_0x176930,_0x47109e){_0x176930=_0x176930-0x136;const _0x4cdfec=a16_0x4cdf();let _0x1544c2=_0x4cdfec[_0x176930];return _0x1544c2;}function makeDataCommand(_0x8452a8){const _0x3bef65=a16_0x387db2,_0x493380=_0x3bef65(0x17c)+_0x8452a8[_0x3bef65(0x184)],_0x19f41d={'service':_0x3bef65(0x15c),'command':_0x8452a8[_0x3bef65(0x184)],'description':_0x8452a8['description'],'risk':_0x8452a8[_0x3bef65(0x149)],'helpExtra':_0x8452a8[_0x3bef65(0x147)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x8452a8[_0x3bef65(0x151)]}],'validate':async _0x1d37b0=>{const _0x212497=_0x3bef65;_0x8452a8[_0x212497(0x188)]&&requireAnyOf(_0x1d37b0,[_0x212497(0x15a)],_0x493380),_0x8452a8['operation']===_0x212497(0x172)&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x1d37b0[_0x212497(0x144)]('params')));},async 'execute'(_0x485ef0){const _0x5324c0=_0x3bef65,_0x1bba29=_0x485ef0['str'](_0x5324c0(0x180)),_0x2c135f=_0x8452a8[_0x5324c0(0x16b)]===_0x5324c0(0x172)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x485ef0[_0x5324c0(0x144)](_0x5324c0(0x15a)))):parseJsonParams(_0x485ef0[_0x5324c0(0x144)](_0x5324c0(0x15a)))??{},_0x4e3198=Date[_0x5324c0(0x15b)](),_0x1cdb48=await executeData(_0x1bba29,_0x8452a8[_0x5324c0(0x16b)],_0x2c135f),_0x382cc4=Date['now']()-_0x4e3198;return{'ok':!![],'data':{'result':_0x1cdb48,'elapsed':_0x382cc4},'message':_0x5324c0(0x17c)+_0x8452a8['command']+'\x20completed\x20in\x20'+_0x382cc4+'ms'};}};return _0x8452a8[_0x3bef65(0x149)]!==_0x3bef65(0x17f)&&(_0x19f41d[_0x3bef65(0x152)]=async _0x669971=>{const _0x1dec00=_0x3bef65,_0x188413=_0x669971[_0x1dec00(0x144)]('code'),_0x5ec8c1=_0x8452a8['operation']===_0x1dec00(0x172)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x669971[_0x1dec00(0x144)](_0x1dec00(0x15a)))):parseJsonParams(_0x669971[_0x1dec00(0x144)]('params'))??{};return dryRun(_0x1dec00(0x170),_0x1dec00(0x173)+_0x188413+'/'+_0x8452a8[_0x1dec00(0x16b)])['body'](_0x5ec8c1)[_0x1dec00(0x159)](_0x1dec00(0x14f)+_0x8452a8[_0x1dec00(0x184)]+_0x1dec00(0x143)+_0x188413)[_0x1dec00(0x185)]();}),_0x19f41d;}export const dataDefinitions=specs[a16_0x387db2(0x14e)](makeDataCommand);
|
|
1
|
+
const a16_0x5260cd=a16_0x26c6;(function(_0x3bcece,_0x41aa42){const _0x1d4f20=a16_0x26c6,_0x4d84c8=_0x3bcece();while(!![]){try{const _0x3b7b4f=-parseInt(_0x1d4f20(0x1b0))/0x1*(-parseInt(_0x1d4f20(0x17e))/0x2)+parseInt(_0x1d4f20(0x19c))/0x3+-parseInt(_0x1d4f20(0x17f))/0x4+-parseInt(_0x1d4f20(0x1ad))/0x5*(-parseInt(_0x1d4f20(0x1cd))/0x6)+-parseInt(_0x1d4f20(0x187))/0x7+parseInt(_0x1d4f20(0x18f))/0x8+-parseInt(_0x1d4f20(0x1ae))/0x9*(parseInt(_0x1d4f20(0x183))/0xa);if(_0x3b7b4f===_0x41aa42)break;else _0x4d84c8['push'](_0x4d84c8['shift']());}catch(_0x44a0f6){_0x4d84c8['push'](_0x4d84c8['shift']());}}}(a16_0x46b9,0x940b7));import{executeData}from'../../core/sdk-client.js';import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';function a16_0x26c6(_0x9f773e,_0x47ca02){_0x9f773e=_0x9f773e-0x17c;const _0x46b920=a16_0x46b9();let _0x26c62a=_0x46b920[_0x9f773e];return _0x26c62a;}import{requireAnyOf}from'../../commands/common/constraints.js';function a16_0x46b9(){const _0x395345=['\x20\x20\x20\x20$or\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Any\x20condition\x20matches\x20\x20{\x22$or\x22:[{\x22status\x22:{\x22$eq\x22:\x22active\x22}},{\x22status\x22:{\x22$eq\x22:\x22pending\x22}}]}','\x20\x20\x20\x20Wrong:\x20\x20\x20\x20--page-size\x2010\x20\x20(this\x20is\x20not\x20a\x20valid\x20flag)','Example:\x20\x27{\x22aggregate\x22:[{\x22field\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','\x20\x20\x20\x20MIN\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Minimum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22price\x22,\x22type\x22:\x22MIN\x22,\x22alias\x22:\x22min_price\x22}','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','delete','\x20completed\x20in\x20','high-risk-write','\x20\x20AGGREGATE\x20TYPES','\x20\x20\x20\x20having\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Post-aggregation\x20filter,\x20e.g.\x20{\x22total\x22:{\x22$gt\x22:1000}}','POST','Update\x20an\x20existing\x20record','dryRun','command','\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{\x22field\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg\x22,\x22round\x22:true,\x22precision\x22:2}','6111618zkKpTB','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','update','5074rYsIVQ','2876120mKvXKA','\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]}}','data\x20','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20of\x20records\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}','110oOsuAf','\x20\x20\x20\x20$lt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lt\x22:1000}}','\x20\x20\x20\x20$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}}]}','paramsRequired','8297646xHtlBI','batchCreate','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','Create\x20a\x20new\x20record\x20in\x20a\x20dataset','risk','map','Get\x20a\x20single\x20record\x20by\x20ID','\x20\x20PARAMS\x20STRUCTURE','6869312wlAGnb','aggregate','\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\x20Pagination\x20is\x20controlled\x20via\x20JSON\x20in\x20--params.\x20Do\x20NOT\x20use\x20--page-size\x20as\x20a\x20CLI\x20flag.','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22field\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','body','description','\x20\x20WHERE\x20OPERATORS','\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{\x22field\x22:\x22price\x22,\x22type\x22:\x22MAX\x22,\x22alias\x22:\x22max_price\x22}','\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}}','operation','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','now','1340592NiohfZ','str','\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{\x22field\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg_score\x22}','\x20\x20LOGICAL\x20COMBINATORS','Create\x20multiple\x20records\x20in\x20one\x20request\x20(SDK\x20batchCreate)','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20Example:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27','\x20\x20PAGINATION','getOne','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','\x20\x20\x20\x20$gt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$gt\x22:100}}','code','filter','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','\x20\x20\x20\x20$endWith\x20\x20\x20\x20\x20Ends\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22email\x22:{\x22$endWith\x22:\x22@example.com\x22}}','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','paramsHint','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','5YoTVGT','225054JJNNGj','create','182stdmaR','\x20\x20\x20\x20SUM\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Sum\x20of\x20field\x20values\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}','data','\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\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]','Preview:\x20data\x20','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','write','params','\x20on\x20dataset\x20','join','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20'];a16_0x46b9=function(){return _0x395345;};return a16_0x46b9();}import{parseJsonParams,parseJsonParamsValue,parseBatchCreateItemsFromParams}from'../../utils/params.js';import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':a16_0x5260cd(0x1a7),'operation':a16_0x5260cd(0x1a7),'risk':'read','paramsRequired':![],'description':'Filter\x20dataset\x20records\x20with\x20query\x20conditions','paramsHint':a16_0x5260cd(0x1bd)+a16_0x5260cd(0x1c2),'helpExtra':[a16_0x5260cd(0x196),'\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}}',a16_0x5260cd(0x198),a16_0x5260cd(0x1a5),'\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}}',a16_0x5260cd(0x184),'\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}}',a16_0x5260cd(0x180),'\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}}',a16_0x5260cd(0x191),a16_0x5260cd(0x1a9),'',a16_0x5260cd(0x19f),a16_0x5260cd(0x185),a16_0x5260cd(0x1be),'',a16_0x5260cd(0x1ac),'\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)',a16_0x5260cd(0x1b3),a16_0x5260cd(0x1b4),a16_0x5260cd(0x189),a16_0x5260cd(0x17c),'',a16_0x5260cd(0x1a2),a16_0x5260cd(0x192),'\x20\x20\x20\x20Correct:\x20\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:10}\x27',a16_0x5260cd(0x1bf)][a16_0x5260cd(0x1ba)]('\x0a')},{'command':a16_0x5260cd(0x1a3),'operation':a16_0x5260cd(0x1a3),'risk':'read','paramsRequired':!![],'description':a16_0x5260cd(0x18d),'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':a16_0x5260cd(0x1af),'operation':'create','risk':'write','paramsRequired':!![],'description':a16_0x5260cd(0x18a),'paramsHint':a16_0x5260cd(0x1a8)},{'command':a16_0x5260cd(0x188),'operation':a16_0x5260cd(0x188),'risk':a16_0x5260cd(0x1b7),'paramsRequired':!![],'description':a16_0x5260cd(0x1a0),'paramsHint':a16_0x5260cd(0x1b6)},{'command':a16_0x5260cd(0x17d),'operation':a16_0x5260cd(0x17d),'risk':a16_0x5260cd(0x1b7),'paramsRequired':!![],'description':a16_0x5260cd(0x1c9),'paramsHint':a16_0x5260cd(0x1a1)},{'command':a16_0x5260cd(0x1c3),'operation':a16_0x5260cd(0x1c3),'risk':a16_0x5260cd(0x1c5),'paramsRequired':!![],'description':'Delete\x20a\x20record\x20(requires\x20--yes\x20in\x20non-interactive)','paramsHint':a16_0x5260cd(0x1a4)},{'command':a16_0x5260cd(0x190),'operation':a16_0x5260cd(0x190),'risk':'read','paramsRequired':![],'description':'Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','paramsHint':a16_0x5260cd(0x19a)+a16_0x5260cd(0x1c0),'helpExtra':[a16_0x5260cd(0x1c6),a16_0x5260cd(0x1b1),a16_0x5260cd(0x182),'\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20distinct\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22,\x22distinct\x22:true}',a16_0x5260cd(0x19e),a16_0x5260cd(0x1cc),a16_0x5260cd(0x197),a16_0x5260cd(0x1c1),'',a16_0x5260cd(0x18e),'\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]',a16_0x5260cd(0x1bc),'\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]',a16_0x5260cd(0x1c7),'\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','','\x20\x20EXAMPLES',a16_0x5260cd(0x1bb),'\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22field\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','',a16_0x5260cd(0x1aa),a16_0x5260cd(0x193)][a16_0x5260cd(0x1ba)]('\x0a')}];function makeDataCommand(_0xa87ff0){const _0xbbd3be=a16_0x5260cd,_0x2d0650=_0xbbd3be(0x181)+_0xa87ff0[_0xbbd3be(0x1cb)],_0x2b5fd0={'service':_0xbbd3be(0x1b2),'command':_0xa87ff0['command'],'description':_0xa87ff0[_0xbbd3be(0x195)],'risk':_0xa87ff0[_0xbbd3be(0x18b)],'helpExtra':_0xa87ff0['helpExtra'],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0xa87ff0[_0xbbd3be(0x1ab)]}],'validate':async _0x2d15ba=>{const _0x2e267d=_0xbbd3be;_0xa87ff0[_0x2e267d(0x186)]&&requireAnyOf(_0x2d15ba,[_0x2e267d(0x1b8)],_0x2d0650),_0xa87ff0[_0x2e267d(0x199)]===_0x2e267d(0x188)&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x2d15ba[_0x2e267d(0x19d)](_0x2e267d(0x1b8))));},async 'execute'(_0x6796d){const _0x2032b5=_0xbbd3be,_0x5e99fb=_0x6796d['str'](_0x2032b5(0x1a6)),_0x333d27=_0xa87ff0[_0x2032b5(0x199)]==='batchCreate'?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x6796d[_0x2032b5(0x19d)](_0x2032b5(0x1b8)))):parseJsonParams(_0x6796d[_0x2032b5(0x19d)](_0x2032b5(0x1b8)))??{},_0x157026=Date[_0x2032b5(0x19b)](),_0x58ca05=await executeData(_0x5e99fb,_0xa87ff0[_0x2032b5(0x199)],_0x333d27),_0x5494f3=Date[_0x2032b5(0x19b)]()-_0x157026;return{'ok':!![],'data':{'result':_0x58ca05,'elapsed':_0x5494f3},'message':_0x2032b5(0x181)+_0xa87ff0[_0x2032b5(0x1cb)]+_0x2032b5(0x1c4)+_0x5494f3+'ms'};}};return _0xa87ff0[_0xbbd3be(0x18b)]!=='read'&&(_0x2b5fd0[_0xbbd3be(0x1ca)]=async _0x578305=>{const _0x2d4042=_0xbbd3be,_0x26aa39=_0x578305[_0x2d4042(0x19d)]('code'),_0x352f2b=_0xa87ff0[_0x2d4042(0x199)]==='batchCreate'?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x578305['str'](_0x2d4042(0x1b8)))):parseJsonParams(_0x578305[_0x2d4042(0x19d)](_0x2d4042(0x1b8)))??{};return dryRun(_0x2d4042(0x1c8),'/api/{appCode}/'+_0x26aa39+'/'+_0xa87ff0[_0x2d4042(0x199)])[_0x2d4042(0x194)](_0x352f2b)[_0x2d4042(0x195)](_0x2d4042(0x1b5)+_0xa87ff0['command']+_0x2d4042(0x1b9)+_0x26aa39)['build']();}),_0x2b5fd0;}export const dataDefinitions=specs[a16_0x5260cd(0x18c)](makeDataCommand);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a17_0x3ec346=a17_0x5e81;(function(_0x3f5c66,_0x19ccf3){const _0x57bfe9=a17_0x5e81,_0x5a0446=_0x3f5c66();while(!![]){try{const _0x728de2=-parseInt(_0x57bfe9(0x19f))/0x1*(-parseInt(_0x57bfe9(0x168))/0x2)+-parseInt(_0x57bfe9(0x192))/0x3*(-parseInt(_0x57bfe9(0x18e))/0x4)+parseInt(_0x57bfe9(0x17b))/0x5*(parseInt(_0x57bfe9(0x194))/0x6)+parseInt(_0x57bfe9(0x1a1))/0x7+parseInt(_0x57bfe9(0x1ab))/0x8+-parseInt(_0x57bfe9(0x17a))/0x9*(-parseInt(_0x57bfe9(0x1a8))/0xa)+-parseInt(_0x57bfe9(0x189))/0xb;if(_0x728de2===_0x19ccf3)break;else _0x5a0446['push'](_0x5a0446['shift']());}catch(_0x40eb81){_0x5a0446['push'](_0x5a0446['shift']());}}}(a17_0x415d,0x64dce));function a17_0x5e81(_0x45c3d6,_0x3c6c34){_0x45c3d6=_0x45c3d6-0x166;const _0x415de8=a17_0x415d();let _0x5e812a=_0x415de8[_0x45c3d6];return _0x5e812a;}import{getDatasetDetail,listDatasets}from'../../core/api-client.js';function a17_0x415d(){const _0x254f5b=['detail','dbtableConfig','code','datasetKey','responseFields','name','host','fields','creatorNameField','7522HKBQbH','deleted','isArray','path','filter','indexes','object','validateRules','options','modifierNameField','description','required','responseBody','type','toDatasetName','afterScriptId','push','toTableName','9DSBMBl','12570aodBac','modelCode','doType','string','requestBody','properties','str','creatorIdField','method','sourceType','updateTimeField','columnCodeListWithDeleted','dataset','extend','29498205tifZKk','entries','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','dbName','dbType','392VdHIyC','displayName','relations','dbId','18588SywhgV','allFields','1806bUBHUy','tableComment','beforeScriptId','toDatasetCode','map','logicField','split','allFieldNames','find','pkField','source','161XrQlXy','tableName','5422382zOEfos','modifierIdField','doVersion','formatRules','operations','createTimeField','appCode','447610LVuONx','dblinkInfoDTO','dataType','2447672gkrqTy','title','length','read','toFieldLabel','requestFields'];a17_0x415d=function(){return _0x254f5b;};return a17_0x415d();}import{CODE_FLAG}from'../../commands/common/flags.js';function normalizeField(_0x426d86){const _0x5c03b4=a17_0x5e81;if(_0x426d86[_0x5c03b4(0x169)])return null;const _0x2cd761=Boolean(_0x426d86[_0x5c03b4(0x18f)]!==undefined||_0x426d86['doType']!==undefined);let _0x76d89d={};if(!_0x2cd761&&typeof _0x426d86['extend']==='string')try{_0x76d89d=JSON['parse'](_0x426d86[_0x5c03b4(0x188)]);}catch{}const _0x53adf0=_0x2cd761?_0x426d86[_0x5c03b4(0x1b6)]:_0x426d86[_0x5c03b4(0x1b3)],_0x51d497=_0x2cd761?_0x426d86[_0x5c03b4(0x18f)]:_0x426d86['name'],_0x4129e7=_0x2cd761?_0x426d86[_0x5c03b4(0x17d)]:_0x426d86[_0x5c03b4(0x175)]||_0x426d86[_0x5c03b4(0x1aa)],_0x1cad19=_0x2cd761?_0x426d86[_0x5c03b4(0x19d)]===!![]:_0x76d89d[_0x5c03b4(0x19d)]===!![],_0x27fd8c=_0x2cd761?_0x426d86[_0x5c03b4(0x173)]===!![]:_0x76d89d['required']===!![],_0x5b8985=_0x2cd761?_0x426d86[_0x5c03b4(0x170)]??null:_0x76d89d['options']??null,_0x1e9964={'name':_0x53adf0,'displayName':_0x51d497||_0x53adf0,'type':_0x4129e7,'dbType':_0x426d86[_0x5c03b4(0x18d)],'pk':_0x1cad19,'required':_0x27fd8c,'description':_0x426d86[_0x5c03b4(0x172)]||undefined};return Array['isArray'](_0x5b8985)&&_0x5b8985[_0x5c03b4(0x1ad)]>0x0&&(_0x1e9964['options']=_0x5b8985),_0x1e9964;}function parseJsonMaybe(_0x53019a){const _0x48d171=a17_0x5e81;if(typeof _0x53019a!==_0x48d171(0x17e))return _0x53019a;try{return JSON['parse'](_0x53019a);}catch{return _0x53019a;}}function normalizeOperationEntry(_0x50abdc,_0x27558f){const _0x13cb0d=a17_0x5e81;if(!_0x27558f||typeof _0x27558f!==_0x13cb0d(0x16e))return null;if(!_0x27558f[_0x13cb0d(0x183)]||!_0x27558f[_0x13cb0d(0x16b)])return null;const _0x3949f1={'name':_0x50abdc,'method':_0x27558f['method'],'path':_0x27558f[_0x13cb0d(0x16b)]};if(_0x27558f['host'])_0x3949f1[_0x13cb0d(0x1b7)]=_0x27558f['host'];if(_0x27558f[_0x13cb0d(0x17f)]!=null)_0x3949f1[_0x13cb0d(0x17f)]=parseJsonMaybe(_0x27558f[_0x13cb0d(0x17f)]);if(_0x27558f['responseBody']!=null)_0x3949f1[_0x13cb0d(0x174)]=parseJsonMaybe(_0x27558f[_0x13cb0d(0x174)]);if(_0x27558f[_0x13cb0d(0x196)]!=null)_0x3949f1[_0x13cb0d(0x196)]=_0x27558f[_0x13cb0d(0x196)];if(_0x27558f['afterScriptId']!=null)_0x3949f1[_0x13cb0d(0x177)]=_0x27558f[_0x13cb0d(0x177)];if(Array['isArray'](_0x27558f[_0x13cb0d(0x1b0)]))_0x3949f1['requestFields']=_0x27558f['requestFields'];if(Array[_0x13cb0d(0x16a)](_0x27558f[_0x13cb0d(0x1b5)]))_0x3949f1[_0x13cb0d(0x1b5)]=_0x27558f[_0x13cb0d(0x1b5)];return _0x3949f1;}function summarizeDbtable(_0x1f58fc){const _0xdc5027=a17_0x5e81,_0x5683cb={},_0x114e0d=[_0xdc5027(0x191),'dbName',_0xdc5027(0x1a0),_0xdc5027(0x1b4),_0xdc5027(0x19d),_0xdc5027(0x193),_0xdc5027(0x199),_0xdc5027(0x1a6),_0xdc5027(0x185),_0xdc5027(0x182),_0xdc5027(0x167),_0xdc5027(0x1a2),_0xdc5027(0x171),'labelField',_0xdc5027(0x1a9)];for(const _0x1a1684 of _0x114e0d){if(_0x1f58fc[_0x1a1684]!==undefined)_0x5683cb[_0x1a1684]=_0x1f58fc[_0x1a1684];}return typeof _0x5683cb[_0xdc5027(0x193)]===_0xdc5027(0x17e)&&_0x5683cb[_0xdc5027(0x193)]['length']>0x0&&(_0x5683cb[_0xdc5027(0x19b)]=_0x5683cb[_0xdc5027(0x193)][_0xdc5027(0x19a)](',')['map'](_0xc4aa37=>_0xc4aa37['trim']())[_0xdc5027(0x16c)](Boolean)),_0x5683cb;}function normalizeRelatedPages(_0x2fcefc){const _0x407301=a17_0x5e81;if(!Array['isArray'](_0x2fcefc))return[];return _0x2fcefc[_0x407301(0x16c)](_0x15d257=>_0x15d257&&typeof _0x15d257===_0x407301(0x16e))[_0x407301(0x198)](_0x3193ed=>({'id':_0x3193ed['id'],'type':_0x3193ed[_0x407301(0x175)],'code':_0x3193ed[_0x407301(0x1b3)],'title':_0x3193ed[_0x407301(0x1ac)],'deleted':_0x3193ed[_0x407301(0x169)]===!![]}));}function normalizeFallbackFieldName(_0x3d3de5,_0x44b0c8){const _0x37deef=_0x3d3de5['trim']();if(!_0x37deef)return null;return{'name':_0x37deef,'displayName':_0x37deef,'type':undefined,'dbType':undefined,'pk':_0x37deef===_0x44b0c8,'required':![],'description':undefined};}async function loadListFieldFallback(_0x140ef1,_0x2d1329){const _0x397ae5=a17_0x5e81;if(!_0x140ef1||!_0x2d1329)return[];try{const _0x2932de=await listDatasets(_0x140ef1,{'code':_0x2d1329}),_0x356d97=_0x2932de[_0x397ae5(0x19c)](_0x103b44=>_0x103b44['code']===_0x2d1329)??_0x2932de[0x0],_0x4e7c62=_0x356d97?.[_0x397ae5(0x1b2)]??{},_0x34f511=typeof _0x4e7c62[_0x397ae5(0x193)]==='string'?_0x4e7c62[_0x397ae5(0x193)]['split'](','):[];return _0x34f511['map'](_0x5e4330=>normalizeFallbackFieldName(_0x5e4330,_0x4e7c62[_0x397ae5(0x19d)]))[_0x397ae5(0x16c)](_0x2a9668=>_0x2a9668!==null);}catch{return[];}}export const datasetDetail={'service':'dataset','command':a17_0x3ec346(0x1b1),'description':a17_0x3ec346(0x18b),'risk':a17_0x3ec346(0x1ae),'flags':[CODE_FLAG],async 'execute'(_0x369eda){const _0x5a8ee2=a17_0x3ec346,_0x4a9fa3=await getDatasetDetail(_0x369eda[_0x5a8ee2(0x181)](_0x5a8ee2(0x1b3))),_0xb32a3e=Array['isArray'](_0x4a9fa3[_0x5a8ee2(0x166)])?_0x4a9fa3['fields']:Array[_0x5a8ee2(0x16a)](_0x4a9fa3[_0x5a8ee2(0x180)])?_0x4a9fa3[_0x5a8ee2(0x180)]:[];let _0x5710c8=_0xb32a3e[_0x5a8ee2(0x198)](_0x4170d3=>normalizeField(_0x4170d3))[_0x5a8ee2(0x16c)](_0x3a3d00=>_0x3a3d00!==null);_0x5710c8[_0x5a8ee2(0x1ad)]===0x0&&(_0x5710c8=await loadListFieldFallback(_0x369eda[_0x5a8ee2(0x1a7)],_0x369eda[_0x5a8ee2(0x181)]('code')));const _0x5ad59a=_0x4a9fa3[_0x5a8ee2(0x1a5)]??{},_0x33b3b3=[];for(const [_0x12989c,_0x5dc0b]of Object[_0x5a8ee2(0x18a)](_0x5ad59a)){const _0x3a4167=normalizeOperationEntry(_0x12989c,_0x5dc0b);if(_0x3a4167)_0x33b3b3[_0x5a8ee2(0x178)](_0x3a4167);}const _0x74401b=_0x4a9fa3[_0x5a8ee2(0x1b2)]??{},_0x13f073=_0x4a9fa3[_0x5a8ee2(0x187)]??{},_0x2b1853=_0x74401b[_0x5a8ee2(0x191)]!=null?{'id':_0x74401b[_0x5a8ee2(0x191)],'name':_0x74401b[_0x5a8ee2(0x18c)]??null}:undefined;let _0x108363;return typeof _0x4a9fa3[_0x5a8ee2(0x188)]===_0x5a8ee2(0x17e)&&(_0x108363=parseJsonMaybe(_0x4a9fa3[_0x5a8ee2(0x188)])),{'ok':!![],'data':{'id':_0x4a9fa3['modelId']??_0x4a9fa3['id'],'name':_0x4a9fa3[_0x5a8ee2(0x1b6)],'code':_0x4a9fa3[_0x5a8ee2(0x17c)]||_0x4a9fa3[_0x5a8ee2(0x1b3)],'doVersion':_0x4a9fa3[_0x5a8ee2(0x1a3)],'description':_0x4a9fa3['description']||_0x13f073[_0x5a8ee2(0x195)]||undefined,'source':_0x4a9fa3[_0x5a8ee2(0x19e)]||_0x13f073[_0x5a8ee2(0x184)],'table':_0x74401b[_0x5a8ee2(0x1a0)]||_0x13f073[_0x5a8ee2(0x1a0)],'datasetKey':_0x74401b['datasetKey'],'pk':_0x74401b['pkField'],'db':_0x2b1853,'dbtable':summarizeDbtable(_0x74401b),'fields':_0x5710c8,'operations':_0x33b3b3,'indexes':Array[_0x5a8ee2(0x16a)](_0x13f073[_0x5a8ee2(0x16d)])?_0x13f073[_0x5a8ee2(0x16d)]:[],'relations':Array[_0x5a8ee2(0x16a)](_0x4a9fa3[_0x5a8ee2(0x190)])?_0x4a9fa3['relations'][_0x5a8ee2(0x198)](_0x44873e=>({'fromField':_0x44873e['fromField'],'toDataset':_0x44873e[_0x5a8ee2(0x176)],'toCode':_0x44873e[_0x5a8ee2(0x197)],'toTable':_0x44873e[_0x5a8ee2(0x179)],'toField':_0x44873e['toField'],'labelField':_0x44873e[_0x5a8ee2(0x1af)]||undefined})):[],'relatedPages':normalizeRelatedPages(_0x4a9fa3['relatedPageInfoList']),...Array[_0x5a8ee2(0x16a)](_0x4a9fa3[_0x5a8ee2(0x186)])?{'columnCodeListWithDeleted':_0x4a9fa3[_0x5a8ee2(0x186)]}:{},'formatRules':Array[_0x5a8ee2(0x16a)](_0x4a9fa3[_0x5a8ee2(0x1a4)])?_0x4a9fa3[_0x5a8ee2(0x1a4)]:[],'validateRules':Array[_0x5a8ee2(0x16a)](_0x4a9fa3[_0x5a8ee2(0x16f)])?_0x4a9fa3[_0x5a8ee2(0x16f)]:[],..._0x108363!==undefined?{'extend':_0x108363}:{},'stats':{'fieldCount':_0x5710c8[_0x5a8ee2(0x1ad)],'operationCount':_0x33b3b3[_0x5a8ee2(0x1ad)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a18_0x5212(_0x3ce304,_0x4039ae){_0x3ce304=_0x3ce304-0x1b3;const _0x45274f=a18_0x4527();let _0x52120e=_0x45274f[_0x3ce304];return _0x52120e;}function a18_0x4527(){const _0x315d16=['30FzxiuL','2172450WlHsRM','10670632BWJyaL','3212kRnVlp','4467mLJRuJ','1296006vRpiij','1446982zoMnLc','32688756wAzGbd','547190Zanfpg'];a18_0x4527=function(){return _0x315d16;};return a18_0x4527();}(function(_0x22ce55,_0x1fca8d){const _0x594fe9=a18_0x5212,_0x25aa26=_0x22ce55();while(!![]){try{const _0x307cc5=-parseInt(_0x594fe9(0x1b3))/0x1+parseInt(_0x594fe9(0x1ba))/0x2+-parseInt(_0x594fe9(0x1b8))/0x3*(-parseInt(_0x594fe9(0x1b7))/0x4)+parseInt(_0x594fe9(0x1b4))/0x5*(parseInt(_0x594fe9(0x1b9))/0x6)+parseInt(_0x594fe9(0x1b5))/0x7+parseInt(_0x594fe9(0x1b6))/0x8+-parseInt(_0x594fe9(0x1bb))/0x9;if(_0x307cc5===_0x1fca8d)break;else _0x25aa26['push'](_0x25aa26['shift']());}catch(_0x36eef7){_0x25aa26['push'](_0x25aa26['shift']());}}}(a18_0x4527,0xa6085));import{datasetList}from'../../commands/dataset/list.js';import{datasetDetail}from'../../commands/dataset/detail.js';export const datasetDefinitions=[datasetList,datasetDetail];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a19_0x160430=a19_0x80b0;(function(_0x84097c,_0x32e4ca){const _0x13d600=a19_0x80b0,_0xb9a271=_0x84097c();while(!![]){try{const _0x2c9f6f=parseInt(_0x13d600(0x199))/0x1+-parseInt(_0x13d600(0x193))/0x2*(-parseInt(_0x13d600(0x19b))/0x3)+parseInt(_0x13d600(0x17d))/0x4*(parseInt(_0x13d600(0x181))/0x5)+parseInt(_0x13d600(0x18b))/0x6*(parseInt(_0x13d600(0x180))/0x7)+parseInt(_0x13d600(0x19c))/0x8+-parseInt(_0x13d600(0x197))/0x9*(-parseInt(_0x13d600(0x183))/0xa)+-parseInt(_0x13d600(0x191))/0xb*(parseInt(_0x13d600(0x19a))/0xc);if(_0x2c9f6f===_0x32e4ca)break;else _0xb9a271['push'](_0xb9a271['shift']());}catch(_0x4032df){_0xb9a271['push'](_0xb9a271['shift']());}}}(a19_0x4b73,0x83a95));function a19_0x80b0(_0x26d6d4,_0x40e66e){_0x26d6d4=_0x26d6d4-0x17d;const _0x4b7392=a19_0x4b73();let _0x80b099=_0x4b7392[_0x26d6d4];return _0x80b099;}import{listDatasets}from'../../core/api-client.js';function a19_0x4b73(){const _0x1df371=['565649PurzDb','775qQSGmy','str','80JLsENf','pkField','dbtableConfig','list','allFields','length','read','appCode','30xTrJvY','datasetKey','name','map','split','tableName','119141iobrVY','string','13904tznTjQ','dataset','source','Filter\x20by\x20dataset\x20name\x20(server-side\x20fuzzy\x20match)','495252cFOXGw','code','10908aqyiju','2004mBejLP','78ebVZXc','3850744NDWDVT','trim','21440KXcmua','List\x20datasets\x20in\x20the\x20app\x20(supports\x20server-side\x20name/code\x20filtering)','description'];a19_0x4b73=function(){return _0x1df371;};return a19_0x4b73();}import{CODE_FLAG}from'../../commands/common/flags.js';export const datasetList={'service':a19_0x160430(0x194),'command':a19_0x160430(0x186),'description':a19_0x160430(0x17e),'risk':a19_0x160430(0x189),'flags':[{'name':a19_0x160430(0x18d),'type':a19_0x160430(0x192),'description':a19_0x160430(0x196)},{...CODE_FLAG,'required':![],'description':'Filter\x20by\x20dataset\x20code\x20(server-side\x20exact\x20match)'}],async 'execute'(_0x8177e7){const _0x496d81=a19_0x160430,_0x38dde4=_0x8177e7[_0x496d81(0x182)]('name'),_0x331e54=_0x8177e7[_0x496d81(0x182)](_0x496d81(0x198)),_0x5063f8=await listDatasets(_0x8177e7[_0x496d81(0x18a)],{..._0x38dde4&&{'name':_0x38dde4},..._0x331e54&&{'code':_0x331e54}});return{'ok':!![],'data':{'total':_0x5063f8[_0x496d81(0x188)],'datasets':_0x5063f8['map'](_0x1b78c5=>{const _0x839d25=_0x496d81,_0x4f85f9=_0x1b78c5[_0x839d25(0x185)]??{};return{'id':_0x1b78c5['id'],'code':_0x1b78c5[_0x839d25(0x198)],'name':_0x1b78c5[_0x839d25(0x18d)],'source':_0x1b78c5[_0x839d25(0x195)],'description':_0x1b78c5[_0x839d25(0x17f)],'table':_0x4f85f9[_0x839d25(0x190)],'datasetKey':_0x4f85f9[_0x839d25(0x18c)],'pk':_0x4f85f9[_0x839d25(0x184)],'fields':_0x4f85f9[_0x839d25(0x187)]?_0x4f85f9[_0x839d25(0x187)][_0x839d25(0x18f)](',')[_0x839d25(0x18e)](_0x451f17=>_0x451f17[_0x839d25(0x19d)]()):[]};})}};}};
|
package/lib/commands/doctor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a20_0x2822a2=a20_0x499c;function a20_0x4082(){const _0x32a731=['\x20doctor','\x20\x20Merged\x20Config','(no\x20file)','3291770CeDkBc','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','pageSize','log','read','riskLevel','length','platform','12xtZxVs','check','missing','236978xPYVJC','Global','bold','currentApp','Diagnose\x20CLI\x20configuration\x20and\x20environment','\x20\x20Config\x20Files','accessKey','(none)','\x20\x20Auth','repeat','(missing)','yellow','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','arch','appCode','2ftVXTW','gray','53160WIpIae','(removed\x20—\x20cookie\x20auth\x20disabled)','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','(default)','defaultApp','red','\x20\x20runtimeDomain:\x20\x20\x20','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','1703530tMNhbh','locale','6045363LNCfrT','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','status','\x20(legacy/compat\x20only)','version','message','4250433sEnAWh','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Session\x20check:\x20\x20\x20','\x20(accessKey)','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','padEnd','8696WrZeCw','\x20\x20─','✓\x20Valid\x20JSON','2401UJNnAa','format','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20\x20API\x20Endpoints','green','56McDxcu','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','ClientAk','(default:\x20','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','⚠\x20Empty\x20(treated\x20as\x20{})','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20'];a20_0x4082=function(){return _0x32a731;};return a20_0x4082();}(function(_0x569b48,_0x369ee2){const _0x240a7d=a20_0x499c,_0x6151f0=_0x569b48();while(!![]){try{const _0x1a03b3=parseInt(_0x240a7d(0x1e2))/0x1*(parseInt(_0x240a7d(0x1d3))/0x2)+-parseInt(_0x240a7d(0x1e4))/0x3*(parseInt(_0x240a7d(0x203))/0x4)+parseInt(_0x240a7d(0x1ed))/0x5*(parseInt(_0x240a7d(0x1d0))/0x6)+parseInt(_0x240a7d(0x1fe))/0x7*(parseInt(_0x240a7d(0x1fb))/0x8)+-parseInt(_0x240a7d(0x1ef))/0x9+-parseInt(_0x240a7d(0x20e))/0xa+parseInt(_0x240a7d(0x1f5))/0xb;if(_0x1a03b3===_0x369ee2)break;else _0x6151f0['push'](_0x6151f0['shift']());}catch(_0x1b0b63){_0x6151f0['push'](_0x6151f0['shift']());}}}(a20_0x4082,0x68a7e));import a20_0x5a3325 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,getRuntimeDomain,getUserDomain}from'../constant/domain.js';import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{isLegacyCompatConfigKey}from'../config/schema.js';async function execute(_0x3dcc91){const _0x4e6a1d=a20_0x499c,_0x20076b=getCliVersion(),_0x26ca3b=buildConfigFromFlags({});await initGlobalEnvironment(_0x26ca3b),console[_0x4e6a1d(0x211)](),console[_0x4e6a1d(0x211)](a20_0x5a3325[_0x4e6a1d(0x1d5)](CLI_BIN_NAME+_0x4e6a1d(0x20b))),console[_0x4e6a1d(0x211)](a20_0x5a3325['gray']('─'[_0x4e6a1d(0x1dc)](0x32))),console['log'](_0x4e6a1d(0x207)+_0x20076b),console[_0x4e6a1d(0x211)](_0x4e6a1d(0x1f6)+process[_0x4e6a1d(0x1f3)]),console[_0x4e6a1d(0x211)](_0x4e6a1d(0x20f)+process[_0x4e6a1d(0x1cf)]+'\x20'+process[_0x4e6a1d(0x1e0)]),console['log'](),console[_0x4e6a1d(0x211)](a20_0x5a3325[_0x4e6a1d(0x1d5)](_0x4e6a1d(0x1d8))),console[_0x4e6a1d(0x211)](a20_0x5a3325[_0x4e6a1d(0x1e3)](_0x4e6a1d(0x1fc)['repeat'](0x1e)));const _0x533252=getGlobalConfigPath(),_0x474543=getProjectConfigPath();console['log']('\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x533252||a20_0x5a3325['gray']('(not\x20found)'))),console[_0x4e6a1d(0x211)](_0x4e6a1d(0x1df)+(_0x474543||a20_0x5a3325['gray']('(not\x20found)'))),console[_0x4e6a1d(0x211)](),console[_0x4e6a1d(0x211)](a20_0x5a3325[_0x4e6a1d(0x1d5)]('\x20\x20Config\x20JSON')),console['log'](a20_0x5a3325[_0x4e6a1d(0x1e3)](_0x4e6a1d(0x1fc)[_0x4e6a1d(0x1dc)](0x1e)));const _0xea821f=(_0x5e77cb,_0x255f73)=>{const _0x1b3833=_0x4e6a1d;if(!_0x255f73){console[_0x1b3833(0x211)]('\x20\x20'+_0x5e77cb['padEnd'](0x11)+'\x20'+a20_0x5a3325[_0x1b3833(0x1e3)](_0x1b3833(0x20d)));return;}const _0x1d6706=inspectCliConfigJsonFile(_0x255f73);if(_0x1d6706['status']==='ok')console[_0x1b3833(0x211)]('\x20\x20'+_0x5e77cb['padEnd'](0x11)+'\x20'+a20_0x5a3325[_0x1b3833(0x202)](_0x1b3833(0x1fd)));else{if(_0x1d6706['status']==='empty')console[_0x1b3833(0x211)]('\x20\x20'+_0x5e77cb[_0x1b3833(0x1fa)](0x11)+'\x20'+a20_0x5a3325[_0x1b3833(0x1de)](_0x1b3833(0x208)));else _0x1d6706[_0x1b3833(0x1f1)]===_0x1b3833(0x1d2)?console['log']('\x20\x20'+_0x5e77cb['padEnd'](0x11)+'\x20'+a20_0x5a3325[_0x1b3833(0x1e3)](_0x1b3833(0x1dd))):(console[_0x1b3833(0x211)]('\x20\x20'+_0x5e77cb['padEnd'](0x11)+'\x20'+a20_0x5a3325['red']('✗\x20Invalid\x20JSON')),console['log']('\x20\x20'+''[_0x1b3833(0x1fa)](0x11)+'\x20'+a20_0x5a3325[_0x1b3833(0x1e9)](_0x1d6706[_0x1b3833(0x1f4)])));}};_0xea821f(_0x4e6a1d(0x1d4),_0x533252),_0xea821f('Project',_0x474543),console[_0x4e6a1d(0x211)](),console['log'](a20_0x5a3325['bold'](_0x4e6a1d(0x20c))),console[_0x4e6a1d(0x211)](a20_0x5a3325[_0x4e6a1d(0x1e3)](_0x4e6a1d(0x1fc)[_0x4e6a1d(0x1dc)](0x1e))),console[_0x4e6a1d(0x211)](_0x4e6a1d(0x1eb)+(_0x26ca3b[_0x4e6a1d(0x1e1)]||a20_0x5a3325[_0x4e6a1d(0x1e9)]('(not\x20set)'))),console['log'](_0x4e6a1d(0x1ec)+_0x26ca3b['env']);const _0x5bc29d=isLegacyCompatConfigKey('locale')?a20_0x5a3325['gray'](_0x26ca3b[_0x4e6a1d(0x1ee)]+_0x4e6a1d(0x1f2)):_0x26ca3b[_0x4e6a1d(0x1ee)];return console[_0x4e6a1d(0x211)]('\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x5bc29d),console[_0x4e6a1d(0x211)](_0x4e6a1d(0x209)+(_0x26ca3b[_0x4e6a1d(0x1e8)]||a20_0x5a3325[_0x4e6a1d(0x1e3)](_0x4e6a1d(0x1da)))),console['log'](_0x4e6a1d(0x1e6)+(_0x26ca3b[_0x4e6a1d(0x1d6)]||a20_0x5a3325[_0x4e6a1d(0x1e3)](_0x4e6a1d(0x1da)))),console[_0x4e6a1d(0x211)]('\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x26ca3b['format']||a20_0x5a3325[_0x4e6a1d(0x1e3)](_0x4e6a1d(0x206)+DEFAULT_CONFIG_VALUES[_0x4e6a1d(0x1ff)]+')'))),console[_0x4e6a1d(0x211)](_0x4e6a1d(0x204)+(_0x26ca3b[_0x4e6a1d(0x210)]??a20_0x5a3325[_0x4e6a1d(0x1e3)](_0x4e6a1d(0x1e7)))),console['log'](_0x4e6a1d(0x200)+_0x26ca3b[_0x4e6a1d(0x213)]),console[_0x4e6a1d(0x211)]('\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x26ca3b['verbose']),console[_0x4e6a1d(0x211)]('\x20\x20auth\x20(effective):\x20'+AUTH_MODE['ClientAk']),console[_0x4e6a1d(0x211)]('\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20'+(_0x26ca3b[_0x4e6a1d(0x1d9)]?a20_0x5a3325[_0x4e6a1d(0x202)]('(set,\x20length='+_0x26ca3b[_0x4e6a1d(0x1d9)][_0x4e6a1d(0x1ce)]+')'):a20_0x5a3325[_0x4e6a1d(0x1e3)](_0x4e6a1d(0x1da)))),console['log'](),console['log'](a20_0x5a3325[_0x4e6a1d(0x1d5)](_0x4e6a1d(0x201))),console['log'](a20_0x5a3325[_0x4e6a1d(0x1e3)](_0x4e6a1d(0x1fc)['repeat'](0x1e))),console[_0x4e6a1d(0x211)](_0x4e6a1d(0x1f0)+getApiDomain()),console[_0x4e6a1d(0x211)](_0x4e6a1d(0x20a)+getUserDomain()),console['log'](_0x4e6a1d(0x1ea)+getRuntimeDomain()),console[_0x4e6a1d(0x211)](),console['log'](a20_0x5a3325[_0x4e6a1d(0x1d5)](_0x4e6a1d(0x1db))),console[_0x4e6a1d(0x211)](a20_0x5a3325[_0x4e6a1d(0x1e3)](_0x4e6a1d(0x1fc)['repeat'](0x1e))),console[_0x4e6a1d(0x211)](_0x4e6a1d(0x1f9)+a20_0x5a3325[_0x4e6a1d(0x202)](AUTH_MODE[_0x4e6a1d(0x205)]+_0x4e6a1d(0x1f8))),console[_0x4e6a1d(0x211)](_0x4e6a1d(0x1f7)+a20_0x5a3325[_0x4e6a1d(0x1e3)](_0x4e6a1d(0x1e5))),console[_0x4e6a1d(0x211)](),{'ok':!![]};}function a20_0x499c(_0xc11143,_0x4aa8b6){_0xc11143=_0xc11143-0x1ce;const _0x4082b3=a20_0x4082();let _0x499c94=_0x4082b3[_0xc11143];return _0x499c94;}export const doctorDefinition={'service':'doctor','command':a20_0x2822a2(0x1d1),'description':a20_0x2822a2(0x1d7),'risk':a20_0x2822a2(0x212),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
package/lib/commands/init.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function a21_0x2c45(){const _0x17aaa5=['4581jJrfIw','utf8','284vttwOu','newConfigFileName','12HMfikQ','\x20already\x20exists.\x20Overwrite?','Initialized\x20',')\x20instead\x20of\x20project','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','parse','App\x20code\x20for\x20the\x20project','\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','File\x20','Source\x20file\x20not\x20found:\x20','trim','message','project','removeListener','\x20\x20env:\x20\x20\x20\x20\x20','toLowerCase','env','stdin','Override\x20imported\x20default\x20appcode','Imported\x20from\x20','\x20\x20config:\x20\x20','stdout','log','validation','36033uNAfkm','\x20\x20appcode:\x20','6537972rzFQDe','boolean','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','file','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','6354815lOCHms','race','app','apps','23750ePoXoC','defaultApp','\x0aInitialized\x20','Target\x20environment\x20(default\x20','\x20init\x20—\x20Create\x20','[Y/n]','732487ogBfcP','Usage:\x20','[y/N]','Failed\x20to\x20parse\x20source\x20file:\x20','close','Write\x20to\x20global\x20(~/','question','34466476pTEzyP','2GXfXgg','\x22.\x20Allowed:\x20','Invalid\x20env\x20\x22','676824lPlwSK','riskLevel','):\x20','Aborted.','name','includes','appcode','global','105FeDsxh','App\x20code\x20cannot\x20be\x20empty.','AbortPrompt','yes','Skip\x20confirmation\x20when\x20overwriting','string','flagMissing','Override\x20imported\x20default\x20env','\x20\x20default:\x20'];a21_0x2c45=function(){return _0x17aaa5;};return a21_0x2c45();}const a21_0x157f1f=a21_0x5d7e;(function(_0xa85488,_0x83a76a){const _0x5ac6ce=a21_0x5d7e,_0x46d24b=_0xa85488();while(!![]){try{const _0x41dc8e=-parseInt(_0x5ac6ce(0x183))/0x1*(-parseInt(_0x5ac6ce(0x18b))/0x2)+parseInt(_0x5ac6ce(0x172))/0x3*(parseInt(_0x5ac6ce(0x157))/0x4)+-parseInt(_0x5ac6ce(0x179))/0x5+parseInt(_0x5ac6ce(0x174))/0x6+-parseInt(_0x5ac6ce(0x196))/0x7*(-parseInt(_0x5ac6ce(0x18e))/0x8)+parseInt(_0x5ac6ce(0x19f))/0x9*(parseInt(_0x5ac6ce(0x17d))/0xa)+-parseInt(_0x5ac6ce(0x18a))/0xb*(parseInt(_0x5ac6ce(0x159))/0xc);if(_0x41dc8e===_0x83a76a)break;else _0x46d24b['push'](_0x46d24b['shift']());}catch(_0x176cdc){_0x46d24b['push'](_0x46d24b['shift']());}}}(a21_0x2c45,0xb6c1b));import{existsSync,readFileSync}from'node:fs';import{resolve,isAbsolute}from'node:path';import{createInterface}from'node:readline';import{CliErrors}from'../errors.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';function a21_0x5d7e(_0x3ddf7f,_0x18499a){_0x3ddf7f=_0x3ddf7f-0x157;const _0x2c45fb=a21_0x2c45();let _0x5d7e77=_0x2c45fb[_0x3ddf7f];return _0x5d7e77;}import{IMPORTABLE_RUNTIME_CONFIG_KEYS}from'../config/schema.js';import{resolveWriteConfigPath,readConfigFile,writeConfigFile,isNonInteractiveMode}from'../context.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{PRODUCT_CONFIG}from'../constant/product.js';export const initCreateFlagDefs=[{'name':a21_0x157f1f(0x194),'type':a21_0x157f1f(0x19b),'description':a21_0x157f1f(0x15f)},{'name':'env','type':a21_0x157f1f(0x19b),'description':a21_0x157f1f(0x180)+DEFAULT_CONFIG_VALUES[a21_0x157f1f(0x16a)]+')','enum':[...RUNTIME_ENV_VALUES]},{'name':'global','type':a21_0x157f1f(0x175),'description':a21_0x157f1f(0x188)+PRODUCT_CONFIG['newConfigFileName']+a21_0x157f1f(0x15c),'default':![]},{'name':a21_0x157f1f(0x199),'type':a21_0x157f1f(0x175),'description':a21_0x157f1f(0x19a),'default':![]}];export const initImportFlagDefs=[{'name':a21_0x157f1f(0x177),'type':a21_0x157f1f(0x19b),'description':a21_0x157f1f(0x178),'required':!![]},{'name':a21_0x157f1f(0x194),'type':a21_0x157f1f(0x19b),'description':a21_0x157f1f(0x16c)},{'name':a21_0x157f1f(0x16a),'type':a21_0x157f1f(0x19b),'description':a21_0x157f1f(0x19d),'enum':[...RUNTIME_ENV_VALUES]},{'name':a21_0x157f1f(0x195),'type':a21_0x157f1f(0x175),'description':a21_0x157f1f(0x188)+PRODUCT_CONFIG['newConfigFileName']+a21_0x157f1f(0x15c),'default':![]},{'name':a21_0x157f1f(0x199),'type':'boolean','description':a21_0x157f1f(0x19a),'default':![]}];export async function runInit(_0x214fc7){const _0x5f3ef7=a21_0x157f1f,_0x40deac=isNonInteractiveMode(_0x214fc7),_0x24348e=_0x214fc7[_0x5f3ef7(0x195)]?_0x5f3ef7(0x195):'project',_0x367c6e=resolveWriteConfigPath(_0x24348e);try{_0x40deac?await runNonInteractive(_0x214fc7,_0x367c6e):await runInteractive(_0x214fc7,_0x367c6e);}catch(_0x4d0352){if(_0x4d0352 instanceof AbortPrompt)throw CliErrors['cancelled']();throw _0x4d0352;}}export async function runInitImport(_0x2c4b24){const _0x17ed0c=a21_0x157f1f,_0x3528cf=_0x2c4b24[_0x17ed0c(0x195)]?'global':_0x17ed0c(0x166),_0x17753f=resolveWriteConfigPath(_0x3528cf);await runFromImport(_0x2c4b24,_0x17753f);}const RUNTIME_IRRELEVANT_KEYS=new Set(['apiDir']);async function runFromImport(_0x19ab5e,_0x55b5e2){const _0x5cbae0=a21_0x157f1f,_0x1d1bc7=resolveFilePath(_0x19ab5e[_0x5cbae0(0x177)]);if(!existsSync(_0x1d1bc7))throw CliErrors[_0x5cbae0(0x171)](_0x5cbae0(0x163)+_0x1d1bc7);const _0x1b9976=readSourceFile(_0x1d1bc7),_0x3f2131=convertToRuntimeConfig(_0x1b9976);_0x19ab5e[_0x5cbae0(0x194)]&&(_0x3f2131[_0x5cbae0(0x194)]=String(_0x19ab5e[_0x5cbae0(0x194)]));_0x19ab5e['env']&&(_0x3f2131[_0x5cbae0(0x16a)]=resolveInitEnv(_0x19ab5e));if(!_0x3f2131[_0x5cbae0(0x194)])throw CliErrors['validation'](_0x5cbae0(0x161),'Provide\x20--appcode\x20<code>\x20or\x20use\x20an\x20upgraded\x20.rabetbase.json\x20with\x20top-level\x20appcode.\x20Legacy\x20files\x20must\x20be\x20upgraded\x20first\x20with\x20`rabetbase\x20project\x20upgrade`.');await writeInitConfig(_0x55b5e2,_0x3f2131,_0x19ab5e),console[_0x5cbae0(0x170)](_0x5cbae0(0x16d)+_0x1d1bc7),console[_0x5cbae0(0x170)](_0x5cbae0(0x16e)+_0x55b5e2),console[_0x5cbae0(0x170)](_0x5cbae0(0x173)+_0x3f2131[_0x5cbae0(0x194)]);if(_0x3f2131[_0x5cbae0(0x17e)])console[_0x5cbae0(0x170)](_0x5cbae0(0x19e)+_0x3f2131['defaultApp']);}function convertToRuntimeConfig(_0x27eb68){const _0x43ee0a=a21_0x157f1f;if(_0x27eb68[_0x43ee0a(0x17c)]&&typeof _0x27eb68[_0x43ee0a(0x17c)]==='object')throw CliErrors[_0x43ee0a(0x171)](_0x43ee0a(0x176),_0x43ee0a(0x15d));const _0x65fa8a={};for(const _0x4a1157 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x27eb68[_0x4a1157]!==undefined&&(_0x65fa8a[_0x4a1157]=_0x27eb68[_0x4a1157]);}return!_0x65fa8a[_0x43ee0a(0x18f)]&&(_0x65fa8a[_0x43ee0a(0x18f)]=DEFAULT_CONFIG_VALUES[_0x43ee0a(0x18f)]),_0x65fa8a;}async function runNonInteractive(_0x2d3dd0,_0x5da19e){const _0x4cfac0=a21_0x157f1f,_0x22e8cd=_0x2d3dd0[_0x4cfac0(0x194)];if(!_0x22e8cd)throw CliErrors[_0x4cfac0(0x19c)](_0x4cfac0(0x194),_0x4cfac0(0x184)+CLI_BIN_NAME+_0x4cfac0(0x160));const _0x2a61d2=resolveInitEnv(_0x2d3dd0);await writeInitConfig(_0x5da19e,{'appcode':_0x22e8cd,'env':_0x2a61d2},_0x2d3dd0),console[_0x4cfac0(0x170)](_0x4cfac0(0x15b)+_0x5da19e),console[_0x4cfac0(0x170)]('\x20\x20appcode:\x20'+_0x22e8cd),console[_0x4cfac0(0x170)](_0x4cfac0(0x168)+_0x2a61d2);}async function runInteractive(_0x2a7da4,_0x411227){const _0x5e82b5=a21_0x157f1f,_0x425933=loadExisting(_0x411227),_0x563c37=typeof _0x425933?.['appcode']===_0x5e82b5(0x19b)?_0x425933[_0x5e82b5(0x194)]:'',_0x34f47b=resolveInitEnv(_0x2a7da4);console[_0x5e82b5(0x170)](CLI_BIN_NAME+_0x5e82b5(0x181)+PRODUCT_CONFIG[_0x5e82b5(0x158)]+'\x0a');if(existsSync(_0x411227)&&!_0x2a7da4[_0x5e82b5(0x199)]){const _0x1d51ea=await promptYesNo(_0x5e82b5(0x162)+_0x411227+_0x5e82b5(0x15a),![]);if(!_0x1d51ea){console[_0x5e82b5(0x170)](_0x5e82b5(0x191));return;}}const _0x48214f=typeof _0x2a7da4[_0x5e82b5(0x194)]===_0x5e82b5(0x19b)?_0x2a7da4[_0x5e82b5(0x194)][_0x5e82b5(0x164)]():'';let _0x5c098b=_0x48214f;!_0x5c098b&&(_0x5c098b=await promptInput('App\x20code',_0x563c37));if(!_0x5c098b['trim']())throw CliErrors[_0x5e82b5(0x171)](_0x5e82b5(0x197));await writeInitConfig(_0x411227,{'appcode':_0x5c098b[_0x5e82b5(0x164)](),'env':_0x34f47b},_0x2a7da4),console[_0x5e82b5(0x170)](_0x5e82b5(0x17f)+_0x411227),console[_0x5e82b5(0x170)](_0x5e82b5(0x173)+_0x5c098b[_0x5e82b5(0x164)]()),console[_0x5e82b5(0x170)]('\x20\x20env:\x20\x20\x20\x20\x20'+_0x34f47b);}async function writeInitConfig(_0x9bf18a,_0x34e608,_0x4c731b){const _0x2d1316=a21_0x157f1f;let _0x44b7fa={};existsSync(_0x9bf18a)&&!_0x4c731b[_0x2d1316(0x199)]&&(_0x44b7fa=readConfigFile(_0x9bf18a));for(const [_0x12a721,_0x48f5dd]of Object['entries'](_0x34e608)){_0x48f5dd!==undefined&&(_0x44b7fa[_0x12a721]=_0x48f5dd);}if(_0x44b7fa[_0x2d1316(0x17b)])delete _0x44b7fa['app'];writeConfigFile(_0x9bf18a,_0x44b7fa);}class AbortPrompt extends Error{constructor(){const _0x153bed=a21_0x157f1f;super('User\x20aborted\x20prompt'),this[_0x153bed(0x192)]=_0x153bed(0x198);}}function createSafeRl(){const _0x69c136=a21_0x157f1f,_0x251fff=createInterface({'input':process[_0x69c136(0x16b)],'output':process[_0x69c136(0x16f)]});let _0x1fb554;const _0x12b34e=new Promise((_0x2e429d,_0x28fd61)=>{_0x1fb554=()=>{_0x1fb554&&(_0x251fff['removeListener']('SIGINT',_0x1fb554),_0x1fb554=undefined);try{_0x251fff['close']();}catch{}_0x28fd61(new AbortPrompt());},_0x251fff['once']('SIGINT',_0x1fb554);}),_0x31696c=()=>{const _0x4a1ab8=_0x69c136;_0x1fb554&&(_0x251fff[_0x4a1ab8(0x167)]('SIGINT',_0x1fb554),_0x1fb554=undefined);try{_0x251fff[_0x4a1ab8(0x187)]();}catch{}};return{'rl':_0x251fff,'abortPromise':_0x12b34e,'disposeSuccess':_0x31696c};}async function promptInput(_0x251a60,_0x57b07b){const _0x1f7a15=a21_0x157f1f,{rl:_0x253cfa,abortPromise:_0x4b9442,disposeSuccess:_0x2b49dd}=createSafeRl(),_0x4189fd=new Promise(_0x3b0f6d=>{const _0x3dd436=a21_0x5d7e,_0x4b678d=_0x57b07b?'\x20\x20'+_0x251a60+'\x20('+_0x57b07b+_0x3dd436(0x190):'\x20\x20'+_0x251a60+':\x20';_0x253cfa['question'](_0x4b678d,_0x149c18=>{_0x2b49dd(),_0x3b0f6d(_0x149c18['trim']()||_0x57b07b);});});return Promise[_0x1f7a15(0x17a)]([_0x4189fd,_0x4b9442]);}async function promptYesNo(_0x2d9cc7,_0x3dfe8b){const {rl:_0x3781b5,abortPromise:_0x52335b,disposeSuccess:_0x270859}=createSafeRl(),_0x1f0832=new Promise(_0x539ef2=>{const _0x21099d=a21_0x5d7e,_0x45bcc5=_0x3dfe8b?_0x21099d(0x182):_0x21099d(0x185);_0x3781b5[_0x21099d(0x189)]('\x20\x20'+_0x2d9cc7+'\x20'+_0x45bcc5+':\x20',_0x76b338=>{const _0x1c29d4=_0x21099d;_0x270859();const _0x1be5c6=_0x76b338[_0x1c29d4(0x164)]()[_0x1c29d4(0x169)]();if(_0x1be5c6==='y'||_0x1be5c6===_0x1c29d4(0x199))_0x539ef2(!![]);else{if(_0x1be5c6==='n'||_0x1be5c6==='no')_0x539ef2(![]);else _0x539ef2(_0x3dfe8b);}});});return Promise['race']([_0x1f0832,_0x52335b]);}function loadExisting(_0xd50fb5){if(!existsSync(_0xd50fb5))return null;return readConfigFile(_0xd50fb5);}function resolveFilePath(_0x24ac65){return isAbsolute(_0x24ac65)?_0x24ac65:resolve(process['cwd'](),_0x24ac65);}function readSourceFile(_0x345064){const _0x4a589c=a21_0x157f1f;try{const _0x4df019=readFileSync(_0x345064,{'encoding':_0x4a589c(0x1a0)});return JSON[_0x4a589c(0x15e)](_0x4df019);}catch(_0x1bc94b){throw CliErrors['validation'](_0x4a589c(0x186)+_0x1bc94b[_0x4a589c(0x165)]);}}function resolveInitEnv(_0x263d88){const _0x276cb0=a21_0x157f1f,_0x54be29=_0x263d88[_0x276cb0(0x16a)];if(_0x54be29===undefined||_0x54be29==='')return DEFAULT_CONFIG_VALUES['env'];if(!RUNTIME_ENV_VALUES[_0x276cb0(0x193)](_0x54be29))throw CliErrors['validation'](_0x276cb0(0x18d)+_0x54be29+_0x276cb0(0x18c)+RUNTIME_ENV_VALUES['join'](',\x20'));return _0x54be29;}
|
|
1
|
+
const a21_0x4ed9b5=a21_0x570d;(function(_0x3fa08e,_0x5a4bfc){const _0x49760e=a21_0x570d,_0x2ca813=_0x3fa08e();while(!![]){try{const _0x587ee3=parseInt(_0x49760e(0xa0))/0x1*(parseInt(_0x49760e(0xd4))/0x2)+parseInt(_0x49760e(0xba))/0x3+-parseInt(_0x49760e(0xd0))/0x4+parseInt(_0x49760e(0xc1))/0x5+-parseInt(_0x49760e(0xbc))/0x6+-parseInt(_0x49760e(0xc2))/0x7+parseInt(_0x49760e(0x96))/0x8;if(_0x587ee3===_0x5a4bfc)break;else _0x2ca813['push'](_0x2ca813['shift']());}catch(_0x523e2a){_0x2ca813['push'](_0x2ca813['shift']());}}}(a21_0x4724,0x3bfc3));import{existsSync,readFileSync}from'node:fs';import{resolve,isAbsolute}from'node:path';import{createInterface}from'node:readline';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,isNonInteractiveMode}from'../context.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{PRODUCT_CONFIG}from'../constant/product.js';export const initCreateFlagDefs=[{'name':a21_0x4ed9b5(0xd3),'type':a21_0x4ed9b5(0xbe),'description':a21_0x4ed9b5(0x9f)},{'name':a21_0x4ed9b5(0xd7),'type':a21_0x4ed9b5(0xbe),'description':a21_0x4ed9b5(0x91)+DEFAULT_CONFIG_VALUES[a21_0x4ed9b5(0xd7)]+')','enum':[...RUNTIME_ENV_VALUES]},{'name':a21_0x4ed9b5(0xd5),'type':'boolean','description':a21_0x4ed9b5(0xaf)+PRODUCT_CONFIG['newConfigFileName']+a21_0x4ed9b5(0xc3),'default':![]},{'name':a21_0x4ed9b5(0xd6),'type':a21_0x4ed9b5(0xce),'description':a21_0x4ed9b5(0xcc),'default':![]}];export const initImportFlagDefs=[{'name':a21_0x4ed9b5(0xc9),'type':'string','description':a21_0x4ed9b5(0xaa),'required':!![]},{'name':a21_0x4ed9b5(0xd3),'type':a21_0x4ed9b5(0xbe),'description':a21_0x4ed9b5(0xb3)},{'name':'env','type':a21_0x4ed9b5(0xbe),'description':a21_0x4ed9b5(0xac),'enum':[...RUNTIME_ENV_VALUES]},{'name':a21_0x4ed9b5(0xd5),'type':a21_0x4ed9b5(0xce),'description':'Write\x20to\x20global\x20(~/'+PRODUCT_CONFIG[a21_0x4ed9b5(0xb0)]+')\x20instead\x20of\x20project','default':![]},{'name':a21_0x4ed9b5(0xd6),'type':a21_0x4ed9b5(0xce),'description':a21_0x4ed9b5(0xcc),'default':![]}];function a21_0x4724(){const _0x39722e=['join','298788rxgcLX','\x0aInitialized\x20','411348PUNgqt','Source\x20file\x20not\x20found:\x20','string','SIGINT','):\x20','771475CESWFe','943453USqZKj',')\x20instead\x20of\x20project','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','defaultApp','validation','\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]','stdin','file','AbortPrompt','flagMissing','Skip\x20confirmation\x20when\x20overwriting','name','boolean','Imported\x20from\x20','1148544mojDLp','once','Initialized\x20','appcode','15178ZExYVR','global','yes','env','\x20\x20appcode:\x20','[Y/n]','Target\x20environment\x20(default\x20','race','Usage:\x20','App\x20code\x20cannot\x20be\x20empty.','cancelled','2522584HdGcIR','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','utf8','Invalid\x20env\x20\x22','\x20init\x20—\x20Create\x20','close','question','message','Failed\x20to\x20parse\x20source\x20file:\x20','App\x20code\x20for\x20the\x20project','22cYtetb','project','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`.','riskLevel','User\x20aborted\x20prompt','app','object','removeListener','apps','apiDir','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','App\x20code','Override\x20imported\x20default\x20env','cwd','\x20\x20env:\x20\x20\x20\x20\x20','Write\x20to\x20global\x20(~/','newConfigFileName','entries','stdout','Override\x20imported\x20default\x20appcode','trim','includes','\x20\x20default:\x20','log','File\x20'];a21_0x4724=function(){return _0x39722e;};return a21_0x4724();}export async function runInit(_0x72b010){const _0x3496b6=a21_0x4ed9b5,_0x343949=isNonInteractiveMode(_0x72b010),_0x15dea4=_0x72b010[_0x3496b6(0xd5)]?_0x3496b6(0xd5):_0x3496b6(0xa1),_0x33a2f2=resolveWriteConfigPath(_0x15dea4);try{_0x343949?await runNonInteractive(_0x72b010,_0x33a2f2):await runInteractive(_0x72b010,_0x33a2f2);}catch(_0x55da27){if(_0x55da27 instanceof AbortPrompt)throw CliErrors[_0x3496b6(0x95)]();throw _0x55da27;}}export async function runInitImport(_0x67a0f3){const _0x488587=a21_0x4ed9b5,_0x3759fe=_0x67a0f3[_0x488587(0xd5)]?_0x488587(0xd5):_0x488587(0xa1),_0x56e1f5=resolveWriteConfigPath(_0x3759fe);await runFromImport(_0x67a0f3,_0x56e1f5);}const RUNTIME_IRRELEVANT_KEYS=new Set([a21_0x4ed9b5(0xa9)]);async function runFromImport(_0x2dee68,_0x3d3101){const _0x1207e1=a21_0x4ed9b5,_0x1c7080=resolveFilePath(_0x2dee68[_0x1207e1(0xc9)]);if(!existsSync(_0x1c7080))throw CliErrors[_0x1207e1(0xc6)](_0x1207e1(0xbd)+_0x1c7080);const _0x47c3b9=readSourceFile(_0x1c7080),_0x2797c7=convertToRuntimeConfig(_0x47c3b9);_0x2dee68[_0x1207e1(0xd3)]&&(_0x2797c7[_0x1207e1(0xd3)]=String(_0x2dee68[_0x1207e1(0xd3)]));_0x2dee68['env']&&(_0x2797c7[_0x1207e1(0xd7)]=resolveInitEnv(_0x2dee68));if(!_0x2797c7['appcode'])throw CliErrors[_0x1207e1(0xc6)]('Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.',_0x1207e1(0xa2));await writeInitConfig(_0x3d3101,_0x2797c7,_0x2dee68),console[_0x1207e1(0xb7)](_0x1207e1(0xcf)+_0x1c7080),console[_0x1207e1(0xb7)]('\x20\x20config:\x20\x20'+_0x3d3101),console[_0x1207e1(0xb7)]('\x20\x20appcode:\x20'+_0x2797c7[_0x1207e1(0xd3)]);if(_0x2797c7[_0x1207e1(0xc5)])console['log'](_0x1207e1(0xb6)+_0x2797c7[_0x1207e1(0xc5)]);}function convertToRuntimeConfig(_0x1c447b){const _0x529850=a21_0x4ed9b5;if(_0x1c447b[_0x529850(0xa8)]&&typeof _0x1c447b[_0x529850(0xa8)]===_0x529850(0xa6))throw CliErrors[_0x529850(0xc6)](_0x529850(0x97),_0x529850(0xc4));const _0x18591c={};for(const _0x1823f4 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x1c447b[_0x1823f4]!==undefined&&(_0x18591c[_0x1823f4]=_0x1c447b[_0x1823f4]);}return!_0x18591c['riskLevel']&&(_0x18591c['riskLevel']=DEFAULT_CONFIG_VALUES[_0x529850(0xa3)]),_0x18591c;}async function runNonInteractive(_0x2a4e35,_0x2ad348){const _0x149086=a21_0x4ed9b5,_0x21d135=_0x2a4e35[_0x149086(0xd3)];if(!_0x21d135)throw CliErrors[_0x149086(0xcb)](_0x149086(0xd3),_0x149086(0x93)+CLI_BIN_NAME+_0x149086(0xc7));const _0x182f34=resolveInitEnv(_0x2a4e35);await writeInitConfig(_0x2ad348,{'appcode':_0x21d135,'env':_0x182f34},_0x2a4e35),console[_0x149086(0xb7)](_0x149086(0xd2)+_0x2ad348),console[_0x149086(0xb7)](_0x149086(0xd8)+_0x21d135),console[_0x149086(0xb7)](_0x149086(0xae)+_0x182f34);}async function runInteractive(_0x18bad3,_0x4e983a){const _0x1d8d00=a21_0x4ed9b5,_0x582073=loadExisting(_0x4e983a),_0x13a51b=typeof _0x582073?.[_0x1d8d00(0xd3)]===_0x1d8d00(0xbe)?_0x582073[_0x1d8d00(0xd3)]:'',_0x1862b5=resolveInitEnv(_0x18bad3);console['log'](CLI_BIN_NAME+_0x1d8d00(0x9a)+PRODUCT_CONFIG[_0x1d8d00(0xb0)]+'\x0a');if(existsSync(_0x4e983a)&&!_0x18bad3[_0x1d8d00(0xd6)]){const _0x35f7d2=await promptYesNo(_0x1d8d00(0xb8)+_0x4e983a+'\x20already\x20exists.\x20Overwrite?',![]);if(!_0x35f7d2){console[_0x1d8d00(0xb7)]('Aborted.');return;}}const _0x17d8a8=typeof _0x18bad3[_0x1d8d00(0xd3)]===_0x1d8d00(0xbe)?_0x18bad3[_0x1d8d00(0xd3)]['trim']():'';let _0xd4cda0=_0x17d8a8;!_0xd4cda0&&(_0xd4cda0=await promptInput(_0x1d8d00(0xab),_0x13a51b));if(!_0xd4cda0[_0x1d8d00(0xb4)]())throw CliErrors['validation'](_0x1d8d00(0x94));await writeInitConfig(_0x4e983a,{'appcode':_0xd4cda0[_0x1d8d00(0xb4)](),'env':_0x1862b5},_0x18bad3),console[_0x1d8d00(0xb7)](_0x1d8d00(0xbb)+_0x4e983a),console[_0x1d8d00(0xb7)](_0x1d8d00(0xd8)+_0xd4cda0[_0x1d8d00(0xb4)]()),console[_0x1d8d00(0xb7)](_0x1d8d00(0xae)+_0x1862b5);}async function writeInitConfig(_0x3245e5,_0xf94448,_0x445918){const _0x2eb7a6=a21_0x4ed9b5;let _0x377ee1={};existsSync(_0x3245e5)&&!_0x445918[_0x2eb7a6(0xd6)]&&(_0x377ee1=readConfigFile(_0x3245e5));for(const [_0x1ba4f6,_0x3489d8]of Object[_0x2eb7a6(0xb1)](_0xf94448)){_0x3489d8!==undefined&&(_0x377ee1[_0x1ba4f6]=_0x3489d8);}if(_0x377ee1['app'])delete _0x377ee1[_0x2eb7a6(0xa5)];writeConfigFile(_0x3245e5,_0x377ee1);}class AbortPrompt extends Error{constructor(){const _0x3450be=a21_0x4ed9b5;super(_0x3450be(0xa4)),this[_0x3450be(0xcd)]=_0x3450be(0xca);}}function a21_0x570d(_0x953b75,_0x4d9701){_0x953b75=_0x953b75-0x91;const _0x472458=a21_0x4724();let _0x570d9b=_0x472458[_0x953b75];return _0x570d9b;}function createSafeRl(){const _0x2ff9f1=a21_0x4ed9b5,_0xc82dd4=createInterface({'input':process[_0x2ff9f1(0xc8)],'output':process[_0x2ff9f1(0xb2)]});let _0x482144;const _0x48bc39=new Promise((_0x50223f,_0x50039f)=>{const _0x99be54=_0x2ff9f1;_0x482144=()=>{const _0x3207dc=a21_0x570d;_0x482144&&(_0xc82dd4['removeListener'](_0x3207dc(0xbf),_0x482144),_0x482144=undefined);try{_0xc82dd4[_0x3207dc(0x9b)]();}catch{}_0x50039f(new AbortPrompt());},_0xc82dd4[_0x99be54(0xd1)](_0x99be54(0xbf),_0x482144);}),_0xb06737=()=>{const _0x3069e1=_0x2ff9f1;_0x482144&&(_0xc82dd4[_0x3069e1(0xa7)](_0x3069e1(0xbf),_0x482144),_0x482144=undefined);try{_0xc82dd4[_0x3069e1(0x9b)]();}catch{}};return{'rl':_0xc82dd4,'abortPromise':_0x48bc39,'disposeSuccess':_0xb06737};}async function promptInput(_0x336be8,_0x2814d4){const _0x4b7ddc=a21_0x4ed9b5,{rl:_0x4dd974,abortPromise:_0x2b3a50,disposeSuccess:_0x2edef9}=createSafeRl(),_0x3af510=new Promise(_0x2c5d36=>{const _0x59aa19=a21_0x570d,_0x323ed2=_0x2814d4?'\x20\x20'+_0x336be8+'\x20('+_0x2814d4+_0x59aa19(0xc0):'\x20\x20'+_0x336be8+':\x20';_0x4dd974[_0x59aa19(0x9c)](_0x323ed2,_0x518f95=>{_0x2edef9(),_0x2c5d36(_0x518f95['trim']()||_0x2814d4);});});return Promise[_0x4b7ddc(0x92)]([_0x3af510,_0x2b3a50]);}async function promptYesNo(_0x2c3562,_0x4d1a2b){const _0x5697f3=a21_0x4ed9b5,{rl:_0x1d0b58,abortPromise:_0x3975ec,disposeSuccess:_0x645a8}=createSafeRl(),_0x23cf48=new Promise(_0x5d3a7f=>{const _0xb88847=a21_0x570d,_0x503722=_0x4d1a2b?_0xb88847(0xd9):'[y/N]';_0x1d0b58['question']('\x20\x20'+_0x2c3562+'\x20'+_0x503722+':\x20',_0xd74dd6=>{const _0x501e5f=_0xb88847;_0x645a8();const _0x4f9c4a=_0xd74dd6[_0x501e5f(0xb4)]()['toLowerCase']();if(_0x4f9c4a==='y'||_0x4f9c4a===_0x501e5f(0xd6))_0x5d3a7f(!![]);else{if(_0x4f9c4a==='n'||_0x4f9c4a==='no')_0x5d3a7f(![]);else _0x5d3a7f(_0x4d1a2b);}});});return Promise[_0x5697f3(0x92)]([_0x23cf48,_0x3975ec]);}function loadExisting(_0x45f8aa){if(!existsSync(_0x45f8aa))return null;return readConfigFile(_0x45f8aa);}function resolveFilePath(_0x3d1522){const _0x4db6e5=a21_0x4ed9b5;return isAbsolute(_0x3d1522)?_0x3d1522:resolve(process[_0x4db6e5(0xad)](),_0x3d1522);}function readSourceFile(_0x4374bc){const _0x2e5208=a21_0x4ed9b5;try{const _0x353cac=readFileSync(_0x4374bc,{'encoding':_0x2e5208(0x98)});return JSON['parse'](_0x353cac);}catch(_0x4f0d35){throw CliErrors[_0x2e5208(0xc6)](_0x2e5208(0x9e)+_0x4f0d35[_0x2e5208(0x9d)]);}}function resolveInitEnv(_0x3ebdf4){const _0x54573c=a21_0x4ed9b5,_0xfb6d1e=_0x3ebdf4[_0x54573c(0xd7)];if(_0xfb6d1e===undefined||_0xfb6d1e==='')return DEFAULT_CONFIG_VALUES[_0x54573c(0xd7)];if(!RUNTIME_ENV_VALUES[_0x54573c(0xb5)](_0xfb6d1e))throw CliErrors[_0x54573c(0xc6)](_0x54573c(0x99)+_0xfb6d1e+'\x22.\x20Allowed:\x20'+RUNTIME_ENV_VALUES[_0x54573c(0xb9)](',\x20'));return _0xfb6d1e;}
|
package/lib/commands/kb/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a22_0x28fd(_0x3a55fc,_0x185c51){_0x3a55fc=_0x3a55fc-0x1bd;const _0x49e2fd=a22_0x49e2();let _0x28fded=_0x49e2fd[_0x3a55fc];return _0x28fded;}const a22_0x4b58e6=a22_0x28fd;(function(_0x3207c9,_0x463ebd){const _0xb04929=a22_0x28fd,_0x28eec1=_0x3207c9();while(!![]){try{const _0x5ae246=-parseInt(_0xb04929(0x1ef))/0x1*(parseInt(_0xb04929(0x1bf))/0x2)+parseInt(_0xb04929(0x1ed))/0x3+parseInt(_0xb04929(0x1d0))/0x4*(parseInt(_0xb04929(0x1e3))/0x5)+-parseInt(_0xb04929(0x1bd))/0x6+-parseInt(_0xb04929(0x1e5))/0x7*(parseInt(_0xb04929(0x1e9))/0x8)+parseInt(_0xb04929(0x1d9))/0x9+parseInt(_0xb04929(0x1f2))/0xa*(parseInt(_0xb04929(0x1d4))/0xb);if(_0x5ae246===_0x463ebd)break;else _0x28eec1['push'](_0x28eec1['shift']());}catch(_0x2baa6b){_0x28eec1['push'](_0x28eec1['shift']());}}}(a22_0x49e2,0x1c4d1));import{existsSync,readFileSync,statSync}from'node:fs';function a22_0x49e2(){const _0x4c99d8=['Search\x20query\x20is\x20required.','description','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge','/client/knowledge-base/personal/','build','metadata','validation','POST','File\x20is\x20not\x20a\x20regular\x20file:\x20','score','Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','285740AgfGXs','topk','string','content','10186TGcjjH','appCode','updateTime','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','verbose','1826019kbnKNC','str','flag','Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','isFile','read','weightedScore','detail','version','list','5CqXLqE','number','4557hVbGKJ','query','map','Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20','936ffJuVx','write','Updated\x20KB\x20entry\x20','File\x20not\x20found:\x20','338466KKSdHA','scope','107GCWaSa','Personal\x20knowledge-base\x20entry\x20title','/client/knowledge-base/personal/create','530doEfkN','title','update','file','ragStatus','search','body','createTime','/update','693786LMCoIW','Personal\x20knowledge-base\x20entry\x20ID','2402frvDup','num','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','ragErrorMessage'];a22_0x49e2=function(){return _0x4c99d8;};return a22_0x49e2();}import{createPersonalKnowledgeBaseItem,getPersonalKnowledgeBaseItem,listPersonalKnowledgeBaseItems,searchKnowledgeBase,updatePersonalKnowledgeBaseItem}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':a22_0x4b58e6(0x1f3),'type':a22_0x4b58e6(0x1d2),'required':!![],'description':a22_0x4b58e6(0x1f0)},FILE_FLAG={'name':a22_0x4b58e6(0x1f5),'type':a22_0x4b58e6(0x1d2),'required':!![],'description':a22_0x4b58e6(0x1d7)},QUERY_FLAG={'name':a22_0x4b58e6(0x1e6),'type':a22_0x4b58e6(0x1d2),'required':!![],'description':a22_0x4b58e6(0x1c7)},TOPK_FLAG={'name':a22_0x4b58e6(0x1d1),'type':a22_0x4b58e6(0x1e4),'description':'Maximum\x20number\x20of\x20search\x20hits\x20to\x20return'};function readKnowledgeFile(_0x1bc3e6){const _0x2e7cc6=a22_0x4b58e6;if(!_0x1bc3e6)throw CliErrors[_0x2e7cc6(0x1cb)]('File\x20path\x20is\x20required.');if(!existsSync(_0x1bc3e6))throw CliErrors[_0x2e7cc6(0x1cb)](_0x2e7cc6(0x1ec)+_0x1bc3e6);if(!statSync(_0x1bc3e6)[_0x2e7cc6(0x1dd)]())throw CliErrors['validation'](_0x2e7cc6(0x1cd)+_0x1bc3e6);return readFileSync(_0x1bc3e6,'utf8');}function summarizePersonalItem(_0x502f95){const _0x662eb9=a22_0x4b58e6;return{'id':_0x502f95['id'],'title':_0x502f95[_0x662eb9(0x1f3)],'version':_0x502f95[_0x662eb9(0x1e1)],'ragStatus':_0x502f95[_0x662eb9(0x1f6)],'ragErrorMessage':_0x502f95[_0x662eb9(0x1c2)],'updateTime':_0x502f95[_0x662eb9(0x1d6)]};}function detailPersonalItem(_0x3cf2ae){const _0x2beec7=a22_0x4b58e6;return{'id':_0x3cf2ae['id'],'appCode':_0x3cf2ae[_0x2beec7(0x1d5)],'scope':_0x3cf2ae[_0x2beec7(0x1ee)],'userId':_0x3cf2ae['userId'],'title':_0x3cf2ae[_0x2beec7(0x1f3)],'content':_0x3cf2ae['content']??'','version':_0x3cf2ae[_0x2beec7(0x1e1)],'ragStatus':_0x3cf2ae[_0x2beec7(0x1f6)],'ragErrorMessage':_0x3cf2ae[_0x2beec7(0x1c2)],'createTime':_0x3cf2ae[_0x2beec7(0x1f9)],'updateTime':_0x3cf2ae[_0x2beec7(0x1d6)]};}function summarizeSearchHit(_0x21527c){const _0x31e3da=a22_0x4b58e6;return{'scope':_0x21527c[_0x31e3da(0x1ee)],'docId':_0x21527c['docId'],'score':_0x21527c[_0x31e3da(0x1ce)],'weightedScore':_0x21527c[_0x31e3da(0x1df)],'content':_0x21527c[_0x31e3da(0x1d3)],'metadata':_0x21527c[_0x31e3da(0x1ca)]};}function readTopK(_0xec9428){const _0x1bdc9b=a22_0x4b58e6,_0x2f815e=_0xec9428[_0x1bdc9b(0x1db)]('topk');if(_0x2f815e===undefined||_0x2f815e===null||_0x2f815e==='')return undefined;const _0x3ae4dc=_0xec9428[_0x1bdc9b(0x1c0)](_0x1bdc9b(0x1d1));if(!Number['isFinite'](_0x3ae4dc)||_0x3ae4dc<0x1)throw CliErrors[_0x1bdc9b(0x1cb)]('--topk\x20must\x20be\x20a\x20positive\x20number.');return _0x3ae4dc;}const kbList={'service':'kb','command':a22_0x4b58e6(0x1e2),'description':a22_0x4b58e6(0x1c6),'risk':a22_0x4b58e6(0x1de),'flags':[VERBOSE_FLAG],async 'execute'(_0x16a6c2){const _0x3e535d=a22_0x4b58e6,_0x4cfd77=await listPersonalKnowledgeBaseItems(_0x16a6c2[_0x3e535d(0x1d5)]);if(_0x16a6c2['bool'](_0x3e535d(0x1d8)))return{'ok':!![],'data':{'total':_0x4cfd77['length'],'items':_0x4cfd77}};return{'ok':!![],'data':{'total':_0x4cfd77['length'],'items':_0x4cfd77[_0x3e535d(0x1e7)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a22_0x4b58e6(0x1e0),'description':a22_0x4b58e6(0x1c1),'risk':a22_0x4b58e6(0x1de),'flags':[{...ID_FLAG,'description':a22_0x4b58e6(0x1be)}],async 'execute'(_0x218508){const _0x59ac57=a22_0x4b58e6,_0x15882a=await getPersonalKnowledgeBaseItem(_0x218508[_0x59ac57(0x1c0)]('id'),_0x218508['appCode']);return{'ok':!![],'data':detailPersonalItem(_0x15882a)};}},kbCreate={'service':'kb','command':'create','description':a22_0x4b58e6(0x1dc),'risk':a22_0x4b58e6(0x1ea),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x432456){const _0x3b8819=a22_0x4b58e6,_0x3f24c7=_0x432456['str'](_0x3b8819(0x1f3)),_0x54c646=readKnowledgeFile(_0x432456['str'](_0x3b8819(0x1f5))),_0xeaf2f7=await createPersonalKnowledgeBaseItem(_0x432456[_0x3b8819(0x1d5)],{'title':_0x3f24c7,'content':_0x54c646});return{'ok':!![],'data':summarizePersonalItem(_0xeaf2f7),'message':'Created\x20KB\x20entry\x20'+_0xeaf2f7['id']+'\x20('+_0xeaf2f7[_0x3b8819(0x1f3)]+')'};},async 'dryRun'(_0x39a6e9){const _0x134a4=a22_0x4b58e6,_0x580707=_0x39a6e9[_0x134a4(0x1da)]('title'),_0x25bfd0=readKnowledgeFile(_0x39a6e9[_0x134a4(0x1da)](_0x134a4(0x1f5)));return dryRun(_0x134a4(0x1cc),_0x134a4(0x1f1))['body']({'appCode':_0x39a6e9[_0x134a4(0x1d5)],'title':_0x580707,'content':_0x25bfd0})[_0x134a4(0x1c4)](_0x134a4(0x1c5)+_0x580707+'\x22')[_0x134a4(0x1c9)]();}},kbUpdate={'service':'kb','command':a22_0x4b58e6(0x1f4),'description':a22_0x4b58e6(0x1cf),'risk':a22_0x4b58e6(0x1ea),'flags':[{...ID_FLAG,'description':a22_0x4b58e6(0x1be)},{...TITLE_FLAG,'required':![],'description':'Override\x20the\x20existing\x20entry\x20title'},FILE_FLAG],async 'execute'(_0x514af5){const _0x1e5f43=a22_0x4b58e6,_0x453a01=_0x514af5[_0x1e5f43(0x1c0)]('id'),_0x1d7c73=readKnowledgeFile(_0x514af5[_0x1e5f43(0x1da)](_0x1e5f43(0x1f5))),_0x3ac920=_0x514af5[_0x1e5f43(0x1da)](_0x1e5f43(0x1f3))||(await getPersonalKnowledgeBaseItem(_0x453a01,_0x514af5[_0x1e5f43(0x1d5)]))[_0x1e5f43(0x1f3)],_0x18650b=await updatePersonalKnowledgeBaseItem(_0x453a01,_0x514af5[_0x1e5f43(0x1d5)],{'title':_0x3ac920,'content':_0x1d7c73});return{'ok':!![],'data':summarizePersonalItem(_0x18650b),'message':_0x1e5f43(0x1eb)+_0x18650b['id']+'\x20('+_0x18650b[_0x1e5f43(0x1f3)]+')'};},async 'dryRun'(_0x30ec1e){const _0x5ca06d=a22_0x4b58e6,_0x35c542=_0x30ec1e[_0x5ca06d(0x1c0)]('id'),_0x55903b=readKnowledgeFile(_0x30ec1e['str']('file')),_0x1f12fe=_0x30ec1e[_0x5ca06d(0x1da)]('title')||(await getPersonalKnowledgeBaseItem(_0x35c542,_0x30ec1e[_0x5ca06d(0x1d5)]))[_0x5ca06d(0x1f3)];return dryRun(_0x5ca06d(0x1cc),_0x5ca06d(0x1c8)+_0x35c542+_0x5ca06d(0x1fa))[_0x5ca06d(0x1f8)]({'appCode':_0x30ec1e[_0x5ca06d(0x1d5)],'title':_0x1f12fe,'content':_0x55903b})[_0x5ca06d(0x1c4)](_0x5ca06d(0x1e8)+_0x35c542)[_0x5ca06d(0x1c9)]();}},kbSearch={'service':'kb','command':a22_0x4b58e6(0x1f7),'description':'Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','risk':a22_0x4b58e6(0x1de),'flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x331542){const _0x298237=a22_0x4b58e6;if(!_0x331542[_0x298237(0x1da)]('query')['trim']())throw CliErrors[_0x298237(0x1cb)](_0x298237(0x1c3));readTopK(_0x331542);},async 'execute'(_0x266334){const _0x361320=a22_0x4b58e6,_0x12e66d=_0x266334['str'](_0x361320(0x1e6))['trim'](),_0x6500e7=readTopK(_0x266334),_0x3ed2cc=await searchKnowledgeBase(_0x266334[_0x361320(0x1d5)],{'query':_0x12e66d,'topK':_0x6500e7});return{'ok':!![],'data':{'total':_0x3ed2cc['length'],'hits':_0x3ed2cc[_0x361320(0x1e7)](summarizeSearchHit)}};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a23_0x229a82=a23_0x4925;function a23_0x5c26(){const _0x56107a=['4922110JoIMql','forEach','logs','clearLogs','command','write','1068624ybfBbA','6654CFQuud','show','328857TtpwKg','warn','\x20\x20\x20Duration:\x20','duration','326drdirw','keys','5346792UwXwYh','timestamp','level','length','success','clear','18otJqRA','details','24BHfWiQ','readLogs','\x20\x20\x20Time:\x20','log','read','\x20\x20\x20Details:\x20','253785jFFuzi','\x20logs:\x0a','*\x20Logs\x20cleared','message','88236LIRfqo','en-US','toLocaleString','21LzYzzS','*\x20No\x20logs\x20found'];a23_0x5c26=function(){return _0x56107a;};return a23_0x5c26();}(function(_0x2ce461,_0x3d9aa7){const _0x5c0da4=a23_0x4925,_0x9c4623=_0x2ce461();while(!![]){try{const _0x10b3e6=-parseInt(_0x5c0da4(0x152))/0x1+-parseInt(_0x5c0da4(0x156))/0x2*(parseInt(_0x5c0da4(0x150))/0x3)+parseInt(_0x5c0da4(0x160))/0x4*(-parseInt(_0x5c0da4(0x166))/0x5)+-parseInt(_0x5c0da4(0x144))/0x6*(-parseInt(_0x5c0da4(0x147))/0x7)+-parseInt(_0x5c0da4(0x14f))/0x8*(-parseInt(_0x5c0da4(0x15e))/0x9)+parseInt(_0x5c0da4(0x149))/0xa+parseInt(_0x5c0da4(0x158))/0xb;if(_0x10b3e6===_0x3d9aa7)break;else _0x9c4623['push'](_0x9c4623['shift']());}catch(_0x14f42d){_0x9c4623['push'](_0x9c4623['shift']());}}}(a23_0x5c26,0x47ee0));import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function printLogs(_0x5ac066){const _0x34059b=a23_0x4925;if(_0x5ac066[_0x34059b(0x15b)]===0x0){console[_0x34059b(0x163)](_0x34059b(0x148));return;}console['log']('*\x20'+CLI_DISPLAY_NAME+_0x34059b(0x167)),_0x5ac066[_0x34059b(0x14a)]((_0x591f07,_0x45edaf)=>{const _0x2e6c96=_0x34059b,_0x2f42aa=new Date(_0x591f07[_0x2e6c96(0x159)])[_0x2e6c96(0x146)](_0x2e6c96(0x145)),_0x5b8cb1=_0x591f07[_0x2e6c96(0x15a)]===_0x2e6c96(0x15c)?'√':_0x591f07[_0x2e6c96(0x15a)]==='error'?'×':_0x591f07[_0x2e6c96(0x15a)]===_0x2e6c96(0x153)?'!':'i';console[_0x2e6c96(0x163)](_0x45edaf+0x1+'.\x20'+_0x5b8cb1+'\x20['+_0x591f07[_0x2e6c96(0x14d)]+']\x20'+_0x591f07[_0x2e6c96(0x143)]),console[_0x2e6c96(0x163)](_0x2e6c96(0x162)+_0x2f42aa),_0x591f07['duration']&&console[_0x2e6c96(0x163)](_0x2e6c96(0x154)+_0x591f07[_0x2e6c96(0x155)]+'ms'),_0x591f07[_0x2e6c96(0x15f)]&&Object[_0x2e6c96(0x157)](_0x591f07[_0x2e6c96(0x15f)])[_0x2e6c96(0x15b)]>0x0&&console[_0x2e6c96(0x163)](_0x2e6c96(0x165)+JSON['stringify'](_0x591f07[_0x2e6c96(0x15f)],null,0x2)),console[_0x2e6c96(0x163)]('');});}function a23_0x4925(_0x5e9c29,_0x405fe6){_0x5e9c29=_0x5e9c29-0x143;const _0x5c2674=a23_0x5c26();let _0x49253e=_0x5c2674[_0x5e9c29];return _0x49253e;}export const logsDefinitions=[{'service':a23_0x229a82(0x14b),'command':a23_0x229a82(0x151),'description':'View\x20command\x20history\x20logs','risk':a23_0x229a82(0x164),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x105104){const _0x92d600=a23_0x229a82;return printLogs(logger[_0x92d600(0x161)]()),{'ok':!![]};}},{'service':a23_0x229a82(0x14b),'command':a23_0x229a82(0x15d),'description':'Clear\x20command\x20history\x20logs','risk':a23_0x229a82(0x14e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x1cbbce){const _0x2e9077=a23_0x229a82;return logger[_0x2e9077(0x14c)](),console[_0x2e9077(0x163)](_0x2e9077(0x168)),{'ok':!![]};}}];
|
package/lib/commands/registry.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a24_0x242a(){const _0x3c3607=['list','20NJWBxF','push','App\x20Management','from','Diagnostics','62364slNKJC','description','read','Self\x20Update','2149glegVl','BFF\x20Scripts','Configuration','service','has','set','\x20\x20[write]','SQL\x20Queries','1446870uAMKVS','get','\x20\x20[high-risk-write]','6856TmCFLe','login','values','write','Skills','505548qaRpbc','3224dtdpVh','risk','command','174HmFRmK','548316ZphpUi','Instant\x20API','1000864BXqNWJ','run','install','Schema','Logs'];a24_0x242a=function(){return _0x3c3607;};return a24_0x242a();}const a24_0x3e89f2=a24_0x52ee;(function(_0x393ee0,_0x4a6178){const _0x22b5c5=a24_0x52ee,_0x5a3b3c=_0x393ee0();while(!![]){try{const _0x4abe4c=parseInt(_0x22b5c5(0xb4))/0x1*(parseInt(_0x22b5c5(0xb7))/0x2)+-parseInt(_0x22b5c5(0xb3))/0x3+parseInt(_0x22b5c5(0xba))/0x4+-parseInt(_0x22b5c5(0xc0))/0x5*(parseInt(_0x22b5c5(0xc5))/0x6)+parseInt(_0x22b5c5(0xc9))/0x7*(-parseInt(_0x22b5c5(0xae))/0x8)+-parseInt(_0x22b5c5(0xb8))/0x9+parseInt(_0x22b5c5(0xd1))/0xa;if(_0x4abe4c===_0x4a6178)break;else _0x5a3b3c['push'](_0x5a3b3c['shift']());}catch(_0xafc8af){_0x5a3b3c['push'](_0x5a3b3c['shift']());}}}(a24_0x242a,0x227dc));import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{skillDefinitions}from'../commands/skill/index.js';import{updateDefinition}from'../commands/update.js';import{doctorDefinition}from'../commands/doctor.js';import{schemaDefinition}from'../commands/schema.js';import{appDefinitions}from'../commands/app/definitions.js';function a24_0x52ee(_0x2beba6,_0x4f11fe){_0x2beba6=_0x2beba6-0xae;const _0x242ab0=a24_0x242a();let _0x52eea1=_0x242ab0[_0x2beba6];return _0x52eea1;}import{configDefinitions}from'../commands/config/definitions.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{dataDefinitions}from'../commands/data/index.js';import{kbDefinitions}from'../commands/kb/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x520c18){const _0x562925=a24_0x52ee;for(const _0x4043ab of _0x520c18){definitions[_0x562925(0xce)](_0x4043ab[_0x562925(0xcc)]+':'+_0x4043ab['command'],_0x4043ab);let _0x26eca4=serviceGroups['get'](_0x4043ab['service']);!_0x26eca4&&(_0x26eca4=[],serviceGroups[_0x562925(0xce)](_0x4043ab['service'],_0x26eca4)),_0x26eca4['push'](_0x4043ab);}}function registerService(_0x3d8f41,_0x4f7a25,_0x2e463f){const _0x54ce00=a24_0x52ee;registerDefinitions(_0x4f7a25);const _0x44a8b1=_0x5de621=>_0x5de621===_0x54ce00(0xc7)?'':_0x5de621===_0x54ce00(0xb1)?_0x54ce00(0xcf):_0x54ce00(0xd3),_0x5e57f7={'service':_0x4f7a25[0x0][_0x54ce00(0xcc)],'label':_0x3d8f41,'commands':_0x4f7a25['map'](_0x1327e2=>({'command':_0x1327e2[_0x54ce00(0xb6)],'description':_0x1327e2[_0x54ce00(0xc6)],'tag':_0x44a8b1(_0x1327e2[_0x54ce00(0xb5)])})),'defaultCommand':_0x2e463f?.['defaultCommand']??(_0x2e463f?.['isSingleCommand']?_0x4f7a25[0x0]['command']:undefined),'isSingleCommand':_0x2e463f?.['isSingleCommand']};serviceRegistry[_0x54ce00(0xc1)](_0x5e57f7),serviceByName['set'](_0x5e57f7[_0x54ce00(0xcc)],_0x5e57f7);}registerService('Authentication',authDefinitions,{'defaultCommand':a24_0x3e89f2(0xaf)}),registerService('Datasets',datasetDefinitions),registerService(a24_0x3e89f2(0xb9),dataDefinitions),registerService(a24_0x3e89f2(0xd0),sqlDefinitions),registerService(a24_0x3e89f2(0xca),bffDefinitions),registerService('Knowledge\x20Base',kbDefinitions),registerService(a24_0x3e89f2(0xc2),appDefinitions,{'defaultCommand':a24_0x3e89f2(0xbf)}),registerService(a24_0x3e89f2(0xcb),configDefinitions,{'defaultCommand':a24_0x3e89f2(0xbf)}),registerService(a24_0x3e89f2(0xb2),skillDefinitions,{'defaultCommand':a24_0x3e89f2(0xbc)}),registerService(a24_0x3e89f2(0xc8),[updateDefinition],{'defaultCommand':a24_0x3e89f2(0xbb),'isSingleCommand':!![]}),registerService(a24_0x3e89f2(0xc4),[doctorDefinition],{'isSingleCommand':!![]}),registerService(a24_0x3e89f2(0xbd),[schemaDefinition],{'isSingleCommand':!![]}),registerService(a24_0x3e89f2(0xbe),logsDefinitions,{'defaultCommand':'show'});export function findDefinition(_0x3ffc56,_0x29cee3){const _0x2633a8=a24_0x3e89f2;return definitions[_0x2633a8(0xd2)](_0x3ffc56+':'+_0x29cee3);}export function isKnownService(_0x34c3dc){const _0x30deae=a24_0x3e89f2;return serviceByName[_0x30deae(0xcd)](_0x34c3dc);}export function getServiceEntry(_0x1f6165){const _0x9f4255=a24_0x3e89f2;return serviceByName[_0x9f4255(0xd2)](_0x1f6165);}export function getAllDefinitions(){const _0x5a74c4=a24_0x3e89f2;return Array[_0x5a74c4(0xc3)](definitions[_0x5a74c4(0xb0)]());}
|
package/lib/commands/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a25_0x58b8ab=a25_0x2e54;(function(_0x159d14,_0x387e7e){const _0x46698a=a25_0x2e54,_0x178e8a=_0x159d14();while(!![]){try{const _0x3a11f9=-parseInt(_0x46698a(0x10c))/0x1*(parseInt(_0x46698a(0x10f))/0x2)+-parseInt(_0x46698a(0x10d))/0x3*(parseInt(_0x46698a(0x10b))/0x4)+-parseInt(_0x46698a(0x113))/0x5+-parseInt(_0x46698a(0x111))/0x6*(-parseInt(_0x46698a(0x110))/0x7)+parseInt(_0x46698a(0x112))/0x8*(parseInt(_0x46698a(0x107))/0x9)+-parseInt(_0x46698a(0x10e))/0xa+parseInt(_0x46698a(0x106))/0xb;if(_0x3a11f9===_0x387e7e)break;else _0x178e8a['push'](_0x178e8a['shift']());}catch(_0x2451d8){_0x178e8a['push'](_0x178e8a['shift']());}}}(a25_0x3858,0x48580));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0xa9b511){const _0x1d3f5=await buildSchemaPayload();return{'ok':!![],'data':_0x1d3f5};}export const schemaDefinition={'service':'schema','command':a25_0x58b8ab(0x10a),'description':a25_0x58b8ab(0x109),'risk':a25_0x58b8ab(0x108),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};function a25_0x2e54(_0x398d37,_0x120c10){_0x398d37=_0x398d37-0x106;const _0x38583e=a25_0x3858();let _0x2e54af=_0x38583e[_0x398d37];return _0x2e54af;}function a25_0x3858(){const _0x1d9824=['Export\x20machine-readable\x20command\x20schema\x20(JSON)','export','16964cNrbJK','3kzroPm','357KdJluv','2618760rQzQUt','113908itobKh','14sHFrqr','13008bEAkAt','26648AjtxKU','1596645WaYWKE','16339851zULHvX','171iOwoIN','read'];a25_0x3858=function(){return _0x1d9824;};return a25_0x3858();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a26_0x37176e=a26_0x5d3e;(function(_0x53af56,_0x1072ac){const _0x1a964b=a26_0x5d3e,_0x53d0bb=_0x53af56();while(!![]){try{const _0x55f5ea=parseInt(_0x1a964b(0x21a))/0x1*(parseInt(_0x1a964b(0x1ec))/0x2)+-parseInt(_0x1a964b(0x1f3))/0x3*(parseInt(_0x1a964b(0x204))/0x4)+parseInt(_0x1a964b(0x21b))/0x5*(parseInt(_0x1a964b(0x211))/0x6)+parseInt(_0x1a964b(0x208))/0x7+parseInt(_0x1a964b(0x20b))/0x8+-parseInt(_0x1a964b(0x1fb))/0x9+-parseInt(_0x1a964b(0x216))/0xa;if(_0x55f5ea===_0x1072ac)break;else _0x53d0bb['push'](_0x53d0bb['shift']());}catch(_0xad15da){_0x53d0bb['push'](_0x53d0bb['shift']());}}}(a26_0x16a0,0x7465b));import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';const CODE_FLAG={'name':a26_0x37176e(0x20a),'type':a26_0x37176e(0x1f5),'description':a26_0x37176e(0x210)},DIR_FLAG={'name':a26_0x37176e(0x1dd),'type':'string','required':!![],'description':a26_0x37176e(0x20e)};function a26_0x5d3e(_0x44d0ac,_0x14c506){_0x44d0ac=_0x44d0ac-0x1dc;const _0x16a0d7=a26_0x16a0();let _0x5d3e02=_0x16a0d7[_0x44d0ac];return _0x5d3e02;}function summarizeRuntimeSkill(_0x5ee328){const _0x12084a=a26_0x37176e;return{'id':_0x5ee328['id'],'skillCode':_0x5ee328['skillCode'],'skillName':_0x5ee328[_0x12084a(0x200)],'scope':_0x5ee328[_0x12084a(0x1fc)],'version':_0x5ee328[_0x12084a(0x1dc)],'readonly':_0x5ee328[_0x12084a(0x206)]};}function filterByCode(_0x24c349,_0x5831c6){const _0x5974f0=a26_0x37176e,_0x1e828e=_0x5831c6[_0x5974f0(0x201)]();if(!_0x1e828e)return _0x24c349;return _0x24c349[_0x5974f0(0x21c)](_0x5edf7c=>_0x5edf7c[_0x5974f0(0x1f6)]===_0x1e828e);}export const skillDefinitions=[{'service':a26_0x37176e(0x1ef),'command':a26_0x37176e(0x218),'description':a26_0x37176e(0x219)+CLI_BIN_NAME+a26_0x37176e(0x1fd),'risk':a26_0x37176e(0x20f),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0xb25b07){const _0x288761=a26_0x37176e;logger[_0x288761(0x1e6)](process[_0x288761(0x1e8)]()),logger[_0x288761(0x217)](_0x288761(0x1e1),_0x288761(0x207)+CLI_DISPLAY_NAME+'\x20skill\x20via\x20npx.');const {LOVRABET_SKILL_SOURCE:_0x21fe98,LOVRABET_SKIP_NPX_SKILLS_ENV:_0xa69c4e,runNpxSkillsAddGlobal:_0x1e6465}=await import(_0x288761(0x1fe)),_0x22a03e=_0xb25b07['nonInteractive']?_0x288761(0x1fa):_0x288761(0x1f4);console['log'](_0x288761(0x1ff)+_0x21fe98+_0x288761(0x1f8));const _0xd670e=_0x1e6465(process['cwd'](),_0x21fe98,{'stdio':_0x22a03e});if(_0xd670e[_0x288761(0x1e7)])console['log']('Skipped\x20npx\x20('+_0xa69c4e+'=1);\x20assuming\x20skill\x20is\x20already\x20present.');else{if(_0xd670e['ok'])console[_0x288761(0x1df)](CLI_BIN_NAME+_0x288761(0x20d));else throw CliErrors[_0x288761(0x1f7)](_0x288761(0x1ed)+(_0xd670e[_0x288761(0x1f1)]||_0x288761(0x1e4)),'Check\x20network\x20connectivity\x20and\x20try\x20again.');}return{'ok':!![]};}},{'service':a26_0x37176e(0x1ef),'command':'pull','description':a26_0x37176e(0x209),'risk':a26_0x37176e(0x20f),'flags':[CODE_FLAG],async 'execute'(_0x1c3f2f){const _0x26cb1c=a26_0x37176e,{listCompanyRuntimeSkills:_0x24844b,listPersonalRuntimeSkills:_0x646123}=await import(_0x26cb1c(0x21d)),{linkEffectiveRuntimeSkills:_0x29bc20,materializeRuntimeSkill:_0x4f9abb}=await import('../../skills/runtime-skill-sync.js'),_0x786148=_0x1c3f2f['str']('code'),_0x4b1832=_0x1c3f2f[_0x26cb1c(0x1de)]??_0x26cb1c(0x1e2),_0xe2cf11=_0x1c3f2f['accessKey'];if(!_0xe2cf11)throw CliErrors[_0x26cb1c(0x215)]();const _0x347f85=filterByCode(await _0x646123(_0x1c3f2f[_0x26cb1c(0x202)]),_0x786148),_0x5af478=filterByCode(await _0x24844b(_0x1c3f2f[_0x26cb1c(0x202)]),_0x786148),_0x381ebb=[..._0x347f85[_0x26cb1c(0x1e9)](_0x84bafc=>_0x4f9abb(_0x84bafc,'personal',{'env':_0x4b1832,'accessKey':_0xe2cf11,'appCode':_0x1c3f2f[_0x26cb1c(0x202)]})),..._0x5af478['map'](_0x43db6d=>_0x4f9abb(_0x43db6d,_0x26cb1c(0x213),{'env':_0x4b1832,'accessKey':_0xe2cf11,'appCode':_0x1c3f2f[_0x26cb1c(0x202)]}))],_0x215196=_0x29bc20(_0x381ebb,_0x1c3f2f[_0x26cb1c(0x202)]),_0x22334e=_0x215196['reduce']((_0xe3203,_0x50f834)=>{const _0x5a9063=_0x26cb1c;return _0xe3203[_0x50f834[_0x5a9063(0x1f2)]]=(_0xe3203[_0x50f834[_0x5a9063(0x1f2)]]??0x0)+0x1,_0xe3203;},{});return{'ok':!![],'data':{'appCode':_0x1c3f2f['appCode'],'personal':_0x347f85[_0x26cb1c(0x1e3)],'company':_0x5af478[_0x26cb1c(0x1e3)],'materialized':_0x381ebb['length'],'links':{'total':_0x215196['length'],'created':_0x22334e['created']??0x0,'updated':_0x22334e[_0x26cb1c(0x203)]??0x0,'unchanged':_0x22334e[_0x26cb1c(0x214)]??0x0,'skipped':0x0,'conflicted':0x0},'skills':{'personal':_0x347f85['map'](summarizeRuntimeSkill),'company':_0x5af478[_0x26cb1c(0x1e9)](summarizeRuntimeSkill)}},'message':_0x26cb1c(0x212)+_0x347f85[_0x26cb1c(0x1e3)]+_0x26cb1c(0x1ea)+_0x5af478['length']+_0x26cb1c(0x1eb)};}},{'service':a26_0x37176e(0x1ef),'command':'push','description':a26_0x37176e(0x1ee),'risk':'write','flags':[DIR_FLAG],async 'execute'(_0x2de998){const _0x44f481=a26_0x37176e,{createPersonalRuntimeSkill:_0x1c898e,listPersonalRuntimeSkills:_0x44e5fc,updatePersonalRuntimeSkill:_0x2509ff}=await import(_0x44f481(0x21d)),{readPushDirectory:_0xf1b16d}=await import(_0x44f481(0x205));if(!_0x2de998[_0x44f481(0x20c)])throw CliErrors[_0x44f481(0x215)]();const _0x185b8a=_0xf1b16d(_0x2de998['str'](_0x44f481(0x1dd)),_0x2de998[_0x44f481(0x202)]),_0x381eed=(await _0x44e5fc(_0x2de998[_0x44f481(0x202)]))[_0x44f481(0x1f9)](_0x590d06=>_0x590d06[_0x44f481(0x1f6)]===_0x185b8a[_0x44f481(0x1f6)]),_0x205db4=_0x381eed?await _0x2509ff(_0x185b8a['skillCode'],_0x2de998['appCode'],_0x185b8a['input']):await _0x1c898e(_0x2de998[_0x44f481(0x202)],_0x185b8a[_0x44f481(0x1e0)]);return{'ok':!![],'data':summarizeRuntimeSkill(_0x205db4),'message':_0x381eed?_0x44f481(0x1e5)+_0x185b8a[_0x44f481(0x1f6)]:_0x44f481(0x1f0)+_0x185b8a[_0x44f481(0x1f6)]};}}];function a26_0x16a0(){const _0xe4e75d=['appCode','updated','4JrwxOv','../../skills/runtime-skill-sync.js','readonly','Installing\x20published\x20','3195990YrOAah','Pull\x20personal\x20and\x20company\x20runtime\x20Skills\x20into\x20local\x20agent\x20skill\x20directories','code','1560624PMAGZT','accessKey','\x20skill\x20installed','Local\x20Skill\x20directory\x20containing\x20SKILL.md','write','Only\x20pull\x20a\x20specific\x20runtime\x20Skill\x20code','130566AQkzPi','Pulled\x20','company','unchanged','authRequired','5809560THsmkW','info','install','Install\x20the\x20published\x20','265906JxGoBj','70NTDQWC','filter','../../core/api-client.js','version','dir','envName','log','input','skill-install','production','length','unknown','Updated\x20personal\x20Skill\x20','setLogPath','skipped','cwd','map','\x20personal\x20and\x20','\x20company\x20Skill(s).','6lARvbg','npx\x20skills\x20add\x20failed:\x20','Push\x20a\x20local\x20Skill\x20directory\x20to\x20personal\x20runtime\x20Skill\x20scope','skill','Created\x20personal\x20Skill\x20','error','action','1605207ulEJcW','inherit','string','skillCode','apiError','\x20-g\x20-y)...','find','pipe','1451088LyKvQV','scope','\x20developer\x20skill','../../skills/npx-skills-add.js','Installing\x20official\x20skill\x20via\x20npx\x20(npx\x20skills\x20add\x20','skillName','trim'];a26_0x16a0=function(){return _0xe4e75d;};return a26_0x16a0();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a27_0x5d493d=a27_0x1374;(function(_0x299889,_0x1bded8){const _0x1829b3=a27_0x1374,_0x22355b=_0x299889();while(!![]){try{const _0x5b40f5=parseInt(_0x1829b3(0x85))/0x1+parseInt(_0x1829b3(0x7d))/0x2+-parseInt(_0x1829b3(0x82))/0x3*(-parseInt(_0x1829b3(0x77))/0x4)+parseInt(_0x1829b3(0x75))/0x5*(parseInt(_0x1829b3(0x72))/0x6)+parseInt(_0x1829b3(0x86))/0x7*(-parseInt(_0x1829b3(0x80))/0x8)+-parseInt(_0x1829b3(0x71))/0x9*(-parseInt(_0x1829b3(0x83))/0xa)+-parseInt(_0x1829b3(0x7b))/0xb;if(_0x5b40f5===_0x1bded8)break;else _0x22355b['push'](_0x22355b['shift']());}catch(_0x2b195d){_0x22355b['push'](_0x22355b['shift']());}}}(a27_0x21c0,0xd1117));function a27_0x1374(_0xe67365,_0x30805c){_0xe67365=_0xe67365-0x71;const _0x21c05f=a27_0x21c0();let _0x13749e=_0x21c05f[_0xe67365];return _0x13749e;}import{getSqlQueryInfo}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';import{SQLCODE_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';export const sqlDetail={'service':a27_0x5d493d(0x7c),'command':'detail','description':a27_0x5d493d(0x7e),'risk':a27_0x5d493d(0x79),'flags':[SQLCODE_FLAG,VERBOSE_FLAG],async 'execute'(_0x4715d2){const _0x554ebb=a27_0x5d493d,_0x4791a8=await getSqlQueryInfo(_0x4715d2[_0x554ebb(0x7a)],_0x4715d2[_0x554ebb(0x81)](_0x554ebb(0x87))),_0x34253f=_0x4715d2[_0x554ebb(0x7f)](_0x554ebb(0x74));if(_0x34253f)return{'ok':!![],'data':_0x4791a8};const _0x305c79=_0x4791a8[_0x554ebb(0x88)]?await getDbName(_0x4715d2[_0x554ebb(0x7a)],_0x4791a8['dbId']):undefined;return{'ok':!![],'data':{'sqlCode':_0x4791a8[_0x554ebb(0x73)],'sqlName':_0x4791a8[_0x554ebb(0x76)],'db':_0x305c79?_0x305c79+'\x20('+_0x4791a8[_0x554ebb(0x88)]+')':_0x4791a8['dbId']??'','description':_0x4791a8[_0x554ebb(0x84)]??'','sqlContent':_0x4791a8[_0x554ebb(0x78)]??''}};}};function a27_0x21c0(){const _0x38a11f=['verbose','115LVFKAm','sqlName','796YrCTqm','sqlContent','read','appCode','53063186fyKolR','sql','2824456OTMghY','Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','bool','936GrYzPV','str','11559bSwAwI','4127300eqEtAC','description','1143665CjyvUV','9380VGLVXT','sqlcode','dbId','36GPoExf','225258ERwWZO','sqlCode'];a27_0x21c0=function(){return _0x38a11f;};return a27_0x21c0();}
|