@lovrabet/rabetbase-cli 2.5.0-beta.2 → 2.5.0-beta.4

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 (304) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/api/generate-sdk-config-file.js +1 -1
  5. package/lib/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.js +1 -1
  7. package/lib/auth/constant.js +1 -1
  8. package/lib/auth/get-cookie.js +1 -1
  9. package/lib/auth/get-session-user.js +1 -1
  10. package/lib/auth/is-session-valid.js +1 -1
  11. package/lib/auth/login-success-html.js +1 -1
  12. package/lib/auth/logout.js +1 -1
  13. package/lib/cli-flags.js +1 -1
  14. package/lib/cli.js +1 -1
  15. package/lib/commands/api/generate.js +1 -1
  16. package/lib/commands/api/index.js +1 -1
  17. package/lib/commands/api/list.js +1 -1
  18. package/lib/commands/api/pull.js +1 -1
  19. package/lib/commands/api/shared.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/members-list.js +1 -1
  23. package/lib/commands/app/remote-directory.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/delete.js +1 -1
  53. package/lib/commands/config/get.js +1 -1
  54. package/lib/commands/config/index.js +1 -1
  55. package/lib/commands/config/init.js +1 -1
  56. package/lib/commands/config/list.js +1 -1
  57. package/lib/commands/config/set.js +1 -1
  58. package/lib/commands/config/shared.js +1 -1
  59. package/lib/commands/dataset/business-group-update.js +1 -1
  60. package/lib/commands/dataset/business-groups.js +1 -1
  61. package/lib/commands/dataset/capability.js +1 -1
  62. package/lib/commands/dataset/delete.js +1 -1
  63. package/lib/commands/dataset/detail.js +1 -1
  64. package/lib/commands/dataset/extend-update.js +1 -1
  65. package/lib/commands/dataset/field-update.js +1 -1
  66. package/lib/commands/dataset/generate.js +1 -1
  67. package/lib/commands/dataset/index.js +1 -1
  68. package/lib/commands/dataset/list.js +1 -1
  69. package/lib/commands/dataset/operations.js +1 -1
  70. package/lib/commands/dataset/relation-audit.js +1 -1
  71. package/lib/commands/dataset/relation-create.js +1 -1
  72. package/lib/commands/dataset/relation-delete.js +1 -1
  73. package/lib/commands/dataset/relation-shared.js +1 -1
  74. package/lib/commands/dataset/relation-update.js +1 -1
  75. package/lib/commands/dataset/relations.js +1 -1
  76. package/lib/commands/dataset/rename.js +1 -1
  77. package/lib/commands/dataset/restore.js +1 -1
  78. package/lib/commands/db/analysis-batching.js +1 -1
  79. package/lib/commands/db/analyze-batch-plan.js +1 -1
  80. package/lib/commands/db/analyze-cancel.js +1 -1
  81. package/lib/commands/db/analyze-start.js +1 -1
  82. package/lib/commands/db/analyze-status.js +1 -1
  83. package/lib/commands/db/create.js +1 -1
  84. package/lib/commands/db/delete.js +1 -1
  85. package/lib/commands/db/detail.js +1 -1
  86. package/lib/commands/db/diff-refresh-start.js +1 -1
  87. package/lib/commands/db/diff-refresh-status.js +1 -1
  88. package/lib/commands/db/diff.js +1 -1
  89. package/lib/commands/db/index.js +1 -1
  90. package/lib/commands/db/list.js +1 -1
  91. package/lib/commands/db/shared.js +1 -1
  92. package/lib/commands/db/table-diff-shared.d.ts +13 -0
  93. package/lib/commands/db/table-diff-shared.js +1 -0
  94. package/lib/commands/db/tables.js +1 -1
  95. package/lib/commands/db/test.js +1 -1
  96. package/lib/commands/db/update.js +1 -1
  97. package/lib/commands/doctor.js +1 -1
  98. package/lib/commands/file/index.js +1 -1
  99. package/lib/commands/issue/index.js +1 -1
  100. package/lib/commands/issue/nudge.js +1 -1
  101. package/lib/commands/issue/report.js +1 -1
  102. package/lib/commands/issue/shared.js +1 -1
  103. package/lib/commands/kb/create.js +1 -1
  104. package/lib/commands/kb/delete.js +1 -1
  105. package/lib/commands/kb/detail.js +1 -1
  106. package/lib/commands/kb/index.js +1 -1
  107. package/lib/commands/kb/list.js +1 -1
  108. package/lib/commands/kb/search.js +1 -1
  109. package/lib/commands/kb/shared.js +1 -1
  110. package/lib/commands/kb/update.js +1 -1
  111. package/lib/commands/logs/index.js +1 -1
  112. package/lib/commands/menu/asset-update.js +1 -1
  113. package/lib/commands/menu/delete.js +1 -1
  114. package/lib/commands/menu/external-link-create.js +1 -1
  115. package/lib/commands/menu/external-link-update.js +1 -1
  116. package/lib/commands/menu/group-create.js +1 -1
  117. package/lib/commands/menu/group-update.js +1 -1
  118. package/lib/commands/menu/index.js +1 -1
  119. package/lib/commands/menu/list.js +1 -1
  120. package/lib/commands/menu/move.js +1 -1
  121. package/lib/commands/menu/regroup-start.js +1 -1
  122. package/lib/commands/menu/rename.js +1 -1
  123. package/lib/commands/menu/shared/compare-table.js +1 -1
  124. package/lib/commands/menu/shared/delete-plan.js +1 -1
  125. package/lib/commands/menu/shared/facts.js +1 -1
  126. package/lib/commands/menu/shared/index.js +1 -1
  127. package/lib/commands/menu/shared/inquirer.js +1 -1
  128. package/lib/commands/menu/shared/local-pages.js +1 -1
  129. package/lib/commands/menu/shared/logic.js +1 -1
  130. package/lib/commands/menu/shared/mutations.js +1 -1
  131. package/lib/commands/menu/shared/service.js +1 -1
  132. package/lib/commands/menu/shared/sync-core.js +1 -1
  133. package/lib/commands/menu/shared/update-core.js +1 -1
  134. package/lib/commands/menu/shared/valid-url.js +1 -1
  135. package/lib/commands/menu/sync.js +1 -1
  136. package/lib/commands/menu/visibility-update.js +1 -1
  137. package/lib/commands/notification/config-create.js +1 -1
  138. package/lib/commands/notification/config-delete.js +1 -1
  139. package/lib/commands/notification/config-list.js +1 -1
  140. package/lib/commands/notification/config-update.js +1 -1
  141. package/lib/commands/notification/index.js +1 -1
  142. package/lib/commands/notification/shared.js +1 -1
  143. package/lib/commands/ocr/index.js +1 -1
  144. package/lib/commands/page/create.js +1 -1
  145. package/lib/commands/page/custom/detail.js +1 -1
  146. package/lib/commands/page/custom/list.js +1 -1
  147. package/lib/commands/page/custom/publish.js +1 -1
  148. package/lib/commands/page/custom/shared.js +1 -1
  149. package/lib/commands/page/custom/syntax.js +1 -1
  150. package/lib/commands/page/custom/template.js +1 -1
  151. package/lib/commands/page/custom/update.js +1 -1
  152. package/lib/commands/page/data-list-status.js +1 -1
  153. package/lib/commands/page/generate-start.js +1 -1
  154. package/lib/commands/page/generate-status.js +1 -1
  155. package/lib/commands/page/index.js +1 -1
  156. package/lib/commands/page/pull.js +1 -1
  157. package/lib/commands/page/push.js +1 -1
  158. package/lib/commands/page/relation-audit.js +1 -1
  159. package/lib/commands/page/restore.js +1 -1
  160. package/lib/commands/page/shared.js +1 -1
  161. package/lib/commands/page/sync.js +1 -1
  162. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  163. package/lib/commands/project/create/format-elapsed.js +1 -1
  164. package/lib/commands/project/create/main.js +1 -1
  165. package/lib/commands/project/create/materialize-project-template.js +1 -1
  166. package/lib/commands/project/create/project-name.js +1 -1
  167. package/lib/commands/project/create/project-template-archive.js +1 -1
  168. package/lib/commands/project/create/project-template-path.js +1 -1
  169. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  170. package/lib/commands/project/create/use-format-code.js +1 -1
  171. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  172. package/lib/commands/project/index.js +1 -1
  173. package/lib/commands/project/upgrade.js +1 -1
  174. package/lib/commands/registry.js +1 -1
  175. package/lib/commands/role/delete.js +1 -1
  176. package/lib/commands/role/detail.js +1 -1
  177. package/lib/commands/role/index.js +1 -1
  178. package/lib/commands/role/list.js +1 -1
  179. package/lib/commands/role/shared.js +1 -1
  180. package/lib/commands/role/update.js +1 -1
  181. package/lib/commands/role/user-add.js +1 -1
  182. package/lib/commands/role/user-remove.js +1 -1
  183. package/lib/commands/role/user-resolve.js +1 -1
  184. package/lib/commands/run/index.js +1 -1
  185. package/lib/commands/schema.js +1 -1
  186. package/lib/commands/sql/create.js +1 -1
  187. package/lib/commands/sql/delete.js +1 -1
  188. package/lib/commands/sql/detail.js +1 -1
  189. package/lib/commands/sql/exec.js +1 -1
  190. package/lib/commands/sql/index.js +1 -1
  191. package/lib/commands/sql/list.js +1 -1
  192. package/lib/commands/sql/pull.js +1 -1
  193. package/lib/commands/sql/push.js +1 -1
  194. package/lib/commands/sql/shared.js +1 -1
  195. package/lib/commands/sql/status.js +1 -1
  196. package/lib/commands/sql/validate.js +1 -1
  197. package/lib/commands/task/index.js +1 -1
  198. package/lib/commands/task/status.js +1 -1
  199. package/lib/commands/tenant/index.js +1 -1
  200. package/lib/commands/tenant/members-list.js +1 -1
  201. package/lib/commands/tenant/shared.js +1 -1
  202. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  203. package/lib/commands/user-account/index.js +1 -1
  204. package/lib/commands/workspace/add.js +1 -1
  205. package/lib/commands/workspace/index.js +1 -1
  206. package/lib/commands/workspace/remove.js +1 -1
  207. package/lib/config/domain-config.js +1 -1
  208. package/lib/config/schema.js +1 -1
  209. package/lib/constant/cdn.js +1 -1
  210. package/lib/constant/cli.js +1 -1
  211. package/lib/constant/defaults.js +1 -1
  212. package/lib/constant/domain.js +1 -1
  213. package/lib/constant/env.js +1 -1
  214. package/lib/constant/output.js +1 -1
  215. package/lib/constant/paths.js +1 -1
  216. package/lib/constant/region.js +1 -1
  217. package/lib/constant/risk.js +1 -1
  218. package/lib/context/app-resolver.js +1 -1
  219. package/lib/context/auth-resolver.js +1 -1
  220. package/lib/context/config-loader.js +1 -1
  221. package/lib/context.js +1 -1
  222. package/lib/core/alias-resolver.js +1 -1
  223. package/lib/core/api-client.d.ts +1 -7
  224. package/lib/core/api-client.js +1 -1
  225. package/lib/core/bff/config.js +1 -1
  226. package/lib/core/bff/file-system.js +1 -1
  227. package/lib/core/bff/hash.js +1 -1
  228. package/lib/core/bff/lock.js +1 -1
  229. package/lib/core/bff/utils.js +1 -1
  230. package/lib/core/db-resolver.js +1 -1
  231. package/lib/core/page/file-system.js +1 -1
  232. package/lib/core/page/hash.js +1 -1
  233. package/lib/core/page/lock.js +1 -1
  234. package/lib/core/sql-index-auditor.js +1 -1
  235. package/lib/core/sql-sync/config.js +1 -1
  236. package/lib/core/sql-sync/file-system.js +1 -1
  237. package/lib/core/sql-sync/hash.js +1 -1
  238. package/lib/core/sql-sync/lock.js +1 -1
  239. package/lib/core/sql-sync/utils.js +1 -1
  240. package/lib/core/sql-validator.js +1 -1
  241. package/lib/errors.js +1 -1
  242. package/lib/framework/build-all-flags.js +1 -1
  243. package/lib/framework/error-output.js +1 -1
  244. package/lib/framework/explicit-yes.js +1 -1
  245. package/lib/framework/flags.js +1 -1
  246. package/lib/framework/help.js +1 -1
  247. package/lib/framework/index.js +1 -1
  248. package/lib/framework/output.js +1 -1
  249. package/lib/framework/response.js +1 -1
  250. package/lib/framework/runner-alias.js +1 -1
  251. package/lib/framework/runner.js +1 -1
  252. package/lib/framework/schema-export.js +1 -1
  253. package/lib/framework/types.js +1 -1
  254. package/lib/generated/build-info.d.ts +4 -4
  255. package/lib/generated/build-info.js +1 -1
  256. package/lib/help.js +1 -1
  257. package/lib/postinstall.js +1 -1
  258. package/lib/runtime/confirmation.js +1 -1
  259. package/lib/runtime/event.js +1 -1
  260. package/lib/runtime/index.js +1 -1
  261. package/lib/runtime/queue.js +1 -1
  262. package/lib/runtime/resolve.js +1 -1
  263. package/lib/skills/builtin-skill.js +1 -1
  264. package/lib/skills/main.js +1 -1
  265. package/lib/skills/npx-skills-add.js +1 -1
  266. package/lib/skills/skill-presence.js +1 -1
  267. package/lib/telemetry/cli-command-trace.js +1 -1
  268. package/lib/telemetry/cli-help-trace.js +1 -1
  269. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  270. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  271. package/lib/telemetry/send-cli-trace-log.js +1 -1
  272. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  273. package/lib/utils/ai_config.js +1 -1
  274. package/lib/utils/apply-jq-filter.js +1 -1
  275. package/lib/utils/cdn-config.js +1 -1
  276. package/lib/utils/check-sdk-version.js +1 -1
  277. package/lib/utils/cli-version-check.js +1 -1
  278. package/lib/utils/cli-version-policy.js +1 -1
  279. package/lib/utils/config.js +1 -1
  280. package/lib/utils/entity-with-id.js +1 -1
  281. package/lib/utils/file-utils.js +1 -1
  282. package/lib/utils/guides-cdn.js +1 -1
  283. package/lib/utils/http-client.js +1 -1
  284. package/lib/utils/is-non-interactive.js +1 -1
  285. package/lib/utils/logger.js +1 -1
  286. package/lib/utils/params.js +1 -1
  287. package/lib/utils/platform.js +1 -1
  288. package/lib/utils/sleep.js +1 -1
  289. package/lib/utils/template-replacer.js +1 -1
  290. package/lib/utils/update-notice.js +1 -1
  291. package/lib/utils/version.js +1 -1
  292. package/lib/utils/with-active-cookie.js +1 -1
  293. package/lib/utils/write-cli-side-channel.js +1 -1
  294. package/package.json +1 -1
  295. package/skills/rabetbase/SKILL.md +6 -6
  296. package/skills/rabetbase/guides/custom-page-workflow.md +1 -1
  297. package/skills/rabetbase/guides/database-connection-workflow.md +9 -9
  298. package/skills/rabetbase/references/rabetbase-config.md +2 -3
  299. package/skills/rabetbase/references/rabetbase-db-analyze.md +2 -2
  300. package/skills/rabetbase/references/rabetbase-db-diff-refresh.md +4 -3
  301. package/skills/rabetbase/references/rabetbase-db-diff.md +7 -22
  302. package/skills/rabetbase/references/rabetbase-db-tables.md +14 -2
  303. package/skills/rabetbase/references/rabetbase-page-custom-list.md +5 -2
  304. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- const a35_0x3cb612=a35_0xe69c;(function(_0x40bcda,_0x1fd5f1){const _0x475faf=a35_0xe69c,_0x28db3c=_0x40bcda();while(!![]){try{const _0xf63152=parseInt(_0x475faf(0xa8))/0x1*(parseInt(_0x475faf(0xa1))/0x2)+parseInt(_0x475faf(0xaa))/0x3*(parseInt(_0x475faf(0xb1))/0x4)+parseInt(_0x475faf(0xa2))/0x5*(parseInt(_0x475faf(0xac))/0x6)+-parseInt(_0x475faf(0xb0))/0x7*(parseInt(_0x475faf(0xa6))/0x8)+-parseInt(_0x475faf(0xa9))/0x9+-parseInt(_0x475faf(0xb8))/0xa*(-parseInt(_0x475faf(0xad))/0xb)+-parseInt(_0x475faf(0xa3))/0xc;if(_0xf63152===_0x1fd5f1)break;else _0x28db3c['push'](_0x28db3c['shift']());}catch(_0x31aa82){_0x28db3c['push'](_0x28db3c['shift']());}}}(a35_0x416f,0xe9777));function a35_0xe69c(_0xb13654,_0x7788e){_0xb13654=_0xb13654-0x9a;const _0x416f91=a35_0x416f();let _0xe69cfd=_0x416f91[_0xb13654];return _0xe69cfd;}function a35_0x416f(){const _0xf54280=['3071835nMriQh','4314oaWAhI','List\x20Backend\x20Function\x20scripts','1088418VrtTDR','11tOKibE','scriptType','appCode','12509YgqlNj','3676hkkxiX','str','bool','map','COMMON','Filter\x20by\x20script\x20name','bff','8347330cIxlye','functionName','ENDPOINT','description','verbose','string','No\x20Backend\x20Function\x20scripts\x20found.','length','873662pEcMxx','50mpkHDG','47154888aiIpWw','Return\x20full\x20script\x20objects','name','240XyWZcO','type','3yLCUPs'];a35_0x416f=function(){return _0xf54280;};return a35_0x416f();}import{listBffScripts}from'../../core/api-client.js';export const bffList={'service':a35_0x3cb612(0xb7),'command':'list','description':a35_0x3cb612(0xab),'risk':'read','flags':[{'name':'type','type':a35_0x3cb612(0x9e),'description':'Script\x20type\x20filter','default':'ENDPOINT','enum':[a35_0x3cb612(0x9b),a35_0x3cb612(0xb5)]},{'name':a35_0x3cb612(0xa5),'type':'string','description':a35_0x3cb612(0xb6)},{'name':a35_0x3cb612(0x9d),'type':'boolean','description':a35_0x3cb612(0xa4)}],async 'execute'(_0x1a9169){const _0x30d173=a35_0x3cb612,_0xc4193=await listBffScripts(_0x1a9169[_0x30d173(0xaf)],_0x1a9169[_0x30d173(0xb2)](_0x30d173(0xa7)),{'scriptName':_0x1a9169[_0x30d173(0xb2)](_0x30d173(0xa5))||undefined}),_0x5ca426=_0x1a9169[_0x30d173(0xb3)](_0x30d173(0x9d));return{'ok':!![],'data':_0x5ca426?_0xc4193:_0xc4193[_0x30d173(0xb4)](_0x351d5d=>({'id':_0x351d5d['id'],'functionName':_0x351d5d[_0x30d173(0x9a)]??'','description':_0x351d5d[_0x30d173(0x9c)]||'(unnamed)','scriptType':_0x351d5d[_0x30d173(0xae)]})),'message':_0xc4193[_0x30d173(0xa0)]===0x0?_0x30d173(0x9f):undefined};}};
1
+ const a35_0x51eb15=a35_0x1361;(function(_0x548ac6,_0x37667d){const _0x50a94e=a35_0x1361,_0x573760=_0x548ac6();while(!![]){try{const _0x5f0ffd=parseInt(_0x50a94e(0x209))/0x1*(-parseInt(_0x50a94e(0x207))/0x2)+-parseInt(_0x50a94e(0x202))/0x3+parseInt(_0x50a94e(0x1f7))/0x4+-parseInt(_0x50a94e(0x1ff))/0x5*(-parseInt(_0x50a94e(0x1f8))/0x6)+-parseInt(_0x50a94e(0x208))/0x7*(parseInt(_0x50a94e(0x1fb))/0x8)+parseInt(_0x50a94e(0x1f4))/0x9+parseInt(_0x50a94e(0x1f2))/0xa;if(_0x5f0ffd===_0x37667d)break;else _0x573760['push'](_0x573760['shift']());}catch(_0x198235){_0x573760['push'](_0x573760['shift']());}}}(a35_0x2bd2,0xc832e));import{listBffScripts}from'../../core/api-client.js';function a35_0x2bd2(){const _0xed4447=['scriptType','21614670LfQzUX','List\x20Backend\x20Function\x20scripts','1388034BGVKEN','ENDPOINT','(unnamed)','3440404hOZRbZ','522WEFRbW','description','str','184OPmKsl','name','Script\x20type\x20filter','string','48235iYQGRO','Filter\x20by\x20script\x20name','verbose','1781028bjSQLK','No\x20Backend\x20Function\x20scripts\x20found.','COMMON','map','type','37300hAKHJc','445487jziuiN','61DeVCXd','read'];a35_0x2bd2=function(){return _0xed4447;};return a35_0x2bd2();}function a35_0x1361(_0x173ee4,_0x4a7bbd){_0x173ee4=_0x173ee4-0x1f1;const _0x2bd2cc=a35_0x2bd2();let _0x1361f0=_0x2bd2cc[_0x173ee4];return _0x1361f0;}export const bffList={'service':'bff','command':'list','description':a35_0x51eb15(0x1f3),'risk':a35_0x51eb15(0x20a),'flags':[{'name':a35_0x51eb15(0x206),'type':a35_0x51eb15(0x1fe),'description':a35_0x51eb15(0x1fd),'default':a35_0x51eb15(0x1f5),'enum':['ENDPOINT',a35_0x51eb15(0x204)]},{'name':a35_0x51eb15(0x1fc),'type':'string','description':a35_0x51eb15(0x200)},{'name':a35_0x51eb15(0x201),'type':'boolean','description':'Return\x20full\x20script\x20objects'}],async 'execute'(_0xcdeb3b){const _0x7f047f=a35_0x51eb15,_0x6109d4=await listBffScripts(_0xcdeb3b['appCode'],_0xcdeb3b[_0x7f047f(0x1fa)]('type'),{'scriptName':_0xcdeb3b[_0x7f047f(0x1fa)](_0x7f047f(0x1fc))||undefined}),_0x6c1f1c=_0xcdeb3b['bool'](_0x7f047f(0x201));return{'ok':!![],'data':_0x6c1f1c?_0x6109d4:_0x6109d4[_0x7f047f(0x205)](_0x45d33d=>({'id':_0x45d33d['id'],'functionName':_0x45d33d['functionName']??'','description':_0x45d33d[_0x7f047f(0x1f9)]||_0x7f047f(0x1f6),'scriptType':_0x45d33d[_0x7f047f(0x1f1)]})),'message':_0x6109d4['length']===0x0?_0x7f047f(0x203):undefined};}};
@@ -1 +1 @@
1
- const a36_0x19e680=a36_0x24a4;(function(_0x50d77f,_0x2c16f8){const _0x5588bc=a36_0x24a4,_0x4f3714=_0x50d77f();while(!![]){try{const _0x5eb577=-parseInt(_0x5588bc(0xb6))/0x1+-parseInt(_0x5588bc(0xcf))/0x2+parseInt(_0x5588bc(0xd1))/0x3*(-parseInt(_0x5588bc(0xd2))/0x4)+parseInt(_0x5588bc(0xc9))/0x5+-parseInt(_0x5588bc(0xc8))/0x6*(parseInt(_0x5588bc(0xe5))/0x7)+-parseInt(_0x5588bc(0xc6))/0x8*(parseInt(_0x5588bc(0xe1))/0x9)+parseInt(_0x5588bc(0xb0))/0xa;if(_0x5eb577===_0x2c16f8)break;else _0x4f3714['push'](_0x4f3714['shift']());}catch(_0x5c84ed){_0x4f3714['push'](_0x4f3714['shift']());}}}(a36_0x252a,0x47e8f));import{createInterface}from'node:readline';import{writeFile}from'node:fs/promises';import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';import{computeContentHash,computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';function a36_0x24a4(_0x5ddb46,_0x269e09){_0x5ddb46=_0x5ddb46-0xa4;const _0x252a95=a36_0x252a();let _0x24a45e=_0x252a95[_0x5ddb46];return _0x24a45e;}export const bffPull={'service':a36_0x19e680(0xd8),'command':a36_0x19e680(0xdf),'description':a36_0x19e680(0xa7),'risk':a36_0x19e680(0xca),'flags':[{'name':'type','type':a36_0x19e680(0xef),'description':a36_0x19e680(0xae),'enum':[a36_0x19e680(0xaf),a36_0x19e680(0xf0),a36_0x19e680(0xdc)]},{'name':a36_0x19e680(0xd4),'type':a36_0x19e680(0xe6),'description':a36_0x19e680(0xc0)}],async 'dryRun'(_0x49dfc2){const _0x55ba51=a36_0x19e680,_0x35be49=loadBffProjectConfig(_0x49dfc2[_0x55ba51(0xcc)]),_0x25e741=await readBffLockFile(_0x35be49[_0x55ba51(0xb2)]),{appLock:_0xac01ed}=ensureLockScope(_0x25e741??createEmptyBffLock(),_0x49dfc2[_0x55ba51(0xcc)],_0x35be49[_0x55ba51(0xc2)],_0x55ba51(0xdf)),_0x506aa2=normalizeBffType(_0x49dfc2['str'](_0x55ba51(0xd6)))??undefined,_0x38ffd4=buildDatasetCodeToAliasMap(_0x49dfc2[_0x55ba51(0xb1)],_0x49dfc2['appCode']),[_0x5f1e33,_0x40f5d9]=await Promise[_0x55ba51(0xac)]([listBffScripts(_0x49dfc2['appCode'],_0x506aa2),getBffScriptStatistics(_0x49dfc2[_0x55ba51(0xcc)])]),_0x2169b3=createHookLocationMap(_0x40f5d9),_0x22d155=[];for(const _0x58aada of _0x5f1e33){const _0x35766c=resolveRemoteScriptTarget(_0x35be49,_0x58aada,_0x2169b3,_0xac01ed[_0x55ba51(0xc7)],_0x38ffd4);if(!_0x35766c){_0x22d155[_0x55ba51(0xdb)]({'scriptType':_0x58aada[_0x55ba51(0xaa)],'functionName':_0x58aada[_0x55ba51(0xe9)]??'','status':_0x55ba51(0xe2),'reason':_0x55ba51(0xbb)});continue;}const _0x1290bd=_0xac01ed['functions'][_0x35766c[_0x55ba51(0xe7)]],_0xdf22be=_0x58aada['scriptContent']!=null?computeContentHash(_0x58aada[_0x55ba51(0xc1)]):undefined,_0x243c0a=await hasUnsyncedLocalChanges(_0x35766c[_0x55ba51(0xba)],_0x1290bd,_0xdf22be);_0x22d155[_0x55ba51(0xdb)]({'lockKey':_0x35766c[_0x55ba51(0xe7)],'filePath':_0x35766c[_0x55ba51(0xba)],'remoteId':_0x58aada['id']??null,'status':_0x243c0a?_0x55ba51(0xee):_0x55ba51(0xce)});}return{'method':_0x55ba51(0xa8),'url':_0x55ba51(0xd5)+_0x49dfc2['appCode']+(_0x506aa2?'&type='+_0x506aa2:''),'body':{'appCode':_0x49dfc2[_0x55ba51(0xcc)],'filterType':_0x506aa2??null,'files':_0x22d155},'description':_0x55ba51(0xbd)+_0x22d155['length']+'\x20remote\x20Backend\x20Function\x20script(s)\x20for\x20pull'};},async 'execute'(_0x220ff7){const _0x29b07b=a36_0x19e680,_0x6d1fcd=loadBffProjectConfig(_0x220ff7[_0x29b07b(0xcc)]),_0x1f3bd4=await readBffLockFile(_0x6d1fcd[_0x29b07b(0xb2)]),{lockData:_0x3a7aef,appLock:_0x527cc5}=ensureLockScope(_0x1f3bd4??createEmptyBffLock(),_0x220ff7['appCode'],_0x6d1fcd['scriptsRoot'],'pull'),_0x2f4596=normalizeBffType(_0x220ff7['str']('type'))??undefined;if(_0x220ff7[_0x29b07b(0xad)](_0x29b07b(0xd6))&&!_0x2f4596)throw CliErrors[_0x29b07b(0xd3)](_0x29b07b(0xc4));const [_0x397f3b,_0x114bd0]=await Promise[_0x29b07b(0xac)]([listBffScripts(_0x220ff7[_0x29b07b(0xcc)],_0x2f4596),getBffScriptStatistics(_0x220ff7['appCode'])]);if(_0x397f3b[_0x29b07b(0xa4)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x29b07b(0xc3)};const _0x393dbb=_0x220ff7[_0x29b07b(0xe3)](_0x29b07b(0xd4));if(_0x393dbb&&!_0x220ff7[_0x29b07b(0xa5)]){const _0x28cf67=await confirmForce();if(!_0x28cf67)throw CliErrors[_0x29b07b(0xbc)](_0x29b07b(0xb5));}if(_0x393dbb&&_0x220ff7[_0x29b07b(0xa5)]){}const _0x25bc30=buildDatasetCodeToAliasMap(_0x220ff7[_0x29b07b(0xb1)],_0x220ff7['appCode']),_0xe60c46=createHookLocationMap(_0x114bd0),_0x32fabc=JSON[_0x29b07b(0xde)](JSON[_0x29b07b(0xd9)](_0x3a7aef)),_0x597a3b=_0x220ff7[_0x29b07b(0xcc)],_0x569598=_0x32fabc[_0x29b07b(0xd7)][_0x597a3b];if(!_0x569598)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x597a3b+_0x29b07b(0xf1));const _0x54c84a=[],_0x2e94b7=[],_0x350438=[];for(const _0x42fd2c of _0x397f3b){const _0x13947c=resolveRemoteScriptTarget(_0x6d1fcd,_0x42fd2c,_0xe60c46,_0x527cc5[_0x29b07b(0xc7)],_0x25bc30);if(!_0x13947c){_0x2e94b7[_0x29b07b(0xdb)]({'lockKey':_0x42fd2c[_0x29b07b(0xaa)]+'/'+_0x42fd2c['functionName'],'reason':_0x29b07b(0xbb)});continue;}const _0x15c48a=_0x527cc5['functions'][_0x13947c['lockKey']];try{if(!_0x42fd2c['id'])throw new Error(_0x29b07b(0xdd));if(_0x42fd2c[_0x29b07b(0xc1)]==null)throw new Error(_0x29b07b(0xe4));const _0x25260a=_0x42fd2c[_0x29b07b(0xc1)],_0x5c7478=computeContentHash(_0x25260a);if(!_0x393dbb){const _0x46a1f5=await hasUnsyncedLocalChanges(_0x13947c['filePath'],_0x15c48a,_0x5c7478);if(_0x46a1f5){_0x2e94b7[_0x29b07b(0xdb)]({'lockKey':_0x13947c[_0x29b07b(0xe7)],'reason':_0x29b07b(0xab)});continue;}}await ensureParentDirectory(_0x13947c[_0x29b07b(0xba)]),await writeFile(_0x13947c['filePath'],_0x25260a,_0x29b07b(0xed));const _0x1bc252={'hash':_0x5c7478,'remoteId':_0x42fd2c['id'],'version':_0x42fd2c[_0x29b07b(0xe0)]};_0x13947c[_0x29b07b(0xd6)]===_0x29b07b(0xdc)&&_0x13947c[_0x29b07b(0xec)]&&(_0x1bc252[_0x29b07b(0xb8)]=_0x13947c[_0x29b07b(0xec)][_0x29b07b(0xb8)],_0x1bc252[_0x29b07b(0xb9)]=_0x13947c[_0x29b07b(0xec)][_0x29b07b(0xb9)],_0x1bc252['operationType']=_0x13947c[_0x29b07b(0xec)]['operationType'],_0x1bc252[_0x29b07b(0xa9)]=_0x13947c[_0x29b07b(0xec)][_0x29b07b(0xa9)]),_0x569598['functions'][_0x13947c[_0x29b07b(0xe7)]]=_0x1bc252,_0x54c84a[_0x29b07b(0xdb)]({'lockKey':_0x13947c['lockKey'],'remoteId':_0x42fd2c['id']});}catch(_0x2ba0e7){_0x350438[_0x29b07b(0xdb)]({'lockKey':_0x13947c[_0x29b07b(0xe7)],'error':_0x2ba0e7 instanceof Error?_0x2ba0e7[_0x29b07b(0xe8)]:String(_0x2ba0e7)});}}return _0x569598[_0x29b07b(0xc5)]=new Date()[_0x29b07b(0xa6)](),await writeBffLockFile(_0x6d1fcd[_0x29b07b(0xb2)],_0x32fabc),{'ok':_0x350438[_0x29b07b(0xa4)]===0x0,'data':{'pulled':_0x54c84a,'skipped':_0x2e94b7,'failed':_0x350438},'message':'Pull\x20complete:\x20'+_0x54c84a[_0x29b07b(0xa4)]+_0x29b07b(0xd0)+_0x2e94b7[_0x29b07b(0xa4)]+_0x29b07b(0xb7)+_0x350438[_0x29b07b(0xa4)]+_0x29b07b(0xf2)};}};function a36_0x252a(){const _0x27ea40=['\x20failed','length','nonInteractive','toISOString','Pull\x20remote\x20Backend\x20Function\x20scripts\x20to\x20local','GET','functionNode','scriptType','local\x20unsynced\x20changes','all','str','Pull\x20only\x20this\x20script\x20type','COMMON','11513220BWQJTE','apiDir','lockFilePath','includes','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','Force\x20pull\x20cancelled.','8322OvPNaV','\x20skipped,\x20','alias','datasetCode','filePath','unresolvable\x20target\x20path','cancelled','Would\x20inspect\x20','trim','stdin','Force\x20overwrite\x20local\x20unsynced\x20changes','scriptContent','scriptsRoot','No\x20remote\x20Backend\x20Function\x20scripts\x20found.','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','lastSync','25224WIxjph','functions','66LOyVdF','2186640vgvPHr','read','question','appCode','hash','would_pull','1072250SycGou','\x20pulled,\x20','57AnJMVB','67096ufXLcd','validation','force','/api/management/library/scripts/list?appCode=','type','apps','bff','stringify','map','push','HOOK','Remote\x20script\x20missing\x20id.','parse','pull','version','801tUEutK','skipped','bool','Remote\x20script\x20missing\x20content.','95669MfaabA','boolean','lockKey','message','functionName','yes','toLowerCase','hookLocation','utf8','conflict','string','ENDPOINT','\x22\x20not\x20found\x20after\x20ensureLockScope.'];a36_0x252a=function(){return _0x27ea40;};return a36_0x252a();}async function hasUnsyncedLocalChanges(_0x3b2507,_0x4d71a5,_0x370532){const _0x50f48b=a36_0x19e680;if(!await fileExists(_0x3b2507))return![];const _0x5aef32=await computeFileHash(_0x3b2507);if(!_0x4d71a5)return _0x370532?_0x5aef32!==_0x370532:!![];return _0x5aef32!==_0x4d71a5[_0x50f48b(0xcd)];}function buildDatasetCodeToAliasMap(_0x84477c,_0x4599ea){const _0x3bf998=a36_0x19e680,_0x365234=loadAliasMap(_0x84477c,undefined,resolveApiFilePath(_0x84477c,_0x4599ea));return new Map(_0x365234[_0x3bf998(0xda)](_0x1e969d=>[_0x1e969d['datasetCode'],_0x1e969d[_0x3bf998(0xb8)]]));}async function confirmForce(){const _0x2bd34c=a36_0x19e680,_0x1b20e0=createInterface({'input':process[_0x2bd34c(0xbf)],'output':process['stderr']}),_0x5f0da1=await new Promise(_0x16dd3c=>{const _0x408ab6=_0x2bd34c;_0x1b20e0[_0x408ab6(0xcb)](_0x408ab6(0xb4),_0x16dd3c);});return _0x1b20e0['close'](),['y',_0x2bd34c(0xea)][_0x2bd34c(0xb3)](_0x5f0da1[_0x2bd34c(0xbe)]()[_0x2bd34c(0xeb)]());}
1
+ const a36_0x27256b=a36_0x2539;(function(_0x2e33c5,_0x523a79){const _0x4c433d=a36_0x2539,_0x237fc0=_0x2e33c5();while(!![]){try{const _0x3260e4=-parseInt(_0x4c433d(0x199))/0x1+parseInt(_0x4c433d(0x177))/0x2+-parseInt(_0x4c433d(0x1b1))/0x3*(-parseInt(_0x4c433d(0x186))/0x4)+-parseInt(_0x4c433d(0x18c))/0x5+-parseInt(_0x4c433d(0x180))/0x6+parseInt(_0x4c433d(0x17e))/0x7+parseInt(_0x4c433d(0x18d))/0x8;if(_0x3260e4===_0x523a79)break;else _0x237fc0['push'](_0x237fc0['shift']());}catch(_0x5ce540){_0x237fc0['push'](_0x237fc0['shift']());}}}(a36_0x668d,0x2e2d8));function a36_0x2539(_0x5192ab,_0x365a20){_0x5192ab=_0x5192ab-0x16f;const _0x668dad=a36_0x668d();let _0x25397f=_0x668dad[_0x5192ab];return _0x25397f;}import{createInterface}from'node:readline';import{writeFile}from'node:fs/promises';import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';import{computeContentHash,computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';export const bffPull={'service':a36_0x27256b(0x172),'command':a36_0x27256b(0x1b2),'description':a36_0x27256b(0x190),'risk':'read','flags':[{'name':a36_0x27256b(0x19b),'type':a36_0x27256b(0x1a1),'description':'Pull\x20only\x20this\x20script\x20type','enum':['COMMON',a36_0x27256b(0x1aa),'HOOK']},{'name':a36_0x27256b(0x19c),'type':'boolean','description':'Force\x20overwrite\x20local\x20unsynced\x20changes'}],async 'dryRun'(_0x50a69f){const _0x434023=a36_0x27256b,_0x5680fb=loadBffProjectConfig(_0x50a69f[_0x434023(0x185)]),_0x4a3ab2=await readBffLockFile(_0x5680fb['lockFilePath']),{appLock:_0x3311ff}=ensureLockScope(_0x4a3ab2??createEmptyBffLock(),_0x50a69f[_0x434023(0x185)],_0x5680fb[_0x434023(0x1a9)],_0x434023(0x1b2)),_0x1f527d=normalizeBffType(_0x50a69f[_0x434023(0x18b)](_0x434023(0x19b)))??undefined,_0x5d1120=buildDatasetCodeToAliasMap(_0x50a69f[_0x434023(0x17b)],_0x50a69f['appCode']),[_0x4fe40e,_0x4d1bf8]=await Promise[_0x434023(0x1ab)]([listBffScripts(_0x50a69f[_0x434023(0x185)],_0x1f527d),getBffScriptStatistics(_0x50a69f[_0x434023(0x185)])]),_0xa52621=createHookLocationMap(_0x4d1bf8),_0x272a7f=[];for(const _0xe676bb of _0x4fe40e){const _0x5bfa92=resolveRemoteScriptTarget(_0x5680fb,_0xe676bb,_0xa52621,_0x3311ff[_0x434023(0x182)],_0x5d1120);if(!_0x5bfa92){_0x272a7f[_0x434023(0x195)]({'scriptType':_0xe676bb[_0x434023(0x171)],'functionName':_0xe676bb[_0x434023(0x1ad)]??'','status':_0x434023(0x194),'reason':'unresolvable\x20target\x20path'});continue;}const _0x338b8d=_0x3311ff[_0x434023(0x182)][_0x5bfa92[_0x434023(0x1a0)]],_0x1ab99c=_0xe676bb[_0x434023(0x178)]!=null?computeContentHash(_0xe676bb[_0x434023(0x178)]):undefined,_0x357303=await hasUnsyncedLocalChanges(_0x5bfa92[_0x434023(0x1a5)],_0x338b8d,_0x1ab99c);_0x272a7f[_0x434023(0x195)]({'lockKey':_0x5bfa92['lockKey'],'filePath':_0x5bfa92['filePath'],'remoteId':_0xe676bb['id']??null,'status':_0x357303?_0x434023(0x175):_0x434023(0x18e)});}return{'method':'GET','url':_0x434023(0x198)+_0x50a69f[_0x434023(0x185)]+(_0x1f527d?_0x434023(0x1a4)+_0x1f527d:''),'body':{'appCode':_0x50a69f[_0x434023(0x185)],'filterType':_0x1f527d??null,'files':_0x272a7f},'description':_0x434023(0x17c)+_0x272a7f[_0x434023(0x18a)]+_0x434023(0x1b4)};},async 'execute'(_0x527dc5){const _0x58a18f=a36_0x27256b,_0x54d6b0=loadBffProjectConfig(_0x527dc5[_0x58a18f(0x185)]),_0x1ea622=await readBffLockFile(_0x54d6b0[_0x58a18f(0x176)]),{lockData:_0x39d888,appLock:_0x7cb025}=ensureLockScope(_0x1ea622??createEmptyBffLock(),_0x527dc5[_0x58a18f(0x185)],_0x54d6b0[_0x58a18f(0x1a9)],_0x58a18f(0x1b2)),_0x943dc4=normalizeBffType(_0x527dc5[_0x58a18f(0x18b)](_0x58a18f(0x19b)))??undefined;if(_0x527dc5[_0x58a18f(0x18b)](_0x58a18f(0x19b))&&!_0x943dc4)throw CliErrors['validation'](_0x58a18f(0x18f));const [_0xcefac4,_0x2b2421]=await Promise['all']([listBffScripts(_0x527dc5[_0x58a18f(0x185)],_0x943dc4),getBffScriptStatistics(_0x527dc5[_0x58a18f(0x185)])]);if(_0xcefac4[_0x58a18f(0x18a)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x58a18f(0x1ac)};const _0x21cb57=_0x527dc5['bool']('force');if(_0x21cb57&&!_0x527dc5[_0x58a18f(0x17a)]){const _0x2dbabc=await confirmForce();if(!_0x2dbabc)throw CliErrors[_0x58a18f(0x17f)](_0x58a18f(0x189));}if(_0x21cb57&&_0x527dc5['nonInteractive']){}const _0x10d886=buildDatasetCodeToAliasMap(_0x527dc5[_0x58a18f(0x17b)],_0x527dc5[_0x58a18f(0x185)]),_0x1c62f9=createHookLocationMap(_0x2b2421),_0x10442c=JSON['parse'](JSON[_0x58a18f(0x170)](_0x39d888)),_0x175258=_0x527dc5[_0x58a18f(0x185)],_0xd755e5=_0x10442c['apps'][_0x175258];if(!_0xd755e5)throw new Error(_0x58a18f(0x174)+_0x175258+_0x58a18f(0x19e));const _0x6b57ee=[],_0x324fcc=[],_0x4416d5=[];for(const _0x12ae20 of _0xcefac4){const _0x42576e=resolveRemoteScriptTarget(_0x54d6b0,_0x12ae20,_0x1c62f9,_0x7cb025['functions'],_0x10d886);if(!_0x42576e){_0x324fcc[_0x58a18f(0x195)]({'lockKey':_0x12ae20[_0x58a18f(0x171)]+'/'+_0x12ae20[_0x58a18f(0x1ad)],'reason':_0x58a18f(0x19a)});continue;}const _0x186a33=_0x7cb025[_0x58a18f(0x182)][_0x42576e['lockKey']];try{if(!_0x12ae20['id'])throw new Error(_0x58a18f(0x1a6));if(_0x12ae20[_0x58a18f(0x178)]==null)throw new Error(_0x58a18f(0x1af));const _0x55f512=_0x12ae20[_0x58a18f(0x178)],_0x474234=computeContentHash(_0x55f512);if(!_0x21cb57){const _0x56b169=await hasUnsyncedLocalChanges(_0x42576e[_0x58a18f(0x1a5)],_0x186a33,_0x474234);if(_0x56b169){_0x324fcc[_0x58a18f(0x195)]({'lockKey':_0x42576e[_0x58a18f(0x1a0)],'reason':'local\x20unsynced\x20changes'});continue;}}await ensureParentDirectory(_0x42576e['filePath']),await writeFile(_0x42576e[_0x58a18f(0x1a5)],_0x55f512,_0x58a18f(0x1ae));const _0x4758e7={'hash':_0x474234,'remoteId':_0x12ae20['id'],'version':_0x12ae20[_0x58a18f(0x193)]};_0x42576e['type']===_0x58a18f(0x188)&&_0x42576e['hookLocation']&&(_0x4758e7[_0x58a18f(0x1b3)]=_0x42576e[_0x58a18f(0x173)][_0x58a18f(0x1b3)],_0x4758e7[_0x58a18f(0x192)]=_0x42576e[_0x58a18f(0x173)][_0x58a18f(0x192)],_0x4758e7['operationType']=_0x42576e['hookLocation']['operationType'],_0x4758e7[_0x58a18f(0x187)]=_0x42576e[_0x58a18f(0x173)][_0x58a18f(0x187)]),_0xd755e5[_0x58a18f(0x182)][_0x42576e[_0x58a18f(0x1a0)]]=_0x4758e7,_0x6b57ee['push']({'lockKey':_0x42576e[_0x58a18f(0x1a0)],'remoteId':_0x12ae20['id']});}catch(_0x56a43a){_0x4416d5['push']({'lockKey':_0x42576e[_0x58a18f(0x1a0)],'error':_0x56a43a instanceof Error?_0x56a43a[_0x58a18f(0x179)]:String(_0x56a43a)});}}return _0xd755e5[_0x58a18f(0x19d)]=new Date()['toISOString'](),await writeBffLockFile(_0x54d6b0[_0x58a18f(0x176)],_0x10442c),{'ok':_0x4416d5[_0x58a18f(0x18a)]===0x0,'data':{'pulled':_0x6b57ee,'skipped':_0x324fcc,'failed':_0x4416d5},'message':_0x58a18f(0x17d)+_0x6b57ee[_0x58a18f(0x18a)]+_0x58a18f(0x1a8)+_0x324fcc[_0x58a18f(0x18a)]+_0x58a18f(0x19f)+_0x4416d5['length']+_0x58a18f(0x197)};}};async function hasUnsyncedLocalChanges(_0x5862bf,_0x229a2e,_0x698e07){const _0x32a88d=a36_0x27256b;if(!await fileExists(_0x5862bf))return![];const _0x233406=await computeFileHash(_0x5862bf);if(!_0x229a2e)return _0x698e07?_0x233406!==_0x698e07:!![];return _0x233406!==_0x229a2e[_0x32a88d(0x181)];}function buildDatasetCodeToAliasMap(_0x3dfa42,_0x37f032){const _0x1db170=a36_0x27256b,_0x2cdf0d=loadAliasMap(_0x3dfa42,undefined,resolveApiFilePath(_0x3dfa42,_0x37f032));return new Map(_0x2cdf0d[_0x1db170(0x1a7)](_0x11220a=>[_0x11220a[_0x1db170(0x192)],_0x11220a['alias']]));}function a36_0x668d(){const _0x5216e4=['datasetCode','version','skipped','push','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','\x20failed','/api/management/library/scripts/list?appCode=','360196ZbasHo','unresolvable\x20target\x20path','type','force','lastSync','\x22\x20not\x20found\x20after\x20ensureLockScope.','\x20skipped,\x20','lockKey','string','includes','stderr','&type=','filePath','Remote\x20script\x20missing\x20id.','map','\x20pulled,\x20','scriptsRoot','ENDPOINT','all','No\x20remote\x20Backend\x20Function\x20scripts\x20found.','functionName','utf8','Remote\x20script\x20missing\x20content.','stdin','21165NxkiGs','pull','alias','\x20remote\x20Backend\x20Function\x20script(s)\x20for\x20pull','yes','stringify','scriptType','bff','hookLocation','Lock\x20scope\x20for\x20app\x20\x22','conflict','lockFilePath','239324dSbBpu','scriptContent','message','nonInteractive','apiDir','Would\x20inspect\x20','Pull\x20complete:\x20','183743StPyvm','cancelled','1762776UvBlAQ','hash','functions','trim','question','appCode','4lsbTWE','functionNode','HOOK','Force\x20pull\x20cancelled.','length','str','250475lADlpq','5922120uuLDqh','would_pull','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','Pull\x20remote\x20Backend\x20Function\x20scripts\x20to\x20local','close'];a36_0x668d=function(){return _0x5216e4;};return a36_0x668d();}async function confirmForce(){const _0x42b531=a36_0x27256b,_0x19d09d=createInterface({'input':process[_0x42b531(0x1b0)],'output':process[_0x42b531(0x1a3)]}),_0x2e8fb5=await new Promise(_0x380dca=>{const _0x327ceb=_0x42b531;_0x19d09d[_0x327ceb(0x184)](_0x327ceb(0x196),_0x380dca);});return _0x19d09d[_0x42b531(0x191)](),['y',_0x42b531(0x16f)][_0x42b531(0x1a2)](_0x2e8fb5[_0x42b531(0x183)]()['toLowerCase']());}
@@ -1 +1 @@
1
- function a37_0x1bc2(_0x330f1b,_0x2d5012){_0x330f1b=_0x330f1b-0x7e;const _0x40ec6c=a37_0x40ec();let _0x1bc276=_0x40ec6c[_0x330f1b];return _0x1bc276;}const a37_0x365bb5=a37_0x1bc2;(function(_0x1b9fc0,_0x12edc9){const _0x29de35=a37_0x1bc2,_0x256b0f=_0x1b9fc0();while(!![]){try{const _0x52f12a=parseInt(_0x29de35(0x97))/0x1*(parseInt(_0x29de35(0xcd))/0x2)+-parseInt(_0x29de35(0x7f))/0x3*(parseInt(_0x29de35(0x90))/0x4)+-parseInt(_0x29de35(0xc4))/0x5*(-parseInt(_0x29de35(0x93))/0x6)+-parseInt(_0x29de35(0xd2))/0x7*(parseInt(_0x29de35(0xb6))/0x8)+-parseInt(_0x29de35(0xba))/0x9+-parseInt(_0x29de35(0xc5))/0xa+parseInt(_0x29de35(0xae))/0xb*(parseInt(_0x29de35(0x9f))/0xc);if(_0x52f12a===_0x12edc9)break;else _0x256b0f['push'](_0x256b0f['shift']());}catch(_0x26765b){_0x256b0f['push'](_0x256b0f['shift']());}}}(a37_0x40ec,0xd9c01));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';function a37_0x40ec(){const _0x2f6a59=['string','some','cleared','bool','remoteId','\x20uploaded,\x20','runtime\x20cache\x20not\x20needed','filter','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','1412rGPUIr','version','runtime\x20cache\x20cleared','2262gxxznI','message','datasetCode','create','5OQgPGh','str','datasetCodeToDataset','Run\x20`','description','\x22\x20not\x20found\x20after\x20ensureLockScope.','appCode',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','45451188rKnrXm','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','type','Runtime\x20script\x20cache\x20cleared.','map','name','aliasToDatasetCode','ENDPOINT','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','update','HOOK','Force\x20push\x20ignoring\x20hash\x20protection','scriptsRoot','Incomplete\x20HOOK\x20path:\x20','lastSync','11gjOxOj','filePath','bff','status','Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','COMMON','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','stringify','120vktoRZ','apps','Cannot\x20resolve\x20dataset\x20for\x20\x22','utf8','15841341mRwQPM','Lock\x20scope\x20for\x20app\x20\x22','Local\x20function\x20not\x20found:\x20','\x22.\x20','alias','would_push','attempted','functions','unchanged','\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','15590zCHDPl','15599340WLHCgB','validation','script','Push\x20complete:\x20','lockKey','functionNode','POST','push','250906OAFHWn','length','operationType','every','has','276045yYirYN','boolean','6687RvYfjA','get','toISOString','\x20failed,\x20','Would\x20inspect\x20','force','join','lockFilePath'];a37_0x40ec=function(){return _0x2f6a59;};return a37_0x40ec();}import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a37_0x365bb5(0xb0),'command':a37_0x365bb5(0xcc),'description':a37_0x365bb5(0xb2),'risk':'write','flags':[{'name':a37_0x365bb5(0xa1),'type':a37_0x365bb5(0x87),'description':'Push\x20only\x20this\x20script\x20type','enum':[a37_0x365bb5(0xb3),a37_0x365bb5(0xa6),a37_0x365bb5(0xa9)]},{'name':a37_0x365bb5(0xa4),'type':a37_0x365bb5(0x87),'description':a37_0x365bb5(0xa0)},{'name':'force','type':a37_0x365bb5(0x7e),'description':a37_0x365bb5(0xaa)}],async 'dryRun'(_0x3a5324){const _0x3cb7e2=a37_0x365bb5,_0x108a7f=loadBffProjectConfig(_0x3a5324['appCode']),_0x46fe0f=await readBffLockFile(_0x108a7f['lockFilePath']),{appLock:_0xc91511}=ensureLockScope(_0x46fe0f??createEmptyBffLock(),_0x3a5324['appCode'],_0x108a7f[_0x3cb7e2(0xab)],_0x3cb7e2(0xcc)),_0x1923e5=await getTargetFunctions(_0x108a7f,_0x3a5324),_0x496907=_0x3a5324[_0x3cb7e2(0x8a)](_0x3cb7e2(0x84)),_0x365990=[];for(const _0x483cf8 of _0x1923e5){const _0x39b8de=await computeFileHash(_0x483cf8[_0x3cb7e2(0xaf)]),_0x53e171=_0xc91511[_0x3cb7e2(0xc1)][_0x483cf8['lockKey']],_0xff71fe=!!_0x53e171&&_0x53e171['hash']===_0x39b8de;_0x365990['push']({'lockKey':_0x483cf8[_0x3cb7e2(0xc9)],'filePath':_0x483cf8[_0x3cb7e2(0xaf)],'remoteId':_0x53e171?.[_0x3cb7e2(0x8b)]??null,'mode':_0x53e171?.[_0x3cb7e2(0x8b)]?_0x3cb7e2(0xa8):_0x3cb7e2(0x96),'status':!_0x496907&&_0xff71fe?_0x3cb7e2(0xc2):_0x3cb7e2(0xbf)});}return{'method':_0x3cb7e2(0xcb),'url':'/api/management/library/scripts/save','body':{'appCode':_0x3a5324['appCode'],'force':_0x496907,'files':_0x365990,'cacheClearAtRuntime':_0x365990[_0x3cb7e2(0x88)](_0x11d9ff=>_0x11d9ff[_0x3cb7e2(0xb1)]===_0x3cb7e2(0xbf)),'cacheClearAtRuntimeTimes':_0x365990[_0x3cb7e2(0x88)](_0x562aa8=>_0x562aa8['status']===_0x3cb7e2(0xbf))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x3cb7e2(0x83)+_0x365990[_0x3cb7e2(0xce)]+_0x3cb7e2(0xc3)};},async 'execute'(_0x160636){const _0x22049c=a37_0x365bb5,_0x3b42a2=loadBffProjectConfig(_0x160636['appCode']),_0x3ab899=await readBffLockFile(_0x3b42a2[_0x22049c(0x86)]),{lockData:_0x48d50b,appLock:_0x2079e3}=ensureLockScope(_0x3ab899??createEmptyBffLock(),_0x160636['appCode'],_0x3b42a2[_0x22049c(0xab)],'push'),_0x44d9e9=await getTargetFunctions(_0x3b42a2,_0x160636);if(_0x44d9e9[_0x22049c(0xce)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':'No\x20local\x20Backend\x20Function\x20scripts\x20found.'};const _0x4fbf56=_0x160636[_0x22049c(0x8a)](_0x22049c(0x84)),_0x4e540f=JSON['parse'](JSON[_0x22049c(0xb5)](_0x48d50b)),_0x45736c=_0x4e540f[_0x22049c(0xb7)][_0x160636[_0x22049c(0x9d)]];if(!_0x45736c)throw new Error(_0x22049c(0xbb)+_0x160636['appCode']+_0x22049c(0x9c));const _0x500b2f=await buildHookMaps(_0x160636[_0x22049c(0x9d)],_0x160636['apiDir'],_0x44d9e9,_0x45736c),_0xa1e2c0=[],_0x592203=[],_0xc43e6a=[];for(const _0x5d9155 of _0x44d9e9){const _0x2c02f8=await computeFileHash(_0x5d9155[_0x22049c(0xaf)]),_0x1a7076=_0x45736c[_0x22049c(0xc1)][_0x5d9155[_0x22049c(0xc9)]];if(!_0x4fbf56&&_0x1a7076&&_0x1a7076['hash']===_0x2c02f8){_0x592203['push']({'lockKey':_0x5d9155['lockKey'],'reason':_0x22049c(0xc2)});continue;}try{await uploadSingleFunction(_0x160636['appCode'],_0x5d9155,_0x45736c,_0x500b2f);const _0x1e1f75=_0x45736c[_0x22049c(0xc1)][_0x5d9155[_0x22049c(0xc9)]];_0xa1e2c0[_0x22049c(0xcc)]({'lockKey':_0x5d9155[_0x22049c(0xc9)],'remoteId':_0x1e1f75?.[_0x22049c(0x8b)]??0x0});}catch(_0x3fca56){_0xc43e6a[_0x22049c(0xcc)]({'lockKey':_0x5d9155[_0x22049c(0xc9)],'error':_0x3fca56 instanceof Error?_0x3fca56[_0x22049c(0x94)]:String(_0x3fca56)});}}_0x45736c[_0x22049c(0xad)]=new Date()[_0x22049c(0x81)](),await writeBffLockFile(_0x3b42a2[_0x22049c(0x86)],_0x4e540f),await waitForUploadedLockEntries(_0x3b42a2[_0x22049c(0x86)],_0x160636[_0x22049c(0x9d)],_0xa1e2c0[_0x22049c(0xa3)](_0x38143c=>_0x38143c['lockKey']));let _0x4b0cef={'attempted':![],'cleared':![]};if(_0xa1e2c0[_0x22049c(0xce)]>0x0)try{let _0x5500c2='';for(let _0x13707b=0x0;_0x13707b<CACHE_CLEAR_ATTEMPTS;_0x13707b+=0x1){_0x5500c2=await clearBffScriptCache(),_0x13707b<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x4b0cef={'attempted':!![],'cleared':!![],'message':_0x5500c2||_0x22049c(0xa2)};}catch(_0x28fbe6){_0x4b0cef={'attempted':!![],'cleared':![],'error':_0x28fbe6 instanceof Error?_0x28fbe6[_0x22049c(0x94)]:String(_0x28fbe6)};}const _0x839f6c=_0xc43e6a['length']===0x0&&(_0x4b0cef[_0x22049c(0xc0)]?_0x4b0cef[_0x22049c(0x89)]:!![]),_0x764f2e=_0x4b0cef[_0x22049c(0xc0)]?_0x4b0cef[_0x22049c(0x89)]?_0x22049c(0x92):'runtime\x20cache\x20clear\x20failed':_0x22049c(0x8d);return{'ok':_0x839f6c,'data':{'uploaded':_0xa1e2c0,'skipped':_0x592203,'failed':_0xc43e6a,'cacheClear':_0x4b0cef},'message':_0x22049c(0xc8)+_0xa1e2c0[_0x22049c(0xce)]+_0x22049c(0x8c)+_0x592203['length']+'\x20skipped,\x20'+_0xc43e6a['length']+_0x22049c(0x82)+_0x764f2e};}};async function getTargetFunctions(_0x3b2b2f,_0x3ddff1){const _0x504d2b=a37_0x365bb5,_0x571ef1=_0x3ddff1[_0x504d2b(0x98)]('type'),_0x42add5=_0x3ddff1[_0x504d2b(0x98)]('name'),_0x97d0de=normalizeBffType(_0x571ef1)??undefined;if(_0x42add5&&!_0x97d0de)throw CliErrors[_0x504d2b(0xc6)](_0x504d2b(0xb4));const _0xdb8b0e=await scanLocalBffFunctions(_0x3b2b2f,_0x97d0de);if(_0x42add5){const _0x18d96e=_0xdb8b0e[_0x504d2b(0x8e)](_0x9d50f=>_0x9d50f[_0x504d2b(0xa4)]===_0x42add5);if(_0x18d96e[_0x504d2b(0xce)]===0x0)throw CliErrors[_0x504d2b(0xc6)](_0x504d2b(0xbc)+_0x97d0de+'/'+_0x42add5);return _0x18d96e;}return _0xdb8b0e;}async function buildHookMaps(_0x546a99,_0xb8fe3a,_0x4a00ae,_0x478d0b){const _0x2f10a0=a37_0x365bb5,_0x45ba59=_0x4a00ae['some'](_0xb3f576=>_0xb3f576[_0x2f10a0(0xa1)]===_0x2f10a0(0xa9));if(!_0x45ba59)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x5e7cef=loadAliasMap(_0xb8fe3a,undefined,resolveApiFilePath(_0xb8fe3a,_0x546a99)),_0x1080c8=new Map(_0x5e7cef[_0x2f10a0(0xa3)](_0x407ef0=>[_0x407ef0[_0x2f10a0(0xbe)],_0x407ef0[_0x2f10a0(0x95)]]));for(const _0x193de4 of Object['values'](_0x478d0b[_0x2f10a0(0xc1)])){_0x193de4[_0x2f10a0(0xbe)]&&_0x193de4[_0x2f10a0(0x95)]&&!_0x1080c8[_0x2f10a0(0xd1)](_0x193de4[_0x2f10a0(0xbe)])&&_0x1080c8['set'](_0x193de4[_0x2f10a0(0xbe)],_0x193de4[_0x2f10a0(0x95)]);}const _0x5193d9=await listDatasets(_0x546a99),_0x2867ed=new Map(_0x5193d9['map'](_0x57a1ad=>[_0x57a1ad['code'],_0x57a1ad]));return{'aliasToDatasetCode':_0x1080c8,'datasetCodeToDataset':_0x2867ed};}async function uploadSingleFunction(_0x1b7378,_0x166cc7,_0x5ba882,_0x5de211){const _0x1a4b2f=a37_0x365bb5,_0x3165e4=await readFile(_0x166cc7[_0x1a4b2f(0xaf)],_0x1a4b2f(0xb9)),_0x202f2b=await computeFileHash(_0x166cc7[_0x1a4b2f(0xaf)]),_0x50a465=_0x5ba882[_0x1a4b2f(0xc1)][_0x166cc7[_0x1a4b2f(0xc9)]];if(_0x50a465?.[_0x1a4b2f(0x8b)]&&_0x50a465[_0x1a4b2f(0x91)]==null)throw CliErrors[_0x1a4b2f(0xc6)](_0x166cc7['lockKey']+_0x1a4b2f(0x9e));let _0x454261=extractScriptDescription(_0x3165e4);if(!_0x454261&&_0x50a465?.[_0x1a4b2f(0x8b)]){const _0x5e7575=await getBffScriptInfo(_0x50a465[_0x1a4b2f(0x8b)]);_0x454261=_0x5e7575[_0x1a4b2f(0x9b)]||undefined;}const _0x3e245d={'appCode':_0x1b7378,'functionName':_0x166cc7[_0x1a4b2f(0xa4)],'scriptType':_0x166cc7[_0x1a4b2f(0xa1)],'scriptContent':_0x3165e4};if(_0x50a465?.[_0x1a4b2f(0x8b)])_0x3e245d['id']=_0x50a465[_0x1a4b2f(0x8b)];if(_0x50a465?.['version']!=null)_0x3e245d['version']=_0x50a465[_0x1a4b2f(0x91)];if(_0x454261)_0x3e245d[_0x1a4b2f(0x9b)]=_0x454261;if(_0x166cc7[_0x1a4b2f(0xa1)]===_0x1a4b2f(0xa9)){const _0x4b64ef=_0x166cc7[_0x1a4b2f(0xbe)];if(!_0x4b64ef||!_0x166cc7[_0x1a4b2f(0xcf)]||!_0x166cc7[_0x1a4b2f(0xca)])throw CliErrors[_0x1a4b2f(0xc6)](_0x1a4b2f(0xac)+_0x166cc7[_0x1a4b2f(0xc9)]);const _0x20eb9b=_0x5de211[_0x1a4b2f(0xa5)][_0x1a4b2f(0x80)](_0x4b64ef)??_0x50a465?.['datasetCode']??_0x4b64ef,_0x20a244=_0x5de211[_0x1a4b2f(0x99)][_0x1a4b2f(0x80)](_0x20eb9b);if(!_0x20a244)throw CliErrors[_0x1a4b2f(0xc6)](_0x1a4b2f(0xb8)+_0x4b64ef+_0x1a4b2f(0xbd)+(_0x1a4b2f(0x9a)+CLI_BIN_NAME+_0x1a4b2f(0x8f)));_0x3e245d['datasetId']=_0x20a244['id'],_0x3e245d[_0x1a4b2f(0xcf)]=_0x166cc7[_0x1a4b2f(0xcf)],_0x3e245d[_0x1a4b2f(0xca)]=_0x166cc7[_0x1a4b2f(0xca)];}const _0x4868d1=await saveBffScript(_0x3e245d),_0x451be0=_0x4868d1['id'],_0x32281c=_0x4868d1[_0x1a4b2f(0xc7)]??await getBffScriptInfo(_0x451be0),_0x24ed6b={'hash':_0x202f2b,'remoteId':_0x451be0,'version':_0x32281c[_0x1a4b2f(0x91)]};if(_0x166cc7[_0x1a4b2f(0xa1)]===_0x1a4b2f(0xa9)){const _0x1d2cbd=_0x166cc7[_0x1a4b2f(0xbe)],_0x24fea2=_0x5de211['aliasToDatasetCode'][_0x1a4b2f(0x80)](_0x1d2cbd)??_0x50a465?.['datasetCode']??_0x1d2cbd;_0x5de211[_0x1a4b2f(0xa5)][_0x1a4b2f(0xd1)](_0x1d2cbd)?_0x24ed6b['alias']=_0x1d2cbd:_0x24ed6b[_0x1a4b2f(0xbe)]=_0x50a465?.[_0x1a4b2f(0xbe)],_0x24ed6b[_0x1a4b2f(0x95)]=_0x24fea2,_0x24ed6b[_0x1a4b2f(0xcf)]=_0x166cc7[_0x1a4b2f(0xcf)],_0x24ed6b['functionNode']=_0x166cc7[_0x1a4b2f(0xca)];}_0x5ba882[_0x1a4b2f(0xc1)][_0x166cc7['lockKey']]=_0x24ed6b;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x3db922,_0x47517b,_0x172c59){const _0x2845ae=a37_0x365bb5;if(_0x172c59[_0x2845ae(0xce)]===0x0)return;for(let _0xf93d30=0x0;_0xf93d30<LOCK_SETTLE_RETRY_COUNT;_0xf93d30+=0x1){const _0x1276fb=await readBffLockFile(_0x3db922),_0x547dc7=_0x1276fb?.[_0x2845ae(0xb7)]?.[_0x47517b]?.['functions']??{},_0x34b915=_0x172c59[_0x2845ae(0xd0)](_0xa1f372=>!!_0x547dc7[_0xa1f372]?.[_0x2845ae(0x8b)]);if(_0x34b915)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x2845ae(0xa7)+_0x172c59[_0x2845ae(0x85)](',\x20')+'.');}
1
+ const a37_0x52fd70=a37_0x47c1;(function(_0x56cc50,_0x322a86){const _0x56a4b0=a37_0x47c1,_0x23db9d=_0x56cc50();while(!![]){try{const _0x28c5c0=-parseInt(_0x56a4b0(0x1d9))/0x1+parseInt(_0x56a4b0(0x1e4))/0x2*(parseInt(_0x56a4b0(0x1e6))/0x3)+-parseInt(_0x56a4b0(0x1fd))/0x4+parseInt(_0x56a4b0(0x1b5))/0x5*(-parseInt(_0x56a4b0(0x1d5))/0x6)+-parseInt(_0x56a4b0(0x1f8))/0x7+-parseInt(_0x56a4b0(0x1ba))/0x8*(parseInt(_0x56a4b0(0x1c4))/0x9)+parseInt(_0x56a4b0(0x1ea))/0xa;if(_0x28c5c0===_0x322a86)break;else _0x23db9d['push'](_0x23db9d['shift']());}catch(_0x3f2a10){_0x23db9d['push'](_0x23db9d['shift']());}}}(a37_0x54bf,0x82269));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';function a37_0x47c1(_0x3cc0d0,_0x2e8e31){_0x3cc0d0=_0x3cc0d0-0x1af;const _0x54bf23=a37_0x54bf();let _0x47c1de=_0x54bf23[_0x3cc0d0];return _0x47c1de;}import{CLI_BIN_NAME}from'../../constant/cli.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a37_0x52fd70(0x1d7),'command':a37_0x52fd70(0x1b4),'description':a37_0x52fd70(0x1db),'risk':a37_0x52fd70(0x1ce),'flags':[{'name':a37_0x52fd70(0x1fc),'type':a37_0x52fd70(0x1fa),'description':a37_0x52fd70(0x1ec),'enum':[a37_0x52fd70(0x1c9),'ENDPOINT',a37_0x52fd70(0x1f6)]},{'name':a37_0x52fd70(0x1de),'type':a37_0x52fd70(0x1fa),'description':a37_0x52fd70(0x1af)},{'name':a37_0x52fd70(0x1ed),'type':a37_0x52fd70(0x1b2),'description':a37_0x52fd70(0x1be)}],async 'dryRun'(_0x14dc22){const _0x235099=a37_0x52fd70,_0x37feef=loadBffProjectConfig(_0x14dc22['appCode']),_0x357556=await readBffLockFile(_0x37feef['lockFilePath']),{appLock:_0xbf648b}=ensureLockScope(_0x357556??createEmptyBffLock(),_0x14dc22[_0x235099(0x1f9)],_0x37feef[_0x235099(0x1b9)],_0x235099(0x1b4)),_0x419703=await getTargetFunctions(_0x37feef,_0x14dc22),_0x226df3=_0x14dc22['bool'](_0x235099(0x1ed)),_0x22df8d=[];for(const _0x111806 of _0x419703){const _0x2f7f0c=await computeFileHash(_0x111806[_0x235099(0x1b8)]),_0x1b0b4f=_0xbf648b[_0x235099(0x1d2)][_0x111806['lockKey']],_0x2b5329=!!_0x1b0b4f&&_0x1b0b4f[_0x235099(0x1dc)]===_0x2f7f0c;_0x22df8d['push']({'lockKey':_0x111806['lockKey'],'filePath':_0x111806[_0x235099(0x1b8)],'remoteId':_0x1b0b4f?.[_0x235099(0x1da)]??null,'mode':_0x1b0b4f?.[_0x235099(0x1da)]?_0x235099(0x1f1):'create','status':!_0x226df3&&_0x2b5329?_0x235099(0x1b1):'would_push'});}return{'method':_0x235099(0x1d0),'url':_0x235099(0x1f2),'body':{'appCode':_0x14dc22[_0x235099(0x1f9)],'force':_0x226df3,'files':_0x22df8d,'cacheClearAtRuntime':_0x22df8d[_0x235099(0x1e8)](_0x290adf=>_0x290adf[_0x235099(0x1c1)]===_0x235099(0x1bc)),'cacheClearAtRuntimeTimes':_0x22df8d[_0x235099(0x1e8)](_0x1dc635=>_0x1dc635[_0x235099(0x1c1)]===_0x235099(0x1bc))?CACHE_CLEAR_ATTEMPTS:0x0},'description':'Would\x20inspect\x20'+_0x22df8d['length']+_0x235099(0x1f3)};},async 'execute'(_0x1acfe7){const _0x34bd75=a37_0x52fd70,_0x3d52e2=loadBffProjectConfig(_0x1acfe7[_0x34bd75(0x1f9)]),_0x562117=await readBffLockFile(_0x3d52e2[_0x34bd75(0x1d6)]),{lockData:_0x3f1499,appLock:_0x30e0f1}=ensureLockScope(_0x562117??createEmptyBffLock(),_0x1acfe7[_0x34bd75(0x1f9)],_0x3d52e2['scriptsRoot'],_0x34bd75(0x1b4)),_0x4a3c47=await getTargetFunctions(_0x3d52e2,_0x1acfe7);if(_0x4a3c47[_0x34bd75(0x1cf)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x34bd75(0x1b6)};const _0x1bca99=_0x1acfe7['bool'](_0x34bd75(0x1ed)),_0x203356=JSON[_0x34bd75(0x1e3)](JSON['stringify'](_0x3f1499)),_0x45a78c=_0x203356['apps'][_0x1acfe7[_0x34bd75(0x1f9)]];if(!_0x45a78c)throw new Error(_0x34bd75(0x1c7)+_0x1acfe7[_0x34bd75(0x1f9)]+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x26c8d3=await buildHookMaps(_0x1acfe7[_0x34bd75(0x1f9)],_0x1acfe7[_0x34bd75(0x1df)],_0x4a3c47,_0x45a78c),_0x1f0e95=[],_0x46203d=[],_0xb980af=[];for(const _0x4ad868 of _0x4a3c47){const _0x2c0bde=await computeFileHash(_0x4ad868[_0x34bd75(0x1b8)]),_0x53fe5e=_0x45a78c[_0x34bd75(0x1d2)][_0x4ad868[_0x34bd75(0x1fb)]];if(!_0x1bca99&&_0x53fe5e&&_0x53fe5e[_0x34bd75(0x1dc)]===_0x2c0bde){_0x46203d[_0x34bd75(0x1b4)]({'lockKey':_0x4ad868[_0x34bd75(0x1fb)],'reason':_0x34bd75(0x1b1)});continue;}try{await uploadSingleFunction(_0x1acfe7[_0x34bd75(0x1f9)],_0x4ad868,_0x45a78c,_0x26c8d3);const _0x4ac745=_0x45a78c['functions'][_0x4ad868['lockKey']];_0x1f0e95['push']({'lockKey':_0x4ad868['lockKey'],'remoteId':_0x4ac745?.[_0x34bd75(0x1da)]??0x0});}catch(_0x1b4a0b){_0xb980af[_0x34bd75(0x1b4)]({'lockKey':_0x4ad868[_0x34bd75(0x1fb)],'error':_0x1b4a0b instanceof Error?_0x1b4a0b[_0x34bd75(0x1ef)]:String(_0x1b4a0b)});}}_0x45a78c['lastSync']=new Date()[_0x34bd75(0x1e5)](),await writeBffLockFile(_0x3d52e2[_0x34bd75(0x1d6)],_0x203356),await waitForUploadedLockEntries(_0x3d52e2[_0x34bd75(0x1d6)],_0x1acfe7[_0x34bd75(0x1f9)],_0x1f0e95[_0x34bd75(0x1d1)](_0x4115e3=>_0x4115e3[_0x34bd75(0x1fb)]));let _0x4051e9={'attempted':![],'cleared':![]};if(_0x1f0e95[_0x34bd75(0x1cf)]>0x0)try{let _0x3dbc9f='';for(let _0xbd9397=0x0;_0xbd9397<CACHE_CLEAR_ATTEMPTS;_0xbd9397+=0x1){_0x3dbc9f=await clearBffScriptCache(),_0xbd9397<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x4051e9={'attempted':!![],'cleared':!![],'message':_0x3dbc9f||_0x34bd75(0x1f4)};}catch(_0x41d2e8){_0x4051e9={'attempted':!![],'cleared':![],'error':_0x41d2e8 instanceof Error?_0x41d2e8[_0x34bd75(0x1ef)]:String(_0x41d2e8)};}const _0x53583c=_0xb980af[_0x34bd75(0x1cf)]===0x0&&(_0x4051e9[_0x34bd75(0x1bd)]?_0x4051e9[_0x34bd75(0x1ee)]:!![]),_0x3a578b=_0x4051e9[_0x34bd75(0x1bd)]?_0x4051e9[_0x34bd75(0x1ee)]?_0x34bd75(0x1e0):_0x34bd75(0x1cb):_0x34bd75(0x1c8);return{'ok':_0x53583c,'data':{'uploaded':_0x1f0e95,'skipped':_0x46203d,'failed':_0xb980af,'cacheClear':_0x4051e9},'message':'Push\x20complete:\x20'+_0x1f0e95[_0x34bd75(0x1cf)]+'\x20uploaded,\x20'+_0x46203d[_0x34bd75(0x1cf)]+'\x20skipped,\x20'+_0xb980af[_0x34bd75(0x1cf)]+_0x34bd75(0x1cd)+_0x3a578b};}};async function getTargetFunctions(_0x4b3308,_0x4f98d4){const _0x5b726c=a37_0x52fd70,_0x5a845d=_0x4f98d4['str']('type'),_0x3a28ae=_0x4f98d4[_0x5b726c(0x1cc)]('name'),_0x48263b=normalizeBffType(_0x5a845d)??undefined;if(_0x3a28ae&&!_0x48263b)throw CliErrors['validation'](_0x5b726c(0x1c0));const _0x28f3b2=await scanLocalBffFunctions(_0x4b3308,_0x48263b);if(_0x3a28ae){const _0x4550a5=_0x28f3b2['filter'](_0x2d9d66=>_0x2d9d66[_0x5b726c(0x1de)]===_0x3a28ae);if(_0x4550a5[_0x5b726c(0x1cf)]===0x0)throw CliErrors[_0x5b726c(0x1d8)](_0x5b726c(0x1bf)+_0x48263b+'/'+_0x3a28ae);return _0x4550a5;}return _0x28f3b2;}async function buildHookMaps(_0x390572,_0x206b82,_0x5eda15,_0x1d6262){const _0x5da22a=a37_0x52fd70,_0x101b9f=_0x5eda15[_0x5da22a(0x1e8)](_0x29da50=>_0x29da50['type']==='HOOK');if(!_0x101b9f)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x3636fd=loadAliasMap(_0x206b82,undefined,resolveApiFilePath(_0x206b82,_0x390572)),_0x4ca1ca=new Map(_0x3636fd[_0x5da22a(0x1d1)](_0x24d8cb=>[_0x24d8cb[_0x5da22a(0x1f5)],_0x24d8cb[_0x5da22a(0x1b7)]]));for(const _0x5c730b of Object[_0x5da22a(0x1d4)](_0x1d6262[_0x5da22a(0x1d2)])){_0x5c730b[_0x5da22a(0x1f5)]&&_0x5c730b[_0x5da22a(0x1b7)]&&!_0x4ca1ca[_0x5da22a(0x1e1)](_0x5c730b[_0x5da22a(0x1f5)])&&_0x4ca1ca[_0x5da22a(0x1dd)](_0x5c730b[_0x5da22a(0x1f5)],_0x5c730b[_0x5da22a(0x1b7)]);}const _0xee04fa=await listDatasets(_0x390572),_0x3d8ca9=new Map(_0xee04fa[_0x5da22a(0x1d1)](_0xbb621e=>[_0xbb621e['code'],_0xbb621e]));return{'aliasToDatasetCode':_0x4ca1ca,'datasetCodeToDataset':_0x3d8ca9};}function a37_0x54bf(){const _0x27ce00=['get','Push\x20only\x20this\x20script\x20type','force','cleared','message','operationType','update','/api/management/library/scripts/save','\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','Runtime\x20script\x20cache\x20cleared.','alias','HOOK','aliasToDatasetCode','1187459baFBnp','appCode','string','lockKey','type','3811772PHzKaQ','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','version','unchanged','boolean','apps','push','2062550rakYYe','No\x20local\x20Backend\x20Function\x20scripts\x20found.','datasetCode','filePath','scriptsRoot','4484968QPXVPd','\x22.\x20','would_push','attempted','Force\x20push\x20ignoring\x20hash\x20protection','Local\x20function\x20not\x20found:\x20','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','status','every','datasetId','9BJyUMJ','functionNode','Incomplete\x20HOOK\x20path:\x20','Lock\x20scope\x20for\x20app\x20\x22','runtime\x20cache\x20not\x20needed','COMMON','description','runtime\x20cache\x20clear\x20failed','str','\x20failed,\x20','write','length','POST','map','functions','script','values','6dpKRCN','lockFilePath','bff','validation','1016219EPcNLo','remoteId','Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','hash','set','name','apiDir','runtime\x20cache\x20cleared','has','Cannot\x20resolve\x20dataset\x20for\x20\x22','parse','582058zeEFOF','toISOString','6jiNKlC','join','some','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','30629690NTClsw'];a37_0x54bf=function(){return _0x27ce00;};return a37_0x54bf();}async function uploadSingleFunction(_0x2a91c1,_0x4fc396,_0x2e8e0c,_0x243e2e){const _0x30dc7b=a37_0x52fd70,_0x50d6d2=await readFile(_0x4fc396['filePath'],'utf8'),_0x319650=await computeFileHash(_0x4fc396['filePath']),_0x135d8e=_0x2e8e0c[_0x30dc7b(0x1d2)][_0x4fc396['lockKey']];if(_0x135d8e?.[_0x30dc7b(0x1da)]&&_0x135d8e['version']==null)throw CliErrors[_0x30dc7b(0x1d8)](_0x4fc396[_0x30dc7b(0x1fb)]+':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.');let _0x45970a=extractScriptDescription(_0x50d6d2);if(!_0x45970a&&_0x135d8e?.[_0x30dc7b(0x1da)]){const _0x3a3cef=await getBffScriptInfo(_0x135d8e[_0x30dc7b(0x1da)]);_0x45970a=_0x3a3cef['description']||undefined;}const _0x51639c={'appCode':_0x2a91c1,'functionName':_0x4fc396[_0x30dc7b(0x1de)],'scriptType':_0x4fc396[_0x30dc7b(0x1fc)],'scriptContent':_0x50d6d2};if(_0x135d8e?.[_0x30dc7b(0x1da)])_0x51639c['id']=_0x135d8e['remoteId'];if(_0x135d8e?.[_0x30dc7b(0x1b0)]!=null)_0x51639c[_0x30dc7b(0x1b0)]=_0x135d8e[_0x30dc7b(0x1b0)];if(_0x45970a)_0x51639c[_0x30dc7b(0x1ca)]=_0x45970a;if(_0x4fc396[_0x30dc7b(0x1fc)]===_0x30dc7b(0x1f6)){const _0x4908fe=_0x4fc396[_0x30dc7b(0x1f5)];if(!_0x4908fe||!_0x4fc396[_0x30dc7b(0x1f0)]||!_0x4fc396[_0x30dc7b(0x1c5)])throw CliErrors[_0x30dc7b(0x1d8)](_0x30dc7b(0x1c6)+_0x4fc396[_0x30dc7b(0x1fb)]);const _0x2f7c23=_0x243e2e[_0x30dc7b(0x1f7)][_0x30dc7b(0x1eb)](_0x4908fe)??_0x135d8e?.[_0x30dc7b(0x1b7)]??_0x4908fe,_0x412a6d=_0x243e2e['datasetCodeToDataset'][_0x30dc7b(0x1eb)](_0x2f7c23);if(!_0x412a6d)throw CliErrors['validation'](_0x30dc7b(0x1e2)+_0x4908fe+_0x30dc7b(0x1bb)+('Run\x20`'+CLI_BIN_NAME+_0x30dc7b(0x1e9)));_0x51639c[_0x30dc7b(0x1c3)]=_0x412a6d['id'],_0x51639c['operationType']=_0x4fc396[_0x30dc7b(0x1f0)],_0x51639c[_0x30dc7b(0x1c5)]=_0x4fc396[_0x30dc7b(0x1c5)];}const _0x565d67=await saveBffScript(_0x51639c),_0x2d241a=_0x565d67['id'],_0x33d60f=_0x565d67[_0x30dc7b(0x1d3)]??await getBffScriptInfo(_0x2d241a),_0x19d297={'hash':_0x319650,'remoteId':_0x2d241a,'version':_0x33d60f[_0x30dc7b(0x1b0)]};if(_0x4fc396[_0x30dc7b(0x1fc)]===_0x30dc7b(0x1f6)){const _0x28640c=_0x4fc396['alias'],_0x191bc9=_0x243e2e['aliasToDatasetCode']['get'](_0x28640c)??_0x135d8e?.[_0x30dc7b(0x1b7)]??_0x28640c;_0x243e2e[_0x30dc7b(0x1f7)][_0x30dc7b(0x1e1)](_0x28640c)?_0x19d297['alias']=_0x28640c:_0x19d297[_0x30dc7b(0x1f5)]=_0x135d8e?.[_0x30dc7b(0x1f5)],_0x19d297['datasetCode']=_0x191bc9,_0x19d297['operationType']=_0x4fc396[_0x30dc7b(0x1f0)],_0x19d297[_0x30dc7b(0x1c5)]=_0x4fc396['functionNode'];}_0x2e8e0c[_0x30dc7b(0x1d2)][_0x4fc396[_0x30dc7b(0x1fb)]]=_0x19d297;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x3465f9,_0x1d9c78,_0xa817c6){const _0x582b6b=a37_0x52fd70;if(_0xa817c6['length']===0x0)return;for(let _0x3a1e37=0x0;_0x3a1e37<LOCK_SETTLE_RETRY_COUNT;_0x3a1e37+=0x1){const _0x410465=await readBffLockFile(_0x3465f9),_0x18e34c=_0x410465?.[_0x582b6b(0x1b3)]?.[_0x1d9c78]?.[_0x582b6b(0x1d2)]??{},_0x48779d=_0xa817c6[_0x582b6b(0x1c2)](_0x2cae30=>!!_0x18e34c[_0x2cae30]?.[_0x582b6b(0x1da)]);if(_0x48779d)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error('Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20'+_0xa817c6[_0x582b6b(0x1e7)](',\x20')+'.');}
@@ -1 +1 @@
1
- const a38_0x25097f=a38_0x21d4;function a38_0x21d4(_0x47cbd0,_0x384856){_0x47cbd0=_0x47cbd0-0x116;const _0x70c8cf=a38_0x70c8();let _0x21d403=_0x70c8cf[_0x47cbd0];return _0x21d403;}(function(_0x46caed,_0x1704bf){const _0x3b4db1=a38_0x21d4,_0x185124=_0x46caed();while(!![]){try{const _0x363885=parseInt(_0x3b4db1(0x126))/0x1+parseInt(_0x3b4db1(0x11a))/0x2+-parseInt(_0x3b4db1(0x123))/0x3+parseInt(_0x3b4db1(0x11f))/0x4*(parseInt(_0x3b4db1(0x121))/0x5)+-parseInt(_0x3b4db1(0x12c))/0x6+-parseInt(_0x3b4db1(0x135))/0x7*(-parseInt(_0x3b4db1(0x134))/0x8)+parseInt(_0x3b4db1(0x12f))/0x9*(-parseInt(_0x3b4db1(0x11d))/0xa);if(_0x363885===_0x1704bf)break;else _0x185124['push'](_0x185124['shift']());}catch(_0x85996){_0x185124['push'](_0x185124['shift']());}}}(a38_0x70c8,0x48000));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';function a38_0x70c8(){const _0x501351=['datasetCode','boolean','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','Check\x20local\x20Backend\x20Function\x20sync\x20status\x20against\x20lock\x20file','2382552kRkrDb','7UtpIdy','length','hash','bff','scriptsRoot','855602GIVnmf','remote','status','3218630mGxplw','filePath','5436TPtNQD','functions','955HEavmf','appCode','1060980slRJMt','lockFilePath','alias','476824lkNPld','map','\x20remote-only','\x20added,\x20','push','has','2949468oAWRQX','apiDir','lockKey','9GoKFOe'];a38_0x70c8=function(){return _0x501351;};return a38_0x70c8();}import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':a38_0x25097f(0x118),'command':a38_0x25097f(0x11c),'description':a38_0x25097f(0x133),'risk':'read','flags':[{'name':a38_0x25097f(0x11b),'type':a38_0x25097f(0x131),'description':a38_0x25097f(0x132)}],async 'execute'(_0x5ebf79){const _0x152ee0=a38_0x25097f,_0x29f8ee=loadBffProjectConfig(_0x5ebf79['appCode']),_0x1caf4e=await readBffLockFile(_0x29f8ee[_0x152ee0(0x124)]),{appLock:_0x17e937}=ensureLockScope(_0x1caf4e??createEmptyBffLock(),_0x5ebf79['appCode'],_0x29f8ee[_0x152ee0(0x119)],_0x152ee0(0x11c)),_0x5864ca=await scanLocalBffFunctions(_0x29f8ee),_0x2c29d1=[],_0x1bc33b=[],_0x1dbec6=[];for(const _0xb81814 of _0x5864ca){const _0x310d68=await computeFileHash(_0xb81814[_0x152ee0(0x11e)]),_0x4bd59d=_0x17e937[_0x152ee0(0x120)][_0xb81814[_0x152ee0(0x12e)]];if(!_0x4bd59d)_0x2c29d1[_0x152ee0(0x12a)](_0xb81814['lockKey']);else _0x4bd59d[_0x152ee0(0x117)]!==_0x310d68?_0x1bc33b[_0x152ee0(0x12a)](_0xb81814['lockKey']):_0x1dbec6[_0x152ee0(0x12a)](_0xb81814[_0x152ee0(0x12e)]);}const _0x332498=[];if(_0x5ebf79['bool'](_0x152ee0(0x11b))){const _0x44ead7=loadAliasMap(_0x5ebf79[_0x152ee0(0x12d)],undefined,resolveApiFilePath(_0x5ebf79['apiDir'],_0x5ebf79['appCode'])),_0x121300=new Map(_0x44ead7['map'](_0x35c17b=>[_0x35c17b[_0x152ee0(0x130)],_0x35c17b[_0x152ee0(0x125)]])),[_0x322f1b,_0x484fbf]=await Promise['all']([listBffScripts(_0x5ebf79['appCode']),getBffScriptStatistics(_0x5ebf79[_0x152ee0(0x122)])]),_0x58047d=createHookLocationMap(_0x484fbf),_0x45c25b=new Set(_0x5864ca[_0x152ee0(0x127)](_0x159653=>_0x159653[_0x152ee0(0x12e)]));for(const _0x5f0a22 of _0x322f1b){const _0x3bfc38=resolveRemoteScriptTarget(_0x29f8ee,_0x5f0a22,_0x58047d,_0x17e937[_0x152ee0(0x120)],_0x121300);_0x3bfc38&&!_0x45c25b[_0x152ee0(0x12b)](_0x3bfc38[_0x152ee0(0x12e)])&&_0x332498[_0x152ee0(0x12a)](_0x3bfc38['lockKey']);}}const _0x434012=_0x2c29d1[_0x152ee0(0x116)]===0x0&&_0x1bc33b[_0x152ee0(0x116)]===0x0&&_0x332498[_0x152ee0(0x116)]===0x0;return{'ok':!![],'data':{'added':_0x2c29d1,'modified':_0x1bc33b,'unchanged':_0x1dbec6,'remoteOnly':_0x332498},'message':_0x434012?'All\x20Backend\x20Function\x20scripts\x20are\x20in\x20sync.':_0x2c29d1[_0x152ee0(0x116)]+_0x152ee0(0x129)+_0x1bc33b[_0x152ee0(0x116)]+'\x20modified,\x20'+_0x1dbec6[_0x152ee0(0x116)]+'\x20unchanged'+(_0x332498[_0x152ee0(0x116)]>0x0?',\x20'+_0x332498[_0x152ee0(0x116)]+_0x152ee0(0x128):'')};}};
1
+ const a38_0xb5f8d0=a38_0x5559;(function(_0x1e1730,_0x441dc8){const _0x1c7924=a38_0x5559,_0x444293=_0x1e1730();while(!![]){try{const _0x1c607d=-parseInt(_0x1c7924(0x11d))/0x1+parseInt(_0x1c7924(0x11e))/0x2+-parseInt(_0x1c7924(0x128))/0x3+-parseInt(_0x1c7924(0x124))/0x4*(-parseInt(_0x1c7924(0x11c))/0x5)+parseInt(_0x1c7924(0x122))/0x6+-parseInt(_0x1c7924(0x12f))/0x7+parseInt(_0x1c7924(0x11f))/0x8*(parseInt(_0x1c7924(0x120))/0x9);if(_0x1c607d===_0x441dc8)break;else _0x444293['push'](_0x444293['shift']());}catch(_0x8e3bec){_0x444293['push'](_0x444293['shift']());}}}(a38_0x1679,0xb8683));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';function a38_0x1679(){const _0x57b3d=['481557Wdjmsb','length','status','appCode','push','lockKey','has','10282314QpGzpY','datasetCode','bool','scriptsRoot','All\x20Backend\x20Function\x20scripts\x20are\x20in\x20sync.','bff','lockFilePath','remote','map','41970pcVtHM','1081580xgMTdJ','1984180isKnAO','605600LtZPSx','180pNtHYi','functions','4854900temBnG','all','72hdfEPE','read','hash','\x20modified,\x20'];a38_0x1679=function(){return _0x57b3d;};return a38_0x1679();}import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';function a38_0x5559(_0x23455e,_0x142c53){_0x23455e=_0x23455e-0x11c;const _0x167980=a38_0x1679();let _0x5559ac=_0x167980[_0x23455e];return _0x5559ac;}import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':a38_0xb5f8d0(0x134),'command':'status','description':'Check\x20local\x20Backend\x20Function\x20sync\x20status\x20against\x20lock\x20file','risk':a38_0xb5f8d0(0x125),'flags':[{'name':a38_0xb5f8d0(0x136),'type':'boolean','description':'Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally'}],async 'execute'(_0x25ea77){const _0x20ba06=a38_0xb5f8d0,_0x56c777=loadBffProjectConfig(_0x25ea77[_0x20ba06(0x12b)]),_0x1825cc=await readBffLockFile(_0x56c777[_0x20ba06(0x135)]),{appLock:_0x1430ab}=ensureLockScope(_0x1825cc??createEmptyBffLock(),_0x25ea77['appCode'],_0x56c777[_0x20ba06(0x132)],_0x20ba06(0x12a)),_0x22c3cc=await scanLocalBffFunctions(_0x56c777),_0x22f6ea=[],_0x3a4f21=[],_0x3c2d96=[];for(const _0x5cd6dd of _0x22c3cc){const _0x276a69=await computeFileHash(_0x5cd6dd['filePath']),_0xdabfb=_0x1430ab['functions'][_0x5cd6dd['lockKey']];if(!_0xdabfb)_0x22f6ea[_0x20ba06(0x12c)](_0x5cd6dd['lockKey']);else _0xdabfb[_0x20ba06(0x126)]!==_0x276a69?_0x3a4f21[_0x20ba06(0x12c)](_0x5cd6dd[_0x20ba06(0x12d)]):_0x3c2d96[_0x20ba06(0x12c)](_0x5cd6dd[_0x20ba06(0x12d)]);}const _0x5cace9=[];if(_0x25ea77[_0x20ba06(0x131)](_0x20ba06(0x136))){const _0x27f5ee=loadAliasMap(_0x25ea77['apiDir'],undefined,resolveApiFilePath(_0x25ea77['apiDir'],_0x25ea77[_0x20ba06(0x12b)])),_0x3eee69=new Map(_0x27f5ee[_0x20ba06(0x137)](_0x4d4fcf=>[_0x4d4fcf[_0x20ba06(0x130)],_0x4d4fcf['alias']])),[_0x810485,_0x200c2d]=await Promise[_0x20ba06(0x123)]([listBffScripts(_0x25ea77[_0x20ba06(0x12b)]),getBffScriptStatistics(_0x25ea77[_0x20ba06(0x12b)])]),_0x379d4f=createHookLocationMap(_0x200c2d),_0x484aed=new Set(_0x22c3cc[_0x20ba06(0x137)](_0x3bda4c=>_0x3bda4c['lockKey']));for(const _0x63f982 of _0x810485){const _0x350f10=resolveRemoteScriptTarget(_0x56c777,_0x63f982,_0x379d4f,_0x1430ab[_0x20ba06(0x121)],_0x3eee69);_0x350f10&&!_0x484aed[_0x20ba06(0x12e)](_0x350f10[_0x20ba06(0x12d)])&&_0x5cace9[_0x20ba06(0x12c)](_0x350f10[_0x20ba06(0x12d)]);}}const _0xe89c1b=_0x22f6ea['length']===0x0&&_0x3a4f21[_0x20ba06(0x129)]===0x0&&_0x5cace9['length']===0x0;return{'ok':!![],'data':{'added':_0x22f6ea,'modified':_0x3a4f21,'unchanged':_0x3c2d96,'remoteOnly':_0x5cace9},'message':_0xe89c1b?_0x20ba06(0x133):_0x22f6ea[_0x20ba06(0x129)]+'\x20added,\x20'+_0x3a4f21['length']+_0x20ba06(0x127)+_0x3c2d96[_0x20ba06(0x129)]+'\x20unchanged'+(_0x5cace9[_0x20ba06(0x129)]>0x0?',\x20'+_0x5cace9[_0x20ba06(0x129)]+'\x20remote-only':'')};}};
@@ -1 +1 @@
1
- const a39_0x15a7ab=a39_0x3063;(function(_0x8d1c26,_0x2b903f){const _0x138c95=a39_0x3063,_0x3d2b20=_0x8d1c26();while(!![]){try{const _0x393572=parseInt(_0x138c95(0x1bd))/0x1+parseInt(_0x138c95(0x1ad))/0x2*(parseInt(_0x138c95(0x1b7))/0x3)+-parseInt(_0x138c95(0x1a9))/0x4*(-parseInt(_0x138c95(0x1ba))/0x5)+parseInt(_0x138c95(0x1c4))/0x6*(-parseInt(_0x138c95(0x1bb))/0x7)+parseInt(_0x138c95(0x1c2))/0x8*(-parseInt(_0x138c95(0x1ae))/0x9)+parseInt(_0x138c95(0x1ab))/0xa+-parseInt(_0x138c95(0x1b1))/0xb;if(_0x393572===_0x2b903f)break;else _0x3d2b20['push'](_0x3d2b20['shift']());}catch(_0x3f4a02){_0x3d2b20['push'](_0x3d2b20['shift']());}}}(a39_0x2ede,0x587e0));function a39_0x2ede(){const _0x5a6eaa=['3966842DwRvge','\x20installed','pipe','cli-skill',']:\x20','installedPath','83427sKmvZd','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20','info','2810jzzRJq','11382yvdiQp','code','298205iUlDmf','read','apiError','inherit','nonInteractive','20824oRLhZq','cwd','912TVoMZb','unknown','error','setLogPath','\x20via\x20skills@latest','\x20at\x20','cli-skill-install','changed','CLI\x20Built-in\x20Skill\x20','1176oXcQLD','Built-in\x20Skill\x20install\x20failed\x20[','7038470qzvvkn','skillVersion','36FKoncQ','2412hbaHCi','install','\x20is\x20already\x20current'];a39_0x2ede=function(){return _0x5a6eaa;};return a39_0x2ede();}import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';function a39_0x3063(_0x5f126d,_0x254178){_0x5f126d=_0x5f126d-0x1a9;const _0x2ede3d=a39_0x2ede();let _0x306302=_0x2ede3d[_0x5f126d];return _0x306302;}import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a39_0x15a7ab(0x1b4),'command':a39_0x15a7ab(0x1af),'description':'Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','risk':a39_0x15a7ab(0x1be),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x370baa){const _0x470497=a39_0x15a7ab;logger[_0x470497(0x1c7)](process[_0x470497(0x1c3)]()),logger[_0x470497(0x1b9)](_0x470497(0x1ca),'Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20current\x20package.');const _0x4c1fcd=installBuiltinSkill({'stdio':_0x370baa[_0x470497(0x1c1)]?_0x470497(0x1b3):_0x470497(0x1c0)});if(!_0x4c1fcd['ok'])throw CliErrors[_0x470497(0x1bf)](_0x470497(0x1aa)+_0x4c1fcd[_0x470497(0x1bc)]+_0x470497(0x1b5)+(_0x4c1fcd[_0x470497(0x1c6)]||_0x470497(0x1c5)),_0x470497(0x1b8)+_0x4c1fcd['repairCommand']);return console['log'](_0x4c1fcd[_0x470497(0x1cb)]?_0x470497(0x1cc)+_0x4c1fcd[_0x470497(0x1ac)]+_0x470497(0x1b2)+(_0x4c1fcd[_0x470497(0x1b6)]?_0x470497(0x1c9)+_0x4c1fcd['installedPath']:_0x470497(0x1c8)):_0x470497(0x1cc)+_0x4c1fcd[_0x470497(0x1ac)]+_0x470497(0x1b0)+(_0x4c1fcd['installedPath']?'\x20at\x20'+_0x4c1fcd[_0x470497(0x1b6)]:'')),{'ok':!![]};}}];
1
+ const a39_0x4b10b9=a39_0x350c;(function(_0x2b5cc4,_0x3d2eea){const _0x60cacb=a39_0x350c,_0x4af481=_0x2b5cc4();while(!![]){try{const _0x153b18=-parseInt(_0x60cacb(0x1d2))/0x1+parseInt(_0x60cacb(0x1d1))/0x2*(-parseInt(_0x60cacb(0x1bd))/0x3)+-parseInt(_0x60cacb(0x1c2))/0x4+-parseInt(_0x60cacb(0x1be))/0x5*(parseInt(_0x60cacb(0x1d5))/0x6)+parseInt(_0x60cacb(0x1db))/0x7+-parseInt(_0x60cacb(0x1c3))/0x8*(parseInt(_0x60cacb(0x1cd))/0x9)+parseInt(_0x60cacb(0x1da))/0xa;if(_0x153b18===_0x3d2eea)break;else _0x4af481['push'](_0x4af481['shift']());}catch(_0xb46fb9){_0x4af481['push'](_0x4af481['shift']());}}}(a39_0x5c07,0xbd88f));import{CliErrors}from'../../errors.js';function a39_0x350c(_0x383cc1,_0x4d1986){_0x383cc1=_0x383cc1-0x1bd;const _0x5c0730=a39_0x5c07();let _0x350cb5=_0x5c0730[_0x383cc1];return _0x350cb5;}import{installBuiltinSkill}from'../../skills/builtin-skill.js';function a39_0x5c07(){const _0x11da94=[']:\x20','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','repairCommand','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20','40089270TeWjZx','5803532MRnqFr','381RKMkca','95gNTuKl','\x20at\x20','skillVersion','read','2984952rlNKJq','48osnqmB','unknown','\x20is\x20already\x20current','cli-skill','cli-skill-install','nonInteractive','inherit','cwd','installedPath','code','1699812asvJKg','setLogPath','CLI\x20Built-in\x20Skill\x20','install','13342wjfolc','1133586VVyAkV','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20current\x20package.','error','63606kswHYl'];a39_0x5c07=function(){return _0x11da94;};return a39_0x5c07();}import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a39_0x4b10b9(0x1c6),'command':a39_0x4b10b9(0x1d0),'description':a39_0x4b10b9(0x1d7),'risk':a39_0x4b10b9(0x1c1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0xb65a0){const _0x4822c4=a39_0x4b10b9;logger[_0x4822c4(0x1ce)](process[_0x4822c4(0x1ca)]()),logger['info'](_0x4822c4(0x1c7),_0x4822c4(0x1d3));const _0x28ddb5=installBuiltinSkill({'stdio':_0xb65a0[_0x4822c4(0x1c8)]?'pipe':_0x4822c4(0x1c9)});if(!_0x28ddb5['ok'])throw CliErrors['apiError']('Built-in\x20Skill\x20install\x20failed\x20['+_0x28ddb5[_0x4822c4(0x1cc)]+_0x4822c4(0x1d6)+(_0x28ddb5[_0x4822c4(0x1d4)]||_0x4822c4(0x1c4)),_0x4822c4(0x1d9)+_0x28ddb5[_0x4822c4(0x1d8)]);return console['log'](_0x28ddb5['changed']?_0x4822c4(0x1cf)+_0x28ddb5[_0x4822c4(0x1c0)]+'\x20installed'+(_0x28ddb5[_0x4822c4(0x1cb)]?_0x4822c4(0x1bf)+_0x28ddb5[_0x4822c4(0x1cb)]:'\x20via\x20skills@latest'):_0x4822c4(0x1cf)+_0x28ddb5['skillVersion']+_0x4822c4(0x1c5)+(_0x28ddb5['installedPath']?'\x20at\x20'+_0x28ddb5[_0x4822c4(0x1cb)]:'')),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a40_0x16f954=a40_0x41cb;(function(_0x3f3908,_0x36665a){const _0x52531f=a40_0x41cb,_0x527dbe=_0x3f3908();while(!![]){try{const _0x488ed7=parseInt(_0x52531f(0x105))/0x1+-parseInt(_0x52531f(0xcb))/0x2*(parseInt(_0x52531f(0xe2))/0x3)+parseInt(_0x52531f(0xf6))/0x4+parseInt(_0x52531f(0xfc))/0x5+-parseInt(_0x52531f(0xff))/0x6*(parseInt(_0x52531f(0xed))/0x7)+-parseInt(_0x52531f(0x10a))/0x8*(parseInt(_0x52531f(0xc0))/0x9)+parseInt(_0x52531f(0xee))/0xa;if(_0x488ed7===_0x36665a)break;else _0x527dbe['push'](_0x527dbe['shift']());}catch(_0x14228b){_0x527dbe['push'](_0x527dbe['shift']());}}}(a40_0x501e,0x744da));import a40_0x3c144f from'chalk';import a40_0x18696d from'ora';import a40_0x24633b from'semver';import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0xc65a30=a40_0x41cb;return GIT_COMMIT!==_0xc65a30(0x101)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0xc65a30(0x106)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x46b78f=a40_0x41cb,_0x1919a2=process[_0x46b78f(0xf7)]['toLowerCase']();if(_0x1919a2[_0x46b78f(0xf0)](_0x46b78f(0x100)))return _0x46b78f(0x100);return _0x46b78f(0xc2);}const updateFlags=[{'name':a40_0x16f954(0xfa),'type':a40_0x16f954(0xcf),'description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':'version','type':'string','description':a40_0x16f954(0xc8)}];function getRequestedVersion(_0x12ec6c){const _0x173e98=a40_0x16f954;return _0x12ec6c[_0x173e98(0xce)](_0x173e98(0xfe))[_0x173e98(0xe8)]();}async function validateUpdateFlags(_0xd007c7){const _0x42aef2=a40_0x16f954,_0x428e2a=_0xd007c7[_0x42aef2(0x103)](_0x42aef2(0xfa)),_0x4e8b84=getRequestedVersion(_0xd007c7);if(_0x428e2a&&_0x4e8b84)throw CliErrors['validation']('--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.',_0x42aef2(0xe5));if(_0x4e8b84&&!a40_0x24633b['valid'](_0x4e8b84))throw CliErrors[_0x42aef2(0xeb)]('Invalid\x20version:\x20'+_0x4e8b84,_0x42aef2(0xde));}async function fetchNpmDistTags(){const _0x59f876=a40_0x16f954;try{const _0xfbf868=await fetch(_0x59f876(0x10b)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x59f876(0xdf),{'signal':AbortSignal[_0x59f876(0xd0)](0x2710)});if(!_0xfbf868['ok'])return null;const _0x50748f=await _0xfbf868['json']();if(!_0x50748f||typeof _0x50748f!==_0x59f876(0xc3))return null;return Object[_0x59f876(0xef)](Object['entries'](_0x50748f)[_0x59f876(0xbf)](([,_0x2b4b0f])=>typeof _0x2b4b0f==='string'&&_0x2b4b0f[_0x59f876(0xe8)]()[_0x59f876(0xf8)]>0x0)['map'](([_0x28aa4f,_0x2c7d05])=>[_0x28aa4f,String(_0x2c7d05)[_0x59f876(0xe8)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0xfa1692){const _0x105da2=await fetchNpmDistTags();return _0x105da2?.[_0xfa1692]??null;}async function fetchLatestVersion(){const _0x47a1c5=a40_0x16f954;return fetchNpmDistTagVersion(_0x47a1c5(0xe3));}async function resolveTargetVersion(_0x27f223){const _0x19afc3=a40_0x16f954,_0x27f774=getRequestedVersion(_0x27f223);if(_0x27f774)return{'version':_0x27f774,'source':'version'};if(_0x27f223['bool'](_0x19afc3(0xfa))){const _0x2805fa=await fetchNpmDistTagVersion(_0x19afc3(0xfa));if(!_0x2805fa)return null;return{'version':_0x2805fa,'source':_0x19afc3(0xfa)};}const _0x315f6e=await fetchLatestVersion();if(!_0x315f6e)return null;return{'version':_0x315f6e,'source':_0x19afc3(0xe3)};}function shouldInstallTarget(_0x7848b9,_0x431596){const _0x25c320=a40_0x16f954;if(_0x431596[_0x25c320(0x104)]==='version'||_0x431596[_0x25c320(0x104)]===_0x25c320(0xfa))return!a40_0x24633b['eq'](_0x7848b9,_0x431596[_0x25c320(0xfe)]);return a40_0x24633b['lt'](_0x7848b9,_0x431596[_0x25c320(0xfe)]);}function a40_0x41cb(_0x336e67,_0x39e663){_0x336e67=_0x336e67-0xbc;const _0x501ea1=a40_0x501e();let _0x41cba9=_0x501ea1[_0x336e67];return _0x41cba9;}function a40_0x501e(){const _0x3abb9a=['log','warn','Install\x20a\x20specific\x20CLI\x20version','\x20\x20Built-in\x20Skill\x20verification\x20failed:\x20','expected\x20','92WUynxF','green','Updating\x20via\x20','str','boolean','timeout','\x20install\x20-g\x20','valid','Already\x20on\x20requested\x20version\x20(v','message','read','Update\x20failed','start','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','yellow','red','Requested\x20version:\x20','current','\x20\x20CLI\x20Built-in\x20Skill\x20','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','/dist-tags','error','Beta\x20version:\x20','42555BYyFby','latest','info','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','\x20is\x20up\x20to\x20date.','pipe','trim','install','gray','validation','fail','301AjcQJB','142210gpVrJq','fromEntries','includes','update','\x20is\x20newer\x20than\x20npm\x20latest\x20v','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','code','Current\x20version:\x20','2253976bUHooh','execPath','length','state','beta','skillVersion','3880640SkoIFB','repairCommand','version','25686bpVmnF','bun','unknown','\x20cli-skill\x20install','bool','source','87185WbwJds','slice','\x20\x20Run\x20manually:\x20','\x20\x20CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','296fqtqBh','https://registry.npmjs.org/-/package/','\x20→\x20','succeed','run','filter','31149vqSBUa',']:\x20','npm','object','@latest','Update\x20available:\x20'];a40_0x501e=function(){return _0x3abb9a;};return a40_0x501e();}function getInstallPlanLabel(_0x5bbd5c,_0x578d77){const _0x50b00b=a40_0x16f954;switch(_0x578d77[_0x50b00b(0x104)]){case _0x50b00b(0xfa):return _0x50b00b(0xe1)+a40_0x3c144f[_0x50b00b(0xd9)](_0x5bbd5c)+'\x20→\x20'+a40_0x3c144f[_0x50b00b(0xcc)](_0x578d77['version']);case _0x50b00b(0xfe):return _0x50b00b(0xdb)+a40_0x3c144f[_0x50b00b(0xd9)](_0x5bbd5c)+'\x20→\x20'+a40_0x3c144f[_0x50b00b(0xcc)](_0x578d77[_0x50b00b(0xfe)]);case _0x50b00b(0xe3):default:return _0x50b00b(0xc5)+a40_0x3c144f[_0x50b00b(0xd9)](_0x5bbd5c)+_0x50b00b(0xbc)+a40_0x3c144f['green'](_0x578d77[_0x50b00b(0xfe)]);}}function repairCurrentBuiltinSkill(){const _0x55395c=a40_0x16f954;console['log'](a40_0x3c144f[_0x55395c(0xea)]('Checking\x20CLI\x20Built-in\x20Skill...'));const _0x201eaa=installBuiltinSkill();if(_0x201eaa['ok'])return console[_0x55395c(0xc6)](a40_0x3c144f[_0x55395c(0xea)](_0x55395c(0xdd)+_0x201eaa['skillVersion']+_0x55395c(0xe6))),!![];return console[_0x55395c(0xc7)](a40_0x3c144f['yellow'](_0x55395c(0x108)+_0x201eaa[_0x55395c(0xf4)]+_0x55395c(0xc1)+(_0x201eaa[_0x55395c(0xe0)]||_0x55395c(0x101)))),console[_0x55395c(0xc6)](a40_0x3c144f[_0x55395c(0xea)](_0x55395c(0x107)+CLI_BIN_NAME+_0x55395c(0x102))),![];}function verifyUpdatedBuiltinSkill(_0x24b24b){const _0x31f7a9=a40_0x16f954,_0x2a7c2e=inspectInstalledBuiltinSkillVersion(_0x24b24b);if(_0x2a7c2e['state']===_0x31f7a9(0xdc))return console[_0x31f7a9(0xc6)](a40_0x3c144f['gray'](_0x31f7a9(0xdd)+_0x24b24b+_0x31f7a9(0xe6))),!![];const _0x15f083=_0x2a7c2e['skillVersion']?_0x31f7a9(0xca)+_0x24b24b+',\x20found\x20'+_0x2a7c2e[_0x31f7a9(0xfb)]:_0x31f7a9(0xca)+_0x24b24b+',\x20state\x20'+_0x2a7c2e[_0x31f7a9(0xf9)];return console[_0x31f7a9(0xc7)](a40_0x3c144f[_0x31f7a9(0xd9)](_0x31f7a9(0xc9)+_0x15f083)),console[_0x31f7a9(0xc6)](a40_0x3c144f[_0x31f7a9(0xea)]('\x20\x20Run\x20manually:\x20'+_0x2a7c2e[_0x31f7a9(0xfd)])),![];}async function execute(_0x133150){const _0x28163e=a40_0x16f954;await validateUpdateFlags(_0x133150);const _0x46442f=getCurrentVersion();console['log'](_0x28163e(0xf5)+_0x46442f);const _0xee719b=a40_0x18696d('Checking\x20for\x20updates...')[_0x28163e(0xd7)](),_0x5588ae=await resolveTargetVersion(_0x133150);if(!_0x5588ae){const _0x441508=_0x133150[_0x28163e(0x103)]('beta')?'Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm':'Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)';return _0xee719b[_0x28163e(0xec)](_0x441508),console[_0x28163e(0xc6)](a40_0x3c144f[_0x28163e(0xea)](_0x28163e(0x109)+NPM_PACKAGE_NAME+_0x28163e(0xc4))),{'ok':![],'message':_0x441508};}const _0x3b3763=a40_0x24633b[_0x28163e(0xd2)](VERSION),_0x1dfc7f=a40_0x24633b[_0x28163e(0xd2)](_0x5588ae[_0x28163e(0xfe)]);if(!_0x3b3763||!_0x1dfc7f)return _0xee719b[_0x28163e(0xec)]('Version\x20comparison\x20failed'),{'ok':![],'message':'Version\x20comparison\x20failed'};if(!shouldInstallTarget(_0x3b3763,_0x5588ae)){const _0x5d059d=_0x5588ae[_0x28163e(0x104)]===_0x28163e(0xfe)?_0x28163e(0xd3)+_0x5588ae[_0x28163e(0xfe)]+')':a40_0x24633b['gt'](_0x3b3763,_0x1dfc7f)?'Current\x20version\x20v'+_0x46442f+_0x28163e(0xf2)+_0x5588ae[_0x28163e(0xfe)]:'Already\x20up\x20to\x20date\x20(v'+_0x5588ae['version']+')';return _0xee719b['succeed'](_0x5d059d),{'ok':repairCurrentBuiltinSkill()};}_0xee719b[_0x28163e(0xe4)](getInstallPlanLabel(_0x46442f,_0x5588ae));const _0x59dc6b=detectPackageManager(),_0x152e8f=_0x59dc6b==='npm'?resolveNpmBin(_0x28163e(0xc2)):_0x59dc6b,_0x2c7ef1=a40_0x18696d(_0x28163e(0xcd)+_0x59dc6b+'...')[_0x28163e(0xd7)]();try{return await execa(_0x152e8f,[_0x28163e(0xe9),'-g',NPM_PACKAGE_NAME+'@'+_0x5588ae[_0x28163e(0xfe)]],{'stdio':_0x28163e(0xe7)}),_0x2c7ef1[_0x28163e(0xbd)]('Updated\x20to\x20v'+_0x5588ae['version']),console[_0x28163e(0xc6)](a40_0x3c144f[_0x28163e(0xea)](_0x28163e(0xd8))),{'ok':verifyUpdatedBuiltinSkill(_0x5588ae[_0x28163e(0xfe)])};}catch(_0x47665a){return _0x2c7ef1[_0x28163e(0xec)](_0x28163e(0xd6)),console[_0x28163e(0xe0)](a40_0x3c144f[_0x28163e(0xda)]('\x20\x20'+_0x47665a[_0x28163e(0xd4)])),console[_0x28163e(0xc6)](a40_0x3c144f[_0x28163e(0xea)]('\x20\x20Try\x20manually:\x20'+_0x59dc6b+_0x28163e(0xd1)+NPM_PACKAGE_NAME+'@'+_0x5588ae[_0x28163e(0xfe)])),{'ok':![],'message':_0x47665a['message']};}}export const updateDefinition={'service':a40_0x16f954(0xf1),'command':a40_0x16f954(0xbe),'description':a40_0x16f954(0xf3),'risk':a40_0x16f954(0xd5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
1
+ const a40_0xec82cb=a40_0x1e5f;(function(_0xf6259f,_0x34323a){const _0x4cf3d4=a40_0x1e5f,_0x41105f=_0xf6259f();while(!![]){try{const _0x57b7ed=-parseInt(_0x4cf3d4(0x161))/0x1*(parseInt(_0x4cf3d4(0x174))/0x2)+-parseInt(_0x4cf3d4(0x166))/0x3*(-parseInt(_0x4cf3d4(0x16c))/0x4)+-parseInt(_0x4cf3d4(0x171))/0x5*(parseInt(_0x4cf3d4(0x139))/0x6)+parseInt(_0x4cf3d4(0x177))/0x7+-parseInt(_0x4cf3d4(0x156))/0x8*(-parseInt(_0x4cf3d4(0x131))/0x9)+-parseInt(_0x4cf3d4(0x136))/0xa*(-parseInt(_0x4cf3d4(0x159))/0xb)+parseInt(_0x4cf3d4(0x143))/0xc*(-parseInt(_0x4cf3d4(0x14a))/0xd);if(_0x57b7ed===_0x34323a)break;else _0x41105f['push'](_0x41105f['shift']());}catch(_0x1c6b70){_0x41105f['push'](_0x41105f['shift']());}}}(a40_0x407d,0x1f262));import a40_0x22541e from'chalk';import a40_0x34cb71 from'ora';import a40_0x1cff65 from'semver';import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x4c98bf=a40_0x1e5f;return GIT_COMMIT!==_0x4c98bf(0x14c)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x23fc63=a40_0x1e5f,_0x265d5a=process[_0x23fc63(0x149)][_0x23fc63(0x16b)]();if(_0x265d5a[_0x23fc63(0x17a)](_0x23fc63(0x144)))return _0x23fc63(0x144);return _0x23fc63(0x173);}const updateFlags=[{'name':a40_0xec82cb(0x178),'type':a40_0xec82cb(0x142),'description':a40_0xec82cb(0x172),'default':![]},{'name':'version','type':a40_0xec82cb(0x14d),'description':a40_0xec82cb(0x15b)}];function getRequestedVersion(_0x1b604c){const _0x32c1b5=a40_0xec82cb;return _0x1b604c[_0x32c1b5(0x13c)](_0x32c1b5(0x151))[_0x32c1b5(0x17b)]();}async function validateUpdateFlags(_0x3049ee){const _0x4d0848=a40_0xec82cb,_0x52435e=_0x3049ee[_0x4d0848(0x12d)](_0x4d0848(0x178)),_0x57b91c=getRequestedVersion(_0x3049ee);if(_0x52435e&&_0x57b91c)throw CliErrors[_0x4d0848(0x13f)]('--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x57b91c&&!a40_0x1cff65[_0x4d0848(0x176)](_0x57b91c))throw CliErrors['validation']('Invalid\x20version:\x20'+_0x57b91c,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0x31c15e=a40_0xec82cb;try{const _0x55d3d2=await fetch(_0x31c15e(0x13e)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x31c15e(0x145),{'signal':AbortSignal[_0x31c15e(0x16f)](0x2710)});if(!_0x55d3d2['ok'])return null;const _0xb78488=await _0x55d3d2[_0x31c15e(0x169)]();if(!_0xb78488||typeof _0xb78488!==_0x31c15e(0x146))return null;return Object[_0x31c15e(0x130)](Object[_0x31c15e(0x12b)](_0xb78488)['filter'](([,_0x2e1a0c])=>typeof _0x2e1a0c==='string'&&_0x2e1a0c[_0x31c15e(0x17b)]()[_0x31c15e(0x154)]>0x0)[_0x31c15e(0x13b)](([_0xc89b2b,_0x2a5760])=>[_0xc89b2b,String(_0x2a5760)[_0x31c15e(0x17b)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x510efa){const _0x4236bb=await fetchNpmDistTags();return _0x4236bb?.[_0x510efa]??null;}async function fetchLatestVersion(){return fetchNpmDistTagVersion('latest');}async function resolveTargetVersion(_0xa65058){const _0x11055c=a40_0xec82cb,_0x40303c=getRequestedVersion(_0xa65058);if(_0x40303c)return{'version':_0x40303c,'source':_0x11055c(0x151)};if(_0xa65058[_0x11055c(0x12d)](_0x11055c(0x178))){const _0x4c3f39=await fetchNpmDistTagVersion('beta');if(!_0x4c3f39)return null;return{'version':_0x4c3f39,'source':_0x11055c(0x178)};}const _0xce5b56=await fetchLatestVersion();if(!_0xce5b56)return null;return{'version':_0xce5b56,'source':'latest'};}function a40_0x1e5f(_0x1e70fb,_0x52e921){_0x1e70fb=_0x1e70fb-0x129;const _0x407d1b=a40_0x407d();let _0x1e5f05=_0x407d1b[_0x1e70fb];return _0x1e5f05;}function shouldInstallTarget(_0x2a3f05,_0x3fffe2){const _0x16ce1e=a40_0xec82cb;if(_0x3fffe2['source']==='version'||_0x3fffe2[_0x16ce1e(0x158)]===_0x16ce1e(0x178))return!a40_0x1cff65['eq'](_0x2a3f05,_0x3fffe2[_0x16ce1e(0x151)]);return a40_0x1cff65['lt'](_0x2a3f05,_0x3fffe2[_0x16ce1e(0x151)]);}function getInstallPlanLabel(_0x23350a,_0x45cb33){const _0x236533=a40_0xec82cb;switch(_0x45cb33[_0x236533(0x158)]){case _0x236533(0x178):return _0x236533(0x165)+a40_0x22541e[_0x236533(0x15f)](_0x23350a)+_0x236533(0x152)+a40_0x22541e['green'](_0x45cb33[_0x236533(0x151)]);case _0x236533(0x151):return _0x236533(0x129)+a40_0x22541e[_0x236533(0x15f)](_0x23350a)+_0x236533(0x152)+a40_0x22541e[_0x236533(0x153)](_0x45cb33[_0x236533(0x151)]);case'latest':default:return _0x236533(0x141)+a40_0x22541e[_0x236533(0x15f)](_0x23350a)+_0x236533(0x152)+a40_0x22541e[_0x236533(0x153)](_0x45cb33[_0x236533(0x151)]);}}function a40_0x407d(){const _0x15051f=['\x20\x20Try\x20manually:\x20','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','yellow','\x20install\x20-g\x20','2259IkdWRm','repairCommand',',\x20state\x20','Current\x20version:\x20','Beta\x20version:\x20','3mfCrJD','red','log','json','gray','toLowerCase','1008796EVxZlU','fail','succeed','timeout','skillVersion','43205pZingw','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','npm','194ODnHNz','Version\x20comparison\x20failed','valid','225470wzjeKv','beta','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','includes','trim','error','Updated\x20to\x20v','Checking\x20for\x20updates...','current','Requested\x20version:\x20','Update\x20failed','entries','install','bool',']:\x20','start','fromEntries','189MQwXfk','Current\x20version\x20v','Updating\x20via\x20',',\x20found\x20','Already\x20on\x20requested\x20version\x20(v','5410elrPur','expected\x20','update','42YVIEGX','message','map','str','run','https://registry.npmjs.org/-/package/','validation','@latest','Update\x20available:\x20','boolean','180knMpPI','bun','/dist-tags','object','read','Checking\x20CLI\x20Built-in\x20Skill...','execPath','266799iBHXyn','state','unknown','string','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','\x20\x20Run\x20manually:\x20','\x20is\x20up\x20to\x20date.','version','\x20→\x20','green','length','\x20\x20CLI\x20Built-in\x20Skill\x20','76872yStsMh','info','source','4653xWjWwI','...','Install\x20a\x20specific\x20CLI\x20version','\x20\x20Built-in\x20Skill\x20verification\x20failed:\x20'];a40_0x407d=function(){return _0x15051f;};return a40_0x407d();}function repairCurrentBuiltinSkill(){const _0x23b5b5=a40_0xec82cb;console[_0x23b5b5(0x168)](a40_0x22541e['gray'](_0x23b5b5(0x148)));const _0x264fc6=installBuiltinSkill();if(_0x264fc6['ok'])return console[_0x23b5b5(0x168)](a40_0x22541e[_0x23b5b5(0x16a)]('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0x264fc6[_0x23b5b5(0x170)]+_0x23b5b5(0x150))),!![];return console['warn'](a40_0x22541e[_0x23b5b5(0x15f)]('\x20\x20CLI\x20Built-in\x20Skill\x20repair\x20failed\x20['+_0x264fc6['code']+_0x23b5b5(0x12e)+(_0x264fc6[_0x23b5b5(0x17c)]||_0x23b5b5(0x14c)))),console['log'](a40_0x22541e[_0x23b5b5(0x16a)](_0x23b5b5(0x14f)+CLI_BIN_NAME+'\x20cli-skill\x20install')),![];}function verifyUpdatedBuiltinSkill(_0x1f64b6){const _0x293601=a40_0xec82cb,_0x5d73bb=inspectInstalledBuiltinSkillVersion(_0x1f64b6);if(_0x5d73bb[_0x293601(0x14b)]===_0x293601(0x17f))return console[_0x293601(0x168)](a40_0x22541e[_0x293601(0x16a)](_0x293601(0x155)+_0x1f64b6+_0x293601(0x150))),!![];const _0x392971=_0x5d73bb[_0x293601(0x170)]?'expected\x20'+_0x1f64b6+_0x293601(0x134)+_0x5d73bb[_0x293601(0x170)]:_0x293601(0x137)+_0x1f64b6+_0x293601(0x163)+_0x5d73bb[_0x293601(0x14b)];return console['warn'](a40_0x22541e[_0x293601(0x15f)](_0x293601(0x15c)+_0x392971)),console[_0x293601(0x168)](a40_0x22541e['gray']('\x20\x20Run\x20manually:\x20'+_0x5d73bb[_0x293601(0x162)])),![];}async function execute(_0x2be43d){const _0x5d4ff6=a40_0xec82cb;await validateUpdateFlags(_0x2be43d);const _0x4fa823=getCurrentVersion();console[_0x5d4ff6(0x168)](_0x5d4ff6(0x164)+_0x4fa823);const _0x25c71f=a40_0x34cb71(_0x5d4ff6(0x17e))[_0x5d4ff6(0x12f)](),_0x27bd81=await resolveTargetVersion(_0x2be43d);if(!_0x27bd81){const _0x22ca9f=_0x2be43d[_0x5d4ff6(0x12d)](_0x5d4ff6(0x178))?_0x5d4ff6(0x15e):'Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)';return _0x25c71f[_0x5d4ff6(0x16d)](_0x22ca9f),console[_0x5d4ff6(0x168)](a40_0x22541e[_0x5d4ff6(0x16a)]('\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20'+NPM_PACKAGE_NAME+_0x5d4ff6(0x140))),{'ok':![],'message':_0x22ca9f};}const _0x3b1fd3=a40_0x1cff65[_0x5d4ff6(0x176)](VERSION),_0x28b21c=a40_0x1cff65['valid'](_0x27bd81['version']);if(!_0x3b1fd3||!_0x28b21c)return _0x25c71f[_0x5d4ff6(0x16d)](_0x5d4ff6(0x175)),{'ok':![],'message':_0x5d4ff6(0x175)};if(!shouldInstallTarget(_0x3b1fd3,_0x27bd81)){const _0xba7515=_0x27bd81[_0x5d4ff6(0x158)]===_0x5d4ff6(0x151)?_0x5d4ff6(0x135)+_0x27bd81[_0x5d4ff6(0x151)]+')':a40_0x1cff65['gt'](_0x3b1fd3,_0x28b21c)?_0x5d4ff6(0x132)+_0x4fa823+'\x20is\x20newer\x20than\x20npm\x20latest\x20v'+_0x27bd81[_0x5d4ff6(0x151)]:'Already\x20up\x20to\x20date\x20(v'+_0x27bd81['version']+')';return _0x25c71f[_0x5d4ff6(0x16e)](_0xba7515),{'ok':repairCurrentBuiltinSkill()};}_0x25c71f[_0x5d4ff6(0x157)](getInstallPlanLabel(_0x4fa823,_0x27bd81));const _0x1e871d=detectPackageManager(),_0x4f1013=_0x1e871d===_0x5d4ff6(0x173)?resolveNpmBin(_0x5d4ff6(0x173)):_0x1e871d,_0x554a5e=a40_0x34cb71(_0x5d4ff6(0x133)+_0x1e871d+_0x5d4ff6(0x15a))[_0x5d4ff6(0x12f)]();try{return await execa(_0x4f1013,[_0x5d4ff6(0x12c),'-g',NPM_PACKAGE_NAME+'@'+_0x27bd81[_0x5d4ff6(0x151)]],{'stdio':'pipe'}),_0x554a5e[_0x5d4ff6(0x16e)](_0x5d4ff6(0x17d)+_0x27bd81[_0x5d4ff6(0x151)]),console['log'](a40_0x22541e[_0x5d4ff6(0x16a)](_0x5d4ff6(0x14e))),{'ok':verifyUpdatedBuiltinSkill(_0x27bd81['version'])};}catch(_0x4f18ce){return _0x554a5e[_0x5d4ff6(0x16d)](_0x5d4ff6(0x12a)),console[_0x5d4ff6(0x17c)](a40_0x22541e[_0x5d4ff6(0x167)]('\x20\x20'+_0x4f18ce[_0x5d4ff6(0x13a)])),console['log'](a40_0x22541e[_0x5d4ff6(0x16a)](_0x5d4ff6(0x15d)+_0x1e871d+_0x5d4ff6(0x160)+NPM_PACKAGE_NAME+'@'+_0x27bd81[_0x5d4ff6(0x151)])),{'ok':![],'message':_0x4f18ce[_0x5d4ff6(0x13a)]};}}export const updateDefinition={'service':a40_0xec82cb(0x138),'command':a40_0xec82cb(0x13d),'description':a40_0xec82cb(0x179),'risk':a40_0xec82cb(0x147),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
@@ -1 +1 @@
1
- (function(_0x11ca9e,_0x3f3199){const _0x4813c2=a41_0xb96a,_0x523a63=_0x11ca9e();while(!![]){try{const _0x4a1862=-parseInt(_0x4813c2(0x143))/0x1*(-parseInt(_0x4813c2(0x141))/0x2)+parseInt(_0x4813c2(0x146))/0x3+parseInt(_0x4813c2(0x145))/0x4+-parseInt(_0x4813c2(0x147))/0x5+-parseInt(_0x4813c2(0x13f))/0x6*(-parseInt(_0x4813c2(0x140))/0x7)+parseInt(_0x4813c2(0x144))/0x8+-parseInt(_0x4813c2(0x142))/0x9;if(_0x4a1862===_0x3f3199)break;else _0x523a63['push'](_0x523a63['shift']());}catch(_0x14a854){_0x523a63['push'](_0x523a63['shift']());}}}(a41_0x1cf8,0xd6663));import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';function a41_0x1cf8(){const _0x3732b5=['1476570akqZSO','16212069KuMLPH','1mGhZzG','11088120qWdrOJ','687144Wxysoo','672915hmoetT','2952100KhDPCK','186MAJIlU','169253KLslHd'];a41_0x1cf8=function(){return _0x3732b5;};return a41_0x1cf8();}function a41_0xb96a(_0x477024,_0x415060){_0x477024=_0x477024-0x13f;const _0x1cf8a2=a41_0x1cf8();let _0xb96ae7=_0x1cf8a2[_0x477024];return _0xb96ae7;}export const codegenDefinitions=[codegenSdk,codegenSql];
1
+ (function(_0x23a1e8,_0x187155){const _0x4b9b55=a41_0x2f1c,_0x3b6dbe=_0x23a1e8();while(!![]){try{const _0x42c909=parseInt(_0x4b9b55(0x6e))/0x1+-parseInt(_0x4b9b55(0x72))/0x2*(parseInt(_0x4b9b55(0x71))/0x3)+-parseInt(_0x4b9b55(0x6f))/0x4*(parseInt(_0x4b9b55(0x6c))/0x5)+parseInt(_0x4b9b55(0x70))/0x6*(parseInt(_0x4b9b55(0x75))/0x7)+parseInt(_0x4b9b55(0x6d))/0x8+-parseInt(_0x4b9b55(0x73))/0x9*(parseInt(_0x4b9b55(0x76))/0xa)+parseInt(_0x4b9b55(0x74))/0xb;if(_0x42c909===_0x187155)break;else _0x3b6dbe['push'](_0x3b6dbe['shift']());}catch(_0x292cdb){_0x3b6dbe['push'](_0x3b6dbe['shift']());}}}(a41_0x50c9,0x9833d));import{codegenSdk}from'../../commands/codegen/sdk.js';function a41_0x50c9(){const _0x53b755=['638004WCSTSs','708dDGMbt','12DxEepU','596724rNWlVa','6KRTvYP','2963277yGwYYP','10742743Eepang','21679HFTouC','10FHtjeu','24865xQIXbr','6470464fdFwmb'];a41_0x50c9=function(){return _0x53b755;};return a41_0x50c9();}function a41_0x2f1c(_0x5bd702,_0x200f83){_0x5bd702=_0x5bd702-0x6c;const _0x50c964=a41_0x50c9();let _0x2f1c45=_0x50c964[_0x5bd702];return _0x2f1c45;}import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
@@ -1 +1 @@
1
- function a42_0x29b1(_0xebac9d,_0x1b4b4f){_0xebac9d=_0xebac9d-0x17c;const _0x2f6c8f=a42_0x2f6c();let _0x29b1c0=_0x2f6c8f[_0xebac9d];return _0x29b1c0;}const a42_0x62af53=a42_0x29b1;(function(_0x236ecd,_0x45c57e){const _0x124c24=a42_0x29b1,_0x5c5752=_0x236ecd();while(!![]){try{const _0x533d9d=parseInt(_0x124c24(0x186))/0x1*(parseInt(_0x124c24(0x188))/0x2)+-parseInt(_0x124c24(0x180))/0x3*(parseInt(_0x124c24(0x185))/0x4)+-parseInt(_0x124c24(0x191))/0x5+-parseInt(_0x124c24(0x182))/0x6+parseInt(_0x124c24(0x17c))/0x7+parseInt(_0x124c24(0x189))/0x8*(parseInt(_0x124c24(0x18f))/0x9)+-parseInt(_0x124c24(0x18e))/0xa*(-parseInt(_0x124c24(0x181))/0xb);if(_0x533d9d===_0x45c57e)break;else _0x5c5752['push'](_0x5c5752['shift']());}catch(_0x32f7ec){_0x5c5752['push'](_0x5c5752['shift']());}}}(a42_0x2f6c,0x75943));function a42_0x2f6c(){const _0x3d9982=['code','132295MMMGXH','Omit\x20import\x20statements\x20from\x20generated\x20code','codegen','operation','6422423vGHEWv','string','str','read','3NZTzLf','22NCEghl','3997830mZmVnw','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','alias','3631060zNFeBn','1849PradxL','name','870RmGfNj','343936zKZCxa','tableName','bool','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','skip-imports','1586680vtotcA','9SIsroY'];a42_0x2f6c=function(){return _0x3d9982;};return a42_0x2f6c();}import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a42_0x62af53(0x193),'command':'sdk','description':a42_0x62af53(0x183),'risk':a42_0x62af53(0x17f),'flags':[CODE_FLAG_OPTIONAL,{'name':a42_0x62af53(0x184),'type':a42_0x62af53(0x17d),'description':a42_0x62af53(0x18c)},{'name':a42_0x62af53(0x194),'type':a42_0x62af53(0x17d),'required':!![],'description':'Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)'},{'name':'skip-imports','type':'boolean','description':a42_0x62af53(0x192)}],async 'execute'(_0x4114e4){const _0x244315=a42_0x62af53,{dataset:_0x5698e5,operation:_0x32e92a}=await getOperationDetail(_0x4114e4['appCode'],_0x4114e4['str'](_0x244315(0x190)),_0x4114e4['str']('operation')),_0x325dc8=generateSdkCode(_0x5698e5,_0x32e92a,{'includeImports':!_0x4114e4[_0x244315(0x18b)](_0x244315(0x18d))});return{'ok':!![],'data':{'dataset':{'name':_0x5698e5[_0x244315(0x187)],'code':_0x5698e5[_0x244315(0x190)],'tableName':_0x5698e5[_0x244315(0x18a)]},'operation':_0x4114e4[_0x244315(0x17e)](_0x244315(0x194)),'code':_0x325dc8}};}};
1
+ const a42_0x4ee3dc=a42_0x1282;function a42_0x1282(_0x4ed5b4,_0x15da83){_0x4ed5b4=_0x4ed5b4-0x16b;const _0xf7d9e1=a42_0xf7d9();let _0x128229=_0xf7d9e1[_0x4ed5b4];return _0x128229;}(function(_0x1f2745,_0x5b02fd){const _0x545e1a=a42_0x1282,_0x29aabc=_0x1f2745();while(!![]){try{const _0x4994d8=parseInt(_0x545e1a(0x178))/0x1+parseInt(_0x545e1a(0x17a))/0x2+-parseInt(_0x545e1a(0x181))/0x3*(parseInt(_0x545e1a(0x177))/0x4)+-parseInt(_0x545e1a(0x17f))/0x5+-parseInt(_0x545e1a(0x16c))/0x6*(-parseInt(_0x545e1a(0x179))/0x7)+parseInt(_0x545e1a(0x171))/0x8+-parseInt(_0x545e1a(0x174))/0x9;if(_0x4994d8===_0x5b02fd)break;else _0x29aabc['push'](_0x29aabc['shift']());}catch(_0x188ba9){_0x29aabc['push'](_0x29aabc['shift']());}}}(a42_0xf7d9,0x38e15));function a42_0xf7d9(){const _0x32125b=['sdk','20576QSnXkU','alias','skip-imports','4876038mhwgKM','bool','str','4828vKhlLx','387326iujpQQ','7QuPFWV','870946hNSVqY','string','code','operation','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','1125925Szoaty','read','90CqSSkg','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','appCode','1264722AsTiTX','tableName','Omit\x20import\x20statements\x20from\x20generated\x20code','codegen'];a42_0xf7d9=function(){return _0x32125b;};return a42_0xf7d9();}import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a42_0x4ee3dc(0x16f),'command':a42_0x4ee3dc(0x170),'description':a42_0x4ee3dc(0x182),'risk':a42_0x4ee3dc(0x180),'flags':[CODE_FLAG_OPTIONAL,{'name':a42_0x4ee3dc(0x172),'type':a42_0x4ee3dc(0x17b),'description':a42_0x4ee3dc(0x183)},{'name':'operation','type':a42_0x4ee3dc(0x17b),'required':!![],'description':a42_0x4ee3dc(0x17e)},{'name':'skip-imports','type':'boolean','description':a42_0x4ee3dc(0x16e)}],async 'execute'(_0x35d34f){const _0x4c09ee=a42_0x4ee3dc,{dataset:_0x65015b,operation:_0xbc71b5}=await getOperationDetail(_0x35d34f[_0x4c09ee(0x16b)],_0x35d34f['str'](_0x4c09ee(0x17c)),_0x35d34f[_0x4c09ee(0x176)](_0x4c09ee(0x17d))),_0x56dab5=generateSdkCode(_0x65015b,_0xbc71b5,{'includeImports':!_0x35d34f[_0x4c09ee(0x175)](_0x4c09ee(0x173))});return{'ok':!![],'data':{'dataset':{'name':_0x65015b['name'],'code':_0x65015b['code'],'tableName':_0x65015b[_0x4c09ee(0x16d)]},'operation':_0x35d34f[_0x4c09ee(0x176)](_0x4c09ee(0x17d)),'code':_0x56dab5}};}};
@@ -1 +1 @@
1
- const a43_0x1480bf=a43_0x1366;(function(_0x21f9b1,_0x403703){const _0xdab20a=a43_0x1366,_0x3a8f73=_0x21f9b1();while(!![]){try{const _0x423257=-parseInt(_0xdab20a(0x126))/0x1*(-parseInt(_0xdab20a(0x12a))/0x2)+parseInt(_0xdab20a(0x134))/0x3*(parseInt(_0xdab20a(0x135))/0x4)+parseInt(_0xdab20a(0x12b))/0x5+-parseInt(_0xdab20a(0x122))/0x6*(parseInt(_0xdab20a(0x12c))/0x7)+parseInt(_0xdab20a(0x138))/0x8*(parseInt(_0xdab20a(0x11f))/0x9)+-parseInt(_0xdab20a(0x133))/0xa*(-parseInt(_0xdab20a(0x131))/0xb)+-parseInt(_0xdab20a(0x120))/0xc;if(_0x423257===_0x403703)break;else _0x3a8f73['push'](_0x3a8f73['shift']());}catch(_0x3fb8ae){_0x3a8f73['push'](_0x3a8f73['shift']());}}}(a43_0x3714,0x822f9));function a43_0x1366(_0x4d3a6c,_0x4c250b){_0x4d3a6c=_0x4d3a6c-0x11e;const _0x371493=a43_0x3714();let _0x136637=_0x371493[_0x4d3a6c];return _0x136637;}import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a43_0x3714(){const _0xe9b11=['1081YXsATW','sqlcode','bool','bff','78WTEEgK','399580ffODWD','338366ZZmpid','no-imports','sdk','string','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','81499kyAcod','boolean','190zHAKqp','495177XDeOCW','4waunWS','sqlCode','appCode','64hbameN','read','1171071dFdTGA','3106608PRhFLg','str','84onoDPs','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','codegen','target'];a43_0x3714=function(){return _0xe9b11;};return a43_0x3714();}export const codegenSql={'service':a43_0x1480bf(0x124),'command':'sql','description':a43_0x1480bf(0x130),'risk':a43_0x1480bf(0x11e),'flags':[SQLCODE_FLAG,{'name':a43_0x1480bf(0x125),'type':a43_0x1480bf(0x12f),'description':a43_0x1480bf(0x123),'default':'sdk','enum':['sdk',a43_0x1480bf(0x129)]},{'name':a43_0x1480bf(0x12d),'type':a43_0x1480bf(0x132),'description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x313d9d){const _0x21718e=a43_0x1480bf,_0x49064c=await getSqlQueryInfo(_0x313d9d[_0x21718e(0x137)],_0x313d9d[_0x21718e(0x121)](_0x21718e(0x127))),_0x22faab=_0x313d9d[_0x21718e(0x121)]('target')||_0x21718e(0x12e),_0x19c2b8=generateSqlCodeTemplate(_0x49064c,{'target':_0x22faab,'includeImports':!_0x313d9d[_0x21718e(0x128)](_0x21718e(0x12d))});return{'ok':!![],'data':{'sqlCode':_0x49064c[_0x21718e(0x136)],'sqlName':_0x49064c['sqlName'],'target':_0x22faab,'code':_0x19c2b8}};}};
1
+ const a43_0x59b017=a43_0x20c6;(function(_0x4d4812,_0x2ba0de){const _0x265d18=a43_0x20c6,_0xbacb7e=_0x4d4812();while(!![]){try{const _0x5eaa66=-parseInt(_0x265d18(0x1d8))/0x1+parseInt(_0x265d18(0x1dd))/0x2*(-parseInt(_0x265d18(0x1d6))/0x3)+-parseInt(_0x265d18(0x1dc))/0x4*(parseInt(_0x265d18(0x1de))/0x5)+-parseInt(_0x265d18(0x1e5))/0x6+-parseInt(_0x265d18(0x1e4))/0x7+parseInt(_0x265d18(0x1d4))/0x8*(parseInt(_0x265d18(0x1e0))/0x9)+parseInt(_0x265d18(0x1e6))/0xa;if(_0x5eaa66===_0x2ba0de)break;else _0xbacb7e['push'](_0xbacb7e['shift']());}catch(_0xffdcac){_0xbacb7e['push'](_0xbacb7e['shift']());}}}(a43_0x1674,0x4bb39));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';function a43_0x20c6(_0x5331b7,_0x3de3a3){_0x5331b7=_0x5331b7-0x1d4;const _0x167484=a43_0x1674();let _0x20c6f3=_0x167484[_0x5331b7];return _0x20c6f3;}import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a43_0x1674(){const _0x208c54=['402282PPzrPR','codegen','no-imports','sdk','6364rXHssf','100ywCyAF','850houLdA','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','117GhfOmL','boolean','appCode','bool','1420762JvSXgd','1223412vsYvxq','11624520fcitOF','sqlcode','string','sqlCode','target','Omit\x20import\x20statements\x20from\x20generated\x20code','208856PtFnJu','read','6729ShBILM','sql'];a43_0x1674=function(){return _0x208c54;};return a43_0x1674();}export const codegenSql={'service':a43_0x59b017(0x1d9),'command':a43_0x59b017(0x1d7),'description':a43_0x59b017(0x1df),'risk':a43_0x59b017(0x1d5),'flags':[SQLCODE_FLAG,{'name':a43_0x59b017(0x1ea),'type':a43_0x59b017(0x1e8),'description':'Code\x20target:\x20sdk\x20(default)\x20or\x20bff','default':a43_0x59b017(0x1db),'enum':[a43_0x59b017(0x1db),'bff']},{'name':a43_0x59b017(0x1da),'type':a43_0x59b017(0x1e1),'description':a43_0x59b017(0x1eb)}],async 'execute'(_0x3a9cc2){const _0xfa8bf6=a43_0x59b017,_0x1fa957=await getSqlQueryInfo(_0x3a9cc2[_0xfa8bf6(0x1e2)],_0x3a9cc2['str'](_0xfa8bf6(0x1e7))),_0x36ca4b=_0x3a9cc2['str']('target')||'sdk',_0xaa481e=generateSqlCodeTemplate(_0x1fa957,{'target':_0x36ca4b,'includeImports':!_0x3a9cc2[_0xfa8bf6(0x1e3)](_0xfa8bf6(0x1da))});return{'ok':!![],'data':{'sqlCode':_0x1fa957[_0xfa8bf6(0x1e9)],'sqlName':_0x1fa957['sqlName'],'target':_0x36ca4b,'code':_0xaa481e}};}};
@@ -1 +1 @@
1
- (function(_0x377663,_0xecaa5d){const _0x490f7b=a44_0x1426,_0x24a252=_0x377663();while(!![]){try{const _0x537f95=parseInt(_0x490f7b(0xfe))/0x1+parseInt(_0x490f7b(0xd6))/0x2+-parseInt(_0x490f7b(0xfc))/0x3+-parseInt(_0x490f7b(0xed))/0x4+-parseInt(_0x490f7b(0xd9))/0x5+parseInt(_0x490f7b(0xf4))/0x6+parseInt(_0x490f7b(0xd7))/0x7;if(_0x537f95===_0xecaa5d)break;else _0x24a252['push'](_0x24a252['shift']());}catch(_0x2647a6){_0x24a252['push'](_0x24a252['shift']());}}}(a44_0x42c2,0x5bebb));function a44_0x42c2(){const _0x2d6ec5=['574161qsHfFZ','\x20config.','\x20<name>','\x20Note:\x20app\x20\x22','flagMissing','Updated','\x22\x20still\x20defined\x20in\x20','1063860owwbsS','7556948lWfHgv','args','3478900MzTwgJ','validation','boolean','appcode','apps','projectConfig','App\x20\x22','str','\x20Default\x20app\x20is\x20\x22','project','\x20<name>\x20[--global]','both','Use\x20global\x20config\x20scope','trim','length','defaultApp','bool','globalConfig','\x20<name>\x20--appcode\x20<code>','Missing\x20app\x20name.','2776384qyRbtz','Usage:\x20','App\x20code','\x22\x20not\x20found.','\x20app\x20\x22','object','\x22\x20is\x20selected\x20automatically.','1006644pNbUuD','\x20Remaining\x20app\x20\x22','\x22\x20(appcode:\x20','keys','Added','Removed\x20app\x20\x22','string','global','1761138BoocIL','\x20Default\x20app\x20changed\x20to\x20\x22'];a44_0x42c2=function(){return _0x2d6ec5;};return a44_0x42c2();}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs,normalizeStoredDefaultApp}from'../../config/schema.js';import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';function a44_0x1426(_0x135ff4,_0x45fb17){_0x135ff4=_0x135ff4-0xd5;const _0x42c201=a44_0x42c2();let _0x142698=_0x42c201[_0x135ff4];return _0x142698;}export function buildAppAddFlags(){const _0x3b9633=a44_0x1426;return[{'name':_0x3b9633(0xdc),'type':_0x3b9633(0xfa),'description':_0x3b9633(0xef),'required':!![]},{'name':_0x3b9633(0xfb),'type':_0x3b9633(0xdb),'description':_0x3b9633(0xe5),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x263ab1=a44_0x1426;return[{'name':'global','type':_0x263ab1(0xdb),'description':_0x263ab1(0xe5),'default':![]}];}export async function validateAppName(_0x4844f5,_0x53238d){const _0x1d9a8f=a44_0x1426,_0x4abb67=_0x4844f5['args'][0x0]?.[_0x1d9a8f(0xe6)]();if(!_0x4abb67)throw CliErrors['validation'](_0x1d9a8f(0xec),_0x1d9a8f(0xee)+CLI_BIN_NAME+'\x20'+_0x53238d+_0x1d9a8f(0x100));}export async function runAppAdd(_0x3355f4,_0x9a1a2a){const _0x47f646=a44_0x1426,_0x4ea193=_0x3355f4[_0x47f646(0xd8)][0x0]?.[_0x47f646(0xe6)]();if(!_0x4ea193)throw CliErrors[_0x47f646(0xda)](_0x47f646(0xec),_0x47f646(0xee)+CLI_BIN_NAME+'\x20'+_0x9a1a2a+_0x47f646(0xeb));const _0x2e6c35=_0x3355f4[_0x47f646(0xe0)]('appcode');if(!_0x2e6c35)throw CliErrors[_0x47f646(0x102)]('appcode',_0x47f646(0xee)+CLI_BIN_NAME+'\x20'+_0x9a1a2a+_0x47f646(0xeb));const _0x9429a2={'global':_0x3355f4[_0x47f646(0xe9)]('global')},_0x40ee52=readConfig(_0x9429a2);if(!_0x40ee52[_0x47f646(0xdd)])_0x40ee52[_0x47f646(0xdd)]={};const _0x50cdd5={'appcode':_0x2e6c35,...collectAppProfileOverrides(_0x43dd51=>_0x3355f4[_0x47f646(0xe0)](_0x43dd51))},_0x53cca3=_0x40ee52[_0x47f646(0xdd)],_0x3f5b6f=Object[_0x47f646(0xf7)](_0x53cca3),_0x496ade=typeof _0x40ee52[_0x47f646(0xe8)]==='string'&&_0x53cca3[_0x40ee52[_0x47f646(0xe8)]]?_0x40ee52[_0x47f646(0xe8)]:_0x3f5b6f[_0x47f646(0xe7)]===0x1?_0x3f5b6f[0x0]:undefined,_0x45c7bb=!!_0x53cca3[_0x4ea193];_0x53cca3[_0x4ea193]=_0x50cdd5;const _0x182d42=normalizeStoredDefaultApp(_0x40ee52,_0x496ade);writeConfig(_0x40ee52,_0x9429a2);const _0x196830=!_0x45c7bb&&_0x182d42?_0x47f646(0xe1)+_0x182d42+'\x22.':'',_0xdcf57b=(_0x45c7bb?_0x47f646(0x103):_0x47f646(0xf8))+_0x47f646(0xf1)+_0x4ea193+_0x47f646(0xf6)+_0x2e6c35+')'+scopeLabel(_0x9429a2)+'.'+_0x196830;return{'ok':!![],'message':_0xdcf57b};}export async function runAppRemove(_0x207e05,_0x517b1d){const _0x3bd9a1=a44_0x1426,_0x2558f=_0x207e05[_0x3bd9a1(0xd8)][0x0]?.['trim']();if(!_0x2558f)throw CliErrors[_0x3bd9a1(0xda)](_0x3bd9a1(0xec),_0x3bd9a1(0xee)+CLI_BIN_NAME+'\x20'+_0x517b1d+_0x3bd9a1(0xe3));const _0x2b8e0d=_0x207e05[_0x3bd9a1(0xe9)](_0x3bd9a1(0xfb)),{config:_0x3cfe86,layers:_0x2d5b5a}=readRawConfigWithLayers(),_0x40c8ba=_0x3cfe86[_0x3bd9a1(0xdd)]??{};if(!_0x40c8ba[_0x2558f])throw CliErrors['validation'](_0x3bd9a1(0xdf)+_0x2558f+'\x22\x20not\x20found.');const _0x51c903=_0x2d5b5a[_0x3bd9a1(0xea)][_0x3bd9a1(0xdd)]&&typeof _0x2d5b5a[_0x3bd9a1(0xea)]['apps']===_0x3bd9a1(0xf2)?_0x2d5b5a[_0x3bd9a1(0xea)][_0x3bd9a1(0xdd)]:{},_0x59375f=_0x2d5b5a[_0x3bd9a1(0xde)][_0x3bd9a1(0xdd)]&&typeof _0x2d5b5a[_0x3bd9a1(0xde)][_0x3bd9a1(0xdd)]===_0x3bd9a1(0xf2)?_0x2d5b5a['projectConfig'][_0x3bd9a1(0xdd)]:{},_0xd9cf80=appDefinedIn(_0x2558f,_0x51c903,_0x59375f),_0x2c2347=resolveAppScopeForWrite(_0x2558f,_0x2b8e0d,_0x2d5b5a),_0x5603cf={'global':_0x2c2347===_0x3bd9a1(0xfb)},_0x20dd2c=readConfig(_0x5603cf),_0x46c6e5=_0x20dd2c['apps'];if(!_0x46c6e5||!_0x46c6e5[_0x2558f])throw CliErrors[_0x3bd9a1(0xda)](_0x3bd9a1(0xdf)+_0x2558f+_0x3bd9a1(0xf0));delete _0x46c6e5[_0x2558f];let _0x11dbc4='';const _0x3921a0=typeof _0x20dd2c[_0x3bd9a1(0xe8)]===_0x3bd9a1(0xfa)?_0x20dd2c[_0x3bd9a1(0xe8)]:undefined,_0x414cb8=Object[_0x3bd9a1(0xf7)](_0x46c6e5),_0x3cfd49=_0x3921a0===_0x2558f?_0x414cb8[0x0]:_0x3921a0,_0x25ef05=normalizeStoredDefaultApp(_0x20dd2c,_0x3cfd49);if(_0x3921a0===_0x2558f&&_0x414cb8['length']===0x1)_0x11dbc4=_0x3bd9a1(0xf5)+_0x414cb8[0x0]+_0x3bd9a1(0xf3);else _0x3921a0===_0x2558f&&_0x25ef05&&(_0x11dbc4=_0x3bd9a1(0xfd)+_0x25ef05+'\x22.');Object['keys'](_0x46c6e5)['length']===0x0&&(delete _0x20dd2c[_0x3bd9a1(0xdd)],delete _0x20dd2c[_0x3bd9a1(0xe8)]);writeConfig(_0x20dd2c,_0x5603cf);const _0x47b45b=_0xd9cf80===_0x3bd9a1(0xe4)?_0x3bd9a1(0x101)+_0x2558f+_0x3bd9a1(0xd5)+(_0x2c2347==='project'?'global':_0x3bd9a1(0xe2))+_0x3bd9a1(0xff):'';return{'ok':!![],'message':_0x3bd9a1(0xf9)+_0x2558f+'\x22'+scopeLabel(_0x5603cf)+'.'+_0x11dbc4+_0x47b45b};}
1
+ function a44_0x4aed(_0x4146d8,_0x1b3cf6){_0x4146d8=_0x4146d8-0x8e;const _0x2784fd=a44_0x2784();let _0x4aed79=_0x2784fd[_0x4146d8];return _0x4aed79;}function a44_0x2784(){const _0x16cd43=['\x22\x20(appcode:\x20','object','projectConfig','414708rtnqxL','5384UETBre','App\x20\x22','trim','flagMissing','218543PwmSdp','bool','5589OAmRye','apps','\x22\x20not\x20found.','args','str','appcode','9378ARvKzj','project','\x20<name>\x20[--global]','defaultApp','753pMCXiV','\x20Default\x20app\x20is\x20\x22','boolean','Added','global','App\x20code','string','\x20<name>','validation','728AgqolR','\x22\x20is\x20selected\x20automatically.','globalConfig','\x20Remaining\x20app\x20\x22','8MFjlwk','22WSpvWX','Usage:\x20','keys','1058530aPPdGt','length','\x20app\x20\x22','Removed\x20app\x20\x22','556350JPNdCb','Missing\x20app\x20name.','\x20<name>\x20--appcode\x20<code>','1186IFcAIp','\x20Default\x20app\x20changed\x20to\x20\x22'];a44_0x2784=function(){return _0x16cd43;};return a44_0x2784();}(function(_0x438174,_0x4ec10e){const _0xb544a1=a44_0x4aed,_0x51ec18=_0x438174();while(!![]){try{const _0x489aa5=parseInt(_0xb544a1(0xbb))/0x1+-parseInt(_0xb544a1(0xb1))/0x2*(parseInt(_0xb544a1(0x99))/0x3)+-parseInt(_0xb544a1(0xa6))/0x4*(parseInt(_0xb544a1(0xaa))/0x5)+parseInt(_0xb544a1(0x95))/0x6*(parseInt(_0xb544a1(0xa2))/0x7)+parseInt(_0xb544a1(0xb7))/0x8*(parseInt(_0xb544a1(0x8f))/0x9)+-parseInt(_0xb544a1(0xae))/0xa+-parseInt(_0xb544a1(0xa7))/0xb*(-parseInt(_0xb544a1(0xb6))/0xc);if(_0x489aa5===_0x4ec10e)break;else _0x51ec18['push'](_0x51ec18['shift']());}catch(_0x243bf5){_0x51ec18['push'](_0x51ec18['shift']());}}}(a44_0x2784,0x3aa80));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs,normalizeStoredDefaultApp}from'../../config/schema.js';import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';export function buildAppAddFlags(){const _0x52eb3f=a44_0x4aed;return[{'name':_0x52eb3f(0x94),'type':_0x52eb3f(0x9f),'description':_0x52eb3f(0x9e),'required':!![]},{'name':'global','type':_0x52eb3f(0x9b),'description':'Use\x20global\x20config\x20scope','default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x1f8ea6=a44_0x4aed;return[{'name':_0x1f8ea6(0x9d),'type':_0x1f8ea6(0x9b),'description':'Use\x20global\x20config\x20scope','default':![]}];}export async function validateAppName(_0x2261be,_0x305b34){const _0x4284c8=a44_0x4aed,_0x58f4d4=_0x2261be[_0x4284c8(0x92)][0x0]?.[_0x4284c8(0xb9)]();if(!_0x58f4d4)throw CliErrors[_0x4284c8(0xa1)](_0x4284c8(0xaf),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x305b34+_0x4284c8(0xa0));}export async function runAppAdd(_0x188cfa,_0x103b3f){const _0x1ab323=a44_0x4aed,_0x51ea2e=_0x188cfa[_0x1ab323(0x92)][0x0]?.[_0x1ab323(0xb9)]();if(!_0x51ea2e)throw CliErrors[_0x1ab323(0xa1)](_0x1ab323(0xaf),_0x1ab323(0xa8)+CLI_BIN_NAME+'\x20'+_0x103b3f+_0x1ab323(0xb0));const _0x32e72b=_0x188cfa[_0x1ab323(0x93)](_0x1ab323(0x94));if(!_0x32e72b)throw CliErrors[_0x1ab323(0xba)]('appcode',_0x1ab323(0xa8)+CLI_BIN_NAME+'\x20'+_0x103b3f+_0x1ab323(0xb0));const _0x41b655={'global':_0x188cfa[_0x1ab323(0x8e)]('global')},_0x541647=readConfig(_0x41b655);if(!_0x541647['apps'])_0x541647[_0x1ab323(0x90)]={};const _0xdc2219={'appcode':_0x32e72b,...collectAppProfileOverrides(_0x587e9a=>_0x188cfa[_0x1ab323(0x93)](_0x587e9a))},_0x40fa5f=_0x541647[_0x1ab323(0x90)],_0x1c8642=Object['keys'](_0x40fa5f),_0x46cb64=typeof _0x541647['defaultApp']==='string'&&_0x40fa5f[_0x541647[_0x1ab323(0x98)]]?_0x541647[_0x1ab323(0x98)]:_0x1c8642[_0x1ab323(0xab)]===0x1?_0x1c8642[0x0]:undefined,_0x462145=!!_0x40fa5f[_0x51ea2e];_0x40fa5f[_0x51ea2e]=_0xdc2219;const _0x5bd974=normalizeStoredDefaultApp(_0x541647,_0x46cb64);writeConfig(_0x541647,_0x41b655);const _0x4dd74e=!_0x462145&&_0x5bd974?_0x1ab323(0x9a)+_0x5bd974+'\x22.':'',_0x581e72=(_0x462145?'Updated':_0x1ab323(0x9c))+_0x1ab323(0xac)+_0x51ea2e+_0x1ab323(0xb3)+_0x32e72b+')'+scopeLabel(_0x41b655)+'.'+_0x4dd74e;return{'ok':!![],'message':_0x581e72};}export async function runAppRemove(_0x2d7742,_0x1c0ca7){const _0x183d2b=a44_0x4aed,_0x26a521=_0x2d7742[_0x183d2b(0x92)][0x0]?.[_0x183d2b(0xb9)]();if(!_0x26a521)throw CliErrors[_0x183d2b(0xa1)]('Missing\x20app\x20name.',_0x183d2b(0xa8)+CLI_BIN_NAME+'\x20'+_0x1c0ca7+_0x183d2b(0x97));const _0x44f164=_0x2d7742[_0x183d2b(0x8e)](_0x183d2b(0x9d)),{config:_0x3783f0,layers:_0x4962f6}=readRawConfigWithLayers(),_0x55d2aa=_0x3783f0[_0x183d2b(0x90)]??{};if(!_0x55d2aa[_0x26a521])throw CliErrors[_0x183d2b(0xa1)]('App\x20\x22'+_0x26a521+_0x183d2b(0x91));const _0x290495=_0x4962f6['globalConfig'][_0x183d2b(0x90)]&&typeof _0x4962f6[_0x183d2b(0xa4)][_0x183d2b(0x90)]===_0x183d2b(0xb4)?_0x4962f6[_0x183d2b(0xa4)][_0x183d2b(0x90)]:{},_0x4916c7=_0x4962f6['projectConfig'][_0x183d2b(0x90)]&&typeof _0x4962f6[_0x183d2b(0xb5)][_0x183d2b(0x90)]==='object'?_0x4962f6['projectConfig'][_0x183d2b(0x90)]:{},_0x580436=appDefinedIn(_0x26a521,_0x290495,_0x4916c7),_0xafabec=resolveAppScopeForWrite(_0x26a521,_0x44f164,_0x4962f6),_0x62ee9d={'global':_0xafabec==='global'},_0x5c9241=readConfig(_0x62ee9d),_0x59bd09=_0x5c9241[_0x183d2b(0x90)];if(!_0x59bd09||!_0x59bd09[_0x26a521])throw CliErrors['validation'](_0x183d2b(0xb8)+_0x26a521+_0x183d2b(0x91));delete _0x59bd09[_0x26a521];let _0x5434c1='';const _0x2432e7=typeof _0x5c9241[_0x183d2b(0x98)]===_0x183d2b(0x9f)?_0x5c9241[_0x183d2b(0x98)]:undefined,_0x6d82b9=Object[_0x183d2b(0xa9)](_0x59bd09),_0x2fec82=_0x2432e7===_0x26a521?_0x6d82b9[0x0]:_0x2432e7,_0x37106c=normalizeStoredDefaultApp(_0x5c9241,_0x2fec82);if(_0x2432e7===_0x26a521&&_0x6d82b9['length']===0x1)_0x5434c1=_0x183d2b(0xa5)+_0x6d82b9[0x0]+_0x183d2b(0xa3);else _0x2432e7===_0x26a521&&_0x37106c&&(_0x5434c1=_0x183d2b(0xb2)+_0x37106c+'\x22.');Object[_0x183d2b(0xa9)](_0x59bd09)[_0x183d2b(0xab)]===0x0&&(delete _0x5c9241['apps'],delete _0x5c9241['defaultApp']);writeConfig(_0x5c9241,_0x62ee9d);const _0x24f129=_0x580436==='both'?'\x20Note:\x20app\x20\x22'+_0x26a521+'\x22\x20still\x20defined\x20in\x20'+(_0xafabec===_0x183d2b(0x96)?_0x183d2b(0x9d):'project')+'\x20config.':'';return{'ok':!![],'message':_0x183d2b(0xad)+_0x26a521+'\x22'+scopeLabel(_0x62ee9d)+'.'+_0x5434c1+_0x24f129};}
@@ -1 +1 @@
1
- (function(_0x5badbe,_0x1e8dd7){const _0xbd609b=a45_0x5f58,_0x59f933=_0x5badbe();while(!![]){try{const _0x40121c=-parseInt(_0xbd609b(0x144))/0x1+-parseInt(_0xbd609b(0x13f))/0x2*(parseInt(_0xbd609b(0x155))/0x3)+parseInt(_0xbd609b(0x14c))/0x4*(-parseInt(_0xbd609b(0x142))/0x5)+parseInt(_0xbd609b(0x143))/0x6*(-parseInt(_0xbd609b(0x13b))/0x7)+-parseInt(_0xbd609b(0x141))/0x8+-parseInt(_0xbd609b(0x14a))/0x9*(-parseInt(_0xbd609b(0x15c))/0xa)+-parseInt(_0xbd609b(0x149))/0xb*(-parseInt(_0xbd609b(0x151))/0xc);if(_0x40121c===_0x1e8dd7)break;else _0x59f933['push'](_0x59f933['shift']());}catch(_0xedc154){_0x59f933['push'](_0x59f933['shift']());}}}(a45_0x4c56,0x9b594));function a45_0x4c56(){const _0xb60578=['(No\x20login\x20session.\x20Enter\x20an\x20App\x20Code\x20manually\x20or\x20skip.)','find','map','\x0aNo\x20available\x20apps\x20found.','72gtahxP','appName','manual','Invalid\x20App\x20Code','75OTSfMg','Fetching\x20available\x20apps...','custom','appCode','includes','length','Select\x20the\x20app\x20to\x20bind:','119230Zgrpep','\x20apps.\x20Select\x20with\x20space,\x20a=all,\x20i=invert:','7QPhWIB','skip','App\x20Code:','cyan','10108aDKgov','✎\x20Enter\x20appcode\x20manually','5375224HcHYDV','5PljfFk','706668FCzhEC','16349bjqkiQ','✎\x20Enter\x20manually','message','trim','yellow','4403289ygOcTV','99lGjwBA','gray','3857036sgQPFa'];a45_0x4c56=function(){return _0xb60578;};return a45_0x4c56();}import{input,checkbox,select}from'@inquirer/prompts';import a45_0x235f14 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x1b3aa7=a45_0x5f58,_0x3613f9=await input({'message':'App\x20Code:','validate':_0x353c06=>{const _0x2726e9=a45_0x5f58,_0x595966=validateAppcode(_0x353c06['trim']());return _0x595966['valid']||_0x595966[_0x2726e9(0x146)]||_0x2726e9(0x154);}});return _0x3613f9[_0x1b3aa7(0x147)]();}function a45_0x5f58(_0x1cbf67,_0x306362){_0x1cbf67=_0x1cbf67-0x13b;const _0x4c5637=a45_0x4c56();let _0x5f5806=_0x4c5637[_0x1cbf67];return _0x5f5806;}export async function promptAppSelection(_0x46ca98){const _0x5374c5=a45_0x5f58,_0x4e480a=[{'name':a45_0x235f14[_0x5374c5(0x148)](_0x5374c5(0x140)),'value':-0x1},..._0x46ca98[_0x5374c5(0x14f)]((_0x7ba8b3,_0x379c40)=>({'name':_0x7ba8b3[_0x5374c5(0x152)]+'\x20\x20'+a45_0x235f14[_0x5374c5(0x14b)]('('+_0x7ba8b3['appCode']+')'),'value':_0x379c40}))],_0x5931fb=await checkbox({'message':'Found\x20'+a45_0x235f14[_0x5374c5(0x13e)](_0x46ca98[_0x5374c5(0x15a)])+_0x5374c5(0x15d),'choices':_0x4e480a,'loop':![]});if(_0x5931fb[_0x5374c5(0x159)](-0x1))return _0x5374c5(0x157);if(_0x5931fb[_0x5374c5(0x15a)]===0x0)return _0x5374c5(0x157);return _0x5931fb[_0x5374c5(0x14f)](_0x348468=>_0x46ca98[_0x348468]);}export async function promptSingleAppSelection(_0x56502f){const _0x1f6c85=a45_0x5f58,_0x4a4b40=[{'name':a45_0x235f14[_0x1f6c85(0x14b)]('(Skip;\x20configure\x20later\x20with\x20config\x20set\x20appcode)'),'value':_0x1f6c85(0x13c)},{'name':a45_0x235f14[_0x1f6c85(0x148)](_0x1f6c85(0x140)),'value':_0x1f6c85(0x157)},..._0x56502f['map'](_0xeb1f5b=>({'name':_0xeb1f5b['appName']+'\x20\x20'+a45_0x235f14[_0x1f6c85(0x14b)]('('+_0xeb1f5b['appCode']+')'),'value':_0xeb1f5b[_0x1f6c85(0x158)]}))],_0xa6c578=await select({'message':_0x1f6c85(0x15b),'choices':_0x4a4b40});if(_0xa6c578===_0x1f6c85(0x13c))return _0x1f6c85(0x13c);if(_0xa6c578===_0x1f6c85(0x157))return'custom';return _0x56502f[_0x1f6c85(0x14e)](_0xa3832=>_0xa3832['appCode']===_0xa6c578);}export async function selectSingleAppcode(_0x3b130d){const _0x5bce11=a45_0x5f58;if(!_0x3b130d)return writeCliSideChannelLine(a45_0x235f14[_0x5bce11(0x14b)](_0x5bce11(0x14d))),_fallbackOrSkip();writeCliSideChannelLine(_0x5bce11(0x156));let _0x4525e0;try{_0x4525e0=await withActiveCookie(_0x3b130d,()=>listRemoteApps());}catch(_0x5cb1e4){writeCliSideChannelLine(a45_0x235f14['yellow']('Could\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.'));if(_0x5cb1e4 instanceof Error)writeCliSideChannelLine(a45_0x235f14[_0x5bce11(0x14b)]('\x20\x20('+_0x5cb1e4['message']+')'));return _fallbackOrSkip();}if(_0x4525e0[_0x5bce11(0x15a)]===0x0)return writeCliSideChannelLine(a45_0x235f14['yellow']('No\x20available\x20apps\x20found.')),_fallbackOrSkip();const _0x158b19=await promptSingleAppSelection(_0x4525e0);if(_0x158b19===_0x5bce11(0x13c))return'';if(_0x158b19===_0x5bce11(0x157))return promptCustomAppcode();return _0x158b19[_0x5bce11(0x158)];}export async function selectMultipleApps(_0x176ace){const _0x5daa32=a45_0x5f58;writeCliSideChannelLine(_0x5daa32(0x156));let _0x2ef588;try{_0x2ef588=await withActiveCookie(_0x176ace,()=>listRemoteApps());}catch(_0x542130){writeCliSideChannelLine('\x0aCould\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.');if(_0x542130 instanceof Error)writeCliSideChannelLine('\x20\x20('+_0x542130['message']+')');return _0x5daa32(0x157);}if(_0x2ef588[_0x5daa32(0x15a)]===0x0)return writeCliSideChannelLine(_0x5daa32(0x150)),_0x5daa32(0x157);return promptAppSelection(_0x2ef588);}async function _fallbackOrSkip(){const _0x5775df=a45_0x5f58,_0x3d75dc=await select({'message':_0x5775df(0x13d),'choices':[{'name':a45_0x235f14[_0x5775df(0x14b)]('(Skip;\x20configure\x20later)'),'value':_0x5775df(0x13c)},{'name':a45_0x235f14[_0x5775df(0x148)](_0x5775df(0x145)),'value':_0x5775df(0x153)}]});if(_0x3d75dc===_0x5775df(0x13c))return'';return promptCustomAppcode();}
1
+ (function(_0x500cbd,_0x1a5ed9){const _0x13206a=a45_0x148d,_0x1e11c7=_0x500cbd();while(!![]){try{const _0x580672=parseInt(_0x13206a(0xc2))/0x1+-parseInt(_0x13206a(0xbb))/0x2+-parseInt(_0x13206a(0xb0))/0x3*(parseInt(_0x13206a(0xbe))/0x4)+parseInt(_0x13206a(0xb7))/0x5+parseInt(_0x13206a(0xac))/0x6+-parseInt(_0x13206a(0xcf))/0x7+parseInt(_0x13206a(0xc8))/0x8*(parseInt(_0x13206a(0xb9))/0x9);if(_0x580672===_0x1a5ed9)break;else _0x1e11c7['push'](_0x1e11c7['shift']());}catch(_0x138c43){_0x1e11c7['push'](_0x1e11c7['shift']());}}}(a45_0x5eb9,0x38f38));import{input,checkbox,select}from'@inquirer/prompts';function a45_0x5eb9(){const _0x54ff73=['1131ZaVmkm','\x0aCould\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','find','custom','\x0aNo\x20available\x20apps\x20found.','length','valid','502525YAKFtT','appName','4666266YAXheJ','yellow','685846oqoQyg','message','includes','2252fydBet','skip','\x20apps.\x20Select\x20with\x20space,\x20a=all,\x20i=invert:','gray','39903KeJgGS','Select\x20the\x20app\x20to\x20bind:','\x20\x20(','✎\x20Enter\x20appcode\x20manually','appCode','cyan','8CMplBV','App\x20Code:','Invalid\x20App\x20Code','(No\x20login\x20session.\x20Enter\x20an\x20App\x20Code\x20manually\x20or\x20skip.)','Could\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','map','manual','2262554xaFrnZ','✎\x20Enter\x20manually','2716716qLCerV','No\x20available\x20apps\x20found.','(Skip;\x20configure\x20later)','Fetching\x20available\x20apps...'];a45_0x5eb9=function(){return _0x54ff73;};return a45_0x5eb9();}import a45_0x55b0a6 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x1f0ef9=a45_0x148d,_0x4eedea=await input({'message':_0x1f0ef9(0xc9),'validate':_0x23f342=>{const _0x432736=_0x1f0ef9,_0x478b28=validateAppcode(_0x23f342['trim']());return _0x478b28[_0x432736(0xb6)]||_0x478b28[_0x432736(0xbc)]||_0x432736(0xca);}});return _0x4eedea['trim']();}function a45_0x148d(_0x2fc5f6,_0x53e91e){_0x2fc5f6=_0x2fc5f6-0xac;const _0x5eb966=a45_0x5eb9();let _0x148d1c=_0x5eb966[_0x2fc5f6];return _0x148d1c;}export async function promptAppSelection(_0x41aead){const _0x4abe48=a45_0x148d,_0x69cf0c=[{'name':a45_0x55b0a6[_0x4abe48(0xba)]('✎\x20Enter\x20appcode\x20manually'),'value':-0x1},..._0x41aead['map']((_0x497b7a,_0x40978c)=>({'name':_0x497b7a[_0x4abe48(0xb8)]+'\x20\x20'+a45_0x55b0a6[_0x4abe48(0xc1)]('('+_0x497b7a[_0x4abe48(0xc6)]+')'),'value':_0x40978c}))],_0x3167bc=await checkbox({'message':'Found\x20'+a45_0x55b0a6[_0x4abe48(0xc7)](_0x41aead['length'])+_0x4abe48(0xc0),'choices':_0x69cf0c,'loop':![]});if(_0x3167bc[_0x4abe48(0xbd)](-0x1))return'custom';if(_0x3167bc['length']===0x0)return _0x4abe48(0xb3);return _0x3167bc['map'](_0x17714c=>_0x41aead[_0x17714c]);}export async function promptSingleAppSelection(_0x140857){const _0x2a0b05=a45_0x148d,_0x352765=[{'name':a45_0x55b0a6['gray']('(Skip;\x20configure\x20later\x20with\x20config\x20set\x20appcode)'),'value':'skip'},{'name':a45_0x55b0a6[_0x2a0b05(0xba)](_0x2a0b05(0xc5)),'value':_0x2a0b05(0xb3)},..._0x140857[_0x2a0b05(0xcd)](_0x31d8a5=>({'name':_0x31d8a5[_0x2a0b05(0xb8)]+'\x20\x20'+a45_0x55b0a6[_0x2a0b05(0xc1)]('('+_0x31d8a5[_0x2a0b05(0xc6)]+')'),'value':_0x31d8a5['appCode']}))],_0x3c8359=await select({'message':_0x2a0b05(0xc3),'choices':_0x352765});if(_0x3c8359===_0x2a0b05(0xbf))return'skip';if(_0x3c8359===_0x2a0b05(0xb3))return _0x2a0b05(0xb3);return _0x140857[_0x2a0b05(0xb2)](_0x2f7dd8=>_0x2f7dd8[_0x2a0b05(0xc6)]===_0x3c8359);}export async function selectSingleAppcode(_0x21be42){const _0x2e557c=a45_0x148d;if(!_0x21be42)return writeCliSideChannelLine(a45_0x55b0a6[_0x2e557c(0xc1)](_0x2e557c(0xcb))),_fallbackOrSkip();writeCliSideChannelLine(_0x2e557c(0xaf));let _0x18f268;try{_0x18f268=await withActiveCookie(_0x21be42,()=>listRemoteApps());}catch(_0x5bf232){writeCliSideChannelLine(a45_0x55b0a6[_0x2e557c(0xba)](_0x2e557c(0xcc)));if(_0x5bf232 instanceof Error)writeCliSideChannelLine(a45_0x55b0a6[_0x2e557c(0xc1)](_0x2e557c(0xc4)+_0x5bf232[_0x2e557c(0xbc)]+')'));return _fallbackOrSkip();}if(_0x18f268[_0x2e557c(0xb5)]===0x0)return writeCliSideChannelLine(a45_0x55b0a6[_0x2e557c(0xba)](_0x2e557c(0xad))),_fallbackOrSkip();const _0x46bf25=await promptSingleAppSelection(_0x18f268);if(_0x46bf25===_0x2e557c(0xbf))return'';if(_0x46bf25===_0x2e557c(0xb3))return promptCustomAppcode();return _0x46bf25[_0x2e557c(0xc6)];}export async function selectMultipleApps(_0x7a814a){const _0x55d896=a45_0x148d;writeCliSideChannelLine(_0x55d896(0xaf));let _0x1e66f9;try{_0x1e66f9=await withActiveCookie(_0x7a814a,()=>listRemoteApps());}catch(_0x3a112e){writeCliSideChannelLine(_0x55d896(0xb1));if(_0x3a112e instanceof Error)writeCliSideChannelLine(_0x55d896(0xc4)+_0x3a112e[_0x55d896(0xbc)]+')');return _0x55d896(0xb3);}if(_0x1e66f9[_0x55d896(0xb5)]===0x0)return writeCliSideChannelLine(_0x55d896(0xb4)),'custom';return promptAppSelection(_0x1e66f9);}async function _fallbackOrSkip(){const _0x4241b2=a45_0x148d,_0x5d51f7=await select({'message':_0x4241b2(0xc9),'choices':[{'name':a45_0x55b0a6[_0x4241b2(0xc1)](_0x4241b2(0xae)),'value':_0x4241b2(0xbf)},{'name':a45_0x55b0a6[_0x4241b2(0xba)](_0x4241b2(0xd0)),'value':_0x4241b2(0xce)}]});if(_0x5d51f7==='skip')return'';return promptCustomAppcode();}
@@ -1 +1 @@
1
- function a46_0x4f66(_0x24f8b3,_0x172a62){_0x24f8b3=_0x24f8b3-0x1bc;const _0x588efe=a46_0x588e();let _0x4f66c9=_0x588efe[_0x24f8b3];return _0x4f66c9;}function a46_0x588e(){const _0x4b9d59=['3lzpjYw','apiError','string','56XXTYxd','toUpperCase','replace','status','\x20is\x20processing.','12559608HZBRVP','\x20failed:\x20','taskId','\x20returned\x20unknown\x20status\x20','\x27\x5c\x27\x27','Async\x20task\x20','\x20completed\x20successfully.','\x20task\x20status\x20--task-id\x20','3471966dKBUsr','Task\x20','986904RvRHrm','15LgMHjp','1080420bMHRIX','23760290HwNFZK','errorMessage','PENDING','PROCESSING','has','474148ARrOLI','FAILED','SUCCESS','\x20failed.','2105742WvzCuL','\x20is\x20pending.','trim','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.'];a46_0x588e=function(){return _0x4b9d59;};return a46_0x588e();}const a46_0x1282de=a46_0x4f66;(function(_0x53517c,_0x16c085){const _0x244d3f=a46_0x4f66,_0x241d70=_0x53517c();while(!![]){try{const _0x46154b=-parseInt(_0x244d3f(0x1cc))/0x1*(parseInt(_0x244d3f(0x1c4))/0x2)+parseInt(_0x244d3f(0x1c8))/0x3+-parseInt(_0x244d3f(0x1be))/0x4*(-parseInt(_0x244d3f(0x1bd))/0x5)+-parseInt(_0x244d3f(0x1bc))/0x6*(-parseInt(_0x244d3f(0x1cf))/0x7)+parseInt(_0x244d3f(0x1d4))/0x8+-parseInt(_0x244d3f(0x1dc))/0x9+-parseInt(_0x244d3f(0x1bf))/0xa;if(_0x46154b===_0x16c085)break;else _0x241d70['push'](_0x241d70['shift']());}catch(_0xe9eec1){_0x241d70['push'](_0x241d70['shift']());}}}(a46_0x588e,0xe1d63));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set(['SUCCESS','FAILED']),NON_TERMINAL_STATUSES=new Set([a46_0x1282de(0x1c1),a46_0x1282de(0x1c2)]);export function normalizeAsyncTask(_0xb3dbfb){const _0x200688=a46_0x1282de,_0x534772=typeof _0xb3dbfb?.[_0x200688(0x1d6)]===_0x200688(0x1ce)?_0xb3dbfb['taskId'][_0x200688(0x1ca)]():'';if(!_0x534772)throw CliErrors[_0x200688(0x1cd)](_0x200688(0x1cb));const _0x4b2c5c=typeof _0xb3dbfb['status']===_0x200688(0x1ce)?_0xb3dbfb[_0x200688(0x1d2)][_0x200688(0x1ca)]()[_0x200688(0x1d0)]():'';if(!_0x4b2c5c)throw CliErrors[_0x200688(0x1cd)](_0x200688(0x1d9)+_0x534772+'\x20response\x20did\x20not\x20contain\x20a\x20status.');return{'taskId':_0x534772,'status':_0x4b2c5c,'errorMessage':typeof _0xb3dbfb['errorMessage']==='string'&&_0xb3dbfb[_0x200688(0x1c0)]['trim']()?_0xb3dbfb[_0x200688(0x1c0)]['trim']():null,'isTerminal':TERMINAL_STATUSES[_0x200688(0x1c3)](_0x4b2c5c),'knownStatus':TERMINAL_STATUSES[_0x200688(0x1c3)](_0x4b2c5c)||NON_TERMINAL_STATUSES['has'](_0x4b2c5c)};}export function buildAsyncTaskStatusCommand(_0xc04f79,_0x30c9e6){const _0x167ce5=a46_0x1282de;return CLI_BIN_NAME+_0x167ce5(0x1db)+quoteShellArg(_0xc04f79)+'\x20--appcode\x20'+quoteShellArg(_0x30c9e6)+'\x20--format\x20compress';}export function asyncTaskMessage(_0x4621d6){const _0x1fba3d=a46_0x1282de;switch(_0x4621d6[_0x1fba3d(0x1d2)]){case _0x1fba3d(0x1c1):return _0x1fba3d(0x1dd)+_0x4621d6['taskId']+_0x1fba3d(0x1c9);case _0x1fba3d(0x1c2):return'Task\x20'+_0x4621d6[_0x1fba3d(0x1d6)]+_0x1fba3d(0x1d3);case _0x1fba3d(0x1c6):return _0x1fba3d(0x1dd)+_0x4621d6[_0x1fba3d(0x1d6)]+_0x1fba3d(0x1da);case _0x1fba3d(0x1c5):return _0x4621d6['errorMessage']?_0x1fba3d(0x1dd)+_0x4621d6['taskId']+_0x1fba3d(0x1d5)+_0x4621d6[_0x1fba3d(0x1c0)]:_0x1fba3d(0x1dd)+_0x4621d6['taskId']+_0x1fba3d(0x1c7);default:return'Task\x20'+_0x4621d6[_0x1fba3d(0x1d6)]+_0x1fba3d(0x1d7)+_0x4621d6[_0x1fba3d(0x1d2)]+'.';}}function quoteShellArg(_0x59eee6){const _0x33ed43=a46_0x1282de;return'\x27'+_0x59eee6[_0x33ed43(0x1d1)](/'/g,_0x33ed43(0x1d8))+'\x27';}
1
+ const a46_0x3e9442=a46_0x537f;function a46_0x537f(_0x385f39,_0x51513d){_0x385f39=_0x385f39-0x189;const _0x5e540b=a46_0x5e54();let _0x537f27=_0x5e540b[_0x385f39];return _0x537f27;}(function(_0x3c446c,_0xefb01a){const _0x51b15c=a46_0x537f,_0x5b0b1e=_0x3c446c();while(!![]){try{const _0x236eb7=parseInt(_0x51b15c(0x1a1))/0x1+-parseInt(_0x51b15c(0x199))/0x2*(-parseInt(_0x51b15c(0x1a9))/0x3)+parseInt(_0x51b15c(0x198))/0x4*(parseInt(_0x51b15c(0x1a8))/0x5)+-parseInt(_0x51b15c(0x19b))/0x6*(parseInt(_0x51b15c(0x1a0))/0x7)+-parseInt(_0x51b15c(0x190))/0x8*(-parseInt(_0x51b15c(0x196))/0x9)+-parseInt(_0x51b15c(0x18f))/0xa*(-parseInt(_0x51b15c(0x18e))/0xb)+parseInt(_0x51b15c(0x19d))/0xc*(-parseInt(_0x51b15c(0x1a3))/0xd);if(_0x236eb7===_0xefb01a)break;else _0x5b0b1e['push'](_0x5b0b1e['shift']());}catch(_0x201485){_0x5b0b1e['push'](_0x5b0b1e['shift']());}}}(a46_0x5e54,0x72874));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set([a46_0x3e9442(0x1a6),'FAILED']),NON_TERMINAL_STATUSES=new Set([a46_0x3e9442(0x195),a46_0x3e9442(0x189)]);export function normalizeAsyncTask(_0x4ba43b){const _0x3a2e54=a46_0x3e9442,_0x201629=typeof _0x4ba43b?.['taskId']===_0x3a2e54(0x19e)?_0x4ba43b[_0x3a2e54(0x18c)][_0x3a2e54(0x18a)]():'';if(!_0x201629)throw CliErrors['apiError'](_0x3a2e54(0x1a7));const _0x9e8b22=typeof _0x4ba43b[_0x3a2e54(0x191)]===_0x3a2e54(0x19e)?_0x4ba43b[_0x3a2e54(0x191)][_0x3a2e54(0x18a)]()[_0x3a2e54(0x1a5)]():'';if(!_0x9e8b22)throw CliErrors['apiError'](_0x3a2e54(0x193)+_0x201629+_0x3a2e54(0x19c));return{'taskId':_0x201629,'status':_0x9e8b22,'errorMessage':typeof _0x4ba43b[_0x3a2e54(0x19f)]===_0x3a2e54(0x19e)&&_0x4ba43b[_0x3a2e54(0x19f)]['trim']()?_0x4ba43b[_0x3a2e54(0x19f)][_0x3a2e54(0x18a)]():null,'isTerminal':TERMINAL_STATUSES['has'](_0x9e8b22),'knownStatus':TERMINAL_STATUSES[_0x3a2e54(0x19a)](_0x9e8b22)||NON_TERMINAL_STATUSES[_0x3a2e54(0x19a)](_0x9e8b22)};}export function buildAsyncTaskStatusCommand(_0x3ad57c,_0x3ec27e){const _0x5e0b15=a46_0x3e9442;return CLI_BIN_NAME+'\x20task\x20status\x20--task-id\x20'+quoteShellArg(_0x3ad57c)+_0x5e0b15(0x1a2)+quoteShellArg(_0x3ec27e)+'\x20--format\x20compress';}export function asyncTaskMessage(_0x1579c6){const _0x22c0f5=a46_0x3e9442;switch(_0x1579c6[_0x22c0f5(0x191)]){case _0x22c0f5(0x195):return _0x22c0f5(0x18d)+_0x1579c6[_0x22c0f5(0x18c)]+_0x22c0f5(0x192);case _0x22c0f5(0x189):return'Task\x20'+_0x1579c6['taskId']+_0x22c0f5(0x18b);case _0x22c0f5(0x1a6):return _0x22c0f5(0x18d)+_0x1579c6[_0x22c0f5(0x18c)]+_0x22c0f5(0x194);case'FAILED':return _0x1579c6[_0x22c0f5(0x19f)]?_0x22c0f5(0x18d)+_0x1579c6['taskId']+'\x20failed:\x20'+_0x1579c6[_0x22c0f5(0x19f)]:_0x22c0f5(0x18d)+_0x1579c6[_0x22c0f5(0x18c)]+'\x20failed.';default:return _0x22c0f5(0x18d)+_0x1579c6[_0x22c0f5(0x18c)]+_0x22c0f5(0x197)+_0x1579c6[_0x22c0f5(0x191)]+'.';}}function quoteShellArg(_0x5e7945){const _0x27e82f=a46_0x3e9442;return'\x27'+_0x5e7945['replace'](/'/g,_0x27e82f(0x1a4))+'\x27';}function a46_0x5e54(){const _0x169008=['Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','368485RgYJVU','3nMjRhY','PROCESSING','trim','\x20is\x20processing.','taskId','Task\x20','3331361kBDxnf','30jVIfPa','664JYLeLY','status','\x20is\x20pending.','Async\x20task\x20','\x20completed\x20successfully.','PENDING','93861jFJkDb','\x20returned\x20unknown\x20status\x20','24VziXiq','915674NiTzOR','has','186JBVsYa','\x20response\x20did\x20not\x20contain\x20a\x20status.','6180ZMeWsU','string','errorMessage','90818FjDeYP','518228XjNXPz','\x20--appcode\x20','58591PzoQFB','\x27\x5c\x27\x27','toUpperCase','SUCCESS'];a46_0x5e54=function(){return _0x169008;};return a46_0x5e54();}
@@ -1 +1 @@
1
- function a47_0x386a(_0x2d3058,_0x3d0ce5){_0x2d3058=_0x2d3058-0x124;var _0x13f145=a47_0x13f1();var _0x386a26=_0x13f145[_0x2d3058];return _0x386a26;}(function(_0x4ecf63,_0xcdd384){var _0x3b59e2=a47_0x386a,_0x34139e=_0x4ecf63();while(!![]){try{var _0x468b69=parseInt(_0x3b59e2(0x127))/0x1*(-parseInt(_0x3b59e2(0x124))/0x2)+-parseInt(_0x3b59e2(0x129))/0x3*(-parseInt(_0x3b59e2(0x12f))/0x4)+-parseInt(_0x3b59e2(0x12e))/0x5+-parseInt(_0x3b59e2(0x131))/0x6+-parseInt(_0x3b59e2(0x12d))/0x7*(parseInt(_0x3b59e2(0x130))/0x8)+-parseInt(_0x3b59e2(0x12c))/0x9+-parseInt(_0x3b59e2(0x12b))/0xa*(-parseInt(_0x3b59e2(0x125))/0xb);if(_0x468b69===_0xcdd384)break;else _0x34139e['push'](_0x34139e['shift']());}catch(_0x26586c){_0x34139e['push'](_0x34139e['shift']());}}}(a47_0x13f1,0xe4de9));function a47_0x13f1(){var _0x4ff3bc=['29554fFpzVR','5427445vlJPYT','30776PrXNXC','2224lQMbMC','4569750mTNrRs','200164KnGPdt','240581ZmDOdZ','method','5NcaJjy','description','219sbecXH','defineProperties','1990bvXkfN','4097718saHjnB'];a47_0x13f1=function(){return _0x4ff3bc;};return a47_0x13f1();}export function asDryRunResult(_0x36661c,_0x444619){var _0x4cd32b=a47_0x386a;return Object[_0x4cd32b(0x12a)](_0x36661c,{'method':{'value':_0x444619[_0x4cd32b(0x126)],'enumerable':![]},'url':{'value':_0x444619['url'],'enumerable':![]},..._0x444619[_0x4cd32b(0x128)]?{'description':{'value':_0x444619[_0x4cd32b(0x128)],'enumerable':![]}}:{}});}
1
+ function a47_0x50eb(){var _0x1fcafe=['15489Hrddwf','32SZMxDR','338zMMRHD','2557708IdgEsq','1299977MNBmzJ','531820evPSAM','url','282445ZBvcQk','defineProperties','description','14909148hasnQE','method','4384110GPPNmI'];a47_0x50eb=function(){return _0x1fcafe;};return a47_0x50eb();}function a47_0x286c(_0x2e91ea,_0xbe775b){_0x2e91ea=_0x2e91ea-0x9d;var _0x50ebba=a47_0x50eb();var _0x286c1e=_0x50ebba[_0x2e91ea];return _0x286c1e;}(function(_0x37e851,_0x30d59f){var _0x171353=a47_0x286c,_0x947802=_0x37e851();while(!![]){try{var _0x40d974=parseInt(_0x171353(0xa7))/0x1+parseInt(_0x171353(0xa4))/0x2*(parseInt(_0x171353(0xa2))/0x3)+-parseInt(_0x171353(0xa5))/0x4+-parseInt(_0x171353(0xa9))/0x5+parseInt(_0x171353(0xa1))/0x6+parseInt(_0x171353(0xa6))/0x7*(parseInt(_0x171353(0xa3))/0x8)+-parseInt(_0x171353(0x9f))/0x9;if(_0x40d974===_0x30d59f)break;else _0x947802['push'](_0x947802['shift']());}catch(_0x4ad1d8){_0x947802['push'](_0x947802['shift']());}}}(a47_0x50eb,0x80460));export function asDryRunResult(_0x95bec,_0x2ad536){var _0x367845=a47_0x286c;return Object[_0x367845(0x9d)](_0x95bec,{'method':{'value':_0x2ad536[_0x367845(0xa0)],'enumerable':![]},'url':{'value':_0x2ad536[_0x367845(0xa8)],'enumerable':![]},..._0x2ad536[_0x367845(0x9e)]?{'description':{'value':_0x2ad536[_0x367845(0x9e)],'enumerable':![]}}:{}});}
@@ -1 +1 @@
1
- function a48_0x4df4(){const _0x473f0b=['Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','MYSQL','7555712XcrAUL','3coricl','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','5869129fgqqXM','boolean','code','number','786892YAYGKJ','appcode','string','skip-connection-test','sqlcode','2503575JKeWRr','1444264daqgUI','Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)','Database\x20product\x20type','1265610NtlGjV','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','115319RxlzLT','App\x20code\x20(e.g.\x20app-xxxxx)'];a48_0x4df4=function(){return _0x473f0b;};return a48_0x4df4();}const a48_0xaca60f=a48_0x1980;(function(_0x206a14,_0x930f37){const _0x55070e=a48_0x1980,_0x37c018=_0x206a14();while(!![]){try{const _0x41db54=-parseInt(_0x55070e(0xcf))/0x1+parseInt(_0x55070e(0xc8))/0x2*(parseInt(_0x55070e(0xd4))/0x3)+-parseInt(_0x55070e(0xc2))/0x4+parseInt(_0x55070e(0xc7))/0x5+-parseInt(_0x55070e(0xcd))/0x6+parseInt(_0x55070e(0xbe))/0x7+-parseInt(_0x55070e(0xd3))/0x8;if(_0x41db54===_0x930f37)break;else _0x37c018['push'](_0x37c018['shift']());}catch(_0x357080){_0x37c018['push'](_0x37c018['shift']());}}}(a48_0x4df4,0x90fbd));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':a48_0xaca60f(0xcb)};export const CODE_FLAG={'name':a48_0xaca60f(0xc0),'type':a48_0xaca60f(0xc4),'required':!![],'description':a48_0xaca60f(0xca),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':'datasetcode','description':'Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)'};function a48_0x1980(_0x28da5d,_0x5d09da){_0x28da5d=_0x28da5d-0xbe;const _0x4df4f2=a48_0x4df4();let _0x1980cc=_0x4df4f2[_0x28da5d];return _0x1980cc;}export const SQLCODE_FLAG={'name':a48_0xaca60f(0xc6),'type':'string','required':!![],'description':'SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a48_0xaca60f(0xd5)}};export const APPCODE_FLAG_OPTIONAL={'name':a48_0xaca60f(0xc3),'type':a48_0xaca60f(0xc4),'required':![],'description':a48_0xaca60f(0xce)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a48_0xaca60f(0xd0)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a48_0xaca60f(0xc1),'required':!![],'description':a48_0xaca60f(0xd1)};export const DB_TYPE_FLAG={'name':'dbtype','type':a48_0xaca60f(0xc4),'required':!![],'description':a48_0xaca60f(0xcc),'enum':[a48_0xaca60f(0xd2),'POSTGRESQL']};export const SKIP_CONNECTION_TEST_FLAG={'name':a48_0xaca60f(0xc5),'type':a48_0xaca60f(0xbf),'description':a48_0xaca60f(0xc9)};
1
+ const a48_0x550417=a48_0x2b94;(function(_0x233d86,_0x149bad){const _0x1a2ee3=a48_0x2b94,_0x1ed30e=_0x233d86();while(!![]){try{const _0x111e10=parseInt(_0x1a2ee3(0x1ef))/0x1+parseInt(_0x1a2ee3(0x1f2))/0x2*(-parseInt(_0x1a2ee3(0x203))/0x3)+parseInt(_0x1a2ee3(0x201))/0x4*(-parseInt(_0x1a2ee3(0x1f3))/0x5)+parseInt(_0x1a2ee3(0x209))/0x6*(-parseInt(_0x1a2ee3(0x1fa))/0x7)+parseInt(_0x1a2ee3(0x206))/0x8*(-parseInt(_0x1a2ee3(0x1f6))/0x9)+parseInt(_0x1a2ee3(0x1ff))/0xa*(parseInt(_0x1a2ee3(0x20a))/0xb)+parseInt(_0x1a2ee3(0x1f0))/0xc;if(_0x111e10===_0x149bad)break;else _0x1ed30e['push'](_0x1ed30e['shift']());}catch(_0x26caaa){_0x1ed30e['push'](_0x1ed30e['shift']());}}}(a48_0x35eb,0xca0c0));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':a48_0x550417(0x1f8)};function a48_0x35eb(){const _0x1b2ccf=['MYSQL','97326IMqzWB','string','datasetcode','2474192npcCtc','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update','2232mvVfzS','8204218eZjiRd','18111Uagvfq','49244952JEaOmt','code','72MqxNNT','35accunJ','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','boolean','36TCeGzg','dbtype','a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)','appcode','25977MtdOMZ','App\x20code\x20(e.g.\x20app-xxxxx)','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','Database\x20product\x20type','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','10CJQcIm','sqlcode','145492mDXQtY'];a48_0x35eb=function(){return _0x1b2ccf;};return a48_0x35eb();}export const CODE_FLAG={'name':a48_0x550417(0x1f1),'type':a48_0x550417(0x204),'required':!![],'description':a48_0x550417(0x207),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a48_0x550417(0x205),'description':a48_0x550417(0x207)};function a48_0x2b94(_0x5f2aed,_0x27dde8){_0x5f2aed=_0x5f2aed-0x1ef;const _0x35ebc6=a48_0x35eb();let _0x2b941b=_0x35ebc6[_0x5f2aed];return _0x2b941b;}export const SQLCODE_FLAG={'name':a48_0x550417(0x200),'type':'string','required':!![],'description':a48_0x550417(0x1fc),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a48_0x550417(0x1fe)}};export const APPCODE_FLAG_OPTIONAL={'name':a48_0x550417(0x1f9),'type':a48_0x550417(0x204),'required':![],'description':'App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)'};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a48_0x550417(0x1fb)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':'number','required':!![],'description':a48_0x550417(0x1f4)};export const DB_TYPE_FLAG={'name':a48_0x550417(0x1f7),'type':a48_0x550417(0x204),'required':!![],'description':a48_0x550417(0x1fd),'enum':[a48_0x550417(0x202),'POSTGRESQL']};export const SKIP_CONNECTION_TEST_FLAG={'name':'skip-connection-test','type':a48_0x550417(0x1f5),'description':a48_0x550417(0x208)};
@@ -1 +1 @@
1
- (function(_0x259e0d,_0x3439ed){const _0x49a980=a49_0x27bc,_0x5bd3ca=_0x259e0d();while(!![]){try{const _0x5a20b4=-parseInt(_0x49a980(0x195))/0x1*(-parseInt(_0x49a980(0x191))/0x2)+parseInt(_0x49a980(0x19c))/0x3+-parseInt(_0x49a980(0x18f))/0x4+-parseInt(_0x49a980(0x19d))/0x5*(-parseInt(_0x49a980(0x1a2))/0x6)+-parseInt(_0x49a980(0x193))/0x7*(-parseInt(_0x49a980(0x1a0))/0x8)+-parseInt(_0x49a980(0x190))/0x9*(-parseInt(_0x49a980(0x196))/0xa)+-parseInt(_0x49a980(0x19f))/0xb*(parseInt(_0x49a980(0x194))/0xc);if(_0x5a20b4===_0x3439ed)break;else _0x5bd3ca['push'](_0x5bd3ca['shift']());}catch(_0x58f085){_0x5bd3ca['push'](_0x5bd3ca['shift']());}}}(a49_0x267c,0x6badc));function a49_0x27bc(_0x439563,_0x592e07){_0x439563=_0x439563-0x18f;const _0x267cad=a49_0x267c();let _0x27bc0a=_0x267cad[_0x439563];return _0x27bc0a;}function a49_0x267c(){const _0x1128b1=['ceil','264JHDmyZ','isFile','2211412omIEsu','9EgZosq','4300XgmbeU','validation','7539PAPVUR','13082976cevVVE','125zxJaWx','5013350Htulvi','\x20MB','File\x20not\x20found:\x20','size','File\x20is\x20not\x20a\x20regular\x20file:\x20','toFixed','2132526pCHoec','39910CSRsur','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','11xlFpie','1872mwgFwW'];a49_0x267c=function(){return _0x1128b1;};return a49_0x267c();}import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x3f0695){const _0x3e5819=a49_0x27bc;if(_0x3f0695>=BYTES_PER_MB){const _0x257bbd=Math[_0x3e5819(0x1a1)](_0x3f0695/BYTES_PER_MB*0x64)/0x64;return _0x257bbd[_0x3e5819(0x19b)](0x2)+_0x3e5819(0x197);}return _0x3f0695+'\x20B';}export function requireDevelopmentUploadFile(_0x13a617,_0x589d12){const _0x5a3e48=a49_0x27bc,_0xdd42e6=_0x13a617['trim']();if(!_0xdd42e6)throw CliErrors['validation'](_0x589d12+'\x20path\x20is\x20required.');if(!existsSync(_0xdd42e6))throw CliErrors[_0x5a3e48(0x192)](_0x5a3e48(0x198)+_0xdd42e6);const _0x5803f5=statSync(_0xdd42e6);if(!_0x5803f5[_0x5a3e48(0x1a3)]())throw CliErrors['validation'](_0x5a3e48(0x19a)+_0xdd42e6);if(_0x5803f5[_0x5a3e48(0x199)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x5a3e48(0x192)](_0x5a3e48(0x19e)+_0xdd42e6+'\x20('+formatBytes(_0x5803f5[_0x5a3e48(0x199)])+')');return{'path':_0xdd42e6,'size':_0x5803f5[_0x5a3e48(0x199)]};}
1
+ (function(_0x38b475,_0x266d6e){const _0x2f3393=a49_0x5692,_0x56cc39=_0x38b475();while(!![]){try{const _0x23af87=-parseInt(_0x2f3393(0x193))/0x1+parseInt(_0x2f3393(0x199))/0x2+-parseInt(_0x2f3393(0x19c))/0x3*(-parseInt(_0x2f3393(0x19e))/0x4)+parseInt(_0x2f3393(0x195))/0x5*(parseInt(_0x2f3393(0x19b))/0x6)+-parseInt(_0x2f3393(0x197))/0x7+parseInt(_0x2f3393(0x198))/0x8*(-parseInt(_0x2f3393(0x194))/0x9)+-parseInt(_0x2f3393(0x191))/0xa;if(_0x23af87===_0x266d6e)break;else _0x56cc39['push'](_0x56cc39['shift']());}catch(_0x52abe1){_0x56cc39['push'](_0x56cc39['shift']());}}}(a49_0x5acb,0x1cd96));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function a49_0x5692(_0x563927,_0x512187){_0x563927=_0x563927-0x18f;const _0x5acb49=a49_0x5acb();let _0x5692dc=_0x5acb49[_0x563927];return _0x5692dc;}function a49_0x5acb(){const _0x583e4c=['validation','759620yWPTfa','File\x20is\x20not\x20a\x20regular\x20file:\x20','76005smtbDM','648AEuxdw','6070NnyigG','size','427889ViExFn','752jBbnsB','386224NJXLYd','isFile','618WksANd','6sgHRgC','\x20path\x20is\x20required.','39748JyAlIa','File\x20not\x20found:\x20','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','toFixed'];a49_0x5acb=function(){return _0x583e4c;};return a49_0x5acb();}function formatBytes(_0x79c4db){const _0x5e3d01=a49_0x5692;if(_0x79c4db>=BYTES_PER_MB){const _0x5dd237=Math['ceil'](_0x79c4db/BYTES_PER_MB*0x64)/0x64;return _0x5dd237[_0x5e3d01(0x18f)](0x2)+'\x20MB';}return _0x79c4db+'\x20B';}export function requireDevelopmentUploadFile(_0x34fa44,_0x1e75b5){const _0x352442=a49_0x5692,_0x5b9a4b=_0x34fa44['trim']();if(!_0x5b9a4b)throw CliErrors[_0x352442(0x190)](_0x1e75b5+_0x352442(0x19d));if(!existsSync(_0x5b9a4b))throw CliErrors[_0x352442(0x190)](_0x352442(0x19f)+_0x5b9a4b);const _0x174430=statSync(_0x5b9a4b);if(!_0x174430[_0x352442(0x19a)]())throw CliErrors[_0x352442(0x190)](_0x352442(0x192)+_0x5b9a4b);if(_0x174430[_0x352442(0x196)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x352442(0x190)](_0x352442(0x1a0)+_0x5b9a4b+'\x20('+formatBytes(_0x174430[_0x352442(0x196)])+')');return{'path':_0x5b9a4b,'size':_0x174430['size']};}