@lovrabet/rabetbase-cli 2.0.2-beta.9 → 2.0.4-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- 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/app/add.js +1 -0
- package/lib/commands/app/index.js +1 -0
- package/lib/commands/app/list.js +1 -0
- package/lib/commands/app/remote.js +1 -0
- package/lib/commands/app/remove.js +1 -0
- package/lib/commands/app/shared.js +1 -0
- package/lib/commands/app/use.js +1 -0
- package/lib/commands/auth.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/build.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 -0
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/validate.js +1 -0
- package/lib/commands/config/get.js +1 -0
- package/lib/commands/config/index.js +1 -0
- package/lib/commands/config/list.js +1 -0
- package/lib/commands/config/set.js +1 -0
- package/lib/commands/config/shared.js +1 -0
- package/lib/commands/create.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.js +1 -1
- package/lib/commands/logout.js +1 -1
- package/lib/commands/logs.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/preview.js +1 -1
- package/lib/commands/project-upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/run.js +1 -1
- package/lib/commands/skill.js +1 -1
- package/lib/commands/smart-init.js +1 -0
- 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/commands/start.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/create-app/enhanced-guided-create.js +1 -1
- package/lib/create-app/format-elapsed.js +1 -1
- package/lib/create-app/main.js +1 -1
- package/lib/create-app/non-interactive.js +1 -1
- package/lib/create-app/use-copy-project-template.js +1 -1
- package/lib/create-app/use-format-code.js +1 -1
- package/lib/create-app/use-install-dependencies.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/init/main.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -0
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -0
- 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 -0
- 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 -0
- package/lib/utils/with-active-cookie.js +1 -0
- package/package.json +7 -11
- package/lib/commands/app.js +0 -1
- package/lib/commands/config.js +0 -1
- package/lib/config/config-help.js +0 -1
- package/lib/config/main.js +0 -1
- package/lib/create-app/task-finished.js +0 -1
- package/lib/create-app/task-loading.js +0 -1
- package/lib/create-app/task-running.js +0 -1
- package/lib/create-app/task-time.js +0 -1
package/lib/utils/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x482889,_0x3ea0ab){const _0x5e89fc=a124_0x4bf5,_0xbd1a70=_0x482889();while(!![]){try{const _0x4ef5dc=-parseInt(_0x5e89fc(0x187))/0x1+-parseInt(_0x5e89fc(0x188))/0x2+parseInt(_0x5e89fc(0x18e))/0x3*(parseInt(_0x5e89fc(0x191))/0x4)+parseInt(_0x5e89fc(0x199))/0x5+-parseInt(_0x5e89fc(0x194))/0x6*(-parseInt(_0x5e89fc(0x189))/0x7)+parseInt(_0x5e89fc(0x196))/0x8+-parseInt(_0x5e89fc(0x197))/0x9;if(_0x4ef5dc===_0x3ea0ab)break;else _0xbd1a70['push'](_0xbd1a70['shift']());}catch(_0x3c3918){_0xbd1a70['push'](_0xbd1a70['shift']());}}}(a124_0x39ef,0xc5d5b));import{initEnv}from'../constant/env.js';import{readRawConfig}from'../context.js';export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';export{isInProject}from'../context.js';function a124_0x4bf5(_0x3fde01,_0x210407){_0x3fde01=_0x3fde01-0x181;const _0x39efa3=a124_0x39ef();let _0x4bf538=_0x39efa3[_0x3fde01];return _0x4bf538;}function a124_0x39ef(){const _0x536309=['keys','app','filter','apiDir','628156PjKKdN','937834oYXpXQ','21WMCVKq','entries','map','env','cookie','345702IlbfAG','apps','object','24bikUxl','appcode','template_base_url','220530spVcag','replace','10976016rkgTkF','15960285xrnLvj','defaultApp','7535490fopAII','length','string','https://g.lovrabet.com/dist/lovrabet-skill','trim'];a124_0x39ef=function(){return _0x536309;};return a124_0x39ef();}export function readConfig(_0x1a7fb1){const _0x3699c2=a124_0x4bf5,_0x594cd3=readRawConfig(_0x1a7fb1);return _0x594cd3[_0x3699c2(0x18c)]&&typeof _0x594cd3[_0x3699c2(0x18c)]===_0x3699c2(0x19b)&&initEnv(_0x594cd3[_0x3699c2(0x18c)]),_0x594cd3;}export function getConfigAppCode(){const _0x30fe60=a124_0x4bf5,_0xa4f129=readRawConfig();if(_0xa4f129[_0x30fe60(0x18f)]&&typeof _0xa4f129[_0x30fe60(0x18f)]===_0x30fe60(0x190)){const _0x3648cd=_0xa4f129['defaultApp'];if(_0x3648cd&&_0xa4f129[_0x30fe60(0x18f)][_0x3648cd]?.[_0x30fe60(0x192)])return String(_0xa4f129[_0x30fe60(0x18f)][_0x3648cd][_0x30fe60(0x192)])[_0x30fe60(0x182)]();const _0x1ed327=Object['values'](_0xa4f129[_0x30fe60(0x18f)])[0x0];if(_0x1ed327?.[_0x30fe60(0x192)])return String(_0x1ed327[_0x30fe60(0x192)])[_0x30fe60(0x182)]();}const _0x3969ee=_0xa4f129[_0x30fe60(0x192)]||_0xa4f129[_0x30fe60(0x184)];if(typeof _0x3969ee!=='string'||_0x3969ee[_0x30fe60(0x182)]()==='')return undefined;return _0x3969ee[_0x30fe60(0x182)]();}export function getMultiAppConfigs(){const _0x4b8f75=a124_0x4bf5,_0x27040f=readRawConfig(),_0x238ea7=_0x27040f['apps'];if(!_0x238ea7||typeof _0x238ea7!==_0x4b8f75(0x190)||Object[_0x4b8f75(0x183)](_0x238ea7)[_0x4b8f75(0x19a)]===0x0)return null;const _0x1870c5=_0x27040f[_0x4b8f75(0x198)];return Object[_0x4b8f75(0x18a)](_0x238ea7)[_0x4b8f75(0x18b)](([_0x19b3e9,_0x4d76b0])=>({'name':_0x19b3e9,'appcode':_0x4d76b0?.[_0x4b8f75(0x192)]||'','isDefault':_0x19b3e9===_0x1870c5,'env':_0x4d76b0?.[_0x4b8f75(0x18c)],'apiDir':_0x4d76b0?.[_0x4b8f75(0x186)],'cookie':_0x4d76b0?.[_0x4b8f75(0x18d)]||undefined}))[_0x4b8f75(0x185)](_0xfe4b73=>_0xfe4b73[_0x4b8f75(0x192)]);}export function getTemplateBaseUrl(){const _0xc8521f=a124_0x4bf5,_0x37ce6e=readRawConfig();if(_0x37ce6e['template_base_url']&&typeof _0x37ce6e[_0xc8521f(0x193)]===_0xc8521f(0x19b))return _0x37ce6e['template_base_url'][_0xc8521f(0x195)](/\/$/,'');return _0xc8521f(0x181);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4f6fff,_0x422f1e){const _0x5c8026=a125_0x118f,_0x220c6c=_0x4f6fff();while(!![]){try{const _0x4cb78d=-parseInt(_0x5c8026(0x166))/0x1*(-parseInt(_0x5c8026(0x16e))/0x2)+-parseInt(_0x5c8026(0x174))/0x3*(parseInt(_0x5c8026(0x165))/0x4)+-parseInt(_0x5c8026(0x173))/0x5+parseInt(_0x5c8026(0x16d))/0x6+parseInt(_0x5c8026(0x168))/0x7+-parseInt(_0x5c8026(0x16b))/0x8*(-parseInt(_0x5c8026(0x167))/0x9)+parseInt(_0x5c8026(0x171))/0xa*(parseInt(_0x5c8026(0x172))/0xb);if(_0x4cb78d===_0x422f1e)break;else _0x220c6c['push'](_0x220c6c['shift']());}catch(_0x34f22d){_0x220c6c['push'](_0x220c6c['shift']());}}}(a125_0x56ad,0xe9a45));import a125_0x14f01f from'node:path';function a125_0x118f(_0x4949c1,_0x255797){_0x4949c1=_0x4949c1-0x165;const _0x56ad88=a125_0x56ad();let _0x118f09=_0x56ad88[_0x4949c1];return _0x118f09;}import a125_0x42ffdc from'node:fs';export async function copyDirectory(_0x2439db,_0x5ea3fd){const _0x43b17b=a125_0x118f;try{const _0x2f1ac1=a125_0x42ffdc[_0x43b17b(0x16c)](_0x2439db,{'withFileTypes':!![]});a125_0x42ffdc[_0x43b17b(0x16f)](_0x5ea3fd,{'recursive':!![]});for(const _0x497202 of _0x2f1ac1){const _0xf1afd7=a125_0x14f01f[_0x43b17b(0x16a)](_0x2439db,_0x497202[_0x43b17b(0x176)]),_0x18ae0f=a125_0x14f01f[_0x43b17b(0x16a)](_0x5ea3fd,_0x497202[_0x43b17b(0x176)]);_0x497202[_0x43b17b(0x169)]()?await copyDirectory(_0xf1afd7,_0x18ae0f):a125_0x42ffdc['copyFileSync'](_0xf1afd7,_0x18ae0f);}}catch(_0x179700){console[_0x43b17b(0x175)](_0x43b17b(0x170),_0x179700);}}function a125_0x56ad(){const _0x1fdf8e=['180484wxQJly','39wxRJJH','9116532BsdaZN','4263231QAYXuU','isDirectory','join','8aEChKw','readdirSync','1798302mwOFxV','10448TjsnUd','mkdirSync','复制目录时出错:','3530CESmga','61589UZNTAq','6249010FumSxQ','126dcSxdn','error','name'];a125_0x56ad=function(){return _0x1fdf8e;};return a125_0x56ad();}
|
package/lib/utils/file-utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1a78b5,_0x55c498){const _0x2e76ab=a126_0x3a1b,_0xab7291=_0x1a78b5();while(!![]){try{const _0x40ef28=-parseInt(_0x2e76ab(0x13a))/0x1+parseInt(_0x2e76ab(0x135))/0x2+-parseInt(_0x2e76ab(0x137))/0x3+parseInt(_0x2e76ab(0x13c))/0x4*(-parseInt(_0x2e76ab(0x134))/0x5)+-parseInt(_0x2e76ab(0x138))/0x6+-parseInt(_0x2e76ab(0x139))/0x7+-parseInt(_0x2e76ab(0x133))/0x8*(-parseInt(_0x2e76ab(0x136))/0x9);if(_0x40ef28===_0x55c498)break;else _0xab7291['push'](_0xab7291['shift']());}catch(_0x371fcd){_0xab7291['push'](_0xab7291['shift']());}}}(a126_0x2e62,0xbc20f));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';function a126_0x2e62(){const _0x10c8c7=['4157667FybNLn','4378725psouRf','5636820YXifWp','174944hTbkkZ','506031SwYAqh','isDirectory','4CXfHMG','80FHqWOr','7499285MOTEBh','1161740LEPeKG'];a126_0x2e62=function(){return _0x10c8c7;};return a126_0x2e62();}import{join}from'node:path';function a126_0x3a1b(_0x2ad8d0,_0x2bdd5c){_0x2ad8d0=_0x2ad8d0-0x133;const _0x2e6222=a126_0x2e62();let _0x3a1b8f=_0x2e6222[_0x2ad8d0];return _0x3a1b8f;}export async function copyDir(_0xd79dc8,_0x4bf4d0){const _0x2600c4=a126_0x3a1b,_0x162134=statSync(_0xd79dc8);if(_0x162134[_0x2600c4(0x13b)]()){!existsSync(_0x4bf4d0)&&mkdirSync(_0x4bf4d0,{'recursive':!![]});const _0x23bf62=readdirSync(_0xd79dc8);for(const _0x23c04c of _0x23bf62){await copyDir(join(_0xd79dc8,_0x23c04c),join(_0x4bf4d0,_0x23c04c));}}else copyFileSync(_0xd79dc8,_0x4bf4d0);}export function ensureDir(_0x38a1c8){!existsSync(_0x38a1c8)&&mkdirSync(_0x38a1c8,{'recursive':!![]});}export function pathExists(_0x392094){return existsSync(_0x392094);}
|
package/lib/utils/guides-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a127_0x2a0978=a127_0x2156;(function(_0x4d4cb7,_0x1d6d65){const _0x3a074b=a127_0x2156,_0xce9b82=_0x4d4cb7();while(!![]){try{const _0xca731c=-parseInt(_0x3a074b(0xcd))/0x1+-parseInt(_0x3a074b(0xc4))/0x2+-parseInt(_0x3a074b(0xc5))/0x3*(-parseInt(_0x3a074b(0xc1))/0x4)+-parseInt(_0x3a074b(0xc2))/0x5*(-parseInt(_0x3a074b(0xd7))/0x6)+-parseInt(_0x3a074b(0xbf))/0x7*(-parseInt(_0x3a074b(0xcc))/0x8)+-parseInt(_0x3a074b(0xd5))/0x9+parseInt(_0x3a074b(0xbc))/0xa;if(_0xca731c===_0x1d6d65)break;else _0xce9b82['push'](_0xce9b82['shift']());}catch(_0x9709d){_0xce9b82['push'](_0xce9b82['shift']());}}}(a127_0x3efc,0x22559));import{mkdirSync,writeFileSync}from'node:fs';import{dirname,join}from'node:path';import{homedir}from'node:os';import{getTemplateBaseUrl}from'./config.js';function getGuidesCdnUrl(){const _0x4887b5=a127_0x2156,_0x60de2f=getTemplateBaseUrl();return _0x60de2f+_0x4887b5(0xd3);}const CACHE_DIR=join(homedir(),a127_0x2a0978(0xca),a127_0x2a0978(0xcf));export async function fetchGuidesFromCDN(){const _0x5a88ee=a127_0x2a0978,_0x5c2e0b=getGuidesCdnUrl(),_0x395d14=await fetch(_0x5c2e0b,{'headers':{'Accept':_0x5a88ee(0xb8)}});if(!_0x395d14['ok'])throw new Error(_0x5a88ee(0xc8)+_0x395d14[_0x5a88ee(0xc9)]+'\x20'+_0x395d14[_0x5a88ee(0xce)]);const _0x933843=await _0x395d14['json']();if(!_0x933843[_0x5a88ee(0xbe)]||typeof _0x933843['guides']!==_0x5a88ee(0xc0))throw new Error(_0x5a88ee(0xd1));return _0x933843;}export function writeGuidesToProject(_0x542524,_0x1f091f,_0x57b5e5=a127_0x2a0978(0xba),_0x40d505){const _0x3dc5ce=a127_0x2a0978,_0x22f4ea=join(_0x1f091f,_0x57b5e5);mkdirSync(_0x22f4ea,{'recursive':!![]});for(const [_0x1d24c4,_0x35b020]of Object['entries'](_0x542524['guides'])){let _0x25ed31=_0x35b020[_0x3dc5ce(0xbd)];_0x35b020[_0x3dc5ce(0xd9)]&&(_0x25ed31=appendUpdateTime(_0x25ed31,_0x35b020[_0x3dc5ce(0xd9)])),writeFileSync(join(_0x22f4ea,_0x1d24c4+'.md'),_0x25ed31,'utf-8');}}export function appendUpdateTime(_0x1522ec,_0x4101c3){const _0x54826c=a127_0x2a0978;return _0x1522ec=_0x1522ec[_0x54826c(0xbb)](/\n*>更新时间:.*$/m,''),_0x1522ec['trimEnd']()+(_0x54826c(0xd2)+_0x4101c3);}export function getSkillTemplate(_0x59bb80){const _0x246b1d=a127_0x2a0978;return _0x59bb80[_0x246b1d(0xc6)]?.['content']||'';}export function appendExtendContents(_0x207c44,_0x430147,_0x15a2f0){const _0xf2d92f=a127_0x2a0978,_0x595882=[];for(const [,_0x171b1d]of Object[_0xf2d92f(0xb9)](_0x430147[_0xf2d92f(0xbe)])){_0x171b1d[_0xf2d92f(0xd8)]&&_0x595882[_0xf2d92f(0xc3)](_0x171b1d[_0xf2d92f(0xd8)][_0xf2d92f(0xd0)]());}if(_0x595882['length']===0x0)return _0x207c44;return _0x207c44[_0xf2d92f(0xd0)]()+'\x0a\x0a'+_0x595882['join']('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x3c0df6,_0x224346,_0x26e816){const _0x4a02fe=a127_0x2a0978,_0x791677=getSkillTemplate(_0x3c0df6);if(!_0x791677)throw new Error(_0x4a02fe(0xd4));const _0x2257a6=dirname(_0x224346);mkdirSync(_0x2257a6,{'recursive':!![]});let _0x557fd3=_0x791677[_0x4a02fe(0xbb)](/\{\{IDE_NAME\}\}/g,_0x26e816);_0x557fd3=appendExtendContents(_0x557fd3,_0x3c0df6),_0x3c0df6[_0x4a02fe(0xc6)][_0x4a02fe(0xd9)]&&(_0x557fd3=appendUpdateTime(_0x557fd3,_0x3c0df6['skillTemplate']['lastUpdated'])),writeFileSync(_0x224346,_0x557fd3,_0x4a02fe(0xda));}export async function installGuides(_0xcbf2b4){const _0x158bbd=a127_0x2a0978,_0x4aef86=await fetchGuidesFromCDN();return writeGuidesToProject(_0x4aef86,_0xcbf2b4),Object[_0x158bbd(0xcb)](_0x4aef86[_0x158bbd(0xbe)])['length'];}function a127_0x3efc(){const _0x2f002a=['entries','.lovrabet/skill/guides','replace','335230zZiXIB','content','guides','49ZZwSDw','object','1015756WmvUIi','185oFZHAU','push','379556FCaBpr','3gmxTay','skillTemplate','title','CDN\x20请求失败:\x20','status','.lovrabet','keys','92048YXTYQE','207381KoOYjr','statusText','cache','trimEnd','CDN\x20返回数据格式错误','\x0a\x0a>更新时间:','/skills/guides.json','CDN\x20数据中缺少\x20skillTemplate','339372lCMAEX','map','33648dBNTgb','extendContent','lastUpdated','utf-8','application/json'];a127_0x3efc=function(){return _0x2f002a;};return a127_0x3efc();}function a127_0x2156(_0x5acbfa,_0xfd767a){_0x5acbfa=_0x5acbfa-0xb8;const _0x3efcb4=a127_0x3efc();let _0x215616=_0x3efcb4[_0x5acbfa];return _0x215616;}export function getGuidesSummary(_0x10af5f){const _0x59d198=a127_0x2a0978;return Object['entries'](_0x10af5f[_0x59d198(0xbe)])[_0x59d198(0xd6)](([_0x4c5111,_0x45e4c9])=>({'key':_0x4c5111,'title':_0x45e4c9[_0x59d198(0xc7)],'path':_0x45e4c9['path']}));}
|
package/lib/utils/http-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x488396,_0x1c5b1e){const _0x480e7f=a128_0x41c1,_0x5aaaf4=_0x488396();while(!![]){try{const _0x1878cb=parseInt(_0x480e7f(0x166))/0x1+-parseInt(_0x480e7f(0x15d))/0x2+-parseInt(_0x480e7f(0x162))/0x3*(parseInt(_0x480e7f(0x16d))/0x4)+-parseInt(_0x480e7f(0x174))/0x5*(parseInt(_0x480e7f(0x16f))/0x6)+parseInt(_0x480e7f(0x165))/0x7*(parseInt(_0x480e7f(0x168))/0x8)+parseInt(_0x480e7f(0x173))/0x9*(parseInt(_0x480e7f(0x167))/0xa)+-parseInt(_0x480e7f(0x160))/0xb;if(_0x1878cb===_0x1c5b1e)break;else _0x5aaaf4['push'](_0x5aaaf4['shift']());}catch(_0x1e6ec2){_0x5aaaf4['push'](_0x5aaaf4['shift']());}}}(a128_0x5905,0xacf1d));export async function httpRequest(_0x2ef1fd,_0x439f76={}){const _0x48f072=a128_0x41c1,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x439f76;let _0x15eee4=null;for(let _0x1c9acb=0x0;_0x1c9acb<=retries;_0x1c9acb++){try{const _0x173529=new AbortController(),_0x2b6a66=setTimeout(()=>_0x173529['abort'](),timeout),_0x5bd04a=await fetch(_0x2ef1fd,{'headers':headers,'signal':_0x173529['signal']});clearTimeout(_0x2b6a66);let _0x5cbfa7;const _0x1a64ec=_0x5bd04a[_0x48f072(0x15f)]['get'](_0x48f072(0x16c));return _0x1a64ec?.[_0x48f072(0x16a)]('application/json')?_0x5cbfa7=await _0x5bd04a['json']():_0x5cbfa7=await _0x5bd04a[_0x48f072(0x163)](),{'ok':_0x5bd04a['ok'],'status':_0x5bd04a[_0x48f072(0x175)],'statusText':_0x5bd04a['statusText'],'data':_0x5cbfa7,'headers':_0x5bd04a[_0x48f072(0x15f)],'url':_0x5bd04a[_0x48f072(0x15c)],'text':()=>_0x5bd04a[_0x48f072(0x163)]()};}catch(_0x41b0b2){_0x15eee4=_0x41b0b2 instanceof Error?_0x41b0b2:new Error(String(_0x41b0b2));if(_0x1c9acb===retries)break;if(shouldRetry(_0x41b0b2)){console[_0x48f072(0x170)](_0x48f072(0x16e)+retryDelay+'ms\x20后进行第\x20'+(_0x1c9acb+0x1)+_0x48f072(0x171)),await sleep(retryDelay);continue;}else break;}}throw _0x15eee4||new Error(_0x48f072(0x169));}function a128_0x41c1(_0x1e9612,_0x588e7e){_0x1e9612=_0x1e9612-0x15b;const _0x5905fd=a128_0x5905();let _0x41c136=_0x5905fd[_0x1e9612];return _0x41c136;}function a128_0x5905(){const _0x2d9eda=['36zrfmHy','3155YBnONE','status','ECONNRESET','fetch','url','1744284cxnnmO','name','headers','148324uGvfew','AbortError','111654uRiQiY','text','ENOTFOUND','7VIXDVU','1242287yEKELy','1173890oXvITj','8672520XOVdjV','Request\x20failed','includes','message','content-type','56HDHhYi','*\x20请求失败,','6474dElFoS','log','\x20次重试...','TypeError'];a128_0x5905=function(){return _0x2d9eda;};return a128_0x5905();}function shouldRetry(_0x18f18d){const _0x13719c=a128_0x41c1;if(_0x18f18d instanceof Error){if(_0x18f18d[_0x13719c(0x15e)]===_0x13719c(0x161))return![];if(_0x18f18d[_0x13719c(0x15e)]===_0x13719c(0x172)&&_0x18f18d[_0x13719c(0x16b)][_0x13719c(0x16a)](_0x13719c(0x15b)))return!![];if(_0x18f18d[_0x13719c(0x16b)]['includes'](_0x13719c(0x176)))return!![];if(_0x18f18d[_0x13719c(0x16b)][_0x13719c(0x16a)](_0x13719c(0x164)))return![];}return![];}function sleep(_0x15dd6c){return new Promise(_0x564ad0=>setTimeout(_0x564ad0,_0x15dd6c));}export function validateUrl(_0x1cfe40){try{return new URL(_0x1cfe40),!![];}catch{return![];}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a129_0x5765(_0x161349,_0x1112a3){_0x161349=_0x161349-0xbe;const _0x526c95=a129_0x526c();let _0x57658d=_0x526c95[_0x161349];return _0x57658d;}function a129_0x526c(){const _0x4fece8=['1617tEiEsi','840942PQAZxR','isRaw','true','798blEClq','277956zKEfNZ','7KjAHQu','setRawMode','39945diJpXY','427bbfPMh','68410SipNWR','1494392IapGSf','2423907Ddzyzh','140UpebJP','isTTY'];a129_0x526c=function(){return _0x4fece8;};return a129_0x526c();}(function(_0xba6df3,_0x166c74){const _0x2d6b3b=a129_0x5765,_0x3b2253=_0xba6df3();while(!![]){try{const _0x25f56b=parseInt(_0x2d6b3b(0xbf))/0x1*(-parseInt(_0x2d6b3b(0xc9))/0x2)+-parseInt(_0x2d6b3b(0xc6))/0x3+-parseInt(_0x2d6b3b(0xc3))/0x4*(parseInt(_0x2d6b3b(0xbe))/0x5)+-parseInt(_0x2d6b3b(0xca))/0x6+-parseInt(_0x2d6b3b(0xcb))/0x7*(-parseInt(_0x2d6b3b(0xc1))/0x8)+-parseInt(_0x2d6b3b(0xc2))/0x9+parseInt(_0x2d6b3b(0xc0))/0xa*(parseInt(_0x2d6b3b(0xc5))/0xb);if(_0x25f56b===_0x166c74)break;else _0x3b2253['push'](_0x3b2253['shift']());}catch(_0x5c7302){_0x3b2253['push'](_0x3b2253['shift']());}}}(a129_0x526c,0x23c2b));function env(_0x597e69){return process.env[`RABETBASE_${_0x597e69}`]||process.env[`LOVRABET_${_0x597e69}`]||undefined;}export function isNonInteractive(_0x194114){const _0x1040ca=a129_0x5765;return!!(_0x194114['nonInteractive']||_0x194114['ci']||env('CI')===_0x1040ca(0xc8)||process.env.CI===_0x1040ca(0xc8)||!process['stdout'][_0x1040ca(0xc4)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x52143c=a129_0x5765;if(!process['stdin'][_0x52143c(0xc4)])return![];try{const _0xbbb867=process['stdin'][_0x52143c(0xc7)];return process['stdin'][_0x52143c(0xcc)](!![]),process['stdin'][_0x52143c(0xcc)](_0xbbb867??![]),!![];}catch{return![];}}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a130_0x185aaf=a130_0x3271;(function(_0x27bbdd,_0x5ed1dc){const _0x4f259e=a130_0x3271,_0x3c75f3=_0x27bbdd();while(!![]){try{const _0x3fe432=-parseInt(_0x4f259e(0x13d))/0x1*(-parseInt(_0x4f259e(0x11c))/0x2)+-parseInt(_0x4f259e(0x144))/0x3*(parseInt(_0x4f259e(0x11b))/0x4)+-parseInt(_0x4f259e(0x146))/0x5+parseInt(_0x4f259e(0x14b))/0x6+-parseInt(_0x4f259e(0x126))/0x7*(parseInt(_0x4f259e(0x147))/0x8)+parseInt(_0x4f259e(0x14e))/0x9+parseInt(_0x4f259e(0x132))/0xa*(parseInt(_0x4f259e(0x115))/0xb);if(_0x3fe432===_0x5ed1dc)break;else _0x3c75f3['push'](_0x3c75f3['shift']());}catch(_0x4b4707){_0x3c75f3['push'](_0x3c75f3['shift']());}}}(a130_0x2fed,0x9f0e2));import a130_0x2f26d3 from'winston';import a130_0x3d107d from'node:fs';import a130_0x34c494 from'node:path';function a130_0x2fed(){const _0x3d0ab0=['1777530RlVLeF','toISOString','mkdirSync','9330840etCexp','combine','parse','timestamp','1287VMZqMA','format','createLogger','logFilePath','rawCommand','readLogs','42064JBqHCP','461444xqYFxC','logTask','command','filter','unknown','currentRawCommand','stringify','setLogPath','trim','utf8','2079auHUyR','开始执行:\x20','yellow','success','level','readFileSync','red','warn','File','split','info','error','132190XzxeJF','message','.lovrabet.log','join','printf','getWinstonInstance','existsSync','winstonLogger','initWinstonLogger','blue','失败:\x20','3rGDYnh','green','log','Failed\x20to\x20read\x20logs:','now','setRawCommand','addColors','354nIHaOv','clearLogs','2957575KAAQOF','29304jHqcLl','Failed\x20to\x20clear\x20logs:','writeFileSync','duration'];a130_0x2fed=function(){return _0x3d0ab0;};return a130_0x2fed();}function a130_0x3271(_0x4191b0,_0x37b9dc){_0x4191b0=_0x4191b0-0x112;const _0x2fedca=a130_0x2fed();let _0x327192=_0x2fedca[_0x4191b0];return _0x327192;}class Logger{[a130_0x185aaf(0x139)];[a130_0x185aaf(0x118)];[a130_0x185aaf(0x121)]='';constructor(){this['logFilePath']='';}[a130_0x185aaf(0x142)](_0x1b21ca){const _0x15e3a0=a130_0x185aaf;this[_0x15e3a0(0x121)]=_0x1b21ca;}['initWinstonLogger'](){const _0x356fbf=a130_0x185aaf,_0x198f63=a130_0x34c494['dirname'](this['logFilePath']);!a130_0x3d107d[_0x356fbf(0x138)](_0x198f63)&&a130_0x3d107d[_0x356fbf(0x14d)](_0x198f63,{'recursive':!![]});const _0x2f3632=a130_0x2f26d3[_0x356fbf(0x116)][_0x356fbf(0x112)](a130_0x2f26d3[_0x356fbf(0x116)][_0x356fbf(0x114)](),a130_0x2f26d3['format']['errors']({'stack':!![]}),a130_0x2f26d3[_0x356fbf(0x116)][_0x356fbf(0x136)](_0xbc10fd=>{const _0x569430=_0x356fbf,_0x3b0586={'timestamp':_0xbc10fd['timestamp']||new Date()[_0x569430(0x14c)](),'level':_0xbc10fd[_0x569430(0x12a)]||_0x569430(0x130),'command':_0xbc10fd[_0x569430(0x11e)]||_0x569430(0x120),'rawCommand':_0xbc10fd[_0x569430(0x119)]||this['currentRawCommand']||undefined,'message':_0xbc10fd[_0x569430(0x133)]||'','duration':_0xbc10fd[_0x569430(0x14a)]||undefined,'details':_0xbc10fd['details']||undefined};return JSON[_0x569430(0x122)](_0x3b0586);}));this['winstonLogger']=a130_0x2f26d3[_0x356fbf(0x117)]({'level':_0x356fbf(0x130),'format':_0x2f3632,'transports':[new a130_0x2f26d3['transports'][(_0x356fbf(0x12e))]({'filename':this[_0x356fbf(0x118)],'level':_0x356fbf(0x130)})],'silent':![]}),a130_0x2f26d3[_0x356fbf(0x143)]({'success':_0x356fbf(0x13e),'error':_0x356fbf(0x12c),'warn':_0x356fbf(0x128),'info':_0x356fbf(0x13b)});}[a130_0x185aaf(0x123)](_0x3cc8fc){const _0x4fdaca=a130_0x185aaf;this[_0x4fdaca(0x118)]=a130_0x34c494[_0x4fdaca(0x135)](_0x3cc8fc,_0x4fdaca(0x134)),this[_0x4fdaca(0x139)]&&this[_0x4fdaca(0x139)]['clear'](),this[_0x4fdaca(0x13a)]();}[a130_0x185aaf(0x130)](_0x4a7644,_0x4b7bd2,_0x5848c4){const _0x4f54ac=a130_0x185aaf;if(!this[_0x4f54ac(0x118)]||!this['winstonLogger'])return;this['winstonLogger']['info'](_0x4b7bd2,{'command':_0x4a7644,'details':_0x5848c4});}['success'](_0x254ce4,_0x3ac428,_0x571033,_0x2d61bc){const _0x5776ea=a130_0x185aaf;if(!this[_0x5776ea(0x118)]||!this['winstonLogger'])return;this[_0x5776ea(0x139)][_0x5776ea(0x13f)]('info',_0x3ac428,{'level':_0x5776ea(0x129),'command':_0x254ce4,'duration':_0x571033,'details':_0x2d61bc});}[a130_0x185aaf(0x131)](_0x5d6130,_0x507a86,_0x4912a6){const _0x292248=a130_0x185aaf;if(!this[_0x292248(0x118)]||!this[_0x292248(0x139)])return;this[_0x292248(0x139)][_0x292248(0x131)](_0x507a86,{'command':_0x5d6130,'details':_0x4912a6});}[a130_0x185aaf(0x12d)](_0xb1f7f8,_0x434b88,_0x315afd){const _0x9318ab=a130_0x185aaf;if(!this[_0x9318ab(0x118)]||!this[_0x9318ab(0x139)])return;this['winstonLogger']['warn'](_0x434b88,{'command':_0xb1f7f8,'details':_0x315afd});}async[a130_0x185aaf(0x11d)](_0x1afcab,_0x35ecbb,_0x23f7a4){const _0x12048b=a130_0x185aaf,_0x3d630b=Date[_0x12048b(0x141)]();this[_0x12048b(0x130)](_0x1afcab,_0x12048b(0x127)+_0x35ecbb);try{const _0x21bdc2=await _0x23f7a4(),_0x3dc683=Date[_0x12048b(0x141)]()-_0x3d630b;return this[_0x12048b(0x129)](_0x1afcab,'完成:\x20'+_0x35ecbb,_0x3dc683),_0x21bdc2;}catch(_0x50444d){const _0x42a8c3=Date[_0x12048b(0x141)]()-_0x3d630b;this['error'](_0x1afcab,_0x12048b(0x13c)+_0x35ecbb,{'error':_0x50444d instanceof Error?_0x50444d[_0x12048b(0x133)]:String(_0x50444d),'duration':_0x42a8c3});throw _0x50444d;}}[a130_0x185aaf(0x11a)](){const _0x5ce8d2=a130_0x185aaf;try{if(!a130_0x3d107d[_0x5ce8d2(0x138)](this[_0x5ce8d2(0x118)]))return[];const _0x4dfa18=a130_0x3d107d[_0x5ce8d2(0x12b)](this[_0x5ce8d2(0x118)],_0x5ce8d2(0x125));return _0x4dfa18[_0x5ce8d2(0x12f)]('\x0a')[_0x5ce8d2(0x11f)](_0x34f9b3=>_0x34f9b3[_0x5ce8d2(0x124)]())['map'](_0x175613=>JSON[_0x5ce8d2(0x113)](_0x175613));}catch(_0x5399e6){return console[_0x5ce8d2(0x12d)](_0x5ce8d2(0x140),_0x5399e6),[];}}[a130_0x185aaf(0x145)](){const _0x49aa9a=a130_0x185aaf;try{a130_0x3d107d[_0x49aa9a(0x138)](this[_0x49aa9a(0x118)])&&a130_0x3d107d[_0x49aa9a(0x149)](this[_0x49aa9a(0x118)],'',_0x49aa9a(0x125));}catch(_0x359c3f){console[_0x49aa9a(0x12d)](_0x49aa9a(0x148),_0x359c3f);}}[a130_0x185aaf(0x137)](){const _0x477e34=a130_0x185aaf;return this[_0x477e34(0x139)];}}export const logger=new Logger();
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a131_0x2bd3ad=a131_0x848c;function a131_0xc637(){const _0x104cb1=['250048YIqiFp','win32','298596ZCzfWN','2326313mzFAED','457428rTTXXk','4nlTlLo','.cmd','20IhOYSh','76863qXmEca','7qeylxp','1513265rhjgUo','3177HZKcDv','5392QYeGFV'];a131_0xc637=function(){return _0x104cb1;};return a131_0xc637();}(function(_0x4380a3,_0xbac2dc){const _0x1b21e5=a131_0x848c,_0x2caf3a=_0x4380a3();while(!![]){try{const _0x48c7f3=parseInt(_0x1b21e5(0xda))/0x1+-parseInt(_0x1b21e5(0xd2))/0x2*(parseInt(_0x1b21e5(0xd5))/0x3)+parseInt(_0x1b21e5(0xcf))/0x4+-parseInt(_0x1b21e5(0xd7))/0x5+parseInt(_0x1b21e5(0xd1))/0x6*(parseInt(_0x1b21e5(0xd6))/0x7)+parseInt(_0x1b21e5(0xd9))/0x8*(-parseInt(_0x1b21e5(0xd8))/0x9)+-parseInt(_0x1b21e5(0xd4))/0xa*(-parseInt(_0x1b21e5(0xd0))/0xb);if(_0x48c7f3===_0xbac2dc)break;else _0x2caf3a['push'](_0x2caf3a['shift']());}catch(_0x57b183){_0x2caf3a['push'](_0x2caf3a['shift']());}}}(a131_0xc637,0x38a94));function a131_0x848c(_0x20f895,_0x172c9b){_0x20f895=_0x20f895-0xcf;const _0xc637b=a131_0xc637();let _0x848cd1=_0xc637b[_0x20f895];return _0x848cd1;}export const isWindows=process['platform']===a131_0x2bd3ad(0xdb);export function resolveNpmBin(_0x32d106){const _0x4d434c=a131_0x2bd3ad;return isWindows?_0x32d106+_0x4d434c(0xd3):_0x32d106;}
|
package/lib/utils/rules-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a132_0x111262=a132_0xdf92;(function(_0x325808,_0x1523cb){const _0x152ea9=a132_0xdf92,_0x28831b=_0x325808();while(!![]){try{const _0x483070=parseInt(_0x152ea9(0x1b4))/0x1+-parseInt(_0x152ea9(0x1a0))/0x2*(parseInt(_0x152ea9(0x1ae))/0x3)+parseInt(_0x152ea9(0x19c))/0x4*(-parseInt(_0x152ea9(0x1a9))/0x5)+-parseInt(_0x152ea9(0x1b5))/0x6*(parseInt(_0x152ea9(0x1a5))/0x7)+parseInt(_0x152ea9(0x1aa))/0x8*(parseInt(_0x152ea9(0x1a4))/0x9)+-parseInt(_0x152ea9(0x1a3))/0xa+parseInt(_0x152ea9(0x1a8))/0xb*(parseInt(_0x152ea9(0x1b2))/0xc);if(_0x483070===_0x1523cb)break;else _0x28831b['push'](_0x28831b['shift']());}catch(_0x25eec7){_0x28831b['push'](_0x28831b['shift']());}}}(a132_0x5620,0x58b7e));import{existsSync,mkdirSync,readFileSync,writeFileSync}from'node:fs';import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';import{getTemplateBaseUrl}from'./config.js';import{appendUpdateTime}from'./guides-cdn.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function getRulesCdnUrl(){const _0x4ec89e=a132_0xdf92,_0x5d4254=getTemplateBaseUrl();return _0x5d4254+_0x4ec89e(0x1ab);}const LOCAL_TEMPLATE_PATH=resolve(__dirname,a132_0x111262(0x1b1));export async function fetchRulesFromCDN(){const _0x301b5e=a132_0x111262,_0x15a461=getRulesCdnUrl(),_0x424ea4=await fetch(_0x15a461,{'headers':{'Accept':_0x301b5e(0x1b0)}});if(!_0x424ea4['ok'])throw new Error('CDN\x20请求失败:\x20'+_0x424ea4[_0x301b5e(0x19b)]+'\x20'+_0x424ea4[_0x301b5e(0x1af)]);const _0x3331fa=await _0x424ea4[_0x301b5e(0x19d)]();if(!_0x3331fa[_0x301b5e(0x19f)]||typeof _0x3331fa[_0x301b5e(0x19f)]!==_0x301b5e(0x19e))throw new Error(_0x301b5e(0x1ad));return _0x3331fa;}export async function getRulesContent(){try{const _0x10d5b7=await fetchRulesFromCDN();return _0x10d5b7['content'];}catch{return readLocalTemplate();}}function a132_0xdf92(_0x1859da,_0x5b1c9b){_0x1859da=_0x1859da-0x19b;const _0x56202f=a132_0x5620();let _0xdf923f=_0x56202f[_0x1859da];return _0xdf923f;}export function readLocalTemplate(){const _0x45dde7=a132_0x111262;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,'utf-8');throw new Error(_0x45dde7(0x1b3)+LOCAL_TEMPLATE_PATH);}export async function writeRulesFile(_0x1e4e07){const _0x4f2f90=a132_0x111262,_0x406ef5=await fetchRulesFromCDN()[_0x4f2f90(0x1a7)](()=>null);let _0x4dd249;_0x406ef5?(_0x4dd249=_0x406ef5['content'],_0x406ef5[_0x4f2f90(0x1a2)]&&(_0x4dd249=appendUpdateTime(_0x4dd249,_0x406ef5['lastUpdated']))):_0x4dd249=readLocalTemplate();const _0x5075ba=dirname(_0x1e4e07);!existsSync(_0x5075ba)&&mkdirSync(_0x5075ba,{'recursive':!![]}),writeFileSync(_0x1e4e07,_0x4dd249,_0x4f2f90(0x1ac));}export async function copyRulesToCursor(_0x3c0c95){const _0x1cbf44=a132_0x111262,_0x5a7d27=join(_0x3c0c95,_0x1cbf44(0x1a6)),_0x2b0f07=join(_0x5a7d27,'lovrabet_rules.mdc');if(existsSync(_0x2b0f07))return![];return await writeRulesFile(_0x2b0f07),!![];}function a132_0x5620(){const _0x21e898=['104316CcKQyL','status','636gagDtf','json','string','content','408948ZtOhpI','agents.md','lastUpdated','453990STEfXc','126135NmDInF','28hztmZO','.cursor/rules','catch','11fupxwB','4685TSfwLN','200ELDAJz','/rules/rules.json','utf-8','CDN\x20返回数据格式错误','9sJbNAc','statusText','application/json','../../templates/rules/lovrabet_rules.mdc.tpl','7089828dqTFXW','本地模板文件不存在:\x20','299544aiSJGi'];a132_0x5620=function(){return _0x21e898;};return a132_0x5620();}export async function copyRulesToAgentsMd(_0x4472d8){const _0x553102=a132_0x111262,_0x188957=join(_0x4472d8,_0x553102(0x1a1));if(existsSync(_0x188957))return![];return await writeRulesFile(_0x188957),!![];}
|
package/lib/utils/sleep.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function sleep(
|
|
1
|
+
export function sleep(_0x5963fb){return new Promise(_0x3048a7=>setTimeout(_0x3048a7,_0x5963fb));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a134_0x592bfe=a134_0xd079;(function(_0x186fd2,_0x5b7b6c){const _0x43f5bc=a134_0xd079,_0x18f147=_0x186fd2();while(!![]){try{const _0x40427b=-parseInt(_0x43f5bc(0xfe))/0x1+parseInt(_0x43f5bc(0xfc))/0x2*(parseInt(_0x43f5bc(0x113))/0x3)+parseInt(_0x43f5bc(0xec))/0x4*(-parseInt(_0x43f5bc(0x126))/0x5)+parseInt(_0x43f5bc(0x107))/0x6+parseInt(_0x43f5bc(0x12b))/0x7*(parseInt(_0x43f5bc(0xf1))/0x8)+parseInt(_0x43f5bc(0x117))/0x9*(parseInt(_0x43f5bc(0xf0))/0xa)+parseInt(_0x43f5bc(0x11d))/0xb*(-parseInt(_0x43f5bc(0x114))/0xc);if(_0x40427b===_0x5b7b6c)break;else _0x18f147['push'](_0x18f147['shift']());}catch(_0x31fbb5){_0x18f147['push'](_0x18f147['shift']());}}}(a134_0x4b9e,0xb84d4));import a134_0x206aa2 from'node:fs';import a134_0x1f22c6 from'node:path';function a134_0xd079(_0x2787f9,_0x48ebdf){_0x2787f9=_0x2787f9-0xea;const _0x4b9e51=a134_0x4b9e();let _0xd07938=_0x4b9e51[_0x2787f9];return _0xd07938;}import{createRequire}from'node:module';import{logger}from'./logger.js';const require=createRequire(import.meta.url),CLI_VERSION=require(a134_0x592bfe(0xef))['version'];export class TemplateReplacer{static['toComponentName'](_0x1762a){const _0x2b8920=a134_0x592bfe,_0x248dbc=_0x1762a[_0x2b8920(0x10f)]('/')[_0x2b8920(0x122)]()||_0x1762a;return _0x248dbc[_0x2b8920(0x10f)]('-')[_0x2b8920(0x11f)](_0xe499f7=>_0xe499f7[_0x2b8920(0x128)](0x0)[_0x2b8920(0x104)]()+_0xe499f7['slice'](0x1)[_0x2b8920(0x125)]())['join']('');}static[a134_0x592bfe(0x124)](_0x523cba){const _0x312aad=a134_0x592bfe,_0x215d5c=_0x523cba['split']('/')[_0x312aad(0x122)]()||_0x523cba;return _0x215d5c[_0x312aad(0x10f)]('-')['map'](_0xd99c2f=>_0xd99c2f[_0x312aad(0x128)](0x0)['toUpperCase']()+_0xd99c2f['slice'](0x1)[_0x312aad(0x125)]())[_0x312aad(0x12c)]('\x20');}static[a134_0x592bfe(0x108)](_0x46d4e1,_0x2d4e75,_0xde26ae){const _0x1e3b40=a134_0x592bfe,_0x4435b5=this[_0x1e3b40(0x120)](_0x2d4e75),_0x2d6c20=this[_0x1e3b40(0x124)](_0x2d4e75),_0x489078=new Date(),_0x1bdff8=_0x489078[_0x1e3b40(0xf6)](undefined,{'year':'numeric','month':_0x1e3b40(0x111),'day':'2-digit','hour':_0x1e3b40(0x111),'minute':_0x1e3b40(0x111),'second':_0x1e3b40(0x111),'hour12':![]})[_0x1e3b40(0x12a)](/\//g,'-'),_0x1db81c=_0x489078[_0x1e3b40(0x11e)](undefined,{'year':'numeric','month':_0x1e3b40(0x111),'day':_0x1e3b40(0x111)})[_0x1e3b40(0x12a)](/\//g,'-'),_0x1fcd3e=_0x489078[_0x1e3b40(0xf4)](undefined,{'hour12':![]});let _0x329c58=_0x46d4e1[_0x1e3b40(0x12a)](/\{CliVersion\}/g,CLI_VERSION)[_0x1e3b40(0x12a)](/\{ComponentName\}/g,_0x4435b5)[_0x1e3b40(0x12a)](/\{DisplayTitle\}/g,_0x2d6c20)[_0x1e3b40(0x12a)](/\{PageName\}/g,_0x2d4e75)[_0x1e3b40(0x12a)](/\{TemplateName\}/g,_0xde26ae)['replace'](/\{CreatedAt\}/g,_0x1bdff8)[_0x1e3b40(0x12a)](/\{CreatedDate\}/g,_0x1db81c)[_0x1e3b40(0x12a)](/\{CreatedTime\}/g,_0x1fcd3e);return _0x329c58;}static['replaceApiContent'](_0x1bb996,_0xca89ac,_0x3be40c,_0x28373d,_0x449201,_0x2a40b7,_0x1db956,_0x4f0d34){const _0x169e28=a134_0x592bfe,_0x46dda1=new Date(),_0xcc099a=_0x46dda1[_0x169e28(0xee)](),_0x2dc6c5=_0x3be40c[_0x169e28(0x11f)](_0x4e767c=>{const _0x42b03f=_0x169e28,_0xa8e497=[_0x42b03f(0x10d)+_0x4e767c[_0x42b03f(0xeb)]+'\x22','tableName:\x20\x22'+_0x4e767c[_0x42b03f(0xfb)]+'\x22','name:\x20\x22'+_0x4e767c[_0x42b03f(0x115)]+'\x22'];return _0x4e767c[_0x42b03f(0x12d)]&&_0xa8e497[_0x42b03f(0xea)](_0x42b03f(0x105)+_0x4e767c['alias']+'\x22'),'\x0a\x20\x20\x20\x20{\x20'+_0xa8e497['join'](',\x20')+_0x42b03f(0x102);})['join'](''),_0x103144=_0x28373d||_0x3be40c[0x0]?.[_0x169e28(0x12d)]||'YourModel';let _0x5319de=_0x1bb996[_0x169e28(0x12a)](/\{AppCode\}/g,_0xca89ac)[_0x169e28(0x12a)](/\{ModelConfigs\}/g,_0x2dc6c5)[_0x169e28(0x12a)](/\{ExampleModelName\}/g,_0x103144)[_0x169e28(0x12a)](/\{ApiFileName\}/g,_0x449201||'api')[_0x169e28(0x12a)](/\{ConfigName\}/g,_0x2a40b7||'default')[_0x169e28(0x12a)](/\{ClientConfigParam\}/g,_0x1db956||'')[_0x169e28(0x12a)](/\{VarPrefix\}/g,_0x4f0d34||_0x169e28(0x11a))[_0x169e28(0x12a)](/\{CreatedAt\}/g,_0xcc099a);return _0x5319de;}static async[a134_0x592bfe(0x10a)](_0x493166,_0x360d81,_0x2da9ea,_0x4e0b42,_0x35c5a0=!![]){const _0x38f530=a134_0x592bfe,_0x42c36c=Date[_0x38f530(0xfd)]();try{_0x35c5a0&&logger[_0x38f530(0xed)]('template',_0x38f530(0x123),{'templatePath':_0x493166,'targetPath':_0x360d81,'pageName':_0x2da9ea,'templateName':_0x4e0b42});await a134_0x206aa2[_0x38f530(0xf8)][_0x38f530(0xf5)](_0x360d81,{'recursive':!![]}),await this[_0x38f530(0x116)](_0x493166,_0x360d81,_0x2da9ea,_0x4e0b42);if(_0x35c5a0){const _0xb6456f=Date['now']()-_0x42c36c;logger[_0x38f530(0xfa)](_0x38f530(0x106),_0x38f530(0xf9),_0xb6456f,{'pageName':_0x2da9ea,'templateName':_0x4e0b42});}}catch(_0x405ad2){if(_0x35c5a0){const _0x2db2d3=Date[_0x38f530(0xfd)]()-_0x42c36c;logger[_0x38f530(0xff)](_0x38f530(0x106),_0x38f530(0xf7),{'templatePath':_0x493166,'targetPath':_0x360d81,'pageName':_0x2da9ea,'templateName':_0x4e0b42,'error':_0x405ad2 instanceof Error?_0x405ad2[_0x38f530(0x10e)]:String(_0x405ad2),'duration':_0x2db2d3});}throw _0x405ad2;}}static async[a134_0x592bfe(0x116)](_0xf72ffb,_0x14e56c,_0x2f9176,_0x22459c){const _0x20500b=a134_0x592bfe,_0x5754cb=await a134_0x206aa2[_0x20500b(0xf8)]['readdir'](_0xf72ffb,{'withFileTypes':!![]});for(const _0x22f669 of _0x5754cb){const _0x4d46c4=a134_0x1f22c6[_0x20500b(0x12c)](_0xf72ffb,_0x22f669[_0x20500b(0x115)]);let _0x2b78bf=a134_0x1f22c6['join'](_0x14e56c,_0x22f669[_0x20500b(0x115)]);_0x22f669['name'][_0x20500b(0x103)]('.tpl')&&(_0x2b78bf=a134_0x1f22c6[_0x20500b(0x12c)](_0x14e56c,_0x22f669[_0x20500b(0x115)][_0x20500b(0x12a)](/\.tpl$/,'')));if(_0x22f669['isDirectory']())await a134_0x206aa2[_0x20500b(0xf8)]['mkdir'](_0x2b78bf,{'recursive':!![]}),await this[_0x20500b(0x116)](_0x4d46c4,_0x2b78bf,_0x2f9176,_0x22459c);else _0x22f669[_0x20500b(0x11c)]()&&await this[_0x20500b(0x100)](_0x4d46c4,_0x2b78bf,_0x2f9176,_0x22459c);}}static async[a134_0x592bfe(0x100)](_0x2e3fdf,_0x428120,_0xfaceb2,_0x53816a){const _0x4c6651=a134_0x592bfe,_0x1f144e=a134_0x1f22c6[_0x4c6651(0x118)](_0x2e3fdf)[_0x4c6651(0x125)]();_0x2e3fdf[_0x4c6651(0x103)](_0x4c6651(0x112))&&(_0x428120=_0x428120[_0x4c6651(0x12a)](/\.tpl$/,''));const _0x24e443=[_0x4c6651(0x10b),_0x4c6651(0xf3),_0x4c6651(0x127),_0x4c6651(0x11b),_0x4c6651(0x101),_0x4c6651(0x109),'.css',_0x4c6651(0x119),_0x4c6651(0x112)];if(_0x24e443[_0x4c6651(0x129)](_0x1f144e)||_0x2e3fdf['endsWith'](_0x4c6651(0x112))){const _0x5a6f0b=await a134_0x206aa2['promises'][_0x4c6651(0x110)](_0x2e3fdf,_0x4c6651(0x121)),_0x16775c=this[_0x4c6651(0x108)](_0x5a6f0b,_0xfaceb2,_0x53816a);await a134_0x206aa2['promises'][_0x4c6651(0xf2)](_0x428120,_0x16775c,'utf8');}else await a134_0x206aa2[_0x4c6651(0xf8)][_0x4c6651(0x10c)](_0x2e3fdf,_0x428120);}}function a134_0x4b9e(){const _0x542f6b=['replace','4525829bRrqIm','join','alias','push','datasetCode','5155548qPLNXr','info','toISOString','../../package.json','70uZVako','8GJpoBX','writeFile','.ts','toLocaleTimeString','mkdir','toLocaleString','模板内容替换失败','promises','模板内容替换完成','success','tableName','969562JugAIu','now','173181xCDYmK','error','processFile','.json','\x20},','endsWith','toUpperCase','alias:\x20\x22','template','7812354kJcRvb','replaceContent','.md','processTemplate','.tsx','copyFile','datasetCode:\x20\x22','message','split','readFile','2-digit','.tpl','6NoArgJ','6610056xHEJsu','name','processDirectory','1223118rCZwaJ','extname','.scss','LOVRABET','.js','isFile','33mZzICo','toLocaleDateString','map','toComponentName','utf8','pop','开始处理模板内容替换','toDisplayTitle','toLowerCase','5xRsXmz','.jsx','charAt','includes'];a134_0x4b9e=function(){return _0x542f6b;};return a134_0x4b9e();}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x9e3c61,_0x74770){const _0x4710ec=a135_0x165a,_0x2fdbeb=_0x9e3c61();while(!![]){try{const _0x174abc=parseInt(_0x4710ec(0x175))/0x1*(-parseInt(_0x4710ec(0x17d))/0x2)+parseInt(_0x4710ec(0x183))/0x3*(parseInt(_0x4710ec(0x179))/0x4)+-parseInt(_0x4710ec(0x17c))/0x5+parseInt(_0x4710ec(0x184))/0x6*(parseInt(_0x4710ec(0x17f))/0x7)+parseInt(_0x4710ec(0x17b))/0x8+parseInt(_0x4710ec(0x182))/0x9*(-parseInt(_0x4710ec(0x178))/0xa)+parseInt(_0x4710ec(0x180))/0xb;if(_0x174abc===_0x74770)break;else _0x2fdbeb['push'](_0x2fdbeb['shift']());}catch(_0xc0b0df){_0x2fdbeb['push'](_0x2fdbeb['shift']());}}}(a135_0x11b9,0x3914d));function a135_0x165a(_0x2aa061,_0x189d14){_0x2aa061=_0x2aa061-0x175;const _0x11b920=a135_0x11b9();let _0x165aee=_0x11b920[_0x2aa061];return _0x165aee;}import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';let _cached='';export function getCliVersion(){const _0x4e455a=a135_0x165a;if(_cached)return _cached;try{const _0x57beba=fileURLToPath(import.meta.url),_0xda9f8e=resolve(dirname(_0x57beba),_0x4e455a(0x177)),_0x491bda=JSON[_0x4e455a(0x181)](readFileSync(resolve(_0xda9f8e,_0x4e455a(0x17a)),_0x4e455a(0x176)));_cached=_0x491bda['version']||_0x4e455a(0x17e);}catch{_cached='0.0.0';}return _cached;}function a135_0x11b9(){const _0x1affb6=['539376EFNkeL','948440hBWkOp','8776sfmwwi','0.0.0','193949DxawHt','8775767blLwoc','parse','5013gXXvun','659361zBgYff','6uvcGLa','87zImxCg','utf8','../..','5520AXYqHm','4MxsEYM','package.json'];a135_0x11b9=function(){return _0x1affb6;};return a135_0x11b9();}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x13e2c9,_0x3f80ee){var _0x5089e9=a136_0x2d90,_0x11aa6b=_0x13e2c9();while(!![]){try{var _0x2a7b7f=parseInt(_0x5089e9(0x6c))/0x1+parseInt(_0x5089e9(0x71))/0x2+parseInt(_0x5089e9(0x6f))/0x3*(parseInt(_0x5089e9(0x6e))/0x4)+parseInt(_0x5089e9(0x6d))/0x5*(parseInt(_0x5089e9(0x74))/0x6)+-parseInt(_0x5089e9(0x73))/0x7+parseInt(_0x5089e9(0x75))/0x8+-parseInt(_0x5089e9(0x70))/0x9*(parseInt(_0x5089e9(0x72))/0xa);if(_0x2a7b7f===_0x3f80ee)break;else _0x11aa6b['push'](_0x11aa6b['shift']());}catch(_0x3e26e5){_0x11aa6b['push'](_0x11aa6b['shift']());}}}(a136_0x3c2b,0x5c873));import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';function a136_0x2d90(_0x93bced,_0x3e068c){_0x93bced=_0x93bced-0x6c;var _0x3c2b26=a136_0x3c2b();var _0x2d904a=_0x3c2b26[_0x93bced];return _0x2d904a;}export async function withActiveCookie(_0x2cf66e,_0x3d6ed5){setActiveCookie(_0x2cf66e);try{return await _0x3d6ed5();}finally{clearActiveCookie();}}function a136_0x3c2b(){var _0x2ac391=['108095mPfAYN','1916vBYOLm','4227rDKalT','72eiuHzI','311836EWycZf','1445440FQVxvO','513870ElQpje','18FxlpDp','4844392zYLoVY','107522pZjDWA'];a136_0x3c2b=function(){return _0x2ac391;};return a136_0x3c2b();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lovrabet/rabetbase-cli",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4-beta.4",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
"node": ">=20"
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|
|
19
|
-
"prebuild": "node scripts/
|
|
19
|
+
"prebuild": "node scripts/generate-build-info.js",
|
|
20
20
|
"build": "rm -rf lib && tsc && javascript-obfuscator lib --output lib",
|
|
21
|
-
"prebuild:dev": "node scripts/
|
|
21
|
+
"prebuild:dev": "node scripts/generate-build-info.js",
|
|
22
22
|
"build:dev": "rm -rf lib && tsc",
|
|
23
23
|
"start": "tsc --watch",
|
|
24
24
|
"sync-template": "node scripts/sync-template.js",
|
|
25
|
-
"beta-release": "
|
|
26
|
-
"release": "
|
|
25
|
+
"beta-release": "sh scripts/update-beta-version.sh && bun run build && git push && git push origin --tag && bun publish --tag beta",
|
|
26
|
+
"release": "sh scripts/update-latest-version.sh && bun run build && git push && git push origin --tag && bun publish",
|
|
27
27
|
"test": "vitest run",
|
|
28
28
|
"test:run": "vitest run",
|
|
29
29
|
"test:coverage": "vitest run --coverage",
|
|
@@ -51,29 +51,25 @@
|
|
|
51
51
|
],
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@inquirer/prompts": "^8.3.2",
|
|
54
|
-
"@types/winston": "^2.4.4",
|
|
55
54
|
"@lovrabet/otel-logger": "1.0.1-beta.2",
|
|
55
|
+
"@types/winston": "^2.4.4",
|
|
56
56
|
"chalk": "^5.6.2",
|
|
57
57
|
"execa": "^9.6.0",
|
|
58
|
-
"ink": "^6.2.3",
|
|
59
|
-
"ink-spinner": "^5.0.0",
|
|
60
|
-
"javascript-obfuscator": "^4.1.1",
|
|
61
58
|
"listr": "^0.14.3",
|
|
62
59
|
"meow": "^13.2.0",
|
|
63
60
|
"ora": "^9.3.0",
|
|
64
61
|
"prettier": "^3.6.2",
|
|
65
|
-
"react": "^19.2.0",
|
|
66
62
|
"semver": "^7.7.3",
|
|
67
63
|
"winston": "^3.17.0"
|
|
68
64
|
},
|
|
69
65
|
"devDependencies": {
|
|
70
66
|
"@types/listr": "^0.14.9",
|
|
71
67
|
"@types/node": "^24.5.2",
|
|
72
|
-
"@types/react": "^19.2.0",
|
|
73
68
|
"@types/semver": "^7.7.1",
|
|
74
69
|
"@vitest/coverage-v8": "^3.2.4",
|
|
75
70
|
"@vitest/ui": "^3.2.4",
|
|
76
71
|
"c8": "^10.1.3",
|
|
72
|
+
"javascript-obfuscator": "^5.4.1",
|
|
77
73
|
"typescript": "latest",
|
|
78
74
|
"vitest": "^3.2.4"
|
|
79
75
|
}
|
package/lib/commands/app.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0x13c27e,_0x581734){const _0x43c8d5=a16_0x3ef0,_0x6990c4=_0x13c27e();while(!![]){try{const _0x192a17=parseInt(_0x43c8d5(0x203))/0x1+parseInt(_0x43c8d5(0x211))/0x2*(-parseInt(_0x43c8d5(0x219))/0x3)+-parseInt(_0x43c8d5(0x1f3))/0x4*(parseInt(_0x43c8d5(0x1ed))/0x5)+-parseInt(_0x43c8d5(0x1fd))/0x6+-parseInt(_0x43c8d5(0x201))/0x7*(parseInt(_0x43c8d5(0x216))/0x8)+parseInt(_0x43c8d5(0x1f7))/0x9+parseInt(_0x43c8d5(0x1e6))/0xa;if(_0x192a17===_0x581734)break;else _0x6990c4['push'](_0x6990c4['shift']());}catch(_0x4afe5e){_0x6990c4['push'](_0x6990c4['shift']());}}}(a16_0x57c6,0x34851));function a16_0x57c6(){const _0x33f951=['pageSize','App\x20\x22','8RNJCxa','risklevel','apidir','5961MstgWg','slice','Usage:\x20rabetbase\x20app\x20remove\x20<name>\x20[--global]','Single-app\x20mode:','log','\x22\x20(appcode:\x20','\x22\x20not\x20found.','accesskey','length','Added','pagesize','No\x20apps\x20configured.\x20Use\x20`rabetbase\x20app\x20add\x20','\x20app\x20\x22','7493890nTgAqC','\x20\x20\x20\x20cookie:\x20\x20\x20\x20(set)','remove','Set\x20as\x20default\x20app.','env','\x20\x20\x20\x20locale:\x20\x20\x20\x20','Usage:\x20rabetbase\x20app\x20add\x20<name>\x20--appcode\x20<code>\x20[--env\x20<env>]\x20[--apiDir\x20<dir>]\x20[--global]','5BkHcDL','project','config','\x20\x20\x20\x20pageSize:\x20\x20','defaultApp','global','231972kLXBJh','Default:\x20','locale','\x20\x20\x20\x20format:\x20\x20\x20\x20','1082052prtdzK','\x22\x20to\x20multi-app\x20config\x20(set\x20as\x20default).','\x20\x20\x20\x20riskLevel:\x20','Default\x20app\x20set\x20to\x20\x22','\x20\x20env:\x20','\x20\x20\x20\x20appcode:\x20','1461168YdOVos','Migrated\x20existing\x20app\x20\x22','join','format','2837891NSHYNb','appcode','340553PAJVbY','riskLevel','app','entries','apiDir','apps','exit','error','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20','keys','\x20(default)','list','appCode','accessKey','290dwxXZE','cookie','\x20(global)'];a16_0x57c6=function(){return _0x33f951;};return a16_0x57c6();}import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../context.js';function a16_0x3ef0(_0x373ef4,_0x3afe0f){_0x373ef4=_0x373ef4-0x1db;const _0x57c639=a16_0x57c6();let _0x3ef092=_0x57c639[_0x373ef4];return _0x3ef092;}function getConfigPath(_0x30d2b9={}){const _0x3fa20e=a16_0x3ef0,_0x211500=_0x30d2b9['global']?'global':_0x3fa20e(0x1ee);return resolveWriteConfigPath(_0x211500);}function readConfig(_0x1c1fc4={}){return readConfigFile(getConfigPath(_0x1c1fc4));}function writeConfig(_0x25956b,_0x78333d={}){writeConfigFile(getConfigPath(_0x78333d),_0x25956b);}function listApps(_0x13991b){const _0x14b236=a16_0x3ef0,{apps:_0x551bf1,defaultApp:_0x1893ec,currentApp:_0x52d6b4}=_0x13991b[_0x14b236(0x1ef)],_0x37e88e=Object[_0x14b236(0x206)](_0x551bf1);if(_0x37e88e[_0x14b236(0x1e1)]===0x0){const _0x30f792=_0x13991b[_0x14b236(0x1ef)][_0x14b236(0x20f)];_0x30f792?(console[_0x14b236(0x1dd)](_0x14b236(0x1dc)),console[_0x14b236(0x1dd)]('\x20\x20appcode:\x20'+_0x30f792+_0x14b236(0x1fb)+_0x13991b['config'][_0x14b236(0x1ea)]),console[_0x14b236(0x1dd)]('\x0aUse\x20`rabetbase\x20app\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20enable\x20multi-app\x20mode.')):console[_0x14b236(0x1dd)]('No\x20apps\x20configured.\x20Use\x20`rabetbase\x20app\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.');return;}console[_0x14b236(0x1dd)]('Configured\x20apps:\x0a');for(const [_0x129b19,_0x5372c2]of _0x37e88e){const _0x1a002b=_0x129b19===_0x1893ec,_0x48cbd7=_0x129b19===_0x52d6b4,_0x516403=_0x48cbd7?'\x20*':_0x1a002b?_0x14b236(0x20d):'';console['log']('\x20\x20'+_0x129b19+_0x516403),console[_0x14b236(0x1dd)](_0x14b236(0x1fc)+_0x5372c2[_0x14b236(0x202)]);if(_0x5372c2[_0x14b236(0x1ea)])console[_0x14b236(0x1dd)](_0x14b236(0x20b)+_0x5372c2[_0x14b236(0x1ea)]);if(_0x5372c2['apiDir'])console[_0x14b236(0x1dd)]('\x20\x20\x20\x20apiDir:\x20\x20\x20\x20'+_0x5372c2[_0x14b236(0x207)]);if(_0x5372c2[_0x14b236(0x212)])console[_0x14b236(0x1dd)](_0x14b236(0x1e7));if(_0x5372c2[_0x14b236(0x210)])console[_0x14b236(0x1dd)]('\x20\x20\x20\x20accessKey:\x20(set)');if(_0x5372c2['format'])console[_0x14b236(0x1dd)](_0x14b236(0x1f6)+_0x5372c2[_0x14b236(0x200)]);if(_0x5372c2[_0x14b236(0x214)])console[_0x14b236(0x1dd)](_0x14b236(0x1f0)+_0x5372c2[_0x14b236(0x214)]);if(_0x5372c2[_0x14b236(0x204)])console[_0x14b236(0x1dd)](_0x14b236(0x1f9)+_0x5372c2['riskLevel']);if(_0x5372c2[_0x14b236(0x1f5)])console['log'](_0x14b236(0x1eb)+_0x5372c2['locale']);console[_0x14b236(0x1dd)]('');}_0x1893ec?console[_0x14b236(0x1dd)](_0x14b236(0x1f4)+_0x1893ec):console[_0x14b236(0x1dd)]('No\x20default\x20app\x20set.\x20Use\x20`rabetbase\x20app\x20use\x20<name>`\x20to\x20set\x20one.');}function useApp(_0x2b0a4e,_0x4e1e70,_0x3afef5){const _0x5bc973=a16_0x3ef0,_0x278d7b=_0x4e1e70[0x0];!_0x278d7b&&(console[_0x5bc973(0x20a)]('Usage:\x20rabetbase\x20app\x20use\x20<name>\x20[--global]'),process[_0x5bc973(0x209)](0x1));const _0x2e2b77=readConfig(_0x3afef5),_0x2f140d=_0x2e2b77[_0x5bc973(0x208)]||{};if(!_0x2f140d[_0x278d7b]){const _0x4f450a=Object[_0x5bc973(0x20c)](_0x2f140d);_0x4f450a[_0x5bc973(0x1e1)]===0x0?console[_0x5bc973(0x20a)](_0x5bc973(0x1e4)+_0x278d7b+'\x20--appcode\x20<code>`\x20first.'):console[_0x5bc973(0x20a)](_0x5bc973(0x215)+_0x278d7b+'\x22\x20not\x20found.\x20Available:\x20'+_0x4f450a[_0x5bc973(0x1ff)](',\x20')),process['exit'](0x1);}_0x2e2b77[_0x5bc973(0x1f1)]=_0x278d7b,writeConfig(_0x2e2b77,_0x3afef5);const _0x390d41=_0x3afef5['global']?'\x20(global)':'';console['log'](_0x5bc973(0x1fa)+_0x278d7b+'\x22\x20(appcode:\x20'+_0x2f140d[_0x278d7b]['appcode']+')'+_0x390d41);}function migrateLegacySingleApp(_0x50a523,_0x118f45){const _0x441d78=a16_0x3ef0,_0xb5e7f8=_0x50a523[_0x441d78(0x202)]||_0x50a523[_0x441d78(0x205)];if(!_0xb5e7f8)return;const _0x2e22c7=String(_0xb5e7f8);if(_0x2e22c7===_0x118f45)return;const _0x479ac8={'appcode':_0xb5e7f8};if(_0x50a523[_0x441d78(0x1ea)])_0x479ac8[_0x441d78(0x1ea)]=_0x50a523[_0x441d78(0x1ea)];if(_0x50a523[_0x441d78(0x207)])_0x479ac8['apiDir']=_0x50a523[_0x441d78(0x207)];if(_0x50a523[_0x441d78(0x212)])_0x479ac8[_0x441d78(0x212)]=_0x50a523[_0x441d78(0x212)];if(_0x50a523['accessKey'])_0x479ac8[_0x441d78(0x210)]=_0x50a523['accessKey'];if(_0x50a523['format'])_0x479ac8[_0x441d78(0x200)]=_0x50a523[_0x441d78(0x200)];if(_0x50a523['pageSize'])_0x479ac8[_0x441d78(0x214)]=_0x50a523[_0x441d78(0x214)];if(_0x50a523[_0x441d78(0x204)])_0x479ac8[_0x441d78(0x204)]=_0x50a523[_0x441d78(0x204)];if(_0x50a523[_0x441d78(0x1f5)])_0x479ac8[_0x441d78(0x1f5)]=_0x50a523[_0x441d78(0x1f5)];_0x50a523[_0x441d78(0x208)][_0x2e22c7]=_0x479ac8,_0x50a523[_0x441d78(0x1f1)]=_0x2e22c7,delete _0x50a523['appcode'],delete _0x50a523[_0x441d78(0x205)],console[_0x441d78(0x1dd)](_0x441d78(0x1fe)+_0x2e22c7+_0x441d78(0x1f8));}function addApp(_0xaff842,_0x456199,_0x590dd5){const _0x3b425e=a16_0x3ef0,_0x31a839=_0x456199[0x0];!_0x31a839&&(console['error'](_0x3b425e(0x1ec)),process[_0x3b425e(0x209)](0x1));const _0x1e8c73=_0x590dd5[_0x3b425e(0x202)];!_0x1e8c73&&(console[_0x3b425e(0x20a)]('--appcode\x20is\x20required\x20when\x20adding\x20an\x20app.'),process[_0x3b425e(0x209)](0x1));const _0x5468d8=readConfig(_0x590dd5);if(!_0x5468d8[_0x3b425e(0x208)])_0x5468d8['apps']={};Object[_0x3b425e(0x20c)](_0x5468d8[_0x3b425e(0x208)])['length']===0x0&&migrateLegacySingleApp(_0x5468d8,_0x31a839);const _0x50bca3={'appcode':_0x1e8c73};if(_0x590dd5[_0x3b425e(0x1ea)])_0x50bca3[_0x3b425e(0x1ea)]=_0x590dd5[_0x3b425e(0x1ea)];if(_0x590dd5['apiDir']||_0x590dd5[_0x3b425e(0x218)])_0x50bca3[_0x3b425e(0x207)]=_0x590dd5[_0x3b425e(0x207)]||_0x590dd5[_0x3b425e(0x218)];if(_0x590dd5['cookie'])_0x50bca3['cookie']=_0x590dd5[_0x3b425e(0x212)];if(_0x590dd5['accessKey']||_0x590dd5[_0x3b425e(0x1e0)])_0x50bca3[_0x3b425e(0x210)]=_0x590dd5['accessKey']||_0x590dd5[_0x3b425e(0x1e0)];if(_0x590dd5['format'])_0x50bca3[_0x3b425e(0x200)]=_0x590dd5[_0x3b425e(0x200)];if(_0x590dd5[_0x3b425e(0x214)]||_0x590dd5[_0x3b425e(0x1e3)])_0x50bca3[_0x3b425e(0x214)]=Number(_0x590dd5[_0x3b425e(0x214)]||_0x590dd5['pagesize']);if(_0x590dd5[_0x3b425e(0x204)]||_0x590dd5[_0x3b425e(0x217)])_0x50bca3[_0x3b425e(0x204)]=_0x590dd5[_0x3b425e(0x204)]||_0x590dd5[_0x3b425e(0x217)];if(_0x590dd5[_0x3b425e(0x1f5)])_0x50bca3[_0x3b425e(0x1f5)]=_0x590dd5['locale'];const _0x20a336=!!_0x5468d8[_0x3b425e(0x208)][_0x31a839];_0x5468d8[_0x3b425e(0x208)][_0x31a839]=_0x50bca3;!_0x5468d8[_0x3b425e(0x1f1)]&&(_0x5468d8[_0x3b425e(0x1f1)]=_0x31a839);writeConfig(_0x5468d8,_0x590dd5);const _0x5b6240=_0x590dd5[_0x3b425e(0x1f2)]?_0x3b425e(0x213):'';console[_0x3b425e(0x1dd)]((_0x20a336?'Updated':_0x3b425e(0x1e2))+_0x3b425e(0x1e5)+_0x31a839+_0x3b425e(0x1de)+_0x1e8c73+')'+_0x5b6240),_0x5468d8[_0x3b425e(0x1f1)]===_0x31a839&&!_0x20a336&&console[_0x3b425e(0x1dd)](_0x3b425e(0x1e9));}function removeApp(_0x4cc3e2,_0x46e1c8,_0x2aaa40){const _0x1227e4=a16_0x3ef0,_0x36fbf1=_0x46e1c8[0x0];!_0x36fbf1&&(console[_0x1227e4(0x20a)](_0x1227e4(0x1db)),process[_0x1227e4(0x209)](0x1));const _0xf0452a=readConfig(_0x2aaa40);(!_0xf0452a['apps']||!_0xf0452a['apps'][_0x36fbf1])&&(console['error'](_0x1227e4(0x215)+_0x36fbf1+_0x1227e4(0x1df)),process[_0x1227e4(0x209)](0x1));delete _0xf0452a[_0x1227e4(0x208)][_0x36fbf1];if(_0xf0452a[_0x1227e4(0x1f1)]===_0x36fbf1){const _0x4eddcd=Object[_0x1227e4(0x20c)](_0xf0452a['apps']);_0xf0452a[_0x1227e4(0x1f1)]=_0x4eddcd[_0x1227e4(0x1e1)]>0x0?_0x4eddcd[0x0]:undefined,_0xf0452a[_0x1227e4(0x1f1)]?console['log']('Default\x20app\x20changed\x20to\x20\x22'+_0xf0452a['defaultApp']+'\x22.'):delete _0xf0452a['defaultApp'];}Object[_0x1227e4(0x20c)](_0xf0452a['apps'])[_0x1227e4(0x1e1)]===0x0&&(delete _0xf0452a[_0x1227e4(0x208)],delete _0xf0452a[_0x1227e4(0x1f1)]),writeConfig(_0xf0452a,_0x2aaa40),console['log']('Removed\x20app\x20\x22'+_0x36fbf1+'\x22.');}export const appCommand={'name':'app','description':'Manage\x20multiple\x20apps\x20in\x20one\x20workspace',async 'run'(_0x517f79,_0x2a29c3,_0x12ccf1){const _0x3e5c65=a16_0x3ef0,_0x22f275=_0x2a29c3[0x0],_0x1d0e2e=_0x2a29c3[_0x3e5c65(0x21a)](0x1);switch(_0x22f275){case _0x3e5c65(0x20e):listApps(_0x517f79);break;case'use':useApp(_0x517f79,_0x1d0e2e,_0x12ccf1);break;case'add':addApp(_0x517f79,_0x1d0e2e,_0x12ccf1);break;case _0x3e5c65(0x1e8):removeApp(_0x517f79,_0x1d0e2e,_0x12ccf1);break;default:listApps(_0x517f79);break;}}};
|
package/lib/commands/config.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const a32_0x7535c4=a32_0x1e80;function a32_0x36bc(){const _0x194139=['7049207LrqpEt','369035kLEhNY','1796530FYtxch','129157VGINRT','2730807WFZvgn','config','325NRcdZV','Manage\x20project\x20configuration','102WvARHD','716DleZze','8TYVpII','9717SYHIzs','16ypeOJF'];a32_0x36bc=function(){return _0x194139;};return a32_0x36bc();}function a32_0x1e80(_0x248b6d,_0x5b695e){_0x248b6d=_0x248b6d-0xb1;const _0x36bc3d=a32_0x36bc();let _0x1e805c=_0x36bc3d[_0x248b6d];return _0x1e805c;}(function(_0x58db16,_0x13aee4){const _0x317b69=a32_0x1e80,_0x394845=_0x58db16();while(!![]){try{const _0x590942=-parseInt(_0x317b69(0xb5))/0x1*(-parseInt(_0x317b69(0xbb))/0x2)+parseInt(_0x317b69(0xba))/0x3*(-parseInt(_0x317b69(0xb8))/0x4)+parseInt(_0x317b69(0xbd))/0x5+parseInt(_0x317b69(0xb7))/0x6*(-parseInt(_0x317b69(0xb2))/0x7)+-parseInt(_0x317b69(0xb9))/0x8*(-parseInt(_0x317b69(0xb3))/0x9)+parseInt(_0x317b69(0xb1))/0xa+parseInt(_0x317b69(0xbc))/0xb;if(_0x590942===_0x13aee4)break;else _0x394845['push'](_0x394845['shift']());}catch(_0x1c33a9){_0x394845['push'](_0x394845['shift']());}}}(a32_0x36bc,0x4aeb8));import{jsx as a32_0x398017}from'react/jsx-runtime';import{render}from'ink';import{Config}from'../config/main.js';export const configCommand={'name':'config','description':a32_0x7535c4(0xb6),async 'run'(_0x32ebb6,_0x495d82,_0xff0f02){const _0x1587df=a32_0x7535c4,_0x1960f6={'input':[_0x1587df(0xb4),..._0x495d82],'flags':_0xff0f02,'pkg':{},'help':'','updateNotifier':undefined,'showHelp':()=>{},'showVersion':()=>{}};render(a32_0x398017(Config,{'cli':_0x1960f6}));}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0x1bc124,_0x2c10ee){const _0x3f22ab=a68_0xe045,_0x50702b=_0x1bc124();while(!![]){try{const _0xe73c37=parseInt(_0x3f22ab(0x109))/0x1*(parseInt(_0x3f22ab(0x117))/0x2)+parseInt(_0x3f22ab(0x10b))/0x3+-parseInt(_0x3f22ab(0x11f))/0x4*(parseInt(_0x3f22ab(0x11d))/0x5)+-parseInt(_0x3f22ab(0x112))/0x6+-parseInt(_0x3f22ab(0x10c))/0x7*(parseInt(_0x3f22ab(0x10f))/0x8)+parseInt(_0x3f22ab(0x10d))/0x9*(parseInt(_0x3f22ab(0x11a))/0xa)+parseInt(_0x3f22ab(0x10e))/0xb*(-parseInt(_0x3f22ab(0x114))/0xc);if(_0xe73c37===_0x2c10ee)break;else _0x50702b['push'](_0x50702b['shift']());}catch(_0x467fbf){_0x50702b['push'](_0x50702b['shift']());}}}(a68_0x158e,0x28626));import{jsxs as a68_0x3454b1,jsx as a68_0x13a0a3}from'react/jsx-runtime';function a68_0x158e(){const _0x44e731=['column','45nBfjRo','\x20config\x20get\x20<key>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','842064IduYrc','201341wqPqHJ','1256949lRWPva','4477tFJpiA','24SjkLdw','Examples:','Set\x20environment\x20(production/daily)','157806qAQUfa','\x20config\x20set\x20app\x20app-xxxxx\x20\x20\x20','2208WqHFOq','Set\x20a\x20config\x20value','Set\x20App\x20Code\x20for\x20current\x20project','164beVgse','gray','command','10lzmJGG','map','\x20config\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','355735JxxITZ','Get\x20a\x20config\x20value','4fGZfus','\x20config\x20set\x20locale\x20en\x20\x20\x20\x20\x20\x20\x20','description','\x20config\x20set\x20env\x20daily\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20'];a68_0x158e=function(){return _0x44e731;};return a68_0x158e();}import{Box,Text}from'ink';function a68_0xe045(_0x234b9e,_0x25997f){_0x234b9e=_0x234b9e-0x105;const _0x158e50=a68_0x158e();let _0xe045cc=_0x158e50[_0x234b9e];return _0xe045cc;}import{CLI_BIN_NAME}from'../constant/cli.js';export function ConfigHelp(){const _0x203083=a68_0xe045,_0x46f76b=[{'command':CLI_BIN_NAME+'\x20config\x20set\x20<key>\x20<value>\x20\x20\x20','description':_0x203083(0x115)},{'command':CLI_BIN_NAME+_0x203083(0x10a),'description':_0x203083(0x11e)},{'command':CLI_BIN_NAME+_0x203083(0x11c),'description':'List\x20all\x20config\x20values'}],_0x48fd64=[{'command':CLI_BIN_NAME+_0x203083(0x113),'description':_0x203083(0x116)},{'command':CLI_BIN_NAME+_0x203083(0x106),'description':_0x203083(0x111)},{'command':CLI_BIN_NAME+_0x203083(0x120),'description':'Set\x20display\x20language\x20(zh/en)'}];return a68_0x3454b1(Box,{'flexDirection':_0x203083(0x108),'marginTop':0x1,'marginBottom':0x1,'children':[a68_0x13a0a3(Box,{'marginBottom':0x1,'children':a68_0x3454b1(Text,{'color':_0x203083(0x118),'children':['\x20','!','\x20\x20','Invalid\x20command.\x20Available\x20commands:']})}),_0x46f76b[_0x203083(0x11b)](_0x3f65bf=>a68_0x3454b1(Box,{'children':[a68_0x3454b1(Text,{'children':[_0x203083(0x107),_0x3f65bf['command']]}),a68_0x13a0a3(Text,{'color':_0x203083(0x118),'children':_0x3f65bf[_0x203083(0x105)]})]},_0x3f65bf[_0x203083(0x119)])),a68_0x13a0a3(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a68_0x3454b1(Text,{'color':_0x203083(0x118),'children':['\x20*\x20',_0x203083(0x110)]})}),_0x48fd64[_0x203083(0x11b)](_0x593c2b=>a68_0x3454b1(Box,{'children':[a68_0x3454b1(Text,{'children':['\x20\x20\x20\x20',_0x593c2b['command']]}),a68_0x13a0a3(Text,{'color':_0x203083(0x118),'children':_0x593c2b['description']})]},_0x593c2b[_0x203083(0x119)]))]});}
|
package/lib/config/main.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const a69_0x1710a4=a69_0x4693;(function(_0x6fc18e,_0x4c5b52){const _0xb08de=a69_0x4693,_0x31a378=_0x6fc18e();while(!![]){try{const _0x38ad80=-parseInt(_0xb08de(0x161))/0x1+-parseInt(_0xb08de(0x166))/0x2*(parseInt(_0xb08de(0x151))/0x3)+parseInt(_0xb08de(0x155))/0x4*(-parseInt(_0xb08de(0x14f))/0x5)+parseInt(_0xb08de(0x156))/0x6*(-parseInt(_0xb08de(0x167))/0x7)+parseInt(_0xb08de(0x176))/0x8*(parseInt(_0xb08de(0x174))/0x9)+-parseInt(_0xb08de(0x177))/0xa+parseInt(_0xb08de(0x170))/0xb;if(_0x38ad80===_0x4c5b52)break;else _0x31a378['push'](_0x31a378['shift']());}catch(_0x129216){_0x31a378['push'](_0x31a378['shift']());}}}(a69_0x19db,0x6660e));function a69_0x4693(_0x3e2795,_0x3ef833){_0x3e2795=_0x3e2795-0x14e;const _0x19dba4=a69_0x19db();let _0x4693fc=_0x19dba4[_0x3e2795];return _0x4693fc;}import{jsx as a69_0x2e4eb6,jsxs as a69_0x5689b9}from'react/jsx-runtime';import{ConfigHelp}from'./config-help.js';import{Box,Text}from'ink';import{readConfig}from'../utils/config.js';function a69_0x19db(){const _0x45f345=['toLowerCase','3ZJUtfw','stringify','input','column','212OhmqLC','6nNHYxn','get','log','appcode','--help','Global','app','message','locale','includes','production','533520OjpNMq','string','length','保存配置失败','flags','905588fOpnOf','5795314rhOsSx','global','en-US','\x20env\x20set\x20to:\x20','Project','Invalid\x20locale\x20value.\x20Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','set','red','env\x20value\x20must\x20be\x20\x22production\x22\x20or\x20\x22daily\x22','36078801DPZHIm','error','help','list','9WzXhQK','zh-CN','996408EvhpJA','6594870LXBcKD','undefined','No\x20config\x20value\x20provided','\x20locale\x20set\x20to:\x20','48245ITRjXJ'];a69_0x19db=function(){return _0x45f345;};return a69_0x19db();}import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../context.js';import{logger}from'../utils/logger.js';const LOCALE_MAP={'zh':a69_0x1710a4(0x175),'zh-cn':a69_0x1710a4(0x175),'zh_cn':'zh-CN','en':'en-US','en-us':a69_0x1710a4(0x169),'en_us':'en-US'};function normalizeLocale(_0x5b48a9){const _0x173d41=a69_0x1710a4;if(!_0x5b48a9)return null;return LOCALE_MAP[_0x5b48a9[_0x173d41(0x150)]()]??null;}export function Config(_0x91e50c){const _0x54b158=a69_0x1710a4,{cli:_0xc2450d}=_0x91e50c,_0x382de0=_0xc2450d[_0x54b158(0x153)][0x1],_0x4ecf6f=_0xc2450d[_0x54b158(0x153)][0x2],_0x3a3566=[_0x54b158(0x16d),_0x54b158(0x157)][_0x54b158(0x15f)](_0x382de0||''),_0x5632e3=_0xc2450d[_0x54b158(0x153)][_0x54b158(0x163)]>=0x3;if(_0x4ecf6f===_0x54b158(0x15a)||_0xc2450d[_0x54b158(0x165)][_0x54b158(0x172)])return a69_0x2e4eb6(ConfigHelp,{});const _0x56f28e=readConfig();if(_0x382de0===_0x54b158(0x16d)){if(_0x4ecf6f){const _0x4bab50=_0xc2450d['input'][0x3];if(typeof _0x4bab50!==_0x54b158(0x178)){if(_0x4ecf6f==='env'&&!['online',_0x54b158(0x160),'daily']['includes'](_0x4bab50))return a69_0x2e4eb6(Box,{'children':a69_0x2e4eb6(Text,{'color':_0x54b158(0x16e),'children':_0x54b158(0x16f)})});if(_0x4ecf6f===_0x54b158(0x15e)&&!normalizeLocale(_0x4bab50))return a69_0x2e4eb6(Box,{'flexDirection':_0x54b158(0x154),'children':a69_0x2e4eb6(Text,{'color':_0x54b158(0x16e),'children':_0x54b158(0x16c)})});const _0x1254f1=_0xc2450d['flags'][_0x54b158(0x168)]?_0x54b158(0x168):isInProject()?'project':_0x54b158(0x168),_0x221a95=resolveWriteConfigPath(_0x1254f1);let _0xe8b4e6=readConfigFile(_0x221a95);if(typeof _0x4bab50!==_0x54b158(0x162)||_0x4bab50['length']>0x1f4)return a69_0x2e4eb6(Box,{'children':a69_0x2e4eb6(Text,{'color':_0x54b158(0x16e),'children':'Config\x20value\x20is\x20invalid\x20or\x20too\x20long'})});let _0x1db215=_0x4ecf6f,_0x15017a=_0x4bab50;_0x4ecf6f===_0x54b158(0x15c)&&(_0x1db215=_0x54b158(0x159),delete _0xe8b4e6[_0x54b158(0x15c)]);_0x4ecf6f===_0x54b158(0x159)&&delete _0xe8b4e6['app'];_0x4ecf6f==='locale'&&(_0x15017a=normalizeLocale(_0x4bab50));_0xe8b4e6[_0x1db215]=_0x15017a;try{writeConfigFile(_0x221a95,_0xe8b4e6);const _0x1ba0aa=_0x1254f1===_0x54b158(0x168)?_0x54b158(0x15b):_0x54b158(0x16b);_0x4ecf6f==='env'&&console['log']('✓\x20'+_0x1ba0aa+_0x54b158(0x16a)+_0x4bab50);if(_0x4ecf6f===_0x54b158(0x15e)){const _0x46bb8b=normalizeLocale(_0x4bab50);console['log']('✓\x20'+_0x1ba0aa+_0x54b158(0x14e)+_0x46bb8b);}}catch(_0x39e6bf){return logger[_0x54b158(0x171)]('config',_0x54b158(0x164),{'error':_0x39e6bf instanceof Error?_0x39e6bf[_0x54b158(0x15d)]:String(_0x39e6bf),'configKey':_0x4ecf6f,'configValue':_0x4bab50,'targetConfigPath':_0x221a95}),a69_0x2e4eb6(Box,{'children':a69_0x5689b9(Text,{'color':_0x54b158(0x16e),'children':['Failed\x20to\x20save\x20config',':','\x20',_0x39e6bf instanceof Error?_0x39e6bf[_0x54b158(0x15d)]:String(_0x39e6bf)]})});}return null;}return a69_0x2e4eb6(Box,{'children':a69_0x2e4eb6(Text,{'color':'red','children':_0x54b158(0x179)})});}}if(_0x382de0===_0x54b158(0x157)){if(_0x4ecf6f){let _0x3ef937=_0x4ecf6f;return _0x4ecf6f===_0x54b158(0x15c)&&(_0x3ef937='appcode'),console[_0x54b158(0x158)](_0x56f28e[_0x3ef937]||_0x54b158(0x178)),null;}return null;}if(_0x382de0===_0x54b158(0x173))return console[_0x54b158(0x158)](JSON[_0x54b158(0x152)](_0x56f28e,null,0x2)),null;if(!_0x3a3566||!_0x5632e3)return a69_0x2e4eb6(ConfigHelp,{});return null;}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0x3012b0,_0x52fd9a){var _0x2bb484=a88_0x38c4,_0x189c6a=_0x3012b0();while(!![]){try{var _0x2fdc5e=-parseInt(_0x2bb484(0x7b))/0x1+parseInt(_0x2bb484(0x7d))/0x2+-parseInt(_0x2bb484(0x82))/0x3+-parseInt(_0x2bb484(0x81))/0x4+parseInt(_0x2bb484(0x7c))/0x5+parseInt(_0x2bb484(0x83))/0x6*(parseInt(_0x2bb484(0x7e))/0x7)+parseInt(_0x2bb484(0x7f))/0x8;if(_0x2fdc5e===_0x52fd9a)break;else _0x189c6a['push'](_0x189c6a['shift']());}catch(_0x5a85ac){_0x189c6a['push'](_0x189c6a['shift']());}}}(a88_0x15b6,0x57768));function a88_0x38c4(_0x18a14b,_0x49c09f){_0x18a14b=_0x18a14b-0x7b;var _0x15b6d3=a88_0x15b6();var _0x38c4a8=_0x15b6d3[_0x18a14b];return _0x38c4a8;}import{jsx as a88_0x29ea25,jsxs as a88_0x309428}from'react/jsx-runtime';import{Box,Text}from'ink';function a88_0x15b6(){var _0x1ec681=['1293775HTJFps','546838RFWakm','1481991vUCOGn','6045872bACiLl','taskName','110948pYRtEh','2038623AODzlo','12FMovoF','green','645808LXOhPZ'];a88_0x15b6=function(){return _0x1ec681;};return a88_0x15b6();}import{TaskTime}from'./task-time.js';export function TaskFinished(_0x2399f1){var _0x46bc08=a88_0x38c4;return a88_0x309428(Box,{'children':[a88_0x29ea25(Box,{'width':'1'}),a88_0x29ea25(Text,{'color':_0x46bc08(0x84),'children':'\x20√\x20'}),a88_0x29ea25(Text,{'children':_0x2399f1[_0x46bc08(0x80)]}),a88_0x29ea25(TaskTime,{'elapsed':_0x2399f1['elapsed']})]});}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0x394e93,_0x3567b8){var _0x781b70=a89_0x13d7,_0x24be23=_0x394e93();while(!![]){try{var _0x26a7a5=-parseInt(_0x781b70(0x93))/0x1*(-parseInt(_0x781b70(0x9e))/0x2)+parseInt(_0x781b70(0x9d))/0x3+parseInt(_0x781b70(0x95))/0x4*(-parseInt(_0x781b70(0x97))/0x5)+parseInt(_0x781b70(0x99))/0x6+parseInt(_0x781b70(0xa0))/0x7+-parseInt(_0x781b70(0x98))/0x8+-parseInt(_0x781b70(0x96))/0x9;if(_0x26a7a5===_0x3567b8)break;else _0x24be23['push'](_0x24be23['shift']());}catch(_0x52ca12){_0x24be23['push'](_0x24be23['shift']());}}}(a89_0xcd9d,0x2cfa8));function a89_0x13d7(_0x54819d,_0x31497b){_0x54819d=_0x54819d-0x92;var _0xcd9df2=a89_0xcd9d();var _0x13d740=_0xcd9df2[_0x54819d];return _0x13d740;}import{jsx as a89_0x42db2e,jsxs as a89_0xd40eb8}from'react/jsx-runtime';import{Text}from'ink';import a89_0x492466 from'ink-spinner';export function TaskLoading(_0x4f2c42){var _0x4a599=a89_0x13d7;if(_0x4f2c42[_0x4a599(0x9c)])return a89_0x42db2e(Text,{'color':_0x4a599(0x94),'children':_0x4a599(0x92)});if(_0x4f2c42[_0x4a599(0x9f)])return a89_0xd40eb8(Text,{'color':_0x4a599(0x94),'children':['\x20',a89_0x42db2e(a89_0x492466,{'type':_0x4a599(0x9a)}),'\x20']});return a89_0x42db2e(Text,{'children':_0x4a599(0x9b)});}function a89_0xcd9d(){var _0x344fda=['2035894BibeAk','\x20√\x20','3jaOehh','green','194932qvuvFP','594081XUGJhr','25jdQlYe','2146456EJanFv','635898oiMAFR','dots','\x20\x20\x20','finished','494703rIWYIT','133658VXzrhL','loading'];a89_0xcd9d=function(){return _0x344fda;};return a89_0xcd9d();}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function a90_0x36ea(_0x27ab4c,_0x4e71d6){_0x27ab4c=_0x27ab4c-0x1b1;var _0x286476=a90_0x2864();var _0x36ea6e=_0x286476[_0x27ab4c];return _0x36ea6e;}(function(_0xb50e10,_0x3ff218){var _0x7c64a0=a90_0x36ea,_0x456716=_0xb50e10();while(!![]){try{var _0x27ef84=parseInt(_0x7c64a0(0x1b7))/0x1+-parseInt(_0x7c64a0(0x1b2))/0x2+-parseInt(_0x7c64a0(0x1b8))/0x3+-parseInt(_0x7c64a0(0x1b4))/0x4+parseInt(_0x7c64a0(0x1b1))/0x5*(parseInt(_0x7c64a0(0x1b3))/0x6)+-parseInt(_0x7c64a0(0x1b6))/0x7+parseInt(_0x7c64a0(0x1b9))/0x8*(parseInt(_0x7c64a0(0x1b5))/0x9);if(_0x27ef84===_0x3ff218)break;else _0x456716['push'](_0x456716['shift']());}catch(_0x2314a0){_0x456716['push'](_0x456716['shift']());}}}(a90_0x2864,0xac44b));import{jsx as a90_0x100661,jsxs as a90_0x57aa2e}from'react/jsx-runtime';function a90_0x2864(){var _0x4f7288=['1786252dxoLnn','20574VQyQQd','4313120wLdesA','206882dKlJTK','1975773ktJyCf','8416WdbiEJ','elapsed','5qwluZY','1952088acMMiv','4747290mcrhir'];a90_0x2864=function(){return _0x4f7288;};return a90_0x2864();}import{Box,Text}from'ink';import{TaskLoading}from'./task-loading.js';import{TaskTime}from'./task-time.js';export function TaskRunning(_0x127496){var _0x23528e=a90_0x36ea;return a90_0x57aa2e(Box,{'children':[a90_0x100661(Box,{'width':'1'}),a90_0x100661(TaskLoading,{..._0x127496}),a90_0x100661(Text,{'children':_0x127496['taskName']}),a90_0x100661(TaskTime,{'elapsed':_0x127496[_0x23528e(0x1ba)]})]});}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0x410148,_0x423614){var _0x49a54b=a91_0x2c3f,_0x4ea7dc=_0x410148();while(!![]){try{var _0x38c88d=parseInt(_0x49a54b(0x1d2))/0x1*(parseInt(_0x49a54b(0x1d9))/0x2)+-parseInt(_0x49a54b(0x1d1))/0x3+parseInt(_0x49a54b(0x1cf))/0x4*(-parseInt(_0x49a54b(0x1ce))/0x5)+-parseInt(_0x49a54b(0x1d8))/0x6*(parseInt(_0x49a54b(0x1d7))/0x7)+-parseInt(_0x49a54b(0x1d3))/0x8*(parseInt(_0x49a54b(0x1d6))/0x9)+-parseInt(_0x49a54b(0x1cc))/0xa*(parseInt(_0x49a54b(0x1d0))/0xb)+parseInt(_0x49a54b(0x1cb))/0xc*(parseInt(_0x49a54b(0x1cd))/0xd);if(_0x38c88d===_0x423614)break;else _0x4ea7dc['push'](_0x4ea7dc['shift']());}catch(_0x1be75c){_0x4ea7dc['push'](_0x4ea7dc['shift']());}}}(a91_0x1cee,0x3f6f7));import{jsx as a91_0x48d0a6,Fragment as a91_0x4ac2c9,jsxs as a91_0xb90b56}from'react/jsx-runtime';function a91_0x1cee(){var _0x43662a=['gray','elapsed','6363YhJfPl','495565kwaIQl','18otGZkw','274460AkHRpI','6036PTqwWf','2286430rhDjEi','37271DDZaWr','2126610FaZylQ','4xVEImx','11qqBGrk','619221PzLrLD','1xXCMOl','2792OnmeeX'];a91_0x1cee=function(){return _0x43662a;};return a91_0x1cee();}function a91_0x2c3f(_0x53c774,_0x142813){_0x53c774=_0x53c774-0x1cb;var _0x1cee5a=a91_0x1cee();var _0x2c3fec=_0x1cee5a[_0x53c774];return _0x2c3fec;}import{Text}from'ink';export function TaskTime(_0x4b74c3){var _0x5d932e=a91_0x2c3f;if(_0x4b74c3['elapsed'])return a91_0xb90b56(a91_0x4ac2c9,{'children':[a91_0x48d0a6(Text,{'color':_0x5d932e(0x1d4),'children':'\x20['}),a91_0x48d0a6(Text,{'color':'gray','bold':!![],'children':_0x4b74c3[_0x5d932e(0x1d5)]}),a91_0x48d0a6(Text,{'color':_0x5d932e(0x1d4),'children':']'})]});return null;}
|