@lovrabet/rabetbase-cli 2.0.5 → 2.0.7
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.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/doc.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remote.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app/use.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/new.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/links.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/update.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -0
- package/lib/commands/project/create/format-elapsed.js +1 -0
- package/lib/commands/project/create/main.js +1 -0
- package/lib/commands/project/create/non-interactive.js +1 -0
- package/lib/commands/project/create/project-template-path.js +1 -0
- package/lib/commands/project/create/use-copy-project-template.js +1 -0
- package/lib/commands/project/create/use-format-code.js +1 -0
- package/lib/commands/project/create/use-install-dependencies.js +1 -0
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/init.js +1 -0
- package/lib/commands/project/upgrade.js +1 -0
- package/lib/commands/registry.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/package.json +1 -1
- package/lib/commands/build.js +0 -1
- package/lib/commands/preview.js +0 -1
- package/lib/commands/project-upgrade.js +0 -1
- package/lib/commands/start.js +0 -1
- package/lib/create-app/enhanced-guided-create.js +0 -1
- package/lib/create-app/format-elapsed.js +0 -1
- package/lib/create-app/main.js +0 -1
- package/lib/create-app/non-interactive.js +0 -1
- package/lib/create-app/use-copy-project-template.js +0 -1
- package/lib/create-app/use-format-code.js +0 -1
- package/lib/create-app/use-install-dependencies.js +0 -1
- package/lib/init/main.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a54_0x2162(_0x48e478,_0x89ce56){_0x48e478=_0x48e478-0x185;const _0x446f73=a54_0x446f();let _0x216209=_0x446f73[_0x48e478];return _0x216209;}(function(_0x29e32d,_0x1170bb){const _0xd2ac32=a54_0x2162,_0x539e80=_0x29e32d();while(!![]){try{const _0x1078e6=parseInt(_0xd2ac32(0x192))/0x1*(-parseInt(_0xd2ac32(0x19d))/0x2)+-parseInt(_0xd2ac32(0x18c))/0x3*(parseInt(_0xd2ac32(0x197))/0x4)+parseInt(_0xd2ac32(0x185))/0x5*(-parseInt(_0xd2ac32(0x19b))/0x6)+-parseInt(_0xd2ac32(0x189))/0x7*(parseInt(_0xd2ac32(0x188))/0x8)+-parseInt(_0xd2ac32(0x199))/0x9+parseInt(_0xd2ac32(0x18e))/0xa*(parseInt(_0xd2ac32(0x18b))/0xb)+parseInt(_0xd2ac32(0x19e))/0xc*(parseInt(_0xd2ac32(0x198))/0xd);if(_0x1078e6===_0x1170bb)break;else _0x539e80['push'](_0x539e80['shift']());}catch(_0x1f68b4){_0x539e80['push'](_0x539e80['shift']());}}}(a54_0x446f,0x2f066));function a54_0x446f(){const _0x1e92b3=['3228utcLJu','\x20menu(s)\x20will\x20be\x20updated\x20with\x20new\x20assets:','join','path','length','push','185YCnVHO','Menu\x20Name','map','2618008ANtFUV','7bBLTWh','repeat','11HFhyHD','252uxcIvm','max','2907010IflPNX','(unchanged)','\x20\x20\x20\x20JS:\x20\x20','showOnline','96637HFqInR','label','local','\x20\x20No\x20pages\x20to\x20sync.','\x20page(s)\x20will\x20be\x20created\x20on\x20platform:','5644YqEfgd','34502LIsSJI','2383785VKJuro','test','768UgqPtp','\x20\x20No\x20menus\x20with\x20existing\x20resources\x20found.','2xKIFlQ'];a54_0x446f=function(){return _0x1e92b3;};return a54_0x446f();}function strWidth(_0x22b1df){const _0x33be13=a54_0x2162;let _0xd0ee7b=0x0;for(const _0x5f30db of _0x22b1df){_0xd0ee7b+=/[\u4e00-\u9fa5]/[_0x33be13(0x19a)](_0x5f30db)?0x2:0x1;}return _0xd0ee7b;}function padRight(_0x2831f8,_0xd6baf1){const _0xb07342=a54_0x2162,_0x8778b1=strWidth(_0x2831f8);return _0x2831f8+'\x20'['repeat'](Math[_0xb07342(0x18d)](0x0,_0xd6baf1-_0x8778b1));}export function renderCompareTable(_0x3c50b1,_0x5290f5={}){const _0x420fb9=a54_0x2162;if(_0x3c50b1['length']===0x0)return'';const _0x2c6127=_0x5290f5[_0x420fb9(0x191)]??!![],_0x453ab5=Math[_0x420fb9(0x18d)](0x1e,..._0x3c50b1[_0x420fb9(0x187)](_0x4aa954=>strWidth(_0x4aa954[_0x420fb9(0x193)]))),_0x510433=0x4,_0x5c2fc1=[],_0x3a868d='\x20\x20'+padRight(_0x420fb9(0x186),_0x453ab5),_0x815c80=padRight('Local',_0x510433),_0x3afdc0=_0x2c6127?'\x20\x20'+padRight('Platform',_0x510433):'';_0x5c2fc1['push'](_0x3a868d+'\x20\x20'+_0x815c80+(_0x2c6127?_0x3afdc0:'')),_0x5c2fc1['push']('\x20\x20'+'─'[_0x420fb9(0x18a)](_0x453ab5)+'\x20\x20'+'─'['repeat'](_0x510433)+(_0x2c6127?'\x20\x20'+'─'[_0x420fb9(0x18a)](_0x510433):''));for(const _0x5acc96 of _0x3c50b1){const _0x23c11e=padRight(_0x5acc96[_0x420fb9(0x193)],_0x453ab5),_0x210ac7=_0x5acc96[_0x420fb9(0x194)]?'✓':'✗',_0x476264=padRight(_0x210ac7,_0x510433);let _0x503972='\x20\x20'+_0x23c11e+'\x20\x20'+_0x476264;if(_0x2c6127){const _0x262593=_0x5acc96['online']?'✓':'✗';_0x503972+='\x20\x20'+padRight(_0x262593,_0x510433);}_0x5c2fc1[_0x420fb9(0x1a3)](_0x503972);}return _0x5c2fc1['join']('\x0a');}export function renderSyncSummary(_0x2a715a,_0x33391a){const _0x2662f5=a54_0x2162;if(_0x2a715a[_0x2662f5(0x1a2)]===0x0)return _0x33391a?'\x20\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform.':_0x2662f5(0x195);const _0x8e819f=['\x20\x20'+_0x2a715a[_0x2662f5(0x1a2)]+_0x2662f5(0x196)];for(const _0x20f7c9 of _0x2a715a){_0x8e819f[_0x2662f5(0x1a3)]('\x20\x20\x20\x20•\x20'+_0x20f7c9[_0x2662f5(0x193)]+'\x20('+_0x20f7c9[_0x2662f5(0x1a1)]+')');}return _0x8e819f['join']('\x0a');}export function renderUpdateSummary(_0x5ec0be,_0x1fd79f){const _0x41dce3=a54_0x2162;if(_0x5ec0be[_0x41dce3(0x1a2)]===0x0)return _0x41dce3(0x19c);const _0x3f9b8c=['\x20\x20'+_0x5ec0be[_0x41dce3(0x1a2)]+_0x41dce3(0x19f),_0x41dce3(0x190)+(_0x1fd79f[0x0]??_0x41dce3(0x18f)),'\x20\x20\x20\x20CSS:\x20'+(_0x1fd79f[0x1]??_0x41dce3(0x18f)),'','\x20\x20Affected\x20menus:\x20'+_0x5ec0be[_0x41dce3(0x1a0)](',\x20')];return _0x3f9b8c[_0x41dce3(0x1a0)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x52e128,_0x48e7e2){var _0x4532cf=a55_0x3165,_0x5d3c3a=_0x52e128();while(!![]){try{var _0x3a00b6=-parseInt(_0x4532cf(0x168))/0x1*(parseInt(_0x4532cf(0x16a))/0x2)+-parseInt(_0x4532cf(0x16e))/0x3*(parseInt(_0x4532cf(0x171))/0x4)+parseInt(_0x4532cf(0x16b))/0x5*(-parseInt(_0x4532cf(0x16c))/0x6)+parseInt(_0x4532cf(0x169))/0x7+-parseInt(_0x4532cf(0x16f))/0x8*(parseInt(_0x4532cf(0x16d))/0x9)+-parseInt(_0x4532cf(0x172))/0xa+parseInt(_0x4532cf(0x170))/0xb;if(_0x3a00b6===_0x48e7e2)break;else _0x5d3c3a['push'](_0x5d3c3a['shift']());}catch(_0x4d6dc8){_0x5d3c3a['push'](_0x5d3c3a['shift']());}}}(a55_0x28b0,0x4ae4f));function a55_0x28b0(){var _0x6ae73d=['6npTfoH','1152rZLsJg','21DPqEbg','11992ZMlDbW','24201221ZfRInn','167344TzFZos','6121910DVvMlP','61837DmGiNJ','755615QuQPsj','10NxgxTH','2975945mmcorI'];a55_0x28b0=function(){return _0x6ae73d;};return a55_0x28b0();}export*from'./types.js';export*from'./logic.js';export*from'./compare-table.js';export*from'./inquirer.js';export*from'./valid-url.js';export*from'./local-pages.js';export*from'./service.js';export*from'./sync-core.js';function a55_0x3165(_0x3d21f1,_0x40b4a6){_0x3d21f1=_0x3d21f1-0x168;var _0x28b0d0=a55_0x28b0();var _0x316532=_0x28b0d0[_0x3d21f1];return _0x316532;}export*from'./update-core.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x30e41e,_0xd77027){const _0x473b7b=a56_0x3851,_0x2234bd=_0x30e41e();while(!![]){try{const _0x40330a=-parseInt(_0x473b7b(0x1d9))/0x1+-parseInt(_0x473b7b(0x1fa))/0x2+parseInt(_0x473b7b(0x1e9))/0x3*(-parseInt(_0x473b7b(0x1ea))/0x4)+parseInt(_0x473b7b(0x1f3))/0x5+-parseInt(_0x473b7b(0x1d4))/0x6*(-parseInt(_0x473b7b(0x1e5))/0x7)+-parseInt(_0x473b7b(0x1ee))/0x8+parseInt(_0x473b7b(0x1e6))/0x9*(parseInt(_0x473b7b(0x1dd))/0xa);if(_0x40330a===_0xd77027)break;else _0x2234bd['push'](_0x2234bd['shift']());}catch(_0x1b4017){_0x2234bd['push'](_0x2234bd['shift']());}}}(a56_0x4dfe,0x3220f));import a56_0x1c6a96 from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';function a56_0x4dfe(){const _0x5dcfc4=['CSS\x20URL\x20check\x20failed','18222KRczHt','68wNVfhe','has','red','No\x20menus\x20selected.','2431624wVMEIZ','gray','Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.','includes','\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','932380HPuDHA','Cancelled.','cyan','catch','green','\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','filter','214230IGQFLv','length','name','error','start','\x20\x20Checking\x20CSS\x20URL\x20reachability...','fail','JS\x20URL\x20checked','4734VEutka','path','\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable','label','No\x20local\x20pages\x20found.','280153msoaDo','\x20\x20Checking\x20JS\x20URL\x20reachability...','\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','cancelled','20AVbAcY','JS\x20URL\x20check\x20failed','This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20','trim','\x20\x20JS\x20URL:','ExitPromptError','CSS\x20URL\x20checked','[already\x20on\x20platform]','2828TflAUs','2225583jwWeAx','test'];a56_0x4dfe=function(){return _0x5dcfc4;};return a56_0x4dfe();}function a56_0x3851(_0x324368,_0x5b35fe){_0x324368=_0x324368-0x1d1;const _0x4dfede=a56_0x4dfe();let _0x385149=_0x4dfede[_0x324368];return _0x385149;}import a56_0x42fd9d from'ora';import{isUrlReachable}from'./valid-url.js';import{CliErrors}from'../../../errors.js';function onCancel(_0xd65c90){const _0x58ebf2=a56_0x3851;return _0xd65c90[_0x58ebf2(0x1f6)](_0x5519e2=>{const _0x500f89=_0x58ebf2;if(_0x5519e2?.[_0x500f89(0x1fc)]===_0x500f89(0x1e2))throw CliErrors[_0x500f89(0x1dc)](_0x500f89(0x1f4));throw _0x5519e2;});}export function startSpinner(_0x13aa02){const _0x6b3d22=a56_0x3851;return a56_0x42fd9d({'text':_0x13aa02,'color':_0x6b3d22(0x1f5)})[_0x6b3d22(0x1fe)]();}export function stopSpinner(_0x380602,_0x304754,_0x3c04a9){const _0x4a91c7=a56_0x3851;_0x3c04a9?_0x380602['succeed'](_0x304754):_0x380602[_0x4a91c7(0x1d2)](_0x304754);}export async function askConfirm(_0x2d097b){return onCancel(confirm({'message':_0x2d097b,'theme':{'prefix':''}}));}export async function askJsUrl(_0x33f66f){const _0x53d415=a56_0x3851;while(!![]){const _0x4ebbf3=await onCancel(input({'message':_0x53d415(0x1e1),'default':_0x33f66f,'theme':{'prefix':''}}));if(_0x4ebbf3[_0x53d415(0x1e0)]()==='')throw CliErrors[_0x53d415(0x1dc)](_0x53d415(0x1f4));if(!/^https:\/\/.+\.js(\?.*)?$/[_0x53d415(0x1e7)](_0x4ebbf3[_0x53d415(0x1e0)]())){console['error'](a56_0x1c6a96[_0x53d415(0x1ec)](_0x53d415(0x1f8)));continue;}const _0x4e45da=startSpinner(_0x53d415(0x1da));try{const _0x4525f7=await isUrlReachable(_0x4ebbf3['trim']());stopSpinner(_0x4e45da,_0x53d415(0x1d3),_0x4525f7);if(!_0x4525f7){console[_0x53d415(0x1fd)](a56_0x1c6a96['red']('\x20\x20✗\x20JS\x20URL\x20is\x20unreachable'));continue;}return _0x4ebbf3[_0x53d415(0x1e0)]();}catch(_0x185f47){stopSpinner(_0x4e45da,_0x53d415(0x1de),![]);throw _0x185f47;}}}export async function askCssUrl(_0x63bf37){const _0x32467c=a56_0x3851;while(!![]){const _0x3d45c5=await onCancel(input({'message':'\x20\x20CSS\x20URL:','default':_0x63bf37,'theme':{'prefix':''}}));if(_0x3d45c5['trim']()==='')throw CliErrors[_0x32467c(0x1dc)](_0x32467c(0x1f4));if(!/^https:\/\/.+\.css(\?.*)?$/[_0x32467c(0x1e7)](_0x3d45c5[_0x32467c(0x1e0)]())){console[_0x32467c(0x1fd)](a56_0x1c6a96[_0x32467c(0x1ec)](_0x32467c(0x1f2)));continue;}const _0x16ab2c=startSpinner(_0x32467c(0x1d1));try{const _0x5292f9=await isUrlReachable(_0x3d45c5['trim']());stopSpinner(_0x16ab2c,_0x32467c(0x1e3),_0x5292f9);if(!_0x5292f9){console[_0x32467c(0x1fd)](a56_0x1c6a96[_0x32467c(0x1ec)](_0x32467c(0x1d6)));continue;}return _0x3d45c5[_0x32467c(0x1e0)]();}catch(_0x1d5802){stopSpinner(_0x16ab2c,_0x32467c(0x1e8),![]);throw _0x1d5802;}}}export async function selectPages(_0x45279d,_0x5ade0e,_0x11b163){const _0x3300b6=a56_0x3851,_0x286e1f=_0x45279d['map'](_0x4a9cd2=>({'name':_0x4a9cd2['label']+'\x20\x20'+(_0x5ade0e[_0x3300b6(0x1eb)](_0x4a9cd2[_0x3300b6(0x1d5)])?a56_0x1c6a96[_0x3300b6(0x1ef)](_0x3300b6(0x1e4)):a56_0x1c6a96[_0x3300b6(0x1f7)]('[new]')),'value':_0x4a9cd2[_0x3300b6(0x1d7)],'checked':_0x11b163?_0x11b163[_0x3300b6(0x1f1)](_0x4a9cd2[_0x3300b6(0x1d7)]):!_0x5ade0e['has'](_0x4a9cd2[_0x3300b6(0x1d5)])}));if(_0x286e1f[_0x3300b6(0x1fb)]===0x0)throw new Error(_0x3300b6(0x1d8));const _0x5e39f0=await onCancel(checkbox({'message':_0x3300b6(0x1db),'choices':_0x286e1f,'loop':![],'theme':{'prefix':''}}));if(_0x5e39f0['length']===0x0)throw new Error(_0x3300b6(0x1ed));return _0x45279d[_0x3300b6(0x1f9)](_0x20e79=>_0x5e39f0[_0x3300b6(0x1f1)](_0x20e79[_0x3300b6(0x1d7)]));}export function isInteractive(){return process['stdin']['isTTY']===!![];}export function requireInteractive(){const _0x3097d8=a56_0x3851;if(!isInteractive())throw new Error(_0x3097d8(0x1df)+_0x3097d8(0x1f0));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a57_0x2def15=a57_0x19f5;(function(_0x2a8846,_0x573470){const _0x4d155f=a57_0x19f5,_0x513ec8=_0x2a8846();while(!![]){try{const _0x264f13=parseInt(_0x4d155f(0xd2))/0x1+-parseInt(_0x4d155f(0xe7))/0x2+parseInt(_0x4d155f(0xe8))/0x3*(-parseInt(_0x4d155f(0xe5))/0x4)+parseInt(_0x4d155f(0xe3))/0x5+-parseInt(_0x4d155f(0xda))/0x6*(-parseInt(_0x4d155f(0xe2))/0x7)+-parseInt(_0x4d155f(0xdb))/0x8*(-parseInt(_0x4d155f(0xe9))/0x9)+parseInt(_0x4d155f(0xe0))/0xa;if(_0x264f13===_0x573470)break;else _0x513ec8['push'](_0x513ec8['shift']());}catch(_0x41d157){_0x513ec8['push'](_0x513ec8['shift']());}}}(a57_0x3da4,0x97e84));import{readdirSync,statSync,readFileSync}from'fs';function a57_0x19f5(_0x20b128,_0x45f9d8){_0x20b128=_0x20b128-0xd0;const _0x3da48e=a57_0x3da4();let _0x19f55e=_0x3da48e[_0x20b128];return _0x19f55e;}import{join,relative,resolve,sep}from'path';const pagesDir=resolve(process[a57_0x2def15(0xd1)](),a57_0x2def15(0xe6));export function extractTitleFromComment(_0x4734cc){const _0x13d697=a57_0x2def15;try{const _0x307556=readFileSync(_0x4734cc,'utf-8'),_0x22773b=_0x307556[_0x13d697(0xdf)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x22773b&&_0x22773b[0x1]){const _0x42f662=_0x22773b[0x1],_0x4dcadb=_0x42f662[_0x13d697(0xdf)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x4dcadb&&_0x4dcadb[0x1])return _0x4dcadb[0x1][_0x13d697(0xe1)]();}let _0x2b1642=null;const _0x5c36a2=_0x307556['match'](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x5c36a2&&_0x5c36a2[0x1]&&(_0x2b1642=_0x5c36a2[0x1]);if(!_0x2b1642){const _0x4fa850=_0x307556[_0x13d697(0xdf)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x4fa850&&_0x4fa850[0x1]&&(_0x2b1642=_0x4fa850[0x1]);}if(_0x2b1642){const _0x3e2e1d=new RegExp('\x5cb'+_0x2b1642+_0x13d697(0xde)),_0xcbf7fd=_0x307556[_0x13d697(0xdf)](_0x3e2e1d);if(_0xcbf7fd&&_0xcbf7fd[0x1])return _0xcbf7fd[0x1];return _0x2b1642;}return null;}catch(_0x1b5111){return null;}}export function getLocalPages(_0x5cb78c=pagesDir,_0x10e2e5=pagesDir){const _0x5df9e6=a57_0x2def15;let _0x59ff66=[];const _0x34e901=readdirSync(_0x5cb78c);return _0x34e901[_0x5df9e6(0xd7)](_0x523e1c=>{const _0x2ef590=_0x5df9e6,_0x26b320=join(_0x5cb78c,_0x523e1c),_0x469be8=statSync(_0x26b320);if(_0x469be8&&_0x469be8['isDirectory']())_0x59ff66=_0x59ff66[_0x2ef590(0xd5)](getLocalPages(_0x26b320,_0x10e2e5));else{if(_0x523e1c[_0x2ef590(0xdc)](_0x2ef590(0xd3))){let _0x4b76b9=relative(_0x10e2e5,_0x26b320);_0x4b76b9[_0x2ef590(0xdc)](_0x2ef590(0xd0))?_0x4b76b9=_0x4b76b9[_0x2ef590(0xd4)](/index\.tsx$/,''):_0x4b76b9=_0x4b76b9['replace'](/\.tsx$/,'');_0x4b76b9[_0x2ef590(0xdc)](sep)&&(_0x4b76b9=_0x4b76b9[_0x2ef590(0xdd)](0x0,-0x1));const _0x4ddbd3=_0x4b76b9['split'](sep)[_0x2ef590(0xd9)]('/'),_0x2c3a6e=extractTitleFromComment(_0x26b320),_0x5de067=_0x2c3a6e||_0x4ddbd3;_0x59ff66[_0x2ef590(0xe4)]({'path':_0x4ddbd3[_0x2ef590(0xd8)]('$',':'),'label':_0x5de067});}}}),_0x59ff66['filter'](_0x5f174c=>_0x5f174c[_0x5df9e6(0xd6)]!=='');}function a57_0x3da4(){const _0x38bfab=['index.tsx','cwd','161664jzIWsC','.tsx','replace','concat','path','forEach','replaceAll','join','12ykZHqp','6551704EJwbMO','endsWith','slice','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','match','6852330oVHnxl','trim','1918889eCMnED','147630MpGkaK','push','1545968vJHttN','src/pages','923904UglBYg','9XaQXbr','9nSZYtX'];a57_0x3da4=function(){return _0x38bfab;};return a57_0x3da4();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x453d4f,_0x3971e6){const _0x65020a=a58_0x2c9f,_0x1ba5ef=_0x453d4f();while(!![]){try{const _0xdebefd=-parseInt(_0x65020a(0x117))/0x1+-parseInt(_0x65020a(0x112))/0x2+-parseInt(_0x65020a(0x11c))/0x3+-parseInt(_0x65020a(0x11d))/0x4+-parseInt(_0x65020a(0x118))/0x5+-parseInt(_0x65020a(0x122))/0x6+parseInt(_0x65020a(0x10a))/0x7*(parseInt(_0x65020a(0x11e))/0x8);if(_0xdebefd===_0x3971e6)break;else _0x1ba5ef['push'](_0x1ba5ef['shift']());}catch(_0x5e21ac){_0x1ba5ef['push'](_0x1ba5ef['shift']());}}}(a58_0x3236,0x33088));import{getLocalPages}from'./local-pages.js';import{getOnlineMenuList,createMenus,updateMenuCdnUrl}from'./service.js';function a58_0x2c9f(_0x15d7ad,_0x2fb93c){_0x15d7ad=_0x15d7ad-0x10a;const _0x3236ea=a58_0x3236();let _0x2c9f99=_0x3236ea[_0x15d7ad];return _0x2c9f99;}import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'./valid-url.js';export function validateJsUrl(_0x4e26d0){const _0x297dc5=a58_0x2c9f,_0x5c3a08=[];return!isValidJsHttpsUrl(_0x4e26d0)&&_0x5c3a08['push']('JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'),{'ok':_0x5c3a08[_0x297dc5(0x120)]===0x0,'errors':_0x5c3a08};}export function validateCssUrl(_0x3699fb){const _0x1c5fb8=a58_0x2c9f,_0x3ccf6c=[];return!isValidCssHttpsUrl(_0x3699fb)&&_0x3ccf6c[_0x1c5fb8(0x10b)]('CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'),{'ok':_0x3ccf6c['length']===0x0,'errors':_0x3ccf6c};}export async function validateJsUrlReachable(_0x19117a){const _0x1064f4=a58_0x2c9f,_0x70ee72=validateJsUrl(_0x19117a);if(!_0x70ee72['ok'])return _0x70ee72;const _0x241b8f=await isUrlReachable(_0x19117a);if(!_0x241b8f)_0x70ee72[_0x1064f4(0x110)][_0x1064f4(0x10b)](_0x1064f4(0x119));return{'ok':_0x70ee72['errors'][_0x1064f4(0x120)]===0x0,'errors':_0x70ee72[_0x1064f4(0x110)]};}export async function validateCssUrlReachable(_0x298a9e){const _0x379297=a58_0x2c9f,_0x231ee3=validateCssUrl(_0x298a9e);if(!_0x231ee3['ok'])return _0x231ee3;const _0x2d6772=await isUrlReachable(_0x298a9e);if(!_0x2d6772)_0x231ee3[_0x379297(0x110)]['push'](_0x379297(0x10d));return{'ok':_0x231ee3['errors'][_0x379297(0x120)]===0x0,'errors':_0x231ee3[_0x379297(0x110)]};}function a58_0x3236(){const _0x1ef636=['label','rejected','329460vngSGq','722200JgcOCH','JS\x20URL\x20is\x20unreachable','path','status','881208zoeWDn','1322616FCMtNW','57416wYZrDT','resources','length','filter','524874rUodKP','1379PJPocD','push','allSettled','CSS\x20URL\x20is\x20unreachable','join','has','errors','map','38136obRxgn','find','trim'];a58_0x3236=function(){return _0x1ef636;};return a58_0x3236();}export function buildCompareRows(_0x15fb4c,_0x5ef5f7){const _0x18bb81=a58_0x2c9f;return _0x15fb4c['map'](_0x3f0732=>({'label':_0x3f0732['label'],'path':_0x3f0732['path'],'local':!![],'online':_0x5ef5f7[_0x18bb81(0x10f)](_0x3f0732['path'])}));}export function filterNewPages(_0x53264f,_0x1756fe,_0x44f662){const _0x39a80f=a58_0x2c9f;if(_0x44f662&&_0x44f662['length']>0x0){const _0x43ffbb=new Set(_0x44f662['map'](_0x1fdc86=>_0x1fdc86[_0x39a80f(0x114)]())),_0x2786e9=_0x53264f[_0x39a80f(0x121)](_0x203d5f=>_0x43ffbb['has'](_0x203d5f['label']));if(_0x2786e9[_0x39a80f(0x120)]===0x0)throw new Error('No\x20local\x20pages\x20matched\x20labels:\x20'+[..._0x43ffbb][_0x39a80f(0x10e)](',\x20'));return _0x2786e9;}return _0x53264f[_0x39a80f(0x121)](_0x74cb05=>!_0x1756fe[_0x39a80f(0x10f)](_0x74cb05[_0x39a80f(0x11a)]));}export function filterPagesByLabels(_0x56d9f1,_0x1b3fc4){const _0x5aefa4=a58_0x2c9f,_0x262df8=[],_0x51b480=[];for(const _0x3c649e of _0x1b3fc4){const _0x345769=_0x3c649e[_0x5aefa4(0x114)](),_0x2ede0e=_0x56d9f1[_0x5aefa4(0x113)](_0x2be75a=>_0x2be75a[_0x5aefa4(0x115)]===_0x345769);if(_0x2ede0e)_0x262df8[_0x5aefa4(0x10b)](_0x2ede0e);else _0x51b480[_0x5aefa4(0x10b)](_0x3c649e);}return{'matched':_0x262df8,'unmatched':_0x51b480};}export async function doCreateMenus(_0x34d349,_0x526832,_0x25ab9f,_0x55a596){const _0x22a1d3=a58_0x2c9f;return await createMenus(_0x34d349,_0x526832,_0x25ab9f,_0x55a596),{'created':_0x25ab9f[_0x22a1d3(0x120)],'failed':0x0,'labels':_0x25ab9f[_0x22a1d3(0x111)](_0x1a3f40=>_0x1a3f40[_0x22a1d3(0x115)])};}export function filterMenusWithResources(_0x364e62){const _0x58bfc3=a58_0x2c9f;return _0x364e62[_0x58bfc3(0x121)](_0x1d4472=>_0x1d4472[_0x58bfc3(0x11f)][_0x58bfc3(0x120)]>0x0);}export async function doUpdateCdnUrls(_0x4229c2,_0x4261bb,_0x3002fd,_0x40d1ed){const _0x4d51f3=a58_0x2c9f,_0x1319dd=_0x3002fd['filter'](_0x25d460=>_0x25d460[_0x4d51f3(0x11f)][_0x4d51f3(0x120)]>0x0),_0x33fa14=await Promise[_0x4d51f3(0x10c)](_0x1319dd[_0x4d51f3(0x111)](_0x487251=>updateMenuCdnUrl(_0x4229c2,_0x4261bb,{'id':_0x487251['id'],'label':_0x487251[_0x4d51f3(0x115)],'path':_0x487251[_0x4d51f3(0x11a)],'resources':_0x40d1ed}))),_0x1cac4a=_0x33fa14[_0x4d51f3(0x121)](_0x7fb3a1=>_0x7fb3a1[_0x4d51f3(0x11b)]===_0x4d51f3(0x116))['length'];return{'updated':_0x1319dd['length']-_0x1cac4a,'failed':_0x1cac4a};}export async function fetchMenuData(_0x19f076,_0x1eeebd){const _0x5bc759=a58_0x2c9f,_0x5a0fa9=getLocalPages(),_0x2315b7=await getOnlineMenuList(_0x19f076,_0x1eeebd),_0x3344d0=new Set(_0x2315b7[_0x5bc759(0x111)](_0x43c6d6=>_0x43c6d6['path']));return{'localPages':_0x5a0fa9,'onlineMenuList':_0x2315b7,'onlinePaths':_0x3344d0};}export async function fetchOnlineMenuList(_0xc9e4d2,_0x5c4bb8){return getOnlineMenuList(_0xc9e4d2,_0x5c4bb8);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x41460c,_0x5dd534){const _0x5267f7=a59_0x2ac1,_0x4a1a0e=_0x41460c();while(!![]){try{const _0x202fb2=parseInt(_0x5267f7(0x156))/0x1+-parseInt(_0x5267f7(0x171))/0x2+parseInt(_0x5267f7(0x160))/0x3+parseInt(_0x5267f7(0x150))/0x4*(-parseInt(_0x5267f7(0x16f))/0x5)+-parseInt(_0x5267f7(0x16a))/0x6*(parseInt(_0x5267f7(0x159))/0x7)+-parseInt(_0x5267f7(0x163))/0x8+-parseInt(_0x5267f7(0x14f))/0x9*(-parseInt(_0x5267f7(0x170))/0xa);if(_0x202fb2===_0x5dd534)break;else _0x4a1a0e['push'](_0x4a1a0e['shift']());}catch(_0x28f878){_0x4a1a0e['push'](_0x4a1a0e['shift']());}}}(a59_0x3117,0xc69f1));import{getApiDomain}from'../../../constant/domain.js';import{getEnv}from'../../../constant/env.js';import{logger}from'../../../utils/logger.js';import{platformFetch}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x25e36d,_0x88dd08){const _0x540866=a59_0x2ac1,_0x5c4714=getEnv();logger['info'](_0x540866(0x157),_0x5c4714==='online'?_0x540866(0x177)+_0x25e36d+')':'Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20'+_0x25e36d+')');const _0x45060a=await platformFetch(getApiDomain()+'/smartapi/menu/find?appCode='+_0x25e36d,{'cookie':_0x88dd08,'label':_0x540866(0x151)});if(!_0x45060a)return logger[_0x540866(0x172)]('get-online-menu-list',_0x540866(0x175)),[];return logger['info']('get-online-menu-list','Fetched\x20'+_0x45060a[_0x540866(0x158)]+_0x540866(0x174)),_0x45060a[_0x540866(0x15a)](flattenMenuItem)[_0x540866(0x164)]();}function flattenMenuItem(_0x1f43cd){const _0x16eb17=a59_0x2ac1;let _0x27f3bd=[];try{if(_0x1f43cd['extend']?.[_0x16eb17(0x15e)]){const _0x1ccfcc=JSON[_0x16eb17(0x173)](_0x1f43cd['extend'][_0x16eb17(0x15e)]);if(Array[_0x16eb17(0x16b)](_0x1ccfcc))_0x27f3bd=_0x1ccfcc;}}catch{}const _0x254bbe=[{'id':_0x1f43cd['id'],'path':_0x1f43cd['path'],'label':_0x1f43cd[_0x16eb17(0x162)],'resources':_0x27f3bd}];if(_0x1f43cd[_0x16eb17(0x16e)]&&_0x1f43cd['children'][_0x16eb17(0x158)]>0x0)for(const _0x2dcc5d of _0x1f43cd[_0x16eb17(0x16e)]){_0x254bbe[_0x16eb17(0x14e)](...flattenMenuItem(_0x2dcc5d));}return _0x254bbe;}export async function createMenu(_0x162b62,_0x5f1467,_0x3b216f){const _0x4407e4=a59_0x2ac1;logger[_0x4407e4(0x172)](_0x4407e4(0x15c),_0x4407e4(0x165)+_0x3b216f[_0x4407e4(0x162)]+'\x20('+_0x3b216f[_0x4407e4(0x152)]+')');const _0x2b80b2={'appCode':_0x162b62,'type':_0x4407e4(0x16c),'sort':0x0,'extend':{'loadScriptMode':'import','resources':_0x3b216f[_0x4407e4(0x15e)]?JSON['stringify'](_0x3b216f[_0x4407e4(0x15e)]):undefined},..._0x3b216f};await platformFetch(getApiDomain()+'/smartapi/menu/create',{'method':_0x4407e4(0x16d),'body':_0x2b80b2,'cookie':_0x5f1467,'label':_0x4407e4(0x155)+_0x3b216f[_0x4407e4(0x162)]+'\x22'}),logger['info'](_0x4407e4(0x15c),_0x4407e4(0x15f)+_0x3b216f[_0x4407e4(0x162)]);}async function createSingleMenu(_0x1f3dd5,_0x2eb1b3,_0x34d8cc,_0x430bdd){const _0x1c353e=a59_0x2ac1,_0x4a7f37={'appCode':_0x1f3dd5,'type':_0x1c353e(0x16c),'sort':0x0,'extend':{'loadScriptMode':_0x1c353e(0x167),'resources':_0x430bdd?JSON[_0x1c353e(0x15d)](_0x430bdd):undefined},'label':_0x34d8cc[_0x1c353e(0x162)],'path':_0x34d8cc['path']};await platformFetch(getApiDomain()+_0x1c353e(0x169),{'method':_0x1c353e(0x16d),'body':_0x4a7f37,'cookie':_0x2eb1b3,'label':'Create\x20menu\x20\x22'+_0x34d8cc[_0x1c353e(0x162)]+'\x22'}),logger[_0x1c353e(0x172)](_0x1c353e(0x15c),_0x1c353e(0x15f)+_0x34d8cc[_0x1c353e(0x162)]);}function a59_0x2ac1(_0x5e74cf,_0x42fa6a){_0x5e74cf=_0x5e74cf-0x14e;const _0x311707=a59_0x3117();let _0x2ac1b9=_0x311707[_0x5e74cf];return _0x2ac1b9;}export async function createMenus(_0x5e8ee2,_0x2bbc54,_0x43ef81,_0x35465c){const _0x18ba29=a59_0x2ac1;logger[_0x18ba29(0x172)]('create-menus','Start\x20batch\x20menu\x20creation,\x20total\x20'+_0x43ef81[_0x18ba29(0x158)]),await Promise[_0x18ba29(0x166)](_0x43ef81[_0x18ba29(0x15a)](_0x47e8f9=>createSingleMenu(_0x5e8ee2,_0x2bbc54,_0x47e8f9,_0x35465c))),logger[_0x18ba29(0x172)](_0x18ba29(0x176),'Batch\x20menu\x20creation\x20completed,\x20total\x20'+_0x43ef81[_0x18ba29(0x158)]);}function a59_0x3117(){const _0x3a0cce=['Updating\x20menu\x20asset\x20links:\x20','label','1171912HQberd','flat','Creating\x20menu:\x20','all','import','Menu\x20assets\x20synced:\x20','/smartapi/menu/create','39288RdNeOR','isArray','procode','POST','children','105egUZNd','5980970LxSkdN','323224atgNuE','info','parse','\x20online\x20menus\x20successfully','Server\x20returned\x20empty\x20menu\x20list','create-menus','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','push','9HCScYX','127676bwQivv','Fetch\x20menu\x20list','path','/smartapi/menu/update','update-menu-cdn-url','Create\x20menu\x20\x22','1425375SxEDao','get-online-menu-list','length','371uFrWZb','map','Update\x20menu\x20assets\x20\x22','create-menu','stringify','resources','Menu\x20created\x20successfully:\x20','346575uKHDUm'];a59_0x3117=function(){return _0x3a0cce;};return a59_0x3117();}export async function updateMenuCdnUrl(_0x9444ea,_0x2f331d,_0x31f51f){const _0x4fef8f=a59_0x2ac1;logger[_0x4fef8f(0x172)](_0x4fef8f(0x154),_0x4fef8f(0x161)+_0x31f51f['label']+'\x20('+_0x31f51f[_0x4fef8f(0x152)]+')');const _0x595619={'id':_0x31f51f['id'],'appCode':_0x9444ea,'extend':{'loadScriptMode':_0x4fef8f(0x167),'resources':_0x31f51f[_0x4fef8f(0x15e)]?JSON[_0x4fef8f(0x15d)](_0x31f51f[_0x4fef8f(0x15e)]):undefined}};await platformFetch(getApiDomain()+_0x4fef8f(0x153),{'method':_0x4fef8f(0x16d),'body':_0x595619,'cookie':_0x2f331d,'label':_0x4fef8f(0x15b)+_0x31f51f[_0x4fef8f(0x162)]+'\x22'}),logger[_0x4fef8f(0x172)](_0x4fef8f(0x154),_0x4fef8f(0x168)+_0x31f51f['label'],undefined);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x195709,_0x405004){const _0x3d34b2=a60_0x4af7,_0x24ea1a=_0x195709();while(!![]){try{const _0x3127f2=-parseInt(_0x3d34b2(0x1ae))/0x1+parseInt(_0x3d34b2(0x1b6))/0x2+parseInt(_0x3d34b2(0x197))/0x3+parseInt(_0x3d34b2(0x1c2))/0x4*(-parseInt(_0x3d34b2(0x1a0))/0x5)+-parseInt(_0x3d34b2(0x1ba))/0x6*(-parseInt(_0x3d34b2(0x196))/0x7)+parseInt(_0x3d34b2(0x1ad))/0x8*(parseInt(_0x3d34b2(0x1ac))/0x9)+-parseInt(_0x3d34b2(0x1a4))/0xa*(parseInt(_0x3d34b2(0x198))/0xb);if(_0x3127f2===_0x405004)break;else _0x24ea1a['push'](_0x24ea1a['shift']());}catch(_0x18ed19){_0x24ea1a['push'](_0x24ea1a['shift']());}}}(a60_0x2aa6,0x32734));import{getLocalPages}from'./local-pages.js';import{getOnlineMenuList,createMenus}from'./service.js';function a60_0x4af7(_0x360828,_0x16a235){_0x360828=_0x360828-0x196;const _0x2aa6c1=a60_0x2aa6();let _0x4af757=_0x2aa6c1[_0x360828];return _0x4af757;}function a60_0x2aa6(){const _0x5db4fc=['Start\x20non-interactive\x20menu\x20sync','Invalid\x20--params:\x20','startsWith','join','10uSaBpO','stdin','concat','No\x20local\x20pages\x20matched\x20labels:\x20','150WSFnDG','string','map','has','\x0a\x20\x20Available\x20local\x20pages:\x20','parse','filter','trim','45SBSxDm','238024neShsi','373068wkJJyY','label','split','info','Menu\x20sync\x20completed','CSS\x20URL\x20is\x20unreachable:\x20','toString','length','756964lcCqrP','cssUrl','push','setLogPath','7692dtHFCC','path','readableEnded','isArray','selectedLabels','isTTY','pages','jsUrl','63556BndWua','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','1771dJprqv','730266Gaqtqk','354585WtOqcL','utf8','field','message'];a60_0x2aa6=function(){return _0x5db4fc;};return a60_0x2aa6();}import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'./valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x27e2e4){const _0x341c70=a60_0x4af7,_0x37f63f=[];return _0x27e2e4[_0x341c70(0x1c1)]&&!isValidJsHttpsUrl(_0x27e2e4[_0x341c70(0x1c1)])&&_0x37f63f[_0x341c70(0x1b8)]({'field':_0x341c70(0x1c1),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x27e2e4[_0x341c70(0x1b7)]&&!isValidCssHttpsUrl(_0x27e2e4[_0x341c70(0x1b7)])&&_0x37f63f[_0x341c70(0x1b8)]({'field':_0x341c70(0x1b7),'message':_0x341c70(0x1c3)}),_0x37f63f;}export async function runMenuSyncCore(_0x3678e9,_0x2d40ce,_0x11a5f5=[],_0x39e5ea){const _0x4b6736=a60_0x4af7,_0x7abc42=parseParamsFlag(_0x39e5ea),_0x78536e=_0x11a5f5[_0x4b6736(0x1b5)]>0x0?_0x11a5f5:_0x7abc42[_0x4b6736(0x1be)],_0x2d06b9=_0x7abc42[_0x4b6736(0x1c1)],_0x15d5d4=_0x7abc42[_0x4b6736(0x1b7)],_0x3ebd46=[];if(_0x2d06b9)_0x3ebd46[_0x4b6736(0x1b8)](_0x2d06b9);if(_0x15d5d4)_0x3ebd46[_0x4b6736(0x1b8)](_0x15d5d4);const _0x52f246=validateParams(_0x7abc42);if(_0x52f246[_0x4b6736(0x1b5)]>0x0){const _0x5be6c5=_0x52f246[_0x4b6736(0x1a6)](_0x4ae03a=>'--params.'+_0x4ae03a[_0x4b6736(0x19a)]+':\x20'+_0x4ae03a[_0x4b6736(0x19b)])['join'](';\x20');throw new Error(_0x4b6736(0x19d)+_0x5be6c5);}logger[_0x4b6736(0x1b9)](process['cwd']()),logger[_0x4b6736(0x1b1)]('menu-sync',_0x4b6736(0x19c),{'appCode':_0x3678e9,'selectedCount':_0x78536e?.[_0x4b6736(0x1b5)],'jsUrl':_0x2d06b9,'cssUrl':_0x15d5d4});if(_0x2d06b9){const _0x17246f=await isUrlReachable(_0x2d06b9);if(!_0x17246f)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x2d06b9);}if(_0x15d5d4){const _0x5a90ea=await isUrlReachable(_0x15d5d4);if(!_0x5a90ea)throw new Error(_0x4b6736(0x1b3)+_0x15d5d4);}const _0x48ce9a=getLocalPages();if(_0x48ce9a[_0x4b6736(0x1b5)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x4594eb=await getOnlineMenuList(_0x3678e9,_0x2d40ce),_0x4ade03=new Set(_0x4594eb['map'](_0x75936e=>_0x75936e[_0x4b6736(0x1bb)]));let _0x4987c3;if(_0x78536e&&_0x78536e['length']>0x0){const _0x49470f=new Set(_0x78536e['map'](_0x32b539=>_0x32b539[_0x4b6736(0x1ab)]()));_0x4987c3=_0x48ce9a[_0x4b6736(0x1aa)](_0x290040=>_0x49470f[_0x4b6736(0x1a7)](_0x290040[_0x4b6736(0x1af)]));if(_0x4987c3[_0x4b6736(0x1b5)]===0x0){const _0x3c6c46=_0x48ce9a['map'](_0x3edb50=>_0x3edb50['label'])['join'](',\x20');throw new Error(_0x4b6736(0x1a3)+[..._0x49470f][_0x4b6736(0x19f)](',\x20')+_0x4b6736(0x1a8)+_0x3c6c46);}}else _0x4987c3=_0x48ce9a['filter'](_0x4907d1=>!_0x4ade03[_0x4b6736(0x1a7)](_0x4907d1[_0x4b6736(0x1bb)]));if(_0x4987c3[_0x4b6736(0x1b5)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};return await createMenus(_0x3678e9,_0x2d40ce,_0x4987c3,_0x3ebd46[_0x4b6736(0x1b5)]>0x0?_0x3ebd46:undefined),logger[_0x4b6736(0x1b1)]('menu-sync',_0x4b6736(0x1b2),{'count':_0x4987c3['length'],'resources':_0x3ebd46}),{'created':_0x4987c3[_0x4b6736(0x1b5)],'skipped':![],'targetPages':_0x4987c3};}export async function readPageLabelsFromStdin(){const _0x1b93ea=a60_0x4af7;if(!process[_0x1b93ea(0x1a1)][_0x1b93ea(0x1bf)]&&!process['stdin'][_0x1b93ea(0x1bc)])return new Promise(_0x2a3cac=>{const _0x52b873=_0x1b93ea,_0x31c40b=[];process[_0x52b873(0x1a1)]['on']('data',_0x46666b=>_0x31c40b['push'](_0x46666b)),process[_0x52b873(0x1a1)]['on']('end',()=>{const _0x57f3cd=_0x52b873,_0x440b02=Buffer[_0x57f3cd(0x1a2)](_0x31c40b)[_0x57f3cd(0x1b4)](_0x57f3cd(0x199)),_0x4f523d=_0x440b02[_0x57f3cd(0x1b0)]('\x0a')[_0x57f3cd(0x1a6)](_0x3b4da0=>_0x3b4da0[_0x57f3cd(0x1ab)]())[_0x57f3cd(0x1aa)](_0x25713d=>_0x25713d[_0x57f3cd(0x1b5)]>0x0&&!_0x25713d[_0x57f3cd(0x19e)]('#'));_0x2a3cac(_0x4f523d);}),setTimeout(()=>_0x2a3cac([]),0x1f4);});return[];}function parseParamsFlag(_0x185513){const _0xa4092d=a60_0x4af7;if(!_0x185513||typeof _0x185513!==_0xa4092d(0x1a5))return{};try{const _0x4304df=JSON[_0xa4092d(0x1a9)](_0x185513);if(typeof _0x4304df!=='object'||_0x4304df===null||Array['isArray'](_0x4304df))return{};return{'selectedLabels':Array[_0xa4092d(0x1bd)](_0x4304df[_0xa4092d(0x1c0)])?_0x4304df[_0xa4092d(0x1c0)][_0xa4092d(0x1a6)](String):undefined,'jsUrl':typeof _0x4304df[_0xa4092d(0x1c1)]===_0xa4092d(0x1a5)?_0x4304df[_0xa4092d(0x1c1)][_0xa4092d(0x1ab)]():undefined,'cssUrl':typeof _0x4304df[_0xa4092d(0x1b7)]==='string'?_0x4304df[_0xa4092d(0x1b7)][_0xa4092d(0x1ab)]():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a62_0x4a2c(){const _0x2ca15c=['Invalid\x20--params:\x20','cssUrl','4009308xhhvNZ','map','info','99UxRiyj','filter','jsUrl','2482368zNFAEg','82420rEJBVT','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','195ELmZsq','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','status','1361414CVdwpF','length','Start\x20non-interactive\x20menu\x20update','setLogPath','11cdQzSY','rejected','message','path','trim','cwd','field','string','push','1sxHTEp','117488hRtIHX','parse','Menu\x20update\x20completed','7NaeXPs','isArray','34925316WJLbFE','--params.','5093360mRJWDl'];a62_0x4a2c=function(){return _0x2ca15c;};return a62_0x4a2c();}function a62_0x8c69(_0x7f6d1d,_0x76a053){_0x7f6d1d=_0x7f6d1d-0x176;const _0x4a2cc4=a62_0x4a2c();let _0x8c695e=_0x4a2cc4[_0x7f6d1d];return _0x8c695e;}(function(_0x17b0fb,_0x4baf4e){const _0x3eceb0=a62_0x8c69,_0x55f59c=_0x17b0fb();while(!![]){try{const _0x428825=-parseInt(_0x3eceb0(0x17d))/0x1*(parseInt(_0x3eceb0(0x194))/0x2)+-parseInt(_0x3eceb0(0x188))/0x3+-parseInt(_0x3eceb0(0x18f))/0x4*(-parseInt(_0x3eceb0(0x191))/0x5)+-parseInt(_0x3eceb0(0x18e))/0x6*(parseInt(_0x3eceb0(0x181))/0x7)+parseInt(_0x3eceb0(0x17e))/0x8*(parseInt(_0x3eceb0(0x18b))/0x9)+-parseInt(_0x3eceb0(0x185))/0xa+parseInt(_0x3eceb0(0x198))/0xb*(parseInt(_0x3eceb0(0x183))/0xc);if(_0x428825===_0x4baf4e)break;else _0x55f59c['push'](_0x55f59c['shift']());}catch(_0x50ba25){_0x55f59c['push'](_0x55f59c['shift']());}}}(a62_0x4a2c,0xe45d1));import{updateMenuCdnUrl,getOnlineMenuList}from'./service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'./valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x41b38b){const _0x3b5e2e=a62_0x8c69,_0x1f65ea=[];return _0x41b38b[_0x3b5e2e(0x18d)]&&!isValidJsHttpsUrl(_0x41b38b[_0x3b5e2e(0x18d)])&&_0x1f65ea[_0x3b5e2e(0x17c)]({'field':_0x3b5e2e(0x18d),'message':_0x3b5e2e(0x192)}),_0x41b38b['cssUrl']&&!isValidCssHttpsUrl(_0x41b38b['cssUrl'])&&_0x1f65ea[_0x3b5e2e(0x17c)]({'field':_0x3b5e2e(0x187),'message':_0x3b5e2e(0x190)}),_0x1f65ea;}export async function runMenuUpdateCore(_0x44aee1,_0x4fd57a,_0x425652){const _0x417c48=a62_0x8c69,_0x40f023=parseUpdateParamsFlag(_0x425652),_0x3f115c=[];if(_0x40f023[_0x417c48(0x18d)])_0x3f115c[_0x417c48(0x17c)](_0x40f023[_0x417c48(0x18d)]);if(_0x40f023[_0x417c48(0x187)])_0x3f115c[_0x417c48(0x17c)](_0x40f023[_0x417c48(0x187)]);const _0x388908=validateParams(_0x40f023);if(_0x388908[_0x417c48(0x195)]>0x0){const _0x973b29=_0x388908['map'](_0x4eb4e7=>_0x417c48(0x184)+_0x4eb4e7[_0x417c48(0x17a)]+':\x20'+_0x4eb4e7[_0x417c48(0x176)])['join'](';\x20');throw new Error(_0x417c48(0x186)+_0x973b29);}logger[_0x417c48(0x197)](process[_0x417c48(0x179)]()),logger[_0x417c48(0x18a)]('menu-update',_0x417c48(0x196),{'appCode':_0x44aee1,'jsUrl':_0x40f023[_0x417c48(0x18d)],'cssUrl':_0x40f023[_0x417c48(0x187)]});if(_0x40f023[_0x417c48(0x18d)]){const _0x3fc84d=await isUrlReachable(_0x40f023[_0x417c48(0x18d)]);if(!_0x3fc84d)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x40f023[_0x417c48(0x18d)]);}if(_0x40f023[_0x417c48(0x187)]){const _0xcfb446=await isUrlReachable(_0x40f023[_0x417c48(0x187)]);if(!_0xcfb446)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x40f023[_0x417c48(0x187)]);}const _0x3cccbb=await getOnlineMenuList(_0x44aee1,_0x4fd57a),_0x48dc28=_0x3cccbb[_0x417c48(0x18c)](_0x33471e=>_0x33471e['resources']['length']>0x0);if(_0x48dc28[_0x417c48(0x195)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![]};const _0x1970f1=await Promise['allSettled'](_0x48dc28[_0x417c48(0x189)](_0x87a3d9=>updateMenuCdnUrl(_0x44aee1,_0x4fd57a,{'id':_0x87a3d9['id'],'label':_0x87a3d9['label'],'path':_0x87a3d9[_0x417c48(0x177)],'resources':_0x3f115c}))),_0x32c0c2=_0x1970f1[_0x417c48(0x18c)](_0x43852e=>_0x43852e[_0x417c48(0x193)]===_0x417c48(0x199))['length'];return logger[_0x417c48(0x18a)]('menu-update',_0x417c48(0x180),{'count':_0x48dc28[_0x417c48(0x195)],'resources':_0x3f115c}),{'updated':_0x48dc28['length']-_0x32c0c2,'failed':_0x32c0c2,'skipped':![]};}function parseUpdateParamsFlag(_0x36f298){const _0x1098f4=a62_0x8c69;if(!_0x36f298||typeof _0x36f298!==_0x1098f4(0x17b))return{};try{const _0x279122=JSON[_0x1098f4(0x17f)](_0x36f298);if(typeof _0x279122!=='object'||_0x279122===null||Array[_0x1098f4(0x182)](_0x279122))return{};return{'jsUrl':typeof _0x279122['jsUrl']===_0x1098f4(0x17b)?_0x279122[_0x1098f4(0x18d)][_0x1098f4(0x178)]():undefined,'cssUrl':typeof _0x279122[_0x1098f4(0x187)]==='string'?_0x279122['cssUrl'][_0x1098f4(0x178)]():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a63_0x39f4(){const _0x20b2bf=['HEAD','21091608lVlWQc','9032568cVbZuR','34424ETGkes','test','976187nvkauk','388654bkCpQp','2246455laWphL','5371458KufRvQ','7jlMAFB','228JgCZcG','trim'];a63_0x39f4=function(){return _0x20b2bf;};return a63_0x39f4();}function a63_0xb006(_0x451ca5,_0x557c86){_0x451ca5=_0x451ca5-0xb5;const _0x39f452=a63_0x39f4();let _0xb006cc=_0x39f452[_0x451ca5];return _0xb006cc;}(function(_0x49b62b,_0x598ca2){const _0x6c9f1b=a63_0xb006,_0x13ac03=_0x49b62b();while(!![]){try{const _0x3e75e9=-parseInt(_0x6c9f1b(0xbe))/0x1+parseInt(_0x6c9f1b(0xbf))/0x2+-parseInt(_0x6c9f1b(0xb7))/0x3*(-parseInt(_0x6c9f1b(0xbc))/0x4)+parseInt(_0x6c9f1b(0xc0))/0x5+-parseInt(_0x6c9f1b(0xb5))/0x6*(parseInt(_0x6c9f1b(0xb6))/0x7)+-parseInt(_0x6c9f1b(0xbb))/0x8+parseInt(_0x6c9f1b(0xba))/0x9;if(_0x3e75e9===_0x598ca2)break;else _0x13ac03['push'](_0x13ac03['shift']());}catch(_0x5a7772){_0x13ac03['push'](_0x13ac03['shift']());}}}(a63_0x39f4,0x9c6ad));export function isValidJsHttpsUrl(_0x30b917){const _0x4caca8=a63_0xb006;return/^https:\/\/.+\.js(\?.*)?$/['test'](_0x30b917[_0x4caca8(0xb8)]());}export function isValidCssHttpsUrl(_0x9cf506){const _0x402352=a63_0xb006;return/^https:\/\/.+\.css(\?.*)?$/[_0x402352(0xbd)](_0x9cf506[_0x402352(0xb8)]());}export async function isUrlReachable(_0x20b49c){const _0x54f0d7=a63_0xb006;try{const _0x213aa6=await fetch(_0x20b49c,{'method':_0x54f0d7(0xb9)});return _0x213aa6['ok'];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a64_0x56c1bb=a64_0x2d63;(function(_0x546b97,_0x3a12af){const _0x264a04=a64_0x2d63,_0x5e710f=_0x546b97();while(!![]){try{const _0x455bb4=-parseInt(_0x264a04(0x72))/0x1*(-parseInt(_0x264a04(0x6d))/0x2)+-parseInt(_0x264a04(0x96))/0x3*(parseInt(_0x264a04(0xa1))/0x4)+-parseInt(_0x264a04(0x73))/0x5*(parseInt(_0x264a04(0x9b))/0x6)+parseInt(_0x264a04(0x8d))/0x7+parseInt(_0x264a04(0x85))/0x8*(-parseInt(_0x264a04(0x7f))/0x9)+parseInt(_0x264a04(0x67))/0xa+parseInt(_0x264a04(0x8c))/0xb*(parseInt(_0x264a04(0x88))/0xc);if(_0x455bb4===_0x3a12af)break;else _0x5e710f['push'](_0x5e710f['shift']());}catch(_0x3761d7){_0x5e710f['push'](_0x5e710f['shift']());}}}(a64_0x2067,0x7f0ac));import a64_0x35a06f from'chalk';function a64_0x2067(){const _0x2165d9=['message','\x20\x20✓\x20Selected:\x20','2439010ACEoRG','gray','length','Creating\x20','appCode','object','642058SdpRkj','Online\x20menu\x20list\x20fetched','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','jsUrl','log','1hlUlCY','505ENbmfG','parse','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','\x20created,\x20','\x20menu(s)\x20with\x20JS:\x20','map','cssUrl','Menu\x20sync\x20completed:\x20','\x20and\x20CSS:\x20','onlinePaths','\x20\x20Cancelled.','765qsbmFT','created','Sync\x20local\x20pages\x20as\x20platform\x20menus','yes','str','Failed\x20to\x20fetch\x20online\x20menu\x20list','18784fquXOO','Pre-fill\x20JS/CSS\x20URLs\x20and/or\x20select\x20specific\x20pages.\x20','skipped','27240IZjopj','validation','write','string','11aZhUlf','5206775gMKwcJ','pages','✓\x20Menu\x20sync\x20completed:\x20','\x20failed.','cyan','Fetching\x20online\x20menu\x20list...','\x20page(s)','params','trim','1559628bmNWIt','onlineMenuList','yellow','\x20\x20Continue\x20with\x20creation?','menu','4230twRjRT','\x20menu(s)','Menu\x20creation\x20failed','flag','cookie','\x20menu(s)\x20created','4KpRfnH','isArray'];a64_0x2067=function(){return _0x2165d9;};return a64_0x2067();}function a64_0x2d63(_0x2be0db,_0x14ac68){_0x2be0db=_0x2be0db-0x65;const _0x2067e1=a64_0x2067();let _0x2d633d=_0x2067e1[_0x2be0db];return _0x2d633d;}import{buildCompareRows,doCreateMenus,fetchMenuData}from'./shared/logic.js';import{renderCompareTable,renderSyncSummary}from'./shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'./shared/inquirer.js';import{CliErrors}from'../../errors.js';import{runMenuSyncCore,readPageLabelsFromStdin}from'./shared/sync-core.js';import{getLocalPages}from'./shared/local-pages.js';export const menuSync={'service':a64_0x56c1bb(0x9a),'command':'sync','description':a64_0x56c1bb(0x81),'risk':a64_0x56c1bb(0x8a),'flags':[{'name':a64_0x56c1bb(0x94),'type':a64_0x56c1bb(0x8b),'description':a64_0x56c1bb(0x86)+'JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22,\x22pages\x22:[\x22Page1\x22]}'},{'name':a64_0x56c1bb(0x82),'type':'boolean','description':'Non-interactive:\x20auto-create\x20all\x20local\x20pages\x20not\x20yet\x20on\x20platform'}],async 'execute'(_0x2f0f2d){const _0x16f875=a64_0x56c1bb,_0x61b12=_0x2f0f2d[_0x16f875(0x9e)](_0x16f875(0x82)),_0x847f18=_0x2f0f2d[_0x16f875(0x83)](_0x16f875(0x94)),_0x47d080=parseParams(_0x847f18),_0x2838a7=!!(_0x47d080[_0x16f875(0x70)]||_0x47d080[_0x16f875(0x7a)]||_0x47d080[_0x16f875(0x8e)]&&_0x47d080[_0x16f875(0x8e)]['length']>0x0);if(_0x61b12||_0x2838a7){let _0x5c9c1c=[];!isInteractive()&&!_0x47d080[_0x16f875(0x8e)]?.[_0x16f875(0x69)]&&(_0x5c9c1c=await readPageLabelsFromStdin());const _0x2b4f11=await runMenuSyncCore(_0x2f0f2d[_0x16f875(0x6b)],_0x2f0f2d[_0x16f875(0x9f)],_0x5c9c1c['length']>0x0?_0x5c9c1c:_0x47d080['pages']??[],_0x847f18);if(_0x2b4f11[_0x16f875(0x87)]){const _0x31fa02=getLocalPages();_0x31fa02[_0x16f875(0x69)]===0x0?console[_0x16f875(0x71)](_0x16f875(0x75)):console[_0x16f875(0x71)](_0x16f875(0x76));}else console[_0x16f875(0x71)](_0x16f875(0x8f)+_0x2b4f11[_0x16f875(0x80)]+_0x16f875(0xa0));return{'ok':!![]};}requireInteractive();const _0x3ef13d=startSpinner(_0x16f875(0x92));let _0x183345,_0x7c5898,_0xfd9678;try{const _0x480fbe=await fetchMenuData(_0x2f0f2d[_0x16f875(0x6b)],_0x2f0f2d[_0x16f875(0x9f)]);_0x183345=_0x480fbe['localPages'],_0x7c5898=_0x480fbe[_0x16f875(0x7d)],_0xfd9678=_0x480fbe[_0x16f875(0x97)],stopSpinner(_0x3ef13d,_0x16f875(0x6e),!![]);}catch(_0x319a1b){stopSpinner(_0x3ef13d,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors[_0x16f875(0x89)](_0x319a1b instanceof Error?_0x319a1b[_0x16f875(0x65)]:_0x16f875(0x84));}if(_0x183345[_0x16f875(0x69)]===0x0)return console[_0x16f875(0x71)](a64_0x35a06f[_0x16f875(0x98)](_0x16f875(0x6f))),{'ok':!![]};const _0xd33159=buildCompareRows(_0x183345,_0x7c5898);console[_0x16f875(0x71)](renderCompareTable(_0xd33159)),console[_0x16f875(0x71)]();const _0x57042d=_0x47d080[_0x16f875(0x8e)],_0x46bf4b=await selectPages(_0x183345,_0x7c5898,_0x57042d);console['log'](),console[_0x16f875(0x71)](a64_0x35a06f[_0x16f875(0x91)](_0x16f875(0x66)+_0x46bf4b[_0x16f875(0x69)]+_0x16f875(0x93)));const _0x521775=_0x47d080[_0x16f875(0x70)]&&_0x47d080[_0x16f875(0x7a)];if(!_0x521775){console[_0x16f875(0x71)](renderSyncSummary(_0x46bf4b,_0x7c5898['size']>0x0));const _0x15cd4a=await askConfirm(_0x16f875(0x99));if(!_0x15cd4a)return console[_0x16f875(0x71)](a64_0x35a06f[_0x16f875(0x68)](_0x16f875(0x7e))),{'ok':!![]};}let _0xc2a4ca=_0x47d080[_0x16f875(0x70)],_0x5edd7c=_0x47d080[_0x16f875(0x7a)];!_0xc2a4ca&&(_0xc2a4ca=await askJsUrl());!_0x5edd7c&&(_0x5edd7c=await askCssUrl());const _0x3730cf=await askConfirm('\x20\x20Create\x20'+_0x46bf4b[_0x16f875(0x69)]+_0x16f875(0x78)+_0xc2a4ca+_0x16f875(0x7c)+_0x5edd7c+'?');if(!_0x3730cf)return console[_0x16f875(0x71)](a64_0x35a06f[_0x16f875(0x68)](_0x16f875(0x7e))),{'ok':!![]};const _0x399176=[_0xc2a4ca,_0x5edd7c],_0x442265=startSpinner(_0x16f875(0x6a)+_0x46bf4b['length']+'\x20menu(s)...');try{const _0x54503e=await doCreateMenus(_0x2f0f2d[_0x16f875(0x6b)],_0x2f0f2d[_0x16f875(0x9f)],_0x46bf4b,_0x399176);return stopSpinner(_0x442265,'Created\x20'+_0x54503e[_0x16f875(0x80)]+_0x16f875(0x9c),!![]),{'ok':!![],'data':_0x54503e,'message':_0x16f875(0x7b)+_0x54503e[_0x16f875(0x80)]+_0x16f875(0x77)+_0x54503e['failed']+_0x16f875(0x90)};}catch(_0x3c96ef){stopSpinner(_0x442265,_0x16f875(0x9d),![]);throw CliErrors[_0x16f875(0x89)](_0x3c96ef instanceof Error?_0x3c96ef['message']:'Menu\x20creation\x20failed');}}};function parseParams(_0xd33c6d){const _0x580849=a64_0x56c1bb;if(!_0xd33c6d)return{};try{const _0x2e735d=JSON[_0x580849(0x74)](_0xd33c6d);if(typeof _0x2e735d!==_0x580849(0x6c)||_0x2e735d===null||Array[_0x580849(0xa2)](_0x2e735d))return{};return{'jsUrl':typeof _0x2e735d['jsUrl']===_0x580849(0x8b)?_0x2e735d[_0x580849(0x70)][_0x580849(0x95)]():undefined,'cssUrl':typeof _0x2e735d[_0x580849(0x7a)]===_0x580849(0x8b)?_0x2e735d[_0x580849(0x7a)][_0x580849(0x95)]():undefined,'pages':Array[_0x580849(0xa2)](_0x2e735d[_0x580849(0x8e)])?_0x2e735d[_0x580849(0x8e)][_0x580849(0x79)](String):undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a65_0x5eb057=a65_0xd5ad;(function(_0x4f965e,_0x4f9fe1){const _0x119e02=a65_0xd5ad,_0x28a3f4=_0x4f965e();while(!![]){try{const _0x22bd0b=-parseInt(_0x119e02(0x11a))/0x1+-parseInt(_0x119e02(0x117))/0x2*(-parseInt(_0x119e02(0x123))/0x3)+parseInt(_0x119e02(0x121))/0x4*(-parseInt(_0x119e02(0x13b))/0x5)+-parseInt(_0x119e02(0x13f))/0x6*(parseInt(_0x119e02(0x118))/0x7)+-parseInt(_0x119e02(0x12b))/0x8*(parseInt(_0x119e02(0x144))/0x9)+parseInt(_0x119e02(0x142))/0xa+-parseInt(_0x119e02(0x141))/0xb*(-parseInt(_0x119e02(0x139))/0xc);if(_0x22bd0b===_0x4f9fe1)break;else _0x28a3f4['push'](_0x28a3f4['shift']());}catch(_0x5b75b8){_0x28a3f4['push'](_0x28a3f4['shift']());}}}(a65_0x2971,0x3e26e));import a65_0x1de008 from'chalk';import{filterMenusWithResources,doUpdateCdnUrls,fetchOnlineMenuList}from'./shared/logic.js';import{renderUpdateSummary}from'./shared/compare-table.js';import{askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'./shared/inquirer.js';function a65_0xd5ad(_0x5d567a,_0x271f27){_0x5d567a=_0x5d567a-0x113;const _0x297105=a65_0x2971();let _0xd5addc=_0x297105[_0x5d567a];return _0xd5addc;}import{CliErrors}from'../../errors.js';function a65_0x2971(){const _0x34dc63=['692HVgpKl','jsUrl','225642CRDBjs','\x20menu(s)\x20with\x20existing\x20resources','Online\x20menu\x20list\x20fetched','string','Updating\x20','object','\x20\x20Found\x20','Updated\x20','8Cgjimr','yes','updated','update','params','cssUrl','\x20updated,\x20','\x20menu(s)','appCode','trim','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','\x20failed.','str','Menu\x20update\x20completed:\x20','88596jDaPJR','message','4670ugitjE','label','\x20updated.','\x20menu(s)\x20updated','1758WvhhJa','write','517XxpiGQ','1391940XkOMYG','boolean','711171FJRprU','\x20menu(s)\x20failed','\x20menu(s)...','failed','skipped','\x20\x20Update\x20','\x20and\x20CSS:\x20','isArray','!\x20No\x20menus\x20with\x20existing\x20resources\x20found','length','log','✓\x20Menu\x20update\x20completed:\x20','yellow','error','\x20\x20!\x20No\x20menus\x20with\x20existing\x20resources\x20found','gray','flag','10gsjcrg','56QWRBgG','Failed\x20to\x20fetch\x20online\x20menu\x20list','364746YByldV','cookie','Menu\x20update\x20failed','menu','Update\x20CDN\x20asset\x20URLs\x20for\x20all\x20online\x20menus\x20with\x20existing\x20resources','validation','cyan'];a65_0x2971=function(){return _0x34dc63;};return a65_0x2971();}import{runMenuUpdateCore}from'./shared/update-core.js';export const menuUpdate={'service':a65_0x5eb057(0x11d),'command':a65_0x5eb057(0x12e),'description':a65_0x5eb057(0x11e),'risk':a65_0x5eb057(0x140),'flags':[{'name':a65_0x5eb057(0x12f),'type':a65_0x5eb057(0x126),'description':'Pre-fill\x20JS/CSS\x20URLs\x20to\x20update.\x20'+a65_0x5eb057(0x135)},{'name':a65_0x5eb057(0x12c),'type':a65_0x5eb057(0x143),'description':'Non-interactive:\x20update\x20all\x20menus\x20without\x20confirmation'}],async 'execute'(_0x34a6e7){const _0xcfc906=a65_0x5eb057,_0x2ef14d=_0x34a6e7[_0xcfc906(0x116)](_0xcfc906(0x12c)),_0x41f13b=_0x34a6e7[_0xcfc906(0x137)]('params'),_0x2824bd=parseParams(_0x41f13b),_0x49eb93=!!(_0x2824bd['jsUrl']||_0x2824bd[_0xcfc906(0x130)]);if(_0x2ef14d||_0x49eb93&&!isInteractive()){const _0x11d6b8=await runMenuUpdateCore(_0x34a6e7[_0xcfc906(0x133)],_0x34a6e7[_0xcfc906(0x11b)],_0x41f13b);return _0x11d6b8[_0xcfc906(0x148)]?console[_0xcfc906(0x14e)](_0xcfc906(0x14c)):(console[_0xcfc906(0x14e)](_0xcfc906(0x14f)+_0x11d6b8[_0xcfc906(0x12d)]+_0xcfc906(0x13e)),_0x11d6b8['failed']>0x0&&console[_0xcfc906(0x113)]('!\x20'+_0x11d6b8[_0xcfc906(0x147)]+_0xcfc906(0x145))),{'ok':_0x11d6b8[_0xcfc906(0x147)]===0x0};}requireInteractive();const _0xab1a75=startSpinner('Fetching\x20online\x20menu\x20list...');let _0x3f5641;try{_0x3f5641=await fetchOnlineMenuList(_0x34a6e7['appCode'],_0x34a6e7[_0xcfc906(0x11b)]),stopSpinner(_0xab1a75,_0xcfc906(0x125),!![]);}catch(_0x41c594){stopSpinner(_0xab1a75,_0xcfc906(0x119),![]);throw CliErrors['validation'](_0x41c594 instanceof Error?_0x41c594[_0xcfc906(0x13a)]:_0xcfc906(0x119));}const _0x66a18=filterMenusWithResources(_0x3f5641);if(_0x66a18[_0xcfc906(0x14d)]===0x0)return console[_0xcfc906(0x14e)](a65_0x1de008[_0xcfc906(0x150)](_0xcfc906(0x114))),{'ok':!![]};console[_0xcfc906(0x14e)](),console[_0xcfc906(0x14e)](a65_0x1de008[_0xcfc906(0x120)](_0xcfc906(0x129)+_0x66a18['length']+_0xcfc906(0x124))),console[_0xcfc906(0x14e)](renderUpdateSummary(_0x66a18['map'](_0x2d269f=>_0x2d269f[_0xcfc906(0x13c)]),[_0x2824bd[_0xcfc906(0x122)],_0x2824bd[_0xcfc906(0x130)]])),console[_0xcfc906(0x14e)]();let _0x3688a0=_0x2824bd[_0xcfc906(0x122)],_0x496531=_0x2824bd[_0xcfc906(0x130)];!_0x3688a0&&(_0x3688a0=await askJsUrl());!_0x496531&&(_0x496531=await askCssUrl());const _0x20d5d2=await askConfirm(_0xcfc906(0x149)+_0x66a18[_0xcfc906(0x14d)]+'\x20menu(s)\x20with\x20JS:\x20'+_0x3688a0+_0xcfc906(0x14a)+_0x496531+'?');if(!_0x20d5d2)return console[_0xcfc906(0x14e)](a65_0x1de008[_0xcfc906(0x115)]('\x20\x20Cancelled.')),{'ok':!![]};const _0x151df8=[_0x3688a0,_0x496531],_0x10f459=startSpinner(_0xcfc906(0x127)+_0x66a18[_0xcfc906(0x14d)]+_0xcfc906(0x146));try{const _0x840d70=await doUpdateCdnUrls(_0x34a6e7[_0xcfc906(0x133)],_0x34a6e7[_0xcfc906(0x11b)],_0x66a18,_0x151df8);return stopSpinner(_0x10f459,_0xcfc906(0x12a)+_0x840d70[_0xcfc906(0x12d)]+_0xcfc906(0x132),_0x840d70[_0xcfc906(0x147)]===0x0),{'ok':_0x840d70[_0xcfc906(0x147)]===0x0,'data':_0x840d70,'message':_0x840d70['failed']>0x0?_0xcfc906(0x138)+_0x840d70[_0xcfc906(0x12d)]+_0xcfc906(0x131)+_0x840d70[_0xcfc906(0x147)]+_0xcfc906(0x136):_0xcfc906(0x138)+_0x840d70[_0xcfc906(0x12d)]+_0xcfc906(0x13d)};}catch(_0x569fb5){stopSpinner(_0x10f459,_0xcfc906(0x11c),![]);throw CliErrors[_0xcfc906(0x11f)](_0x569fb5 instanceof Error?_0x569fb5[_0xcfc906(0x13a)]:_0xcfc906(0x11c));}}};function parseParams(_0x47e48b){const _0x385c19=a65_0x5eb057;if(!_0x47e48b)return{};try{const _0x5112aa=JSON['parse'](_0x47e48b);if(typeof _0x5112aa!==_0x385c19(0x128)||_0x5112aa===null||Array[_0x385c19(0x14b)](_0x5112aa))return{};return{'jsUrl':typeof _0x5112aa[_0x385c19(0x122)]==='string'?_0x5112aa['jsUrl']['trim']():undefined,'cssUrl':typeof _0x5112aa[_0x385c19(0x130)]==='string'?_0x5112aa[_0x385c19(0x130)][_0x385c19(0x134)]():undefined};}catch{return{};}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x5bbc8e,_0x1972cb){const _0x5b26fe=a66_0xb236,_0x3def73=_0x5bbc8e();while(!![]){try{const _0x425b3d=parseInt(_0x5b26fe(0x143))/0x1*(parseInt(_0x5b26fe(0x14d))/0x2)+parseInt(_0x5b26fe(0x142))/0x3*(-parseInt(_0x5b26fe(0x14f))/0x4)+-parseInt(_0x5b26fe(0x140))/0x5*(parseInt(_0x5b26fe(0x15c))/0x6)+-parseInt(_0x5b26fe(0x157))/0x7+parseInt(_0x5b26fe(0x154))/0x8*(-parseInt(_0x5b26fe(0x149))/0x9)+-parseInt(_0x5b26fe(0x145))/0xa+parseInt(_0x5b26fe(0x156))/0xb;if(_0x425b3d===_0x1972cb)break;else _0x3def73['push'](_0x3def73['shift']());}catch(_0x7cba52){_0x3def73['push'](_0x3def73['shift']());}}}(a66_0x1bad,0x92f47));import{existsSync}from'node:fs';import a66_0xa400f6 from'node:path';function a66_0x1bad(){const _0xfd3baf=['trim','2yYkAKs','env','2501476bqbJPa','√\x20Login\x20status:\x20','No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','Skipped','Logged\x20in','108544GXyKvP','cwd','35823909yKcOqH','6868491ccxUEV','log','√\x20App\x20Code:\x20','production','Login\x20failed','3999390AOjRMM','Project\x20name\x20cannot\x20exceed\x2050\x20characters','cyan','green','5HgFoEx','Not\x20set','3GTGgTn','911893yZvvHs','√\x20Project\x20Name:\x20','3030740AUPieT','Directory\x20\x22','string','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','657LScwPZ','resolve','\x22\x20already\x20exists'];a66_0x1bad=function(){return _0xfd3baf;};return a66_0x1bad();}import a66_0x5e04c2 from'chalk';import{input,confirm}from'@inquirer/prompts';function a66_0xb236(_0x3b7ffb,_0x5ef6f0){_0x3b7ffb=_0x3b7ffb-0x13e;const _0x1bad36=a66_0x1bad();let _0xb236d9=_0x1bad36[_0x3b7ffb];return _0xb236d9;}import{getIsSessionValid}from'../../../auth/is-session-valid.js';import{authServer}from'../../../auth/auth-server.js';import{readConfig}from'../../../utils/config.js';import{selectSingleAppcode}from'../../common/app-selector.js';export async function guidedCreateProject(_0x5eaec3,_0x331bb8,_0x3c5a6f){const _0x4ad5cc=a66_0xb236,_0x3a8af8='my-app',_0x1e3066=readConfig(),_0x25a60c=typeof _0x1e3066['env']===_0x4ad5cc(0x147)?_0x1e3066[_0x4ad5cc(0x14e)]:undefined,_0x4fac14=await input({'message':'Project\x20name:','default':_0x3a8af8,'validate':_0x28dba4=>{const _0x416dea=_0x4ad5cc,_0x1f24cc=_0x28dba4[_0x416dea(0x14c)]()||_0x3a8af8;if(_0x1f24cc['length']>0x32)return _0x416dea(0x15d);const _0x27e915=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x1f24cc&&!_0x27e915['test'](_0x1f24cc))return _0x416dea(0x148);const _0x1ca244=a66_0xa400f6[_0x416dea(0x14a)](process[_0x416dea(0x155)](),_0x1f24cc);if(existsSync(_0x1ca244))return _0x416dea(0x146)+_0x1f24cc+_0x416dea(0x14b);return!![];}});console[_0x4ad5cc(0x158)](a66_0x5e04c2[_0x4ad5cc(0x13f)](_0x4ad5cc(0x144)+a66_0x5e04c2[_0x4ad5cc(0x13e)](_0x4fac14)));const _0x2d0e22=await selectSingleAppcode(_0x3c5a6f);console[_0x4ad5cc(0x158)](a66_0x5e04c2['green'](_0x4ad5cc(0x159)+a66_0x5e04c2[_0x4ad5cc(0x13e)](_0x2d0e22||_0x4ad5cc(0x141))));if(_0x2d0e22){const _0x2925b4=await getIsSessionValid();if(!_0x2925b4){const _0x110dcf=await confirm({'message':_0x4ad5cc(0x151),'default':!![]});if(_0x110dcf){const _0x4fd307=await authServer({'silent':!![]});console[_0x4ad5cc(0x158)](a66_0x5e04c2[_0x4ad5cc(0x13f)]('√\x20Login\x20status:\x20'+a66_0x5e04c2['cyan'](_0x4fd307?_0x4ad5cc(0x153):_0x4ad5cc(0x15b))));}else console['log'](a66_0x5e04c2['green'](_0x4ad5cc(0x150)+a66_0x5e04c2[_0x4ad5cc(0x13e)](_0x4ad5cc(0x152))));}await _0x5eaec3({'projectName':_0x4fac14,'appCode':_0x2d0e22,'env':_0x331bb8||_0x25a60c||'production'});}else await _0x5eaec3({'projectName':_0x4fac14,'env':_0x331bb8||_0x25a60c||_0x4ad5cc(0x15a)});}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x559086,_0x4c16c1){const _0x1cec96=a67_0x3d09,_0x43e991=_0x559086();while(!![]){try{const _0x16e444=-parseInt(_0x1cec96(0x155))/0x1+-parseInt(_0x1cec96(0x152))/0x2*(parseInt(_0x1cec96(0x158))/0x3)+parseInt(_0x1cec96(0x153))/0x4+-parseInt(_0x1cec96(0x156))/0x5*(-parseInt(_0x1cec96(0x15c))/0x6)+-parseInt(_0x1cec96(0x15a))/0x7+parseInt(_0x1cec96(0x151))/0x8+parseInt(_0x1cec96(0x159))/0x9;if(_0x16e444===_0x4c16c1)break;else _0x43e991['push'](_0x43e991['shift']());}catch(_0x21df3b){_0x43e991['push'](_0x43e991['shift']());}}}(a67_0x49d8,0x55d34));function a67_0x3d09(_0xaa8598,_0x29f602){_0xaa8598=_0xaa8598-0x151;const _0x49d8a6=a67_0x49d8();let _0x3d093b=_0x49d8a6[_0xaa8598];return _0x3d093b;}function a67_0x49d8(){const _0x206889=['1337124SCFIre','370164XGqlii','toFixed','575587IsOAfP','1742795jDndSp','now','3gvSZsA','7910937UaQQFj','2461431munlIW','replace','6uPflpX','5017832hyDtxR'];a67_0x49d8=function(){return _0x206889;};return a67_0x49d8();}export function formatElapsed(_0x2fe2d0){const _0x117792=a67_0x3d09,_0x1b1cf8=Date[_0x117792(0x157)]()-_0x2fe2d0;if(_0x1b1cf8<0x3e8)return _0x1b1cf8+'ms';const _0x9ca192=(_0x1b1cf8/0x3e8)[_0x117792(0x154)](0x2),_0xa161fe=_0x9ca192[_0x117792(0x15b)](/\.?0+$/u,'');return _0xa161fe+'s';}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x41c0d0,_0x372c6d){const _0x21a367=a68_0x2df0,_0x9e2611=_0x41c0d0();while(!![]){try{const _0x366e02=parseInt(_0x21a367(0x14a))/0x1*(-parseInt(_0x21a367(0x13b))/0x2)+-parseInt(_0x21a367(0x12b))/0x3+parseInt(_0x21a367(0x142))/0x4*(parseInt(_0x21a367(0x146))/0x5)+parseInt(_0x21a367(0x14c))/0x6*(-parseInt(_0x21a367(0x11d))/0x7)+-parseInt(_0x21a367(0x157))/0x8+parseInt(_0x21a367(0x147))/0x9+parseInt(_0x21a367(0x11a))/0xa;if(_0x366e02===_0x372c6d)break;else _0x9e2611['push'](_0x9e2611['shift']());}catch(_0x49117e){_0x9e2611['push'](_0x9e2611['shift']());}}}(a68_0x22da,0x79e9e));import a68_0x2b10c9 from'path';function a68_0x22da(){const _0x4c14ae=['constants','2918968wNamWd','trim','cookie','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','needsUpgrade','stringify','W_OK','*\x20Pulling\x20API\x20configuration...','test','1.0.0','error','*\x20Configuring\x20AppCode\x20for\x20project\x20','readFileSync','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','stop','cwd','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','\x20|\x20AppCode:\x20','🚀\x20Next\x20Steps:','modelCount','resolve','CLI\x20版本检查','配置应用AppCode:\x20','API\x20configuration\x20pulled:\x20','\x20&&\x20','success','bold','开始创建项目:\x20','existsSync','11114060gAlkia','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','green','21PbUJZu','√\x20package.json\x20updated:\x20name=','\x20run\x20start','appCode','Project\x20name\x20cannot\x20be\x20empty','更新\x20package.json\x20失败','Project\x20name:\x20','projectName','writeFileSync','version','log','warn','package.json','更新\x20package.json\x20name','604650CBoFiK','string','...','\x20model(s)','√\x20Pulled\x20','chdir','join','\x20Generated\x20by\x20rabetbase\x20cli\x20','env','currentVersion','message','项目创建完成:\x20','gray','rmSync','production','start','2diZdTZ','项目创建失败:\x20','toLocaleString','fail','√\x20Configuration\x20file\x20created,\x20AppCode:\x20','projectCode','API\x20配置拉取异常','11668JPtAXF','create','length','dirname','605AOeUvH','1277055ELBiKS','cyan','\x20√\x20','130667NaXaXD','\x20already\x20exists','819624OersLc','清理项目目录失败:\x20','Copy\x20project\x20files','./src/api/','repeat','utf8','\x20\x202.\x20Pull\x20API\x20configuration:\x20','info','cd\x20','parse'];a68_0x22da=function(){return _0x4c14ae;};return a68_0x22da();}import a68_0x5d69b9 from'fs';import a68_0x1b097c from'chalk';import a68_0x6e0d75 from'ora';import{guidedCreateProject}from'./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';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'./use-copy-project-template.js';import{installDependencies}from'./use-install-dependencies.js';import{formatProjectCode}from'./use-format-code.js';import{logger}from'../../../utils/logger.js';function a68_0x2df0(_0x1a29d7,_0x4ed4a7){_0x1a29d7=_0x1a29d7-0x104;const _0x22da13=a68_0x22da();let _0x2df025=_0x22da13[_0x1a29d7];return _0x2df025;}import{checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{selectSingleAppcode}from'../../common/app-selector.js';import{getRabetbaseCliPackageRoot}from'./project-template-path.js';export async function createApp(_0x191165){const _0x5ce7b8=a68_0x2df0,_0x3cdd59=await checkCliVersion();_0x3cdd59[_0x5ce7b8(0x15b)]&&(printCliUpgradeWarning(_0x3cdd59),logger[_0x5ce7b8(0x153)]('create',_0x5ce7b8(0x112),{'currentVersion':_0x3cdd59[_0x5ce7b8(0x134)],'stableVersion':_0x3cdd59['stableVersion'],'needsUpgrade':_0x3cdd59[_0x5ce7b8(0x15b)]}));if(_0x191165[_0x5ce7b8(0x140)]&&_0x191165[_0x5ce7b8(0x120)])await runCreate({'projectName':_0x191165[_0x5ce7b8(0x140)],'appCode':_0x191165[_0x5ce7b8(0x120)],'env':_0x191165[_0x5ce7b8(0x133)]},_0x191165);else{if(_0x191165['projectCode']){const _0x595ad1=await selectSingleAppcode(_0x191165[_0x5ce7b8(0x159)]);await runCreate({'projectName':_0x191165[_0x5ce7b8(0x140)],'appCode':_0x595ad1||undefined,'env':_0x191165[_0x5ce7b8(0x133)]},_0x191165);}else await guidedCreateProject(_0x3b6d91=>runCreate(_0x3b6d91,_0x191165),_0x191165[_0x5ce7b8(0x133)],_0x191165[_0x5ce7b8(0x159)]);}}async function runCreate(_0x50adaa,_0x45b4d0){const _0x3d8ab1=a68_0x2df0;if(!_0x50adaa[_0x3d8ab1(0x124)]||_0x50adaa['projectName'][_0x3d8ab1(0x158)]()==='')throw new Error(_0x3d8ab1(0x121));const _0x455303=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x455303[_0x3d8ab1(0x105)](_0x50adaa['projectName']))throw new Error('Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters');if(_0x50adaa[_0x3d8ab1(0x124)][_0x3d8ab1(0x144)]>0x64)throw new Error(_0x3d8ab1(0x10d));const _0xcae3f=a68_0x2b10c9[_0x3d8ab1(0x111)](process[_0x3d8ab1(0x10c)](),_0x50adaa[_0x3d8ab1(0x124)]);if(a68_0x5d69b9[_0x3d8ab1(0x119)](_0xcae3f))throw new Error('Project\x20directory\x20'+_0x50adaa['projectName']+_0x3d8ab1(0x14b));try{a68_0x5d69b9['accessSync'](a68_0x2b10c9[_0x3d8ab1(0x145)](_0xcae3f),a68_0x5d69b9[_0x3d8ab1(0x156)][_0x3d8ab1(0x15d)]);}catch{throw new Error(_0x3d8ab1(0x11b));}logger['setLogPath'](_0xcae3f),logger['info'](_0x3d8ab1(0x143),_0x3d8ab1(0x118)+_0x50adaa[_0x3d8ab1(0x124)],{'projectDir':_0xcae3f,'appCode':_0x50adaa[_0x3d8ab1(0x120)]}),console[_0x3d8ab1(0x127)](),console[_0x3d8ab1(0x127)](a68_0x1b097c[_0x3d8ab1(0x11c)](_0x3d8ab1(0x149))+_0x3d8ab1(0x123)+a68_0x1b097c[_0x3d8ab1(0x11c)](_0x50adaa[_0x3d8ab1(0x124)])+(_0x50adaa[_0x3d8ab1(0x120)]?_0x3d8ab1(0x10e)+a68_0x1b097c['cyan'](_0x50adaa[_0x3d8ab1(0x120)]):''));try{await runTask(_0x3d8ab1(0x14e),()=>copyProjectTemplate(_0x50adaa[_0x3d8ab1(0x124)])),await updatePackageJsonName(_0x50adaa['projectName']),await runTask('Install\x20dependencies',()=>installDependencies(_0x50adaa[_0x3d8ab1(0x124)])),await runTask('Format\x20code',()=>formatProjectCode(_0x50adaa[_0x3d8ab1(0x124)])),await configureAppCode(_0x50adaa['projectName'],_0x50adaa['appCode']||'',_0x50adaa[_0x3d8ab1(0x133)]);let _0x347b20=![];if(_0x50adaa[_0x3d8ab1(0x120)]){console[_0x3d8ab1(0x127)](_0x3d8ab1(0x104));const _0x213e64=process[_0x3d8ab1(0x10c)]();try{process[_0x3d8ab1(0x130)](_0xcae3f);const _0x18982b=_0x50adaa[_0x3d8ab1(0x133)]||_0x3d8ab1(0x139);initEnv(_0x18982b);const {configArray:_0x2a5907}=await fetchModelList(_0x50adaa[_0x3d8ab1(0x120)],_0x45b4d0[_0x3d8ab1(0x159)]||''),_0x594f3f=_0x3d8ab1(0x14f),_0x59cdf0=await generateApiFile(_0x2a5907,'',_0x50adaa[_0x3d8ab1(0x120)],!![],_0x18982b,_0x594f3f);console['log'](_0x3d8ab1(0x12f)+_0x2a5907[_0x3d8ab1(0x144)]+'\x20dataset(s),\x20generated\x20'+_0x59cdf0[_0x3d8ab1(0x110)]+_0x3d8ab1(0x12e)),logger[_0x3d8ab1(0x153)]('create',_0x3d8ab1(0x114)+_0x50adaa[_0x3d8ab1(0x120)]);}catch(_0x3d456f){_0x347b20=!![],console[_0x3d8ab1(0x127)]('!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull'),logger[_0x3d8ab1(0x128)](_0x3d8ab1(0x143),_0x3d8ab1(0x141),{'error':_0x3d456f instanceof Error?_0x3d456f[_0x3d8ab1(0x135)]:String(_0x3d456f)});}finally{process[_0x3d8ab1(0x130)](_0x213e64);}}logger[_0x3d8ab1(0x116)]('create',_0x3d8ab1(0x136)+_0x50adaa[_0x3d8ab1(0x124)]),console[_0x3d8ab1(0x127)](),console[_0x3d8ab1(0x127)](a68_0x1b097c[_0x3d8ab1(0x11c)]('─'['repeat'](0x3c))),console[_0x3d8ab1(0x127)](a68_0x1b097c['cyan']['bold'](_0x3d8ab1(0x10f))),console[_0x3d8ab1(0x127)](),console['log']('\x20\x201.\x20Start\x20project:\x20'+a68_0x1b097c[_0x3d8ab1(0x148)][_0x3d8ab1(0x117)](_0x3d8ab1(0x154)+_0x50adaa[_0x3d8ab1(0x124)]+_0x3d8ab1(0x115)+CLI_BIN_NAME+_0x3d8ab1(0x11f))),_0x347b20&&console[_0x3d8ab1(0x127)](_0x3d8ab1(0x152)+a68_0x1b097c[_0x3d8ab1(0x148)][_0x3d8ab1(0x117)](CLI_BIN_NAME+'\x20api\x20pull')),console[_0x3d8ab1(0x127)](a68_0x1b097c[_0x3d8ab1(0x11c)]('─'[_0x3d8ab1(0x150)](0x3c)));}catch(_0xc0486c){logger['error'](_0x3d8ab1(0x143),_0x3d8ab1(0x13c)+_0x50adaa[_0x3d8ab1(0x124)],{'error':_0xc0486c instanceof Error?_0xc0486c[_0x3d8ab1(0x135)]:String(_0xc0486c)});try{a68_0x5d69b9[_0x3d8ab1(0x119)](_0xcae3f)&&(console[_0x3d8ab1(0x127)]('*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20'+_0xcae3f),a68_0x5d69b9[_0x3d8ab1(0x138)](_0xcae3f,{'recursive':!![],'force':!![]}));}catch{logger['warn'](_0x3d8ab1(0x143),_0x3d8ab1(0x14d)+_0xcae3f);}throw _0xc0486c;}}async function runTask(_0x58a58d,_0x4962ce){const _0x4defd9=a68_0x2df0,_0x3e9041=a68_0x6e0d75(_0x58a58d+_0x4defd9(0x12d))[_0x4defd9(0x13a)]();try{const _0x9e4911=await _0x4962ce();_0x3e9041[_0x4defd9(0x10b)](),console[_0x4defd9(0x127)](''+a68_0x1b097c[_0x4defd9(0x11c)](_0x4defd9(0x149))+_0x58a58d+'\x20'+a68_0x1b097c[_0x4defd9(0x137)]('['+_0x9e4911+']'));}catch(_0x1f34d3){_0x3e9041[_0x4defd9(0x13e)](_0x58a58d);throw _0x1f34d3;}}async function updatePackageJsonName(_0x245a5e){const _0x54f18d=a68_0x2df0,_0x31945a=a68_0x2b10c9[_0x54f18d(0x111)](process[_0x54f18d(0x10c)](),_0x245a5e),_0x14d66f=a68_0x2b10c9[_0x54f18d(0x131)](_0x31945a,_0x54f18d(0x129));try{console[_0x54f18d(0x127)]('*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields');const _0x400751=getRabetbaseCliPackageRoot(),_0x5d0e9c=a68_0x2b10c9[_0x54f18d(0x131)](_0x400751,'package.json');let _0x86181b=_0x54f18d(0x106);try{const _0xfd5e69=JSON[_0x54f18d(0x155)](a68_0x5d69b9[_0x54f18d(0x109)](_0x5d0e9c,_0x54f18d(0x151)));_0x86181b=_0xfd5e69[_0x54f18d(0x126)]||_0x54f18d(0x106);}catch{}const _0x1d0319=a68_0x5d69b9['readFileSync'](_0x14d66f,_0x54f18d(0x151)),_0x580f8e=JSON['parse'](_0x1d0319);_0x580f8e['name']=_0x245a5e,_0x580f8e['description']=_0x245a5e+_0x54f18d(0x132)+_0x86181b,a68_0x5d69b9[_0x54f18d(0x125)](_0x14d66f,JSON[_0x54f18d(0x15c)](_0x580f8e,null,0x2)+'\x0a',_0x54f18d(0x151)),console['log'](_0x54f18d(0x11e)+_0x245a5e),logger[_0x54f18d(0x153)](_0x54f18d(0x143),_0x54f18d(0x12a));}catch(_0x520b8a){logger[_0x54f18d(0x107)](_0x54f18d(0x143),_0x54f18d(0x122));throw _0x520b8a;}}async function configureAppCode(_0x6c873b,_0x2bf731,_0x4526b3){const _0x243276=a68_0x2df0,_0x31cc37=a68_0x2b10c9[_0x243276(0x111)](process['cwd'](),_0x6c873b),_0x632f68=a68_0x2b10c9['join'](_0x31cc37,NEW_CONFIG_NAME);try{_0x2bf731?console[_0x243276(0x127)](_0x243276(0x108)+_0x6c873b+':\x20'+_0x2bf731):console[_0x243276(0x127)](_0x243276(0x10a)+_0x6c873b);const _0x410153=getRabetbaseCliPackageRoot(),_0x3f6880=a68_0x2b10c9['join'](_0x410153,_0x243276(0x129));let _0xb1fa0e=_0x243276(0x106);try{const _0x32fb05=JSON[_0x243276(0x155)](a68_0x5d69b9[_0x243276(0x109)](_0x3f6880,_0x243276(0x151)));_0xb1fa0e=_0x32fb05[_0x243276(0x126)]||_0x243276(0x106);}catch{}const _0x55d04c=readConfig(),_0x4f7bac=typeof _0x55d04c[_0x243276(0x133)]===_0x243276(0x12c)?_0x55d04c[_0x243276(0x133)]:undefined,{app:_0x4a3091,appcode:_0x495517,..._0x3470a4}=_0x55d04c,_0x2570b4={..._0x3470a4,'appcode':_0x2bf731||'','env':_0x4526b3||_0x4f7bac||_0x243276(0x139),'createdAt':new Date()[_0x243276(0x13d)](),'version':_0xb1fa0e};writeConfigFile(_0x632f68,_0x2570b4),_0x2bf731?console[_0x243276(0x127)](_0x243276(0x13f)+_0x2bf731):console[_0x243276(0x127)](_0x243276(0x15a)+CLI_BIN_NAME+'\x20config\x20set\x20appcode\x20<app-code>\x27'),logger['info']('create',_0x243276(0x113)+_0x2bf731);}catch(_0x23c2ca){logger[_0x243276(0x107)]('create','配置应用AppCode失败');}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0xac6c7c,_0x1989ff){const _0x110109=a69_0x296a,_0x450052=_0xac6c7c();while(!![]){try{const _0x357e3c=-parseInt(_0x110109(0x16a))/0x1+-parseInt(_0x110109(0x17e))/0x2+parseInt(_0x110109(0x187))/0x3+-parseInt(_0x110109(0x173))/0x4*(-parseInt(_0x110109(0x15f))/0x5)+-parseInt(_0x110109(0x159))/0x6+-parseInt(_0x110109(0x17d))/0x7+-parseInt(_0x110109(0x169))/0x8*(-parseInt(_0x110109(0x15a))/0x9);if(_0x357e3c===_0x1989ff)break;else _0x450052['push'](_0x450052['shift']());}catch(_0x5dfbc7){_0x450052['push'](_0x450052['shift']());}}}(a69_0x4c81,0xf06f6));import a69_0x2f3ade from'path';import a69_0xbdeb99 from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';function a69_0x296a(_0x422796,_0x656cc4){_0x422796=_0x422796-0x155;const _0x4c812c=a69_0x4c81();let _0x296a27=_0x4c812c[_0x422796];return _0x296a27;}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';function a69_0x4c81(){const _0x5b4d81=['parse','Project\x20name\x20cannot\x20be\x20empty.','\x22\x20already\x20exists.','bun\x20run\x20format','155dnlbyM','Cannot\x20create\x20project\x20in\x20current\x20directory.','name','constants','length','log','Project\x20directory\x20\x22','\x20\x20√\x20Configuration\x20file\x20created','trim','env','16wphvQS','1454111sZfVJR','Project\x20name\x20contains\x20invalid\x20characters.','package.json','toLocaleString','writeFile','\x20created\x20successfully!','stringify','description','Use\x20a\x20different\x20project\x20name.','38636jLlIUm','\x20model(s)','resolve','validation','\x0a\x20\x20cd\x20','\x20\x20√\x20Code\x20formatted','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','\x20\x20rabetbase\x20run\x20start\x0a','utf-8','Check\x20directory\x20permissions.','10245501LwgWVS','911240jzXBvK','./src/api/','*\x20Creating\x20project\x20','chdir','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','\x20\x20Installing\x20dependencies...','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','W_OK','\x20\x20√\x20Project\x20template\x20created','916083jqhjxo','ignore','needsUpgrade','production','bun','join','string','cwd','modelCount','...','\x20\x20Pulling\x20API\x20configuration...','dirname','5786388uVEQVS','21230118ulCbCF'];a69_0x4c81=function(){return _0x5b4d81;};return a69_0x4c81();}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'./project-template-path.js';const execAsync=promisify(exec);export async function createProjectNonInteractive(_0x337fb1,_0x1ae284,_0x156e88,_0x292c69){const _0x525c68=a69_0x296a,_0x50f68f=await checkCliVersion();_0x50f68f[_0x525c68(0x189)]&&printCliUpgradeWarning(_0x50f68f);if(!_0x337fb1||_0x337fb1[_0x525c68(0x167)]()==='')throw CliErrors[_0x525c68(0x176)](_0x525c68(0x15c));const _0x3d3e2a=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x3d3e2a['test'](_0x337fb1))throw CliErrors[_0x525c68(0x176)](_0x525c68(0x16b),_0x525c68(0x179));if(_0x337fb1['length']>0x64)throw CliErrors[_0x525c68(0x176)](_0x525c68(0x184));const _0x352b17=a69_0x2f3ade['resolve'](process[_0x525c68(0x18e)](),_0x337fb1);if(existsSync(_0x352b17))throw CliErrors[_0x525c68(0x176)](_0x525c68(0x165)+_0x337fb1+_0x525c68(0x15d),_0x525c68(0x172));try{const _0x52bc8d=a69_0x2f3ade[_0x525c68(0x158)](_0x352b17);await a69_0xbdeb99['access'](_0x52bc8d,a69_0xbdeb99[_0x525c68(0x162)][_0x525c68(0x185)]);}catch{throw CliErrors[_0x525c68(0x176)](_0x525c68(0x160),_0x525c68(0x17c));}try{console[_0x525c68(0x164)](_0x525c68(0x180)+_0x337fb1+_0x525c68(0x156));const _0x1f2fd9=getSubAppReactDemoTemplateDir();await copyDirectory(_0x1f2fd9,_0x352b17),console[_0x525c68(0x164)](_0x525c68(0x186)),await updatePackageJsonName(_0x337fb1),console['log']('\x20\x20√\x20package.json\x20updated'),console[_0x525c68(0x164)](_0x525c68(0x183)),console[_0x525c68(0x164)]('\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)'),await formatCode(_0x352b17),console[_0x525c68(0x164)](_0x525c68(0x178)),await configureProject(_0x337fb1,_0x156e88,_0x1ae284),console[_0x525c68(0x164)](_0x525c68(0x166)),_0x156e88&&await pullApiConfig(_0x352b17,_0x156e88,_0x1ae284,_0x292c69),console[_0x525c68(0x164)]('\x0a√\x20Project\x20'+_0x337fb1+_0x525c68(0x16f)),console[_0x525c68(0x164)](_0x525c68(0x177)+_0x337fb1),console['log'](_0x525c68(0x17a));}catch(_0x491215){try{existsSync(_0x352b17)&&await a69_0xbdeb99['rm'](_0x352b17,{'recursive':!![],'force':!![]});}catch{}throw _0x491215;}}async function updatePackageJsonName(_0x12ddb8){const _0x1b4984=a69_0x296a,_0x4f2692=a69_0x2f3ade[_0x1b4984(0x175)](process[_0x1b4984(0x18e)](),_0x12ddb8),_0x3faa6f=a69_0x2f3ade[_0x1b4984(0x18c)](_0x4f2692,_0x1b4984(0x16c)),_0x1cea16=await a69_0xbdeb99['readFile'](_0x3faa6f,_0x1b4984(0x17b)),_0x467cad=JSON[_0x1b4984(0x15b)](_0x1cea16);_0x467cad[_0x1b4984(0x161)]=_0x12ddb8,_0x467cad[_0x1b4984(0x171)]='A\x20project\x20created\x20with\x20Lovrabet\x20CLI',await a69_0xbdeb99[_0x1b4984(0x16e)](_0x3faa6f,JSON[_0x1b4984(0x170)](_0x467cad,null,0x2)+'\x0a');}function detectPackageManager(){const _0x2ec420=a69_0x296a;try{return execSync('bun\x20--version',{'stdio':_0x2ec420(0x188)}),_0x2ec420(0x18b);}catch{return'npm';}}async function formatCode(_0xa7c5f4){const _0x1d4328=a69_0x296a;try{await execAsync(_0x1d4328(0x15e),{'cwd':_0xa7c5f4});}catch{}}async function configureProject(_0x475f4d,_0x5d6446,_0x403482){const _0x1134f6=a69_0x296a,_0x2e5ef4=a69_0x2f3ade[_0x1134f6(0x175)](process[_0x1134f6(0x18e)](),_0x475f4d),_0x1513d7=a69_0x2f3ade[_0x1134f6(0x18c)](_0x2e5ef4,NEW_CONFIG_NAME),_0x15aa21=readConfig(),_0x4b5802=typeof _0x15aa21[_0x1134f6(0x168)]===_0x1134f6(0x18d)?_0x15aa21[_0x1134f6(0x168)]:undefined,{app:_0x47b4d4,appcode:_0x4d7c70,..._0x129728}=_0x15aa21,_0x55de3a={..._0x129728,'appcode':_0x5d6446||'','env':_0x403482||_0x4b5802||'production','createdAt':new Date()[_0x1134f6(0x16d)](),'version':getCliVersion()};writeConfigFile(_0x1513d7,_0x55de3a);}async function pullApiConfig(_0x19622d,_0x43b2bd,_0x18e38b,_0x21cdc4){const _0x516280=a69_0x296a,_0x201d22=process['cwd']();try{process[_0x516280(0x181)](_0x19622d);const _0x548717=_0x18e38b||_0x516280(0x18a);initEnv(_0x548717),console[_0x516280(0x164)](_0x516280(0x157));const {configArray:_0x5a20a9}=await fetchModelList(_0x43b2bd,_0x21cdc4||''),_0x146312=await generateApiFile(_0x5a20a9,'',_0x43b2bd,!![],_0x548717,_0x516280(0x17f));console[_0x516280(0x164)]('\x20\x20√\x20Pulled\x20'+_0x5a20a9[_0x516280(0x163)]+'\x20dataset(s),\x20generated\x20'+_0x146312[_0x516280(0x155)]+_0x516280(0x174));}catch(_0x510409){console[_0x516280(0x164)](_0x516280(0x182)+CLI_BIN_NAME+'\x20api\x20pull`\x20manually\x20later.');}finally{process['chdir'](_0x201d22);}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a70_0x349356=a70_0x40d4;(function(_0x2b5386,_0x57dc64){const _0x1a79ea=a70_0x40d4,_0x58d7bd=_0x2b5386();while(!![]){try{const _0x5c0603=-parseInt(_0x1a79ea(0x1ab))/0x1*(parseInt(_0x1a79ea(0x1ad))/0x2)+-parseInt(_0x1a79ea(0x1ac))/0x3+-parseInt(_0x1a79ea(0x1b1))/0x4+parseInt(_0x1a79ea(0x1a8))/0x5*(parseInt(_0x1a79ea(0x1a7))/0x6)+parseInt(_0x1a79ea(0x1a9))/0x7*(parseInt(_0x1a79ea(0x1aa))/0x8)+-parseInt(_0x1a79ea(0x1b4))/0x9*(parseInt(_0x1a79ea(0x1a5))/0xa)+-parseInt(_0x1a79ea(0x1af))/0xb*(-parseInt(_0x1a79ea(0x1b0))/0xc);if(_0x5c0603===_0x57dc64)break;else _0x58d7bd['push'](_0x58d7bd['shift']());}catch(_0x35c4ea){_0x58d7bd['push'](_0x58d7bd['shift']());}}}(a70_0x1f6a,0xc154a));import a70_0x3eda28 from'node:path';function a70_0x1f6a(){const _0xa5508d=['templates','2644848HAzwRy','resolve','projects','10HKJpIo','../../../../','2022234qKkuRK','5iOrocC','1309UOeuEB','3056XxqfFo','17IVglec','1265967pURAEY','83662hUoPPl','dirname','3156010JutyLV','132VpHJAV','5382452cYWqyU','sub-app-react-demo'];a70_0x1f6a=function(){return _0xa5508d;};return a70_0x1f6a();}import{fileURLToPath}from'node:url';const __dirname=a70_0x3eda28[a70_0x349356(0x1ae)](fileURLToPath(import.meta.url));function a70_0x40d4(_0x11579e,_0xdf2595){_0x11579e=_0x11579e-0x1a5;const _0x1f6ad3=a70_0x1f6a();let _0x40d4f5=_0x1f6ad3[_0x11579e];return _0x40d4f5;}export function getRabetbaseCliPackageRoot(){const _0x5a1412=a70_0x349356;return a70_0x3eda28[_0x5a1412(0x1b5)](__dirname,_0x5a1412(0x1a6));}export function getSubAppReactDemoTemplateDir(){const _0x3da5ea=a70_0x349356;return a70_0x3eda28['join'](getRabetbaseCliPackageRoot(),_0x3da5ea(0x1b3),_0x3da5ea(0x1b6),_0x3da5ea(0x1b2));}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a71_0x752c(_0x52157c,_0x3795a5){_0x52157c=_0x52157c-0x10b;const _0x55b458=a71_0x55b4();let _0x752cb1=_0x55b458[_0x52157c];return _0x752cb1;}(function(_0x28b4ed,_0x152721){const _0x53ad71=a71_0x752c,_0x3bacee=_0x28b4ed();while(!![]){try{const _0x2a5822=parseInt(_0x53ad71(0x112))/0x1+-parseInt(_0x53ad71(0x115))/0x2*(parseInt(_0x53ad71(0x10d))/0x3)+parseInt(_0x53ad71(0x116))/0x4+-parseInt(_0x53ad71(0x118))/0x5+parseInt(_0x53ad71(0x113))/0x6+parseInt(_0x53ad71(0x10f))/0x7+-parseInt(_0x53ad71(0x10e))/0x8;if(_0x2a5822===_0x152721)break;else _0x3bacee['push'](_0x3bacee['shift']());}catch(_0x1918bc){_0x3bacee['push'](_0x3bacee['shift']());}}}(a71_0x55b4,0x867f0));import a71_0x695e9c from'node:path';function a71_0x55b4(){const _0x5253e5=['cwd','3KbGAJK','1011360AZeSQG','5058256COmKXe','message','resolve','285577CNnvFK','6553950hJeNkV','项目模板复制失败','1390012amYgJJ','697340lzVncD','now','4512615ddhbDE','success','copy','项目模板复制完成'];a71_0x55b4=function(){return _0x5253e5;};return a71_0x55b4();}import{copyDirectory}from'../../../utils/copy-directory.js';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'./project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x58bf75){const _0x384cf3=a71_0x752c,_0x31e402=Date[_0x384cf3(0x117)](),_0x1ea7a6=a71_0x695e9c[_0x384cf3(0x111)](process[_0x384cf3(0x10c)](),_0x58bf75);try{logger['info'](_0x384cf3(0x11a),'开始复制项目模板',{'projectCode':_0x58bf75,'templateDir':templateDir}),await copyDirectory(templateDir,_0x1ea7a6);const _0xaabec9=Date[_0x384cf3(0x117)]()-_0x31e402;logger[_0x384cf3(0x119)](_0x384cf3(0x11a),_0x384cf3(0x10b),_0xaabec9,{'projectCode':_0x58bf75});}catch(_0x7c5b22){const _0x26b505=Date['now']()-_0x31e402;logger['error'](_0x384cf3(0x11a),_0x384cf3(0x114),{'projectCode':_0x58bf75,'error':_0x7c5b22 instanceof Error?_0x7c5b22[_0x384cf3(0x110)]:String(_0x7c5b22),'duration':_0x26b505});throw _0x7c5b22;}return formatElapsed(_0x31e402);}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x39eb43,_0x228dc2){const _0x24dc4a=a72_0x694f,_0x47fa66=_0x39eb43();while(!![]){try{const _0x2eaffd=-parseInt(_0x24dc4a(0x184))/0x1*(-parseInt(_0x24dc4a(0x18a))/0x2)+-parseInt(_0x24dc4a(0x182))/0x3+-parseInt(_0x24dc4a(0x17f))/0x4+-parseInt(_0x24dc4a(0x188))/0x5+parseInt(_0x24dc4a(0x189))/0x6*(-parseInt(_0x24dc4a(0x18b))/0x7)+-parseInt(_0x24dc4a(0x18d))/0x8*(parseInt(_0x24dc4a(0x190))/0x9)+parseInt(_0x24dc4a(0x187))/0xa*(parseInt(_0x24dc4a(0x18c))/0xb);if(_0x2eaffd===_0x228dc2)break;else _0x47fa66['push'](_0x47fa66['shift']());}catch(_0x185218){_0x47fa66['push'](_0x47fa66['shift']());}}}(a72_0xcea8,0xab5a0));import a72_0x3f95bc from'node:path';import{execa}from'execa';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../../../utils/logger.js';function a72_0xcea8(){const _0x460f7b=['now','508806vnBIfO','cwd','npx','代码格式化完成','3746044dPxxAc','message','--write','4156989njROeT','开始格式化代码','655966MVFfte','format','success','2912570KAKImO','5213495wFREeb','228WagsIU','2kdtpBS','96341CkRCtb','187OgjVCg','144byyulQ','代码格式化失败'];a72_0xcea8=function(){return _0x460f7b;};return a72_0xcea8();}function a72_0x694f(_0x1f451f,_0x4bdc36){_0x1f451f=_0x1f451f-0x17d;const _0xcea848=a72_0xcea8();let _0x694fc7=_0xcea848[_0x1f451f];return _0x694fc7;}import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x1d4411){const _0x43e27b=a72_0x694f,_0x48932c=Date[_0x43e27b(0x18f)](),_0x2470de=a72_0x3f95bc['resolve'](process[_0x43e27b(0x191)](),_0x1d4411);try{logger['info'](_0x43e27b(0x185),_0x43e27b(0x183),{'projectCode':_0x1d4411}),await execa(resolveNpmBin(_0x43e27b(0x17d)),['prettier',_0x43e27b(0x181),'.'],{'cwd':_0x2470de});const _0x23622e=Date[_0x43e27b(0x18f)]()-_0x48932c;logger[_0x43e27b(0x186)]('format',_0x43e27b(0x17e),_0x23622e,{'projectCode':_0x1d4411});}catch(_0xf17715){const _0x1209c5=Date[_0x43e27b(0x18f)]()-_0x48932c;logger['error']('format',_0x43e27b(0x18e),{'projectCode':_0x1d4411,'error':_0xf17715 instanceof Error?_0xf17715[_0x43e27b(0x180)]:String(_0xf17715),'duration':_0x1209c5});throw _0xf17715;}return formatElapsed(_0x48932c);}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a73_0x4f90(_0x2427af,_0x33edd1){_0x2427af=_0x2427af-0x101;const _0x501cef=a73_0x501c();let _0x4f904c=_0x501cef[_0x2427af];return _0x4f904c;}(function(_0x37ed66,_0x441819){const _0x42dfac=a73_0x4f90,_0x2fa8b4=_0x37ed66();while(!![]){try{const _0x18b6a5=-parseInt(_0x42dfac(0x103))/0x1*(parseInt(_0x42dfac(0x10b))/0x2)+parseInt(_0x42dfac(0x10a))/0x3*(parseInt(_0x42dfac(0x10c))/0x4)+parseInt(_0x42dfac(0x101))/0x5*(-parseInt(_0x42dfac(0x107))/0x6)+parseInt(_0x42dfac(0x10d))/0x7*(parseInt(_0x42dfac(0x109))/0x8)+parseInt(_0x42dfac(0x110))/0x9*(parseInt(_0x42dfac(0x117))/0xa)+-parseInt(_0x42dfac(0x113))/0xb*(-parseInt(_0x42dfac(0x10f))/0xc)+-parseInt(_0x42dfac(0x114))/0xd*(-parseInt(_0x42dfac(0x105))/0xe);if(_0x18b6a5===_0x441819)break;else _0x2fa8b4['push'](_0x2fa8b4['shift']());}catch(_0x168266){_0x2fa8b4['push'](_0x2fa8b4['shift']());}}}(a73_0x501c,0x43912));function a73_0x501c(){const _0x4291bd=['cwd','https://registry.npmmirror.com','11UzvBjM','832noAoIp','error','success','5500DMQAJn','5010lgVofB','install','208263udkyGV','依赖安装失败','30450GoWzqg','开始安装依赖','1422xejJXS','info','69488imOJVm','31158BJLdQh','4QyIiPD','56qdtIbz','385FgbEhd','now','621840fuKSpr','1908IISnxW'];a73_0x501c=function(){return _0x4291bd;};return a73_0x501c();}import a73_0x3390c9 from'node:path';import{execa}from'execa';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x574f09){const _0x3e4eaa=a73_0x4f90,_0x54b970=Date['now'](),_0x10e457=a73_0x3390c9['resolve'](process[_0x3e4eaa(0x111)](),_0x574f09);try{logger[_0x3e4eaa(0x108)]('install',_0x3e4eaa(0x106),{'projectCode':_0x574f09,'registry':_0x3e4eaa(0x112)}),await execa(resolveNpmBin('npm'),['install','--registry',_0x3e4eaa(0x112)],{'cwd':_0x10e457});const _0x5d68b4=Date[_0x3e4eaa(0x10e)]()-_0x54b970;logger[_0x3e4eaa(0x116)](_0x3e4eaa(0x102),'依赖安装完成',_0x5d68b4,{'projectCode':_0x574f09});}catch(_0x56639e){const _0x2085b5=Date[_0x3e4eaa(0x10e)]()-_0x54b970;logger[_0x3e4eaa(0x115)]('install',_0x3e4eaa(0x104),{'projectCode':_0x574f09,'error':_0x56639e instanceof Error?_0x56639e['message']:String(_0x56639e),'duration':_0x2085b5});throw _0x56639e;}return formatElapsed(_0x54b970);}
|