@lovrabet/rabetbase-cli 2.1.1-beta.0 → 2.1.1
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/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.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 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/init.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.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/pull.js +1 -1
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/shared.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/constant/paths.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/build-all-flags.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/schema-export.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/apply-jq-filter.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/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a70_0x4f63eb=a70_0x5aca;(function(_0xdb6e04,_0x599bcf){const _0xf0859c=a70_0x5aca,_0x49ba3b=_0xdb6e04();while(!![]){try{const _0x30a054=-parseInt(_0xf0859c(0x7c))/0x1*(parseInt(_0xf0859c(0x7b))/0x2)+-parseInt(_0xf0859c(0x6e))/0x3*(parseInt(_0xf0859c(0x70))/0x4)+parseInt(_0xf0859c(0x72))/0x5*(-parseInt(_0xf0859c(0x7f))/0x6)+parseInt(_0xf0859c(0x71))/0x7+parseInt(_0xf0859c(0x77))/0x8*(-parseInt(_0xf0859c(0x75))/0x9)+parseInt(_0xf0859c(0x6f))/0xa+parseInt(_0xf0859c(0x85))/0xb;if(_0x30a054===_0x599bcf)break;else _0x49ba3b['push'](_0x49ba3b['shift']());}catch(_0x25ae94){_0x49ba3b['push'](_0x49ba3b['shift']());}}}(a70_0x3418,0xebbd7));import{readdirSync,statSync,readFileSync}from'fs';function a70_0x5aca(_0x2d6f06,_0x2fc2bc){_0x2d6f06=_0x2d6f06-0x6a;const _0x34181b=a70_0x3418();let _0x5aca8d=_0x34181b[_0x2d6f06];return _0x5aca8d;}import{join,relative,resolve,sep}from'path';const pagesDir=resolve(process[a70_0x4f63eb(0x81)](),a70_0x4f63eb(0x7d));function a70_0x3418(){const _0x5a8f7a=['9021880brFAcK','609572OwXkcw','4205054CmTFdS','586205NqqMmg','path','forEach','144iwFRfo','join','867304XSmjCA','replaceAll','concat','split','687298gqzoBG','4DTpaiU','src/pages','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','66YwPNPx','trim','cwd','.tsx','filter','endsWith','44153219FOnLpx','match','utf-8','index.tsx','replace','3lsTXvx'];a70_0x3418=function(){return _0x5a8f7a;};return a70_0x3418();}export function extractTitleFromComment(_0x50e3de){const _0x164985=a70_0x4f63eb;try{const _0x2ab7f7=readFileSync(_0x50e3de,_0x164985(0x6b)),_0x489e1f=_0x2ab7f7[_0x164985(0x6a)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x489e1f&&_0x489e1f[0x1]){const _0x267dca=_0x489e1f[0x1],_0x74a036=_0x267dca[_0x164985(0x6a)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x74a036&&_0x74a036[0x1])return _0x74a036[0x1][_0x164985(0x80)]();}let _0x3612ba=null;const _0x17f53c=_0x2ab7f7[_0x164985(0x6a)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x17f53c&&_0x17f53c[0x1]&&(_0x3612ba=_0x17f53c[0x1]);if(!_0x3612ba){const _0x1f6ea5=_0x2ab7f7[_0x164985(0x6a)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x1f6ea5&&_0x1f6ea5[0x1]&&(_0x3612ba=_0x1f6ea5[0x1]);}if(_0x3612ba){const _0x384a19=new RegExp('\x5cb'+_0x3612ba+_0x164985(0x7e)),_0x11979f=_0x2ab7f7[_0x164985(0x6a)](_0x384a19);if(_0x11979f&&_0x11979f[0x1])return _0x11979f[0x1];return _0x3612ba;}return null;}catch(_0x54e33f){return null;}}export function getLocalPages(_0x49f2da=pagesDir,_0x9b3ac3=pagesDir){const _0x15a2c1=a70_0x4f63eb;let _0x7dd58c=[];const _0x32efbe=readdirSync(_0x49f2da);return _0x32efbe[_0x15a2c1(0x74)](_0x402387=>{const _0x11964b=_0x15a2c1,_0x4ac86d=join(_0x49f2da,_0x402387),_0x20df3b=statSync(_0x4ac86d);if(_0x20df3b&&_0x20df3b['isDirectory']())_0x7dd58c=_0x7dd58c[_0x11964b(0x79)](getLocalPages(_0x4ac86d,_0x9b3ac3));else{if(_0x402387[_0x11964b(0x84)](_0x11964b(0x82))){let _0x45bc56=relative(_0x9b3ac3,_0x4ac86d);_0x45bc56[_0x11964b(0x84)](_0x11964b(0x6c))?_0x45bc56=_0x45bc56['replace'](/index\.tsx$/,''):_0x45bc56=_0x45bc56[_0x11964b(0x6d)](/\.tsx$/,'');_0x45bc56['endsWith'](sep)&&(_0x45bc56=_0x45bc56['slice'](0x0,-0x1));const _0x3db1b9=_0x45bc56[_0x11964b(0x7a)](sep)[_0x11964b(0x76)]('/'),_0x2c1ee0=extractTitleFromComment(_0x4ac86d),_0x2c033b=_0x2c1ee0||_0x3db1b9;_0x7dd58c['push']({'path':_0x3db1b9[_0x11964b(0x78)]('$',':'),'label':_0x2c033b});}}}),_0x7dd58c[_0x15a2c1(0x83)](_0x2264b9=>_0x2264b9[_0x15a2c1(0x73)]!=='');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x264921,_0x408151){const _0x26ff01=a71_0x3c81,_0x6e8db9=_0x264921();while(!![]){try{const _0x21e7d6=-parseInt(_0x26ff01(0x1d6))/0x1+-parseInt(_0x26ff01(0x1db))/0x2*(-parseInt(_0x26ff01(0x1c7))/0x3)+parseInt(_0x26ff01(0x1cb))/0x4*(-parseInt(_0x26ff01(0x1cc))/0x5)+parseInt(_0x26ff01(0x1c6))/0x6+-parseInt(_0x26ff01(0x1dd))/0x7*(parseInt(_0x26ff01(0x1d2))/0x8)+parseInt(_0x26ff01(0x1c4))/0x9+parseInt(_0x26ff01(0x1c5))/0xa;if(_0x21e7d6===_0x408151)break;else _0x6e8db9['push'](_0x6e8db9['shift']());}catch(_0x32f1cb){_0x6e8db9['push'](_0x6e8db9['shift']());}}}(a71_0x41ac,0x9886d));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus,updateMenuCdnUrl}from'../../../commands/menu/shared/service.js';function a71_0x41ac(){const _0x1ea60b=['56TPpdSC','trim','has','errors','487901CNYUZJ','join','path','length','allSettled','2389820OLCPKf','resources','1093701FCURRS','JS\x20URL\x20is\x20unreachable','4217967GKeFuF','5365980xyqjMl','5832924eDxmZC','3SgOTCB','No\x20local\x20pages\x20matched\x20labels:\x20','rejected','CSS\x20URL\x20is\x20unreachable','8mkSBue','2414935yEiwjE','label','status','map','push','filter'];a71_0x41ac=function(){return _0x1ea60b;};return a71_0x41ac();}function a71_0x3c81(_0xa008f3,_0x58eb26){_0xa008f3=_0xa008f3-0x1c4;const _0x41ac84=a71_0x41ac();let _0x3c81d1=_0x41ac84[_0xa008f3];return _0x3c81d1;}import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';export function validateJsUrl(_0x27a1f2){const _0x32829f=a71_0x3c81,_0xa71ae3=[];return!isValidJsHttpsUrl(_0x27a1f2)&&_0xa71ae3[_0x32829f(0x1d0)]('JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'),{'ok':_0xa71ae3[_0x32829f(0x1d9)]===0x0,'errors':_0xa71ae3};}export function validateCssUrl(_0xe6102a){const _0x5d124f=a71_0x3c81,_0x211d9a=[];return!isValidCssHttpsUrl(_0xe6102a)&&_0x211d9a[_0x5d124f(0x1d0)]('CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'),{'ok':_0x211d9a['length']===0x0,'errors':_0x211d9a};}export async function validateJsUrlReachable(_0x5e473f){const _0x1f96a2=a71_0x3c81,_0x417952=validateJsUrl(_0x5e473f);if(!_0x417952['ok'])return _0x417952;const _0x4e1a06=await isUrlReachable(_0x5e473f);if(!_0x4e1a06)_0x417952['errors'][_0x1f96a2(0x1d0)](_0x1f96a2(0x1de));return{'ok':_0x417952['errors']['length']===0x0,'errors':_0x417952['errors']};}export async function validateCssUrlReachable(_0x1e1a17){const _0x5cfc84=a71_0x3c81,_0x4c4925=validateCssUrl(_0x1e1a17);if(!_0x4c4925['ok'])return _0x4c4925;const _0xda633a=await isUrlReachable(_0x1e1a17);if(!_0xda633a)_0x4c4925[_0x5cfc84(0x1d5)][_0x5cfc84(0x1d0)](_0x5cfc84(0x1ca));return{'ok':_0x4c4925['errors'][_0x5cfc84(0x1d9)]===0x0,'errors':_0x4c4925['errors']};}export function buildCompareRows(_0x268be2,_0x4a560b){const _0x29234e=a71_0x3c81;return _0x268be2[_0x29234e(0x1cf)](_0x8e39d8=>({'label':_0x8e39d8[_0x29234e(0x1cd)],'path':_0x8e39d8[_0x29234e(0x1d8)],'local':!![],'online':_0x4a560b[_0x29234e(0x1d4)](_0x8e39d8[_0x29234e(0x1d8)])}));}export function filterNewPages(_0x21ad4b,_0x4f349a,_0x19ec03){const _0x18fedb=a71_0x3c81;if(_0x19ec03&&_0x19ec03[_0x18fedb(0x1d9)]>0x0){const _0x5bfb5e=new Set(_0x19ec03[_0x18fedb(0x1cf)](_0x26cde8=>_0x26cde8[_0x18fedb(0x1d3)]())),_0x2c9425=_0x21ad4b[_0x18fedb(0x1d1)](_0x36c7a6=>_0x5bfb5e[_0x18fedb(0x1d4)](_0x36c7a6['label']));if(_0x2c9425['length']===0x0)throw new Error(_0x18fedb(0x1c8)+[..._0x5bfb5e][_0x18fedb(0x1d7)](',\x20'));return _0x2c9425;}return _0x21ad4b[_0x18fedb(0x1d1)](_0x4aad20=>!_0x4f349a['has'](_0x4aad20[_0x18fedb(0x1d8)]));}export function filterPagesByLabels(_0x197d22,_0x29d561){const _0x3afbc4=a71_0x3c81,_0x5ba972=[],_0x225923=[];for(const _0x145998 of _0x29d561){const _0x4de4fb=_0x145998['trim'](),_0x540353=_0x197d22['find'](_0x595a26=>_0x595a26['label']===_0x4de4fb);if(_0x540353)_0x5ba972[_0x3afbc4(0x1d0)](_0x540353);else _0x225923['push'](_0x145998);}return{'matched':_0x5ba972,'unmatched':_0x225923};}export async function doCreateMenus(_0x51b06c,_0x3133d6,_0x520c81,_0x5da384){const _0x1b24e0=a71_0x3c81;return await createMenus(_0x51b06c,_0x3133d6,_0x520c81,_0x5da384),{'created':_0x520c81[_0x1b24e0(0x1d9)],'failed':0x0,'labels':_0x520c81[_0x1b24e0(0x1cf)](_0x1feaac=>_0x1feaac['label'])};}export function filterMenusWithResources(_0x4653a5){const _0x5c171f=a71_0x3c81;return _0x4653a5['filter'](_0x22d812=>_0x22d812[_0x5c171f(0x1dc)][_0x5c171f(0x1d9)]>0x0);}export async function doUpdateCdnUrls(_0x5f3407,_0x303d3d,_0x5257bc,_0x19bcd3){const _0x409fba=a71_0x3c81,_0x5d8ab1=_0x5257bc['filter'](_0x4c01e3=>_0x4c01e3[_0x409fba(0x1dc)]['length']>0x0),_0x5d41c5=await Promise[_0x409fba(0x1da)](_0x5d8ab1[_0x409fba(0x1cf)](_0x508cb7=>updateMenuCdnUrl(_0x5f3407,_0x303d3d,{'id':_0x508cb7['id'],'label':_0x508cb7[_0x409fba(0x1cd)],'path':_0x508cb7['path'],'resources':_0x19bcd3}))),_0x2ef916=_0x5d41c5[_0x409fba(0x1d1)](_0x3d6d61=>_0x3d6d61[_0x409fba(0x1ce)]===_0x409fba(0x1c9))[_0x409fba(0x1d9)];return{'updated':_0x5d8ab1[_0x409fba(0x1d9)]-_0x2ef916,'failed':_0x2ef916};}export async function fetchMenuData(_0x27d6f7,_0x44b8aa){const _0x88f1f2=a71_0x3c81,_0x12ab42=getLocalPages(),_0x225753=await getOnlineMenuList(_0x27d6f7,_0x44b8aa),_0x26186b=new Set(_0x225753[_0x88f1f2(0x1cf)](_0x34af4f=>_0x34af4f[_0x88f1f2(0x1d8)]));return{'localPages':_0x12ab42,'onlineMenuList':_0x225753,'onlinePaths':_0x26186b};}export async function fetchOnlineMenuList(_0x2385b5,_0x2e1258){return getOnlineMenuList(_0x2385b5,_0x2e1258);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5d28b6,_0x144c12){const _0x330334=a72_0x312d,_0x58d2df=_0x5d28b6();while(!![]){try{const _0x424c02=parseInt(_0x330334(0x6e))/0x1*(-parseInt(_0x330334(0x76))/0x2)+-parseInt(_0x330334(0x8c))/0x3*(parseInt(_0x330334(0x75))/0x4)+-parseInt(_0x330334(0x83))/0x5+-parseInt(_0x330334(0x85))/0x6*(parseInt(_0x330334(0x78))/0x7)+-parseInt(_0x330334(0x71))/0x8+parseInt(_0x330334(0x7b))/0x9*(parseInt(_0x330334(0x87))/0xa)+parseInt(_0x330334(0x81))/0xb;if(_0x424c02===_0x144c12)break;else _0x58d2df['push'](_0x58d2df['shift']());}catch(_0x2acd4b){_0x58d2df['push'](_0x58d2df['shift']());}}}(a72_0x5256,0x21de8));import{getApiDomain}from'../../../constant/domain.js';function a72_0x312d(_0x21b94f,_0x284f12){_0x21b94f=_0x21b94f-0x6a;const _0x525661=a72_0x5256();let _0x312d61=_0x525661[_0x21b94f];return _0x312d61;}import{getEnv,isProduction}from'../../../constant/env.js';import{logger}from'../../../utils/logger.js';import{platformFetch}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x229cc4,_0x36183c){const _0x5b26f7=a72_0x312d,_0x53d2a0=getEnv();logger[_0x5b26f7(0x80)]('get-online-menu-list',isProduction(_0x53d2a0)?'Fetching\x20online\x20menu\x20list...\x20(appCode:\x20'+_0x229cc4+')':_0x5b26f7(0x73)+_0x229cc4+')');const _0x420d7d=await platformFetch(getApiDomain()+'/smartapi/menu/find?appCode='+_0x229cc4,{'cookie':_0x36183c,'label':_0x5b26f7(0x6d)});if(!_0x420d7d)return logger[_0x5b26f7(0x80)](_0x5b26f7(0x92),_0x5b26f7(0x70)),[];return logger[_0x5b26f7(0x80)](_0x5b26f7(0x92),_0x5b26f7(0x89)+_0x420d7d[_0x5b26f7(0x8e)]+'\x20online\x20menus\x20successfully'),_0x420d7d['map'](flattenMenuItem)[_0x5b26f7(0x86)]();}function flattenMenuItem(_0x11cbc3){const _0x5afdc7=a72_0x312d;let _0x22175e=[];try{if(_0x11cbc3[_0x5afdc7(0x7e)]?.[_0x5afdc7(0x6f)]){const _0x4839a5=JSON[_0x5afdc7(0x77)](_0x11cbc3['extend'][_0x5afdc7(0x6f)]);if(Array[_0x5afdc7(0x6a)](_0x4839a5))_0x22175e=_0x4839a5;}}catch{}const _0x19f855=[{'id':_0x11cbc3['id'],'path':_0x11cbc3[_0x5afdc7(0x6b)],'label':_0x11cbc3[_0x5afdc7(0x93)],'resources':_0x22175e}];if(_0x11cbc3['children']&&_0x11cbc3['children'][_0x5afdc7(0x8e)]>0x0)for(const _0x45776e of _0x11cbc3['children']){_0x19f855[_0x5afdc7(0x84)](...flattenMenuItem(_0x45776e));}return _0x19f855;}export async function createMenu(_0x4f53b4,_0x3da25,_0x39db75){const _0x4222ae=a72_0x312d;logger[_0x4222ae(0x80)]('create-menu',_0x4222ae(0x7c)+_0x39db75['label']+'\x20('+_0x39db75[_0x4222ae(0x6b)]+')');const _0x292651={'appCode':_0x4f53b4,'type':_0x4222ae(0x8d),'sort':0x0,'extend':{'loadScriptMode':'import','resources':_0x39db75['resources']?JSON[_0x4222ae(0x8b)](_0x39db75[_0x4222ae(0x6f)]):undefined},..._0x39db75};await platformFetch(getApiDomain()+_0x4222ae(0x91),{'method':_0x4222ae(0x74),'body':_0x292651,'cookie':_0x3da25,'label':'Create\x20menu\x20\x22'+_0x39db75[_0x4222ae(0x93)]+'\x22'}),logger[_0x4222ae(0x80)](_0x4222ae(0x8f),'Menu\x20created\x20successfully:\x20'+_0x39db75[_0x4222ae(0x93)]);}async function createSingleMenu(_0x58b53a,_0x37aa95,_0x4574f7,_0x289e60){const _0x3cee2b=a72_0x312d,_0x6a8f4={'appCode':_0x58b53a,'type':_0x3cee2b(0x8d),'sort':0x0,'extend':{'loadScriptMode':_0x3cee2b(0x82),'resources':_0x289e60?JSON['stringify'](_0x289e60):undefined},'label':_0x4574f7[_0x3cee2b(0x93)],'path':_0x4574f7[_0x3cee2b(0x6b)]};await platformFetch(getApiDomain()+_0x3cee2b(0x91),{'method':_0x3cee2b(0x74),'body':_0x6a8f4,'cookie':_0x37aa95,'label':_0x3cee2b(0x7d)+_0x4574f7[_0x3cee2b(0x93)]+'\x22'}),logger['info'](_0x3cee2b(0x8f),_0x3cee2b(0x72)+_0x4574f7['label']);}function a72_0x5256(){const _0x413dc6=['update-menu-cdn-url','Update\x20menu\x20assets\x20\x22','92277LUYUJc','Creating\x20menu:\x20','Create\x20menu\x20\x22','extend','Updating\x20menu\x20asset\x20links:\x20','info','7001423PVCwtB','import','271045hVPxUr','push','28074DAZpys','flat','90jYCIMo','/smartapi/menu/update','Fetched\x20','Start\x20batch\x20menu\x20creation,\x20total\x20','stringify','83469SUHKWU','procode','length','create-menu','create-menus','/smartapi/menu/create','get-online-menu-list','label','isArray','path','all','Fetch\x20menu\x20list','2dtDXFd','resources','Server\x20returned\x20empty\x20menu\x20list','2155744kXvwfl','Menu\x20created\x20successfully:\x20','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','POST','12tfdAVo','5094cqlTMn','parse','266gAWeLD'];a72_0x5256=function(){return _0x413dc6;};return a72_0x5256();}export async function createMenus(_0x2421ff,_0x3e95e1,_0x50aaed,_0x3476c4){const _0x4bb9ec=a72_0x312d;logger[_0x4bb9ec(0x80)]('create-menus',_0x4bb9ec(0x8a)+_0x50aaed[_0x4bb9ec(0x8e)]),await Promise[_0x4bb9ec(0x6c)](_0x50aaed['map'](_0xcf2b1b=>createSingleMenu(_0x2421ff,_0x3e95e1,_0xcf2b1b,_0x3476c4))),logger['info'](_0x4bb9ec(0x90),'Batch\x20menu\x20creation\x20completed,\x20total\x20'+_0x50aaed[_0x4bb9ec(0x8e)]);}export async function updateMenuCdnUrl(_0x3ec171,_0x26f9e6,_0x5a4536){const _0x4b8c79=a72_0x312d;logger[_0x4b8c79(0x80)](_0x4b8c79(0x79),_0x4b8c79(0x7f)+_0x5a4536['label']+'\x20('+_0x5a4536[_0x4b8c79(0x6b)]+')');const _0x1c2013={'id':_0x5a4536['id'],'appCode':_0x3ec171,'extend':{'loadScriptMode':_0x4b8c79(0x82),'resources':_0x5a4536[_0x4b8c79(0x6f)]?JSON[_0x4b8c79(0x8b)](_0x5a4536[_0x4b8c79(0x6f)]):undefined}};await platformFetch(getApiDomain()+_0x4b8c79(0x88),{'method':_0x4b8c79(0x74),'body':_0x1c2013,'cookie':_0x26f9e6,'label':_0x4b8c79(0x7a)+_0x5a4536[_0x4b8c79(0x93)]+'\x22'}),logger[_0x4b8c79(0x80)](_0x4b8c79(0x79),'Menu\x20assets\x20synced:\x20'+_0x5a4536[_0x4b8c79(0x93)],undefined);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x16f1e2,_0x2874f4){const _0x1d75fe=a73_0xa2a7,_0x5eebc0=_0x16f1e2();while(!![]){try{const _0x2dff4e=-parseInt(_0x1d75fe(0x1f3))/0x1+parseInt(_0x1d75fe(0x1f8))/0x2*(parseInt(_0x1d75fe(0x1d5))/0x3)+parseInt(_0x1d75fe(0x1d2))/0x4*(parseInt(_0x1d75fe(0x1d9))/0x5)+parseInt(_0x1d75fe(0x1d0))/0x6*(parseInt(_0x1d75fe(0x1f5))/0x7)+parseInt(_0x1d75fe(0x1ea))/0x8+parseInt(_0x1d75fe(0x1f2))/0x9*(-parseInt(_0x1d75fe(0x1f0))/0xa)+-parseInt(_0x1d75fe(0x1d8))/0xb*(-parseInt(_0x1d75fe(0x1ed))/0xc);if(_0x2dff4e===_0x2874f4)break;else _0x5eebc0['push'](_0x5eebc0['shift']());}catch(_0x4f7341){_0x5eebc0['push'](_0x5eebc0['shift']());}}}(a73_0x43e8,0x3d7ed));function a73_0xa2a7(_0x2cdeb0,_0x38b063){_0x2cdeb0=_0x2cdeb0-0x1ca;const _0x43e835=a73_0x43e8();let _0xa2a7d1=_0x43e835[_0x2cdeb0];return _0xa2a7d1;}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(_0x49caae){const _0x46912b=a73_0xa2a7,_0x3b906d=[];return _0x49caae[_0x46912b(0x1cd)]&&!isValidJsHttpsUrl(_0x49caae[_0x46912b(0x1cd)])&&_0x3b906d[_0x46912b(0x1d1)]({'field':'jsUrl','message':_0x46912b(0x1f7)}),_0x49caae[_0x46912b(0x1cf)]&&!isValidCssHttpsUrl(_0x49caae[_0x46912b(0x1cf)])&&_0x3b906d[_0x46912b(0x1d1)]({'field':'cssUrl','message':_0x46912b(0x1d6)}),_0x3b906d;}export async function runMenuSyncCore(_0x188e39,_0x513aaf,_0x2cfe0f=[],_0x598ada){const _0x463d02=a73_0xa2a7,_0x6e2836=parseParamsFlag(_0x598ada),_0x5b06f5=_0x2cfe0f[_0x463d02(0x1eb)]>0x0?_0x2cfe0f:_0x6e2836[_0x463d02(0x1df)],_0x5fb6d0=_0x6e2836[_0x463d02(0x1cd)],_0x57b2d2=_0x6e2836[_0x463d02(0x1cf)],_0xeaa1bd=[];if(_0x5fb6d0)_0xeaa1bd[_0x463d02(0x1d1)](_0x5fb6d0);if(_0x57b2d2)_0xeaa1bd['push'](_0x57b2d2);const _0x1fd6e9=validateParams(_0x6e2836);if(_0x1fd6e9['length']>0x0){const _0x458ccc=_0x1fd6e9['map'](_0xc5bb13=>'--params.'+_0xc5bb13[_0x463d02(0x1ee)]+':\x20'+_0xc5bb13['message'])[_0x463d02(0x1ce)](';\x20');throw new Error('Invalid\x20--params:\x20'+_0x458ccc);}logger[_0x463d02(0x1e8)](process[_0x463d02(0x1da)]()),logger[_0x463d02(0x1f1)](_0x463d02(0x1e2),_0x463d02(0x1db),{'appCode':_0x188e39,'selectedCount':_0x5b06f5?.[_0x463d02(0x1eb)],'jsUrl':_0x5fb6d0,'cssUrl':_0x57b2d2});if(_0x5fb6d0){const _0x5a42b0=await isUrlReachable(_0x5fb6d0);if(!_0x5a42b0)throw new Error(_0x463d02(0x1e5)+_0x5fb6d0);}if(_0x57b2d2){const _0x9cbccc=await isUrlReachable(_0x57b2d2);if(!_0x9cbccc)throw new Error(_0x463d02(0x1ca)+_0x57b2d2);}const _0x146dee=getLocalPages();if(_0x146dee['length']===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x1ae2cc=await getOnlineMenuList(_0x188e39,_0x513aaf),_0x399b94=new Set(_0x1ae2cc[_0x463d02(0x1cc)](_0x51bcb7=>_0x51bcb7[_0x463d02(0x1f6)]));let _0xaa655c;if(_0x5b06f5&&_0x5b06f5['length']>0x0){const _0x32ca82=new Set(_0x5b06f5['map'](_0x4ef52b=>_0x4ef52b[_0x463d02(0x1e7)]()));_0xaa655c=_0x146dee[_0x463d02(0x1e4)](_0x43dcb9=>_0x32ca82[_0x463d02(0x1d4)](_0x43dcb9[_0x463d02(0x1d3)]));if(_0xaa655c[_0x463d02(0x1eb)]===0x0){const _0x31331e=_0x146dee[_0x463d02(0x1cc)](_0x4c3be9=>_0x4c3be9[_0x463d02(0x1d3)])[_0x463d02(0x1ce)](',\x20');throw new Error('No\x20local\x20pages\x20matched\x20labels:\x20'+[..._0x32ca82][_0x463d02(0x1ce)](',\x20')+_0x463d02(0x1ec)+_0x31331e);}}else _0xaa655c=_0x146dee['filter'](_0x4552ee=>!_0x399b94[_0x463d02(0x1d4)](_0x4552ee[_0x463d02(0x1f6)]));if(_0xaa655c[_0x463d02(0x1eb)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};return await createMenus(_0x188e39,_0x513aaf,_0xaa655c,_0xeaa1bd[_0x463d02(0x1eb)]>0x0?_0xeaa1bd:undefined),logger[_0x463d02(0x1f1)](_0x463d02(0x1e2),_0x463d02(0x1cb),{'count':_0xaa655c['length'],'resources':_0xeaa1bd}),{'created':_0xaa655c['length'],'skipped':![],'targetPages':_0xaa655c};}export async function readPageLabelsFromStdin(){const _0xe166ff=a73_0xa2a7;if(!process[_0xe166ff(0x1e1)]['isTTY']&&!process[_0xe166ff(0x1e1)][_0xe166ff(0x1e0)])return new Promise(_0x4fb7f3=>{const _0x1a1e5e=_0xe166ff,_0x1c6f3e=[];process['stdin']['on'](_0x1a1e5e(0x1e6),_0x10cb7b=>_0x1c6f3e[_0x1a1e5e(0x1d1)](_0x10cb7b)),process[_0x1a1e5e(0x1e1)]['on'](_0x1a1e5e(0x1e3),()=>{const _0xafc516=_0x1a1e5e,_0x5a12b8=Buffer[_0xafc516(0x1e9)](_0x1c6f3e)['toString']('utf8'),_0x3d1a31=_0x5a12b8[_0xafc516(0x1f4)]('\x0a')['map'](_0x21ac40=>_0x21ac40['trim']())['filter'](_0x37e5cb=>_0x37e5cb[_0xafc516(0x1eb)]>0x0&&!_0x37e5cb[_0xafc516(0x1ef)]('#'));_0x4fb7f3(_0x3d1a31);}),setTimeout(()=>_0x4fb7f3([]),0x1f4);});return[];}function parseParamsFlag(_0x4c4cb9){const _0x49cc53=a73_0xa2a7;if(!_0x4c4cb9||typeof _0x4c4cb9!=='string')return{};try{const _0x24197d=JSON[_0x49cc53(0x1dd)](_0x4c4cb9);if(typeof _0x24197d!=='object'||_0x24197d===null||Array[_0x49cc53(0x1dc)](_0x24197d))return{};return{'selectedLabels':Array[_0x49cc53(0x1dc)](_0x24197d[_0x49cc53(0x1d7)])?_0x24197d['pages'][_0x49cc53(0x1cc)](String):undefined,'jsUrl':typeof _0x24197d[_0x49cc53(0x1cd)]===_0x49cc53(0x1de)?_0x24197d[_0x49cc53(0x1cd)][_0x49cc53(0x1e7)]():undefined,'cssUrl':typeof _0x24197d[_0x49cc53(0x1cf)]==='string'?_0x24197d['cssUrl']['trim']():undefined};}catch{return{};}}function a73_0x43e8(){const _0x54d1ad=['4830XindiU','info','8847aItJhd','152580lfyYQu','split','7MResXf','path','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','29878tcXlNy','CSS\x20URL\x20is\x20unreachable:\x20','Menu\x20sync\x20completed','map','jsUrl','join','cssUrl','888702STfOnY','push','28vIkpbG','label','has','48bkSmny','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','pages','539OfkRIU','36290JDHBtp','cwd','Start\x20non-interactive\x20menu\x20sync','isArray','parse','string','selectedLabels','readableEnded','stdin','menu-sync','end','filter','JS\x20URL\x20is\x20unreachable:\x20','data','trim','setLogPath','concat','20880hxPxgI','length','\x0a\x20\x20Available\x20local\x20pages:\x20','107436ZzgkVy','field','startsWith'];a73_0x43e8=function(){return _0x54d1ad;};return a73_0x43e8();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1def38,_0x3eccd8){const _0x35df8c=a75_0x20e4,_0x41029d=_0x1def38();while(!![]){try{const _0x10c737=parseInt(_0x35df8c(0xca))/0x1*(parseInt(_0x35df8c(0xc6))/0x2)+-parseInt(_0x35df8c(0xd2))/0x3*(parseInt(_0x35df8c(0xb5))/0x4)+parseInt(_0x35df8c(0xb0))/0x5+-parseInt(_0x35df8c(0xb2))/0x6+-parseInt(_0x35df8c(0xc7))/0x7*(-parseInt(_0x35df8c(0xb3))/0x8)+-parseInt(_0x35df8c(0xb4))/0x9+parseInt(_0x35df8c(0xc4))/0xa*(parseInt(_0x35df8c(0xc8))/0xb);if(_0x10c737===_0x3eccd8)break;else _0x41029d['push'](_0x41029d['shift']());}catch(_0x27cd52){_0x41029d['push'](_0x41029d['shift']());}}}(a75_0x46d5,0x90606));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 validateParams(_0x2e4678){const _0x4d3a57=a75_0x20e4,_0x3d8006=[];return _0x2e4678[_0x4d3a57(0xb9)]&&!isValidJsHttpsUrl(_0x2e4678['jsUrl'])&&_0x3d8006[_0x4d3a57(0xd0)]({'field':'jsUrl','message':_0x4d3a57(0xce)}),_0x2e4678[_0x4d3a57(0xc0)]&&!isValidCssHttpsUrl(_0x2e4678['cssUrl'])&&_0x3d8006[_0x4d3a57(0xd0)]({'field':_0x4d3a57(0xc0),'message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x3d8006;}export async function runMenuUpdateCore(_0x305673,_0x20b9f4,_0x3fed03){const _0x555daf=a75_0x20e4,_0x1de3ff=parseUpdateParamsFlag(_0x3fed03),_0x1c6fb3=[];if(_0x1de3ff[_0x555daf(0xb9)])_0x1c6fb3['push'](_0x1de3ff['jsUrl']);if(_0x1de3ff['cssUrl'])_0x1c6fb3['push'](_0x1de3ff[_0x555daf(0xc0)]);const _0x39cd00=validateParams(_0x1de3ff);if(_0x39cd00[_0x555daf(0xbe)]>0x0){const _0x34d1ee=_0x39cd00['map'](_0x208d56=>_0x555daf(0xcb)+_0x208d56[_0x555daf(0xba)]+':\x20'+_0x208d56[_0x555daf(0xd4)])[_0x555daf(0xc2)](';\x20');throw new Error('Invalid\x20--params:\x20'+_0x34d1ee);}logger[_0x555daf(0xcc)](process[_0x555daf(0xd1)]()),logger[_0x555daf(0xc3)](_0x555daf(0xc9),_0x555daf(0xcf),{'appCode':_0x305673,'jsUrl':_0x1de3ff[_0x555daf(0xb9)],'cssUrl':_0x1de3ff[_0x555daf(0xc0)]});if(_0x1de3ff[_0x555daf(0xb9)]){const _0x453ef6=await isUrlReachable(_0x1de3ff[_0x555daf(0xb9)]);if(!_0x453ef6)throw new Error(_0x555daf(0xd5)+_0x1de3ff[_0x555daf(0xb9)]);}if(_0x1de3ff[_0x555daf(0xc0)]){const _0x4f59b7=await isUrlReachable(_0x1de3ff['cssUrl']);if(!_0x4f59b7)throw new Error(_0x555daf(0xc1)+_0x1de3ff['cssUrl']);}const _0x3ea9a9=await getOnlineMenuList(_0x305673,_0x20b9f4),_0x4a86f9=_0x3ea9a9['filter'](_0x53b78c=>_0x53b78c[_0x555daf(0xd3)]['length']>0x0);if(_0x4a86f9['length']===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![]};const _0x1f2735=await Promise[_0x555daf(0xb8)](_0x4a86f9[_0x555daf(0xb7)](_0x441662=>updateMenuCdnUrl(_0x305673,_0x20b9f4,{'id':_0x441662['id'],'label':_0x441662[_0x555daf(0xb6)],'path':_0x441662['path'],'resources':_0x1c6fb3}))),_0x322735=_0x1f2735[_0x555daf(0xbf)](_0x228ea7=>_0x228ea7[_0x555daf(0xb1)]===_0x555daf(0xcd))[_0x555daf(0xbe)];return logger[_0x555daf(0xc3)](_0x555daf(0xc9),_0x555daf(0xc5),{'count':_0x4a86f9[_0x555daf(0xbe)],'resources':_0x1c6fb3}),{'updated':_0x4a86f9[_0x555daf(0xbe)]-_0x322735,'failed':_0x322735,'skipped':![]};}function a75_0x20e4(_0x3ff00f,_0x599aab){_0x3ff00f=_0x3ff00f-0xb0;const _0x46d5c1=a75_0x46d5();let _0x20e42b=_0x46d5c1[_0x3ff00f];return _0x20e42b;}function parseUpdateParamsFlag(_0x5a9048){const _0x51cb0c=a75_0x20e4;if(!_0x5a9048||typeof _0x5a9048!==_0x51cb0c(0xbc))return{};try{const _0x3288a5=JSON['parse'](_0x5a9048);if(typeof _0x3288a5!==_0x51cb0c(0xbd)||_0x3288a5===null||Array[_0x51cb0c(0xd6)](_0x3288a5))return{};return{'jsUrl':typeof _0x3288a5[_0x51cb0c(0xb9)]===_0x51cb0c(0xbc)?_0x3288a5[_0x51cb0c(0xb9)]['trim']():undefined,'cssUrl':typeof _0x3288a5['cssUrl']===_0x51cb0c(0xbc)?_0x3288a5['cssUrl'][_0x51cb0c(0xbb)]():undefined};}catch{return{};}}function a75_0x46d5(){const _0x263fa9=['JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','Start\x20non-interactive\x20menu\x20update','push','cwd','2415tnlDEb','resources','message','JS\x20URL\x20is\x20unreachable:\x20','isArray','3043380SgElXh','status','2593476hDGsvj','2784536IxogaV','8046459fspyJi','2452MCpjQz','label','map','allSettled','jsUrl','field','trim','string','object','length','filter','cssUrl','CSS\x20URL\x20is\x20unreachable:\x20','join','info','55690HjxbSu','Menu\x20update\x20completed','28Hxylkh','14RUnCVm','1760HLdBza','menu-update','15377KZDOdX','--params.','setLogPath','rejected'];a75_0x46d5=function(){return _0x263fa9;};return a75_0x46d5();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x52acef,_0x43105c){const _0x3f5e72=a76_0x35be,_0x2847b=_0x52acef();while(!![]){try{const _0xcffd2=parseInt(_0x3f5e72(0x18b))/0x1+parseInt(_0x3f5e72(0x190))/0x2+-parseInt(_0x3f5e72(0x189))/0x3*(parseInt(_0x3f5e72(0x192))/0x4)+parseInt(_0x3f5e72(0x18c))/0x5*(-parseInt(_0x3f5e72(0x191))/0x6)+-parseInt(_0x3f5e72(0x18a))/0x7+-parseInt(_0x3f5e72(0x188))/0x8*(-parseInt(_0x3f5e72(0x18f))/0x9)+-parseInt(_0x3f5e72(0x18d))/0xa;if(_0xcffd2===_0x43105c)break;else _0x2847b['push'](_0x2847b['shift']());}catch(_0x7da0be){_0x2847b['push'](_0x2847b['shift']());}}}(a76_0x321a,0x707ec));function a76_0x321a(){const _0x1712ff=['15NNMzzA','3474667qVjwjl','283581UbbjRh','565EzFHfx','2540200eAokuX','trim','184311JSAZhU','870490krGtKk','7656wqNVux','96944VwtLNy','test','296GQMala'];a76_0x321a=function(){return _0x1712ff;};return a76_0x321a();}export function isValidJsHttpsUrl(_0x334f46){return/^https:\/\/.+\.js(\?.*)?$/['test'](_0x334f46['trim']());}export function isValidCssHttpsUrl(_0x1da17c){const _0x35231a=a76_0x35be;return/^https:\/\/.+\.css(\?.*)?$/[_0x35231a(0x193)](_0x1da17c[_0x35231a(0x18e)]());}function a76_0x35be(_0x994922,_0x522a39){_0x994922=_0x994922-0x188;const _0x321a5b=a76_0x321a();let _0x35be19=_0x321a5b[_0x994922];return _0x35be19;}export async function isUrlReachable(_0x374057){try{const _0x194f3a=await fetch(_0x374057,{'method':'HEAD'});return _0x194f3a['ok'];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a77_0x20afc1=a77_0x29c0;(function(_0x4f3041,_0x4609fd){const _0xb343b=a77_0x29c0,_0x64da00=_0x4f3041();while(!![]){try{const _0x280cdf=parseInt(_0xb343b(0x138))/0x1*(-parseInt(_0xb343b(0x13f))/0x2)+-parseInt(_0xb343b(0x139))/0x3*(-parseInt(_0xb343b(0x135))/0x4)+parseInt(_0xb343b(0x106))/0x5+parseInt(_0xb343b(0x137))/0x6*(parseInt(_0xb343b(0x113))/0x7)+parseInt(_0xb343b(0x13c))/0x8*(-parseInt(_0xb343b(0x112))/0x9)+parseInt(_0xb343b(0x10f))/0xa*(-parseInt(_0xb343b(0x129))/0xb)+parseInt(_0xb343b(0x11a))/0xc*(parseInt(_0xb343b(0x136))/0xd);if(_0x280cdf===_0x4609fd)break;else _0x64da00['push'](_0x64da00['shift']());}catch(_0x1b20a3){_0x64da00['push'](_0x64da00['shift']());}}}(a77_0x434c,0xd79bc));import a77_0x5a913a 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';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';function a77_0x29c0(_0x1b6ecf,_0x189d95){_0x1b6ecf=_0x1b6ecf-0x104;const _0x434cb5=a77_0x434c();let _0x29c028=_0x434cb5[_0x1b6ecf];return _0x29c028;}import{runMenuSyncCore,readPageLabelsFromStdin}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';export const menuSync={'service':a77_0x20afc1(0x12c),'command':a77_0x20afc1(0x115),'description':a77_0x20afc1(0x12e),'risk':a77_0x20afc1(0x11d),'flags':[{'name':a77_0x20afc1(0x13a),'type':a77_0x20afc1(0x12a),'description':a77_0x20afc1(0x12f)+a77_0x20afc1(0x107)},{'name':a77_0x20afc1(0x10e),'type':a77_0x20afc1(0x11e),'description':a77_0x20afc1(0x13d)}],async 'execute'(_0x441ff9){const _0x463f80=a77_0x20afc1,_0x454a30=_0x441ff9[_0x463f80(0x121)](_0x463f80(0x10e)),_0xe66439=_0x441ff9[_0x463f80(0x133)]('params'),_0x315b05=parseParams(_0xe66439),_0x3bf154=!!(_0x315b05[_0x463f80(0x116)]||_0x315b05[_0x463f80(0x11b)]||_0x315b05[_0x463f80(0x111)]&&_0x315b05[_0x463f80(0x111)]['length']>0x0);if(_0x454a30||_0x3bf154){let _0x5a4efd=[];!isInteractive()&&!_0x315b05[_0x463f80(0x111)]?.[_0x463f80(0x128)]&&(_0x5a4efd=await readPageLabelsFromStdin());const _0x599126=await runMenuSyncCore(_0x441ff9['appCode'],_0x441ff9[_0x463f80(0x13b)],_0x5a4efd[_0x463f80(0x128)]>0x0?_0x5a4efd:_0x315b05[_0x463f80(0x111)]??[],_0xe66439);if(_0x599126['skipped']){const _0x1cc310=getLocalPages();_0x1cc310[_0x463f80(0x128)]===0x0?writeCliSideChannelLine(_0x463f80(0x140)):writeCliSideChannelLine(_0x463f80(0x119));}else writeCliSideChannelLine(_0x463f80(0x12b)+_0x599126[_0x463f80(0x118)]+'\x20menu(s)\x20created');return{'ok':!![]};}requireInteractive();const _0x8c602=startSpinner(_0x463f80(0x105));let _0x535281,_0x4eb5dc,_0x13f302;try{const _0xab0960=await fetchMenuData(_0x441ff9[_0x463f80(0x11c)],_0x441ff9[_0x463f80(0x13b)]);_0x535281=_0xab0960[_0x463f80(0x10b)],_0x4eb5dc=_0xab0960[_0x463f80(0x10d)],_0x13f302=_0xab0960[_0x463f80(0x120)],stopSpinner(_0x8c602,_0x463f80(0x10a),!![]);}catch(_0x3fcc1a){stopSpinner(_0x8c602,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors[_0x463f80(0x117)](_0x3fcc1a instanceof Error?_0x3fcc1a['message']:_0x463f80(0x10c));}if(_0x535281['length']===0x0)return writeCliSideChannelLine(a77_0x5a913a[_0x463f80(0x134)]('\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first')),{'ok':!![]};const _0x435cd6=buildCompareRows(_0x535281,_0x4eb5dc);writeCliSideChannelLine(renderCompareTable(_0x435cd6)),writeCliSideChannelLine('');const _0x1160b9=_0x315b05['pages'],_0x4f9cbf=await selectPages(_0x535281,_0x4eb5dc,_0x1160b9);writeCliSideChannelLine(''),writeCliSideChannelLine(a77_0x5a913a[_0x463f80(0x141)](_0x463f80(0x109)+_0x4f9cbf['length']+_0x463f80(0x132)));const _0x3bc2ca=_0x315b05[_0x463f80(0x116)]&&_0x315b05['cssUrl'];if(!_0x3bc2ca){writeCliSideChannelLine(renderSyncSummary(_0x4f9cbf,_0x4eb5dc['size']>0x0));const _0xc5ee99=await askConfirm(_0x463f80(0x13e));if(!_0xc5ee99)return writeCliSideChannelLine(a77_0x5a913a[_0x463f80(0x131)]('\x20\x20Cancelled.')),{'ok':!![]};}let _0x3c5833=_0x315b05[_0x463f80(0x116)],_0x329c0b=_0x315b05[_0x463f80(0x11b)];!_0x3c5833&&(_0x3c5833=await askJsUrl());!_0x329c0b&&(_0x329c0b=await askCssUrl());const _0x17c0d3=await askConfirm(_0x463f80(0x108)+_0x4f9cbf[_0x463f80(0x128)]+_0x463f80(0x123)+_0x3c5833+_0x463f80(0x124)+_0x329c0b+'?');if(!_0x17c0d3)return writeCliSideChannelLine(a77_0x5a913a[_0x463f80(0x131)](_0x463f80(0x125))),{'ok':!![]};const _0x269d60=[_0x3c5833,_0x329c0b],_0x2ee2e6=startSpinner(_0x463f80(0x11f)+_0x4f9cbf[_0x463f80(0x128)]+_0x463f80(0x127));try{const _0x578700=await doCreateMenus(_0x441ff9[_0x463f80(0x11c)],_0x441ff9[_0x463f80(0x13b)],_0x4f9cbf,_0x269d60);return stopSpinner(_0x2ee2e6,'Created\x20'+_0x578700[_0x463f80(0x118)]+'\x20menu(s)',!![]),{'ok':!![],'data':_0x578700,'message':_0x463f80(0x122)+_0x578700['created']+_0x463f80(0x114)+_0x578700[_0x463f80(0x126)]+'\x20failed.'};}catch(_0x294c4f){stopSpinner(_0x2ee2e6,_0x463f80(0x130),![]);throw CliErrors['validation'](_0x294c4f instanceof Error?_0x294c4f['message']:'Menu\x20creation\x20failed');}}};function a77_0x434c(){const _0x2d6eef=['Menu\x20sync\x20completed:\x20','\x20menu(s)\x20with\x20JS:\x20','\x20and\x20CSS:\x20','\x20\x20Cancelled.','failed','\x20menu(s)...','length','7842758IrwtXA','string','✓\x20Menu\x20sync\x20completed:\x20','menu','object','Sync\x20local\x20pages\x20as\x20platform\x20menus','Pre-fill\x20JS/CSS\x20URLs\x20and/or\x20select\x20specific\x20pages.\x20','Menu\x20creation\x20failed','gray','\x20page(s)','str','yellow','5367556INAeOf','117oFkwWh','18CaMpYN','1EQthPI','3gpXMJq','params','cookie','8DwHcBa','Non-interactive:\x20auto-create\x20all\x20local\x20pages\x20not\x20yet\x20on\x20platform','\x20\x20Continue\x20with\x20creation?','1948922xDBDQd','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','cyan','isArray','map','Fetching\x20online\x20menu\x20list...','912355YfVpFy','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22,\x22pages\x22:[\x22Page1\x22]}','\x20\x20Create\x20','\x20\x20✓\x20Selected:\x20','Online\x20menu\x20list\x20fetched','localPages','Failed\x20to\x20fetch\x20online\x20menu\x20list','onlinePaths','yes','10dRMcZa','trim','pages','4586436ojetTV','1001245NtFLgG','\x20created,\x20','sync','jsUrl','validation','created','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','1502280TnnaaN','cssUrl','appCode','write','boolean','Creating\x20','onlineMenuList','flag'];a77_0x434c=function(){return _0x2d6eef;};return a77_0x434c();}function parseParams(_0x3bd710){const _0x279460=a77_0x20afc1;if(!_0x3bd710)return{};try{const _0x31dee5=JSON['parse'](_0x3bd710);if(typeof _0x31dee5!==_0x279460(0x12d)||_0x31dee5===null||Array['isArray'](_0x31dee5))return{};return{'jsUrl':typeof _0x31dee5[_0x279460(0x116)]==='string'?_0x31dee5[_0x279460(0x116)][_0x279460(0x110)]():undefined,'cssUrl':typeof _0x31dee5[_0x279460(0x11b)]===_0x279460(0x12a)?_0x31dee5[_0x279460(0x11b)][_0x279460(0x110)]():undefined,'pages':Array[_0x279460(0x142)](_0x31dee5['pages'])?_0x31dee5[_0x279460(0x111)][_0x279460(0x104)](String):undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a78_0x53441c=a78_0x1561;(function(_0x31bde4,_0x5d4097){const _0x4e22fb=a78_0x1561,_0x228cad=_0x31bde4();while(!![]){try{const _0x25f0a4=parseInt(_0x4e22fb(0x1e4))/0x1+-parseInt(_0x4e22fb(0x200))/0x2+parseInt(_0x4e22fb(0x1d3))/0x3+parseInt(_0x4e22fb(0x201))/0x4+-parseInt(_0x4e22fb(0x1d5))/0x5+parseInt(_0x4e22fb(0x1e5))/0x6*(-parseInt(_0x4e22fb(0x1fa))/0x7)+-parseInt(_0x4e22fb(0x204))/0x8;if(_0x25f0a4===_0x5d4097)break;else _0x228cad['push'](_0x228cad['shift']());}catch(_0x5f1a86){_0x228cad['push'](_0x228cad['shift']());}}}(a78_0x2244,0x1a36e));import a78_0x3b3ab3 from'chalk';import{filterMenusWithResources,doUpdateCdnUrls,fetchOnlineMenuList}from'../../commands/menu/shared/logic.js';function a78_0x1561(_0x57d9ec,_0x3a608f){_0x57d9ec=_0x57d9ec-0x1d1;const _0x2244e6=a78_0x2244();let _0x156160=_0x2244e6[_0x57d9ec];return _0x156160;}import{renderUpdateSummary}from'../../commands/menu/shared/compare-table.js';function a78_0x2244(){const _0x7aab97=['28762cfzjTW','685176iNyowz','Menu\x20update\x20completed:\x20','\x20menu(s)','327720AnMFiG','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','Updated\x20','params','!\x20No\x20menus\x20with\x20existing\x20resources\x20found','update','458679BoFEns','\x20\x20!\x20No\x20menus\x20with\x20existing\x20resources\x20found','784410nLluRw','appCode','yellow','isArray','str','object','\x20\x20Update\x20','Online\x20menu\x20list\x20fetched','label','cssUrl','Fetching\x20online\x20menu\x20list...','length','skipped','Non-interactive:\x20update\x20all\x20menus\x20without\x20confirmation','cookie','156084yfuHiA','964014DpIPRw','\x20and\x20CSS:\x20','updated','\x20menu(s)\x20with\x20existing\x20resources','Menu\x20update\x20failed','write','\x20menu(s)\x20failed','parse','map','trim','\x20failed.','cyan','\x20menu(s)\x20with\x20JS:\x20','failed','menu','\x20menu(s)...','message','Pre-fill\x20JS/CSS\x20URLs\x20to\x20update.\x20','✓\x20Menu\x20update\x20completed:\x20','string','\x20menu(s)\x20updated','7UJEaJk','\x20updated.','jsUrl','validation','flag','Failed\x20to\x20fetch\x20online\x20menu\x20list'];a78_0x2244=function(){return _0x7aab97;};return a78_0x2244();}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_0x53441c(0x1f3),'command':a78_0x53441c(0x1d2),'description':'Update\x20CDN\x20asset\x20URLs\x20for\x20all\x20online\x20menus\x20with\x20existing\x20resources','risk':a78_0x53441c(0x1ea),'flags':[{'name':a78_0x53441c(0x207),'type':a78_0x53441c(0x1f8),'description':a78_0x53441c(0x1f6)+a78_0x53441c(0x205)},{'name':'yes','type':'boolean','description':a78_0x53441c(0x1e2)}],async 'execute'(_0x31dd3f){const _0x4bce9f=a78_0x53441c,_0x346c0f=_0x31dd3f[_0x4bce9f(0x1fe)]('yes'),_0x25c518=_0x31dd3f[_0x4bce9f(0x1d9)]('params'),_0x5d8f5f=parseParams(_0x25c518),_0x50ec8e=!!(_0x5d8f5f[_0x4bce9f(0x1fc)]||_0x5d8f5f[_0x4bce9f(0x1de)]);if(_0x346c0f||_0x50ec8e&&!isInteractive()){const _0x1ab647=await runMenuUpdateCore(_0x31dd3f[_0x4bce9f(0x1d6)],_0x31dd3f[_0x4bce9f(0x1e3)],_0x25c518);return _0x1ab647[_0x4bce9f(0x1e1)]?writeCliSideChannelLine(_0x4bce9f(0x1d1)):(writeCliSideChannelLine(_0x4bce9f(0x1f7)+_0x1ab647['updated']+_0x4bce9f(0x1f9)),_0x1ab647['failed']>0x0&&writeCliSideChannelLine('!\x20'+_0x1ab647[_0x4bce9f(0x1f2)]+_0x4bce9f(0x1eb))),{'ok':_0x1ab647[_0x4bce9f(0x1f2)]===0x0};}requireInteractive();const _0x560fed=startSpinner(_0x4bce9f(0x1df));let _0x35c844;try{_0x35c844=await fetchOnlineMenuList(_0x31dd3f[_0x4bce9f(0x1d6)],_0x31dd3f[_0x4bce9f(0x1e3)]),stopSpinner(_0x560fed,_0x4bce9f(0x1dc),!![]);}catch(_0x18ba9c){stopSpinner(_0x560fed,_0x4bce9f(0x1ff),![]);throw CliErrors['validation'](_0x18ba9c instanceof Error?_0x18ba9c[_0x4bce9f(0x1f5)]:_0x4bce9f(0x1ff));}const _0x2fc274=filterMenusWithResources(_0x35c844);if(_0x2fc274[_0x4bce9f(0x1e0)]===0x0)return writeCliSideChannelLine(a78_0x3b3ab3[_0x4bce9f(0x1d7)](_0x4bce9f(0x1d4))),{'ok':!![]};writeCliSideChannelLine(''),writeCliSideChannelLine(a78_0x3b3ab3[_0x4bce9f(0x1f0)]('\x20\x20Found\x20'+_0x2fc274[_0x4bce9f(0x1e0)]+_0x4bce9f(0x1e8))),writeCliSideChannelLine(renderUpdateSummary(_0x2fc274[_0x4bce9f(0x1ed)](_0x25b0b4=>_0x25b0b4[_0x4bce9f(0x1dd)]),[_0x5d8f5f[_0x4bce9f(0x1fc)],_0x5d8f5f[_0x4bce9f(0x1de)]])),writeCliSideChannelLine('');let _0x3ba590=_0x5d8f5f[_0x4bce9f(0x1fc)],_0x8386ca=_0x5d8f5f[_0x4bce9f(0x1de)];!_0x3ba590&&(_0x3ba590=await askJsUrl());!_0x8386ca&&(_0x8386ca=await askCssUrl());const _0x3bb9d5=await askConfirm(_0x4bce9f(0x1db)+_0x2fc274[_0x4bce9f(0x1e0)]+_0x4bce9f(0x1f1)+_0x3ba590+_0x4bce9f(0x1e6)+_0x8386ca+'?');if(!_0x3bb9d5)return writeCliSideChannelLine(a78_0x3b3ab3['gray']('\x20\x20Cancelled.')),{'ok':!![]};const _0x246c39=[_0x3ba590,_0x8386ca],_0x51e302=startSpinner('Updating\x20'+_0x2fc274['length']+_0x4bce9f(0x1f4));try{const _0x3b17e9=await doUpdateCdnUrls(_0x31dd3f[_0x4bce9f(0x1d6)],_0x31dd3f['cookie'],_0x2fc274,_0x246c39);return stopSpinner(_0x51e302,_0x4bce9f(0x206)+_0x3b17e9[_0x4bce9f(0x1e7)]+_0x4bce9f(0x203),_0x3b17e9[_0x4bce9f(0x1f2)]===0x0),{'ok':_0x3b17e9['failed']===0x0,'data':_0x3b17e9,'message':_0x3b17e9[_0x4bce9f(0x1f2)]>0x0?_0x4bce9f(0x202)+_0x3b17e9[_0x4bce9f(0x1e7)]+'\x20updated,\x20'+_0x3b17e9[_0x4bce9f(0x1f2)]+_0x4bce9f(0x1ef):_0x4bce9f(0x202)+_0x3b17e9[_0x4bce9f(0x1e7)]+_0x4bce9f(0x1fb)};}catch(_0x5ecd58){stopSpinner(_0x51e302,'Menu\x20update\x20failed',![]);throw CliErrors[_0x4bce9f(0x1fd)](_0x5ecd58 instanceof Error?_0x5ecd58[_0x4bce9f(0x1f5)]:_0x4bce9f(0x1e9));}}};function parseParams(_0x1476a6){const _0x288021=a78_0x53441c;if(!_0x1476a6)return{};try{const _0x4d0abe=JSON[_0x288021(0x1ec)](_0x1476a6);if(typeof _0x4d0abe!==_0x288021(0x1da)||_0x4d0abe===null||Array[_0x288021(0x1d8)](_0x4d0abe))return{};return{'jsUrl':typeof _0x4d0abe[_0x288021(0x1fc)]===_0x288021(0x1f8)?_0x4d0abe[_0x288021(0x1fc)][_0x288021(0x1ee)]():undefined,'cssUrl':typeof _0x4d0abe['cssUrl']===_0x288021(0x1f8)?_0x4d0abe[_0x288021(0x1de)][_0x288021(0x1ee)]():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x556c1b,_0x3fbae7){const _0x5eff72=a79_0x2e3b,_0x268314=_0x556c1b();while(!![]){try{const _0x371167=parseInt(_0x5eff72(0x17d))/0x1+-parseInt(_0x5eff72(0x17a))/0x2+parseInt(_0x5eff72(0x179))/0x3+parseInt(_0x5eff72(0x18a))/0x4*(-parseInt(_0x5eff72(0x18e))/0x5)+-parseInt(_0x5eff72(0x189))/0x6+parseInt(_0x5eff72(0x182))/0x7+parseInt(_0x5eff72(0x185))/0x8*(-parseInt(_0x5eff72(0x17c))/0x9);if(_0x371167===_0x3fbae7)break;else _0x268314['push'](_0x268314['shift']());}catch(_0x48e68c){_0x268314['push'](_0x268314['shift']());}}}(a79_0x2eab,0xbd6e7));function a79_0x2e3b(_0x3422b8,_0x7ec142){_0x3422b8=_0x3422b8-0x179;const _0x2eab0c=a79_0x2eab();let _0x2e3b79=_0x2eab0c[_0x3422b8];return _0x2e3b79;}import{existsSync}from'node:fs';import a79_0x23e164 from'node:path';import a79_0x1750d9 from'chalk';function a79_0x2eab(){const _0x31b8b1=['2901064cEncpR','No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','length','Directory\x20\x22','5024718OqUQVS','852ZGQNZT','√\x20App\x20Code:\x20','resolve','log','7235EpdLxj','Login\x20failed','trim','env','Project\x20name:','√\x20Login\x20status:\x20','cwd','green','Not\x20set','4578855DBWsoH','1420094filjCQ','√\x20Project\x20Name:\x20','18ldrQnl','1029632UQFNGd','Project\x20name\x20cannot\x20exceed\x2050\x20characters','production','cyan','test','5606797NneNtS','\x22\x20already\x20exists','Logged\x20in'];a79_0x2eab=function(){return _0x31b8b1;};return a79_0x2eab();}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';export async function guidedCreateProject(_0x50e220,_0x42d855,_0x279562){const _0x31c2b5=a79_0x2e3b,_0x2e0e66='my-app',_0x1f2806=readConfig(),_0x1b38c6=typeof _0x1f2806[_0x31c2b5(0x191)]==='string'?_0x1f2806['env']:undefined,_0x4a8188=await input({'message':_0x31c2b5(0x192),'default':_0x2e0e66,'validate':_0x5ff7d1=>{const _0x1e15bb=_0x31c2b5,_0x502e27=_0x5ff7d1[_0x1e15bb(0x190)]()||_0x2e0e66;if(_0x502e27[_0x1e15bb(0x187)]>0x32)return _0x1e15bb(0x17e);const _0x56690d=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x502e27&&!_0x56690d[_0x1e15bb(0x181)](_0x502e27))return'Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_';const _0x321680=a79_0x23e164[_0x1e15bb(0x18c)](process[_0x1e15bb(0x194)](),_0x502e27);if(existsSync(_0x321680))return _0x1e15bb(0x188)+_0x502e27+_0x1e15bb(0x183);return!![];}});console[_0x31c2b5(0x18d)](a79_0x1750d9[_0x31c2b5(0x195)](_0x31c2b5(0x17b)+a79_0x1750d9['cyan'](_0x4a8188)));const _0x716d94=await selectSingleAppcode(_0x279562);console['log'](a79_0x1750d9[_0x31c2b5(0x195)](_0x31c2b5(0x18b)+a79_0x1750d9[_0x31c2b5(0x180)](_0x716d94||_0x31c2b5(0x196))));if(_0x716d94){const _0x52d3d1=await getIsSessionValid();if(!_0x52d3d1){const _0x2e1c01=await confirm({'message':_0x31c2b5(0x186),'default':!![]});if(_0x2e1c01){const _0x185310=await authServer({'silent':!![]});console[_0x31c2b5(0x18d)](a79_0x1750d9['green'](_0x31c2b5(0x193)+a79_0x1750d9[_0x31c2b5(0x180)](_0x185310?_0x31c2b5(0x184):_0x31c2b5(0x18f))));}else console[_0x31c2b5(0x18d)](a79_0x1750d9[_0x31c2b5(0x195)](_0x31c2b5(0x193)+a79_0x1750d9[_0x31c2b5(0x180)]('Skipped')));}await _0x50e220({'projectName':_0x4a8188,'appCode':_0x716d94,'env':_0x42d855||_0x1b38c6||_0x31c2b5(0x17f)});}else await _0x50e220({'projectName':_0x4a8188,'env':_0x42d855||_0x1b38c6||_0x31c2b5(0x17f)});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a80_0x201c(_0x319214,_0x4dc58b){_0x319214=_0x319214-0x1ae;const _0xbb2176=a80_0xbb21();let _0x201c76=_0xbb2176[_0x319214];return _0x201c76;}(function(_0x34ebc0,_0x5a5a54){const _0x3b8aff=a80_0x201c,_0x4cf52b=_0x34ebc0();while(!![]){try{const _0x2f0aea=parseInt(_0x3b8aff(0x1b5))/0x1+-parseInt(_0x3b8aff(0x1b3))/0x2*(-parseInt(_0x3b8aff(0x1ba))/0x3)+-parseInt(_0x3b8aff(0x1b6))/0x4+parseInt(_0x3b8aff(0x1b7))/0x5+-parseInt(_0x3b8aff(0x1b0))/0x6+parseInt(_0x3b8aff(0x1b9))/0x7*(-parseInt(_0x3b8aff(0x1b1))/0x8)+parseInt(_0x3b8aff(0x1af))/0x9*(parseInt(_0x3b8aff(0x1b8))/0xa);if(_0x2f0aea===_0x5a5a54)break;else _0x4cf52b['push'](_0x4cf52b['shift']());}catch(_0x2adc79){_0x4cf52b['push'](_0x4cf52b['shift']());}}}(a80_0xbb21,0x2141a));function a80_0xbb21(){const _0x318687=['692230vVuLER','100LnSatc','21Acxpes','3sjQYea','toFixed','285750fPxGYX','495930vpMNXj','616040PhwEMr','now','5996IRaeao','replace','73423pZMdPX','329916XvsQlF'];a80_0xbb21=function(){return _0x318687;};return a80_0xbb21();}export function formatElapsed(_0x587e9f){const _0x6982e0=a80_0x201c,_0x1a1fed=Date[_0x6982e0(0x1b2)]()-_0x587e9f;if(_0x1a1fed<0x3e8)return _0x1a1fed+'ms';const _0x592f38=(_0x1a1fed/0x3e8)[_0x6982e0(0x1ae)](0x2),_0x33caf3=_0x592f38[_0x6982e0(0x1b4)](/\.?0+$/u,'');return _0x33caf3+'s';}
|
|
@@ -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 a81_0x41e4(_0x21a5ae,_0x554dc8){_0x21a5ae=_0x21a5ae-0x146;const _0x321965=a81_0x3219();let _0x41e4ec=_0x321965[_0x21a5ae];return _0x41e4ec;}(function(_0x936c31,_0x223940){const _0x1e9699=a81_0x41e4,_0x5bc3aa=_0x936c31();while(!![]){try{const _0x2b06ca=parseInt(_0x1e9699(0x148))/0x1+-parseInt(_0x1e9699(0x156))/0x2*(parseInt(_0x1e9699(0x18d))/0x3)+parseInt(_0x1e9699(0x180))/0x4*(parseInt(_0x1e9699(0x14f))/0x5)+-parseInt(_0x1e9699(0x189))/0x6+-parseInt(_0x1e9699(0x192))/0x7+-parseInt(_0x1e9699(0x16e))/0x8+-parseInt(_0x1e9699(0x190))/0x9*(-parseInt(_0x1e9699(0x16d))/0xa);if(_0x2b06ca===_0x223940)break;else _0x5bc3aa['push'](_0x5bc3aa['shift']());}catch(_0x3d8ba7){_0x5bc3aa['push'](_0x5bc3aa['shift']());}}}(a81_0x3219,0xdd0bb));import a81_0x1dfd94 from'path';import a81_0x861ea7 from'fs';import a81_0x5ab7cc from'chalk';import a81_0x3611f2 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';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';function a81_0x3219(){const _0x3e4f81=['currentVersion','4388wTQlMa','version','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','parse','accessKey','stableVersion','green','rmSync','更新\x20package.json\x20失败','7389954BOvbUk','W_OK','accessSync','\x20√\x20','3NahlgP','description','1.0.0','9ZoqKsw','gray','12408053SfPrNu','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','toLocaleString','更新\x20package.json\x20name','API\x20configuration\x20pulled:\x20','production','\x20\x201.\x20Start\x20project:\x20','error','√\x20package.json\x20updated:\x20name=','stop','locale','API\x20配置拉取异常','Project\x20name\x20cannot\x20be\x20empty','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','清理项目目录失败:\x20','bold','\x20dataset(s),\x20generated\x20','success','test','message','\x20config\x20set\x20appcode\x20<app-code>\x27','cwd','64886HhcwhN','resolve','info','existsSync','utf8','√\x20Pulled\x20','appCode','3430AaSWvb','项目创建完成:\x20','CLI\x20版本检查','chdir','join','constants','projectName','740082XYdDwv','stringify','start','needsUpgrade','format','create','\x20run\x20start','cyan','√\x20Configuration\x20file\x20created,\x20AppCode:\x20','\x20|\x20AppCode:\x20','projectCode','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','\x20Generated\x20by\x20rabetbase\x20cli\x20','Project\x20directory\x20','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','readFileSync','配置应用AppCode失败','riskLevel','length','Project\x20name:\x20','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','\x20&&\x20','writeFileSync','39585350uoEMvN','3970248YRcHmm','warn','repeat','🚀\x20Next\x20Steps:','...','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','Install\x20dependencies','cookie','\x20\x202.\x20Pull\x20API\x20configuration:\x20','cd\x20','setLogPath','配置应用AppCode:\x20','fail','Format\x20code','log','env','\x20model(s)'];a81_0x3219=function(){return _0x3e4f81;};return a81_0x3219();}import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';export async function createApp(_0x229b89){const _0x1a489e=a81_0x41e4,_0x4868cd=await checkCliVersion();_0x4868cd[_0x1a489e(0x159)]&&(printCliUpgradeWarning(_0x4868cd),logger[_0x1a489e(0x14a)](_0x1a489e(0x15b),_0x1a489e(0x151),{'currentVersion':_0x4868cd[_0x1a489e(0x17f)],'stableVersion':_0x4868cd[_0x1a489e(0x185)],'needsUpgrade':_0x4868cd[_0x1a489e(0x159)]}));if(_0x229b89[_0x1a489e(0x160)]&&_0x229b89[_0x1a489e(0x14e)])await runCreate({'projectName':_0x229b89[_0x1a489e(0x160)],'appCode':_0x229b89['appCode'],'env':_0x229b89[_0x1a489e(0x17d)]},_0x229b89);else{if(_0x229b89['projectCode']){const _0x34b929=await selectSingleAppcode(_0x229b89[_0x1a489e(0x175)]);await runCreate({'projectName':_0x229b89['projectCode'],'appCode':_0x34b929||undefined,'env':_0x229b89[_0x1a489e(0x17d)]},_0x229b89);}else await guidedCreateProject(_0xf6c1=>runCreate(_0xf6c1,_0x229b89),_0x229b89['env'],_0x229b89['cookie']);}}async function runCreate(_0x409a01,_0x33c2a3){const _0xb4b380=a81_0x41e4;if(!_0x409a01['projectName']||_0x409a01[_0xb4b380(0x155)]['trim']()==='')throw new Error(_0xb4b380(0x19e));const _0x5d2120=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x5d2120[_0xb4b380(0x1a4)](_0x409a01[_0xb4b380(0x155)]))throw new Error(_0xb4b380(0x182));if(_0x409a01['projectName'][_0xb4b380(0x168)]>0x64)throw new Error(_0xb4b380(0x16a));const _0x1f0d35=a81_0x1dfd94[_0xb4b380(0x149)](process[_0xb4b380(0x147)](),_0x409a01[_0xb4b380(0x155)]);if(a81_0x861ea7[_0xb4b380(0x14b)](_0x1f0d35))throw new Error(_0xb4b380(0x163)+_0x409a01['projectName']+'\x20already\x20exists');try{a81_0x861ea7[_0xb4b380(0x18b)](a81_0x1dfd94['dirname'](_0x1f0d35),a81_0x861ea7[_0xb4b380(0x154)][_0xb4b380(0x18a)]);}catch{throw new Error(_0xb4b380(0x161));}logger[_0xb4b380(0x178)](_0x1f0d35),logger['info'](_0xb4b380(0x15b),'开始创建项目:\x20'+_0x409a01[_0xb4b380(0x155)],{'projectDir':_0x1f0d35,'appCode':_0x409a01[_0xb4b380(0x14e)]}),console['log'](),console[_0xb4b380(0x17c)](a81_0x5ab7cc['green'](_0xb4b380(0x18c))+_0xb4b380(0x169)+a81_0x5ab7cc['green'](_0x409a01[_0xb4b380(0x155)])+(_0x409a01[_0xb4b380(0x14e)]?_0xb4b380(0x15f)+a81_0x5ab7cc[_0xb4b380(0x15d)](_0x409a01[_0xb4b380(0x14e)]):''));try{await runTask('Copy\x20project\x20files',()=>copyProjectTemplate(_0x409a01['projectName'])),await updatePackageJsonName(_0x409a01[_0xb4b380(0x155)]),await runTask(_0xb4b380(0x174),()=>installDependencies(_0x409a01[_0xb4b380(0x155)])),await runTask(_0xb4b380(0x17b),()=>formatProjectCode(_0x409a01[_0xb4b380(0x155)])),await configureAppCode(_0x409a01[_0xb4b380(0x155)],_0x409a01[_0xb4b380(0x14e)]||'',_0x409a01[_0xb4b380(0x17d)]);let _0x2f6f88=![];if(_0x409a01[_0xb4b380(0x14e)]){console['log']('*\x20Pulling\x20API\x20configuration...');const _0x14f2aa=process[_0xb4b380(0x147)]();try{process[_0xb4b380(0x152)](_0x1f0d35);const _0x3038aa=_0x409a01['env']||_0xb4b380(0x197);initEnv(_0x3038aa);const {configArray:_0x4aeb88}=await fetchModelList(_0x409a01[_0xb4b380(0x14e)],_0x33c2a3[_0xb4b380(0x175)]||''),_0x3922ad=DEFAULT_API_DIR,_0x20dbd3=await generateApiFile(_0x4aeb88,'',_0x409a01[_0xb4b380(0x14e)],!![],_0x3038aa,_0x3922ad);console[_0xb4b380(0x17c)](_0xb4b380(0x14d)+_0x4aeb88[_0xb4b380(0x168)]+_0xb4b380(0x1a2)+_0x20dbd3['modelCount']+_0xb4b380(0x17e)),logger['info'](_0xb4b380(0x15b),_0xb4b380(0x196)+_0x409a01[_0xb4b380(0x14e)]);}catch(_0x161658){_0x2f6f88=!![],console[_0xb4b380(0x17c)](_0xb4b380(0x19f)),logger[_0xb4b380(0x16f)]('create',_0xb4b380(0x19d),{'error':_0x161658 instanceof Error?_0x161658[_0xb4b380(0x1a5)]:String(_0x161658)});}finally{process[_0xb4b380(0x152)](_0x14f2aa);}}logger[_0xb4b380(0x1a3)](_0xb4b380(0x15b),_0xb4b380(0x150)+_0x409a01[_0xb4b380(0x155)]),console[_0xb4b380(0x17c)](),console[_0xb4b380(0x17c)](a81_0x5ab7cc[_0xb4b380(0x186)]('─'[_0xb4b380(0x170)](0x3c))),console[_0xb4b380(0x17c)](a81_0x5ab7cc[_0xb4b380(0x15d)]['bold'](_0xb4b380(0x171))),console[_0xb4b380(0x17c)](),console[_0xb4b380(0x17c)](_0xb4b380(0x198)+a81_0x5ab7cc['cyan'][_0xb4b380(0x1a1)](_0xb4b380(0x177)+_0x409a01['projectName']+_0xb4b380(0x16b)+CLI_BIN_NAME+_0xb4b380(0x15c))),_0x2f6f88&&console['log'](_0xb4b380(0x176)+a81_0x5ab7cc['cyan'][_0xb4b380(0x1a1)](CLI_BIN_NAME+'\x20api\x20pull')),console[_0xb4b380(0x17c)](a81_0x5ab7cc[_0xb4b380(0x186)]('─'[_0xb4b380(0x170)](0x3c)));}catch(_0x1df9ab){logger['error'](_0xb4b380(0x15b),'项目创建失败:\x20'+_0x409a01[_0xb4b380(0x155)],{'error':_0x1df9ab instanceof Error?_0x1df9ab['message']:String(_0x1df9ab)});try{a81_0x861ea7[_0xb4b380(0x14b)](_0x1f0d35)&&(console[_0xb4b380(0x17c)]('*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20'+_0x1f0d35),a81_0x861ea7[_0xb4b380(0x187)](_0x1f0d35,{'recursive':!![],'force':!![]}));}catch{logger[_0xb4b380(0x16f)](_0xb4b380(0x15b),_0xb4b380(0x1a0)+_0x1f0d35);}throw _0x1df9ab;}}async function runTask(_0x46a4b0,_0x5c3002){const _0x1eb65b=a81_0x41e4,_0x39ad58=a81_0x3611f2(_0x46a4b0+_0x1eb65b(0x172))[_0x1eb65b(0x158)]();try{const _0x5617c2=await _0x5c3002();_0x39ad58[_0x1eb65b(0x19b)](),console[_0x1eb65b(0x17c)](''+a81_0x5ab7cc[_0x1eb65b(0x186)](_0x1eb65b(0x18c))+_0x46a4b0+'\x20'+a81_0x5ab7cc[_0x1eb65b(0x191)]('['+_0x5617c2+']'));}catch(_0x37850d){_0x39ad58[_0x1eb65b(0x17a)](_0x46a4b0);throw _0x37850d;}}async function updatePackageJsonName(_0x30933a){const _0x2604bc=a81_0x41e4,_0x1d673d=a81_0x1dfd94[_0x2604bc(0x149)](process[_0x2604bc(0x147)](),_0x30933a),_0x48b08f=a81_0x1dfd94['join'](_0x1d673d,'package.json');try{console[_0x2604bc(0x17c)](_0x2604bc(0x164));const _0xbe5f12=getRabetbaseCliPackageRoot(),_0x53f3c6=a81_0x1dfd94[_0x2604bc(0x153)](_0xbe5f12,'package.json');let _0x33eb37=_0x2604bc(0x18f);try{const _0xbf6447=JSON[_0x2604bc(0x183)](a81_0x861ea7[_0x2604bc(0x165)](_0x53f3c6,_0x2604bc(0x14c)));_0x33eb37=_0xbf6447[_0x2604bc(0x181)]||_0x2604bc(0x18f);}catch{}const _0x3c14ca=a81_0x861ea7['readFileSync'](_0x48b08f,_0x2604bc(0x14c)),_0x23401e=JSON[_0x2604bc(0x183)](_0x3c14ca);_0x23401e['name']=_0x30933a,_0x23401e[_0x2604bc(0x18e)]=_0x30933a+_0x2604bc(0x162)+_0x33eb37,a81_0x861ea7[_0x2604bc(0x16c)](_0x48b08f,JSON[_0x2604bc(0x157)](_0x23401e,null,0x2)+'\x0a',_0x2604bc(0x14c)),console[_0x2604bc(0x17c)](_0x2604bc(0x19a)+_0x30933a),logger[_0x2604bc(0x14a)](_0x2604bc(0x15b),_0x2604bc(0x195));}catch(_0x47319b){logger[_0x2604bc(0x199)](_0x2604bc(0x15b),_0x2604bc(0x188));throw _0x47319b;}}async function configureAppCode(_0xa46077,_0x3a0582,_0x242fe5){const _0x3f95d0=a81_0x41e4,_0x3b7ee4=a81_0x1dfd94[_0x3f95d0(0x149)](process[_0x3f95d0(0x147)](),_0xa46077),_0x4cccdc=a81_0x1dfd94[_0x3f95d0(0x153)](_0x3b7ee4,NEW_CONFIG_NAME);try{_0x3a0582?console[_0x3f95d0(0x17c)]('*\x20Configuring\x20AppCode\x20for\x20project\x20'+_0xa46077+':\x20'+_0x3a0582):console[_0x3f95d0(0x17c)](_0x3f95d0(0x193)+_0xa46077);const _0x138c29=getRabetbaseCliPackageRoot(),_0x449602=a81_0x1dfd94[_0x3f95d0(0x153)](_0x138c29,'package.json');let _0x2508a1=_0x3f95d0(0x18f);try{const _0x50bf0c=JSON[_0x3f95d0(0x183)](a81_0x861ea7[_0x3f95d0(0x165)](_0x449602,_0x3f95d0(0x14c)));_0x2508a1=_0x50bf0c[_0x3f95d0(0x181)]||_0x3f95d0(0x18f);}catch{}const _0x530077=readConfig(),_0x1310ff=typeof _0x530077[_0x3f95d0(0x17d)]==='string'?_0x530077[_0x3f95d0(0x17d)]:undefined,_0xcdf0a0=[_0x3f95d0(0x175),_0x3f95d0(0x184),_0x3f95d0(0x19c),_0x3f95d0(0x15a),_0x3f95d0(0x167)],_0x42b0c8={};for(const _0x455462 of _0xcdf0a0){if(_0x530077[_0x455462]!=null)_0x42b0c8[_0x455462]=_0x530077[_0x455462];}const _0x36fc0e={..._0x42b0c8,'appcode':_0x3a0582||'','env':_0x242fe5||_0x1310ff||_0x3f95d0(0x197),'createdAt':new Date()[_0x3f95d0(0x194)](),'version':_0x2508a1};writeConfigFile(_0x4cccdc,_0x36fc0e),_0x3a0582?console[_0x3f95d0(0x17c)](_0x3f95d0(0x15e)+_0x3a0582):console[_0x3f95d0(0x17c)](_0x3f95d0(0x173)+CLI_BIN_NAME+_0x3f95d0(0x146)),logger[_0x3f95d0(0x14a)](_0x3f95d0(0x15b),_0x3f95d0(0x179)+_0x3a0582);}catch(_0x4b443e){logger['error'](_0x3f95d0(0x15b),_0x3f95d0(0x166));}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x8da83e,_0xff681e){const _0x31a48f=a82_0x4301,_0xafec15=_0x8da83e();while(!![]){try{const _0x578ac1=-parseInt(_0x31a48f(0xf6))/0x1*(parseInt(_0x31a48f(0xec))/0x2)+parseInt(_0x31a48f(0x107))/0x3*(-parseInt(_0x31a48f(0x105))/0x4)+-parseInt(_0x31a48f(0xe5))/0x5+-parseInt(_0x31a48f(0xe6))/0x6*(parseInt(_0x31a48f(0x106))/0x7)+parseInt(_0x31a48f(0xe9))/0x8+parseInt(_0x31a48f(0xfa))/0x9*(parseInt(_0x31a48f(0xe4))/0xa)+parseInt(_0x31a48f(0x111))/0xb*(parseInt(_0x31a48f(0x100))/0xc);if(_0x578ac1===_0xff681e)break;else _0xafec15['push'](_0xafec15['shift']());}catch(_0x37cc3b){_0xafec15['push'](_0xafec15['shift']());}}}(a82_0x366e,0xc2f68));import a82_0x53fb7f from'path';import a82_0x9b487f 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';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);function a82_0x4301(_0x3a4e16,_0x26ad53){_0x3a4e16=_0x3a4e16-0xdf;const _0x366e02=a82_0x366e();let _0x4301c4=_0x366e02[_0x3a4e16];return _0x4301c4;}export async function createProjectNonInteractive(_0x2fde23,_0xf56de6,_0x50b959,_0x5c0d43){const _0x13fa05=a82_0x4301,_0x3af0f7=await checkCliVersion();_0x3af0f7['needsUpgrade']&&printCliUpgradeWarning(_0x3af0f7);if(!_0x2fde23||_0x2fde23[_0x13fa05(0x10a)]()==='')throw CliErrors[_0x13fa05(0xe0)](_0x13fa05(0x118));const _0x1d6eff=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x1d6eff[_0x13fa05(0xea)](_0x2fde23))throw CliErrors[_0x13fa05(0xe0)](_0x13fa05(0x10f),'Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters');if(_0x2fde23['length']>0x64)throw CliErrors['validation'](_0x13fa05(0xf5));const _0x4428c7=a82_0x53fb7f[_0x13fa05(0x115)](process[_0x13fa05(0xfc)](),_0x2fde23);if(existsSync(_0x4428c7))throw CliErrors[_0x13fa05(0xe0)](_0x13fa05(0xed)+_0x2fde23+_0x13fa05(0xf8),_0x13fa05(0xf9));try{const _0x675ad2=a82_0x53fb7f[_0x13fa05(0x104)](_0x4428c7);await a82_0x9b487f[_0x13fa05(0x108)](_0x675ad2,a82_0x9b487f['constants']['W_OK']);}catch{throw CliErrors[_0x13fa05(0xe0)](_0x13fa05(0xf0),'Check\x20directory\x20permissions.');}try{console[_0x13fa05(0xf2)](_0x13fa05(0xf1)+_0x2fde23+_0x13fa05(0xdf));const _0x1ec0da=getSubAppReactDemoTemplateDir();await copyDirectory(_0x1ec0da,_0x4428c7),console['log']('\x20\x20√\x20Project\x20template\x20created'),await updatePackageJsonName(_0x2fde23),console[_0x13fa05(0xf2)](_0x13fa05(0x10e)),console[_0x13fa05(0xf2)]('\x20\x20Installing\x20dependencies...'),console[_0x13fa05(0xf2)](_0x13fa05(0x101)),await formatCode(_0x4428c7),console[_0x13fa05(0xf2)](_0x13fa05(0xeb)),await configureProject(_0x2fde23,_0x50b959,_0xf56de6),console[_0x13fa05(0xf2)](_0x13fa05(0xe7)),_0x50b959&&await pullApiConfig(_0x4428c7,_0x50b959,_0xf56de6,_0x5c0d43),console[_0x13fa05(0xf2)](_0x13fa05(0x110)+_0x2fde23+_0x13fa05(0x113)),console[_0x13fa05(0xf2)]('\x0a\x20\x20cd\x20'+_0x2fde23),console[_0x13fa05(0xf2)](_0x13fa05(0xe8));}catch(_0x3c19a1){try{existsSync(_0x4428c7)&&await a82_0x9b487f['rm'](_0x4428c7,{'recursive':!![],'force':!![]});}catch{}throw _0x3c19a1;}}async function updatePackageJsonName(_0x4ab881){const _0x4608ea=a82_0x4301,_0xbf597c=a82_0x53fb7f[_0x4608ea(0x115)](process[_0x4608ea(0xfc)](),_0x4ab881),_0x5cdb0a=a82_0x53fb7f['join'](_0xbf597c,_0x4608ea(0x10d)),_0x5b3303=await a82_0x9b487f[_0x4608ea(0xf4)](_0x5cdb0a,_0x4608ea(0xef)),_0x2ee973=JSON[_0x4608ea(0xf7)](_0x5b3303);_0x2ee973[_0x4608ea(0xe3)]=_0x4ab881,_0x2ee973['description']=_0x4608ea(0xf3),await a82_0x9b487f[_0x4608ea(0xe2)](_0x5cdb0a,JSON[_0x4608ea(0x114)](_0x2ee973,null,0x2)+'\x0a');}function a82_0x366e(){const _0x35bcf2=['bun\x20--version','Project\x20name\x20cannot\x20be\x20empty.','...','validation','\x20model(s)','writeFile','name','6271620cNWAoT','149880wfJQcB','6bPpNlf','\x20\x20√\x20Configuration\x20file\x20created','\x20\x20rabetbase\x20run\x20start\x0a','12079736QTTTQx','test','\x20\x20√\x20Code\x20formatted','4iRpmOa','Project\x20directory\x20\x22','length','utf-8','Cannot\x20create\x20project\x20in\x20current\x20directory.','*\x20Creating\x20project\x20','log','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','readFile','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','526172fpzGkE','parse','\x22\x20already\x20exists.','Use\x20a\x20different\x20project\x20name.','9gEZCBH','env','cwd','\x20\x20√\x20Pulled\x20','\x20api\x20pull`\x20manually\x20later.','modelCount','19108500qsEgib','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','accessKey','ignore','dirname','68KWiiaW','8130094YFzTnG','121266qvsfhP','access','bun\x20run\x20format','trim','cookie','npm','package.json','\x20\x20√\x20package.json\x20updated','Project\x20name\x20contains\x20invalid\x20characters.','\x0a√\x20Project\x20','11ScwROf','\x20\x20Pulling\x20API\x20configuration...','\x20created\x20successfully!','stringify','resolve','locale'];a82_0x366e=function(){return _0x35bcf2;};return a82_0x366e();}function detectPackageManager(){const _0x4da951=a82_0x4301;try{return execSync(_0x4da951(0x117),{'stdio':_0x4da951(0x103)}),'bun';}catch{return _0x4da951(0x10c);}}async function formatCode(_0x43bfe1){const _0x1d6a2d=a82_0x4301;try{await execAsync(_0x1d6a2d(0x109),{'cwd':_0x43bfe1});}catch{}}async function configureProject(_0x73722,_0x29fdc4,_0x6e6c4b){const _0x502e6c=a82_0x4301,_0x27bd0b=a82_0x53fb7f[_0x502e6c(0x115)](process[_0x502e6c(0xfc)](),_0x73722),_0x2ce682=a82_0x53fb7f['join'](_0x27bd0b,NEW_CONFIG_NAME),_0x596c52=readConfig(),_0x1fbbc3=typeof _0x596c52[_0x502e6c(0xfb)]==='string'?_0x596c52[_0x502e6c(0xfb)]:undefined,_0x10c54e=[_0x502e6c(0x10b),_0x502e6c(0x102),_0x502e6c(0x116),'format','riskLevel'],_0x2c42ff={};for(const _0x49eca6 of _0x10c54e){if(_0x596c52[_0x49eca6]!=null)_0x2c42ff[_0x49eca6]=_0x596c52[_0x49eca6];}const _0x38d0ef={..._0x2c42ff,'appcode':_0x29fdc4||'','env':_0x6e6c4b||_0x1fbbc3||'production','createdAt':new Date()['toLocaleString'](),'version':getCliVersion()};writeConfigFile(_0x2ce682,_0x38d0ef);}async function pullApiConfig(_0x3d041b,_0x25d45a,_0x49d682,_0x1332de){const _0xdcba6b=a82_0x4301,_0x34c867=process['cwd']();try{process['chdir'](_0x3d041b);const _0x4d5b9f=_0x49d682||'production';initEnv(_0x4d5b9f),console[_0xdcba6b(0xf2)](_0xdcba6b(0x112));const {configArray:_0x9b75b}=await fetchModelList(_0x25d45a,_0x1332de||''),_0x3049aa=await generateApiFile(_0x9b75b,'',_0x25d45a,!![],_0x4d5b9f,DEFAULT_API_DIR);console['log'](_0xdcba6b(0xfd)+_0x9b75b[_0xdcba6b(0xee)]+'\x20dataset(s),\x20generated\x20'+_0x3049aa[_0xdcba6b(0xff)]+_0xdcba6b(0xe1));}catch(_0xb1a70c){console[_0xdcba6b(0xf2)]('\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`'+CLI_BIN_NAME+_0xdcba6b(0xfe));}finally{process['chdir'](_0x34c867);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a83_0x364108=a83_0x23a4;function a83_0x3ff3(){const _0x5a1ebc=['12CebeNW','126000sqkMIe','92366OGfsxv','projects','2363490CahVZO','5493598IoBjKy','54zMaQIp','8iFLewH','resolve','dirname','../../../../','templates','4UPgqDO','1755400jLPJIL','3fMeKxj','1147970IbJJNw','306632LsvRzu'];a83_0x3ff3=function(){return _0x5a1ebc;};return a83_0x3ff3();}function a83_0x23a4(_0x3fc0b3,_0x231d91){_0x3fc0b3=_0x3fc0b3-0x156;const _0x3ff395=a83_0x3ff3();let _0x23a461=_0x3ff395[_0x3fc0b3];return _0x23a461;}(function(_0x5e84f1,_0x26189e){const _0x3202b4=a83_0x23a4,_0x14d879=_0x5e84f1();while(!![]){try{const _0x50ffe7=parseInt(_0x3202b4(0x15b))/0x1*(parseInt(_0x3202b4(0x162))/0x2)+-parseInt(_0x3202b4(0x15d))/0x3*(-parseInt(_0x3202b4(0x15f))/0x4)+-parseInt(_0x3202b4(0x15e))/0x5+parseInt(_0x3202b4(0x166))/0x6*(parseInt(_0x3202b4(0x161))/0x7)+-parseInt(_0x3202b4(0x156))/0x8*(-parseInt(_0x3202b4(0x164))/0x9)+parseInt(_0x3202b4(0x15c))/0xa+parseInt(_0x3202b4(0x165))/0xb*(-parseInt(_0x3202b4(0x160))/0xc);if(_0x50ffe7===_0x26189e)break;else _0x14d879['push'](_0x14d879['shift']());}catch(_0x4df06d){_0x14d879['push'](_0x14d879['shift']());}}}(a83_0x3ff3,0x205b0));import a83_0xaa15af from'node:path';import{fileURLToPath}from'node:url';const __dirname=a83_0xaa15af[a83_0x364108(0x158)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x2a6909=a83_0x364108;return a83_0xaa15af[_0x2a6909(0x157)](__dirname,_0x2a6909(0x159));}export function getSubAppReactDemoTemplateDir(){const _0x39c130=a83_0x364108;return a83_0xaa15af['join'](getRabetbaseCliPackageRoot(),_0x39c130(0x15a),_0x39c130(0x163),'sub-app-react-demo');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x50bf15,_0x3df973){const _0x33c8d6=a84_0x2f59,_0x43a6ed=_0x50bf15();while(!![]){try{const _0x55c237=-parseInt(_0x33c8d6(0x107))/0x1*(parseInt(_0x33c8d6(0x101))/0x2)+-parseInt(_0x33c8d6(0xfe))/0x3*(-parseInt(_0x33c8d6(0xfd))/0x4)+parseInt(_0x33c8d6(0x102))/0x5*(parseInt(_0x33c8d6(0x108))/0x6)+-parseInt(_0x33c8d6(0xf8))/0x7*(-parseInt(_0x33c8d6(0xfa))/0x8)+-parseInt(_0x33c8d6(0xf9))/0x9+-parseInt(_0x33c8d6(0x104))/0xa+parseInt(_0x33c8d6(0xf4))/0xb;if(_0x55c237===_0x3df973)break;else _0x43a6ed['push'](_0x43a6ed['shift']());}catch(_0x1b2d0b){_0x43a6ed['push'](_0x43a6ed['shift']());}}}(a84_0x53ef,0x6563f));import a84_0x45a44d from'node:path';function a84_0x2f59(_0x5a8248,_0x180170){_0x5a8248=_0x5a8248-0xf4;const _0x53ef1a=a84_0x53ef();let _0x2f59dc=_0x53ef1a[_0x5a8248];return _0x2f59dc;}import{copyDirectory}from'../../../utils/copy-directory.js';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a84_0x53ef(){const _0x2529b4=['635nYOFKu','开始复制项目模板','7396040jJPKhE','项目模板复制失败','error','1142sabcfZ','32244pKOfHI','13862618nemMJk','now','cwd','message','10997zmdInH','6559596QRBiRx','1696BGvqcZ','resolve','success','12qgtcnX','345687MhipHc','copy','info','1292JtLvvy'];a84_0x53ef=function(){return _0x2529b4;};return a84_0x53ef();}import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x2fbe54){const _0x1507d7=a84_0x2f59,_0x15f499=Date[_0x1507d7(0xf5)](),_0x376437=a84_0x45a44d[_0x1507d7(0xfb)](process[_0x1507d7(0xf6)](),_0x2fbe54);try{logger[_0x1507d7(0x100)]('copy',_0x1507d7(0x103),{'projectCode':_0x2fbe54,'templateDir':templateDir}),await copyDirectory(templateDir,_0x376437);const _0x31c838=Date[_0x1507d7(0xf5)]()-_0x15f499;logger[_0x1507d7(0xfc)](_0x1507d7(0xff),'项目模板复制完成',_0x31c838,{'projectCode':_0x2fbe54});}catch(_0x421765){const _0x2ed6cb=Date[_0x1507d7(0xf5)]()-_0x15f499;logger[_0x1507d7(0x106)]('copy',_0x1507d7(0x105),{'projectCode':_0x2fbe54,'error':_0x421765 instanceof Error?_0x421765[_0x1507d7(0xf7)]:String(_0x421765),'duration':_0x2ed6cb});throw _0x421765;}return formatElapsed(_0x15f499);}
|