@lovrabet/lovrabet-cli 2.1.18-beta.2 → 2.1.18

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.
Files changed (127) hide show
  1. package/lib/cli.js +1 -1
  2. package/lib/commands/api-doc/index.js +1 -1
  3. package/lib/commands/app/cache.js +1 -1
  4. package/lib/commands/app/definitions.js +1 -1
  5. package/lib/commands/app/eligibility.js +1 -1
  6. package/lib/commands/app/mock-loader.js +1 -1
  7. package/lib/commands/app/remote-source.js +1 -1
  8. package/lib/commands/app/shared.js +1 -1
  9. package/lib/commands/app-config/get.js +1 -1
  10. package/lib/commands/app-config/index.js +1 -1
  11. package/lib/commands/artifact/index.js +1 -1
  12. package/lib/commands/auth/device.js +1 -1
  13. package/lib/commands/auth/index.js +1 -1
  14. package/lib/commands/auth/prompt.js +1 -1
  15. package/lib/commands/bff/detail.js +1 -1
  16. package/lib/commands/bff/exec.js +1 -1
  17. package/lib/commands/bff/index.js +1 -1
  18. package/lib/commands/cli-skill/index.js +1 -1
  19. package/lib/commands/common/config-policy.js +1 -1
  20. package/lib/commands/common/constraints.js +1 -1
  21. package/lib/commands/common/flags.js +1 -1
  22. package/lib/commands/common/local-file.js +1 -1
  23. package/lib/commands/config/definitions.js +1 -1
  24. package/lib/commands/config/shared.js +1 -1
  25. package/lib/commands/data/index.js +1 -1
  26. package/lib/commands/dataset/detail.js +1 -1
  27. package/lib/commands/dataset/index.js +1 -1
  28. package/lib/commands/dataset/list.js +1 -1
  29. package/lib/commands/dataset/sdk-doc.js +1 -1
  30. package/lib/commands/doctor.js +1 -1
  31. package/lib/commands/file/index.js +1 -1
  32. package/lib/commands/init.js +1 -1
  33. package/lib/commands/kb/index.js +1 -1
  34. package/lib/commands/logs/index.js +1 -1
  35. package/lib/commands/ocr/index.js +1 -1
  36. package/lib/commands/personal-bff/index.js +1 -1
  37. package/lib/commands/registry.js +1 -1
  38. package/lib/commands/schedule/index.js +1 -1
  39. package/lib/commands/schema.js +1 -1
  40. package/lib/commands/service/dynamic.js +1 -1
  41. package/lib/commands/service/function-name-adapter.js +1 -1
  42. package/lib/commands/service/index.js +1 -1
  43. package/lib/commands/service/registry.js +1 -1
  44. package/lib/commands/skill/commands/create.js +1 -1
  45. package/lib/commands/skill/commands/install.js +1 -1
  46. package/lib/commands/skill/commands/list.js +1 -1
  47. package/lib/commands/skill/commands/push.js +1 -1
  48. package/lib/commands/skill/commands/validate.js +1 -1
  49. package/lib/commands/skill/flags.js +1 -1
  50. package/lib/commands/skill/index.js +1 -1
  51. package/lib/commands/skill/manifest-helpers.js +1 -1
  52. package/lib/commands/skill/push-execute.js +1 -1
  53. package/lib/commands/skill/push-flow-helpers.js +1 -1
  54. package/lib/commands/skill/push-retarget.js +1 -1
  55. package/lib/commands/skill/scopes.js +1 -1
  56. package/lib/commands/skill/summary.js +1 -1
  57. package/lib/commands/skill/templates.js +1 -1
  58. package/lib/commands/skill/validate.js +1 -1
  59. package/lib/commands/sql/detail.js +1 -1
  60. package/lib/commands/sql/exec.js +1 -1
  61. package/lib/commands/sql/index.js +1 -1
  62. package/lib/commands/update.js +1 -1
  63. package/lib/commands/workspace/index.js +1 -1
  64. package/lib/config/schema.js +1 -1
  65. package/lib/constant/app.js +1 -1
  66. package/lib/constant/auth-mode.js +1 -1
  67. package/lib/constant/cli.js +1 -1
  68. package/lib/constant/defaults.js +1 -1
  69. package/lib/constant/distribution.js +1 -1
  70. package/lib/constant/domain.js +1 -1
  71. package/lib/constant/env.js +1 -1
  72. package/lib/constant/output.js +1 -1
  73. package/lib/constant/product.js +1 -1
  74. package/lib/constant/risk.js +1 -1
  75. package/lib/constant/url.js +1 -1
  76. package/lib/context.js +1 -1
  77. package/lib/core/api-client.js +1 -1
  78. package/lib/core/db-resolver.js +1 -1
  79. package/lib/core/sdk-client.js +1 -1
  80. package/lib/errors.js +1 -1
  81. package/lib/framework/build-all-flags.js +1 -1
  82. package/lib/framework/dryrun.js +1 -1
  83. package/lib/framework/flags.js +1 -1
  84. package/lib/framework/help.js +1 -1
  85. package/lib/framework/index.js +1 -1
  86. package/lib/framework/output.js +1 -1
  87. package/lib/framework/preparse.js +1 -1
  88. package/lib/framework/rate-limit.js +1 -1
  89. package/lib/framework/response.js +1 -1
  90. package/lib/framework/runner-confirmation.js +1 -1
  91. package/lib/framework/runner-error.js +1 -1
  92. package/lib/framework/runner.js +1 -1
  93. package/lib/framework/schema-export.js +1 -1
  94. package/lib/framework/service-order.js +1 -1
  95. package/lib/framework/types.js +1 -1
  96. package/lib/generated/build-info.d.ts +4 -4
  97. package/lib/generated/build-info.js +1 -1
  98. package/lib/help.js +1 -1
  99. package/lib/runtime/event.js +1 -1
  100. package/lib/runtime/index.js +1 -1
  101. package/lib/runtime/queue.js +1 -1
  102. package/lib/runtime/resolve.js +1 -1
  103. package/lib/skills/npx-skills-add.js +1 -1
  104. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  105. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  106. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  107. package/lib/skills/runtime-skill-sync/links.js +1 -1
  108. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  109. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  110. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  111. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  112. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  113. package/lib/skills/runtime-skill-sync/push.js +1 -1
  114. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  115. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  116. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  117. package/lib/skills/runtime-skill-sync.js +1 -1
  118. package/lib/utils/apply-jq-filter.js +1 -1
  119. package/lib/utils/logger.js +1 -1
  120. package/lib/utils/lossless-json.d.ts +7 -14
  121. package/lib/utils/lossless-json.js +1 -1
  122. package/lib/utils/params.js +1 -1
  123. package/lib/utils/platform.js +1 -1
  124. package/lib/utils/update-notice.js +1 -1
  125. package/lib/utils/version.js +1 -1
  126. package/lib/utils/write-cli-side-channel.js +1 -1
  127. package/package.json +1 -1
@@ -1,21 +1,14 @@
1
1
  /**
2
- * JSON helpers that preserve integer literals outside JavaScript's safe range.
3
- *
4
- * Runtime APIs may serialize database BIGINT identifiers as unquoted JSON
5
- * numbers. Native JSON.parse rounds those values before callers can inspect
6
- * them, so converting the resulting number with String() is already too late.
7
- * This module quotes only unsafe integer tokens before the first parse. Safe
8
- * integers, decimal values, booleans, nulls, and string contents keep their
9
- * normal JSON semantics.
2
+ * 本文件提供无损 JSON 解析,并在 SDK 调用期间临时替换 Response.json。
3
+ * 它会在首次解析前把超出 JavaScript 安全整数范围的整数字面量转成字符串,
4
+ * 同时保留安全整数、小数、布尔值、null 与字符串的原有语义。
10
5
  */
6
+ /** 解析 JSON,同时把非安全整数保留为十进制字符串。 */
11
7
  export declare function parseLosslessJson<T = unknown>(text: string): T;
12
8
  /**
13
- * Installs the lossless parser at the Response boundary used by @lovrabet/sdk.
14
- * The SDK currently calls Response.json() internally and does not expose a
15
- * parser hook, so this must run before the first runtime response is decoded.
16
- *
17
- * Returns a restore function so the CLI can limit the global Response patch to
18
- * the SDK command lifecycle.
9
+ * 在 @lovrabet/sdk 使用的 Response 边界安装无损解析器。
10
+ * SDK 暂未暴露 parser hook,因此调用方需要在首个响应解析前安装,并在命令结束后恢复。
19
11
  */
20
12
  export declare function installLosslessJsonResponseParser(): () => void;
13
+ /** 若无损 Response.json 解析器已安装,则立即恢复原实现。 */
21
14
  export declare function restoreLosslessJsonResponseParser(): void;
@@ -1 +1 @@
1
- const a120_0x24165e=a120_0x3816;(function(_0xfdcf57,_0x4ec232){const _0x179de2=a120_0x3816,_0x2ba2a2=_0xfdcf57();while(!![]){try{const _0x2d5e5f=-parseInt(_0x179de2(0x186))/0x1*(parseInt(_0x179de2(0x18d))/0x2)+-parseInt(_0x179de2(0x180))/0x3*(parseInt(_0x179de2(0x192))/0x4)+parseInt(_0x179de2(0x187))/0x5*(parseInt(_0x179de2(0x18e))/0x6)+parseInt(_0x179de2(0x183))/0x7+-parseInt(_0x179de2(0x190))/0x8*(parseInt(_0x179de2(0x18b))/0x9)+parseInt(_0x179de2(0x191))/0xa+parseInt(_0x179de2(0x194))/0xb*(parseInt(_0x179de2(0x17f))/0xc);if(_0x2d5e5f===_0x4ec232)break;else _0x2ba2a2['push'](_0x2ba2a2['shift']());}catch(_0x85d4c4){_0x2ba2a2['push'](_0x2ba2a2['shift']());}}}(a120_0x10d6,0xe6487));const JSON_NUMBER_PATTERN=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/,MAX_SAFE_INTEGER=BigInt(Number[a120_0x24165e(0x182)]),MIN_SAFE_INTEGER=BigInt(Number[a120_0x24165e(0x18a)]);let restoreResponseJsonParser,responseJsonPrototype,originalResponseJsonDescriptor;function isUnsafeIntegerLiteral(_0x488054){const _0x10b6d3=a120_0x24165e;if(_0x488054['includes']('.')||_0x488054[_0x10b6d3(0x184)]('e')||_0x488054[_0x10b6d3(0x184)]('E'))return![];const _0x16d734=BigInt(_0x488054);return _0x16d734>MAX_SAFE_INTEGER||_0x16d734<MIN_SAFE_INTEGER;}function a120_0x3816(_0x282ae8,_0xd9fae6){_0x282ae8=_0x282ae8-0x17e;const _0x10d651=a120_0x10d6();let _0x3816ca=_0x10d651[_0x282ae8];return _0x3816ca;}function quoteUnsafeIntegerLiterals(_0x539e91){const _0x4a4728=a120_0x24165e;let _0x20ab54='',_0x28df8a=![],_0x441ed4=![];for(let _0x144d5b=0x0;_0x144d5b<_0x539e91[_0x4a4728(0x18f)];){const _0x1b9b47=_0x539e91[_0x144d5b];if(_0x28df8a){_0x20ab54+=_0x1b9b47,_0x144d5b+=0x1;if(_0x441ed4)_0x441ed4=![];else{if(_0x1b9b47==='\x5c')_0x441ed4=!![];else _0x1b9b47==='\x22'&&(_0x28df8a=![]);}continue;}if(_0x1b9b47==='\x22'){_0x28df8a=!![],_0x20ab54+=_0x1b9b47,_0x144d5b+=0x1;continue;}if(_0x1b9b47==='-'||_0x1b9b47>='0'&&_0x1b9b47<='9'){const _0xe47a65=JSON_NUMBER_PATTERN[_0x4a4728(0x189)](_0x539e91[_0x4a4728(0x181)](_0x144d5b))?.[0x0];if(_0xe47a65){_0x20ab54+=isUnsafeIntegerLiteral(_0xe47a65)?'\x22'+_0xe47a65+'\x22':_0xe47a65,_0x144d5b+=_0xe47a65[_0x4a4728(0x18f)];continue;}}_0x20ab54+=_0x1b9b47,_0x144d5b+=0x1;}return _0x20ab54;}export function parseLosslessJson(_0x2f278f){const _0x1407f1=a120_0x24165e;return JSON[_0x1407f1(0x193)](quoteUnsafeIntegerLiterals(_0x2f278f));}export function installLosslessJsonResponseParser(){const _0x5b99b1=a120_0x24165e;if(typeof Response===_0x5b99b1(0x18c))return()=>{};if(restoreResponseJsonParser)return restoreResponseJsonParser;return responseJsonPrototype=Response['prototype'],originalResponseJsonDescriptor=Object['getOwnPropertyDescriptor'](responseJsonPrototype,_0x5b99b1(0x188)),Object[_0x5b99b1(0x17e)](responseJsonPrototype,'json',{'configurable':!![],'enumerable':![],'value':async function _0x324183(){const _0x1eb563=_0x5b99b1;return parseLosslessJson(await this[_0x1eb563(0x185)]());},'writable':!![]}),restoreResponseJsonParser=()=>{const _0x57e553=_0x5b99b1;if(!responseJsonPrototype)return;originalResponseJsonDescriptor?Object[_0x57e553(0x17e)](responseJsonPrototype,_0x57e553(0x188),originalResponseJsonDescriptor):delete responseJsonPrototype[_0x57e553(0x188)],responseJsonPrototype=undefined,originalResponseJsonDescriptor=undefined,restoreResponseJsonParser=undefined;},restoreResponseJsonParser;}export function restoreLosslessJsonResponseParser(){restoreResponseJsonParser?.();}function a120_0x10d6(){const _0x14593c=['354GHVftJ','62862BXVVfF','length','8996248NxixeO','9680460SMgUJU','162908vBBdeT','parse','919347HBXtzT','defineProperty','12mDFnbM','24vFdEHE','slice','MAX_SAFE_INTEGER','8510299nMdIkG','includes','text','2069ZYlPjq','235QgbFyq','json','exec','MIN_SAFE_INTEGER','9rAbKmb','undefined'];a120_0x10d6=function(){return _0x14593c;};return a120_0x10d6();}
1
+ const a120_0x4e2547=a120_0x4a1a;(function(_0x1f5043,_0x6a2758){const _0x4bd0d9=a120_0x4a1a,_0x4cc925=_0x1f5043();while(!![]){try{const _0x2bbe3=-parseInt(_0x4bd0d9(0x18d))/0x1+parseInt(_0x4bd0d9(0x18e))/0x2+-parseInt(_0x4bd0d9(0x189))/0x3+parseInt(_0x4bd0d9(0x191))/0x4+-parseInt(_0x4bd0d9(0x183))/0x5*(-parseInt(_0x4bd0d9(0x18c))/0x6)+parseInt(_0x4bd0d9(0x18b))/0x7*(parseInt(_0x4bd0d9(0x18a))/0x8)+-parseInt(_0x4bd0d9(0x190))/0x9;if(_0x2bbe3===_0x6a2758)break;else _0x4cc925['push'](_0x4cc925['shift']());}catch(_0x2a762b){_0x4cc925['push'](_0x4cc925['shift']());}}}(a120_0x57ae,0xe51ee));const JSON_NUMBER_PATTERN=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/,MAX_SAFE_INTEGER=BigInt(Number['MAX_SAFE_INTEGER']),MIN_SAFE_INTEGER=BigInt(Number[a120_0x4e2547(0x195)]);function a120_0x57ae(){const _0x3f25b9=['text','undefined','includes','length','defineProperty','5437371aBxwOH','145744JPBuuL','581SQAbhT','138TJIUOq','1379891vECEVP','488090NqzTyY','prototype','1859031hHZIif','4977392EGkYYl','getOwnPropertyDescriptor','json','parse','MIN_SAFE_INTEGER','slice','290630mkkVeO'];a120_0x57ae=function(){return _0x3f25b9;};return a120_0x57ae();}let restoreResponseJsonParser,responseJsonPrototype,originalResponseJsonDescriptor;function isUnsafeIntegerLiteral(_0x2a59e6){const _0x29c826=a120_0x4e2547;if(_0x2a59e6[_0x29c826(0x186)]('.')||_0x2a59e6[_0x29c826(0x186)]('e')||_0x2a59e6[_0x29c826(0x186)]('E'))return![];const _0x32a034=BigInt(_0x2a59e6);return _0x32a034>MAX_SAFE_INTEGER||_0x32a034<MIN_SAFE_INTEGER;}function quoteUnsafeIntegerLiterals(_0x2cf460){const _0xcef7e2=a120_0x4e2547;let _0x424a6a='',_0x24c21a=![],_0x3105f4=![];for(let _0xb12b6f=0x0;_0xb12b6f<_0x2cf460[_0xcef7e2(0x187)];){const _0x553a02=_0x2cf460[_0xb12b6f];if(_0x24c21a){_0x424a6a+=_0x553a02,_0xb12b6f+=0x1;if(_0x3105f4)_0x3105f4=![];else{if(_0x553a02==='\x5c')_0x3105f4=!![];else _0x553a02==='\x22'&&(_0x24c21a=![]);}continue;}if(_0x553a02==='\x22'){_0x24c21a=!![],_0x424a6a+=_0x553a02,_0xb12b6f+=0x1;continue;}if(_0x553a02==='-'||_0x553a02>='0'&&_0x553a02<='9'){const _0x1a2076=JSON_NUMBER_PATTERN['exec'](_0x2cf460[_0xcef7e2(0x196)](_0xb12b6f))?.[0x0];if(_0x1a2076){_0x424a6a+=isUnsafeIntegerLiteral(_0x1a2076)?'\x22'+_0x1a2076+'\x22':_0x1a2076,_0xb12b6f+=_0x1a2076['length'];continue;}}_0x424a6a+=_0x553a02,_0xb12b6f+=0x1;}return _0x424a6a;}function a120_0x4a1a(_0x36fd34,_0x2c8c3a){_0x36fd34=_0x36fd34-0x183;const _0x57ae50=a120_0x57ae();let _0x4a1ac2=_0x57ae50[_0x36fd34];return _0x4a1ac2;}export function parseLosslessJson(_0xe04730){const _0x6f0d05=a120_0x4e2547;return JSON[_0x6f0d05(0x194)](quoteUnsafeIntegerLiterals(_0xe04730));}export function installLosslessJsonResponseParser(){const _0x165beb=a120_0x4e2547;if(typeof Response===_0x165beb(0x185))return()=>{};if(restoreResponseJsonParser)return restoreResponseJsonParser;return responseJsonPrototype=Response[_0x165beb(0x18f)],originalResponseJsonDescriptor=Object[_0x165beb(0x192)](responseJsonPrototype,'json'),Object[_0x165beb(0x188)](responseJsonPrototype,_0x165beb(0x193),{...originalResponseJsonDescriptor??{'configurable':!![],'enumerable':![],'writable':!![]},'value':async function _0x40e296(){const _0x292e5b=_0x165beb;return parseLosslessJson(await this[_0x292e5b(0x184)]());}}),restoreResponseJsonParser=()=>{const _0x46a7d7=_0x165beb;if(!responseJsonPrototype)return;originalResponseJsonDescriptor?Object[_0x46a7d7(0x188)](responseJsonPrototype,_0x46a7d7(0x193),originalResponseJsonDescriptor):delete responseJsonPrototype[_0x46a7d7(0x193)],responseJsonPrototype=undefined,originalResponseJsonDescriptor=undefined,restoreResponseJsonParser=undefined;},restoreResponseJsonParser;}export function restoreLosslessJsonResponseParser(){restoreResponseJsonParser?.();}
@@ -1 +1 @@
1
- (function(_0x51f0b5,_0x229164){const _0x50d301=a121_0x596d,_0x11e9f4=_0x51f0b5();while(!![]){try{const _0xbd3d4d=parseInt(_0x50d301(0x1d0))/0x1+-parseInt(_0x50d301(0x1c9))/0x2*(-parseInt(_0x50d301(0x1cb))/0x3)+-parseInt(_0x50d301(0x1c2))/0x4+-parseInt(_0x50d301(0x1c5))/0x5+-parseInt(_0x50d301(0x1d1))/0x6*(-parseInt(_0x50d301(0x1ca))/0x7)+parseInt(_0x50d301(0x1da))/0x8+-parseInt(_0x50d301(0x1c6))/0x9;if(_0xbd3d4d===_0x229164)break;else _0x11e9f4['push'](_0x11e9f4['shift']());}catch(_0x40d665){_0x11e9f4['push'](_0x11e9f4['shift']());}}}(a121_0x573c,0x2dbc2));import{CliErrors}from'../errors.js';function a121_0x573c(){const _0x21c710=['data\x20update\x20--params\x20must\x20be\x20a\x20JSON\x20object\x20with\x20id.','number','validation','batchCreate\x20--params\x20must\x20be\x20a\x20JSON\x20array\x20or\x20{\x22items\x22:[...]}','2346016jqQKgD','\x20must\x20be\x20a\x20positive\x20integer\x20or\x20numeric\x20string.','data\x20update\x20id\x20array\x20cannot\x20be\x20empty.','50448fYAlEw','data\x20update\x20--params.','length','131305ZqdsPS','8577288gMIfPD','isSafeInteger','\x20records\x20per\x20call;\x20received\x20','2604ishOBc','2254238YrwJry','603TtkGKG','id[','data\x20update\x20requires\x20\x22id\x22\x20in\x20--params.','isArray','Invalid\x20JSON\x20for\x20--params:\x20','302247oPXNqS','6TmFCmY','join','object','string','Example:\x20--params\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22done\x22}\x27'];a121_0x573c=function(){return _0x21c710;};return a121_0x573c();}import{parseLosslessJson}from'../utils/lossless-json.js';export const MAX_DATA_UPDATE_IDS=0x3e8;export function parseJsonParams(_0x2f6ced){const _0x1ef3c3=a121_0x596d;if(!_0x2f6ced)return undefined;try{return parseLosslessJson(_0x2f6ced);}catch{throw CliErrors[_0x1ef3c3(0x1d8)]('Invalid\x20JSON\x20for\x20--params:\x20'+_0x2f6ced);}}export function parseJsonParamsValue(_0x9bf245){const _0x235ab4=a121_0x596d;if(!_0x9bf245)return undefined;try{return parseLosslessJson(_0x9bf245);}catch{throw CliErrors[_0x235ab4(0x1d8)](_0x235ab4(0x1cf)+_0x9bf245);}}export function parseBatchCreateItemsFromParams(_0xa0ae7b){const _0x477370=a121_0x596d;if(Array[_0x477370(0x1ce)](_0xa0ae7b))return _0xa0ae7b;if(_0xa0ae7b!==null&&_0xa0ae7b!==undefined&&typeof _0xa0ae7b===_0x477370(0x1d3)&&Array['isArray'](_0xa0ae7b['items']))return _0xa0ae7b['items'];throw CliErrors['validation'](_0x477370(0x1d9),'Example:\x20--params\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27');}function parseDataUpdateId(_0x5981c0,_0x5733c5){const _0x2bbcde=a121_0x596d;if(typeof _0x5981c0===_0x2bbcde(0x1d7)&&Number[_0x2bbcde(0x1c7)](_0x5981c0)&&_0x5981c0>0x0)return _0x5981c0;if(typeof _0x5981c0===_0x2bbcde(0x1d4)){if(/^[1-9]\d*$/['test'](_0x5981c0))return _0x5981c0;}throw CliErrors[_0x2bbcde(0x1d8)](_0x2bbcde(0x1c3)+_0x5733c5+_0x2bbcde(0x1db));}export function parseUpdateIdsFromParams(_0x298939){const _0xedddfe=a121_0x596d;if(_0x298939===null||_0x298939===undefined||typeof _0x298939!==_0xedddfe(0x1d3)||Array[_0xedddfe(0x1ce)](_0x298939))throw CliErrors[_0xedddfe(0x1d8)](_0xedddfe(0x1d6),_0xedddfe(0x1d5));const _0x16be03=_0x298939['id'];if(_0x16be03===undefined||_0x16be03===null)throw CliErrors['validation'](_0xedddfe(0x1cd),_0xedddfe(0x1d5));const _0x7f8865=Array[_0xedddfe(0x1ce)](_0x16be03)?_0x16be03:[_0x16be03];if(_0x7f8865[_0xedddfe(0x1c4)]===0x0)throw CliErrors['validation'](_0xedddfe(0x1dc));if(_0x7f8865[_0xedddfe(0x1c4)]>MAX_DATA_UPDATE_IDS)throw CliErrors[_0xedddfe(0x1d8)]('data\x20update\x20can\x20update\x20at\x20most\x20'+MAX_DATA_UPDATE_IDS+_0xedddfe(0x1c8)+_0x7f8865[_0xedddfe(0x1c4)]+'.');return _0x7f8865['map']((_0x548c2e,_0x4f250d)=>parseDataUpdateId(_0x548c2e,Array[_0xedddfe(0x1ce)](_0x16be03)?_0xedddfe(0x1cc)+_0x4f250d+']':'id'));}function a121_0x596d(_0x777f62,_0x249ce6){_0x777f62=_0x777f62-0x1c2;const _0x573c43=a121_0x573c();let _0x596ddc=_0x573c43[_0x777f62];return _0x596ddc;}export function normalizeUpdateParamsForRuntime(_0x2e01cb,_0xdaac9e){const _0x42ae6d=a121_0x596d;if(Array[_0x42ae6d(0x1ce)](_0x2e01cb['id'])&&_0xdaac9e['length']>0x1)return{..._0x2e01cb,'id':_0xdaac9e[_0x42ae6d(0x1d2)](',')};return _0x2e01cb;}
1
+ (function(_0x23a029,_0x38bea0){const _0x18350e=a121_0x4d5c,_0x92ad42=_0x23a029();while(!![]){try{const _0x3e6934=-parseInt(_0x18350e(0x152))/0x1+-parseInt(_0x18350e(0x150))/0x2+-parseInt(_0x18350e(0x151))/0x3*(parseInt(_0x18350e(0x16b))/0x4)+-parseInt(_0x18350e(0x15a))/0x5*(-parseInt(_0x18350e(0x15f))/0x6)+parseInt(_0x18350e(0x166))/0x7*(parseInt(_0x18350e(0x165))/0x8)+parseInt(_0x18350e(0x168))/0x9*(-parseInt(_0x18350e(0x159))/0xa)+parseInt(_0x18350e(0x158))/0xb;if(_0x3e6934===_0x38bea0)break;else _0x92ad42['push'](_0x92ad42['shift']());}catch(_0x3fd2c8){_0x92ad42['push'](_0x92ad42['shift']());}}}(a121_0x4ff2,0xd191f));import{CliErrors}from'../errors.js';import{parseLosslessJson}from'../utils/lossless-json.js';export const MAX_DATA_UPDATE_IDS=0x3e8;export function parseJsonParams(_0x5ac31d){const _0x142d72=a121_0x4d5c;if(!_0x5ac31d)return undefined;try{return parseLosslessJson(_0x5ac31d);}catch{throw CliErrors['validation'](_0x142d72(0x16a)+_0x5ac31d);}}function a121_0x4d5c(_0x366e09,_0x272b2c){_0x366e09=_0x366e09-0x14e;const _0x4ff2e8=a121_0x4ff2();let _0x4d5c2e=_0x4ff2e8[_0x366e09];return _0x4d5c2e;}export function parseJsonParamsValue(_0x23bccd){const _0xfa506a=a121_0x4d5c;if(!_0x23bccd)return undefined;try{return parseLosslessJson(_0x23bccd);}catch{throw CliErrors[_0xfa506a(0x157)](_0xfa506a(0x16a)+_0x23bccd);}}function a121_0x4ff2(){const _0x187bbe=['1904094AHYoef','3225531jxXKVO','1015612EpMohZ','data\x20update\x20id\x20array\x20cannot\x20be\x20empty.','join','map','length','validation','29910408MXLBms','1060xhoZsa','204205lYPKFV','data\x20update\x20--params\x20must\x20be\x20a\x20JSON\x20object\x20with\x20id.','\x20must\x20be\x20a\x20positive\x20integer\x20or\x20numeric\x20string.','data\x20update\x20requires\x20\x22id\x22\x20in\x20--params.','Example:\x20--params\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','102CKbUbM','isSafeInteger','id[','object','number','Example:\x20--params\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22done\x22}\x27','2673952ckzzvv','28YvYhVd','data\x20update\x20can\x20update\x20at\x20most\x20','72099bvyKYe','isArray','Invalid\x20JSON\x20for\x20--params:\x20','4NkpfZr','items','test'];a121_0x4ff2=function(){return _0x187bbe;};return a121_0x4ff2();}export function parseBatchCreateItemsFromParams(_0x2f3761){const _0x27589a=a121_0x4d5c;if(Array[_0x27589a(0x169)](_0x2f3761))return _0x2f3761;if(_0x2f3761!==null&&_0x2f3761!==undefined&&typeof _0x2f3761===_0x27589a(0x162)&&Array[_0x27589a(0x169)](_0x2f3761[_0x27589a(0x14e)]))return _0x2f3761['items'];throw CliErrors[_0x27589a(0x157)]('batchCreate\x20--params\x20must\x20be\x20a\x20JSON\x20array\x20or\x20{\x22items\x22:[...]}',_0x27589a(0x15e));}function parseDataUpdateId(_0x41480c,_0xc8b608){const _0x3e9a93=a121_0x4d5c;if(typeof _0x41480c===_0x3e9a93(0x163)&&Number[_0x3e9a93(0x160)](_0x41480c)&&_0x41480c>0x0)return _0x41480c;if(typeof _0x41480c==='string'){if(/^[1-9]\d*$/[_0x3e9a93(0x14f)](_0x41480c))return _0x41480c;}throw CliErrors[_0x3e9a93(0x157)]('data\x20update\x20--params.'+_0xc8b608+_0x3e9a93(0x15c));}export function parseUpdateIdsFromParams(_0x40c0b5){const _0x286b97=a121_0x4d5c;if(_0x40c0b5===null||_0x40c0b5===undefined||typeof _0x40c0b5!==_0x286b97(0x162)||Array[_0x286b97(0x169)](_0x40c0b5))throw CliErrors[_0x286b97(0x157)](_0x286b97(0x15b),_0x286b97(0x164));const _0x3e36f3=_0x40c0b5['id'];if(_0x3e36f3===undefined||_0x3e36f3===null)throw CliErrors[_0x286b97(0x157)](_0x286b97(0x15d),_0x286b97(0x164));const _0x53a983=Array['isArray'](_0x3e36f3)?_0x3e36f3:[_0x3e36f3];if(_0x53a983[_0x286b97(0x156)]===0x0)throw CliErrors['validation'](_0x286b97(0x153));if(_0x53a983['length']>MAX_DATA_UPDATE_IDS)throw CliErrors['validation'](_0x286b97(0x167)+MAX_DATA_UPDATE_IDS+'\x20records\x20per\x20call;\x20received\x20'+_0x53a983['length']+'.');return _0x53a983[_0x286b97(0x155)]((_0xad69eb,_0x439b7f)=>parseDataUpdateId(_0xad69eb,Array[_0x286b97(0x169)](_0x3e36f3)?_0x286b97(0x161)+_0x439b7f+']':'id'));}export function normalizeUpdateParamsForRuntime(_0x357d6e,_0x2a494a){const _0x5b352c=a121_0x4d5c;if(Array[_0x5b352c(0x169)](_0x357d6e['id'])&&_0x2a494a[_0x5b352c(0x156)]>0x1)return{..._0x357d6e,'id':_0x2a494a[_0x5b352c(0x154)](',')};return _0x357d6e;}
@@ -1 +1 @@
1
- const a122_0x1903ca=a122_0x50e6;(function(_0x55e0cc,_0xef13a3){const _0x1142cf=a122_0x50e6,_0x43b0b7=_0x55e0cc();while(!![]){try{const _0x1e658d=-parseInt(_0x1142cf(0x15a))/0x1*(parseInt(_0x1142cf(0x15d))/0x2)+parseInt(_0x1142cf(0x164))/0x3*(-parseInt(_0x1142cf(0x161))/0x4)+-parseInt(_0x1142cf(0x162))/0x5*(parseInt(_0x1142cf(0x15c))/0x6)+-parseInt(_0x1142cf(0x157))/0x7*(parseInt(_0x1142cf(0x160))/0x8)+-parseInt(_0x1142cf(0x15b))/0x9*(-parseInt(_0x1142cf(0x163))/0xa)+parseInt(_0x1142cf(0x15f))/0xb*(parseInt(_0x1142cf(0x158))/0xc)+parseInt(_0x1142cf(0x156))/0xd*(parseInt(_0x1142cf(0x159))/0xe);if(_0x1e658d===_0xef13a3)break;else _0x43b0b7['push'](_0x43b0b7['shift']());}catch(_0x1e7d81){_0x43b0b7['push'](_0x43b0b7['shift']());}}}(a122_0x5240,0xcee1b));function a122_0x5240(){const _0x2c68f7=['platform','.cmd','1651QKXwqz','28RsWwuI','12aQUEKl','202258YIetok','1nVnNkQ','7330617dIKLQP','118938TiuLms','732418VENWmR','win32','2823667uaIlmD','1416464AyZTcp','2645824tcsByl','120vdLlTV','20bLmuBN','6yOotWR'];a122_0x5240=function(){return _0x2c68f7;};return a122_0x5240();}function a122_0x50e6(_0x834097,_0x1d954d){_0x834097=_0x834097-0x156;const _0x52402f=a122_0x5240();let _0x50e60e=_0x52402f[_0x834097];return _0x50e60e;}export const isWindows=process[a122_0x1903ca(0x165)]===a122_0x1903ca(0x15e);export function resolveNpmBin(_0x45a067){const _0x41cae4=a122_0x1903ca;return isWindows?_0x45a067+_0x41cae4(0x166):_0x45a067;}
1
+ const a122_0x258dde=a122_0x334c;(function(_0x51a6c5,_0x1390d5){const _0xe9a001=a122_0x334c,_0xa3def0=_0x51a6c5();while(!![]){try{const _0x4ee80d=parseInt(_0xe9a001(0x142))/0x1*(parseInt(_0xe9a001(0x13e))/0x2)+parseInt(_0xe9a001(0x143))/0x3+parseInt(_0xe9a001(0x13c))/0x4+parseInt(_0xe9a001(0x13d))/0x5+parseInt(_0xe9a001(0x141))/0x6*(parseInt(_0xe9a001(0x138))/0x7)+-parseInt(_0xe9a001(0x13f))/0x8*(parseInt(_0xe9a001(0x140))/0x9)+-parseInt(_0xe9a001(0x13a))/0xa;if(_0x4ee80d===_0x1390d5)break;else _0xa3def0['push'](_0xa3def0['shift']());}catch(_0x348e58){_0xa3def0['push'](_0xa3def0['shift']());}}}(a122_0x482e,0x83b49));function a122_0x334c(_0x158d5c,_0x1436fc){_0x158d5c=_0x158d5c-0x137;const _0x482e04=a122_0x482e();let _0x334c3e=_0x482e04[_0x158d5c];return _0x334c3e;}export const isWindows=process[a122_0x258dde(0x137)]===a122_0x258dde(0x13b);function a122_0x482e(){const _0xc3b83b=['15497GNnrzH','314325ZPKuaW','platform','2310hTRgVJ','.cmd','18967860VtABRa','win32','4149788QsXdhA','4567395eNjvJa','122lFYENn','8lNgaww','8569683CdBwLK','7044tigpZx'];a122_0x482e=function(){return _0xc3b83b;};return a122_0x482e();}export function resolveNpmBin(_0x317f73){const _0x539dc4=a122_0x258dde;return isWindows?_0x317f73+_0x539dc4(0x139):_0x317f73;}
@@ -1 +1 @@
1
- (function(_0xbd80e9,_0x42ce5a){const _0x7f9a0e=a123_0x526c,_0x52a7a5=_0xbd80e9();while(!![]){try{const _0x4421e=-parseInt(_0x7f9a0e(0xc1))/0x1+-parseInt(_0x7f9a0e(0xce))/0x2*(parseInt(_0x7f9a0e(0xbf))/0x3)+-parseInt(_0x7f9a0e(0xbe))/0x4*(-parseInt(_0x7f9a0e(0xd9))/0x5)+-parseInt(_0x7f9a0e(0xdf))/0x6*(-parseInt(_0x7f9a0e(0xe5))/0x7)+-parseInt(_0x7f9a0e(0xd0))/0x8+parseInt(_0x7f9a0e(0xcc))/0x9*(parseInt(_0x7f9a0e(0xd6))/0xa)+-parseInt(_0x7f9a0e(0xe0))/0xb*(-parseInt(_0x7f9a0e(0xda))/0xc);if(_0x4421e===_0x42ce5a)break;else _0x52a7a5['push'](_0x52a7a5['shift']());}catch(_0x4009a7){_0x52a7a5['push'](_0x52a7a5['shift']());}}}(a123_0x1f61,0xd4bc1));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';function a123_0x526c(_0x1c6aaa,_0x4b1d61){_0x1c6aaa=_0x1c6aaa-0xbe;const _0x1f61d7=a123_0x1f61();let _0x526c7c=_0x1f61d7[_0x1c6aaa];return _0x526c7c;}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(_0x460616){const _0x36e513=a123_0x526c,_0x4349a4=_0x460616[_0x36e513(0xcd)]()[_0x36e513(0xd3)](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x4349a4)return null;return{'major':Number(_0x4349a4[0x1]),'minor':Number(_0x4349a4[0x2]),'patch':Number(_0x4349a4[0x3]),'prerelease':_0x4349a4[0x4]};}function compareSemver(_0x44097f,_0x556bf){const _0x18c4de=a123_0x526c,_0x2127e4=parseSemver(_0x44097f),_0x174e76=parseSemver(_0x556bf);if(!_0x2127e4||!_0x174e76)throw new Error(_0x18c4de(0xca));for(const _0x1e0c74 of['major',_0x18c4de(0xc6),_0x18c4de(0xc0)]){if(_0x2127e4[_0x1e0c74]<_0x174e76[_0x1e0c74])return-0x1;if(_0x2127e4[_0x1e0c74]>_0x174e76[_0x1e0c74])return 0x1;}if(!_0x2127e4[_0x18c4de(0xc9)]&&!_0x174e76['prerelease'])return 0x0;if(!_0x2127e4[_0x18c4de(0xc9)])return 0x1;if(!_0x174e76['prerelease'])return-0x1;if(_0x2127e4['prerelease']===_0x174e76[_0x18c4de(0xc9)])return 0x0;return _0x2127e4[_0x18c4de(0xc9)]<_0x174e76[_0x18c4de(0xc9)]?-0x1:0x1;}function isUpdateNoticeDisabled(){const _0x4aba50=a123_0x526c,_0x2ee5d3=process.env.LOVRABET_NO_UPDATE_NOTICE?.['trim']()[_0x4aba50(0xc5)]();return _0x2ee5d3==='1'||_0x2ee5d3===_0x4aba50(0xd1)||_0x2ee5d3===_0x4aba50(0xc2);}function cacheRoot(){const _0x1bb0ea=a123_0x526c;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0x1bb0ea(0xde));}export function getUpdateNoticeCachePath(){const _0x5ac8c4=a123_0x526c;return join(cacheRoot(),_0x5ac8c4(0xc7),_0x5ac8c4(0xc8));}function a123_0x1f61(){const _0xd6e02=['number','parse','50UiVgGm','fromEntries','timeout','22360OEMAKZ','12TKVnbG','utf8','latest','https://www.npmjs.com/package/','.cache','129174vjhCOb','4733597dluoYU','entries',',\x20run:\x20','stringify','json','63XMqssb','lastNotifiedAt','956rkUDYZ','2493TBAmJZ','patch','172221aJrVLJ','yes','map','filter','toLowerCase','minor','lovrabet-cli','update-check.json','prerelease','Invalid\x20semver','/v/','2394405ShWFmn','trim','2790qvSGkf','/-/package/','6562352UzszEY','true','lastNotifiedVersion','match'];a123_0x1f61=function(){return _0xd6e02;};return a123_0x1f61();}async function readUpdateNoticeCache(){const _0x1d2913=a123_0x526c;try{const _0x217f5c=await readFile(getUpdateNoticeCachePath(),'utf8'),_0x3b2fc8=JSON[_0x1d2913(0xd5)](_0x217f5c);if(!_0x3b2fc8||typeof _0x3b2fc8!=='object')return{};return _0x3b2fc8;}catch{return{};}}async function writeUpdateNoticeCache(_0x1e1dff){const _0x50ce33=a123_0x526c;try{const _0x858a2b=getUpdateNoticeCachePath();await mkdir(dirname(_0x858a2b),{'recursive':!![]}),await writeFile(_0x858a2b,JSON[_0x50ce33(0xe3)](_0x1e1dff,null,0x2)+'\x0a',_0x50ce33(0xdb));}catch{}}function isFreshCheck(_0x497cde,_0x44311f){const _0x2a0785=a123_0x526c;return typeof _0x497cde['checkedAt']===_0x2a0785(0xd4)&&_0x44311f-_0x497cde['checkedAt']<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x2bea74,_0x1bdfdd,_0x2a7e36){const _0x42cc36=a123_0x526c;return _0x2bea74[_0x42cc36(0xd2)]===_0x1bdfdd&&typeof _0x2bea74[_0x42cc36(0xe6)]==='number'&&_0x2a7e36-_0x2bea74[_0x42cc36(0xe6)]<UPDATE_NOTICE_TTL_MS;}async function fetchNpmDistTags(_0x4fb90b=0x5dc){const _0x45acb4=a123_0x526c;try{const _0x5e848b=NPM_REGISTRY_BASE_URL+_0x45acb4(0xcf)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+'/dist-tags',_0x5cf312=await fetch(_0x5e848b,{'signal':AbortSignal[_0x45acb4(0xd8)](_0x4fb90b)});if(!_0x5cf312['ok'])return null;const _0x32f076=await _0x5cf312[_0x45acb4(0xe4)]();if(!_0x32f076||typeof _0x32f076!=='object')return null;return Object[_0x45acb4(0xd7)](Object[_0x45acb4(0xe1)](_0x32f076)[_0x45acb4(0xc4)](([,_0x3f2c37])=>typeof _0x3f2c37==='string'&&_0x3f2c37[_0x45acb4(0xcd)]())[_0x45acb4(0xc3)](([_0x2e2cea,_0x2e7a47])=>[_0x2e2cea,String(_0x2e7a47)['trim']()]));}catch{return null;}}export function buildNpmVersionUrl(_0x3f3150){const _0x45943c=a123_0x526c;return _0x45943c(0xdd)+LOVRABET_NPM_PACKAGE_NAME+_0x45943c(0xcb)+_0x3f3150;}export async function resolveLatestUpdateNotice(){const _0x149e6b=a123_0x526c;if(isUpdateNoticeDisabled())return null;try{const _0x7e73ae=Date['now'](),_0x3d1748=getCliVersion(),_0x26739b=await readUpdateNoticeCache();let _0x16fe71=isFreshCheck(_0x26739b,_0x7e73ae)?_0x26739b['latest']?.[_0x149e6b(0xcd)]():undefined;if(!_0x16fe71&&!isFreshCheck(_0x26739b,_0x7e73ae)){const _0xf948cd=await fetchNpmDistTags();_0x16fe71=_0xf948cd?.[_0x149e6b(0xdc)]?.[_0x149e6b(0xcd)](),await writeUpdateNoticeCache({..._0x26739b,'checkedAt':_0x7e73ae,'latest':_0x16fe71,'failed':!_0x16fe71});}if(!_0x16fe71||compareSemver(_0x3d1748,_0x16fe71)>=0x0)return null;if(isRecentlyNotified(_0x26739b,_0x16fe71,_0x7e73ae))return null;const _0x1fe476=CLI_BIN_NAME+'\x20update';return await writeUpdateNoticeCache({..._0x26739b,'checkedAt':isFreshCheck(_0x26739b,_0x7e73ae)?_0x26739b['checkedAt']:_0x7e73ae,'latest':_0x16fe71,'failed':![],'lastNotifiedVersion':_0x16fe71,'lastNotifiedAt':_0x7e73ae}),{'command':_0x1fe476,'current':_0x3d1748,'latest':_0x16fe71,'url':buildNpmVersionUrl(_0x16fe71),'message':CLI_BIN_NAME+'\x20'+_0x16fe71+'\x20available,\x20current\x20'+_0x3d1748+_0x149e6b(0xe2)+_0x1fe476};}catch{return null;}}
1
+ (function(_0x4d32e5,_0x5020d9){const _0x5bc890=a123_0x3222,_0x4c0494=_0x4d32e5();while(!![]){try{const _0x47484d=-parseInt(_0x5bc890(0x172))/0x1*(-parseInt(_0x5bc890(0x179))/0x2)+parseInt(_0x5bc890(0x16f))/0x3+-parseInt(_0x5bc890(0x165))/0x4+-parseInt(_0x5bc890(0x169))/0x5+-parseInt(_0x5bc890(0x173))/0x6+parseInt(_0x5bc890(0x177))/0x7+parseInt(_0x5bc890(0x176))/0x8;if(_0x47484d===_0x5020d9)break;else _0x4c0494['push'](_0x4c0494['shift']());}catch(_0x21e076){_0x4c0494['push'](_0x4c0494['shift']());}}}(a123_0x4168,0x3715b));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';const UPDATE_CHECK_TTL_MS=0xc*0x3c*0x3c*0x3e8,UPDATE_NOTICE_TTL_MS=0x18*0x3c*0x3c*0x3e8;function parseSemver(_0x45387a){const _0x1155b4=a123_0x3222,_0x53d749=_0x45387a[_0x1155b4(0x17b)]()[_0x1155b4(0x175)](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x53d749)return null;return{'major':Number(_0x53d749[0x1]),'minor':Number(_0x53d749[0x2]),'patch':Number(_0x53d749[0x3]),'prerelease':_0x53d749[0x4]};}function compareSemver(_0x2fda94,_0x2bfacb){const _0x30116f=a123_0x3222,_0x3eda58=parseSemver(_0x2fda94),_0x53950a=parseSemver(_0x2bfacb);if(!_0x3eda58||!_0x53950a)throw new Error('Invalid\x20semver');for(const _0x5e2493 of[_0x30116f(0x16d),_0x30116f(0x16e),'patch']){if(_0x3eda58[_0x5e2493]<_0x53950a[_0x5e2493])return-0x1;if(_0x3eda58[_0x5e2493]>_0x53950a[_0x5e2493])return 0x1;}if(!_0x3eda58[_0x30116f(0x164)]&&!_0x53950a[_0x30116f(0x164)])return 0x0;if(!_0x3eda58[_0x30116f(0x164)])return 0x1;if(!_0x53950a[_0x30116f(0x164)])return-0x1;if(_0x3eda58[_0x30116f(0x164)]===_0x53950a[_0x30116f(0x164)])return 0x0;return _0x3eda58['prerelease']<_0x53950a['prerelease']?-0x1:0x1;}function isUpdateNoticeDisabled(){const _0x22bbcb=a123_0x3222,_0x4afa85=process.env.LOVRABET_NO_UPDATE_NOTICE?.[_0x22bbcb(0x17b)]()[_0x22bbcb(0x182)]();return _0x4afa85==='1'||_0x4afa85===_0x22bbcb(0x174)||_0x4afa85==='yes';}function cacheRoot(){return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),'.cache');}export function getUpdateNoticeCachePath(){const _0x574bc8=a123_0x3222;return join(cacheRoot(),_0x574bc8(0x162),'update-check.json');}async function readUpdateNoticeCache(){try{const _0x59ba5f=await readFile(getUpdateNoticeCachePath(),'utf8'),_0x4e4ea7=JSON['parse'](_0x59ba5f);if(!_0x4e4ea7||typeof _0x4e4ea7!=='object')return{};return _0x4e4ea7;}catch{return{};}}async function writeUpdateNoticeCache(_0xbd5623){const _0x1e8127=a123_0x3222;try{const _0x5b2e19=getUpdateNoticeCachePath();await mkdir(dirname(_0x5b2e19),{'recursive':!![]}),await writeFile(_0x5b2e19,JSON[_0x1e8127(0x17a)](_0xbd5623,null,0x2)+'\x0a',_0x1e8127(0x17d));}catch{}}function isFreshCheck(_0x26e3f5,_0xdd6711){const _0x1149e0=a123_0x3222;return typeof _0x26e3f5[_0x1149e0(0x180)]===_0x1149e0(0x170)&&_0xdd6711-_0x26e3f5[_0x1149e0(0x180)]<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x427b7a,_0x64b694,_0x61de7c){const _0xdde763=a123_0x3222;return _0x427b7a[_0xdde763(0x163)]===_0x64b694&&typeof _0x427b7a[_0xdde763(0x171)]==='number'&&_0x61de7c-_0x427b7a[_0xdde763(0x171)]<UPDATE_NOTICE_TTL_MS;}function a123_0x4168(){const _0x2b4185=['\x20update','major','minor','473226rZLHqx','number','lastNotifiedAt','315129bSvxyI','2629230LyaMXN','true','match','3456872mpgBJN','422646BTacSq','/dist-tags','2daYQea','stringify','trim','latest','utf8',',\x20run:\x20','timeout','checkedAt','filter','toLowerCase','lovrabet-cli','lastNotifiedVersion','prerelease','491284CERLsy','now','entries','\x20available,\x20current\x20','893525NaTQjH','string','map'];a123_0x4168=function(){return _0x2b4185;};return a123_0x4168();}function a123_0x3222(_0x3c1463,_0x2a76b6){_0x3c1463=_0x3c1463-0x162;const _0x41688c=a123_0x4168();let _0x322248=_0x41688c[_0x3c1463];return _0x322248;}async function fetchNpmDistTags(_0x36a0ce=0x5dc){const _0x522021=a123_0x3222;try{const _0x35ce26=NPM_REGISTRY_BASE_URL+'/-/package/'+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x522021(0x178),_0x5a876d=await fetch(_0x35ce26,{'signal':AbortSignal[_0x522021(0x17f)](_0x36a0ce)});if(!_0x5a876d['ok'])return null;const _0x5bcabb=await _0x5a876d['json']();if(!_0x5bcabb||typeof _0x5bcabb!=='object')return null;return Object['fromEntries'](Object[_0x522021(0x167)](_0x5bcabb)[_0x522021(0x181)](([,_0x3708a9])=>typeof _0x3708a9===_0x522021(0x16a)&&_0x3708a9[_0x522021(0x17b)]())[_0x522021(0x16b)](([_0x2962d6,_0x1fc0a5])=>[_0x2962d6,String(_0x1fc0a5)['trim']()]));}catch{return null;}}export function buildNpmVersionUrl(_0xba3c13){return'https://www.npmjs.com/package/'+LOVRABET_NPM_PACKAGE_NAME+'/v/'+_0xba3c13;}export async function resolveLatestUpdateNotice(){const _0x3944fa=a123_0x3222;if(isUpdateNoticeDisabled())return null;try{const _0x95db87=Date[_0x3944fa(0x166)](),_0x1f6838=getCliVersion(),_0x56b267=await readUpdateNoticeCache();let _0x1976bc=isFreshCheck(_0x56b267,_0x95db87)?_0x56b267[_0x3944fa(0x17c)]?.[_0x3944fa(0x17b)]():undefined;if(!_0x1976bc&&!isFreshCheck(_0x56b267,_0x95db87)){const _0x1ffdf4=await fetchNpmDistTags();_0x1976bc=_0x1ffdf4?.[_0x3944fa(0x17c)]?.['trim'](),await writeUpdateNoticeCache({..._0x56b267,'checkedAt':_0x95db87,'latest':_0x1976bc,'failed':!_0x1976bc});}if(!_0x1976bc||compareSemver(_0x1f6838,_0x1976bc)>=0x0)return null;if(isRecentlyNotified(_0x56b267,_0x1976bc,_0x95db87))return null;const _0x5f52bf=CLI_BIN_NAME+_0x3944fa(0x16c);return await writeUpdateNoticeCache({..._0x56b267,'checkedAt':isFreshCheck(_0x56b267,_0x95db87)?_0x56b267[_0x3944fa(0x180)]:_0x95db87,'latest':_0x1976bc,'failed':![],'lastNotifiedVersion':_0x1976bc,'lastNotifiedAt':_0x95db87}),{'command':_0x5f52bf,'current':_0x1f6838,'latest':_0x1976bc,'url':buildNpmVersionUrl(_0x1976bc),'message':CLI_BIN_NAME+'\x20'+_0x1976bc+_0x3944fa(0x168)+_0x1f6838+_0x3944fa(0x17e)+_0x5f52bf};}catch{return null;}}
@@ -1 +1 @@
1
- (function(_0x41daa1,_0x57d58e){const _0x4c55cc=a124_0x371b,_0x1bdd1c=_0x41daa1();while(!![]){try{const _0x35bca2=-parseInt(_0x4c55cc(0x77))/0x1+-parseInt(_0x4c55cc(0x7b))/0x2+-parseInt(_0x4c55cc(0x76))/0x3+parseInt(_0x4c55cc(0x74))/0x4+-parseInt(_0x4c55cc(0x75))/0x5+parseInt(_0x4c55cc(0x78))/0x6+-parseInt(_0x4c55cc(0x7a))/0x7*(-parseInt(_0x4c55cc(0x79))/0x8);if(_0x35bca2===_0x57d58e)break;else _0x1bdd1c['push'](_0x1bdd1c['shift']());}catch(_0x2cd508){_0x1bdd1c['push'](_0x1bdd1c['shift']());}}}(a124_0x4e0e,0x3a437));import{BUILD_TIME,GIT_COMMIT,VERSION}from'../generated/build-info.js';function a124_0x4e0e(){const _0x36c124=['150557jkTBbK','1441944RqvTrp','1140472fubXeT','42WVcnQu','758952JzqqIy','slice','1277808fsKvwP','1353965xcIIiK','1126971jXRYwV'];a124_0x4e0e=function(){return _0x36c124;};return a124_0x4e0e();}function a124_0x371b(_0x124151,_0x3301ce){_0x124151=_0x124151-0x73;const _0x4e0eb7=a124_0x4e0e();let _0x371b30=_0x4e0eb7[_0x124151];return _0x371b30;}export function getCliVersion(){return VERSION;}export function getCliGitCommit(){const _0x21f23a=String(GIT_COMMIT);return _0x21f23a&&_0x21f23a!=='unknown'?_0x21f23a:'';}export function getCliVersionDisplay(){const _0x8cf1f0=a124_0x371b,_0xc5bab2=getCliGitCommit(),_0x12a5d2=BUILD_TIME[_0x8cf1f0(0x73)](0x0,0xa);if(!_0xc5bab2||!_0x12a5d2)return VERSION;return VERSION+'\x20('+_0xc5bab2+',\x20'+_0x12a5d2+')';}
1
+ (function(_0x5567e0,_0x40109b){const _0x4ec427=a124_0x3d8e,_0x18a45a=_0x5567e0();while(!![]){try{const _0x17b115=parseInt(_0x4ec427(0x1e5))/0x1*(parseInt(_0x4ec427(0x1e1))/0x2)+parseInt(_0x4ec427(0x1dd))/0x3+parseInt(_0x4ec427(0x1e2))/0x4+-parseInt(_0x4ec427(0x1e4))/0x5+-parseInt(_0x4ec427(0x1e3))/0x6+parseInt(_0x4ec427(0x1df))/0x7+parseInt(_0x4ec427(0x1dc))/0x8*(-parseInt(_0x4ec427(0x1de))/0x9);if(_0x17b115===_0x40109b)break;else _0x18a45a['push'](_0x18a45a['shift']());}catch(_0x576e02){_0x18a45a['push'](_0x18a45a['shift']());}}}(a124_0x52c7,0x59adf));import{BUILD_TIME,GIT_COMMIT,VERSION}from'../generated/build-info.js';function a124_0x3d8e(_0x1aebcf,_0x5518da){_0x1aebcf=_0x1aebcf-0x1dc;const _0x52c793=a124_0x52c7();let _0x3d8e31=_0x52c793[_0x1aebcf];return _0x3d8e31;}export function getCliVersion(){return VERSION;}export function getCliGitCommit(){const _0xe3055f=a124_0x3d8e,_0x2ccb49=String(GIT_COMMIT);return _0x2ccb49&&_0x2ccb49!==_0xe3055f(0x1e6)?_0x2ccb49:'';}export function getCliVersionDisplay(){const _0x5c71a3=a124_0x3d8e,_0x45e5bf=getCliGitCommit(),_0x348834=BUILD_TIME[_0x5c71a3(0x1e0)](0x0,0xa);if(!_0x45e5bf||!_0x348834)return VERSION;return VERSION+'\x20('+_0x45e5bf+',\x20'+_0x348834+')';}function a124_0x52c7(){const _0x3a658b=['7378sZUKdE','2470452rhxoWp','1012752NtmtlX','3515000vIBJwO','139yEuXxz','unknown','712uCZtrS','1703424bQZdru','74313eKpaLj','1930600fXForK','slice'];a124_0x52c7=function(){return _0x3a658b;};return a124_0x52c7();}
@@ -1 +1 @@
1
- (function(_0x404dbe,_0x5e50b6){var _0x2394d6=a125_0x3152,_0x1fa69e=_0x404dbe();while(!![]){try{var _0x42e191=parseInt(_0x2394d6(0x1d0))/0x1+-parseInt(_0x2394d6(0x1d3))/0x2*(parseInt(_0x2394d6(0x1cd))/0x3)+parseInt(_0x2394d6(0x1d2))/0x4+-parseInt(_0x2394d6(0x1d5))/0x5*(parseInt(_0x2394d6(0x1d6))/0x6)+parseInt(_0x2394d6(0x1cc))/0x7*(parseInt(_0x2394d6(0x1cf))/0x8)+parseInt(_0x2394d6(0x1ca))/0x9*(-parseInt(_0x2394d6(0x1ce))/0xa)+-parseInt(_0x2394d6(0x1d1))/0xb*(-parseInt(_0x2394d6(0x1d4))/0xc);if(_0x42e191===_0x5e50b6)break;else _0x1fa69e['push'](_0x1fa69e['shift']());}catch(_0x29d110){_0x1fa69e['push'](_0x1fa69e['shift']());}}}(a125_0x1145,0xbe74c));function a125_0x3152(_0x2ecd52,_0x5e1d4c){_0x2ecd52=_0x2ecd52-0x1c9;var _0x1145ef=a125_0x1145();var _0x31526f=_0x1145ef[_0x2ecd52];return _0x31526f;}function a125_0x1145(){var _0x23571c=['6457310POlAKD','6AvHuRy','write','4690377RkSnPJ','stderr','10155943VFATEu','39luHpDn','10GlyPYt','8xbbQiJ','687293nsONVv','11tniUSC','4591596wcCBKY','238594Bnurmz','10290516UyLeOq'];a125_0x1145=function(){return _0x23571c;};return a125_0x1145();}export function writeCliSideChannelLine(_0x365fe3){var _0x185387=a125_0x3152;process[_0x185387(0x1cb)][_0x185387(0x1c9)](_0x365fe3+'\x0a');}
1
+ function a125_0x4faf(){var _0x2f4b76=['119383VRvYgl','500qkByHJ','42YlQGUA','stderr','1073330PPrAcx','3274pLGZiE','write','217beeryg','11218239hZNnOF','1500820gWrfdS','4111953RUdqxU','45912hLMADC','602npwaGL'];a125_0x4faf=function(){return _0x2f4b76;};return a125_0x4faf();}function a125_0xee54(_0x296002,_0x1051b2){_0x296002=_0x296002-0x1e8;var _0x4faf8f=a125_0x4faf();var _0xee54fa=_0x4faf8f[_0x296002];return _0xee54fa;}(function(_0x33194f,_0x350d14){var _0x107823=a125_0xee54,_0x2185aa=_0x33194f();while(!![]){try{var _0x249c77=parseInt(_0x107823(0x1ed))/0x1*(-parseInt(_0x107823(0x1f4))/0x2)+parseInt(_0x107823(0x1f2))/0x3+parseInt(_0x107823(0x1f1))/0x4+parseInt(_0x107823(0x1ec))/0x5*(-parseInt(_0x107823(0x1ea))/0x6)+-parseInt(_0x107823(0x1ef))/0x7*(parseInt(_0x107823(0x1f3))/0x8)+parseInt(_0x107823(0x1f0))/0x9+parseInt(_0x107823(0x1e9))/0xa*(parseInt(_0x107823(0x1e8))/0xb);if(_0x249c77===_0x350d14)break;else _0x2185aa['push'](_0x2185aa['shift']());}catch(_0x2881dd){_0x2185aa['push'](_0x2185aa['shift']());}}}(a125_0x4faf,0xd4244));export function writeCliSideChannelLine(_0x39108a){var _0x5d1f07=a125_0xee54;process[_0x5d1f07(0x1eb)][_0x5d1f07(0x1ee)](_0x39108a+'\x0a');}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lovrabet/lovrabet-cli",
3
- "version": "2.1.18-beta.2",
3
+ "version": "2.1.18",
4
4
  "description": "Runtime CLI for Lovrabet apps, datasets, SQL, BFF, skills, and AI agent workflows.",
5
5
  "license": "Apache-2.0",
6
6
  "keywords": [