@lovrabet/lovrabet-cli 2.0.1-beta.9 → 2.0.2
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/logs/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schema.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/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/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/risk.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/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +2 -2
- package/lib/commands/init/index.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const a16_0x56d80a=a16_0x50f1;(function(_0x56c9b6,_0x440071){const _0x5d652b=a16_0x50f1,_0x29ceac=_0x56c9b6();while(!![]){try{const _0x52e92f=parseInt(_0x5d652b(0x1f4))/0x1+-parseInt(_0x5d652b(0x1f8))/0x2+parseInt(_0x5d652b(0x1fc))/0x3+-parseInt(_0x5d652b(0x1c9))/0x4+-parseInt(_0x5d652b(0x1fe))/0x5*(parseInt(_0x5d652b(0x1bf))/0x6)+parseInt(_0x5d652b(0x1c8))/0x7+parseInt(_0x5d652b(0x1eb))/0x8;if(_0x52e92f===_0x440071)break;else _0x29ceac['push'](_0x29ceac['shift']());}catch(_0x5471b8){_0x29ceac['push'](_0x29ceac['shift']());}}}(a16_0x341d,0x21a7c));import{executeData}from'../../core/sdk-client.js';import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';function a16_0x50f1(_0x484b2b,_0x3b0f1e){_0x484b2b=_0x484b2b-0x1bd;const _0x341db3=a16_0x341d();let _0x50f101=_0x341db3[_0x484b2b];return _0x50f101;}import{requireAnyOf}from'../../commands/common/constraints.js';function a16_0x341d(){const _0x1b7d76=['\x20\x20AGGREGATE\x20TYPES','5HmAsiY','\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}}','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','\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\x20Wrong:\x20\x20\x20\x20--page-size\x2010\x20\x20(this\x20is\x20not\x20a\x20valid\x20flag)','data\x20','\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}','\x20\x20LOGICAL\x20COMBINATORS','paramsRequired','\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}','POST','getOne','operation','92334PwCfBq','write','Get\x20a\x20single\x20record\x20by\x20ID','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','command','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Rounded\x20average\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg\x22,\x22round\x22:true,\x22precision\x22:2}','description','risk','1762516MqfhQY','1055740KrUVJE','\x20\x20PAGINATION','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','Filter\x20dataset\x20records\x20with\x20query\x20conditions','build','now','delete','\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}}','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','\x20\x20\x20\x20MAX\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Maximum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22price\x22,\x22type\x22:\x22MAX\x22,\x22alias\x22:\x22max_price\x22}','\x20\x20PARAMS\x20STRUCTURE','filter','\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$eq\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22age\x22:{\x22$eq\x22:18}}','\x20\x20\x20\x20Pagination\x20is\x20controlled\x20via\x20JSON\x20in\x20--params.\x20Do\x20NOT\x20use\x20--page-size\x20as\x20a\x20CLI\x20flag.','update','str','\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\x20WHERE\x20OPERATORS','\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}}','\x20\x20EXAMPLES','dryRun','\x20completed\x20in\x20','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return\x20alongside\x20aggregates,\x20e.g.\x20[\x22status\x22,\x22region\x22]','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','\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}}]}','read','\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]','create','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','Create\x20multiple\x20records\x20in\x20one\x20request\x20(SDK\x20batchCreate)','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','48704UZPtFP','params','aggregate','\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}}','batchCreate','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','\x20on\x20dataset\x20','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','122951Lorful','\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{\x22aggregate\x22:[{\x22field\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','\x20\x20\x20\x20$gt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$gt\x22:100}}','42900aSsOKx','code','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','Delete\x20a\x20record\x20(requires\x20--yes\x20in\x20non-interactive)','173397amxeqG'];a16_0x341d=function(){return _0x1b7d76;};return a16_0x341d();}import{parseJsonParams,parseJsonParamsValue,parseBatchCreateItemsFromParams}from'../../utils/params.js';import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':a16_0x56d80a(0x1d4),'operation':a16_0x56d80a(0x1d4),'risk':a16_0x56d80a(0x1e5),'paramsRequired':![],'description':a16_0x56d80a(0x1cc),'paramsHint':a16_0x56d80a(0x1f2)+a16_0x56d80a(0x1d1),'helpExtra':[a16_0x56d80a(0x1db),a16_0x56d80a(0x1d6),'\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}}',a16_0x56d80a(0x1f7),a16_0x56d80a(0x1ee),a16_0x56d80a(0x1ff),'\x20\x20\x20\x20$lte\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20or\x20equal\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lte\x22:1000}}','\x20\x20\x20\x20$in\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Value\x20in\x20set\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22country\x22:{\x22$in\x22:[\x22CN\x22,\x22US\x22]}}',a16_0x56d80a(0x1d0),a16_0x56d80a(0x201),a16_0x56d80a(0x1d5),'',a16_0x56d80a(0x205),'\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}}]}',a16_0x56d80a(0x1e4),'',a16_0x56d80a(0x1c4),a16_0x56d80a(0x1ea),a16_0x56d80a(0x1e6),'\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)',a16_0x56d80a(0x1e8),'',a16_0x56d80a(0x1ca),a16_0x56d80a(0x1d7),'\x20\x20\x20\x20Correct:\x20\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:10}\x27',a16_0x56d80a(0x202)]['join']('\x0a')},{'command':'getOne','operation':a16_0x56d80a(0x1bd),'risk':a16_0x56d80a(0x1e5),'paramsRequired':!![],'description':a16_0x56d80a(0x1c1),'paramsHint':a16_0x56d80a(0x1f3)},{'command':a16_0x56d80a(0x1e7),'operation':a16_0x56d80a(0x1e7),'risk':a16_0x56d80a(0x1c0),'paramsRequired':!![],'description':'Create\x20a\x20new\x20record\x20in\x20a\x20dataset','paramsHint':a16_0x56d80a(0x1fa)},{'command':a16_0x56d80a(0x1ef),'operation':a16_0x56d80a(0x1ef),'risk':a16_0x56d80a(0x1c0),'paramsRequired':!![],'description':a16_0x56d80a(0x1e9),'paramsHint':a16_0x56d80a(0x1c2)},{'command':a16_0x56d80a(0x1d8),'operation':a16_0x56d80a(0x1d8),'risk':a16_0x56d80a(0x1c0),'paramsRequired':!![],'description':'Update\x20an\x20existing\x20record','paramsHint':'JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20Example:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27'},{'command':a16_0x56d80a(0x1cf),'operation':a16_0x56d80a(0x1cf),'risk':'high-risk-write','paramsRequired':!![],'description':a16_0x56d80a(0x1fb),'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':a16_0x56d80a(0x1ed),'operation':'aggregate','risk':a16_0x56d80a(0x1e5),'paramsRequired':![],'description':a16_0x56d80a(0x1f0),'paramsHint':a16_0x56d80a(0x200)+a16_0x56d80a(0x1f6),'helpExtra':[a16_0x56d80a(0x1fd),'\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_0x56d80a(0x207),a16_0x56d80a(0x204),'\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}',a16_0x56d80a(0x1c5),a16_0x56d80a(0x1d2),a16_0x56d80a(0x1f5),'',a16_0x56d80a(0x1d3),a16_0x56d80a(0x1e0),a16_0x56d80a(0x1e2),'\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)',a16_0x56d80a(0x1e3),a16_0x56d80a(0x1dc),a16_0x56d80a(0x1e1),'',a16_0x56d80a(0x1dd),'\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','\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_0x56d80a(0x1cb),a16_0x56d80a(0x1da)]['join']('\x0a')}];function makeDataCommand(_0x14ecbc){const _0x132fa7=a16_0x56d80a,_0xdc2a5a=_0x132fa7(0x203)+_0x14ecbc[_0x132fa7(0x1c3)],_0x22a2b1={'service':'data','command':_0x14ecbc[_0x132fa7(0x1c3)],'description':_0x14ecbc[_0x132fa7(0x1c6)],'risk':_0x14ecbc[_0x132fa7(0x1c7)],'helpExtra':_0x14ecbc['helpExtra'],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x14ecbc['paramsHint']}],'validate':async _0x189740=>{const _0x4d52ee=_0x132fa7;_0x14ecbc[_0x4d52ee(0x206)]&&requireAnyOf(_0x189740,[_0x4d52ee(0x1ec)],_0xdc2a5a),_0x14ecbc[_0x4d52ee(0x1be)]===_0x4d52ee(0x1ef)&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x189740['str'](_0x4d52ee(0x1ec))));},async 'execute'(_0x533920){const _0x5cbe81=_0x132fa7,_0x2a9534=_0x533920[_0x5cbe81(0x1d9)](_0x5cbe81(0x1f9)),_0x28d00d=_0x14ecbc[_0x5cbe81(0x1be)]===_0x5cbe81(0x1ef)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x533920['str'](_0x5cbe81(0x1ec)))):parseJsonParams(_0x533920[_0x5cbe81(0x1d9)]('params'))??{},_0x59df0b=Date[_0x5cbe81(0x1ce)](),_0x5c8f9b=await executeData(_0x2a9534,_0x14ecbc[_0x5cbe81(0x1be)],_0x28d00d),_0x1bb5e0=Date[_0x5cbe81(0x1ce)]()-_0x59df0b;return{'ok':!![],'data':{'result':_0x5c8f9b,'elapsed':_0x1bb5e0},'message':_0x5cbe81(0x203)+_0x14ecbc['command']+_0x5cbe81(0x1df)+_0x1bb5e0+'ms'};}};return _0x14ecbc['risk']!=='read'&&(_0x22a2b1[_0x132fa7(0x1de)]=async _0x2769b4=>{const _0x106d5a=_0x132fa7,_0x1e2ab0=_0x2769b4['str'](_0x106d5a(0x1f9)),_0x529da2=_0x14ecbc[_0x106d5a(0x1be)]===_0x106d5a(0x1ef)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x2769b4['str'](_0x106d5a(0x1ec)))):parseJsonParams(_0x2769b4['str']('params'))??{};return dryRun(_0x106d5a(0x208),'/api/{appCode}/'+_0x1e2ab0+'/'+_0x14ecbc['operation'])['body'](_0x529da2)[_0x106d5a(0x1c6)]('Preview:\x20data\x20'+_0x14ecbc['command']+_0x106d5a(0x1f1)+_0x1e2ab0)[_0x106d5a(0x1cd)]();}),_0x22a2b1;}export const dataDefinitions=specs['map'](makeDataCommand);
|
|
1
|
+
function a16_0x374e(_0x396d65,_0x599d4d){_0x396d65=_0x396d65-0x1c0;const _0xd9e867=a16_0xd9e8();let _0x374e0d=_0xd9e867[_0x396d65];return _0x374e0d;}const a16_0x4a5ab4=a16_0x374e;(function(_0xdf4302,_0x53fc76){const _0x3279c4=a16_0x374e,_0x763c4f=_0xdf4302();while(!![]){try{const _0x3d2a0a=parseInt(_0x3279c4(0x1c7))/0x1*(-parseInt(_0x3279c4(0x1ee))/0x2)+-parseInt(_0x3279c4(0x1cc))/0x3*(-parseInt(_0x3279c4(0x1fc))/0x4)+parseInt(_0x3279c4(0x202))/0x5+-parseInt(_0x3279c4(0x1c6))/0x6*(parseInt(_0x3279c4(0x1f7))/0x7)+-parseInt(_0x3279c4(0x205))/0x8*(-parseInt(_0x3279c4(0x208))/0x9)+parseInt(_0x3279c4(0x206))/0xa*(parseInt(_0x3279c4(0x1e1))/0xb)+-parseInt(_0x3279c4(0x1e3))/0xc*(parseInt(_0x3279c4(0x1f6))/0xd);if(_0x3d2a0a===_0x53fc76)break;else _0x763c4f['push'](_0x763c4f['shift']());}catch(_0x5ce802){_0x763c4f['push'](_0x763c4f['shift']());}}}(a16_0xd9e8,0x4a93c));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':'filter','operation':a16_0x4a5ab4(0x1e2),'risk':'read','paramsRequired':![],'description':a16_0x4a5ab4(0x1fe),'paramsHint':a16_0x4a5ab4(0x215)+a16_0x4a5ab4(0x1ff),'helpExtra':[a16_0x4a5ab4(0x1eb),a16_0x4a5ab4(0x1c4),a16_0x4a5ab4(0x1f5),a16_0x4a5ab4(0x1d3),a16_0x4a5ab4(0x1fd),a16_0x4a5ab4(0x1df),'\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_0x4a5ab4(0x20e),a16_0x4a5ab4(0x1d5),a16_0x4a5ab4(0x204),a16_0x4a5ab4(0x1f9),'','\x20\x20LOGICAL\x20COMBINATORS',a16_0x4a5ab4(0x1f8),a16_0x4a5ab4(0x1ec),'',a16_0x4a5ab4(0x1de),a16_0x4a5ab4(0x209),a16_0x4a5ab4(0x1d0),a16_0x4a5ab4(0x1e8),a16_0x4a5ab4(0x1da),a16_0x4a5ab4(0x1d6),'','\x20\x20PAGINATION',a16_0x4a5ab4(0x1e4),a16_0x4a5ab4(0x1d9),'\x20\x20\x20\x20Wrong:\x20\x20\x20\x20--page-size\x2010\x20\x20(this\x20is\x20not\x20a\x20valid\x20flag)'][a16_0x4a5ab4(0x1fb)]('\x0a')},{'command':a16_0x4a5ab4(0x1db),'operation':a16_0x4a5ab4(0x1db),'risk':a16_0x4a5ab4(0x1ed),'paramsRequired':!![],'description':a16_0x4a5ab4(0x1f3),'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':'create','operation':a16_0x4a5ab4(0x1c3),'risk':'write','paramsRequired':!![],'description':a16_0x4a5ab4(0x1cb),'paramsHint':a16_0x4a5ab4(0x1dd)},{'command':a16_0x4a5ab4(0x1d7),'operation':a16_0x4a5ab4(0x1d7),'risk':'write','paramsRequired':!![],'description':a16_0x4a5ab4(0x1fa),'paramsHint':a16_0x4a5ab4(0x1c1)},{'command':a16_0x4a5ab4(0x1e7),'operation':'update','risk':a16_0x4a5ab4(0x1c5),'paramsRequired':!![],'description':a16_0x4a5ab4(0x1d2),'paramsHint':a16_0x4a5ab4(0x201)},{'command':a16_0x4a5ab4(0x1ce),'operation':'delete','risk':a16_0x4a5ab4(0x200),'paramsRequired':!![],'description':a16_0x4a5ab4(0x1d8),'paramsHint':a16_0x4a5ab4(0x20c)},{'command':a16_0x4a5ab4(0x212),'operation':a16_0x4a5ab4(0x212),'risk':'read','paramsRequired':![],'description':a16_0x4a5ab4(0x1f0),'paramsHint':a16_0x4a5ab4(0x1f4)+'Example:\x20\x27{\x22aggregate\x22:[{\x22field\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','helpExtra':[a16_0x4a5ab4(0x1c8),'\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_0x4a5ab4(0x1d1),a16_0x4a5ab4(0x1e0),a16_0x4a5ab4(0x1dc),a16_0x4a5ab4(0x20f),a16_0x4a5ab4(0x20a),'\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}','',a16_0x4a5ab4(0x1f2),a16_0x4a5ab4(0x214),a16_0x4a5ab4(0x1f1),a16_0x4a5ab4(0x1ea),'\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','\x20\x20\x20\x20having\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Post-aggregation\x20filter,\x20e.g.\x20{\x22total\x22:{\x22$gt\x22:1000}}',a16_0x4a5ab4(0x1ef),'','\x20\x20EXAMPLES','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status',a16_0x4a5ab4(0x207),'',a16_0x4a5ab4(0x203),'\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'][a16_0x4a5ab4(0x1fb)]('\x0a')}];function makeDataCommand(_0x263e23){const _0x4900b9=a16_0x4a5ab4,_0x446f38=_0x4900b9(0x213)+_0x263e23['command'],_0x15df94={'service':_0x4900b9(0x1d4),'command':_0x263e23[_0x4900b9(0x1c2)],'description':_0x263e23[_0x4900b9(0x1c0)],'risk':_0x263e23[_0x4900b9(0x1e6)],'helpExtra':_0x263e23[_0x4900b9(0x20b)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x263e23['paramsHint']}],'validate':async _0x263f2d=>{const _0xc8b690=_0x4900b9;_0x263e23[_0xc8b690(0x1c9)]&&requireAnyOf(_0x263f2d,[_0xc8b690(0x20d)],_0x446f38),_0x263e23[_0xc8b690(0x1e5)]===_0xc8b690(0x1d7)&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x263f2d['str']('params')));},async 'execute'(_0x1f7792){const _0x1eb3ce=_0x4900b9,_0x458463=_0x1f7792[_0x1eb3ce(0x1e9)]('code'),_0x8d9fd4=_0x263e23[_0x1eb3ce(0x1e5)]===_0x1eb3ce(0x1d7)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x1f7792[_0x1eb3ce(0x1e9)](_0x1eb3ce(0x20d)))):parseJsonParams(_0x1f7792['str'](_0x1eb3ce(0x20d)))??{},_0x35b892=Date[_0x1eb3ce(0x211)](),_0x591504=await executeData(_0x458463,_0x263e23[_0x1eb3ce(0x1e5)],_0x8d9fd4),_0x434a7b=Date[_0x1eb3ce(0x211)]()-_0x35b892;return{'ok':!![],'data':{'result':_0x591504,'elapsed':_0x434a7b},'message':_0x1eb3ce(0x213)+_0x263e23['command']+'\x20completed\x20in\x20'+_0x434a7b+'ms'};}};return _0x263e23[_0x4900b9(0x1e6)]!==_0x4900b9(0x1ed)&&(_0x15df94[_0x4900b9(0x210)]=async _0x3e891b=>{const _0x4314ec=_0x4900b9,_0x12a7d0=_0x3e891b[_0x4314ec(0x1e9)](_0x4314ec(0x1ca)),_0x5ae71f=_0x263e23[_0x4314ec(0x1e5)]===_0x4314ec(0x1d7)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x3e891b[_0x4314ec(0x1e9)](_0x4314ec(0x20d)))):parseJsonParams(_0x3e891b[_0x4314ec(0x1e9)](_0x4314ec(0x20d)))??{};return dryRun('POST','/api/{appCode}/'+_0x12a7d0+'/'+_0x263e23[_0x4314ec(0x1e5)])['body'](_0x5ae71f)[_0x4314ec(0x1c0)](_0x4314ec(0x1cf)+_0x263e23[_0x4314ec(0x1c2)]+_0x4314ec(0x1cd)+_0x12a7d0)['build']();}),_0x15df94;}function a16_0xd9e8(){const _0x1dc9c1=['15774RaiXFy','filter','6255708fArrKS','\x20\x20\x20\x20Pagination\x20is\x20controlled\x20via\x20JSON\x20in\x20--params.\x20Do\x20NOT\x20use\x20--page-size\x20as\x20a\x20CLI\x20flag.','operation','risk','update','\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}]','str','\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\x20WHERE\x20OPERATORS','\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}}]}','read','182qLVyUx','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','\x20\x20PARAMS\x20STRUCTURE','Get\x20a\x20single\x20record\x20by\x20ID','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','\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}}','13nRcEQS','14ioxTPD','\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$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}}','Create\x20multiple\x20records\x20in\x20one\x20request\x20(SDK\x20batchCreate)','join','1149740qPmEvP','\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}}','Filter\x20dataset\x20records\x20with\x20query\x20conditions','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','high-risk-write','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20Example:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27','1608675FBTJEn','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','\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}}','3768kLMSPI','2990foenTz','\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','27aRAWKN','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','\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}','helpExtra','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','params','\x20\x20\x20\x20$in\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Value\x20in\x20set\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22country\x22:{\x22$in\x22:[\x22CN\x22,\x22US\x22]}}','\x20\x20\x20\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}','dryRun','now','aggregate','data\x20','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return\x20alongside\x20aggregates,\x20e.g.\x20[\x22status\x22,\x22region\x22]','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','description','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','command','create','\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}}','write','76326elqpSj','5215zWGtTy','\x20\x20AGGREGATE\x20TYPES','paramsRequired','code','Create\x20a\x20new\x20record\x20in\x20a\x20dataset','6ZVJoai','\x20on\x20dataset\x20','delete','Preview:\x20data\x20','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','\x20\x20\x20\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}','Update\x20an\x20existing\x20record','\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}}','data','\x20\x20\x20\x20$contain\x20\x20\x20\x20\x20Substring\x20match\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$contain\x22:\x22test\x22}}','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','batchCreate','Delete\x20a\x20record\x20(requires\x20--yes\x20in\x20non-interactive)','\x20\x20\x20\x20Correct:\x20\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:10}\x27','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','getOne','\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}','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','\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\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_0xd9e8=function(){return _0x1dc9c1;};return a16_0xd9e8();}export const dataDefinitions=specs['map'](makeDataCommand);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a17_0x4254c7=a17_0x3d3e;(function(_0x844f2a,_0x5d4d85){const _0x384378=a17_0x3d3e,_0x1eb889=_0x844f2a();while(!![]){try{const _0x26b1ed=parseInt(_0x384378(0x11f))/0x1+-parseInt(_0x384378(0x127))/0x2+-parseInt(_0x384378(0x111))/0x3+parseInt(_0x384378(0x112))/0x4+-parseInt(_0x384378(0x149))/0x5+parseInt(_0x384378(0x13a))/0x6+-parseInt(_0x384378(0x129))/0x7*(parseInt(_0x384378(0x12b))/0x8);if(_0x26b1ed===_0x5d4d85)break;else _0x1eb889['push'](_0x1eb889['shift']());}catch(_0xba7728){_0x1eb889['push'](_0x1eb889['shift']());}}}(a17_0x4269,0x1891c));function a17_0x3d3e(_0x445087,_0x4d2ddf){_0x445087=_0x445087-0x102;const _0x42691a=a17_0x4269();let _0x3d3e28=_0x42691a[_0x445087];return _0x3d3e28;}import{getDatasetDetail}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function normalizeField(_0xaf1fc8){const _0x38521b=a17_0x3d3e;if(_0xaf1fc8['deleted'])return null;const _0x554b03=Boolean(_0xaf1fc8[_0x38521b(0x146)]!==undefined||_0xaf1fc8[_0x38521b(0x11a)]!==undefined);let _0x30ce01={};if(!_0x554b03&&typeof _0xaf1fc8['extend']===_0x38521b(0x11c))try{_0x30ce01=JSON[_0x38521b(0x103)](_0xaf1fc8[_0x38521b(0x11d)]);}catch{}const _0x52ec0c=_0x554b03?_0xaf1fc8['name']:_0xaf1fc8[_0x38521b(0x10b)],_0x5a23e1=_0x554b03?_0xaf1fc8[_0x38521b(0x146)]:_0xaf1fc8[_0x38521b(0x14b)],_0x27dd4e=_0x554b03?_0xaf1fc8['doType']:_0xaf1fc8[_0x38521b(0x104)]||_0xaf1fc8[_0x38521b(0x10f)],_0x2a574b=_0x554b03?_0xaf1fc8['pkField']===!![]:_0x30ce01[_0x38521b(0x106)]===!![],_0x10db6c=_0x554b03?_0xaf1fc8[_0x38521b(0x120)]===!![]:_0x30ce01['required']===!![],_0x7f58fc=_0x554b03?_0xaf1fc8['options']??null:_0x30ce01['options']??null,_0x506417={'name':_0x52ec0c,'displayName':_0x5a23e1||_0x52ec0c,'type':_0x27dd4e,'dbType':_0xaf1fc8[_0x38521b(0x12d)],'pk':_0x2a574b,'required':_0x10db6c,'description':_0xaf1fc8['description']||undefined};return Array[_0x38521b(0x140)](_0x7f58fc)&&_0x7f58fc[_0x38521b(0x12e)]>0x0&&(_0x506417['options']=_0x7f58fc),_0x506417;}function parseJsonMaybe(_0x84c37a){const _0x27be3e=a17_0x3d3e;if(typeof _0x84c37a!==_0x27be3e(0x11c))return _0x84c37a;try{return JSON[_0x27be3e(0x103)](_0x84c37a);}catch{return _0x84c37a;}}function normalizeOperationEntry(_0x3a3525,_0x40ca91){const _0x1bb364=a17_0x3d3e;if(!_0x40ca91||typeof _0x40ca91!==_0x1bb364(0x130))return null;if(!_0x40ca91['method']||!_0x40ca91[_0x1bb364(0x10e)])return null;const _0x20700a={'name':_0x3a3525,'method':_0x40ca91[_0x1bb364(0x142)],'path':_0x40ca91[_0x1bb364(0x10e)]};if(_0x40ca91[_0x1bb364(0x14c)])_0x20700a['host']=_0x40ca91[_0x1bb364(0x14c)];if(_0x40ca91[_0x1bb364(0x11b)]!=null)_0x20700a[_0x1bb364(0x11b)]=parseJsonMaybe(_0x40ca91[_0x1bb364(0x11b)]);if(_0x40ca91[_0x1bb364(0x125)]!=null)_0x20700a['responseBody']=parseJsonMaybe(_0x40ca91['responseBody']);if(_0x40ca91[_0x1bb364(0x115)]!=null)_0x20700a[_0x1bb364(0x115)]=_0x40ca91[_0x1bb364(0x115)];if(_0x40ca91['afterScriptId']!=null)_0x20700a['afterScriptId']=_0x40ca91[_0x1bb364(0x137)];if(Array[_0x1bb364(0x140)](_0x40ca91['requestFields']))_0x20700a[_0x1bb364(0x128)]=_0x40ca91[_0x1bb364(0x128)];if(Array[_0x1bb364(0x140)](_0x40ca91[_0x1bb364(0x148)]))_0x20700a[_0x1bb364(0x148)]=_0x40ca91[_0x1bb364(0x148)];return _0x20700a;}function summarizeDbtable(_0x22e35e){const _0x23c4c8=a17_0x3d3e,_0x154691={},_0x122059=[_0x23c4c8(0x105),_0x23c4c8(0x135),_0x23c4c8(0x122),_0x23c4c8(0x12a),_0x23c4c8(0x106),_0x23c4c8(0x114),_0x23c4c8(0x108),_0x23c4c8(0x121),'updateTimeField',_0x23c4c8(0x14a),'creatorNameField',_0x23c4c8(0x13e),'modifierNameField',_0x23c4c8(0x117),_0x23c4c8(0x10a)];for(const _0x3cc9f4 of _0x122059){if(_0x22e35e[_0x3cc9f4]!==undefined)_0x154691[_0x3cc9f4]=_0x22e35e[_0x3cc9f4];}return typeof _0x154691['allFields']==='string'&&_0x154691[_0x23c4c8(0x114)][_0x23c4c8(0x12e)]>0x0&&(_0x154691['allFieldNames']=_0x154691['allFields'][_0x23c4c8(0x138)](',')[_0x23c4c8(0x11e)](_0x1bfe7b=>_0x1bfe7b[_0x23c4c8(0x113)]())[_0x23c4c8(0x116)](Boolean)),_0x154691;}function normalizeRelatedPages(_0x1fe4f1){const _0x914d04=a17_0x3d3e;if(!Array['isArray'](_0x1fe4f1))return[];return _0x1fe4f1['filter'](_0x5610d0=>_0x5610d0&&typeof _0x5610d0===_0x914d04(0x130))[_0x914d04(0x11e)](_0x22da19=>({'id':_0x22da19['id'],'type':_0x22da19[_0x914d04(0x104)],'code':_0x22da19[_0x914d04(0x10b)],'title':_0x22da19[_0x914d04(0x136)],'deleted':_0x22da19['deleted']===!![]}));}export const datasetDetail={'service':a17_0x4254c7(0x10c),'command':a17_0x4254c7(0x110),'description':a17_0x4254c7(0x109),'risk':a17_0x4254c7(0x144),'flags':[CODE_FLAG],async 'execute'(_0x5c2cc2){const _0x41ebc2=a17_0x4254c7,_0x572013=await getDatasetDetail(_0x5c2cc2[_0x41ebc2(0x13d)]('code')),_0x5b3ddc=Array[_0x41ebc2(0x140)](_0x572013[_0x41ebc2(0x13b)])?_0x572013['fields']:Array[_0x41ebc2(0x140)](_0x572013[_0x41ebc2(0x118)])?_0x572013[_0x41ebc2(0x118)]:[],_0x1c0724=_0x5b3ddc[_0x41ebc2(0x11e)](_0x4fe709=>normalizeField(_0x4fe709))[_0x41ebc2(0x116)](_0x36a27f=>_0x36a27f!==null),_0x2d4f92=_0x572013[_0x41ebc2(0x119)]??{},_0x1a9104=[];for(const [_0x14035b,_0x59fb40]of Object[_0x41ebc2(0x126)](_0x2d4f92)){const _0x4565bc=normalizeOperationEntry(_0x14035b,_0x59fb40);if(_0x4565bc)_0x1a9104[_0x41ebc2(0x139)](_0x4565bc);}const _0xd57114=_0x572013[_0x41ebc2(0x133)]??{},_0x22a14a=_0x572013[_0x41ebc2(0x10c)]??{},_0x3c95a3=_0xd57114['dbId']!=null?{'id':_0xd57114['dbId'],'name':_0xd57114[_0x41ebc2(0x135)]??null}:undefined;let _0x2d7e68;return typeof _0x572013[_0x41ebc2(0x11d)]===_0x41ebc2(0x11c)&&(_0x2d7e68=parseJsonMaybe(_0x572013[_0x41ebc2(0x11d)])),{'ok':!![],'data':{'id':_0x572013[_0x41ebc2(0x12f)]??_0x572013['id'],'name':_0x572013[_0x41ebc2(0x14b)],'code':_0x572013[_0x41ebc2(0x13f)]||_0x572013[_0x41ebc2(0x10b)],'doVersion':_0x572013['doVersion'],'description':_0x572013['description']||_0x22a14a[_0x41ebc2(0x134)]||undefined,'source':_0x572013[_0x41ebc2(0x10d)]||_0x22a14a[_0x41ebc2(0x12c)],'table':_0xd57114[_0x41ebc2(0x122)]||_0x22a14a[_0x41ebc2(0x122)],'datasetKey':_0xd57114[_0x41ebc2(0x12a)],'pk':_0xd57114[_0x41ebc2(0x106)],'db':_0x3c95a3,'dbtable':summarizeDbtable(_0xd57114),'fields':_0x1c0724,'operations':_0x1a9104,'indexes':Array[_0x41ebc2(0x140)](_0x22a14a[_0x41ebc2(0x102)])?_0x22a14a[_0x41ebc2(0x102)]:[],'relations':Array['isArray'](_0x572013[_0x41ebc2(0x107)])?_0x572013[_0x41ebc2(0x107)][_0x41ebc2(0x11e)](_0x38bb2a=>({'fromField':_0x38bb2a[_0x41ebc2(0x141)],'toDataset':_0x38bb2a[_0x41ebc2(0x147)],'toCode':_0x38bb2a[_0x41ebc2(0x145)],'toTable':_0x38bb2a[_0x41ebc2(0x132)],'toField':_0x38bb2a['toField'],'labelField':_0x38bb2a[_0x41ebc2(0x123)]||undefined})):[],'relatedPages':normalizeRelatedPages(_0x572013[_0x41ebc2(0x13c)]),...Array[_0x41ebc2(0x140)](_0x572013[_0x41ebc2(0x143)])?{'columnCodeListWithDeleted':_0x572013[_0x41ebc2(0x143)]}:{},'formatRules':Array[_0x41ebc2(0x140)](_0x572013['formatRules'])?_0x572013[_0x41ebc2(0x124)]:[],'validateRules':Array[_0x41ebc2(0x140)](_0x572013[_0x41ebc2(0x131)])?_0x572013[_0x41ebc2(0x131)]:[],..._0x2d7e68!==undefined?{'extend':_0x2d7e68}:{},'stats':{'fieldCount':_0x1c0724[_0x41ebc2(0x12e)],'operationCount':_0x1a9104['length']}}};}};function a17_0x4269(){const _0x4d1b8c=['5672aUDJmW','sourceType','dbType','length','modelId','object','validateRules','toTableName','dbtableConfig','tableComment','dbName','title','afterScriptId','split','push','1177032SMVjQU','fields','relatedPageInfoList','str','modifierIdField','modelCode','isArray','fromField','method','columnCodeListWithDeleted','read','toDatasetCode','displayName','toDatasetName','responseFields','479730zgWOiO','creatorIdField','name','host','indexes','parse','type','dbId','pkField','relations','logicField','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','dblinkInfoDTO','code','dataset','source','path','dataType','detail','58551ZgVijq','800352xUUSIN','trim','allFields','beforeScriptId','filter','labelField','properties','operations','doType','requestBody','string','extend','map','106559lNHARV','required','createTimeField','tableName','toFieldLabel','formatRules','responseBody','entries','102664YypuSf','requestFields','2324DsHCmR','datasetKey'];a17_0x4269=function(){return _0x4d1b8c;};return a17_0x4269();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5b2531,_0x38a76e){const _0x4abdbe=a18_0x5c04,_0xb5a912=_0x5b2531();while(!![]){try{const _0x1fa996=parseInt(_0x4abdbe(0xc1))/0x1+parseInt(_0x4abdbe(0xc3))/0x2*(parseInt(_0x4abdbe(0xc2))/0x3)+-parseInt(_0x4abdbe(0xbf))/0x4+parseInt(_0x4abdbe(0xbd))/0x5*(parseInt(_0x4abdbe(0xbb))/0x6)+-parseInt(_0x4abdbe(0xbc))/0x7+-parseInt(_0x4abdbe(0xc5))/0x8*(parseInt(_0x4abdbe(0xc0))/0x9)+parseInt(_0x4abdbe(0xbe))/0xa*(-parseInt(_0x4abdbe(0xc4))/0xb);if(_0x1fa996===_0x38a76e)break;else _0xb5a912['push'](_0xb5a912['shift']());}catch(_0x597bc6){_0xb5a912['push'](_0xb5a912['shift']());}}}(a18_0x4ec9,0xe2575));function a18_0x4ec9(){const _0x307a4=['485368oIExQM','4806066ImMUeM','925372jEoZMO','5oIRHar','20DjIrKm','2970160rKJOAL','63CLKDmn','733095nqUbTW','28125eTsbxE','372DSjwvH','5782315XxpqdF'];a18_0x4ec9=function(){return _0x307a4;};return a18_0x4ec9();}import{datasetList}from'../../commands/dataset/list.js';import{datasetDetail}from'../../commands/dataset/detail.js';function a18_0x5c04(_0x189c21,_0x5b725b){_0x189c21=_0x189c21-0xbb;const _0x4ec91a=a18_0x4ec9();let _0x5c0445=_0x4ec91a[_0x189c21];return _0x5c0445;}export const datasetDefinitions=[datasetList,datasetDetail];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a19_0x2980(_0x1e2c31,_0x625d12){_0x1e2c31=_0x1e2c31-0x1cc;const _0x3873f0=a19_0x3873();let _0x29807f=_0x3873f0[_0x1e2c31];return _0x29807f;}const a19_0x13fa8c=a19_0x2980;(function(_0x3a424b,_0x5a8740){const _0x250609=a19_0x2980,_0x1c95cc=_0x3a424b();while(!![]){try{const _0x54a1f4=-parseInt(_0x250609(0x1d0))/0x1+-parseInt(_0x250609(0x1cc))/0x2+-parseInt(_0x250609(0x1ce))/0x3+parseInt(_0x250609(0x1e4))/0x4*(-parseInt(_0x250609(0x1e2))/0x5)+parseInt(_0x250609(0x1da))/0x6+-parseInt(_0x250609(0x1de))/0x7+parseInt(_0x250609(0x1d5))/0x8;if(_0x54a1f4===_0x5a8740)break;else _0x1c95cc['push'](_0x1c95cc['shift']());}catch(_0x5dc9cf){_0x1c95cc['push'](_0x1c95cc['shift']());}}}(a19_0x3873,0xd4b93));import{listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';export const datasetList={'service':a19_0x13fa8c(0x1d2),'command':a19_0x13fa8c(0x1d9),'description':a19_0x13fa8c(0x1df),'risk':a19_0x13fa8c(0x1e5),'flags':[{'name':a19_0x13fa8c(0x1d6),'type':'string','description':'Filter\x20by\x20dataset\x20name\x20(server-side\x20fuzzy\x20match)'},{...CODE_FLAG,'required':![],'description':a19_0x13fa8c(0x1e0)}],async 'execute'(_0x193b37){const _0x5aba1c=a19_0x13fa8c,_0x55ba75=_0x193b37[_0x5aba1c(0x1d3)](_0x5aba1c(0x1d6)),_0x53958c=_0x193b37[_0x5aba1c(0x1d3)](_0x5aba1c(0x1cd)),_0x34f2e4=await listDatasets(_0x193b37[_0x5aba1c(0x1d7)],{..._0x55ba75&&{'name':_0x55ba75},..._0x53958c&&{'code':_0x53958c}});return{'ok':!![],'data':{'total':_0x34f2e4[_0x5aba1c(0x1db)],'datasets':_0x34f2e4[_0x5aba1c(0x1e1)](_0x19c814=>{const _0x31041d=_0x5aba1c,_0x30ee20=_0x19c814[_0x31041d(0x1d4)]??{};return{'id':_0x19c814['id'],'code':_0x19c814['code'],'name':_0x19c814['name'],'source':_0x19c814[_0x31041d(0x1dc)],'description':_0x19c814['description'],'table':_0x30ee20[_0x31041d(0x1dd)],'datasetKey':_0x30ee20[_0x31041d(0x1e3)],'pk':_0x30ee20[_0x31041d(0x1cf)],'fields':_0x30ee20[_0x31041d(0x1d1)]?_0x30ee20[_0x31041d(0x1d1)]['split'](',')[_0x31041d(0x1e1)](_0x27baa4=>_0x27baa4[_0x31041d(0x1d8)]()):[]};})}};}};function a19_0x3873(){const _0x1d0e85=['dbtableConfig','46010688JwZDuD','name','appCode','trim','list','3898974iHbPeu','length','source','tableName','9189761xZgTlx','List\x20datasets\x20in\x20the\x20app\x20(supports\x20server-side\x20name/code\x20filtering)','Filter\x20by\x20dataset\x20code\x20(server-side\x20exact\x20match)','map','4618070QhSrVv','datasetKey','4RKcWgJ','read','734032huqrZB','code','4426854jfbCSu','pkField','1450779qgDoPr','allFields','dataset','str'];a19_0x3873=function(){return _0x1d0e85;};return a19_0x3873();}
|
package/lib/commands/doctor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a20_0x16df11=a20_0x1a3d;(function(_0x31ddb8,_0x5e3ff4){const _0x4f2c3f=a20_0x1a3d,_0x4d7a62=_0x31ddb8();while(!![]){try{const _0xde1a13=parseInt(_0x4f2c3f(0xf0))/0x1*(-parseInt(_0x4f2c3f(0xea))/0x2)+-parseInt(_0x4f2c3f(0xbe))/0x3+parseInt(_0x4f2c3f(0xc9))/0x4+-parseInt(_0x4f2c3f(0xcc))/0x5+-parseInt(_0x4f2c3f(0xee))/0x6*(parseInt(_0x4f2c3f(0xef))/0x7)+-parseInt(_0x4f2c3f(0xd1))/0x8+-parseInt(_0x4f2c3f(0xc7))/0x9*(-parseInt(_0x4f2c3f(0xb5))/0xa);if(_0xde1a13===_0x5e3ff4)break;else _0x4d7a62['push'](_0x4d7a62['shift']());}catch(_0x2f30f2){_0x4d7a62['push'](_0x4d7a62['shift']());}}}(a20_0x417a,0xaa752));function a20_0x1a3d(_0x1d0917,_0x3a8878){_0x1d0917=_0x1d0917-0xad;const _0x417a21=a20_0x417a();let _0x1a3db4=_0x417a21[_0x1d0917];return _0x1a3db4;}import a20_0xe1b0f6 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';function a20_0x417a(){const _0x2dbd8f=['Project','empty','10975016SptuWi','(missing)','appCode','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','\x20\x20API\x20Endpoints','locale','\x20\x20auth\x20(effective):\x20','status','✗\x20Invalid\x20JSON','padEnd','\x20\x20Session\x20check:\x20\x20\x20','format','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(default)','platform','gray','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(no\x20file)','red','doctor','log','accessKey','arch','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','6HAiEUh','\x20\x20Config\x20JSON','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','defaultApp','7296updYSc','2604gOBgGT','102227gnBMdf','riskLevel','✓\x20Valid\x20JSON','(none)','(removed\x20—\x20cookie\x20auth\x20disabled)','\x20\x20Merged\x20Config','repeat','\x20(legacy/compat\x20only)','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','env','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','green','30ikkArS','length','pageSize','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','\x20\x20Auth','missing','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','bold','verbose','3416376lxsfRu','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','Global','ClientAk','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20─','\x20(accessKey)','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','12047868KOulmb','\x20\x20Config\x20Files','916948DYmBoY','\x20doctor','check','1386485BEFvVn','version','Diagnose\x20CLI\x20configuration\x20and\x20environment'];a20_0x417a=function(){return _0x2dbd8f;};return a20_0x417a();}import{AUTH_MODE}from'../constant/auth-mode.js';import{isLegacyCompatConfigKey}from'../config/schema.js';async function execute(_0x24aab5){const _0x2d1cf7=a20_0x1a3d,_0x2815c3=getCliVersion(),_0x1747e2=buildConfigFromFlags({});await initGlobalEnvironment(_0x1747e2),console['log'](),console['log'](a20_0xe1b0f6['bold'](CLI_BIN_NAME+_0x2d1cf7(0xca))),console[_0x2d1cf7(0xe5)](a20_0xe1b0f6[_0x2d1cf7(0xe0)]('─'[_0x2d1cf7(0xaf)](0x32))),console[_0x2d1cf7(0xe5)](_0x2d1cf7(0xd4)+_0x2815c3),console[_0x2d1cf7(0xe5)](_0x2d1cf7(0xc3)+process[_0x2d1cf7(0xcd)]),console[_0x2d1cf7(0xe5)](_0x2d1cf7(0xb1)+process[_0x2d1cf7(0xdf)]+'\x20'+process[_0x2d1cf7(0xe7)]),console[_0x2d1cf7(0xe5)](),console[_0x2d1cf7(0xe5)](a20_0xe1b0f6[_0x2d1cf7(0xbc)](_0x2d1cf7(0xc8))),console['log'](a20_0xe1b0f6['gray'](_0x2d1cf7(0xc4)['repeat'](0x1e)));const _0x41054f=getGlobalConfigPath(),_0x32c997=getProjectConfigPath();console['log'](_0x2d1cf7(0xbb)+(_0x41054f||a20_0xe1b0f6[_0x2d1cf7(0xe0)]('(not\x20found)'))),console[_0x2d1cf7(0xe5)](_0x2d1cf7(0xb3)+(_0x32c997||a20_0xe1b0f6[_0x2d1cf7(0xe0)]('(not\x20found)'))),console[_0x2d1cf7(0xe5)](),console['log'](a20_0xe1b0f6['bold'](_0x2d1cf7(0xeb))),console[_0x2d1cf7(0xe5)](a20_0xe1b0f6['gray'](_0x2d1cf7(0xc4)[_0x2d1cf7(0xaf)](0x1e)));const _0x5515cb=(_0x444932,_0x12650c)=>{const _0x52f317=_0x2d1cf7;if(!_0x12650c){console[_0x52f317(0xe5)]('\x20\x20'+_0x444932[_0x52f317(0xda)](0x11)+'\x20'+a20_0xe1b0f6[_0x52f317(0xe0)](_0x52f317(0xe2)));return;}const _0x211f6e=inspectCliConfigJsonFile(_0x12650c);if(_0x211f6e[_0x52f317(0xd8)]==='ok')console[_0x52f317(0xe5)]('\x20\x20'+_0x444932['padEnd'](0x11)+'\x20'+a20_0xe1b0f6[_0x52f317(0xb4)](_0x52f317(0xf2)));else{if(_0x211f6e[_0x52f317(0xd8)]===_0x52f317(0xd0))console[_0x52f317(0xe5)]('\x20\x20'+_0x444932[_0x52f317(0xda)](0x11)+'\x20'+a20_0xe1b0f6['yellow']('⚠\x20Empty\x20(treated\x20as\x20{})'));else _0x211f6e[_0x52f317(0xd8)]===_0x52f317(0xba)?console[_0x52f317(0xe5)]('\x20\x20'+_0x444932[_0x52f317(0xda)](0x11)+'\x20'+a20_0xe1b0f6[_0x52f317(0xe0)](_0x52f317(0xd2))):(console['log']('\x20\x20'+_0x444932[_0x52f317(0xda)](0x11)+'\x20'+a20_0xe1b0f6[_0x52f317(0xe3)](_0x52f317(0xd9))),console[_0x52f317(0xe5)]('\x20\x20'+''[_0x52f317(0xda)](0x11)+'\x20'+a20_0xe1b0f6[_0x52f317(0xe3)](_0x211f6e['message'])));}};_0x5515cb(_0x2d1cf7(0xc0),_0x41054f),_0x5515cb(_0x2d1cf7(0xcf),_0x32c997),console[_0x2d1cf7(0xe5)](),console[_0x2d1cf7(0xe5)](a20_0xe1b0f6['bold'](_0x2d1cf7(0xae))),console[_0x2d1cf7(0xe5)](a20_0xe1b0f6[_0x2d1cf7(0xe0)](_0x2d1cf7(0xc4)['repeat'](0x1e))),console['log'](_0x2d1cf7(0xec)+(_0x1747e2[_0x2d1cf7(0xd3)]||a20_0xe1b0f6[_0x2d1cf7(0xe3)]('(not\x20set)'))),console['log'](_0x2d1cf7(0xdd)+_0x1747e2[_0x2d1cf7(0xb2)]);const _0x363b4a=isLegacyCompatConfigKey(_0x2d1cf7(0xd6))?a20_0xe1b0f6[_0x2d1cf7(0xe0)](_0x1747e2[_0x2d1cf7(0xd6)]+_0x2d1cf7(0xb0)):_0x1747e2[_0x2d1cf7(0xd6)];return console['log'](_0x2d1cf7(0xe1)+_0x363b4a),console[_0x2d1cf7(0xe5)](_0x2d1cf7(0xb8)+(_0x1747e2[_0x2d1cf7(0xed)]||a20_0xe1b0f6[_0x2d1cf7(0xe0)](_0x2d1cf7(0xf3)))),console[_0x2d1cf7(0xe5)]('\x20\x20currentApp:\x20\x20\x20\x20\x20\x20'+(_0x1747e2['currentApp']||a20_0xe1b0f6['gray'](_0x2d1cf7(0xf3)))),console[_0x2d1cf7(0xe5)]('\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x1747e2[_0x2d1cf7(0xdc)]||a20_0xe1b0f6[_0x2d1cf7(0xe0)]('(default:\x20'+DEFAULT_CONFIG_VALUES[_0x2d1cf7(0xdc)]+')'))),console[_0x2d1cf7(0xe5)](_0x2d1cf7(0xe9)+(_0x1747e2[_0x2d1cf7(0xb7)]??a20_0xe1b0f6[_0x2d1cf7(0xe0)](_0x2d1cf7(0xde)))),console[_0x2d1cf7(0xe5)](_0x2d1cf7(0xbf)+_0x1747e2[_0x2d1cf7(0xf1)]),console[_0x2d1cf7(0xe5)]('\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1747e2[_0x2d1cf7(0xbd)]),console[_0x2d1cf7(0xe5)](_0x2d1cf7(0xd7)+AUTH_MODE[_0x2d1cf7(0xc1)]),console[_0x2d1cf7(0xe5)](_0x2d1cf7(0xe8)+(_0x1747e2['accessKey']?a20_0xe1b0f6[_0x2d1cf7(0xb4)]('(set,\x20length='+_0x1747e2[_0x2d1cf7(0xe6)][_0x2d1cf7(0xb6)]+')'):a20_0xe1b0f6[_0x2d1cf7(0xe0)]('(none)'))),console[_0x2d1cf7(0xe5)](),console[_0x2d1cf7(0xe5)](a20_0xe1b0f6[_0x2d1cf7(0xbc)](_0x2d1cf7(0xd5))),console[_0x2d1cf7(0xe5)](a20_0xe1b0f6[_0x2d1cf7(0xe0)](_0x2d1cf7(0xc4)[_0x2d1cf7(0xaf)](0x1e))),console[_0x2d1cf7(0xe5)](_0x2d1cf7(0xc6)+getApiDomain()),console[_0x2d1cf7(0xe5)]('\x20\x20userDomain:\x20\x20\x20\x20\x20\x20'+getUserDomain()),console['log']('\x20\x20runtimeDomain:\x20\x20\x20'+getRuntimeDomain()),console[_0x2d1cf7(0xe5)](),console[_0x2d1cf7(0xe5)](a20_0xe1b0f6[_0x2d1cf7(0xbc)](_0x2d1cf7(0xb9))),console[_0x2d1cf7(0xe5)](a20_0xe1b0f6[_0x2d1cf7(0xe0)]('\x20\x20─'[_0x2d1cf7(0xaf)](0x1e))),console[_0x2d1cf7(0xe5)](_0x2d1cf7(0xc2)+a20_0xe1b0f6['green'](AUTH_MODE[_0x2d1cf7(0xc1)]+_0x2d1cf7(0xc5))),console[_0x2d1cf7(0xe5)](_0x2d1cf7(0xdb)+a20_0xe1b0f6[_0x2d1cf7(0xe0)](_0x2d1cf7(0xad))),console[_0x2d1cf7(0xe5)](),{'ok':!![]};}export const doctorDefinition={'service':a20_0x16df11(0xe4),'command':a20_0x16df11(0xcb),'description':a20_0x16df11(0xce),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
package/lib/commands/init.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a22_0x368ec7=a22_0xd289;(function(_0x5af9e0,_0x7f2a71){const _0x4d898b=a22_0xd289,_0x5469da=_0x5af9e0();while(!![]){try{const _0x2d79c8=-parseInt(_0x4d898b(0x186))/0x1*(-parseInt(_0x4d898b(0x1c0))/0x2)+parseInt(_0x4d898b(0x1b8))/0x3+parseInt(_0x4d898b(0x1aa))/0x4+-parseInt(_0x4d898b(0x195))/0x5*(-parseInt(_0x4d898b(0x19a))/0x6)+parseInt(_0x4d898b(0x1ad))/0x7+-parseInt(_0x4d898b(0x19c))/0x8*(parseInt(_0x4d898b(0x18a))/0x9)+-parseInt(_0x4d898b(0x1c7))/0xa;if(_0x2d79c8===_0x7f2a71)break;else _0x5469da['push'](_0x5469da['shift']());}catch(_0x5d6c2a){_0x5469da['push'](_0x5469da['shift']());}}}(a22_0x2e4e,0xd8d11));function a22_0x2e4e(){const _0x29742e=['object','apps','\x20\x20env:\x20\x20\x20\x20\x20','\x0aInitialized\x20','join','Failed\x20to\x20parse\x20source\x20file:\x20','validation','main','\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]','Usage:\x20','160dDccSc','trim','appcode','Specify\x20one\x20with\x20--appcode\x20<code>.','removeListener','42468qPfqYD','[y/N]','392NqhwkA','close','apiDir','\x20\x20config:\x20\x20','Initialized\x20','toLowerCase','once','\x20\x20apps:\x20\x20\x20\x20','length','keys','boolean','race','project','riskLevel','4987884bLZtDu','\x20\x20appcode:\x20','defaultApp','729673DhpBVf','cwd','App\x20code','Aborted.','User\x20aborted\x20prompt','Skip\x20confirmation\x20when\x20overwriting','AbortPrompt','App\x20code\x20for\x20the\x20project','parse','Invalid\x20env\x20\x22','message','1808862dvslut','file','app','env','stdout','utf8','yes','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','14972UPVhku','cancelled','log','Source\x20file\x20not\x20found:\x20','entries','Override\x20imported\x20default\x20appcode','global','7108400gqmOSc','includes','Use\x20upgraded\x20.rabetbase.json\x20with\x20apps/defaultApp,\x20then\x20run:\x20lovrabet\x20app\x20import\x20--file\x20<path>','\x20\x20app:\x20\x20\x20\x20\x20','File\x20','string','stdin','1WByJGz','\x20init\x20—\x20Create\x20.lovrabet.json\x0a','SIGINT','Imported\x20from\x20','108225dqpphN'];a22_0x2e4e=function(){return _0x29742e;};return a22_0x2e4e();}import{existsSync,readFileSync}from'node:fs';import{resolve,isAbsolute}from'node:path';import{createInterface}from'node:readline';import{CliErrors}from'../errors.js';import{DEFAULT_APP_PROFILE_NAME,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';export const initCreateFlagDefs=[{'name':'appcode','type':a22_0x368ec7(0x184),'description':a22_0x368ec7(0x1b4)},{'name':a22_0x368ec7(0x1bb),'type':a22_0x368ec7(0x184),'description':'Target\x20environment\x20(default\x20'+DEFAULT_CONFIG_VALUES['env']+')','enum':[...RUNTIME_ENV_VALUES]},{'name':a22_0x368ec7(0x1c6),'type':a22_0x368ec7(0x1a6),'description':'Write\x20to\x20global\x20(~/.lovrabet.json)\x20instead\x20of\x20project','default':![]},{'name':'yes','type':a22_0x368ec7(0x1a6),'description':a22_0x368ec7(0x1b2),'default':![]}];export const initImportFlagDefs=[{'name':a22_0x368ec7(0x1b9),'type':a22_0x368ec7(0x184),'description':a22_0x368ec7(0x1bf),'required':!![]},{'name':a22_0x368ec7(0x197),'type':a22_0x368ec7(0x184),'description':a22_0x368ec7(0x1c5)},{'name':a22_0x368ec7(0x1bb),'type':a22_0x368ec7(0x184),'description':'Override\x20imported\x20default\x20env','enum':[...RUNTIME_ENV_VALUES]},{'name':a22_0x368ec7(0x1c6),'type':a22_0x368ec7(0x1a6),'description':'Write\x20to\x20global\x20(~/.lovrabet.json)\x20instead\x20of\x20project','default':![]},{'name':a22_0x368ec7(0x1be),'type':a22_0x368ec7(0x1a6),'description':a22_0x368ec7(0x1b2),'default':![]}];export async function runInit(_0x1a334c){const _0x4edd95=a22_0x368ec7,_0x5bbc71=isNonInteractiveMode(_0x1a334c),_0x2a8d66=_0x1a334c['global']?'global':_0x4edd95(0x1a8),_0xbec28a=resolveWriteConfigPath(_0x2a8d66);try{_0x5bbc71?await runNonInteractive(_0x1a334c,_0xbec28a):await runInteractive(_0x1a334c,_0xbec28a);}catch(_0xccb7c2){if(_0xccb7c2 instanceof AbortPrompt)throw CliErrors[_0x4edd95(0x1c1)]();throw _0xccb7c2;}}export async function runInitImport(_0x335db9){const _0x587de2=a22_0x368ec7,_0x5bde1b=_0x335db9[_0x587de2(0x1c6)]?_0x587de2(0x1c6):_0x587de2(0x1a8),_0x1e63ca=resolveWriteConfigPath(_0x5bde1b);await runFromImport(_0x335db9,_0x1e63ca);}const RUNTIME_IRRELEVANT_KEYS=new Set([a22_0x368ec7(0x19e)]);async function runFromImport(_0x4c6f65,_0xe32c3f){const _0x2531a8=a22_0x368ec7,_0xf62e2c=resolveFilePath(_0x4c6f65['file']);if(!existsSync(_0xf62e2c))throw CliErrors[_0x2531a8(0x191)](_0x2531a8(0x1c3)+_0xf62e2c);const _0x44742e=readSourceFile(_0xf62e2c),_0x1f49b2=convertToRuntimeConfig(_0x44742e);if(_0x4c6f65[_0x2531a8(0x197)]){if(!_0x1f49b2['apps']||Object[_0x2531a8(0x1a5)](_0x1f49b2['apps'])[_0x2531a8(0x1a4)]===0x0)_0x1f49b2['apps']={'main':{'appcode':_0x4c6f65[_0x2531a8(0x197)]}},_0x1f49b2['defaultApp']=_0x2531a8(0x192);else{const _0x57d56c=_0x1f49b2['defaultApp']&&_0x1f49b2['apps'][_0x1f49b2[_0x2531a8(0x1ac)]]?_0x1f49b2[_0x2531a8(0x1ac)]:Object[_0x2531a8(0x1a5)](_0x1f49b2[_0x2531a8(0x18c)])[0x0],_0xd389ca=_0x57d56c||_0x2531a8(0x192);_0x1f49b2[_0x2531a8(0x18c)][_0xd389ca]={..._0x1f49b2['apps'][_0xd389ca]||{},'appcode':_0x4c6f65[_0x2531a8(0x197)]},_0x1f49b2[_0x2531a8(0x1ac)]=_0x1f49b2[_0x2531a8(0x1ac)]||_0xd389ca;}}if(_0x4c6f65[_0x2531a8(0x1bb)]){const _0x5e329f=resolveInitEnv(_0x4c6f65);if(!_0x1f49b2[_0x2531a8(0x18c)]||Object[_0x2531a8(0x1a5)](_0x1f49b2[_0x2531a8(0x18c)])['length']===0x0)_0x1f49b2[_0x2531a8(0x18c)]={'main':{'appcode':'','env':_0x5e329f}},_0x1f49b2[_0x2531a8(0x1ac)]=_0x2531a8(0x192);else{const _0x12a5b4=_0x1f49b2['defaultApp']&&_0x1f49b2['apps'][_0x1f49b2[_0x2531a8(0x1ac)]]?_0x1f49b2[_0x2531a8(0x1ac)]:Object[_0x2531a8(0x1a5)](_0x1f49b2[_0x2531a8(0x18c)])[0x0],_0x1ce676=_0x12a5b4||'main';_0x1f49b2['apps'][_0x1ce676]={..._0x1f49b2['apps'][_0x1ce676]||{},'env':_0x5e329f},_0x1f49b2['defaultApp']=_0x1f49b2[_0x2531a8(0x1ac)]||_0x1ce676;}}if(!_0x1f49b2['apps']||Object[_0x2531a8(0x1a5)](_0x1f49b2['apps'])['length']===0x0)throw CliErrors[_0x2531a8(0x191)]('Source\x20file\x20does\x20not\x20contain\x20any\x20app\x20profile.',_0x2531a8(0x1c9));const _0x5ca499=Object['values'](_0x1f49b2[_0x2531a8(0x18c)])['some'](_0x405a01=>_0x405a01?.[_0x2531a8(0x197)]);if(!_0x5ca499)throw CliErrors[_0x2531a8(0x191)]('Imported\x20app\x20profiles\x20do\x20not\x20contain\x20appcode.',_0x2531a8(0x198));await writeInitConfig(_0xe32c3f,_0x1f49b2,_0x4c6f65),console['log'](_0x2531a8(0x189)+_0xf62e2c),console[_0x2531a8(0x1c2)](_0x2531a8(0x19f)+_0xe32c3f),_0x1f49b2[_0x2531a8(0x18c)]&&Object[_0x2531a8(0x1a5)](_0x1f49b2[_0x2531a8(0x18c)])[_0x2531a8(0x1a4)]>0x0&&console[_0x2531a8(0x1c2)](_0x2531a8(0x1a3)+Object[_0x2531a8(0x1a5)](_0x1f49b2[_0x2531a8(0x18c)])[_0x2531a8(0x18f)](',\x20'));}function convertToRuntimeConfig(_0x38172e){const _0x587660=a22_0x368ec7,_0x398d79={};for(const _0x13ee97 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x38172e[_0x13ee97]!==undefined&&(_0x398d79[_0x13ee97]=_0x38172e[_0x13ee97]);}!_0x398d79[_0x587660(0x1a9)]&&(_0x398d79['riskLevel']=DEFAULT_CONFIG_VALUES[_0x587660(0x1a9)]);if(_0x38172e[_0x587660(0x18c)]&&typeof _0x38172e[_0x587660(0x18c)]===_0x587660(0x18b)){_0x398d79[_0x587660(0x18c)]={};for(const [_0xf97c12,_0x1b9b05]of Object['entries'](_0x38172e[_0x587660(0x18c)])){_0x1b9b05&&typeof _0x1b9b05===_0x587660(0x18b)&&(_0x398d79[_0x587660(0x18c)][_0xf97c12]=filterRuntimeProfile(_0x1b9b05));}_0x38172e[_0x587660(0x1ac)]&&(_0x398d79[_0x587660(0x1ac)]=_0x38172e[_0x587660(0x1ac)]);}return _0x398d79;}function filterRuntimeProfile(_0x5d9dc9){const _0xa62465=a22_0x368ec7,_0x5a0700={};for(const _0x3cc5a1 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x5d9dc9[_0x3cc5a1]!==undefined&&(_0x5a0700[_0x3cc5a1]=_0x5d9dc9[_0x3cc5a1]);}return!_0x5a0700['appcode']&&_0x5d9dc9[_0xa62465(0x197)]&&(_0x5a0700['appcode']=String(_0x5d9dc9[_0xa62465(0x197)])),!_0x5a0700[_0xa62465(0x1a9)]&&(_0x5a0700[_0xa62465(0x1a9)]=DEFAULT_CONFIG_VALUES[_0xa62465(0x1a9)]),_0x5a0700;}async function runNonInteractive(_0x3ff458,_0x5f2e12){const _0x5c53bf=a22_0x368ec7,_0x373862=_0x3ff458[_0x5c53bf(0x197)];if(!_0x373862)throw CliErrors['flagMissing'](_0x5c53bf(0x197),_0x5c53bf(0x194)+CLI_BIN_NAME+_0x5c53bf(0x193));const _0x178311=resolveInitEnv(_0x3ff458);await writeInitConfig(_0x5f2e12,{'apps':{[DEFAULT_APP_PROFILE_NAME]:{'appcode':_0x373862,'env':_0x178311}},'defaultApp':DEFAULT_APP_PROFILE_NAME},_0x3ff458),console['log'](_0x5c53bf(0x1a0)+_0x5f2e12),console[_0x5c53bf(0x1c2)](_0x5c53bf(0x1ca)+DEFAULT_APP_PROFILE_NAME),console['log']('\x20\x20appcode:\x20'+_0x373862),console[_0x5c53bf(0x1c2)](_0x5c53bf(0x18d)+_0x178311);}async function runInteractive(_0x5c0813,_0x33abd9){const _0x3b2741=a22_0x368ec7,_0x500896=loadExisting(_0x33abd9),_0x248d50=_0x500896?.[_0x3b2741(0x18c)]&&typeof _0x500896[_0x3b2741(0x18c)]===_0x3b2741(0x18b)?_0x500896[_0x3b2741(0x18c)]:{},_0x356707=_0x500896?.[_0x3b2741(0x1ac)]&&_0x248d50[_0x500896[_0x3b2741(0x1ac)]]?_0x500896[_0x3b2741(0x1ac)]:Object[_0x3b2741(0x1a5)](_0x248d50)[0x0],_0x5a0ea9=_0x356707?_0x248d50[_0x356707]?.[_0x3b2741(0x197)]||'':'',_0x5b03a4=resolveInitEnv(_0x5c0813);console[_0x3b2741(0x1c2)](CLI_BIN_NAME+_0x3b2741(0x187));if(existsSync(_0x33abd9)&&!_0x5c0813['yes']){const _0x5a0969=await promptYesNo(_0x3b2741(0x183)+_0x33abd9+'\x20already\x20exists.\x20Overwrite?',![]);if(!_0x5a0969){console['log'](_0x3b2741(0x1b0));return;}}const _0x2c7212=typeof _0x5c0813['appcode']===_0x3b2741(0x184)?_0x5c0813[_0x3b2741(0x197)][_0x3b2741(0x196)]():'';let _0x162480=_0x2c7212;!_0x162480&&(_0x162480=await promptInput(_0x3b2741(0x1af),_0x5a0ea9));if(!_0x162480[_0x3b2741(0x196)]())throw CliErrors[_0x3b2741(0x191)]('App\x20code\x20cannot\x20be\x20empty.');await writeInitConfig(_0x33abd9,{'apps':{[_0x356707||DEFAULT_APP_PROFILE_NAME]:{'appcode':_0x162480[_0x3b2741(0x196)](),'env':_0x5b03a4}},'defaultApp':_0x356707||DEFAULT_APP_PROFILE_NAME},_0x5c0813),console[_0x3b2741(0x1c2)](_0x3b2741(0x18e)+_0x33abd9),console[_0x3b2741(0x1c2)]('\x20\x20app:\x20\x20\x20\x20\x20'+(_0x356707||DEFAULT_APP_PROFILE_NAME)),console[_0x3b2741(0x1c2)](_0x3b2741(0x1ab)+_0x162480[_0x3b2741(0x196)]()),console[_0x3b2741(0x1c2)](_0x3b2741(0x18d)+_0x5b03a4);}async function writeInitConfig(_0x4c71ff,_0x2f4549,_0x51a4a9){const _0x127531=a22_0x368ec7;let _0x3026ca={};existsSync(_0x4c71ff)&&!_0x51a4a9[_0x127531(0x1be)]&&(_0x3026ca=readConfigFile(_0x4c71ff));for(const [_0x5208cd,_0x4d35de]of Object[_0x127531(0x1c4)](_0x2f4549)){_0x4d35de!==undefined&&(_0x3026ca[_0x5208cd]=_0x4d35de);}(_0x3026ca[_0x127531(0x197)]||_0x3026ca[_0x127531(0x1ba)])&&(delete _0x3026ca['appcode'],delete _0x3026ca[_0x127531(0x1ba)]),writeConfigFile(_0x4c71ff,_0x3026ca);}class AbortPrompt extends Error{constructor(){const _0xd34c51=a22_0x368ec7;super(_0xd34c51(0x1b1)),this['name']=_0xd34c51(0x1b3);}}function createSafeRl(){const _0x13c130=a22_0x368ec7,_0x27aa29=createInterface({'input':process[_0x13c130(0x185)],'output':process[_0x13c130(0x1bc)]});let _0x4b31ac;const _0x4a1a56=new Promise((_0x3ba34a,_0x21b972)=>{const _0x36d1dc=_0x13c130;_0x4b31ac=()=>{const _0x1ffa6f=a22_0xd289;_0x4b31ac&&(_0x27aa29['removeListener'](_0x1ffa6f(0x188),_0x4b31ac),_0x4b31ac=undefined);try{_0x27aa29[_0x1ffa6f(0x19d)]();}catch{}_0x21b972(new AbortPrompt());},_0x27aa29[_0x36d1dc(0x1a2)](_0x36d1dc(0x188),_0x4b31ac);}),_0x3c7cfc=()=>{const _0x5c3d70=_0x13c130;_0x4b31ac&&(_0x27aa29[_0x5c3d70(0x199)](_0x5c3d70(0x188),_0x4b31ac),_0x4b31ac=undefined);try{_0x27aa29[_0x5c3d70(0x19d)]();}catch{}};return{'rl':_0x27aa29,'abortPromise':_0x4a1a56,'disposeSuccess':_0x3c7cfc};}async function promptInput(_0x1e3173,_0x5d4f65){const {rl:_0x467554,abortPromise:_0x1ec747,disposeSuccess:_0x5cf85d}=createSafeRl(),_0xacd1b4=new Promise(_0x5e11a7=>{const _0x33f206=_0x5d4f65?'\x20\x20'+_0x1e3173+'\x20('+_0x5d4f65+'):\x20':'\x20\x20'+_0x1e3173+':\x20';_0x467554['question'](_0x33f206,_0x57a9e0=>{const _0x4e3eaf=a22_0xd289;_0x5cf85d(),_0x5e11a7(_0x57a9e0[_0x4e3eaf(0x196)]()||_0x5d4f65);});});return Promise['race']([_0xacd1b4,_0x1ec747]);}async function promptYesNo(_0x39b100,_0x163406){const _0x2b2781=a22_0x368ec7,{rl:_0x35c4ab,abortPromise:_0x46aaf4,disposeSuccess:_0x35f373}=createSafeRl(),_0x287aee=new Promise(_0xb39ae9=>{const _0x5dc368=a22_0xd289,_0x2923aa=_0x163406?'[Y/n]':_0x5dc368(0x19b);_0x35c4ab['question']('\x20\x20'+_0x39b100+'\x20'+_0x2923aa+':\x20',_0x3c929c=>{const _0x3c07f4=_0x5dc368;_0x35f373();const _0x205d6e=_0x3c929c[_0x3c07f4(0x196)]()[_0x3c07f4(0x1a1)]();if(_0x205d6e==='y'||_0x205d6e===_0x3c07f4(0x1be))_0xb39ae9(!![]);else{if(_0x205d6e==='n'||_0x205d6e==='no')_0xb39ae9(![]);else _0xb39ae9(_0x163406);}});});return Promise[_0x2b2781(0x1a7)]([_0x287aee,_0x46aaf4]);}function loadExisting(_0x45c01b){if(!existsSync(_0x45c01b))return null;return readConfigFile(_0x45c01b);}function resolveFilePath(_0x25aed4){const _0xe29e8c=a22_0x368ec7;return isAbsolute(_0x25aed4)?_0x25aed4:resolve(process[_0xe29e8c(0x1ae)](),_0x25aed4);}function a22_0xd289(_0x276e30,_0x24ec8e){_0x276e30=_0x276e30-0x183;const _0x2e4e59=a22_0x2e4e();let _0xd289bc=_0x2e4e59[_0x276e30];return _0xd289bc;}function readSourceFile(_0x35e9b9){const _0x1adf6a=a22_0x368ec7;try{const _0x5ca074=readFileSync(_0x35e9b9,{'encoding':_0x1adf6a(0x1bd)});return JSON[_0x1adf6a(0x1b5)](_0x5ca074);}catch(_0x15b157){throw CliErrors[_0x1adf6a(0x191)](_0x1adf6a(0x190)+_0x15b157[_0x1adf6a(0x1b7)]);}}function resolveInitEnv(_0x3d6130){const _0x2e80c2=a22_0x368ec7,_0x1ee65b=_0x3d6130[_0x2e80c2(0x1bb)];if(_0x1ee65b===undefined||_0x1ee65b==='')return DEFAULT_CONFIG_VALUES[_0x2e80c2(0x1bb)];if(!RUNTIME_ENV_VALUES[_0x2e80c2(0x1c8)](_0x1ee65b))throw CliErrors['validation'](_0x2e80c2(0x1b6)+_0x1ee65b+'\x22.\x20Allowed:\x20'+RUNTIME_ENV_VALUES['join'](',\x20'));return _0x1ee65b;}
|
|
1
|
+
const a21_0x2aead4=a21_0xa671;function a21_0xa671(_0x48d474,_0x2e354d){_0x48d474=_0x48d474-0xc6;const _0x2b7c63=a21_0x2b7c();let _0xa671c6=_0x2b7c63[_0x48d474];return _0xa671c6;}(function(_0x22621b,_0x51c5b6){const _0x12d058=a21_0xa671,_0x6de081=_0x22621b();while(!![]){try{const _0x267df6=-parseInt(_0x12d058(0xd6))/0x1+parseInt(_0x12d058(0xef))/0x2+-parseInt(_0x12d058(0xf8))/0x3+parseInt(_0x12d058(0xd7))/0x4*(-parseInt(_0x12d058(0xf4))/0x5)+parseInt(_0x12d058(0xca))/0x6+parseInt(_0x12d058(0xcf))/0x7+-parseInt(_0x12d058(0xd0))/0x8;if(_0x267df6===_0x51c5b6)break;else _0x6de081['push'](_0x6de081['shift']());}catch(_0x503055){_0x6de081['push'](_0x6de081['shift']());}}}(a21_0x2b7c,0xd8ba6));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';export const initCreateFlagDefs=[{'name':a21_0x2aead4(0xd3),'type':a21_0x2aead4(0xeb),'description':a21_0x2aead4(0xda)},{'name':'env','type':a21_0x2aead4(0xeb),'description':a21_0x2aead4(0xc7)+DEFAULT_CONFIG_VALUES[a21_0x2aead4(0xf1)]+')','enum':[...RUNTIME_ENV_VALUES]},{'name':'global','type':a21_0x2aead4(0xe6),'description':a21_0x2aead4(0x107),'default':![]},{'name':'yes','type':a21_0x2aead4(0xe6),'description':a21_0x2aead4(0xff),'default':![]}];export const initImportFlagDefs=[{'name':'file','type':'string','description':a21_0x2aead4(0xd2),'required':!![]},{'name':'appcode','type':'string','description':a21_0x2aead4(0xde)},{'name':a21_0x2aead4(0xf1),'type':a21_0x2aead4(0xeb),'description':a21_0x2aead4(0x101),'enum':[...RUNTIME_ENV_VALUES]},{'name':'global','type':'boolean','description':a21_0x2aead4(0x107),'default':![]},{'name':a21_0x2aead4(0xcc),'type':a21_0x2aead4(0xe6),'description':a21_0x2aead4(0xff),'default':![]}];function a21_0x2b7c(){const _0x2187f1=['\x20\x20env:\x20\x20\x20\x20\x20','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','parse','trim','\x0aInitialized\x20','boolean','defaultApp','object','App\x20code','removeListener','string','\x20\x20default:\x20','):\x20','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','480022SVIgES','Aborted.','env','App\x20code\x20cannot\x20be\x20empty.','\x20\x20appcode:\x20','260twEmNu','Source\x20file\x20not\x20found:\x20','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','validation','391275YSxZcN','file','includes','\x22.\x20Allowed:\x20','Imported\x20from\x20','SIGINT','stdout','Skip\x20confirmation\x20when\x20overwriting','\x20\x20config:\x20\x20','Override\x20imported\x20default\x20env','File\x20','riskLevel','[Y/n]','name','Failed\x20to\x20parse\x20source\x20file:\x20','Write\x20to\x20global\x20(~/.lovrabet.json)\x20instead\x20of\x20project','app','cwd','join','message','Target\x20environment\x20(default\x20','race','apps','4048284DqUraH','global','yes','close','utf8','11687718FunHsH','967328riVWsI','AbortPrompt','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','appcode','Initialized\x20','log','180128gMsHhI','97324bpPlEJ','flagMissing','stdin','App\x20code\x20for\x20the\x20project','\x20already\x20exists.\x20Overwrite?','Invalid\x20env\x20\x22','project','Override\x20imported\x20default\x20appcode','question','apiDir'];a21_0x2b7c=function(){return _0x2187f1;};return a21_0x2b7c();}export async function runInit(_0xdcc915){const _0x59cbb5=a21_0x2aead4,_0x3fef37=isNonInteractiveMode(_0xdcc915),_0x426f38=_0xdcc915[_0x59cbb5(0xcb)]?'global':_0x59cbb5(0xdd),_0x4186f2=resolveWriteConfigPath(_0x426f38);try{_0x3fef37?await runNonInteractive(_0xdcc915,_0x4186f2):await runInteractive(_0xdcc915,_0x4186f2);}catch(_0x15bb23){if(_0x15bb23 instanceof AbortPrompt)throw CliErrors['cancelled']();throw _0x15bb23;}}export async function runInitImport(_0x3994ca){const _0x32211b=a21_0x2aead4,_0x5b2a7a=_0x3994ca[_0x32211b(0xcb)]?_0x32211b(0xcb):_0x32211b(0xdd),_0x42476b=resolveWriteConfigPath(_0x5b2a7a);await runFromImport(_0x3994ca,_0x42476b);}const RUNTIME_IRRELEVANT_KEYS=new Set([a21_0x2aead4(0xe0)]);async function runFromImport(_0x404847,_0x4ec8e3){const _0x28f273=a21_0x2aead4,_0x422e00=resolveFilePath(_0x404847[_0x28f273(0xf9)]);if(!existsSync(_0x422e00))throw CliErrors[_0x28f273(0xf7)](_0x28f273(0xf5)+_0x422e00);const _0x4d3a4e=readSourceFile(_0x422e00),_0x4abfdc=convertToRuntimeConfig(_0x4d3a4e);_0x404847[_0x28f273(0xd3)]&&(_0x4abfdc[_0x28f273(0xd3)]=String(_0x404847[_0x28f273(0xd3)]));_0x404847[_0x28f273(0xf1)]&&(_0x4abfdc[_0x28f273(0xf1)]=resolveInitEnv(_0x404847));if(!_0x4abfdc[_0x28f273(0xd3)])throw CliErrors[_0x28f273(0xf7)](_0x28f273(0xee),'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(_0x4ec8e3,_0x4abfdc,_0x404847),console['log'](_0x28f273(0xfc)+_0x422e00),console['log'](_0x28f273(0x100)+_0x4ec8e3),console[_0x28f273(0xd5)](_0x28f273(0xf3)+_0x4abfdc['appcode']);if(_0x4abfdc[_0x28f273(0xe7)])console['log'](_0x28f273(0xec)+_0x4abfdc[_0x28f273(0xe7)]);}function convertToRuntimeConfig(_0xe1830c){const _0x4a611e=a21_0x2aead4;if(_0xe1830c[_0x4a611e(0xc9)]&&typeof _0xe1830c[_0x4a611e(0xc9)]===_0x4a611e(0xe8))throw CliErrors[_0x4a611e(0xf7)](_0x4a611e(0xf6),_0x4a611e(0xe2));const _0x5040b6={};for(const _0x19cdd2 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0xe1830c[_0x19cdd2]!==undefined&&(_0x5040b6[_0x19cdd2]=_0xe1830c[_0x19cdd2]);}return!_0x5040b6[_0x4a611e(0x103)]&&(_0x5040b6[_0x4a611e(0x103)]=DEFAULT_CONFIG_VALUES['riskLevel']),_0x5040b6;}async function runNonInteractive(_0x453991,_0x57a687){const _0x141b15=a21_0x2aead4,_0x4abf7e=_0x453991[_0x141b15(0xd3)];if(!_0x4abf7e)throw CliErrors[_0x141b15(0xd8)](_0x141b15(0xd3),'Usage:\x20'+CLI_BIN_NAME+'\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]');const _0x5747fc=resolveInitEnv(_0x453991);await writeInitConfig(_0x57a687,{'appcode':_0x4abf7e,'env':_0x5747fc},_0x453991),console[_0x141b15(0xd5)](_0x141b15(0xd4)+_0x57a687),console[_0x141b15(0xd5)](_0x141b15(0xf3)+_0x4abf7e),console[_0x141b15(0xd5)](_0x141b15(0xe1)+_0x5747fc);}async function runInteractive(_0x3622e7,_0x1f7ad5){const _0xc587ec=a21_0x2aead4,_0x4fb60d=loadExisting(_0x1f7ad5),_0x3d4948=typeof _0x4fb60d?.[_0xc587ec(0xd3)]===_0xc587ec(0xeb)?_0x4fb60d['appcode']:'',_0x30bbec=resolveInitEnv(_0x3622e7);console[_0xc587ec(0xd5)](CLI_BIN_NAME+'\x20init\x20—\x20Create\x20.lovrabet.json\x0a');if(existsSync(_0x1f7ad5)&&!_0x3622e7[_0xc587ec(0xcc)]){const _0x14c080=await promptYesNo(_0xc587ec(0x102)+_0x1f7ad5+_0xc587ec(0xdb),![]);if(!_0x14c080){console[_0xc587ec(0xd5)](_0xc587ec(0xf0));return;}}const _0x5621e5=typeof _0x3622e7[_0xc587ec(0xd3)]===_0xc587ec(0xeb)?_0x3622e7[_0xc587ec(0xd3)][_0xc587ec(0xe4)]():'';let _0x2c4de6=_0x5621e5;!_0x2c4de6&&(_0x2c4de6=await promptInput(_0xc587ec(0xe9),_0x3d4948));if(!_0x2c4de6[_0xc587ec(0xe4)]())throw CliErrors[_0xc587ec(0xf7)](_0xc587ec(0xf2));await writeInitConfig(_0x1f7ad5,{'appcode':_0x2c4de6[_0xc587ec(0xe4)](),'env':_0x30bbec},_0x3622e7),console[_0xc587ec(0xd5)](_0xc587ec(0xe5)+_0x1f7ad5),console['log'](_0xc587ec(0xf3)+_0x2c4de6[_0xc587ec(0xe4)]()),console[_0xc587ec(0xd5)](_0xc587ec(0xe1)+_0x30bbec);}async function writeInitConfig(_0x45a657,_0x55cf73,_0x5cc900){const _0x3e737a=a21_0x2aead4;let _0xda9684={};existsSync(_0x45a657)&&!_0x5cc900['yes']&&(_0xda9684=readConfigFile(_0x45a657));for(const [_0x1b7223,_0x3dd42f]of Object['entries'](_0x55cf73)){_0x3dd42f!==undefined&&(_0xda9684[_0x1b7223]=_0x3dd42f);}if(_0xda9684[_0x3e737a(0x108)])delete _0xda9684[_0x3e737a(0x108)];writeConfigFile(_0x45a657,_0xda9684);}class AbortPrompt extends Error{constructor(){const _0x3afb69=a21_0x2aead4;super('User\x20aborted\x20prompt'),this[_0x3afb69(0x105)]=_0x3afb69(0xd1);}}function createSafeRl(){const _0x473896=a21_0x2aead4,_0x1083aa=createInterface({'input':process[_0x473896(0xd9)],'output':process[_0x473896(0xfe)]});let _0x47cdaa;const _0x2062f7=new Promise((_0xb4292d,_0xd01355)=>{const _0x4d11e5=_0x473896;_0x47cdaa=()=>{const _0x48e611=a21_0xa671;_0x47cdaa&&(_0x1083aa[_0x48e611(0xea)](_0x48e611(0xfd),_0x47cdaa),_0x47cdaa=undefined);try{_0x1083aa[_0x48e611(0xcd)]();}catch{}_0xd01355(new AbortPrompt());},_0x1083aa['once'](_0x4d11e5(0xfd),_0x47cdaa);}),_0x2ecd7f=()=>{const _0x4eb967=_0x473896;_0x47cdaa&&(_0x1083aa[_0x4eb967(0xea)](_0x4eb967(0xfd),_0x47cdaa),_0x47cdaa=undefined);try{_0x1083aa[_0x4eb967(0xcd)]();}catch{}};return{'rl':_0x1083aa,'abortPromise':_0x2062f7,'disposeSuccess':_0x2ecd7f};}async function promptInput(_0x55158f,_0x350045){const {rl:_0xd7397e,abortPromise:_0xa7c07e,disposeSuccess:_0x1aa4b9}=createSafeRl(),_0x3a9848=new Promise(_0x479851=>{const _0x1a47e2=a21_0xa671,_0x204497=_0x350045?'\x20\x20'+_0x55158f+'\x20('+_0x350045+_0x1a47e2(0xed):'\x20\x20'+_0x55158f+':\x20';_0xd7397e['question'](_0x204497,_0x38f0e5=>{_0x1aa4b9(),_0x479851(_0x38f0e5['trim']()||_0x350045);});});return Promise['race']([_0x3a9848,_0xa7c07e]);}async function promptYesNo(_0x2c0fc2,_0x2173a6){const _0x414993=a21_0x2aead4,{rl:_0x4b19a1,abortPromise:_0x4ccc02,disposeSuccess:_0x394d8a}=createSafeRl(),_0x6f4f9=new Promise(_0x29996b=>{const _0x1884f8=a21_0xa671,_0x541e0d=_0x2173a6?_0x1884f8(0x104):'[y/N]';_0x4b19a1[_0x1884f8(0xdf)]('\x20\x20'+_0x2c0fc2+'\x20'+_0x541e0d+':\x20',_0x54474e=>{const _0x3d14d0=_0x1884f8;_0x394d8a();const _0x391e9d=_0x54474e[_0x3d14d0(0xe4)]()['toLowerCase']();if(_0x391e9d==='y'||_0x391e9d===_0x3d14d0(0xcc))_0x29996b(!![]);else{if(_0x391e9d==='n'||_0x391e9d==='no')_0x29996b(![]);else _0x29996b(_0x2173a6);}});});return Promise[_0x414993(0xc8)]([_0x6f4f9,_0x4ccc02]);}function loadExisting(_0x3dd82e){if(!existsSync(_0x3dd82e))return null;return readConfigFile(_0x3dd82e);}function resolveFilePath(_0x201876){const _0x5d9126=a21_0x2aead4;return isAbsolute(_0x201876)?_0x201876:resolve(process[_0x5d9126(0x109)](),_0x201876);}function readSourceFile(_0x4bf0d0){const _0xa0908=a21_0x2aead4;try{const _0x2142b3=readFileSync(_0x4bf0d0,{'encoding':_0xa0908(0xce)});return JSON[_0xa0908(0xe3)](_0x2142b3);}catch(_0x563128){throw CliErrors[_0xa0908(0xf7)](_0xa0908(0x106)+_0x563128[_0xa0908(0xc6)]);}}function resolveInitEnv(_0x491e51){const _0x38bcbd=a21_0x2aead4,_0x545faf=_0x491e51[_0x38bcbd(0xf1)];if(_0x545faf===undefined||_0x545faf==='')return DEFAULT_CONFIG_VALUES[_0x38bcbd(0xf1)];if(!RUNTIME_ENV_VALUES[_0x38bcbd(0xfa)](_0x545faf))throw CliErrors[_0x38bcbd(0xf7)](_0x38bcbd(0xdc)+_0x545faf+_0x38bcbd(0xfb)+RUNTIME_ENV_VALUES[_0x38bcbd(0x10a)](',\x20'));return _0x545faf;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a22_0x2864(){const _0x597a96=['*\x20Logs\x20cleared','197104dELsMA','685183yKAKBM','command','*\x20Lovrabet\x20Runtime\x20CLI\x20logs:\x0a','details','24blhmsp','5372040IQlYGh','error','100TUXLbo','View\x20command\x20history\x20logs','1705725SHNcjj','2023486ObcPRu','level','\x20\x20\x20Time:\x20','36gTanSM','forEach','logs','duration','2075289FMCenk','write','724983FJLjpn','readLogs','length','timestamp','Clear\x20command\x20history\x20logs','log','stringify','read','clearLogs','success','clear'];a22_0x2864=function(){return _0x597a96;};return a22_0x2864();}const a22_0x1cd07d=a22_0x5263;(function(_0x118d72,_0x1f619e){const _0x389cdb=a22_0x5263,_0x24b830=_0x118d72();while(!![]){try{const _0x230af7=-parseInt(_0x389cdb(0x149))/0x1+parseInt(_0x389cdb(0x133))/0x2+parseInt(_0x389cdb(0x13a))/0x3+parseInt(_0x389cdb(0x148))/0x4*(-parseInt(_0x389cdb(0x130))/0x5)+parseInt(_0x389cdb(0x136))/0x6*(-parseInt(_0x389cdb(0x13c))/0x7)+-parseInt(_0x389cdb(0x12d))/0x8*(-parseInt(_0x389cdb(0x132))/0x9)+parseInt(_0x389cdb(0x12e))/0xa;if(_0x230af7===_0x1f619e)break;else _0x24b830['push'](_0x24b830['shift']());}catch(_0x8e4b29){_0x24b830['push'](_0x24b830['shift']());}}}(a22_0x2864,0x7e430));function a22_0x5263(_0x202310,_0x27bc5b){_0x202310=_0x202310-0x12c;const _0x286494=a22_0x2864();let _0x526393=_0x286494[_0x202310];return _0x526393;}import{logger}from'../../utils/logger.js';function printLogs(_0x2cf192){const _0x505f97=a22_0x5263;if(_0x2cf192[_0x505f97(0x13e)]===0x0){console[_0x505f97(0x141)]('*\x20No\x20logs\x20found');return;}console[_0x505f97(0x141)](_0x505f97(0x14b)),_0x2cf192[_0x505f97(0x137)]((_0x3de662,_0x3722cb)=>{const _0x48c41d=_0x505f97,_0x279d4f=new Date(_0x3de662[_0x48c41d(0x13f)])['toLocaleString']('en-US'),_0x2a6f0d=_0x3de662['level']===_0x48c41d(0x145)?'√':_0x3de662[_0x48c41d(0x134)]===_0x48c41d(0x12f)?'×':_0x3de662[_0x48c41d(0x134)]==='warn'?'!':'i';console[_0x48c41d(0x141)](_0x3722cb+0x1+'.\x20'+_0x2a6f0d+'\x20['+_0x3de662[_0x48c41d(0x14a)]+']\x20'+_0x3de662['message']),console['log'](_0x48c41d(0x135)+_0x279d4f),_0x3de662['duration']&&console[_0x48c41d(0x141)]('\x20\x20\x20Duration:\x20'+_0x3de662[_0x48c41d(0x139)]+'ms'),_0x3de662[_0x48c41d(0x12c)]&&Object['keys'](_0x3de662[_0x48c41d(0x12c)])[_0x48c41d(0x13e)]>0x0&&console[_0x48c41d(0x141)]('\x20\x20\x20Details:\x20'+JSON[_0x48c41d(0x142)](_0x3de662[_0x48c41d(0x12c)],null,0x2)),console[_0x48c41d(0x141)]('');});}export const logsDefinitions=[{'service':a22_0x1cd07d(0x138),'command':'show','description':a22_0x1cd07d(0x131),'risk':a22_0x1cd07d(0x143),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x317b47){const _0x260cc6=a22_0x1cd07d;return printLogs(logger[_0x260cc6(0x13d)]()),{'ok':!![]};}},{'service':a22_0x1cd07d(0x138),'command':a22_0x1cd07d(0x146),'description':a22_0x1cd07d(0x140),'risk':a22_0x1cd07d(0x13b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x3b47b5){const _0x5e2665=a22_0x1cd07d;return logger[_0x5e2665(0x144)](),console[_0x5e2665(0x141)](_0x5e2665(0x147)),{'ok':!![]};}}];
|
package/lib/commands/registry.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a23_0xbb9601=a23_0x44e4;(function(_0x23b14d,_0x4bb5c0){const _0x514746=a23_0x44e4,_0x2239f5=_0x23b14d();while(!![]){try{const _0x141807=parseInt(_0x514746(0xe2))/0x1+parseInt(_0x514746(0xe0))/0x2*(-parseInt(_0x514746(0xcf))/0x3)+parseInt(_0x514746(0xc6))/0x4+parseInt(_0x514746(0xd5))/0x5*(-parseInt(_0x514746(0xde))/0x6)+-parseInt(_0x514746(0xd0))/0x7+-parseInt(_0x514746(0xcb))/0x8*(-parseInt(_0x514746(0xd4))/0x9)+parseInt(_0x514746(0xdc))/0xa;if(_0x141807===_0x4bb5c0)break;else _0x2239f5['push'](_0x2239f5['shift']());}catch(_0x932c5b){_0x2239f5['push'](_0x2239f5['shift']());}}}(a23_0x1cd9,0x7eddb));import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{doctorDefinition}from'../commands/doctor.js';import{schemaDefinition}from'../commands/schema.js';import{appDefinitions}from'../commands/app/definitions.js';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';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();function a23_0x44e4(_0xac1074,_0x3dfbdb){_0xac1074=_0xac1074-0xc2;const _0x1cd9a3=a23_0x1cd9();let _0x44e484=_0x1cd9a3[_0xac1074];return _0x44e484;}export const serviceGroups=new Map();function registerDefinitions(_0x2ea5c4){const _0x35fb20=a23_0x44e4;for(const _0x5d1a28 of _0x2ea5c4){definitions[_0x35fb20(0xc9)](_0x5d1a28[_0x35fb20(0xd9)]+':'+_0x5d1a28[_0x35fb20(0xc2)],_0x5d1a28);let _0x67264f=serviceGroups[_0x35fb20(0xda)](_0x5d1a28[_0x35fb20(0xd9)]);!_0x67264f&&(_0x67264f=[],serviceGroups[_0x35fb20(0xc9)](_0x5d1a28[_0x35fb20(0xd9)],_0x67264f)),_0x67264f[_0x35fb20(0xc5)](_0x5d1a28);}}function registerService(_0x43c3dc,_0x41f29c,_0xf40e48){const _0x16bdd1=a23_0x44e4;registerDefinitions(_0x41f29c);const _0x1dbccf=_0x2200f7=>_0x2200f7===_0x16bdd1(0xce)?'':_0x2200f7===_0x16bdd1(0xc3)?'\x20\x20[write]':_0x16bdd1(0xdd),_0x443b25={'service':_0x41f29c[0x0][_0x16bdd1(0xd9)],'label':_0x43c3dc,'commands':_0x41f29c['map'](_0x163cd0=>({'command':_0x163cd0[_0x16bdd1(0xc2)],'description':_0x163cd0['description'],'tag':_0x1dbccf(_0x163cd0[_0x16bdd1(0xd8)])})),'defaultCommand':_0xf40e48?.[_0x16bdd1(0xe3)]??(_0xf40e48?.[_0x16bdd1(0xd2)]?_0x41f29c[0x0][_0x16bdd1(0xc2)]:undefined),'isSingleCommand':_0xf40e48?.[_0x16bdd1(0xd2)]};serviceRegistry[_0x16bdd1(0xc5)](_0x443b25),serviceByName[_0x16bdd1(0xc9)](_0x443b25[_0x16bdd1(0xd9)],_0x443b25);}registerService('Authentication',authDefinitions,{'defaultCommand':a23_0xbb9601(0xcc)}),registerService(a23_0xbb9601(0xd7),datasetDefinitions),registerService(a23_0xbb9601(0xd6),dataDefinitions),registerService(a23_0xbb9601(0xd3),sqlDefinitions),registerService(a23_0xbb9601(0xe1),bffDefinitions),registerService(a23_0xbb9601(0xc4),appDefinitions,{'defaultCommand':'list'}),registerService('Configuration',configDefinitions,{'defaultCommand':a23_0xbb9601(0xca)}),registerService(a23_0xbb9601(0xc7),[doctorDefinition],{'isSingleCommand':!![]}),registerService(a23_0xbb9601(0xd1),[schemaDefinition],{'isSingleCommand':!![]}),registerService(a23_0xbb9601(0xdb),logsDefinitions,{'defaultCommand':'show'});function a23_0x1cd9(){const _0x14b16d=['\x20\x20[high-risk-write]','159234qTAiXI','has','214gdepAv','BFF\x20Scripts','852165bJqdzJ','defaultCommand','command','write','App\x20Management','push','205192Rpqviz','Diagnostics','values','set','list','4668704xpBGoY','login','from','read','16230HGPglq','5430040jKrQkS','Schema','isSingleCommand','SQL\x20Queries','9rnuBhx','35RHmCNl','Data\x20CRUD','Datasets','risk','service','get','Logs','5729550ucjase'];a23_0x1cd9=function(){return _0x14b16d;};return a23_0x1cd9();}export function findDefinition(_0x4fb1d5,_0x5a2104){return definitions['get'](_0x4fb1d5+':'+_0x5a2104);}export function isKnownService(_0x44cb83){const _0x1175a2=a23_0xbb9601;return serviceByName[_0x1175a2(0xdf)](_0x44cb83);}export function getServiceEntry(_0x600c67){const _0x439b2c=a23_0xbb9601;return serviceByName[_0x439b2c(0xda)](_0x600c67);}export function getAllDefinitions(){const _0xc2e565=a23_0xbb9601;return Array[_0xc2e565(0xcd)](definitions[_0xc2e565(0xc8)]());}
|
package/lib/commands/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a24_0x38472d=a24_0x5627;(function(_0x5b2ab6,_0x6528f8){const _0x16d892=a24_0x5627,_0x118dee=_0x5b2ab6();while(!![]){try{const _0x55e4c3=-parseInt(_0x16d892(0x121))/0x1+parseInt(_0x16d892(0x11e))/0x2*(parseInt(_0x16d892(0x11b))/0x3)+-parseInt(_0x16d892(0x123))/0x4*(-parseInt(_0x16d892(0x11a))/0x5)+parseInt(_0x16d892(0x118))/0x6+parseInt(_0x16d892(0x11f))/0x7+parseInt(_0x16d892(0x124))/0x8*(parseInt(_0x16d892(0x11d))/0x9)+parseInt(_0x16d892(0x119))/0xa*(-parseInt(_0x16d892(0x122))/0xb);if(_0x55e4c3===_0x6528f8)break;else _0x118dee['push'](_0x118dee['shift']());}catch(_0x31bbfa){_0x118dee['push'](_0x118dee['shift']());}}}(a24_0x76cf,0x8d8a1));import{buildSchemaPayload}from'../framework/schema-export.js';function a24_0x5627(_0x3e8649,_0x4ebbac){_0x3e8649=_0x3e8649-0x117;const _0x76cf74=a24_0x76cf();let _0x5627f5=_0x76cf74[_0x3e8649];return _0x5627f5;}async function execute(_0x224c32){const _0x151c53=await buildSchemaPayload();return{'ok':!![],'data':_0x151c53};}export const schemaDefinition={'service':a24_0x38472d(0x120),'command':a24_0x38472d(0x11c),'description':'Export\x20machine-readable\x20command\x20schema\x20(JSON)','risk':a24_0x38472d(0x117),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};function a24_0x76cf(){const _0xa904ec=['551621DWJelC','262823JykCrl','4jCnict','1784bLBDDT','read','3033252tFwDeu','810YiToCM','5643070Inbgri','481458ebpTcs','export','30735NZcoJl','6CKwxNZ','1326780aLNTWH','schema'];a24_0x76cf=function(){return _0xa904ec;};return a24_0x76cf();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a25_0x1864(_0x400602,_0x3ec1cd){_0x400602=_0x400602-0xcd;const _0x5ba776=a25_0x5ba7();let _0x1864f3=_0x5ba776[_0x400602];return _0x1864f3;}const a25_0x3b9b09=a25_0x1864;(function(_0x3e1b32,_0x409a22){const _0x253775=a25_0x1864,_0x50fb4f=_0x3e1b32();while(!![]){try{const _0x3d362a=parseInt(_0x253775(0xcf))/0x1*(parseInt(_0x253775(0xdb))/0x2)+parseInt(_0x253775(0xd3))/0x3+-parseInt(_0x253775(0xd4))/0x4*(-parseInt(_0x253775(0xde))/0x5)+parseInt(_0x253775(0xd5))/0x6*(-parseInt(_0x253775(0xcd))/0x7)+parseInt(_0x253775(0xe1))/0x8+parseInt(_0x253775(0xd2))/0x9+-parseInt(_0x253775(0xdc))/0xa*(parseInt(_0x253775(0xd9))/0xb);if(_0x3d362a===_0x409a22)break;else _0x50fb4f['push'](_0x50fb4f['shift']());}catch(_0x15f7cd){_0x50fb4f['push'](_0x50fb4f['shift']());}}}(a25_0x5ba7,0xc26bd));import{getSqlQueryInfo}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';import{SQLCODE_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';function a25_0x5ba7(){const _0x89ee51=['2630439dQIXzb','3073290nXQbWZ','884TFEKXv','6yxeGhZ','sql','str','sqlCode','35943721OvVHxb','sqlName','3158906EQXaqM','10KkCPYd','detail','20035GnyJGK','verbose','description','12435448jdGhAy','sqlContent','bool','8905204vJAMme','appCode','1iPWJaU','read','dbId'];a25_0x5ba7=function(){return _0x89ee51;};return a25_0x5ba7();}export const sqlDetail={'service':a25_0x3b9b09(0xd6),'command':a25_0x3b9b09(0xdd),'description':'Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','risk':a25_0x3b9b09(0xd0),'flags':[SQLCODE_FLAG,VERBOSE_FLAG],async 'execute'(_0x390761){const _0x1bd40d=a25_0x3b9b09,_0x199db1=await getSqlQueryInfo(_0x390761['appCode'],_0x390761[_0x1bd40d(0xd7)]('sqlcode')),_0x43fc99=_0x390761[_0x1bd40d(0xe3)](_0x1bd40d(0xdf));if(_0x43fc99)return{'ok':!![],'data':_0x199db1};const _0x355364=_0x199db1[_0x1bd40d(0xd1)]?await getDbName(_0x390761[_0x1bd40d(0xce)],_0x199db1['dbId']):undefined;return{'ok':!![],'data':{'sqlCode':_0x199db1[_0x1bd40d(0xd8)],'sqlName':_0x199db1[_0x1bd40d(0xda)],'db':_0x355364?_0x355364+'\x20('+_0x199db1['dbId']+')':_0x199db1[_0x1bd40d(0xd1)]??'','description':_0x199db1[_0x1bd40d(0xe0)]??'','sqlContent':_0x199db1[_0x1bd40d(0xe2)]??''}};}};
|
package/lib/commands/sql/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a26_0x1ef2(){const _0x2a201d=['Returned\x20','exec','params','8ypqVbc','7509099VHTLRR','str','295310bGXggO','1908867DqsIVt','execError','224632ZEQsPF','execResult','6RgQQVL','sql','36AeQuUj','1257613PrdPuD','7999992PJOZKE','341HKxDkb','\x20row(s)\x20in\x20','184355tMbvUF','1CPWEYL','isArray','8FLGujP','now','read','SQL\x20execution\x20failed'];a26_0x1ef2=function(){return _0x2a201d;};return a26_0x1ef2();}function a26_0x555b(_0x1172f0,_0x2b9d64){_0x1172f0=_0x1172f0-0xa6;const _0x1ef212=a26_0x1ef2();let _0x555bba=_0x1ef212[_0x1172f0];return _0x555bba;}const a26_0x1175b1=a26_0x555b;(function(_0x3f6a62,_0x59c72d){const _0x4154c5=a26_0x555b,_0x548a22=_0x3f6a62();while(!![]){try{const _0xa89503=-parseInt(_0x4154c5(0xbd))/0x1*(-parseInt(_0x4154c5(0xb3))/0x2)+parseInt(_0x4154c5(0xb1))/0x3+parseInt(_0x4154c5(0xa6))/0x4*(-parseInt(_0x4154c5(0xbc))/0x5)+-parseInt(_0x4154c5(0xb5))/0x6*(parseInt(_0x4154c5(0xb8))/0x7)+parseInt(_0x4154c5(0xad))/0x8*(parseInt(_0x4154c5(0xb9))/0x9)+-parseInt(_0x4154c5(0xb0))/0xa*(-parseInt(_0x4154c5(0xba))/0xb)+-parseInt(_0x4154c5(0xb7))/0xc*(parseInt(_0x4154c5(0xae))/0xd);if(_0xa89503===_0x59c72d)break;else _0x548a22['push'](_0x548a22['shift']());}catch(_0x12c654){_0x548a22['push'](_0x548a22['shift']());}}}(a26_0x1ef2,0x8a59c));import{executeSdkSql}from'../../core/sdk-client.js';import{SQLCODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{parseJsonParams}from'../../utils/params.js';export const sqlExec={'service':a26_0x1175b1(0xb6),'command':a26_0x1175b1(0xab),'description':'Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode','risk':a26_0x1175b1(0xa8),'flags':[SQLCODE_FLAG,PARAMS_FLAG],async 'execute'(_0x7b1d73){const _0x33003e=a26_0x1175b1,_0x5588a9=parseJsonParams(_0x7b1d73[_0x33003e(0xaf)](_0x33003e(0xac))),_0x511076=Date[_0x33003e(0xa7)](),_0x560487=await executeSdkSql(_0x7b1d73['str']('sqlcode'),_0x5588a9),_0x2f13de=Date[_0x33003e(0xa7)]()-_0x511076,_0x207b03=_0x560487?.[_0x33003e(0xb4)]??_0x560487,_0x376ee5=_0x560487?.['execSuccess']??!![];if(!_0x376ee5)return{'ok':![],'data':{'error':_0x560487?.[_0x33003e(0xb2)]||_0x33003e(0xa9),'elapsed':_0x2f13de},'message':_0x33003e(0xa9)};const _0x19fc25=Array[_0x33003e(0xbe)](_0x207b03)?_0x207b03:[];return{'ok':!![],'data':{'rows':_0x19fc25,'rowCount':_0x19fc25['length'],'elapsed':_0x2f13de},'message':_0x33003e(0xaa)+_0x19fc25['length']+_0x33003e(0xbb)+_0x2f13de+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a27_0x5750(_0x41665d,_0x524308){_0x41665d=_0x41665d-0x81;const _0x18fef1=a27_0x18fe();let _0x575053=_0x18fef1[_0x41665d];return _0x575053;}(function(_0x4443ab,_0x3767a0){const _0x1974ae=a27_0x5750,_0x2d3460=_0x4443ab();while(!![]){try{const _0x57654c=parseInt(_0x1974ae(0x88))/0x1*(-parseInt(_0x1974ae(0x85))/0x2)+parseInt(_0x1974ae(0x89))/0x3*(parseInt(_0x1974ae(0x81))/0x4)+-parseInt(_0x1974ae(0x8a))/0x5+-parseInt(_0x1974ae(0x82))/0x6+-parseInt(_0x1974ae(0x83))/0x7*(-parseInt(_0x1974ae(0x84))/0x8)+parseInt(_0x1974ae(0x8b))/0x9+parseInt(_0x1974ae(0x86))/0xa*(parseInt(_0x1974ae(0x87))/0xb);if(_0x57654c===_0x3767a0)break;else _0x2d3460['push'](_0x2d3460['shift']());}catch(_0x5143ac){_0x2d3460['push'](_0x2d3460['shift']());}}}(a27_0x18fe,0xa93ae));import{sqlDetail}from'../../commands/sql/detail.js';import{sqlExec}from'../../commands/sql/exec.js';function a27_0x18fe(){const _0x3868bc=['3140PsWlqS','71005JZTuJX','1oRXnfG','918438eoaAyC','6049720ggvOyk','1453527lWpYhR','8EakKZy','6543642wuZeey','651CAMoBv','110712EUGLGJ','2187950qcdgDT'];a27_0x18fe=function(){return _0x3868bc;};return a27_0x18fe();}export const sqlDefinitions=[sqlDetail,sqlExec];
|
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a28_0x4ed05a=a28_0x4d69;(function(_0xd23bf1,_0x4efffc){const _0x3c3ef1=a28_0x4d69,_0xa98a2e=_0xd23bf1();while(!![]){try{const _0x182a21=parseInt(_0x3c3ef1(0x95))/0x1*(parseInt(_0x3c3ef1(0x87))/0x2)+-parseInt(_0x3c3ef1(0x85))/0x3+parseInt(_0x3c3ef1(0x92))/0x4+-parseInt(_0x3c3ef1(0x98))/0x5+parseInt(_0x3c3ef1(0x82))/0x6*(-parseInt(_0x3c3ef1(0x90))/0x7)+parseInt(_0x3c3ef1(0x97))/0x8+parseInt(_0x3c3ef1(0x83))/0x9;if(_0x182a21===_0x4efffc)break;else _0xa98a2e['push'](_0xa98a2e['shift']());}catch(_0x8d5a36){_0xa98a2e['push'](_0xa98a2e['shift']());}}}(a28_0x43b2,0x7dfcd));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{OUTPUT_FORMAT_VALUES}from'../constant/output.js';export const CONFIG_FIELD_SCHEMAS={'env':{'description':a28_0x4ed05a(0x8a),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':RUNTIME_ENV_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a28_0x4ed05a(0x89)],'importable':!![]},'format':{'description':'Default\x20output\x20format','topLevel':!![],'cliSettableTopLevel':!![],'enumValues':OUTPUT_FORMAT_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a28_0x4ed05a(0x9b)],'importable':!![]},'pageSize':{'description':a28_0x4ed05a(0x9a),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'apiDomain':{'description':a28_0x4ed05a(0x8f),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'userDomain':{'description':a28_0x4ed05a(0x94),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'runtimeDomain':{'description':a28_0x4ed05a(0x9e),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'accessKey':{'description':a28_0x4ed05a(0x81),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'riskLevel':{'description':a28_0x4ed05a(0x8b),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a28_0x4ed05a(0x91)],'importable':!![]},'locale':{'description':'Locale','topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a28_0x4ed05a(0x99)],'importable':!![],'legacyCompatOnly':!![]}};export const TOP_LEVEL_CONFIG_KEYS=new Set(Object[a28_0x4ed05a(0x88)](CONFIG_FIELD_SCHEMAS)[a28_0x4ed05a(0x93)](([,_0x4e50be])=>_0x4e50be[a28_0x4ed05a(0x9c)])[a28_0x4ed05a(0x8c)](([_0x37ab0c])=>_0x37ab0c));export const CONFIG_ENUM_VALUES=Object[a28_0x4ed05a(0x84)](Object['entries'](CONFIG_FIELD_SCHEMAS)[a28_0x4ed05a(0x93)](([,_0x20f0f4])=>_0x20f0f4[a28_0x4ed05a(0x80)])[a28_0x4ed05a(0x8c)](([_0x4b33e6,_0x3ac449])=>[_0x4b33e6,[..._0x3ac449[a28_0x4ed05a(0x80)]||[]]]));export const IMPORTABLE_RUNTIME_CONFIG_KEYS=Object[a28_0x4ed05a(0x88)](CONFIG_FIELD_SCHEMAS)['filter'](([,_0x9a2fee])=>_0x9a2fee[a28_0x4ed05a(0x96)])['map'](([_0x13e78a])=>_0x13e78a);function a28_0x4d69(_0x57ffbb,_0x469614){_0x57ffbb=_0x57ffbb-0x80;const _0x43b20d=a28_0x43b2();let _0x4d691f=_0x43b20d[_0x57ffbb];return _0x4d691f;}export function getConfigFieldSchema(_0x2232b2){return CONFIG_FIELD_SCHEMAS[_0x2232b2];}export function getConfigEnumValues(_0x50ec17){const _0x48efc5=a28_0x4ed05a;return getConfigFieldSchema(_0x50ec17)?.[_0x48efc5(0x80)];}export function getConfigDefaultValue(_0x5c756f){return getConfigFieldSchema(_0x5c756f)?.['defaultValue'];}export function isTopLevelConfigKey(_0x1da9eb){const _0x11d5c0=a28_0x4ed05a;return TOP_LEVEL_CONFIG_KEYS[_0x11d5c0(0x9d)](_0x1da9eb);}function a28_0x43b2(){const _0x465e74=['join','1553726eOLEhJ','entries','env','Target\x20environment','Risk\x20level','map','legacyCompatOnly','Config\x20key.\x20Top-level:\x20','Override\x20API\x20domain','28HEqbWd','riskLevel','1431844NByuUh','filter','Override\x20user\x20domain','1oQMdUm','importable','6133376Cbbhsj','2688410jNZnPl','locale','Default\x20page\x20size','format','cliSettableTopLevel','has','Override\x20runtime\x20domain','enumValues','Access\x20key\x20(client-ak\x20auth)','126498ZrhsNF','1023003vCYAPb','fromEntries','2631312roPqSo'];a28_0x43b2=function(){return _0x465e74;};return a28_0x43b2();}export function isLegacyCompatConfigKey(_0x102dd1){const _0x1c5adb=a28_0x4ed05a;return getConfigFieldSchema(_0x102dd1)?.[_0x1c5adb(0x8d)]===!![];}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function formatConfigKeyList(_0xb98e73){const _0x5504e1=a28_0x4ed05a;return[..._0xb98e73][_0x5504e1(0x86)](',\x20');}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x1aef5a=a28_0x4ed05a;return _0x1aef5a(0x8e)+getTopLevelConfigKeySummary();}export function buildAppProfileListFields(_0x107c08){return{'env':_0x107c08,'hasAccessKey':![],'format':null,'pageSize':null,'riskLevel':null,'locale':null};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a29_0x3434(){const _0x18ee61=['847600vHUaji','client-ak','522jwgJNs','391NElTMW','26730Rswckr','6120fucKJm','1914bFxvuV','ClientAk','9CjDwrE','6486888unEgZL','306idHxnQ','4457404HjMYma','2471454ZNMpdn'];a29_0x3434=function(){return _0x18ee61;};return a29_0x3434();}const a29_0xff020f=a29_0x65e9;(function(_0x447d7e,_0x10ce78){const _0x5d4657=a29_0x65e9,_0x344f7c=_0x447d7e();while(!![]){try{const _0x193c62=parseInt(_0x5d4657(0x178))/0x1*(-parseInt(_0x5d4657(0x177))/0x2)+parseInt(_0x5d4657(0x174))/0x3+-parseInt(_0x5d4657(0x175))/0x4+-parseInt(_0x5d4657(0x179))/0x5*(-parseInt(_0x5d4657(0x17f))/0x6)+parseInt(_0x5d4657(0x173))/0x7+parseInt(_0x5d4657(0x17e))/0x8*(-parseInt(_0x5d4657(0x17d))/0x9)+-parseInt(_0x5d4657(0x17a))/0xa*(parseInt(_0x5d4657(0x17b))/0xb);if(_0x193c62===_0x10ce78)break;else _0x344f7c['push'](_0x344f7c['shift']());}catch(_0xd33632){_0x344f7c['push'](_0x344f7c['shift']());}}}(a29_0x3434,0x7a8b0));function a29_0x65e9(_0x3cefb4,_0x26c41d){_0x3cefb4=_0x3cefb4-0x173;const _0x343476=a29_0x3434();let _0x65e97e=_0x343476[_0x3cefb4];return _0x65e97e;}export const AUTH_MODE={'ClientAk':a29_0xff020f(0x176)};export function isAuthMode(_0x557d94){const _0x33848d=a29_0xff020f;return _0x557d94===AUTH_MODE[_0x33848d(0x17c)];}
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a30_0x136eca=a30_0x3016;(function(_0x1bff1f,_0x347e95){const _0x20e39e=a30_0x3016,_0x5a3020=_0x1bff1f();while(!![]){try{const _0x32fb72=parseInt(_0x20e39e(0x1db))/0x1*(-parseInt(_0x20e39e(0x1ee))/0x2)+parseInt(_0x20e39e(0x1de))/0x3+parseInt(_0x20e39e(0x1fd))/0x4*(parseInt(_0x20e39e(0x1dd))/0x5)+-parseInt(_0x20e39e(0x1e6))/0x6+parseInt(_0x20e39e(0x1f7))/0x7*(-parseInt(_0x20e39e(0x1eb))/0x8)+parseInt(_0x20e39e(0x1e2))/0x9+parseInt(_0x20e39e(0x1e4))/0xa;if(_0x32fb72===_0x347e95)break;else _0x5a3020['push'](_0x5a3020['shift']());}catch(_0x1f78ee){_0x5a3020['push'](_0x5a3020['shift']());}}}(a30_0x47e4,0xdd52c));export const CLI_BIN_NAME=a30_0x136eca(0x1f3);export const CLI_DISPLAY_NAME=a30_0x136eca(0x1e9);function a30_0x3016(_0x1eea46,_0x2bf155){_0x1eea46=_0x1eea46-0x1d9;const _0x47e442=a30_0x47e4();let _0x3016a4=_0x47e442[_0x1eea46];return _0x3016a4;}function a30_0x47e4(){const _0x409197=['10clqpFB','494160cRzIJk','non-interactive','Filter\x20JSON\x20output\x20(implies\x20--format\x20json\x20when\x20current\x20format\x20is\x20pretty)','Alias\x20for\x20--non-interactive','947259jkohfm','sqlcode','30521290EQvwKV','name','6095394fMMXxK','json\x20|\x20pretty\x20|\x20compress','SQL\x20query\x20code','Lovrabet\x20Runtime\x20CLI','help','3418520AQFZan','dry-run','dryRun','42NHGPdl','app','Preview\x20operation\x20without\x20executing','Override\x20appcode','appcode','lovrabet','boolean','format','Force\x20non-interactive\x20mode\x20(CI)','21dyGLez','<name>','<code>','params','meowKey','<expr>','1984856zbzSXF','Clear\x20output','Name\x20filter','env','Use\x20global\x20config\x20scope','JSON\x20params\x20for\x20execute\x20commands','Verbose\x20output','Output\x20format','string','@lovrabet/lovrabet-cli','yes','clear','fromEntries','Select\x20app\x20profile\x20by\x20name','Skip\x20confirmation\x20for\x20high-risk\x20writes','nonInteractive','global','Show\x20help','type','production\x20|\x20development\x20|\x20daily','52864IAEULU','verbose'];a30_0x47e4=function(){return _0x409197;};return a30_0x47e4();}export const NPM_PACKAGE_NAME=a30_0x136eca(0x206);export const GLOBAL_FLAGS=[{'name':a30_0x136eca(0x1f2),'meowKey':a30_0x136eca(0x1f2),'type':a30_0x136eca(0x205),'description':a30_0x136eca(0x1f1),'hint':a30_0x136eca(0x1f9)},{'name':a30_0x136eca(0x1ef),'meowKey':a30_0x136eca(0x1ef),'type':a30_0x136eca(0x205),'description':a30_0x136eca(0x20a),'hint':a30_0x136eca(0x1f8)},{'name':a30_0x136eca(0x200),'meowKey':a30_0x136eca(0x200),'type':a30_0x136eca(0x205),'description':'Environment','hint':a30_0x136eca(0x1da)},{'name':a30_0x136eca(0x1f5),'meowKey':a30_0x136eca(0x1f5),'type':a30_0x136eca(0x205),'description':a30_0x136eca(0x204),'hint':a30_0x136eca(0x1e7)},{'name':'jq','meowKey':'jq','type':'string','description':a30_0x136eca(0x1e0),'hint':a30_0x136eca(0x1fc)},{'name':a30_0x136eca(0x1ec),'meowKey':a30_0x136eca(0x1ed),'type':a30_0x136eca(0x1f4),'description':a30_0x136eca(0x1f0)},{'name':a30_0x136eca(0x207),'meowKey':a30_0x136eca(0x207),'type':a30_0x136eca(0x1f4),'description':a30_0x136eca(0x20b)},{'name':a30_0x136eca(0x1df),'meowKey':a30_0x136eca(0x20c),'type':'boolean','description':a30_0x136eca(0x1f6)},{'name':a30_0x136eca(0x20d),'meowKey':a30_0x136eca(0x20d),'type':a30_0x136eca(0x1f4),'description':a30_0x136eca(0x201)},{'name':'ci','meowKey':'ci','type':a30_0x136eca(0x1f4),'description':a30_0x136eca(0x1e1),'hidden':!![]},{'name':a30_0x136eca(0x1ea),'meowKey':a30_0x136eca(0x1ea),'type':'boolean','description':a30_0x136eca(0x20e)},{'name':'id','meowKey':'id','type':a30_0x136eca(0x205),'description':'Record\x20ID','hidden':!![]},{'name':a30_0x136eca(0x1e5),'meowKey':a30_0x136eca(0x1e5),'type':a30_0x136eca(0x205),'description':a30_0x136eca(0x1ff),'hidden':!![]},{'name':a30_0x136eca(0x1e3),'meowKey':'sqlcode','type':a30_0x136eca(0x205),'description':a30_0x136eca(0x1e8),'hidden':!![]},{'name':'params','meowKey':a30_0x136eca(0x1fa),'type':a30_0x136eca(0x205),'description':a30_0x136eca(0x202),'hidden':!![]},{'name':'verbose','meowKey':a30_0x136eca(0x1dc),'type':a30_0x136eca(0x1f4),'description':a30_0x136eca(0x203),'hidden':!![]},{'name':a30_0x136eca(0x208),'meowKey':a30_0x136eca(0x208),'type':a30_0x136eca(0x1f4),'description':a30_0x136eca(0x1fe),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set(['appcode',a30_0x136eca(0x1ef),'env',a30_0x136eca(0x1f5),'jq',a30_0x136eca(0x1ec),a30_0x136eca(0x207),'non-interactive','ci']);export function buildMeowFlags(){const _0x5717f0=a30_0x136eca;return Object[_0x5717f0(0x209)](GLOBAL_FLAGS['map'](_0x5c75fa=>[_0x5c75fa[_0x5717f0(0x1fb)],{'type':_0x5c75fa[_0x5717f0(0x1d9)]}]));}
|