@lovrabet/rabetbase-cli 2.5.0-beta.3 → 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 (302) 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/database-connection-workflow.md +9 -9
  297. package/skills/rabetbase/references/rabetbase-config.md +2 -3
  298. package/skills/rabetbase/references/rabetbase-db-analyze.md +2 -2
  299. package/skills/rabetbase/references/rabetbase-db-diff-refresh.md +4 -3
  300. package/skills/rabetbase/references/rabetbase-db-diff.md +7 -22
  301. package/skills/rabetbase/references/rabetbase-db-tables.md +14 -2
  302. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- function a35_0xfc02(_0x257b4a,_0x53a37e){_0x257b4a=_0x257b4a-0x1e6;const _0x488203=a35_0x4882();let _0xfc0278=_0x488203[_0x257b4a];return _0xfc0278;}const a35_0x2f9525=a35_0xfc02;function a35_0x4882(){const _0x1dca88=['2344935yAKuub','description','Return\x20full\x20script\x20objects','ENDPOINT','string','1280296QIdLwM','85342uPoKFN','(unnamed)','name','7DVlJja','No\x20Backend\x20Function\x20scripts\x20found.','type','80btbFXB','str','list','bff','boolean','COMMON','2869176ozjdBk','1875728TnBvaG','verbose','Script\x20type\x20filter','761679mBMjTC','map','20394ySHIfr','7KIIjpe','scriptType'];a35_0x4882=function(){return _0x1dca88;};return a35_0x4882();}(function(_0x106389,_0x1a8956){const _0x3f33ea=a35_0xfc02,_0x7744f4=_0x106389();while(!![]){try{const _0x42c46e=-parseInt(_0x3f33ea(0x1eb))/0x1*(-parseInt(_0x3f33ea(0x1e8))/0x2)+parseInt(_0x3f33ea(0x1f8))/0x3+-parseInt(_0x3f33ea(0x1f5))/0x4+parseInt(_0x3f33ea(0x1fd))/0x5+-parseInt(_0x3f33ea(0x1f4))/0x6*(parseInt(_0x3f33ea(0x1fb))/0x7)+parseInt(_0x3f33ea(0x1e7))/0x8+-parseInt(_0x3f33ea(0x1fa))/0x9*(-parseInt(_0x3f33ea(0x1ee))/0xa);if(_0x42c46e===_0x1a8956)break;else _0x7744f4['push'](_0x7744f4['shift']());}catch(_0x1b4750){_0x7744f4['push'](_0x7744f4['shift']());}}}(a35_0x4882,0x3dac6));import{listBffScripts}from'../../core/api-client.js';export const bffList={'service':a35_0x2f9525(0x1f1),'command':a35_0x2f9525(0x1f0),'description':'List\x20Backend\x20Function\x20scripts','risk':'read','flags':[{'name':a35_0x2f9525(0x1ed),'type':'string','description':a35_0x2f9525(0x1f7),'default':'ENDPOINT','enum':[a35_0x2f9525(0x200),a35_0x2f9525(0x1f3)]},{'name':a35_0x2f9525(0x1ea),'type':a35_0x2f9525(0x1e6),'description':'Filter\x20by\x20script\x20name'},{'name':'verbose','type':a35_0x2f9525(0x1f2),'description':a35_0x2f9525(0x1ff)}],async 'execute'(_0x5091a0){const _0x1303d1=a35_0x2f9525,_0x4648a7=await listBffScripts(_0x5091a0['appCode'],_0x5091a0[_0x1303d1(0x1ef)](_0x1303d1(0x1ed)),{'scriptName':_0x5091a0[_0x1303d1(0x1ef)](_0x1303d1(0x1ea))||undefined}),_0x14e022=_0x5091a0['bool'](_0x1303d1(0x1f6));return{'ok':!![],'data':_0x14e022?_0x4648a7:_0x4648a7[_0x1303d1(0x1f9)](_0x5f4645=>({'id':_0x5f4645['id'],'functionName':_0x5f4645['functionName']??'','description':_0x5f4645[_0x1303d1(0x1fe)]||_0x1303d1(0x1e9),'scriptType':_0x5f4645[_0x1303d1(0x1fc)]})),'message':_0x4648a7['length']===0x0?_0x1303d1(0x1ec):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_0x2806dc=a36_0x11e8;(function(_0x563e6d,_0x51b891){const _0x504359=a36_0x11e8,_0xd1d23b=_0x563e6d();while(!![]){try{const _0x5f53aa=-parseInt(_0x504359(0x183))/0x1+-parseInt(_0x504359(0x191))/0x2*(-parseInt(_0x504359(0x160))/0x3)+parseInt(_0x504359(0x166))/0x4*(-parseInt(_0x504359(0x150))/0x5)+parseInt(_0x504359(0x190))/0x6+-parseInt(_0x504359(0x16b))/0x7+-parseInt(_0x504359(0x177))/0x8*(parseInt(_0x504359(0x174))/0x9)+-parseInt(_0x504359(0x14c))/0xa*(-parseInt(_0x504359(0x189))/0xb);if(_0x5f53aa===_0x51b891)break;else _0xd1d23b['push'](_0xd1d23b['shift']());}catch(_0x2a768d){_0xd1d23b['push'](_0xd1d23b['shift']());}}}(a36_0x3d5c,0x98894));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';function a36_0x11e8(_0x544aa6,_0x15fbf3){_0x544aa6=_0x544aa6-0x14c;const _0x3d5ccf=a36_0x3d5c();let _0x11e88e=_0x3d5ccf[_0x544aa6];return _0x11e88e;}import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';import{computeContentHash,computeFileHash}from'../../core/bff/hash.js';function a36_0x3d5c(){const _0x207af3=['lockFilePath','apiDir','7074956MbFDjm','unresolvable\x20target\x20path','toLowerCase','trim','\x20failed','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','lockKey','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','message','493065qvRuNn','pull','apps','32lWAJtS','GET','validation','Remote\x20script\x20missing\x20id.','filePath','bff','ENDPOINT','stderr','force','datasetCode','alias','\x22\x20not\x20found\x20after\x20ensureLockScope.','106418cwxZEf','push','utf8','length','lastSync','type','15256439ZSAwrM','question','Pull\x20only\x20this\x20script\x20type','hookLocation','hash','operationType','No\x20remote\x20Backend\x20Function\x20scripts\x20found.','3860994FryaOf','64cLfxAT','all','10dqOyeg','cancelled','COMMON','functions','860350hSgIOM','Remote\x20script\x20missing\x20content.','stdin','Force\x20pull\x20cancelled.','local\x20unsynced\x20changes','skipped','functionNode','\x20pulled,\x20','version','functionName','parse','toISOString','appCode','nonInteractive','Would\x20inspect\x20','scriptsRoot','41889xJZssy','map','Force\x20overwrite\x20local\x20unsynced\x20changes','HOOK','str','Pull\x20complete:\x20','12HUJIjn','stringify','scriptContent'];a36_0x3d5c=function(){return _0x207af3;};return a36_0x3d5c();}import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';export const bffPull={'service':a36_0x2806dc(0x17c),'command':a36_0x2806dc(0x175),'description':'Pull\x20remote\x20Backend\x20Function\x20scripts\x20to\x20local','risk':'read','flags':[{'name':'type','type':'string','description':a36_0x2806dc(0x18b),'enum':[a36_0x2806dc(0x14e),a36_0x2806dc(0x17d),a36_0x2806dc(0x163)]},{'name':a36_0x2806dc(0x17f),'type':'boolean','description':a36_0x2806dc(0x162)}],async 'dryRun'(_0x591b5e){const _0x3d7e8b=a36_0x2806dc,_0x2a06ad=loadBffProjectConfig(_0x591b5e['appCode']),_0x4e60fe=await readBffLockFile(_0x2a06ad[_0x3d7e8b(0x169)]),{appLock:_0x3be059}=ensureLockScope(_0x4e60fe??createEmptyBffLock(),_0x591b5e['appCode'],_0x2a06ad[_0x3d7e8b(0x15f)],'pull'),_0x36245a=normalizeBffType(_0x591b5e['str'](_0x3d7e8b(0x188)))??undefined,_0x29c990=buildDatasetCodeToAliasMap(_0x591b5e[_0x3d7e8b(0x16a)],_0x591b5e[_0x3d7e8b(0x15c)]),[_0x5f3f72,_0x223cdc]=await Promise[_0x3d7e8b(0x192)]([listBffScripts(_0x591b5e['appCode'],_0x36245a),getBffScriptStatistics(_0x591b5e[_0x3d7e8b(0x15c)])]),_0x391faa=createHookLocationMap(_0x223cdc),_0x280995=[];for(const _0x56798f of _0x5f3f72){const _0x4cbf07=resolveRemoteScriptTarget(_0x2a06ad,_0x56798f,_0x391faa,_0x3be059[_0x3d7e8b(0x14f)],_0x29c990);if(!_0x4cbf07){_0x280995[_0x3d7e8b(0x184)]({'scriptType':_0x56798f['scriptType'],'functionName':_0x56798f[_0x3d7e8b(0x159)]??'','status':_0x3d7e8b(0x155),'reason':_0x3d7e8b(0x16c)});continue;}const _0x122d6b=_0x3be059[_0x3d7e8b(0x14f)][_0x4cbf07[_0x3d7e8b(0x171)]],_0x46e84e=_0x56798f[_0x3d7e8b(0x168)]!=null?computeContentHash(_0x56798f[_0x3d7e8b(0x168)]):undefined,_0x25eb49=await hasUnsyncedLocalChanges(_0x4cbf07[_0x3d7e8b(0x17b)],_0x122d6b,_0x46e84e);_0x280995[_0x3d7e8b(0x184)]({'lockKey':_0x4cbf07[_0x3d7e8b(0x171)],'filePath':_0x4cbf07[_0x3d7e8b(0x17b)],'remoteId':_0x56798f['id']??null,'status':_0x25eb49?'conflict':'would_pull'});}return{'method':_0x3d7e8b(0x178),'url':'/api/management/library/scripts/list?appCode='+_0x591b5e['appCode']+(_0x36245a?'&type='+_0x36245a:''),'body':{'appCode':_0x591b5e[_0x3d7e8b(0x15c)],'filterType':_0x36245a??null,'files':_0x280995},'description':_0x3d7e8b(0x15e)+_0x280995['length']+'\x20remote\x20Backend\x20Function\x20script(s)\x20for\x20pull'};},async 'execute'(_0x594b24){const _0xdf64e3=a36_0x2806dc,_0x4c6a21=loadBffProjectConfig(_0x594b24['appCode']),_0x51ee44=await readBffLockFile(_0x4c6a21[_0xdf64e3(0x169)]),{lockData:_0x139f85,appLock:_0x2e1a22}=ensureLockScope(_0x51ee44??createEmptyBffLock(),_0x594b24[_0xdf64e3(0x15c)],_0x4c6a21[_0xdf64e3(0x15f)],_0xdf64e3(0x175)),_0x1a0f5e=normalizeBffType(_0x594b24[_0xdf64e3(0x164)]('type'))??undefined;if(_0x594b24[_0xdf64e3(0x164)](_0xdf64e3(0x188))&&!_0x1a0f5e)throw CliErrors[_0xdf64e3(0x179)](_0xdf64e3(0x170));const [_0x4d31cf,_0x268187]=await Promise[_0xdf64e3(0x192)]([listBffScripts(_0x594b24[_0xdf64e3(0x15c)],_0x1a0f5e),getBffScriptStatistics(_0x594b24['appCode'])]);if(_0x4d31cf[_0xdf64e3(0x186)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0xdf64e3(0x18f)};const _0x24611b=_0x594b24['bool'](_0xdf64e3(0x17f));if(_0x24611b&&!_0x594b24[_0xdf64e3(0x15d)]){const _0x315c65=await confirmForce();if(!_0x315c65)throw CliErrors[_0xdf64e3(0x14d)](_0xdf64e3(0x153));}if(_0x24611b&&_0x594b24[_0xdf64e3(0x15d)]){}const _0x245562=buildDatasetCodeToAliasMap(_0x594b24[_0xdf64e3(0x16a)],_0x594b24[_0xdf64e3(0x15c)]),_0x302ad6=createHookLocationMap(_0x268187),_0x1f9bc0=JSON[_0xdf64e3(0x15a)](JSON[_0xdf64e3(0x167)](_0x139f85)),_0x50f842=_0x594b24['appCode'],_0x28ef38=_0x1f9bc0[_0xdf64e3(0x176)][_0x50f842];if(!_0x28ef38)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x50f842+_0xdf64e3(0x182));const _0x1ba6e3=[],_0xedb0e=[],_0x282456=[];for(const _0x2c937c of _0x4d31cf){const _0x5c7667=resolveRemoteScriptTarget(_0x4c6a21,_0x2c937c,_0x302ad6,_0x2e1a22[_0xdf64e3(0x14f)],_0x245562);if(!_0x5c7667){_0xedb0e[_0xdf64e3(0x184)]({'lockKey':_0x2c937c['scriptType']+'/'+_0x2c937c[_0xdf64e3(0x159)],'reason':_0xdf64e3(0x16c)});continue;}const _0x37cf2c=_0x2e1a22['functions'][_0x5c7667[_0xdf64e3(0x171)]];try{if(!_0x2c937c['id'])throw new Error(_0xdf64e3(0x17a));if(_0x2c937c['scriptContent']==null)throw new Error(_0xdf64e3(0x151));const _0x32422f=_0x2c937c[_0xdf64e3(0x168)],_0xd9a11e=computeContentHash(_0x32422f);if(!_0x24611b){const _0x1cefb1=await hasUnsyncedLocalChanges(_0x5c7667['filePath'],_0x37cf2c,_0xd9a11e);if(_0x1cefb1){_0xedb0e[_0xdf64e3(0x184)]({'lockKey':_0x5c7667[_0xdf64e3(0x171)],'reason':_0xdf64e3(0x154)});continue;}}await ensureParentDirectory(_0x5c7667[_0xdf64e3(0x17b)]),await writeFile(_0x5c7667[_0xdf64e3(0x17b)],_0x32422f,_0xdf64e3(0x185));const _0x35e791={'hash':_0xd9a11e,'remoteId':_0x2c937c['id'],'version':_0x2c937c[_0xdf64e3(0x158)]};_0x5c7667[_0xdf64e3(0x188)]===_0xdf64e3(0x163)&&_0x5c7667['hookLocation']&&(_0x35e791[_0xdf64e3(0x181)]=_0x5c7667['hookLocation'][_0xdf64e3(0x181)],_0x35e791['datasetCode']=_0x5c7667[_0xdf64e3(0x18c)][_0xdf64e3(0x180)],_0x35e791[_0xdf64e3(0x18e)]=_0x5c7667[_0xdf64e3(0x18c)][_0xdf64e3(0x18e)],_0x35e791[_0xdf64e3(0x156)]=_0x5c7667[_0xdf64e3(0x18c)][_0xdf64e3(0x156)]),_0x28ef38[_0xdf64e3(0x14f)][_0x5c7667[_0xdf64e3(0x171)]]=_0x35e791,_0x1ba6e3[_0xdf64e3(0x184)]({'lockKey':_0x5c7667[_0xdf64e3(0x171)],'remoteId':_0x2c937c['id']});}catch(_0x130ab6){_0x282456[_0xdf64e3(0x184)]({'lockKey':_0x5c7667[_0xdf64e3(0x171)],'error':_0x130ab6 instanceof Error?_0x130ab6[_0xdf64e3(0x173)]:String(_0x130ab6)});}}return _0x28ef38[_0xdf64e3(0x187)]=new Date()[_0xdf64e3(0x15b)](),await writeBffLockFile(_0x4c6a21[_0xdf64e3(0x169)],_0x1f9bc0),{'ok':_0x282456[_0xdf64e3(0x186)]===0x0,'data':{'pulled':_0x1ba6e3,'skipped':_0xedb0e,'failed':_0x282456},'message':_0xdf64e3(0x165)+_0x1ba6e3['length']+_0xdf64e3(0x157)+_0xedb0e[_0xdf64e3(0x186)]+'\x20skipped,\x20'+_0x282456[_0xdf64e3(0x186)]+_0xdf64e3(0x16f)};}};async function hasUnsyncedLocalChanges(_0x30e8e0,_0xbecc35,_0x403dc7){const _0x161cf4=a36_0x2806dc;if(!await fileExists(_0x30e8e0))return![];const _0x168eaf=await computeFileHash(_0x30e8e0);if(!_0xbecc35)return _0x403dc7?_0x168eaf!==_0x403dc7:!![];return _0x168eaf!==_0xbecc35[_0x161cf4(0x18d)];}function buildDatasetCodeToAliasMap(_0xeefc66,_0x71b2b){const _0x159539=a36_0x2806dc,_0x56fd96=loadAliasMap(_0xeefc66,undefined,resolveApiFilePath(_0xeefc66,_0x71b2b));return new Map(_0x56fd96[_0x159539(0x161)](_0x56385f=>[_0x56385f[_0x159539(0x180)],_0x56385f['alias']]));}async function confirmForce(){const _0x3a6574=a36_0x2806dc,_0x3efbd3=createInterface({'input':process[_0x3a6574(0x152)],'output':process[_0x3a6574(0x17e)]}),_0x1d6daa=await new Promise(_0x47d1f2=>{const _0x24aa92=_0x3a6574;_0x3efbd3[_0x24aa92(0x18a)](_0x24aa92(0x172),_0x47d1f2);});return _0x3efbd3['close'](),['y','yes']['includes'](_0x1d6daa[_0x3a6574(0x16e)]()[_0x3a6574(0x16d)]());}
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
- const a37_0x237959=a37_0x1928;(function(_0x437999,_0x49452e){const _0x335cea=a37_0x1928,_0x1a6c6e=_0x437999();while(!![]){try{const _0x40ab6b=parseInt(_0x335cea(0x171))/0x1*(parseInt(_0x335cea(0x18a))/0x2)+parseInt(_0x335cea(0x14f))/0x3*(-parseInt(_0x335cea(0x166))/0x4)+parseInt(_0x335cea(0x153))/0x5*(parseInt(_0x335cea(0x14b))/0x6)+parseInt(_0x335cea(0x14a))/0x7*(-parseInt(_0x335cea(0x148))/0x8)+parseInt(_0x335cea(0x16e))/0x9*(parseInt(_0x335cea(0x15b))/0xa)+parseInt(_0x335cea(0x161))/0xb+-parseInt(_0x335cea(0x176))/0xc*(parseInt(_0x335cea(0x18b))/0xd);if(_0x40ab6b===_0x49452e)break;else _0x1a6c6e['push'](_0x1a6c6e['shift']());}catch(_0x3b6f5a){_0x1a6c6e['push'](_0x1a6c6e['shift']());}}}(a37_0x4ff0,0x7572c));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';import{CLI_BIN_NAME}from'../../constant/cli.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;function a37_0x4ff0(){const _0xac073c=['validation','apps','Push\x20complete:\x20','update','223810GRvgtM','\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','write','alias','runtime\x20cache\x20not\x20needed','Cannot\x20resolve\x20dataset\x20for\x20\x22','9750334ahlKLC','Lock\x20scope\x20for\x20app\x20\x22','toISOString','map','every','1843772lmFzrw','parse','bool','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','aliasToDatasetCode','\x20uploaded,\x20','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','hash','279vPVwdB','str','\x22\x20not\x20found\x20after\x20ensureLockScope.','1qFrGzn','HOOK','filePath','unchanged','lockKey','2716068tcLBRl','status','lockFilePath','scriptsRoot','name','would_push','datasetCodeToDataset','datasetCode','stringify','string','runtime\x20cache\x20clear\x20failed','runtime\x20cache\x20cleared','Run\x20`','\x22.\x20','\x20skipped,\x20','version','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','ENDPOINT','push','cleared','356134MMtlBN','78DpwJAB','values','create','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','script','functions','message','POST','remoteId','apiDir','Runtime\x20script\x20cache\x20cleared.','functionNode','boolean','Incomplete\x20HOOK\x20path:\x20','Force\x20push\x20ignoring\x20hash\x20protection','length','appCode','set','utf8','bff','get','type','/api/management/library/scripts/save','filter','24QXWtxH','code','769328mAzWOl','18xSjeYV','operationType','force','description','3kcMtWv','COMMON','No\x20local\x20Backend\x20Function\x20scripts\x20found.',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','1452475YlXLop','has','datasetId','some'];a37_0x4ff0=function(){return _0xac073c;};return a37_0x4ff0();}export const bffPush={'service':a37_0x237959(0x143),'command':a37_0x237959(0x188),'description':'Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','risk':a37_0x237959(0x15d),'flags':[{'name':'type','type':'string','description':'Push\x20only\x20this\x20script\x20type','enum':[a37_0x237959(0x150),a37_0x237959(0x187),'HOOK']},{'name':a37_0x237959(0x17a),'type':a37_0x237959(0x17f),'description':a37_0x237959(0x16c)},{'name':a37_0x237959(0x14d),'type':a37_0x237959(0x197),'description':a37_0x237959(0x199)}],async 'dryRun'(_0x4d9baf){const _0x474f9a=a37_0x237959,_0x355b1d=loadBffProjectConfig(_0x4d9baf[_0x474f9a(0x19b)]),_0x3b8f04=await readBffLockFile(_0x355b1d[_0x474f9a(0x178)]),{appLock:_0x3cfe44}=ensureLockScope(_0x3b8f04??createEmptyBffLock(),_0x4d9baf[_0x474f9a(0x19b)],_0x355b1d[_0x474f9a(0x179)],_0x474f9a(0x188)),_0x5ec7cc=await getTargetFunctions(_0x355b1d,_0x4d9baf),_0x4f96e9=_0x4d9baf['bool'](_0x474f9a(0x14d)),_0x1dcb26=[];for(const _0x4f4081 of _0x5ec7cc){const _0x2ee273=await computeFileHash(_0x4f4081[_0x474f9a(0x173)]),_0x30a11b=_0x3cfe44[_0x474f9a(0x190)][_0x4f4081[_0x474f9a(0x175)]],_0x4ea781=!!_0x30a11b&&_0x30a11b[_0x474f9a(0x16d)]===_0x2ee273;_0x1dcb26[_0x474f9a(0x188)]({'lockKey':_0x4f4081[_0x474f9a(0x175)],'filePath':_0x4f4081['filePath'],'remoteId':_0x30a11b?.[_0x474f9a(0x193)]??null,'mode':_0x30a11b?.[_0x474f9a(0x193)]?_0x474f9a(0x15a):_0x474f9a(0x18d),'status':!_0x4f96e9&&_0x4ea781?_0x474f9a(0x174):_0x474f9a(0x17b)});}return{'method':_0x474f9a(0x192),'url':_0x474f9a(0x146),'body':{'appCode':_0x4d9baf[_0x474f9a(0x19b)],'force':_0x4f96e9,'files':_0x1dcb26,'cacheClearAtRuntime':_0x1dcb26[_0x474f9a(0x156)](_0x17069a=>_0x17069a[_0x474f9a(0x177)]===_0x474f9a(0x17b)),'cacheClearAtRuntimeTimes':_0x1dcb26['some'](_0x44e18c=>_0x44e18c[_0x474f9a(0x177)]===_0x474f9a(0x17b))?CACHE_CLEAR_ATTEMPTS:0x0},'description':'Would\x20inspect\x20'+_0x1dcb26['length']+_0x474f9a(0x15c)};},async 'execute'(_0x5c25ec){const _0x263f38=a37_0x237959,_0x12c659=loadBffProjectConfig(_0x5c25ec[_0x263f38(0x19b)]),_0xe98345=await readBffLockFile(_0x12c659['lockFilePath']),{lockData:_0x5e5eea,appLock:_0x3932bc}=ensureLockScope(_0xe98345??createEmptyBffLock(),_0x5c25ec[_0x263f38(0x19b)],_0x12c659[_0x263f38(0x179)],'push'),_0x44741c=await getTargetFunctions(_0x12c659,_0x5c25ec);if(_0x44741c['length']===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x263f38(0x151)};const _0x50db9f=_0x5c25ec[_0x263f38(0x168)](_0x263f38(0x14d)),_0x1cb669=JSON[_0x263f38(0x167)](JSON[_0x263f38(0x17e)](_0x5e5eea)),_0x4ad383=_0x1cb669[_0x263f38(0x158)][_0x5c25ec['appCode']];if(!_0x4ad383)throw new Error(_0x263f38(0x162)+_0x5c25ec[_0x263f38(0x19b)]+_0x263f38(0x170));const _0x8454cf=await buildHookMaps(_0x5c25ec[_0x263f38(0x19b)],_0x5c25ec[_0x263f38(0x194)],_0x44741c,_0x4ad383),_0x5e2be9=[],_0x244ee9=[],_0x5b25ab=[];for(const _0x3927cd of _0x44741c){const _0x3ba5c5=await computeFileHash(_0x3927cd['filePath']),_0x21fe7e=_0x4ad383[_0x263f38(0x190)][_0x3927cd['lockKey']];if(!_0x50db9f&&_0x21fe7e&&_0x21fe7e[_0x263f38(0x16d)]===_0x3ba5c5){_0x244ee9[_0x263f38(0x188)]({'lockKey':_0x3927cd['lockKey'],'reason':_0x263f38(0x174)});continue;}try{await uploadSingleFunction(_0x5c25ec[_0x263f38(0x19b)],_0x3927cd,_0x4ad383,_0x8454cf);const _0x424c27=_0x4ad383[_0x263f38(0x190)][_0x3927cd['lockKey']];_0x5e2be9[_0x263f38(0x188)]({'lockKey':_0x3927cd[_0x263f38(0x175)],'remoteId':_0x424c27?.[_0x263f38(0x193)]??0x0});}catch(_0x4173c5){_0x5b25ab[_0x263f38(0x188)]({'lockKey':_0x3927cd[_0x263f38(0x175)],'error':_0x4173c5 instanceof Error?_0x4173c5[_0x263f38(0x191)]:String(_0x4173c5)});}}_0x4ad383['lastSync']=new Date()[_0x263f38(0x163)](),await writeBffLockFile(_0x12c659[_0x263f38(0x178)],_0x1cb669),await waitForUploadedLockEntries(_0x12c659[_0x263f38(0x178)],_0x5c25ec[_0x263f38(0x19b)],_0x5e2be9[_0x263f38(0x164)](_0x508d4b=>_0x508d4b[_0x263f38(0x175)]));let _0x3810fd={'attempted':![],'cleared':![]};if(_0x5e2be9[_0x263f38(0x19a)]>0x0)try{let _0x25b329='';for(let _0x5a9468=0x0;_0x5a9468<CACHE_CLEAR_ATTEMPTS;_0x5a9468+=0x1){_0x25b329=await clearBffScriptCache(),_0x5a9468<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x3810fd={'attempted':!![],'cleared':!![],'message':_0x25b329||_0x263f38(0x195)};}catch(_0x5a9b2a){_0x3810fd={'attempted':!![],'cleared':![],'error':_0x5a9b2a instanceof Error?_0x5a9b2a[_0x263f38(0x191)]:String(_0x5a9b2a)};}const _0xf3a9e6=_0x5b25ab[_0x263f38(0x19a)]===0x0&&(_0x3810fd['attempted']?_0x3810fd['cleared']:!![]),_0x5da5a3=_0x3810fd['attempted']?_0x3810fd[_0x263f38(0x189)]?_0x263f38(0x181):_0x263f38(0x180):_0x263f38(0x15f);return{'ok':_0xf3a9e6,'data':{'uploaded':_0x5e2be9,'skipped':_0x244ee9,'failed':_0x5b25ab,'cacheClear':_0x3810fd},'message':_0x263f38(0x159)+_0x5e2be9[_0x263f38(0x19a)]+_0x263f38(0x16b)+_0x244ee9[_0x263f38(0x19a)]+_0x263f38(0x184)+_0x5b25ab[_0x263f38(0x19a)]+'\x20failed,\x20'+_0x5da5a3};}};async function getTargetFunctions(_0x87f77,_0x458b0c){const _0x10b51b=a37_0x237959,_0x4030ab=_0x458b0c[_0x10b51b(0x16f)]('type'),_0x4c3ef0=_0x458b0c[_0x10b51b(0x16f)](_0x10b51b(0x17a)),_0x2d5732=normalizeBffType(_0x4030ab)??undefined;if(_0x4c3ef0&&!_0x2d5732)throw CliErrors[_0x10b51b(0x157)](_0x10b51b(0x169));const _0x5cf89b=await scanLocalBffFunctions(_0x87f77,_0x2d5732);if(_0x4c3ef0){const _0x267e38=_0x5cf89b[_0x10b51b(0x147)](_0x415b3b=>_0x415b3b[_0x10b51b(0x17a)]===_0x4c3ef0);if(_0x267e38['length']===0x0)throw CliErrors['validation']('Local\x20function\x20not\x20found:\x20'+_0x2d5732+'/'+_0x4c3ef0);return _0x267e38;}return _0x5cf89b;}async function buildHookMaps(_0x2a2abc,_0x41d03a,_0x3f25ca,_0x192a0c){const _0x3bc23d=a37_0x237959,_0x2f6cc2=_0x3f25ca[_0x3bc23d(0x156)](_0x4888bf=>_0x4888bf[_0x3bc23d(0x145)]===_0x3bc23d(0x172));if(!_0x2f6cc2)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x1ece65=loadAliasMap(_0x41d03a,undefined,resolveApiFilePath(_0x41d03a,_0x2a2abc)),_0x94e651=new Map(_0x1ece65[_0x3bc23d(0x164)](_0x305444=>[_0x305444[_0x3bc23d(0x15e)],_0x305444[_0x3bc23d(0x17d)]]));for(const _0x3ddcb7 of Object[_0x3bc23d(0x18c)](_0x192a0c['functions'])){_0x3ddcb7['alias']&&_0x3ddcb7['datasetCode']&&!_0x94e651[_0x3bc23d(0x154)](_0x3ddcb7[_0x3bc23d(0x15e)])&&_0x94e651[_0x3bc23d(0x19c)](_0x3ddcb7[_0x3bc23d(0x15e)],_0x3ddcb7[_0x3bc23d(0x17d)]);}const _0x486df9=await listDatasets(_0x2a2abc),_0x17d617=new Map(_0x486df9[_0x3bc23d(0x164)](_0x3fa9e4=>[_0x3fa9e4[_0x3bc23d(0x149)],_0x3fa9e4]));return{'aliasToDatasetCode':_0x94e651,'datasetCodeToDataset':_0x17d617};}async function uploadSingleFunction(_0x34bb04,_0x304571,_0x5d94c7,_0x5317b3){const _0xa42ff6=a37_0x237959,_0x783383=await readFile(_0x304571[_0xa42ff6(0x173)],_0xa42ff6(0x19d)),_0x47c496=await computeFileHash(_0x304571['filePath']),_0x326424=_0x5d94c7[_0xa42ff6(0x190)][_0x304571[_0xa42ff6(0x175)]];if(_0x326424?.[_0xa42ff6(0x193)]&&_0x326424[_0xa42ff6(0x185)]==null)throw CliErrors[_0xa42ff6(0x157)](_0x304571[_0xa42ff6(0x175)]+_0xa42ff6(0x152));let _0xb6a9d5=extractScriptDescription(_0x783383);if(!_0xb6a9d5&&_0x326424?.['remoteId']){const _0x358287=await getBffScriptInfo(_0x326424[_0xa42ff6(0x193)]);_0xb6a9d5=_0x358287['description']||undefined;}const _0x271c7d={'appCode':_0x34bb04,'functionName':_0x304571[_0xa42ff6(0x17a)],'scriptType':_0x304571[_0xa42ff6(0x145)],'scriptContent':_0x783383};if(_0x326424?.[_0xa42ff6(0x193)])_0x271c7d['id']=_0x326424['remoteId'];if(_0x326424?.[_0xa42ff6(0x185)]!=null)_0x271c7d[_0xa42ff6(0x185)]=_0x326424['version'];if(_0xb6a9d5)_0x271c7d[_0xa42ff6(0x14e)]=_0xb6a9d5;if(_0x304571['type']===_0xa42ff6(0x172)){const _0x5e6d12=_0x304571[_0xa42ff6(0x15e)];if(!_0x5e6d12||!_0x304571[_0xa42ff6(0x14c)]||!_0x304571[_0xa42ff6(0x196)])throw CliErrors[_0xa42ff6(0x157)](_0xa42ff6(0x198)+_0x304571[_0xa42ff6(0x175)]);const _0x3de9cc=_0x5317b3[_0xa42ff6(0x16a)][_0xa42ff6(0x144)](_0x5e6d12)??_0x326424?.[_0xa42ff6(0x17d)]??_0x5e6d12,_0x11b848=_0x5317b3[_0xa42ff6(0x17c)]['get'](_0x3de9cc);if(!_0x11b848)throw CliErrors[_0xa42ff6(0x157)](_0xa42ff6(0x160)+_0x5e6d12+_0xa42ff6(0x183)+(_0xa42ff6(0x182)+CLI_BIN_NAME+_0xa42ff6(0x18e)));_0x271c7d[_0xa42ff6(0x155)]=_0x11b848['id'],_0x271c7d[_0xa42ff6(0x14c)]=_0x304571[_0xa42ff6(0x14c)],_0x271c7d[_0xa42ff6(0x196)]=_0x304571[_0xa42ff6(0x196)];}const _0x1df22e=await saveBffScript(_0x271c7d),_0x5adac4=_0x1df22e['id'],_0x33a13f=_0x1df22e[_0xa42ff6(0x18f)]??await getBffScriptInfo(_0x5adac4),_0x395b73={'hash':_0x47c496,'remoteId':_0x5adac4,'version':_0x33a13f[_0xa42ff6(0x185)]};if(_0x304571[_0xa42ff6(0x145)]==='HOOK'){const _0x4aa8b2=_0x304571[_0xa42ff6(0x15e)],_0x433597=_0x5317b3[_0xa42ff6(0x16a)][_0xa42ff6(0x144)](_0x4aa8b2)??_0x326424?.[_0xa42ff6(0x17d)]??_0x4aa8b2;_0x5317b3[_0xa42ff6(0x16a)]['has'](_0x4aa8b2)?_0x395b73['alias']=_0x4aa8b2:_0x395b73[_0xa42ff6(0x15e)]=_0x326424?.[_0xa42ff6(0x15e)],_0x395b73['datasetCode']=_0x433597,_0x395b73[_0xa42ff6(0x14c)]=_0x304571['operationType'],_0x395b73['functionNode']=_0x304571['functionNode'];}_0x5d94c7[_0xa42ff6(0x190)][_0x304571[_0xa42ff6(0x175)]]=_0x395b73;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;function a37_0x1928(_0x2619d4,_0x45c1dd){_0x2619d4=_0x2619d4-0x143;const _0x4ff0df=a37_0x4ff0();let _0x192813=_0x4ff0df[_0x2619d4];return _0x192813;}async function waitForUploadedLockEntries(_0x2ac4eb,_0xfb1aaa,_0x215559){const _0x57482b=a37_0x237959;if(_0x215559['length']===0x0)return;for(let _0x877abf=0x0;_0x877abf<LOCK_SETTLE_RETRY_COUNT;_0x877abf+=0x1){const _0x149d92=await readBffLockFile(_0x2ac4eb),_0x50099e=_0x149d92?.[_0x57482b(0x158)]?.[_0xfb1aaa]?.[_0x57482b(0x190)]??{},_0x17a6a2=_0x215559[_0x57482b(0x165)](_0xa81f77=>!!_0x50099e[_0xa81f77]?.[_0x57482b(0x193)]);if(_0x17a6a2)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x57482b(0x186)+_0x215559['join'](',\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_0x426fec=a38_0x433b;function a38_0x56ee(){const _0x38907f=['751040hLaHYA','read','push','\x20modified,\x20','scriptsRoot','length','appCode','1106973QqrQJq','bool','datasetCode','635614dRPEZV','lockKey','bff','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','lockFilePath','remote','status','3448240hRZgLi','alias','3097362RxsAzn','functions','\x20unchanged','filePath','map','\x20remote-only','all','apiDir','All\x20Backend\x20Function\x20scripts\x20are\x20in\x20sync.','1897260mkabRs','519690kVzaVJ','has'];a38_0x56ee=function(){return _0x38907f;};return a38_0x56ee();}(function(_0x4feebc,_0x347d5a){const _0x318b99=a38_0x433b,_0x324936=_0x4feebc();while(!![]){try{const _0x4a6fc5=parseInt(_0x318b99(0xd0))/0x1+parseInt(_0x318b99(0xc6))/0x2+-parseInt(_0x318b99(0xc7))/0x3+-parseInt(_0x318b99(0xda))/0x4+parseInt(_0x318b99(0xc9))/0x5+-parseInt(_0x318b99(0xdc))/0x6+parseInt(_0x318b99(0xd3))/0x7;if(_0x4a6fc5===_0x347d5a)break;else _0x324936['push'](_0x324936['shift']());}catch(_0x1f1410){_0x324936['push'](_0x324936['shift']());}}}(a38_0x56ee,0xb5e88));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';function a38_0x433b(_0x1a822e,_0x15ee29){_0x1a822e=_0x1a822e-0xc6;const _0x56eedc=a38_0x56ee();let _0x433b63=_0x56eedc[_0x1a822e];return _0x433b63;}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';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':a38_0x426fec(0xd5),'command':a38_0x426fec(0xd9),'description':'Check\x20local\x20Backend\x20Function\x20sync\x20status\x20against\x20lock\x20file','risk':a38_0x426fec(0xca),'flags':[{'name':a38_0x426fec(0xd8),'type':'boolean','description':a38_0x426fec(0xd6)}],async 'execute'(_0x19fdf3){const _0x2ba653=a38_0x426fec,_0x5e5d29=loadBffProjectConfig(_0x19fdf3[_0x2ba653(0xcf)]),_0x22aab4=await readBffLockFile(_0x5e5d29[_0x2ba653(0xd7)]),{appLock:_0x68930f}=ensureLockScope(_0x22aab4??createEmptyBffLock(),_0x19fdf3[_0x2ba653(0xcf)],_0x5e5d29[_0x2ba653(0xcd)],_0x2ba653(0xd9)),_0x46b1b5=await scanLocalBffFunctions(_0x5e5d29),_0x43a66b=[],_0x541059=[],_0x37d675=[];for(const _0x25e160 of _0x46b1b5){const _0x210d8e=await computeFileHash(_0x25e160[_0x2ba653(0xdf)]),_0x3799ed=_0x68930f[_0x2ba653(0xdd)][_0x25e160[_0x2ba653(0xd4)]];if(!_0x3799ed)_0x43a66b['push'](_0x25e160[_0x2ba653(0xd4)]);else _0x3799ed['hash']!==_0x210d8e?_0x541059[_0x2ba653(0xcb)](_0x25e160[_0x2ba653(0xd4)]):_0x37d675[_0x2ba653(0xcb)](_0x25e160[_0x2ba653(0xd4)]);}const _0x316135=[];if(_0x19fdf3[_0x2ba653(0xd1)](_0x2ba653(0xd8))){const _0x320a36=loadAliasMap(_0x19fdf3[_0x2ba653(0xe3)],undefined,resolveApiFilePath(_0x19fdf3[_0x2ba653(0xe3)],_0x19fdf3[_0x2ba653(0xcf)])),_0x445882=new Map(_0x320a36[_0x2ba653(0xe0)](_0xb8446f=>[_0xb8446f[_0x2ba653(0xd2)],_0xb8446f[_0x2ba653(0xdb)]])),[_0x332124,_0x187756]=await Promise[_0x2ba653(0xe2)]([listBffScripts(_0x19fdf3[_0x2ba653(0xcf)]),getBffScriptStatistics(_0x19fdf3[_0x2ba653(0xcf)])]),_0x5c1543=createHookLocationMap(_0x187756),_0x336d18=new Set(_0x46b1b5[_0x2ba653(0xe0)](_0x1fec15=>_0x1fec15['lockKey']));for(const _0x38e8f8 of _0x332124){const _0x57cf7f=resolveRemoteScriptTarget(_0x5e5d29,_0x38e8f8,_0x5c1543,_0x68930f[_0x2ba653(0xdd)],_0x445882);_0x57cf7f&&!_0x336d18[_0x2ba653(0xc8)](_0x57cf7f['lockKey'])&&_0x316135[_0x2ba653(0xcb)](_0x57cf7f['lockKey']);}}const _0x9ce595=_0x43a66b['length']===0x0&&_0x541059[_0x2ba653(0xce)]===0x0&&_0x316135[_0x2ba653(0xce)]===0x0;return{'ok':!![],'data':{'added':_0x43a66b,'modified':_0x541059,'unchanged':_0x37d675,'remoteOnly':_0x316135},'message':_0x9ce595?_0x2ba653(0xe4):_0x43a66b['length']+'\x20added,\x20'+_0x541059[_0x2ba653(0xce)]+_0x2ba653(0xcc)+_0x37d675[_0x2ba653(0xce)]+_0x2ba653(0xde)+(_0x316135['length']>0x0?',\x20'+_0x316135[_0x2ba653(0xce)]+_0x2ba653(0xe1):'')};}};
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
- function a39_0x1be5(_0x4ba361,_0x13bf83){_0x4ba361=_0x4ba361-0x174;const _0x593e6c=a39_0x593e();let _0x1be5e2=_0x593e6c[_0x4ba361];return _0x1be5e2;}const a39_0x16d87f=a39_0x1be5;(function(_0xfbf1af,_0x4900cd){const _0x5aaac2=a39_0x1be5,_0x519609=_0xfbf1af();while(!![]){try{const _0x12785d=parseInt(_0x5aaac2(0x187))/0x1*(parseInt(_0x5aaac2(0x191))/0x2)+-parseInt(_0x5aaac2(0x17f))/0x3*(-parseInt(_0x5aaac2(0x178))/0x4)+-parseInt(_0x5aaac2(0x186))/0x5+parseInt(_0x5aaac2(0x190))/0x6+-parseInt(_0x5aaac2(0x192))/0x7+-parseInt(_0x5aaac2(0x182))/0x8*(parseInt(_0x5aaac2(0x175))/0x9)+-parseInt(_0x5aaac2(0x18e))/0xa*(-parseInt(_0x5aaac2(0x185))/0xb);if(_0x12785d===_0x4900cd)break;else _0x519609['push'](_0x519609['shift']());}catch(_0x531d41){_0x519609['push'](_0x519609['shift']());}}}(a39_0x593e,0x8ac20));import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';function a39_0x593e(){const _0x3c97c9=['3346DaHlyy','5399583IQqSgm',']:\x20','cli-skill-install','4572cJkKSc','info','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','43436uScwhb','apiError','read','skillVersion','log','install','CLI\x20Built-in\x20Skill\x20','24IyvxMV','\x20at\x20','unknown','13176dPrQOu','error','\x20via\x20skills@latest','11wMxgkQ','4728865jwaYaB','55eQkDBk','installedPath','nonInteractive','cwd','\x20is\x20already\x20current','Built-in\x20Skill\x20install\x20failed\x20[','inherit','22313020sIdtAm','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20','4271886fVgwgY'];a39_0x593e=function(){return _0x3c97c9;};return a39_0x593e();}import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':'cli-skill','command':a39_0x16d87f(0x17d),'description':a39_0x16d87f(0x177),'risk':a39_0x16d87f(0x17a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0xb3480){const _0x2c028a=a39_0x16d87f;logger['setLogPath'](process[_0x2c028a(0x18a)]()),logger[_0x2c028a(0x176)](_0x2c028a(0x174),'Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20current\x20package.');const _0x437832=installBuiltinSkill({'stdio':_0xb3480[_0x2c028a(0x189)]?'pipe':_0x2c028a(0x18d)});if(!_0x437832['ok'])throw CliErrors[_0x2c028a(0x179)](_0x2c028a(0x18c)+_0x437832['code']+_0x2c028a(0x193)+(_0x437832[_0x2c028a(0x183)]||_0x2c028a(0x181)),_0x2c028a(0x18f)+_0x437832['repairCommand']);return console[_0x2c028a(0x17c)](_0x437832['changed']?_0x2c028a(0x17e)+_0x437832[_0x2c028a(0x17b)]+'\x20installed'+(_0x437832['installedPath']?_0x2c028a(0x180)+_0x437832[_0x2c028a(0x188)]:_0x2c028a(0x184)):'CLI\x20Built-in\x20Skill\x20'+_0x437832[_0x2c028a(0x17b)]+_0x2c028a(0x18b)+(_0x437832[_0x2c028a(0x188)]?_0x2c028a(0x180)+_0x437832[_0x2c028a(0x188)]:'')),{'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_0x45ccd5=a40_0x48db;(function(_0x363899,_0x1b64db){const _0xf0b6bf=a40_0x48db,_0x16b930=_0x363899();while(!![]){try{const _0x2abee5=parseInt(_0xf0b6bf(0x148))/0x1*(parseInt(_0xf0b6bf(0x11d))/0x2)+parseInt(_0xf0b6bf(0x118))/0x3+parseInt(_0xf0b6bf(0x125))/0x4*(-parseInt(_0xf0b6bf(0x137))/0x5)+-parseInt(_0xf0b6bf(0x13b))/0x6+-parseInt(_0xf0b6bf(0xf6))/0x7+-parseInt(_0xf0b6bf(0x12b))/0x8+parseInt(_0xf0b6bf(0x102))/0x9*(parseInt(_0xf0b6bf(0x143))/0xa);if(_0x2abee5===_0x1b64db)break;else _0x16b930['push'](_0x16b930['shift']());}catch(_0x32c49c){_0x16b930['push'](_0x16b930['shift']());}}}(a40_0x4c26,0xf230f));import a40_0x19bbf3 from'chalk';import a40_0x5d02ed from'ora';import a40_0x33619c from'semver';import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';function a40_0x4c26(){const _0x11b32a=['unknown','7163724UGWYQy','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','warn','gray','Checking\x20CLI\x20Built-in\x20Skill...','skillVersion','read','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','2300NmCBEX','validation','map','\x20\x20Try\x20manually:\x20','expected\x20','148270FwisCf','string','state','Install\x20a\x20specific\x20CLI\x20version','slice','message','Update\x20failed','976836HbsTum','succeed','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','install','fail',',\x20state\x20','trim','toLowerCase','object','timeout','error','current','101817aAhEVq','npm','...','\x20is\x20newer\x20than\x20npm\x20latest\x20v','green','beta','json','filter','str','Already\x20up\x20to\x20date\x20(v','https://registry.npmjs.org/-/package/','Already\x20on\x20requested\x20version\x20(v','yellow','Current\x20version\x20v','Updating\x20via\x20','source','code','\x20\x20CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','run','log','length','1815807jIoMis','Requested\x20version:\x20','Version\x20comparison\x20failed','\x20install\x20-g\x20',',\x20found\x20','10GCgnSM',']:\x20','\x20cli-skill\x20install','valid','\x20is\x20up\x20to\x20date.','\x20→\x20','Beta\x20version:\x20','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','4FpIqbF','includes','entries','Current\x20version:\x20','fromEntries','\x20\x20CLI\x20Built-in\x20Skill\x20','9260888KsWzhg','red','bun','\x20\x20Built-in\x20Skill\x20verification\x20failed:\x20','start','update','info','bool','boolean','version','@latest','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','2327405DcUMdV','repairCommand','latest'];a40_0x4c26=function(){return _0x11b32a;};return a40_0x4c26();}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 _0x3f593e=a40_0x48db;return GIT_COMMIT!==_0x3f593e(0x13a)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x3f593e(0x14c)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0xa3ca57=a40_0x48db,_0x12d358=process['execPath'][_0xa3ca57(0xfd)]();if(_0x12d358[_0xa3ca57(0x126)](_0xa3ca57(0x12d)))return'bun';return _0xa3ca57(0x103);}const updateFlags=[{'name':a40_0x45ccd5(0x107),'type':a40_0x45ccd5(0x133),'description':a40_0x45ccd5(0x124),'default':![]},{'name':a40_0x45ccd5(0x134),'type':a40_0x45ccd5(0x149),'description':a40_0x45ccd5(0x14b)}];function getRequestedVersion(_0x5d5b64){const _0x149731=a40_0x45ccd5;return _0x5d5b64[_0x149731(0x10a)](_0x149731(0x134))[_0x149731(0xfc)]();}async function validateUpdateFlags(_0x417898){const _0x557018=a40_0x45ccd5,_0xe6a5f4=_0x417898[_0x557018(0x132)](_0x557018(0x107)),_0x4f3a6f=getRequestedVersion(_0x417898);if(_0xe6a5f4&&_0x4f3a6f)throw CliErrors['validation'](_0x557018(0x114),_0x557018(0x142));if(_0x4f3a6f&&!a40_0x33619c['valid'](_0x4f3a6f))throw CliErrors[_0x557018(0x144)]('Invalid\x20version:\x20'+_0x4f3a6f,_0x557018(0x136));}function a40_0x48db(_0x332d86,_0x503f71){_0x332d86=_0x332d86-0xf4;const _0x4c2697=a40_0x4c26();let _0x48db52=_0x4c2697[_0x332d86];return _0x48db52;}async function fetchNpmDistTags(){const _0x580ffc=a40_0x45ccd5;try{const _0x5118f8=await fetch(_0x580ffc(0x10c)+encodeURIComponent(NPM_PACKAGE_NAME)+'/dist-tags',{'signal':AbortSignal[_0x580ffc(0xff)](0x2710)});if(!_0x5118f8['ok'])return null;const _0x76e4bc=await _0x5118f8[_0x580ffc(0x108)]();if(!_0x76e4bc||typeof _0x76e4bc!==_0x580ffc(0xfe))return null;return Object[_0x580ffc(0x129)](Object[_0x580ffc(0x127)](_0x76e4bc)[_0x580ffc(0x109)](([,_0x49f8b4])=>typeof _0x49f8b4===_0x580ffc(0x149)&&_0x49f8b4[_0x580ffc(0xfc)]()[_0x580ffc(0x117)]>0x0)[_0x580ffc(0x145)](([_0x5e2bae,_0x1f2cd8])=>[_0x5e2bae,String(_0x1f2cd8)[_0x580ffc(0xfc)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x3f4315){const _0x28d180=await fetchNpmDistTags();return _0x28d180?.[_0x3f4315]??null;}async function fetchLatestVersion(){const _0x2f2cba=a40_0x45ccd5;return fetchNpmDistTagVersion(_0x2f2cba(0x139));}async function resolveTargetVersion(_0x403315){const _0x3445e2=a40_0x45ccd5,_0x30e228=getRequestedVersion(_0x403315);if(_0x30e228)return{'version':_0x30e228,'source':_0x3445e2(0x134)};if(_0x403315[_0x3445e2(0x132)](_0x3445e2(0x107))){const _0x94a092=await fetchNpmDistTagVersion(_0x3445e2(0x107));if(!_0x94a092)return null;return{'version':_0x94a092,'source':_0x3445e2(0x107)};}const _0x2da4bf=await fetchLatestVersion();if(!_0x2da4bf)return null;return{'version':_0x2da4bf,'source':_0x3445e2(0x139)};}function shouldInstallTarget(_0x3eceb5,_0x528b35){const _0x527d11=a40_0x45ccd5;if(_0x528b35[_0x527d11(0x111)]===_0x527d11(0x134)||_0x528b35[_0x527d11(0x111)]==='beta')return!a40_0x33619c['eq'](_0x3eceb5,_0x528b35[_0x527d11(0x134)]);return a40_0x33619c['lt'](_0x3eceb5,_0x528b35[_0x527d11(0x134)]);}function getInstallPlanLabel(_0x34d2c2,_0x3966ea){const _0x576116=a40_0x45ccd5;switch(_0x3966ea[_0x576116(0x111)]){case _0x576116(0x107):return _0x576116(0x123)+a40_0x19bbf3['yellow'](_0x34d2c2)+'\x20→\x20'+a40_0x19bbf3[_0x576116(0x106)](_0x3966ea[_0x576116(0x134)]);case _0x576116(0x134):return _0x576116(0x119)+a40_0x19bbf3[_0x576116(0x10e)](_0x34d2c2)+_0x576116(0x122)+a40_0x19bbf3[_0x576116(0x106)](_0x3966ea[_0x576116(0x134)]);case _0x576116(0x139):default:return'Update\x20available:\x20'+a40_0x19bbf3[_0x576116(0x10e)](_0x34d2c2)+_0x576116(0x122)+a40_0x19bbf3[_0x576116(0x106)](_0x3966ea[_0x576116(0x134)]);}}function repairCurrentBuiltinSkill(){const _0x40d0f8=a40_0x45ccd5;console[_0x40d0f8(0x116)](a40_0x19bbf3[_0x40d0f8(0x13e)](_0x40d0f8(0x13f)));const _0x58cf52=installBuiltinSkill();if(_0x58cf52['ok'])return console[_0x40d0f8(0x116)](a40_0x19bbf3[_0x40d0f8(0x13e)](_0x40d0f8(0x12a)+_0x58cf52[_0x40d0f8(0x140)]+'\x20is\x20up\x20to\x20date.')),!![];return console[_0x40d0f8(0x13d)](a40_0x19bbf3[_0x40d0f8(0x10e)](_0x40d0f8(0x113)+_0x58cf52[_0x40d0f8(0x112)]+_0x40d0f8(0x11e)+(_0x58cf52['error']||_0x40d0f8(0x13a)))),console[_0x40d0f8(0x116)](a40_0x19bbf3[_0x40d0f8(0x13e)]('\x20\x20Run\x20manually:\x20'+CLI_BIN_NAME+_0x40d0f8(0x11f))),![];}function verifyUpdatedBuiltinSkill(_0x1968d2){const _0x2bea1d=a40_0x45ccd5,_0x4995b7=inspectInstalledBuiltinSkillVersion(_0x1968d2);if(_0x4995b7[_0x2bea1d(0x14a)]===_0x2bea1d(0x101))return console[_0x2bea1d(0x116)](a40_0x19bbf3[_0x2bea1d(0x13e)](_0x2bea1d(0x12a)+_0x1968d2+_0x2bea1d(0x121))),!![];const _0x3f9506=_0x4995b7[_0x2bea1d(0x140)]?_0x2bea1d(0x147)+_0x1968d2+_0x2bea1d(0x11c)+_0x4995b7[_0x2bea1d(0x140)]:_0x2bea1d(0x147)+_0x1968d2+_0x2bea1d(0xfb)+_0x4995b7[_0x2bea1d(0x14a)];return console[_0x2bea1d(0x13d)](a40_0x19bbf3['yellow'](_0x2bea1d(0x12e)+_0x3f9506)),console[_0x2bea1d(0x116)](a40_0x19bbf3['gray']('\x20\x20Run\x20manually:\x20'+_0x4995b7[_0x2bea1d(0x138)])),![];}async function execute(_0x16acf9){const _0x5a1227=a40_0x45ccd5;await validateUpdateFlags(_0x16acf9);const _0x4627a2=getCurrentVersion();console['log'](_0x5a1227(0x128)+_0x4627a2);const _0xdcd9cf=a40_0x5d02ed('Checking\x20for\x20updates...')['start'](),_0x12dcac=await resolveTargetVersion(_0x16acf9);if(!_0x12dcac){const _0x526bb1=_0x16acf9['bool'](_0x5a1227(0x107))?'Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm':'Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)';return _0xdcd9cf[_0x5a1227(0xfa)](_0x526bb1),console['log'](a40_0x19bbf3[_0x5a1227(0x13e)](_0x5a1227(0xf8)+NPM_PACKAGE_NAME+_0x5a1227(0x135))),{'ok':![],'message':_0x526bb1};}const _0x35b1e6=a40_0x33619c[_0x5a1227(0x120)](VERSION),_0x486a51=a40_0x33619c[_0x5a1227(0x120)](_0x12dcac[_0x5a1227(0x134)]);if(!_0x35b1e6||!_0x486a51)return _0xdcd9cf[_0x5a1227(0xfa)](_0x5a1227(0x11a)),{'ok':![],'message':'Version\x20comparison\x20failed'};if(!shouldInstallTarget(_0x35b1e6,_0x12dcac)){const _0x30ce3b=_0x12dcac[_0x5a1227(0x111)]==='version'?_0x5a1227(0x10d)+_0x12dcac[_0x5a1227(0x134)]+')':a40_0x33619c['gt'](_0x35b1e6,_0x486a51)?_0x5a1227(0x10f)+_0x4627a2+_0x5a1227(0x105)+_0x12dcac[_0x5a1227(0x134)]:_0x5a1227(0x10b)+_0x12dcac['version']+')';return _0xdcd9cf[_0x5a1227(0xf7)](_0x30ce3b),{'ok':repairCurrentBuiltinSkill()};}_0xdcd9cf[_0x5a1227(0x131)](getInstallPlanLabel(_0x4627a2,_0x12dcac));const _0x9b39fd=detectPackageManager(),_0xd56267=_0x9b39fd===_0x5a1227(0x103)?resolveNpmBin(_0x5a1227(0x103)):_0x9b39fd,_0x8d9ca1=a40_0x5d02ed(_0x5a1227(0x110)+_0x9b39fd+_0x5a1227(0x104))[_0x5a1227(0x12f)]();try{return await execa(_0xd56267,[_0x5a1227(0xf9),'-g',NPM_PACKAGE_NAME+'@'+_0x12dcac[_0x5a1227(0x134)]],{'stdio':'pipe'}),_0x8d9ca1['succeed']('Updated\x20to\x20v'+_0x12dcac[_0x5a1227(0x134)]),console[_0x5a1227(0x116)](a40_0x19bbf3[_0x5a1227(0x13e)]('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.')),{'ok':verifyUpdatedBuiltinSkill(_0x12dcac[_0x5a1227(0x134)])};}catch(_0x5188d1){return _0x8d9ca1[_0x5a1227(0xfa)](_0x5a1227(0xf5)),console[_0x5a1227(0x100)](a40_0x19bbf3[_0x5a1227(0x12c)]('\x20\x20'+_0x5188d1[_0x5a1227(0xf4)])),console[_0x5a1227(0x116)](a40_0x19bbf3['gray'](_0x5a1227(0x146)+_0x9b39fd+_0x5a1227(0x11b)+NPM_PACKAGE_NAME+'@'+_0x12dcac['version'])),{'ok':![],'message':_0x5188d1['message']};}}export const updateDefinition={'service':a40_0x45ccd5(0x130),'command':a40_0x45ccd5(0x115),'description':a40_0x45ccd5(0x13c),'risk':a40_0x45ccd5(0x141),'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(_0x5661c7,_0x56d5bb){const _0x3b4ab2=a41_0x5311,_0x502483=_0x5661c7();while(!![]){try{const _0x3dfdac=-parseInt(_0x3b4ab2(0x14f))/0x1+parseInt(_0x3b4ab2(0x154))/0x2+-parseInt(_0x3b4ab2(0x14d))/0x3+parseInt(_0x3b4ab2(0x153))/0x4*(parseInt(_0x3b4ab2(0x151))/0x5)+parseInt(_0x3b4ab2(0x152))/0x6*(parseInt(_0x3b4ab2(0x150))/0x7)+parseInt(_0x3b4ab2(0x14e))/0x8+-parseInt(_0x3b4ab2(0x155))/0x9;if(_0x3dfdac===_0x56d5bb)break;else _0x502483['push'](_0x502483['shift']());}catch(_0x3d2202){_0x502483['push'](_0x502483['shift']());}}}(a41_0xa820,0x47143));function a41_0xa820(){const _0x7f2493=['837630PGkNvw','4635680ItfITs','10814mJmfJO','760249wQwsJb','5135JGzysQ','18mVXhtS','2092RfQAcZ','778126Ltoigg','11252718FUgzsQ'];a41_0xa820=function(){return _0x7f2493;};return a41_0xa820();}import{codegenSdk}from'../../commands/codegen/sdk.js';function a41_0x5311(_0x56fbd8,_0x14dee0){_0x56fbd8=_0x56fbd8-0x14d;const _0xa820ba=a41_0xa820();let _0x53119a=_0xa820ba[_0x56fbd8];return _0x53119a;}import{codegenSql}from'../../commands/codegen/sql.js';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
- const a42_0x73ffd0=a42_0x441b;(function(_0x5a8efc,_0x4aae95){const _0x3a4456=a42_0x441b,_0x205291=_0x5a8efc();while(!![]){try{const _0x4f24a3=parseInt(_0x3a4456(0x172))/0x1+-parseInt(_0x3a4456(0x169))/0x2*(parseInt(_0x3a4456(0x175))/0x3)+parseInt(_0x3a4456(0x170))/0x4*(parseInt(_0x3a4456(0x16f))/0x5)+-parseInt(_0x3a4456(0x174))/0x6*(-parseInt(_0x3a4456(0x17c))/0x7)+parseInt(_0x3a4456(0x173))/0x8*(-parseInt(_0x3a4456(0x16b))/0x9)+parseInt(_0x3a4456(0x17a))/0xa*(-parseInt(_0x3a4456(0x168))/0xb)+parseInt(_0x3a4456(0x177))/0xc;if(_0x4f24a3===_0x4aae95)break;else _0x205291['push'](_0x205291['shift']());}catch(_0xb2fb63){_0x205291['push'](_0x205291['shift']());}}}(a42_0x2139,0xe9a22));function a42_0x441b(_0x1b38c3,_0x291c12){_0x1b38c3=_0x1b38c3-0x167;const _0x213967=a42_0x2139();let _0x441b09=_0x213967[_0x1b38c3];return _0x441b09;}import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';function a42_0x2139(){const _0x5618de=['1200899BJejrZ','17192pxeQTq','42KdgnFe','1956LtEwEm','name','18091440nkPhRb','bool','str','24880oPUqQQ','skip-imports','1191337gQbNQs','tableName','418mrPEaz','5076daVlrm','operation','6057ppSHfn','alias','code','boolean','55bBAidZ','91892OPhAgk','string'];a42_0x2139=function(){return _0x5618de;};return a42_0x2139();}import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':'codegen','command':'sdk','description':'Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','risk':'read','flags':[CODE_FLAG_OPTIONAL,{'name':a42_0x73ffd0(0x16c),'type':'string','description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)'},{'name':a42_0x73ffd0(0x16a),'type':a42_0x73ffd0(0x171),'required':!![],'description':'Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)'},{'name':'skip-imports','type':a42_0x73ffd0(0x16e),'description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x2fb569){const _0x25c217=a42_0x73ffd0,{dataset:_0x47d49a,operation:_0x39214f}=await getOperationDetail(_0x2fb569['appCode'],_0x2fb569['str']('code'),_0x2fb569[_0x25c217(0x179)](_0x25c217(0x16a))),_0x48cb44=generateSdkCode(_0x47d49a,_0x39214f,{'includeImports':!_0x2fb569[_0x25c217(0x178)](_0x25c217(0x17b))});return{'ok':!![],'data':{'dataset':{'name':_0x47d49a[_0x25c217(0x176)],'code':_0x47d49a[_0x25c217(0x16d)],'tableName':_0x47d49a[_0x25c217(0x167)]},'operation':_0x2fb569[_0x25c217(0x179)](_0x25c217(0x16a)),'code':_0x48cb44}};}};
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_0x308966=a43_0x186d;(function(_0x41f81b,_0x5d66a9){const _0x200b9e=a43_0x186d,_0x26f351=_0x41f81b();while(!![]){try{const _0x3505c8=-parseInt(_0x200b9e(0xd5))/0x1+parseInt(_0x200b9e(0xd9))/0x2*(-parseInt(_0x200b9e(0xd0))/0x3)+-parseInt(_0x200b9e(0xd1))/0x4+-parseInt(_0x200b9e(0xc9))/0x5*(-parseInt(_0x200b9e(0xcc))/0x6)+parseInt(_0x200b9e(0xd3))/0x7*(parseInt(_0x200b9e(0xd4))/0x8)+parseInt(_0x200b9e(0xc3))/0x9+parseInt(_0x200b9e(0xda))/0xa;if(_0x3505c8===_0x5d66a9)break;else _0x26f351['push'](_0x26f351['shift']());}catch(_0x2e1c0a){_0x26f351['push'](_0x26f351['shift']());}}}(a43_0x2934,0x70efe));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';function a43_0x2934(){const _0x4a64cd=['15vrOKHT','3127824eeJlMl','sql','7PWOJqM','2731096QYopEu','299770MJYQvS','sqlName','boolean','str','151128oxsCOI','10690390pOfxsG','sqlcode','sdk','read','bool','165636uNvqvk','no-imports','sqlCode','appCode','codegen','Omit\x20import\x20statements\x20from\x20generated\x20code','6595xEcRMc','bff','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','2244VgxVmV','target','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','string'];a43_0x2934=function(){return _0x4a64cd;};return a43_0x2934();}import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a43_0x186d(_0x4df45a,_0x5589e0){_0x4df45a=_0x4df45a-0xbf;const _0x2934ba=a43_0x2934();let _0x186daa=_0x2934ba[_0x4df45a];return _0x186daa;}export const codegenSql={'service':a43_0x308966(0xc7),'command':a43_0x308966(0xd2),'description':a43_0x308966(0xcb),'risk':a43_0x308966(0xc1),'flags':[SQLCODE_FLAG,{'name':a43_0x308966(0xcd),'type':a43_0x308966(0xcf),'description':a43_0x308966(0xce),'default':a43_0x308966(0xc0),'enum':[a43_0x308966(0xc0),a43_0x308966(0xca)]},{'name':a43_0x308966(0xc4),'type':a43_0x308966(0xd7),'description':a43_0x308966(0xc8)}],async 'execute'(_0x517b4b){const _0x27baad=a43_0x308966,_0xe1ad2a=await getSqlQueryInfo(_0x517b4b[_0x27baad(0xc6)],_0x517b4b[_0x27baad(0xd8)](_0x27baad(0xbf))),_0x2d3859=_0x517b4b[_0x27baad(0xd8)](_0x27baad(0xcd))||_0x27baad(0xc0),_0x473301=generateSqlCodeTemplate(_0xe1ad2a,{'target':_0x2d3859,'includeImports':!_0x517b4b[_0x27baad(0xc2)](_0x27baad(0xc4))});return{'ok':!![],'data':{'sqlCode':_0xe1ad2a[_0x27baad(0xc5)],'sqlName':_0xe1ad2a[_0x27baad(0xd6)],'target':_0x2d3859,'code':_0x473301}};}};
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(_0x287df4,_0x1341cf){const _0x1aed29=a44_0x4dd7,_0x44d43c=_0x287df4();while(!![]){try{const _0x2dfda7=-parseInt(_0x1aed29(0x19f))/0x1+parseInt(_0x1aed29(0x193))/0x2*(-parseInt(_0x1aed29(0x197))/0x3)+parseInt(_0x1aed29(0x17c))/0x4+-parseInt(_0x1aed29(0x196))/0x5+parseInt(_0x1aed29(0x176))/0x6+parseInt(_0x1aed29(0x192))/0x7*(-parseInt(_0x1aed29(0x180))/0x8)+parseInt(_0x1aed29(0x178))/0x9*(parseInt(_0x1aed29(0x18e))/0xa);if(_0x2dfda7===_0x1341cf)break;else _0x44d43c['push'](_0x44d43c['shift']());}catch(_0x15a771){_0x44d43c['push'](_0x44d43c['shift']());}}}(a44_0x5d5d,0x87cd6));function a44_0x5d5d(){const _0x44c0e6=['trim','4936BiapYr','args','global','globalConfig','projectConfig','bool','\x22\x20not\x20found.','Use\x20global\x20config\x20scope','str','appcode','\x20Remaining\x20app\x20\x22','flagMissing','project','Removed\x20app\x20\x22','14460850amGqlp','string','\x20<name>\x20[--global]','App\x20code','12166YSAdhR','673920ODbMjZ','validation','\x20Default\x20app\x20changed\x20to\x20\x22','4905635EMPEpR','6ZbuABt','\x20<name>\x20--appcode\x20<code>','boolean','both','\x20Note:\x20app\x20\x22','keys','App\x20\x22','\x20Default\x20app\x20is\x20\x22','886856maddUE','Updated','apps','\x20app\x20\x22','\x22\x20is\x20selected\x20automatically.','2140218wrlkRO','length','18JxeNcI','defaultApp','\x22\x20(appcode:\x20','Missing\x20app\x20name.','3686488uhXuJY','\x20config.','Usage:\x20'];a44_0x5d5d=function(){return _0x44c0e6;};return a44_0x5d5d();}import{CliErrors}from'../../errors.js';function a44_0x4dd7(_0x311172,_0x4c7906){_0x311172=_0x311172-0x175;const _0x5d5d63=a44_0x5d5d();let _0x4dd790=_0x5d5d63[_0x311172];return _0x4dd790;}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 _0x2985bf=a44_0x4dd7;return[{'name':_0x2985bf(0x189),'type':'string','description':_0x2985bf(0x191),'required':!![]},{'name':_0x2985bf(0x182),'type':'boolean','description':'Use\x20global\x20config\x20scope','default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x11d99e=a44_0x4dd7;return[{'name':'global','type':_0x11d99e(0x199),'description':_0x11d99e(0x187),'default':![]}];}export async function validateAppName(_0x3b3f6a,_0x183b79){const _0x1be8c2=a44_0x4dd7,_0x1192ca=_0x3b3f6a[_0x1be8c2(0x181)][0x0]?.[_0x1be8c2(0x17f)]();if(!_0x1192ca)throw CliErrors[_0x1be8c2(0x194)](_0x1be8c2(0x17b),_0x1be8c2(0x17e)+CLI_BIN_NAME+'\x20'+_0x183b79+'\x20<name>');}export async function runAppAdd(_0x5ad97a,_0x47bb7c){const _0x35606b=a44_0x4dd7,_0x454976=_0x5ad97a[_0x35606b(0x181)][0x0]?.[_0x35606b(0x17f)]();if(!_0x454976)throw CliErrors[_0x35606b(0x194)](_0x35606b(0x17b),_0x35606b(0x17e)+CLI_BIN_NAME+'\x20'+_0x47bb7c+_0x35606b(0x198));const _0x751f1e=_0x5ad97a[_0x35606b(0x188)](_0x35606b(0x189));if(!_0x751f1e)throw CliErrors[_0x35606b(0x18b)](_0x35606b(0x189),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x47bb7c+'\x20<name>\x20--appcode\x20<code>');const _0x286a68={'global':_0x5ad97a[_0x35606b(0x185)](_0x35606b(0x182))},_0x4de0c0=readConfig(_0x286a68);if(!_0x4de0c0[_0x35606b(0x1a1)])_0x4de0c0[_0x35606b(0x1a1)]={};const _0x577bcc={'appcode':_0x751f1e,...collectAppProfileOverrides(_0x3d2b15=>_0x5ad97a['str'](_0x3d2b15))},_0x7c540=_0x4de0c0[_0x35606b(0x1a1)],_0x53e27f=Object[_0x35606b(0x19c)](_0x7c540),_0x13b520=typeof _0x4de0c0['defaultApp']===_0x35606b(0x18f)&&_0x7c540[_0x4de0c0[_0x35606b(0x179)]]?_0x4de0c0[_0x35606b(0x179)]:_0x53e27f['length']===0x1?_0x53e27f[0x0]:undefined,_0xafeb4c=!!_0x7c540[_0x454976];_0x7c540[_0x454976]=_0x577bcc;const _0xcca275=normalizeStoredDefaultApp(_0x4de0c0,_0x13b520);writeConfig(_0x4de0c0,_0x286a68);const _0x55fd1f=!_0xafeb4c&&_0xcca275?_0x35606b(0x19e)+_0xcca275+'\x22.':'',_0x2e55c0=(_0xafeb4c?_0x35606b(0x1a0):'Added')+_0x35606b(0x1a2)+_0x454976+_0x35606b(0x17a)+_0x751f1e+')'+scopeLabel(_0x286a68)+'.'+_0x55fd1f;return{'ok':!![],'message':_0x2e55c0};}export async function runAppRemove(_0x57f7a9,_0x549407){const _0x232e90=a44_0x4dd7,_0x449291=_0x57f7a9[_0x232e90(0x181)][0x0]?.[_0x232e90(0x17f)]();if(!_0x449291)throw CliErrors[_0x232e90(0x194)](_0x232e90(0x17b),_0x232e90(0x17e)+CLI_BIN_NAME+'\x20'+_0x549407+_0x232e90(0x190));const _0xd3a94e=_0x57f7a9[_0x232e90(0x185)](_0x232e90(0x182)),{config:_0x252524,layers:_0x4fa720}=readRawConfigWithLayers(),_0x3daa2e=_0x252524[_0x232e90(0x1a1)]??{};if(!_0x3daa2e[_0x449291])throw CliErrors[_0x232e90(0x194)](_0x232e90(0x19d)+_0x449291+'\x22\x20not\x20found.');const _0x25ff7d=_0x4fa720[_0x232e90(0x183)]['apps']&&typeof _0x4fa720[_0x232e90(0x183)]['apps']==='object'?_0x4fa720[_0x232e90(0x183)][_0x232e90(0x1a1)]:{},_0xa44ee6=_0x4fa720[_0x232e90(0x184)][_0x232e90(0x1a1)]&&typeof _0x4fa720[_0x232e90(0x184)]['apps']==='object'?_0x4fa720[_0x232e90(0x184)][_0x232e90(0x1a1)]:{},_0x4b616a=appDefinedIn(_0x449291,_0x25ff7d,_0xa44ee6),_0x5d01a4=resolveAppScopeForWrite(_0x449291,_0xd3a94e,_0x4fa720),_0xfff5c4={'global':_0x5d01a4===_0x232e90(0x182)},_0x3230c6=readConfig(_0xfff5c4),_0x5db062=_0x3230c6['apps'];if(!_0x5db062||!_0x5db062[_0x449291])throw CliErrors[_0x232e90(0x194)](_0x232e90(0x19d)+_0x449291+_0x232e90(0x186));delete _0x5db062[_0x449291];let _0x246d09='';const _0x3d93b7=typeof _0x3230c6[_0x232e90(0x179)]===_0x232e90(0x18f)?_0x3230c6[_0x232e90(0x179)]:undefined,_0x25db78=Object['keys'](_0x5db062),_0x42ba0e=_0x3d93b7===_0x449291?_0x25db78[0x0]:_0x3d93b7,_0x8797ff=normalizeStoredDefaultApp(_0x3230c6,_0x42ba0e);if(_0x3d93b7===_0x449291&&_0x25db78[_0x232e90(0x177)]===0x1)_0x246d09=_0x232e90(0x18a)+_0x25db78[0x0]+_0x232e90(0x175);else _0x3d93b7===_0x449291&&_0x8797ff&&(_0x246d09=_0x232e90(0x195)+_0x8797ff+'\x22.');Object[_0x232e90(0x19c)](_0x5db062)[_0x232e90(0x177)]===0x0&&(delete _0x3230c6['apps'],delete _0x3230c6[_0x232e90(0x179)]);writeConfig(_0x3230c6,_0xfff5c4);const _0x5d8687=_0x4b616a===_0x232e90(0x19a)?_0x232e90(0x19b)+_0x449291+'\x22\x20still\x20defined\x20in\x20'+(_0x5d01a4===_0x232e90(0x18c)?_0x232e90(0x182):_0x232e90(0x18c))+_0x232e90(0x17d):'';return{'ok':!![],'message':_0x232e90(0x18d)+_0x449291+'\x22'+scopeLabel(_0xfff5c4)+'.'+_0x246d09+_0x5d8687};}
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(_0x4d35c6,_0x52d447){const _0x3c3519=a45_0x2f7d,_0x434b62=_0x4d35c6();while(!![]){try{const _0x4164da=-parseInt(_0x3c3519(0xef))/0x1*(-parseInt(_0x3c3519(0x101))/0x2)+-parseInt(_0x3c3519(0xff))/0x3*(parseInt(_0x3c3519(0xfc))/0x4)+parseInt(_0x3c3519(0x103))/0x5+-parseInt(_0x3c3519(0xeb))/0x6*(parseInt(_0x3c3519(0xf4))/0x7)+-parseInt(_0x3c3519(0xf6))/0x8*(parseInt(_0x3c3519(0xee))/0x9)+-parseInt(_0x3c3519(0xed))/0xa*(-parseInt(_0x3c3519(0xf5))/0xb)+parseInt(_0x3c3519(0x102))/0xc;if(_0x4164da===_0x52d447)break;else _0x434b62['push'](_0x434b62['shift']());}catch(_0x351a21){_0x434b62['push'](_0x434b62['shift']());}}}(a45_0x5de0,0xb3fa3));import{input,checkbox,select}from'@inquirer/prompts';import a45_0x33633c from'chalk';import{validateAppcode}from'../../commands/common/validate.js';function a45_0x2f7d(_0x34f886,_0x19720e){_0x34f886=_0x34f886-0xe0;const _0x5de01b=a45_0x5de0();let _0x2f7d42=_0x5de01b[_0x34f886];return _0x2f7d42;}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 _0x5cde7c=a45_0x2f7d,_0x1c9b57=await input({'message':'App\x20Code:','validate':_0x4ed539=>{const _0x5c4063=a45_0x2f7d,_0x570335=validateAppcode(_0x4ed539[_0x5c4063(0xe6)]());return _0x570335['valid']||_0x570335[_0x5c4063(0xf9)]||_0x5c4063(0xe4);}});return _0x1c9b57[_0x5cde7c(0xe6)]();}export async function promptAppSelection(_0x4a7651){const _0xaa95a7=a45_0x2f7d,_0x491744=[{'name':a45_0x33633c[_0xaa95a7(0xe2)](_0xaa95a7(0xe0)),'value':-0x1},..._0x4a7651[_0xaa95a7(0xf1)]((_0x2b4f1c,_0x271bb7)=>({'name':_0x2b4f1c[_0xaa95a7(0xf3)]+'\x20\x20'+a45_0x33633c['gray']('('+_0x2b4f1c[_0xaa95a7(0xf8)]+')'),'value':_0x271bb7}))],_0x4edf87=await checkbox({'message':'Found\x20'+a45_0x33633c[_0xaa95a7(0xf2)](_0x4a7651[_0xaa95a7(0xe9)])+_0xaa95a7(0xe5),'choices':_0x491744,'loop':![]});if(_0x4edf87[_0xaa95a7(0xfd)](-0x1))return _0xaa95a7(0xe8);if(_0x4edf87[_0xaa95a7(0xe9)]===0x0)return'custom';return _0x4edf87['map'](_0x53f5d5=>_0x4a7651[_0x53f5d5]);}export async function promptSingleAppSelection(_0x4e45e0){const _0xccba63=a45_0x2f7d,_0x3f8949=[{'name':a45_0x33633c[_0xccba63(0xfe)](_0xccba63(0xfa)),'value':_0xccba63(0xfb)},{'name':a45_0x33633c[_0xccba63(0xe2)]('✎\x20Enter\x20appcode\x20manually'),'value':_0xccba63(0xe8)},..._0x4e45e0[_0xccba63(0xf1)](_0x54a0d9=>({'name':_0x54a0d9[_0xccba63(0xf3)]+'\x20\x20'+a45_0x33633c[_0xccba63(0xfe)]('('+_0x54a0d9[_0xccba63(0xf8)]+')'),'value':_0x54a0d9['appCode']}))],_0x3b817a=await select({'message':'Select\x20the\x20app\x20to\x20bind:','choices':_0x3f8949});if(_0x3b817a===_0xccba63(0xfb))return'skip';if(_0x3b817a===_0xccba63(0xe8))return'custom';return _0x4e45e0[_0xccba63(0xec)](_0x4d9e5a=>_0x4d9e5a[_0xccba63(0xf8)]===_0x3b817a);}export async function selectSingleAppcode(_0x147d44){const _0x3d2315=a45_0x2f7d;if(!_0x147d44)return writeCliSideChannelLine(a45_0x33633c[_0x3d2315(0xfe)](_0x3d2315(0xea))),_fallbackOrSkip();writeCliSideChannelLine('Fetching\x20available\x20apps...');let _0x5df2df;try{_0x5df2df=await withActiveCookie(_0x147d44,()=>listRemoteApps());}catch(_0x4dca13){writeCliSideChannelLine(a45_0x33633c[_0x3d2315(0xe2)]('Could\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.'));if(_0x4dca13 instanceof Error)writeCliSideChannelLine(a45_0x33633c[_0x3d2315(0xfe)]('\x20\x20('+_0x4dca13[_0x3d2315(0xf9)]+')'));return _fallbackOrSkip();}if(_0x5df2df[_0x3d2315(0xe9)]===0x0)return writeCliSideChannelLine(a45_0x33633c[_0x3d2315(0xe2)](_0x3d2315(0x100))),_fallbackOrSkip();const _0x5ec5f5=await promptSingleAppSelection(_0x5df2df);if(_0x5ec5f5==='skip')return'';if(_0x5ec5f5===_0x3d2315(0xe8))return promptCustomAppcode();return _0x5ec5f5[_0x3d2315(0xf8)];}export async function selectMultipleApps(_0x33f7e1){const _0x6a5d6a=a45_0x2f7d;writeCliSideChannelLine(_0x6a5d6a(0xe7));let _0x17876e;try{_0x17876e=await withActiveCookie(_0x33f7e1,()=>listRemoteApps());}catch(_0x993e88){writeCliSideChannelLine(_0x6a5d6a(0xe3));if(_0x993e88 instanceof Error)writeCliSideChannelLine('\x20\x20('+_0x993e88[_0x6a5d6a(0xf9)]+')');return _0x6a5d6a(0xe8);}if(_0x17876e[_0x6a5d6a(0xe9)]===0x0)return writeCliSideChannelLine('\x0aNo\x20available\x20apps\x20found.'),_0x6a5d6a(0xe8);return promptAppSelection(_0x17876e);}function a45_0x5de0(){const _0x18e222=['6tBEayR','find','12969490ZrJccx','180VJFdFi','4831xZVdXR','(Skip;\x20configure\x20later)','map','cyan','appName','1414273ksYTyJ','11WStrHr','231152EkEEEV','✎\x20Enter\x20manually','appCode','message','(Skip;\x20configure\x20later\x20with\x20config\x20set\x20appcode)','skip','870292QFauop','includes','gray','12tyhTJZ','No\x20available\x20apps\x20found.','6AZwAOV','11345292SAvMFL','652575PWYgpg','✎\x20Enter\x20appcode\x20manually','App\x20Code:','yellow','\x0aCould\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','Invalid\x20App\x20Code','\x20apps.\x20Select\x20with\x20space,\x20a=all,\x20i=invert:','trim','Fetching\x20available\x20apps...','custom','length','(No\x20login\x20session.\x20Enter\x20an\x20App\x20Code\x20manually\x20or\x20skip.)'];a45_0x5de0=function(){return _0x18e222;};return a45_0x5de0();}async function _fallbackOrSkip(){const _0x51079e=a45_0x2f7d,_0x17eddd=await select({'message':_0x51079e(0xe1),'choices':[{'name':a45_0x33633c[_0x51079e(0xfe)](_0x51079e(0xf0)),'value':_0x51079e(0xfb)},{'name':a45_0x33633c[_0x51079e(0xe2)](_0x51079e(0xf7)),'value':'manual'}]});if(_0x17eddd===_0x51079e(0xfb))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
- const a46_0x200f02=a46_0x3a6a;(function(_0x55062b,_0x31f429){const _0x158a1c=a46_0x3a6a,_0x5ac9c4=_0x55062b();while(!![]){try{const _0x36f665=parseInt(_0x158a1c(0xf5))/0x1+-parseInt(_0x158a1c(0xd6))/0x2+parseInt(_0x158a1c(0xe7))/0x3+-parseInt(_0x158a1c(0xda))/0x4+-parseInt(_0x158a1c(0xe2))/0x5+-parseInt(_0x158a1c(0xed))/0x6*(-parseInt(_0x158a1c(0xf4))/0x7)+parseInt(_0x158a1c(0xe9))/0x8;if(_0x36f665===_0x31f429)break;else _0x5ac9c4['push'](_0x5ac9c4['shift']());}catch(_0x202685){_0x5ac9c4['push'](_0x5ac9c4['shift']());}}}(a46_0xddef,0x65bb8));import{CLI_BIN_NAME}from'../../constant/cli.js';function a46_0xddef(){const _0x54345e=['12355SfwjaR','176337sZlobC','1133606PcfdqS','\x20completed\x20successfully.','has','FAILED','108872QrgWsN','replace','Async\x20task\x20','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','\x20failed.','\x20failed:\x20','\x20returned\x20unknown\x20status\x20','\x20is\x20pending.','3947110jttiIZ','taskId','apiError','\x27\x5c\x27\x27','status','2210610AlnSsP','\x20is\x20processing.','896776gMhBfO','SUCCESS','PENDING','errorMessage','2634COvPON','toUpperCase','trim','string','\x20--appcode\x20','Task\x20','\x20response\x20did\x20not\x20contain\x20a\x20status.'];a46_0xddef=function(){return _0x54345e;};return a46_0xddef();}import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set(['SUCCESS','FAILED']),NON_TERMINAL_STATUSES=new Set([a46_0x200f02(0xeb),'PROCESSING']);export function normalizeAsyncTask(_0x515bb3){const _0x2afdc7=a46_0x200f02,_0x382296=typeof _0x515bb3?.[_0x2afdc7(0xe3)]===_0x2afdc7(0xf0)?_0x515bb3[_0x2afdc7(0xe3)][_0x2afdc7(0xef)]():'';if(!_0x382296)throw CliErrors[_0x2afdc7(0xe4)](_0x2afdc7(0xdd));const _0x3bc494=typeof _0x515bb3[_0x2afdc7(0xe6)]===_0x2afdc7(0xf0)?_0x515bb3['status'][_0x2afdc7(0xef)]()[_0x2afdc7(0xee)]():'';if(!_0x3bc494)throw CliErrors['apiError'](_0x2afdc7(0xdc)+_0x382296+_0x2afdc7(0xf3));return{'taskId':_0x382296,'status':_0x3bc494,'errorMessage':typeof _0x515bb3[_0x2afdc7(0xec)]===_0x2afdc7(0xf0)&&_0x515bb3['errorMessage'][_0x2afdc7(0xef)]()?_0x515bb3[_0x2afdc7(0xec)]['trim']():null,'isTerminal':TERMINAL_STATUSES[_0x2afdc7(0xd8)](_0x3bc494),'knownStatus':TERMINAL_STATUSES[_0x2afdc7(0xd8)](_0x3bc494)||NON_TERMINAL_STATUSES[_0x2afdc7(0xd8)](_0x3bc494)};}export function buildAsyncTaskStatusCommand(_0x2b3ca4,_0x34344d){const _0x681a67=a46_0x200f02;return CLI_BIN_NAME+'\x20task\x20status\x20--task-id\x20'+quoteShellArg(_0x2b3ca4)+_0x681a67(0xf1)+quoteShellArg(_0x34344d)+'\x20--format\x20compress';}export function asyncTaskMessage(_0x28d6b7){const _0x1c28c4=a46_0x200f02;switch(_0x28d6b7[_0x1c28c4(0xe6)]){case _0x1c28c4(0xeb):return _0x1c28c4(0xf2)+_0x28d6b7[_0x1c28c4(0xe3)]+_0x1c28c4(0xe1);case'PROCESSING':return'Task\x20'+_0x28d6b7[_0x1c28c4(0xe3)]+_0x1c28c4(0xe8);case _0x1c28c4(0xea):return _0x1c28c4(0xf2)+_0x28d6b7[_0x1c28c4(0xe3)]+_0x1c28c4(0xd7);case _0x1c28c4(0xd9):return _0x28d6b7[_0x1c28c4(0xec)]?_0x1c28c4(0xf2)+_0x28d6b7[_0x1c28c4(0xe3)]+_0x1c28c4(0xdf)+_0x28d6b7['errorMessage']:_0x1c28c4(0xf2)+_0x28d6b7[_0x1c28c4(0xe3)]+_0x1c28c4(0xde);default:return _0x1c28c4(0xf2)+_0x28d6b7[_0x1c28c4(0xe3)]+_0x1c28c4(0xe0)+_0x28d6b7['status']+'.';}}function a46_0x3a6a(_0x117083,_0x5ad70f){_0x117083=_0x117083-0xd6;const _0xddef07=a46_0xddef();let _0x3a6a97=_0xddef07[_0x117083];return _0x3a6a97;}function quoteShellArg(_0x47153e){const _0x2d7558=a46_0x200f02;return'\x27'+_0x47153e[_0x2d7558(0xdb)](/'/g,_0x2d7558(0xe5))+'\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(_0x527fa0,_0xdd1d6b){var _0x2bee6b=a47_0x1a9a,_0x24d9d5=_0x527fa0();while(!![]){try{var _0x3ed198=-parseInt(_0x2bee6b(0xf4))/0x1+-parseInt(_0x2bee6b(0xf8))/0x2*(-parseInt(_0x2bee6b(0xef))/0x3)+-parseInt(_0x2bee6b(0xec))/0x4+-parseInt(_0x2bee6b(0xf6))/0x5*(-parseInt(_0x2bee6b(0xf5))/0x6)+parseInt(_0x2bee6b(0xf7))/0x7*(-parseInt(_0x2bee6b(0xf1))/0x8)+parseInt(_0x2bee6b(0xf2))/0x9+parseInt(_0x2bee6b(0xee))/0xa;if(_0x3ed198===_0xdd1d6b)break;else _0x24d9d5['push'](_0x24d9d5['shift']());}catch(_0x2b9b6e){_0x24d9d5['push'](_0x24d9d5['shift']());}}}(a47_0x29b4,0x2ba6d));function a47_0x29b4(){var _0xeb5e8a=['300774iyzRZd','631398VKXqUZ','5wZpXXz','961219oEaNDH','68ZNqhqF','description','865120JtBdUd','defineProperties','901660VlomEC','30516bhTAKh','method','8OJykmE','2627289vIRkLG','url'];a47_0x29b4=function(){return _0xeb5e8a;};return a47_0x29b4();}function a47_0x1a9a(_0x1f1984,_0x15d5f6){_0x1f1984=_0x1f1984-0xec;var _0x29b450=a47_0x29b4();var _0x1a9aef=_0x29b450[_0x1f1984];return _0x1a9aef;}export function asDryRunResult(_0x5bb95d,_0x4231db){var _0x481592=a47_0x1a9a;return Object[_0x481592(0xed)](_0x5bb95d,{'method':{'value':_0x4231db[_0x481592(0xf0)],'enumerable':![]},'url':{'value':_0x4231db[_0x481592(0xf3)],'enumerable':![]},..._0x4231db[_0x481592(0xf9)]?{'description':{'value':_0x4231db[_0x481592(0xf9)],'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
- const a48_0x5dbd87=a48_0x31c2;(function(_0x455050,_0x350aae){const _0x3a4442=a48_0x31c2,_0x215580=_0x455050();while(!![]){try{const _0x1cf891=parseInt(_0x3a4442(0x1b8))/0x1+parseInt(_0x3a4442(0x1b5))/0x2+-parseInt(_0x3a4442(0x1c3))/0x3*(parseInt(_0x3a4442(0x1bf))/0x4)+parseInt(_0x3a4442(0x1be))/0x5*(parseInt(_0x3a4442(0x1b6))/0x6)+-parseInt(_0x3a4442(0x1c9))/0x7+parseInt(_0x3a4442(0x1b4))/0x8*(-parseInt(_0x3a4442(0x1c7))/0x9)+-parseInt(_0x3a4442(0x1c2))/0xa*(parseInt(_0x3a4442(0x1c8))/0xb);if(_0x1cf891===_0x350aae)break;else _0x215580['push'](_0x215580['shift']());}catch(_0x34233a){_0x215580['push'](_0x215580['shift']());}}}(a48_0x4b87,0xb87fe));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':a48_0x5dbd87(0x1b7)};function a48_0x31c2(_0x47d972,_0x509a3e){_0x47d972=_0x47d972-0x1b0;const _0x4b876d=a48_0x4b87();let _0x31c234=_0x4b876d[_0x47d972];return _0x31c234;}export const CODE_FLAG={'name':a48_0x5dbd87(0x1b2),'type':'string','required':!![],'description':a48_0x5dbd87(0x1c4),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':'datasetcode','description':a48_0x5dbd87(0x1c4)};export const SQLCODE_FLAG={'name':a48_0x5dbd87(0x1b1),'type':a48_0x5dbd87(0x1b3),'required':!![],'description':a48_0x5dbd87(0x1ca),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':'SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'}};export const APPCODE_FLAG_OPTIONAL={'name':a48_0x5dbd87(0x1b0),'type':a48_0x5dbd87(0x1b3),'required':![],'description':a48_0x5dbd87(0x1cb)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a48_0x5dbd87(0x1ba)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};function a48_0x4b87(){const _0x323b96=['10dEbEpv','3488wwJaKG','boolean','skip-connection-test','1130aOCNvN','1707qWjoqC','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update','Database\x20product\x20type','1998YfWmxU','53438ntqAOA','46613Avxoxd','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','appcode','sqlcode','code','string','15808uqxLIK','1756800tNddOO','707298KPfMfP','a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)','1131997SlLYDX','MYSQL','App\x20code\x20(e.g.\x20app-xxxxx)','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','number','POSTGRESQL'];a48_0x4b87=function(){return _0x323b96;};return a48_0x4b87();}export const DBLINK_ID_FLAG={'name':'id','type':a48_0x5dbd87(0x1bc),'required':!![],'description':a48_0x5dbd87(0x1bb)};export const DB_TYPE_FLAG={'name':'dbtype','type':'string','required':!![],'description':a48_0x5dbd87(0x1c6),'enum':[a48_0x5dbd87(0x1b9),a48_0x5dbd87(0x1bd)]};export const SKIP_CONNECTION_TEST_FLAG={'name':a48_0x5dbd87(0x1c1),'type':a48_0x5dbd87(0x1c0),'description':a48_0x5dbd87(0x1c5)};
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(_0x1b13ca,_0x936510){const _0x480787=a49_0x476d,_0x275e53=_0x1b13ca();while(!![]){try{const _0x282235=parseInt(_0x480787(0x149))/0x1*(parseInt(_0x480787(0x148))/0x2)+parseInt(_0x480787(0x150))/0x3*(-parseInt(_0x480787(0x15b))/0x4)+parseInt(_0x480787(0x14e))/0x5*(-parseInt(_0x480787(0x14d))/0x6)+-parseInt(_0x480787(0x15c))/0x7+parseInt(_0x480787(0x14b))/0x8*(-parseInt(_0x480787(0x157))/0x9)+-parseInt(_0x480787(0x154))/0xa*(parseInt(_0x480787(0x151))/0xb)+-parseInt(_0x480787(0x14c))/0xc*(-parseInt(_0x480787(0x158))/0xd);if(_0x282235===_0x936510)break;else _0x275e53['push'](_0x275e53['shift']());}catch(_0x490040){_0x275e53['push'](_0x275e53['shift']());}}}(a49_0xfeed,0x8abfb));import{existsSync,statSync}from'node:fs';function a49_0xfeed(){const _0x333c9e=['ceil','size','45gHnxGH','184678CYnatj','File\x20is\x20not\x20a\x20regular\x20file:\x20','File\x20not\x20found:\x20','20czlKdt','31297xWxNmm','toFixed','994958EFHavq','2yYABHr','trim','702664edCMJJ','1704qRCkqM','382488CvLWUA','10hDdhTh','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','597675FZhXPn','1377574wMtcmV','validation','isFile','70DPVeTj'];a49_0xfeed=function(){return _0x333c9e;};return a49_0xfeed();}import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x1b49f7){const _0x37a194=a49_0x476d;if(_0x1b49f7>=BYTES_PER_MB){const _0x246e50=Math[_0x37a194(0x155)](_0x1b49f7/BYTES_PER_MB*0x64)/0x64;return _0x246e50[_0x37a194(0x15d)](0x2)+'\x20MB';}return _0x1b49f7+'\x20B';}function a49_0x476d(_0x26a86c,_0x3951b8){_0x26a86c=_0x26a86c-0x148;const _0xfeed68=a49_0xfeed();let _0x476dbb=_0xfeed68[_0x26a86c];return _0x476dbb;}export function requireDevelopmentUploadFile(_0x4b87d2,_0x260e7c){const _0x3fb865=a49_0x476d,_0x30ad3f=_0x4b87d2[_0x3fb865(0x14a)]();if(!_0x30ad3f)throw CliErrors[_0x3fb865(0x152)](_0x260e7c+'\x20path\x20is\x20required.');if(!existsSync(_0x30ad3f))throw CliErrors[_0x3fb865(0x152)](_0x3fb865(0x15a)+_0x30ad3f);const _0x22f110=statSync(_0x30ad3f);if(!_0x22f110[_0x3fb865(0x153)]())throw CliErrors[_0x3fb865(0x152)](_0x3fb865(0x159)+_0x30ad3f);if(_0x22f110['size']>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x3fb865(0x152)](_0x3fb865(0x14f)+_0x30ad3f+'\x20('+formatBytes(_0x22f110[_0x3fb865(0x156)])+')');return{'path':_0x30ad3f,'size':_0x22f110[_0x3fb865(0x156)]};}
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']};}
@@ -1 +1 @@
1
- function a50_0x1698(_0x3bf1f3,_0x2b3d00){_0x3bf1f3=_0x3bf1f3-0x10f;const _0xc0c82a=a50_0xc0c8();let _0x169840=_0xc0c82a[_0x3bf1f3];return _0x169840;}(function(_0x459576,_0x6f6257){const _0x12c9da=a50_0x1698,_0x575c80=_0x459576();while(!![]){try{const _0x169211=-parseInt(_0x12c9da(0x112))/0x1+-parseInt(_0x12c9da(0x118))/0x2*(parseInt(_0x12c9da(0x114))/0x3)+parseInt(_0x12c9da(0x11b))/0x4+parseInt(_0x12c9da(0x119))/0x5+parseInt(_0x12c9da(0x116))/0x6+-parseInt(_0x12c9da(0x110))/0x7+parseInt(_0x12c9da(0x10f))/0x8;if(_0x169211===_0x6f6257)break;else _0x575c80['push'](_0x575c80['shift']());}catch(_0x3d81c8){_0x575c80['push'](_0x575c80['shift']());}}}(a50_0xc0c8,0xb46c1));function a50_0xc0c8(){const _0x1113f3=['App\x20Code\x20cannot\x20be\x20empty','501DsNnVy','length','1779516kjYQMd','trim','17410rGVqoy','4524980fksENK','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','5102340wgVuWt','App\x20Code\x20cannot\x20exceed\x20100\x20characters','16088712yhvmrf','9759127LMcmsJ','test','901351HfzLwl'];a50_0xc0c8=function(){return _0x1113f3;};return a50_0xc0c8();}export function validateAppcode(_0x99374f){const _0x7d0e13=a50_0x1698,_0x4744eb=_0x99374f[_0x7d0e13(0x117)]();if(!_0x4744eb)return{'valid':![],'message':_0x7d0e13(0x113)};if(_0x4744eb[_0x7d0e13(0x115)]>0x64)return{'valid':![],'message':_0x7d0e13(0x11c)};if(!/^[A-Za-z0-9_-]+$/[_0x7d0e13(0x111)](_0x4744eb))return{'valid':![],'message':_0x7d0e13(0x11a)};return{'valid':!![]};}
1
+ function a50_0x57d1(_0x14209a,_0x85a6c2){_0x14209a=_0x14209a-0x100;const _0x58c7ba=a50_0x58c7();let _0x57d117=_0x58c7ba[_0x14209a];return _0x57d117;}(function(_0x51b107,_0x1f5517){const _0x42a7d6=a50_0x57d1,_0x504439=_0x51b107();while(!![]){try{const _0x16ec55=parseInt(_0x42a7d6(0x107))/0x1*(-parseInt(_0x42a7d6(0x110))/0x2)+parseInt(_0x42a7d6(0x104))/0x3+-parseInt(_0x42a7d6(0x105))/0x4*(parseInt(_0x42a7d6(0x10e))/0x5)+-parseInt(_0x42a7d6(0x10c))/0x6*(-parseInt(_0x42a7d6(0x109))/0x7)+-parseInt(_0x42a7d6(0x10b))/0x8+-parseInt(_0x42a7d6(0x10d))/0x9+-parseInt(_0x42a7d6(0x108))/0xa*(-parseInt(_0x42a7d6(0x102))/0xb);if(_0x16ec55===_0x1f5517)break;else _0x504439['push'](_0x504439['shift']());}catch(_0x44c65d){_0x504439['push'](_0x504439['shift']());}}}(a50_0x58c7,0x20777));export function validateAppcode(_0x2bbe0c){const _0x19cded=a50_0x57d1,_0x21a1b2=_0x2bbe0c[_0x19cded(0x100)]();if(!_0x21a1b2)return{'valid':![],'message':_0x19cded(0x10f)};if(_0x21a1b2[_0x19cded(0x103)]>0x64)return{'valid':![],'message':_0x19cded(0x10a)};if(!/^[A-Za-z0-9_-]+$/[_0x19cded(0x101)](_0x21a1b2))return{'valid':![],'message':_0x19cded(0x106)};return{'valid':!![]};}function a50_0x58c7(){const _0x255037=['529081SvlPAB','App\x20Code\x20cannot\x20exceed\x20100\x20characters','1182760aCppuA','6rpJnLX','1217979PGbAAE','267230oFxzru','App\x20Code\x20cannot\x20be\x20empty','54upGlYu','trim','test','4135252IFYtqG','length','55485CQEKhS','4cZGsNr','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','15eEzkdl','10jxwnTI'];a50_0x58c7=function(){return _0x255037;};return a50_0x58c7();}