@lovrabet/rabetbase-cli 2.1.1-beta.0 → 2.1.2-beta.0

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 (162) 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/login-success-html.js +1 -0
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -0
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/add.js +1 -1
  20. package/lib/commands/app/discover.js +1 -0
  21. package/lib/commands/app/index.js +1 -1
  22. package/lib/commands/app/list.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app/use.js +1 -1
  26. package/lib/commands/auth/index.js +1 -1
  27. package/lib/commands/bff/delete.js +1 -1
  28. package/lib/commands/bff/detail.js +1 -1
  29. package/lib/commands/bff/index.js +1 -1
  30. package/lib/commands/bff/list.js +1 -1
  31. package/lib/commands/bff/new.js +1 -1
  32. package/lib/commands/bff/pull.js +1 -1
  33. package/lib/commands/bff/push.js +1 -1
  34. package/lib/commands/bff/status.js +1 -1
  35. package/lib/commands/cli-update.js +1 -1
  36. package/lib/commands/codegen/index.js +1 -1
  37. package/lib/commands/codegen/sdk.js +1 -1
  38. package/lib/commands/codegen/sql.js +1 -1
  39. package/lib/commands/common/app-selector.js +1 -1
  40. package/lib/commands/common/flags.js +1 -1
  41. package/lib/commands/common/validate.js +1 -1
  42. package/lib/commands/config/get.js +1 -1
  43. package/lib/commands/config/index.js +1 -1
  44. package/lib/commands/config/list.js +1 -1
  45. package/lib/commands/config/set.js +1 -1
  46. package/lib/commands/config/shared.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/db/analyze-cancel.js +1 -1
  53. package/lib/commands/db/analyze-start.js +1 -1
  54. package/lib/commands/db/analyze-status.js +1 -1
  55. package/lib/commands/db/create.js +1 -1
  56. package/lib/commands/db/delete.js +1 -1
  57. package/lib/commands/db/detail.js +1 -1
  58. package/lib/commands/db/diff.js +1 -1
  59. package/lib/commands/db/index.js +1 -1
  60. package/lib/commands/db/list.js +1 -1
  61. package/lib/commands/db/shared.js +1 -1
  62. package/lib/commands/db/tables.js +1 -1
  63. package/lib/commands/db/test.js +1 -1
  64. package/lib/commands/db/update.js +1 -1
  65. package/lib/commands/doctor.js +1 -1
  66. package/lib/commands/init/index.js +1 -1
  67. package/lib/commands/logs/index.js +1 -1
  68. package/lib/commands/menu/index.js +1 -1
  69. package/lib/commands/menu/shared/compare-table.js +1 -1
  70. package/lib/commands/menu/shared/index.js +1 -1
  71. package/lib/commands/menu/shared/inquirer.js +1 -1
  72. package/lib/commands/menu/shared/local-pages.js +1 -1
  73. package/lib/commands/menu/shared/logic.js +1 -1
  74. package/lib/commands/menu/shared/service.js +1 -1
  75. package/lib/commands/menu/shared/sync-core.js +1 -1
  76. package/lib/commands/menu/shared/update-core.js +1 -1
  77. package/lib/commands/menu/shared/valid-url.js +1 -1
  78. package/lib/commands/menu/sync.js +1 -1
  79. package/lib/commands/menu/update.js +1 -1
  80. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  81. package/lib/commands/project/create/format-elapsed.js +1 -1
  82. package/lib/commands/project/create/main.js +1 -1
  83. package/lib/commands/project/create/non-interactive.js +1 -1
  84. package/lib/commands/project/create/project-template-path.js +1 -1
  85. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  86. package/lib/commands/project/create/use-format-code.js +1 -1
  87. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  88. package/lib/commands/project/index.js +1 -1
  89. package/lib/commands/project/init.js +1 -1
  90. package/lib/commands/project/upgrade.js +1 -1
  91. package/lib/commands/registry.js +1 -1
  92. package/lib/commands/run/index.js +1 -1
  93. package/lib/commands/schema.js +1 -1
  94. package/lib/commands/skill/index.js +1 -1
  95. package/lib/commands/sql/detail.js +1 -1
  96. package/lib/commands/sql/exec.js +1 -1
  97. package/lib/commands/sql/index.js +1 -1
  98. package/lib/commands/sql/list.js +1 -1
  99. package/lib/commands/sql/pull.js +1 -1
  100. package/lib/commands/sql/save.js +1 -1
  101. package/lib/commands/sql/shared.js +1 -1
  102. package/lib/commands/sql/validate.js +1 -1
  103. package/lib/config/schema.js +1 -0
  104. package/lib/constant/cli.js +1 -1
  105. package/lib/constant/defaults.js +1 -0
  106. package/lib/constant/domain.js +1 -1
  107. package/lib/constant/env.js +1 -1
  108. package/lib/constant/output.js +1 -0
  109. package/lib/constant/paths.js +1 -1
  110. package/lib/constant/risk.js +1 -0
  111. package/lib/context.js +1 -1
  112. package/lib/core/alias-resolver.js +1 -1
  113. package/lib/core/api-client.js +1 -1
  114. package/lib/core/bff/config.js +1 -1
  115. package/lib/core/bff/file-system.js +1 -1
  116. package/lib/core/bff/hash.js +1 -1
  117. package/lib/core/bff/lock.js +1 -1
  118. package/lib/core/bff/utils.js +1 -1
  119. package/lib/core/db-resolver.js +1 -1
  120. package/lib/core/sql-validator.js +1 -1
  121. package/lib/errors.js +1 -1
  122. package/lib/framework/build-all-flags.js +1 -1
  123. package/lib/framework/flags.js +1 -1
  124. package/lib/framework/help.js +1 -1
  125. package/lib/framework/index.js +1 -1
  126. package/lib/framework/output.js +1 -1
  127. package/lib/framework/response.js +1 -1
  128. package/lib/framework/runner-alias.js +1 -0
  129. package/lib/framework/runner.js +1 -1
  130. package/lib/framework/schema-export.js +1 -1
  131. package/lib/framework/types.js +1 -1
  132. package/lib/generated/build-info.js +1 -1
  133. package/lib/help.js +1 -1
  134. package/lib/skills/main.js +1 -1
  135. package/lib/skills/npx-skills-add.js +1 -1
  136. package/lib/telemetry/cli-command-trace.js +1 -1
  137. package/lib/telemetry/cli-help-trace.js +1 -1
  138. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  139. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  140. package/lib/telemetry/send-cli-trace-log.js +1 -1
  141. package/lib/utils/ai_config.js +1 -1
  142. package/lib/utils/apply-jq-filter.js +1 -1
  143. package/lib/utils/cdn-config.js +1 -1
  144. package/lib/utils/check-sdk-version.js +1 -1
  145. package/lib/utils/cli-version-check.js +1 -1
  146. package/lib/utils/config.js +1 -1
  147. package/lib/utils/copy-directory.js +1 -1
  148. package/lib/utils/file-utils.js +1 -1
  149. package/lib/utils/guides-cdn.js +1 -1
  150. package/lib/utils/http-client.js +1 -1
  151. package/lib/utils/is-non-interactive.js +1 -1
  152. package/lib/utils/logger.js +1 -1
  153. package/lib/utils/platform.js +1 -1
  154. package/lib/utils/rules-cdn.js +1 -1
  155. package/lib/utils/sleep.js +1 -1
  156. package/lib/utils/template-replacer.js +1 -1
  157. package/lib/utils/version.js +1 -1
  158. package/lib/utils/with-active-cookie.js +1 -1
  159. package/lib/utils/write-cli-side-channel.js +1 -1
  160. package/package.json +3 -2
  161. package/lib/commands/api/doc.js +0 -1
  162. package/lib/commands/app/remote.js +0 -1
@@ -1 +1 @@
1
- (function(_0xce0164,_0xb39cfc){const _0x4c5c94=a71_0xd31b,_0x4d4b00=_0xce0164();while(!![]){try{const _0x553fca=parseInt(_0x4c5c94(0x184))/0x1+parseInt(_0x4c5c94(0x194))/0x2+parseInt(_0x4c5c94(0x186))/0x3+parseInt(_0x4c5c94(0x18c))/0x4*(parseInt(_0x4c5c94(0x181))/0x5)+-parseInt(_0x4c5c94(0x18e))/0x6+parseInt(_0x4c5c94(0x18a))/0x7*(-parseInt(_0x4c5c94(0x17d))/0x8)+-parseInt(_0x4c5c94(0x18f))/0x9;if(_0x553fca===_0xb39cfc)break;else _0x4d4b00['push'](_0x4d4b00['shift']());}catch(_0x5b567a){_0x4d4b00['push'](_0x4d4b00['shift']());}}}(a71_0x5326,0xc3868));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus,updateMenuCdnUrl}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';export function validateJsUrl(_0x59cb20){const _0x2a5339=a71_0xd31b,_0x296f75=[];return!isValidJsHttpsUrl(_0x59cb20)&&_0x296f75['push'](_0x2a5339(0x192)),{'ok':_0x296f75[_0x2a5339(0x182)]===0x0,'errors':_0x296f75};}export function validateCssUrl(_0x40006d){const _0x2828a3=a71_0xd31b,_0x4951eb=[];return!isValidCssHttpsUrl(_0x40006d)&&_0x4951eb[_0x2828a3(0x193)](_0x2828a3(0x190)),{'ok':_0x4951eb['length']===0x0,'errors':_0x4951eb};}export async function validateJsUrlReachable(_0x12833a){const _0x479db2=a71_0xd31b,_0x386c61=validateJsUrl(_0x12833a);if(!_0x386c61['ok'])return _0x386c61;const _0x4f5f86=await isUrlReachable(_0x12833a);if(!_0x4f5f86)_0x386c61['errors'][_0x479db2(0x193)](_0x479db2(0x18d));return{'ok':_0x386c61[_0x479db2(0x191)]['length']===0x0,'errors':_0x386c61[_0x479db2(0x191)]};}export async function validateCssUrlReachable(_0x413415){const _0x53279e=a71_0xd31b,_0x7b781e=validateCssUrl(_0x413415);if(!_0x7b781e['ok'])return _0x7b781e;const _0x3bdb70=await isUrlReachable(_0x413415);if(!_0x3bdb70)_0x7b781e[_0x53279e(0x191)][_0x53279e(0x193)](_0x53279e(0x197));return{'ok':_0x7b781e[_0x53279e(0x191)][_0x53279e(0x182)]===0x0,'errors':_0x7b781e[_0x53279e(0x191)]};}export function buildCompareRows(_0x3da3d8,_0x55b5c7){const _0x54e11e=a71_0xd31b;return _0x3da3d8[_0x54e11e(0x198)](_0x3fe87a=>({'label':_0x3fe87a[_0x54e11e(0x187)],'path':_0x3fe87a[_0x54e11e(0x195)],'local':!![],'online':_0x55b5c7['has'](_0x3fe87a[_0x54e11e(0x195)])}));}export function filterNewPages(_0x533fc8,_0x454b0d,_0x20b615){const _0x4c4ac1=a71_0xd31b;if(_0x20b615&&_0x20b615[_0x4c4ac1(0x182)]>0x0){const _0x364806=new Set(_0x20b615[_0x4c4ac1(0x198)](_0x3e5d40=>_0x3e5d40[_0x4c4ac1(0x188)]())),_0x3293bb=_0x533fc8['filter'](_0x398fd3=>_0x364806[_0x4c4ac1(0x17f)](_0x398fd3[_0x4c4ac1(0x187)]));if(_0x3293bb[_0x4c4ac1(0x182)]===0x0)throw new Error('No\x20local\x20pages\x20matched\x20labels:\x20'+[..._0x364806][_0x4c4ac1(0x185)](',\x20'));return _0x3293bb;}return _0x533fc8['filter'](_0x4ab298=>!_0x454b0d[_0x4c4ac1(0x17f)](_0x4ab298[_0x4c4ac1(0x195)]));}export function filterPagesByLabels(_0x50c4c2,_0x3744e9){const _0x1edba4=a71_0xd31b,_0x19a203=[],_0x2f0001=[];for(const _0x31ea3c of _0x3744e9){const _0x1504ad=_0x31ea3c[_0x1edba4(0x188)](),_0x4cd8e7=_0x50c4c2[_0x1edba4(0x180)](_0x20f313=>_0x20f313[_0x1edba4(0x187)]===_0x1504ad);if(_0x4cd8e7)_0x19a203['push'](_0x4cd8e7);else _0x2f0001[_0x1edba4(0x193)](_0x31ea3c);}return{'matched':_0x19a203,'unmatched':_0x2f0001};}export async function doCreateMenus(_0x55a1ed,_0x3f08a5,_0x388eb0,_0x1a8b75){const _0x4e0a92=a71_0xd31b;return await createMenus(_0x55a1ed,_0x3f08a5,_0x388eb0,_0x1a8b75),{'created':_0x388eb0[_0x4e0a92(0x182)],'failed':0x0,'labels':_0x388eb0[_0x4e0a92(0x198)](_0x430c4f=>_0x430c4f['label'])};}function a71_0xd31b(_0x5502d1,_0x636077){_0x5502d1=_0x5502d1-0x17d;const _0x532679=a71_0x5326();let _0xd31bf0=_0x532679[_0x5502d1];return _0xd31bf0;}export function filterMenusWithResources(_0x3e5610){const _0xad07f=a71_0xd31b;return _0x3e5610[_0xad07f(0x17e)](_0x40f616=>_0x40f616['resources'][_0xad07f(0x182)]>0x0);}export async function doUpdateCdnUrls(_0x87e556,_0xc8b11e,_0x1b9d4f,_0x35624f){const _0x4c7166=a71_0xd31b,_0x190a24=_0x1b9d4f[_0x4c7166(0x17e)](_0x5c265c=>_0x5c265c[_0x4c7166(0x18b)][_0x4c7166(0x182)]>0x0),_0x5dd4e9=await Promise[_0x4c7166(0x183)](_0x190a24[_0x4c7166(0x198)](_0x32530e=>updateMenuCdnUrl(_0x87e556,_0xc8b11e,{'id':_0x32530e['id'],'label':_0x32530e['label'],'path':_0x32530e['path'],'resources':_0x35624f}))),_0x442192=_0x5dd4e9[_0x4c7166(0x17e)](_0x97c6=>_0x97c6[_0x4c7166(0x196)]===_0x4c7166(0x189))[_0x4c7166(0x182)];return{'updated':_0x190a24[_0x4c7166(0x182)]-_0x442192,'failed':_0x442192};}export async function fetchMenuData(_0x5b2eaa,_0x25c627){const _0x1a2d86=a71_0xd31b,_0x120088=getLocalPages(),_0xc2128=await getOnlineMenuList(_0x5b2eaa,_0x25c627),_0x1372fa=new Set(_0xc2128['map'](_0x256a8e=>_0x256a8e[_0x1a2d86(0x195)]));return{'localPages':_0x120088,'onlineMenuList':_0xc2128,'onlinePaths':_0x1372fa};}export async function fetchOnlineMenuList(_0x4a05a6,_0x78c79f){return getOnlineMenuList(_0x4a05a6,_0x78c79f);}function a71_0x5326(){const _0x2e4bef=['trim','rejected','28679CbmBvb','resources','2934520IiWVHK','JS\x20URL\x20is\x20unreachable','5875590qafWgw','6143535MqbFAN','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','errors','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','push','326828FiHmro','path','status','CSS\x20URL\x20is\x20unreachable','map','496QKEIbg','filter','has','find','10qcSpzn','length','allSettled','30854pTQpil','join','3165714bIkqqk','label'];a71_0x5326=function(){return _0x2e4bef;};return a71_0x5326();}
1
+ (function(_0x5f4e4b,_0x256980){const _0x576579=a72_0xe3f2,_0x104099=_0x5f4e4b();while(!![]){try{const _0x522b4b=-parseInt(_0x576579(0x13f))/0x1+parseInt(_0x576579(0x140))/0x2*(parseInt(_0x576579(0x155))/0x3)+-parseInt(_0x576579(0x14d))/0x4+parseInt(_0x576579(0x150))/0x5*(parseInt(_0x576579(0x14b))/0x6)+-parseInt(_0x576579(0x13c))/0x7*(-parseInt(_0x576579(0x142))/0x8)+parseInt(_0x576579(0x153))/0x9+-parseInt(_0x576579(0x14f))/0xa;if(_0x522b4b===_0x256980)break;else _0x104099['push'](_0x104099['shift']());}catch(_0x30a57b){_0x104099['push'](_0x104099['shift']());}}}(a72_0x282e,0x4189a));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus,updateMenuCdnUrl}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';export function validateJsUrl(_0x2268dc){const _0x251f05=a72_0xe3f2,_0x3252b6=[];return!isValidJsHttpsUrl(_0x2268dc)&&_0x3252b6[_0x251f05(0x146)](_0x251f05(0x13e)),{'ok':_0x3252b6[_0x251f05(0x141)]===0x0,'errors':_0x3252b6};}function a72_0xe3f2(_0x208cdf,_0x2df370){_0x208cdf=_0x208cdf-0x13c;const _0x282e5c=a72_0x282e();let _0xe3f28=_0x282e5c[_0x208cdf];return _0xe3f28;}export function validateCssUrl(_0x340ecb){const _0x4a366b=a72_0xe3f2,_0x5e6470=[];return!isValidCssHttpsUrl(_0x340ecb)&&_0x5e6470['push']('CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'),{'ok':_0x5e6470[_0x4a366b(0x141)]===0x0,'errors':_0x5e6470};}function a72_0x282e(){const _0x440876=['status','map','trim','651246JDecqP','find','823964ZegYTy','CSS\x20URL\x20is\x20unreachable','6412350ftXgML','20UICpqU','rejected','JS\x20URL\x20is\x20unreachable','4083282hMdTNJ','join','8817JNQEsR','errors','allSettled','477449rZTheH','has','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','62046KYLlZw','58PdEHmX','length','24GONTGK','path','label','filter','push','resources'];a72_0x282e=function(){return _0x440876;};return a72_0x282e();}export async function validateJsUrlReachable(_0x3b6f01){const _0x1cac4a=a72_0xe3f2,_0x2d0c4d=validateJsUrl(_0x3b6f01);if(!_0x2d0c4d['ok'])return _0x2d0c4d;const _0x21d081=await isUrlReachable(_0x3b6f01);if(!_0x21d081)_0x2d0c4d[_0x1cac4a(0x156)][_0x1cac4a(0x146)](_0x1cac4a(0x152));return{'ok':_0x2d0c4d[_0x1cac4a(0x156)]['length']===0x0,'errors':_0x2d0c4d[_0x1cac4a(0x156)]};}export async function validateCssUrlReachable(_0x32a5cb){const _0x1cf85c=a72_0xe3f2,_0x3f531d=validateCssUrl(_0x32a5cb);if(!_0x3f531d['ok'])return _0x3f531d;const _0x6b0ace=await isUrlReachable(_0x32a5cb);if(!_0x6b0ace)_0x3f531d[_0x1cf85c(0x156)][_0x1cf85c(0x146)](_0x1cf85c(0x14e));return{'ok':_0x3f531d[_0x1cf85c(0x156)][_0x1cf85c(0x141)]===0x0,'errors':_0x3f531d[_0x1cf85c(0x156)]};}export function buildCompareRows(_0x189ec2,_0x433693){const _0x17cb93=a72_0xe3f2;return _0x189ec2[_0x17cb93(0x149)](_0x30b9f7=>({'label':_0x30b9f7[_0x17cb93(0x144)],'path':_0x30b9f7['path'],'local':!![],'online':_0x433693[_0x17cb93(0x13d)](_0x30b9f7[_0x17cb93(0x143)])}));}export function filterNewPages(_0x19bcbb,_0x3e5414,_0x5610cf){const _0x5b457e=a72_0xe3f2;if(_0x5610cf&&_0x5610cf['length']>0x0){const _0x2506b4=new Set(_0x5610cf[_0x5b457e(0x149)](_0x1bb8c1=>_0x1bb8c1[_0x5b457e(0x14a)]())),_0x385bf8=_0x19bcbb['filter'](_0x5a1536=>_0x2506b4[_0x5b457e(0x13d)](_0x5a1536['label']));if(_0x385bf8[_0x5b457e(0x141)]===0x0)throw new Error('No\x20local\x20pages\x20matched\x20labels:\x20'+[..._0x2506b4][_0x5b457e(0x154)](',\x20'));return _0x385bf8;}return _0x19bcbb[_0x5b457e(0x145)](_0x227a41=>!_0x3e5414['has'](_0x227a41[_0x5b457e(0x143)]));}export function filterPagesByLabels(_0x5f35fb,_0x156d00){const _0x1c7479=a72_0xe3f2,_0xdf8354=[],_0x3778fa=[];for(const _0x4952a7 of _0x156d00){const _0x56a523=_0x4952a7['trim'](),_0x517a10=_0x5f35fb[_0x1c7479(0x14c)](_0x23d1f7=>_0x23d1f7[_0x1c7479(0x144)]===_0x56a523);if(_0x517a10)_0xdf8354[_0x1c7479(0x146)](_0x517a10);else _0x3778fa[_0x1c7479(0x146)](_0x4952a7);}return{'matched':_0xdf8354,'unmatched':_0x3778fa};}export async function doCreateMenus(_0x591ce9,_0x3a979d,_0x2fdb8b,_0x356909){const _0x2a6f95=a72_0xe3f2;return await createMenus(_0x591ce9,_0x3a979d,_0x2fdb8b,_0x356909),{'created':_0x2fdb8b['length'],'failed':0x0,'labels':_0x2fdb8b[_0x2a6f95(0x149)](_0x527db3=>_0x527db3[_0x2a6f95(0x144)])};}export function filterMenusWithResources(_0x1f436e){const _0x3b9272=a72_0xe3f2;return _0x1f436e[_0x3b9272(0x145)](_0xd78220=>_0xd78220[_0x3b9272(0x147)][_0x3b9272(0x141)]>0x0);}export async function doUpdateCdnUrls(_0x2ef293,_0x4aada0,_0x146dc2,_0x443b7e){const _0x39824d=a72_0xe3f2,_0x1a3d5d=_0x146dc2[_0x39824d(0x145)](_0x10bf68=>_0x10bf68[_0x39824d(0x147)][_0x39824d(0x141)]>0x0),_0x2485bf=await Promise[_0x39824d(0x157)](_0x1a3d5d['map'](_0x27e98b=>updateMenuCdnUrl(_0x2ef293,_0x4aada0,{'id':_0x27e98b['id'],'label':_0x27e98b['label'],'path':_0x27e98b[_0x39824d(0x143)],'resources':_0x443b7e}))),_0x60723a=_0x2485bf[_0x39824d(0x145)](_0x4670c2=>_0x4670c2[_0x39824d(0x148)]===_0x39824d(0x151))['length'];return{'updated':_0x1a3d5d[_0x39824d(0x141)]-_0x60723a,'failed':_0x60723a};}export async function fetchMenuData(_0x567745,_0x2d0d6c){const _0x559a45=a72_0xe3f2,_0x5078d5=getLocalPages(),_0x4286ae=await getOnlineMenuList(_0x567745,_0x2d0d6c),_0x38e11d=new Set(_0x4286ae[_0x559a45(0x149)](_0x57d0dc=>_0x57d0dc[_0x559a45(0x143)]));return{'localPages':_0x5078d5,'onlineMenuList':_0x4286ae,'onlinePaths':_0x38e11d};}export async function fetchOnlineMenuList(_0x5f27a1,_0x4390f5){return getOnlineMenuList(_0x5f27a1,_0x4390f5);}
@@ -1 +1 @@
1
- function a72_0x3220(){const _0x2046e7=['Fetch\x20menu\x20list','get-online-menu-list','8325660tbYJoM','5075310nCSpiN','1944187azrVZv','Update\x20menu\x20assets\x20\x22','push','POST','map','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','8412048sFrnle','Menu\x20assets\x20synced:\x20','96PDIYuN','Menu\x20created\x20successfully:\x20','Creating\x20menu:\x20','label','parse','236823TMXpMe','flat','create-menus','all','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','/smartapi/menu/find?appCode=','info','Fetched\x20','50645KaHZDl','/smartapi/menu/create','path','resources','\x20online\x20menus\x20successfully','import','Batch\x20menu\x20creation\x20completed,\x20total\x20','create-menu','7908wbrGsG','236gpmQkg','extend','8aDyMSN','isArray','update-menu-cdn-url','Updating\x20menu\x20asset\x20links:\x20','length','children','Create\x20menu\x20\x22'];a72_0x3220=function(){return _0x2046e7;};return a72_0x3220();}(function(_0x154dac,_0x2fdb83){const _0x11c582=a72_0xc85c,_0x4f6ead=_0x154dac();while(!![]){try{const _0x195d71=-parseInt(_0x11c582(0x209))/0x1+-parseInt(_0x11c582(0x204))/0x2*(-parseInt(_0x11c582(0x1ee))/0x3)+parseInt(_0x11c582(0x1ef))/0x4*(-parseInt(_0x11c582(0x211))/0x5)+parseInt(_0x11c582(0x1fb))/0x6+parseInt(_0x11c582(0x1fc))/0x7*(parseInt(_0x11c582(0x1f1))/0x8)+parseInt(_0x11c582(0x202))/0x9+-parseInt(_0x11c582(0x1fa))/0xa;if(_0x195d71===_0x2fdb83)break;else _0x4f6ead['push'](_0x4f6ead['shift']());}catch(_0x417c0c){_0x4f6ead['push'](_0x4f6ead['shift']());}}}(a72_0x3220,0x7e6c2));import{getApiDomain}from'../../../constant/domain.js';import{getEnv,isProduction}from'../../../constant/env.js';function a72_0xc85c(_0x58640b,_0xfb72bb){_0x58640b=_0x58640b-0x1ec;const _0x322039=a72_0x3220();let _0xc85cc8=_0x322039[_0x58640b];return _0xc85cc8;}import{logger}from'../../../utils/logger.js';import{platformFetch}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x195770,_0x3cb30a){const _0x5a0d3e=a72_0xc85c,_0x3c15bb=getEnv();logger[_0x5a0d3e(0x20f)](_0x5a0d3e(0x1f9),isProduction(_0x3c15bb)?_0x5a0d3e(0x201)+_0x195770+')':_0x5a0d3e(0x20d)+_0x195770+')');const _0x119cf5=await platformFetch(getApiDomain()+_0x5a0d3e(0x20e)+_0x195770,{'cookie':_0x3cb30a,'label':_0x5a0d3e(0x1f8)});if(!_0x119cf5)return logger[_0x5a0d3e(0x20f)](_0x5a0d3e(0x1f9),'Server\x20returned\x20empty\x20menu\x20list'),[];return logger[_0x5a0d3e(0x20f)](_0x5a0d3e(0x1f9),_0x5a0d3e(0x210)+_0x119cf5[_0x5a0d3e(0x1f5)]+_0x5a0d3e(0x215)),_0x119cf5[_0x5a0d3e(0x200)](flattenMenuItem)[_0x5a0d3e(0x20a)]();}function flattenMenuItem(_0x7c440d){const _0x4f2ad7=a72_0xc85c;let _0x1edea7=[];try{if(_0x7c440d[_0x4f2ad7(0x1f0)]?.['resources']){const _0x5658c9=JSON[_0x4f2ad7(0x208)](_0x7c440d[_0x4f2ad7(0x1f0)][_0x4f2ad7(0x214)]);if(Array[_0x4f2ad7(0x1f2)](_0x5658c9))_0x1edea7=_0x5658c9;}}catch{}const _0x236f27=[{'id':_0x7c440d['id'],'path':_0x7c440d['path'],'label':_0x7c440d[_0x4f2ad7(0x207)],'resources':_0x1edea7}];if(_0x7c440d[_0x4f2ad7(0x1f6)]&&_0x7c440d[_0x4f2ad7(0x1f6)][_0x4f2ad7(0x1f5)]>0x0)for(const _0x54f4ff of _0x7c440d[_0x4f2ad7(0x1f6)]){_0x236f27[_0x4f2ad7(0x1fe)](...flattenMenuItem(_0x54f4ff));}return _0x236f27;}export async function createMenu(_0x4ec5ed,_0xc46d84,_0x3f9b1b){const _0x324bc4=a72_0xc85c;logger['info'](_0x324bc4(0x1ed),_0x324bc4(0x206)+_0x3f9b1b['label']+'\x20('+_0x3f9b1b[_0x324bc4(0x213)]+')');const _0x5f55de={'appCode':_0x4ec5ed,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x324bc4(0x216),'resources':_0x3f9b1b[_0x324bc4(0x214)]?JSON['stringify'](_0x3f9b1b[_0x324bc4(0x214)]):undefined},..._0x3f9b1b};await platformFetch(getApiDomain()+_0x324bc4(0x212),{'method':_0x324bc4(0x1ff),'body':_0x5f55de,'cookie':_0xc46d84,'label':_0x324bc4(0x1f7)+_0x3f9b1b['label']+'\x22'}),logger[_0x324bc4(0x20f)](_0x324bc4(0x1ed),_0x324bc4(0x205)+_0x3f9b1b[_0x324bc4(0x207)]);}async function createSingleMenu(_0x3d307b,_0x2889e7,_0x58d3fd,_0x30517c){const _0x291ef4=a72_0xc85c,_0x9f2289={'appCode':_0x3d307b,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x291ef4(0x216),'resources':_0x30517c?JSON['stringify'](_0x30517c):undefined},'label':_0x58d3fd[_0x291ef4(0x207)],'path':_0x58d3fd[_0x291ef4(0x213)]};await platformFetch(getApiDomain()+_0x291ef4(0x212),{'method':_0x291ef4(0x1ff),'body':_0x9f2289,'cookie':_0x2889e7,'label':_0x291ef4(0x1f7)+_0x58d3fd[_0x291ef4(0x207)]+'\x22'}),logger[_0x291ef4(0x20f)]('create-menu',_0x291ef4(0x205)+_0x58d3fd[_0x291ef4(0x207)]);}export async function createMenus(_0x2598d2,_0x56782e,_0xc40a9c,_0x2f055f){const _0x133ad2=a72_0xc85c;logger[_0x133ad2(0x20f)](_0x133ad2(0x20b),'Start\x20batch\x20menu\x20creation,\x20total\x20'+_0xc40a9c[_0x133ad2(0x1f5)]),await Promise[_0x133ad2(0x20c)](_0xc40a9c[_0x133ad2(0x200)](_0x28922d=>createSingleMenu(_0x2598d2,_0x56782e,_0x28922d,_0x2f055f))),logger[_0x133ad2(0x20f)](_0x133ad2(0x20b),_0x133ad2(0x1ec)+_0xc40a9c[_0x133ad2(0x1f5)]);}export async function updateMenuCdnUrl(_0x748c5e,_0x5f4980,_0x648ffb){const _0x28bdd9=a72_0xc85c;logger[_0x28bdd9(0x20f)](_0x28bdd9(0x1f3),_0x28bdd9(0x1f4)+_0x648ffb[_0x28bdd9(0x207)]+'\x20('+_0x648ffb[_0x28bdd9(0x213)]+')');const _0x3a82f0={'id':_0x648ffb['id'],'appCode':_0x748c5e,'extend':{'loadScriptMode':'import','resources':_0x648ffb[_0x28bdd9(0x214)]?JSON['stringify'](_0x648ffb['resources']):undefined}};await platformFetch(getApiDomain()+'/smartapi/menu/update',{'method':_0x28bdd9(0x1ff),'body':_0x3a82f0,'cookie':_0x5f4980,'label':_0x28bdd9(0x1fd)+_0x648ffb[_0x28bdd9(0x207)]+'\x22'}),logger[_0x28bdd9(0x20f)]('update-menu-cdn-url',_0x28bdd9(0x203)+_0x648ffb['label'],undefined);}
1
+ function a73_0x2146(){const _0x138b2c=['Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','stringify','children','1480Vzdnux','Update\x20menu\x20assets\x20\x22','extend','Menu\x20created\x20successfully:\x20','POST','536582eQcvIw','54VuHbMC','label','update-menu-cdn-url','Creating\x20menu:\x20','Server\x20returned\x20empty\x20menu\x20list','get-online-menu-list','2809303JljgSi','75105RsSZYO','info','procode','resources','292945bLzxbF','parse','all','375KaodmW','Fetch\x20menu\x20list','32848332JQFUng','10463321iSySCy','Fetched\x20','length','Start\x20batch\x20menu\x20creation,\x20total\x20','/smartapi/menu/create','create-menu','create-menus','Create\x20menu\x20\x22','import','/smartapi/menu/find?appCode=','21844ZOqYgl','Updating\x20menu\x20asset\x20links:\x20','map','24Gllqdl','4urSNCd','path'];a73_0x2146=function(){return _0x138b2c;};return a73_0x2146();}(function(_0x321caa,_0x186077){const _0x32eb42=a73_0x41af,_0x3ccd94=_0x321caa();while(!![]){try{const _0x2a10b1=-parseInt(_0x32eb42(0x1d7))/0x1*(parseInt(_0x32eb42(0x1cd))/0x2)+-parseInt(_0x32eb42(0x1e6))/0x3*(-parseInt(_0x32eb42(0x1c9))/0x4)+-parseInt(_0x32eb42(0x1e3))/0x5*(-parseInt(_0x32eb42(0x1d8))/0x6)+parseInt(_0x32eb42(0x1de))/0x7*(parseInt(_0x32eb42(0x1cc))/0x8)+parseInt(_0x32eb42(0x1df))/0x9*(parseInt(_0x32eb42(0x1d2))/0xa)+parseInt(_0x32eb42(0x1e9))/0xb+-parseInt(_0x32eb42(0x1e8))/0xc;if(_0x2a10b1===_0x186077)break;else _0x3ccd94['push'](_0x3ccd94['shift']());}catch(_0x31f2bd){_0x3ccd94['push'](_0x3ccd94['shift']());}}}(a73_0x2146,0xc0c9b));function a73_0x41af(_0x46dd1b,_0x1d2c86){_0x46dd1b=_0x46dd1b-0x1c8;const _0x214635=a73_0x2146();let _0x41af77=_0x214635[_0x46dd1b];return _0x41af77;}import{getApiDomain}from'../../../constant/domain.js';import{getEnv,isProduction}from'../../../constant/env.js';import{logger}from'../../../utils/logger.js';import{platformFetch}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x2a990d,_0x2f7537){const _0x4f0d04=a73_0x41af,_0x2af3b1=getEnv();logger['info'](_0x4f0d04(0x1dd),isProduction(_0x2af3b1)?_0x4f0d04(0x1cf)+_0x2a990d+')':'Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20'+_0x2a990d+')');const _0x4c277a=await platformFetch(getApiDomain()+_0x4f0d04(0x1c8)+_0x2a990d,{'cookie':_0x2f7537,'label':_0x4f0d04(0x1e7)});if(!_0x4c277a)return logger[_0x4f0d04(0x1e0)](_0x4f0d04(0x1dd),_0x4f0d04(0x1dc)),[];return logger[_0x4f0d04(0x1e0)](_0x4f0d04(0x1dd),_0x4f0d04(0x1ea)+_0x4c277a['length']+'\x20online\x20menus\x20successfully'),_0x4c277a[_0x4f0d04(0x1cb)](flattenMenuItem)['flat']();}function flattenMenuItem(_0x212308){const _0x3a9c70=a73_0x41af;let _0x316b75=[];try{if(_0x212308[_0x3a9c70(0x1d4)]?.[_0x3a9c70(0x1e2)]){const _0x4d2d6b=JSON[_0x3a9c70(0x1e4)](_0x212308[_0x3a9c70(0x1d4)]['resources']);if(Array['isArray'](_0x4d2d6b))_0x316b75=_0x4d2d6b;}}catch{}const _0x46386b=[{'id':_0x212308['id'],'path':_0x212308[_0x3a9c70(0x1ce)],'label':_0x212308[_0x3a9c70(0x1d9)],'resources':_0x316b75}];if(_0x212308[_0x3a9c70(0x1d1)]&&_0x212308[_0x3a9c70(0x1d1)][_0x3a9c70(0x1eb)]>0x0)for(const _0x322523 of _0x212308[_0x3a9c70(0x1d1)]){_0x46386b['push'](...flattenMenuItem(_0x322523));}return _0x46386b;}export async function createMenu(_0x118e25,_0x540b41,_0x4be1a7){const _0x3fe4f5=a73_0x41af;logger['info'](_0x3fe4f5(0x1ee),_0x3fe4f5(0x1db)+_0x4be1a7[_0x3fe4f5(0x1d9)]+'\x20('+_0x4be1a7[_0x3fe4f5(0x1ce)]+')');const _0x22e0ac={'appCode':_0x118e25,'type':_0x3fe4f5(0x1e1),'sort':0x0,'extend':{'loadScriptMode':_0x3fe4f5(0x1f1),'resources':_0x4be1a7[_0x3fe4f5(0x1e2)]?JSON[_0x3fe4f5(0x1d0)](_0x4be1a7['resources']):undefined},..._0x4be1a7};await platformFetch(getApiDomain()+_0x3fe4f5(0x1ed),{'method':_0x3fe4f5(0x1d6),'body':_0x22e0ac,'cookie':_0x540b41,'label':_0x3fe4f5(0x1f0)+_0x4be1a7[_0x3fe4f5(0x1d9)]+'\x22'}),logger[_0x3fe4f5(0x1e0)](_0x3fe4f5(0x1ee),_0x3fe4f5(0x1d5)+_0x4be1a7[_0x3fe4f5(0x1d9)]);}async function createSingleMenu(_0x2437c7,_0xa892d2,_0x325dd7,_0x3bfe9c){const _0x40a378=a73_0x41af,_0x283bf9={'appCode':_0x2437c7,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x40a378(0x1f1),'resources':_0x3bfe9c?JSON['stringify'](_0x3bfe9c):undefined},'label':_0x325dd7[_0x40a378(0x1d9)],'path':_0x325dd7[_0x40a378(0x1ce)]};await platformFetch(getApiDomain()+_0x40a378(0x1ed),{'method':_0x40a378(0x1d6),'body':_0x283bf9,'cookie':_0xa892d2,'label':_0x40a378(0x1f0)+_0x325dd7[_0x40a378(0x1d9)]+'\x22'}),logger[_0x40a378(0x1e0)](_0x40a378(0x1ee),_0x40a378(0x1d5)+_0x325dd7[_0x40a378(0x1d9)]);}export async function createMenus(_0x589c0b,_0x332200,_0x13a8b4,_0x349cd4){const _0x452c96=a73_0x41af;logger[_0x452c96(0x1e0)](_0x452c96(0x1ef),_0x452c96(0x1ec)+_0x13a8b4[_0x452c96(0x1eb)]),await Promise[_0x452c96(0x1e5)](_0x13a8b4[_0x452c96(0x1cb)](_0x57f8cc=>createSingleMenu(_0x589c0b,_0x332200,_0x57f8cc,_0x349cd4))),logger['info']('create-menus','Batch\x20menu\x20creation\x20completed,\x20total\x20'+_0x13a8b4[_0x452c96(0x1eb)]);}export async function updateMenuCdnUrl(_0x3d7051,_0x2e3e77,_0x1cce3a){const _0x20622f=a73_0x41af;logger['info'](_0x20622f(0x1da),_0x20622f(0x1ca)+_0x1cce3a['label']+'\x20('+_0x1cce3a[_0x20622f(0x1ce)]+')');const _0x2e888a={'id':_0x1cce3a['id'],'appCode':_0x3d7051,'extend':{'loadScriptMode':'import','resources':_0x1cce3a['resources']?JSON[_0x20622f(0x1d0)](_0x1cce3a[_0x20622f(0x1e2)]):undefined}};await platformFetch(getApiDomain()+'/smartapi/menu/update',{'method':'POST','body':_0x2e888a,'cookie':_0x2e3e77,'label':_0x20622f(0x1d3)+_0x1cce3a[_0x20622f(0x1d9)]+'\x22'}),logger[_0x20622f(0x1e0)](_0x20622f(0x1da),'Menu\x20assets\x20synced:\x20'+_0x1cce3a[_0x20622f(0x1d9)],undefined);}
@@ -1 +1 @@
1
- (function(_0x59a3ef,_0x358144){const _0x30028e=a73_0x5e13,_0x58db6b=_0x59a3ef();while(!![]){try{const _0x249b55=-parseInt(_0x30028e(0xef))/0x1+-parseInt(_0x30028e(0xe5))/0x2*(-parseInt(_0x30028e(0x107))/0x3)+parseInt(_0x30028e(0xfb))/0x4*(parseInt(_0x30028e(0xe4))/0x5)+-parseInt(_0x30028e(0xea))/0x6*(-parseInt(_0x30028e(0xff))/0x7)+parseInt(_0x30028e(0x103))/0x8*(parseInt(_0x30028e(0x102))/0x9)+-parseInt(_0x30028e(0x10b))/0xa+parseInt(_0x30028e(0x105))/0xb*(-parseInt(_0x30028e(0xf8))/0xc);if(_0x249b55===_0x358144)break;else _0x58db6b['push'](_0x58db6b['shift']());}catch(_0x3031a8){_0x58db6b['push'](_0x58db6b['shift']());}}}(a73_0x4fa9,0x601c8));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';function a73_0x4fa9(){const _0x14485f=['data','label','trim','readableEnded','map','cssUrl','5165LYLArr','42oHUalC','join','Menu\x20sync\x20completed','object','selectedLabels','6rLPvjT','Start\x20non-interactive\x20menu\x20sync','string','No\x20local\x20pages\x20matched\x20labels:\x20','startsWith','137291dWZqcL','split','has','pages','\x0a\x20\x20Available\x20local\x20pages:\x20','JS\x20URL\x20is\x20unreachable:\x20','push','stdin','isArray','36USufIS','concat','parse','1468hXnGzJ','setLogPath','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','menu-sync','592319vhltrS','toString','isTTY','1094787VcSyzK','48MFxzcH','path','3116047ReJEGq','length','28467mmsCMz','info','filter','jsUrl','120610kvdNlp'];a73_0x4fa9=function(){return _0x14485f;};return a73_0x4fa9();}import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x164af5){const _0x4e3faf=a73_0x5e13,_0x3d0260=[];return _0x164af5[_0x4e3faf(0x10a)]&&!isValidJsHttpsUrl(_0x164af5[_0x4e3faf(0x10a)])&&_0x3d0260[_0x4e3faf(0xf5)]({'field':_0x4e3faf(0x10a),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x164af5[_0x4e3faf(0xe3)]&&!isValidCssHttpsUrl(_0x164af5[_0x4e3faf(0xe3)])&&_0x3d0260[_0x4e3faf(0xf5)]({'field':_0x4e3faf(0xe3),'message':_0x4e3faf(0xfd)}),_0x3d0260;}function a73_0x5e13(_0x136e1c,_0xc00433){_0x136e1c=_0x136e1c-0xdf;const _0x4fa994=a73_0x4fa9();let _0x5e13da=_0x4fa994[_0x136e1c];return _0x5e13da;}export async function runMenuSyncCore(_0x2e84cb,_0xe36e75,_0x3502e3=[],_0x30eda3){const _0x5e15ec=a73_0x5e13,_0x4de60f=parseParamsFlag(_0x30eda3),_0x2a985d=_0x3502e3[_0x5e15ec(0x106)]>0x0?_0x3502e3:_0x4de60f[_0x5e15ec(0xe9)],_0x55520c=_0x4de60f[_0x5e15ec(0x10a)],_0x379bd2=_0x4de60f[_0x5e15ec(0xe3)],_0x3f90cd=[];if(_0x55520c)_0x3f90cd['push'](_0x55520c);if(_0x379bd2)_0x3f90cd[_0x5e15ec(0xf5)](_0x379bd2);const _0x488038=validateParams(_0x4de60f);if(_0x488038[_0x5e15ec(0x106)]>0x0){const _0x4417a5=_0x488038['map'](_0x5054b5=>'--params.'+_0x5054b5['field']+':\x20'+_0x5054b5['message'])['join'](';\x20');throw new Error('Invalid\x20--params:\x20'+_0x4417a5);}logger[_0x5e15ec(0xfc)](process['cwd']()),logger[_0x5e15ec(0x108)](_0x5e15ec(0xfe),_0x5e15ec(0xeb),{'appCode':_0x2e84cb,'selectedCount':_0x2a985d?.[_0x5e15ec(0x106)],'jsUrl':_0x55520c,'cssUrl':_0x379bd2});if(_0x55520c){const _0x3b5bff=await isUrlReachable(_0x55520c);if(!_0x3b5bff)throw new Error(_0x5e15ec(0xf4)+_0x55520c);}if(_0x379bd2){const _0x2ba425=await isUrlReachable(_0x379bd2);if(!_0x2ba425)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x379bd2);}const _0x22c3ad=getLocalPages();if(_0x22c3ad[_0x5e15ec(0x106)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x20ce9a=await getOnlineMenuList(_0x2e84cb,_0xe36e75),_0x5ea8ea=new Set(_0x20ce9a['map'](_0x3e34f1=>_0x3e34f1[_0x5e15ec(0x104)]));let _0x215aee;if(_0x2a985d&&_0x2a985d[_0x5e15ec(0x106)]>0x0){const _0x2ced4a=new Set(_0x2a985d[_0x5e15ec(0xe2)](_0xaed4af=>_0xaed4af[_0x5e15ec(0xe0)]()));_0x215aee=_0x22c3ad[_0x5e15ec(0x109)](_0x1d2817=>_0x2ced4a[_0x5e15ec(0xf1)](_0x1d2817[_0x5e15ec(0xdf)]));if(_0x215aee[_0x5e15ec(0x106)]===0x0){const _0x1edb3a=_0x22c3ad[_0x5e15ec(0xe2)](_0x3e4a91=>_0x3e4a91[_0x5e15ec(0xdf)])[_0x5e15ec(0xe6)](',\x20');throw new Error(_0x5e15ec(0xed)+[..._0x2ced4a]['join'](',\x20')+_0x5e15ec(0xf3)+_0x1edb3a);}}else _0x215aee=_0x22c3ad[_0x5e15ec(0x109)](_0x187168=>!_0x5ea8ea[_0x5e15ec(0xf1)](_0x187168[_0x5e15ec(0x104)]));if(_0x215aee[_0x5e15ec(0x106)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};return await createMenus(_0x2e84cb,_0xe36e75,_0x215aee,_0x3f90cd[_0x5e15ec(0x106)]>0x0?_0x3f90cd:undefined),logger['info'](_0x5e15ec(0xfe),_0x5e15ec(0xe7),{'count':_0x215aee[_0x5e15ec(0x106)],'resources':_0x3f90cd}),{'created':_0x215aee[_0x5e15ec(0x106)],'skipped':![],'targetPages':_0x215aee};}export async function readPageLabelsFromStdin(){const _0x2235af=a73_0x5e13;if(!process[_0x2235af(0xf6)][_0x2235af(0x101)]&&!process[_0x2235af(0xf6)][_0x2235af(0xe1)])return new Promise(_0x24b092=>{const _0x37a4f1=_0x2235af,_0x163164=[];process[_0x37a4f1(0xf6)]['on'](_0x37a4f1(0x10c),_0x597fff=>_0x163164['push'](_0x597fff)),process['stdin']['on']('end',()=>{const _0x27b0d2=_0x37a4f1,_0x33c100=Buffer[_0x27b0d2(0xf9)](_0x163164)[_0x27b0d2(0x100)]('utf8'),_0x3f8b7c=_0x33c100[_0x27b0d2(0xf0)]('\x0a')['map'](_0x315f42=>_0x315f42[_0x27b0d2(0xe0)]())['filter'](_0x224cfe=>_0x224cfe[_0x27b0d2(0x106)]>0x0&&!_0x224cfe[_0x27b0d2(0xee)]('#'));_0x24b092(_0x3f8b7c);}),setTimeout(()=>_0x24b092([]),0x1f4);});return[];}function parseParamsFlag(_0x3db736){const _0x57a96f=a73_0x5e13;if(!_0x3db736||typeof _0x3db736!==_0x57a96f(0xec))return{};try{const _0xf98f92=JSON[_0x57a96f(0xfa)](_0x3db736);if(typeof _0xf98f92!==_0x57a96f(0xe8)||_0xf98f92===null||Array[_0x57a96f(0xf7)](_0xf98f92))return{};return{'selectedLabels':Array[_0x57a96f(0xf7)](_0xf98f92[_0x57a96f(0xf2)])?_0xf98f92[_0x57a96f(0xf2)][_0x57a96f(0xe2)](String):undefined,'jsUrl':typeof _0xf98f92[_0x57a96f(0x10a)]===_0x57a96f(0xec)?_0xf98f92[_0x57a96f(0x10a)][_0x57a96f(0xe0)]():undefined,'cssUrl':typeof _0xf98f92[_0x57a96f(0xe3)]==='string'?_0xf98f92[_0x57a96f(0xe3)]['trim']():undefined};}catch{return{};}}
1
+ function a74_0x3d99(_0x5ece57,_0x46506f){_0x5ece57=_0x5ece57-0x75;const _0x16c777=a74_0x16c7();let _0x3d995a=_0x16c777[_0x5ece57];return _0x3d995a;}(function(_0x3533d6,_0x133a3d){const _0x6e109=a74_0x3d99,_0x116404=_0x3533d6();while(!![]){try{const _0x530e19=-parseInt(_0x6e109(0x82))/0x1+-parseInt(_0x6e109(0x91))/0x2*(-parseInt(_0x6e109(0x8d))/0x3)+parseInt(_0x6e109(0x9d))/0x4*(parseInt(_0x6e109(0x81))/0x5)+parseInt(_0x6e109(0x86))/0x6+parseInt(_0x6e109(0x98))/0x7+-parseInt(_0x6e109(0x76))/0x8+-parseInt(_0x6e109(0xa1))/0x9*(-parseInt(_0x6e109(0x79))/0xa);if(_0x530e19===_0x133a3d)break;else _0x116404['push'](_0x116404['shift']());}catch(_0x838760){_0x116404['push'](_0x116404['shift']());}}}(a74_0x16c7,0x6e82c));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x4ea264){const _0x111cce=a74_0x3d99,_0x3bf656=[];return _0x4ea264[_0x111cce(0x8c)]&&!isValidJsHttpsUrl(_0x4ea264[_0x111cce(0x8c)])&&_0x3bf656[_0x111cce(0x9c)]({'field':_0x111cce(0x8c),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x4ea264[_0x111cce(0x92)]&&!isValidCssHttpsUrl(_0x4ea264[_0x111cce(0x92)])&&_0x3bf656[_0x111cce(0x9c)]({'field':_0x111cce(0x92),'message':_0x111cce(0x8f)}),_0x3bf656;}export async function runMenuSyncCore(_0x4f86df,_0x469665,_0x1af8c3=[],_0x2faa09){const _0x18e15a=a74_0x3d99,_0x4cfcfe=parseParamsFlag(_0x2faa09),_0x47f748=_0x1af8c3['length']>0x0?_0x1af8c3:_0x4cfcfe[_0x18e15a(0x78)],_0x16556e=_0x4cfcfe['jsUrl'],_0x44c1c3=_0x4cfcfe[_0x18e15a(0x92)],_0x46202a=[];if(_0x16556e)_0x46202a[_0x18e15a(0x9c)](_0x16556e);if(_0x44c1c3)_0x46202a[_0x18e15a(0x9c)](_0x44c1c3);const _0x46459e=validateParams(_0x4cfcfe);if(_0x46459e['length']>0x0){const _0x3ae845=_0x46459e['map'](_0x3c8064=>_0x18e15a(0x9e)+_0x3c8064[_0x18e15a(0xa4)]+':\x20'+_0x3c8064[_0x18e15a(0x93)])[_0x18e15a(0x75)](';\x20');throw new Error(_0x18e15a(0x84)+_0x3ae845);}logger[_0x18e15a(0x90)](process[_0x18e15a(0xa0)]()),logger[_0x18e15a(0x80)](_0x18e15a(0x87),'Start\x20non-interactive\x20menu\x20sync',{'appCode':_0x4f86df,'selectedCount':_0x47f748?.[_0x18e15a(0x7f)],'jsUrl':_0x16556e,'cssUrl':_0x44c1c3});if(_0x16556e){const _0x1fe4b8=await isUrlReachable(_0x16556e);if(!_0x1fe4b8)throw new Error(_0x18e15a(0x8a)+_0x16556e);}if(_0x44c1c3){const _0xf0880c=await isUrlReachable(_0x44c1c3);if(!_0xf0880c)throw new Error(_0x18e15a(0x77)+_0x44c1c3);}const _0x2eb2fa=getLocalPages();if(_0x2eb2fa[_0x18e15a(0x7f)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x151b35=await getOnlineMenuList(_0x4f86df,_0x469665),_0x529fac=new Set(_0x151b35['map'](_0x137c68=>_0x137c68[_0x18e15a(0x83)]));let _0xa859d9;if(_0x47f748&&_0x47f748[_0x18e15a(0x7f)]>0x0){const _0x5e6b74=new Set(_0x47f748[_0x18e15a(0x99)](_0x1462ad=>_0x1462ad[_0x18e15a(0x9b)]()));_0xa859d9=_0x2eb2fa[_0x18e15a(0x88)](_0x130af1=>_0x5e6b74[_0x18e15a(0x8e)](_0x130af1[_0x18e15a(0x9f)]));if(_0xa859d9[_0x18e15a(0x7f)]===0x0){const _0x29db7f=_0x2eb2fa[_0x18e15a(0x99)](_0x3dbb29=>_0x3dbb29[_0x18e15a(0x9f)])[_0x18e15a(0x75)](',\x20');throw new Error('No\x20local\x20pages\x20matched\x20labels:\x20'+[..._0x5e6b74]['join'](',\x20')+_0x18e15a(0x9a)+_0x29db7f);}}else _0xa859d9=_0x2eb2fa[_0x18e15a(0x88)](_0x15484a=>!_0x529fac[_0x18e15a(0x8e)](_0x15484a[_0x18e15a(0x83)]));if(_0xa859d9[_0x18e15a(0x7f)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};return await createMenus(_0x4f86df,_0x469665,_0xa859d9,_0x46202a[_0x18e15a(0x7f)]>0x0?_0x46202a:undefined),logger['info'](_0x18e15a(0x87),'Menu\x20sync\x20completed',{'count':_0xa859d9['length'],'resources':_0x46202a}),{'created':_0xa859d9['length'],'skipped':![],'targetPages':_0xa859d9};}function a74_0x16c7(){const _0x15eb82=['startsWith','77441EOWYkT','map','\x0a\x20\x20Available\x20local\x20pages:\x20','trim','push','273376NNvlaZ','--params.','label','cwd','346734ZCQBKm','object','data','field','join','5191208nBfkqa','CSS\x20URL\x20is\x20unreachable:\x20','selectedLabels','80LDlBrI','utf8','string','stdin','split','parse','length','info','5WgIaqa','200627HdowvS','path','Invalid\x20--params:\x20','isTTY','2483562rcfUZq','menu-sync','filter','isArray','JS\x20URL\x20is\x20unreachable:\x20','pages','jsUrl','3EOgUUj','has','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','setLogPath','1001276WvShrp','cssUrl','message','concat','readableEnded','toString'];a74_0x16c7=function(){return _0x15eb82;};return a74_0x16c7();}export async function readPageLabelsFromStdin(){const _0x1ab931=a74_0x3d99;if(!process[_0x1ab931(0x7c)][_0x1ab931(0x85)]&&!process[_0x1ab931(0x7c)][_0x1ab931(0x95)])return new Promise(_0xe12700=>{const _0x8914cd=_0x1ab931,_0x334a2a=[];process[_0x8914cd(0x7c)]['on'](_0x8914cd(0xa3),_0x2920a7=>_0x334a2a['push'](_0x2920a7)),process[_0x8914cd(0x7c)]['on']('end',()=>{const _0x3cd6aa=_0x8914cd,_0x29bbca=Buffer[_0x3cd6aa(0x94)](_0x334a2a)[_0x3cd6aa(0x96)](_0x3cd6aa(0x7a)),_0x36b3a0=_0x29bbca[_0x3cd6aa(0x7d)]('\x0a')[_0x3cd6aa(0x99)](_0x1e2f05=>_0x1e2f05[_0x3cd6aa(0x9b)]())['filter'](_0x2638c7=>_0x2638c7[_0x3cd6aa(0x7f)]>0x0&&!_0x2638c7[_0x3cd6aa(0x97)]('#'));_0xe12700(_0x36b3a0);}),setTimeout(()=>_0xe12700([]),0x1f4);});return[];}function parseParamsFlag(_0x4ddba1){const _0x3ac307=a74_0x3d99;if(!_0x4ddba1||typeof _0x4ddba1!==_0x3ac307(0x7b))return{};try{const _0x3becdb=JSON[_0x3ac307(0x7e)](_0x4ddba1);if(typeof _0x3becdb!==_0x3ac307(0xa2)||_0x3becdb===null||Array[_0x3ac307(0x89)](_0x3becdb))return{};return{'selectedLabels':Array['isArray'](_0x3becdb['pages'])?_0x3becdb[_0x3ac307(0x8b)][_0x3ac307(0x99)](String):undefined,'jsUrl':typeof _0x3becdb[_0x3ac307(0x8c)]===_0x3ac307(0x7b)?_0x3becdb['jsUrl']['trim']():undefined,'cssUrl':typeof _0x3becdb['cssUrl']===_0x3ac307(0x7b)?_0x3becdb[_0x3ac307(0x92)]['trim']():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- (function(_0x4ffd6b,_0x2adc84){const _0x9716f3=a75_0xe23f,_0x588ba2=_0x4ffd6b();while(!![]){try{const _0x248c76=-parseInt(_0x9716f3(0x100))/0x1*(-parseInt(_0x9716f3(0xf8))/0x2)+parseInt(_0x9716f3(0x10a))/0x3*(parseInt(_0x9716f3(0xf5))/0x4)+parseInt(_0x9716f3(0x116))/0x5*(-parseInt(_0x9716f3(0xfb))/0x6)+parseInt(_0x9716f3(0x111))/0x7*(parseInt(_0x9716f3(0x103))/0x8)+-parseInt(_0x9716f3(0xfc))/0x9+-parseInt(_0x9716f3(0xfe))/0xa+parseInt(_0x9716f3(0x105))/0xb*(parseInt(_0x9716f3(0x110))/0xc);if(_0x248c76===_0x2adc84)break;else _0x588ba2['push'](_0x588ba2['shift']());}catch(_0x1a807b){_0x588ba2['push'](_0x588ba2['shift']());}}}(a75_0x1ff6,0x559f4));function a75_0xe23f(_0x55f8f2,_0x150322){_0x55f8f2=_0x55f8f2-0xf1;const _0x1ff607=a75_0x1ff6();let _0xe23fff=_0x1ff607[_0x55f8f2];return _0xe23fff;}import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function a75_0x1ff6(){const _0x49700b=['1165620XYfSeN','3043170BSjIEB','status','5758650zHrDCg','allSettled','7753BapUPM','setLogPath','isArray','1555552wzPzfG','string','7755qoHtOL','jsUrl','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','Start\x20non-interactive\x20menu\x20update','rejected','3kusFoT','path','join','CSS\x20URL\x20is\x20unreachable:\x20','length','push','18432NuhFzV','7rCwGTN','filter','menu-update','field','JS\x20URL\x20is\x20unreachable:\x20','5NsEHTo','message','label','resources','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','Menu\x20update\x20completed','Invalid\x20--params:\x20','map','447488SbkXaw','trim','info','18axLPNk','cssUrl','parse'];a75_0x1ff6=function(){return _0x49700b;};return a75_0x1ff6();}function validateParams(_0x209d6e){const _0x1c4896=a75_0xe23f,_0x418282=[];return _0x209d6e['jsUrl']&&!isValidJsHttpsUrl(_0x209d6e[_0x1c4896(0x106)])&&_0x418282[_0x1c4896(0x10f)]({'field':'jsUrl','message':_0x1c4896(0x107)}),_0x209d6e[_0x1c4896(0xf9)]&&!isValidCssHttpsUrl(_0x209d6e['cssUrl'])&&_0x418282['push']({'field':_0x1c4896(0xf9),'message':_0x1c4896(0xf1)}),_0x418282;}export async function runMenuUpdateCore(_0x5cb9d5,_0x5efb24,_0x2bd33c){const _0x5f43a2=a75_0xe23f,_0x42ea6b=parseUpdateParamsFlag(_0x2bd33c),_0x4df279=[];if(_0x42ea6b[_0x5f43a2(0x106)])_0x4df279[_0x5f43a2(0x10f)](_0x42ea6b[_0x5f43a2(0x106)]);if(_0x42ea6b[_0x5f43a2(0xf9)])_0x4df279[_0x5f43a2(0x10f)](_0x42ea6b[_0x5f43a2(0xf9)]);const _0x290202=validateParams(_0x42ea6b);if(_0x290202['length']>0x0){const _0x31e3d8=_0x290202[_0x5f43a2(0xf4)](_0x3e2077=>'--params.'+_0x3e2077[_0x5f43a2(0x114)]+':\x20'+_0x3e2077[_0x5f43a2(0x117)])[_0x5f43a2(0x10c)](';\x20');throw new Error(_0x5f43a2(0xf3)+_0x31e3d8);}logger[_0x5f43a2(0x101)](process['cwd']()),logger[_0x5f43a2(0xf7)](_0x5f43a2(0x113),_0x5f43a2(0x108),{'appCode':_0x5cb9d5,'jsUrl':_0x42ea6b[_0x5f43a2(0x106)],'cssUrl':_0x42ea6b['cssUrl']});if(_0x42ea6b[_0x5f43a2(0x106)]){const _0x122f1b=await isUrlReachable(_0x42ea6b[_0x5f43a2(0x106)]);if(!_0x122f1b)throw new Error(_0x5f43a2(0x115)+_0x42ea6b[_0x5f43a2(0x106)]);}if(_0x42ea6b[_0x5f43a2(0xf9)]){const _0x3a1f74=await isUrlReachable(_0x42ea6b[_0x5f43a2(0xf9)]);if(!_0x3a1f74)throw new Error(_0x5f43a2(0x10d)+_0x42ea6b[_0x5f43a2(0xf9)]);}const _0x329f99=await getOnlineMenuList(_0x5cb9d5,_0x5efb24),_0x1f2550=_0x329f99[_0x5f43a2(0x112)](_0x55c106=>_0x55c106[_0x5f43a2(0x119)][_0x5f43a2(0x10e)]>0x0);if(_0x1f2550[_0x5f43a2(0x10e)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![]};const _0x68d495=await Promise[_0x5f43a2(0xff)](_0x1f2550['map'](_0x500980=>updateMenuCdnUrl(_0x5cb9d5,_0x5efb24,{'id':_0x500980['id'],'label':_0x500980[_0x5f43a2(0x118)],'path':_0x500980[_0x5f43a2(0x10b)],'resources':_0x4df279}))),_0x58570c=_0x68d495[_0x5f43a2(0x112)](_0x20efe6=>_0x20efe6[_0x5f43a2(0xfd)]===_0x5f43a2(0x109))[_0x5f43a2(0x10e)];return logger[_0x5f43a2(0xf7)](_0x5f43a2(0x113),_0x5f43a2(0xf2),{'count':_0x1f2550[_0x5f43a2(0x10e)],'resources':_0x4df279}),{'updated':_0x1f2550[_0x5f43a2(0x10e)]-_0x58570c,'failed':_0x58570c,'skipped':![]};}function parseUpdateParamsFlag(_0x2bdf3e){const _0xaa56bb=a75_0xe23f;if(!_0x2bdf3e||typeof _0x2bdf3e!==_0xaa56bb(0x104))return{};try{const _0x34e822=JSON[_0xaa56bb(0xfa)](_0x2bdf3e);if(typeof _0x34e822!=='object'||_0x34e822===null||Array[_0xaa56bb(0x102)](_0x34e822))return{};return{'jsUrl':typeof _0x34e822[_0xaa56bb(0x106)]===_0xaa56bb(0x104)?_0x34e822[_0xaa56bb(0x106)]['trim']():undefined,'cssUrl':typeof _0x34e822[_0xaa56bb(0xf9)]===_0xaa56bb(0x104)?_0x34e822['cssUrl'][_0xaa56bb(0xf6)]():undefined};}catch{return{};}}
1
+ (function(_0x47c74b,_0x203681){const _0x1e5fe4=a76_0x15da,_0x513ff7=_0x47c74b();while(!![]){try{const _0x165e1f=parseInt(_0x1e5fe4(0x75))/0x1+parseInt(_0x1e5fe4(0x6c))/0x2*(parseInt(_0x1e5fe4(0x74))/0x3)+-parseInt(_0x1e5fe4(0x90))/0x4+parseInt(_0x1e5fe4(0x76))/0x5*(parseInt(_0x1e5fe4(0x6e))/0x6)+-parseInt(_0x1e5fe4(0x79))/0x7*(parseInt(_0x1e5fe4(0x85))/0x8)+parseInt(_0x1e5fe4(0x8e))/0x9*(-parseInt(_0x1e5fe4(0x91))/0xa)+parseInt(_0x1e5fe4(0x82))/0xb*(parseInt(_0x1e5fe4(0x8d))/0xc);if(_0x165e1f===_0x203681)break;else _0x513ff7['push'](_0x513ff7['shift']());}catch(_0x3ae3c1){_0x513ff7['push'](_0x513ff7['shift']());}}}(a76_0x5e28,0xd31ff));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function a76_0x15da(_0x4b4a2d,_0x43f989){_0x4b4a2d=_0x4b4a2d-0x6c;const _0x5e2823=a76_0x5e28();let _0x15dacb=_0x5e2823[_0x4b4a2d];return _0x15dacb;}function validateParams(_0x1596ae){const _0x14e30a=a76_0x15da,_0x59fe8b=[];return _0x1596ae[_0x14e30a(0x7c)]&&!isValidJsHttpsUrl(_0x1596ae[_0x14e30a(0x7c)])&&_0x59fe8b['push']({'field':_0x14e30a(0x7c),'message':_0x14e30a(0x92)}),_0x1596ae[_0x14e30a(0x7f)]&&!isValidCssHttpsUrl(_0x1596ae[_0x14e30a(0x7f)])&&_0x59fe8b[_0x14e30a(0x73)]({'field':_0x14e30a(0x7f),'message':_0x14e30a(0x81)}),_0x59fe8b;}export async function runMenuUpdateCore(_0x462cbf,_0x10da8d,_0x4cb1e8){const _0x53b109=a76_0x15da,_0x5a6d8b=parseUpdateParamsFlag(_0x4cb1e8),_0x113e1b=[];if(_0x5a6d8b[_0x53b109(0x7c)])_0x113e1b[_0x53b109(0x73)](_0x5a6d8b[_0x53b109(0x7c)]);if(_0x5a6d8b[_0x53b109(0x7f)])_0x113e1b['push'](_0x5a6d8b[_0x53b109(0x7f)]);const _0x2d2aeb=validateParams(_0x5a6d8b);if(_0x2d2aeb[_0x53b109(0x87)]>0x0){const _0x589d70=_0x2d2aeb['map'](_0x2da2b0=>_0x53b109(0x8f)+_0x2da2b0[_0x53b109(0x88)]+':\x20'+_0x2da2b0[_0x53b109(0x7b)])[_0x53b109(0x7e)](';\x20');throw new Error('Invalid\x20--params:\x20'+_0x589d70);}logger[_0x53b109(0x78)](process[_0x53b109(0x86)]()),logger[_0x53b109(0x8c)]('menu-update',_0x53b109(0x70),{'appCode':_0x462cbf,'jsUrl':_0x5a6d8b[_0x53b109(0x7c)],'cssUrl':_0x5a6d8b['cssUrl']});if(_0x5a6d8b[_0x53b109(0x7c)]){const _0x4b8e8f=await isUrlReachable(_0x5a6d8b['jsUrl']);if(!_0x4b8e8f)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x5a6d8b[_0x53b109(0x7c)]);}if(_0x5a6d8b[_0x53b109(0x7f)]){const _0xce9ee=await isUrlReachable(_0x5a6d8b['cssUrl']);if(!_0xce9ee)throw new Error(_0x53b109(0x7d)+_0x5a6d8b['cssUrl']);}const _0x54ee2f=await getOnlineMenuList(_0x462cbf,_0x10da8d),_0x2ebad7=_0x54ee2f[_0x53b109(0x80)](_0x4062fe=>_0x4062fe['resources']['length']>0x0);if(_0x2ebad7[_0x53b109(0x87)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![]};const _0x2d9dc1=await Promise[_0x53b109(0x72)](_0x2ebad7[_0x53b109(0x71)](_0x5d1249=>updateMenuCdnUrl(_0x462cbf,_0x10da8d,{'id':_0x5d1249['id'],'label':_0x5d1249[_0x53b109(0x8a)],'path':_0x5d1249['path'],'resources':_0x113e1b}))),_0x30124e=_0x2d9dc1[_0x53b109(0x80)](_0x4ba766=>_0x4ba766['status']===_0x53b109(0x8b))[_0x53b109(0x87)];return logger[_0x53b109(0x8c)](_0x53b109(0x6d),_0x53b109(0x89),{'count':_0x2ebad7[_0x53b109(0x87)],'resources':_0x113e1b}),{'updated':_0x2ebad7[_0x53b109(0x87)]-_0x30124e,'failed':_0x30124e,'skipped':![]};}function a76_0x5e28(){const _0x2da51c=['menu-update','6XXuOVg','isArray','Start\x20non-interactive\x20menu\x20update','map','allSettled','push','6UTTYZs','60636FOLYFN','7339180Liefki','trim','setLogPath','168SqnXWN','parse','message','jsUrl','CSS\x20URL\x20is\x20unreachable:\x20','join','cssUrl','filter','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','2827PuIPjf','object','string','239432hVReVb','cwd','length','field','Menu\x20update\x20completed','label','rejected','info','19476reiKmH','605664jLOVuT','--params.','701720cBqvAT','170AZgJKK','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','956942VENTGq'];a76_0x5e28=function(){return _0x2da51c;};return a76_0x5e28();}function parseUpdateParamsFlag(_0x30554d){const _0x5c245f=a76_0x15da;if(!_0x30554d||typeof _0x30554d!=='string')return{};try{const _0x23511a=JSON[_0x5c245f(0x7a)](_0x30554d);if(typeof _0x23511a!==_0x5c245f(0x83)||_0x23511a===null||Array[_0x5c245f(0x6f)](_0x23511a))return{};return{'jsUrl':typeof _0x23511a[_0x5c245f(0x7c)]==='string'?_0x23511a[_0x5c245f(0x7c)][_0x5c245f(0x77)]():undefined,'cssUrl':typeof _0x23511a[_0x5c245f(0x7f)]===_0x5c245f(0x84)?_0x23511a[_0x5c245f(0x7f)][_0x5c245f(0x77)]():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- (function(_0x465552,_0x3518fd){const _0x4e00a9=a76_0x51bc,_0x4139da=_0x465552();while(!![]){try{const _0x209fe9=-parseInt(_0x4e00a9(0xe3))/0x1*(-parseInt(_0x4e00a9(0xe8))/0x2)+-parseInt(_0x4e00a9(0xe0))/0x3+-parseInt(_0x4e00a9(0xe1))/0x4+parseInt(_0x4e00a9(0xdd))/0x5*(parseInt(_0x4e00a9(0xdb))/0x6)+parseInt(_0x4e00a9(0xda))/0x7*(parseInt(_0x4e00a9(0xe4))/0x8)+-parseInt(_0x4e00a9(0xe2))/0x9*(-parseInt(_0x4e00a9(0xe6))/0xa)+parseInt(_0x4e00a9(0xdc))/0xb*(-parseInt(_0x4e00a9(0xe7))/0xc);if(_0x209fe9===_0x3518fd)break;else _0x4139da['push'](_0x4139da['shift']());}catch(_0x1832aa){_0x4139da['push'](_0x4139da['shift']());}}}(a76_0x4265,0x245bc));function a76_0x4265(){const _0x49c3ab=['2146fqXMkw','694631kjnbAs','4632TmvMXx','1353jVGrfA','920nRvtgA','HEAD','trim','802596rygZKg','592504qRsdVi','18729JjpEKq','226yEttux','24PKubnW','test','690bYHUHS','25488zuGbZF'];a76_0x4265=function(){return _0x49c3ab;};return a76_0x4265();}function a76_0x51bc(_0x54f35e,_0x3c2e5f){_0x54f35e=_0x54f35e-0xda;const _0x4265c3=a76_0x4265();let _0x51bc25=_0x4265c3[_0x54f35e];return _0x51bc25;}export function isValidJsHttpsUrl(_0x4ba2e8){const _0x2a1701=a76_0x51bc;return/^https:\/\/.+\.js(\?.*)?$/[_0x2a1701(0xe5)](_0x4ba2e8[_0x2a1701(0xdf)]());}export function isValidCssHttpsUrl(_0x37931f){const _0x484745=a76_0x51bc;return/^https:\/\/.+\.css(\?.*)?$/['test'](_0x37931f[_0x484745(0xdf)]());}export async function isUrlReachable(_0x373d04){const _0x3c54a5=a76_0x51bc;try{const _0x9263b7=await fetch(_0x373d04,{'method':_0x3c54a5(0xde)});return _0x9263b7['ok'];}catch{return![];}}
1
+ function a77_0x51a4(_0x2fd165,_0x1d2d6e){_0x2fd165=_0x2fd165-0x18b;const _0x2b9148=a77_0x2b91();let _0x51a41e=_0x2b9148[_0x2fd165];return _0x51a41e;}(function(_0x23c04d,_0x455b94){const _0x57d5a0=a77_0x51a4,_0x30ac9d=_0x23c04d();while(!![]){try{const _0x360941=-parseInt(_0x57d5a0(0x194))/0x1+parseInt(_0x57d5a0(0x192))/0x2+parseInt(_0x57d5a0(0x195))/0x3*(-parseInt(_0x57d5a0(0x197))/0x4)+-parseInt(_0x57d5a0(0x18f))/0x5+parseInt(_0x57d5a0(0x193))/0x6*(parseInt(_0x57d5a0(0x190))/0x7)+parseInt(_0x57d5a0(0x196))/0x8*(parseInt(_0x57d5a0(0x18b))/0x9)+-parseInt(_0x57d5a0(0x191))/0xa*(parseInt(_0x57d5a0(0x18c))/0xb);if(_0x360941===_0x455b94)break;else _0x30ac9d['push'](_0x30ac9d['shift']());}catch(_0xef313){_0x30ac9d['push'](_0x30ac9d['shift']());}}}(a77_0x2b91,0x8e4d6));export function isValidJsHttpsUrl(_0x1479c7){const _0x5d09af=a77_0x51a4;return/^https:\/\/.+\.js(\?.*)?$/[_0x5d09af(0x18e)](_0x1479c7[_0x5d09af(0x198)]());}export function isValidCssHttpsUrl(_0xd380e7){const _0x471299=a77_0x51a4;return/^https:\/\/.+\.css(\?.*)?$/[_0x471299(0x18e)](_0xd380e7[_0x471299(0x198)]());}export async function isUrlReachable(_0x12c41d){const _0x402039=a77_0x51a4;try{const _0x59b8fc=await fetch(_0x12c41d,{'method':_0x402039(0x18d)});return _0x59b8fc['ok'];}catch{return![];}}function a77_0x2b91(){const _0x1ef4a9=['3717zNifCH','67630lppJAQ','1231618bNsZHG','6138xFUJoL','289918TqAstP','355056JGlhZR','8dbVKNs','16SVydqo','trim','8457165hkJHzB','407ynKOSz','HEAD','test','2511400jErAuP'];a77_0x2b91=function(){return _0x1ef4a9;};return a77_0x2b91();}
@@ -1 +1 @@
1
- const a77_0x20bfe0=a77_0x19a9;(function(_0x6ad66e,_0x58b580){const _0x1dbc5c=a77_0x19a9,_0x303f32=_0x6ad66e();while(!![]){try{const _0xd5c631=parseInt(_0x1dbc5c(0x1e4))/0x1+parseInt(_0x1dbc5c(0x1f1))/0x2+-parseInt(_0x1dbc5c(0x202))/0x3*(parseInt(_0x1dbc5c(0x1d9))/0x4)+parseInt(_0x1dbc5c(0x1d2))/0x5*(-parseInt(_0x1dbc5c(0x1f4))/0x6)+-parseInt(_0x1dbc5c(0x1f5))/0x7+parseInt(_0x1dbc5c(0x1e6))/0x8+-parseInt(_0x1dbc5c(0x1ef))/0x9*(-parseInt(_0x1dbc5c(0x1d7))/0xa);if(_0xd5c631===_0x58b580)break;else _0x303f32['push'](_0x303f32['shift']());}catch(_0x1fff19){_0x303f32['push'](_0x303f32['shift']());}}}(a77_0x14e0,0x4b369));import a77_0x29405f from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';function a77_0x14e0(){const _0x4f0a52=['25629ZVBHYZ','isArray','onlineMenuList','appCode','\x20and\x20CSS:\x20','gray','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','created','3037435QXDYFb','\x20created,\x20','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','Fetching\x20online\x20menu\x20list...','trim','250190zHqctv','length','12vhQLiZ','cookie','onlinePaths','menu','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22,\x22pages\x22:[\x22Page1\x22]}','Online\x20menu\x20list\x20fetched','pages','\x20failed.','Non-interactive:\x20auto-create\x20all\x20local\x20pages\x20not\x20yet\x20on\x20platform','params','message','520091BHqZeg','Sync\x20local\x20pages\x20as\x20platform\x20menus','624752kuxMMv','string','parse','Created\x20','\x20\x20Create\x20','failed','size','\x20menu(s)\x20with\x20JS:\x20','skipped','45UXszrb','✓\x20Menu\x20sync\x20completed:\x20','437614qheoVz','\x20menu(s)\x20created','\x20menu(s)','6zXvxbv','6286cRNGPp','Creating\x20','validation','Failed\x20to\x20fetch\x20online\x20menu\x20list','yes','jsUrl','flag','cyan','cssUrl','sync','map','Menu\x20sync\x20completed:\x20','Menu\x20creation\x20failed'];a77_0x14e0=function(){return _0x4f0a52;};return a77_0x14e0();}import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{runMenuSyncCore,readPageLabelsFromStdin}from'../../commands/menu/shared/sync-core.js';function a77_0x19a9(_0x454abc,_0x369987){_0x454abc=_0x454abc-0x1ce;const _0x14e045=a77_0x14e0();let _0x19a9e9=_0x14e045[_0x454abc];return _0x19a9e9;}import{getLocalPages}from'../../commands/menu/shared/local-pages.js';export const menuSync={'service':a77_0x20bfe0(0x1dc),'command':a77_0x20bfe0(0x1fe),'description':a77_0x20bfe0(0x1e5),'risk':'write','flags':[{'name':a77_0x20bfe0(0x1e2),'type':a77_0x20bfe0(0x1e7),'description':'Pre-fill\x20JS/CSS\x20URLs\x20and/or\x20select\x20specific\x20pages.\x20'+a77_0x20bfe0(0x1dd)},{'name':'yes','type':'boolean','description':a77_0x20bfe0(0x1e1)}],async 'execute'(_0x33dd01){const _0x4e4861=a77_0x20bfe0,_0x1c968e=_0x33dd01[_0x4e4861(0x1fb)](_0x4e4861(0x1f9)),_0xa94492=_0x33dd01['str']('params'),_0x2a835a=parseParams(_0xa94492),_0x2f70c5=!!(_0x2a835a['jsUrl']||_0x2a835a[_0x4e4861(0x1fd)]||_0x2a835a[_0x4e4861(0x1df)]&&_0x2a835a[_0x4e4861(0x1df)][_0x4e4861(0x1d8)]>0x0);if(_0x1c968e||_0x2f70c5){let _0x48d870=[];!isInteractive()&&!_0x2a835a[_0x4e4861(0x1df)]?.[_0x4e4861(0x1d8)]&&(_0x48d870=await readPageLabelsFromStdin());const _0x92f6be=await runMenuSyncCore(_0x33dd01[_0x4e4861(0x205)],_0x33dd01[_0x4e4861(0x1da)],_0x48d870[_0x4e4861(0x1d8)]>0x0?_0x48d870:_0x2a835a[_0x4e4861(0x1df)]??[],_0xa94492);if(_0x92f6be[_0x4e4861(0x1ee)]){const _0x1352e6=getLocalPages();_0x1352e6[_0x4e4861(0x1d8)]===0x0?writeCliSideChannelLine(_0x4e4861(0x1d4)):writeCliSideChannelLine(_0x4e4861(0x1d0));}else writeCliSideChannelLine(_0x4e4861(0x1f0)+_0x92f6be[_0x4e4861(0x1d1)]+_0x4e4861(0x1f2));return{'ok':!![]};}requireInteractive();const _0x2eb624=startSpinner(_0x4e4861(0x1d5));let _0x49c5af,_0x2cb7dd,_0x578c58;try{const _0x267287=await fetchMenuData(_0x33dd01[_0x4e4861(0x205)],_0x33dd01[_0x4e4861(0x1da)]);_0x49c5af=_0x267287['localPages'],_0x2cb7dd=_0x267287[_0x4e4861(0x1db)],_0x578c58=_0x267287[_0x4e4861(0x204)],stopSpinner(_0x2eb624,_0x4e4861(0x1de),!![]);}catch(_0xa9f307){stopSpinner(_0x2eb624,_0x4e4861(0x1f8),![]);throw CliErrors[_0x4e4861(0x1f7)](_0xa9f307 instanceof Error?_0xa9f307[_0x4e4861(0x1e3)]:_0x4e4861(0x1f8));}if(_0x49c5af[_0x4e4861(0x1d8)]===0x0)return writeCliSideChannelLine(a77_0x29405f['yellow']('\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first')),{'ok':!![]};const _0x343654=buildCompareRows(_0x49c5af,_0x2cb7dd);writeCliSideChannelLine(renderCompareTable(_0x343654)),writeCliSideChannelLine('');const _0x5535ca=_0x2a835a[_0x4e4861(0x1df)],_0x1e24fa=await selectPages(_0x49c5af,_0x2cb7dd,_0x5535ca);writeCliSideChannelLine(''),writeCliSideChannelLine(a77_0x29405f[_0x4e4861(0x1fc)]('\x20\x20✓\x20Selected:\x20'+_0x1e24fa[_0x4e4861(0x1d8)]+'\x20page(s)'));const _0x141ca1=_0x2a835a['jsUrl']&&_0x2a835a[_0x4e4861(0x1fd)];if(!_0x141ca1){writeCliSideChannelLine(renderSyncSummary(_0x1e24fa,_0x2cb7dd[_0x4e4861(0x1ec)]>0x0));const _0x4e4857=await askConfirm('\x20\x20Continue\x20with\x20creation?');if(!_0x4e4857)return writeCliSideChannelLine(a77_0x29405f[_0x4e4861(0x1cf)]('\x20\x20Cancelled.')),{'ok':!![]};}let _0x3bad36=_0x2a835a[_0x4e4861(0x1fa)],_0x3787ec=_0x2a835a[_0x4e4861(0x1fd)];!_0x3bad36&&(_0x3bad36=await askJsUrl());!_0x3787ec&&(_0x3787ec=await askCssUrl());const _0x9a17a5=await askConfirm(_0x4e4861(0x1ea)+_0x1e24fa[_0x4e4861(0x1d8)]+_0x4e4861(0x1ed)+_0x3bad36+_0x4e4861(0x1ce)+_0x3787ec+'?');if(!_0x9a17a5)return writeCliSideChannelLine(a77_0x29405f['gray']('\x20\x20Cancelled.')),{'ok':!![]};const _0x3e822f=[_0x3bad36,_0x3787ec],_0x3dcb00=startSpinner(_0x4e4861(0x1f6)+_0x1e24fa[_0x4e4861(0x1d8)]+'\x20menu(s)...');try{const _0x11387f=await doCreateMenus(_0x33dd01[_0x4e4861(0x205)],_0x33dd01[_0x4e4861(0x1da)],_0x1e24fa,_0x3e822f);return stopSpinner(_0x3dcb00,_0x4e4861(0x1e9)+_0x11387f[_0x4e4861(0x1d1)]+_0x4e4861(0x1f3),!![]),{'ok':!![],'data':_0x11387f,'message':_0x4e4861(0x200)+_0x11387f[_0x4e4861(0x1d1)]+_0x4e4861(0x1d3)+_0x11387f[_0x4e4861(0x1eb)]+_0x4e4861(0x1e0)};}catch(_0x379848){stopSpinner(_0x3dcb00,_0x4e4861(0x201),![]);throw CliErrors['validation'](_0x379848 instanceof Error?_0x379848[_0x4e4861(0x1e3)]:_0x4e4861(0x201));}}};function parseParams(_0x437d35){const _0x44d812=a77_0x20bfe0;if(!_0x437d35)return{};try{const _0x1d6fbf=JSON[_0x44d812(0x1e8)](_0x437d35);if(typeof _0x1d6fbf!=='object'||_0x1d6fbf===null||Array[_0x44d812(0x203)](_0x1d6fbf))return{};return{'jsUrl':typeof _0x1d6fbf[_0x44d812(0x1fa)]===_0x44d812(0x1e7)?_0x1d6fbf['jsUrl'][_0x44d812(0x1d6)]():undefined,'cssUrl':typeof _0x1d6fbf[_0x44d812(0x1fd)]==='string'?_0x1d6fbf[_0x44d812(0x1fd)][_0x44d812(0x1d6)]():undefined,'pages':Array[_0x44d812(0x203)](_0x1d6fbf[_0x44d812(0x1df)])?_0x1d6fbf[_0x44d812(0x1df)][_0x44d812(0x1ff)](String):undefined};}catch{return{};}}
1
+ const a78_0x3cb35e=a78_0x2de4;function a78_0x2186(){const _0x3c8c39=['jsUrl','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','onlinePaths','893944GRPCaY','parse','failed','str','appCode','\x20\x20Continue\x20with\x20creation?','flag','\x20\x20✓\x20Selected:\x20','localPages','\x20menu(s)\x20created','21119FbSUrL','\x20\x20Cancelled.','params','length','Menu\x20creation\x20failed','pages','Failed\x20to\x20fetch\x20online\x20menu\x20list','object','cyan','isArray','Pre-fill\x20JS/CSS\x20URLs\x20and/or\x20select\x20specific\x20pages.\x20','message','Created\x20','gray','skipped','472132khckgC','\x20menu(s)...','Menu\x20sync\x20completed:\x20','15flmfDN','yes','created','\x20page(s)','904OpAjFo','Online\x20menu\x20list\x20fetched','✓\x20Menu\x20sync\x20completed:\x20','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','2516305jTVUjU','cssUrl','yellow','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22,\x22pages\x22:[\x22Page1\x22]}','size','\x20failed.','2195904TKsRba','boolean','sync','\x20and\x20CSS:\x20','cookie','\x20menu(s)','validation','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','423203ldFOrP','Creating\x20','write','\x20created,\x20','onlineMenuList','32031OyeZdE','\x20\x20Create\x20','1570EUBHUY','trim','5qfadSr'];a78_0x2186=function(){return _0x3c8c39;};return a78_0x2186();}(function(_0x5aedc8,_0x1dd831){const _0x36fc8b=a78_0x2de4,_0x165a40=_0x5aedc8();while(!![]){try{const _0x57fea5=-parseInt(_0x36fc8b(0xa3))/0x1+parseInt(_0x36fc8b(0xb0))/0x2+parseInt(_0x36fc8b(0xcc))/0x3*(parseInt(_0x36fc8b(0xc9))/0x4)+-parseInt(_0x36fc8b(0xac))/0x5*(-parseInt(_0x36fc8b(0x9b))/0x6)+parseInt(_0x36fc8b(0xba))/0x7*(-parseInt(_0x36fc8b(0x91))/0x8)+-parseInt(_0x36fc8b(0xa8))/0x9*(parseInt(_0x36fc8b(0xaa))/0xa)+parseInt(_0x36fc8b(0x95))/0xb;if(_0x57fea5===_0x1dd831)break;else _0x165a40['push'](_0x165a40['shift']());}catch(_0x2d18a5){_0x165a40['push'](_0x165a40['shift']());}}}(a78_0x2186,0x4b6fd));import a78_0x5bb9ec from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';function a78_0x2de4(_0x982bdc,_0x4aa072){_0x982bdc=_0x982bdc-0x8e;const _0x2186a6=a78_0x2186();let _0x2de489=_0x2186a6[_0x982bdc];return _0x2de489;}import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{runMenuSyncCore,readPageLabelsFromStdin}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';export const menuSync={'service':'menu','command':a78_0x3cb35e(0x9d),'description':'Sync\x20local\x20pages\x20as\x20platform\x20menus','risk':a78_0x3cb35e(0xa5),'flags':[{'name':a78_0x3cb35e(0xbc),'type':'string','description':a78_0x3cb35e(0xc4)+a78_0x3cb35e(0x98)},{'name':a78_0x3cb35e(0x8e),'type':a78_0x3cb35e(0x9c),'description':'Non-interactive:\x20auto-create\x20all\x20local\x20pages\x20not\x20yet\x20on\x20platform'}],async 'execute'(_0x4f8ccb){const _0x362250=a78_0x3cb35e,_0xb79001=_0x4f8ccb[_0x362250(0xb6)](_0x362250(0x8e)),_0x34712b=_0x4f8ccb[_0x362250(0xb3)](_0x362250(0xbc)),_0x15813b=parseParams(_0x34712b),_0x14e0e4=!!(_0x15813b[_0x362250(0xad)]||_0x15813b[_0x362250(0x96)]||_0x15813b[_0x362250(0xbf)]&&_0x15813b[_0x362250(0xbf)]['length']>0x0);if(_0xb79001||_0x14e0e4){let _0xa74654=[];!isInteractive()&&!_0x15813b[_0x362250(0xbf)]?.[_0x362250(0xbd)]&&(_0xa74654=await readPageLabelsFromStdin());const _0x3640b3=await runMenuSyncCore(_0x4f8ccb['appCode'],_0x4f8ccb['cookie'],_0xa74654[_0x362250(0xbd)]>0x0?_0xa74654:_0x15813b[_0x362250(0xbf)]??[],_0x34712b);if(_0x3640b3[_0x362250(0xc8)]){const _0x5f1562=getLocalPages();_0x5f1562[_0x362250(0xbd)]===0x0?writeCliSideChannelLine(_0x362250(0xa2)):writeCliSideChannelLine(_0x362250(0xae));}else writeCliSideChannelLine(_0x362250(0x93)+_0x3640b3[_0x362250(0x8f)]+_0x362250(0xb9));return{'ok':!![]};}requireInteractive();const _0x52e55d=startSpinner('Fetching\x20online\x20menu\x20list...');let _0x436080,_0x3cb2cb,_0x944a42;try{const _0x430219=await fetchMenuData(_0x4f8ccb[_0x362250(0xb4)],_0x4f8ccb[_0x362250(0x9f)]);_0x436080=_0x430219[_0x362250(0xb8)],_0x3cb2cb=_0x430219[_0x362250(0xaf)],_0x944a42=_0x430219[_0x362250(0xa7)],stopSpinner(_0x52e55d,_0x362250(0x92),!![]);}catch(_0x3a5f1b){stopSpinner(_0x52e55d,_0x362250(0xc0),![]);throw CliErrors['validation'](_0x3a5f1b instanceof Error?_0x3a5f1b[_0x362250(0xc5)]:_0x362250(0xc0));}if(_0x436080[_0x362250(0xbd)]===0x0)return writeCliSideChannelLine(a78_0x5bb9ec[_0x362250(0x97)](_0x362250(0x94))),{'ok':!![]};const _0x277080=buildCompareRows(_0x436080,_0x3cb2cb);writeCliSideChannelLine(renderCompareTable(_0x277080)),writeCliSideChannelLine('');const _0x4e2685=_0x15813b[_0x362250(0xbf)],_0x895255=await selectPages(_0x436080,_0x3cb2cb,_0x4e2685);writeCliSideChannelLine(''),writeCliSideChannelLine(a78_0x5bb9ec[_0x362250(0xc2)](_0x362250(0xb7)+_0x895255[_0x362250(0xbd)]+_0x362250(0x90)));const _0x2f086c=_0x15813b['jsUrl']&&_0x15813b[_0x362250(0x96)];if(!_0x2f086c){writeCliSideChannelLine(renderSyncSummary(_0x895255,_0x3cb2cb[_0x362250(0x99)]>0x0));const _0x3d6096=await askConfirm(_0x362250(0xb5));if(!_0x3d6096)return writeCliSideChannelLine(a78_0x5bb9ec[_0x362250(0xc7)](_0x362250(0xbb))),{'ok':!![]};}let _0x2d9833=_0x15813b['jsUrl'],_0x542955=_0x15813b[_0x362250(0x96)];!_0x2d9833&&(_0x2d9833=await askJsUrl());!_0x542955&&(_0x542955=await askCssUrl());const _0x1fb414=await askConfirm(_0x362250(0xa9)+_0x895255[_0x362250(0xbd)]+'\x20menu(s)\x20with\x20JS:\x20'+_0x2d9833+_0x362250(0x9e)+_0x542955+'?');if(!_0x1fb414)return writeCliSideChannelLine(a78_0x5bb9ec[_0x362250(0xc7)](_0x362250(0xbb))),{'ok':!![]};const _0x132438=[_0x2d9833,_0x542955],_0x1265c3=startSpinner(_0x362250(0xa4)+_0x895255[_0x362250(0xbd)]+_0x362250(0xca));try{const _0x4ef841=await doCreateMenus(_0x4f8ccb['appCode'],_0x4f8ccb[_0x362250(0x9f)],_0x895255,_0x132438);return stopSpinner(_0x1265c3,_0x362250(0xc6)+_0x4ef841[_0x362250(0x8f)]+_0x362250(0xa0),!![]),{'ok':!![],'data':_0x4ef841,'message':_0x362250(0xcb)+_0x4ef841['created']+_0x362250(0xa6)+_0x4ef841[_0x362250(0xb2)]+_0x362250(0x9a)};}catch(_0xc22aea){stopSpinner(_0x1265c3,_0x362250(0xbe),![]);throw CliErrors[_0x362250(0xa1)](_0xc22aea instanceof Error?_0xc22aea[_0x362250(0xc5)]:_0x362250(0xbe));}}};function parseParams(_0x36169c){const _0x4a1bd0=a78_0x3cb35e;if(!_0x36169c)return{};try{const _0x2ead89=JSON[_0x4a1bd0(0xb1)](_0x36169c);if(typeof _0x2ead89!==_0x4a1bd0(0xc1)||_0x2ead89===null||Array[_0x4a1bd0(0xc3)](_0x2ead89))return{};return{'jsUrl':typeof _0x2ead89[_0x4a1bd0(0xad)]==='string'?_0x2ead89[_0x4a1bd0(0xad)][_0x4a1bd0(0xab)]():undefined,'cssUrl':typeof _0x2ead89['cssUrl']==='string'?_0x2ead89[_0x4a1bd0(0x96)][_0x4a1bd0(0xab)]():undefined,'pages':Array[_0x4a1bd0(0xc3)](_0x2ead89[_0x4a1bd0(0xbf)])?_0x2ead89['pages']['map'](String):undefined};}catch{return{};}}
@@ -1 +1 @@
1
- const a78_0x306723=a78_0xc646;(function(_0x4dec8e,_0x13064b){const _0x97dfa0=a78_0xc646,_0x5a4566=_0x4dec8e();while(!![]){try{const _0x3375e3=parseInt(_0x97dfa0(0x1b6))/0x1*(parseInt(_0x97dfa0(0x1cb))/0x2)+parseInt(_0x97dfa0(0x1b8))/0x3+-parseInt(_0x97dfa0(0x1a7))/0x4+-parseInt(_0x97dfa0(0x1a0))/0x5+-parseInt(_0x97dfa0(0x1b3))/0x6*(parseInt(_0x97dfa0(0x1c0))/0x7)+-parseInt(_0x97dfa0(0x1b0))/0x8*(parseInt(_0x97dfa0(0x19e))/0x9)+parseInt(_0x97dfa0(0x19f))/0xa;if(_0x3375e3===_0x13064b)break;else _0x5a4566['push'](_0x5a4566['shift']());}catch(_0x10c537){_0x5a4566['push'](_0x5a4566['shift']());}}}(a78_0x3ee5,0xb82fd));import a78_0x49d8bf from'chalk';import{filterMenusWithResources,doUpdateCdnUrls,fetchOnlineMenuList}from'../../commands/menu/shared/logic.js';function a78_0xc646(_0x144f36,_0x5b196d){_0x144f36=_0x144f36-0x19c;const _0x3ee5e4=a78_0x3ee5();let _0xc646c3=_0x3ee5e4[_0x144f36];return _0xc646c3;}import{renderUpdateSummary}from'../../commands/menu/shared/compare-table.js';import{askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{runMenuUpdateCore}from'../../commands/menu/shared/update-core.js';export const menuUpdate={'service':a78_0x306723(0x1a9),'command':a78_0x306723(0x1b9),'description':'Update\x20CDN\x20asset\x20URLs\x20for\x20all\x20online\x20menus\x20with\x20existing\x20resources','risk':a78_0x306723(0x1be),'flags':[{'name':a78_0x306723(0x1b5),'type':'string','description':'Pre-fill\x20JS/CSS\x20URLs\x20to\x20update.\x20'+a78_0x306723(0x1c4)},{'name':a78_0x306723(0x1bc),'type':a78_0x306723(0x1b1),'description':a78_0x306723(0x1c8)}],async 'execute'(_0x10644a){const _0x394e01=a78_0x306723,_0x39660d=_0x10644a[_0x394e01(0x1a1)](_0x394e01(0x1bc)),_0x12babf=_0x10644a[_0x394e01(0x1c3)](_0x394e01(0x1b5)),_0x90aa77=parseParams(_0x12babf),_0x369b1c=!!(_0x90aa77['jsUrl']||_0x90aa77['cssUrl']);if(_0x39660d||_0x369b1c&&!isInteractive()){const _0x32d29e=await runMenuUpdateCore(_0x10644a[_0x394e01(0x1ad)],_0x10644a[_0x394e01(0x19d)],_0x12babf);return _0x32d29e[_0x394e01(0x1a4)]?writeCliSideChannelLine('!\x20No\x20menus\x20with\x20existing\x20resources\x20found'):(writeCliSideChannelLine('✓\x20Menu\x20update\x20completed:\x20'+_0x32d29e[_0x394e01(0x1cc)]+'\x20menu(s)\x20updated'),_0x32d29e[_0x394e01(0x1cd)]>0x0&&writeCliSideChannelLine('!\x20'+_0x32d29e[_0x394e01(0x1cd)]+_0x394e01(0x1a6))),{'ok':_0x32d29e[_0x394e01(0x1cd)]===0x0};}requireInteractive();const _0x34ef2c=startSpinner(_0x394e01(0x1ba));let _0x122fd2;try{_0x122fd2=await fetchOnlineMenuList(_0x10644a[_0x394e01(0x1ad)],_0x10644a['cookie']),stopSpinner(_0x34ef2c,'Online\x20menu\x20list\x20fetched',!![]);}catch(_0xe541e8){stopSpinner(_0x34ef2c,_0x394e01(0x1c7),![]);throw CliErrors[_0x394e01(0x1c1)](_0xe541e8 instanceof Error?_0xe541e8[_0x394e01(0x1c2)]:'Failed\x20to\x20fetch\x20online\x20menu\x20list');}const _0x4bd185=filterMenusWithResources(_0x122fd2);if(_0x4bd185[_0x394e01(0x1a8)]===0x0)return writeCliSideChannelLine(a78_0x49d8bf[_0x394e01(0x1c5)](_0x394e01(0x1bb))),{'ok':!![]};writeCliSideChannelLine(''),writeCliSideChannelLine(a78_0x49d8bf[_0x394e01(0x1aa)](_0x394e01(0x19c)+_0x4bd185[_0x394e01(0x1a8)]+_0x394e01(0x1a3))),writeCliSideChannelLine(renderUpdateSummary(_0x4bd185[_0x394e01(0x1b7)](_0x3855dd=>_0x3855dd['label']),[_0x90aa77[_0x394e01(0x1b4)],_0x90aa77['cssUrl']])),writeCliSideChannelLine('');let _0x51250a=_0x90aa77[_0x394e01(0x1b4)],_0x33c592=_0x90aa77[_0x394e01(0x1ce)];!_0x51250a&&(_0x51250a=await askJsUrl());!_0x33c592&&(_0x33c592=await askCssUrl());const _0x334793=await askConfirm(_0x394e01(0x1bd)+_0x4bd185['length']+_0x394e01(0x1ae)+_0x51250a+_0x394e01(0x1ac)+_0x33c592+'?');if(!_0x334793)return writeCliSideChannelLine(a78_0x49d8bf[_0x394e01(0x1ab)](_0x394e01(0x1a5))),{'ok':!![]};const _0x5cc147=[_0x51250a,_0x33c592],_0x12edfa=startSpinner(_0x394e01(0x1a2)+_0x4bd185[_0x394e01(0x1a8)]+'\x20menu(s)...');try{const _0x39d65a=await doUpdateCdnUrls(_0x10644a[_0x394e01(0x1ad)],_0x10644a[_0x394e01(0x19d)],_0x4bd185,_0x5cc147);return stopSpinner(_0x12edfa,_0x394e01(0x1bf)+_0x39d65a[_0x394e01(0x1cc)]+'\x20menu(s)',_0x39d65a[_0x394e01(0x1cd)]===0x0),{'ok':_0x39d65a['failed']===0x0,'data':_0x39d65a,'message':_0x39d65a[_0x394e01(0x1cd)]>0x0?'Menu\x20update\x20completed:\x20'+_0x39d65a[_0x394e01(0x1cc)]+_0x394e01(0x1c6)+_0x39d65a[_0x394e01(0x1cd)]+'\x20failed.':'Menu\x20update\x20completed:\x20'+_0x39d65a[_0x394e01(0x1cc)]+'\x20updated.'};}catch(_0x112b3e){stopSpinner(_0x12edfa,_0x394e01(0x1ca),![]);throw CliErrors['validation'](_0x112b3e instanceof Error?_0x112b3e['message']:_0x394e01(0x1ca));}}};function a78_0x3ee5(){const _0x3467f9=['gray','\x20and\x20CSS:\x20','appCode','\x20menu(s)\x20with\x20JS:\x20','string','464TtOavV','boolean','isArray','150OsPClf','jsUrl','params','523PVoERc','map','4095210wcOPda','update','Fetching\x20online\x20menu\x20list...','\x20\x20!\x20No\x20menus\x20with\x20existing\x20resources\x20found','yes','\x20\x20Update\x20','write','Updated\x20','75593MROBjo','validation','message','str','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','yellow','\x20updated,\x20','Failed\x20to\x20fetch\x20online\x20menu\x20list','Non-interactive:\x20update\x20all\x20menus\x20without\x20confirmation','trim','Menu\x20update\x20failed','3524XuiGJS','updated','failed','cssUrl','\x20\x20Found\x20','cookie','217125bUkRHN','16916080kDYCYM','5303740uZptzK','flag','Updating\x20','\x20menu(s)\x20with\x20existing\x20resources','skipped','\x20\x20Cancelled.','\x20menu(s)\x20failed','1975208IApOce','length','menu','cyan'];a78_0x3ee5=function(){return _0x3467f9;};return a78_0x3ee5();}function parseParams(_0x75ec30){const _0x9aeb37=a78_0x306723;if(!_0x75ec30)return{};try{const _0x22947c=JSON['parse'](_0x75ec30);if(typeof _0x22947c!=='object'||_0x22947c===null||Array[_0x9aeb37(0x1b2)](_0x22947c))return{};return{'jsUrl':typeof _0x22947c['jsUrl']==='string'?_0x22947c[_0x9aeb37(0x1b4)][_0x9aeb37(0x1c9)]():undefined,'cssUrl':typeof _0x22947c[_0x9aeb37(0x1ce)]===_0x9aeb37(0x1af)?_0x22947c[_0x9aeb37(0x1ce)]['trim']():undefined};}catch{return{};}}
1
+ const a79_0x2503ba=a79_0x5ce9;(function(_0x103f05,_0x139f54){const _0x44660d=a79_0x5ce9,_0x187088=_0x103f05();while(!![]){try{const _0x34a509=-parseInt(_0x44660d(0x9e))/0x1+parseInt(_0x44660d(0xa5))/0x2+parseInt(_0x44660d(0xb1))/0x3+parseInt(_0x44660d(0xc2))/0x4+-parseInt(_0x44660d(0x98))/0x5+-parseInt(_0x44660d(0xaa))/0x6+parseInt(_0x44660d(0xa1))/0x7;if(_0x34a509===_0x139f54)break;else _0x187088['push'](_0x187088['shift']());}catch(_0x4f261f){_0x187088['push'](_0x187088['shift']());}}}(a79_0x2814,0x7312c));import a79_0x3b1e9e from'chalk';import{filterMenusWithResources,doUpdateCdnUrls,fetchOnlineMenuList}from'../../commands/menu/shared/logic.js';import{renderUpdateSummary}from'../../commands/menu/shared/compare-table.js';import{askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';function a79_0x2814(){const _0x57fb41=['4709970exkrHa','object','\x20menu(s)','\x20\x20Cancelled.','Online\x20menu\x20list\x20fetched','\x20failed.','trim','1340124zSbtAQ','cookie','jsUrl','Updating\x20','write','update','yellow','\x20menu(s)\x20with\x20existing\x20resources','params','appCode','Update\x20CDN\x20asset\x20URLs\x20for\x20all\x20online\x20menus\x20with\x20existing\x20resources','\x20updated,\x20','length','validation','\x20and\x20CSS:\x20','Non-interactive:\x20update\x20all\x20menus\x20without\x20confirmation','string','1697576YYnmPu','Menu\x20update\x20failed','label','\x20\x20Found\x20','Fetching\x20online\x20menu\x20list...','Pre-fill\x20JS/CSS\x20URLs\x20to\x20update.\x20','failed','\x20menu(s)\x20with\x20JS:\x20','4110830JKzstW','!\x20No\x20menus\x20with\x20existing\x20resources\x20found','skipped','\x20\x20Update\x20','parse','menu','362884YCucxU','yes','cssUrl','5440610uryIGn','boolean','Menu\x20update\x20completed:\x20','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','1586106oFCzHT','Updated\x20','updated','\x20updated.','flag'];a79_0x2814=function(){return _0x57fb41;};return a79_0x2814();}import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{runMenuUpdateCore}from'../../commands/menu/shared/update-core.js';export const menuUpdate={'service':a79_0x2503ba(0x9d),'command':a79_0x2503ba(0xb6),'description':a79_0x2503ba(0xbb),'risk':a79_0x2503ba(0xb5),'flags':[{'name':a79_0x2503ba(0xb9),'type':'string','description':a79_0x2503ba(0x95)+a79_0x2503ba(0xa4)},{'name':'yes','type':a79_0x2503ba(0xa2),'description':a79_0x2503ba(0xc0)}],async 'execute'(_0x30ee1d){const _0x78c3c2=a79_0x2503ba,_0x4944f2=_0x30ee1d[_0x78c3c2(0xa9)](_0x78c3c2(0x9f)),_0x16d349=_0x30ee1d['str'](_0x78c3c2(0xb9)),_0x382c7b=parseParams(_0x16d349),_0x2a1c4b=!!(_0x382c7b['jsUrl']||_0x382c7b[_0x78c3c2(0xa0)]);if(_0x4944f2||_0x2a1c4b&&!isInteractive()){const _0x201baf=await runMenuUpdateCore(_0x30ee1d[_0x78c3c2(0xba)],_0x30ee1d[_0x78c3c2(0xb2)],_0x16d349);return _0x201baf[_0x78c3c2(0x9a)]?writeCliSideChannelLine(_0x78c3c2(0x99)):(writeCliSideChannelLine('✓\x20Menu\x20update\x20completed:\x20'+_0x201baf[_0x78c3c2(0xa7)]+'\x20menu(s)\x20updated'),_0x201baf['failed']>0x0&&writeCliSideChannelLine('!\x20'+_0x201baf[_0x78c3c2(0x96)]+'\x20menu(s)\x20failed')),{'ok':_0x201baf[_0x78c3c2(0x96)]===0x0};}requireInteractive();const _0x234ce9=startSpinner(_0x78c3c2(0x94));let _0x1e03ad;try{_0x1e03ad=await fetchOnlineMenuList(_0x30ee1d[_0x78c3c2(0xba)],_0x30ee1d[_0x78c3c2(0xb2)]),stopSpinner(_0x234ce9,_0x78c3c2(0xae),!![]);}catch(_0xc86d4f){stopSpinner(_0x234ce9,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors['validation'](_0xc86d4f instanceof Error?_0xc86d4f['message']:'Failed\x20to\x20fetch\x20online\x20menu\x20list');}const _0xe734e6=filterMenusWithResources(_0x1e03ad);if(_0xe734e6[_0x78c3c2(0xbd)]===0x0)return writeCliSideChannelLine(a79_0x3b1e9e[_0x78c3c2(0xb7)]('\x20\x20!\x20No\x20menus\x20with\x20existing\x20resources\x20found')),{'ok':!![]};writeCliSideChannelLine(''),writeCliSideChannelLine(a79_0x3b1e9e['cyan'](_0x78c3c2(0x93)+_0xe734e6[_0x78c3c2(0xbd)]+_0x78c3c2(0xb8))),writeCliSideChannelLine(renderUpdateSummary(_0xe734e6['map'](_0x3ec985=>_0x3ec985[_0x78c3c2(0xc4)]),[_0x382c7b[_0x78c3c2(0xb3)],_0x382c7b[_0x78c3c2(0xa0)]])),writeCliSideChannelLine('');let _0x30060a=_0x382c7b[_0x78c3c2(0xb3)],_0x396a3a=_0x382c7b[_0x78c3c2(0xa0)];!_0x30060a&&(_0x30060a=await askJsUrl());!_0x396a3a&&(_0x396a3a=await askCssUrl());const _0x2d83d8=await askConfirm(_0x78c3c2(0x9b)+_0xe734e6[_0x78c3c2(0xbd)]+_0x78c3c2(0x97)+_0x30060a+_0x78c3c2(0xbf)+_0x396a3a+'?');if(!_0x2d83d8)return writeCliSideChannelLine(a79_0x3b1e9e['gray'](_0x78c3c2(0xad))),{'ok':!![]};const _0x3a1c52=[_0x30060a,_0x396a3a],_0x25224e=startSpinner(_0x78c3c2(0xb4)+_0xe734e6['length']+'\x20menu(s)...');try{const _0x26571e=await doUpdateCdnUrls(_0x30ee1d[_0x78c3c2(0xba)],_0x30ee1d[_0x78c3c2(0xb2)],_0xe734e6,_0x3a1c52);return stopSpinner(_0x25224e,_0x78c3c2(0xa6)+_0x26571e[_0x78c3c2(0xa7)]+_0x78c3c2(0xac),_0x26571e['failed']===0x0),{'ok':_0x26571e[_0x78c3c2(0x96)]===0x0,'data':_0x26571e,'message':_0x26571e[_0x78c3c2(0x96)]>0x0?_0x78c3c2(0xa3)+_0x26571e['updated']+_0x78c3c2(0xbc)+_0x26571e[_0x78c3c2(0x96)]+_0x78c3c2(0xaf):_0x78c3c2(0xa3)+_0x26571e['updated']+_0x78c3c2(0xa8)};}catch(_0x30ec00){stopSpinner(_0x25224e,_0x78c3c2(0xc3),![]);throw CliErrors[_0x78c3c2(0xbe)](_0x30ec00 instanceof Error?_0x30ec00['message']:_0x78c3c2(0xc3));}}};function a79_0x5ce9(_0x1b0053,_0x6d7ebc){_0x1b0053=_0x1b0053-0x93;const _0x28147a=a79_0x2814();let _0x5ce92c=_0x28147a[_0x1b0053];return _0x5ce92c;}function parseParams(_0x3fc56e){const _0x3fd6f7=a79_0x2503ba;if(!_0x3fc56e)return{};try{const _0x528e3d=JSON[_0x3fd6f7(0x9c)](_0x3fc56e);if(typeof _0x528e3d!==_0x3fd6f7(0xab)||_0x528e3d===null||Array['isArray'](_0x528e3d))return{};return{'jsUrl':typeof _0x528e3d[_0x3fd6f7(0xb3)]==='string'?_0x528e3d[_0x3fd6f7(0xb3)][_0x3fd6f7(0xb0)]():undefined,'cssUrl':typeof _0x528e3d[_0x3fd6f7(0xa0)]===_0x3fd6f7(0xc1)?_0x528e3d['cssUrl'][_0x3fd6f7(0xb0)]():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- (function(_0x41b3f6,_0x4a6e1c){const _0x311805=a79_0x5ed5,_0x545250=_0x41b3f6();while(!![]){try{const _0x3d8e75=parseInt(_0x311805(0x11d))/0x1*(-parseInt(_0x311805(0x12c))/0x2)+parseInt(_0x311805(0x122))/0x3+-parseInt(_0x311805(0x126))/0x4*(parseInt(_0x311805(0x133))/0x5)+-parseInt(_0x311805(0x138))/0x6+parseInt(_0x311805(0x11b))/0x7*(parseInt(_0x311805(0x11a))/0x8)+parseInt(_0x311805(0x121))/0x9+parseInt(_0x311805(0x123))/0xa*(parseInt(_0x311805(0x135))/0xb);if(_0x3d8e75===_0x4a6e1c)break;else _0x545250['push'](_0x545250['shift']());}catch(_0x30479d){_0x545250['push'](_0x545250['shift']());}}}(a79_0x55d3,0x9ef6f));import{existsSync}from'node:fs';import a79_0x4ce1d0 from'node:path';import a79_0x590c3f from'chalk';function a79_0x5ed5(_0x2a96ac,_0x39bb61){_0x2a96ac=_0x2a96ac-0x11a;const _0x55d39c=a79_0x55d3();let _0x5ed5c7=_0x55d39c[_0x2a96ac];return _0x5ed5c7;}import{input,confirm}from'@inquirer/prompts';import{getIsSessionValid}from'../../../auth/is-session-valid.js';import{authServer}from'../../../auth/auth-server.js';import{readConfig}from'../../../utils/config.js';function a79_0x55d3(){const _0x39f618=['No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','Not\x20set','√\x20App\x20Code:\x20','trim','5KQhLJx','Logged\x20in','11fbvaPx','Login\x20failed','log','7490736MzSkqB','cwd','54384TCNuEh','777TqXtFN','green','286729OvGSpI','env','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','length','6377355LhiRpS','2971962agYtav','10983630aCWIQc','my-app','Project\x20name\x20cannot\x20exceed\x2050\x20characters','2022796YsjsYR','Directory\x20\x22','√\x20Login\x20status:\x20','string','cyan','\x22\x20already\x20exists','8ihettC','production','resolve'];a79_0x55d3=function(){return _0x39f618;};return a79_0x55d3();}import{selectSingleAppcode}from'../../../commands/common/app-selector.js';export async function guidedCreateProject(_0x556fe7,_0x23fae7,_0x2a3330){const _0x1cfd16=a79_0x5ed5,_0x44d994=_0x1cfd16(0x124),_0x50b7c3=readConfig(),_0x15942c=typeof _0x50b7c3[_0x1cfd16(0x11e)]===_0x1cfd16(0x129)?_0x50b7c3[_0x1cfd16(0x11e)]:undefined,_0x5d8192=await input({'message':'Project\x20name:','default':_0x44d994,'validate':_0x38f453=>{const _0x2033e8=_0x1cfd16,_0xaeca08=_0x38f453[_0x2033e8(0x132)]()||_0x44d994;if(_0xaeca08[_0x2033e8(0x120)]>0x32)return _0x2033e8(0x125);const _0x449ddb=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0xaeca08&&!_0x449ddb['test'](_0xaeca08))return _0x2033e8(0x11f);const _0x4d02b8=a79_0x4ce1d0[_0x2033e8(0x12e)](process[_0x2033e8(0x139)](),_0xaeca08);if(existsSync(_0x4d02b8))return _0x2033e8(0x127)+_0xaeca08+_0x2033e8(0x12b);return!![];}});console['log'](a79_0x590c3f[_0x1cfd16(0x11c)]('√\x20Project\x20Name:\x20'+a79_0x590c3f[_0x1cfd16(0x12a)](_0x5d8192)));const _0x52e738=await selectSingleAppcode(_0x2a3330);console['log'](a79_0x590c3f[_0x1cfd16(0x11c)](_0x1cfd16(0x131)+a79_0x590c3f['cyan'](_0x52e738||_0x1cfd16(0x130))));if(_0x52e738){const _0x38316a=await getIsSessionValid();if(!_0x38316a){const _0xa75390=await confirm({'message':_0x1cfd16(0x12f),'default':!![]});if(_0xa75390){const _0x13a6dd=await authServer({'silent':!![]});console[_0x1cfd16(0x137)](a79_0x590c3f[_0x1cfd16(0x11c)](_0x1cfd16(0x128)+a79_0x590c3f[_0x1cfd16(0x12a)](_0x13a6dd?_0x1cfd16(0x134):_0x1cfd16(0x136))));}else console[_0x1cfd16(0x137)](a79_0x590c3f['green'](_0x1cfd16(0x128)+a79_0x590c3f['cyan']('Skipped')));}await _0x556fe7({'projectName':_0x5d8192,'appCode':_0x52e738,'env':_0x23fae7||_0x15942c||_0x1cfd16(0x12d)});}else await _0x556fe7({'projectName':_0x5d8192,'env':_0x23fae7||_0x15942c||_0x1cfd16(0x12d)});}
1
+ function a80_0xea68(){const _0x3254d1=['√\x20App\x20Code:\x20','log','333832IkvwlU','22338569iuhQiL','Project\x20name\x20cannot\x20exceed\x2050\x20characters','No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','124825mqSuFT','788yLKwnk','10xXZjbW','production','Not\x20set','√\x20Login\x20status:\x20','env','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','\x22\x20already\x20exists','Directory\x20\x22','length','green','trim','9741yIkJED','172mbSYlS','4449900KJAsnU','my-app','4225884kLolRF','Logged\x20in','cwd','Skipped','cyan','7232FpEwFA','string','test','72iwKAVt'];a80_0xea68=function(){return _0x3254d1;};return a80_0xea68();}(function(_0x10c263,_0x39b7c7){const _0x21020b=a80_0x25ac,_0x5e6387=_0x10c263();while(!![]){try{const _0xdaa398=-parseInt(_0x21020b(0xed))/0x1*(-parseInt(_0x21020b(0xf5))/0x2)+parseInt(_0x21020b(0xec))/0x3*(-parseInt(_0x21020b(0xe0))/0x4)+parseInt(_0x21020b(0xdf))/0x5+-parseInt(_0x21020b(0xf0))/0x6+-parseInt(_0x21020b(0xee))/0x7+-parseInt(_0x21020b(0xfb))/0x8*(parseInt(_0x21020b(0xf8))/0x9)+-parseInt(_0x21020b(0xe1))/0xa*(-parseInt(_0x21020b(0xfc))/0xb);if(_0xdaa398===_0x39b7c7)break;else _0x5e6387['push'](_0x5e6387['shift']());}catch(_0x321e0f){_0x5e6387['push'](_0x5e6387['shift']());}}}(a80_0xea68,0x58e9f));import{existsSync}from'node:fs';import a80_0x4daa53 from'node:path';import a80_0x3af574 from'chalk';import{input,confirm}from'@inquirer/prompts';import{getIsSessionValid}from'../../../auth/is-session-valid.js';import{authServer}from'../../../auth/auth-server.js';import{readConfig}from'../../../utils/config.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';function a80_0x25ac(_0x2977b6,_0x572f03){_0x2977b6=_0x2977b6-0xdd;const _0xea686=a80_0xea68();let _0x25acac=_0xea686[_0x2977b6];return _0x25acac;}export async function guidedCreateProject(_0x14d416,_0x483fb7,_0x3a1623){const _0xcfe3fe=a80_0x25ac,_0x83c089=_0xcfe3fe(0xef),_0x353675=readConfig(),_0x578f84=typeof _0x353675[_0xcfe3fe(0xe5)]===_0xcfe3fe(0xf6)?_0x353675[_0xcfe3fe(0xe5)]:undefined,_0x28e051=await input({'message':'Project\x20name:','default':_0x83c089,'validate':_0x2014b0=>{const _0x536832=_0xcfe3fe,_0x221276=_0x2014b0[_0x536832(0xeb)]()||_0x83c089;if(_0x221276[_0x536832(0xe9)]>0x32)return _0x536832(0xdd);const _0x94e30=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x221276&&!_0x94e30[_0x536832(0xf7)](_0x221276))return _0x536832(0xe6);const _0x122a76=a80_0x4daa53['resolve'](process[_0x536832(0xf2)](),_0x221276);if(existsSync(_0x122a76))return _0x536832(0xe8)+_0x221276+_0x536832(0xe7);return!![];}});console['log'](a80_0x3af574['green']('√\x20Project\x20Name:\x20'+a80_0x3af574[_0xcfe3fe(0xf4)](_0x28e051)));const _0x373f65=await selectSingleAppcode(_0x3a1623);console['log'](a80_0x3af574['green'](_0xcfe3fe(0xf9)+a80_0x3af574[_0xcfe3fe(0xf4)](_0x373f65||_0xcfe3fe(0xe3))));if(_0x373f65){const _0x5e1c7c=await getIsSessionValid();if(!_0x5e1c7c){const _0x30759b=await confirm({'message':_0xcfe3fe(0xde),'default':!![]});if(_0x30759b){const _0x3ff8d7=await authServer({'silent':!![]});console[_0xcfe3fe(0xfa)](a80_0x3af574[_0xcfe3fe(0xea)](_0xcfe3fe(0xe4)+a80_0x3af574[_0xcfe3fe(0xf4)](_0x3ff8d7?_0xcfe3fe(0xf1):'Login\x20failed')));}else console[_0xcfe3fe(0xfa)](a80_0x3af574[_0xcfe3fe(0xea)](_0xcfe3fe(0xe4)+a80_0x3af574[_0xcfe3fe(0xf4)](_0xcfe3fe(0xf3))));}await _0x14d416({'projectName':_0x28e051,'appCode':_0x373f65,'env':_0x483fb7||_0x578f84||'production'});}else await _0x14d416({'projectName':_0x28e051,'env':_0x483fb7||_0x578f84||_0xcfe3fe(0xe2)});}
@@ -1 +1 @@
1
- function a80_0x1b18(_0x484b21,_0x8b3937){_0x484b21=_0x484b21-0x6e;const _0x433cfd=a80_0x433c();let _0x1b183a=_0x433cfd[_0x484b21];return _0x1b183a;}(function(_0x3a21a2,_0x901ed){const _0x5a81ef=a80_0x1b18,_0x3c06cb=_0x3a21a2();while(!![]){try{const _0x52dc43=-parseInt(_0x5a81ef(0x6f))/0x1+parseInt(_0x5a81ef(0x74))/0x2*(parseInt(_0x5a81ef(0x71))/0x3)+-parseInt(_0x5a81ef(0x76))/0x4*(-parseInt(_0x5a81ef(0x6e))/0x5)+parseInt(_0x5a81ef(0x77))/0x6*(-parseInt(_0x5a81ef(0x75))/0x7)+parseInt(_0x5a81ef(0x73))/0x8+-parseInt(_0x5a81ef(0x72))/0x9+-parseInt(_0x5a81ef(0x78))/0xa*(parseInt(_0x5a81ef(0x70))/0xb);if(_0x52dc43===_0x901ed)break;else _0x3c06cb['push'](_0x3c06cb['shift']());}catch(_0x13a531){_0x3c06cb['push'](_0x3c06cb['shift']());}}}(a80_0x433c,0x2a6c6));export function formatElapsed(_0x3397f9){const _0x4a1fe2=a80_0x1b18,_0x5d4e3f=Date['now']()-_0x3397f9;if(_0x5d4e3f<0x3e8)return _0x5d4e3f+'ms';const _0x53d6b8=(_0x5d4e3f/0x3e8)[_0x4a1fe2(0x79)](0x2),_0x4ae333=_0x53d6b8[_0x4a1fe2(0x7a)](/\.?0+$/u,'');return _0x4ae333+'s';}function a80_0x433c(){const _0x493749=['3oTrJwL','455949KTpWbz','633184QlSKoq','379518bOmAPn','147GaEEIK','808ZaTdiY','7122PXuIYI','60kMVdRh','toFixed','replace','4440sseWNx','39119LxAwvb','292985UmCRGj'];a80_0x433c=function(){return _0x493749;};return a80_0x433c();}
1
+ (function(_0x11d8d3,_0x53f07f){const _0x1d756a=a81_0x5a04,_0x47ed37=_0x11d8d3();while(!![]){try{const _0x3efb9e=parseInt(_0x1d756a(0xa9))/0x1*(-parseInt(_0x1d756a(0xae))/0x2)+-parseInt(_0x1d756a(0xaa))/0x3+parseInt(_0x1d756a(0xa4))/0x4*(-parseInt(_0x1d756a(0xa6))/0x5)+parseInt(_0x1d756a(0xa3))/0x6*(-parseInt(_0x1d756a(0xac))/0x7)+-parseInt(_0x1d756a(0xa8))/0x8*(parseInt(_0x1d756a(0xab))/0x9)+parseInt(_0x1d756a(0xa5))/0xa+-parseInt(_0x1d756a(0xaf))/0xb*(-parseInt(_0x1d756a(0xa7))/0xc);if(_0x3efb9e===_0x53f07f)break;else _0x47ed37['push'](_0x47ed37['shift']());}catch(_0x41b1b8){_0x47ed37['push'](_0x47ed37['shift']());}}}(a81_0xe141,0xc19a6));export function formatElapsed(_0xd5525d){const _0x5391df=a81_0x5a04,_0x52fe3b=Date['now']()-_0xd5525d;if(_0x52fe3b<0x3e8)return _0x52fe3b+'ms';const _0x2a76b7=(_0x52fe3b/0x3e8)['toFixed'](0x2),_0x3cef9d=_0x2a76b7[_0x5391df(0xad)](/\.?0+$/u,'');return _0x3cef9d+'s';}function a81_0x5a04(_0x569209,_0x3f55c5){_0x569209=_0x569209-0xa3;const _0xe14162=a81_0xe141();let _0x5a041a=_0xe14162[_0x569209];return _0x5a041a;}function a81_0xe141(){const _0x5f0800=['10196PriarY','121xzMlfO','18uUPiUP','24wKUqFW','12257490LInQVW','1006595FwyTuS','5659512UEghQr','12341096xgrzOk','233gWyQPv','4642134VUtFBR','9FAvIdV','314706LvUPHk','replace'];a81_0xe141=function(){return _0x5f0800;};return a81_0xe141();}
@@ -1 +1 @@
1
- (function(_0x19f1a0,_0x3ec4c1){const _0x117672=a81_0x2561,_0x2fc499=_0x19f1a0();while(!![]){try{const _0x14a42a=-parseInt(_0x117672(0x204))/0x1+-parseInt(_0x117672(0x1f6))/0x2*(parseInt(_0x117672(0x202))/0x3)+parseInt(_0x117672(0x1ea))/0x4+parseInt(_0x117672(0x212))/0x5+parseInt(_0x117672(0x1eb))/0x6*(-parseInt(_0x117672(0x1f2))/0x7)+parseInt(_0x117672(0x20c))/0x8+parseInt(_0x117672(0x1e4))/0x9;if(_0x14a42a===_0x3ec4c1)break;else _0x2fc499['push'](_0x2fc499['shift']());}catch(_0x48598a){_0x2fc499['push'](_0x2fc499['shift']());}}}(a81_0x2bac,0xb7e5b));function a81_0x2bac(){const _0x412024=['bold','error','3834604BizTec','1098YeuLuF','stableVersion','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','项目创建失败:\x20','cookie','清理项目目录失败:\x20','\x20\x201.\x20Start\x20project:\x20','22715fyTGpg','accessSync','production','projectName','58twMTXF','appCode','API\x20configuration\x20pulled:\x20','🚀\x20Next\x20Steps:','repeat','description','...','dirname','start','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','needsUpgrade','utf8','59049DhXDby','trim','863389lkOxhH','length','modelCount','\x20\x202.\x20Pull\x20API\x20configuration:\x20','*\x20Configuring\x20AppCode\x20for\x20project\x20','\x20config\x20set\x20appcode\x20<app-code>\x27','log','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','5845296doYejH','√\x20Configuration\x20file\x20created,\x20AppCode:\x20','W_OK','writeFileSync','rmSync','locale','1069940huzdhe','CLI\x20版本检查','\x20api\x20pull','Copy\x20project\x20files','项目创建完成:\x20','\x20already\x20exists','riskLevel','1.0.0','toLocaleString','cwd','cd\x20','\x20model(s)','chdir','Format\x20code','Project\x20name:\x20','\x20|\x20AppCode:\x20','accessKey','message','配置应用AppCode失败','stop','配置应用AppCode:\x20','setLogPath','API\x20配置拉取异常','Project\x20directory\x20','parse','join','\x20√\x20','\x20run\x20start','stringify','resolve','name','\x20&&\x20','warn','create','projectCode','constants','Project\x20name\x20cannot\x20be\x20empty','√\x20Pulled\x20','√\x20package.json\x20updated:\x20name=','\x20Generated\x20by\x20rabetbase\x20cli\x20','info','更新\x20package.json\x20name','currentVersion','green','env','Install\x20dependencies','existsSync','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','format','version','readFileSync','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','7901757ZWbtSF','*\x20Pulling\x20API\x20configuration...','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','cyan'];a81_0x2bac=function(){return _0x412024;};return a81_0x2bac();}import a81_0x1566e6 from'path';import a81_0x57d54d from'fs';import a81_0x385a8a from'chalk';import a81_0x3aa984 from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../api/fetch-model-list.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';function a81_0x2561(_0x6cbc4d,_0x125049){_0x6cbc4d=_0x6cbc4d-0x1cc;const _0x2bac55=a81_0x2bac();let _0x2561d2=_0x2bac55[_0x6cbc4d];return _0x2561d2;}import{readConfig}from'../../../utils/config.js';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';import{logger}from'../../../utils/logger.js';import{checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';export async function createApp(_0x28818d){const _0x321f77=a81_0x2561,_0x31145b=await checkCliVersion();_0x31145b['needsUpgrade']&&(printCliUpgradeWarning(_0x31145b),logger[_0x321f77(0x1d8)](_0x321f77(0x1d1),_0x321f77(0x213),{'currentVersion':_0x31145b[_0x321f77(0x1da)],'stableVersion':_0x31145b[_0x321f77(0x1ec)],'needsUpgrade':_0x31145b[_0x321f77(0x200)]}));if(_0x28818d[_0x321f77(0x1d2)]&&_0x28818d[_0x321f77(0x1f7)])await runCreate({'projectName':_0x28818d[_0x321f77(0x1d2)],'appCode':_0x28818d[_0x321f77(0x1f7)],'env':_0x28818d[_0x321f77(0x1dc)]},_0x28818d);else{if(_0x28818d[_0x321f77(0x1d2)]){const _0x176e0d=await selectSingleAppcode(_0x28818d[_0x321f77(0x1ef)]);await runCreate({'projectName':_0x28818d[_0x321f77(0x1d2)],'appCode':_0x176e0d||undefined,'env':_0x28818d['env']},_0x28818d);}else await guidedCreateProject(_0x8b19d5=>runCreate(_0x8b19d5,_0x28818d),_0x28818d[_0x321f77(0x1dc)],_0x28818d[_0x321f77(0x1ef)]);}}async function runCreate(_0xc0725d,_0x2ce4ed){const _0x25d326=a81_0x2561;if(!_0xc0725d[_0x25d326(0x1f5)]||_0xc0725d[_0x25d326(0x1f5)][_0x25d326(0x203)]()==='')throw new Error(_0x25d326(0x1d4));const _0x5c58f1=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x5c58f1['test'](_0xc0725d[_0x25d326(0x1f5)]))throw new Error('Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters');if(_0xc0725d['projectName'][_0x25d326(0x205)]>0x64)throw new Error(_0x25d326(0x1ff));const _0x47a0ed=a81_0x1566e6['resolve'](process[_0x25d326(0x21b)](),_0xc0725d[_0x25d326(0x1f5)]);if(a81_0x57d54d[_0x25d326(0x1de)](_0x47a0ed))throw new Error(_0x25d326(0x229)+_0xc0725d[_0x25d326(0x1f5)]+_0x25d326(0x217));try{a81_0x57d54d[_0x25d326(0x1f3)](a81_0x1566e6[_0x25d326(0x1fd)](_0x47a0ed),a81_0x57d54d[_0x25d326(0x1d3)][_0x25d326(0x20e)]);}catch{throw new Error(_0x25d326(0x1df));}logger[_0x25d326(0x227)](_0x47a0ed),logger[_0x25d326(0x1d8)](_0x25d326(0x1d1),'开始创建项目:\x20'+_0xc0725d['projectName'],{'projectDir':_0x47a0ed,'appCode':_0xc0725d[_0x25d326(0x1f7)]}),console[_0x25d326(0x20a)](),console['log'](a81_0x385a8a[_0x25d326(0x1db)]('\x20√\x20')+_0x25d326(0x220)+a81_0x385a8a[_0x25d326(0x1db)](_0xc0725d[_0x25d326(0x1f5)])+(_0xc0725d[_0x25d326(0x1f7)]?_0x25d326(0x221)+a81_0x385a8a['cyan'](_0xc0725d[_0x25d326(0x1f7)]):''));try{await runTask(_0x25d326(0x215),()=>copyProjectTemplate(_0xc0725d[_0x25d326(0x1f5)])),await updatePackageJsonName(_0xc0725d[_0x25d326(0x1f5)]),await runTask(_0x25d326(0x1dd),()=>installDependencies(_0xc0725d[_0x25d326(0x1f5)])),await runTask(_0x25d326(0x21f),()=>formatProjectCode(_0xc0725d['projectName'])),await configureAppCode(_0xc0725d[_0x25d326(0x1f5)],_0xc0725d[_0x25d326(0x1f7)]||'',_0xc0725d[_0x25d326(0x1dc)]);let _0x1aab89=![];if(_0xc0725d[_0x25d326(0x1f7)]){console[_0x25d326(0x20a)](_0x25d326(0x1e5));const _0x34feea=process['cwd']();try{process['chdir'](_0x47a0ed);const _0x31dda6=_0xc0725d[_0x25d326(0x1dc)]||_0x25d326(0x1f4);initEnv(_0x31dda6);const {configArray:_0xee8fab}=await fetchModelList(_0xc0725d[_0x25d326(0x1f7)],_0x2ce4ed[_0x25d326(0x1ef)]||''),_0x142b0e=DEFAULT_API_DIR,_0x51a806=await generateApiFile(_0xee8fab,'',_0xc0725d[_0x25d326(0x1f7)],!![],_0x31dda6,_0x142b0e);console[_0x25d326(0x20a)](_0x25d326(0x1d5)+_0xee8fab[_0x25d326(0x205)]+'\x20dataset(s),\x20generated\x20'+_0x51a806[_0x25d326(0x206)]+_0x25d326(0x21d)),logger[_0x25d326(0x1d8)]('create',_0x25d326(0x1f8)+_0xc0725d[_0x25d326(0x1f7)]);}catch(_0x77bfa7){_0x1aab89=!![],console['log'](_0x25d326(0x1ed)),logger[_0x25d326(0x1d0)](_0x25d326(0x1d1),_0x25d326(0x228),{'error':_0x77bfa7 instanceof Error?_0x77bfa7[_0x25d326(0x223)]:String(_0x77bfa7)});}finally{process[_0x25d326(0x21e)](_0x34feea);}}logger['success'](_0x25d326(0x1d1),_0x25d326(0x216)+_0xc0725d[_0x25d326(0x1f5)]),console[_0x25d326(0x20a)](),console['log'](a81_0x385a8a[_0x25d326(0x1db)]('─'[_0x25d326(0x1fa)](0x3c))),console[_0x25d326(0x20a)](a81_0x385a8a[_0x25d326(0x1e7)][_0x25d326(0x1e8)](_0x25d326(0x1f9))),console[_0x25d326(0x20a)](),console[_0x25d326(0x20a)](_0x25d326(0x1f1)+a81_0x385a8a[_0x25d326(0x1e7)]['bold'](_0x25d326(0x21c)+_0xc0725d[_0x25d326(0x1f5)]+_0x25d326(0x1cf)+CLI_BIN_NAME+_0x25d326(0x22d))),_0x1aab89&&console[_0x25d326(0x20a)](_0x25d326(0x207)+a81_0x385a8a['cyan'][_0x25d326(0x1e8)](CLI_BIN_NAME+_0x25d326(0x214))),console[_0x25d326(0x20a)](a81_0x385a8a[_0x25d326(0x1db)]('─'[_0x25d326(0x1fa)](0x3c)));}catch(_0x17ddaa){logger[_0x25d326(0x1e9)](_0x25d326(0x1d1),_0x25d326(0x1ee)+_0xc0725d[_0x25d326(0x1f5)],{'error':_0x17ddaa instanceof Error?_0x17ddaa['message']:String(_0x17ddaa)});try{a81_0x57d54d[_0x25d326(0x1de)](_0x47a0ed)&&(console[_0x25d326(0x20a)](_0x25d326(0x1e6)+_0x47a0ed),a81_0x57d54d[_0x25d326(0x210)](_0x47a0ed,{'recursive':!![],'force':!![]}));}catch{logger[_0x25d326(0x1d0)](_0x25d326(0x1d1),_0x25d326(0x1f0)+_0x47a0ed);}throw _0x17ddaa;}}async function runTask(_0x48b7df,_0x3b637d){const _0x2f9bd6=a81_0x2561,_0x42181f=a81_0x3aa984(_0x48b7df+_0x2f9bd6(0x1fc))[_0x2f9bd6(0x1fe)]();try{const _0x3a4c8e=await _0x3b637d();_0x42181f[_0x2f9bd6(0x225)](),console['log'](''+a81_0x385a8a['green'](_0x2f9bd6(0x22c))+_0x48b7df+'\x20'+a81_0x385a8a['gray']('['+_0x3a4c8e+']'));}catch(_0x948f76){_0x42181f['fail'](_0x48b7df);throw _0x948f76;}}async function updatePackageJsonName(_0x46289f){const _0x28be56=a81_0x2561,_0x55fe74=a81_0x1566e6[_0x28be56(0x1cd)](process[_0x28be56(0x21b)](),_0x46289f),_0x11c9fc=a81_0x1566e6[_0x28be56(0x22b)](_0x55fe74,'package.json');try{console['log'](_0x28be56(0x20b));const _0x20102f=getRabetbaseCliPackageRoot(),_0x17ccf9=a81_0x1566e6[_0x28be56(0x22b)](_0x20102f,'package.json');let _0x1c8b9e=_0x28be56(0x219);try{const _0x459b47=JSON['parse'](a81_0x57d54d[_0x28be56(0x1e2)](_0x17ccf9,_0x28be56(0x201)));_0x1c8b9e=_0x459b47[_0x28be56(0x1e1)]||'1.0.0';}catch{}const _0xeb1377=a81_0x57d54d[_0x28be56(0x1e2)](_0x11c9fc,_0x28be56(0x201)),_0x3b0011=JSON[_0x28be56(0x22a)](_0xeb1377);_0x3b0011[_0x28be56(0x1ce)]=_0x46289f,_0x3b0011[_0x28be56(0x1fb)]=_0x46289f+_0x28be56(0x1d7)+_0x1c8b9e,a81_0x57d54d[_0x28be56(0x20f)](_0x11c9fc,JSON[_0x28be56(0x1cc)](_0x3b0011,null,0x2)+'\x0a',_0x28be56(0x201)),console[_0x28be56(0x20a)](_0x28be56(0x1d6)+_0x46289f),logger[_0x28be56(0x1d8)](_0x28be56(0x1d1),_0x28be56(0x1d9));}catch(_0x4fda3a){logger['error']('create','更新\x20package.json\x20失败');throw _0x4fda3a;}}async function configureAppCode(_0x5d5668,_0x3370ee,_0x198131){const _0x3301ba=a81_0x2561,_0x4f7656=a81_0x1566e6[_0x3301ba(0x1cd)](process['cwd'](),_0x5d5668),_0x3d6f63=a81_0x1566e6[_0x3301ba(0x22b)](_0x4f7656,NEW_CONFIG_NAME);try{_0x3370ee?console[_0x3301ba(0x20a)](_0x3301ba(0x208)+_0x5d5668+':\x20'+_0x3370ee):console[_0x3301ba(0x20a)](_0x3301ba(0x1e3)+_0x5d5668);const _0x10f3a5=getRabetbaseCliPackageRoot(),_0x2f6220=a81_0x1566e6[_0x3301ba(0x22b)](_0x10f3a5,'package.json');let _0xdbb438=_0x3301ba(0x219);try{const _0xcf4123=JSON[_0x3301ba(0x22a)](a81_0x57d54d[_0x3301ba(0x1e2)](_0x2f6220,_0x3301ba(0x201)));_0xdbb438=_0xcf4123[_0x3301ba(0x1e1)]||_0x3301ba(0x219);}catch{}const _0x598c7b=readConfig(),_0xe585ab=typeof _0x598c7b[_0x3301ba(0x1dc)]==='string'?_0x598c7b[_0x3301ba(0x1dc)]:undefined,_0x22d8a9=[_0x3301ba(0x1ef),_0x3301ba(0x222),_0x3301ba(0x211),_0x3301ba(0x1e0),_0x3301ba(0x218)],_0x3a6c58={};for(const _0x1b7b0d of _0x22d8a9){if(_0x598c7b[_0x1b7b0d]!=null)_0x3a6c58[_0x1b7b0d]=_0x598c7b[_0x1b7b0d];}const _0xa7d040={..._0x3a6c58,'appcode':_0x3370ee||'','env':_0x198131||_0xe585ab||_0x3301ba(0x1f4),'createdAt':new Date()[_0x3301ba(0x21a)](),'version':_0xdbb438};writeConfigFile(_0x3d6f63,_0xa7d040),_0x3370ee?console[_0x3301ba(0x20a)](_0x3301ba(0x20d)+_0x3370ee):console[_0x3301ba(0x20a)]('√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27'+CLI_BIN_NAME+_0x3301ba(0x209)),logger['info']('create',_0x3301ba(0x226)+_0x3370ee);}catch(_0x27d97f){logger[_0x3301ba(0x1e9)]('create',_0x3301ba(0x224));}}
1
+ (function(_0x179420,_0x4ef8c4){const _0x1d650c=a82_0x1ac5,_0x264a71=_0x179420();while(!![]){try{const _0x151329=-parseInt(_0x1d650c(0x1ad))/0x1+-parseInt(_0x1d650c(0x176))/0x2*(-parseInt(_0x1d650c(0x1a0))/0x3)+parseInt(_0x1d650c(0x17f))/0x4+parseInt(_0x1d650c(0x162))/0x5+parseInt(_0x1d650c(0x174))/0x6+parseInt(_0x1d650c(0x18e))/0x7+-parseInt(_0x1d650c(0x193))/0x8*(parseInt(_0x1d650c(0x17e))/0x9);if(_0x151329===_0x4ef8c4)break;else _0x264a71['push'](_0x264a71['shift']());}catch(_0xfdf98d){_0x264a71['push'](_0x264a71['shift']());}}}(a82_0x4c1a,0x874c5));function a82_0x4c1a(){const _0x5b7a87=['cyan','208KQRzKq','description','\x20&&\x20','trim','\x20model(s)','length','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','清理项目目录失败:\x20','\x20|\x20AppCode:\x20','message','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','currentVersion','1374SkXKzn','cwd','projectName','name','\x20Generated\x20by\x20rabetbase\x20cli\x20','create','production','*\x20Configuring\x20AppCode\x20for\x20project\x20','projectCode','needsUpgrade','repeat','Project\x20directory\x20','info','771425wewZSH','cookie','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','1.0.0','\x20\x201.\x20Start\x20project:\x20','package.json','\x20√\x20','bold','resolve','更新\x20package.json\x20失败','1085985UHfZPH','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','...','gray','rmSync','log','utf8','start','API\x20配置拉取异常','🚀\x20Next\x20Steps:','toLocaleString','配置应用AppCode失败','stop','Format\x20code','parse','\x20already\x20exists','chdir','fail','1926678DtvewQ','readFileSync','3208XajOFx','warn','string','accessSync','*\x20Pulling\x20API\x20configuration...','√\x20Pulled\x20','更新\x20package.json\x20name','setLogPath','320517oYTSlP','1922844yeZjUy','constants','green','开始创建项目:\x20','appCode','error','CLI\x20版本检查','version','existsSync','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','Install\x20dependencies','join','\x20run\x20start','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','stringify','3485237FOQSMU','env','defaultApp','\x20config\x20set\x20appcode\x20<app-code>\x27'];a82_0x4c1a=function(){return _0x5b7a87;};return a82_0x4c1a();}import a82_0x29738a from'path';import a82_0x13a143 from'fs';import a82_0x5ed87b from'chalk';import a82_0x51a318 from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../api/fetch-model-list.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{readConfig}from'../../../utils/config.js';import{CLI_BIN_NAME}from'../../../constant/cli.js';function a82_0x1ac5(_0x107c18,_0x5c18bf){_0x107c18=_0x107c18-0x159;const _0x4c1a43=a82_0x4c1a();let _0x1ac59c=_0x4c1a43[_0x107c18];return _0x1ac59c;}import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';import{logger}from'../../../utils/logger.js';import{checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';export async function createApp(_0x17fbb9){const _0x4f24df=a82_0x1ac5,_0x8865a6=await checkCliVersion();_0x8865a6['needsUpgrade']&&(printCliUpgradeWarning(_0x8865a6),logger[_0x4f24df(0x1ac)](_0x4f24df(0x1a5),_0x4f24df(0x185),{'currentVersion':_0x8865a6[_0x4f24df(0x19f)],'stableVersion':_0x8865a6['stableVersion'],'needsUpgrade':_0x8865a6[_0x4f24df(0x1a9)]}));if(_0x17fbb9['projectCode']&&_0x17fbb9[_0x4f24df(0x183)])await runCreate({'projectName':_0x17fbb9[_0x4f24df(0x1a8)],'appCode':_0x17fbb9[_0x4f24df(0x183)],'env':_0x17fbb9['env']},_0x17fbb9);else{if(_0x17fbb9[_0x4f24df(0x1a8)]){const _0x5ccf0d=await selectSingleAppcode(_0x17fbb9[_0x4f24df(0x159)]);await runCreate({'projectName':_0x17fbb9[_0x4f24df(0x1a8)],'appCode':_0x5ccf0d||undefined,'env':_0x17fbb9['env']},_0x17fbb9);}else await guidedCreateProject(_0x1dbd66=>runCreate(_0x1dbd66,_0x17fbb9),_0x17fbb9['env'],_0x17fbb9[_0x4f24df(0x159)]);}}async function runCreate(_0x15fdb7,_0x56d421){const _0x447d3b=a82_0x1ac5;if(!_0x15fdb7['projectName']||_0x15fdb7[_0x447d3b(0x1a2)][_0x447d3b(0x196)]()==='')throw new Error('Project\x20name\x20cannot\x20be\x20empty');const _0x1f25bc=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x1f25bc['test'](_0x15fdb7[_0x447d3b(0x1a2)]))throw new Error(_0x447d3b(0x19d));if(_0x15fdb7['projectName'][_0x447d3b(0x198)]>0x64)throw new Error(_0x447d3b(0x18c));const _0x512a23=a82_0x29738a[_0x447d3b(0x160)](process[_0x447d3b(0x1a1)](),_0x15fdb7['projectName']);if(a82_0x13a143['existsSync'](_0x512a23))throw new Error(_0x447d3b(0x1ab)+_0x15fdb7[_0x447d3b(0x1a2)]+_0x447d3b(0x171));try{a82_0x13a143[_0x447d3b(0x179)](a82_0x29738a['dirname'](_0x512a23),a82_0x13a143[_0x447d3b(0x180)]['W_OK']);}catch{throw new Error(_0x447d3b(0x188));}logger[_0x447d3b(0x17d)](_0x512a23),logger[_0x447d3b(0x1ac)](_0x447d3b(0x1a5),_0x447d3b(0x182)+_0x15fdb7['projectName'],{'projectDir':_0x512a23,'appCode':_0x15fdb7[_0x447d3b(0x183)]}),console[_0x447d3b(0x167)](),console[_0x447d3b(0x167)](a82_0x5ed87b[_0x447d3b(0x181)](_0x447d3b(0x15e))+'Project\x20name:\x20'+a82_0x5ed87b[_0x447d3b(0x181)](_0x15fdb7[_0x447d3b(0x1a2)])+(_0x15fdb7[_0x447d3b(0x183)]?_0x447d3b(0x19b)+a82_0x5ed87b[_0x447d3b(0x192)](_0x15fdb7[_0x447d3b(0x183)]):''));try{await runTask('Copy\x20project\x20files',()=>copyProjectTemplate(_0x15fdb7['projectName'])),await updatePackageJsonName(_0x15fdb7[_0x447d3b(0x1a2)]),await runTask(_0x447d3b(0x189),()=>installDependencies(_0x15fdb7[_0x447d3b(0x1a2)])),await runTask(_0x447d3b(0x16f),()=>formatProjectCode(_0x15fdb7[_0x447d3b(0x1a2)])),await configureAppCode(_0x15fdb7['projectName'],_0x15fdb7[_0x447d3b(0x183)]||'',_0x15fdb7[_0x447d3b(0x18f)]);let _0xe4f13a=![];if(_0x15fdb7[_0x447d3b(0x183)]){console['log'](_0x447d3b(0x17a));const _0x28427a=process[_0x447d3b(0x1a1)]();try{process[_0x447d3b(0x172)](_0x512a23);const _0x549c12=_0x15fdb7['env']||_0x447d3b(0x1a6);initEnv(_0x549c12);const {configArray:_0x2aa9e3}=await fetchModelList(_0x15fdb7[_0x447d3b(0x183)],_0x56d421[_0x447d3b(0x159)]||''),_0x544b9a=DEFAULT_API_DIR,_0x1d54ba=await generateApiFile(_0x2aa9e3,'',_0x15fdb7[_0x447d3b(0x183)],!![],_0x549c12,_0x544b9a);console[_0x447d3b(0x167)](_0x447d3b(0x17b)+_0x2aa9e3[_0x447d3b(0x198)]+'\x20dataset(s),\x20generated\x20'+_0x1d54ba['modelCount']+_0x447d3b(0x197)),logger['info'](_0x447d3b(0x1a5),'API\x20configuration\x20pulled:\x20'+_0x15fdb7[_0x447d3b(0x183)]);}catch(_0x2caf01){_0xe4f13a=!![],console[_0x447d3b(0x167)](_0x447d3b(0x19e)),logger['warn'](_0x447d3b(0x1a5),_0x447d3b(0x16a),{'error':_0x2caf01 instanceof Error?_0x2caf01[_0x447d3b(0x19c)]:String(_0x2caf01)});}finally{process['chdir'](_0x28427a);}}logger['success'](_0x447d3b(0x1a5),'项目创建完成:\x20'+_0x15fdb7['projectName']),console['log'](),console[_0x447d3b(0x167)](a82_0x5ed87b[_0x447d3b(0x181)]('─'[_0x447d3b(0x1aa)](0x3c))),console['log'](a82_0x5ed87b[_0x447d3b(0x192)][_0x447d3b(0x15f)](_0x447d3b(0x16b))),console[_0x447d3b(0x167)](),console[_0x447d3b(0x167)](_0x447d3b(0x15c)+a82_0x5ed87b[_0x447d3b(0x192)][_0x447d3b(0x15f)]('cd\x20'+_0x15fdb7[_0x447d3b(0x1a2)]+_0x447d3b(0x195)+CLI_BIN_NAME+_0x447d3b(0x18b))),_0xe4f13a&&console[_0x447d3b(0x167)]('\x20\x202.\x20Pull\x20API\x20configuration:\x20'+a82_0x5ed87b['cyan'][_0x447d3b(0x15f)](CLI_BIN_NAME+'\x20api\x20pull')),console['log'](a82_0x5ed87b['green']('─'[_0x447d3b(0x1aa)](0x3c)));}catch(_0x15fa03){logger['error'](_0x447d3b(0x1a5),'项目创建失败:\x20'+_0x15fdb7[_0x447d3b(0x1a2)],{'error':_0x15fa03 instanceof Error?_0x15fa03[_0x447d3b(0x19c)]:String(_0x15fa03)});try{a82_0x13a143[_0x447d3b(0x187)](_0x512a23)&&(console['log'](_0x447d3b(0x15a)+_0x512a23),a82_0x13a143[_0x447d3b(0x166)](_0x512a23,{'recursive':!![],'force':!![]}));}catch{logger[_0x447d3b(0x177)]('create',_0x447d3b(0x19a)+_0x512a23);}throw _0x15fa03;}}async function runTask(_0x5cada1,_0x4a34d9){const _0x25e743=a82_0x1ac5,_0x55af02=a82_0x51a318(_0x5cada1+_0x25e743(0x164))[_0x25e743(0x169)]();try{const _0x4e8a6b=await _0x4a34d9();_0x55af02[_0x25e743(0x16e)](),console[_0x25e743(0x167)](''+a82_0x5ed87b['green'](_0x25e743(0x15e))+_0x5cada1+'\x20'+a82_0x5ed87b[_0x25e743(0x165)]('['+_0x4e8a6b+']'));}catch(_0x1474ea){_0x55af02[_0x25e743(0x173)](_0x5cada1);throw _0x1474ea;}}async function updatePackageJsonName(_0x5cd0b4){const _0x9350f8=a82_0x1ac5,_0x5eca1d=a82_0x29738a[_0x9350f8(0x160)](process[_0x9350f8(0x1a1)](),_0x5cd0b4),_0x3b5ced=a82_0x29738a[_0x9350f8(0x18a)](_0x5eca1d,_0x9350f8(0x15d));try{console['log'](_0x9350f8(0x163));const _0x143731=getRabetbaseCliPackageRoot(),_0x161a46=a82_0x29738a[_0x9350f8(0x18a)](_0x143731,_0x9350f8(0x15d));let _0x1ed4da=_0x9350f8(0x15b);try{const _0x3fd617=JSON[_0x9350f8(0x170)](a82_0x13a143[_0x9350f8(0x175)](_0x161a46,_0x9350f8(0x168)));_0x1ed4da=_0x3fd617[_0x9350f8(0x186)]||'1.0.0';}catch{}const _0x596051=a82_0x13a143[_0x9350f8(0x175)](_0x3b5ced,'utf8'),_0x199883=JSON['parse'](_0x596051);_0x199883[_0x9350f8(0x1a3)]=_0x5cd0b4,_0x199883[_0x9350f8(0x194)]=_0x5cd0b4+_0x9350f8(0x1a4)+_0x1ed4da,a82_0x13a143['writeFileSync'](_0x3b5ced,JSON[_0x9350f8(0x18d)](_0x199883,null,0x2)+'\x0a',_0x9350f8(0x168)),console['log']('√\x20package.json\x20updated:\x20name='+_0x5cd0b4),logger[_0x9350f8(0x1ac)](_0x9350f8(0x1a5),_0x9350f8(0x17c));}catch(_0x377115){logger[_0x9350f8(0x184)](_0x9350f8(0x1a5),_0x9350f8(0x161));throw _0x377115;}}async function configureAppCode(_0x43d179,_0x5e8b3b,_0x2c75a8){const _0x4f5300=a82_0x1ac5,_0x13996e=a82_0x29738a[_0x4f5300(0x160)](process[_0x4f5300(0x1a1)](),_0x43d179),_0x34a1c8=a82_0x29738a[_0x4f5300(0x18a)](_0x13996e,NEW_CONFIG_NAME);try{_0x5e8b3b?console[_0x4f5300(0x167)](_0x4f5300(0x1a7)+_0x43d179+':\x20'+_0x5e8b3b):console[_0x4f5300(0x167)](_0x4f5300(0x199)+_0x43d179);const _0x38d07a=getRabetbaseCliPackageRoot(),_0x3b22bd=a82_0x29738a['join'](_0x38d07a,'package.json');let _0x15134d=_0x4f5300(0x15b);try{const _0x48209a=JSON[_0x4f5300(0x170)](a82_0x13a143['readFileSync'](_0x3b22bd,_0x4f5300(0x168)));_0x15134d=_0x48209a['version']||_0x4f5300(0x15b);}catch{}const _0x3f63a2=readConfig(),_0x527572=typeof _0x3f63a2['env']===_0x4f5300(0x178)?_0x3f63a2['env']:undefined,_0x534911={};for(const _0x2bb5fd of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x3f63a2[_0x2bb5fd]!=null)_0x534911[_0x2bb5fd]=_0x3f63a2[_0x2bb5fd];}const _0x5c4289=buildCanonicalProjectConfig(_0x534911,{'appCodes':_0x5e8b3b?[_0x5e8b3b]:[],'env':_0x2c75a8||_0x527572||_0x4f5300(0x1a6),'metadata':{'createdAt':new Date()[_0x4f5300(0x16c)](),'version':_0x15134d}});writeConfigFile(_0x34a1c8,_0x5c4289),_0x5e8b3b?console['log']('√\x20Configuration\x20file\x20created,\x20Apps:\x20'+Object['keys'](_0x5c4289['apps']||{})[_0x4f5300(0x18a)](',\x20')+'\x20|\x20Default:\x20'+_0x5c4289[_0x4f5300(0x190)]):console[_0x4f5300(0x167)]('√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27'+CLI_BIN_NAME+_0x4f5300(0x191)),logger[_0x4f5300(0x1ac)](_0x4f5300(0x1a5),'配置应用AppCode:\x20'+_0x5e8b3b);}catch(_0x376168){logger[_0x4f5300(0x184)](_0x4f5300(0x1a5),_0x4f5300(0x16d));}}
@@ -1 +1 @@
1
- (function(_0xf1ed84,_0x4df926){const _0x3339d8=a82_0x15e4,_0x536076=_0xf1ed84();while(!![]){try{const _0x3c3934=-parseInt(_0x3339d8(0xd6))/0x1*(-parseInt(_0x3339d8(0xcd))/0x2)+-parseInt(_0x3339d8(0xba))/0x3*(-parseInt(_0x3339d8(0xd4))/0x4)+-parseInt(_0x3339d8(0xbb))/0x5*(-parseInt(_0x3339d8(0xb5))/0x6)+parseInt(_0x3339d8(0xaf))/0x7+parseInt(_0x3339d8(0xbe))/0x8+parseInt(_0x3339d8(0xe2))/0x9*(parseInt(_0x3339d8(0xd5))/0xa)+parseInt(_0x3339d8(0xce))/0xb*(-parseInt(_0x3339d8(0xb6))/0xc);if(_0x3c3934===_0x4df926)break;else _0x536076['push'](_0x536076['shift']());}catch(_0x5da7d8){_0x536076['push'](_0x536076['shift']());}}}(a82_0x4e96,0xb5a07));import a82_0xf2026e from'path';import a82_0x5f182f from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';function a82_0x15e4(_0x2fda26,_0x561d75){_0x2fda26=_0x2fda26-0xa8;const _0x4e9697=a82_0x4e96();let _0x15e4b5=_0x4e9697[_0x2fda26];return _0x15e4b5;}import{checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{readConfig}from'../../../utils/config.js';import{getCliVersion}from'../../../utils/version.js';import{CliErrors}from'../../../errors.js';import{fetchModelList}from'../../../api/fetch-model-list.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const execAsync=promisify(exec);export async function createProjectNonInteractive(_0x1a1718,_0x54f641,_0x4d9072,_0x3b05e3){const _0x5d96ac=a82_0x15e4,_0x176d25=await checkCliVersion();_0x176d25['needsUpgrade']&&printCliUpgradeWarning(_0x176d25);if(!_0x1a1718||_0x1a1718[_0x5d96ac(0xe1)]()==='')throw CliErrors[_0x5d96ac(0xe4)]('Project\x20name\x20cannot\x20be\x20empty.');const _0xd6913=/[<>:"|?*\x00-\x1f\x7f]/;if(_0xd6913['test'](_0x1a1718))throw CliErrors[_0x5d96ac(0xe4)]('Project\x20name\x20contains\x20invalid\x20characters.',_0x5d96ac(0xb8));if(_0x1a1718[_0x5d96ac(0xc6)]>0x64)throw CliErrors['validation'](_0x5d96ac(0xda));const _0x34d0e9=a82_0xf2026e[_0x5d96ac(0xcc)](process[_0x5d96ac(0xe3)](),_0x1a1718);if(existsSync(_0x34d0e9))throw CliErrors[_0x5d96ac(0xe4)](_0x5d96ac(0xd7)+_0x1a1718+_0x5d96ac(0xc9),_0x5d96ac(0xe0));try{const _0x247044=a82_0xf2026e[_0x5d96ac(0xb0)](_0x34d0e9);await a82_0x5f182f[_0x5d96ac(0xc2)](_0x247044,a82_0x5f182f[_0x5d96ac(0xcf)][_0x5d96ac(0xe5)]);}catch{throw CliErrors['validation']('Cannot\x20create\x20project\x20in\x20current\x20directory.','Check\x20directory\x20permissions.');}try{console['log'](_0x5d96ac(0xbf)+_0x1a1718+'...');const _0x5eb026=getSubAppReactDemoTemplateDir();await copyDirectory(_0x5eb026,_0x34d0e9),console[_0x5d96ac(0xc7)](_0x5d96ac(0xab)),await updatePackageJsonName(_0x1a1718),console['log'](_0x5d96ac(0xdb)),console[_0x5d96ac(0xc7)](_0x5d96ac(0xdc)),console[_0x5d96ac(0xc7)](_0x5d96ac(0xc4)),await formatCode(_0x34d0e9),console[_0x5d96ac(0xc7)](_0x5d96ac(0xe6)),await configureProject(_0x1a1718,_0x4d9072,_0x54f641),console[_0x5d96ac(0xc7)]('\x20\x20√\x20Configuration\x20file\x20created'),_0x4d9072&&await pullApiConfig(_0x34d0e9,_0x4d9072,_0x54f641,_0x3b05e3),console['log'](_0x5d96ac(0xae)+_0x1a1718+_0x5d96ac(0xd9)),console[_0x5d96ac(0xc7)]('\x0a\x20\x20cd\x20'+_0x1a1718),console[_0x5d96ac(0xc7)](_0x5d96ac(0xad));}catch(_0x1e9b8b){try{existsSync(_0x34d0e9)&&await a82_0x5f182f['rm'](_0x34d0e9,{'recursive':!![],'force':!![]});}catch{}throw _0x1e9b8b;}}async function updatePackageJsonName(_0x4a730e){const _0x5240b7=a82_0x15e4,_0x52473c=a82_0xf2026e[_0x5240b7(0xcc)](process[_0x5240b7(0xe3)](),_0x4a730e),_0x351821=a82_0xf2026e[_0x5240b7(0xac)](_0x52473c,_0x5240b7(0xa9)),_0x33039d=await a82_0x5f182f[_0x5240b7(0xb4)](_0x351821,_0x5240b7(0xbc)),_0x341488=JSON[_0x5240b7(0xb7)](_0x33039d);_0x341488[_0x5240b7(0xd1)]=_0x4a730e,_0x341488[_0x5240b7(0xd0)]=_0x5240b7(0xd8),await a82_0x5f182f[_0x5240b7(0xd3)](_0x351821,JSON[_0x5240b7(0xca)](_0x341488,null,0x2)+'\x0a');}function detectPackageManager(){const _0xcbbd0c=a82_0x15e4;try{return execSync(_0xcbbd0c(0xc3),{'stdio':_0xcbbd0c(0xdd)}),'bun';}catch{return _0xcbbd0c(0xb9);}}async function formatCode(_0x196a66){try{await execAsync('bun\x20run\x20format',{'cwd':_0x196a66});}catch{}}function a82_0x4e96(){const _0x3ac26f=['\x20dataset(s),\x20generated\x20','access','bun\x20--version','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','locale','length','log','accessKey','\x22\x20already\x20exists.','stringify','chdir','resolve','1609314CWvsFR','426107imbJDK','constants','description','name','toLocaleString','writeFile','8NqGiEb','10QGyfXu','1OzuhLB','Project\x20directory\x20\x22','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','\x20created\x20successfully!','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','\x20\x20√\x20package.json\x20updated','\x20\x20Installing\x20dependencies...','ignore','string','\x20\x20√\x20Pulled\x20','Use\x20a\x20different\x20project\x20name.','trim','12069144xXMoWD','cwd','validation','W_OK','\x20\x20√\x20Code\x20formatted','\x20\x20Pulling\x20API\x20configuration...','package.json','env','\x20\x20√\x20Project\x20template\x20created','join','\x20\x20rabetbase\x20run\x20start\x0a','\x0a√\x20Project\x20','6777043RaDxMM','dirname','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','\x20model(s)','cookie','readFile','22512sqQKDi','1308PgRzHR','parse','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','npm','13659nSOpWC','940DKOZvp','utf-8','production','9103776tKlvwt','*\x20Creating\x20project\x20','format'];a82_0x4e96=function(){return _0x3ac26f;};return a82_0x4e96();}async function configureProject(_0x311656,_0x122831,_0x8b5783){const _0x21bc46=a82_0x15e4,_0x2a3e28=a82_0xf2026e['resolve'](process[_0x21bc46(0xe3)](),_0x311656),_0x296853=a82_0xf2026e[_0x21bc46(0xac)](_0x2a3e28,NEW_CONFIG_NAME),_0x480ce7=readConfig(),_0x524fec=typeof _0x480ce7[_0x21bc46(0xaa)]===_0x21bc46(0xde)?_0x480ce7['env']:undefined,_0x325a51=[_0x21bc46(0xb3),_0x21bc46(0xc8),_0x21bc46(0xc5),_0x21bc46(0xc0),'riskLevel'],_0xcab82={};for(const _0x40b4bf of _0x325a51){if(_0x480ce7[_0x40b4bf]!=null)_0xcab82[_0x40b4bf]=_0x480ce7[_0x40b4bf];}const _0x32d61c={..._0xcab82,'appcode':_0x122831||'','env':_0x8b5783||_0x524fec||_0x21bc46(0xbd),'createdAt':new Date()[_0x21bc46(0xd2)](),'version':getCliVersion()};writeConfigFile(_0x296853,_0x32d61c);}async function pullApiConfig(_0x1ebc61,_0x952844,_0x415bd9,_0x4e2241){const _0x34fcc2=a82_0x15e4,_0x5c5b2b=process['cwd']();try{process[_0x34fcc2(0xcb)](_0x1ebc61);const _0x379b74=_0x415bd9||_0x34fcc2(0xbd);initEnv(_0x379b74),console[_0x34fcc2(0xc7)](_0x34fcc2(0xa8));const {configArray:_0x2b2941}=await fetchModelList(_0x952844,_0x4e2241||''),_0x90cbe7=await generateApiFile(_0x2b2941,'',_0x952844,!![],_0x379b74,DEFAULT_API_DIR);console[_0x34fcc2(0xc7)](_0x34fcc2(0xdf)+_0x2b2941[_0x34fcc2(0xc6)]+_0x34fcc2(0xc1)+_0x90cbe7['modelCount']+_0x34fcc2(0xb2));}catch(_0x2bf6ad){console[_0x34fcc2(0xc7)](_0x34fcc2(0xb1)+CLI_BIN_NAME+'\x20api\x20pull`\x20manually\x20later.');}finally{process[_0x34fcc2(0xcb)](_0x5c5b2b);}}
1
+ (function(_0x37aa3e,_0x14bb95){const _0x3457cc=a83_0x3a5b,_0x25a65d=_0x37aa3e();while(!![]){try{const _0x1718e3=parseInt(_0x3457cc(0x178))/0x1+-parseInt(_0x3457cc(0x1a1))/0x2*(parseInt(_0x3457cc(0x179))/0x3)+parseInt(_0x3457cc(0x17c))/0x4+parseInt(_0x3457cc(0x182))/0x5+-parseInt(_0x3457cc(0x180))/0x6+-parseInt(_0x3457cc(0x174))/0x7+-parseInt(_0x3457cc(0x17b))/0x8*(-parseInt(_0x3457cc(0x19e))/0x9);if(_0x1718e3===_0x14bb95)break;else _0x25a65d['push'](_0x25a65d['shift']());}catch(_0x308e5c){_0x25a65d['push'](_0x25a65d['shift']());}}}(a83_0x5711,0xc1972));import a83_0xd85184 from'path';import a83_0x4ff5aa from'fs/promises';function a83_0x5711(){const _0x257c67=['bun\x20run\x20format','chdir','\x22\x20already\x20exists.','production','env','utf-8','W_OK','join','constants','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','\x20dataset(s),\x20generated\x20','bun\x20--version','cwd','test','string','description','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','\x0a√\x20Project\x20','validation','7542mhUKKT','package.json','modelCount','2xfbGbn','writeFile','\x0a\x20\x20cd\x20','trim','Cannot\x20create\x20project\x20in\x20current\x20directory.','needsUpgrade','\x20\x20rabetbase\x20run\x20start\x0a','length','dirname','*\x20Creating\x20project\x20','ignore','2229640gqUtrZ','\x20model(s)','npm','stringify','991541FnAFps','126786qsxgpb','\x20\x20√\x20Code\x20formatted','272XYzWVh','2594008lxMGov','log','Project\x20directory\x20\x22','access','3738354HUbPVg','\x20\x20√\x20Configuration\x20file\x20created','541260sGeMCz','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','Project\x20name\x20contains\x20invalid\x20characters.','readFile','Use\x20a\x20different\x20project\x20name.','bun','resolve','name','\x20\x20√\x20Project\x20template\x20created'];a83_0x5711=function(){return _0x257c67;};return a83_0x5711();}import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';import{checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{readConfig}from'../../../utils/config.js';import{getCliVersion}from'../../../utils/version.js';import{CliErrors}from'../../../errors.js';import{fetchModelList}from'../../../api/fetch-model-list.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';const execAsync=promisify(exec);export async function createProjectNonInteractive(_0x4c45e5,_0x2ddb4c,_0x2b09cb,_0x4468f7){const _0x146b1a=a83_0x3a5b,_0x485c2f=await checkCliVersion();_0x485c2f[_0x146b1a(0x1a6)]&&printCliUpgradeWarning(_0x485c2f);if(!_0x4c45e5||_0x4c45e5[_0x146b1a(0x1a4)]()==='')throw CliErrors['validation']('Project\x20name\x20cannot\x20be\x20empty.');const _0x296bad=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x296bad[_0x146b1a(0x198)](_0x4c45e5))throw CliErrors['validation'](_0x146b1a(0x184),_0x146b1a(0x19b));if(_0x4c45e5['length']>0x64)throw CliErrors[_0x146b1a(0x19d)](_0x146b1a(0x194));const _0x9fe4ec=a83_0xd85184[_0x146b1a(0x188)](process['cwd'](),_0x4c45e5);if(existsSync(_0x9fe4ec))throw CliErrors[_0x146b1a(0x19d)](_0x146b1a(0x17e)+_0x4c45e5+_0x146b1a(0x18d),_0x146b1a(0x186));try{const _0x4390c5=a83_0xd85184[_0x146b1a(0x1a9)](_0x9fe4ec);await a83_0x4ff5aa[_0x146b1a(0x17f)](_0x4390c5,a83_0x4ff5aa[_0x146b1a(0x193)][_0x146b1a(0x191)]);}catch{throw CliErrors[_0x146b1a(0x19d)](_0x146b1a(0x1a5),'Check\x20directory\x20permissions.');}try{console[_0x146b1a(0x17d)](_0x146b1a(0x1aa)+_0x4c45e5+'...');const _0x2335d3=getSubAppReactDemoTemplateDir();await copyDirectory(_0x2335d3,_0x9fe4ec),console[_0x146b1a(0x17d)](_0x146b1a(0x18a)),await updatePackageJsonName(_0x4c45e5),console[_0x146b1a(0x17d)]('\x20\x20√\x20package.json\x20updated'),console[_0x146b1a(0x17d)]('\x20\x20Installing\x20dependencies...'),console[_0x146b1a(0x17d)]('\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)'),await formatCode(_0x9fe4ec),console[_0x146b1a(0x17d)](_0x146b1a(0x17a)),await configureProject(_0x4c45e5,_0x2b09cb,_0x2ddb4c),console[_0x146b1a(0x17d)](_0x146b1a(0x181)),_0x2b09cb&&await pullApiConfig(_0x9fe4ec,_0x2b09cb,_0x2ddb4c,_0x4468f7),console[_0x146b1a(0x17d)](_0x146b1a(0x19c)+_0x4c45e5+'\x20created\x20successfully!'),console['log'](_0x146b1a(0x1a3)+_0x4c45e5),console[_0x146b1a(0x17d)](_0x146b1a(0x1a7));}catch(_0x458990){try{existsSync(_0x9fe4ec)&&await a83_0x4ff5aa['rm'](_0x9fe4ec,{'recursive':!![],'force':!![]});}catch{}throw _0x458990;}}async function updatePackageJsonName(_0x2679e1){const _0x1b588f=a83_0x3a5b,_0x3ec1e8=a83_0xd85184['resolve'](process[_0x1b588f(0x197)](),_0x2679e1),_0x19f697=a83_0xd85184[_0x1b588f(0x192)](_0x3ec1e8,_0x1b588f(0x19f)),_0xff8295=await a83_0x4ff5aa[_0x1b588f(0x185)](_0x19f697,_0x1b588f(0x190)),_0x1e5791=JSON['parse'](_0xff8295);_0x1e5791[_0x1b588f(0x189)]=_0x2679e1,_0x1e5791[_0x1b588f(0x19a)]=_0x1b588f(0x183),await a83_0x4ff5aa[_0x1b588f(0x1a2)](_0x19f697,JSON[_0x1b588f(0x177)](_0x1e5791,null,0x2)+'\x0a');}function detectPackageManager(){const _0x1c753b=a83_0x3a5b;try{return execSync(_0x1c753b(0x196),{'stdio':_0x1c753b(0x1ab)}),_0x1c753b(0x187);}catch{return _0x1c753b(0x176);}}async function formatCode(_0x22edb5){const _0x342247=a83_0x3a5b;try{await execAsync(_0x342247(0x18b),{'cwd':_0x22edb5});}catch{}}function a83_0x3a5b(_0x23211a,_0x413229){_0x23211a=_0x23211a-0x174;const _0x571164=a83_0x5711();let _0x3a5ba6=_0x571164[_0x23211a];return _0x3a5ba6;}async function configureProject(_0xa5dc64,_0x3b4042,_0x4c937a){const _0x19d533=a83_0x3a5b,_0x4a389b=a83_0xd85184['resolve'](process[_0x19d533(0x197)](),_0xa5dc64),_0x3702b7=a83_0xd85184['join'](_0x4a389b,NEW_CONFIG_NAME),_0x87304e=readConfig(),_0x52d47a=typeof _0x87304e[_0x19d533(0x18f)]===_0x19d533(0x199)?_0x87304e[_0x19d533(0x18f)]:undefined,_0x4c511d={};for(const _0x696981 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x87304e[_0x696981]!=null)_0x4c511d[_0x696981]=_0x87304e[_0x696981];}const _0x175e9f=buildCanonicalProjectConfig(_0x4c511d,{'appCodes':_0x3b4042?[_0x3b4042]:[],'env':_0x4c937a||_0x52d47a||'production','metadata':{'createdAt':new Date()['toLocaleString'](),'version':getCliVersion()}});writeConfigFile(_0x3702b7,_0x175e9f);}async function pullApiConfig(_0x1f453e,_0x3d0751,_0x5cb4ef,_0x5e49b1){const _0x4fde72=a83_0x3a5b,_0x573d74=process['cwd']();try{process['chdir'](_0x1f453e);const _0x13f21c=_0x5cb4ef||_0x4fde72(0x18e);initEnv(_0x13f21c),console[_0x4fde72(0x17d)]('\x20\x20Pulling\x20API\x20configuration...');const {configArray:_0x534227}=await fetchModelList(_0x3d0751,_0x5e49b1||''),_0x5584fe=await generateApiFile(_0x534227,'',_0x3d0751,!![],_0x13f21c,DEFAULT_API_DIR);console[_0x4fde72(0x17d)]('\x20\x20√\x20Pulled\x20'+_0x534227[_0x4fde72(0x1a8)]+_0x4fde72(0x195)+_0x5584fe[_0x4fde72(0x1a0)]+_0x4fde72(0x175));}catch(_0x369714){console['log']('\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`'+CLI_BIN_NAME+'\x20api\x20pull`\x20manually\x20later.');}finally{process[_0x4fde72(0x18c)](_0x573d74);}}
@@ -1 +1 @@
1
- const a83_0x4c296d=a83_0xf7e5;(function(_0x2002c1,_0x67bf2b){const _0x269166=a83_0xf7e5,_0x2e987e=_0x2002c1();while(!![]){try{const _0x203670=parseInt(_0x269166(0x1fe))/0x1*(parseInt(_0x269166(0x1fb))/0x2)+parseInt(_0x269166(0x1f2))/0x3+-parseInt(_0x269166(0x1f8))/0x4*(-parseInt(_0x269166(0x1f5))/0x5)+-parseInt(_0x269166(0x1fd))/0x6*(-parseInt(_0x269166(0x1f4))/0x7)+parseInt(_0x269166(0x1fa))/0x8*(-parseInt(_0x269166(0x1ff))/0x9)+-parseInt(_0x269166(0x1f0))/0xa+parseInt(_0x269166(0x1f7))/0xb*(-parseInt(_0x269166(0x1f3))/0xc);if(_0x203670===_0x67bf2b)break;else _0x2e987e['push'](_0x2e987e['shift']());}catch(_0x4542bd){_0x2e987e['push'](_0x2e987e['shift']());}}}(a83_0x2693,0xaabac));import a83_0x34b933 from'node:path';import{fileURLToPath}from'node:url';const __dirname=a83_0x34b933[a83_0x4c296d(0x1f9)](fileURLToPath(import.meta.url));function a83_0x2693(){const _0xd8436c=['6zGjPVK','115439QVJcrZ','203157DGmRIB','../../../../','2834830hmXEwc','join','758442NCcwct','3712440JLGxlK','5291153OEaIjQ','116890fnfrez','sub-app-react-demo','33nybgUZ','208DHASor','dirname','152veVZVH','2mJePIc','templates'];a83_0x2693=function(){return _0xd8436c;};return a83_0x2693();}function a83_0xf7e5(_0x2045cc,_0x13743a){_0x2045cc=_0x2045cc-0x1f0;const _0x269339=a83_0x2693();let _0xf7e5d8=_0x269339[_0x2045cc];return _0xf7e5d8;}export function getRabetbaseCliPackageRoot(){const _0x27b431=a83_0x4c296d;return a83_0x34b933['resolve'](__dirname,_0x27b431(0x200));}export function getSubAppReactDemoTemplateDir(){const _0x521fc2=a83_0x4c296d;return a83_0x34b933[_0x521fc2(0x1f1)](getRabetbaseCliPackageRoot(),_0x521fc2(0x1fc),'projects',_0x521fc2(0x1f6));}
1
+ const a84_0x1e3be1=a84_0x2dbc;(function(_0x11ac2e,_0x1fdb33){const _0x528a79=a84_0x2dbc,_0x4c67c5=_0x11ac2e();while(!![]){try{const _0x1fb0ec=-parseInt(_0x528a79(0x1fc))/0x1*(-parseInt(_0x528a79(0x1f6))/0x2)+parseInt(_0x528a79(0x1f7))/0x3*(-parseInt(_0x528a79(0x1f8))/0x4)+parseInt(_0x528a79(0x1f5))/0x5+-parseInt(_0x528a79(0x1f2))/0x6*(-parseInt(_0x528a79(0x1fa))/0x7)+-parseInt(_0x528a79(0x1fd))/0x8*(parseInt(_0x528a79(0x1fb))/0x9)+-parseInt(_0x528a79(0x1fe))/0xa*(-parseInt(_0x528a79(0x200))/0xb)+-parseInt(_0x528a79(0x1ff))/0xc;if(_0x1fb0ec===_0x1fdb33)break;else _0x4c67c5['push'](_0x4c67c5['shift']());}catch(_0x1776f2){_0x4c67c5['push'](_0x4c67c5['shift']());}}}(a84_0x2ace,0xf1a43));function a84_0x2dbc(_0x1bcc59,_0x2f69ab){_0x1bcc59=_0x1bcc59-0x1f0;const _0x2acead=a84_0x2ace();let _0x2dbc56=_0x2acead[_0x1bcc59];return _0x2dbc56;}import a84_0x5739aa from'node:path';function a84_0x2ace(){const _0x264d6f=['dirname','resolve','18uHLarv','templates','../../../../','4691425kjbHlL','1790CyIKXL','3625851pAydiz','4dcxMhr','join','186263oQDqpL','207zFAAyV','2054DzdekP','564728vIacTV','17745670GtfBwV','9708432TctVAn','11QwDlns','projects'];a84_0x2ace=function(){return _0x264d6f;};return a84_0x2ace();}import{fileURLToPath}from'node:url';const __dirname=a84_0x5739aa[a84_0x1e3be1(0x1f0)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x49a4ea=a84_0x1e3be1;return a84_0x5739aa[_0x49a4ea(0x1f1)](__dirname,_0x49a4ea(0x1f4));}export function getSubAppReactDemoTemplateDir(){const _0x324736=a84_0x1e3be1;return a84_0x5739aa[_0x324736(0x1f9)](getRabetbaseCliPackageRoot(),_0x324736(0x1f3),_0x324736(0x201),'sub-app-react-demo');}
@@ -1 +1 @@
1
- (function(_0x3752e5,_0x41af98){const _0x3cd020=a84_0x1610,_0xbd6a1d=_0x3752e5();while(!![]){try{const _0xe2f411=-parseInt(_0x3cd020(0x1a4))/0x1+-parseInt(_0x3cd020(0x1a6))/0x2*(-parseInt(_0x3cd020(0x197))/0x3)+-parseInt(_0x3cd020(0x19a))/0x4+-parseInt(_0x3cd020(0x1a3))/0x5+-parseInt(_0x3cd020(0x1a7))/0x6+parseInt(_0x3cd020(0x19d))/0x7+parseInt(_0x3cd020(0x1a1))/0x8;if(_0xe2f411===_0x41af98)break;else _0xbd6a1d['push'](_0xbd6a1d['shift']());}catch(_0x15f856){_0xbd6a1d['push'](_0xbd6a1d['shift']());}}}(a84_0x4846,0x2b61e));import a84_0x188060 from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';function a84_0x4846(){const _0x57129b=['resolve','copy','cwd','3341160AkISSP','info','1685680extuUp','159443tptSwA','开始复制项目模板','2PmAOhv','366516sqGuYO','655971ihRqpb','项目模板复制失败','now','901792tbgeST','项目模板复制完成','error','2271535vpWbeY'];a84_0x4846=function(){return _0x57129b;};return a84_0x4846();}function a84_0x1610(_0x197c87,_0x12b266){_0x197c87=_0x197c87-0x197;const _0x4846e0=a84_0x4846();let _0x16103e=_0x4846e0[_0x197c87];return _0x16103e;}const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x21ec18){const _0x433686=a84_0x1610,_0xacbeb=Date[_0x433686(0x199)](),_0x5c211d=a84_0x188060[_0x433686(0x19e)](process[_0x433686(0x1a0)](),_0x21ec18);try{logger[_0x433686(0x1a2)](_0x433686(0x19f),_0x433686(0x1a5),{'projectCode':_0x21ec18,'templateDir':templateDir}),await copyDirectory(templateDir,_0x5c211d);const _0x458844=Date['now']()-_0xacbeb;logger['success'](_0x433686(0x19f),_0x433686(0x19b),_0x458844,{'projectCode':_0x21ec18});}catch(_0x1498a5){const _0x594f97=Date[_0x433686(0x199)]()-_0xacbeb;logger[_0x433686(0x19c)](_0x433686(0x19f),_0x433686(0x198),{'projectCode':_0x21ec18,'error':_0x1498a5 instanceof Error?_0x1498a5['message']:String(_0x1498a5),'duration':_0x594f97});throw _0x1498a5;}return formatElapsed(_0xacbeb);}
1
+ (function(_0x106ed0,_0x5e4e6c){const _0x4a48cd=a85_0x5842,_0xa1b5f1=_0x106ed0();while(!![]){try{const _0x391a82=parseInt(_0x4a48cd(0x9c))/0x1+-parseInt(_0x4a48cd(0x93))/0x2+-parseInt(_0x4a48cd(0x97))/0x3*(parseInt(_0x4a48cd(0xa4))/0x4)+-parseInt(_0x4a48cd(0x96))/0x5+parseInt(_0x4a48cd(0xa3))/0x6*(parseInt(_0x4a48cd(0xa2))/0x7)+-parseInt(_0x4a48cd(0x9b))/0x8*(-parseInt(_0x4a48cd(0x9e))/0x9)+parseInt(_0x4a48cd(0xa0))/0xa*(parseInt(_0x4a48cd(0x9a))/0xb);if(_0x391a82===_0x5e4e6c)break;else _0xa1b5f1['push'](_0xa1b5f1['shift']());}catch(_0x5fbbd9){_0xa1b5f1['push'](_0xa1b5f1['shift']());}}}(a85_0xc6b9,0x681bc));import a85_0x24a0e4 from'node:path';function a85_0xc6b9(){const _0x1aea42=['35451BtNuWh','项目模板复制失败','29170jmbQOo','cwd','35ahArjm','969042EvSMmI','668YJhHFo','info','1605984immyCl','error','copy','1990860lvLzSA','13989Xlmlpq','message','now','2046qrWYMj','1240BiozKH','445671QgzhrJ','项目模板复制完成'];a85_0xc6b9=function(){return _0x1aea42;};return a85_0xc6b9();}import{copyDirectory}from'../../../utils/copy-directory.js';function a85_0x5842(_0x479c50,_0x47de1b){_0x479c50=_0x479c50-0x93;const _0xc6b9bf=a85_0xc6b9();let _0x584223=_0xc6b9bf[_0x479c50];return _0x584223;}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x577a67){const _0x4b984f=a85_0x5842,_0x4c696e=Date[_0x4b984f(0x99)](),_0x30fd57=a85_0x24a0e4['resolve'](process[_0x4b984f(0xa1)](),_0x577a67);try{logger[_0x4b984f(0xa5)](_0x4b984f(0x95),'开始复制项目模板',{'projectCode':_0x577a67,'templateDir':templateDir}),await copyDirectory(templateDir,_0x30fd57);const _0x1cfc48=Date[_0x4b984f(0x99)]()-_0x4c696e;logger['success'](_0x4b984f(0x95),_0x4b984f(0x9d),_0x1cfc48,{'projectCode':_0x577a67});}catch(_0x58a132){const _0x52396e=Date[_0x4b984f(0x99)]()-_0x4c696e;logger[_0x4b984f(0x94)]('copy',_0x4b984f(0x9f),{'projectCode':_0x577a67,'error':_0x58a132 instanceof Error?_0x58a132[_0x4b984f(0x98)]:String(_0x58a132),'duration':_0x52396e});throw _0x58a132;}return formatElapsed(_0x4c696e);}
@@ -1 +1 @@
1
- function a85_0xd1ce(){const _0x2d2e7f=['npx','133680PedjTA','2339032EEZlhb','success','1281POFgDV','808kEWLZv','112lLQWhG','1318460nkELsD','resolve','代码格式化失败','now','--write','15343140GZBBTI','284IGTJuv','代码格式化完成','2017gCtkKL','error','message','prettier','format','5941152tVDnba','cwd'];a85_0xd1ce=function(){return _0x2d2e7f;};return a85_0xd1ce();}(function(_0x767df6,_0x8c6f59){const _0x456dbe=a85_0x6930,_0x2a1799=_0x767df6();while(!![]){try{const _0x2895b0=-parseInt(_0x456dbe(0x1e8))/0x1*(-parseInt(_0x456dbe(0x1e6))/0x2)+parseInt(_0x456dbe(0x1f3))/0x3*(parseInt(_0x456dbe(0x1f4))/0x4)+-parseInt(_0x456dbe(0x1f6))/0x5+parseInt(_0x456dbe(0x1f0))/0x6*(-parseInt(_0x456dbe(0x1f5))/0x7)+-parseInt(_0x456dbe(0x1f1))/0x8+-parseInt(_0x456dbe(0x1ed))/0x9+parseInt(_0x456dbe(0x1e5))/0xa;if(_0x2895b0===_0x8c6f59)break;else _0x2a1799['push'](_0x2a1799['shift']());}catch(_0x29c526){_0x2a1799['push'](_0x2a1799['shift']());}}}(a85_0xd1ce,0x519df));import a85_0x35e7a7 from'node:path';import{execa}from'execa';function a85_0x6930(_0xf5b9b1,_0x9a583d){_0xf5b9b1=_0xf5b9b1-0x1e1;const _0xd1ce2f=a85_0xd1ce();let _0x693080=_0xd1ce2f[_0xf5b9b1];return _0x693080;}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x58e5cc){const _0x13c15c=a85_0x6930,_0x1e32bd=Date[_0x13c15c(0x1e3)](),_0x4f9e93=a85_0x35e7a7[_0x13c15c(0x1e1)](process[_0x13c15c(0x1ee)](),_0x58e5cc);try{logger['info'](_0x13c15c(0x1ec),'开始格式化代码',{'projectCode':_0x58e5cc}),await execa(resolveNpmBin(_0x13c15c(0x1ef)),[_0x13c15c(0x1eb),_0x13c15c(0x1e4),'.'],{'cwd':_0x4f9e93});const _0x1125c6=Date[_0x13c15c(0x1e3)]()-_0x1e32bd;logger[_0x13c15c(0x1f2)](_0x13c15c(0x1ec),_0x13c15c(0x1e7),_0x1125c6,{'projectCode':_0x58e5cc});}catch(_0x3e9b3a){const _0x839b9d=Date[_0x13c15c(0x1e3)]()-_0x1e32bd;logger[_0x13c15c(0x1e9)](_0x13c15c(0x1ec),_0x13c15c(0x1e2),{'projectCode':_0x58e5cc,'error':_0x3e9b3a instanceof Error?_0x3e9b3a[_0x13c15c(0x1ea)]:String(_0x3e9b3a),'duration':_0x839b9d});throw _0x3e9b3a;}return formatElapsed(_0x1e32bd);}
1
+ (function(_0xa71b43,_0x59eb9c){const _0x229384=a86_0x363a,_0x21c116=_0xa71b43();while(!![]){try{const _0x2266df=-parseInt(_0x229384(0x18e))/0x1*(parseInt(_0x229384(0x190))/0x2)+parseInt(_0x229384(0x180))/0x3+-parseInt(_0x229384(0x18a))/0x4*(-parseInt(_0x229384(0x17f))/0x5)+-parseInt(_0x229384(0x17c))/0x6+-parseInt(_0x229384(0x193))/0x7+-parseInt(_0x229384(0x18b))/0x8*(parseInt(_0x229384(0x183))/0x9)+-parseInt(_0x229384(0x191))/0xa*(-parseInt(_0x229384(0x189))/0xb);if(_0x2266df===_0x59eb9c)break;else _0x21c116['push'](_0x21c116['shift']());}catch(_0xd2214d){_0x21c116['push'](_0x21c116['shift']());}}}(a86_0x12cb,0x5d684));import a86_0x1da597 from'node:path';import{execa}from'execa';function a86_0x12cb(){const _0x29dd47=['npx','85832rjCKUT','success','10cqdFVN','10998070yRHZmj','message','2871617KLjTPu','3316662Uapqsd','cwd','now','2644115kWUzlM','603426pJRuFo','--write','代码格式化完成','648ODwrEi','error','format','开始格式化代码','代码格式化失败','prettier','11zgwrkp','4ZEBTQn','6112CaTKJv','resolve'];a86_0x12cb=function(){return _0x29dd47;};return a86_0x12cb();}function a86_0x363a(_0x2725ca,_0x3cb812){_0x2725ca=_0x2725ca-0x17c;const _0x12cbdf=a86_0x12cb();let _0x363afa=_0x12cbdf[_0x2725ca];return _0x363afa;}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x1d097a){const _0x26eba9=a86_0x363a,_0x2ca6dc=Date[_0x26eba9(0x17e)](),_0x2ce9cc=a86_0x1da597[_0x26eba9(0x18c)](process[_0x26eba9(0x17d)](),_0x1d097a);try{logger['info'](_0x26eba9(0x185),_0x26eba9(0x186),{'projectCode':_0x1d097a}),await execa(resolveNpmBin(_0x26eba9(0x18d)),[_0x26eba9(0x188),_0x26eba9(0x181),'.'],{'cwd':_0x2ce9cc});const _0x2a036f=Date[_0x26eba9(0x17e)]()-_0x2ca6dc;logger[_0x26eba9(0x18f)](_0x26eba9(0x185),_0x26eba9(0x182),_0x2a036f,{'projectCode':_0x1d097a});}catch(_0x14d6a7){const _0x4d4a78=Date['now']()-_0x2ca6dc;logger[_0x26eba9(0x184)](_0x26eba9(0x185),_0x26eba9(0x187),{'projectCode':_0x1d097a,'error':_0x14d6a7 instanceof Error?_0x14d6a7[_0x26eba9(0x192)]:String(_0x14d6a7),'duration':_0x4d4a78});throw _0x14d6a7;}return formatElapsed(_0x2ca6dc);}
@@ -1 +1 @@
1
- (function(_0xaafef8,_0x54145f){const _0x141723=a86_0x2f60,_0x594914=_0xaafef8();while(!![]){try{const _0x576e2d=parseInt(_0x141723(0x121))/0x1*(-parseInt(_0x141723(0x119))/0x2)+parseInt(_0x141723(0x118))/0x3+parseInt(_0x141723(0x11f))/0x4+-parseInt(_0x141723(0x116))/0x5+-parseInt(_0x141723(0x117))/0x6*(-parseInt(_0x141723(0x129))/0x7)+-parseInt(_0x141723(0x124))/0x8*(-parseInt(_0x141723(0x12a))/0x9)+parseInt(_0x141723(0x11d))/0xa*(-parseInt(_0x141723(0x11a))/0xb);if(_0x576e2d===_0x54145f)break;else _0x594914['push'](_0x594914['shift']());}catch(_0x1c08d1){_0x594914['push'](_0x594914['shift']());}}}(a86_0xd94b,0xecef0));function a86_0xd94b(){const _0x595953=['86340LYrWtj','https://registry.npmmirror.com','now','24zqjKZV','--registry','install','message','resolve','6752732SwVwmT','3123891kLSlgl','success','3079055BBjqnY','6IzvOip','5539164VnmAdA','4sAYQPp','1043009yNIAjg','cwd','error','290eQaBGa','依赖安装失败','2625444ixsxCD','info'];a86_0xd94b=function(){return _0x595953;};return a86_0xd94b();}import a86_0x25db60 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a86_0x2f60(_0x53bc92,_0x3e4f6){_0x53bc92=_0x53bc92-0x115;const _0xd94b72=a86_0xd94b();let _0x2f6074=_0xd94b72[_0x53bc92];return _0x2f6074;}import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x317701){const _0xab3496=a86_0x2f60,_0x5f3caf=Date[_0xab3496(0x123)](),_0x281a30=a86_0x25db60[_0xab3496(0x128)](process[_0xab3496(0x11b)](),_0x317701);try{logger[_0xab3496(0x120)](_0xab3496(0x126),'开始安装依赖',{'projectCode':_0x317701,'registry':_0xab3496(0x122)}),await execa(resolveNpmBin('npm'),['install',_0xab3496(0x125),_0xab3496(0x122)],{'cwd':_0x281a30});const _0xf610d0=Date[_0xab3496(0x123)]()-_0x5f3caf;logger[_0xab3496(0x115)]('install','依赖安装完成',_0xf610d0,{'projectCode':_0x317701});}catch(_0x4d984c){const _0x1afc92=Date[_0xab3496(0x123)]()-_0x5f3caf;logger[_0xab3496(0x11c)](_0xab3496(0x126),_0xab3496(0x11e),{'projectCode':_0x317701,'error':_0x4d984c instanceof Error?_0x4d984c[_0xab3496(0x127)]:String(_0x4d984c),'duration':_0x1afc92});throw _0x4d984c;}return formatElapsed(_0x5f3caf);}
1
+ (function(_0xe9303b,_0x23bffc){const _0x38e11e=a87_0x391c,_0x2cd009=_0xe9303b();while(!![]){try{const _0x2dc139=-parseInt(_0x38e11e(0x1e7))/0x1*(parseInt(_0x38e11e(0x1ea))/0x2)+-parseInt(_0x38e11e(0x1e1))/0x3*(-parseInt(_0x38e11e(0x1ec))/0x4)+parseInt(_0x38e11e(0x1e9))/0x5*(-parseInt(_0x38e11e(0x1da))/0x6)+-parseInt(_0x38e11e(0x1db))/0x7+parseInt(_0x38e11e(0x1de))/0x8*(-parseInt(_0x38e11e(0x1df))/0x9)+-parseInt(_0x38e11e(0x1ee))/0xa+-parseInt(_0x38e11e(0x1e0))/0xb*(-parseInt(_0x38e11e(0x1e4))/0xc);if(_0x2dc139===_0x23bffc)break;else _0x2cd009['push'](_0x2cd009['shift']());}catch(_0x45599b){_0x2cd009['push'](_0x2cd009['shift']());}}}(a87_0x26b3,0x8588e));import a87_0x30c24b from'node:path';import{execa}from'execa';function a87_0x391c(_0x50f41d,_0x4e4bc8){_0x50f41d=_0x50f41d-0x1da;const _0x26b356=a87_0x26b3();let _0x391c84=_0x26b356[_0x50f41d];return _0x391c84;}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x3a26fa){const _0x36993e=a87_0x391c,_0x529623=Date[_0x36993e(0x1e5)](),_0x29410d=a87_0x30c24b[_0x36993e(0x1dc)](process['cwd'](),_0x3a26fa);try{logger[_0x36993e(0x1e3)](_0x36993e(0x1e6),'开始安装依赖',{'projectCode':_0x3a26fa,'registry':'https://registry.npmmirror.com'}),await execa(resolveNpmBin('npm'),[_0x36993e(0x1e6),_0x36993e(0x1ed),'https://registry.npmmirror.com'],{'cwd':_0x29410d});const _0x50fe24=Date[_0x36993e(0x1e5)]()-_0x529623;logger['success'](_0x36993e(0x1e6),_0x36993e(0x1e8),_0x50fe24,{'projectCode':_0x3a26fa});}catch(_0xb9a1e){const _0x227a8b=Date[_0x36993e(0x1e5)]()-_0x529623;logger[_0x36993e(0x1dd)]('install',_0x36993e(0x1eb),{'projectCode':_0x3a26fa,'error':_0xb9a1e instanceof Error?_0xb9a1e[_0x36993e(0x1e2)]:String(_0xb9a1e),'duration':_0x227a8b});throw _0xb9a1e;}return formatElapsed(_0x529623);}function a87_0x26b3(){const _0x4aaf60=['message','info','12zZISdz','now','install','2GJMdzo','依赖安装完成','10bHdeqZ','428198oLsFuG','依赖安装失败','108AznEqX','--registry','7112350nUZrHU','239658grUeyU','4384667ENjoLZ','resolve','error','895784cgrIKS','27XrVBnV','23442925eIojAW','66378MXJpVW'];a87_0x26b3=function(){return _0x4aaf60;};return a87_0x26b3();}