@lovrabet/lovrabet-cli 2.1.21 → 2.1.22-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/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.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/raw-flags.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/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.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/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
|
-
function
|
|
1
|
+
function a121_0x3907(){const _0x1bb52a=['green','timestamp','winstonLogger','message','error','stringify','trim','warn','Failed\x20to\x20clear\x20logs:','blue','22HwuHAz','2546khxInm','2926440dcjDda','mkdirSync','7uIFdUF','rawCommand','details','933006gvOXtV','1379272wMLfDe','toISOString','now','setRawCommand','Completed:\x20','yellow','Failed\x20to\x20read\x20logs:','logTask','548880ZQwznn','utf8','writeFileSync','filter','format','info','parse','logFileName','duration','split','initWinstonLogger','transports','combine','1674HXIDRq','createLogger','errors','logFilePath','3385xIknUo','readLogs','122RWyJCY','unknown','red','2425959dMrKiT','existsSync','Starting:\x20','join','File','setLogPath','currentRawCommand','addColors','success','printf'];a121_0x3907=function(){return _0x1bb52a;};return a121_0x3907();}const a121_0x287dcf=a121_0x4178;(function(_0x241798,_0x2f70d0){const _0x49ab01=a121_0x4178,_0x4efb18=_0x241798();while(!![]){try{const _0x3c77d9=-parseInt(_0x49ab01(0x1ad))/0x1*(-parseInt(_0x49ab01(0x1c5))/0x2)+parseInt(_0x49ab01(0x1cb))/0x3+-parseInt(_0x49ab01(0x1cc))/0x4+parseInt(_0x49ab01(0x1ab))/0x5*(-parseInt(_0x49ab01(0x1a7))/0x6)+parseInt(_0x49ab01(0x1c8))/0x7*(-parseInt(_0x49ab01(0x19a))/0x8)+-parseInt(_0x49ab01(0x1b0))/0x9+-parseInt(_0x49ab01(0x1c6))/0xa*(-parseInt(_0x49ab01(0x1c4))/0xb);if(_0x3c77d9===_0x2f70d0)break;else _0x4efb18['push'](_0x4efb18['shift']());}catch(_0x23e053){_0x4efb18['push'](_0x4efb18['shift']());}}}(a121_0x3907,0x2be16));import a121_0x218b14 from'winston';import a121_0x4c72f4 from'node:fs';import a121_0x887022 from'node:path';function a121_0x4178(_0x4992c0,_0x20a889){_0x4992c0=_0x4992c0-0x197;const _0x390721=a121_0x3907();let _0x417881=_0x390721[_0x4992c0];return _0x417881;}import{PRODUCT_CONFIG}from'../constant/product.js';class Logger{[a121_0x287dcf(0x1bc)];['logFilePath']='';[a121_0x287dcf(0x1b6)]='';constructor(){}[a121_0x287dcf(0x1cf)](_0x161e6a){const _0x9e571e=a121_0x287dcf;this[_0x9e571e(0x1b6)]=_0x161e6a;}[a121_0x287dcf(0x1b5)](_0x42a316){const _0x4f8015=a121_0x287dcf;this['logFilePath']=a121_0x887022[_0x4f8015(0x1b3)](_0x42a316,PRODUCT_CONFIG[_0x4f8015(0x1a1)]),this[_0x4f8015(0x1bc)]&&this[_0x4f8015(0x1bc)]['clear'](),this['initWinstonLogger']();}[a121_0x287dcf(0x1a4)](){const _0x5881a7=a121_0x287dcf,_0x5d293a=a121_0x887022['dirname'](this[_0x5881a7(0x1aa)]);!a121_0x4c72f4[_0x5881a7(0x1b1)](_0x5d293a)&&a121_0x4c72f4[_0x5881a7(0x1c7)](_0x5d293a,{'recursive':!![]});const _0x4c3b0f=a121_0x218b14[_0x5881a7(0x19e)][_0x5881a7(0x1a6)](a121_0x218b14[_0x5881a7(0x19e)][_0x5881a7(0x1bb)](),a121_0x218b14[_0x5881a7(0x19e)][_0x5881a7(0x1a9)]({'stack':!![]}),a121_0x218b14[_0x5881a7(0x19e)][_0x5881a7(0x1b9)](_0x56a08c=>{const _0xff15dd=_0x5881a7,_0x10085b={'timestamp':_0x56a08c[_0xff15dd(0x1bb)]||new Date()[_0xff15dd(0x1cd)](),'level':_0x56a08c['level']||_0xff15dd(0x19f),'command':_0x56a08c['command']||_0xff15dd(0x1ae),'rawCommand':_0x56a08c[_0xff15dd(0x1c9)]||this[_0xff15dd(0x1b6)]||undefined,'message':_0x56a08c[_0xff15dd(0x1bd)]||'','duration':_0x56a08c[_0xff15dd(0x1a2)]||undefined,'details':_0x56a08c[_0xff15dd(0x1ca)]||undefined};return JSON[_0xff15dd(0x1bf)](_0x10085b);}));this[_0x5881a7(0x1bc)]=a121_0x218b14[_0x5881a7(0x1a8)]({'level':_0x5881a7(0x19f),'format':_0x4c3b0f,'transports':[new a121_0x218b14[(_0x5881a7(0x1a5))][(_0x5881a7(0x1b4))]({'filename':this[_0x5881a7(0x1aa)],'level':_0x5881a7(0x19f)})],'silent':![]}),a121_0x218b14[_0x5881a7(0x1b7)]({'success':_0x5881a7(0x1ba),'error':_0x5881a7(0x1af),'warn':_0x5881a7(0x197),'info':_0x5881a7(0x1c3)});}[a121_0x287dcf(0x19f)](_0x374bbb,_0x11c754,_0x30e1bb){const _0xcfd187=a121_0x287dcf;if(!this[_0xcfd187(0x1aa)]||!this[_0xcfd187(0x1bc)])return;this[_0xcfd187(0x1bc)]['info'](_0x11c754,{'command':_0x374bbb,'details':_0x30e1bb});}[a121_0x287dcf(0x1b8)](_0x15c47d,_0x50ad00,_0x5d2679,_0x43c6d2){const _0x24d24b=a121_0x287dcf;if(!this[_0x24d24b(0x1aa)]||!this[_0x24d24b(0x1bc)])return;this[_0x24d24b(0x1bc)]['log'](_0x24d24b(0x19f),_0x50ad00,{'level':_0x24d24b(0x1b8),'command':_0x15c47d,'duration':_0x5d2679,'details':_0x43c6d2});}['error'](_0x2a41ae,_0xc5a57,_0x12eab5){const _0xb08c13=a121_0x287dcf;if(!this['logFilePath']||!this[_0xb08c13(0x1bc)])return;this[_0xb08c13(0x1bc)][_0xb08c13(0x1be)](_0xc5a57,{'command':_0x2a41ae,'details':_0x12eab5});}[a121_0x287dcf(0x1c1)](_0x191402,_0x148763,_0x26995b){const _0x5b90cf=a121_0x287dcf;if(!this[_0x5b90cf(0x1aa)]||!this[_0x5b90cf(0x1bc)])return;this[_0x5b90cf(0x1bc)][_0x5b90cf(0x1c1)](_0x148763,{'command':_0x191402,'details':_0x26995b});}async[a121_0x287dcf(0x199)](_0xbdcfb8,_0x25e098,_0x384d9a){const _0x5bc706=a121_0x287dcf,_0x51e51c=Date[_0x5bc706(0x1ce)]();this['info'](_0xbdcfb8,_0x5bc706(0x1b2)+_0x25e098);try{const _0x502b5=await _0x384d9a(),_0x40dac8=Date[_0x5bc706(0x1ce)]()-_0x51e51c;return this[_0x5bc706(0x1b8)](_0xbdcfb8,_0x5bc706(0x1d0)+_0x25e098,_0x40dac8),_0x502b5;}catch(_0x505fef){const _0xe58865=Date['now']()-_0x51e51c;this[_0x5bc706(0x1be)](_0xbdcfb8,'Failed:\x20'+_0x25e098,{'error':_0x505fef instanceof Error?_0x505fef[_0x5bc706(0x1bd)]:String(_0x505fef),'duration':_0xe58865});throw _0x505fef;}}[a121_0x287dcf(0x1ac)](){const _0x207f24=a121_0x287dcf;try{if(!a121_0x4c72f4[_0x207f24(0x1b1)](this[_0x207f24(0x1aa)]))return[];const _0x28ad26=a121_0x4c72f4['readFileSync'](this[_0x207f24(0x1aa)],_0x207f24(0x19b));return _0x28ad26[_0x207f24(0x1a3)](/\r?\n/)[_0x207f24(0x19d)](_0x309073=>_0x309073[_0x207f24(0x1c0)]())['map'](_0x14c235=>JSON[_0x207f24(0x1a0)](_0x14c235));}catch(_0x387b4b){return console[_0x207f24(0x1c1)](_0x207f24(0x198),_0x387b4b),[];}}['clearLogs'](){const _0x3b14f0=a121_0x287dcf;try{a121_0x4c72f4[_0x3b14f0(0x1b1)](this[_0x3b14f0(0x1aa)])&&a121_0x4c72f4[_0x3b14f0(0x19c)](this[_0x3b14f0(0x1aa)],'',_0x3b14f0(0x19b));}catch(_0x5a3970){console['warn'](_0x3b14f0(0x1c2),_0x5a3970);}}['getWinstonInstance'](){const _0x4e2147=a121_0x287dcf;return this[_0x4e2147(0x1bc)];}}export const logger=new Logger();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a122_0x237fc2=a122_0x4fc8;(function(_0x46094b,_0x369e1e){const _0x47d009=a122_0x4fc8,_0x2763e7=_0x46094b();while(!![]){try{const _0x1797f8=-parseInt(_0x47d009(0xbd))/0x1*(-parseInt(_0x47d009(0xb8))/0x2)+-parseInt(_0x47d009(0xc0))/0x3+parseInt(_0x47d009(0xc2))/0x4*(parseInt(_0x47d009(0xbf))/0x5)+-parseInt(_0x47d009(0xb9))/0x6+-parseInt(_0x47d009(0xbe))/0x7*(-parseInt(_0x47d009(0xc5))/0x8)+-parseInt(_0x47d009(0xc1))/0x9*(-parseInt(_0x47d009(0xc7))/0xa)+-parseInt(_0x47d009(0xc6))/0xb;if(_0x1797f8===_0x369e1e)break;else _0x2763e7['push'](_0x2763e7['shift']());}catch(_0x12c7e7){_0x2763e7['push'](_0x2763e7['shift']());}}}(a122_0xe6af,0xe7c60));function a122_0x4fc8(_0x180e31,_0x9c2562){_0x180e31=_0x180e31-0xb5;const _0xe6afb=a122_0xe6af();let _0x4fc8f3=_0xe6afb[_0x180e31];return _0x4fc8f3;}const JSON_NUMBER_PATTERN=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/,MAX_SAFE_INTEGER=BigInt(Number['MAX_SAFE_INTEGER']),MIN_SAFE_INTEGER=BigInt(Number[a122_0x237fc2(0xc3)]);let restoreResponseJsonParser,responseJsonPrototype,originalResponseJsonDescriptor;function isUnsafeIntegerLiteral(_0x1a560f){const _0x349bb4=a122_0x237fc2;if(_0x1a560f['includes']('.')||_0x1a560f[_0x349bb4(0xb5)]('e')||_0x1a560f[_0x349bb4(0xb5)]('E'))return![];const _0x1376d4=BigInt(_0x1a560f);return _0x1376d4>MAX_SAFE_INTEGER||_0x1376d4<MIN_SAFE_INTEGER;}function quoteUnsafeIntegerLiterals(_0x15ee70){const _0x2c45b5=a122_0x237fc2;let _0x27bd49='',_0x5d01d7=![],_0x2e2004=![];for(let _0x558d33=0x0;_0x558d33<_0x15ee70[_0x2c45b5(0xc4)];){const _0x195a2b=_0x15ee70[_0x558d33];if(_0x5d01d7){_0x27bd49+=_0x195a2b,_0x558d33+=0x1;if(_0x2e2004)_0x2e2004=![];else{if(_0x195a2b==='\x5c')_0x2e2004=!![];else _0x195a2b==='\x22'&&(_0x5d01d7=![]);}continue;}if(_0x195a2b==='\x22'){_0x5d01d7=!![],_0x27bd49+=_0x195a2b,_0x558d33+=0x1;continue;}if(_0x195a2b==='-'||_0x195a2b>='0'&&_0x195a2b<='9'){const _0x5ab137=JSON_NUMBER_PATTERN[_0x2c45b5(0xbb)](_0x15ee70['slice'](_0x558d33))?.[0x0];if(_0x5ab137){_0x27bd49+=isUnsafeIntegerLiteral(_0x5ab137)?'\x22'+_0x5ab137+'\x22':_0x5ab137,_0x558d33+=_0x5ab137['length'];continue;}}_0x27bd49+=_0x195a2b,_0x558d33+=0x1;}return _0x27bd49;}export function parseLosslessJson(_0x452c27){const _0x20cbb0=a122_0x237fc2;return JSON[_0x20cbb0(0xc9)](quoteUnsafeIntegerLiterals(_0x452c27));}export function installLosslessJsonResponseParser(){const _0xcd8823=a122_0x237fc2;if(typeof Response==='undefined')return()=>{};if(restoreResponseJsonParser)return restoreResponseJsonParser;return responseJsonPrototype=Response[_0xcd8823(0xb7)],originalResponseJsonDescriptor=Object[_0xcd8823(0xba)](responseJsonPrototype,_0xcd8823(0xc8)),Object[_0xcd8823(0xb6)](responseJsonPrototype,_0xcd8823(0xc8),{...originalResponseJsonDescriptor??{'configurable':!![],'enumerable':![],'writable':!![]},'value':async function _0x3770bf(){const _0x2d53ae=_0xcd8823;return parseLosslessJson(await this[_0x2d53ae(0xbc)]());}}),restoreResponseJsonParser=()=>{const _0x472591=_0xcd8823;if(!responseJsonPrototype)return;originalResponseJsonDescriptor?Object['defineProperty'](responseJsonPrototype,_0x472591(0xc8),originalResponseJsonDescriptor):delete responseJsonPrototype[_0x472591(0xc8)],responseJsonPrototype=undefined,originalResponseJsonDescriptor=undefined,restoreResponseJsonParser=undefined;},restoreResponseJsonParser;}function a122_0xe6af(){const _0x1bdfc9=['43285484AlsXlA','1110UUIpLO','json','parse','includes','defineProperty','prototype','394qEChJx','68064OSWQEv','getOwnPropertyDescriptor','exec','text','3601XzRSMz','56uOAvah','25ikGzQG','1544814SdqmXA','145746fGcpZk','1113724NAixcZ','MIN_SAFE_INTEGER','length','1511584fALGNg'];a122_0xe6af=function(){return _0x1bdfc9;};return a122_0xe6af();}export function restoreLosslessJsonResponseParser(){restoreResponseJsonParser?.();}
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5b58bc,_0x3ba691){const _0x4ac5d4=a123_0x562d,_0x5b880d=_0x5b58bc();while(!![]){try{const _0xed0bac=parseInt(_0x4ac5d4(0x133))/0x1*(parseInt(_0x4ac5d4(0x14b))/0x2)+-parseInt(_0x4ac5d4(0x147))/0x3*(-parseInt(_0x4ac5d4(0x13d))/0x4)+-parseInt(_0x4ac5d4(0x134))/0x5*(parseInt(_0x4ac5d4(0x136))/0x6)+-parseInt(_0x4ac5d4(0x12f))/0x7+-parseInt(_0x4ac5d4(0x130))/0x8+parseInt(_0x4ac5d4(0x149))/0x9*(parseInt(_0x4ac5d4(0x139))/0xa)+parseInt(_0x4ac5d4(0x13a))/0xb;if(_0xed0bac===_0x3ba691)break;else _0x5b880d['push'](_0x5b880d['shift']());}catch(_0x5476cf){_0x5b880d['push'](_0x5b880d['shift']());}}}(a123_0x7bba,0x55c69));import{CliErrors}from'../errors.js';import{parseLosslessJson}from'../utils/lossless-json.js';export const MAX_DATA_UPDATE_IDS=0x3e8;export function parseJsonParams(_0x46994e){const _0x3409ed=a123_0x562d;if(!_0x46994e)return undefined;try{return parseLosslessJson(_0x46994e);}catch{throw CliErrors['validation'](_0x3409ed(0x146)+_0x46994e);}}export function parseJsonParamsValue(_0x350346){const _0x303c85=a123_0x562d;if(!_0x350346)return undefined;try{return parseLosslessJson(_0x350346);}catch{throw CliErrors[_0x303c85(0x132)](_0x303c85(0x146)+_0x350346);}}export function parseBatchCreateItemsFromParams(_0x240e03){const _0x5a2c94=a123_0x562d;if(Array[_0x5a2c94(0x13f)](_0x240e03))return _0x240e03;if(_0x240e03!==null&&_0x240e03!==undefined&&typeof _0x240e03===_0x5a2c94(0x131)&&Array[_0x5a2c94(0x13f)](_0x240e03[_0x5a2c94(0x14e)]))return _0x240e03[_0x5a2c94(0x14e)];throw CliErrors[_0x5a2c94(0x132)](_0x5a2c94(0x143),_0x5a2c94(0x14d));}function parseDataUpdateId(_0x97bbbe,_0x5e2152){const _0x24fc30=a123_0x562d;if(typeof _0x97bbbe==='number'&&Number[_0x24fc30(0x148)](_0x97bbbe)&&_0x97bbbe>0x0)return _0x97bbbe;if(typeof _0x97bbbe===_0x24fc30(0x144)){if(/^[1-9]\d*$/['test'](_0x97bbbe))return _0x97bbbe;}throw CliErrors['validation'](_0x24fc30(0x13c)+_0x5e2152+_0x24fc30(0x14c));}function a123_0x562d(_0x588ae7,_0x4be2f0){_0x588ae7=_0x588ae7-0x12f;const _0x7bba58=a123_0x7bba();let _0x562d91=_0x7bba58[_0x588ae7];return _0x562d91;}export function parseUpdateIdsFromParams(_0x9aec53){const _0x76744e=a123_0x562d;if(_0x9aec53===null||_0x9aec53===undefined||typeof _0x9aec53!==_0x76744e(0x131)||Array[_0x76744e(0x13f)](_0x9aec53))throw CliErrors[_0x76744e(0x132)](_0x76744e(0x135),'Example:\x20--params\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22done\x22}\x27');const _0x14b0a7=_0x9aec53['id'];if(_0x14b0a7===undefined||_0x14b0a7===null)throw CliErrors[_0x76744e(0x132)](_0x76744e(0x141),_0x76744e(0x13b));const _0x132ad0=Array[_0x76744e(0x13f)](_0x14b0a7)?_0x14b0a7:[_0x14b0a7];if(_0x132ad0[_0x76744e(0x142)]===0x0)throw CliErrors['validation'](_0x76744e(0x140));if(_0x132ad0[_0x76744e(0x142)]>MAX_DATA_UPDATE_IDS)throw CliErrors[_0x76744e(0x132)](_0x76744e(0x14a)+MAX_DATA_UPDATE_IDS+_0x76744e(0x137)+_0x132ad0[_0x76744e(0x142)]+'.');return _0x132ad0[_0x76744e(0x145)]((_0x5dba5d,_0xb614f)=>parseDataUpdateId(_0x5dba5d,Array['isArray'](_0x14b0a7)?_0x76744e(0x13e)+_0xb614f+']':'id'));}export function normalizeUpdateParamsForRuntime(_0x310300,_0xc795b6){const _0x263951=a123_0x562d;if(Array['isArray'](_0x310300['id'])&&_0xc795b6[_0x263951(0x142)]>0x1)return{..._0x310300,'id':_0xc795b6[_0x263951(0x138)](',')};return _0x310300;}function a123_0x7bba(){const _0x11d464=['3077305OgZYwt','685312MytxEC','object','validation','814WxHPnj','60840VSxPse','data\x20update\x20--params\x20must\x20be\x20a\x20JSON\x20object\x20with\x20id.','318TiybNE','\x20records\x20per\x20call;\x20received\x20','join','540XRRUxH','12743038RvFAgc','Example:\x20--params\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22done\x22}\x27','data\x20update\x20--params.','32ejYuyI','id[','isArray','data\x20update\x20id\x20array\x20cannot\x20be\x20empty.','data\x20update\x20requires\x20\x22id\x22\x20in\x20--params.','length','batchCreate\x20--params\x20must\x20be\x20a\x20JSON\x20array\x20or\x20{\x22items\x22:[...]}','string','map','Invalid\x20JSON\x20for\x20--params:\x20','18420VeyynU','isSafeInteger','25326PORasd','data\x20update\x20can\x20update\x20at\x20most\x20','398fRnuAw','\x20must\x20be\x20a\x20positive\x20integer\x20or\x20numeric\x20string.','Example:\x20--params\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','items'];a123_0x7bba=function(){return _0x11d464;};return a123_0x7bba();}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a124_0x4dfc78=a124_0x441f;function a124_0x441f(_0x5901d4,_0x32fbf7){_0x5901d4=_0x5901d4-0x1cc;const _0x3d09e1=a124_0x3d09();let _0x441f1b=_0x3d09e1[_0x5901d4];return _0x441f1b;}(function(_0x22317a,_0x10845f){const _0x6f5b77=a124_0x441f,_0x20655a=_0x22317a();while(!![]){try{const _0x18689f=-parseInt(_0x6f5b77(0x1d4))/0x1*(parseInt(_0x6f5b77(0x1d6))/0x2)+-parseInt(_0x6f5b77(0x1cf))/0x3+parseInt(_0x6f5b77(0x1cc))/0x4*(-parseInt(_0x6f5b77(0x1d3))/0x5)+-parseInt(_0x6f5b77(0x1d0))/0x6+-parseInt(_0x6f5b77(0x1ce))/0x7+-parseInt(_0x6f5b77(0x1d5))/0x8+parseInt(_0x6f5b77(0x1d2))/0x9;if(_0x18689f===_0x10845f)break;else _0x20655a['push'](_0x20655a['shift']());}catch(_0xebf684){_0x20655a['push'](_0x20655a['shift']());}}}(a124_0x3d09,0x9279a));export const isWindows=process[a124_0x4dfc78(0x1d1)]===a124_0x4dfc78(0x1cd);function a124_0x3d09(){const _0x5e953a=['1884906tenfyb','platform','30627108PPyuWo','8925fxbwxh','1603XIqChQ','8312240IpflVN','774eaJLHp','1468oiVFIB','win32','1166228vBihjH','23427LAZztZ'];a124_0x3d09=function(){return _0x5e953a;};return a124_0x3d09();}export function resolveNpmBin(_0x401eb9){return isWindows?_0x401eb9+'.cmd':_0x401eb9;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x12b499,_0x4ec35a){const _0x44cd51=a125_0x3f1e,_0x3bf1d4=_0x12b499();while(!![]){try{const _0x21b7e0=parseInt(_0x44cd51(0x1b8))/0x1*(parseInt(_0x44cd51(0x1ac))/0x2)+parseInt(_0x44cd51(0x1c6))/0x3*(parseInt(_0x44cd51(0x1b2))/0x4)+-parseInt(_0x44cd51(0x1d0))/0x5*(parseInt(_0x44cd51(0x1bc))/0x6)+parseInt(_0x44cd51(0x1ad))/0x7+-parseInt(_0x44cd51(0x1b1))/0x8+parseInt(_0x44cd51(0x1c4))/0x9*(parseInt(_0x44cd51(0x1cd))/0xa)+-parseInt(_0x44cd51(0x1cc))/0xb*(parseInt(_0x44cd51(0x1d1))/0xc);if(_0x21b7e0===_0x4ec35a)break;else _0x3bf1d4['push'](_0x3bf1d4['shift']());}catch(_0x29f852){_0x3bf1d4['push'](_0x3bf1d4['shift']());}}}(a125_0x5bf0,0xdb9be));import{mkdir,readFile,writeFile}from'node:fs/promises';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';import{getCliVersion}from'../utils/version.js';function a125_0x3f1e(_0x402861,_0x441396){_0x402861=_0x402861-0x1ab;const _0x5bf0f2=a125_0x5bf0();let _0x3f1e16=_0x5bf0f2[_0x402861];return _0x3f1e16;}const UPDATE_CHECK_TTL_MS=0xc*0x3c*0x3c*0x3e8,UPDATE_NOTICE_TTL_MS=0x18*0x3c*0x3c*0x3e8;function parseSemver(_0x4f6616){const _0x55f0db=a125_0x3f1e,_0x45687d=_0x4f6616['trim']()[_0x55f0db(0x1be)](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x45687d)return null;return{'major':Number(_0x45687d[0x1]),'minor':Number(_0x45687d[0x2]),'patch':Number(_0x45687d[0x3]),'prerelease':_0x45687d[0x4]};}function compareSemver(_0xa762b,_0x83f0a){const _0x5e5f6e=a125_0x3f1e,_0x3c0b96=parseSemver(_0xa762b),_0xc0089e=parseSemver(_0x83f0a);if(!_0x3c0b96||!_0xc0089e)throw new Error(_0x5e5f6e(0x1cb));for(const _0x3ad9c4 of[_0x5e5f6e(0x1c1),_0x5e5f6e(0x1bb),'patch']){if(_0x3c0b96[_0x3ad9c4]<_0xc0089e[_0x3ad9c4])return-0x1;if(_0x3c0b96[_0x3ad9c4]>_0xc0089e[_0x3ad9c4])return 0x1;}if(!_0x3c0b96[_0x5e5f6e(0x1ba)]&&!_0xc0089e[_0x5e5f6e(0x1ba)])return 0x0;if(!_0x3c0b96[_0x5e5f6e(0x1ba)])return 0x1;if(!_0xc0089e['prerelease'])return-0x1;if(_0x3c0b96['prerelease']===_0xc0089e[_0x5e5f6e(0x1ba)])return 0x0;return _0x3c0b96[_0x5e5f6e(0x1ba)]<_0xc0089e[_0x5e5f6e(0x1ba)]?-0x1:0x1;}function isUpdateNoticeDisabled(){const _0xea3096=a125_0x3f1e,_0x4ce5d4=process.env.LOVRABET_NO_UPDATE_NOTICE?.[_0xea3096(0x1b4)]()[_0xea3096(0x1cf)]();return _0x4ce5d4==='1'||_0x4ce5d4===_0xea3096(0x1ab)||_0x4ce5d4===_0xea3096(0x1c2);}function cacheRoot(){const _0x517be9=a125_0x3f1e;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0x517be9(0x1ae));}export function getUpdateNoticeCachePath(){const _0x52e119=a125_0x3f1e;return join(cacheRoot(),_0x52e119(0x1c7),_0x52e119(0x1bf));}async function readUpdateNoticeCache(){const _0x9f30cd=a125_0x3f1e;try{const _0x5e0029=await readFile(getUpdateNoticeCachePath(),_0x9f30cd(0x1c3)),_0x3c59b1=JSON['parse'](_0x5e0029);if(!_0x3c59b1||typeof _0x3c59b1!==_0x9f30cd(0x1b7))return{};return _0x3c59b1;}catch{return{};}}async function writeUpdateNoticeCache(_0x1a0a61){const _0x11a3ca=a125_0x3f1e;try{const _0x31b45e=getUpdateNoticeCachePath();await mkdir(dirname(_0x31b45e),{'recursive':!![]}),await writeFile(_0x31b45e,JSON['stringify'](_0x1a0a61,null,0x2)+'\x0a',_0x11a3ca(0x1c3));}catch{}}function isFreshCheck(_0x17e322,_0x1a2999){const _0x33d6d7=a125_0x3f1e;return typeof _0x17e322['checkedAt']===_0x33d6d7(0x1b0)&&_0x1a2999-_0x17e322[_0x33d6d7(0x1d2)]<UPDATE_CHECK_TTL_MS;}function a125_0x5bf0(){const _0x3fb185=['lovrabet-cli','json','lastNotifiedAt','/-/package/','Invalid\x20semver','55fmVfHQ','50pzdxeR','/v/','toLowerCase','717415ANtXvr','1417992oLIPcR','checkedAt','true','46082ekoCiY','7551964jTptgv','.cache','filter','number','9702280Knzqrg','3350344RHJrJO','lastNotifiedVersion','trim','https://www.npmjs.com/package/','fromEntries','object','73oufXAx','map','prerelease','minor','66ybLBRF','timeout','match','update-check.json','entries','major','yes','utf8','1229427nGGoap','/dist-tags','3TYIgmA'];a125_0x5bf0=function(){return _0x3fb185;};return a125_0x5bf0();}function isRecentlyNotified(_0x259e22,_0x518d5b,_0x8fc566){const _0x162826=a125_0x3f1e;return _0x259e22[_0x162826(0x1b3)]===_0x518d5b&&typeof _0x259e22[_0x162826(0x1c9)]===_0x162826(0x1b0)&&_0x8fc566-_0x259e22[_0x162826(0x1c9)]<UPDATE_NOTICE_TTL_MS;}async function fetchNpmDistTags(_0xb19b84=0x5dc){const _0x8ce6ea=a125_0x3f1e;try{const _0x431e37=NPM_REGISTRY_BASE_URL+_0x8ce6ea(0x1ca)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x8ce6ea(0x1c5),_0x53c28a=await fetch(_0x431e37,{'signal':AbortSignal[_0x8ce6ea(0x1bd)](_0xb19b84)});if(!_0x53c28a['ok'])return null;const _0x9d7317=await _0x53c28a[_0x8ce6ea(0x1c8)]();if(!_0x9d7317||typeof _0x9d7317!==_0x8ce6ea(0x1b7))return null;return Object[_0x8ce6ea(0x1b6)](Object[_0x8ce6ea(0x1c0)](_0x9d7317)[_0x8ce6ea(0x1af)](([,_0x3ca8a5])=>typeof _0x3ca8a5==='string'&&_0x3ca8a5['trim']())[_0x8ce6ea(0x1b9)](([_0x13c4bd,_0x5f5a3b])=>[_0x13c4bd,String(_0x5f5a3b)[_0x8ce6ea(0x1b4)]()]));}catch{return null;}}export function buildNpmVersionUrl(_0x990db3){const _0x268caf=a125_0x3f1e;return _0x268caf(0x1b5)+LOVRABET_NPM_PACKAGE_NAME+_0x268caf(0x1ce)+_0x990db3;}export async function resolveLatestUpdateNotice(){const _0x460695=a125_0x3f1e;if(isUpdateNoticeDisabled())return null;try{const _0x3728ce=Date['now'](),_0x5110d8=getCliVersion(),_0x29c06c=await readUpdateNoticeCache();let _0x3ffeab=isFreshCheck(_0x29c06c,_0x3728ce)?_0x29c06c['latest']?.[_0x460695(0x1b4)]():undefined;if(!_0x3ffeab&&!isFreshCheck(_0x29c06c,_0x3728ce)){const _0x1ef8df=await fetchNpmDistTags();_0x3ffeab=_0x1ef8df?.['latest']?.[_0x460695(0x1b4)](),await writeUpdateNoticeCache({..._0x29c06c,'checkedAt':_0x3728ce,'latest':_0x3ffeab,'failed':!_0x3ffeab});}if(!_0x3ffeab||compareSemver(_0x5110d8,_0x3ffeab)>=0x0)return null;if(isRecentlyNotified(_0x29c06c,_0x3ffeab,_0x3728ce))return null;const _0x2bc4c2=CLI_BIN_NAME+'\x20update';return await writeUpdateNoticeCache({..._0x29c06c,'checkedAt':isFreshCheck(_0x29c06c,_0x3728ce)?_0x29c06c[_0x460695(0x1d2)]:_0x3728ce,'latest':_0x3ffeab,'failed':![],'lastNotifiedVersion':_0x3ffeab,'lastNotifiedAt':_0x3728ce}),{'command':_0x2bc4c2,'current':_0x5110d8,'latest':_0x3ffeab,'url':buildNpmVersionUrl(_0x3ffeab),'message':CLI_BIN_NAME+'\x20'+_0x3ffeab+'\x20available,\x20current\x20'+_0x5110d8+',\x20run:\x20'+_0x2bc4c2};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a126_0x2363(_0x8b0691,_0x4ff631){_0x8b0691=_0x8b0691-0x1ee;const _0x412034=a126_0x4120();let _0x23633b=_0x412034[_0x8b0691];return _0x23633b;}(function(_0x43e6a1,_0x330124){const _0x4da1db=a126_0x2363,_0x2641d9=_0x43e6a1();while(!![]){try{const _0x473ad6=-parseInt(_0x4da1db(0x1f7))/0x1+parseInt(_0x4da1db(0x1f1))/0x2+parseInt(_0x4da1db(0x1f9))/0x3*(-parseInt(_0x4da1db(0x1ef))/0x4)+parseInt(_0x4da1db(0x1f2))/0x5+parseInt(_0x4da1db(0x1f5))/0x6+-parseInt(_0x4da1db(0x1f6))/0x7*(-parseInt(_0x4da1db(0x1f0))/0x8)+-parseInt(_0x4da1db(0x1f4))/0x9*(parseInt(_0x4da1db(0x1f8))/0xa);if(_0x473ad6===_0x330124)break;else _0x2641d9['push'](_0x2641d9['shift']());}catch(_0x3de9f4){_0x2641d9['push'](_0x2641d9['shift']());}}}(a126_0x4120,0x1f5aa));import{BUILD_TIME,GIT_COMMIT,VERSION}from'../generated/build-info.js';function a126_0x4120(){const _0x9722ab=['936012xCCKUU','3962bdtTFJ','19753qUveHd','100YgGNQj','290148cjyRiO','unknown','8jeoanV','872gLSSgN','398112cseOEK','198245cDJzXu','slice','103311fJxZyj'];a126_0x4120=function(){return _0x9722ab;};return a126_0x4120();}export function getCliVersion(){return VERSION;}export function getCliGitCommit(){const _0x4f6141=a126_0x2363,_0x38b234=String(GIT_COMMIT);return _0x38b234&&_0x38b234!==_0x4f6141(0x1ee)?_0x38b234:'';}export function getCliVersionDisplay(){const _0x547647=a126_0x2363,_0x19e2ea=getCliGitCommit(),_0x86272=BUILD_TIME[_0x547647(0x1f3)](0x0,0xa);if(!_0x19e2ea||!_0x86272)return VERSION;return VERSION+'\x20('+_0x19e2ea+',\x20'+_0x86272+')';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a127_0xb17d(_0x16fdef,_0x41167f){_0x16fdef=_0x16fdef-0x1ee;var _0xfc4460=a127_0xfc44();var _0xb17d1a=_0xfc4460[_0x16fdef];return _0xb17d1a;}(function(_0x1bfc9d,_0x16ff10){var _0x41f82d=a127_0xb17d,_0x360134=_0x1bfc9d();while(!![]){try{var _0x1e48b7=-parseInt(_0x41f82d(0x1f9))/0x1*(parseInt(_0x41f82d(0x1f1))/0x2)+-parseInt(_0x41f82d(0x1f8))/0x3+parseInt(_0x41f82d(0x1f5))/0x4*(parseInt(_0x41f82d(0x1f4))/0x5)+-parseInt(_0x41f82d(0x1f7))/0x6+-parseInt(_0x41f82d(0x1ee))/0x7+parseInt(_0x41f82d(0x1ef))/0x8*(parseInt(_0x41f82d(0x1f3))/0x9)+parseInt(_0x41f82d(0x1f0))/0xa*(parseInt(_0x41f82d(0x1f2))/0xb);if(_0x1e48b7===_0x16ff10)break;else _0x360134['push'](_0x360134['shift']());}catch(_0x488aa6){_0x360134['push'](_0x360134['shift']());}}}(a127_0xfc44,0x4cc4f));function a127_0xfc44(){var _0xa37cb4=['3072996lpXCrn','1173153kLzHgh','1407YoVpdA','58618KQVjJp','361312qUBcPs','10Tlukrr','354asTsqa','12134045mHLOye','18MLlbJg','5oRURdP','1126616HTMROA','write'];a127_0xfc44=function(){return _0xa37cb4;};return a127_0xfc44();}export function writeCliSideChannelLine(_0x1381b6){var _0x4c7a09=a127_0xb17d;process['stderr'][_0x4c7a09(0x1f6)](_0x1381b6+'\x0a');}
|