@lovrabet/rabetbase-cli 2.0.4-beta.3 → 2.0.4-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 (135) 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/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/logout.js +1 -1
  11. package/lib/cli-flags.js +1 -1
  12. package/lib/cli.js +1 -1
  13. package/lib/commands/api/doc.js +1 -1
  14. package/lib/commands/api/index.js +1 -1
  15. package/lib/commands/api/list.js +1 -1
  16. package/lib/commands/api/pull.js +1 -1
  17. package/lib/commands/app/add.js +1 -1
  18. package/lib/commands/app/index.js +1 -1
  19. package/lib/commands/app/list.js +1 -1
  20. package/lib/commands/app/remote.js +1 -1
  21. package/lib/commands/app/remove.js +1 -1
  22. package/lib/commands/app/shared.js +1 -1
  23. package/lib/commands/app/use.js +1 -1
  24. package/lib/commands/auth.js +1 -1
  25. package/lib/commands/bff/delete.js +1 -1
  26. package/lib/commands/bff/detail.js +1 -1
  27. package/lib/commands/bff/index.js +1 -1
  28. package/lib/commands/bff/list.js +1 -1
  29. package/lib/commands/bff/new.js +1 -1
  30. package/lib/commands/bff/pull.js +1 -1
  31. package/lib/commands/bff/push.js +1 -1
  32. package/lib/commands/bff/status.js +1 -1
  33. package/lib/commands/build.js +1 -1
  34. package/lib/commands/cli-update.js +1 -1
  35. package/lib/commands/codegen/index.js +1 -1
  36. package/lib/commands/codegen/sdk.js +1 -1
  37. package/lib/commands/codegen/sql.js +1 -1
  38. package/lib/commands/common/app-selector.js +1 -1
  39. package/lib/commands/common/flags.js +1 -1
  40. package/lib/commands/common/validate.js +1 -1
  41. package/lib/commands/config/get.js +1 -1
  42. package/lib/commands/config/index.js +1 -1
  43. package/lib/commands/config/list.js +1 -1
  44. package/lib/commands/config/set.js +1 -1
  45. package/lib/commands/config/shared.js +1 -1
  46. package/lib/commands/create.js +1 -1
  47. package/lib/commands/dataset/detail.js +1 -1
  48. package/lib/commands/dataset/index.js +1 -1
  49. package/lib/commands/dataset/links.js +1 -1
  50. package/lib/commands/dataset/list.js +1 -1
  51. package/lib/commands/dataset/operations.js +1 -1
  52. package/lib/commands/doctor.js +1 -1
  53. package/lib/commands/init.js +1 -1
  54. package/lib/commands/logout.js +1 -1
  55. package/lib/commands/logs.js +1 -1
  56. package/lib/commands/menu/index.js +1 -1
  57. package/lib/commands/menu/shared/compare-table.js +1 -1
  58. package/lib/commands/menu/shared/index.js +1 -1
  59. package/lib/commands/menu/shared/inquirer.js +1 -1
  60. package/lib/commands/menu/shared/local-pages.js +1 -1
  61. package/lib/commands/menu/shared/logic.js +1 -1
  62. package/lib/commands/menu/shared/service.js +1 -1
  63. package/lib/commands/menu/shared/sync-core.js +1 -1
  64. package/lib/commands/menu/shared/update-core.js +1 -1
  65. package/lib/commands/menu/shared/valid-url.js +1 -1
  66. package/lib/commands/menu/sync.js +1 -1
  67. package/lib/commands/menu/update.js +1 -1
  68. package/lib/commands/preview.js +1 -1
  69. package/lib/commands/project-upgrade.js +1 -1
  70. package/lib/commands/registry.js +1 -1
  71. package/lib/commands/run.js +1 -1
  72. package/lib/commands/skill.js +1 -1
  73. package/lib/commands/smart-init.js +1 -1
  74. package/lib/commands/sql/detail.js +1 -1
  75. package/lib/commands/sql/exec.js +1 -1
  76. package/lib/commands/sql/index.js +1 -1
  77. package/lib/commands/sql/list.js +1 -1
  78. package/lib/commands/sql/save.js +1 -1
  79. package/lib/commands/sql/validate.js +1 -1
  80. package/lib/commands/start.js +1 -1
  81. package/lib/constant/cli.js +1 -1
  82. package/lib/constant/domain.js +1 -1
  83. package/lib/constant/env.js +1 -1
  84. package/lib/context.js +1 -1
  85. package/lib/core/alias-resolver.js +1 -1
  86. package/lib/core/api-client.js +1 -1
  87. package/lib/core/bff/config.js +1 -1
  88. package/lib/core/bff/file-system.js +1 -1
  89. package/lib/core/bff/hash.js +1 -1
  90. package/lib/core/bff/lock.js +1 -1
  91. package/lib/core/bff/utils.js +1 -1
  92. package/lib/core/db-resolver.js +1 -1
  93. package/lib/core/sql-validator.js +1 -1
  94. package/lib/create-app/enhanced-guided-create.js +1 -1
  95. package/lib/create-app/format-elapsed.js +1 -1
  96. package/lib/create-app/main.js +1 -1
  97. package/lib/create-app/non-interactive.js +1 -1
  98. package/lib/create-app/use-copy-project-template.js +1 -1
  99. package/lib/create-app/use-format-code.js +1 -1
  100. package/lib/create-app/use-install-dependencies.js +1 -1
  101. package/lib/errors.js +1 -1
  102. package/lib/framework/flags.js +1 -1
  103. package/lib/framework/help.js +1 -1
  104. package/lib/framework/index.js +1 -1
  105. package/lib/framework/output.js +1 -1
  106. package/lib/framework/response.js +1 -1
  107. package/lib/framework/runner.js +1 -1
  108. package/lib/framework/types.js +1 -1
  109. package/lib/generated/build-info.js +1 -1
  110. package/lib/help.js +1 -1
  111. package/lib/init/main.js +1 -1
  112. package/lib/skills/main.js +1 -1
  113. package/lib/skills/npx-skills-add.js +1 -1
  114. package/lib/telemetry/cli-help-trace.js +1 -1
  115. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  116. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  117. package/lib/telemetry/send-cli-trace-log.js +1 -1
  118. package/lib/utils/ai_config.js +1 -1
  119. package/lib/utils/cdn-config.js +1 -1
  120. package/lib/utils/check-sdk-version.js +1 -1
  121. package/lib/utils/cli-version-check.js +1 -1
  122. package/lib/utils/config.js +1 -1
  123. package/lib/utils/copy-directory.js +1 -1
  124. package/lib/utils/file-utils.js +1 -1
  125. package/lib/utils/guides-cdn.js +1 -1
  126. package/lib/utils/http-client.js +1 -1
  127. package/lib/utils/is-non-interactive.js +1 -1
  128. package/lib/utils/logger.js +1 -1
  129. package/lib/utils/platform.js +1 -1
  130. package/lib/utils/rules-cdn.js +1 -1
  131. package/lib/utils/sleep.js +1 -1
  132. package/lib/utils/template-replacer.js +1 -1
  133. package/lib/utils/version.js +1 -1
  134. package/lib/utils/with-active-cookie.js +1 -1
  135. package/package.json +3 -3
@@ -1 +1 @@
1
- function a18_0x4110(_0x22164c,_0x5261e2){_0x22164c=_0x22164c-0x6e;const _0x4d99e8=a18_0x4d99();let _0x41103f=_0x4d99e8[_0x22164c];return _0x41103f;}function a18_0x4d99(){const _0x5c57cc=['1010398kAZKPq','read','618HjbpBJ','map','length','2413692UkBOTZ','env','locale','Single-app\x20mode.\x20Use\x20`rabetbase\x20app\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20enable\x20multi-app\x20mode.','riskLevel','cookie','4488568JnOttu','accessKey','entries','pageSize','2087030LSjPjD','2154808sMtRGm','apiDir','List\x20all\x20configured\x20apps','appcode','list','2fSwvfJ','No\x20apps\x20configured.\x20Use\x20`rabetbase\x20app\x20add\x20--name\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.','app','30dswNxd','single-app','65121YSyZXM','6585939ztBmSC','format'];a18_0x4d99=function(){return _0x5c57cc;};return a18_0x4d99();}const a18_0xb8e1b7=a18_0x4110;(function(_0x1bc03a,_0x4c0299){const _0x1cab7a=a18_0x4110,_0x2ccb84=_0x1bc03a();while(!![]){try{const _0x18a29f=parseInt(_0x1cab7a(0x74))/0x1*(-parseInt(_0x1cab7a(0x7c))/0x2)+parseInt(_0x1cab7a(0x81))/0x3+parseInt(_0x1cab7a(0x6f))/0x4+-parseInt(_0x1cab7a(0x6e))/0x5+parseInt(_0x1cab7a(0x7e))/0x6*(-parseInt(_0x1cab7a(0x79))/0x7)+-parseInt(_0x1cab7a(0x87))/0x8+parseInt(_0x1cab7a(0x7a))/0x9*(parseInt(_0x1cab7a(0x77))/0xa);if(_0x18a29f===_0x4c0299)break;else _0x2ccb84['push'](_0x2ccb84['shift']());}catch(_0x56032e){_0x2ccb84['push'](_0x2ccb84['shift']());}}}(a18_0x4d99,0x90687));import{readConfig}from'./shared.js';async function execute(_0x5906da){const _0x492607=a18_0x4110,_0x29db4e=readConfig(),{apps:apps={},defaultApp:_0x1722f9,currentApp:_0x437545}=_0x29db4e,_0x6eee54=Object[_0x492607(0x89)](apps);if(_0x6eee54[_0x492607(0x80)]===0x0){const _0x20420b=_0x29db4e[_0x492607(0x72)];if(_0x20420b)return{'ok':!![],'data':{'mode':_0x492607(0x78),'appcode':_0x20420b,'env':_0x29db4e[_0x492607(0x82)]},'message':_0x492607(0x84)};return{'ok':!![],'data':[],'message':_0x492607(0x75)};}const _0x3f0d3e=_0x6eee54[_0x492607(0x7f)](([_0x1768d0,_0x588097])=>({'name':_0x1768d0,'appcode':_0x588097[_0x492607(0x72)],'isDefault':_0x1768d0===_0x1722f9,'isCurrent':_0x1768d0===(_0x437545??_0x1722f9),'env':_0x588097[_0x492607(0x82)]??null,'apiDir':_0x588097[_0x492607(0x70)]??null,'hasCookie':!!_0x588097[_0x492607(0x86)],'hasAccessKey':!!_0x588097[_0x492607(0x88)],'format':_0x588097[_0x492607(0x7b)]??null,'pageSize':_0x588097[_0x492607(0x8a)]??null,'riskLevel':_0x588097[_0x492607(0x85)]??null,'locale':_0x588097[_0x492607(0x83)]??null}));return{'ok':!![],'data':_0x3f0d3e};}export const appListDefinition={'service':a18_0xb8e1b7(0x76),'command':a18_0xb8e1b7(0x73),'description':a18_0xb8e1b7(0x71),'risk':a18_0xb8e1b7(0x7d),'requiresAuth':![],'requiresAppCode':![],'flags':[],'execute':execute};
1
+ const a18_0x2978a8=a18_0x3e54;function a18_0xbc56(){const _0x3a9885=['locale','333641pWKxlU','644163tZGOjH','List\x20all\x20configured\x20apps','Single-app\x20mode.\x20Use\x20`rabetbase\x20app\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20enable\x20multi-app\x20mode.','104YSbULr','1727425LoJLrf','2693180pfQYwy','23745282qVNeJR','list','12KZkoqE','880890sFlnHs','392697oJALFR','cookie','appcode','riskLevel','read','24QQlrti','map','single-app','pageSize','accessKey','8EJQMzn','apiDir','env','entries'];a18_0xbc56=function(){return _0x3a9885;};return a18_0xbc56();}(function(_0x588732,_0x6e5f60){const _0x1fb710=a18_0x3e54,_0x185856=_0x588732();while(!![]){try{const _0x5d3ae4=-parseInt(_0x1fb710(0x165))/0x1+-parseInt(_0x1fb710(0x179))/0x2*(-parseInt(_0x1fb710(0x16e))/0x3)+parseInt(_0x1fb710(0x16d))/0x4*(-parseInt(_0x1fb710(0x169))/0x5)+parseInt(_0x1fb710(0x174))/0x6*(-parseInt(_0x1fb710(0x164))/0x7)+-parseInt(_0x1fb710(0x168))/0x8*(parseInt(_0x1fb710(0x16f))/0x9)+-parseInt(_0x1fb710(0x16a))/0xa+parseInt(_0x1fb710(0x16b))/0xb;if(_0x5d3ae4===_0x6e5f60)break;else _0x185856['push'](_0x185856['shift']());}catch(_0x22b546){_0x185856['push'](_0x185856['shift']());}}}(a18_0xbc56,0x98ad5));import{readConfig}from'./shared.js';async function execute(_0x4788b6){const _0x456dc3=a18_0x3e54,_0x1b672d=readConfig(),{apps:apps={},defaultApp:_0x7460d9,currentApp:_0x4ce6b3}=_0x1b672d,_0x21034=Object[_0x456dc3(0x17c)](apps);if(_0x21034['length']===0x0){const _0xbc9025=_0x1b672d[_0x456dc3(0x171)];if(_0xbc9025)return{'ok':!![],'data':{'mode':_0x456dc3(0x176),'appcode':_0xbc9025,'env':_0x1b672d[_0x456dc3(0x17b)]},'message':_0x456dc3(0x167)};return{'ok':!![],'data':[],'message':'No\x20apps\x20configured.\x20Use\x20`rabetbase\x20app\x20add\x20--name\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.'};}const _0x26eac5=_0x21034[_0x456dc3(0x175)](([_0x16aa92,_0x4fce15])=>({'name':_0x16aa92,'appcode':_0x4fce15['appcode'],'isDefault':_0x16aa92===_0x7460d9,'isCurrent':_0x16aa92===(_0x4ce6b3??_0x7460d9),'env':_0x4fce15['env']??null,'apiDir':_0x4fce15[_0x456dc3(0x17a)]??null,'hasCookie':!!_0x4fce15[_0x456dc3(0x170)],'hasAccessKey':!!_0x4fce15[_0x456dc3(0x178)],'format':_0x4fce15['format']??null,'pageSize':_0x4fce15[_0x456dc3(0x177)]??null,'riskLevel':_0x4fce15[_0x456dc3(0x172)]??null,'locale':_0x4fce15[_0x456dc3(0x163)]??null}));return{'ok':!![],'data':_0x26eac5};}function a18_0x3e54(_0x5310e9,_0x4a4573){_0x5310e9=_0x5310e9-0x163;const _0xbc5680=a18_0xbc56();let _0x3e5409=_0xbc5680[_0x5310e9];return _0x3e5409;}export const appListDefinition={'service':'app','command':a18_0x2978a8(0x16c),'description':a18_0x2978a8(0x166),'risk':a18_0x2978a8(0x173),'requiresAuth':![],'requiresAppCode':![],'flags':[],'execute':execute};
@@ -1 +1 @@
1
- const a19_0x5e697c=a19_0x2234;function a19_0x5a30(){const _0x25b059=['1002980hvZuJv','335884TZtXQx','221374UDaZDp','cookie','2667752suWWvj','1569144vsmeYF','../../core/api-client.js','7NnDtbp','app','299592smZjjL','1486485vKldcs','10jECPwy'];a19_0x5a30=function(){return _0x25b059;};return a19_0x5a30();}function a19_0x2234(_0x19ff8c,_0x22d56c){_0x19ff8c=_0x19ff8c-0x1c2;const _0x5a3067=a19_0x5a30();let _0x223463=_0x5a3067[_0x19ff8c];return _0x223463;}(function(_0x20c3a5,_0x4dc836){const _0x369878=a19_0x2234,_0x15bd84=_0x20c3a5();while(!![]){try{const _0x1455b5=parseInt(_0x369878(0x1cd))/0x1+parseInt(_0x369878(0x1cc))/0x2+parseInt(_0x369878(0x1c9))/0x3+parseInt(_0x369878(0x1cb))/0x4+parseInt(_0x369878(0x1ca))/0x5*(-parseInt(_0x369878(0x1c4))/0x6)+parseInt(_0x369878(0x1c6))/0x7*(-parseInt(_0x369878(0x1c3))/0x8)+parseInt(_0x369878(0x1c8))/0x9;if(_0x1455b5===_0x4dc836)break;else _0x15bd84['push'](_0x15bd84['shift']());}catch(_0x46f3aa){_0x15bd84['push'](_0x15bd84['shift']());}}}(a19_0x5a30,0x4c407));import{listRemoteApps}from'../../core/api-client.js';async function execute(_0x1aeecb){const _0x4a712c=a19_0x2234,{setActiveCookie:_0x534314}=await import(_0x4a712c(0x1c5));_0x534314(_0x1aeecb[_0x4a712c(0x1c2)]);const _0x1d8d9a=await listRemoteApps();return{'ok':!![],'data':_0x1d8d9a};}export const appRemoteDefinition={'service':a19_0x5e697c(0x1c7),'command':'remote','description':'List\x20apps\x20available\x20on\x20the\x20platform','risk':'read','requiresAuth':!![],'requiresAppCode':![],'flags':[],'execute':execute};
1
+ function a19_0x12a5(_0x24ef4b,_0x527f49){_0x24ef4b=_0x24ef4b-0x7f;const _0x2ac702=a19_0x2ac7();let _0x12a5e8=_0x2ac702[_0x24ef4b];return _0x12a5e8;}const a19_0x575d3a=a19_0x12a5;(function(_0x171106,_0x2b7733){const _0xca9a=a19_0x12a5,_0x45e862=_0x171106();while(!![]){try{const _0x37dc45=parseInt(_0xca9a(0x8a))/0x1+parseInt(_0xca9a(0x84))/0x2+parseInt(_0xca9a(0x87))/0x3+parseInt(_0xca9a(0x80))/0x4*(parseInt(_0xca9a(0x85))/0x5)+-parseInt(_0xca9a(0x86))/0x6+-parseInt(_0xca9a(0x8b))/0x7*(-parseInt(_0xca9a(0x88))/0x8)+-parseInt(_0xca9a(0x81))/0x9;if(_0x37dc45===_0x2b7733)break;else _0x45e862['push'](_0x45e862['shift']());}catch(_0x3e277a){_0x45e862['push'](_0x45e862['shift']());}}}(a19_0x2ac7,0xd3e87));import{listRemoteApps}from'../../core/api-client.js';async function execute(_0x1aaccf){const _0x24a2bd=a19_0x12a5,{setActiveCookie:_0x21ea34}=await import(_0x24a2bd(0x89));_0x21ea34(_0x1aaccf['cookie']);const _0x3e45b4=await listRemoteApps();return{'ok':!![],'data':_0x3e45b4};}export const appRemoteDefinition={'service':a19_0x575d3a(0x82),'command':'remote','description':a19_0x575d3a(0x7f),'risk':a19_0x575d3a(0x83),'requiresAuth':!![],'requiresAppCode':![],'flags':[],'execute':execute};function a19_0x2ac7(){const _0x957492=['app','read','2376842EdIoOS','122065AMarcH','1708818GWqSZw','4666116YGrtsi','215608hOxzZq','../../core/api-client.js','1459602bshtsS','77iThnHU','List\x20apps\x20available\x20on\x20the\x20platform','184weUkdi','40230684OACDDk'];a19_0x2ac7=function(){return _0x957492;};return a19_0x2ac7();}
@@ -1 +1 @@
1
- const a20_0x195a6a=a20_0x5098;function a20_0x4805(){const _0x345e08=['Missing\x20app\x20name.','\x20Default\x20app\x20changed\x20to\x20\x22','Remove\x20an\x20app\x20from\x20config','global','93935bWuGay','app','validation','Usage:\x20rabetbase\x20app\x20remove\x20--name\x20<name>','763548hOMWic','name','33sonAZQ','defaultApp','164WNQsrk','977700sADbdE','length','8nKTyIG','2302128yBEird','App\x20\x22','string','2499957rRhwYp','Use\x20global\x20config\x20scope','17718dgjenq','str','App\x20name\x20to\x20remove','405551xOwjCP','4XGmJwA','apps','boolean','Removed\x20app\x20\x22','keys','\x22\x20not\x20found.','bool','1505vtHpeu','13wzAzhQ'];a20_0x4805=function(){return _0x345e08;};return a20_0x4805();}(function(_0x395b34,_0x1561f5){const _0x58618b=a20_0x5098,_0x485621=_0x395b34();while(!![]){try{const _0x58c91=-parseInt(_0x58618b(0x77))/0x1*(parseInt(_0x58618b(0x78))/0x2)+-parseInt(_0x58618b(0x91))/0x3+-parseInt(_0x58618b(0x8d))/0x4*(-parseInt(_0x58618b(0x85))/0x5)+parseInt(_0x58618b(0x74))/0x6*(parseInt(_0x58618b(0x7f))/0x7)+parseInt(_0x58618b(0x90))/0x8*(parseInt(_0x58618b(0x72))/0x9)+-parseInt(_0x58618b(0x8e))/0xa*(-parseInt(_0x58618b(0x8b))/0xb)+parseInt(_0x58618b(0x89))/0xc*(parseInt(_0x58618b(0x80))/0xd);if(_0x58c91===_0x1561f5)break;else _0x485621['push'](_0x485621['shift']());}catch(_0x29e7b2){_0x485621['push'](_0x485621['shift']());}}}(a20_0x4805,0x70a54));import{CliErrors}from'../../errors.js';function a20_0x5098(_0x4078d1,_0x1cacd5){_0x4078d1=_0x4078d1-0x71;const _0x48057c=a20_0x4805();let _0x509855=_0x48057c[_0x4078d1];return _0x509855;}import{readConfig,writeConfig}from'./shared.js';async function execute(_0x5df180){const _0x1abb1d=a20_0x5098,_0x42d3a9=_0x5df180[_0x1abb1d(0x75)]('name');if(!_0x42d3a9)throw CliErrors[_0x1abb1d(0x87)](_0x1abb1d(0x81),_0x1abb1d(0x88));const _0x66a44d={'global':_0x5df180[_0x1abb1d(0x7e)](_0x1abb1d(0x84))},_0x4008d8=readConfig(_0x66a44d),_0x2e512c=_0x4008d8[_0x1abb1d(0x79)];if(!_0x2e512c||!_0x2e512c[_0x42d3a9])throw CliErrors[_0x1abb1d(0x87)](_0x1abb1d(0x92)+_0x42d3a9+_0x1abb1d(0x7d));delete _0x2e512c[_0x42d3a9];let _0xc9bd55='';if(_0x4008d8['defaultApp']===_0x42d3a9){const _0x15b406=Object[_0x1abb1d(0x7c)](_0x2e512c);_0x4008d8[_0x1abb1d(0x8c)]=_0x15b406[_0x1abb1d(0x8f)]>0x0?_0x15b406[0x0]:undefined,_0x4008d8[_0x1abb1d(0x8c)]?_0xc9bd55=_0x1abb1d(0x82)+_0x4008d8[_0x1abb1d(0x8c)]+'\x22.':delete _0x4008d8[_0x1abb1d(0x8c)];}return Object[_0x1abb1d(0x7c)](_0x2e512c)[_0x1abb1d(0x8f)]===0x0&&(delete _0x4008d8[_0x1abb1d(0x79)],delete _0x4008d8[_0x1abb1d(0x8c)]),writeConfig(_0x4008d8,_0x66a44d),{'ok':!![],'message':_0x1abb1d(0x7b)+_0x42d3a9+'\x22.'+_0xc9bd55};}export const appRemoveDefinition={'service':a20_0x195a6a(0x86),'command':'remove','description':a20_0x195a6a(0x83),'risk':'write','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a20_0x195a6a(0x8a),'type':a20_0x195a6a(0x71),'description':a20_0x195a6a(0x76),'required':!![]},{'name':'global','type':a20_0x195a6a(0x7a),'description':a20_0x195a6a(0x73),'default':![]}],'execute':execute};
1
+ const a20_0x3c33ee=a20_0xf64f;function a20_0xf64f(_0x2d41a2,_0x2b6c56){_0x2d41a2=_0x2d41a2-0x131;const _0x40866e=a20_0x4086();let _0xf64fd1=_0x40866e[_0x2d41a2];return _0xf64fd1;}(function(_0xc64a75,_0x29cbb9){const _0x42b588=a20_0xf64f,_0x4172db=_0xc64a75();while(!![]){try{const _0x118815=parseInt(_0x42b588(0x138))/0x1+-parseInt(_0x42b588(0x13c))/0x2+-parseInt(_0x42b588(0x131))/0x3*(-parseInt(_0x42b588(0x13f))/0x4)+parseInt(_0x42b588(0x14a))/0x5+parseInt(_0x42b588(0x137))/0x6*(parseInt(_0x42b588(0x146))/0x7)+parseInt(_0x42b588(0x144))/0x8*(parseInt(_0x42b588(0x145))/0x9)+-parseInt(_0x42b588(0x13d))/0xa*(parseInt(_0x42b588(0x13a))/0xb);if(_0x118815===_0x29cbb9)break;else _0x4172db['push'](_0x4172db['shift']());}catch(_0x3e70a1){_0x4172db['push'](_0x4172db['shift']());}}}(a20_0x4086,0x5adff));import{CliErrors}from'../../errors.js';import{readConfig,writeConfig}from'./shared.js';function a20_0x4086(){const _0xa1f3d5=['write','4PnbmQF','defaultApp','length','app','apps','1928MQQFgV','22761oeRIBi','3175851PHXaMN','remove','string','Removed\x20app\x20\x22','1980600zsoydU','Missing\x20app\x20name.','App\x20name\x20to\x20remove','keys','1154757jhydIW','App\x20\x22','Use\x20global\x20config\x20scope','global','\x22\x20not\x20found.','Remove\x20an\x20app\x20from\x20config','6nlZpif','118877jBTkoL','name','11wlkqzX','Usage:\x20rabetbase\x20app\x20remove\x20--name\x20<name>','43464ryMRzl','15691430cmkevc'];a20_0x4086=function(){return _0xa1f3d5;};return a20_0x4086();}async function execute(_0xacc727){const _0x142583=a20_0xf64f,_0x3ce46a=_0xacc727['str'](_0x142583(0x139));if(!_0x3ce46a)throw CliErrors['validation'](_0x142583(0x14b),_0x142583(0x13b));const _0x26d6ff={'global':_0xacc727['bool']('global')},_0x2ab3fc=readConfig(_0x26d6ff),_0x2e9b67=_0x2ab3fc[_0x142583(0x143)];if(!_0x2e9b67||!_0x2e9b67[_0x3ce46a])throw CliErrors['validation'](_0x142583(0x132)+_0x3ce46a+_0x142583(0x135));delete _0x2e9b67[_0x3ce46a];let _0x423e7d='';if(_0x2ab3fc[_0x142583(0x140)]===_0x3ce46a){const _0x2dcdcb=Object[_0x142583(0x14d)](_0x2e9b67);_0x2ab3fc[_0x142583(0x140)]=_0x2dcdcb[_0x142583(0x141)]>0x0?_0x2dcdcb[0x0]:undefined,_0x2ab3fc[_0x142583(0x140)]?_0x423e7d='\x20Default\x20app\x20changed\x20to\x20\x22'+_0x2ab3fc[_0x142583(0x140)]+'\x22.':delete _0x2ab3fc[_0x142583(0x140)];}return Object[_0x142583(0x14d)](_0x2e9b67)[_0x142583(0x141)]===0x0&&(delete _0x2ab3fc[_0x142583(0x143)],delete _0x2ab3fc[_0x142583(0x140)]),writeConfig(_0x2ab3fc,_0x26d6ff),{'ok':!![],'message':_0x142583(0x149)+_0x3ce46a+'\x22.'+_0x423e7d};}export const appRemoveDefinition={'service':a20_0x3c33ee(0x142),'command':a20_0x3c33ee(0x147),'description':a20_0x3c33ee(0x136),'risk':a20_0x3c33ee(0x13e),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a20_0x3c33ee(0x139),'type':a20_0x3c33ee(0x148),'description':a20_0x3c33ee(0x14c),'required':!![]},{'name':a20_0x3c33ee(0x134),'type':'boolean','description':a20_0x3c33ee(0x133),'default':![]}],'execute':execute};
@@ -1 +1 @@
1
- (function(_0x47d3d3,_0x393590){const _0x2069d0=a21_0x4f8f,_0x4c6662=_0x47d3d3();while(!![]){try{const _0x39ba23=-parseInt(_0x2069d0(0x138))/0x1+-parseInt(_0x2069d0(0x135))/0x2*(parseInt(_0x2069d0(0x12b))/0x3)+parseInt(_0x2069d0(0x12e))/0x4+parseInt(_0x2069d0(0x12a))/0x5*(parseInt(_0x2069d0(0x13a))/0x6)+-parseInt(_0x2069d0(0x12d))/0x7+-parseInt(_0x2069d0(0x131))/0x8+parseInt(_0x2069d0(0x12c))/0x9*(parseInt(_0x2069d0(0x137))/0xa);if(_0x39ba23===_0x393590)break;else _0x4c6662['push'](_0x4c6662['shift']());}catch(_0x157b0d){_0x4c6662['push'](_0x4c6662['shift']());}}}(a21_0x1d76,0xe8368));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';export function getConfigPath(_0x462bd7={}){const _0x2ff3c6=a21_0x4f8f,_0xb21812=_0x462bd7['global']?_0x2ff3c6(0x139):'project';return resolveWriteConfigPath(_0xb21812);}function a21_0x1d76(){const _0x133e87=['11176228rwdMno','2465724HlJWrB','cookie','locale','11543856fEvbbo','app','log','\x20(global)','731184FqxXNN','pageSize','10FNMeIm','505893TRgDNi','global','6zvTUVw','appcode','7116955qjzdMJ','12pdKGbP','35272521kfvavm'];a21_0x1d76=function(){return _0x133e87;};return a21_0x1d76();}function a21_0x4f8f(_0xc5e068,_0x432987){_0xc5e068=_0xc5e068-0x12a;const _0x1d7649=a21_0x1d76();let _0x4f8fc0=_0x1d7649[_0xc5e068];return _0x4f8fc0;}export function readConfig(_0x289039={}){return readConfigFile(getConfigPath(_0x289039));}export function writeConfig(_0x31ab73,_0x5d5bec={}){writeConfigFile(getConfigPath(_0x5d5bec),_0x31ab73);}export function scopeLabel(_0x15e1c2){const _0x3e3f6c=a21_0x4f8f;return _0x15e1c2[_0x3e3f6c(0x139)]?_0x3e3f6c(0x134):'';}export function migrateLegacySingleApp(_0x949b16,_0x103b6c){const _0x46e457=a21_0x4f8f,_0x40930a=_0x949b16[_0x46e457(0x13b)]||_0x949b16[_0x46e457(0x132)];if(!_0x40930a)return;const _0x48301e=String(_0x40930a);if(_0x48301e===_0x103b6c)return;const _0x327d49=['env','apiDir',_0x46e457(0x12f),'accessKey','format',_0x46e457(0x136),'riskLevel',_0x46e457(0x130)],_0x1cf61d={'appcode':_0x40930a};for(const _0x13a0f1 of _0x327d49){if(_0x949b16[_0x13a0f1]!=null)_0x1cf61d[_0x13a0f1]=_0x949b16[_0x13a0f1];}_0x949b16['apps'][_0x48301e]=_0x1cf61d,_0x949b16['defaultApp']=_0x48301e,delete _0x949b16['appcode'],delete _0x949b16[_0x46e457(0x132)],console[_0x46e457(0x133)]('Migrated\x20existing\x20app\x20\x22'+_0x48301e+'\x22\x20to\x20multi-app\x20config\x20(set\x20as\x20default).');}
1
+ (function(_0x80a713,_0x1555fa){const _0x2cd1de=a21_0x58ac,_0x5a526e=_0x80a713();while(!![]){try{const _0x43c2b3=parseInt(_0x2cd1de(0xf7))/0x1*(parseInt(_0x2cd1de(0xe9))/0x2)+-parseInt(_0x2cd1de(0xf3))/0x3*(parseInt(_0x2cd1de(0xf6))/0x4)+-parseInt(_0x2cd1de(0xe8))/0x5*(parseInt(_0x2cd1de(0xf9))/0x6)+parseInt(_0x2cd1de(0xe5))/0x7*(-parseInt(_0x2cd1de(0xef))/0x8)+-parseInt(_0x2cd1de(0xfe))/0x9+parseInt(_0x2cd1de(0xf4))/0xa*(-parseInt(_0x2cd1de(0xf5))/0xb)+parseInt(_0x2cd1de(0xec))/0xc;if(_0x43c2b3===_0x1555fa)break;else _0x5a526e['push'](_0x5a526e['shift']());}catch(_0x23a76b){_0x5a526e['push'](_0x5a526e['shift']());}}}(a21_0x4309,0xdc9a6));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';function a21_0x58ac(_0x24c732,_0x27a9c9){_0x24c732=_0x24c732-0xe5;const _0x4309cf=a21_0x4309();let _0x58ac63=_0x4309cf[_0x24c732];return _0x58ac63;}export function getConfigPath(_0x3c9440={}){const _0x3f42b6=a21_0x58ac,_0x308bae=_0x3c9440[_0x3f42b6(0xee)]?_0x3f42b6(0xee):'project';return resolveWriteConfigPath(_0x308bae);}export function readConfig(_0x2b06a8={}){return readConfigFile(getConfigPath(_0x2b06a8));}export function writeConfig(_0x1a391f,_0xfb318c={}){writeConfigFile(getConfigPath(_0xfb318c),_0x1a391f);}export function scopeLabel(_0x5cdbf4){const _0x387635=a21_0x58ac;return _0x5cdbf4[_0x387635(0xee)]?'\x20(global)':'';}function a21_0x4309(){const _0x105197=['204968XXlkjQ','\x22\x20to\x20multi-app\x20config\x20(set\x20as\x20default).','apps','appcode','3zkqtKH','150nzHJuh','169411KQFPBP','2158576ypwCez','4142PADIfe','app','6ZYacnM','apiDir','defaultApp','accessKey','format','15424893BRslCH','cookie','119LBkJIb','env','locale','8551010UAcntK','338dyvzBp','riskLevel','Migrated\x20existing\x20app\x20\x22','58006644FHDUoM','log','global'];a21_0x4309=function(){return _0x105197;};return a21_0x4309();}export function migrateLegacySingleApp(_0x512f4a,_0x258e71){const _0x38047e=a21_0x58ac,_0x130926=_0x512f4a[_0x38047e(0xf2)]||_0x512f4a[_0x38047e(0xf8)];if(!_0x130926)return;const _0x5e2e4e=String(_0x130926);if(_0x5e2e4e===_0x258e71)return;const _0x4245bf=[_0x38047e(0xe6),_0x38047e(0xfa),_0x38047e(0xff),_0x38047e(0xfc),_0x38047e(0xfd),'pageSize',_0x38047e(0xea),_0x38047e(0xe7)],_0x298872={'appcode':_0x130926};for(const _0x1198c4 of _0x4245bf){if(_0x512f4a[_0x1198c4]!=null)_0x298872[_0x1198c4]=_0x512f4a[_0x1198c4];}_0x512f4a[_0x38047e(0xf1)][_0x5e2e4e]=_0x298872,_0x512f4a[_0x38047e(0xfb)]=_0x5e2e4e,delete _0x512f4a[_0x38047e(0xf2)],delete _0x512f4a[_0x38047e(0xf8)],console[_0x38047e(0xed)](_0x38047e(0xeb)+_0x5e2e4e+_0x38047e(0xf0));}
@@ -1 +1 @@
1
- const a22_0x2d797b=a22_0x1d51;(function(_0x1f7f23,_0x2762ab){const _0x1392d1=a22_0x1d51,_0x290898=_0x1f7f23();while(!![]){try{const _0x1c80d6=parseInt(_0x1392d1(0x160))/0x1*(-parseInt(_0x1392d1(0x16c))/0x2)+-parseInt(_0x1392d1(0x159))/0x3*(-parseInt(_0x1392d1(0x15e))/0x4)+parseInt(_0x1392d1(0x162))/0x5*(parseInt(_0x1392d1(0x16b))/0x6)+parseInt(_0x1392d1(0x173))/0x7*(parseInt(_0x1392d1(0x163))/0x8)+parseInt(_0x1392d1(0x16a))/0x9+-parseInt(_0x1392d1(0x15c))/0xa+parseInt(_0x1392d1(0x169))/0xb*(-parseInt(_0x1392d1(0x15b))/0xc);if(_0x1c80d6===_0x2762ab)break;else _0x290898['push'](_0x290898['shift']());}catch(_0x418cce){_0x290898['push'](_0x290898['shift']());}}}(a22_0x2518,0x21caf));function a22_0x1d51(_0x487df9,_0x1a97e7){_0x487df9=_0x487df9-0x157;const _0x251893=a22_0x2518();let _0x1d51e5=_0x251893[_0x487df9];return _0x1d51e5;}function a22_0x2518(){const _0x4e53aa=['write','589967plLpyD','string','validation','Switch\x20the\x20default\x20app','keys','name','3OjizEr','\x20--appcode\x20<code>`\x20first.','284340mKnnsF','1536440oMIttY','Use\x20`rabetbase\x20app\x20add\x20--name\x20','455720CubrhP','use','1wSZtBp','bool','5NSyvQZ','8yBbmJb','appcode','global','Usage:\x20rabetbase\x20app\x20use\x20--name\x20<name>','join','App\x20\x22','99ppzqNH','918261drPQAj','1402878oqyyIm','57478pOQJzL','Default\x20app\x20set\x20to\x20\x22','str','apps','defaultApp','Missing\x20app\x20name.'];a22_0x2518=function(){return _0x4e53aa;};return a22_0x2518();}import{CliErrors}from'../../errors.js';import{readConfig,writeConfig,scopeLabel}from'./shared.js';async function execute(_0x30c3ba){const _0x8d1b0=a22_0x1d51,_0x48c3e3=_0x30c3ba[_0x8d1b0(0x16e)](_0x8d1b0(0x158));if(!_0x48c3e3)throw CliErrors[_0x8d1b0(0x175)](_0x8d1b0(0x171),_0x8d1b0(0x166));const _0x23d264={'global':_0x30c3ba[_0x8d1b0(0x161)](_0x8d1b0(0x165))},_0x1886b0=readConfig(_0x23d264),_0x56508c=_0x1886b0[_0x8d1b0(0x16f)]??{};if(!_0x56508c[_0x48c3e3]){const _0x40076f=Object[_0x8d1b0(0x157)](_0x56508c),_0x1e14e7=_0x40076f['length']===0x0?_0x8d1b0(0x15d)+_0x48c3e3+_0x8d1b0(0x15a):'Available:\x20'+_0x40076f[_0x8d1b0(0x167)](',\x20');throw CliErrors[_0x8d1b0(0x175)](_0x8d1b0(0x168)+_0x48c3e3+'\x22\x20not\x20found.',_0x1e14e7);}return _0x1886b0[_0x8d1b0(0x170)]=_0x48c3e3,writeConfig(_0x1886b0,_0x23d264),{'ok':!![],'message':_0x8d1b0(0x16d)+_0x48c3e3+'\x22\x20(appcode:\x20'+_0x56508c[_0x48c3e3][_0x8d1b0(0x164)]+')'+scopeLabel(_0x23d264)};}export const appUseDefinition={'service':'app','command':a22_0x2d797b(0x15f),'description':a22_0x2d797b(0x176),'risk':a22_0x2d797b(0x172),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a22_0x2d797b(0x158),'type':a22_0x2d797b(0x174),'description':'App\x20name\x20to\x20activate','required':!![]},{'name':a22_0x2d797b(0x165),'type':'boolean','description':'Use\x20global\x20config\x20scope','default':![]}],'execute':execute};
1
+ function a22_0x1993(_0x77576,_0x2e1050){_0x77576=_0x77576-0x126;const _0x5478d4=a22_0x5478();let _0x1993e9=_0x5478d4[_0x77576];return _0x1993e9;}const a22_0x4a9ec3=a22_0x1993;(function(_0x5a9b17,_0x48eec0){const _0x4cb97a=a22_0x1993,_0x5adc16=_0x5a9b17();while(!![]){try{const _0xae4bc1=-parseInt(_0x4cb97a(0x13c))/0x1*(parseInt(_0x4cb97a(0x132))/0x2)+-parseInt(_0x4cb97a(0x12d))/0x3+-parseInt(_0x4cb97a(0x12b))/0x4+parseInt(_0x4cb97a(0x12f))/0x5*(-parseInt(_0x4cb97a(0x131))/0x6)+-parseInt(_0x4cb97a(0x136))/0x7+parseInt(_0x4cb97a(0x12c))/0x8+parseInt(_0x4cb97a(0x128))/0x9;if(_0xae4bc1===_0x48eec0)break;else _0x5adc16['push'](_0x5adc16['shift']());}catch(_0x558db0){_0x5adc16['push'](_0x5adc16['shift']());}}}(a22_0x5478,0xae1f5));function a22_0x5478(){const _0x5d71d0=['15972615eeOmhx','Use\x20global\x20config\x20scope','Default\x20app\x20set\x20to\x20\x22','10952psJoYy','8387584MDOGnQ','2804817oIgdHf','apps','5HbDbDE','string','5297514FxfVvx','2qXvJuQ','appcode','Usage:\x20rabetbase\x20app\x20use\x20--name\x20<name>','app','67725ukzyct','App\x20name\x20to\x20activate','global','keys','write','\x20--appcode\x20<code>`\x20first.','279707LBckOD','defaultApp','name','validation','App\x20\x22','bool'];a22_0x5478=function(){return _0x5d71d0;};return a22_0x5478();}import{CliErrors}from'../../errors.js';import{readConfig,writeConfig,scopeLabel}from'./shared.js';async function execute(_0x54c07c){const _0x42a294=a22_0x1993,_0x173475=_0x54c07c['str']('name');if(!_0x173475)throw CliErrors[_0x42a294(0x13f)]('Missing\x20app\x20name.',_0x42a294(0x134));const _0x27cbac={'global':_0x54c07c[_0x42a294(0x127)](_0x42a294(0x138))},_0x307e72=readConfig(_0x27cbac),_0x2bdb7c=_0x307e72[_0x42a294(0x12e)]??{};if(!_0x2bdb7c[_0x173475]){const _0x237377=Object[_0x42a294(0x139)](_0x2bdb7c),_0x517a35=_0x237377['length']===0x0?'Use\x20`rabetbase\x20app\x20add\x20--name\x20'+_0x173475+_0x42a294(0x13b):'Available:\x20'+_0x237377['join'](',\x20');throw CliErrors[_0x42a294(0x13f)](_0x42a294(0x126)+_0x173475+'\x22\x20not\x20found.',_0x517a35);}return _0x307e72[_0x42a294(0x13d)]=_0x173475,writeConfig(_0x307e72,_0x27cbac),{'ok':!![],'message':_0x42a294(0x12a)+_0x173475+'\x22\x20(appcode:\x20'+_0x2bdb7c[_0x173475][_0x42a294(0x133)]+')'+scopeLabel(_0x27cbac)};}export const appUseDefinition={'service':a22_0x4a9ec3(0x135),'command':'use','description':'Switch\x20the\x20default\x20app','risk':a22_0x4a9ec3(0x13a),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a22_0x4a9ec3(0x13e),'type':a22_0x4a9ec3(0x130),'description':a22_0x4a9ec3(0x137),'required':!![]},{'name':a22_0x4a9ec3(0x138),'type':'boolean','description':a22_0x4a9ec3(0x129),'default':![]}],'execute':execute};
@@ -1 +1 @@
1
- const a23_0x29c3bc=a23_0x2165;(function(_0x3c5cb3,_0x55bc9b){const _0x6842d8=a23_0x2165,_0x5c56be=_0x3c5cb3();while(!![]){try{const _0x48f2ee=parseInt(_0x6842d8(0x1ba))/0x1+parseInt(_0x6842d8(0x1b4))/0x2*(parseInt(_0x6842d8(0x1b6))/0x3)+parseInt(_0x6842d8(0x1b2))/0x4*(-parseInt(_0x6842d8(0x1b1))/0x5)+parseInt(_0x6842d8(0x1b9))/0x6+-parseInt(_0x6842d8(0x1bb))/0x7*(-parseInt(_0x6842d8(0x1b7))/0x8)+parseInt(_0x6842d8(0x1b3))/0x9*(parseInt(_0x6842d8(0x1bc))/0xa)+parseInt(_0x6842d8(0x1b8))/0xb*(-parseInt(_0x6842d8(0x1af))/0xc);if(_0x48f2ee===_0x55bc9b)break;else _0x5c56be['push'](_0x5c56be['shift']());}catch(_0x4cb81f){_0x5c56be['push'](_0x5c56be['shift']());}}}(a23_0x246d,0x3444c));function a23_0x246d(){const _0x43bbe3=['10743fjNzkE','33704fcMgWU','44IEZARN','2012238ZDxCdJ','65512vLMoio','343mbyPJp','10gLwGpf','2382972PcQmzq','Authenticate\x20with\x20rabetbase','15CuafzM','543860uXFFLC','3477879jrptjH','236SGoRUE','auth'];a23_0x246d=function(){return _0x43bbe3;};return a23_0x246d();}function a23_0x2165(_0x5ba31,_0x2dcd0e){_0x5ba31=_0x5ba31-0x1af;const _0x246d74=a23_0x246d();let _0x2165a8=_0x246d74[_0x5ba31];return _0x2165a8;}import{runAuthServer}from'../auth/auth-server-ui.js';export const authCommand={'name':a23_0x29c3bc(0x1b5),'description':a23_0x29c3bc(0x1b0),async 'run'(_0x36c0a1,_0x3a7016,_0xfc8094){await runAuthServer();}};
1
+ const a23_0x578b7b=a23_0x5d7e;function a23_0x4e36(){const _0x458401=['4zMlpJT','5242728etcWZr','83fcEDZy','2407800tbAFZN','439191ZGJgjt','13494OKnmyn','3036042rKNiPy','Authenticate\x20with\x20rabetbase','1000068DEnUVw','2731075lmCBbk','7YhswVZ'];a23_0x4e36=function(){return _0x458401;};return a23_0x4e36();}function a23_0x5d7e(_0xa30ef2,_0x14149e){_0xa30ef2=_0xa30ef2-0xc6;const _0x4e36d9=a23_0x4e36();let _0x5d7eb3=_0x4e36d9[_0xa30ef2];return _0x5d7eb3;}(function(_0x14a182,_0x58e119){const _0x329f6c=a23_0x5d7e,_0x344459=_0x14a182();while(!![]){try{const _0x2c38e3=parseInt(_0x329f6c(0xc8))/0x1*(parseInt(_0x329f6c(0xcb))/0x2)+parseInt(_0x329f6c(0xce))/0x3*(-parseInt(_0x329f6c(0xc6))/0x4)+parseInt(_0x329f6c(0xcf))/0x5+-parseInt(_0x329f6c(0xcc))/0x6+-parseInt(_0x329f6c(0xd0))/0x7*(-parseInt(_0x329f6c(0xc7))/0x8)+-parseInt(_0x329f6c(0xca))/0x9+-parseInt(_0x329f6c(0xc9))/0xa;if(_0x2c38e3===_0x58e119)break;else _0x344459['push'](_0x344459['shift']());}catch(_0x4f06a5){_0x344459['push'](_0x344459['shift']());}}}(a23_0x4e36,0x9a727));import{runAuthServer}from'../auth/auth-server-ui.js';export const authCommand={'name':'auth','description':a23_0x578b7b(0xcd),async 'run'(_0x18c286,_0x3920d4,_0xf03e95){await runAuthServer();}};
@@ -1 +1 @@
1
- function a24_0x4703(_0x10571e,_0x5a8ea0){_0x10571e=_0x10571e-0x1f4;const _0x3caaaa=a24_0x3caa();let _0x470379=_0x3caaaa[_0x10571e];return _0x470379;}const a24_0x59db51=a24_0x4703;(function(_0x2349eb,_0x24b479){const _0x5ac094=a24_0x4703,_0x47b6d3=_0x2349eb();while(!![]){try{const _0x3edf22=parseInt(_0x5ac094(0x20e))/0x1*(parseInt(_0x5ac094(0x1fd))/0x2)+-parseInt(_0x5ac094(0x212))/0x3*(-parseInt(_0x5ac094(0x218))/0x4)+-parseInt(_0x5ac094(0x215))/0x5+-parseInt(_0x5ac094(0x205))/0x6+parseInt(_0x5ac094(0x21b))/0x7+-parseInt(_0x5ac094(0x20b))/0x8+parseInt(_0x5ac094(0x20d))/0x9;if(_0x3edf22===_0x24b479)break;else _0x47b6d3['push'](_0x47b6d3['shift']());}catch(_0x1c8aaf){_0x47b6d3['push'](_0x47b6d3['shift']());}}}(a24_0x3caa,0x34a31));import{mkdir,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{deleteBffScript}from'../../core/api-client.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists,resolveLocalFilePathFromLockKey}from'../../core/bff/file-system.js';import{ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';export const bffDelete={'service':a24_0x59db51(0x209),'command':a24_0x59db51(0x1f9),'description':a24_0x59db51(0x1fc),'risk':a24_0x59db51(0x21e),'flags':[{'name':a24_0x59db51(0x213),'type':a24_0x59db51(0x210),'required':!![],'description':a24_0x59db51(0x20a)}],async 'validate'(_0x5c7880){const _0x46a2af=a24_0x59db51,_0x41b09c=loadBffProjectConfig(_0x5c7880[_0x46a2af(0x200)]),_0x20b2b9=await readBffLockFile(_0x41b09c[_0x46a2af(0x1fa)]);if(!_0x20b2b9)throw CliErrors[_0x46a2af(0x211)]('BFF\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.');},async 'execute'(_0x334c5f){const _0x26e9ee=a24_0x59db51,_0x106dde=loadBffProjectConfig(_0x334c5f['appCode']),_0x1794b5=await readBffLockFile(_0x106dde['lockFilePath']);if(!_0x1794b5)throw CliErrors[_0x26e9ee(0x211)](_0x26e9ee(0x207));const {lockData:_0x4d41f2,appLock:_0x3f13c6}=ensureLockScope(_0x1794b5,_0x106dde[_0x26e9ee(0x200)],_0x106dde[_0x26e9ee(0x201)],_0x26e9ee(0x1f9),_0x106dde[_0x26e9ee(0x200)],_0x106dde['scriptsWorkspaceRoot']+'/'+_0x106dde[_0x26e9ee(0x200)]),_0x2f6a11=_0x334c5f[_0x26e9ee(0x204)](_0x26e9ee(0x213)),_0x21a914=Object[_0x26e9ee(0x206)](_0x3f13c6[_0x26e9ee(0x1f8)]),_0x29816f=resolveDeleteTarget(_0x2f6a11,_0x21a914),_0x1f0991=_0x3f13c6['functions'][_0x29816f];if(!_0x1f0991)throw CliErrors['validation'](_0x26e9ee(0x21c)+_0x29816f+'\x22.');await deleteBffScript(_0x1f0991[_0x26e9ee(0x1ff)]),delete _0x3f13c6[_0x26e9ee(0x1f8)][_0x29816f],_0x3f13c6[_0x26e9ee(0x203)]=new Date()[_0x26e9ee(0x214)](),await writeBffLockFile(_0x106dde[_0x26e9ee(0x1fa)],_0x4d41f2);const _0x551260=resolveLocalFilePathFromLockKey(_0x106dde,_0x29816f);let _0x5f083d;await fileExists(_0x551260)&&(_0x5f083d=await moveToTrash(_0x106dde[_0x26e9ee(0x21d)],_0x106dde[_0x26e9ee(0x219)],_0x551260),await cleanupEmptyDirectories(dirname(_0x551260),_0x106dde[_0x26e9ee(0x216)]));const _0x1a8ce3={'deleted':_0x29816f,'remoteId':_0x1f0991[_0x26e9ee(0x1ff)]};if(_0x5f083d)_0x1a8ce3['trashedTo']=_0x5f083d;return{'ok':!![],'data':_0x1a8ce3,'message':'Deleted\x20'+_0x29816f+(_0x5f083d?_0x26e9ee(0x20f):'')};}};function resolveDeleteTarget(_0x11c204,_0x10b5d2){const _0x2ef87d=a24_0x59db51;if(_0x11c204[_0x2ef87d(0x1fe)]('/')){const _0x1bff47=_0x10b5d2[_0x2ef87d(0x202)](_0x3dc724=>_0x3dc724===_0x11c204);if(!_0x1bff47)throw CliErrors[_0x2ef87d(0x211)]('Function\x20not\x20found:\x20'+_0x11c204);return _0x1bff47;}const _0x2b24c4=_0x10b5d2[_0x2ef87d(0x1f7)](_0x4677c1=>_0x4677c1['split']('/')['at'](-0x1)===_0x11c204);if(_0x2b24c4['length']===0x0)throw CliErrors[_0x2ef87d(0x211)](_0x2ef87d(0x1f6)+_0x11c204);if(_0x2b24c4[_0x2ef87d(0x217)]>0x1)throw CliErrors['validation'](_0x2ef87d(0x20c)+_0x11c204+_0x2ef87d(0x1fb)+_0x2b24c4[_0x2ef87d(0x1f5)](_0x50f874=>'\x20\x20-\x20'+_0x50f874)[_0x2ef87d(0x208)]('\x0a'));return _0x2b24c4[0x0];}function a24_0x3caa(){const _0x1b69c7=['functions','delete','lockFilePath','\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a','Delete\x20a\x20BFF\x20script\x20from\x20remote\x20and\x20local','128EBMwBa','includes','remoteId','appCode','scriptsRoot','find','lastSync','str','1571904vWrdie','keys','BFF\x20lock\x20file\x20not\x20found.','join','bff','Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name','2459832roRUwp','Multiple\x20functions\x20match\x20\x22','5583312RHVuIJ','3698mRoLjE','\x20(local\x20file\x20moved\x20to\x20trash)','string','validation','3phLVXL','target','toISOString','1989095PUUDpl','scriptsRootDir','length','638692qLUiEw','trashDir','replace','1163190WvcjqY','No\x20lock\x20entry\x20found\x20for\x20\x22','projectRoot','high-risk-write','startsWith','map','Function\x20not\x20found:\x20','filter'];a24_0x3caa=function(){return _0x1b69c7;};return a24_0x3caa();}async function moveToTrash(_0x6497db,_0x436f71,_0x111c53){const _0x386dc2=a24_0x59db51,_0x38f47d=new Date()[_0x386dc2(0x214)]()[_0x386dc2(0x21a)](/[:.]/g,'-'),_0x42fd26=relative(_0x6497db,_0x111c53),_0x26530c=join(_0x436f71,_0x38f47d,_0x42fd26);return await mkdir(dirname(_0x26530c),{'recursive':!![]}),await rename(_0x111c53,_0x26530c),_0x26530c;}async function cleanupEmptyDirectories(_0x583431,_0x5bfb74){const _0x20d9ca=a24_0x59db51;let _0x22f968=resolve(_0x583431);const _0x99c132=resolve(_0x5bfb74);while(_0x22f968[_0x20d9ca(0x1f4)](''+_0x99c132+sep)||_0x22f968===_0x99c132){if(_0x22f968===_0x99c132)return;try{const _0x2409d2=await readdir(_0x22f968);if(_0x2409d2[_0x20d9ca(0x217)]>0x0)return;await rmdir(_0x22f968);}catch{return;}_0x22f968=dirname(_0x22f968);}}
1
+ function a24_0x322b(_0x2da71f,_0x1c1ceb){_0x2da71f=_0x2da71f-0x1bd;const _0x334004=a24_0x3340();let _0x322b13=_0x334004[_0x2da71f];return _0x322b13;}const a24_0x1211b9=a24_0x322b;(function(_0x529716,_0x2d76b5){const _0x2997ea=a24_0x322b,_0x29fe11=_0x529716();while(!![]){try{const _0x4b8114=parseInt(_0x2997ea(0x1e0))/0x1+-parseInt(_0x2997ea(0x1d4))/0x2+-parseInt(_0x2997ea(0x1bd))/0x3+parseInt(_0x2997ea(0x1d1))/0x4+-parseInt(_0x2997ea(0x1de))/0x5*(parseInt(_0x2997ea(0x1d3))/0x6)+parseInt(_0x2997ea(0x1cc))/0x7+parseInt(_0x2997ea(0x1df))/0x8;if(_0x4b8114===_0x2d76b5)break;else _0x29fe11['push'](_0x29fe11['shift']());}catch(_0x30f507){_0x29fe11['push'](_0x29fe11['shift']());}}}(a24_0x3340,0x63032));import{mkdir,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{deleteBffScript}from'../../core/api-client.js';function a24_0x3340(){const _0x1af1d8=['target','trashedTo','Delete\x20a\x20BFF\x20script\x20from\x20remote\x20and\x20local','POST','lockFilePath','2025663tEgWJK','lastSync','Deleted\x20','No\x20lock\x20entry\x20found\x20for\x20\x22','Multiple\x20functions\x20match\x20\x22','Would\x20delete\x20','validation','toISOString','keys','str','BFF\x20lock\x20file\x20not\x20found.','<timestamp>','trashDir','high-risk-write','appCode','4826213YnZVPi','join','\x20\x20-\x20','includes','projectRoot','1867116zDTunh','functions','24iYksza','854450aQzgGJ','length','delete','remoteId','/api/management/library/scripts/delete','string','\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a','\x20(local\x20file\x20moved\x20to\x20trash)','scriptsRoot','\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash','941145agkeQP','8613608pUllpJ','27977RrZwqE','scriptsRootDir'];a24_0x3340=function(){return _0x1af1d8;};return a24_0x3340();}import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists,resolveLocalFilePathFromLockKey}from'../../core/bff/file-system.js';import{ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';export const bffDelete={'service':'bff','command':a24_0x1211b9(0x1d6),'description':a24_0x1211b9(0x1e4),'risk':a24_0x1211b9(0x1ca),'flags':[{'name':a24_0x1211b9(0x1e2),'type':a24_0x1211b9(0x1d9),'required':!![],'description':'Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name'}],async 'validate'(_0x35a5d4){const _0x254448=a24_0x1211b9,_0x1dca2f=loadBffProjectConfig(_0x35a5d4[_0x254448(0x1cb)]),_0x2ee12d=await readBffLockFile(_0x1dca2f[_0x254448(0x1e6)]);if(!_0x2ee12d)throw CliErrors['validation']('BFF\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.');},async 'dryRun'(_0x425cc8){const _0xca0621=a24_0x1211b9,_0x494cfc=loadBffProjectConfig(_0x425cc8[_0xca0621(0x1cb)]),_0x5103a2=await readBffLockFile(_0x494cfc[_0xca0621(0x1e6)]);if(!_0x5103a2)throw CliErrors[_0xca0621(0x1c3)](_0xca0621(0x1c7));const {appLock:_0x26d149}=ensureLockScope(_0x5103a2,_0x425cc8[_0xca0621(0x1cb)],_0x494cfc['scriptsRoot'],'delete'),_0x40b41f=_0x425cc8['str'](_0xca0621(0x1e2)),_0x59cd59=Object[_0xca0621(0x1c5)](_0x26d149[_0xca0621(0x1d2)]),_0x5b81a1=resolveDeleteTarget(_0x40b41f,_0x59cd59),_0x38ad88=_0x26d149['functions'][_0x5b81a1];if(!_0x38ad88)throw CliErrors[_0xca0621(0x1c3)](_0xca0621(0x1c0)+_0x5b81a1+'\x22.');const _0x1f6a06=resolveLocalFilePathFromLockKey(_0x494cfc,_0x5b81a1),_0x226e43=relative(_0x494cfc[_0xca0621(0x1d0)],_0x1f6a06),_0x161beb=join(_0x494cfc[_0xca0621(0x1c9)],_0xca0621(0x1c8),_0x226e43);return{'method':_0xca0621(0x1e5),'url':_0xca0621(0x1d8),'body':{'appCode':_0x425cc8['appCode'],'target':_0x5b81a1,'remoteId':_0x38ad88[_0xca0621(0x1d7)],'localFilePath':_0x1f6a06,'trashedPath':_0x161beb},'description':_0xca0621(0x1c2)+_0x5b81a1+_0xca0621(0x1dd)};},async 'execute'(_0x1d7939){const _0x32a656=a24_0x1211b9,_0x1ca485=loadBffProjectConfig(_0x1d7939[_0x32a656(0x1cb)]),_0x301b87=await readBffLockFile(_0x1ca485[_0x32a656(0x1e6)]);if(!_0x301b87)throw CliErrors['validation']('BFF\x20lock\x20file\x20not\x20found.');const {lockData:_0x26b40a,appLock:_0x3d4481}=ensureLockScope(_0x301b87,_0x1d7939[_0x32a656(0x1cb)],_0x1ca485[_0x32a656(0x1dc)],_0x32a656(0x1d6)),_0x36b38b=_0x1d7939[_0x32a656(0x1c6)](_0x32a656(0x1e2)),_0x336813=Object[_0x32a656(0x1c5)](_0x3d4481['functions']),_0x486e0c=resolveDeleteTarget(_0x36b38b,_0x336813),_0x24161b=_0x3d4481[_0x32a656(0x1d2)][_0x486e0c];if(!_0x24161b)throw CliErrors[_0x32a656(0x1c3)](_0x32a656(0x1c0)+_0x486e0c+'\x22.');await deleteBffScript(_0x24161b[_0x32a656(0x1d7)]),delete _0x3d4481[_0x32a656(0x1d2)][_0x486e0c],_0x3d4481[_0x32a656(0x1be)]=new Date()['toISOString'](),await writeBffLockFile(_0x1ca485[_0x32a656(0x1e6)],_0x26b40a);const _0xf57bc3=resolveLocalFilePathFromLockKey(_0x1ca485,_0x486e0c);let _0x3818df;await fileExists(_0xf57bc3)&&(_0x3818df=await moveToTrash(_0x1ca485[_0x32a656(0x1d0)],_0x1ca485['trashDir'],_0xf57bc3),await cleanupEmptyDirectories(dirname(_0xf57bc3),_0x1ca485[_0x32a656(0x1e1)]));const _0x35dfe6={'deleted':_0x486e0c,'remoteId':_0x24161b[_0x32a656(0x1d7)]};if(_0x3818df)_0x35dfe6[_0x32a656(0x1e3)]=_0x3818df;return{'ok':!![],'data':_0x35dfe6,'message':_0x32a656(0x1bf)+_0x486e0c+(_0x3818df?_0x32a656(0x1db):'')};}};function resolveDeleteTarget(_0x44bb25,_0x331da){const _0x40175d=a24_0x1211b9;if(_0x44bb25[_0x40175d(0x1cf)]('/')){const _0x31a0d3=_0x331da['find'](_0x2ad247=>_0x2ad247===_0x44bb25);if(!_0x31a0d3)throw CliErrors['validation']('Function\x20not\x20found:\x20'+_0x44bb25);return _0x31a0d3;}const _0x65599f=_0x331da['filter'](_0x2cdd1a=>_0x2cdd1a['split']('/')['at'](-0x1)===_0x44bb25);if(_0x65599f[_0x40175d(0x1d5)]===0x0)throw CliErrors['validation']('Function\x20not\x20found:\x20'+_0x44bb25);if(_0x65599f[_0x40175d(0x1d5)]>0x1)throw CliErrors[_0x40175d(0x1c3)](_0x40175d(0x1c1)+_0x44bb25+_0x40175d(0x1da)+_0x65599f['map'](_0x2c5669=>_0x40175d(0x1ce)+_0x2c5669)[_0x40175d(0x1cd)]('\x0a'));return _0x65599f[0x0];}async function moveToTrash(_0x50d135,_0x154245,_0x5ae8c3){const _0x1137e8=a24_0x1211b9,_0x36cf02=new Date()[_0x1137e8(0x1c4)]()['replace'](/[:.]/g,'-'),_0x4ed418=relative(_0x50d135,_0x5ae8c3),_0x5501d5=join(_0x154245,_0x36cf02,_0x4ed418);return await mkdir(dirname(_0x5501d5),{'recursive':!![]}),await rename(_0x5ae8c3,_0x5501d5),_0x5501d5;}async function cleanupEmptyDirectories(_0x3a9dd8,_0x356d21){const _0x404e1d=a24_0x1211b9;let _0x2c75da=resolve(_0x3a9dd8);const _0x1261e0=resolve(_0x356d21);while(_0x2c75da['startsWith'](''+_0x1261e0+sep)||_0x2c75da===_0x1261e0){if(_0x2c75da===_0x1261e0)return;try{const _0x462e83=await readdir(_0x2c75da);if(_0x462e83[_0x404e1d(0x1d5)]>0x0)return;await rmdir(_0x2c75da);}catch{return;}_0x2c75da=dirname(_0x2c75da);}}
@@ -1 +1 @@
1
- const a25_0x5af64b=a25_0x306c;(function(_0x3729ea,_0x33e1ab){const _0x51438e=a25_0x306c,_0x38d5ca=_0x3729ea();while(!![]){try{const _0x96d204=-parseInt(_0x51438e(0x175))/0x1*(-parseInt(_0x51438e(0x169))/0x2)+-parseInt(_0x51438e(0x165))/0x3+parseInt(_0x51438e(0x16d))/0x4+-parseInt(_0x51438e(0x167))/0x5*(parseInt(_0x51438e(0x170))/0x6)+parseInt(_0x51438e(0x16e))/0x7*(parseInt(_0x51438e(0x16f))/0x8)+-parseInt(_0x51438e(0x179))/0x9*(parseInt(_0x51438e(0x172))/0xa)+parseInt(_0x51438e(0x177))/0xb;if(_0x96d204===_0x33e1ab)break;else _0x38d5ca['push'](_0x38d5ca['shift']());}catch(_0x3f7fba){_0x38d5ca['push'](_0x38d5ca['shift']());}}}(a25_0x48c5,0x7edfd));function a25_0x306c(_0x41d821,_0x516f98){_0x41d821=_0x41d821-0x165;const _0x48c556=a25_0x48c5();let _0x306c1c=_0x48c556[_0x41d821];return _0x306c1c;}function a25_0x48c5(){const _0x5834a7=['number','bool','boolean','410408QPoSUR','3203333rhGKRZ','8pbCGUb','1242CPAUEC','Script\x20ID','11150XJsxRX','detail','updatedTime','31WkGEgs','scriptContent','1015861tOEChv','verbose','549QRXbFu','1743798PetcJe','num','8705sAZLty','scriptType','56566PasNTj'];a25_0x48c5=function(){return _0x5834a7;};return a25_0x48c5();}import{getBffScriptInfo}from'../../core/api-client.js';export const bffDetail={'service':'bff','command':a25_0x5af64b(0x173),'description':'Get\x20BFF\x20script\x20details\x20by\x20ID','risk':'read','flags':[{'name':'id','type':a25_0x5af64b(0x16a),'required':!![],'description':a25_0x5af64b(0x171)},{'name':a25_0x5af64b(0x178),'type':a25_0x5af64b(0x16c),'description':'Return\x20full\x20raw\x20script\x20object'}],async 'execute'(_0x1403c5){const _0xeaf411=a25_0x5af64b,_0x34a4fd=await getBffScriptInfo(_0x1403c5[_0xeaf411(0x166)]('id')),_0x50bd91=_0x1403c5[_0xeaf411(0x16b)](_0xeaf411(0x178));if(_0x50bd91)return{'ok':!![],'data':_0x34a4fd};return{'ok':!![],'data':{'id':_0x34a4fd['id'],'appCode':_0x34a4fd['appCode'],'scriptType':_0x34a4fd[_0xeaf411(0x168)],'description':_0x34a4fd['description']||'(none)','createdTime':_0x34a4fd['createdTime']??'','updatedTime':_0x34a4fd[_0xeaf411(0x174)]??'','scriptContent':_0x34a4fd[_0xeaf411(0x176)]??''}};}};
1
+ function a25_0x2993(_0x5db510,_0x5e7652){_0x5db510=_0x5db510-0x11d;const _0x39d6e5=a25_0x39d6();let _0x2993be=_0x39d6e5[_0x5db510];return _0x2993be;}const a25_0x32017b=a25_0x2993;(function(_0x397322,_0x4e1140){const _0x1e4fe1=a25_0x2993,_0x4ec348=_0x397322();while(!![]){try{const _0x3ea302=parseInt(_0x1e4fe1(0x12e))/0x1+parseInt(_0x1e4fe1(0x125))/0x2+parseInt(_0x1e4fe1(0x11f))/0x3+-parseInt(_0x1e4fe1(0x130))/0x4+parseInt(_0x1e4fe1(0x121))/0x5*(-parseInt(_0x1e4fe1(0x11e))/0x6)+-parseInt(_0x1e4fe1(0x127))/0x7+parseInt(_0x1e4fe1(0x12d))/0x8;if(_0x3ea302===_0x4e1140)break;else _0x4ec348['push'](_0x4ec348['shift']());}catch(_0x262197){_0x4ec348['push'](_0x4ec348['shift']());}}}(a25_0x39d6,0xc8143));import{getBffScriptInfo}from'../../core/api-client.js';export const bffDetail={'service':'bff','command':a25_0x32017b(0x12f),'description':a25_0x32017b(0x12c),'risk':a25_0x32017b(0x128),'flags':[{'name':'id','type':a25_0x32017b(0x12b),'required':!![],'description':a25_0x32017b(0x124)},{'name':a25_0x32017b(0x11d),'type':a25_0x32017b(0x126),'description':a25_0x32017b(0x131)}],async 'execute'(_0x470718){const _0x47530e=a25_0x32017b,_0x5908f1=await getBffScriptInfo(_0x470718['num']('id')),_0x3e1804=_0x470718[_0x47530e(0x129)](_0x47530e(0x11d));if(_0x3e1804)return{'ok':!![],'data':_0x5908f1};return{'ok':!![],'data':{'id':_0x5908f1['id'],'appCode':_0x5908f1[_0x47530e(0x123)],'scriptType':_0x5908f1[_0x47530e(0x12a)],'description':_0x5908f1['description']||'(none)','createdTime':_0x5908f1[_0x47530e(0x120)]??'','updatedTime':_0x5908f1['updatedTime']??'','scriptContent':_0x5908f1[_0x47530e(0x122)]??''}};}};function a25_0x39d6(){const _0x24b9a9=['appCode','Script\x20ID','1242198hYRVjB','boolean','1251243bFDTya','read','bool','scriptType','number','Get\x20BFF\x20script\x20details\x20by\x20ID','5950608oZxJYB','642905dugWNd','detail','5179864CkkqQr','Return\x20full\x20raw\x20script\x20object','verbose','89142OBXTWq','4466475lvTPyq','createdTime','405aGwiCD','scriptContent'];a25_0x39d6=function(){return _0x24b9a9;};return a25_0x39d6();}
@@ -1 +1 @@
1
- (function(_0x44db71,_0x4da573){const _0x5640c9=a26_0x429a,_0x5c7833=_0x44db71();while(!![]){try{const _0x18f6f6=-parseInt(_0x5640c9(0x1df))/0x1+parseInt(_0x5640c9(0x1e1))/0x2+parseInt(_0x5640c9(0x1e0))/0x3*(-parseInt(_0x5640c9(0x1d9))/0x4)+-parseInt(_0x5640c9(0x1da))/0x5*(parseInt(_0x5640c9(0x1dd))/0x6)+parseInt(_0x5640c9(0x1de))/0x7+-parseInt(_0x5640c9(0x1dc))/0x8+parseInt(_0x5640c9(0x1db))/0x9;if(_0x18f6f6===_0x4da573)break;else _0x5c7833['push'](_0x5c7833['shift']());}catch(_0x2421ea){_0x5c7833['push'](_0x5c7833['shift']());}}}(a26_0x4529,0xd6ff4));import{bffList}from'./list.js';import{bffDetail}from'./detail.js';function a26_0x429a(_0x4cee78,_0x224f80){_0x4cee78=_0x4cee78-0x1d9;const _0x452953=a26_0x4529();let _0x429a4f=_0x452953[_0x4cee78];return _0x429a4f;}import{bffStatus}from'./status.js';import{bffNew}from'./new.js';import{bffPush}from'./push.js';function a26_0x4529(){const _0x169279=['315217fryuns','485883wBjfyj','1373310xuvxxL','20nOEoTf','10nPvbTP','22687794UgcGzR','8359704WMPRjE','2184960XRWrqM','3999884duDZYm'];a26_0x4529=function(){return _0x169279;};return a26_0x4529();}import{bffPull}from'./pull.js';import{bffDelete}from'./delete.js';export const bffDefinitions=[bffList,bffDetail,bffStatus,bffNew,bffPush,bffPull,bffDelete];
1
+ (function(_0x13da38,_0x585b00){const _0x5e29a1=a26_0x53f4,_0x23d64e=_0x13da38();while(!![]){try{const _0x16bb00=-parseInt(_0x5e29a1(0x1db))/0x1*(-parseInt(_0x5e29a1(0x1da))/0x2)+-parseInt(_0x5e29a1(0x1d7))/0x3*(-parseInt(_0x5e29a1(0x1de))/0x4)+parseInt(_0x5e29a1(0x1d5))/0x5*(-parseInt(_0x5e29a1(0x1d6))/0x6)+-parseInt(_0x5e29a1(0x1d9))/0x7+parseInt(_0x5e29a1(0x1df))/0x8*(parseInt(_0x5e29a1(0x1dd))/0x9)+parseInt(_0x5e29a1(0x1dc))/0xa+-parseInt(_0x5e29a1(0x1d8))/0xb;if(_0x16bb00===_0x585b00)break;else _0x23d64e['push'](_0x23d64e['shift']());}catch(_0xf08581){_0x23d64e['push'](_0x23d64e['shift']());}}}(a26_0x4be2,0x6020f));import{bffList}from'./list.js';import{bffDetail}from'./detail.js';import{bffStatus}from'./status.js';import{bffNew}from'./new.js';function a26_0x4be2(){const _0x452416=['3ARqaxd','1297560RpOtDn','5466643SSINgX','2WtgzdY','295378hqzUQM','2228190dVeLbw','1061514CtRlka','2932836PYWJcM','8XjzgSg','5gvQfnh','460200BhNaky'];a26_0x4be2=function(){return _0x452416;};return a26_0x4be2();}import{bffPush}from'./push.js';import{bffPull}from'./pull.js';function a26_0x53f4(_0x572eb6,_0x19c198){_0x572eb6=_0x572eb6-0x1d5;const _0x4be2e8=a26_0x4be2();let _0x53f4c8=_0x4be2e8[_0x572eb6];return _0x53f4c8;}import{bffDelete}from'./delete.js';export const bffDefinitions=[bffList,bffDetail,bffStatus,bffNew,bffPush,bffPull,bffDelete];
@@ -1 +1 @@
1
- function a27_0x5970(){const _0x40077c=['appCode','1624PNBfZM','6610800BHMFst','(unnamed)','ENDPOINT','Return\x20full\x20script\x20objects','1082696pYWEBz','Script\x20type\x20filter','type','COMMON','length','list','2789232CzrIEF','description','verbose','bool','16373AFfDLq','str','string','boolean','bff','name','Filter\x20by\x20script\x20name','No\x20BFF\x20scripts\x20found.','1507348SuCnnl','1055935eUKOdl','607848pQXPTR','map','scriptType','read'];a27_0x5970=function(){return _0x40077c;};return a27_0x5970();}function a27_0x2762(_0x232ce1,_0x591fdc){_0x232ce1=_0x232ce1-0x189;const _0x597061=a27_0x5970();let _0x276254=_0x597061[_0x232ce1];return _0x276254;}const a27_0x37659b=a27_0x2762;(function(_0x307a20,_0x3078ad){const _0x17c450=a27_0x2762,_0x1ec611=_0x307a20();while(!![]){try{const _0x3ed205=parseInt(_0x17c450(0x1a2))/0x1+parseInt(_0x17c450(0x190))/0x2+-parseInt(_0x17c450(0x196))/0x3+parseInt(_0x17c450(0x1a4))/0x4+parseInt(_0x17c450(0x1a3))/0x5+-parseInt(_0x17c450(0x18c))/0x6+-parseInt(_0x17c450(0x19a))/0x7*(-parseInt(_0x17c450(0x18b))/0x8);if(_0x3ed205===_0x3078ad)break;else _0x1ec611['push'](_0x1ec611['shift']());}catch(_0x408148){_0x1ec611['push'](_0x1ec611['shift']());}}}(a27_0x5970,0xd0c4e));import{listBffScripts}from'../../core/api-client.js';export const bffList={'service':a27_0x37659b(0x19e),'command':a27_0x37659b(0x195),'description':'List\x20BFF\x20scripts','risk':a27_0x37659b(0x189),'flags':[{'name':a27_0x37659b(0x192),'type':a27_0x37659b(0x19c),'description':a27_0x37659b(0x191),'default':a27_0x37659b(0x18e),'enum':[a27_0x37659b(0x18e),a27_0x37659b(0x193)]},{'name':a27_0x37659b(0x19f),'type':a27_0x37659b(0x19c),'description':a27_0x37659b(0x1a0)},{'name':a27_0x37659b(0x198),'type':a27_0x37659b(0x19d),'description':a27_0x37659b(0x18f)}],async 'execute'(_0x146293){const _0x1c652e=a27_0x37659b,_0x11fa7f=await listBffScripts(_0x146293[_0x1c652e(0x18a)],_0x146293[_0x1c652e(0x19b)](_0x1c652e(0x192)),{'scriptName':_0x146293[_0x1c652e(0x19b)]('name')||undefined}),_0x57980d=_0x146293[_0x1c652e(0x199)](_0x1c652e(0x198));return{'ok':!![],'data':_0x57980d?_0x11fa7f:_0x11fa7f[_0x1c652e(0x1a5)](_0x1d1e2c=>({'id':_0x1d1e2c['id'],'functionName':_0x1d1e2c['functionName']??'','description':_0x1d1e2c[_0x1c652e(0x197)]||_0x1c652e(0x18d),'scriptType':_0x1d1e2c[_0x1c652e(0x1a6)]})),'message':_0x11fa7f[_0x1c652e(0x194)]===0x0?_0x1c652e(0x1a1):undefined};}};
1
+ const a27_0xbaffdc=a27_0x52cd;(function(_0x1883f7,_0x2390a9){const _0x54da2b=a27_0x52cd,_0x2b1a9e=_0x1883f7();while(!![]){try{const _0x59ea90=-parseInt(_0x54da2b(0x189))/0x1+-parseInt(_0x54da2b(0x18d))/0x2+parseInt(_0x54da2b(0x17f))/0x3*(-parseInt(_0x54da2b(0x172))/0x4)+-parseInt(_0x54da2b(0x181))/0x5*(parseInt(_0x54da2b(0x180))/0x6)+-parseInt(_0x54da2b(0x18e))/0x7*(parseInt(_0x54da2b(0x187))/0x8)+parseInt(_0x54da2b(0x178))/0x9*(-parseInt(_0x54da2b(0x173))/0xa)+parseInt(_0x54da2b(0x184))/0xb*(parseInt(_0x54da2b(0x17e))/0xc);if(_0x59ea90===_0x2390a9)break;else _0x2b1a9e['push'](_0x2b1a9e['shift']());}catch(_0x2ea94c){_0x2b1a9e['push'](_0x2b1a9e['shift']());}}}(a27_0x1328,0x66d29));function a27_0x52cd(_0x433a7d,_0x1ab10d){_0x433a7d=_0x433a7d-0x172;const _0x1328d3=a27_0x1328();let _0x52cde8=_0x1328d3[_0x433a7d];return _0x52cde8;}import{listBffScripts}from'../../core/api-client.js';export const bffList={'service':a27_0xbaffdc(0x18f),'command':a27_0xbaffdc(0x183),'description':a27_0xbaffdc(0x18c),'risk':a27_0xbaffdc(0x186),'flags':[{'name':a27_0xbaffdc(0x182),'type':a27_0xbaffdc(0x176),'description':a27_0xbaffdc(0x18a),'default':a27_0xbaffdc(0x17a),'enum':['ENDPOINT',a27_0xbaffdc(0x174)]},{'name':a27_0xbaffdc(0x177),'type':a27_0xbaffdc(0x176),'description':a27_0xbaffdc(0x18b)},{'name':'verbose','type':'boolean','description':a27_0xbaffdc(0x17c)}],async 'execute'(_0x3bc191){const _0x56fdcb=a27_0xbaffdc,_0x1e3cc4=await listBffScripts(_0x3bc191['appCode'],_0x3bc191[_0x56fdcb(0x17d)]('type'),{'scriptName':_0x3bc191[_0x56fdcb(0x17d)]('name')||undefined}),_0x543704=_0x3bc191[_0x56fdcb(0x188)](_0x56fdcb(0x179));return{'ok':!![],'data':_0x543704?_0x1e3cc4:_0x1e3cc4[_0x56fdcb(0x185)](_0x2f3bd4=>({'id':_0x2f3bd4['id'],'functionName':_0x2f3bd4['functionName']??'','description':_0x2f3bd4['description']||_0x56fdcb(0x17b),'scriptType':_0x2f3bd4['scriptType']})),'message':_0x1e3cc4[_0x56fdcb(0x175)]===0x0?_0x56fdcb(0x190):undefined};}};function a27_0x1328(){const _0x5f3c12=['read','284432nZWjrb','bool','302387sNWWtf','Script\x20type\x20filter','Filter\x20by\x20script\x20name','List\x20BFF\x20scripts','398714FLTPPF','56jcVvSV','bff','No\x20BFF\x20scripts\x20found.','372MrqPpo','10BGjgDj','COMMON','length','string','name','4580262kAbltf','verbose','ENDPOINT','(unnamed)','Return\x20full\x20script\x20objects','str','6225108kAbozF','10113OGZcwn','6UCHJLl','226390OTXQGQ','type','list','44yTSGgv','map'];a27_0x1328=function(){return _0x5f3c12;};return a27_0x1328();}
@@ -1 +1 @@
1
- const a28_0x184081=a28_0x5d59;(function(_0x59b733,_0x4eea35){const _0x20fba8=a28_0x5d59,_0x5e9529=_0x59b733();while(!![]){try{const _0x2c1425=-parseInt(_0x20fba8(0x194))/0x1+-parseInt(_0x20fba8(0x188))/0x2*(-parseInt(_0x20fba8(0x1b0))/0x3)+parseInt(_0x20fba8(0x180))/0x4*(-parseInt(_0x20fba8(0x196))/0x5)+-parseInt(_0x20fba8(0x19e))/0x6*(parseInt(_0x20fba8(0x1c0))/0x7)+-parseInt(_0x20fba8(0x187))/0x8+parseInt(_0x20fba8(0x1a9))/0x9*(-parseInt(_0x20fba8(0x1a8))/0xa)+parseInt(_0x20fba8(0x1ba))/0xb;if(_0x2c1425===_0x4eea35)break;else _0x5e9529['push'](_0x5e9529['shift']());}catch(_0x469b5f){_0x5e9529['push'](_0x5e9529['shift']());}}}(a28_0x2957,0xe8154));import{createInterface}from'node:readline';import{mkdir,writeFile}from'node:fs/promises';import{dirname,join}from'node:path';function a28_0x5d59(_0x39694f,_0x1e657f){_0x39694f=_0x39694f-0x175;const _0x29576a=a28_0x2957();let _0x5d5939=_0x29576a[_0x39694f];return _0x5d5939;}import{listDatasets,listBffDatasetOperations}from'../../core/api-client.js';import{loadAliasMap,resolveAlias}from'../../core/alias-resolver.js';function a28_0x2957(){const _0x5cc5cd=['9lWiZlr','Invalid\x20dataset\x20selection.','Created\x20','join','\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/COMMON/','\x22\x20not\x20found\x20for\x20dataset\x20','operation-type','COMMON','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','Operation\x20type\x20(HOOK\x20only)','53941206pAWlNR','--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','\x20api\x20pull`\x20to\x20refresh.','bff','Select\x20operation\x20type:','includes','11060yluTOx','.js\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20-\x20Input\x20parameters.\x0a\x20*\x20@param\x20{Object}\x20context\x20-\x20Execution\x20context\x20(injected\x20by\x20platform).\x0a\x20*\x20@returns\x20{Promise<Object>}\x20Processing\x20result.\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20','datasetcode','tableName','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','apiDir','keys','(params,\x20context)\x20{\x0a\x20\x20void\x20context;\x0a\x20\x20return\x20params;\x0a}\x0a','\x22\x20not\x20found.\x20','.js','--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','after','length','\x0a\x20*\x20[脚本名称]\x20','/endpoint/','map','type','\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20','str','trim','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','Available\x20aliases:\x20','\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).','The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`','function-node','8GbRkFe','ENDPOINT','parseInt','name','\x20function:\x20','question','isInteger','7177016mZAeQq','487382xOTLkT','HOOK','scriptsRootDir','--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.','Trigger\x20node\x20(HOOK\x20only)','stdin','find','before','validation','\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.','code','operationType','823112EUEJog','Function\x20name\x20(valid\x20JS\x20identifier)','2753295VxrtGO','Dataset\x20not\x20found\x20for\x20code\x20\x22','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.','appCode','description','/**\x0a\x20*\x20HOOK\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','Scaffold\x20a\x20new\x20BFF\x20function\x20from\x20template','close','4314NdiVXE','/**\x0a\x20*\x20COMMON\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','datasetCode','Script\x20description','File\x20already\x20exists:\x20','No\x20operation\x20types\x20found\x20for\x20dataset\x20','alias','nonInteractive','functionNode','TODO:\x20add\x20script\x20description','7266300BiPvIl','9bgaRdf','\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20-\x20Request\x20parameters.\x0a\x20*\x20@param\x20{Object}\x20context\x20-\x20Execution\x20context\x20(injected\x20by\x20platform).\x0a\x20*\x20@returns\x20{Promise<Object>}\x20Business\x20result\x20(wrapped\x20in\x20response.data).\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20','utf8','string','write','stderr','Operation\x20type\x20\x22'];a28_0x2957=function(){return _0x5cc5cd;};return a28_0x2957();}import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists}from'../../core/bff/file-system.js';import{isValidBffFunctionName,normalizeHookFunctionNode}from'../../core/bff/utils.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const bffNew={'service':a28_0x184081(0x1bd),'command':'new','description':a28_0x184081(0x19c),'risk':a28_0x184081(0x1ad),'flags':[{'name':a28_0x184081(0x177),'type':a28_0x184081(0x1ac),'required':!![],'enum':[a28_0x184081(0x1b7),a28_0x184081(0x181),'HOOK'],'description':'Script\x20type'},{'name':a28_0x184081(0x183),'type':a28_0x184081(0x1ac),'required':!![],'description':a28_0x184081(0x195)},{'name':a28_0x184081(0x19a),'type':a28_0x184081(0x1ac),'description':a28_0x184081(0x1a1)},{'name':a28_0x184081(0x1a4),'type':'string','description':a28_0x184081(0x1b8)},{'name':a28_0x184081(0x1c2),'type':a28_0x184081(0x1ac),'description':a28_0x184081(0x17b)},{'name':a28_0x184081(0x1b6),'type':a28_0x184081(0x1ac),'description':a28_0x184081(0x1b9)},{'name':a28_0x184081(0x17f),'type':a28_0x184081(0x1ac),'description':a28_0x184081(0x18c),'enum':[a28_0x184081(0x18f),'after']}],async 'validate'(_0x196a19){const _0x10ac01=a28_0x184081,_0x3c56e4=_0x196a19[_0x10ac01(0x179)](_0x10ac01(0x183));if(!isValidBffFunctionName(_0x3c56e4))throw CliErrors['validation']('Invalid\x20function\x20name\x20\x22'+_0x3c56e4+_0x10ac01(0x17d));},async 'execute'(_0x4e4c39){const _0xc95f76=a28_0x184081,_0x59892a=loadBffProjectConfig(_0x4e4c39[_0xc95f76(0x199)]),_0x344915=_0x4e4c39[_0xc95f76(0x179)]('type'),_0x4be0e3=_0x4e4c39['str'](_0xc95f76(0x183)),_0x4f8939=_0x4e4c39['str'](_0xc95f76(0x19a))||undefined,_0x358931=_0x344915===_0xc95f76(0x189)?await resolveHookOptions(_0x59892a,_0x4e4c39):undefined,_0x415d14=buildFilePath(_0x59892a,_0x344915,_0x4be0e3,_0x358931);if(await fileExists(_0x415d14))throw CliErrors[_0xc95f76(0x190)](_0xc95f76(0x1a2)+_0x415d14);await mkdir(dirname(_0x415d14),{'recursive':!![]});const _0x5f3590=generateTemplate(_0x344915,_0x4be0e3,_0x59892a,_0x4f8939,_0x358931);await writeFile(_0x415d14,_0x5f3590,_0xc95f76(0x1ab));const _0x105e8d={'type':_0x344915,'name':_0x4be0e3,'path':_0x415d14};if(_0x4f8939)_0x105e8d[_0xc95f76(0x19a)]=_0x4f8939;if(_0x358931){if(_0x358931['alias'])_0x105e8d[_0xc95f76(0x1a4)]=_0x358931[_0xc95f76(0x1a4)];_0x105e8d[_0xc95f76(0x1a0)]=_0x358931[_0xc95f76(0x1a0)],_0x105e8d[_0xc95f76(0x193)]=_0x358931[_0xc95f76(0x193)],_0x105e8d[_0xc95f76(0x1a6)]=_0x358931[_0xc95f76(0x1a6)];}return{'ok':!![],'data':_0x105e8d,'message':_0xc95f76(0x1b2)+_0x344915+_0xc95f76(0x184)+_0x4be0e3};}};async function resolveHookOptions(_0x2700ce,_0x348895){const _0x4eb0ae=a28_0x184081,_0x5d58cc=loadAliasMap(_0x348895[_0x4eb0ae(0x1c5)]),_0x2870cb=_0x5d58cc[_0x4eb0ae(0x1cc)]>0x0;let _0x3161a2,_0x1d0b0d,_0x258420;const _0x512724=_0x348895[_0x4eb0ae(0x179)](_0x4eb0ae(0x1a4)),_0x37dac4=_0x348895['str'](_0x4eb0ae(0x1c2));if(_0x512724){const _0x201c7c=resolveAlias(_0x348895['apiDir'],_0x512724);if(!_0x201c7c){const _0xf60f2c=_0x2870cb?_0x4eb0ae(0x17c)+_0x5d58cc[_0x4eb0ae(0x176)](_0x5bcd9a=>_0x5bcd9a['alias'])[_0x4eb0ae(0x1b3)](',\x20'):'No\x20api.ts\x20found.\x20Run\x20`'+CLI_BIN_NAME+_0x4eb0ae(0x191);throw CliErrors[_0x4eb0ae(0x190)]('Alias\x20\x22'+_0x512724+_0x4eb0ae(0x1c8)+_0xf60f2c);}_0x3161a2=_0x512724,_0x1d0b0d=_0x201c7c;}else{if(_0x37dac4){_0x1d0b0d=_0x37dac4;const _0x12a33c=_0x5d58cc[_0x4eb0ae(0x18e)](_0x3e8e4f=>_0x3e8e4f[_0x4eb0ae(0x1a0)]===_0x37dac4);_0x3161a2=_0x12a33c?.[_0x4eb0ae(0x1a4)];}else{if(_0x348895[_0x4eb0ae(0x1a5)])throw CliErrors['validation'](_0x4eb0ae(0x1ca));else{if(_0x2870cb){const _0x43f117=_0x5d58cc['map'](_0x47b719=>_0x47b719[_0x4eb0ae(0x1a4)]+'\x20('+_0x47b719[_0x4eb0ae(0x1c3)]+')'),_0x3f1ad7=await promptSelect('Select\x20dataset:',_0x43f117),_0x5e3a68=_0x5d58cc[_0x3f1ad7];if(!_0x5e3a68)throw CliErrors[_0x4eb0ae(0x190)](_0x4eb0ae(0x1b1));_0x3161a2=_0x5e3a68[_0x4eb0ae(0x1a4)],_0x1d0b0d=_0x5e3a68['datasetCode'];}else{const _0x350cfa=await listDatasets(_0x2700ce['appCode']);if(_0x350cfa[_0x4eb0ae(0x1cc)]===0x0)throw CliErrors[_0x4eb0ae(0x190)]('No\x20datasets\x20found\x20for\x20this\x20app.');const _0x3c60c0=_0x350cfa[_0x4eb0ae(0x176)](_0x36fab7=>_0x36fab7[_0x4eb0ae(0x183)]+'\x20('+_0x36fab7[_0x4eb0ae(0x192)]+')'),_0x587fab=await promptSelect('Select\x20dataset:',_0x3c60c0),_0x505e2c=_0x350cfa[_0x587fab];if(!_0x505e2c)throw CliErrors[_0x4eb0ae(0x190)](_0x4eb0ae(0x1b1));_0x1d0b0d=_0x505e2c[_0x4eb0ae(0x192)],_0x3161a2=undefined;}}}}const _0x4a00aa=await listDatasets(_0x2700ce['appCode']),_0x345218=_0x4a00aa[_0x4eb0ae(0x18e)](_0x530f54=>_0x530f54[_0x4eb0ae(0x192)]===_0x1d0b0d);if(!_0x345218)throw CliErrors[_0x4eb0ae(0x190)](_0x4eb0ae(0x197)+_0x1d0b0d+'\x22.\x20'+(_0x3161a2?_0x4eb0ae(0x17e)+CLI_BIN_NAME+_0x4eb0ae(0x1bc):''));_0x258420=_0x345218['id'];const _0x2d877b=_0x3161a2??_0x1d0b0d,_0x4addaa=await listBffDatasetOperations(_0x2700ce[_0x4eb0ae(0x199)],_0x258420),_0x38599b=_0x4addaa?Object[_0x4eb0ae(0x1c6)](_0x4addaa):[];if(_0x38599b['length']===0x0)throw CliErrors['validation'](_0x4eb0ae(0x1a3)+_0x2d877b+'.');let _0x563cc5;const _0x33b1eb=_0x348895[_0x4eb0ae(0x179)](_0x4eb0ae(0x1b6));if(_0x33b1eb){if(!_0x38599b[_0x4eb0ae(0x1bf)](_0x33b1eb))throw CliErrors[_0x4eb0ae(0x190)](_0x4eb0ae(0x1af)+_0x33b1eb+_0x4eb0ae(0x1b5)+_0x2d877b+'.\x20'+('Available:\x20'+_0x38599b['join'](',\x20')));_0x563cc5=_0x33b1eb;}else{if(_0x348895[_0x4eb0ae(0x1a5)])throw CliErrors[_0x4eb0ae(0x190)](_0x4eb0ae(0x1bb));const _0xefbc29=await promptSelect(_0x4eb0ae(0x1be),_0x38599b);_0x563cc5=_0x38599b[_0xefbc29]??_0x38599b[0x0];}let _0x3d9e7b=normalizeHookFunctionNode(_0x348895[_0x4eb0ae(0x179)](_0x4eb0ae(0x17f)));if(!_0x3d9e7b){if(_0x348895[_0x4eb0ae(0x179)]('function-node'))throw CliErrors[_0x4eb0ae(0x190)](_0x4eb0ae(0x18b));if(_0x348895[_0x4eb0ae(0x1a5)])throw CliErrors[_0x4eb0ae(0x190)]('--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');const _0x30220c=await promptSelect('Select\x20trigger\x20node:',[_0x4eb0ae(0x18f),_0x4eb0ae(0x1cb)]);_0x3d9e7b=['before',_0x4eb0ae(0x1cb)][_0x30220c]??_0x4eb0ae(0x18f);}return{'alias':_0x3161a2,'datasetCode':_0x1d0b0d,'datasetId':_0x258420,'operationType':_0x563cc5,'functionNode':_0x3d9e7b};}async function promptSelect(_0x2ee623,_0x2aabe1){const _0x593678=a28_0x184081;if(_0x2aabe1[_0x593678(0x1cc)]===0x1)return 0x0;for(const [_0x1a7657,_0x40f478]of _0x2aabe1['entries']()){process[_0x593678(0x1ae)][_0x593678(0x1ad)]('\x20\x20'+(_0x1a7657+0x1)+'.\x20'+_0x40f478+'\x0a');}const _0x29281b=createInterface({'input':process[_0x593678(0x18d)],'output':process[_0x593678(0x1ae)]});while(!![]){const _0x171411=await new Promise(_0x1436b1=>{const _0x4091f7=_0x593678;_0x29281b[_0x4091f7(0x185)](_0x2ee623+'\x20',_0x1436b1);}),_0x31899f=Number[_0x593678(0x182)](_0x171411[_0x593678(0x17a)](),0xa);if(Number[_0x593678(0x186)](_0x31899f)&&_0x31899f>=0x1&&_0x31899f<=_0x2aabe1['length'])return _0x29281b[_0x593678(0x19d)](),_0x31899f-0x1;process[_0x593678(0x1ae)][_0x593678(0x1ad)](_0x593678(0x178)+_0x2aabe1[_0x593678(0x1cc)]+'.\x0a');}}function buildFilePath(_0x443b1b,_0x2cb307,_0x49e1c8,_0x452460){const _0x450815=a28_0x184081;if(_0x2cb307==='HOOK'){if(!_0x452460)throw CliErrors[_0x450815(0x190)]('HOOK\x20requires\x20alias/operation/node\x20options.');const _0xeff7b4=_0x452460[_0x450815(0x1a4)]??_0x452460[_0x450815(0x1a0)];return join(_0x443b1b[_0x450815(0x18a)],'HOOK',_0xeff7b4,_0x452460[_0x450815(0x193)],_0x452460[_0x450815(0x1a6)],_0x49e1c8+_0x450815(0x1c9));}return join(_0x443b1b['scriptsRootDir'],_0x2cb307,_0x49e1c8+_0x450815(0x1c9));}function generateTemplate(_0x947f07,_0xef5e17,_0x874910,_0x299d40,_0x40df5e){const _0x5910d8=a28_0x184081,_0x5c6f73=_0x299d40?.[_0x5910d8(0x17a)]()||_0x5910d8(0x1a7);if(_0x947f07===_0x5910d8(0x1b7))return _0x5910d8(0x19f)+_0x5c6f73+_0x5910d8(0x1cd)+_0xef5e17+_0x5910d8(0x1b4)+_0xef5e17+_0x5910d8(0x1c1)+_0xef5e17+_0x5910d8(0x1c7);if(_0x947f07==='ENDPOINT')return'/**\x0a\x20*\x20ENDPOINT\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20'+_0x5c6f73+_0x5910d8(0x1c4)+_0x874910[_0x5910d8(0x199)]+_0x5910d8(0x175)+_0xef5e17+_0x5910d8(0x1aa)+_0xef5e17+_0x5910d8(0x1c7);if(!_0x40df5e)throw CliErrors[_0x5910d8(0x190)](_0x5910d8(0x198));return _0x5910d8(0x19b)+_0x5c6f73+_0x5910d8(0x1c4)+_0x874910[_0x5910d8(0x199)]+'/'+_0x40df5e[_0x5910d8(0x1a0)]+'/'+_0x40df5e[_0x5910d8(0x193)]+'\x0a\x20*\x20[触发节点]\x20'+_0x40df5e[_0x5910d8(0x1a6)]+'\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20-\x20Current\x20request\x20params\x20or\x20response\x20result.\x0a\x20*\x20@param\x20{Object}\x20context\x20-\x20Execution\x20context\x20(injected\x20by\x20platform).\x0a\x20*\x20@returns\x20{Promise<Object>}\x20Modified\x20params\x20object.\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20'+_0xef5e17+_0x5910d8(0x1c7);}
1
+ const a28_0x127b35=a28_0x43ab;(function(_0x1ba5fc,_0x4b1f98){const _0xf02912=a28_0x43ab,_0x485421=_0x1ba5fc();while(!![]){try{const _0x35c06f=parseInt(_0xf02912(0xa4))/0x1+parseInt(_0xf02912(0xad))/0x2+-parseInt(_0xf02912(0x9e))/0x3+parseInt(_0xf02912(0x99))/0x4+-parseInt(_0xf02912(0x6f))/0x5*(parseInt(_0xf02912(0x97))/0x6)+parseInt(_0xf02912(0xa3))/0x7*(-parseInt(_0xf02912(0xb9))/0x8)+parseInt(_0xf02912(0xb3))/0x9*(parseInt(_0xf02912(0xb2))/0xa);if(_0x35c06f===_0x4b1f98)break;else _0x485421['push'](_0x485421['shift']());}catch(_0x4589e2){_0x485421['push'](_0x485421['shift']());}}}(a28_0x100c,0xc7876));import{createInterface}from'node:readline';import{mkdir,writeFile}from'node:fs/promises';import{dirname,join}from'node:path';import{listDatasets,listBffDatasetOperations}from'../../core/api-client.js';import{loadAliasMap,resolveAlias}from'../../core/alias-resolver.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists}from'../../core/bff/file-system.js';import{isValidBffFunctionName,normalizeHookFunctionNode}from'../../core/bff/utils.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const bffNew={'service':a28_0x127b35(0xb0),'command':'new','description':a28_0x127b35(0x77),'risk':'write','flags':[{'name':a28_0x127b35(0x92),'type':a28_0x127b35(0xa0),'required':!![],'enum':['COMMON',a28_0x127b35(0x80),a28_0x127b35(0x7d)],'description':a28_0x127b35(0x84)},{'name':a28_0x127b35(0x68),'type':a28_0x127b35(0xa0),'required':!![],'description':a28_0x127b35(0x85)},{'name':'description','type':'string','description':a28_0x127b35(0x8b)},{'name':a28_0x127b35(0x74),'type':a28_0x127b35(0xa0),'description':'Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)'},{'name':a28_0x127b35(0xa7),'type':a28_0x127b35(0xa0),'description':a28_0x127b35(0x8a)},{'name':'operation-type','type':a28_0x127b35(0xa0),'description':a28_0x127b35(0xa1)},{'name':a28_0x127b35(0xbc),'type':a28_0x127b35(0xa0),'description':a28_0x127b35(0x8c),'enum':[a28_0x127b35(0xb6),a28_0x127b35(0x9d)]}],async 'validate'(_0x1661a2){const _0x2be73c=a28_0x127b35,_0x5e8255=_0x1661a2[_0x2be73c(0x89)](_0x2be73c(0x68));if(!isValidBffFunctionName(_0x5e8255))throw CliErrors[_0x2be73c(0xa5)](_0x2be73c(0x86)+_0x5e8255+'\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).');},async 'execute'(_0x4bb73b){const _0x3e6db4=a28_0x127b35,_0x10d30f=loadBffProjectConfig(_0x4bb73b[_0x3e6db4(0xae)]),_0x191ec8=_0x4bb73b[_0x3e6db4(0x89)](_0x3e6db4(0x92)),_0x8c3175=_0x4bb73b[_0x3e6db4(0x89)]('name'),_0x3b1ab7=_0x4bb73b[_0x3e6db4(0x89)](_0x3e6db4(0xb4))||undefined,_0x30206e=_0x191ec8===_0x3e6db4(0x7d)?await resolveHookOptions(_0x10d30f,_0x4bb73b):undefined,_0x303939=buildFilePath(_0x10d30f,_0x191ec8,_0x8c3175,_0x30206e);if(await fileExists(_0x303939))throw CliErrors['validation']('File\x20already\x20exists:\x20'+_0x303939);await mkdir(dirname(_0x303939),{'recursive':!![]});const _0x3923ea=generateTemplate(_0x191ec8,_0x8c3175,_0x4bb73b[_0x3e6db4(0xae)],_0x3b1ab7,_0x30206e);await writeFile(_0x303939,_0x3923ea,_0x3e6db4(0xac));const _0x191d52={'type':_0x191ec8,'name':_0x8c3175,'path':_0x303939};if(_0x3b1ab7)_0x191d52[_0x3e6db4(0xb4)]=_0x3b1ab7;if(_0x30206e){if(_0x30206e[_0x3e6db4(0x74)])_0x191d52['alias']=_0x30206e[_0x3e6db4(0x74)];_0x191d52[_0x3e6db4(0xa2)]=_0x30206e[_0x3e6db4(0xa2)],_0x191d52[_0x3e6db4(0x9f)]=_0x30206e[_0x3e6db4(0x9f)],_0x191d52[_0x3e6db4(0xa6)]=_0x30206e[_0x3e6db4(0xa6)];}return{'ok':!![],'data':_0x191d52,'message':_0x3e6db4(0x73)+_0x191ec8+_0x3e6db4(0xa9)+_0x8c3175};}};async function resolveHookOptions(_0x2ee1ce,_0x5c051b){const _0x23d13e=a28_0x127b35,_0x3ff6f9=loadAliasMap(_0x5c051b[_0x23d13e(0xbb)],_0x5c051b['appCode']),_0x59bdbf=_0x3ff6f9[_0x23d13e(0x91)]>0x0;let _0x1b3d00,_0x389fae,_0x4bf55f;const _0x3b1f12=_0x5c051b[_0x23d13e(0x89)](_0x23d13e(0x74)),_0x2f93ad=_0x5c051b[_0x23d13e(0x89)]('datasetcode');if(_0x3b1f12){const _0x2ee29a=resolveAlias(_0x5c051b[_0x23d13e(0xbb)],_0x3b1f12,_0x5c051b[_0x23d13e(0xae)]);if(!_0x2ee29a){const _0x1f462a=_0x59bdbf?'Available\x20aliases:\x20'+_0x3ff6f9['map'](_0x36f6ef=>_0x36f6ef[_0x23d13e(0x74)])[_0x23d13e(0x8e)](',\x20'):'No\x20api.ts\x20found.\x20Run\x20`'+CLI_BIN_NAME+_0x23d13e(0xab);throw CliErrors[_0x23d13e(0xa5)](_0x23d13e(0xb5)+_0x3b1f12+_0x23d13e(0x6e)+_0x1f462a);}_0x1b3d00=_0x3b1f12,_0x389fae=_0x2ee29a;}else{if(_0x2f93ad){_0x389fae=_0x2f93ad;const _0x571f1d=_0x3ff6f9[_0x23d13e(0x93)](_0x26ac52=>_0x26ac52[_0x23d13e(0xa2)]===_0x2f93ad);_0x1b3d00=_0x571f1d?.[_0x23d13e(0x74)];}else{if(_0x5c051b[_0x23d13e(0x8f)])throw CliErrors[_0x23d13e(0xa5)](_0x23d13e(0x7c));else{if(_0x59bdbf){const _0x1f744a=_0x3ff6f9[_0x23d13e(0x7e)](_0x44c7a6=>_0x44c7a6[_0x23d13e(0x74)]+'\x20('+_0x44c7a6[_0x23d13e(0x81)]+')'),_0x252e7f=await promptSelect(_0x23d13e(0x67),_0x1f744a),_0x2d4d52=_0x3ff6f9[_0x252e7f];if(!_0x2d4d52)throw CliErrors['validation'](_0x23d13e(0x9c));_0x1b3d00=_0x2d4d52['alias'],_0x389fae=_0x2d4d52[_0x23d13e(0xa2)];}else{const _0xd581d9=await listDatasets(_0x5c051b[_0x23d13e(0xae)]);if(_0xd581d9[_0x23d13e(0x91)]===0x0)throw CliErrors['validation'](_0x23d13e(0x79));const _0x532004=_0xd581d9[_0x23d13e(0x7e)](_0x3bf5c7=>_0x3bf5c7[_0x23d13e(0x68)]+'\x20('+_0x3bf5c7[_0x23d13e(0xb7)]+')'),_0x11bea2=await promptSelect('Select\x20dataset:',_0x532004),_0xa6ea46=_0xd581d9[_0x11bea2];if(!_0xa6ea46)throw CliErrors[_0x23d13e(0xa5)]('Invalid\x20dataset\x20selection.');_0x389fae=_0xa6ea46['code'],_0x1b3d00=undefined;}}}}const _0x597ecb=await listDatasets(_0x5c051b[_0x23d13e(0xae)]),_0x9030bb=_0x597ecb[_0x23d13e(0x93)](_0x133339=>_0x133339[_0x23d13e(0xb7)]===_0x389fae);if(!_0x9030bb)throw CliErrors[_0x23d13e(0xa5)]('Dataset\x20not\x20found\x20for\x20code\x20\x22'+_0x389fae+_0x23d13e(0x69)+(_0x1b3d00?_0x23d13e(0x98)+CLI_BIN_NAME+'\x20api\x20pull`\x20to\x20refresh.':''));_0x4bf55f=_0x9030bb['id'];const _0x5c54b1=_0x1b3d00??_0x389fae,_0x30f70f=await listBffDatasetOperations(_0x5c051b[_0x23d13e(0xae)],_0x4bf55f),_0x48be3f=_0x30f70f?Object[_0x23d13e(0x7a)](_0x30f70f):[];if(_0x48be3f[_0x23d13e(0x91)]===0x0)throw CliErrors[_0x23d13e(0xa5)]('No\x20operation\x20types\x20found\x20for\x20dataset\x20'+_0x5c54b1+'.');let _0x2be882;const _0x159537=_0x5c051b[_0x23d13e(0x89)](_0x23d13e(0x6a));if(_0x159537){if(!_0x48be3f['includes'](_0x159537))throw CliErrors[_0x23d13e(0xa5)](_0x23d13e(0xbd)+_0x159537+_0x23d13e(0x6d)+_0x5c54b1+'.\x20'+(_0x23d13e(0x90)+_0x48be3f[_0x23d13e(0x8e)](',\x20')));_0x2be882=_0x159537;}else{if(_0x5c051b[_0x23d13e(0x8f)])throw CliErrors[_0x23d13e(0xa5)]('--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');const _0x1c7eb6=await promptSelect(_0x23d13e(0xba),_0x48be3f);_0x2be882=_0x48be3f[_0x1c7eb6]??_0x48be3f[0x0];}let _0x306b59=normalizeHookFunctionNode(_0x5c051b[_0x23d13e(0x89)](_0x23d13e(0xbc)));if(!_0x306b59){if(_0x5c051b[_0x23d13e(0x89)](_0x23d13e(0xbc)))throw CliErrors['validation'](_0x23d13e(0x96));if(_0x5c051b['nonInteractive'])throw CliErrors['validation'](_0x23d13e(0x6b));const _0x5e8ea9=await promptSelect('Select\x20trigger\x20node:',['before',_0x23d13e(0x9d)]);_0x306b59=[_0x23d13e(0xb6),_0x23d13e(0x9d)][_0x5e8ea9]??_0x23d13e(0xb6);}return{'alias':_0x1b3d00,'datasetCode':_0x389fae,'datasetId':_0x4bf55f,'operationType':_0x2be882,'functionNode':_0x306b59};}async function promptSelect(_0x32cd73,_0x12df24){const _0xbcba79=a28_0x127b35;if(_0x12df24[_0xbcba79(0x91)]===0x1)return 0x0;for(const [_0x2e5ebb,_0x239214]of _0x12df24[_0xbcba79(0x71)]()){process[_0xbcba79(0xaa)][_0xbcba79(0x75)]('\x20\x20'+(_0x2e5ebb+0x1)+'.\x20'+_0x239214+'\x0a');}const _0x418093=createInterface({'input':process[_0xbcba79(0x72)],'output':process[_0xbcba79(0xaa)]});while(!![]){const _0x4ef969=await new Promise(_0xc2012b=>{const _0x2629e1=_0xbcba79;_0x418093[_0x2629e1(0x82)](_0x32cd73+'\x20',_0xc2012b);}),_0x5437a4=Number[_0xbcba79(0x87)](_0x4ef969[_0xbcba79(0xb1)](),0xa);if(Number[_0xbcba79(0x88)](_0x5437a4)&&_0x5437a4>=0x1&&_0x5437a4<=_0x12df24['length'])return _0x418093[_0xbcba79(0x78)](),_0x5437a4-0x1;process[_0xbcba79(0xaa)][_0xbcba79(0x75)](_0xbcba79(0x7f)+_0x12df24['length']+'.\x0a');}}function buildFilePath(_0x27e703,_0x211367,_0x54a4c6,_0x2eeb9b){const _0x10b5a0=a28_0x127b35;if(_0x211367===_0x10b5a0(0x7d)){if(!_0x2eeb9b)throw CliErrors[_0x10b5a0(0xa5)]('HOOK\x20requires\x20alias/operation/node\x20options.');const _0x4ba1e3=_0x2eeb9b[_0x10b5a0(0x74)]??_0x2eeb9b[_0x10b5a0(0xa2)];return join(_0x27e703['scriptsRootDir'],'HOOK',_0x4ba1e3,_0x2eeb9b['operationType'],_0x2eeb9b[_0x10b5a0(0xa6)],_0x54a4c6+_0x10b5a0(0x76));}return join(_0x27e703['scriptsRootDir'],_0x211367,_0x54a4c6+_0x10b5a0(0x76));}function a28_0x43ab(_0x5eeb27,_0x36fd0e){_0x5eeb27=_0x5eeb27-0x67;const _0x100c4c=a28_0x100c();let _0x43ab3b=_0x100c4c[_0x5eeb27];return _0x43ab3b;}function a28_0x100c(){const _0x49a62d=['isInteger','str','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','Script\x20description','Trigger\x20node\x20(HOOK\x20only)','\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20-\x20Request\x20parameters.\x0a\x20*\x20@param\x20{Object}\x20context\x20-\x20Execution\x20context\x20(injected\x20by\x20platform).\x0a\x20*\x20@returns\x20{Promise<Object>}\x20Business\x20result\x20(wrapped\x20in\x20response.data).\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20','join','nonInteractive','Available:\x20','length','type','find','\x0a\x20*\x20[触发节点]\x20','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.','78IeVjRQ','The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`','2342504iYPYwn','/**\x0a\x20*\x20HOOK\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','/endpoint/','Invalid\x20dataset\x20selection.','after','597885TeIcyg','operationType','string','Operation\x20type\x20(HOOK\x20only)','datasetCode','777CuXipX','682899nnaszu','validation','functionNode','datasetcode','COMMON','\x20function:\x20','stderr','\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.','utf8','1441732RJNxji','appCode','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','bff','trim','50jpqdot','2298987yFjXkn','description','Alias\x20\x22','before','code','\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/COMMON/','71360WSSmpR','Select\x20operation\x20type:','apiDir','function-node','Operation\x20type\x20\x22','Select\x20dataset:','name','\x22.\x20','operation-type','--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','/**\x0a\x20*\x20ENDPOINT\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','\x22\x20not\x20found\x20for\x20dataset\x20','\x22\x20not\x20found.\x20','484585BcIeXF','.js\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20-\x20Input\x20parameters.\x0a\x20*\x20@param\x20{Object}\x20context\x20-\x20Execution\x20context\x20(injected\x20by\x20platform).\x0a\x20*\x20@returns\x20{Promise<Object>}\x20Processing\x20result.\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20','entries','stdin','Created\x20','alias','write','.js','Scaffold\x20a\x20new\x20BFF\x20function\x20from\x20template','close','No\x20datasets\x20found\x20for\x20this\x20app.','keys','TODO:\x20add\x20script\x20description','--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','HOOK','map','\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20','ENDPOINT','tableName','question','\x0a\x20*\x20[脚本名称]\x20','Script\x20type','Function\x20name\x20(valid\x20JS\x20identifier)','Invalid\x20function\x20name\x20\x22','parseInt'];a28_0x100c=function(){return _0x49a62d;};return a28_0x100c();}export function generateTemplate(_0x3956c9,_0x233f83,_0x255dee,_0x2797d4,_0x38b7ec){const _0x36e3ef=a28_0x127b35,_0x37de4f=_0x2797d4?.[_0x36e3ef(0xb1)]()||_0x36e3ef(0x7b);if(_0x3956c9===_0x36e3ef(0xa8))return'/**\x0a\x20*\x20COMMON\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20'+_0x37de4f+_0x36e3ef(0x83)+_0x233f83+_0x36e3ef(0xb8)+_0x233f83+_0x36e3ef(0x70)+_0x233f83+_0x36e3ef(0x95);if(_0x3956c9===_0x36e3ef(0x80))return _0x36e3ef(0x6c)+_0x37de4f+_0x36e3ef(0xaf)+_0x255dee+_0x36e3ef(0x9b)+_0x233f83+_0x36e3ef(0x8d)+_0x233f83+_0x36e3ef(0x95);if(!_0x38b7ec)throw CliErrors[_0x36e3ef(0xa5)]('HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.');return _0x36e3ef(0x9a)+_0x37de4f+_0x36e3ef(0xaf)+_0x255dee+'/'+_0x38b7ec['datasetCode']+'/'+_0x38b7ec[_0x36e3ef(0x9f)]+_0x36e3ef(0x94)+_0x38b7ec[_0x36e3ef(0xa6)]+'\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20-\x20Current\x20request\x20params\x20or\x20response\x20result.\x0a\x20*\x20@param\x20{Object}\x20context\x20-\x20Execution\x20context\x20(injected\x20by\x20platform).\x0a\x20*\x20@returns\x20{Promise<Object>}\x20Modified\x20params\x20object.\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20'+_0x233f83+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';}
@@ -1 +1 @@
1
- const a29_0x5a3cab=a29_0x18d0;(function(_0x31abec,_0x57471e){const _0x55aa25=a29_0x18d0,_0x25c518=_0x31abec();while(!![]){try{const _0x430712=-parseInt(_0x55aa25(0x18f))/0x1+parseInt(_0x55aa25(0x1b1))/0x2+parseInt(_0x55aa25(0x194))/0x3+-parseInt(_0x55aa25(0x19b))/0x4+parseInt(_0x55aa25(0x1b5))/0x5*(parseInt(_0x55aa25(0x1a6))/0x6)+-parseInt(_0x55aa25(0x1ab))/0x7+parseInt(_0x55aa25(0x1b7))/0x8;if(_0x430712===_0x57471e)break;else _0x25c518['push'](_0x25c518['shift']());}catch(_0xaf4f03){_0x25c518['push'](_0x25c518['shift']());}}}(a29_0x2aa7,0x5a699));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{loadBffProjectConfig}from'../../core/bff/config.js';function a29_0x18d0(_0xa025ed,_0x2f774d){_0xa025ed=_0xa025ed-0x18a;const _0x2aa7d9=a29_0x2aa7();let _0x18d000=_0x2aa7d9[_0xa025ed];return _0x18d000;}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':a29_0x5a3cab(0x19a),'command':a29_0x5a3cab(0x19d),'description':a29_0x5a3cab(0x1af),'risk':a29_0x5a3cab(0x1b8),'flags':[{'name':a29_0x5a3cab(0x1b2),'type':'string','description':a29_0x5a3cab(0x1c7),'enum':[a29_0x5a3cab(0x1b0),a29_0x5a3cab(0x1a5),a29_0x5a3cab(0x1ad)]},{'name':a29_0x5a3cab(0x198),'type':a29_0x5a3cab(0x1b9),'description':a29_0x5a3cab(0x1bc)}],async 'dryRun'(_0x1beeee){const _0x74667=a29_0x5a3cab,_0x3d7672=loadBffProjectConfig(_0x1beeee[_0x74667(0x1b6)]),_0x47bc70=await readBffLockFile(_0x3d7672[_0x74667(0x191)]),{appLock:_0x3c5770}=ensureLockScope(_0x47bc70??createEmptyBffLock(),_0x3d7672[_0x74667(0x1b6)],_0x3d7672['scriptsRoot'],'pull',_0x3d7672[_0x74667(0x1b6)],_0x3d7672[_0x74667(0x18d)]+'/'+_0x3d7672[_0x74667(0x1b6)]),_0x210fb6=buildDatasetCodeToAliasMap(_0x1beeee[_0x74667(0x190)]),_0x486cb5=normalizeBffType(_0x1beeee[_0x74667(0x1c5)](_0x74667(0x1b2)))??undefined,[_0x51af86,_0x1d2600]=await Promise[_0x74667(0x1a4)]([listBffScripts(_0x1beeee['appCode'],_0x486cb5),getBffScriptStatistics(_0x1beeee['appCode'])]),_0x2dd81e=createHookLocationMap(_0x1d2600),_0x540c0d=[];for(const _0x2aa3a5 of _0x51af86){const _0x3e8e72=resolveRemoteScriptTarget(_0x3d7672,_0x2aa3a5,_0x2dd81e,_0x3c5770['functions'],_0x210fb6);if(_0x3e8e72)_0x540c0d[_0x74667(0x196)](_0x3e8e72[_0x74667(0x19f)]);}return{'method':'GET','url':_0x74667(0x1ac),'body':{'scripts':_0x540c0d,'appCode':_0x1beeee[_0x74667(0x1b6)]},'description':_0x74667(0x18c)+_0x540c0d['length']+'\x20file(s)'};},async 'execute'(_0x24b860){const _0x16979e=a29_0x5a3cab,_0x5a54fd=loadBffProjectConfig(_0x24b860[_0x16979e(0x1b6)]),_0x2f1f78=await readBffLockFile(_0x5a54fd[_0x16979e(0x191)]),{lockData:_0x1051e,appLock:_0x568914}=ensureLockScope(_0x2f1f78??createEmptyBffLock(),_0x5a54fd[_0x16979e(0x1b6)],_0x5a54fd['scriptsRoot'],_0x16979e(0x19d),_0x5a54fd['appCode'],_0x5a54fd[_0x16979e(0x18d)]+'/'+_0x5a54fd[_0x16979e(0x1b6)]),_0x1817c5=normalizeBffType(_0x24b860['str'](_0x16979e(0x1b2)))??undefined;if(_0x24b860[_0x16979e(0x1c5)](_0x16979e(0x1b2))&&!_0x1817c5)throw CliErrors[_0x16979e(0x1b3)](_0x16979e(0x195));const [_0x20d94c,_0x22daa0]=await Promise[_0x16979e(0x1a4)]([listBffScripts(_0x24b860[_0x16979e(0x1b6)],_0x1817c5),getBffScriptStatistics(_0x24b860['appCode'])]);if(_0x20d94c[_0x16979e(0x1be)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x16979e(0x1c6)};const _0x4d5503=_0x24b860['bool'](_0x16979e(0x198));if(_0x4d5503&&!_0x24b860['nonInteractive']){const _0x1ae002=await confirmForce();if(!_0x1ae002)throw CliErrors[_0x16979e(0x1b4)](_0x16979e(0x199));}if(_0x4d5503&&_0x24b860[_0x16979e(0x1c4)]){}const _0x1b0748=buildDatasetCodeToAliasMap(_0x24b860[_0x16979e(0x190)]),_0x22dd63=createHookLocationMap(_0x22daa0),_0x385258=cloneLockData(_0x1051e),_0xae22f9=_0x385258[_0x16979e(0x18a)][_0x5a54fd[_0x16979e(0x1b6)]],_0xdc33f3=[],_0x26e76a=[],_0x2c35b4=[];for(const _0x3e6e29 of _0x20d94c){const _0x1894a0=resolveRemoteScriptTarget(_0x5a54fd,_0x3e6e29,_0x22dd63,_0x568914[_0x16979e(0x19e)],_0x1b0748);if(!_0x1894a0){_0x26e76a[_0x16979e(0x196)]({'lockKey':_0x3e6e29['scriptType']+'/'+_0x3e6e29['functionName'],'reason':'unresolvable\x20target\x20path'});continue;}const _0xf22665=_0x568914[_0x16979e(0x19e)][_0x1894a0[_0x16979e(0x19f)]];try{if(!_0x4d5503){const _0x44acea=await hasUnsyncedLocalChanges(_0x1894a0[_0x16979e(0x1a0)],_0xf22665);if(_0x44acea){_0x26e76a[_0x16979e(0x196)]({'lockKey':_0x1894a0[_0x16979e(0x19f)],'reason':_0x16979e(0x1a9)});continue;}}if(!_0x3e6e29['id'])throw new Error('Remote\x20script\x20missing\x20id.');if(_0x3e6e29[_0x16979e(0x1c8)]==null)throw new Error('Remote\x20script\x20missing\x20content.');const _0xfba6ab=_0x3e6e29[_0x16979e(0x1c8)];await ensureParentDirectory(_0x1894a0[_0x16979e(0x1a0)]),await writeFile(_0x1894a0[_0x16979e(0x1a0)],_0xfba6ab,_0x16979e(0x1ae));const _0xf7c1eb={'hash':computeContentHash(_0xfba6ab),'remoteId':_0x3e6e29['id'],'version':_0x3e6e29[_0x16979e(0x1a7)]};_0x1894a0[_0x16979e(0x1b2)]===_0x16979e(0x1ad)&&_0x1894a0[_0x16979e(0x1bd)]&&(_0xf7c1eb[_0x16979e(0x192)]=_0x1894a0['hookLocation']['alias'],_0xf7c1eb['datasetCode']=_0x1894a0[_0x16979e(0x1bd)][_0x16979e(0x193)],_0xf7c1eb[_0x16979e(0x197)]=_0x1894a0[_0x16979e(0x1bd)][_0x16979e(0x197)],_0xf7c1eb['functionNode']=_0x1894a0['hookLocation']['functionNode']),_0xae22f9[_0x16979e(0x19e)][_0x1894a0[_0x16979e(0x19f)]]=_0xf7c1eb,_0xdc33f3[_0x16979e(0x196)]({'lockKey':_0x1894a0['lockKey'],'remoteId':_0x3e6e29['id']});}catch(_0x281746){_0x2c35b4['push']({'lockKey':_0x1894a0[_0x16979e(0x19f)],'error':_0x281746 instanceof Error?_0x281746[_0x16979e(0x1c3)]:String(_0x281746)});}}return _0xae22f9[_0x16979e(0x19c)]=new Date()[_0x16979e(0x1c2)](),await writeBffLockFile(_0x5a54fd[_0x16979e(0x191)],_0x385258),{'ok':_0x2c35b4[_0x16979e(0x1be)]===0x0,'data':{'pulled':_0xdc33f3,'skipped':_0x26e76a,'failed':_0x2c35b4},'message':_0x16979e(0x1a3)+_0xdc33f3[_0x16979e(0x1be)]+_0x16979e(0x1c0)+_0x26e76a[_0x16979e(0x1be)]+_0x16979e(0x1bb)+_0x2c35b4[_0x16979e(0x1be)]+_0x16979e(0x1a1)};}};async function hasUnsyncedLocalChanges(_0x29c27b,_0x28d5ea){const _0x566166=a29_0x5a3cab;if(!await fileExists(_0x29c27b))return![];const _0x257cbb=await computeFileHash(_0x29c27b);if(!_0x28d5ea)return!![];return _0x257cbb!==_0x28d5ea[_0x566166(0x1ba)];}function cloneLockData(_0x2f8d7b){const _0x834225=a29_0x5a3cab;return{'aliases':{..._0x2f8d7b[_0x834225(0x1bf)]},'apps':Object[_0x834225(0x1ca)](Object[_0x834225(0x1a8)](_0x2f8d7b[_0x834225(0x18a)])['map'](([_0x2c7acd,_0x36cc54])=>[_0x2c7acd,{'scriptsRoot':_0x36cc54['scriptsRoot'],'lastSync':_0x36cc54[_0x834225(0x19c)],'functions':{..._0x36cc54[_0x834225(0x19e)]}}]))};}function buildDatasetCodeToAliasMap(_0x51c244){const _0x58ddd7=a29_0x5a3cab,_0x468b9d=loadAliasMap(_0x51c244);return new Map(_0x468b9d[_0x58ddd7(0x18b)](_0x5da7f6=>[_0x5da7f6[_0x58ddd7(0x193)],_0x5da7f6['alias']]));}async function confirmForce(){const _0x362f10=a29_0x5a3cab,_0x3c0411=createInterface({'input':process[_0x362f10(0x18e)],'output':process['stderr']}),_0xad2fa8=await new Promise(_0x44d60b=>{const _0x5e7863=_0x362f10;_0x3c0411['question'](_0x5e7863(0x1aa),_0x44d60b);});return _0x3c0411[_0x362f10(0x1a2)](),['y',_0x362f10(0x1c1)]['includes'](_0xad2fa8[_0x362f10(0x1c9)]()['toLowerCase']());}function a29_0x2aa7(){const _0x1116b4=['scriptsWorkspaceRoot','stdin','674588kkXtqD','apiDir','lockFilePath','alias','datasetCode','120999CHjDAI','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','push','operationType','force','Force\x20pull\x20cancelled.','bff','1066836yKUJVw','lastSync','pull','functions','lockKey','filePath','\x20failed','close','Pull\x20complete:\x20','all','ENDPOINT','2245884ZegBcq','version','entries','local\x20unsynced\x20changes','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','2386265UfkVsW','/api/management/library/scripts/list','HOOK','utf8','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','COMMON','1362962lZBbCK','type','validation','cancelled','5vXJssD','appCode','4451144uSvmcf','write','boolean','hash','\x20skipped,\x20','Force\x20overwrite\x20local\x20unsynced\x20changes','hookLocation','length','aliases','\x20pulled,\x20','yes','toISOString','message','nonInteractive','str','No\x20remote\x20BFF\x20scripts\x20found.','Pull\x20only\x20this\x20script\x20type','scriptContent','trim','fromEntries','apps','map','Would\x20pull\x20'];a29_0x2aa7=function(){return _0x1116b4;};return a29_0x2aa7();}
1
+ const a29_0x2a5b1d=a29_0x56c6;(function(_0x2dfa22,_0x121e59){const _0x3faeed=a29_0x56c6,_0x1347e8=_0x2dfa22();while(!![]){try{const _0x28aa6b=parseInt(_0x3faeed(0x16a))/0x1*(parseInt(_0x3faeed(0x147))/0x2)+parseInt(_0x3faeed(0x153))/0x3*(-parseInt(_0x3faeed(0x173))/0x4)+-parseInt(_0x3faeed(0x146))/0x5*(-parseInt(_0x3faeed(0x187))/0x6)+-parseInt(_0x3faeed(0x155))/0x7+-parseInt(_0x3faeed(0x16d))/0x8+-parseInt(_0x3faeed(0x168))/0x9*(parseInt(_0x3faeed(0x167))/0xa)+parseInt(_0x3faeed(0x185))/0xb;if(_0x28aa6b===_0x121e59)break;else _0x1347e8['push'](_0x1347e8['shift']());}catch(_0xcb6e06){_0x1347e8['push'](_0x1347e8['shift']());}}}(a29_0x6eab,0x6429e));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{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';function a29_0x56c6(_0x57afa0,_0x172805){_0x57afa0=_0x57afa0-0x145;const _0x6eab6c=a29_0x6eab();let _0x56c65d=_0x6eab6c[_0x57afa0];return _0x56c65d;}import{CliErrors}from'../../errors.js';export const bffPull={'service':a29_0x2a5b1d(0x178),'command':a29_0x2a5b1d(0x150),'description':a29_0x2a5b1d(0x15a),'risk':a29_0x2a5b1d(0x14f),'flags':[{'name':'type','type':a29_0x2a5b1d(0x157),'description':a29_0x2a5b1d(0x15c),'enum':[a29_0x2a5b1d(0x145),'ENDPOINT',a29_0x2a5b1d(0x17e)]},{'name':a29_0x2a5b1d(0x15d),'type':a29_0x2a5b1d(0x148),'description':a29_0x2a5b1d(0x174)}],async 'dryRun'(_0x2eba30){const _0x1df477=a29_0x2a5b1d,_0x199d96=loadBffProjectConfig(_0x2eba30['appCode']),_0x135285=await readBffLockFile(_0x199d96[_0x1df477(0x159)]),{appLock:_0x3459e3}=ensureLockScope(_0x135285??createEmptyBffLock(),_0x2eba30[_0x1df477(0x170)],_0x199d96['scriptsRoot'],'pull'),_0x329c51=normalizeBffType(_0x2eba30[_0x1df477(0x184)]('type'))??undefined,_0x1e623a=buildDatasetCodeToAliasMap(_0x2eba30[_0x1df477(0x17b)],_0x2eba30[_0x1df477(0x170)]),[_0x5a616a,_0x13c485]=await Promise[_0x1df477(0x18a)]([listBffScripts(_0x2eba30[_0x1df477(0x170)],_0x329c51),getBffScriptStatistics(_0x2eba30[_0x1df477(0x170)])]),_0x2c7e9e=createHookLocationMap(_0x13c485),_0x222f14=[];for(const _0x37a969 of _0x5a616a){const _0x42d8e2=resolveRemoteScriptTarget(_0x199d96,_0x37a969,_0x2c7e9e,_0x3459e3[_0x1df477(0x163)],_0x1e623a);if(!_0x42d8e2){_0x222f14[_0x1df477(0x179)]({'scriptType':_0x37a969[_0x1df477(0x186)],'functionName':_0x37a969[_0x1df477(0x14e)]??'','status':_0x1df477(0x158),'reason':_0x1df477(0x18b)});continue;}const _0x41bdce=_0x3459e3[_0x1df477(0x163)][_0x42d8e2[_0x1df477(0x15f)]],_0x2b6e49=_0x37a969[_0x1df477(0x166)]!=null?computeContentHash(_0x37a969['scriptContent']):undefined,_0x96a446=await hasUnsyncedLocalChanges(_0x42d8e2[_0x1df477(0x182)],_0x41bdce,_0x2b6e49);_0x222f14[_0x1df477(0x179)]({'lockKey':_0x42d8e2[_0x1df477(0x15f)],'filePath':_0x42d8e2[_0x1df477(0x182)],'remoteId':_0x37a969['id']??null,'status':_0x96a446?_0x1df477(0x154):_0x1df477(0x161)});}return{'method':_0x1df477(0x149),'url':_0x1df477(0x15e)+_0x2eba30[_0x1df477(0x170)]+(_0x329c51?'&type='+_0x329c51:''),'body':{'appCode':_0x2eba30[_0x1df477(0x170)],'filterType':_0x329c51??null,'files':_0x222f14},'description':_0x1df477(0x177)+_0x222f14['length']+_0x1df477(0x16c)};},async 'execute'(_0x1c2451){const _0x54b853=a29_0x2a5b1d,_0xc0e4e5=loadBffProjectConfig(_0x1c2451['appCode']),_0xd3eefd=await readBffLockFile(_0xc0e4e5['lockFilePath']),{lockData:_0x2615c4,appLock:_0x2a2793}=ensureLockScope(_0xd3eefd??createEmptyBffLock(),_0x1c2451[_0x54b853(0x170)],_0xc0e4e5[_0x54b853(0x183)],'pull'),_0x4b41fd=normalizeBffType(_0x1c2451[_0x54b853(0x184)]('type'))??undefined;if(_0x1c2451[_0x54b853(0x184)](_0x54b853(0x14d))&&!_0x4b41fd)throw CliErrors['validation'](_0x54b853(0x17f));const [_0x32c11c,_0x26cf69]=await Promise[_0x54b853(0x18a)]([listBffScripts(_0x1c2451[_0x54b853(0x170)],_0x4b41fd),getBffScriptStatistics(_0x1c2451[_0x54b853(0x170)])]);if(_0x32c11c[_0x54b853(0x162)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x54b853(0x18c)};const _0xf1b6fa=_0x1c2451[_0x54b853(0x151)]('force');if(_0xf1b6fa&&!_0x1c2451[_0x54b853(0x156)]){const _0x280176=await confirmForce();if(!_0x280176)throw CliErrors['cancelled']('Force\x20pull\x20cancelled.');}if(_0xf1b6fa&&_0x1c2451[_0x54b853(0x156)]){}const _0xb88fcb=buildDatasetCodeToAliasMap(_0x1c2451[_0x54b853(0x17b)],_0x1c2451[_0x54b853(0x170)]),_0x5cad69=createHookLocationMap(_0x26cf69),_0x487085=JSON[_0x54b853(0x14b)](JSON['stringify'](_0x2615c4)),_0x28191b=_0x1c2451[_0x54b853(0x170)],_0x100833=_0x487085['apps'][_0x28191b];if(!_0x100833)throw new Error(_0x54b853(0x188)+_0x28191b+_0x54b853(0x17d));const _0x50cb82=[],_0x101e4f=[],_0x27fbb4=[];for(const _0x255e2f of _0x32c11c){const _0x19fa3a=resolveRemoteScriptTarget(_0xc0e4e5,_0x255e2f,_0x5cad69,_0x2a2793[_0x54b853(0x163)],_0xb88fcb);if(!_0x19fa3a){_0x101e4f[_0x54b853(0x179)]({'lockKey':_0x255e2f[_0x54b853(0x186)]+'/'+_0x255e2f['functionName'],'reason':_0x54b853(0x18b)});continue;}const _0x3f2208=_0x2a2793['functions'][_0x19fa3a[_0x54b853(0x15f)]];try{if(!_0x255e2f['id'])throw new Error(_0x54b853(0x189));if(_0x255e2f[_0x54b853(0x166)]==null)throw new Error(_0x54b853(0x176));const _0x40d44f=_0x255e2f['scriptContent'],_0x4d08eb=computeContentHash(_0x40d44f);if(!_0xf1b6fa){const _0x24a2a6=await hasUnsyncedLocalChanges(_0x19fa3a[_0x54b853(0x182)],_0x3f2208,_0x4d08eb);if(_0x24a2a6){_0x101e4f['push']({'lockKey':_0x19fa3a['lockKey'],'reason':_0x54b853(0x17a)});continue;}}await ensureParentDirectory(_0x19fa3a[_0x54b853(0x182)]),await writeFile(_0x19fa3a['filePath'],_0x40d44f,_0x54b853(0x171));const _0x5a7598={'hash':_0x4d08eb,'remoteId':_0x255e2f['id'],'version':_0x255e2f['version']};_0x19fa3a[_0x54b853(0x14d)]===_0x54b853(0x17e)&&_0x19fa3a[_0x54b853(0x14c)]&&(_0x5a7598['alias']=_0x19fa3a[_0x54b853(0x14c)]['alias'],_0x5a7598[_0x54b853(0x152)]=_0x19fa3a[_0x54b853(0x14c)][_0x54b853(0x152)],_0x5a7598[_0x54b853(0x160)]=_0x19fa3a[_0x54b853(0x14c)][_0x54b853(0x160)],_0x5a7598[_0x54b853(0x16f)]=_0x19fa3a[_0x54b853(0x14c)][_0x54b853(0x16f)]),_0x100833[_0x54b853(0x163)][_0x19fa3a[_0x54b853(0x15f)]]=_0x5a7598,_0x50cb82[_0x54b853(0x179)]({'lockKey':_0x19fa3a[_0x54b853(0x15f)],'remoteId':_0x255e2f['id']});}catch(_0x21b0fe){_0x27fbb4['push']({'lockKey':_0x19fa3a[_0x54b853(0x15f)],'error':_0x21b0fe instanceof Error?_0x21b0fe[_0x54b853(0x181)]:String(_0x21b0fe)});}}return _0x100833[_0x54b853(0x14a)]=new Date()[_0x54b853(0x172)](),await writeBffLockFile(_0xc0e4e5[_0x54b853(0x159)],_0x487085),{'ok':_0x27fbb4[_0x54b853(0x162)]===0x0,'data':{'pulled':_0x50cb82,'skipped':_0x101e4f,'failed':_0x27fbb4},'message':_0x54b853(0x180)+_0x50cb82['length']+_0x54b853(0x18d)+_0x101e4f[_0x54b853(0x162)]+_0x54b853(0x164)+_0x27fbb4[_0x54b853(0x162)]+'\x20failed'};}};async function hasUnsyncedLocalChanges(_0x5e0a21,_0x44d99f,_0x439e52){const _0x11170e=a29_0x2a5b1d;if(!await fileExists(_0x5e0a21))return![];const _0xf5a4f0=await computeFileHash(_0x5e0a21);if(!_0x44d99f)return _0x439e52?_0xf5a4f0!==_0x439e52:!![];return _0xf5a4f0!==_0x44d99f[_0x11170e(0x16e)];}function a29_0x6eab(){const _0x4973bc=['bff','push','local\x20unsynced\x20changes','apiDir','alias','\x22\x20not\x20found\x20after\x20ensureLockScope.','HOOK','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','Pull\x20complete:\x20','message','filePath','scriptsRoot','str','10077111vOUZKj','scriptType','6qDcurq','Lock\x20scope\x20for\x20app\x20\x22','Remote\x20script\x20missing\x20id.','all','unresolvable\x20target\x20path','No\x20remote\x20BFF\x20scripts\x20found.','\x20pulled,\x20','COMMON','2216495HuBfvc','261628TbvcVE','boolean','GET','lastSync','parse','hookLocation','type','functionName','write','pull','bool','datasetCode','1650yxqZGg','conflict','4159379ABtvOm','nonInteractive','string','skipped','lockFilePath','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','map','Pull\x20only\x20this\x20script\x20type','force','/api/management/library/scripts/list?appCode=','lockKey','operationType','would_pull','length','functions','\x20skipped,\x20','stderr','scriptContent','1640RExDEj','8244JtkeTH','question','5gzXLbR','trim','\x20remote\x20BFF\x20script(s)\x20for\x20pull','4745032GvBRBh','hash','functionNode','appCode','utf8','toISOString','1932oDNkBA','Force\x20overwrite\x20local\x20unsynced\x20changes','toLowerCase','Remote\x20script\x20missing\x20content.','Would\x20inspect\x20'];a29_0x6eab=function(){return _0x4973bc;};return a29_0x6eab();}function buildDatasetCodeToAliasMap(_0x591bf8,_0x2a8c48){const _0x931fb6=a29_0x2a5b1d,_0x21c8dd=loadAliasMap(_0x591bf8,_0x2a8c48);return new Map(_0x21c8dd[_0x931fb6(0x15b)](_0x46545=>[_0x46545[_0x931fb6(0x152)],_0x46545[_0x931fb6(0x17c)]]));}async function confirmForce(){const _0xe90950=a29_0x2a5b1d,_0xdc8d6e=createInterface({'input':process['stdin'],'output':process[_0xe90950(0x165)]}),_0x2c90ab=await new Promise(_0x50b7e7=>{const _0x152ab4=_0xe90950;_0xdc8d6e[_0x152ab4(0x169)]('Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20',_0x50b7e7);});return _0xdc8d6e['close'](),['y','yes']['includes'](_0x2c90ab[_0xe90950(0x16b)]()[_0xe90950(0x175)]());}
@@ -1 +1 @@
1
- const a30_0x63e08e=a30_0x935e;(function(_0x53c038,_0x5b1761){const _0x18b376=a30_0x935e,_0x4d7d64=_0x53c038();while(!![]){try{const _0x577c07=parseInt(_0x18b376(0xb3))/0x1+-parseInt(_0x18b376(0xc3))/0x2*(-parseInt(_0x18b376(0xe1))/0x3)+-parseInt(_0x18b376(0xa4))/0x4*(parseInt(_0x18b376(0xd0))/0x5)+-parseInt(_0x18b376(0xc7))/0x6*(parseInt(_0x18b376(0xd8))/0x7)+parseInt(_0x18b376(0xce))/0x8+-parseInt(_0x18b376(0xa8))/0x9*(parseInt(_0x18b376(0xcb))/0xa)+parseInt(_0x18b376(0xd9))/0xb*(-parseInt(_0x18b376(0xc0))/0xc);if(_0x577c07===_0x5b1761)break;else _0x4d7d64['push'](_0x4d7d64['shift']());}catch(_0x38e0e4){_0x4d7d64['push'](_0x4d7d64['shift']());}}}(a30_0x5793,0xb0e3f));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';function a30_0x5793(){const _0x18a722=['POST','729aGgpkp','utf8','scriptsWorkspaceRoot','apiDir','get','functions','appCode','\x20failed','operationType','datasetId','HOOK','357317fApopR','Push\x20only\x20this\x20script\x20type','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','functionNode','Would\x20push\x20','hash','bff','datasetCode','length','force','high-risk-write','\x20file(s)','code','1968ecvFxo','validation','aliasToDatasetCode','10pOdxxg','Cannot\x20resolve\x20dataset\x20for\x20\x22','filePath','lockFilePath','18VxFpOq','COMMON','boolean','unchanged','37850bqEKPn','Force\x20push\x20ignoring\x20hash\x20protection','Incomplete\x20HOOK\x20path:\x20','10840792FKqEPz','/api/management/library/scripts/save','10825rPOjLz','lockKey','alias','version','filter','Push\x20complete:\x20','\x22.\x20','Push\x20local\x20BFF\x20scripts\x20to\x20remote','1508073jNrDoQ','28204lhWGSS','bool','string','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','ENDPOINT','Run\x20`','scriptsRoot','push','492414MBXCUr','type','name','set','str','message','datasetCodeToId','description','map','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','remoteId','804tLYSIn','has','\x20uploaded,\x20'];a30_0x5793=function(){return _0x18a722;};return a30_0x5793();}import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';function a30_0x935e(_0x402f8c,_0x3c1247){_0x402f8c=_0x402f8c-0xa2;const _0x5793e4=a30_0x5793();let _0x935e4a=_0x5793e4[_0x402f8c];return _0x935e4a;}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const bffPush={'service':a30_0x63e08e(0xb9),'command':a30_0x63e08e(0xe0),'description':a30_0x63e08e(0xd7),'risk':a30_0x63e08e(0xbd),'flags':[{'name':a30_0x63e08e(0xe2),'type':a30_0x63e08e(0xdb),'description':a30_0x63e08e(0xb4),'enum':[a30_0x63e08e(0xc8),a30_0x63e08e(0xdd),a30_0x63e08e(0xb2)]},{'name':a30_0x63e08e(0xe3),'type':'string','description':a30_0x63e08e(0xdc)},{'name':a30_0x63e08e(0xbc),'type':a30_0x63e08e(0xc9),'description':a30_0x63e08e(0xcc)}],async 'dryRun'(_0x528b30){const _0x19410b=a30_0x63e08e,_0x3cdff0=loadBffProjectConfig(_0x528b30[_0x19410b(0xae)]),_0xcebefd=await readBffLockFile(_0x3cdff0[_0x19410b(0xc6)]),{appLock:_0x1bd59d}=ensureLockScope(_0xcebefd??createEmptyBffLock(),_0x3cdff0['appCode'],_0x3cdff0[_0x19410b(0xdf)],_0x19410b(0xe0),_0x3cdff0[_0x19410b(0xae)],_0x3cdff0['scriptsWorkspaceRoot']+'/'+_0x3cdff0['appCode']),_0x20d1bf=await getTargetFunctions(_0x3cdff0,_0x528b30),_0x4a4a80=_0x528b30[_0x19410b(0xda)]('force'),_0xcf0420=[];for(const _0x3ab463 of _0x20d1bf){const _0x2ed31c=await computeFileHash(_0x3ab463[_0x19410b(0xc5)]),_0x1cd7bd=_0x1bd59d[_0x19410b(0xad)][_0x3ab463['lockKey']];if(!_0x4a4a80&&_0x1cd7bd&&_0x1cd7bd[_0x19410b(0xb8)]===_0x2ed31c)continue;_0xcf0420[_0x19410b(0xe0)](_0x3ab463['lockKey']);}return{'method':_0x19410b(0xa7),'url':_0x19410b(0xcf),'body':{'files':_0xcf0420,'appCode':_0x528b30[_0x19410b(0xae)]},'description':_0x19410b(0xb7)+_0xcf0420[_0x19410b(0xbb)]+_0x19410b(0xbe)};},async 'execute'(_0x48631d){const _0xe53c87=a30_0x63e08e,_0x26989c=loadBffProjectConfig(_0x48631d['appCode']),_0x5ef085=await readBffLockFile(_0x26989c['lockFilePath']),{lockData:_0x2392c3,appLock:_0x311aaf}=ensureLockScope(_0x5ef085??createEmptyBffLock(),_0x26989c['appCode'],_0x26989c[_0xe53c87(0xdf)],_0xe53c87(0xe0),_0x26989c[_0xe53c87(0xae)],_0x26989c[_0xe53c87(0xaa)]+'/'+_0x26989c['appCode']),_0x368056=await getTargetFunctions(_0x26989c,_0x48631d);if(_0x368056[_0xe53c87(0xbb)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':'No\x20local\x20BFF\x20functions\x20found.'};const _0x4f8c36=_0x48631d[_0xe53c87(0xda)]('force'),_0x26bf1d=await buildHookMaps(_0x26989c['appCode'],_0x48631d[_0xe53c87(0xab)],_0x368056,_0x311aaf),_0x170195=[],_0x506de1=[],_0x38c4a7=[];for(const _0x48b00b of _0x368056){const _0x408916=await computeFileHash(_0x48b00b[_0xe53c87(0xc5)]),_0x2e6509=_0x311aaf['functions'][_0x48b00b[_0xe53c87(0xd1)]];if(!_0x4f8c36&&_0x2e6509&&_0x2e6509[_0xe53c87(0xb8)]===_0x408916){_0x506de1[_0xe53c87(0xe0)]({'lockKey':_0x48b00b['lockKey'],'reason':_0xe53c87(0xca)});continue;}try{await uploadSingleFunction(_0x26989c[_0xe53c87(0xae)],_0x48b00b,_0x311aaf,_0x26bf1d);const _0x1719cb=_0x311aaf['functions'][_0x48b00b[_0xe53c87(0xd1)]];_0x170195[_0xe53c87(0xe0)]({'lockKey':_0x48b00b['lockKey'],'remoteId':_0x1719cb?.['remoteId']??0x0});}catch(_0x1375ce){_0x38c4a7[_0xe53c87(0xe0)]({'lockKey':_0x48b00b[_0xe53c87(0xd1)],'error':_0x1375ce instanceof Error?_0x1375ce[_0xe53c87(0xe6)]:String(_0x1375ce)});}}return _0x311aaf['lastSync']=new Date()['toISOString'](),await writeBffLockFile(_0x26989c[_0xe53c87(0xc6)],_0x2392c3),{'ok':_0x38c4a7['length']===0x0,'data':{'uploaded':_0x170195,'skipped':_0x506de1,'failed':_0x38c4a7},'message':_0xe53c87(0xd5)+_0x170195[_0xe53c87(0xbb)]+_0xe53c87(0xa6)+_0x506de1[_0xe53c87(0xbb)]+'\x20skipped,\x20'+_0x38c4a7[_0xe53c87(0xbb)]+_0xe53c87(0xaf)};}};async function getTargetFunctions(_0x29c112,_0x3a3ebc){const _0x1c80ae=a30_0x63e08e,_0x54c7f9=_0x3a3ebc[_0x1c80ae(0xe5)](_0x1c80ae(0xe2)),_0x415b56=_0x3a3ebc[_0x1c80ae(0xe5)](_0x1c80ae(0xe3)),_0x4626a8=normalizeBffType(_0x54c7f9)??undefined;if(_0x415b56&&!_0x4626a8)throw CliErrors[_0x1c80ae(0xc1)](_0x1c80ae(0xb5));const _0x2c2e97=await scanLocalBffFunctions(_0x29c112,_0x4626a8);if(_0x415b56){const _0x49766c=_0x2c2e97[_0x1c80ae(0xd4)](_0x34d3cb=>_0x34d3cb[_0x1c80ae(0xe3)]===_0x415b56);if(_0x49766c[_0x1c80ae(0xbb)]===0x0)throw CliErrors[_0x1c80ae(0xc1)]('Local\x20function\x20not\x20found:\x20'+_0x4626a8+'/'+_0x415b56);return _0x49766c;}return _0x2c2e97;}async function buildHookMaps(_0x5d6a74,_0x131008,_0x2262bb,_0x2fe59f){const _0x269ea6=a30_0x63e08e,_0xbfd903=_0x2262bb['some'](_0x3a16a7=>_0x3a16a7[_0x269ea6(0xe2)]===_0x269ea6(0xb2));if(!_0xbfd903)return{'aliasToDatasetCode':new Map(),'datasetCodeToId':new Map()};const _0x2fe3e7=loadAliasMap(_0x131008),_0x1f00e2=new Map(_0x2fe3e7[_0x269ea6(0xe9)](_0x3e03ab=>[_0x3e03ab[_0x269ea6(0xd2)],_0x3e03ab[_0x269ea6(0xba)]]));for(const _0x58db04 of Object['values'](_0x2fe59f['functions'])){_0x58db04[_0x269ea6(0xd2)]&&_0x58db04[_0x269ea6(0xba)]&&!_0x1f00e2[_0x269ea6(0xa5)](_0x58db04['alias'])&&_0x1f00e2[_0x269ea6(0xe4)](_0x58db04[_0x269ea6(0xd2)],_0x58db04[_0x269ea6(0xba)]);}const _0x6d2506=await listDatasets(_0x5d6a74),_0x701a07=new Map(_0x6d2506['map'](_0x2458c4=>[_0x2458c4[_0x269ea6(0xbf)],_0x2458c4['id']]));return{'aliasToDatasetCode':_0x1f00e2,'datasetCodeToId':_0x701a07};}async function uploadSingleFunction(_0x5797a8,_0x31a2bf,_0x7237f6,_0x97bc7){const _0x39cb19=a30_0x63e08e,_0x928ed9=await readFile(_0x31a2bf[_0x39cb19(0xc5)],_0x39cb19(0xa9)),_0x5ec584=await computeFileHash(_0x31a2bf['filePath']),_0x4952b4=_0x7237f6[_0x39cb19(0xad)][_0x31a2bf[_0x39cb19(0xd1)]];if(_0x4952b4?.[_0x39cb19(0xa3)]&&_0x4952b4['version']==null)throw CliErrors[_0x39cb19(0xc1)](_0x31a2bf[_0x39cb19(0xd1)]+':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.');let _0x151e94=extractScriptDescription(_0x928ed9);if(!_0x151e94&&_0x4952b4?.[_0x39cb19(0xa3)]){const _0x52fdb2=await getBffScriptInfo(_0x4952b4[_0x39cb19(0xa3)]);_0x151e94=_0x52fdb2['description']||undefined;}const _0x4d5197={'appCode':_0x5797a8,'functionName':_0x31a2bf[_0x39cb19(0xe3)],'scriptType':_0x31a2bf[_0x39cb19(0xe2)],'scriptContent':_0x928ed9};if(_0x4952b4?.[_0x39cb19(0xa3)])_0x4d5197['id']=_0x4952b4['remoteId'];if(_0x4952b4?.['version']!=null)_0x4d5197[_0x39cb19(0xd3)]=_0x4952b4['version'];if(_0x151e94)_0x4d5197[_0x39cb19(0xe8)]=_0x151e94;if(_0x31a2bf[_0x39cb19(0xe2)]===_0x39cb19(0xb2)){const _0x1404a2=_0x31a2bf[_0x39cb19(0xd2)];if(!_0x1404a2||!_0x31a2bf[_0x39cb19(0xb0)]||!_0x31a2bf[_0x39cb19(0xb6)])throw CliErrors[_0x39cb19(0xc1)](_0x39cb19(0xcd)+_0x31a2bf[_0x39cb19(0xd1)]);const _0x32963d=_0x97bc7[_0x39cb19(0xc2)][_0x39cb19(0xac)](_0x1404a2)??_0x4952b4?.[_0x39cb19(0xba)]??_0x1404a2,_0xf74622=_0x97bc7[_0x39cb19(0xe7)][_0x39cb19(0xac)](_0x32963d);if(!_0xf74622)throw CliErrors[_0x39cb19(0xc1)](_0x39cb19(0xc4)+_0x1404a2+_0x39cb19(0xd6)+(_0x39cb19(0xde)+CLI_BIN_NAME+_0x39cb19(0xa2)));_0x4d5197[_0x39cb19(0xb1)]=_0xf74622,_0x4d5197['operationType']=_0x31a2bf[_0x39cb19(0xb0)],_0x4d5197[_0x39cb19(0xb6)]=_0x31a2bf[_0x39cb19(0xb6)];}const _0x495f46=await saveBffScript(_0x4d5197),_0xeafe13=await getBffScriptInfo(_0x495f46),_0x10ac4a={'hash':_0x5ec584,'remoteId':_0x495f46,'version':_0xeafe13[_0x39cb19(0xd3)]};if(_0x31a2bf['type']===_0x39cb19(0xb2)){const _0x1768ae=_0x31a2bf[_0x39cb19(0xd2)],_0x4ecf6b=_0x97bc7['aliasToDatasetCode'][_0x39cb19(0xac)](_0x1768ae)??_0x4952b4?.[_0x39cb19(0xba)]??_0x1768ae;_0x97bc7[_0x39cb19(0xc2)][_0x39cb19(0xa5)](_0x1768ae)?_0x10ac4a[_0x39cb19(0xd2)]=_0x1768ae:_0x10ac4a[_0x39cb19(0xd2)]=_0x4952b4?.[_0x39cb19(0xd2)],_0x10ac4a[_0x39cb19(0xba)]=_0x4ecf6b,_0x10ac4a[_0x39cb19(0xb0)]=_0x31a2bf[_0x39cb19(0xb0)],_0x10ac4a[_0x39cb19(0xb6)]=_0x31a2bf[_0x39cb19(0xb6)];}_0x7237f6[_0x39cb19(0xad)][_0x31a2bf['lockKey']]=_0x10ac4a;}
1
+ const a30_0x2e997e=a30_0x7fae;(function(_0x10d301,_0x33e45b){const _0x3c763c=a30_0x7fae,_0x32031f=_0x10d301();while(!![]){try{const _0x4cc3ce=parseInt(_0x3c763c(0x15c))/0x1*(-parseInt(_0x3c763c(0x15a))/0x2)+parseInt(_0x3c763c(0x158))/0x3+-parseInt(_0x3c763c(0x13c))/0x4+-parseInt(_0x3c763c(0x138))/0x5+parseInt(_0x3c763c(0x12f))/0x6+-parseInt(_0x3c763c(0x13b))/0x7+parseInt(_0x3c763c(0x142))/0x8;if(_0x4cc3ce===_0x33e45b)break;else _0x32031f['push'](_0x32031f['shift']());}catch(_0x30a524){_0x32031f['push'](_0x32031f['shift']());}}}(a30_0x4002,0xa15e2));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets}from'../../core/api-client.js';function a30_0x7fae(_0x38200e,_0x5f1987){_0x38200e=_0x38200e-0x12d;const _0x400209=a30_0x4002();let _0x7fae4=_0x400209[_0x38200e];return _0x7fae4;}import{loadAliasMap}from'../../core/alias-resolver.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';function a30_0x4002(){const _0x3940bd=['boolean','appCode','3451770VOGbrE','get','filter','hash','Run\x20`','message','datasetCode','version','Push\x20local\x20BFF\x20scripts\x20to\x20remote','5974705WcjSek','type','map','7725718XAMoUT','2428544rNleEK','\x20failed','Local\x20function\x20not\x20found:\x20','functions','\x20local\x20BFF\x20script(s)\x20for\x20push','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','19273784VluEFn','would_push','\x20skipped,\x20','lockKey',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','code','datasetCodeToId','push','lockFilePath','POST','description','unchanged','apiDir','filePath','operationType','\x20uploaded,\x20','str','functionNode','aliasToDatasetCode','No\x20local\x20BFF\x20functions\x20found.','force','remoteId','2329548LaApwX','HOOK','388642xSGQqa','name','1YDmgeZ','toISOString','Cannot\x20resolve\x20dataset\x20for\x20\x22','Would\x20inspect\x20','/api/management/library/scripts/save','COMMON','string','Push\x20complete:\x20','has','length','alias','bool','high-risk-write','validation','scriptsRoot','lastSync'];a30_0x4002=function(){return _0x3940bd;};return a30_0x4002();}import{extractScriptDescription}from'../../core/bff/utils.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const bffPush={'service':'bff','command':'push','description':a30_0x2e997e(0x137),'risk':a30_0x2e997e(0x168),'flags':[{'name':'type','type':a30_0x2e997e(0x162),'description':'Push\x20only\x20this\x20script\x20type','enum':[a30_0x2e997e(0x161),'ENDPOINT',a30_0x2e997e(0x159)]},{'name':'name','type':'string','description':'Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)'},{'name':a30_0x2e997e(0x156),'type':a30_0x2e997e(0x12d),'description':'Force\x20push\x20ignoring\x20hash\x20protection'}],async 'dryRun'(_0x4126c6){const _0x17729a=a30_0x2e997e,_0x17c73a=loadBffProjectConfig(_0x4126c6[_0x17729a(0x12e)]),_0x130fd0=await readBffLockFile(_0x17c73a[_0x17729a(0x14a)]),{appLock:_0x44a2b0}=ensureLockScope(_0x130fd0??createEmptyBffLock(),_0x4126c6[_0x17729a(0x12e)],_0x17c73a['scriptsRoot'],_0x17729a(0x149)),_0x51c1da=await getTargetFunctions(_0x17c73a,_0x4126c6),_0x2a40a5=_0x4126c6[_0x17729a(0x167)](_0x17729a(0x156)),_0x47328f=[];for(const _0x16cb7f of _0x51c1da){const _0x396687=await computeFileHash(_0x16cb7f[_0x17729a(0x14f)]),_0x11d468=_0x44a2b0[_0x17729a(0x13f)][_0x16cb7f[_0x17729a(0x145)]],_0x52786f=!!_0x11d468&&_0x11d468[_0x17729a(0x132)]===_0x396687;_0x47328f[_0x17729a(0x149)]({'lockKey':_0x16cb7f[_0x17729a(0x145)],'filePath':_0x16cb7f[_0x17729a(0x14f)],'remoteId':_0x11d468?.['remoteId']??null,'mode':_0x11d468?.[_0x17729a(0x157)]?'update':'create','status':!_0x2a40a5&&_0x52786f?'unchanged':_0x17729a(0x143)});}return{'method':_0x17729a(0x14b),'url':_0x17729a(0x160),'body':{'appCode':_0x4126c6[_0x17729a(0x12e)],'force':_0x2a40a5,'files':_0x47328f},'description':_0x17729a(0x15f)+_0x47328f['length']+_0x17729a(0x140)};},async 'execute'(_0x39bd0c){const _0x4b5d4b=a30_0x2e997e,_0xa23527=loadBffProjectConfig(_0x39bd0c[_0x4b5d4b(0x12e)]),_0x544201=await readBffLockFile(_0xa23527[_0x4b5d4b(0x14a)]),{lockData:_0x4dba40,appLock:_0x528e78}=ensureLockScope(_0x544201??createEmptyBffLock(),_0x39bd0c[_0x4b5d4b(0x12e)],_0xa23527[_0x4b5d4b(0x16a)],_0x4b5d4b(0x149)),_0xcf4d86=await getTargetFunctions(_0xa23527,_0x39bd0c);if(_0xcf4d86['length']===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x4b5d4b(0x155)};const _0x3be652=_0x39bd0c[_0x4b5d4b(0x167)]('force'),_0x15765a=await buildHookMaps(_0x39bd0c[_0x4b5d4b(0x12e)],_0x39bd0c[_0x4b5d4b(0x14e)],_0xcf4d86,_0x528e78),_0x4dd4db=[],_0xaabe11=[],_0x211030=[];for(const _0x2c75b9 of _0xcf4d86){const _0x47585b=await computeFileHash(_0x2c75b9[_0x4b5d4b(0x14f)]),_0x1ff9d3=_0x528e78[_0x4b5d4b(0x13f)][_0x2c75b9['lockKey']];if(!_0x3be652&&_0x1ff9d3&&_0x1ff9d3[_0x4b5d4b(0x132)]===_0x47585b){_0xaabe11[_0x4b5d4b(0x149)]({'lockKey':_0x2c75b9[_0x4b5d4b(0x145)],'reason':_0x4b5d4b(0x14d)});continue;}try{await uploadSingleFunction(_0x39bd0c[_0x4b5d4b(0x12e)],_0x2c75b9,_0x528e78,_0x15765a);const _0x35eed6=_0x528e78[_0x4b5d4b(0x13f)][_0x2c75b9['lockKey']];_0x4dd4db[_0x4b5d4b(0x149)]({'lockKey':_0x2c75b9[_0x4b5d4b(0x145)],'remoteId':_0x35eed6?.[_0x4b5d4b(0x157)]??0x0});}catch(_0x462f59){_0x211030['push']({'lockKey':_0x2c75b9['lockKey'],'error':_0x462f59 instanceof Error?_0x462f59[_0x4b5d4b(0x134)]:String(_0x462f59)});}}return _0x528e78[_0x4b5d4b(0x16b)]=new Date()[_0x4b5d4b(0x15d)](),await writeBffLockFile(_0xa23527[_0x4b5d4b(0x14a)],_0x4dba40),{'ok':_0x211030[_0x4b5d4b(0x165)]===0x0,'data':{'uploaded':_0x4dd4db,'skipped':_0xaabe11,'failed':_0x211030},'message':_0x4b5d4b(0x163)+_0x4dd4db[_0x4b5d4b(0x165)]+_0x4b5d4b(0x151)+_0xaabe11[_0x4b5d4b(0x165)]+_0x4b5d4b(0x144)+_0x211030['length']+_0x4b5d4b(0x13d)};}};async function getTargetFunctions(_0x13c8f6,_0x327371){const _0x2c500f=a30_0x2e997e,_0x30cb8f=_0x327371[_0x2c500f(0x152)](_0x2c500f(0x139)),_0x393038=_0x327371[_0x2c500f(0x152)](_0x2c500f(0x15b)),_0x2df2ba=normalizeBffType(_0x30cb8f)??undefined;if(_0x393038&&!_0x2df2ba)throw CliErrors['validation']('--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.');const _0x59509b=await scanLocalBffFunctions(_0x13c8f6,_0x2df2ba);if(_0x393038){const _0x21e5ee=_0x59509b[_0x2c500f(0x131)](_0x35ec99=>_0x35ec99[_0x2c500f(0x15b)]===_0x393038);if(_0x21e5ee[_0x2c500f(0x165)]===0x0)throw CliErrors[_0x2c500f(0x169)](_0x2c500f(0x13e)+_0x2df2ba+'/'+_0x393038);return _0x21e5ee;}return _0x59509b;}async function buildHookMaps(_0x33149a,_0x3e2754,_0x542812,_0x3f6b9d){const _0x4e35e9=a30_0x2e997e,_0x308cc7=_0x542812['some'](_0x291c45=>_0x291c45[_0x4e35e9(0x139)]===_0x4e35e9(0x159));if(!_0x308cc7)return{'aliasToDatasetCode':new Map(),'datasetCodeToId':new Map()};const _0x3ee748=loadAliasMap(_0x3e2754,_0x33149a),_0x3abe96=new Map(_0x3ee748[_0x4e35e9(0x13a)](_0x249e20=>[_0x249e20['alias'],_0x249e20['datasetCode']]));for(const _0x42cce0 of Object['values'](_0x3f6b9d[_0x4e35e9(0x13f)])){_0x42cce0['alias']&&_0x42cce0[_0x4e35e9(0x135)]&&!_0x3abe96[_0x4e35e9(0x164)](_0x42cce0[_0x4e35e9(0x166)])&&_0x3abe96['set'](_0x42cce0[_0x4e35e9(0x166)],_0x42cce0[_0x4e35e9(0x135)]);}const _0x4279d1=await listDatasets(_0x33149a),_0xd7c4d9=new Map(_0x4279d1[_0x4e35e9(0x13a)](_0x13e27c=>[_0x13e27c[_0x4e35e9(0x147)],_0x13e27c['id']]));return{'aliasToDatasetCode':_0x3abe96,'datasetCodeToId':_0xd7c4d9};}async function uploadSingleFunction(_0xd255fe,_0x8008e4,_0x8b5beb,_0x3edbc7){const _0x28e8eb=a30_0x2e997e,_0x472481=await readFile(_0x8008e4['filePath'],'utf8'),_0x217cac=await computeFileHash(_0x8008e4[_0x28e8eb(0x14f)]),_0x5ccbdb=_0x8b5beb[_0x28e8eb(0x13f)][_0x8008e4[_0x28e8eb(0x145)]];if(_0x5ccbdb?.[_0x28e8eb(0x157)]&&_0x5ccbdb[_0x28e8eb(0x136)]==null)throw CliErrors['validation'](_0x8008e4[_0x28e8eb(0x145)]+_0x28e8eb(0x146));let _0x2cebf5=extractScriptDescription(_0x472481);if(!_0x2cebf5&&_0x5ccbdb?.[_0x28e8eb(0x157)]){const _0x38fdcf=await getBffScriptInfo(_0x5ccbdb[_0x28e8eb(0x157)]);_0x2cebf5=_0x38fdcf[_0x28e8eb(0x14c)]||undefined;}const _0x85e41c={'appCode':_0xd255fe,'functionName':_0x8008e4['name'],'scriptType':_0x8008e4['type'],'scriptContent':_0x472481};if(_0x5ccbdb?.[_0x28e8eb(0x157)])_0x85e41c['id']=_0x5ccbdb[_0x28e8eb(0x157)];if(_0x5ccbdb?.[_0x28e8eb(0x136)]!=null)_0x85e41c[_0x28e8eb(0x136)]=_0x5ccbdb['version'];if(_0x2cebf5)_0x85e41c[_0x28e8eb(0x14c)]=_0x2cebf5;if(_0x8008e4[_0x28e8eb(0x139)]===_0x28e8eb(0x159)){const _0x23e547=_0x8008e4[_0x28e8eb(0x166)];if(!_0x23e547||!_0x8008e4['operationType']||!_0x8008e4[_0x28e8eb(0x153)])throw CliErrors[_0x28e8eb(0x169)]('Incomplete\x20HOOK\x20path:\x20'+_0x8008e4[_0x28e8eb(0x145)]);const _0x4fd4bb=_0x3edbc7[_0x28e8eb(0x154)][_0x28e8eb(0x130)](_0x23e547)??_0x5ccbdb?.[_0x28e8eb(0x135)]??_0x23e547,_0x1c176e=_0x3edbc7[_0x28e8eb(0x148)][_0x28e8eb(0x130)](_0x4fd4bb);if(!_0x1c176e)throw CliErrors[_0x28e8eb(0x169)](_0x28e8eb(0x15e)+_0x23e547+'\x22.\x20'+(_0x28e8eb(0x133)+CLI_BIN_NAME+_0x28e8eb(0x141)));_0x85e41c['datasetId']=_0x1c176e,_0x85e41c[_0x28e8eb(0x150)]=_0x8008e4[_0x28e8eb(0x150)],_0x85e41c[_0x28e8eb(0x153)]=_0x8008e4[_0x28e8eb(0x153)];}const _0x4e7254=await saveBffScript(_0x85e41c),_0x1353d7=await getBffScriptInfo(_0x4e7254),_0x4512ba={'hash':_0x217cac,'remoteId':_0x4e7254,'version':_0x1353d7[_0x28e8eb(0x136)]};if(_0x8008e4[_0x28e8eb(0x139)]==='HOOK'){const _0x3e67a8=_0x8008e4['alias'],_0x4727ea=_0x3edbc7[_0x28e8eb(0x154)][_0x28e8eb(0x130)](_0x3e67a8)??_0x5ccbdb?.[_0x28e8eb(0x135)]??_0x3e67a8;_0x3edbc7[_0x28e8eb(0x154)][_0x28e8eb(0x164)](_0x3e67a8)?_0x4512ba[_0x28e8eb(0x166)]=_0x3e67a8:_0x4512ba[_0x28e8eb(0x166)]=_0x5ccbdb?.[_0x28e8eb(0x166)],_0x4512ba[_0x28e8eb(0x135)]=_0x4727ea,_0x4512ba[_0x28e8eb(0x150)]=_0x8008e4['operationType'],_0x4512ba[_0x28e8eb(0x153)]=_0x8008e4['functionNode'];}_0x8b5beb['functions'][_0x8008e4['lockKey']]=_0x4512ba;}
@@ -1 +1 @@
1
- const a31_0xc94c1f=a31_0x446c;(function(_0x1d9363,_0x1ba0b8){const _0x221d3f=a31_0x446c,_0x2b1818=_0x1d9363();while(!![]){try{const _0x50508f=parseInt(_0x221d3f(0x1c9))/0x1+-parseInt(_0x221d3f(0x1a8))/0x2*(-parseInt(_0x221d3f(0x1b3))/0x3)+-parseInt(_0x221d3f(0x1c4))/0x4*(-parseInt(_0x221d3f(0x1bb))/0x5)+parseInt(_0x221d3f(0x1b9))/0x6*(parseInt(_0x221d3f(0x1bf))/0x7)+-parseInt(_0x221d3f(0x1ba))/0x8*(-parseInt(_0x221d3f(0x1b7))/0x9)+parseInt(_0x221d3f(0x1bd))/0xa*(-parseInt(_0x221d3f(0x1c3))/0xb)+-parseInt(_0x221d3f(0x1c7))/0xc;if(_0x50508f===_0x1ba0b8)break;else _0x2b1818['push'](_0x2b1818['shift']());}catch(_0x334a5a){_0x2b1818['push'](_0x2b1818['shift']());}}}(a31_0x4cc9,0xc2103));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';function a31_0x4cc9(){const _0x212ad2=['status','has','appCode','all','alias','183435SCzior','apiDir','\x20modified,\x20','functions','2277yfIfUs','lockFilePath','6lUOQDX','38088FzoCey','5JOFKKO','length','80bAgemj','remote','8795829gvgOpF','boolean','push','read','116875uiIUhc','938664hwLpHS','lockKey','map','38905500YfETnH','scriptsRoot','1365117CKVlVA','\x20added,\x20','filePath','2mFFTRH','bool','\x20unchanged','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','All\x20BFF\x20scripts\x20are\x20in\x20sync.','hash'];a31_0x4cc9=function(){return _0x212ad2;};return a31_0x4cc9();}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';function a31_0x446c(_0x42f88c,_0x429dae){_0x42f88c=_0x42f88c-0x1a7;const _0x4cc9d1=a31_0x4cc9();let _0x446cb5=_0x4cc9d1[_0x42f88c];return _0x446cb5;}export const bffStatus={'service':'bff','command':'status','description':a31_0xc94c1f(0x1ab),'risk':a31_0xc94c1f(0x1c2),'flags':[{'name':a31_0xc94c1f(0x1be),'type':a31_0xc94c1f(0x1c0),'description':'Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally'}],async 'execute'(_0x46f953){const _0x2b948c=a31_0xc94c1f,_0x2ccfdc=loadBffProjectConfig(_0x46f953[_0x2b948c(0x1b0)]),_0x3d75b0=await readBffLockFile(_0x2ccfdc[_0x2b948c(0x1b8)]),{appLock:_0x4ec468}=ensureLockScope(_0x3d75b0??createEmptyBffLock(),_0x2ccfdc['appCode'],_0x2ccfdc[_0x2b948c(0x1c8)],_0x2b948c(0x1ae),_0x2ccfdc[_0x2b948c(0x1b0)],_0x2ccfdc['scriptsWorkspaceRoot']+'/'+_0x2ccfdc['appCode']),_0x1f4783=await scanLocalBffFunctions(_0x2ccfdc),_0x318d13=[],_0x30ed72=[],_0x340b4c=[];for(const _0x4847d2 of _0x1f4783){const _0x24143d=await computeFileHash(_0x4847d2[_0x2b948c(0x1a7)]),_0x26718a=_0x4ec468[_0x2b948c(0x1b6)][_0x4847d2[_0x2b948c(0x1c5)]];if(!_0x26718a)_0x318d13[_0x2b948c(0x1c1)](_0x4847d2['lockKey']);else _0x26718a[_0x2b948c(0x1ad)]!==_0x24143d?_0x30ed72[_0x2b948c(0x1c1)](_0x4847d2[_0x2b948c(0x1c5)]):_0x340b4c[_0x2b948c(0x1c1)](_0x4847d2[_0x2b948c(0x1c5)]);}const _0x3d8e73=[];if(_0x46f953[_0x2b948c(0x1a9)]('remote')){const _0x569236=loadAliasMap(_0x46f953[_0x2b948c(0x1b4)]),_0x768f72=new Map(_0x569236['map'](_0x1bccd5=>[_0x1bccd5['datasetCode'],_0x1bccd5[_0x2b948c(0x1b2)]])),[_0x20fa56,_0x488576]=await Promise[_0x2b948c(0x1b1)]([listBffScripts(_0x46f953['appCode']),getBffScriptStatistics(_0x46f953[_0x2b948c(0x1b0)])]),_0x423c4c=createHookLocationMap(_0x488576),_0x4a5c3a=new Set(_0x1f4783[_0x2b948c(0x1c6)](_0x342e75=>_0x342e75[_0x2b948c(0x1c5)]));for(const _0x2e3632 of _0x20fa56){const _0x247ef0=resolveRemoteScriptTarget(_0x2ccfdc,_0x2e3632,_0x423c4c,_0x4ec468[_0x2b948c(0x1b6)],_0x768f72);_0x247ef0&&!_0x4a5c3a[_0x2b948c(0x1af)](_0x247ef0[_0x2b948c(0x1c5)])&&_0x3d8e73[_0x2b948c(0x1c1)](_0x247ef0[_0x2b948c(0x1c5)]);}}const _0x4babce=_0x318d13[_0x2b948c(0x1bc)]===0x0&&_0x30ed72['length']===0x0&&_0x3d8e73[_0x2b948c(0x1bc)]===0x0;return{'ok':!![],'data':{'added':_0x318d13,'modified':_0x30ed72,'unchanged':_0x340b4c,'remoteOnly':_0x3d8e73},'message':_0x4babce?_0x2b948c(0x1ac):_0x318d13[_0x2b948c(0x1bc)]+_0x2b948c(0x1ca)+_0x30ed72[_0x2b948c(0x1bc)]+_0x2b948c(0x1b5)+_0x340b4c[_0x2b948c(0x1bc)]+_0x2b948c(0x1aa)+(_0x3d8e73[_0x2b948c(0x1bc)]>0x0?',\x20'+_0x3d8e73['length']+'\x20remote-only':'')};}};
1
+ const a31_0x3ab361=a31_0x387a;(function(_0x2a931e,_0x236684){const _0x5b3056=a31_0x387a,_0x5a1f44=_0x2a931e();while(!![]){try{const _0xcbb0d7=parseInt(_0x5b3056(0x126))/0x1*(parseInt(_0x5b3056(0x115))/0x2)+-parseInt(_0x5b3056(0x116))/0x3*(-parseInt(_0x5b3056(0x11d))/0x4)+parseInt(_0x5b3056(0x110))/0x5+-parseInt(_0x5b3056(0x111))/0x6*(parseInt(_0x5b3056(0x120))/0x7)+parseInt(_0x5b3056(0x124))/0x8*(-parseInt(_0x5b3056(0x123))/0x9)+-parseInt(_0x5b3056(0x125))/0xa+-parseInt(_0x5b3056(0x127))/0xb;if(_0xcbb0d7===_0x236684)break;else _0x5a1f44['push'](_0x5a1f44['shift']());}catch(_0x25820e){_0x5a1f44['push'](_0x5a1f44['shift']());}}}(a31_0x17ad,0xe4524));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{loadBffProjectConfig}from'../../core/bff/config.js';function a31_0x387a(_0x5048bf,_0x5a47f0){_0x5048bf=_0x5048bf-0x10a;const _0x17ada1=a31_0x17ad();let _0x387aac=_0x17ada1[_0x5048bf];return _0x387aac;}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';function a31_0x17ad(){const _0x5c2c0f=['\x20added,\x20','bool','18REjTMi','1588184SkwOAF','3373200wqQlXa','281ptfZsz','18026690WArlQC','map','push','\x20remote-only','remote','length','lockFilePath','filePath','datasetCode','bff','appCode','261780yYxuMc','1734ZwsOFL','\x20modified,\x20','apiDir','functions','11254MRgPxL','83595IpuGIB','lockKey','alias','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','all','boolean','has','260KoJsFv','scriptsRoot','status','3304ItQSoB'];a31_0x17ad=function(){return _0x5c2c0f;};return a31_0x17ad();}export const bffStatus={'service':a31_0x3ab361(0x10e),'command':a31_0x3ab361(0x11f),'description':a31_0x3ab361(0x119),'risk':'read','flags':[{'name':a31_0x3ab361(0x12b),'type':a31_0x3ab361(0x11b),'description':'Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally'}],async 'execute'(_0x3a83fb){const _0x1018d5=a31_0x3ab361,_0x2ab561=loadBffProjectConfig(_0x3a83fb[_0x1018d5(0x10f)]),_0xf565a=await readBffLockFile(_0x2ab561[_0x1018d5(0x10b)]),{appLock:_0x13a720}=ensureLockScope(_0xf565a??createEmptyBffLock(),_0x3a83fb['appCode'],_0x2ab561[_0x1018d5(0x11e)],'status'),_0x1cbf36=await scanLocalBffFunctions(_0x2ab561),_0x29e2e4=[],_0x4e2607=[],_0x58245f=[];for(const _0x4d112d of _0x1cbf36){const _0x4d5ea8=await computeFileHash(_0x4d112d[_0x1018d5(0x10c)]),_0x19417c=_0x13a720['functions'][_0x4d112d[_0x1018d5(0x117)]];if(!_0x19417c)_0x29e2e4[_0x1018d5(0x129)](_0x4d112d[_0x1018d5(0x117)]);else _0x19417c['hash']!==_0x4d5ea8?_0x4e2607['push'](_0x4d112d[_0x1018d5(0x117)]):_0x58245f['push'](_0x4d112d[_0x1018d5(0x117)]);}const _0x1de5d1=[];if(_0x3a83fb[_0x1018d5(0x122)](_0x1018d5(0x12b))){const _0x41353f=loadAliasMap(_0x3a83fb[_0x1018d5(0x113)],_0x3a83fb['appCode']),_0x234501=new Map(_0x41353f['map'](_0x55f35c=>[_0x55f35c[_0x1018d5(0x10d)],_0x55f35c[_0x1018d5(0x118)]])),[_0xcc7d03,_0x53f7be]=await Promise[_0x1018d5(0x11a)]([listBffScripts(_0x3a83fb['appCode']),getBffScriptStatistics(_0x3a83fb[_0x1018d5(0x10f)])]),_0x560988=createHookLocationMap(_0x53f7be),_0x301580=new Set(_0x1cbf36[_0x1018d5(0x128)](_0x370074=>_0x370074[_0x1018d5(0x117)]));for(const _0x320172 of _0xcc7d03){const _0xd9bb1b=resolveRemoteScriptTarget(_0x2ab561,_0x320172,_0x560988,_0x13a720[_0x1018d5(0x114)],_0x234501);_0xd9bb1b&&!_0x301580[_0x1018d5(0x11c)](_0xd9bb1b['lockKey'])&&_0x1de5d1[_0x1018d5(0x129)](_0xd9bb1b['lockKey']);}}const _0x379497=_0x29e2e4[_0x1018d5(0x10a)]===0x0&&_0x4e2607['length']===0x0&&_0x1de5d1[_0x1018d5(0x10a)]===0x0;return{'ok':!![],'data':{'added':_0x29e2e4,'modified':_0x4e2607,'unchanged':_0x58245f,'remoteOnly':_0x1de5d1},'message':_0x379497?'All\x20BFF\x20scripts\x20are\x20in\x20sync.':_0x29e2e4[_0x1018d5(0x10a)]+_0x1018d5(0x121)+_0x4e2607['length']+_0x1018d5(0x112)+_0x58245f[_0x1018d5(0x10a)]+'\x20unchanged'+(_0x1de5d1['length']>0x0?',\x20'+_0x1de5d1[_0x1018d5(0x10a)]+_0x1018d5(0x12a):'')};}};
@@ -1 +1 @@
1
- function a32_0x4061(){const _0x1c70d8=['项目构建出错','inherit','265635BJoENs','pipe','run','5909724bJbtSm','6115204bBMKtt','npm\x20run\x20build','1621249MgxABt','88awfJnA','success','8457860jcDUTY','开始构建项目','5GkqyzO','2ZadWSS','node_modules','Build\x20project','now','toString','trim','4887966hghQah','logger','cwd','error','684146bfssGF','npm','npm\x20run\x20build\x20exited\x20with\x20code\x20','stderr','项目构建失败','build'];a32_0x4061=function(){return _0x1c70d8;};return a32_0x4061();}const a32_0x3e5f6f=a32_0x4add;function a32_0x4add(_0x97188a,_0x381dbf){_0x97188a=_0x97188a-0x13a;const _0x4061f9=a32_0x4061();let _0x4added=_0x4061f9[_0x97188a];return _0x4added;}(function(_0x469fb3,_0x59ea9c){const _0x52030f=a32_0x4add,_0x552571=_0x469fb3();while(!![]){try{const _0x513bf9=-parseInt(_0x52030f(0x13e))/0x1*(parseInt(_0x52030f(0x152))/0x2)+-parseInt(_0x52030f(0x13a))/0x3+-parseInt(_0x52030f(0x14a))/0x4*(-parseInt(_0x52030f(0x151))/0x5)+parseInt(_0x52030f(0x149))/0x6+parseInt(_0x52030f(0x14c))/0x7+parseInt(_0x52030f(0x14d))/0x8*(-parseInt(_0x52030f(0x146))/0x9)+parseInt(_0x52030f(0x14f))/0xa;if(_0x513bf9===_0x59ea9c)break;else _0x552571['push'](_0x552571['shift']());}catch(_0x426c55){_0x552571['push'](_0x552571['shift']());}}}(a32_0x4061,0xe8ab7));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function runBuild(_0x4323b5){return new Promise((_0x2fee8f,_0x53408d)=>{const _0x48a0a7=a32_0x4add,_0x3613a6=Date['now']();_0x4323b5[_0x48a0a7(0x13b)]['info']('build',_0x48a0a7(0x150),{'command':_0x48a0a7(0x14b)});let _0x4b11b2='';const _0x527ae6=spawn(_0x48a0a7(0x13f),[_0x48a0a7(0x148),'build'],{'stdio':[_0x48a0a7(0x145),_0x48a0a7(0x145),_0x48a0a7(0x147)],'shell':!![],'env':{...process.env,'PATH':''+join(process[_0x48a0a7(0x13c)](),_0x48a0a7(0x153),'.bin')+delimiter+process.env.PATH}});_0x527ae6[_0x48a0a7(0x141)]?.['on']('data',_0xc6fa32=>{const _0x3e804c=_0x48a0a7;_0x4b11b2+=_0xc6fa32[_0x3e804c(0x156)]();}),_0x527ae6['on']('close',_0x50720c=>{const _0x45dec6=_0x48a0a7,_0x29c4d8=Date['now']()-_0x3613a6;if(_0x50720c===0x0||_0x50720c===null)_0x4323b5['logger'][_0x45dec6(0x14e)](_0x45dec6(0x143),'项目构建成功',_0x29c4d8),_0x2fee8f();else{const _0x3af66b={'exitCode':_0x50720c,'duration':_0x29c4d8,'command':_0x45dec6(0x14b),'cwd':process[_0x45dec6(0x13c)]()};_0x4b11b2[_0x45dec6(0x157)]()&&(_0x3af66b[_0x45dec6(0x141)]=_0x4b11b2[_0x45dec6(0x157)]()),_0x4323b5[_0x45dec6(0x13b)]['error'](_0x45dec6(0x143),_0x45dec6(0x142),_0x3af66b),_0x53408d(new Error(_0x45dec6(0x140)+_0x50720c));}}),_0x527ae6['on'](_0x48a0a7(0x13d),_0x3bd6a8=>{const _0x6f63a8=_0x48a0a7,_0x31fcc3=Date[_0x6f63a8(0x155)]()-_0x3613a6;_0x4323b5[_0x6f63a8(0x13b)]['error'](_0x6f63a8(0x143),_0x6f63a8(0x144),{'error':_0x3bd6a8['message'],'duration':_0x31fcc3,'stderr':_0x4b11b2[_0x6f63a8(0x157)]()||undefined}),_0x53408d(_0x3bd6a8);});});}export const buildCommand={'name':a32_0x3e5f6f(0x143),'description':a32_0x3e5f6f(0x154),async 'run'(_0x1a335d,_0x1408a2,_0x1b1317){await runBuild(_0x1a335d);}};
1
+ function a32_0x57df(_0x2703dd,_0x239603){_0x2703dd=_0x2703dd-0xed;const _0x3a70da=a32_0x3a70();let _0x57df9a=_0x3a70da[_0x2703dd];return _0x57df9a;}const a32_0x571403=a32_0x57df;(function(_0x17ef3f,_0x45b661){const _0x2f3f1d=a32_0x57df,_0x326ad2=_0x17ef3f();while(!![]){try{const _0x5e4593=parseInt(_0x2f3f1d(0xf4))/0x1+-parseInt(_0x2f3f1d(0x101))/0x2*(parseInt(_0x2f3f1d(0x10b))/0x3)+-parseInt(_0x2f3f1d(0xff))/0x4+parseInt(_0x2f3f1d(0xee))/0x5+-parseInt(_0x2f3f1d(0xf5))/0x6*(parseInt(_0x2f3f1d(0x102))/0x7)+parseInt(_0x2f3f1d(0xf2))/0x8*(parseInt(_0x2f3f1d(0xf3))/0x9)+parseInt(_0x2f3f1d(0xfc))/0xa;if(_0x5e4593===_0x45b661)break;else _0x326ad2['push'](_0x326ad2['shift']());}catch(_0x5b566b){_0x326ad2['push'](_0x326ad2['shift']());}}}(a32_0x3a70,0xb218e));import{delimiter,join}from'node:path';function a32_0x3a70(){const _0x3510b0=['1800970jMGjqy','message','项目构建成功','toString','48wskQBC','852273efNDLn','413379HBrDbT','5081082LYtzyO','项目构建失败','.bin','close','logger','inherit','npm','17026200GHRacV','cwd','项目构建出错','649856NyQJVm','data','1244UQHejB','7dvWoxq','npm\x20run\x20build\x20exited\x20with\x20code\x20','info','npm\x20run\x20build','now','开始构建项目','trim','success','error','6297auOdeE','build','stderr','run'];a32_0x3a70=function(){return _0x3510b0;};return a32_0x3a70();}import{spawn}from'node:child_process';function runBuild(_0x869533){return new Promise((_0x4c0673,_0x383974)=>{const _0x510143=a32_0x57df,_0x2cfb60=Date[_0x510143(0x106)]();_0x869533[_0x510143(0xf9)][_0x510143(0x104)](_0x510143(0x10c),_0x510143(0x107),{'command':'npm\x20run\x20build'});let _0x68cdaf='';const _0x150e1c=spawn(_0x510143(0xfb),[_0x510143(0xed),_0x510143(0x10c)],{'stdio':['inherit',_0x510143(0xfa),'pipe'],'shell':!![],'env':{...process.env,'PATH':''+join(process[_0x510143(0xfd)](),'node_modules',_0x510143(0xf7))+delimiter+process.env.PATH}});_0x150e1c['stderr']?.['on'](_0x510143(0x100),_0x1743ca=>{const _0x1d525d=_0x510143;_0x68cdaf+=_0x1743ca[_0x1d525d(0xf1)]();}),_0x150e1c['on'](_0x510143(0xf8),_0xcdce77=>{const _0x3db657=_0x510143,_0x5c648e=Date['now']()-_0x2cfb60;if(_0xcdce77===0x0||_0xcdce77===null)_0x869533[_0x3db657(0xf9)][_0x3db657(0x109)](_0x3db657(0x10c),_0x3db657(0xf0),_0x5c648e),_0x4c0673();else{const _0x39a515={'exitCode':_0xcdce77,'duration':_0x5c648e,'command':_0x3db657(0x105),'cwd':process['cwd']()};_0x68cdaf[_0x3db657(0x108)]()&&(_0x39a515[_0x3db657(0x10d)]=_0x68cdaf['trim']()),_0x869533[_0x3db657(0xf9)][_0x3db657(0x10a)](_0x3db657(0x10c),_0x3db657(0xf6),_0x39a515),_0x383974(new Error(_0x3db657(0x103)+_0xcdce77));}}),_0x150e1c['on'](_0x510143(0x10a),_0x281d87=>{const _0x4eb8c3=_0x510143,_0x4b4571=Date[_0x4eb8c3(0x106)]()-_0x2cfb60;_0x869533[_0x4eb8c3(0xf9)][_0x4eb8c3(0x10a)](_0x4eb8c3(0x10c),_0x4eb8c3(0xfe),{'error':_0x281d87[_0x4eb8c3(0xef)],'duration':_0x4b4571,'stderr':_0x68cdaf['trim']()||undefined}),_0x383974(_0x281d87);});});}export const buildCommand={'name':a32_0x571403(0x10c),'description':'Build\x20project',async 'run'(_0x1ed986,_0x56b1e0,_0x538879){await runBuild(_0x1ed986);}};
@@ -1 +1 @@
1
- const a33_0x1109b4=a33_0xbebc;function a33_0x3a51(){const _0x2ab26c=['version','Checking\x20for\x20updates...','install','message','npm','48795384JSmJED','bun','coerce','Update\x20failed','Updated\x20to\x20v','red','740677UHhuJH','Already\x20up\x20to\x20date\x20(v','/latest','green','12cSVNOu','json','4008855DXgkYL','cli','Unable\x20to\x20check\x20for\x20updates','slice','unknown','start','info','Update\x20available:\x20','4010605eAuGOc','succeed','gray','pipe','timeout','1821219oUSmbC','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','@latest','3083654udcALN','toLowerCase','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','fail','log','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','6519584hXlyPf','\x20install\x20-g\x20','execPath','update','Updating\x20via\x20'];a33_0x3a51=function(){return _0x2ab26c;};return a33_0x3a51();}(function(_0x3ef4be,_0x20b7b4){const _0x3ac4e0=a33_0xbebc,_0x56f348=_0x3ef4be();while(!![]){try{const _0x369b4d=-parseInt(_0x3ac4e0(0x1bb))/0x1+-parseInt(_0x3ac4e0(0x192))/0x2+parseInt(_0x3ac4e0(0x1ae))/0x3+-parseInt(_0x3ac4e0(0x198))/0x4+-parseInt(_0x3ac4e0(0x1b6))/0x5*(parseInt(_0x3ac4e0(0x1ac))/0x6)+parseInt(_0x3ac4e0(0x1a8))/0x7+parseInt(_0x3ac4e0(0x1a2))/0x8;if(_0x369b4d===_0x20b7b4)break;else _0x56f348['push'](_0x56f348['shift']());}catch(_0x34ae92){_0x56f348['push'](_0x56f348['shift']());}}}(a33_0x3a51,0xe68cf));import a33_0x558905 from'chalk';import a33_0x2635ea from'ora';import a33_0x468af5 from'semver';import{execa}from'execa';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{getCdnConfig}from'../utils/cdn-config.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x2884be=a33_0xbebc;return GIT_COMMIT!==_0x2884be(0x1b2)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x2884be(0x1b1)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x506034=a33_0xbebc,_0x136722=process[_0x506034(0x19a)][_0x506034(0x193)]();if(_0x136722['includes'](_0x506034(0x1a3)))return'bun';return'npm';}async function fetchLatestNpmVersion(){const _0x4a04db=a33_0xbebc;try{const _0x234873=await fetch('https://registry.npmjs.org/'+NPM_PACKAGE_NAME+_0x4a04db(0x1aa),{'signal':AbortSignal[_0x4a04db(0x1ba)](0x2710)});if(!_0x234873['ok'])return null;const _0x187cdc=await _0x234873[_0x4a04db(0x1ad)]();return _0x187cdc[_0x4a04db(0x19d)]??null;}catch{return null;}}async function fetchLatestVersion(){const _0xe72516=a33_0xbebc,_0x3a7a62=await fetchLatestNpmVersion();if(_0x3a7a62)return _0x3a7a62;const _0x303bde=await getCdnConfig();return _0x303bde?.[_0xe72516(0x1af)]?.['stableVersion']??null;}async function execute(_0x3e68cc){const _0x541425=a33_0xbebc,_0x2a4fd9=getCurrentVersion();console[_0x541425(0x196)]('Current\x20version:\x20'+_0x2a4fd9);const _0x3ff978=a33_0x2635ea(_0x541425(0x19e))[_0x541425(0x1b3)](),_0x111b51=await fetchLatestVersion();if(!_0x111b51)return _0x3ff978[_0x541425(0x195)](_0x541425(0x197)),console[_0x541425(0x196)](a33_0x558905[_0x541425(0x1b8)]('\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@latest')),{'ok':![],'message':_0x541425(0x1b0)};const _0x51319c=a33_0x468af5[_0x541425(0x1a4)](_0x2a4fd9),_0x5f9753=a33_0x468af5[_0x541425(0x1a4)](_0x111b51);if(!_0x51319c||!_0x5f9753)return _0x3ff978[_0x541425(0x195)]('Version\x20comparison\x20failed'),{'ok':![],'message':'Version\x20comparison\x20failed'};if(!a33_0x468af5['lt'](_0x51319c,_0x5f9753))return _0x3ff978[_0x541425(0x1b7)](_0x541425(0x1a9)+_0x111b51+')'),{'ok':!![]};_0x3ff978[_0x541425(0x1b4)](_0x541425(0x1b5)+a33_0x558905['yellow'](_0x2a4fd9)+'\x20→\x20'+a33_0x558905[_0x541425(0x1ab)](_0x111b51));const _0x4bf18b=detectPackageManager(),_0x53f2a0=_0x4bf18b===_0x541425(0x1a1)?resolveNpmBin('npm'):_0x4bf18b,_0x4a24d7=a33_0x2635ea(_0x541425(0x19c)+_0x4bf18b+'...')[_0x541425(0x1b3)]();try{return await execa(_0x53f2a0,[_0x541425(0x19f),'-g',NPM_PACKAGE_NAME+_0x541425(0x191)],{'stdio':_0x541425(0x1b9)}),_0x4a24d7[_0x541425(0x1b7)](_0x541425(0x1a6)+_0x111b51),console[_0x541425(0x196)](a33_0x558905[_0x541425(0x1b8)](_0x541425(0x194))),{'ok':!![]};}catch(_0x261ef4){return _0x4a24d7['fail'](_0x541425(0x1a5)),console['error'](a33_0x558905[_0x541425(0x1a7)]('\x20\x20'+_0x261ef4[_0x541425(0x1a0)])),console[_0x541425(0x196)](a33_0x558905[_0x541425(0x1b8)]('\x20\x20Try\x20manually:\x20'+_0x4bf18b+_0x541425(0x199)+NPM_PACKAGE_NAME+_0x541425(0x191))),{'ok':![],'message':_0x261ef4[_0x541425(0x1a0)]};}}function a33_0xbebc(_0x33094f,_0x24e2d9){_0x33094f=_0x33094f-0x190;const _0x3a5155=a33_0x3a51();let _0xbebc61=_0x3a5155[_0x33094f];return _0xbebc61;}export const updateDefinition={'service':a33_0x1109b4(0x19b),'command':'run','description':a33_0x1109b4(0x190),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
1
+ const a33_0x2a94e9=a33_0x31eb;(function(_0xe8fcab,_0x15763d){const _0x478e7c=a33_0x31eb,_0x3e39ad=_0xe8fcab();while(!![]){try{const _0x510b49=parseInt(_0x478e7c(0x1db))/0x1+-parseInt(_0x478e7c(0x1d6))/0x2*(parseInt(_0x478e7c(0x1da))/0x3)+-parseInt(_0x478e7c(0x1bb))/0x4*(-parseInt(_0x478e7c(0x1ca))/0x5)+-parseInt(_0x478e7c(0x1c1))/0x6+parseInt(_0x478e7c(0x1d3))/0x7+parseInt(_0x478e7c(0x1d2))/0x8+parseInt(_0x478e7c(0x1d1))/0x9;if(_0x510b49===_0x15763d)break;else _0x3e39ad['push'](_0x3e39ad['shift']());}catch(_0x16b091){_0x3e39ad['push'](_0x3e39ad['shift']());}}}(a33_0xb34b,0xab8b4));import a33_0x5cb1bd from'chalk';import a33_0xb9f084 from'ora';import a33_0x33d5d0 from'semver';import{execa}from'execa';import{NPM_PACKAGE_NAME}from'../constant/cli.js';function a33_0xb34b(){const _0x322351=['pipe','succeed','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','Version\x20comparison\x20failed','json','https://registry.npmjs.org/','5284386lLGSHS','9315600PCcgpL','1256367hBoykJ','cli','\x20install\x20-g\x20','2doZdsJ','version','@latest','/latest','2825727LQIUCT','375114eEFrsz','bun','toLowerCase','timeout','red','Current\x20version:\x20','Updated\x20to\x20v','log','includes','...','start','unknown','error','Checking\x20for\x20updates...','Already\x20up\x20to\x20date\x20(v','write','fail','coerce','info','2812NJuici','Unable\x20to\x20check\x20for\x20updates','\x20→\x20','execPath','Update\x20failed','gray','5264802UubRFZ','stableVersion','npm','\x20\x20Try\x20manually:\x20','install','Updating\x20via\x20','message','update','run','1535picHhI'];a33_0xb34b=function(){return _0x322351;};return a33_0xb34b();}import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{getCdnConfig}from'../utils/cdn-config.js';function a33_0x31eb(_0x49563a,_0x5e03f7){_0x49563a=_0x49563a-0x1af;const _0xb34bd0=a33_0xb34b();let _0x31eb59=_0xb34bd0[_0x49563a];return _0x31eb59;}import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x3d9752=a33_0x31eb;return GIT_COMMIT!==_0x3d9752(0x1b3)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x7a9541=a33_0x31eb,_0x12edf6=process[_0x7a9541(0x1be)][_0x7a9541(0x1dd)]();if(_0x12edf6[_0x7a9541(0x1b0)](_0x7a9541(0x1dc)))return _0x7a9541(0x1dc);return _0x7a9541(0x1c3);}async function fetchLatestNpmVersion(){const _0x3f39bf=a33_0x31eb;try{const _0x4113e6=await fetch(_0x3f39bf(0x1d0)+NPM_PACKAGE_NAME+_0x3f39bf(0x1d9),{'signal':AbortSignal[_0x3f39bf(0x1de)](0x2710)});if(!_0x4113e6['ok'])return null;const _0x3e9c11=await _0x4113e6[_0x3f39bf(0x1cf)]();return _0x3e9c11[_0x3f39bf(0x1d7)]??null;}catch{return null;}}async function fetchLatestVersion(){const _0x5bf8e2=a33_0x31eb,_0x324509=await fetchLatestNpmVersion();if(_0x324509)return _0x324509;const _0x48976b=await getCdnConfig();return _0x48976b?.[_0x5bf8e2(0x1d4)]?.[_0x5bf8e2(0x1c2)]??null;}async function execute(_0x2896c8){const _0x2ab1aa=a33_0x31eb,_0x29efac=getCurrentVersion();console['log'](_0x2ab1aa(0x1e0)+_0x29efac);const _0x351373=a33_0xb9f084(_0x2ab1aa(0x1b5))[_0x2ab1aa(0x1b2)](),_0xd4af5=await fetchLatestVersion();if(!_0xd4af5)return _0x351373[_0x2ab1aa(0x1b8)](_0x2ab1aa(0x1cd)),console[_0x2ab1aa(0x1af)](a33_0x5cb1bd['gray']('\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20'+NPM_PACKAGE_NAME+_0x2ab1aa(0x1d8))),{'ok':![],'message':_0x2ab1aa(0x1bc)};const _0x499d3d=a33_0x33d5d0[_0x2ab1aa(0x1b9)](_0x29efac),_0x5eac7a=a33_0x33d5d0[_0x2ab1aa(0x1b9)](_0xd4af5);if(!_0x499d3d||!_0x5eac7a)return _0x351373['fail'](_0x2ab1aa(0x1ce)),{'ok':![],'message':'Version\x20comparison\x20failed'};if(!a33_0x33d5d0['lt'](_0x499d3d,_0x5eac7a))return _0x351373['succeed'](_0x2ab1aa(0x1b6)+_0xd4af5+')'),{'ok':!![]};_0x351373[_0x2ab1aa(0x1ba)]('Update\x20available:\x20'+a33_0x5cb1bd['yellow'](_0x29efac)+_0x2ab1aa(0x1bd)+a33_0x5cb1bd['green'](_0xd4af5));const _0x4fee30=detectPackageManager(),_0x213568=_0x4fee30===_0x2ab1aa(0x1c3)?resolveNpmBin(_0x2ab1aa(0x1c3)):_0x4fee30,_0x3c438a=a33_0xb9f084(_0x2ab1aa(0x1c6)+_0x4fee30+_0x2ab1aa(0x1b1))[_0x2ab1aa(0x1b2)]();try{return await execa(_0x213568,[_0x2ab1aa(0x1c5),'-g',NPM_PACKAGE_NAME+'@latest'],{'stdio':_0x2ab1aa(0x1cb)}),_0x3c438a[_0x2ab1aa(0x1cc)](_0x2ab1aa(0x1e1)+_0xd4af5),console['log'](a33_0x5cb1bd[_0x2ab1aa(0x1c0)]('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.')),{'ok':!![]};}catch(_0xdb65e0){return _0x3c438a[_0x2ab1aa(0x1b8)](_0x2ab1aa(0x1bf)),console[_0x2ab1aa(0x1b4)](a33_0x5cb1bd[_0x2ab1aa(0x1df)]('\x20\x20'+_0xdb65e0[_0x2ab1aa(0x1c7)])),console[_0x2ab1aa(0x1af)](a33_0x5cb1bd[_0x2ab1aa(0x1c0)](_0x2ab1aa(0x1c4)+_0x4fee30+_0x2ab1aa(0x1d5)+NPM_PACKAGE_NAME+_0x2ab1aa(0x1d8))),{'ok':![],'message':_0xdb65e0[_0x2ab1aa(0x1c7)]};}}export const updateDefinition={'service':a33_0x2a94e9(0x1c8),'command':a33_0x2a94e9(0x1c9),'description':'Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','risk':a33_0x2a94e9(0x1b7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
@@ -1 +1 @@
1
- function a34_0x5f4b(){const _0x463e1f=['3169220QQsVdz','2338HBIGYu','3kzcZUp','542006LtvKqt','4GTukey','141813TfJmdf','1545370YYTvwY','1450509wMUcrZ','2540164LTshcz','344EXhQxc','9420hLURvq'];a34_0x5f4b=function(){return _0x463e1f;};return a34_0x5f4b();}function a34_0x211a(_0x33852a,_0x58e481){_0x33852a=_0x33852a-0xc9;const _0x5f4bb9=a34_0x5f4b();let _0x211a09=_0x5f4bb9[_0x33852a];return _0x211a09;}(function(_0x1ab251,_0x52b07d){const _0x4b1bd1=a34_0x211a,_0x5a593a=_0x1ab251();while(!![]){try{const _0x3d7215=-parseInt(_0x4b1bd1(0xce))/0x1*(-parseInt(_0x4b1bd1(0xcf))/0x2)+-parseInt(_0x4b1bd1(0xd3))/0x3*(parseInt(_0x4b1bd1(0xd0))/0x4)+-parseInt(_0x4b1bd1(0xd2))/0x5+-parseInt(_0x4b1bd1(0xcb))/0x6*(-parseInt(_0x4b1bd1(0xcd))/0x7)+-parseInt(_0x4b1bd1(0xca))/0x8*(parseInt(_0x4b1bd1(0xd1))/0x9)+parseInt(_0x4b1bd1(0xcc))/0xa+parseInt(_0x4b1bd1(0xc9))/0xb;if(_0x3d7215===_0x52b07d)break;else _0x5a593a['push'](_0x5a593a['shift']());}catch(_0x668c7c){_0x5a593a['push'](_0x5a593a['shift']());}}}(a34_0x5f4b,0x65583));import{codegenSdk}from'./sdk.js';import{codegenSql}from'./sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
1
+ (function(_0x471a46,_0x25c733){const _0x269c2d=a34_0x1e05,_0x586933=_0x471a46();while(!![]){try{const _0x57c1f9=-parseInt(_0x269c2d(0x18e))/0x1*(parseInt(_0x269c2d(0x18d))/0x2)+parseInt(_0x269c2d(0x193))/0x3+parseInt(_0x269c2d(0x18f))/0x4*(-parseInt(_0x269c2d(0x18c))/0x5)+parseInt(_0x269c2d(0x190))/0x6+-parseInt(_0x269c2d(0x196))/0x7*(-parseInt(_0x269c2d(0x192))/0x8)+parseInt(_0x269c2d(0x195))/0x9+parseInt(_0x269c2d(0x194))/0xa*(parseInt(_0x269c2d(0x191))/0xb);if(_0x57c1f9===_0x25c733)break;else _0x586933['push'](_0x586933['shift']());}catch(_0x1b8a46){_0x586933['push'](_0x586933['shift']());}}}(a34_0x36d2,0x906a7));function a34_0x1e05(_0x178367,_0xac512b){_0x178367=_0x178367-0x18c;const _0x36d2bd=a34_0x36d2();let _0x1e0590=_0x36d2bd[_0x178367];return _0x1e0590;}import{codegenSdk}from'./sdk.js';import{codegenSql}from'./sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];function a34_0x36d2(){const _0x259e5d=['1644201dwGaED','28bRqefm','2882605qOVbdY','113504EPvKzT','19EirgID','4sBJFjl','2335302ctzfhM','14074313sKtNQs','183008escmRt','910329XhzrLy','10XKWFDd'];a34_0x36d2=function(){return _0x259e5d;};return a34_0x36d2();}