@lovrabet/lovrabet-cli 2.1.18 → 2.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/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/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/flags.d.ts +1 -0
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.d.ts +9 -0
- package/lib/skills/runtime-skill-sync/install-target.js +1 -0
- package/lib/skills/runtime-skill-sync/links.d.ts +5 -4
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.d.ts +2 -2
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/types.d.ts +17 -0
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.d.ts +2 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a120_0x29f6dc=a120_0x2a99;(function(_0x524988,_0x109dda){const _0x3b7de6=a120_0x2a99,_0x3fe19b=_0x524988();while(!![]){try{const _0x56a6d1=-parseInt(_0x3b7de6(0x1e7))/0x1+-parseInt(_0x3b7de6(0x214))/0x2*(parseInt(_0x3b7de6(0x1f9))/0x3)+-parseInt(_0x3b7de6(0x218))/0x4*(parseInt(_0x3b7de6(0x1ec))/0x5)+parseInt(_0x3b7de6(0x20a))/0x6+parseInt(_0x3b7de6(0x1f0))/0x7*(parseInt(_0x3b7de6(0x208))/0x8)+parseInt(_0x3b7de6(0x213))/0x9*(parseInt(_0x3b7de6(0x1de))/0xa)+parseInt(_0x3b7de6(0x20f))/0xb*(-parseInt(_0x3b7de6(0x211))/0xc);if(_0x56a6d1===_0x109dda)break;else _0x3fe19b['push'](_0x3fe19b['shift']());}catch(_0x5032f3){_0x3fe19b['push'](_0x3fe19b['shift']());}}}(a120_0x1bbb,0xe2a76));import a120_0x102a10 from'winston';import a120_0x5ec9f9 from'node:fs';import a120_0x9f873a from'node:path';function a120_0x2a99(_0x2a1c49,_0x547a2d){_0x2a1c49=_0x2a1c49-0x1dd;const _0x1bbb62=a120_0x1bbb();let _0x2a9980=_0x1bbb62[_0x2a1c49];return _0x2a9980;}import{PRODUCT_CONFIG}from'../constant/product.js';function a120_0x1bbb(){const _0x39aec4=['info','30qQxvRo','duration','logTask','writeFileSync','format','printf','Starting:\x20','readLogs','toISOString','604268WBCjCB','currentRawCommand','map','logFileName','blue','902350PXYcNw','warn','winstonLogger','setRawCommand','21cXKgdF','yellow','parse','transports','addColors','Failed\x20to\x20read\x20logs:','Completed:\x20','dirname','now','8619RYZZTN','logFilePath','green','rawCommand','initWinstonLogger','join','errors','error','success','details','Failed:\x20','stringify','message','split','log','472664BGifzO','combine','2743872tBeNKh','utf8','red','existsSync','getWinstonInstance','11BvsBDV','command','1156008uZEDoF','timestamp','4231413RgKPRq','164nHvtqq','filter','readFileSync','unknown','4wgmGQF'];a120_0x1bbb=function(){return _0x39aec4;};return a120_0x1bbb();}class Logger{[a120_0x29f6dc(0x1ee)];[a120_0x29f6dc(0x1fa)]='';[a120_0x29f6dc(0x1e8)]='';constructor(){}[a120_0x29f6dc(0x1ef)](_0x591d04){const _0x3e8ff1=a120_0x29f6dc;this[_0x3e8ff1(0x1e8)]=_0x591d04;}['setLogPath'](_0x217420){const _0x514969=a120_0x29f6dc;this[_0x514969(0x1fa)]=a120_0x9f873a[_0x514969(0x1fe)](_0x217420,PRODUCT_CONFIG[_0x514969(0x1ea)]),this[_0x514969(0x1ee)]&&this['winstonLogger']['clear'](),this['initWinstonLogger']();}[a120_0x29f6dc(0x1fd)](){const _0x1d811f=a120_0x29f6dc,_0x5a9b61=a120_0x9f873a[_0x1d811f(0x1f7)](this[_0x1d811f(0x1fa)]);!a120_0x5ec9f9[_0x1d811f(0x20d)](_0x5a9b61)&&a120_0x5ec9f9['mkdirSync'](_0x5a9b61,{'recursive':!![]});const _0x1a0ce5=a120_0x102a10[_0x1d811f(0x1e2)][_0x1d811f(0x209)](a120_0x102a10[_0x1d811f(0x1e2)]['timestamp'](),a120_0x102a10['format'][_0x1d811f(0x1ff)]({'stack':!![]}),a120_0x102a10[_0x1d811f(0x1e2)][_0x1d811f(0x1e3)](_0x362e9b=>{const _0x390bc2=_0x1d811f,_0x3afbe3={'timestamp':_0x362e9b[_0x390bc2(0x212)]||new Date()[_0x390bc2(0x1e6)](),'level':_0x362e9b['level']||_0x390bc2(0x1dd),'command':_0x362e9b[_0x390bc2(0x210)]||_0x390bc2(0x217),'rawCommand':_0x362e9b[_0x390bc2(0x1fc)]||this[_0x390bc2(0x1e8)]||undefined,'message':_0x362e9b[_0x390bc2(0x205)]||'','duration':_0x362e9b[_0x390bc2(0x1df)]||undefined,'details':_0x362e9b[_0x390bc2(0x202)]||undefined};return JSON[_0x390bc2(0x204)](_0x3afbe3);}));this['winstonLogger']=a120_0x102a10['createLogger']({'level':_0x1d811f(0x1dd),'format':_0x1a0ce5,'transports':[new a120_0x102a10[(_0x1d811f(0x1f3))]['File']({'filename':this[_0x1d811f(0x1fa)],'level':'info'})],'silent':![]}),a120_0x102a10[_0x1d811f(0x1f4)]({'success':_0x1d811f(0x1fb),'error':_0x1d811f(0x20c),'warn':_0x1d811f(0x1f1),'info':_0x1d811f(0x1eb)});}[a120_0x29f6dc(0x1dd)](_0x5a8d4b,_0x5f5b75,_0x307559){const _0x5bcb93=a120_0x29f6dc;if(!this['logFilePath']||!this[_0x5bcb93(0x1ee)])return;this[_0x5bcb93(0x1ee)]['info'](_0x5f5b75,{'command':_0x5a8d4b,'details':_0x307559});}[a120_0x29f6dc(0x201)](_0x401f1c,_0x42b9ea,_0x1b256d,_0x1c928f){const _0x189a08=a120_0x29f6dc;if(!this[_0x189a08(0x1fa)]||!this[_0x189a08(0x1ee)])return;this[_0x189a08(0x1ee)][_0x189a08(0x207)](_0x189a08(0x1dd),_0x42b9ea,{'level':_0x189a08(0x201),'command':_0x401f1c,'duration':_0x1b256d,'details':_0x1c928f});}[a120_0x29f6dc(0x200)](_0x2d5b8e,_0x416291,_0x2d75b2){const _0x152c9b=a120_0x29f6dc;if(!this[_0x152c9b(0x1fa)]||!this[_0x152c9b(0x1ee)])return;this[_0x152c9b(0x1ee)][_0x152c9b(0x200)](_0x416291,{'command':_0x2d5b8e,'details':_0x2d75b2});}['warn'](_0xfae28a,_0x121720,_0x2d63de){const _0x413d8a=a120_0x29f6dc;if(!this[_0x413d8a(0x1fa)]||!this['winstonLogger'])return;this[_0x413d8a(0x1ee)][_0x413d8a(0x1ed)](_0x121720,{'command':_0xfae28a,'details':_0x2d63de});}async[a120_0x29f6dc(0x1e0)](_0x36bdb9,_0x36dcf6,_0x51b571){const _0xcb50fb=a120_0x29f6dc,_0x15ecf5=Date[_0xcb50fb(0x1f8)]();this[_0xcb50fb(0x1dd)](_0x36bdb9,_0xcb50fb(0x1e4)+_0x36dcf6);try{const _0x462a29=await _0x51b571(),_0xbc6442=Date[_0xcb50fb(0x1f8)]()-_0x15ecf5;return this[_0xcb50fb(0x201)](_0x36bdb9,_0xcb50fb(0x1f6)+_0x36dcf6,_0xbc6442),_0x462a29;}catch(_0x446255){const _0x16fa69=Date['now']()-_0x15ecf5;this[_0xcb50fb(0x200)](_0x36bdb9,_0xcb50fb(0x203)+_0x36dcf6,{'error':_0x446255 instanceof Error?_0x446255[_0xcb50fb(0x205)]:String(_0x446255),'duration':_0x16fa69});throw _0x446255;}}[a120_0x29f6dc(0x1e5)](){const _0x3e606f=a120_0x29f6dc;try{if(!a120_0x5ec9f9[_0x3e606f(0x20d)](this[_0x3e606f(0x1fa)]))return[];const _0xb387db=a120_0x5ec9f9[_0x3e606f(0x216)](this['logFilePath'],_0x3e606f(0x20b));return _0xb387db[_0x3e606f(0x206)](/\r?\n/)[_0x3e606f(0x215)](_0x4427ad=>_0x4427ad['trim']())[_0x3e606f(0x1e9)](_0x57c750=>JSON[_0x3e606f(0x1f2)](_0x57c750));}catch(_0x412162){return console['warn'](_0x3e606f(0x1f5),_0x412162),[];}}['clearLogs'](){const _0x503456=a120_0x29f6dc;try{a120_0x5ec9f9[_0x503456(0x20d)](this[_0x503456(0x1fa)])&&a120_0x5ec9f9[_0x503456(0x1e1)](this[_0x503456(0x1fa)],'',_0x503456(0x20b));}catch(_0x4e7e75){console[_0x503456(0x1ed)]('Failed\x20to\x20clear\x20logs:',_0x4e7e75);}}[a120_0x29f6dc(0x20e)](){const _0x5deed6=a120_0x29f6dc;return this[_0x5deed6(0x1ee)];}}export const logger=new Logger();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a121_0x319498=a121_0x2add;function a121_0x2add(_0x47b631,_0x513159){_0x47b631=_0x47b631-0x172;const _0x19f111=a121_0x19f1();let _0x2add94=_0x19f111[_0x47b631];return _0x2add94;}(function(_0x33dade,_0x375a1f){const _0x24883a=a121_0x2add,_0x2782af=_0x33dade();while(!![]){try{const _0x54a3b7=-parseInt(_0x24883a(0x172))/0x1*(-parseInt(_0x24883a(0x17c))/0x2)+parseInt(_0x24883a(0x183))/0x3*(parseInt(_0x24883a(0x184))/0x4)+parseInt(_0x24883a(0x17f))/0x5+parseInt(_0x24883a(0x173))/0x6+parseInt(_0x24883a(0x175))/0x7+parseInt(_0x24883a(0x186))/0x8*(parseInt(_0x24883a(0x178))/0x9)+-parseInt(_0x24883a(0x176))/0xa;if(_0x54a3b7===_0x375a1f)break;else _0x2782af['push'](_0x2782af['shift']());}catch(_0xe15f92){_0x2782af['push'](_0x2782af['shift']());}}}(a121_0x19f1,0xc9b73));const JSON_NUMBER_PATTERN=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/,MAX_SAFE_INTEGER=BigInt(Number[a121_0x319498(0x185)]),MIN_SAFE_INTEGER=BigInt(Number['MIN_SAFE_INTEGER']);function a121_0x19f1(){const _0x438a49=['3119635QfiHmQ','exec','text','defineProperty','66gCdEdk','98784IKSCkc','MAX_SAFE_INTEGER','16znYHIB','json','322rowems','3960900BTSwBa','slice','7796418NPXuKh','45868060YVtVGi','undefined','4110255JmmdmE','parse','length','includes','9680cFoiWY','getOwnPropertyDescriptor','prototype'];a121_0x19f1=function(){return _0x438a49;};return a121_0x19f1();}let restoreResponseJsonParser,responseJsonPrototype,originalResponseJsonDescriptor;function isUnsafeIntegerLiteral(_0x4476b9){const _0x58292d=a121_0x319498;if(_0x4476b9[_0x58292d(0x17b)]('.')||_0x4476b9[_0x58292d(0x17b)]('e')||_0x4476b9[_0x58292d(0x17b)]('E'))return![];const _0x23cb24=BigInt(_0x4476b9);return _0x23cb24>MAX_SAFE_INTEGER||_0x23cb24<MIN_SAFE_INTEGER;}function quoteUnsafeIntegerLiterals(_0x48476a){const _0x1f6156=a121_0x319498;let _0xd5e98c='',_0x1434ac=![],_0x409e04=![];for(let _0x370426=0x0;_0x370426<_0x48476a[_0x1f6156(0x17a)];){const _0x58a790=_0x48476a[_0x370426];if(_0x1434ac){_0xd5e98c+=_0x58a790,_0x370426+=0x1;if(_0x409e04)_0x409e04=![];else{if(_0x58a790==='\x5c')_0x409e04=!![];else _0x58a790==='\x22'&&(_0x1434ac=![]);}continue;}if(_0x58a790==='\x22'){_0x1434ac=!![],_0xd5e98c+=_0x58a790,_0x370426+=0x1;continue;}if(_0x58a790==='-'||_0x58a790>='0'&&_0x58a790<='9'){const _0x8816e0=JSON_NUMBER_PATTERN[_0x1f6156(0x180)](_0x48476a[_0x1f6156(0x174)](_0x370426))?.[0x0];if(_0x8816e0){_0xd5e98c+=isUnsafeIntegerLiteral(_0x8816e0)?'\x22'+_0x8816e0+'\x22':_0x8816e0,_0x370426+=_0x8816e0[_0x1f6156(0x17a)];continue;}}_0xd5e98c+=_0x58a790,_0x370426+=0x1;}return _0xd5e98c;}export function parseLosslessJson(_0x148bee){const _0x1ab7d7=a121_0x319498;return JSON[_0x1ab7d7(0x179)](quoteUnsafeIntegerLiterals(_0x148bee));}export function installLosslessJsonResponseParser(){const _0xc85f64=a121_0x319498;if(typeof Response===_0xc85f64(0x177))return()=>{};if(restoreResponseJsonParser)return restoreResponseJsonParser;return responseJsonPrototype=Response[_0xc85f64(0x17e)],originalResponseJsonDescriptor=Object[_0xc85f64(0x17d)](responseJsonPrototype,_0xc85f64(0x187)),Object[_0xc85f64(0x182)](responseJsonPrototype,_0xc85f64(0x187),{...originalResponseJsonDescriptor??{'configurable':!![],'enumerable':![],'writable':!![]},'value':async function _0x5d4d24(){const _0x171da9=_0xc85f64;return parseLosslessJson(await this[_0x171da9(0x181)]());}}),restoreResponseJsonParser=()=>{const _0x644e45=_0xc85f64;if(!responseJsonPrototype)return;originalResponseJsonDescriptor?Object[_0x644e45(0x182)](responseJsonPrototype,_0x644e45(0x187),originalResponseJsonDescriptor):delete responseJsonPrototype[_0x644e45(0x187)],responseJsonPrototype=undefined,originalResponseJsonDescriptor=undefined,restoreResponseJsonParser=undefined;},restoreResponseJsonParser;}export function restoreLosslessJsonResponseParser(){restoreResponseJsonParser?.();}
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a122_0x18ca(_0x4a03e9,_0x386fc3){_0x4a03e9=_0x4a03e9-0x17b;const _0x576ed5=a122_0x576e();let _0x18caa2=_0x576ed5[_0x4a03e9];return _0x18caa2;}(function(_0x3f1678,_0x414887){const _0xe52ff3=a122_0x18ca,_0x58fce0=_0x3f1678();while(!![]){try{const _0xfc6293=parseInt(_0xe52ff3(0x188))/0x1*(-parseInt(_0xe52ff3(0x17e))/0x2)+-parseInt(_0xe52ff3(0x183))/0x3+-parseInt(_0xe52ff3(0x187))/0x4*(-parseInt(_0xe52ff3(0x17b))/0x5)+-parseInt(_0xe52ff3(0x180))/0x6+parseInt(_0xe52ff3(0x18d))/0x7*(parseInt(_0xe52ff3(0x18a))/0x8)+parseInt(_0xe52ff3(0x184))/0x9+-parseInt(_0xe52ff3(0x182))/0xa;if(_0xfc6293===_0x414887)break;else _0x58fce0['push'](_0x58fce0['shift']());}catch(_0x3b1c5d){_0x58fce0['push'](_0x58fce0['shift']());}}}(a122_0x576e,0x87c41));import{CliErrors}from'../errors.js';import{parseLosslessJson}from'../utils/lossless-json.js';export const MAX_DATA_UPDATE_IDS=0x3e8;export function parseJsonParams(_0x410d36){const _0x20d1d6=a122_0x18ca;if(!_0x410d36)return undefined;try{return parseLosslessJson(_0x410d36);}catch{throw CliErrors[_0x20d1d6(0x18c)](_0x20d1d6(0x192)+_0x410d36);}}export function parseJsonParamsValue(_0x6be158){const _0x5ed4b8=a122_0x18ca;if(!_0x6be158)return undefined;try{return parseLosslessJson(_0x6be158);}catch{throw CliErrors[_0x5ed4b8(0x18c)]('Invalid\x20JSON\x20for\x20--params:\x20'+_0x6be158);}}function a122_0x576e(){const _0x12b6a6=['13153FUaKtm','isArray','96wlgaOE','isSafeInteger','validation','527303kEcVEA','data\x20update\x20id\x20array\x20cannot\x20be\x20empty.','items','object','batchCreate\x20--params\x20must\x20be\x20a\x20JSON\x20array\x20or\x20{\x22items\x22:[...]}','Invalid\x20JSON\x20for\x20--params:\x20','Example:\x20--params\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22done\x22}\x27','5btdiOd','join','data\x20update\x20--params.','6KTsHJt','string','3632646OOznhb','\x20must\x20be\x20a\x20positive\x20integer\x20or\x20numeric\x20string.','6311570ODOFkn','378927sNhrqY','7569216VqeSBw','number','length','853964bisEgI'];a122_0x576e=function(){return _0x12b6a6;};return a122_0x576e();}export function parseBatchCreateItemsFromParams(_0x13275e){const _0xb20f67=a122_0x18ca;if(Array[_0xb20f67(0x189)](_0x13275e))return _0x13275e;if(_0x13275e!==null&&_0x13275e!==undefined&&typeof _0x13275e===_0xb20f67(0x190)&&Array[_0xb20f67(0x189)](_0x13275e['items']))return _0x13275e[_0xb20f67(0x18f)];throw CliErrors[_0xb20f67(0x18c)](_0xb20f67(0x191),'Example:\x20--params\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27');}function parseDataUpdateId(_0x12b140,_0x25731f){const _0x1cc5fd=a122_0x18ca;if(typeof _0x12b140===_0x1cc5fd(0x185)&&Number[_0x1cc5fd(0x18b)](_0x12b140)&&_0x12b140>0x0)return _0x12b140;if(typeof _0x12b140===_0x1cc5fd(0x17f)){if(/^[1-9]\d*$/['test'](_0x12b140))return _0x12b140;}throw CliErrors[_0x1cc5fd(0x18c)](_0x1cc5fd(0x17d)+_0x25731f+_0x1cc5fd(0x181));}export function parseUpdateIdsFromParams(_0x5d7ecf){const _0x484ab7=a122_0x18ca;if(_0x5d7ecf===null||_0x5d7ecf===undefined||typeof _0x5d7ecf!=='object'||Array['isArray'](_0x5d7ecf))throw CliErrors[_0x484ab7(0x18c)]('data\x20update\x20--params\x20must\x20be\x20a\x20JSON\x20object\x20with\x20id.',_0x484ab7(0x193));const _0x375d26=_0x5d7ecf['id'];if(_0x375d26===undefined||_0x375d26===null)throw CliErrors['validation']('data\x20update\x20requires\x20\x22id\x22\x20in\x20--params.',_0x484ab7(0x193));const _0x58ca2d=Array['isArray'](_0x375d26)?_0x375d26:[_0x375d26];if(_0x58ca2d[_0x484ab7(0x186)]===0x0)throw CliErrors[_0x484ab7(0x18c)](_0x484ab7(0x18e));if(_0x58ca2d[_0x484ab7(0x186)]>MAX_DATA_UPDATE_IDS)throw CliErrors[_0x484ab7(0x18c)]('data\x20update\x20can\x20update\x20at\x20most\x20'+MAX_DATA_UPDATE_IDS+'\x20records\x20per\x20call;\x20received\x20'+_0x58ca2d[_0x484ab7(0x186)]+'.');return _0x58ca2d['map']((_0x1693bb,_0x3974b7)=>parseDataUpdateId(_0x1693bb,Array[_0x484ab7(0x189)](_0x375d26)?'id['+_0x3974b7+']':'id'));}export function normalizeUpdateParamsForRuntime(_0x2d4c81,_0x4c9316){const _0x58bfe9=a122_0x18ca;if(Array[_0x58bfe9(0x189)](_0x2d4c81['id'])&&_0x4c9316[_0x58bfe9(0x186)]>0x1)return{..._0x2d4c81,'id':_0x4c9316[_0x58bfe9(0x17c)](',')};return _0x2d4c81;}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a123_0xcd0d(_0x1060f1,_0x21984e){_0x1060f1=_0x1060f1-0x81;const _0x4c6e85=a123_0x4c6e();let _0xcd0db0=_0x4c6e85[_0x1060f1];return _0xcd0db0;}const a123_0x15a76d=a123_0xcd0d;function a123_0x4c6e(){const _0xa3d8f8=['200vepRUz','1qQhSKX','4107704LCXQwb','270EZqdbY','.cmd','447dqXDAR','win32','7BwwyAz','1574487QbCCfe','1712RUzFXP','221199QyoNik','446924ygQnLv','platform','11691192NYTncs','40062atwCJE'];a123_0x4c6e=function(){return _0xa3d8f8;};return a123_0x4c6e();}(function(_0x373e40,_0x43a737){const _0x3d2b74=a123_0xcd0d,_0x9de9ef=_0x373e40();while(!![]){try{const _0x3e88c3=-parseInt(_0x3d2b74(0x8c))/0x1*(-parseInt(_0x3d2b74(0x87))/0x2)+-parseInt(_0x3d2b74(0x81))/0x3*(-parseInt(_0x3d2b74(0x85))/0x4)+-parseInt(_0x3d2b74(0x8b))/0x5*(parseInt(_0x3d2b74(0x8a))/0x6)+parseInt(_0x3d2b74(0x83))/0x7*(parseInt(_0x3d2b74(0x8d))/0x8)+parseInt(_0x3d2b74(0x84))/0x9+parseInt(_0x3d2b74(0x8e))/0xa*(parseInt(_0x3d2b74(0x86))/0xb)+-parseInt(_0x3d2b74(0x89))/0xc;if(_0x3e88c3===_0x43a737)break;else _0x9de9ef['push'](_0x9de9ef['shift']());}catch(_0x2eda7e){_0x9de9ef['push'](_0x9de9ef['shift']());}}}(a123_0x4c6e,0x43af5));export const isWindows=process[a123_0x15a76d(0x88)]===a123_0x15a76d(0x82);export function resolveNpmBin(_0x45094c){const _0x524684=a123_0x15a76d;return isWindows?_0x45094c+_0x524684(0x8f):_0x45094c;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x37162b,_0x5c3398){const _0x4c66ea=a124_0x5d85,_0x448459=_0x37162b();while(!![]){try{const _0x49e938=-parseInt(_0x4c66ea(0x1cb))/0x1*(-parseInt(_0x4c66ea(0x1dd))/0x2)+parseInt(_0x4c66ea(0x1d4))/0x3+parseInt(_0x4c66ea(0x1c9))/0x4+-parseInt(_0x4c66ea(0x1df))/0x5+parseInt(_0x4c66ea(0x1de))/0x6+-parseInt(_0x4c66ea(0x1d3))/0x7+parseInt(_0x4c66ea(0x1d0))/0x8;if(_0x49e938===_0x5c3398)break;else _0x448459['push'](_0x448459['shift']());}catch(_0x1cddbb){_0x448459['push'](_0x448459['shift']());}}}(a124_0x22fb,0x84162));import{mkdir,readFile,writeFile}from'node:fs/promises';function a124_0x5d85(_0x2b72d2,_0x431933){_0x2b72d2=_0x2b72d2-0x1c8;const _0x22fb0d=a124_0x22fb();let _0x5d85da=_0x22fb0d[_0x2b72d2];return _0x5d85da;}import{homedir}from'node:os';import{dirname,join}from'node:path';import{LOVRABET_NPM_PACKAGE_NAME,NPM_REGISTRY_BASE_URL}from'../constant/distribution.js';import{CLI_BIN_NAME}from'../constant/cli.js';function a124_0x22fb(){const _0x1b3abc=['1871253Tzajqx','fromEntries','entries','Invalid\x20semver','json','filter','/v/','string','minor','2zzvMHm','2000904TVnfzB','3827940gSqEDK',',\x20run:\x20','\x20available,\x20current\x20','checkedAt','utf8','/dist-tags','number','object','trim','.cache','true','lovrabet-cli','toLowerCase','patch','/-/package/','timeout','latest','3190528Tlggqh','update-check.json','104161bsHeGB','map','yes','prerelease','\x20update','1364208YweYEc','now','lastNotifiedAt','5060580kyCDFq'];a124_0x22fb=function(){return _0x1b3abc;};return a124_0x22fb();}import{getCliVersion}from'../utils/version.js';const UPDATE_CHECK_TTL_MS=0xc*0x3c*0x3c*0x3e8,UPDATE_NOTICE_TTL_MS=0x18*0x3c*0x3c*0x3e8;function parseSemver(_0x2179a0){const _0x4b0fdb=a124_0x5d85,_0x28777c=_0x2179a0[_0x4b0fdb(0x1e7)]()['match'](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x28777c)return null;return{'major':Number(_0x28777c[0x1]),'minor':Number(_0x28777c[0x2]),'patch':Number(_0x28777c[0x3]),'prerelease':_0x28777c[0x4]};}function compareSemver(_0x214324,_0xa7d558){const _0x16154e=a124_0x5d85,_0x518c62=parseSemver(_0x214324),_0x235d20=parseSemver(_0xa7d558);if(!_0x518c62||!_0x235d20)throw new Error(_0x16154e(0x1d7));for(const _0x4bacbb of['major',_0x16154e(0x1dc),_0x16154e(0x1ec)]){if(_0x518c62[_0x4bacbb]<_0x235d20[_0x4bacbb])return-0x1;if(_0x518c62[_0x4bacbb]>_0x235d20[_0x4bacbb])return 0x1;}if(!_0x518c62[_0x16154e(0x1ce)]&&!_0x235d20[_0x16154e(0x1ce)])return 0x0;if(!_0x518c62[_0x16154e(0x1ce)])return 0x1;if(!_0x235d20['prerelease'])return-0x1;if(_0x518c62[_0x16154e(0x1ce)]===_0x235d20[_0x16154e(0x1ce)])return 0x0;return _0x518c62[_0x16154e(0x1ce)]<_0x235d20[_0x16154e(0x1ce)]?-0x1:0x1;}function isUpdateNoticeDisabled(){const _0x5f2d3b=a124_0x5d85,_0x4af9e6=process.env.LOVRABET_NO_UPDATE_NOTICE?.[_0x5f2d3b(0x1e7)]()[_0x5f2d3b(0x1eb)]();return _0x4af9e6==='1'||_0x4af9e6===_0x5f2d3b(0x1e9)||_0x4af9e6===_0x5f2d3b(0x1cd);}function cacheRoot(){const _0x323a39=a124_0x5d85;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0x323a39(0x1e8));}export function getUpdateNoticeCachePath(){const _0x4bc7f4=a124_0x5d85;return join(cacheRoot(),_0x4bc7f4(0x1ea),_0x4bc7f4(0x1ca));}async function readUpdateNoticeCache(){const _0x79fef6=a124_0x5d85;try{const _0x5e499e=await readFile(getUpdateNoticeCachePath(),_0x79fef6(0x1e3)),_0x1de8bf=JSON['parse'](_0x5e499e);if(!_0x1de8bf||typeof _0x1de8bf!==_0x79fef6(0x1e6))return{};return _0x1de8bf;}catch{return{};}}async function writeUpdateNoticeCache(_0x100ef6){try{const _0x501744=getUpdateNoticeCachePath();await mkdir(dirname(_0x501744),{'recursive':!![]}),await writeFile(_0x501744,JSON['stringify'](_0x100ef6,null,0x2)+'\x0a','utf8');}catch{}}function isFreshCheck(_0x4b1432,_0x13405d){const _0x514c34=a124_0x5d85;return typeof _0x4b1432[_0x514c34(0x1e2)]===_0x514c34(0x1e5)&&_0x13405d-_0x4b1432[_0x514c34(0x1e2)]<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x46ebc5,_0x104f5d,_0x337356){const _0x11f2c6=a124_0x5d85;return _0x46ebc5['lastNotifiedVersion']===_0x104f5d&&typeof _0x46ebc5[_0x11f2c6(0x1d2)]===_0x11f2c6(0x1e5)&&_0x337356-_0x46ebc5[_0x11f2c6(0x1d2)]<UPDATE_NOTICE_TTL_MS;}async function fetchNpmDistTags(_0xa8531a=0x5dc){const _0x2f490d=a124_0x5d85;try{const _0x177f7a=NPM_REGISTRY_BASE_URL+_0x2f490d(0x1ed)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x2f490d(0x1e4),_0x9e69e1=await fetch(_0x177f7a,{'signal':AbortSignal[_0x2f490d(0x1ee)](_0xa8531a)});if(!_0x9e69e1['ok'])return null;const _0x452800=await _0x9e69e1[_0x2f490d(0x1d8)]();if(!_0x452800||typeof _0x452800!==_0x2f490d(0x1e6))return null;return Object[_0x2f490d(0x1d5)](Object[_0x2f490d(0x1d6)](_0x452800)[_0x2f490d(0x1d9)](([,_0x165d76])=>typeof _0x165d76===_0x2f490d(0x1db)&&_0x165d76['trim']())[_0x2f490d(0x1cc)](([_0x533443,_0x3c914a])=>[_0x533443,String(_0x3c914a)['trim']()]));}catch{return null;}}export function buildNpmVersionUrl(_0x4e5a8c){const _0x2e61bd=a124_0x5d85;return'https://www.npmjs.com/package/'+LOVRABET_NPM_PACKAGE_NAME+_0x2e61bd(0x1da)+_0x4e5a8c;}export async function resolveLatestUpdateNotice(){const _0x3984d1=a124_0x5d85;if(isUpdateNoticeDisabled())return null;try{const _0x524abb=Date[_0x3984d1(0x1d1)](),_0x312535=getCliVersion(),_0x204e92=await readUpdateNoticeCache();let _0x44a80a=isFreshCheck(_0x204e92,_0x524abb)?_0x204e92['latest']?.[_0x3984d1(0x1e7)]():undefined;if(!_0x44a80a&&!isFreshCheck(_0x204e92,_0x524abb)){const _0x572c6f=await fetchNpmDistTags();_0x44a80a=_0x572c6f?.[_0x3984d1(0x1c8)]?.[_0x3984d1(0x1e7)](),await writeUpdateNoticeCache({..._0x204e92,'checkedAt':_0x524abb,'latest':_0x44a80a,'failed':!_0x44a80a});}if(!_0x44a80a||compareSemver(_0x312535,_0x44a80a)>=0x0)return null;if(isRecentlyNotified(_0x204e92,_0x44a80a,_0x524abb))return null;const _0x102a2c=CLI_BIN_NAME+_0x3984d1(0x1cf);return await writeUpdateNoticeCache({..._0x204e92,'checkedAt':isFreshCheck(_0x204e92,_0x524abb)?_0x204e92[_0x3984d1(0x1e2)]:_0x524abb,'latest':_0x44a80a,'failed':![],'lastNotifiedVersion':_0x44a80a,'lastNotifiedAt':_0x524abb}),{'command':_0x102a2c,'current':_0x312535,'latest':_0x44a80a,'url':buildNpmVersionUrl(_0x44a80a),'message':CLI_BIN_NAME+'\x20'+_0x44a80a+_0x3984d1(0x1e1)+_0x312535+_0x3984d1(0x1e0)+_0x102a2c};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x57a6d1,_0x18e686){const _0xca6d58=a125_0x574c,_0x4f21bc=_0x57a6d1();while(!![]){try{const _0x395e5a=parseInt(_0xca6d58(0x125))/0x1+-parseInt(_0xca6d58(0x129))/0x2+-parseInt(_0xca6d58(0x122))/0x3*(-parseInt(_0xca6d58(0x126))/0x4)+-parseInt(_0xca6d58(0x12a))/0x5*(-parseInt(_0xca6d58(0x127))/0x6)+-parseInt(_0xca6d58(0x121))/0x7+parseInt(_0xca6d58(0x124))/0x8+parseInt(_0xca6d58(0x12b))/0x9*(-parseInt(_0xca6d58(0x12c))/0xa);if(_0x395e5a===_0x18e686)break;else _0x4f21bc['push'](_0x4f21bc['shift']());}catch(_0x49219a){_0x4f21bc['push'](_0x4f21bc['shift']());}}}(a125_0x1461,0x3f2b4));function a125_0x574c(_0x12cac2,_0x259e97){_0x12cac2=_0x12cac2-0x121;const _0x14618c=a125_0x1461();let _0x574c61=_0x14618c[_0x12cac2];return _0x574c61;}import{BUILD_TIME,GIT_COMMIT,VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}export function getCliGitCommit(){const _0x1b30fc=a125_0x574c,_0x29e299=String(GIT_COMMIT);return _0x29e299&&_0x29e299!==_0x1b30fc(0x128)?_0x29e299:'';}function a125_0x1461(){const _0x2ce150=['439867HXibLY','293820CmluSG','114YRyIAR','unknown','10890nbJwOv','84105gITGft','5912091xiqtih','10tgScfw','1760332rxLPEN','15ovsdtO','slice','366552EZnvSx'];a125_0x1461=function(){return _0x2ce150;};return a125_0x1461();}export function getCliVersionDisplay(){const _0x34738c=a125_0x574c,_0x11dde2=getCliGitCommit(),_0x3f3943=BUILD_TIME[_0x34738c(0x123)](0x0,0xa);if(!_0x11dde2||!_0x3f3943)return VERSION;return VERSION+'\x20('+_0x11dde2+',\x20'+_0x3f3943+')';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a126_0x7e82(){var _0x2f619c=['5751096ydjxLj','11SWXtlq','9PrhiKa','5sJPKDJ','9231789afcjHg','stderr','15410450DOALUB','78286hQwLbG','448560FtWfos','write','6cmavSV','6793160vKzwHp','7024575VicbJW'];a126_0x7e82=function(){return _0x2f619c;};return a126_0x7e82();}(function(_0x4e1fcd,_0x52a27f){var _0xdfc806=a126_0x2aa5,_0x1df3b3=_0x4e1fcd();while(!![]){try{var _0x931061=-parseInt(_0xdfc806(0xc9))/0x1*(parseInt(_0xdfc806(0xcd))/0x2)+-parseInt(_0xdfc806(0xce))/0x3+parseInt(_0xdfc806(0xd1))/0x4+parseInt(_0xdfc806(0xd2))/0x5*(-parseInt(_0xdfc806(0xd0))/0x6)+-parseInt(_0xdfc806(0xca))/0x7+parseInt(_0xdfc806(0xd3))/0x8*(parseInt(_0xdfc806(0xd5))/0x9)+parseInt(_0xdfc806(0xcc))/0xa*(parseInt(_0xdfc806(0xd4))/0xb);if(_0x931061===_0x52a27f)break;else _0x1df3b3['push'](_0x1df3b3['shift']());}catch(_0x5d831d){_0x1df3b3['push'](_0x1df3b3['shift']());}}}(a126_0x7e82,0xd919d));function a126_0x2aa5(_0x29b1fa,_0x3ac6b9){_0x29b1fa=_0x29b1fa-0xc9;var _0x7e824c=a126_0x7e82();var _0x2aa55e=_0x7e824c[_0x29b1fa];return _0x2aa55e;}export function writeCliSideChannelLine(_0x5e3114){var _0x3a6840=a126_0x2aa5;process[_0x3a6840(0xcb)][_0x3a6840(0xcf)](_0x5e3114+'\x0a');}
|