@lovrabet/lovrabet-cli 2.0.1 → 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 +1 -1
- package/lib/commands/init/index.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
function a16_0x6c0a(_0x204982,_0x401459){_0x204982=_0x204982-0x1ab;const _0x3c04f1=a16_0x3c04();let _0x6c0a41=_0x3c04f1[_0x204982];return _0x6c0a41;}const a16_0x968d7b=a16_0x6c0a;(function(_0x495806,_0x36c309){const _0x300e21=a16_0x6c0a,_0x25a7fa=_0x495806();while(!![]){try{const _0x8fa301=parseInt(_0x300e21(0x1dd))/0x1*(parseInt(_0x300e21(0x1b0))/0x2)+parseInt(_0x300e21(0x1b8))/0x3*(-parseInt(_0x300e21(0x1cc))/0x4)+-parseInt(_0x300e21(0x1e5))/0x5+-parseInt(_0x300e21(0x1f2))/0x6+-parseInt(_0x300e21(0x1da))/0x7*(-parseInt(_0x300e21(0x1f9))/0x8)+-parseInt(_0x300e21(0x1b3))/0x9+parseInt(_0x300e21(0x1cf))/0xa;if(_0x8fa301===_0x36c309)break;else _0x25a7fa['push'](_0x25a7fa['shift']());}catch(_0xa1f6df){_0x25a7fa['push'](_0x25a7fa['shift']());}}}(a16_0x3c04,0x7a684));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';function a16_0x3c04(){const _0x5ad0bb=['713178BepCkQ','\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}}','paramsRequired','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','getOne','61554wFsPgi','update','\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}','risk','\x20\x20WHERE\x20OPERATORS','now','\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\x20LOGICAL\x20COMBINATORS','\x20\x20\x20\x20Correct:\x20\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:10}\x27','str','map','data','\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','Create\x20multiple\x20records\x20in\x20one\x20request\x20(SDK\x20batchCreate)','operation','\x20\x20AGGREGATE\x20TYPES','\x20\x20\x20\x20$or\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Any\x20condition\x20matches\x20\x20{\x22$or\x22:[{\x22status\x22:{\x22$eq\x22:\x22active\x22}},{\x22status\x22:{\x22$eq\x22:\x22pending\x22}}]}','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','\x20\x20\x20\x20Pagination\x20is\x20controlled\x20via\x20JSON\x20in\x20--params.\x20Do\x20NOT\x20use\x20--page-size\x20as\x20a\x20CLI\x20flag.','aggregate','64oukPNQ','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22field\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[\x22region\x22],\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}}}\x27','\x20\x20\x20\x20$lte\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20or\x20equal\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lte\x22:1000}}','11001030LSkkor','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','\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}','join','description','command','\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\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','Filter\x20dataset\x20records\x20with\x20query\x20conditions','Delete\x20a\x20record\x20(requires\x20--yes\x20in\x20non-interactive)','/api/{appCode}/','308Avwyxv','\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\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','211CuWyrD','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20Example:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27','build','data\x20','read','batchCreate','write','\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}}','421615tPaUcI','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','\x20completed\x20in\x20','\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}','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','Get\x20a\x20single\x20record\x20by\x20ID','\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}','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','delete','POST','code','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','4015158AAmzBy','\x20\x20\x20\x20Wrong:\x20\x20\x20\x20--page-size\x2010\x20\x20(this\x20is\x20not\x20a\x20valid\x20flag)','dryRun','params','filter','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Average\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg_score\x22}','\x20\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}}','65680qJzDxO','\x20\x20\x20\x20MIN\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Minimum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22price\x22,\x22type\x22:\x22MIN\x22,\x22alias\x22:\x22min_price\x22}','\x20\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','\x20on\x20dataset\x20','helpExtra','\x20\x20\x20\x20$lt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lt\x22:1000}}','\x20\x20\x20\x20$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}}','body','\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}','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','1906kFblVD','create','\x20\x20PARAMS\x20STRUCTURE'];a16_0x3c04=function(){return _0x5ad0bb;};return a16_0x3c04();}const specs=[{'command':a16_0x968d7b(0x1f6),'operation':a16_0x968d7b(0x1f6),'risk':a16_0x968d7b(0x1e1),'paramsRequired':![],'description':a16_0x968d7b(0x1d7),'paramsHint':'JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20'+a16_0x968d7b(0x1e9),'helpExtra':[a16_0x968d7b(0x1bc),a16_0x968d7b(0x1b4),a16_0x968d7b(0x1f8),'\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}}',a16_0x968d7b(0x1e4),a16_0x968d7b(0x1ab),a16_0x968d7b(0x1ce),a16_0x968d7b(0x1be),'\x20\x20\x20\x20$contain\x20\x20\x20\x20\x20Substring\x20match\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$contain\x22:\x22test\x22}}',a16_0x968d7b(0x1d5),a16_0x968d7b(0x1ac),'',a16_0x968d7b(0x1bf),'\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_0x968d7b(0x1c8),'','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)',a16_0x968d7b(0x1d0),a16_0x968d7b(0x1c9),a16_0x968d7b(0x1db),'\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)',a16_0x968d7b(0x1f1),'','\x20\x20PAGINATION',a16_0x968d7b(0x1ca),a16_0x968d7b(0x1c0),a16_0x968d7b(0x1f3)][a16_0x968d7b(0x1d2)]('\x0a')},{'command':'getOne','operation':a16_0x968d7b(0x1b7),'risk':a16_0x968d7b(0x1e1),'paramsRequired':!![],'description':a16_0x968d7b(0x1ea),'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':'create','operation':a16_0x968d7b(0x1b1),'risk':'write','paramsRequired':!![],'description':'Create\x20a\x20new\x20record\x20in\x20a\x20dataset','paramsHint':a16_0x968d7b(0x1af)},{'command':'batchCreate','operation':'batchCreate','risk':a16_0x968d7b(0x1e3),'paramsRequired':!![],'description':a16_0x968d7b(0x1c5),'paramsHint':'JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27'},{'command':'update','operation':a16_0x968d7b(0x1b9),'risk':a16_0x968d7b(0x1e3),'paramsRequired':!![],'description':'Update\x20an\x20existing\x20record','paramsHint':a16_0x968d7b(0x1de)},{'command':'delete','operation':a16_0x968d7b(0x1ee),'risk':'high-risk-write','paramsRequired':!![],'description':a16_0x968d7b(0x1d8),'paramsHint':a16_0x968d7b(0x1ec)},{'command':'aggregate','operation':a16_0x968d7b(0x1cb),'risk':a16_0x968d7b(0x1e1),'paramsRequired':![],'description':a16_0x968d7b(0x1b6),'paramsHint':'JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20'+'Example:\x20\x27{\x22aggregate\x22:[{\x22field\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','helpExtra':[a16_0x968d7b(0x1c7),a16_0x968d7b(0x1ae),a16_0x968d7b(0x1eb),a16_0x968d7b(0x1d1),a16_0x968d7b(0x1f7),a16_0x968d7b(0x1e8),a16_0x968d7b(0x1ba),a16_0x968d7b(0x1fa),'',a16_0x968d7b(0x1b2),'\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return\x20alongside\x20aggregates,\x20e.g.\x20[\x22status\x22,\x22region\x22]',a16_0x968d7b(0x1e6),a16_0x968d7b(0x1d6),a16_0x968d7b(0x1c4),'\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_0x968d7b(0x1ed),'','\x20\x20EXAMPLES','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status',a16_0x968d7b(0x1fb),'',a16_0x968d7b(0x1dc),a16_0x968d7b(0x1cd)]['join']('\x0a')}];function makeDataCommand(_0x51af36){const _0x148d50=a16_0x968d7b,_0x4b29d3=_0x148d50(0x1e0)+_0x51af36[_0x148d50(0x1d4)],_0x56f172={'service':_0x148d50(0x1c3),'command':_0x51af36['command'],'description':_0x51af36[_0x148d50(0x1d3)],'risk':_0x51af36['risk'],'helpExtra':_0x51af36[_0x148d50(0x1fd)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x51af36['paramsHint']}],'validate':async _0x2f6ea8=>{const _0x3cb081=_0x148d50;_0x51af36[_0x3cb081(0x1b5)]&&requireAnyOf(_0x2f6ea8,['params'],_0x4b29d3),_0x51af36['operation']===_0x3cb081(0x1e2)&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x2f6ea8['str']('params')));},async 'execute'(_0x322560){const _0x401c7b=_0x148d50,_0x4c7478=_0x322560['str'](_0x401c7b(0x1f0)),_0x36f662=_0x51af36['operation']===_0x401c7b(0x1e2)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x322560[_0x401c7b(0x1c1)](_0x401c7b(0x1f5)))):parseJsonParams(_0x322560[_0x401c7b(0x1c1)](_0x401c7b(0x1f5)))??{},_0x26d7e2=Date[_0x401c7b(0x1bd)](),_0xb88326=await executeData(_0x4c7478,_0x51af36['operation'],_0x36f662),_0x259e42=Date[_0x401c7b(0x1bd)]()-_0x26d7e2;return{'ok':!![],'data':{'result':_0xb88326,'elapsed':_0x259e42},'message':_0x401c7b(0x1e0)+_0x51af36[_0x401c7b(0x1d4)]+_0x401c7b(0x1e7)+_0x259e42+'ms'};}};return _0x51af36[_0x148d50(0x1bb)]!==_0x148d50(0x1e1)&&(_0x56f172[_0x148d50(0x1f4)]=async _0x4a2628=>{const _0x1452f0=_0x148d50,_0x3cc953=_0x4a2628['str']('code'),_0x59eb8f=_0x51af36[_0x1452f0(0x1c6)]===_0x1452f0(0x1e2)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x4a2628[_0x1452f0(0x1c1)]('params'))):parseJsonParams(_0x4a2628['str'](_0x1452f0(0x1f5)))??{};return dryRun(_0x1452f0(0x1ef),_0x1452f0(0x1d9)+_0x3cc953+'/'+_0x51af36[_0x1452f0(0x1c6)])[_0x1452f0(0x1ad)](_0x59eb8f)[_0x1452f0(0x1d3)]('Preview:\x20data\x20'+_0x51af36['command']+_0x1452f0(0x1fc)+_0x3cc953)[_0x1452f0(0x1df)]();}),_0x56f172;}export const dataDefinitions=specs[a16_0x968d7b(0x1c2)](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
|
-
|
|
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_0x143e3e=a22_0x4078;(function(_0xd8defe,_0x140c94){const _0x5649f4=a22_0x4078,_0x397f79=_0xd8defe();while(!![]){try{const _0x417f65=-parseInt(_0x5649f4(0xc5))/0x1+-parseInt(_0x5649f4(0xb5))/0x2*(parseInt(_0x5649f4(0x8a))/0x3)+-parseInt(_0x5649f4(0x94))/0x4+-parseInt(_0x5649f4(0x90))/0x5+parseInt(_0x5649f4(0xc1))/0x6+-parseInt(_0x5649f4(0xaa))/0x7*(-parseInt(_0x5649f4(0xbf))/0x8)+parseInt(_0x5649f4(0xb7))/0x9*(parseInt(_0x5649f4(0x89))/0xa);if(_0x417f65===_0x140c94)break;else _0x397f79['push'](_0x397f79['shift']());}catch(_0x3077eb){_0x397f79['push'](_0x397f79['shift']());}}}(a22_0x25a6,0x8ff25));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':a22_0x143e3e(0xcb),'type':'string','description':a22_0x143e3e(0xc8)},{'name':a22_0x143e3e(0xa2),'type':'string','description':a22_0x143e3e(0x8c)+DEFAULT_CONFIG_VALUES[a22_0x143e3e(0xa2)]+')','enum':[...RUNTIME_ENV_VALUES]},{'name':a22_0x143e3e(0xbc),'type':a22_0x143e3e(0xa4),'description':a22_0x143e3e(0xac),'default':![]},{'name':'yes','type':a22_0x143e3e(0xa4),'description':'Skip\x20confirmation\x20when\x20overwriting','default':![]}];export const initImportFlagDefs=[{'name':a22_0x143e3e(0xbe),'type':a22_0x143e3e(0x92),'description':a22_0x143e3e(0x9c),'required':!![]},{'name':'appcode','type':'string','description':'Override\x20imported\x20default\x20appcode'},{'name':a22_0x143e3e(0xa2),'type':a22_0x143e3e(0x92),'description':a22_0x143e3e(0xbd),'enum':[...RUNTIME_ENV_VALUES]},{'name':a22_0x143e3e(0xbc),'type':'boolean','description':'Write\x20to\x20global\x20(~/.lovrabet.json)\x20instead\x20of\x20project','default':![]},{'name':a22_0x143e3e(0xca),'type':a22_0x143e3e(0xa4),'description':a22_0x143e3e(0x9e),'default':![]}];export async function runInit(_0x5cd5e0){const _0x3e6a29=a22_0x143e3e,_0x5aff32=isNonInteractiveMode(_0x5cd5e0),_0x2f5ddb=_0x5cd5e0[_0x3e6a29(0xbc)]?_0x3e6a29(0xbc):'project',_0x12c93d=resolveWriteConfigPath(_0x2f5ddb);try{_0x5aff32?await runNonInteractive(_0x5cd5e0,_0x12c93d):await runInteractive(_0x5cd5e0,_0x12c93d);}catch(_0x599296){if(_0x599296 instanceof AbortPrompt)throw CliErrors[_0x3e6a29(0xab)]();throw _0x599296;}}function a22_0x25a6(){const _0x5bea4b=['file','24eeKnUN','User\x20aborted\x20prompt','6040158PSMvoR','includes','\x20already\x20exists.\x20Overwrite?','Aborted.','467948EOCXob','\x0aInitialized\x20','\x20\x20default:\x20','App\x20code\x20for\x20the\x20project','validation','yes','appcode','100gMEXyf','3VTqNed','log','Target\x20environment\x20(default\x20','toLowerCase','utf8','flagMissing','4725765zmxVCN','trim','string','join','1438536zixuXT','apiDir','entries','\x20init\x20—\x20Create\x20.lovrabet.json\x0a','\x20\x20config:\x20\x20','apps','Failed\x20to\x20parse\x20source\x20file:\x20','Usage:\x20','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','[Y/n]','Skip\x20confirmation\x20when\x20overwriting','race','Imported\x20from\x20','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','env','name','boolean','message','Source\x20file\x20not\x20found:\x20','close','File\x20','):\x20','613606AMlZiB','cancelled','Write\x20to\x20global\x20(~/.lovrabet.json)\x20instead\x20of\x20project','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`.','Invalid\x20env\x20\x22','\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]','SIGINT','\x20\x20env:\x20\x20\x20\x20\x20','project','removeListener','question','580874OvhYwS','parse','1244799rFAljH','\x20\x20appcode:\x20','stdin','App\x20code\x20cannot\x20be\x20empty.','defaultApp','global','Override\x20imported\x20default\x20env'];a22_0x25a6=function(){return _0x5bea4b;};return a22_0x25a6();}export async function runInitImport(_0xa80160){const _0x4baf3c=a22_0x143e3e,_0x5d2a81=_0xa80160[_0x4baf3c(0xbc)]?_0x4baf3c(0xbc):_0x4baf3c(0xb2),_0xd630a5=resolveWriteConfigPath(_0x5d2a81);await runFromImport(_0xa80160,_0xd630a5);}const RUNTIME_IRRELEVANT_KEYS=new Set([a22_0x143e3e(0x95)]);async function runFromImport(_0xb3438f,_0x30443b){const _0x5a2056=a22_0x143e3e,_0x20010f=resolveFilePath(_0xb3438f[_0x5a2056(0xbe)]);if(!existsSync(_0x20010f))throw CliErrors[_0x5a2056(0xc9)](_0x5a2056(0xa6)+_0x20010f);const _0x25f7fe=readSourceFile(_0x20010f),_0xa3a110=convertToRuntimeConfig(_0x25f7fe);_0xb3438f[_0x5a2056(0xcb)]&&(_0xa3a110[_0x5a2056(0xcb)]=String(_0xb3438f['appcode']));_0xb3438f[_0x5a2056(0xa2)]&&(_0xa3a110[_0x5a2056(0xa2)]=resolveInitEnv(_0xb3438f));if(!_0xa3a110[_0x5a2056(0xcb)])throw CliErrors[_0x5a2056(0xc9)]('Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.',_0x5a2056(0xad));await writeInitConfig(_0x30443b,_0xa3a110,_0xb3438f),console[_0x5a2056(0x8b)](_0x5a2056(0xa0)+_0x20010f),console['log'](_0x5a2056(0x98)+_0x30443b),console[_0x5a2056(0x8b)]('\x20\x20appcode:\x20'+_0xa3a110[_0x5a2056(0xcb)]);if(_0xa3a110[_0x5a2056(0xbb)])console[_0x5a2056(0x8b)](_0x5a2056(0xc7)+_0xa3a110[_0x5a2056(0xbb)]);}function convertToRuntimeConfig(_0x1d2b74){const _0x168979=a22_0x143e3e;if(_0x1d2b74[_0x168979(0x99)]&&typeof _0x1d2b74[_0x168979(0x99)]==='object')throw CliErrors[_0x168979(0xc9)]('Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.',_0x168979(0xa1));const _0x590ada={};for(const _0x5af518 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x1d2b74[_0x5af518]!==undefined&&(_0x590ada[_0x5af518]=_0x1d2b74[_0x5af518]);}return!_0x590ada['riskLevel']&&(_0x590ada['riskLevel']=DEFAULT_CONFIG_VALUES['riskLevel']),_0x590ada;}async function runNonInteractive(_0x3b98fa,_0x42bb66){const _0x464799=a22_0x143e3e,_0x1c679c=_0x3b98fa[_0x464799(0xcb)];if(!_0x1c679c)throw CliErrors[_0x464799(0x8f)](_0x464799(0xcb),_0x464799(0x9b)+CLI_BIN_NAME+_0x464799(0xaf));const _0x4bd1f3=resolveInitEnv(_0x3b98fa);await writeInitConfig(_0x42bb66,{'appcode':_0x1c679c,'env':_0x4bd1f3},_0x3b98fa),console[_0x464799(0x8b)]('Initialized\x20'+_0x42bb66),console['log'](_0x464799(0xb8)+_0x1c679c),console[_0x464799(0x8b)](_0x464799(0xb1)+_0x4bd1f3);}async function runInteractive(_0x25a016,_0x5ccbc5){const _0x14ea23=a22_0x143e3e,_0xe99c55=loadExisting(_0x5ccbc5),_0x27701f=typeof _0xe99c55?.[_0x14ea23(0xcb)]==='string'?_0xe99c55['appcode']:'',_0x53ffcc=resolveInitEnv(_0x25a016);console[_0x14ea23(0x8b)](CLI_BIN_NAME+_0x14ea23(0x97));if(existsSync(_0x5ccbc5)&&!_0x25a016[_0x14ea23(0xca)]){const _0xa28859=await promptYesNo(_0x14ea23(0xa8)+_0x5ccbc5+_0x14ea23(0xc3),![]);if(!_0xa28859){console[_0x14ea23(0x8b)](_0x14ea23(0xc4));return;}}const _0x636c00=typeof _0x25a016[_0x14ea23(0xcb)]===_0x14ea23(0x92)?_0x25a016[_0x14ea23(0xcb)][_0x14ea23(0x91)]():'';let _0x1bd67a=_0x636c00;!_0x1bd67a&&(_0x1bd67a=await promptInput('App\x20code',_0x27701f));if(!_0x1bd67a['trim']())throw CliErrors[_0x14ea23(0xc9)](_0x14ea23(0xba));await writeInitConfig(_0x5ccbc5,{'appcode':_0x1bd67a[_0x14ea23(0x91)](),'env':_0x53ffcc},_0x25a016),console['log'](_0x14ea23(0xc6)+_0x5ccbc5),console['log']('\x20\x20appcode:\x20'+_0x1bd67a['trim']()),console[_0x14ea23(0x8b)](_0x14ea23(0xb1)+_0x53ffcc);}async function writeInitConfig(_0xb83909,_0x8a5f41,_0x34437c){const _0x2ba79f=a22_0x143e3e;let _0x2ddb17={};existsSync(_0xb83909)&&!_0x34437c[_0x2ba79f(0xca)]&&(_0x2ddb17=readConfigFile(_0xb83909));for(const [_0x2e2e7e,_0x8fc682]of Object[_0x2ba79f(0x96)](_0x8a5f41)){_0x8fc682!==undefined&&(_0x2ddb17[_0x2e2e7e]=_0x8fc682);}if(_0x2ddb17['app'])delete _0x2ddb17['app'];writeConfigFile(_0xb83909,_0x2ddb17);}class AbortPrompt extends Error{constructor(){const _0x57b663=a22_0x143e3e;super(_0x57b663(0xc0)),this[_0x57b663(0xa3)]='AbortPrompt';}}function createSafeRl(){const _0x3c7dc1=a22_0x143e3e,_0x2f95de=createInterface({'input':process[_0x3c7dc1(0xb9)],'output':process['stdout']});let _0x957ccd;const _0x12fd7a=new Promise((_0x42c9d6,_0x43c59c)=>{const _0x1c2c63=_0x3c7dc1;_0x957ccd=()=>{const _0x1830a1=a22_0x4078;_0x957ccd&&(_0x2f95de[_0x1830a1(0xb3)](_0x1830a1(0xb0),_0x957ccd),_0x957ccd=undefined);try{_0x2f95de[_0x1830a1(0xa7)]();}catch{}_0x43c59c(new AbortPrompt());},_0x2f95de['once'](_0x1c2c63(0xb0),_0x957ccd);}),_0xada519=()=>{const _0x50d619=_0x3c7dc1;_0x957ccd&&(_0x2f95de[_0x50d619(0xb3)](_0x50d619(0xb0),_0x957ccd),_0x957ccd=undefined);try{_0x2f95de[_0x50d619(0xa7)]();}catch{}};return{'rl':_0x2f95de,'abortPromise':_0x12fd7a,'disposeSuccess':_0xada519};}async function promptInput(_0x2861ad,_0x249095){const _0x3d3318=a22_0x143e3e,{rl:_0x40026d,abortPromise:_0xc0fb5e,disposeSuccess:_0x44cd87}=createSafeRl(),_0x4261d8=new Promise(_0x580e1a=>{const _0xebb15e=a22_0x4078,_0x51a551=_0x249095?'\x20\x20'+_0x2861ad+'\x20('+_0x249095+_0xebb15e(0xa9):'\x20\x20'+_0x2861ad+':\x20';_0x40026d[_0xebb15e(0xb4)](_0x51a551,_0x1e401e=>{const _0x71cbf8=_0xebb15e;_0x44cd87(),_0x580e1a(_0x1e401e[_0x71cbf8(0x91)]()||_0x249095);});});return Promise[_0x3d3318(0x9f)]([_0x4261d8,_0xc0fb5e]);}async function promptYesNo(_0x22b335,_0x520e24){const _0x1f0250=a22_0x143e3e,{rl:_0x18409f,abortPromise:_0x1d41a1,disposeSuccess:_0x4cb545}=createSafeRl(),_0x5dd19b=new Promise(_0x234239=>{const _0xc05697=a22_0x4078,_0x476b7d=_0x520e24?_0xc05697(0x9d):'[y/N]';_0x18409f[_0xc05697(0xb4)]('\x20\x20'+_0x22b335+'\x20'+_0x476b7d+':\x20',_0x5cf632=>{const _0x5a73bd=_0xc05697;_0x4cb545();const _0x32bc52=_0x5cf632['trim']()[_0x5a73bd(0x8d)]();if(_0x32bc52==='y'||_0x32bc52===_0x5a73bd(0xca))_0x234239(!![]);else{if(_0x32bc52==='n'||_0x32bc52==='no')_0x234239(![]);else _0x234239(_0x520e24);}});});return Promise[_0x1f0250(0x9f)]([_0x5dd19b,_0x1d41a1]);}function loadExisting(_0x4a8203){if(!existsSync(_0x4a8203))return null;return readConfigFile(_0x4a8203);}function resolveFilePath(_0x54afc6){return isAbsolute(_0x54afc6)?_0x54afc6:resolve(process['cwd'](),_0x54afc6);}function a22_0x4078(_0x596be6,_0x551d28){_0x596be6=_0x596be6-0x89;const _0x25a6d2=a22_0x25a6();let _0x4078bb=_0x25a6d2[_0x596be6];return _0x4078bb;}function readSourceFile(_0x150583){const _0x4b7b17=a22_0x143e3e;try{const _0x29ffe3=readFileSync(_0x150583,{'encoding':_0x4b7b17(0x8e)});return JSON[_0x4b7b17(0xb6)](_0x29ffe3);}catch(_0x5de5e8){throw CliErrors[_0x4b7b17(0xc9)](_0x4b7b17(0x9a)+_0x5de5e8[_0x4b7b17(0xa5)]);}}function resolveInitEnv(_0x166b02){const _0x70fbbe=a22_0x143e3e,_0x2bd18f=_0x166b02[_0x70fbbe(0xa2)];if(_0x2bd18f===undefined||_0x2bd18f==='')return DEFAULT_CONFIG_VALUES[_0x70fbbe(0xa2)];if(!RUNTIME_ENV_VALUES[_0x70fbbe(0xc2)](_0x2bd18f))throw CliErrors[_0x70fbbe(0xc9)](_0x70fbbe(0xae)+_0x2bd18f+'\x22.\x20Allowed:\x20'+RUNTIME_ENV_VALUES[_0x70fbbe(0x93)](',\x20'));return _0x2bd18f;}
|
|
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
|
-
function
|
|
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
|
-
const
|
|
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
|
-
const
|
|
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
|
-
function
|
|
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)]}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a31_0x587d(_0x3b43e0,_0x3416a7){_0x3b43e0=_0x3b43e0-0xa3;const _0x1be418=a31_0x1be4();let _0x587d65=_0x1be418[_0x3b43e0];return _0x587d65;}const a31_0x56dd8b=a31_0x587d;function a31_0x1be4(){const _0x45eeff=['14jStACE','30519JegSHd','compress','52WKrNWw','5000456KkWwZl','12IceYyj','17700111utMwRW','production','2PfbHlF','346668VYdkZw','202926uqmIpb','5658375XeLMXf','write','en-US','5194998BaeUeA','2270ijZDtv'];a31_0x1be4=function(){return _0x45eeff;};return a31_0x1be4();}(function(_0x2c4edd,_0x57cbf4){const _0x57f899=a31_0x587d,_0x49e229=_0x2c4edd();while(!![]){try{const _0x2c24cc=parseInt(_0x57f899(0xa8))/0x1*(-parseInt(_0x57f899(0xa7))/0x2)+parseInt(_0x57f899(0xa9))/0x3*(parseInt(_0x57f899(0xb2))/0x4)+-parseInt(_0x57f899(0xaa))/0x5+parseInt(_0x57f899(0xad))/0x6+parseInt(_0x57f899(0xaf))/0x7*(parseInt(_0x57f899(0xa3))/0x8)+parseInt(_0x57f899(0xb0))/0x9*(parseInt(_0x57f899(0xae))/0xa)+-parseInt(_0x57f899(0xa5))/0xb*(parseInt(_0x57f899(0xa4))/0xc);if(_0x2c24cc===_0x57cbf4)break;else _0x49e229['push'](_0x49e229['shift']());}catch(_0x466a79){_0x49e229['push'](_0x49e229['shift']());}}}(a31_0x1be4,0xa56e6));export const DEFAULT_APP_PROFILE_NAME='main';export const DEFAULT_CONFIG_VALUES={'env':a31_0x56dd8b(0xa6),'format':a31_0x56dd8b(0xb1),'locale':a31_0x56dd8b(0xac),'riskLevel':a31_0x56dd8b(0xab)};export const DEFAULT_COMMAND_OUTPUT_FORMAT=a31_0x56dd8b(0xb1);
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a32_0x125c6d=a32_0x4fc6;function a32_0x4fc6(_0x2e5fdf,_0x3cd2ce){_0x2e5fdf=_0x2e5fdf-0x135;const _0x59b3b2=a32_0x59b3();let _0x4fc62b=_0x59b3b2[_0x2e5fdf];return _0x4fc62b;}(function(_0x490b9d,_0x28dd1b){const _0x3763ae=a32_0x4fc6,_0x76154=_0x490b9d();while(!![]){try{const _0x428863=-parseInt(_0x3763ae(0x13a))/0x1+parseInt(_0x3763ae(0x138))/0x2+parseInt(_0x3763ae(0x13d))/0x3+-parseInt(_0x3763ae(0x13f))/0x4*(parseInt(_0x3763ae(0x136))/0x5)+-parseInt(_0x3763ae(0x13b))/0x6*(parseInt(_0x3763ae(0x141))/0x7)+-parseInt(_0x3763ae(0x137))/0x8*(parseInt(_0x3763ae(0x13e))/0x9)+parseInt(_0x3763ae(0x144))/0xa;if(_0x428863===_0x28dd1b)break;else _0x76154['push'](_0x76154['shift']());}catch(_0x2a5181){_0x76154['push'](_0x76154['shift']());}}}(a32_0x59b3,0xb59f2));import{getEnv,isProduction}from'../constant/env.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x31ea63){const _0x10f4a4=a32_0x4fc6;customApiDomain=_0x31ea63?.[_0x10f4a4(0x135)],customUserDomain=_0x31ea63?.[_0x10f4a4(0x143)],customRuntimeDomain=_0x31ea63?.['runtimeDomain'];}function a32_0x59b3(){const _0x5d381a=['https://daily-api.lovrabet.com','827702oYbYtM','5838RkYpIK','https://api.lovrabet.com','4024899XznPrX','27LEtpaW','4vgWpTh','https://user.lovrabet.com','9947yscUnM','https://user-daily.lovrabet.com','userDomain','22760620tOYFWf','apiDomain','3057130vJuMts','1076704MeUCWH','703504DKWQrr'];a32_0x59b3=function(){return _0x5d381a;};return a32_0x59b3();}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?a32_0x125c6d(0x140):a32_0x125c6d(0x142));export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?a32_0x125c6d(0x13c):a32_0x125c6d(0x139));export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?'https://runtime.lovrabet.com':'https://daily-runtime.lovrabet.com');
|