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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (252) hide show
  1. package/lib/cli.d.ts +21 -0
  2. package/lib/cli.js +1 -1
  3. package/lib/commands/api-doc/index.d.ts +38 -0
  4. package/lib/commands/api-doc/index.js +1 -1
  5. package/lib/commands/app/cache.d.ts +61 -0
  6. package/lib/commands/app/cache.js +1 -1
  7. package/lib/commands/app/definitions.d.ts +26 -0
  8. package/lib/commands/app/definitions.js +1 -1
  9. package/lib/commands/app/eligibility.d.ts +16 -0
  10. package/lib/commands/app/eligibility.js +1 -1
  11. package/lib/commands/app/mock-loader.d.ts +41 -0
  12. package/lib/commands/app/mock-loader.js +1 -1
  13. package/lib/commands/app/remote-source.d.ts +66 -0
  14. package/lib/commands/app/remote-source.js +1 -1
  15. package/lib/commands/app/shared.d.ts +38 -0
  16. package/lib/commands/app/shared.js +1 -1
  17. package/lib/commands/app-config/get.d.ts +2 -0
  18. package/lib/commands/app-config/get.js +1 -1
  19. package/lib/commands/app-config/index.d.ts +2 -0
  20. package/lib/commands/app-config/index.js +1 -1
  21. package/lib/commands/artifact/index.d.ts +9 -0
  22. package/lib/commands/artifact/index.js +1 -1
  23. package/lib/commands/auth/device.d.ts +31 -0
  24. package/lib/commands/auth/device.js +1 -1
  25. package/lib/commands/auth/index.d.ts +23 -0
  26. package/lib/commands/auth/index.js +1 -1
  27. package/lib/commands/auth/prompt.d.ts +33 -0
  28. package/lib/commands/auth/prompt.js +1 -1
  29. package/lib/commands/bff/detail.d.ts +8 -0
  30. package/lib/commands/bff/detail.js +1 -1
  31. package/lib/commands/bff/exec.d.ts +19 -0
  32. package/lib/commands/bff/exec.js +1 -1
  33. package/lib/commands/bff/index.d.ts +15 -0
  34. package/lib/commands/bff/index.js +1 -1
  35. package/lib/commands/cli-skill/index.d.ts +9 -0
  36. package/lib/commands/cli-skill/index.js +1 -1
  37. package/lib/commands/common/config-policy.d.ts +80 -0
  38. package/lib/commands/common/config-policy.js +1 -1
  39. package/lib/commands/common/constraints.d.ts +67 -0
  40. package/lib/commands/common/constraints.js +1 -1
  41. package/lib/commands/common/flags.d.ts +41 -0
  42. package/lib/commands/common/flags.js +1 -1
  43. package/lib/commands/common/local-file.d.ts +6 -0
  44. package/lib/commands/common/local-file.js +1 -1
  45. package/lib/commands/config/definitions.d.ts +21 -0
  46. package/lib/commands/config/definitions.js +1 -1
  47. package/lib/commands/config/shared.d.ts +17 -0
  48. package/lib/commands/config/shared.js +1 -1
  49. package/lib/commands/data/index.d.ts +27 -0
  50. package/lib/commands/data/index.js +1 -1
  51. package/lib/commands/dataset/detail.d.ts +26 -0
  52. package/lib/commands/dataset/detail.js +1 -1
  53. package/lib/commands/dataset/index.d.ts +10 -0
  54. package/lib/commands/dataset/index.js +1 -1
  55. package/lib/commands/dataset/list.d.ts +18 -0
  56. package/lib/commands/dataset/list.js +1 -1
  57. package/lib/commands/dataset/sdk-doc.d.ts +6 -0
  58. package/lib/commands/dataset/sdk-doc.js +1 -1
  59. package/lib/commands/doctor.d.ts +23 -0
  60. package/lib/commands/doctor.js +1 -1
  61. package/lib/commands/file/index.d.ts +2 -0
  62. package/lib/commands/file/index.js +1 -1
  63. package/lib/commands/init.d.ts +32 -0
  64. package/lib/commands/init.js +1 -1
  65. package/lib/commands/kb/index.d.ts +8 -0
  66. package/lib/commands/kb/index.js +1 -1
  67. package/lib/commands/logs/index.d.ts +20 -0
  68. package/lib/commands/logs/index.js +1 -1
  69. package/lib/commands/ocr/index.d.ts +2 -0
  70. package/lib/commands/ocr/index.js +1 -1
  71. package/lib/commands/personal-bff/index.d.ts +5 -0
  72. package/lib/commands/personal-bff/index.js +1 -1
  73. package/lib/commands/registry.d.ts +56 -0
  74. package/lib/commands/registry.js +1 -1
  75. package/lib/commands/schedule/index.d.ts +2 -0
  76. package/lib/commands/schedule/index.js +1 -0
  77. package/lib/commands/schema.d.ts +18 -0
  78. package/lib/commands/schema.js +1 -1
  79. package/lib/commands/service/dynamic.d.ts +18 -0
  80. package/lib/commands/service/dynamic.js +1 -1
  81. package/lib/commands/service/function-name-adapter.d.ts +13 -0
  82. package/lib/commands/service/function-name-adapter.js +1 -1
  83. package/lib/commands/service/index.d.ts +2 -0
  84. package/lib/commands/service/index.js +1 -1
  85. package/lib/commands/service/registry.d.ts +102 -0
  86. package/lib/commands/service/registry.js +1 -1
  87. package/lib/commands/skill/commands/create.d.ts +2 -0
  88. package/lib/commands/skill/commands/create.js +1 -1
  89. package/lib/commands/skill/commands/install.d.ts +2 -0
  90. package/lib/commands/skill/commands/install.js +1 -1
  91. package/lib/commands/skill/commands/list.d.ts +2 -0
  92. package/lib/commands/skill/commands/list.js +1 -1
  93. package/lib/commands/skill/commands/push.d.ts +2 -0
  94. package/lib/commands/skill/commands/push.js +1 -1
  95. package/lib/commands/skill/commands/validate.d.ts +2 -0
  96. package/lib/commands/skill/commands/validate.js +1 -1
  97. package/lib/commands/skill/flags.d.ts +13 -0
  98. package/lib/commands/skill/flags.js +1 -1
  99. package/lib/commands/skill/index.d.ts +9 -0
  100. package/lib/commands/skill/index.js +1 -1
  101. package/lib/commands/skill/manifest-helpers.d.ts +5 -0
  102. package/lib/commands/skill/manifest-helpers.js +1 -1
  103. package/lib/commands/skill/push-execute.d.ts +49 -0
  104. package/lib/commands/skill/push-execute.js +1 -1
  105. package/lib/commands/skill/push-flow-helpers.d.ts +80 -0
  106. package/lib/commands/skill/push-flow-helpers.js +1 -1
  107. package/lib/commands/skill/push-retarget.d.ts +9 -0
  108. package/lib/commands/skill/push-retarget.js +1 -1
  109. package/lib/commands/skill/scopes.d.ts +13 -0
  110. package/lib/commands/skill/scopes.js +1 -1
  111. package/lib/commands/skill/summary.d.ts +6 -0
  112. package/lib/commands/skill/summary.js +1 -1
  113. package/lib/commands/skill/templates.d.ts +23 -0
  114. package/lib/commands/skill/templates.js +1 -1
  115. package/lib/commands/skill/validate.d.ts +20 -0
  116. package/lib/commands/skill/validate.js +1 -1
  117. package/lib/commands/sql/detail.d.ts +13 -0
  118. package/lib/commands/sql/detail.js +1 -1
  119. package/lib/commands/sql/exec.d.ts +21 -0
  120. package/lib/commands/sql/exec.js +1 -1
  121. package/lib/commands/sql/index.d.ts +9 -0
  122. package/lib/commands/sql/index.js +1 -1
  123. package/lib/commands/update.d.ts +10 -0
  124. package/lib/commands/update.js +1 -1
  125. package/lib/commands/workspace/index.d.ts +10 -0
  126. package/lib/commands/workspace/index.js +1 -1
  127. package/lib/config/schema.d.ts +108 -0
  128. package/lib/config/schema.js +1 -1
  129. package/lib/constant/app.d.ts +13 -0
  130. package/lib/constant/app.js +1 -1
  131. package/lib/constant/auth-mode.d.ts +28 -0
  132. package/lib/constant/auth-mode.js +1 -1
  133. package/lib/constant/cli.d.ts +86 -0
  134. package/lib/constant/cli.js +1 -1
  135. package/lib/constant/defaults.d.ts +45 -0
  136. package/lib/constant/defaults.js +1 -1
  137. package/lib/constant/distribution.d.ts +12 -0
  138. package/lib/constant/distribution.js +1 -1
  139. package/lib/constant/domain.d.ts +57 -0
  140. package/lib/constant/domain.js +1 -1
  141. package/lib/constant/env.d.ts +56 -0
  142. package/lib/constant/env.js +1 -1
  143. package/lib/constant/output.d.ts +13 -0
  144. package/lib/constant/output.js +1 -1
  145. package/lib/constant/product.d.ts +79 -0
  146. package/lib/constant/product.js +1 -1
  147. package/lib/constant/risk.d.ts +14 -0
  148. package/lib/constant/risk.js +1 -1
  149. package/lib/constant/url.d.ts +14 -0
  150. package/lib/constant/url.js +1 -1
  151. package/lib/context.d.ts +287 -0
  152. package/lib/context.js +1 -1
  153. package/lib/core/api-client.d.ts +451 -0
  154. package/lib/core/api-client.js +1 -1
  155. package/lib/core/db-resolver.d.ts +39 -0
  156. package/lib/core/db-resolver.js +1 -1
  157. package/lib/core/sdk-client.d.ts +62 -0
  158. package/lib/core/sdk-client.js +1 -1
  159. package/lib/errors.d.ts +25 -0
  160. package/lib/errors.js +1 -1
  161. package/lib/framework/build-all-flags.d.ts +24 -0
  162. package/lib/framework/build-all-flags.js +1 -1
  163. package/lib/framework/dryrun.d.ts +64 -0
  164. package/lib/framework/dryrun.js +1 -1
  165. package/lib/framework/flags.d.ts +19 -0
  166. package/lib/framework/flags.js +1 -1
  167. package/lib/framework/help.d.ts +21 -0
  168. package/lib/framework/help.js +1 -1
  169. package/lib/framework/index.d.ts +10 -0
  170. package/lib/framework/index.js +1 -1
  171. package/lib/framework/output.d.ts +10 -0
  172. package/lib/framework/output.js +1 -1
  173. package/lib/framework/preparse.d.ts +64 -0
  174. package/lib/framework/preparse.js +1 -1
  175. package/lib/framework/rate-limit.d.ts +10 -0
  176. package/lib/framework/rate-limit.js +1 -1
  177. package/lib/framework/response.d.ts +10 -0
  178. package/lib/framework/response.js +1 -1
  179. package/lib/framework/runner-confirmation.d.ts +46 -0
  180. package/lib/framework/runner-confirmation.js +1 -1
  181. package/lib/framework/runner-error.d.ts +28 -0
  182. package/lib/framework/runner-error.js +1 -1
  183. package/lib/framework/runner.d.ts +102 -0
  184. package/lib/framework/runner.js +1 -1
  185. package/lib/framework/schema-export.d.ts +29 -0
  186. package/lib/framework/schema-export.js +1 -1
  187. package/lib/framework/service-order.d.ts +4 -0
  188. package/lib/framework/service-order.js +1 -1
  189. package/lib/framework/types.d.ts +108 -0
  190. package/lib/framework/types.js +1 -1
  191. package/lib/generated/build-info.d.ts +4 -0
  192. package/lib/generated/build-info.js +1 -1
  193. package/lib/help.d.ts +25 -0
  194. package/lib/help.js +1 -1
  195. package/lib/runtime/event.d.ts +16 -0
  196. package/lib/runtime/event.js +1 -0
  197. package/lib/runtime/index.d.ts +13 -0
  198. package/lib/runtime/index.js +1 -0
  199. package/lib/runtime/queue.d.ts +6 -0
  200. package/lib/runtime/queue.js +1 -0
  201. package/lib/runtime/resolve.d.ts +14 -0
  202. package/lib/runtime/resolve.js +1 -0
  203. package/lib/runtime/types.d.ts +59 -0
  204. package/lib/runtime/types.js +1 -0
  205. package/lib/skills/npx-skills-add.d.ts +42 -0
  206. package/lib/skills/npx-skills-add.js +1 -1
  207. package/lib/skills/runtime-skill-sync/constants.d.ts +4 -0
  208. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  209. package/lib/skills/runtime-skill-sync/fs-utils.d.ts +21 -0
  210. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  211. package/lib/skills/runtime-skill-sync/hashing.d.ts +9 -0
  212. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  213. package/lib/skills/runtime-skill-sync/links.d.ts +18 -0
  214. package/lib/skills/runtime-skill-sync/links.js +1 -1
  215. package/lib/skills/runtime-skill-sync/list-local.d.ts +3 -0
  216. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  217. package/lib/skills/runtime-skill-sync/local-files.d.ts +25 -0
  218. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  219. package/lib/skills/runtime-skill-sync/materialize.d.ts +11 -0
  220. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  221. package/lib/skills/runtime-skill-sync/metadata.d.ts +7 -0
  222. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  223. package/lib/skills/runtime-skill-sync/paths.d.ts +11 -0
  224. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  225. package/lib/skills/runtime-skill-sync/push.d.ts +33 -0
  226. package/lib/skills/runtime-skill-sync/push.js +1 -1
  227. package/lib/skills/runtime-skill-sync/scopes.d.ts +5 -0
  228. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  229. package/lib/skills/runtime-skill-sync/types.d.ts +105 -0
  230. package/lib/skills/runtime-skill-sync/zip-codec.d.ts +9 -0
  231. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  232. package/lib/skills/runtime-skill-sync/zip-package.d.ts +15 -0
  233. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  234. package/lib/skills/runtime-skill-sync.d.ts +15 -0
  235. package/lib/skills/runtime-skill-sync.js +1 -1
  236. package/lib/utils/apply-jq-filter.d.ts +25 -0
  237. package/lib/utils/apply-jq-filter.js +1 -1
  238. package/lib/utils/logger.d.ts +73 -0
  239. package/lib/utils/logger.js +1 -1
  240. package/lib/utils/lossless-json.d.ts +21 -0
  241. package/lib/utils/lossless-json.js +1 -1
  242. package/lib/utils/params.d.ts +65 -0
  243. package/lib/utils/params.js +1 -1
  244. package/lib/utils/platform.d.ts +17 -0
  245. package/lib/utils/platform.js +1 -1
  246. package/lib/utils/update-notice.d.ts +10 -0
  247. package/lib/utils/update-notice.js +1 -1
  248. package/lib/utils/version.d.ts +18 -0
  249. package/lib/utils/version.js +1 -1
  250. package/lib/utils/write-cli-side-channel.d.ts +6 -0
  251. package/lib/utils/write-cli-side-channel.js +1 -1
  252. package/package.json +9 -1
@@ -0,0 +1,73 @@
1
+ /**
2
+ * @fileoverview Structured logger for Lovrabet Runtime CLI.
3
+ *
4
+ * Why Winston instead of console.log: Winston provides structured logging with
5
+ * severity levels, timestamps, and file transport. This is essential for:
6
+ * - `lovrabet logs` — the logs command reads the log file and displays entries
7
+ * - Observability — structured JSON logs are easier to parse in log aggregation systems
8
+ * - Debugging — log files capture command history with timestamps and durations
9
+ *
10
+ * Design decision: all log entries are written as JSON objects to `.lovrabet-runtime.log`
11
+ * in the project directory. JSON format makes them easy to query with `jq` and
12
+ * parse programmatically. Plain text would be easier to read but harder to query.
13
+ *
14
+ * Why `silent: false` even with file-only transport: Winston's `silent` option
15
+ * suppresses ALL output including errors during logger initialization. We keep
16
+ * `silent: false` so initialization errors surface to the user rather than
17
+ * silently failing to log.
18
+ */
19
+ import winston from "winston";
20
+ /** A single structured log entry written to the log file. */
21
+ export interface LogEntry {
22
+ timestamp: string;
23
+ level: "info" | "success" | "error" | "warn";
24
+ command: string;
25
+ rawCommand?: string;
26
+ message: string;
27
+ duration?: number;
28
+ details?: any;
29
+ }
30
+ declare class Logger {
31
+ private winstonLogger;
32
+ private logFilePath;
33
+ private currentRawCommand;
34
+ constructor();
35
+ /** Sets the raw command string for the current invocation (used in all subsequent log entries). */
36
+ setRawCommand(rawCommand: string): void;
37
+ /** Initializes or reconfigures the Winston logger to write to a specific project directory. */
38
+ setLogPath(projectPath: string): void;
39
+ private initWinstonLogger;
40
+ /** Logs an informational entry. */
41
+ info(command: string, message: string, details?: any): void;
42
+ /**
43
+ * Logs a successful operation entry.
44
+ * "Success" is logged at info level but with a custom level name
45
+ * so `lovrabet logs --level success` can filter for successful operations.
46
+ */
47
+ success(command: string, message: string, duration?: number, details?: any): void;
48
+ /** Logs an error entry. */
49
+ error(command: string, message: string, details?: any): void;
50
+ /** Logs a warning entry. */
51
+ warn(command: string, message: string, details?: any): void;
52
+ /**
53
+ * Executes an async task and logs its start, completion (with duration),
54
+ * or failure (with duration and error).
55
+ *
56
+ * Why `logTask` exists: this is a common pattern (start → success/fail → report duration).
57
+ * Wrapping it in a utility avoids repeating the timing and logging boilerplate
58
+ * in every command that wants structured timing information.
59
+ */
60
+ logTask<T>(command: string, taskName: string, task: () => Promise<T>): Promise<T>;
61
+ /**
62
+ * Reads all log entries from the current log file.
63
+ * Returns an empty array if the file doesn't exist or can't be read.
64
+ */
65
+ readLogs(): LogEntry[];
66
+ /** Clears the log file by truncating it to empty. */
67
+ clearLogs(): void;
68
+ /** Exposes the underlying Winston logger instance (for advanced use). */
69
+ getWinstonInstance(): winston.Logger;
70
+ }
71
+ /** Singleton logger instance used throughout the CLI. */
72
+ export declare const logger: Logger;
73
+ export {};
@@ -1 +1 @@
1
- const a113_0x4216be=a113_0x1f81;(function(_0x2ec3a6,_0x5916ae){const _0x2b63e6=a113_0x1f81,_0x1b4ced=_0x2ec3a6();while(!![]){try{const _0x11bf0a=parseInt(_0x2b63e6(0x159))/0x1*(parseInt(_0x2b63e6(0x14d))/0x2)+-parseInt(_0x2b63e6(0x14c))/0x3+-parseInt(_0x2b63e6(0x16a))/0x4+parseInt(_0x2b63e6(0x16e))/0x5+parseInt(_0x2b63e6(0x167))/0x6+parseInt(_0x2b63e6(0x160))/0x7+-parseInt(_0x2b63e6(0x15b))/0x8;if(_0x11bf0a===_0x5916ae)break;else _0x1b4ced['push'](_0x1b4ced['shift']());}catch(_0x5e8bd4){_0x1b4ced['push'](_0x1b4ced['shift']());}}}(a113_0x4648,0xd4f10));import a113_0x3a6f2f from'winston';function a113_0x1f81(_0x30b5b2,_0x47a9b6){_0x30b5b2=_0x30b5b2-0x13d;const _0x464893=a113_0x4648();let _0x1f81bd=_0x464893[_0x30b5b2];return _0x1f81bd;}import a113_0x523f1a from'node:fs';function a113_0x4648(){const _0x56f661=['winstonLogger','dirname','yellow','command','1TpakSU','timestamp','2665424AiUbLH','readFileSync','printf','stringify','logTask','5809524enjudZ','clear','currentRawCommand','unknown','log','utf8','now','6612234VVVLVV','toISOString','clearLogs','6295668goHNDW','Failed\x20to\x20clear\x20logs:','message','filter','6088235yIkkko','Failed\x20to\x20read\x20logs:','addColors','parse','Completed:\x20','mkdirSync','Starting:\x20','join','red','setLogPath','getWinstonInstance','info','trim','error','details','writeFileSync','level','blue','combine','transports','warn','setRawCommand','logFileName','3433302aHCOnu','1548238wbqxOn','Failed:\x20','existsSync','format','logFilePath','initWinstonLogger','success','rawCommand'];a113_0x4648=function(){return _0x56f661;};return a113_0x4648();}import a113_0x247326 from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';class Logger{[a113_0x4216be(0x155)];[a113_0x4216be(0x151)]='';[a113_0x4216be(0x162)]='';constructor(){}[a113_0x4216be(0x14a)](_0x523ec2){const _0x5c1fa6=a113_0x4216be;this[_0x5c1fa6(0x162)]=_0x523ec2;}[a113_0x4216be(0x13e)](_0x46a9eb){const _0x5607e7=a113_0x4216be;this[_0x5607e7(0x151)]=a113_0x247326[_0x5607e7(0x175)](_0x46a9eb,PRODUCT_CONFIG[_0x5607e7(0x14b)]),this[_0x5607e7(0x155)]&&this[_0x5607e7(0x155)][_0x5607e7(0x161)](),this[_0x5607e7(0x152)]();}[a113_0x4216be(0x152)](){const _0x47b13a=a113_0x4216be,_0x5884de=a113_0x247326[_0x47b13a(0x156)](this[_0x47b13a(0x151)]);!a113_0x523f1a[_0x47b13a(0x14f)](_0x5884de)&&a113_0x523f1a[_0x47b13a(0x173)](_0x5884de,{'recursive':!![]});const _0x3b7530=a113_0x3a6f2f[_0x47b13a(0x150)][_0x47b13a(0x147)](a113_0x3a6f2f[_0x47b13a(0x150)][_0x47b13a(0x15a)](),a113_0x3a6f2f[_0x47b13a(0x150)]['errors']({'stack':!![]}),a113_0x3a6f2f[_0x47b13a(0x150)][_0x47b13a(0x15d)](_0x27dbd3=>{const _0x1f063b=_0x47b13a,_0x3be3fb={'timestamp':_0x27dbd3[_0x1f063b(0x15a)]||new Date()[_0x1f063b(0x168)](),'level':_0x27dbd3[_0x1f063b(0x145)]||_0x1f063b(0x140),'command':_0x27dbd3[_0x1f063b(0x158)]||_0x1f063b(0x163),'rawCommand':_0x27dbd3[_0x1f063b(0x154)]||this['currentRawCommand']||undefined,'message':_0x27dbd3[_0x1f063b(0x16c)]||'','duration':_0x27dbd3['duration']||undefined,'details':_0x27dbd3[_0x1f063b(0x143)]||undefined};return JSON[_0x1f063b(0x15e)](_0x3be3fb);}));this[_0x47b13a(0x155)]=a113_0x3a6f2f['createLogger']({'level':_0x47b13a(0x140),'format':_0x3b7530,'transports':[new a113_0x3a6f2f[(_0x47b13a(0x148))]['File']({'filename':this[_0x47b13a(0x151)],'level':_0x47b13a(0x140)})],'silent':![]}),a113_0x3a6f2f[_0x47b13a(0x170)]({'success':'green','error':_0x47b13a(0x13d),'warn':_0x47b13a(0x157),'info':_0x47b13a(0x146)});}[a113_0x4216be(0x140)](_0x26e590,_0x58e4d5,_0x58258e){const _0x405e46=a113_0x4216be;if(!this[_0x405e46(0x151)]||!this[_0x405e46(0x155)])return;this[_0x405e46(0x155)][_0x405e46(0x140)](_0x58e4d5,{'command':_0x26e590,'details':_0x58258e});}[a113_0x4216be(0x153)](_0xbd5258,_0x4660ec,_0x3f6f9c,_0x237910){const _0x4f8f58=a113_0x4216be;if(!this[_0x4f8f58(0x151)]||!this[_0x4f8f58(0x155)])return;this[_0x4f8f58(0x155)][_0x4f8f58(0x164)](_0x4f8f58(0x140),_0x4660ec,{'level':_0x4f8f58(0x153),'command':_0xbd5258,'duration':_0x3f6f9c,'details':_0x237910});}[a113_0x4216be(0x142)](_0x2c8766,_0x27a8a3,_0x140cb8){const _0x3fb31e=a113_0x4216be;if(!this[_0x3fb31e(0x151)]||!this['winstonLogger'])return;this[_0x3fb31e(0x155)]['error'](_0x27a8a3,{'command':_0x2c8766,'details':_0x140cb8});}[a113_0x4216be(0x149)](_0x4bb5ef,_0x2eb075,_0x29c360){const _0x22424d=a113_0x4216be;if(!this[_0x22424d(0x151)]||!this[_0x22424d(0x155)])return;this['winstonLogger'][_0x22424d(0x149)](_0x2eb075,{'command':_0x4bb5ef,'details':_0x29c360});}async[a113_0x4216be(0x15f)](_0x34660b,_0x5c949f,_0x4f4513){const _0x590e57=a113_0x4216be,_0x4be486=Date['now']();this[_0x590e57(0x140)](_0x34660b,_0x590e57(0x174)+_0x5c949f);try{const _0x497398=await _0x4f4513(),_0x486f3b=Date[_0x590e57(0x166)]()-_0x4be486;return this[_0x590e57(0x153)](_0x34660b,_0x590e57(0x172)+_0x5c949f,_0x486f3b),_0x497398;}catch(_0x35a7b4){const _0x27226c=Date[_0x590e57(0x166)]()-_0x4be486;this['error'](_0x34660b,_0x590e57(0x14e)+_0x5c949f,{'error':_0x35a7b4 instanceof Error?_0x35a7b4['message']:String(_0x35a7b4),'duration':_0x27226c});throw _0x35a7b4;}}['readLogs'](){const _0x5a553f=a113_0x4216be;try{if(!a113_0x523f1a['existsSync'](this['logFilePath']))return[];const _0x3492a1=a113_0x523f1a[_0x5a553f(0x15c)](this['logFilePath'],_0x5a553f(0x165));return _0x3492a1['split'](/\r?\n/)[_0x5a553f(0x16d)](_0x57e576=>_0x57e576[_0x5a553f(0x141)]())['map'](_0x32b1ae=>JSON[_0x5a553f(0x171)](_0x32b1ae));}catch(_0x5873a9){return console[_0x5a553f(0x149)](_0x5a553f(0x16f),_0x5873a9),[];}}[a113_0x4216be(0x169)](){const _0x2d887f=a113_0x4216be;try{a113_0x523f1a['existsSync'](this[_0x2d887f(0x151)])&&a113_0x523f1a[_0x2d887f(0x144)](this[_0x2d887f(0x151)],'',_0x2d887f(0x165));}catch(_0x4c0df3){console[_0x2d887f(0x149)](_0x2d887f(0x16b),_0x4c0df3);}}[a113_0x4216be(0x13f)](){const _0x4ebd2f=a113_0x4216be;return this[_0x4ebd2f(0x155)];}}export const logger=new Logger();
1
+ function a119_0xee9d(){const _0x135a13=['format','printf','7xAwkow','clearLogs','currentRawCommand','combine','10HUjgMF','readLogs','1447568rnuggr','stringify','addColors','map','rawCommand','415lSXvun','message','yellow','825917kwvFLE','toISOString','join','filter','command','utf8','3408XRuTNl','unknown','setRawCommand','clear','Failed:\x20','writeFileSync','duration','22258709RfhpLC','timestamp','green','logFileName','52RAVfMP','trim','success','File','Failed\x20to\x20clear\x20logs:','errors','20892Tsnedf','3069027CWMxit','setLogPath','winstonLogger','now','logFilePath','mkdirSync','Failed\x20to\x20read\x20logs:','initWinstonLogger','723480eInLPH','error','warn','info','existsSync'];a119_0xee9d=function(){return _0x135a13;};return a119_0xee9d();}const a119_0x18a3da=a119_0xa926;(function(_0x452f7a,_0x2e0de5){const _0x20bfa4=a119_0xa926,_0x455e6c=_0x452f7a();while(!![]){try{const _0x2d2f3b=-parseInt(_0x20bfa4(0x1e8))/0x1+-parseInt(_0x20bfa4(0x1e0))/0x2+-parseInt(_0x20bfa4(0x1ee))/0x3*(-parseInt(_0x20bfa4(0x1f9))/0x4)+-parseInt(_0x20bfa4(0x1e5))/0x5*(parseInt(_0x20bfa4(0x1ff))/0x6)+-parseInt(_0x20bfa4(0x20f))/0x7*(parseInt(_0x20bfa4(0x208))/0x8)+-parseInt(_0x20bfa4(0x200))/0x9*(-parseInt(_0x20bfa4(0x213))/0xa)+parseInt(_0x20bfa4(0x1f5))/0xb;if(_0x2d2f3b===_0x2e0de5)break;else _0x455e6c['push'](_0x455e6c['shift']());}catch(_0x3f2568){_0x455e6c['push'](_0x455e6c['shift']());}}}(a119_0xee9d,0x6de64));import a119_0x3e7011 from'winston';import a119_0x317a4f from'node:fs';import a119_0x23b657 from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';class Logger{['winstonLogger'];[a119_0x18a3da(0x204)]='';[a119_0x18a3da(0x211)]='';constructor(){}[a119_0x18a3da(0x1f0)](_0x444cb2){const _0xdd77f0=a119_0x18a3da;this[_0xdd77f0(0x211)]=_0x444cb2;}[a119_0x18a3da(0x201)](_0x184a93){const _0x184832=a119_0x18a3da;this[_0x184832(0x204)]=a119_0x23b657[_0x184832(0x1ea)](_0x184a93,PRODUCT_CONFIG[_0x184832(0x1f8)]),this[_0x184832(0x202)]&&this['winstonLogger'][_0x184832(0x1f1)](),this[_0x184832(0x207)]();}['initWinstonLogger'](){const _0x2b4deb=a119_0x18a3da,_0x38f66c=a119_0x23b657['dirname'](this[_0x2b4deb(0x204)]);!a119_0x317a4f['existsSync'](_0x38f66c)&&a119_0x317a4f[_0x2b4deb(0x205)](_0x38f66c,{'recursive':!![]});const _0x392513=a119_0x3e7011[_0x2b4deb(0x20d)][_0x2b4deb(0x212)](a119_0x3e7011['format']['timestamp'](),a119_0x3e7011[_0x2b4deb(0x20d)][_0x2b4deb(0x1fe)]({'stack':!![]}),a119_0x3e7011[_0x2b4deb(0x20d)][_0x2b4deb(0x20e)](_0x2c6211=>{const _0x295601=_0x2b4deb,_0x4927ef={'timestamp':_0x2c6211[_0x295601(0x1f6)]||new Date()[_0x295601(0x1e9)](),'level':_0x2c6211['level']||_0x295601(0x20b),'command':_0x2c6211[_0x295601(0x1ec)]||_0x295601(0x1ef),'rawCommand':_0x2c6211[_0x295601(0x1e4)]||this['currentRawCommand']||undefined,'message':_0x2c6211[_0x295601(0x1e6)]||'','duration':_0x2c6211[_0x295601(0x1f4)]||undefined,'details':_0x2c6211['details']||undefined};return JSON[_0x295601(0x1e1)](_0x4927ef);}));this['winstonLogger']=a119_0x3e7011['createLogger']({'level':_0x2b4deb(0x20b),'format':_0x392513,'transports':[new a119_0x3e7011['transports'][(_0x2b4deb(0x1fc))]({'filename':this['logFilePath'],'level':_0x2b4deb(0x20b)})],'silent':![]}),a119_0x3e7011[_0x2b4deb(0x1e2)]({'success':_0x2b4deb(0x1f7),'error':'red','warn':_0x2b4deb(0x1e7),'info':'blue'});}['info'](_0x3fdcee,_0xd1a6a2,_0x20589e){const _0x3cec1e=a119_0x18a3da;if(!this[_0x3cec1e(0x204)]||!this['winstonLogger'])return;this[_0x3cec1e(0x202)]['info'](_0xd1a6a2,{'command':_0x3fdcee,'details':_0x20589e});}[a119_0x18a3da(0x1fb)](_0x471d72,_0x1eff52,_0x22e8d1,_0x3fcccc){const _0x14cabd=a119_0x18a3da;if(!this[_0x14cabd(0x204)]||!this['winstonLogger'])return;this[_0x14cabd(0x202)]['log'](_0x14cabd(0x20b),_0x1eff52,{'level':_0x14cabd(0x1fb),'command':_0x471d72,'duration':_0x22e8d1,'details':_0x3fcccc});}[a119_0x18a3da(0x209)](_0x15e97f,_0x6ba353,_0x1fd74e){const _0x1f2c1c=a119_0x18a3da;if(!this[_0x1f2c1c(0x204)]||!this[_0x1f2c1c(0x202)])return;this[_0x1f2c1c(0x202)]['error'](_0x6ba353,{'command':_0x15e97f,'details':_0x1fd74e});}[a119_0x18a3da(0x20a)](_0x42dfe0,_0x58edb7,_0x1dbbec){const _0x21ca84=a119_0x18a3da;if(!this[_0x21ca84(0x204)]||!this[_0x21ca84(0x202)])return;this['winstonLogger'][_0x21ca84(0x20a)](_0x58edb7,{'command':_0x42dfe0,'details':_0x1dbbec});}async['logTask'](_0x8aa1c4,_0x9872a8,_0x5cda9a){const _0x5590e2=a119_0x18a3da,_0x153797=Date[_0x5590e2(0x203)]();this[_0x5590e2(0x20b)](_0x8aa1c4,'Starting:\x20'+_0x9872a8);try{const _0x457c19=await _0x5cda9a(),_0x15e891=Date[_0x5590e2(0x203)]()-_0x153797;return this[_0x5590e2(0x1fb)](_0x8aa1c4,'Completed:\x20'+_0x9872a8,_0x15e891),_0x457c19;}catch(_0x59de14){const _0x38b2ac=Date['now']()-_0x153797;this[_0x5590e2(0x209)](_0x8aa1c4,_0x5590e2(0x1f2)+_0x9872a8,{'error':_0x59de14 instanceof Error?_0x59de14[_0x5590e2(0x1e6)]:String(_0x59de14),'duration':_0x38b2ac});throw _0x59de14;}}[a119_0x18a3da(0x214)](){const _0xac04d5=a119_0x18a3da;try{if(!a119_0x317a4f[_0xac04d5(0x20c)](this['logFilePath']))return[];const _0x29042e=a119_0x317a4f['readFileSync'](this[_0xac04d5(0x204)],_0xac04d5(0x1ed));return _0x29042e['split'](/\r?\n/)[_0xac04d5(0x1eb)](_0x237a18=>_0x237a18[_0xac04d5(0x1fa)]())[_0xac04d5(0x1e3)](_0x4fc843=>JSON['parse'](_0x4fc843));}catch(_0x1581a){return console[_0xac04d5(0x20a)](_0xac04d5(0x206),_0x1581a),[];}}[a119_0x18a3da(0x210)](){const _0x26cd91=a119_0x18a3da;try{a119_0x317a4f[_0x26cd91(0x20c)](this[_0x26cd91(0x204)])&&a119_0x317a4f[_0x26cd91(0x1f3)](this[_0x26cd91(0x204)],'',_0x26cd91(0x1ed));}catch(_0x3ca5fa){console[_0x26cd91(0x20a)](_0x26cd91(0x1fd),_0x3ca5fa);}}['getWinstonInstance'](){const _0x5f9b13=a119_0x18a3da;return this[_0x5f9b13(0x202)];}}function a119_0xa926(_0x2bd93a,_0x2210a6){_0x2bd93a=_0x2bd93a-0x1e0;const _0xee9d55=a119_0xee9d();let _0xa92667=_0xee9d55[_0x2bd93a];return _0xa92667;}export const logger=new Logger();
@@ -0,0 +1,21 @@
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.
10
+ */
11
+ export declare function parseLosslessJson<T = unknown>(text: string): T;
12
+ /**
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.
19
+ */
20
+ export declare function installLosslessJsonResponseParser(): () => void;
21
+ export declare function restoreLosslessJsonResponseParser(): void;
@@ -1 +1 @@
1
- const a114_0x33659a=a114_0x2b8a;(function(_0x54a244,_0x2f0f73){const _0x3b3f3f=a114_0x2b8a,_0x36b7ba=_0x54a244();while(!![]){try{const _0x598d5e=parseInt(_0x3b3f3f(0x1f1))/0x1*(-parseInt(_0x3b3f3f(0x1f2))/0x2)+parseInt(_0x3b3f3f(0x1fb))/0x3*(parseInt(_0x3b3f3f(0x1e7))/0x4)+-parseInt(_0x3b3f3f(0x1ee))/0x5+-parseInt(_0x3b3f3f(0x1ef))/0x6+parseInt(_0x3b3f3f(0x1f8))/0x7+-parseInt(_0x3b3f3f(0x1ec))/0x8*(-parseInt(_0x3b3f3f(0x1f7))/0x9)+parseInt(_0x3b3f3f(0x1e8))/0xa;if(_0x598d5e===_0x2f0f73)break;else _0x36b7ba['push'](_0x36b7ba['shift']());}catch(_0x4864df){_0x36b7ba['push'](_0x36b7ba['shift']());}}}(a114_0x172b,0x947de));const JSON_NUMBER_PATTERN=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/,MAX_SAFE_INTEGER=BigInt(Number[a114_0x33659a(0x1fa)]),MIN_SAFE_INTEGER=BigInt(Number[a114_0x33659a(0x1f4)]);function a114_0x2b8a(_0x365105,_0x5eba68){_0x365105=_0x365105-0x1e7;const _0x172b14=a114_0x172b();let _0x2b8a04=_0x172b14[_0x365105];return _0x2b8a04;}let restoreResponseJsonParser,responseJsonPrototype,originalResponseJsonDescriptor;function isUnsafeIntegerLiteral(_0x2fd730){const _0x12485c=a114_0x33659a;if(_0x2fd730['includes']('.')||_0x2fd730[_0x12485c(0x1f0)]('e')||_0x2fd730['includes']('E'))return![];const _0x24c284=BigInt(_0x2fd730);return _0x24c284>MAX_SAFE_INTEGER||_0x24c284<MIN_SAFE_INTEGER;}function quoteUnsafeIntegerLiterals(_0x63e94d){const _0x40e4a6=a114_0x33659a;let _0x13d12a='',_0x4a12d6=![],_0x266259=![];for(let _0x388f23=0x0;_0x388f23<_0x63e94d['length'];){const _0x4e72ce=_0x63e94d[_0x388f23];if(_0x4a12d6){_0x13d12a+=_0x4e72ce,_0x388f23+=0x1;if(_0x266259)_0x266259=![];else{if(_0x4e72ce==='\x5c')_0x266259=!![];else _0x4e72ce==='\x22'&&(_0x4a12d6=![]);}continue;}if(_0x4e72ce==='\x22'){_0x4a12d6=!![],_0x13d12a+=_0x4e72ce,_0x388f23+=0x1;continue;}if(_0x4e72ce==='-'||_0x4e72ce>='0'&&_0x4e72ce<='9'){const _0x121950=JSON_NUMBER_PATTERN[_0x40e4a6(0x1f6)](_0x63e94d['slice'](_0x388f23))?.[0x0];if(_0x121950){_0x13d12a+=isUnsafeIntegerLiteral(_0x121950)?'\x22'+_0x121950+'\x22':_0x121950,_0x388f23+=_0x121950[_0x40e4a6(0x1ea)];continue;}}_0x13d12a+=_0x4e72ce,_0x388f23+=0x1;}return _0x13d12a;}export function parseLosslessJson(_0x2482be){const _0x3e50ff=a114_0x33659a;return JSON[_0x3e50ff(0x1ed)](quoteUnsafeIntegerLiterals(_0x2482be));}export function installLosslessJsonResponseParser(){const _0x4567ba=a114_0x33659a;if(typeof Response===_0x4567ba(0x1e9))return()=>{};if(restoreResponseJsonParser)return restoreResponseJsonParser;return responseJsonPrototype=Response['prototype'],originalResponseJsonDescriptor=Object[_0x4567ba(0x1eb)](responseJsonPrototype,_0x4567ba(0x1f9)),Object[_0x4567ba(0x1f3)](responseJsonPrototype,_0x4567ba(0x1f9),{'configurable':!![],'enumerable':![],'value':async function _0x2ea2b7(){const _0x44a99c=_0x4567ba;return parseLosslessJson(await this[_0x44a99c(0x1f5)]());},'writable':!![]}),restoreResponseJsonParser=()=>{const _0x32677e=_0x4567ba;if(!responseJsonPrototype)return;originalResponseJsonDescriptor?Object[_0x32677e(0x1f3)](responseJsonPrototype,'json',originalResponseJsonDescriptor):delete responseJsonPrototype[_0x32677e(0x1f9)],responseJsonPrototype=undefined,originalResponseJsonDescriptor=undefined,restoreResponseJsonParser=undefined;},restoreResponseJsonParser;}export function restoreLosslessJsonResponseParser(){restoreResponseJsonParser?.();}function a114_0x172b(){const _0x1bee59=['MAX_SAFE_INTEGER','1401VzRXaz','964CfNepf','9393390PidRLe','undefined','length','getOwnPropertyDescriptor','8xDmtKU','parse','3115725JFhbqH','2354832xEXJyh','includes','99539NtHTis','2RewijZ','defineProperty','MIN_SAFE_INTEGER','text','exec','4788477DtuMGY','976073JCPkbS','json'];a114_0x172b=function(){return _0x1bee59;};return a114_0x172b();}
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();}
@@ -0,0 +1,65 @@
1
+ /**
2
+ * @fileoverview `--params` JSON parsing utilities.
3
+ *
4
+ * Why a dedicated module: `--params` is accepted by several execute commands
5
+ * (data create/update/delete/batchCreate, sql exec, bff exec) as a way to pass
6
+ * request bodies. Each command previously had its own `JSON.parse` + try/catch
7
+ * logic, producing inconsistent error messages. Centralizing here means:
8
+ * - Consistent error messages: all `--params` errors say "Invalid JSON for --params"
9
+ * - Single place to add JSON validation or parameter transformation
10
+ * - Easier to test parsing logic in isolation
11
+ *
12
+ * Design decision: `parseJsonParams` returns `Record<string, any>` (an object),
13
+ * while `parseJsonParamsValue` returns `unknown` (any JSON). The former is used
14
+ * for commands whose params must be an object (filter, update); the latter is for
15
+ * commands that accept arbitrary JSON (batchCreate with array body).
16
+ */
17
+ export declare const MAX_DATA_UPDATE_IDS = 1000;
18
+ export type DataUpdateId = number | string;
19
+ /**
20
+ * Parses `--params` as a JSON object.
21
+ *
22
+ * Why `Record<string, any>` return type: all commands using this function have
23
+ * API bodies that are objects (key-value pairs). Returning a plain object
24
+ * prevents callers from accidentally treating the params as an array.
25
+ *
26
+ * @param paramsStr - Raw `--params` flag value.
27
+ * @returns Parsed object, or `undefined` if the string is empty/undefined.
28
+ * @throws CliError with code `"validation_error"` if the string is not valid JSON.
29
+ */
30
+ export declare function parseJsonParams(paramsStr: string | undefined): Record<string, any> | undefined;
31
+ /**
32
+ * Parses `--params` as arbitrary JSON (object or array).
33
+ *
34
+ * Why `unknown` return type: `data batchCreate` accepts a JSON array as the
35
+ * request body (not an object). Using `unknown` allows callers to check the
36
+ * shape and handle both cases.
37
+ *
38
+ * @throws CliError with code `"validation_error"` if the string is not valid JSON.
39
+ */
40
+ export declare function parseJsonParamsValue(paramsStr: string | undefined): unknown;
41
+ /**
42
+ * Normalizes `--params` for batchCreate operations.
43
+ *
44
+ * The Lovrabet batchCreate API accepts either:
45
+ * - A JSON array directly: `[{"name":"a"},{"name":"b"}]`
46
+ * - An object wrapper: `{"items":[{"name":"a"},{"name":"b"}]}`
47
+ *
48
+ * Why normalize the wrapper form: this is a common pattern in Lovrabet Studio's
49
+ * API surface where the wrapper indicates the array's semantic role. Supporting
50
+ * both forms makes the CLI match the Studio UX.
51
+ *
52
+ * @param params - Already-parsed `--params` value (from `parseJsonParamsValue`).
53
+ * @returns The normalized array of record objects.
54
+ * @throws CliError with code `"validation_error"` if the shape is neither form.
55
+ */
56
+ export declare function parseBatchCreateItemsFromParams(params: unknown): Record<string, any>[];
57
+ /**
58
+ * Validates and normalizes `id` for data update operations.
59
+ *
60
+ * `model.update` already accepts a scalar id or an id array. This helper gives
61
+ * command code a stable id list for validation, dry-run, and batch result
62
+ * metadata.
63
+ */
64
+ export declare function parseUpdateIdsFromParams(params: unknown): DataUpdateId[];
65
+ export declare function normalizeUpdateParamsForRuntime(params: Record<string, any>, ids: DataUpdateId[]): Record<string, any>;
@@ -1 +1 @@
1
- (function(_0x4d544d,_0x4308fe){const _0x28e538=a115_0x3dd2,_0x14b327=_0x4d544d();while(!![]){try{const _0x37f6c2=-parseInt(_0x28e538(0xcf))/0x1+parseInt(_0x28e538(0xca))/0x2*(-parseInt(_0x28e538(0xd2))/0x3)+-parseInt(_0x28e538(0xcd))/0x4*(parseInt(_0x28e538(0xe0))/0x5)+parseInt(_0x28e538(0xde))/0x6+parseInt(_0x28e538(0xd0))/0x7+-parseInt(_0x28e538(0xd3))/0x8*(parseInt(_0x28e538(0xcc))/0x9)+parseInt(_0x28e538(0xe1))/0xa;if(_0x37f6c2===_0x4308fe)break;else _0x14b327['push'](_0x14b327['shift']());}catch(_0x5abab9){_0x14b327['push'](_0x14b327['shift']());}}}(a115_0x2de2,0x38a94));import{CliErrors}from'../errors.js';import{parseLosslessJson}from'../utils/lossless-json.js';export const MAX_DATA_UPDATE_IDS=0x3e8;export function parseJsonParams(_0x74685a){const _0x111b17=a115_0x3dd2;if(!_0x74685a)return undefined;try{return parseLosslessJson(_0x74685a);}catch{throw CliErrors[_0x111b17(0xd5)]('Invalid\x20JSON\x20for\x20--params:\x20'+_0x74685a);}}function a115_0x2de2(){const _0x165b29=['3170615vVLpoN','test','6QCdHzd','8FORiiT','Invalid\x20JSON\x20for\x20--params:\x20','validation','string','isSafeInteger','Example:\x20--params\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22done\x22}\x27','data\x20update\x20can\x20update\x20at\x20most\x20','join','\x20records\x20per\x20call;\x20received\x20','data\x20update\x20--params\x20must\x20be\x20a\x20JSON\x20object\x20with\x20id.','Example:\x20--params\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','1524858iHiEyx','isArray','1441325BaaqcA','2844770RgtHal','id[','items','number','map','length','8882qVkxiV','object','1488663vRpKeM','4BjHqvW','data\x20update\x20--params.','296927OXfenZ'];a115_0x2de2=function(){return _0x165b29;};return a115_0x2de2();}export function parseJsonParamsValue(_0x227f57){const _0x40ce92=a115_0x3dd2;if(!_0x227f57)return undefined;try{return parseLosslessJson(_0x227f57);}catch{throw CliErrors['validation'](_0x40ce92(0xd4)+_0x227f57);}}export function parseBatchCreateItemsFromParams(_0x4ade00){const _0xc81bf4=a115_0x3dd2;if(Array[_0xc81bf4(0xdf)](_0x4ade00))return _0x4ade00;if(_0x4ade00!==null&&_0x4ade00!==undefined&&typeof _0x4ade00===_0xc81bf4(0xcb)&&Array[_0xc81bf4(0xdf)](_0x4ade00[_0xc81bf4(0xe3)]))return _0x4ade00[_0xc81bf4(0xe3)];throw CliErrors[_0xc81bf4(0xd5)]('batchCreate\x20--params\x20must\x20be\x20a\x20JSON\x20array\x20or\x20{\x22items\x22:[...]}',_0xc81bf4(0xdd));}function parseDataUpdateId(_0x34b477,_0x147cc1){const _0x1f32d5=a115_0x3dd2;if(typeof _0x34b477===_0x1f32d5(0xc7)&&Number[_0x1f32d5(0xd7)](_0x34b477)&&_0x34b477>0x0)return _0x34b477;if(typeof _0x34b477===_0x1f32d5(0xd6)){if(/^[1-9]\d*$/[_0x1f32d5(0xd1)](_0x34b477))return _0x34b477;}throw CliErrors[_0x1f32d5(0xd5)](_0x1f32d5(0xce)+_0x147cc1+'\x20must\x20be\x20a\x20positive\x20integer\x20or\x20numeric\x20string.');}function a115_0x3dd2(_0x2692e3,_0x4901f3){_0x2692e3=_0x2692e3-0xc7;const _0x2de29c=a115_0x2de2();let _0x3dd20c=_0x2de29c[_0x2692e3];return _0x3dd20c;}export function parseUpdateIdsFromParams(_0x5af0c9){const _0x2605a4=a115_0x3dd2;if(_0x5af0c9===null||_0x5af0c9===undefined||typeof _0x5af0c9!==_0x2605a4(0xcb)||Array[_0x2605a4(0xdf)](_0x5af0c9))throw CliErrors[_0x2605a4(0xd5)](_0x2605a4(0xdc),'Example:\x20--params\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22done\x22}\x27');const _0x4b6ed9=_0x5af0c9['id'];if(_0x4b6ed9===undefined||_0x4b6ed9===null)throw CliErrors[_0x2605a4(0xd5)]('data\x20update\x20requires\x20\x22id\x22\x20in\x20--params.',_0x2605a4(0xd8));const _0x111c96=Array[_0x2605a4(0xdf)](_0x4b6ed9)?_0x4b6ed9:[_0x4b6ed9];if(_0x111c96['length']===0x0)throw CliErrors['validation']('data\x20update\x20id\x20array\x20cannot\x20be\x20empty.');if(_0x111c96[_0x2605a4(0xc9)]>MAX_DATA_UPDATE_IDS)throw CliErrors['validation'](_0x2605a4(0xd9)+MAX_DATA_UPDATE_IDS+_0x2605a4(0xdb)+_0x111c96[_0x2605a4(0xc9)]+'.');return _0x111c96[_0x2605a4(0xc8)]((_0x50e8a7,_0x578d40)=>parseDataUpdateId(_0x50e8a7,Array[_0x2605a4(0xdf)](_0x4b6ed9)?_0x2605a4(0xe2)+_0x578d40+']':'id'));}export function normalizeUpdateParamsForRuntime(_0xd1c223,_0x2e542f){const _0x4d8f94=a115_0x3dd2;if(Array[_0x4d8f94(0xdf)](_0xd1c223['id'])&&_0x2e542f[_0x4d8f94(0xc9)]>0x1)return{..._0xd1c223,'id':_0x2e542f[_0x4d8f94(0xda)](',')};return _0xd1c223;}
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;}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Platform-specific executable helpers for cross-platform CLI execution.
3
+ *
4
+ * On Windows, npm-installed CLIs such as `npm` and `npx` are exposed as `.cmd`
5
+ * wrapper scripts. `spawnSync()` without `shell: true` cannot resolve those
6
+ * wrappers unless the extension is explicit. On Unix-like systems, the plain
7
+ * command name is sufficient.
8
+ */
9
+ /** Whether the current runtime is Windows. */
10
+ export declare const isWindows: boolean;
11
+ /**
12
+ * Resolves the executable name for npm ecosystem tools on the current platform.
13
+ *
14
+ * @param cmd - The base executable name, for example `"npx"` or `"npm"`.
15
+ * @returns The executable name that should be passed to `spawnSync()`.
16
+ */
17
+ export declare function resolveNpmBin(cmd: string): string;
@@ -1 +1 @@
1
- const a116_0x362d91=a116_0x3ee2;function a116_0x3ee2(_0x188162,_0x5686f7){_0x188162=_0x188162-0x1c7;const _0x328011=a116_0x3280();let _0x3ee2b9=_0x328011[_0x188162];return _0x3ee2b9;}function a116_0x3280(){const _0x17a2ce=['platform','27yRkYFM','1515732EBJPJm','1953570tWvRiG','win32','1ujGNKC','1245981cObkva','672510ROsQBd','3777160ircjOI','211908QzqNzG','.cmd','20jThDwB','6233094fDIwiB'];a116_0x3280=function(){return _0x17a2ce;};return a116_0x3280();}(function(_0x10eab8,_0x55a8aa){const _0x2761c5=a116_0x3ee2,_0x2f17a4=_0x10eab8();while(!![]){try{const _0xd7931f=-parseInt(_0x2761c5(0x1c8))/0x1*(-parseInt(_0x2761c5(0x1ca))/0x2)+parseInt(_0x2761c5(0x1c9))/0x3+-parseInt(_0x2761c5(0x1cc))/0x4*(-parseInt(_0x2761c5(0x1ce))/0x5)+-parseInt(_0x2761c5(0x1d2))/0x6+parseInt(_0x2761c5(0x1cf))/0x7+-parseInt(_0x2761c5(0x1cb))/0x8+-parseInt(_0x2761c5(0x1d1))/0x9*(parseInt(_0x2761c5(0x1d3))/0xa);if(_0xd7931f===_0x55a8aa)break;else _0x2f17a4['push'](_0x2f17a4['shift']());}catch(_0x54e9c1){_0x2f17a4['push'](_0x2f17a4['shift']());}}}(a116_0x3280,0x84976));export const isWindows=process[a116_0x362d91(0x1d0)]===a116_0x362d91(0x1c7);export function resolveNpmBin(_0x4a4710){const _0x592375=a116_0x362d91;return isWindows?_0x4a4710+_0x592375(0x1cd):_0x4a4710;}
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;}
@@ -0,0 +1,10 @@
1
+ export interface UpdateNotice {
2
+ command: string;
3
+ current: string;
4
+ latest: string;
5
+ url: string;
6
+ message: string;
7
+ }
8
+ export declare function getUpdateNoticeCachePath(): string;
9
+ export declare function buildNpmVersionUrl(version: string): string;
10
+ export declare function resolveLatestUpdateNotice(): Promise<UpdateNotice | null>;
@@ -1 +1 @@
1
- (function(_0x3c6fec,_0x28267e){const _0x4d8b6a=a117_0x2884,_0x92d450=_0x3c6fec();while(!![]){try{const _0x2ed047=parseInt(_0x4d8b6a(0x167))/0x1*(parseInt(_0x4d8b6a(0x15e))/0x2)+-parseInt(_0x4d8b6a(0x145))/0x3+-parseInt(_0x4d8b6a(0x166))/0x4+-parseInt(_0x4d8b6a(0x155))/0x5*(parseInt(_0x4d8b6a(0x14a))/0x6)+-parseInt(_0x4d8b6a(0x15a))/0x7*(-parseInt(_0x4d8b6a(0x157))/0x8)+parseInt(_0x4d8b6a(0x164))/0x9*(parseInt(_0x4d8b6a(0x15b))/0xa)+-parseInt(_0x4d8b6a(0x160))/0xb;if(_0x2ed047===_0x28267e)break;else _0x92d450['push'](_0x92d450['shift']());}catch(_0x574e6b){_0x92d450['push'](_0x92d450['shift']());}}}(a117_0x5f45,0x92567));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(_0x213439){const _0x5a6a7a=a117_0x2884,_0x3a9921=_0x213439['trim']()[_0x5a6a7a(0x14e)](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x3a9921)return null;return{'major':Number(_0x3a9921[0x1]),'minor':Number(_0x3a9921[0x2]),'patch':Number(_0x3a9921[0x3]),'prerelease':_0x3a9921[0x4]};}function compareSemver(_0x362c4d,_0x290fc2){const _0x2a6a9b=a117_0x2884,_0x53446d=parseSemver(_0x362c4d),_0x309d6d=parseSemver(_0x290fc2);if(!_0x53446d||!_0x309d6d)throw new Error(_0x2a6a9b(0x163));for(const _0x5b0bf7 of[_0x2a6a9b(0x161),_0x2a6a9b(0x143),_0x2a6a9b(0x15f)]){if(_0x53446d[_0x5b0bf7]<_0x309d6d[_0x5b0bf7])return-0x1;if(_0x53446d[_0x5b0bf7]>_0x309d6d[_0x5b0bf7])return 0x1;}if(!_0x53446d['prerelease']&&!_0x309d6d[_0x2a6a9b(0x169)])return 0x0;if(!_0x53446d[_0x2a6a9b(0x169)])return 0x1;if(!_0x309d6d['prerelease'])return-0x1;if(_0x53446d[_0x2a6a9b(0x169)]===_0x309d6d[_0x2a6a9b(0x169)])return 0x0;return _0x53446d[_0x2a6a9b(0x169)]<_0x309d6d[_0x2a6a9b(0x169)]?-0x1:0x1;}function isUpdateNoticeDisabled(){const _0x2c433a=a117_0x2884,_0x44b2dd=process.env.LOVRABET_NO_UPDATE_NOTICE?.[_0x2c433a(0x156)]()['toLowerCase']();return _0x44b2dd==='1'||_0x44b2dd==='true'||_0x44b2dd===_0x2c433a(0x153);}function cacheRoot(){return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),'.cache');}export function getUpdateNoticeCachePath(){const _0x482df9=a117_0x2884;return join(cacheRoot(),'lovrabet-cli',_0x482df9(0x154));}async function readUpdateNoticeCache(){const _0x5bfe3e=a117_0x2884;try{const _0x26d1bd=await readFile(getUpdateNoticeCachePath(),_0x5bfe3e(0x150)),_0x22024f=JSON['parse'](_0x26d1bd);if(!_0x22024f||typeof _0x22024f!==_0x5bfe3e(0x165))return{};return _0x22024f;}catch{return{};}}async function writeUpdateNoticeCache(_0x38d632){const _0x13820e=a117_0x2884;try{const _0x4b1e77=getUpdateNoticeCachePath();await mkdir(dirname(_0x4b1e77),{'recursive':!![]}),await writeFile(_0x4b1e77,JSON[_0x13820e(0x14b)](_0x38d632,null,0x2)+'\x0a',_0x13820e(0x150));}catch{}}function isFreshCheck(_0x29bb8b,_0x1d13db){const _0x47cfdd=a117_0x2884;return typeof _0x29bb8b[_0x47cfdd(0x14f)]==='number'&&_0x1d13db-_0x29bb8b[_0x47cfdd(0x14f)]<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x4ea874,_0x5148bf,_0x848866){const _0x198076=a117_0x2884;return _0x4ea874['lastNotifiedVersion']===_0x5148bf&&typeof _0x4ea874[_0x198076(0x148)]===_0x198076(0x15d)&&_0x848866-_0x4ea874[_0x198076(0x148)]<UPDATE_NOTICE_TTL_MS;}async function fetchNpmDistTags(_0xf7372b=0x5dc){const _0x23b145=a117_0x2884;try{const _0x49378e=NPM_REGISTRY_BASE_URL+_0x23b145(0x14d)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x23b145(0x151),_0x807fd0=await fetch(_0x49378e,{'signal':AbortSignal[_0x23b145(0x144)](_0xf7372b)});if(!_0x807fd0['ok'])return null;const _0x4e2540=await _0x807fd0[_0x23b145(0x149)]();if(!_0x4e2540||typeof _0x4e2540!==_0x23b145(0x165))return null;return Object[_0x23b145(0x159)](Object['entries'](_0x4e2540)[_0x23b145(0x168)](([,_0x422f3a])=>typeof _0x422f3a===_0x23b145(0x158)&&_0x422f3a['trim']())[_0x23b145(0x146)](([_0x496f16,_0xd73062])=>[_0x496f16,String(_0xd73062)[_0x23b145(0x156)]()]));}catch{return null;}}function a117_0x5f45(){const _0x58144c=['utf8','/dist-tags','\x20available,\x20current\x20','yes','update-check.json','2185010txavPi','trim','240616GuVAoS','string','fromEntries','84fqMwsM','10rcZVGp','/v/','number','2sDddco','patch','3809058KlTbsJ','major',',\x20run:\x20','Invalid\x20semver','7202655PjnvRS','object','1444248vmlfbV','1012507SlVfhz','filter','prerelease','\x20update','minor','timeout','1289955pfofbh','map','latest','lastNotifiedAt','json','6yznoMa','stringify','https://www.npmjs.com/package/','/-/package/','match','checkedAt'];a117_0x5f45=function(){return _0x58144c;};return a117_0x5f45();}function a117_0x2884(_0x4df919,_0x120527){_0x4df919=_0x4df919-0x143;const _0x5f455c=a117_0x5f45();let _0x2884cb=_0x5f455c[_0x4df919];return _0x2884cb;}export function buildNpmVersionUrl(_0x409ea5){const _0x499750=a117_0x2884;return _0x499750(0x14c)+LOVRABET_NPM_PACKAGE_NAME+_0x499750(0x15c)+_0x409ea5;}export async function resolveLatestUpdateNotice(){const _0x328496=a117_0x2884;if(isUpdateNoticeDisabled())return null;try{const _0x5c2001=Date['now'](),_0x277be1=getCliVersion(),_0x50cc31=await readUpdateNoticeCache();let _0x1905b0=isFreshCheck(_0x50cc31,_0x5c2001)?_0x50cc31[_0x328496(0x147)]?.[_0x328496(0x156)]():undefined;if(!_0x1905b0&&!isFreshCheck(_0x50cc31,_0x5c2001)){const _0x418750=await fetchNpmDistTags();_0x1905b0=_0x418750?.[_0x328496(0x147)]?.[_0x328496(0x156)](),await writeUpdateNoticeCache({..._0x50cc31,'checkedAt':_0x5c2001,'latest':_0x1905b0,'failed':!_0x1905b0});}if(!_0x1905b0||compareSemver(_0x277be1,_0x1905b0)>=0x0)return null;if(isRecentlyNotified(_0x50cc31,_0x1905b0,_0x5c2001))return null;const _0x303993=CLI_BIN_NAME+_0x328496(0x16a);return await writeUpdateNoticeCache({..._0x50cc31,'checkedAt':isFreshCheck(_0x50cc31,_0x5c2001)?_0x50cc31[_0x328496(0x14f)]:_0x5c2001,'latest':_0x1905b0,'failed':![],'lastNotifiedVersion':_0x1905b0,'lastNotifiedAt':_0x5c2001}),{'command':_0x303993,'current':_0x277be1,'latest':_0x1905b0,'url':buildNpmVersionUrl(_0x1905b0),'message':CLI_BIN_NAME+'\x20'+_0x1905b0+_0x328496(0x152)+_0x277be1+_0x328496(0x162)+_0x303993};}catch{return null;}}
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;}}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @fileoverview CLI version helpers.
3
+ *
4
+ * `getCliVersion()` returns the semantic version only. Keep it free of display
5
+ * metadata because update checks, notices, and schema consumers compare this
6
+ * value as a package version.
7
+ */
8
+ /**
9
+ * Returns the semantic CLI package version.
10
+ *
11
+ * @returns The generated `VERSION` value (e.g. `"1.2.3"`).
12
+ */
13
+ export declare function getCliVersion(): string;
14
+ export declare function getCliGitCommit(): string;
15
+ /**
16
+ * Returns the human-facing CLI version shown by `lovrabet --version`.
17
+ */
18
+ export declare function getCliVersionDisplay(): string;
@@ -1 +1 @@
1
- (function(_0x20c4d1,_0x387ed3){const _0x5ebbea=a118_0x48d3,_0x1cde10=_0x20c4d1();while(!![]){try{const _0x137097=-parseInt(_0x5ebbea(0x1cd))/0x1*(-parseInt(_0x5ebbea(0x1d2))/0x2)+-parseInt(_0x5ebbea(0x1cf))/0x3*(-parseInt(_0x5ebbea(0x1d4))/0x4)+-parseInt(_0x5ebbea(0x1cc))/0x5+parseInt(_0x5ebbea(0x1d0))/0x6+parseInt(_0x5ebbea(0x1d3))/0x7+-parseInt(_0x5ebbea(0x1ce))/0x8*(-parseInt(_0x5ebbea(0x1cb))/0x9)+-parseInt(_0x5ebbea(0x1ca))/0xa;if(_0x137097===_0x387ed3)break;else _0x1cde10['push'](_0x1cde10['shift']());}catch(_0x557ee0){_0x1cde10['push'](_0x1cde10['shift']());}}}(a118_0x5194,0x8984a));import{BUILD_TIME,GIT_COMMIT,VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}export function getCliGitCommit(){const _0x20e635=String(GIT_COMMIT);return _0x20e635&&_0x20e635!=='unknown'?_0x20e635:'';}function a118_0x48d3(_0x409950,_0x48dd15){_0x409950=_0x409950-0x1ca;const _0x5194ca=a118_0x5194();let _0x48d3b1=_0x5194ca[_0x409950];return _0x48d3b1;}export function getCliVersionDisplay(){const _0x55a06c=a118_0x48d3,_0x5d9786=getCliGitCommit(),_0x25c129=BUILD_TIME[_0x55a06c(0x1d1)](0x0,0xa);if(!_0x5d9786||!_0x25c129)return VERSION;return VERSION+'\x20('+_0x5d9786+',\x20'+_0x25c129+')';}function a118_0x5194(){const _0x469bea=['11VUOapZ','30872WVigrY','246rRvUeX','4316262JyaoRY','slice','77636dOxNwK','791168hqdPIp','38580CllrlG','13148690mcNmFy','63yAfJZD','995795sJZVJy'];a118_0x5194=function(){return _0x469bea;};return a118_0x5194();}
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+')';}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * 声明式命令中「旁路」输出:进度、路径列表、交互前提示等。
3
+ * 写入 stderr,避免与 stdout 上的 JSON/compress 信封混在一起;
4
+ * 语义上不是错误(与 console.error 区分),仅供人机可读侧道信息。
5
+ */
6
+ export declare function writeCliSideChannelLine(line: string): void;
@@ -1 +1 @@
1
- function a119_0x4c56(_0x2bc117,_0x51de43){_0x2bc117=_0x2bc117-0xad;var _0x518e64=a119_0x518e();var _0x4c5626=_0x518e64[_0x2bc117];return _0x4c5626;}function a119_0x518e(){var _0x1398aa=['4892956CnuOOQ','49DbXlwn','3JYOlLv','1318366eicTXP','7435715HfifkW','13rRjsAb','6xgXXRG','68710lHKjVN','6900534QiGfeZ','1991Osfial','stderr','4845660ugBLdB','56CQztFG','432WqohSi'];a119_0x518e=function(){return _0x1398aa;};return a119_0x518e();}(function(_0x2c638c,_0x586396){var _0x533ed6=a119_0x4c56,_0xa5f29c=_0x2c638c();while(!![]){try{var _0x384f08=-parseInt(_0x533ed6(0xb0))/0x1*(-parseInt(_0x533ed6(0xae))/0x2)+-parseInt(_0x533ed6(0xb1))/0x3*(-parseInt(_0x533ed6(0xaf))/0x4)+parseInt(_0x533ed6(0xb3))/0x5*(-parseInt(_0x533ed6(0xb5))/0x6)+-parseInt(_0x533ed6(0xb2))/0x7*(parseInt(_0x533ed6(0xad))/0x8)+parseInt(_0x533ed6(0xb7))/0x9+parseInt(_0x533ed6(0xb6))/0xa*(parseInt(_0x533ed6(0xb8))/0xb)+-parseInt(_0x533ed6(0xba))/0xc*(-parseInt(_0x533ed6(0xb4))/0xd);if(_0x384f08===_0x586396)break;else _0xa5f29c['push'](_0xa5f29c['shift']());}catch(_0x53886e){_0xa5f29c['push'](_0xa5f29c['shift']());}}}(a119_0x518e,0xcdb00));export function writeCliSideChannelLine(_0x9c617e){var _0x197b87=a119_0x4c56;process[_0x197b87(0xb9)]['write'](_0x9c617e+'\x0a');}
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');}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lovrabet/lovrabet-cli",
3
- "version": "2.1.17",
3
+ "version": "2.1.18-beta.2",
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": [
@@ -25,6 +25,14 @@
25
25
  "type": "module",
26
26
  "module": "lib/cli.js",
27
27
  "main": "lib/cli.js",
28
+ "exports": {
29
+ ".": "./lib/cli.js",
30
+ "./runtime": {
31
+ "types": "./lib/runtime/index.d.ts",
32
+ "import": "./lib/runtime/index.js",
33
+ "default": "./lib/runtime/index.js"
34
+ }
35
+ },
28
36
  "engines": {
29
37
  "node": ">=20"
30
38
  },