@lovrabet/lovrabet-cli 2.1.19 → 2.1.20
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.d.ts +12 -0
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/raw-flags.d.ts +12 -0
- package/lib/framework/raw-flags.js +1 -0
- 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
|
-
const
|
|
1
|
+
function a121_0x329e(){const _0x382c89=['Failed:\x20','currentRawCommand','success','setRawCommand','unknown','943710TPgTiY','stringify','904477OzZexy','printf','writeFileSync','2856072nbEmPu','11zSuFYm','File','details','combine','info','24cIjHCq','mkdirSync','red','map','68690CIWBwF','clearLogs','message','Failed\x20to\x20clear\x20logs:','command','yellow','762921AhYyFv','green','error','join','logFilePath','readLogs','blue','now','warn','winstonLogger','logFileName','272ZvYOdp','getWinstonInstance','16VjkBiK','674hxtime','rawCommand','Starting:\x20','utf8','initWinstonLogger','existsSync','6666qPtPPR','parse','156OClgew','level','errors','addColors','toISOString','createLogger','format'];a121_0x329e=function(){return _0x382c89;};return a121_0x329e();}const a121_0x38953d=a121_0x2ce1;(function(_0x282ed7,_0x19a49b){const _0x27b2d9=a121_0x2ce1,_0x29f80a=_0x282ed7();while(!![]){try{const _0x23a99c=-parseInt(_0x27b2d9(0x108))/0x1*(-parseInt(_0x27b2d9(0x105))/0x2)+-parseInt(_0x27b2d9(0x10e))/0x3*(parseInt(_0x27b2d9(0x110))/0x4)+-parseInt(_0x27b2d9(0xf4))/0x5*(parseInt(_0x27b2d9(0xf0))/0x6)+parseInt(_0x27b2d9(0xe7))/0x7+parseInt(_0x27b2d9(0x107))/0x8*(parseInt(_0x27b2d9(0xfa))/0x9)+parseInt(_0x27b2d9(0xe5))/0xa+-parseInt(_0x27b2d9(0xeb))/0xb*(parseInt(_0x27b2d9(0xea))/0xc);if(_0x23a99c===_0x19a49b)break;else _0x29f80a['push'](_0x29f80a['shift']());}catch(_0x49de42){_0x29f80a['push'](_0x29f80a['shift']());}}}(a121_0x329e,0x19ad0));import a121_0x1b7c4c from'winston';import a121_0x46a03d from'node:fs';function a121_0x2ce1(_0x4b03fc,_0x4d836b){_0x4b03fc=_0x4b03fc-0xde;const _0x329eb2=a121_0x329e();let _0x2ce156=_0x329eb2[_0x4b03fc];return _0x2ce156;}import a121_0x3c613d from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';class Logger{[a121_0x38953d(0x103)];[a121_0x38953d(0xfe)]='';[a121_0x38953d(0xe1)]='';constructor(){}[a121_0x38953d(0xe3)](_0x1d9523){const _0xfbf00c=a121_0x38953d;this[_0xfbf00c(0xe1)]=_0x1d9523;}['setLogPath'](_0x17cd20){const _0x5f5192=a121_0x38953d;this['logFilePath']=a121_0x3c613d[_0x5f5192(0xfd)](_0x17cd20,PRODUCT_CONFIG[_0x5f5192(0x104)]),this[_0x5f5192(0x103)]&&this[_0x5f5192(0x103)]['clear'](),this[_0x5f5192(0x10c)]();}[a121_0x38953d(0x10c)](){const _0x2f77f7=a121_0x38953d,_0x10840c=a121_0x3c613d['dirname'](this[_0x2f77f7(0xfe)]);!a121_0x46a03d['existsSync'](_0x10840c)&&a121_0x46a03d[_0x2f77f7(0xf1)](_0x10840c,{'recursive':!![]});const _0x96c05c=a121_0x1b7c4c['format'][_0x2f77f7(0xee)](a121_0x1b7c4c['format']['timestamp'](),a121_0x1b7c4c[_0x2f77f7(0xdf)][_0x2f77f7(0x112)]({'stack':!![]}),a121_0x1b7c4c['format'][_0x2f77f7(0xe8)](_0x189cba=>{const _0x30658b=_0x2f77f7,_0x38672d={'timestamp':_0x189cba['timestamp']||new Date()[_0x30658b(0x114)](),'level':_0x189cba[_0x30658b(0x111)]||'info','command':_0x189cba[_0x30658b(0xf8)]||_0x30658b(0xe4),'rawCommand':_0x189cba[_0x30658b(0x109)]||this[_0x30658b(0xe1)]||undefined,'message':_0x189cba[_0x30658b(0xf6)]||'','duration':_0x189cba['duration']||undefined,'details':_0x189cba[_0x30658b(0xed)]||undefined};return JSON[_0x30658b(0xe6)](_0x38672d);}));this['winstonLogger']=a121_0x1b7c4c[_0x2f77f7(0xde)]({'level':_0x2f77f7(0xef),'format':_0x96c05c,'transports':[new a121_0x1b7c4c['transports'][(_0x2f77f7(0xec))]({'filename':this['logFilePath'],'level':_0x2f77f7(0xef)})],'silent':![]}),a121_0x1b7c4c[_0x2f77f7(0x113)]({'success':_0x2f77f7(0xfb),'error':_0x2f77f7(0xf2),'warn':_0x2f77f7(0xf9),'info':_0x2f77f7(0x100)});}['info'](_0x3dacce,_0x1ade9c,_0x569679){const _0x5177d4=a121_0x38953d;if(!this[_0x5177d4(0xfe)]||!this[_0x5177d4(0x103)])return;this[_0x5177d4(0x103)][_0x5177d4(0xef)](_0x1ade9c,{'command':_0x3dacce,'details':_0x569679});}['success'](_0x3c0996,_0x42b0ac,_0x2bc9dd,_0x5d2415){const _0x44a776=a121_0x38953d;if(!this[_0x44a776(0xfe)]||!this[_0x44a776(0x103)])return;this[_0x44a776(0x103)]['log'](_0x44a776(0xef),_0x42b0ac,{'level':'success','command':_0x3c0996,'duration':_0x2bc9dd,'details':_0x5d2415});}[a121_0x38953d(0xfc)](_0x20995b,_0x8ee73c,_0xc07201){const _0x5e1935=a121_0x38953d;if(!this[_0x5e1935(0xfe)]||!this[_0x5e1935(0x103)])return;this[_0x5e1935(0x103)]['error'](_0x8ee73c,{'command':_0x20995b,'details':_0xc07201});}[a121_0x38953d(0x102)](_0x115c4c,_0x5b6ee0,_0x362660){const _0x23005f=a121_0x38953d;if(!this['logFilePath']||!this[_0x23005f(0x103)])return;this['winstonLogger']['warn'](_0x5b6ee0,{'command':_0x115c4c,'details':_0x362660});}async['logTask'](_0x2080bf,_0x5258fa,_0x251f53){const _0x394594=a121_0x38953d,_0x2c0276=Date[_0x394594(0x101)]();this[_0x394594(0xef)](_0x2080bf,_0x394594(0x10a)+_0x5258fa);try{const _0x13dd90=await _0x251f53(),_0x401f1d=Date[_0x394594(0x101)]()-_0x2c0276;return this[_0x394594(0xe2)](_0x2080bf,'Completed:\x20'+_0x5258fa,_0x401f1d),_0x13dd90;}catch(_0x8f708c){const _0x42f54e=Date[_0x394594(0x101)]()-_0x2c0276;this[_0x394594(0xfc)](_0x2080bf,_0x394594(0xe0)+_0x5258fa,{'error':_0x8f708c instanceof Error?_0x8f708c[_0x394594(0xf6)]:String(_0x8f708c),'duration':_0x42f54e});throw _0x8f708c;}}[a121_0x38953d(0xff)](){const _0x9cdf34=a121_0x38953d;try{if(!a121_0x46a03d[_0x9cdf34(0x10d)](this[_0x9cdf34(0xfe)]))return[];const _0x281ed8=a121_0x46a03d['readFileSync'](this[_0x9cdf34(0xfe)],_0x9cdf34(0x10b));return _0x281ed8['split'](/\r?\n/)['filter'](_0x2dde6e=>_0x2dde6e['trim']())[_0x9cdf34(0xf3)](_0x557b4a=>JSON[_0x9cdf34(0x10f)](_0x557b4a));}catch(_0x4698f2){return console[_0x9cdf34(0x102)]('Failed\x20to\x20read\x20logs:',_0x4698f2),[];}}[a121_0x38953d(0xf5)](){const _0x48b018=a121_0x38953d;try{a121_0x46a03d[_0x48b018(0x10d)](this['logFilePath'])&&a121_0x46a03d[_0x48b018(0xe9)](this[_0x48b018(0xfe)],'',_0x48b018(0x10b));}catch(_0xab54d0){console['warn'](_0x48b018(0xf7),_0xab54d0);}}[a121_0x38953d(0x106)](){return this['winstonLogger'];}}export const logger=new Logger();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a122_0x2d8f7e=a122_0x11ab;(function(_0x450ce8,_0x1ee726){const _0x1e91f1=a122_0x11ab,_0x39f7b1=_0x450ce8();while(!![]){try{const _0x51df74=-parseInt(_0x1e91f1(0xb2))/0x1*(parseInt(_0x1e91f1(0xb1))/0x2)+parseInt(_0x1e91f1(0xb7))/0x3+-parseInt(_0x1e91f1(0xc1))/0x4+parseInt(_0x1e91f1(0xb0))/0x5*(parseInt(_0x1e91f1(0xbd))/0x6)+-parseInt(_0x1e91f1(0xb3))/0x7*(-parseInt(_0x1e91f1(0xbf))/0x8)+-parseInt(_0x1e91f1(0xbc))/0x9+-parseInt(_0x1e91f1(0xaf))/0xa*(parseInt(_0x1e91f1(0xbe))/0xb);if(_0x51df74===_0x1ee726)break;else _0x39f7b1['push'](_0x39f7b1['shift']());}catch(_0x1e9564){_0x39f7b1['push'](_0x39f7b1['shift']());}}}(a122_0x29a1,0xc647d));const JSON_NUMBER_PATTERN=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/,MAX_SAFE_INTEGER=BigInt(Number[a122_0x2d8f7e(0xb8)]),MIN_SAFE_INTEGER=BigInt(Number['MIN_SAFE_INTEGER']);function a122_0x11ab(_0x2ed631,_0x35bc97){_0x2ed631=_0x2ed631-0xad;const _0x29a1df=a122_0x29a1();let _0x11aba4=_0x29a1df[_0x2ed631];return _0x11aba4;}function a122_0x29a1(){const _0x8382c7=['getOwnPropertyDescriptor','3095943uhvSVQ','MAX_SAFE_INTEGER','parse','undefined','text','6350472uozQtK','90dxJVvR','5555OwWPwN','1272bQqToU','json','2339248NsSBQP','includes','length','7820bLdiwp','449710mPqNNn','27894fkyfag','81XVTmUW','54859uuNrSa','defineProperty','slice'];a122_0x29a1=function(){return _0x8382c7;};return a122_0x29a1();}let restoreResponseJsonParser,responseJsonPrototype,originalResponseJsonDescriptor;function isUnsafeIntegerLiteral(_0x58baf2){const _0x11fc58=a122_0x2d8f7e;if(_0x58baf2['includes']('.')||_0x58baf2['includes']('e')||_0x58baf2[_0x11fc58(0xad)]('E'))return![];const _0x3856b4=BigInt(_0x58baf2);return _0x3856b4>MAX_SAFE_INTEGER||_0x3856b4<MIN_SAFE_INTEGER;}function quoteUnsafeIntegerLiterals(_0x156153){const _0x27560f=a122_0x2d8f7e;let _0x52aaae='',_0x572d6c=![],_0xa84389=![];for(let _0x20f22f=0x0;_0x20f22f<_0x156153['length'];){const _0x38596c=_0x156153[_0x20f22f];if(_0x572d6c){_0x52aaae+=_0x38596c,_0x20f22f+=0x1;if(_0xa84389)_0xa84389=![];else{if(_0x38596c==='\x5c')_0xa84389=!![];else _0x38596c==='\x22'&&(_0x572d6c=![]);}continue;}if(_0x38596c==='\x22'){_0x572d6c=!![],_0x52aaae+=_0x38596c,_0x20f22f+=0x1;continue;}if(_0x38596c==='-'||_0x38596c>='0'&&_0x38596c<='9'){const _0xcfc22b=JSON_NUMBER_PATTERN['exec'](_0x156153[_0x27560f(0xb5)](_0x20f22f))?.[0x0];if(_0xcfc22b){_0x52aaae+=isUnsafeIntegerLiteral(_0xcfc22b)?'\x22'+_0xcfc22b+'\x22':_0xcfc22b,_0x20f22f+=_0xcfc22b[_0x27560f(0xae)];continue;}}_0x52aaae+=_0x38596c,_0x20f22f+=0x1;}return _0x52aaae;}export function parseLosslessJson(_0x1456e5){const _0x776d99=a122_0x2d8f7e;return JSON[_0x776d99(0xb9)](quoteUnsafeIntegerLiterals(_0x1456e5));}export function installLosslessJsonResponseParser(){const _0x3a72a3=a122_0x2d8f7e;if(typeof Response===_0x3a72a3(0xba))return()=>{};if(restoreResponseJsonParser)return restoreResponseJsonParser;return responseJsonPrototype=Response['prototype'],originalResponseJsonDescriptor=Object[_0x3a72a3(0xb6)](responseJsonPrototype,'json'),Object[_0x3a72a3(0xb4)](responseJsonPrototype,_0x3a72a3(0xc0),{...originalResponseJsonDescriptor??{'configurable':!![],'enumerable':![],'writable':!![]},'value':async function _0x5f1508(){const _0x3cfc67=_0x3a72a3;return parseLosslessJson(await this[_0x3cfc67(0xbb)]());}}),restoreResponseJsonParser=()=>{const _0x484c9a=_0x3a72a3;if(!responseJsonPrototype)return;originalResponseJsonDescriptor?Object[_0x484c9a(0xb4)](responseJsonPrototype,_0x484c9a(0xc0),originalResponseJsonDescriptor):delete responseJsonPrototype[_0x484c9a(0xc0)],responseJsonPrototype=undefined,originalResponseJsonDescriptor=undefined,restoreResponseJsonParser=undefined;},restoreResponseJsonParser;}export function restoreLosslessJsonResponseParser(){restoreResponseJsonParser?.();}
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x255b7c,_0xd76fcc){const _0xf20dc3=a123_0x2569,_0xbc945b=_0x255b7c();while(!![]){try{const _0x46ce7f=parseInt(_0xf20dc3(0xce))/0x1+-parseInt(_0xf20dc3(0xd6))/0x2*(parseInt(_0xf20dc3(0xbd))/0x3)+parseInt(_0xf20dc3(0xd4))/0x4*(-parseInt(_0xf20dc3(0xbe))/0x5)+parseInt(_0xf20dc3(0xd1))/0x6+-parseInt(_0xf20dc3(0xd9))/0x7+parseInt(_0xf20dc3(0xcb))/0x8+parseInt(_0xf20dc3(0xca))/0x9;if(_0x46ce7f===_0xd76fcc)break;else _0xbc945b['push'](_0xbc945b['shift']());}catch(_0x48c6ef){_0xbc945b['push'](_0xbc945b['shift']());}}}(a123_0x1efe,0x822aa));import{CliErrors}from'../errors.js';function a123_0x2569(_0x379017,_0x5a5bb9){_0x379017=_0x379017-0xbc;const _0x1efee4=a123_0x1efe();let _0x2569e5=_0x1efee4[_0x379017];return _0x2569e5;}import{parseLosslessJson}from'../utils/lossless-json.js';export const MAX_DATA_UPDATE_IDS=0x3e8;export function parseJsonParams(_0x32617c){const _0x3989f4=a123_0x2569;if(!_0x32617c)return undefined;try{return parseLosslessJson(_0x32617c);}catch{throw CliErrors[_0x3989f4(0xc9)](_0x3989f4(0xbf)+_0x32617c);}}export function parseJsonParamsValue(_0x20a973){const _0x268506=a123_0x2569;if(!_0x20a973)return undefined;try{return parseLosslessJson(_0x20a973);}catch{throw CliErrors['validation'](_0x268506(0xbf)+_0x20a973);}}export function parseBatchCreateItemsFromParams(_0x27c6a9){const _0x25520c=a123_0x2569;if(Array[_0x25520c(0xd0)](_0x27c6a9))return _0x27c6a9;if(_0x27c6a9!==null&&_0x27c6a9!==undefined&&typeof _0x27c6a9===_0x25520c(0xc5)&&Array[_0x25520c(0xd0)](_0x27c6a9[_0x25520c(0xcf)]))return _0x27c6a9[_0x25520c(0xcf)];throw CliErrors['validation'](_0x25520c(0xc6),_0x25520c(0xd3));}function a123_0x1efe(){const _0x29b73e=['Invalid\x20JSON\x20for\x20--params:\x20','\x20must\x20be\x20a\x20positive\x20integer\x20or\x20numeric\x20string.','isSafeInteger','data\x20update\x20--params.','data\x20update\x20--params\x20must\x20be\x20a\x20JSON\x20object\x20with\x20id.','\x20records\x20per\x20call;\x20received\x20','object','batchCreate\x20--params\x20must\x20be\x20a\x20JSON\x20array\x20or\x20{\x22items\x22:[...]}','Example:\x20--params\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22done\x22}\x27','id[','validation','9078318EnhSjt','2038808sdCauT','data\x20update\x20id\x20array\x20cannot\x20be\x20empty.','join','37700blNkbI','items','isArray','672102IjmpCM','map','Example:\x20--params\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','91580ncsXcU','test','4rHpaTd','data\x20update\x20can\x20update\x20at\x20most\x20','string','573699iFKlTY','length','1094199VpVPjy','15LqOUWG'];a123_0x1efe=function(){return _0x29b73e;};return a123_0x1efe();}function parseDataUpdateId(_0x2804bb,_0x530228){const _0x59254a=a123_0x2569;if(typeof _0x2804bb==='number'&&Number[_0x59254a(0xc1)](_0x2804bb)&&_0x2804bb>0x0)return _0x2804bb;if(typeof _0x2804bb===_0x59254a(0xd8)){if(/^[1-9]\d*$/[_0x59254a(0xd5)](_0x2804bb))return _0x2804bb;}throw CliErrors[_0x59254a(0xc9)](_0x59254a(0xc2)+_0x530228+_0x59254a(0xc0));}export function parseUpdateIdsFromParams(_0x1e3a32){const _0x120289=a123_0x2569;if(_0x1e3a32===null||_0x1e3a32===undefined||typeof _0x1e3a32!==_0x120289(0xc5)||Array[_0x120289(0xd0)](_0x1e3a32))throw CliErrors[_0x120289(0xc9)](_0x120289(0xc3),_0x120289(0xc7));const _0x427e4e=_0x1e3a32['id'];if(_0x427e4e===undefined||_0x427e4e===null)throw CliErrors[_0x120289(0xc9)]('data\x20update\x20requires\x20\x22id\x22\x20in\x20--params.',_0x120289(0xc7));const _0x316bfd=Array['isArray'](_0x427e4e)?_0x427e4e:[_0x427e4e];if(_0x316bfd['length']===0x0)throw CliErrors[_0x120289(0xc9)](_0x120289(0xcc));if(_0x316bfd[_0x120289(0xbc)]>MAX_DATA_UPDATE_IDS)throw CliErrors[_0x120289(0xc9)](_0x120289(0xd7)+MAX_DATA_UPDATE_IDS+_0x120289(0xc4)+_0x316bfd[_0x120289(0xbc)]+'.');return _0x316bfd[_0x120289(0xd2)]((_0x24343d,_0x3d0d2c)=>parseDataUpdateId(_0x24343d,Array[_0x120289(0xd0)](_0x427e4e)?_0x120289(0xc8)+_0x3d0d2c+']':'id'));}export function normalizeUpdateParamsForRuntime(_0xf06ba,_0x53e7c8){const _0x19fd52=a123_0x2569;if(Array[_0x19fd52(0xd0)](_0xf06ba['id'])&&_0x53e7c8['length']>0x1)return{..._0xf06ba,'id':_0x53e7c8[_0x19fd52(0xcd)](',')};return _0xf06ba;}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a124_0x5f4697=a124_0x289f;function a124_0x289f(_0x3ad109,_0x4fa2a9){_0x3ad109=_0x3ad109-0x89;const _0x382d75=a124_0x382d();let _0x289f7c=_0x382d75[_0x3ad109];return _0x289f7c;}function a124_0x382d(){const _0x2714c9=['platform','3631995VMizet','92614DPJspT','5772PPvVHu','50zqbKwX','65568BfvaeO','96451SBqrTF','3988932FRGiWW','110216IyInmG','10KqQrPS','224hjnwTc','222qvEnqA','11FdinzA','win32'];a124_0x382d=function(){return _0x2714c9;};return a124_0x382d();}(function(_0x51bfda,_0x1d5d59){const _0x2aac9b=a124_0x289f,_0x5d14b8=_0x51bfda();while(!![]){try{const _0x4f1453=-parseInt(_0x2aac9b(0x8f))/0x1+-parseInt(_0x2aac9b(0x8b))/0x2+-parseInt(_0x2aac9b(0x94))/0x3*(-parseInt(_0x2aac9b(0x8c))/0x4)+parseInt(_0x2aac9b(0x8d))/0x5*(-parseInt(_0x2aac9b(0x8e))/0x6)+parseInt(_0x2aac9b(0x93))/0x7*(parseInt(_0x2aac9b(0x91))/0x8)+-parseInt(_0x2aac9b(0x8a))/0x9*(parseInt(_0x2aac9b(0x92))/0xa)+-parseInt(_0x2aac9b(0x95))/0xb*(-parseInt(_0x2aac9b(0x90))/0xc);if(_0x4f1453===_0x1d5d59)break;else _0x5d14b8['push'](_0x5d14b8['shift']());}catch(_0x7780ff){_0x5d14b8['push'](_0x5d14b8['shift']());}}}(a124_0x382d,0x36cd0));export const isWindows=process[a124_0x5f4697(0x89)]===a124_0x5f4697(0x96);export function resolveNpmBin(_0x5024fe){return isWindows?_0x5024fe+'.cmd':_0x5024fe;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3cc88e,_0x1c963d){const _0xfa548f=a125_0x2a47,_0x524150=_0x3cc88e();while(!![]){try{const _0x3e1bc=parseInt(_0xfa548f(0x12b))/0x1+parseInt(_0xfa548f(0x110))/0x2+-parseInt(_0xfa548f(0x11e))/0x3*(parseInt(_0xfa548f(0x123))/0x4)+-parseInt(_0xfa548f(0x132))/0x5+parseInt(_0xfa548f(0x126))/0x6*(parseInt(_0xfa548f(0x12d))/0x7)+parseInt(_0xfa548f(0x120))/0x8*(parseInt(_0xfa548f(0x12e))/0x9)+parseInt(_0xfa548f(0x116))/0xa*(-parseInt(_0xfa548f(0x115))/0xb);if(_0x3e1bc===_0x1c963d)break;else _0x524150['push'](_0x524150['shift']());}catch(_0xcd50b4){_0x524150['push'](_0x524150['shift']());}}}(a125_0x3a1e,0xaae7d));import{mkdir,readFile,writeFile}from'node:fs/promises';function a125_0x3a1e(){const _0x31c369=['.cache','timeout','\x20available,\x20current\x20','655393khTwGQ','latest','3221225XSDGmZ','6327oDweuu','/v/','update-check.json','https://www.npmjs.com/package/','910595yZNhCk','lastNotifiedAt','lovrabet-cli','entries','json','string','/-/package/',',\x20run:\x20','2773762WMBFBD','match','trim','minor','checkedAt','33BfweHi','5665710DgvNwp','Invalid\x20semver','patch','utf8','yes','object','major','stringify','3564291DFtNVq','lastNotifiedVersion','14424shtrol','map','filter','4LUEMJp','number','now','6NzonLA','prerelease'];a125_0x3a1e=function(){return _0x31c369;};return a125_0x3a1e();}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';const UPDATE_CHECK_TTL_MS=0xc*0x3c*0x3c*0x3e8,UPDATE_NOTICE_TTL_MS=0x18*0x3c*0x3c*0x3e8;function parseSemver(_0xe2cfc2){const _0x5627a0=a125_0x2a47,_0x3a4658=_0xe2cfc2[_0x5627a0(0x112)]()[_0x5627a0(0x111)](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x3a4658)return null;return{'major':Number(_0x3a4658[0x1]),'minor':Number(_0x3a4658[0x2]),'patch':Number(_0x3a4658[0x3]),'prerelease':_0x3a4658[0x4]};}function compareSemver(_0x2d9249,_0xc109a6){const _0x8cc97a=a125_0x2a47,_0x411e2d=parseSemver(_0x2d9249),_0x3bb45b=parseSemver(_0xc109a6);if(!_0x411e2d||!_0x3bb45b)throw new Error(_0x8cc97a(0x117));for(const _0x2e6b4b of[_0x8cc97a(0x11c),_0x8cc97a(0x113),_0x8cc97a(0x118)]){if(_0x411e2d[_0x2e6b4b]<_0x3bb45b[_0x2e6b4b])return-0x1;if(_0x411e2d[_0x2e6b4b]>_0x3bb45b[_0x2e6b4b])return 0x1;}if(!_0x411e2d[_0x8cc97a(0x127)]&&!_0x3bb45b['prerelease'])return 0x0;if(!_0x411e2d['prerelease'])return 0x1;if(!_0x3bb45b[_0x8cc97a(0x127)])return-0x1;if(_0x411e2d[_0x8cc97a(0x127)]===_0x3bb45b['prerelease'])return 0x0;return _0x411e2d[_0x8cc97a(0x127)]<_0x3bb45b[_0x8cc97a(0x127)]?-0x1:0x1;}function isUpdateNoticeDisabled(){const _0x2ea937=a125_0x2a47,_0x551ff7=process.env.LOVRABET_NO_UPDATE_NOTICE?.[_0x2ea937(0x112)]()['toLowerCase']();return _0x551ff7==='1'||_0x551ff7==='true'||_0x551ff7===_0x2ea937(0x11a);}function cacheRoot(){const _0x3f33c7=a125_0x2a47;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0x3f33c7(0x128));}export function getUpdateNoticeCachePath(){const _0x46e234=a125_0x2a47;return join(cacheRoot(),_0x46e234(0x134),_0x46e234(0x130));}async function readUpdateNoticeCache(){const _0x44de1b=a125_0x2a47;try{const _0x4a6f3f=await readFile(getUpdateNoticeCachePath(),_0x44de1b(0x119)),_0x378d93=JSON['parse'](_0x4a6f3f);if(!_0x378d93||typeof _0x378d93!==_0x44de1b(0x11b))return{};return _0x378d93;}catch{return{};}}async function writeUpdateNoticeCache(_0x5c42a0){const _0x5bac33=a125_0x2a47;try{const _0x33c567=getUpdateNoticeCachePath();await mkdir(dirname(_0x33c567),{'recursive':!![]}),await writeFile(_0x33c567,JSON[_0x5bac33(0x11d)](_0x5c42a0,null,0x2)+'\x0a','utf8');}catch{}}function isFreshCheck(_0xeba782,_0x597f2e){const _0x1b2d08=a125_0x2a47;return typeof _0xeba782[_0x1b2d08(0x114)]===_0x1b2d08(0x124)&&_0x597f2e-_0xeba782[_0x1b2d08(0x114)]<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x31b20c,_0x24479,_0xae61fa){const _0x9cea4a=a125_0x2a47;return _0x31b20c[_0x9cea4a(0x11f)]===_0x24479&&typeof _0x31b20c[_0x9cea4a(0x133)]===_0x9cea4a(0x124)&&_0xae61fa-_0x31b20c[_0x9cea4a(0x133)]<UPDATE_NOTICE_TTL_MS;}async function fetchNpmDistTags(_0x966995=0x5dc){const _0x4ab9e1=a125_0x2a47;try{const _0x199afa=NPM_REGISTRY_BASE_URL+_0x4ab9e1(0x10e)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+'/dist-tags',_0x1123b6=await fetch(_0x199afa,{'signal':AbortSignal[_0x4ab9e1(0x129)](_0x966995)});if(!_0x1123b6['ok'])return null;const _0xb57600=await _0x1123b6[_0x4ab9e1(0x10c)]();if(!_0xb57600||typeof _0xb57600!==_0x4ab9e1(0x11b))return null;return Object['fromEntries'](Object[_0x4ab9e1(0x10b)](_0xb57600)[_0x4ab9e1(0x122)](([,_0x3a9ecb])=>typeof _0x3a9ecb===_0x4ab9e1(0x10d)&&_0x3a9ecb['trim']())[_0x4ab9e1(0x121)](([_0x4b19e5,_0x23d12e])=>[_0x4b19e5,String(_0x23d12e)[_0x4ab9e1(0x112)]()]));}catch{return null;}}export function buildNpmVersionUrl(_0x52220){const _0x58e21a=a125_0x2a47;return _0x58e21a(0x131)+LOVRABET_NPM_PACKAGE_NAME+_0x58e21a(0x12f)+_0x52220;}function a125_0x2a47(_0xb44152,_0x3a2327){_0xb44152=_0xb44152-0x10b;const _0x3a1e17=a125_0x3a1e();let _0x2a4721=_0x3a1e17[_0xb44152];return _0x2a4721;}export async function resolveLatestUpdateNotice(){const _0x472b6b=a125_0x2a47;if(isUpdateNoticeDisabled())return null;try{const _0x1e6fe4=Date[_0x472b6b(0x125)](),_0x313408=getCliVersion(),_0x26f87e=await readUpdateNoticeCache();let _0x17ac4b=isFreshCheck(_0x26f87e,_0x1e6fe4)?_0x26f87e['latest']?.[_0x472b6b(0x112)]():undefined;if(!_0x17ac4b&&!isFreshCheck(_0x26f87e,_0x1e6fe4)){const _0x247b34=await fetchNpmDistTags();_0x17ac4b=_0x247b34?.[_0x472b6b(0x12c)]?.[_0x472b6b(0x112)](),await writeUpdateNoticeCache({..._0x26f87e,'checkedAt':_0x1e6fe4,'latest':_0x17ac4b,'failed':!_0x17ac4b});}if(!_0x17ac4b||compareSemver(_0x313408,_0x17ac4b)>=0x0)return null;if(isRecentlyNotified(_0x26f87e,_0x17ac4b,_0x1e6fe4))return null;const _0x3e4106=CLI_BIN_NAME+'\x20update';return await writeUpdateNoticeCache({..._0x26f87e,'checkedAt':isFreshCheck(_0x26f87e,_0x1e6fe4)?_0x26f87e[_0x472b6b(0x114)]:_0x1e6fe4,'latest':_0x17ac4b,'failed':![],'lastNotifiedVersion':_0x17ac4b,'lastNotifiedAt':_0x1e6fe4}),{'command':_0x3e4106,'current':_0x313408,'latest':_0x17ac4b,'url':buildNpmVersionUrl(_0x17ac4b),'message':CLI_BIN_NAME+'\x20'+_0x17ac4b+_0x472b6b(0x12a)+_0x313408+_0x472b6b(0x10f)+_0x3e4106};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x14b2e1,_0x5a7d29){const _0x15c203=a126_0x293e,_0x20489d=_0x14b2e1();while(!![]){try{const _0x3abe23=parseInt(_0x15c203(0x1c6))/0x1*(parseInt(_0x15c203(0x1c1))/0x2)+parseInt(_0x15c203(0x1c7))/0x3+-parseInt(_0x15c203(0x1be))/0x4+parseInt(_0x15c203(0x1c0))/0x5+parseInt(_0x15c203(0x1c2))/0x6*(parseInt(_0x15c203(0x1bc))/0x7)+-parseInt(_0x15c203(0x1bf))/0x8+parseInt(_0x15c203(0x1bd))/0x9*(-parseInt(_0x15c203(0x1c5))/0xa);if(_0x3abe23===_0x5a7d29)break;else _0x20489d['push'](_0x20489d['shift']());}catch(_0x18a5f1){_0x20489d['push'](_0x20489d['shift']());}}}(a126_0x3fc7,0x58d31));import{BUILD_TIME,GIT_COMMIT,VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}function a126_0x3fc7(){const _0x267be1=['3520360fsdOSU','142eMzWeo','102QKKslj','slice','unknown','6904210hOlrfs','4875hFgSOu','1726188qbTOaA','26677CKniRg','9WSlygg','544240cnMnYC','4000592bVtgBL'];a126_0x3fc7=function(){return _0x267be1;};return a126_0x3fc7();}export function getCliGitCommit(){const _0x7884ae=a126_0x293e,_0x2a2c95=String(GIT_COMMIT);return _0x2a2c95&&_0x2a2c95!==_0x7884ae(0x1c4)?_0x2a2c95:'';}function a126_0x293e(_0x5245d3,_0xf73ee8){_0x5245d3=_0x5245d3-0x1bc;const _0x3fc773=a126_0x3fc7();let _0x293ed3=_0x3fc773[_0x5245d3];return _0x293ed3;}export function getCliVersionDisplay(){const _0x44fc98=a126_0x293e,_0x2a83e6=getCliGitCommit(),_0x4c6fff=BUILD_TIME[_0x44fc98(0x1c3)](0x0,0xa);if(!_0x2a83e6||!_0x4c6fff)return VERSION;return VERSION+'\x20('+_0x2a83e6+',\x20'+_0x4c6fff+')';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x305653,_0x2b88fa){var _0x482ed0=a127_0x7116,_0x15ec24=_0x305653();while(!![]){try{var _0x5bcc1a=-parseInt(_0x482ed0(0x156))/0x1*(parseInt(_0x482ed0(0x150))/0x2)+parseInt(_0x482ed0(0x151))/0x3+parseInt(_0x482ed0(0x157))/0x4*(parseInt(_0x482ed0(0x158))/0x5)+-parseInt(_0x482ed0(0x14d))/0x6*(parseInt(_0x482ed0(0x155))/0x7)+-parseInt(_0x482ed0(0x153))/0x8+-parseInt(_0x482ed0(0x154))/0x9+-parseInt(_0x482ed0(0x14f))/0xa*(-parseInt(_0x482ed0(0x14e))/0xb);if(_0x5bcc1a===_0x2b88fa)break;else _0x15ec24['push'](_0x15ec24['shift']());}catch(_0x228d25){_0x15ec24['push'](_0x15ec24['shift']());}}}(a127_0x2ac0,0x994e1));export function writeCliSideChannelLine(_0x310e08){var _0x5ca6ff=a127_0x7116;process[_0x5ca6ff(0x152)]['write'](_0x310e08+'\x0a');}function a127_0x7116(_0x1a4528,_0x5e4e9f){_0x1a4528=_0x1a4528-0x14d;var _0x2ac051=a127_0x2ac0();var _0x711693=_0x2ac051[_0x1a4528];return _0x711693;}function a127_0x2ac0(){var _0x53fd0c=['2YWrdey','2338185OCgsNu','stderr','9098896ILYkaW','5990310WJiBCG','5831ZuZqkh','872183MDOsne','3020SfBtjX','3770SDgCea','948STNdxx','77uiyDSS','2980030fufVFH'];a127_0x2ac0=function(){return _0x53fd0c;};return a127_0x2ac0();}
|