@lovrabet/rabetbase-cli 2.0.2-beta.8 → 2.0.4-beta.3
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 -0
- 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/ai-setup/config.js +0 -1
- package/lib/commands/app.js +0 -1
- package/lib/commands/config.js +0 -1
- package/lib/commands/mcp.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/mcp/McpInstallUI.js +0 -1
- package/lib/mcp/claude.js +0 -1
- package/lib/mcp/cursor.js +0 -1
- package/lib/mcp/main.js +0 -1
- package/lib/mcp/mcp-install-non-interactive.js +0 -1
- package/lib/mcp/mcp-installer.js +0 -1
- package/lib/telemetry/otel-logger-version.js +0 -1
- package/lib/ui/IDESelector.js +0 -1
- package/lib/ui/useIDESelection.js +0 -1
package/lib/framework/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3e9c2b,_0x284d0a){const _0x19b38a=a106_0x413b,_0x336035=_0x3e9c2b();while(!![]){try{const _0x278a19=parseInt(_0x19b38a(0x94))/0x1+-parseInt(_0x19b38a(0x99))/0x2+-parseInt(_0x19b38a(0x7f))/0x3*(-parseInt(_0x19b38a(0x9a))/0x4)+parseInt(_0x19b38a(0x97))/0x5*(parseInt(_0x19b38a(0x96))/0x6)+parseInt(_0x19b38a(0x9b))/0x7*(-parseInt(_0x19b38a(0x95))/0x8)+parseInt(_0x19b38a(0x8d))/0x9+-parseInt(_0x19b38a(0x8f))/0xa;if(_0x278a19===_0x284d0a)break;else _0x336035['push'](_0x336035['shift']());}catch(_0x488686){_0x336035['push'](_0x336035['shift']());}}}(a106_0x4c3e,0x2f100));export function formatOutput(_0x4a59b4,_0x274e0b){const _0x1a060d=a106_0x413b,{format:_0x1ceff3}=_0x274e0b;switch(_0x1ceff3){case'json':printJson(_0x4a59b4,_0x274e0b);break;case _0x1a060d(0x7d):printTable(_0x4a59b4,_0x274e0b);break;case _0x1a060d(0x89):default:printPretty(_0x4a59b4,_0x274e0b);break;}}function printJson(_0x2e8078,_0x352d56){const _0x11bb3d=a106_0x413b,_0x12d23b={'ok':_0x2e8078['ok'],'command':_0x352d56[_0x11bb3d(0x80)],'risk':_0x352d56[_0x11bb3d(0x85)]};if(_0x352d56[_0x11bb3d(0x7a)])_0x12d23b[_0x11bb3d(0x7a)]=!![];if(_0x2e8078['data']!==undefined)_0x12d23b['data']=_0x2e8078[_0x11bb3d(0x81)];!_0x2e8078['ok']&&_0x2e8078[_0x11bb3d(0x7e)]&&(_0x12d23b[_0x11bb3d(0x92)]={'code':_0x11bb3d(0x7c),'message':_0x2e8078[_0x11bb3d(0x7e)]}),process[_0x11bb3d(0x87)]['write'](JSON['stringify'](_0x12d23b,null,0x2)+'\x0a');}function printPretty(_0x3de7ce,_0x582520){const _0x390a71=a106_0x413b;if(_0x582520[_0x390a71(0x7a)]){console[_0x390a71(0x90)](_0x390a71(0x84)),console[_0x390a71(0x90)](JSON[_0x390a71(0x91)](_0x3de7ce[_0x390a71(0x81)],null,0x2));return;}if(!_0x3de7ce['ok']){console[_0x390a71(0x92)]('Error:\x20'+(_0x3de7ce[_0x390a71(0x7e)]??_0x390a71(0x77)));return;}const _0x33d32f=_0x3de7ce['data'];if(_0x33d32f===undefined||_0x33d32f===null){if(_0x3de7ce[_0x390a71(0x7e)])console[_0x390a71(0x90)](_0x3de7ce['message']);return;}if(Array[_0x390a71(0x86)](_0x33d32f)){printArrayPretty(_0x33d32f);return;}if(typeof _0x33d32f===_0x390a71(0x8b)){printObjectPretty(_0x33d32f);return;}console[_0x390a71(0x90)](String(_0x33d32f));}function a106_0x413b(_0xd27d55,_0x1351cc){_0xd27d55=_0xd27d55-0x76;const _0x4c3e2e=a106_0x4c3e();let _0x413b3f=_0x4c3e2e[_0xd27d55];return _0x413b3f;}function printObjectPretty(_0x4ce705){const _0x880e9a=a106_0x413b,_0x17b7c3=Math[_0x880e9a(0x8c)](...Object[_0x880e9a(0x78)](_0x4ce705)[_0x880e9a(0x8e)](_0x499865=>_0x499865[_0x880e9a(0x9c)]),0x0);for(const [_0x955b13,_0x349409]of Object[_0x880e9a(0x9d)](_0x4ce705)){if(_0x349409===undefined||_0x349409===null)continue;const _0x3dc8a9=_0x955b13['padEnd'](_0x17b7c3);typeof _0x349409===_0x880e9a(0x8b)?console[_0x880e9a(0x90)](_0x3dc8a9+'\x20\x20'+JSON[_0x880e9a(0x91)](_0x349409)):console[_0x880e9a(0x90)](_0x3dc8a9+'\x20\x20'+_0x349409);}}function printArrayPretty(_0x23affc){const _0xaa0e2a=a106_0x413b;if(_0x23affc['length']===0x0){console[_0xaa0e2a(0x90)](_0xaa0e2a(0x82));return;}console[_0xaa0e2a(0x90)](_0xaa0e2a(0x98)+_0x23affc['length']+_0xaa0e2a(0x88));for(const _0x44c08c of _0x23affc){if(typeof _0x44c08c==='object'&&_0x44c08c!==null){const _0x20ddfb=Object[_0xaa0e2a(0x76)](_0x44c08c)[_0xaa0e2a(0x83)](0x0,0x4)[_0xaa0e2a(0x93)]('\x20\x20');console[_0xaa0e2a(0x90)]('\x20\x20'+_0x20ddfb);}else console[_0xaa0e2a(0x90)]('\x20\x20'+_0x44c08c);}}function printTable(_0xc03d02,_0x4a9141){const _0x5f46bb=a106_0x413b,_0x1c3f6a=_0xc03d02[_0x5f46bb(0x81)];if(!_0xc03d02['ok']){console[_0x5f46bb(0x92)](_0x5f46bb(0x79)+(_0xc03d02['message']??_0x5f46bb(0x77)));return;}const _0x2ff016=Array['isArray'](_0x1c3f6a)?_0x1c3f6a:_0x1c3f6a?[_0x1c3f6a]:[];if(_0x2ff016[_0x5f46bb(0x9c)]===0x0){console[_0x5f46bb(0x90)](_0x5f46bb(0x82));return;}const _0x2906a4=Object[_0x5f46bb(0x78)](_0x2ff016[0x0]),_0x1ed111=_0x2906a4[_0x5f46bb(0x8e)](_0x8f3597=>Math['max'](_0x8f3597['length'],..._0x2ff016['map'](_0x49bc05=>String(_0x49bc05[_0x8f3597]??'')[_0x5f46bb(0x9c)]))),_0x8d5ac4=_0x2906a4[_0x5f46bb(0x8e)]((_0x42f591,_0x1fc129)=>_0x42f591[_0x5f46bb(0x8a)](_0x1ed111[_0x1fc129]))[_0x5f46bb(0x93)]('\x20\x20'),_0x576820=_0x1ed111[_0x5f46bb(0x8e)](_0x683644=>'-'[_0x5f46bb(0x7b)](_0x683644))['join']('\x20\x20');console[_0x5f46bb(0x90)](_0x8d5ac4),console['log'](_0x576820);for(const _0x5eddcb of _0x2ff016){const _0x2fcf51=_0x2906a4['map']((_0x41545b,_0x1bdbc8)=>String(_0x5eddcb[_0x41545b]??'')['padEnd'](_0x1ed111[_0x1bdbc8]))[_0x5f46bb(0x93)]('\x20\x20');console[_0x5f46bb(0x90)](_0x2fcf51);}}function a106_0x4c3e(){const _0x306dc0=['44481uIaALb','command','data','(empty)','slice','[dry-run]\x20Would\x20execute:','risk','isArray','stdout','\x20items:\x0a','pretty','padEnd','object','max','2350575ETTrUc','map','3411670OYksin','log','stringify','error','join','85036UrrSTc','432TvMecK','10230CWypbr','1030xpfVEg','Found\x20','394084wzfdze','56GyOjNk','22561ktSaVk','length','entries','values','Unknown\x20error','keys','Error:\x20','dryRun','repeat','command_error','table','message'];a106_0x4c3e=function(){return _0x306dc0;};return a106_0x4c3e();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x8b41b0,_0x2795f9){var _0x4745a9=a107_0xdf14,_0x54358e=_0x8b41b0();while(!![]){try{var _0x5f1c3d=parseInt(_0x4745a9(0xe4))/0x1*(parseInt(_0x4745a9(0xea))/0x2)+-parseInt(_0x4745a9(0xe5))/0x3*(parseInt(_0x4745a9(0xde))/0x4)+parseInt(_0x4745a9(0xe9))/0x5+parseInt(_0x4745a9(0xe7))/0x6*(-parseInt(_0x4745a9(0xe0))/0x7)+parseInt(_0x4745a9(0xdd))/0x8*(-parseInt(_0x4745a9(0xe8))/0x9)+parseInt(_0x4745a9(0xe1))/0xa+-parseInt(_0x4745a9(0xe6))/0xb;if(_0x5f1c3d===_0x2795f9)break;else _0x54358e['push'](_0x54358e['shift']());}catch(_0x5183b0){_0x54358e['push'](_0x54358e['shift']());}}}(a107_0x5561,0x256ee));export function extractList(_0x2cd115){var _0x4de803=a107_0xdf14;if(Array[_0x4de803(0xe3)](_0x2cd115))return _0x2cd115;if(_0x2cd115&&typeof _0x2cd115===_0x4de803(0xe2))return _0x2cd115[_0x4de803(0xdf)]??[];return[];}function a107_0xdf14(_0x5b3148,_0x297ae2){_0x5b3148=_0x5b3148-0xdd;var _0x55618b=a107_0x5561();var _0xdf1476=_0x55618b[_0x5b3148];return _0xdf1476;}function a107_0x5561(){var _0x1a3941=['isArray','26042NCLSSc','21PbsqjI','680691OwMYff','47154JNlSDM','45BTgPOW','754820xzxsnc','22lwVyaI','paging','75792OscEzJ','45836sXIORS','tableData','126XOVrCZ','468260VfqxqN','object'];a107_0x5561=function(){return _0x1a3941;};return a107_0x5561();}export function extractPaging(_0x179433){var _0x210a9d=a107_0xdf14;if(_0x179433&&typeof _0x179433==='object'&&!Array[_0x210a9d(0xe3)](_0x179433))return _0x179433[_0x210a9d(0xeb)];return undefined;}
|
package/lib/framework/runner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x45fff4,_0x144ef4){const _0x14a324=a108_0x12b1,_0xaed90e=_0x45fff4();while(!![]){try{const _0x3fb7a9=parseInt(_0x14a324(0x17b))/0x1+-parseInt(_0x14a324(0x16c))/0x2+-parseInt(_0x14a324(0x15f))/0x3+-parseInt(_0x14a324(0x17e))/0x4*(parseInt(_0x14a324(0x185))/0x5)+-parseInt(_0x14a324(0x158))/0x6+parseInt(_0x14a324(0x18a))/0x7+parseInt(_0x14a324(0x192))/0x8;if(_0x3fb7a9===_0x144ef4)break;else _0xaed90e['push'](_0xaed90e['shift']());}catch(_0x1cccf4){_0xaed90e['push'](_0xaed90e['shift']());}}}(a108_0x5e2a,0x29034));import{riskLevelOrder}from'./types.js';import{parseFlags,validateFlags}from'./flags.js';import{formatOutput}from'./output.js';import{CliErrors}from'../errors.js';import{resolveAlias,listAliases}from'../core/alias-resolver.js';import{CLI_BIN_NAME}from'../constant/cli.js';export async function runCommand(_0x118277,_0x5b96f4){const _0x37754f=a108_0x12b1,_0x267281=CLI_BIN_NAME+'\x20'+_0x118277['service']+'\x20'+_0x118277[_0x37754f(0x17a)],_0x5cbeab=parseFlags(_0x118277[_0x37754f(0x182)],_0x5b96f4[_0x37754f(0x193)]);validateFlags(_0x118277['flags'],_0x5cbeab,_0x267281);if(!_0x5cbeab[_0x37754f(0x188)]&&_0x5b96f4[_0x37754f(0x197)]&&riskLevelOrder(_0x118277[_0x37754f(0x184)])>riskLevelOrder(_0x5b96f4['riskLevel']))throw CliErrors[_0x37754f(0x18c)]('Command\x20`'+_0x267281+'`\x20has\x20risk\x20level\x20\x22'+_0x118277['risk']+_0x37754f(0x172)+_0x5b96f4['riskLevel']+_0x37754f(0x165)+_0x37754f(0x180));const _0x29b449=_0x5b96f4['apiDir']||_0x37754f(0x15b);resolveAliasToCode(_0x118277,_0x5cbeab,_0x29b449,_0x267281);let _0x316d9f='';if(_0x118277[_0x37754f(0x187)]!==![]){_0x316d9f=_0x5b96f4[_0x37754f(0x16e)]();if(!_0x316d9f)throw CliErrors[_0x37754f(0x15d)]();const {setActiveCookie:_0x48edfb}=await import('../core/api-client.js');_0x48edfb(_0x316d9f);}let _0x1341d8='';if(_0x118277[_0x37754f(0x17c)]!==![]){_0x1341d8=_0x5b96f4[_0x37754f(0x168)]()??'';if(!_0x1341d8)throw CliErrors[_0x37754f(0x186)]('Set\x20appcode\x20via\x20`'+CLI_BIN_NAME+'\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.');}const _0x416357=resolveFormat(_0x5cbeab,_0x118277,_0x5b96f4[_0x37754f(0x164)]),_0x4866c9=buildRuntimeContext({'appCode':_0x1341d8,'cookie':_0x316d9f,'apiDomain':_0x5b96f4[_0x37754f(0x166)](),'format':_0x416357,'flags':_0x5cbeab,'def':_0x118277,'nonInteractive':_0x5b96f4['isNonInteractive'],'defaultPageSize':_0x5b96f4[_0x37754f(0x161)],'defaultVerbose':_0x5b96f4[_0x37754f(0x17d)],'apiDir':_0x29b449,'selectedAppName':_0x5b96f4[_0x37754f(0x160)]});_0x118277['validate']&&await _0x118277[_0x37754f(0x16f)](_0x4866c9);if(_0x5cbeab[_0x37754f(0x188)]){if(!_0x118277[_0x37754f(0x181)])throw CliErrors['validation'](_0x37754f(0x175)+_0x267281+'`.');const _0x5863bf=await _0x118277[_0x37754f(0x181)](_0x4866c9);formatOutput({'ok':!![],'data':_0x5863bf},{'command':_0x267281,'risk':_0x118277[_0x37754f(0x184)],'format':_0x416357,'dryRun':!![]});return;}if(_0x118277[_0x37754f(0x184)]==='high-risk-write'&&!_0x5cbeab[_0x37754f(0x199)]){if(_0x5b96f4[_0x37754f(0x18f)])throw CliErrors[_0x37754f(0x18c)](_0x37754f(0x159)+_0x267281+_0x37754f(0x18b));await requireConfirmation(_0x267281);}const _0x3e0480=await _0x118277['execute'](_0x4866c9);formatOutput(_0x3e0480,{'command':_0x267281,'risk':_0x118277[_0x37754f(0x184)],'format':_0x416357});}function a108_0x5e2a(){const _0x3a650e=['alias','\x22.\x20','riskLevel','string','yes','963768fWkpRe','High-risk\x20operation\x20`','apiDir','./src/api','verbose','authRequired','pretty','809805sERjfl','selectedAppName','defaultPageSize','⚠\x20\x20High-risk\x20operation:\x20','format','defaultFormat','\x22.\x0a','resolveApiDomain','number','resolveAppCode','nonInteractive','pagesize','table','150338YoZJVi','json','resolveCookie','validate','name','service','\x22,\x20which\x20exceeds\x20the\x20configured\x20riskLevel\x20\x22','toLowerCase','some','--dry-run\x20is\x20not\x20supported\x20for\x20`','\x20api\x20pull`\x20first.','question','cancelled','\x0a\x20\x20\x20Continue?\x20[y/N]\x20','command','197513vWZGEL','requiresAppCode','defaultVerbose','25964llrcCJ','Operation\x20cancelled\x20by\x20user.','\x20\x20Set\x20riskLevel\x20in\x20.rabetbase.json\x20or\x20RABETBASE_RISK_LEVEL\x20to\x20allow\x20this\x20operation.','dryRun','flags','node:readline','risk','80eJhses','configMissing','requiresAuth','dry-run','createInterface','1552684jkWBVU','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.','validation','.\x20Run\x20`','length','isNonInteractive','No\x20api.ts\x20found\x20in\x20','`\x20requires\x20either\x20--code\x20or\x20--alias.','2866008jRAnce','rawFlags','code'];a108_0x5e2a=function(){return _0x3a650e;};return a108_0x5e2a();}function buildRuntimeContext(_0x1e7d3c){const _0x378bb5=a108_0x12b1,{flags:_0x3531e3,def:_0x306427}=_0x1e7d3c,_0x333e5b=CLI_BIN_NAME+'\x20'+_0x306427[_0x378bb5(0x171)]+'\x20'+_0x306427['command'];return{'appCode':_0x1e7d3c['appCode'],'cookie':_0x1e7d3c['cookie'],'apiDomain':_0x1e7d3c['apiDomain'],'format':_0x1e7d3c[_0x378bb5(0x163)],'nonInteractive':_0x1e7d3c[_0x378bb5(0x169)],'apiDir':_0x1e7d3c[_0x378bb5(0x15a)],'selectedAppName':_0x1e7d3c[_0x378bb5(0x160)],'str'(_0x57e914){return String(_0x3531e3[_0x57e914]??'');},'bool'(_0x42ffee){const _0x25ce42=_0x378bb5;if(_0x3531e3[_0x42ffee]===!![])return!![];if(_0x42ffee===_0x25ce42(0x15c)&&_0x1e7d3c[_0x25ce42(0x17d)])return!![];return![];},'num'(_0x3b911e,_0x2142f9){const _0x15e570=_0x378bb5,_0x176917=_0x3531e3[_0x3b911e];if(typeof _0x176917===_0x15e570(0x167))return _0x176917;if(_0x3b911e===_0x15e570(0x16a)&&_0x1e7d3c[_0x15e570(0x161)]!=null)return _0x1e7d3c[_0x15e570(0x161)];return _0x2142f9??0x0;},'flag'(_0x42c149){return _0x3531e3[_0x42c149];},'output'(_0x4c46c1){const _0x87dd32=_0x378bb5;formatOutput(_0x4c46c1,{'command':_0x333e5b,'risk':_0x306427[_0x87dd32(0x184)],'format':_0x1e7d3c['format']});}};}function a108_0x12b1(_0x3ee927,_0x11abec){_0x3ee927=_0x3ee927-0x158;const _0x5e2a4=a108_0x5e2a();let _0x12b159=_0x5e2a4[_0x3ee927];return _0x12b159;}function resolveFormat(_0xe3ed45,_0x3ffae7,_0x4f8801){const _0x2bcd5a=a108_0x12b1;if(_0x3ffae7['hasFormat']===![])return'pretty';const _0x277d29=_0xe3ed45[_0x2bcd5a(0x163)];if(_0x277d29===_0x2bcd5a(0x16d)||_0x277d29==='pretty'||_0x277d29===_0x2bcd5a(0x16b))return _0x277d29;if(_0x4f8801)return _0x4f8801;return _0x2bcd5a(0x15e);}async function requireConfirmation(_0x3c4d44){const _0x4d7a49=a108_0x12b1,_0x411b66=await import(_0x4d7a49(0x183)),_0x204bfc=_0x411b66[_0x4d7a49(0x189)]({'input':process['stdin'],'output':process['stderr']});return new Promise((_0x131a25,_0x4a4076)=>{const _0x3374d3=_0x4d7a49;_0x204bfc[_0x3374d3(0x177)](_0x3374d3(0x162)+_0x3c4d44+_0x3374d3(0x179),_0x447a5a=>{const _0x5b2551=_0x3374d3;_0x204bfc['close'](),_0x447a5a[_0x5b2551(0x173)]()==='y'||_0x447a5a[_0x5b2551(0x173)]()===_0x5b2551(0x199)?_0x131a25():_0x4a4076(CliErrors[_0x5b2551(0x178)](_0x5b2551(0x17f)));});});}function resolveAliasToCode(_0x347a18,_0xed03cf,_0x470831,_0x38b33a){const _0x33bc25=a108_0x12b1,_0x296ba2=_0x347a18[_0x33bc25(0x182)][_0x33bc25(0x174)](_0x3c6338=>_0x3c6338[_0x33bc25(0x170)]==='code'&&_0x3c6338['type']===_0x33bc25(0x198)),_0x5eaaa9=_0x347a18['flags'][_0x33bc25(0x174)](_0x3bb0f1=>_0x3bb0f1[_0x33bc25(0x170)]===_0x33bc25(0x195)&&_0x3bb0f1['type']===_0x33bc25(0x198));if(!_0x296ba2||!_0x5eaaa9)return;const _0x202139=_0xed03cf[_0x33bc25(0x194)]?String(_0xed03cf[_0x33bc25(0x194)]):'',_0x2c47e1=_0xed03cf[_0x33bc25(0x195)]?String(_0xed03cf[_0x33bc25(0x195)]):'';if(!_0x202139&&!_0x2c47e1)throw CliErrors[_0x33bc25(0x18c)]('`'+_0x38b33a+_0x33bc25(0x191));if(_0x2c47e1&&!_0x202139){const _0x4156ef=resolveAlias(_0x470831,_0x2c47e1);if(!_0x4156ef){const _0x510b55=listAliases(_0x470831)['map'](_0x47ca18=>_0x47ca18[_0x33bc25(0x195)]),_0x52f791=_0x510b55[_0x33bc25(0x18e)]?'Available\x20aliases:\x20'+_0x510b55['join'](',\x20'):_0x33bc25(0x190)+_0x470831+_0x33bc25(0x18d)+CLI_BIN_NAME+_0x33bc25(0x176);throw CliErrors[_0x33bc25(0x18c)]('Unknown\x20alias\x20\x22'+_0x2c47e1+_0x33bc25(0x196)+_0x52f791);}_0xed03cf['code']=_0x4156ef;}}
|
package/lib/framework/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{};
|
|
1
|
+
function a109_0xa62b(_0x2e6669,_0x501e3a){_0x2e6669=_0x2e6669-0x1f2;const _0x5cee70=a109_0x5cee();let _0xa62b19=_0x5cee70[_0x2e6669];return _0xa62b19;}(function(_0x4e0507,_0x5e087c){const _0x599fe5=a109_0xa62b,_0x53e43b=_0x4e0507();while(!![]){try{const _0x29100f=parseInt(_0x599fe5(0x1f3))/0x1+parseInt(_0x599fe5(0x1fb))/0x2+parseInt(_0x599fe5(0x1f7))/0x3*(-parseInt(_0x599fe5(0x1f8))/0x4)+parseInt(_0x599fe5(0x1f2))/0x5+parseInt(_0x599fe5(0x1f5))/0x6*(-parseInt(_0x599fe5(0x1f6))/0x7)+-parseInt(_0x599fe5(0x1fa))/0x8+-parseInt(_0x599fe5(0x1f4))/0x9;if(_0x29100f===_0x5e087c)break;else _0x53e43b['push'](_0x53e43b['shift']());}catch(_0x267c81){_0x53e43b['push'](_0x53e43b['shift']());}}}(a109_0x5cee,0x5e6fd));function a109_0x5cee(){const _0x3bc37f=['4yFXPvT','read','1914528uqCsjB','999776bdfeiN','1448460ADWGwj','538024lozOfm','1842840NCulZa','6VNmIKE','630973zTMprR','1219728KBWOly'];a109_0x5cee=function(){return _0x3bc37f;};return a109_0x5cee();}export function riskLevelOrder(_0x165e0d){const _0x2d84cc=a109_0xa62b,_0x2d8613={'read':0x0,'write':0x1,'high-risk-write':0x2};return _0x2d8613[_0x165e0d??_0x2d84cc(0x1f9)]??0x0;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const
|
|
1
|
+
const a110_0x168538=a110_0x3f5e;(function(_0x2938bb,_0x28917f){const _0x158c87=a110_0x3f5e,_0x199fb1=_0x2938bb();while(!![]){try{const _0x3ea5ea=parseInt(_0x158c87(0xa4))/0x1+parseInt(_0x158c87(0xaa))/0x2*(-parseInt(_0x158c87(0xab))/0x3)+parseInt(_0x158c87(0xa7))/0x4*(parseInt(_0x158c87(0xac))/0x5)+-parseInt(_0x158c87(0xad))/0x6*(-parseInt(_0x158c87(0xaf))/0x7)+-parseInt(_0x158c87(0xae))/0x8+parseInt(_0x158c87(0xa1))/0x9+-parseInt(_0x158c87(0xa2))/0xa*(parseInt(_0x158c87(0xa3))/0xb);if(_0x3ea5ea===_0x28917f)break;else _0x199fb1['push'](_0x199fb1['shift']());}catch(_0x12be15){_0x199fb1['push'](_0x199fb1['shift']());}}}(a110_0x78f4,0x6b52e));export const VERSION=a110_0x168538(0xa8);export const GIT_TAG=a110_0x168538(0xa5);export const GIT_COMMIT=a110_0x168538(0xa9);function a110_0x3f5e(_0x1b6809,_0x198972){_0x1b6809=_0x1b6809-0xa1;const _0x78f486=a110_0x78f4();let _0x3f5e2d=_0x78f486[_0x1b6809];return _0x3f5e2d;}export const BUILD_TIME=a110_0x168538(0xa6);function a110_0x78f4(){const _0x44f6b3=['3890248isCOON','28553jsxeVp','7711776yhmDbv','10078870MuXBAW','11XcvHiI','439255MywveP','v2.0.4-beta.2','2026-04-02T07:30:13.086Z','4MXCvdS','2.0.4-beta.2','82dca0c','422EoiZGa','8046zQvUdf','1816375agvAlX','1236hzYljJ'];a110_0x78f4=function(){return _0x44f6b3;};return a110_0x78f4();}
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x285c00,_0x19f240){var _0x24421e=a111_0x1c1e,_0x352421=_0x285c00();while(!![]){try{var _0x4030dc=parseInt(_0x24421e(0x196))/0x1*(-parseInt(_0x24421e(0x18f))/0x2)+-parseInt(_0x24421e(0x199))/0x3+parseInt(_0x24421e(0x194))/0x4*(-parseInt(_0x24421e(0x19b))/0x5)+parseInt(_0x24421e(0x198))/0x6*(parseInt(_0x24421e(0x190))/0x7)+parseInt(_0x24421e(0x195))/0x8+parseInt(_0x24421e(0x192))/0x9+parseInt(_0x24421e(0x193))/0xa*(parseInt(_0x24421e(0x19c))/0xb);if(_0x4030dc===_0x19f240)break;else _0x352421['push'](_0x352421['shift']());}catch(_0x36514e){_0x352421['push'](_0x352421['shift']());}}}(a111_0x3c25,0xf1edc));import a111_0xcebbf5 from'chalk';function a111_0x1c1e(_0x11e509,_0x2ecf4d){_0x11e509=_0x11e509-0x18c;var _0x3c2578=a111_0x3c25();var _0x1c1eb7=_0x3c2578[_0x11e509];return _0x1c1eb7;}function a111_0x3c25(){var _0x42f8f4=['\x20\x20Rabetbase\x20CLI','3083454xfrLcT','12960jlYsCU','80924GfFgIj','9987144jMBczi','1683637vTmPic','\x20\x20Use\x20','8838gImlyY','1833432vjQEUR','bold','485uagzcc','25927JmBCMv','log','\x20to\x20view\x20available\x20commands.','\x20--help','2BmMWuC','2863sIyyww'];a111_0x3c25=function(){return _0x42f8f4;};return a111_0x3c25();}import{CLI_BIN_NAME}from'./constant/cli.js';export function showHelp(){var _0x5c068b=a111_0x1c1e;console[_0x5c068b(0x18c)](),console['log'](a111_0xcebbf5['green'][_0x5c068b(0x19a)](_0x5c068b(0x191))),console[_0x5c068b(0x18c)](),console[_0x5c068b(0x18c)](_0x5c068b(0x197)+a111_0xcebbf5['green'][_0x5c068b(0x19a)](CLI_BIN_NAME+_0x5c068b(0x18e))+_0x5c068b(0x18d)),console[_0x5c068b(0x18c)]();}
|
package/lib/init/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function a107_0x47b2(_0x568695,_0x591548){_0x568695=_0x568695-0x1c3;const _0x3655b0=a107_0x3655();let _0x47b26c=_0x3655b0[_0x568695];return _0x47b26c;}const a107_0x4952c7=a107_0x47b2;(function(_0x474133,_0x96e12e){const _0x485ea6=a107_0x47b2,_0x22c6a3=_0x474133();while(!![]){try{const _0x25a08e=parseInt(_0x485ea6(0x206))/0x1+-parseInt(_0x485ea6(0x1c8))/0x2+-parseInt(_0x485ea6(0x1d9))/0x3+-parseInt(_0x485ea6(0x1fd))/0x4*(parseInt(_0x485ea6(0x1e7))/0x5)+parseInt(_0x485ea6(0x1db))/0x6*(parseInt(_0x485ea6(0x201))/0x7)+-parseInt(_0x485ea6(0x1cb))/0x8+-parseInt(_0x485ea6(0x1e9))/0x9*(-parseInt(_0x485ea6(0x1e8))/0xa);if(_0x25a08e===_0x96e12e)break;else _0x22c6a3['push'](_0x22c6a3['shift']());}catch(_0x3ed124){_0x22c6a3['push'](_0x22c6a3['shift']());}}}(a107_0x3655,0x30ce3));import{jsxs as a107_0x148b10,jsx as a107_0x526d39}from'react/jsx-runtime';import{useState,useEffect}from'react';import{Box,Text,useInput}from'ink';import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,join,dirname}from'node:path';import{fileURLToPath}from'node:url';import{logger}from'../utils/logger.js';import{readRawConfig,getProjectConfigPath,writeConfigFile,NEW_CONFIG_NAME}from'../context.js';const LEGACY_CONFIG_NAMES=[a107_0x4952c7(0x1e0),a107_0x4952c7(0x1c9)];function a107_0x3655(){const _0x231edf=['Initializing\x20configuration\x20file...','\x0aMigration\x20cancelled.\x20Run\x20`rabetbase\x20project\x20init`\x20to\x20start\x20fresh.','production','155060ZLDLTW','backspace','env','trim','91NfQBDU','keys','升级配置文件失败','gray','Migrating\x20legacy\x20config...','200624mKmWbJ','You\x20can\x20now\x20use\x20commands\x20like\x20\x27rabetbase\x20api\x20doc\x27\x20and\x20\x27rabetbase\x20api\x20pull\x27','version','\x20←\x20','utf8','Old\x20file\x20backed\x20up\x20as\x20','Invalid\x20App\x20Code','createdAt','green','App\x20Code\x20identifies\x20your\x20project.\x20Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','746648qCOvKF','.lovrabetrc','column','2651240SZRRgE','success','Upgrade\x20it\x20to\x20','✓\x20Upgraded\x20','checking','return','migrating','App\x20Code\x20cannot\x20be\x20empty','从旧配置文件升级成功','init-input','escape','error','migrating-input','init','509685UsOAjn','Error:\x20','137988Xkljgp','app','log','初始化项目配置文件成功','ctrl','.lovrabet.json','toLocaleString','appcode','string','.rabetbase.json','length','message','10WKfHli','10trtyax','5872167yBZnQa','创建配置文件失败','.bak','\x20\x20The\x20old\x20file\x20will\x20be\x20renamed\x20to\x20*.bak','split','exit','info','parse','⚠\x20Found\x20legacy\x20configuration\x20file:\x20','package.json','yellow','cyan','setLogPath','cwd','../..','1.0.0','\x20\x20appcode:\x20'];a107_0x3655=function(){return _0x231edf;};return a107_0x3655();}export function Init({appcode:_0x1b528f,env:_0x1709e0,autoYes:_0x3d6b08}){const _0x11232e=a107_0x4952c7,[_0x10cfa2,_0x2be6f9]=useState(_0x11232e(0x1cf)),[_0x19eb85,_0x4453ba]=useState(null),[_0x4096dc,_0x299661]=useState(![]),[_0x9ec03c,_0x28127e]=useState(!_0x1b528f),[_0x3a57f3,_0x5a3b5c]=useState(''),[_0x47326d,_0x2f2d49]=useState(''),[_0x335991,_0x130b11]=useState(_0x1b528f||''),[_0x47df8e]=useState(_0x1709e0),[_0x16b513,_0x5c6a68]=useState(),[_0x201d28,_0x554519]=useState({});function _0x46fc1c(_0x40a350){const _0x1371a4=_0x11232e;if(_0x40a350[_0x1371a4(0x1e5)]===0x0)return{'valid':![],'message':''};if(_0x40a350[_0x1371a4(0x1e5)]>0x64)return{'valid':![],'message':'App\x20Code\x20cannot\x20exceed\x20100\x20characters'};const _0x2b53d7=/^[A-Za-z0-9_-]+$/;if(!_0x2b53d7['test'](_0x40a350))return{'valid':![],'message':'App\x20Code\x20can\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_'};return{'valid':!![]};}useInput((_0x18f817,_0x5921ac)=>{const _0x416fe4=_0x11232e;if(_0x10cfa2===_0x416fe4(0x1d7)){if(_0x5921ac['return']||_0x18f817==='y'||_0x18f817==='Y')_0x2be6f9(_0x416fe4(0x1d1));else{if(_0x18f817==='n'||_0x18f817==='N'||_0x5921ac[_0x416fe4(0x1d5)])console[_0x416fe4(0x1dd)](_0x416fe4(0x1fb)),process[_0x416fe4(0x1ee)](0x0);else _0x5921ac['ctrl']&&_0x18f817==='c'&&process['exit'](0x0);}return;}if(!_0x9ec03c)return;if(_0x5921ac[_0x416fe4(0x1d0)]){if(_0x47326d||!_0x3a57f3[_0x416fe4(0x200)]()){_0x2f2d49(_0x416fe4(0x1d2));return;}const _0x2de475=_0x3a57f3[_0x416fe4(0x200)](),{valid:_0x1f5e68,message:_0x425985}=_0x46fc1c(_0x2de475);if(!_0x1f5e68){_0x2f2d49(_0x425985||_0x416fe4(0x1c4));return;}_0x130b11(_0x2de475),_0x28127e(![]);}else{if(_0x5921ac[_0x416fe4(0x1fe)]||_0x5921ac['delete'])_0x5a3b5c(_0x1a554e=>{const _0xc47e7f=_0x416fe4,_0x13b8e9=_0x1a554e['slice'](0x0,-0x1);return _0x2f2d49(_0x13b8e9[_0xc47e7f(0x1e5)]===0x0?'':_0x46fc1c(_0x13b8e9)[_0xc47e7f(0x1e6)]||''),_0x13b8e9;});else _0x5921ac[_0x416fe4(0x1df)]&&_0x18f817==='c'?process[_0x416fe4(0x1ee)](0x0):_0x5a3b5c(_0x3690c2=>{const _0x32b768=_0x416fe4,_0x49fcf3=_0x3690c2+_0x18f817;return _0x2f2d49(_0x46fc1c(_0x49fcf3)[_0x32b768(0x1e6)]||''),_0x49fcf3;});}},{'isActive':_0x10cfa2===_0x11232e(0x1d7)||_0x10cfa2==='init-input'}),useEffect(()=>{const _0x26a0c8=_0x11232e;if(_0x10cfa2!==_0x26a0c8(0x1cf))return;const _0x151560=process[_0x26a0c8(0x1f6)]();if(getProjectConfigPath()){_0x4453ba('.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.'),_0x2be6f9(_0x26a0c8(0x1d6)),setTimeout(()=>process[_0x26a0c8(0x1ee)](0x1),0x64);return;}let _0x314944;for(const _0x3c7d4f of LEGACY_CONFIG_NAMES){const _0x4bb102=resolve(_0x151560,_0x3c7d4f);if(existsSync(_0x4bb102)){_0x314944=_0x4bb102;break;}}if(_0x314944){_0x5c6a68(_0x314944);try{const _0x362240=readFileSync(_0x314944,_0x26a0c8(0x20a));_0x554519(JSON[_0x26a0c8(0x1f0)](_0x362240));}catch{_0x554519({});}_0x3d6b08?_0x2be6f9(_0x26a0c8(0x1d1)):_0x2be6f9(_0x26a0c8(0x1d7));return;}_0x2be6f9(_0x26a0c8(0x1d4)),!_0x1b528f?_0x28127e(!![]):_0x28127e(![]);},[_0x10cfa2,_0x3d6b08,_0x1b528f]),useEffect(()=>{const _0x55a525=_0x11232e;if(_0x10cfa2!==_0x55a525(0x1d1))return;const _0x1aeeed=process[_0x55a525(0x1f6)](),_0x44835c=resolve(_0x1aeeed,NEW_CONFIG_NAME);try{const _0x4f2956=fileURLToPath(import.meta.url),_0x1046b4=resolve(dirname(_0x4f2956),'../..'),_0x37580a=join(_0x1046b4,'package.json');let _0x33d874=_0x55a525(0x1f8);try{const _0x45139c=JSON[_0x55a525(0x1f0)](readFileSync(_0x37580a,_0x55a525(0x20a)));_0x33d874=_0x45139c[_0x55a525(0x208)]||_0x55a525(0x1f8);}catch{}const _0x3e1cdd=readRawConfig(),_0x4f2ee3={..._0x3e1cdd,..._0x201d28,'version':_0x33d874,'migratedAt':new Date()[_0x55a525(0x1e1)](),'migratedFrom':_0x16b513};if(!_0x4f2ee3[_0x55a525(0x1e2)]&&!_0x4f2ee3['app']){if(!_0x1b528f){_0x554519(_0x4f2ee3),_0x2be6f9('init-input'),_0x28127e(!![]);return;}_0x4f2ee3['appcode']=_0x1b528f;}if(_0x4f2ee3[_0x55a525(0x1ff)]&&typeof _0x4f2ee3[_0x55a525(0x1ff)]!==_0x55a525(0x1e3))delete _0x4f2ee3[_0x55a525(0x1ff)];else!_0x4f2ee3[_0x55a525(0x1ff)]&&(_0x4f2ee3['env']=_0x3e1cdd['env']||'production');writeConfigFile(_0x44835c,_0x4f2ee3);if(_0x16b513){const _0x54f245=_0x16b513+_0x55a525(0x1eb);renameSync(_0x16b513,_0x54f245);}logger['setLogPath'](_0x1aeeed),logger[_0x55a525(0x1ef)]('init',_0x55a525(0x1d3),{'from':_0x16b513,'to':_0x44835c,'appcode':_0x4f2ee3[_0x55a525(0x1e2)]||_0x4f2ee3['app'],'env':_0x4f2ee3[_0x55a525(0x1ff)]}),_0x299661(!![]),_0x2be6f9(_0x55a525(0x1cc)),setTimeout(()=>process[_0x55a525(0x1ee)](0x0),0x64);}catch(_0x5d7658){logger[_0x55a525(0x1d6)](_0x55a525(0x1d8),_0x55a525(0x203),{'error':_0x5d7658 instanceof Error?_0x5d7658[_0x55a525(0x1e6)]:String(_0x5d7658)}),_0x4453ba(_0x55a525(0x1da)+(_0x5d7658 instanceof Error?_0x5d7658['message']:String(_0x5d7658))),_0x2be6f9(_0x55a525(0x1d6)),setTimeout(()=>process[_0x55a525(0x1ee)](0x1),0x64);}},[_0x10cfa2]),useEffect(()=>{const _0x362516=_0x11232e;if(_0x10cfa2!==_0x362516(0x1d8))return;const _0x5ae5d7=process[_0x362516(0x1f6)](),_0x596a95=resolve(_0x5ae5d7,NEW_CONFIG_NAME);try{const _0x2ec9ed=fileURLToPath(import.meta.url),_0x4bc122=resolve(dirname(_0x2ec9ed),_0x362516(0x1f7)),_0x876518=join(_0x4bc122,_0x362516(0x1f2));let _0x4e1520='1.0.0';try{const _0x20fa39=JSON[_0x362516(0x1f0)](readFileSync(_0x876518,_0x362516(0x20a)));_0x4e1520=_0x20fa39['version']||'1.0.0';}catch{}const _0x4ac65e=readRawConfig(),_0x357539=typeof _0x4ac65e[_0x362516(0x1ff)]===_0x362516(0x1e3)?_0x4ac65e[_0x362516(0x1ff)]:undefined,_0x49cd80={};_0x201d28&&Object[_0x362516(0x202)](_0x201d28)['length']>0x0&&Object['assign'](_0x49cd80,_0x201d28),!_0x49cd80['version']&&(_0x49cd80[_0x362516(0x208)]=_0x4e1520),!_0x49cd80['createdAt']&&(_0x49cd80[_0x362516(0x1c5)]=new Date()[_0x362516(0x1e1)]()),!_0x49cd80[_0x362516(0x1e2)]&&!_0x49cd80[_0x362516(0x1dc)]&&(_0x49cd80['appcode']=_0x335991),!_0x49cd80['env']&&(_0x49cd80[_0x362516(0x1ff)]=_0x47df8e||_0x357539||_0x362516(0x1fc)),writeConfigFile(_0x596a95,_0x49cd80),logger[_0x362516(0x1f5)](_0x5ae5d7),logger[_0x362516(0x1ef)]('init',_0x362516(0x1de),{'appcode':_0x49cd80[_0x362516(0x1e2)]||_0x49cd80[_0x362516(0x1dc)],'env':_0x49cd80[_0x362516(0x1ff)],'version':_0x49cd80[_0x362516(0x208)],'configPath':_0x596a95}),_0x299661(!![]),_0x2be6f9(_0x362516(0x1cc)),setTimeout(()=>process[_0x362516(0x1ee)](0x0),0x64);}catch(_0x1ccd03){logger['error'](_0x362516(0x1d8),_0x362516(0x1ea),{'error':_0x1ccd03 instanceof Error?_0x1ccd03['message']:String(_0x1ccd03)}),_0x4453ba(_0x362516(0x1da)+(_0x1ccd03 instanceof Error?_0x1ccd03[_0x362516(0x1e6)]:String(_0x1ccd03))),_0x2be6f9(_0x362516(0x1d6)),setTimeout(()=>process[_0x362516(0x1ee)](0x1),0x64);}},[_0x10cfa2,_0x335991,_0x47df8e]),useEffect(()=>{const _0x27e38a=_0x11232e;_0x10cfa2==='init-input'&&!_0x9ec03c&&(_0x335991||_0x201d28&&Object[_0x27e38a(0x202)](_0x201d28)[_0x27e38a(0x1e5)]>0x0)&&_0x2be6f9(_0x27e38a(0x1d8));},[_0x10cfa2,_0x9ec03c,_0x335991]);if(_0x19eb85)return a107_0x526d39(Box,{'flexDirection':_0x11232e(0x1ca),'children':a107_0x148b10(Text,{'color':'red','children':['✗\x20',_0x19eb85]})});if(_0x10cfa2===_0x11232e(0x1d7)){const _0x32048c=_0x16b513?_0x16b513[_0x11232e(0x1ed)]('/')['pop']():'legacy\x20config',_0x25aa96=_0x201d28?.[_0x11232e(0x1e2)]||_0x201d28?.[_0x11232e(0x1dc)];return a107_0x148b10(Box,{'flexDirection':_0x11232e(0x1ca),'children':[a107_0x148b10(Text,{'color':_0x11232e(0x1f3),'children':[_0x11232e(0x1f1),a107_0x526d39(Text,{'bold':!![],'children':_0x32048c})]}),_0x25aa96&&a107_0x148b10(Text,{'color':'cyan','children':[_0x11232e(0x1f9),_0x25aa96]}),a107_0x148b10(Text,{'children':['\x0a',_0x11232e(0x1cd),a107_0x526d39(Text,{'bold':!![],'children':_0x11232e(0x1e4)}),'?','\x20',a107_0x526d39(Text,{'color':'green','children':'[Y/n]'})]}),a107_0x526d39(Text,{'color':_0x11232e(0x204),'children':_0x11232e(0x1ec)})]});}if(_0x10cfa2===_0x11232e(0x1d4)&&_0x9ec03c)return a107_0x148b10(Box,{'flexDirection':_0x11232e(0x1ca),'children':[a107_0x148b10(Box,{'children':[a107_0x148b10(Text,{'color':_0x11232e(0x1f4),'children':['Please\x20enter\x20App\x20Code:','\x20']}),_0x3a57f3?a107_0x526d39(Text,{'color':_0x11232e(0x1c6),'children':_0x3a57f3}):a107_0x526d39(Text,{'color':_0x11232e(0x204),'children':'_'}),_0x47326d&&a107_0x148b10(Text,{'color':'red','children':[_0x11232e(0x209),_0x47326d]})]}),!_0x47326d&&!_0x3a57f3&&a107_0x526d39(Box,{'children':a107_0x526d39(Text,{'color':_0x11232e(0x204),'children':_0x11232e(0x1c7)})})]});if(_0x10cfa2===_0x11232e(0x1d1))return a107_0x526d39(Box,{'children':a107_0x526d39(Text,{'children':_0x11232e(0x205)})});if(_0x10cfa2===_0x11232e(0x1d8))return a107_0x526d39(Box,{'children':a107_0x526d39(Text,{'children':_0x11232e(0x1fa)})});if(_0x4096dc||_0x10cfa2===_0x11232e(0x1cc)){const _0x3c81f0=_0x16b513?_0x16b513['split']('/')['pop']():undefined;if(_0x3c81f0)return a107_0x148b10(Box,{'flexDirection':_0x11232e(0x1ca),'children':[a107_0x148b10(Text,{'color':_0x11232e(0x1c6),'children':[_0x11232e(0x1ce),_0x3c81f0,'\x20→\x20.rabetbase.json']}),a107_0x148b10(Text,{'color':_0x11232e(0x1f4),'children':['AppCode',':\x20',_0x201d28?.['appcode']||_0x201d28?.['app']]}),a107_0x148b10(Text,{'color':_0x11232e(0x204),'children':[_0x11232e(0x1c3),_0x3c81f0,'.bak']})]});return a107_0x148b10(Box,{'flexDirection':_0x11232e(0x1ca),'children':[a107_0x148b10(Text,{'color':_0x11232e(0x1c6),'children':['✓\x20','Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory']}),a107_0x148b10(Text,{'color':_0x11232e(0x1f4),'children':['AppCode',':\x20',_0x335991]}),a107_0x526d39(Text,{'children':_0x11232e(0x207)})]});}return a107_0x526d39(Box,{'children':a107_0x526d39(Text,{'children':'Checking\x20existing\x20configuration...'})});}
|
|
1
|
+
(function(_0x9fa1d,_0x425e93){const _0x3cab8a=a112_0x5b3a,_0x1ba5a7=_0x9fa1d();while(!![]){try{const _0x381ec5=parseInt(_0x3cab8a(0x10b))/0x1+-parseInt(_0x3cab8a(0xfe))/0x2*(-parseInt(_0x3cab8a(0x10c))/0x3)+-parseInt(_0x3cab8a(0xe6))/0x4*(parseInt(_0x3cab8a(0xff))/0x5)+parseInt(_0x3cab8a(0xe9))/0x6+parseInt(_0x3cab8a(0xee))/0x7*(parseInt(_0x3cab8a(0x102))/0x8)+-parseInt(_0x3cab8a(0xef))/0x9*(parseInt(_0x3cab8a(0x100))/0xa)+parseInt(_0x3cab8a(0xf3))/0xb*(-parseInt(_0x3cab8a(0x107))/0xc);if(_0x381ec5===_0x425e93)break;else _0x1ba5a7['push'](_0x1ba5a7['shift']());}catch(_0x340bc8){_0x1ba5a7['push'](_0x1ba5a7['shift']());}}}(a112_0x2613,0xcc6fe));import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,dirname,basename}from'node:path';import{fileURLToPath}from'node:url';function a112_0x2613(){const _0x1db5ae=['bold','production','77kksZLl','1359pNhAXR','从旧配置文件升级成功','\x20→\x20.rabetbase.json','gray','51062tvwrnQ','app','trim','初始化项目配置文件成功','\x20\x20appcode:\x20','../..','✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory','string','toLocaleString','log','version','3325282warKSW','25BeUrKE','5290LKbBQk','env','601456nRNSUa','utf8','cyan','.bak','green','11076GKWjcj','appcode','parse','✓\x20Upgraded\x20','1348779ECkCvU','3AwTxyG','info','\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27rabetbase\x20api\x20doc\x27\x20and\x20\x27rabetbase\x20api\x20pull\x27','1.0.0','setLogPath','?\x20(Old\x20file\x20→\x20*.bak)','⚠\x20Found\x20legacy\x20configuration\x20file:\x20','126716BFoewW','init','yellow','9130752SWHwWM','Please\x20enter\x20App\x20Code:','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.'];a112_0x2613=function(){return _0x1db5ae;};return a112_0x2613();}import a112_0x3d21f from'chalk';import{input,confirm}from'@inquirer/prompts';import{logger}from'../utils/logger.js';function a112_0x5b3a(_0x7ec977,_0x43ab29){_0x7ec977=_0x7ec977-0xe2;const _0x26138f=a112_0x2613();let _0x5b3aae=_0x26138f[_0x7ec977];return _0x5b3aae;}import{readRawConfig,getProjectConfigPath,writeConfigFile,NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES}from'../context.js';import{validateAppcode}from'../commands/common/validate.js';export async function initConfig(_0x2b510b){const _0x4df367=a112_0x5b3a,{appcode:_0x67befe,env:_0xaec433,autoYes:_0x3520e6}=_0x2b510b,_0x557db7=process['cwd']();if(getProjectConfigPath())throw new Error(_0x4df367(0xeb));let _0x252de3;for(const _0xc41d58 of LEGACY_CONFIG_NAMES){const _0x5e07e5=resolve(_0x557db7,_0xc41d58);if(existsSync(_0x5e07e5)){_0x252de3=_0x5e07e5;break;}}if(_0x252de3){let _0x39645d={};try{_0x39645d=JSON[_0x4df367(0x109)](readFileSync(_0x252de3,_0x4df367(0x103)));}catch{}const _0x52a25b=basename(_0x252de3),_0x172638=_0x39645d?.[_0x4df367(0x108)]||_0x39645d?.[_0x4df367(0xf4)];let _0x52ca8a=_0x3520e6;!_0x3520e6&&(console[_0x4df367(0xfc)](a112_0x3d21f[_0x4df367(0xe8)](_0x4df367(0xe5)+a112_0x3d21f[_0x4df367(0xec)](_0x52a25b))),_0x172638&&console['log'](a112_0x3d21f[_0x4df367(0x104)](_0x4df367(0xf7)+_0x172638)),_0x52ca8a=await confirm({'message':'Upgrade\x20it\x20to\x20'+a112_0x3d21f[_0x4df367(0xec)]('.rabetbase.json')+_0x4df367(0xe4),'default':!![]}));if(!_0x52ca8a){console[_0x4df367(0xfc)]('Migration\x20cancelled.\x20Run\x20`rabetbase\x20project\x20init`\x20to\x20start\x20fresh.');return;}const _0x3e67a2=resolve(_0x557db7,NEW_CONFIG_NAME),_0x20c990=getCliVersionFromPkg(),_0x178c9c=readRawConfig(),_0x5e7d50={..._0x178c9c,..._0x39645d,'version':_0x20c990,'migratedAt':new Date()['toLocaleString'](),'migratedFrom':_0x252de3};if(!_0x5e7d50[_0x4df367(0x108)]&&!_0x5e7d50['app']){if(!_0x67befe){const _0x11400d=await askAppcode();_0x5e7d50[_0x4df367(0x108)]=_0x11400d;}else _0x5e7d50[_0x4df367(0x108)]=_0x67befe;}if(_0x5e7d50[_0x4df367(0x101)]&&typeof _0x5e7d50[_0x4df367(0x101)]!==_0x4df367(0xfa))delete _0x5e7d50[_0x4df367(0x101)];else!_0x5e7d50['env']&&(_0x5e7d50[_0x4df367(0x101)]=_0x178c9c[_0x4df367(0x101)]||_0x4df367(0xed));writeConfigFile(_0x3e67a2,_0x5e7d50);const _0x10f566=_0x252de3+_0x4df367(0x105);renameSync(_0x252de3,_0x10f566),logger[_0x4df367(0xe3)](_0x557db7),logger[_0x4df367(0x10d)](_0x4df367(0xe7),_0x4df367(0xf0),{'from':_0x252de3,'to':_0x3e67a2,'appcode':_0x5e7d50[_0x4df367(0x108)]||_0x5e7d50[_0x4df367(0xf4)],'env':_0x5e7d50[_0x4df367(0x101)]}),console['log'](a112_0x3d21f[_0x4df367(0x106)](_0x4df367(0x10a)+_0x52a25b+_0x4df367(0xf1))),console[_0x4df367(0xfc)](a112_0x3d21f[_0x4df367(0x104)]('\x20\x20AppCode:\x20'+(_0x5e7d50[_0x4df367(0x108)]||_0x5e7d50[_0x4df367(0xf4)]))),console[_0x4df367(0xfc)](a112_0x3d21f[_0x4df367(0xf2)]('\x20\x20Old\x20file\x20backed\x20up\x20as\x20'+_0x52a25b+_0x4df367(0x105)));return;}const _0x3fa791=_0x67befe||await askAppcode(),_0x303441=resolve(_0x557db7,NEW_CONFIG_NAME),_0x3e0765=getCliVersionFromPkg(),_0x2ce140=readRawConfig(),_0x3510e4=typeof _0x2ce140['env']===_0x4df367(0xfa)?_0x2ce140[_0x4df367(0x101)]:undefined,_0x215d69={'version':_0x3e0765,'createdAt':new Date()[_0x4df367(0xfb)](),'appcode':_0x3fa791,'env':_0xaec433||_0x3510e4||_0x4df367(0xed)};writeConfigFile(_0x303441,_0x215d69),logger[_0x4df367(0xe3)](_0x557db7),logger[_0x4df367(0x10d)](_0x4df367(0xe7),_0x4df367(0xf6),{'appcode':_0x215d69[_0x4df367(0x108)],'env':_0x215d69[_0x4df367(0x101)],'version':_0x215d69[_0x4df367(0xfd)],'configPath':_0x303441}),console[_0x4df367(0xfc)](a112_0x3d21f[_0x4df367(0x106)](_0x4df367(0xf9))),console['log'](a112_0x3d21f[_0x4df367(0x104)]('\x20\x20AppCode:\x20'+_0x3fa791)),console['log'](_0x4df367(0x10e));}function askAppcode(){const _0x532ae3=a112_0x5b3a;return input({'message':_0x532ae3(0xea),'validate':_0x52a434=>{const _0x192649=_0x532ae3;if(!_0x52a434[_0x192649(0xf5)]())return'App\x20Code\x20cannot\x20be\x20empty';const {valid:_0x718936,message:_0x45e05a}=validateAppcode(_0x52a434[_0x192649(0xf5)]());return _0x718936||_0x45e05a||'Invalid\x20App\x20Code';}});}function getCliVersionFromPkg(){const _0x4c6392=a112_0x5b3a;try{const _0xf79dfd=fileURLToPath(import.meta.url),_0x54770d=resolve(dirname(_0xf79dfd),_0x4c6392(0xf8)),_0x1d3598=JSON['parse'](readFileSync(resolve(_0x54770d,'package.json'),_0x4c6392(0x103)));return _0x1d3598[_0x4c6392(0xfd)]||_0x4c6392(0xe2);}catch{return _0x4c6392(0xe2);}}
|
package/lib/skills/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a113_0x11b82b=a113_0x2dfd;(function(_0x3bba9e,_0x310c6f){const _0x23e5ca=a113_0x2dfd,_0xc59f7d=_0x3bba9e();while(!![]){try{const _0x2bc413=parseInt(_0x23e5ca(0xe4))/0x1*(-parseInt(_0x23e5ca(0xd6))/0x2)+-parseInt(_0x23e5ca(0xd3))/0x3+-parseInt(_0x23e5ca(0xdb))/0x4+-parseInt(_0x23e5ca(0xde))/0x5+-parseInt(_0x23e5ca(0xd2))/0x6+parseInt(_0x23e5ca(0xed))/0x7*(parseInt(_0x23e5ca(0xee))/0x8)+parseInt(_0x23e5ca(0xd5))/0x9;if(_0x2bc413===_0x310c6f)break;else _0xc59f7d['push'](_0xc59f7d['shift']());}catch(_0x518eb6){_0xc59f7d['push'](_0xc59f7d['shift']());}}}(a113_0x419f,0x3a0b2));import{logger}from'../utils/logger.js';export function camelCaseFlagsToKebab(_0x3f3c53){const _0x204851=a113_0x2dfd,_0x3a0ec3=[];for(const [_0x2a809c,_0x2c6cc5]of Object[_0x204851(0xe2)](_0x3f3c53)){if(_0x2c6cc5===!![]){const _0x32cc07=_0x2a809c[_0x204851(0xf0)](/([A-Z])/g,'-$1')[_0x204851(0xf2)]();_0x3a0ec3[_0x204851(0xe8)](_0x32cc07);}}return _0x3a0ec3;}export function parseDynamicFlags(){const _0x15f057=a113_0x2dfd,_0x302321=[];for(let _0x1922fa=0x3;_0x1922fa<process[_0x15f057(0xe7)][_0x15f057(0xd4)];_0x1922fa++){const _0x31006f=process['argv'][_0x1922fa];if(_0x31006f&&_0x31006f['startsWith']('--')){const _0x3b3714=_0x31006f[_0x15f057(0xda)](0x2);_0x3b3714&&!_0x3b3714[_0x15f057(0xdd)]('=')&&_0x302321['push'](_0x3b3714);}}return _0x302321;}export function getAllProvidedFlags(_0x57d713){const _0x568dc4=a113_0x2dfd,_0x20f079=camelCaseFlagsToKebab(_0x57d713),_0x5a0b6a=parseDynamicFlags(),_0x1fa1c1=new Set([..._0x20f079,..._0x5a0b6a]);return Array[_0x568dc4(0xf4)](_0x1fa1c1);}function a113_0x2dfd(_0x53810f,_0x1d3019){_0x53810f=_0x53810f-0xd2;const _0x419fe6=a113_0x419f();let _0x2dfd1f=_0x419fe6[_0x53810f];return _0x2dfd1f;}function a113_0x419f(){const _0x407dd3=['1122655YcEmIW','Error:\x20Unsupported\x20command:\x20','has','enable-bff-save','entries','npx\x20-y\x20skills\x20add\x20lovrabet/rabetbase\x20--global','348847PvslRf','dangerously-bff-save','\x0aLovrabet\x20Skill\x20-\x20Developer\x20Skill\x20Installation\x20Tool\x0a\x0aUsage:\x0a\x20\x20rabetbase\x20skill\x20--help\x0a\x20\x20rabetbase\x20skill\x20install\x0a\x0aEquivalent\x20command:\x20','argv','push','\x20\x20rabetbase\x20skill\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20help\x0a','--help','Equivalent\x20command:\x20','help','1952111vmxBKv','8wFAcKi','\x0a\x0aNote:\x20npx\x20skills\x20selects\x20the\x20agent\x20and\x20writes\x20files;\x20guides\x20live\x20under\x20skills/lovrabet/guides/.\x0a','replace','log','toLowerCase','(empty)','from','\x20\x20rabetbase\x20skill\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Interactive\x20skill\x20installation','322914brjIgQ','1026474bwJPxP','length','9427464YPsjpu','2negZhV','skill','setLogPath','error','slice','477072NJonTw','exit','includes'];a113_0x419f=function(){return _0x407dd3;};return a113_0x419f();}export function normalizeLegacyBffSaveFlags(_0x171c9a){const _0x57f88f=a113_0x2dfd,_0x73ba63=new Set(_0x171c9a);return _0x73ba63[_0x57f88f(0xe0)](_0x57f88f(0xe5))&&_0x73ba63['add'](_0x57f88f(0xe1)),Array[_0x57f88f(0xf4)](_0x73ba63);}const SKILLS_INSTALL_COMMAND_LINE=a113_0x11b82b(0xe3);export async function skillsCommand(_0x233da9,_0x41ffb6,_0xe17ef6){const _0x988117=a113_0x11b82b;logger[_0x988117(0xd8)](process['cwd']());if(_0xe17ef6?.[_0x988117(0xec)]||_0x233da9===_0x988117(0xea)){showHelp();return;}console[_0x988117(0xd9)](_0x988117(0xdf)+(_0x233da9||_0x988117(0xf3))),console[_0x988117(0xf1)]('\x0aAvailable\x20commands:'),console[_0x988117(0xf1)](_0x988117(0xf5)),console['log'](_0x988117(0xe9)),console[_0x988117(0xf1)](''),console[_0x988117(0xf1)](_0x988117(0xeb)+SKILLS_INSTALL_COMMAND_LINE),logger[_0x988117(0xd9)](_0x988117(0xd7),'不支持的命令:\x20'+_0x233da9),process[_0x988117(0xdc)](0x1);}function showHelp(){const _0x2156f6=a113_0x11b82b;console[_0x2156f6(0xf1)](_0x2156f6(0xe6)+SKILLS_INSTALL_COMMAND_LINE+_0x2156f6(0xef));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a114_0x513bbf=a114_0x272e;(function(_0x52cc9c,_0x6f3229){const _0xa240df=a114_0x272e,_0x5adb27=_0x52cc9c();while(!![]){try{const _0x1c8bdc=parseInt(_0xa240df(0x18d))/0x1+-parseInt(_0xa240df(0x18f))/0x2*(-parseInt(_0xa240df(0x18a))/0x3)+parseInt(_0xa240df(0x18c))/0x4*(parseInt(_0xa240df(0x19b))/0x5)+-parseInt(_0xa240df(0x19c))/0x6+parseInt(_0xa240df(0x185))/0x7*(-parseInt(_0xa240df(0x18e))/0x8)+-parseInt(_0xa240df(0x183))/0x9*(parseInt(_0xa240df(0x192))/0xa)+parseInt(_0xa240df(0x190))/0xb;if(_0x1c8bdc===_0x6f3229)break;else _0x5adb27['push'](_0x5adb27['shift']());}catch(_0x47c87c){_0x5adb27['push'](_0x5adb27['shift']());}}}(a114_0x3671,0xb876b));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';function a114_0x272e(_0x2d3349,_0x1a5c60){_0x2d3349=_0x2d3349-0x181;const _0x36713a=a114_0x3671();let _0x272ed1=_0x36713a[_0x2d3349];return _0x272ed1;}function a114_0x3671(){const _0x5a9f0a=['trim','inherit','unknown','--skill','log','status','npx','705RtGJLB','8545668ZVzxCJ','toString','skill','17217pDJUTr','pipe','41797ySLdLI','join','lovrabet/lovrabet-skill','remove','stdio','15ViVQPl','stderr','7076tYthnh','1184887sfBEVe','376qMEhqX','323356xAvQcI','10328703eBPeXO','stdout','3770KwhPSu','exit\x20'];a114_0x3671=function(){return _0x5a9f0a;};return a114_0x3671();}export const NPX_FLAG_YES='-y';export const NPX_SKILLS_CLI='skills';export const NPX_SKILLS_SUBCOMMAND_ADD='add';export const NPX_SKILLS_FLAG_SKILL=a114_0x513bbf(0x197);export const RABETBASE_SKILL_SOURCE=a114_0x513bbf(0x187);export const DEFAULT_RABETBASE_SKILL_NAME='Lovrabet';export function buildNpxSkillsAddArgv(_0x17cd09=DEFAULT_RABETBASE_SKILL_NAME){return[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE,NPX_SKILLS_FLAG_SKILL,_0x17cd09];}export const NPX_SKILLS_ADD_COMMAND_LINE=['npx',...buildNpxSkillsAddArgv()][a114_0x513bbf(0x186)]('\x20');export function shouldSkipNpxSkillsAdd(){return process.env.RABETBASE_SKIP_NPX_SKILLS==='1';}export function runNpxSkillsAdd(_0x55ed03,_0x59ab23){const _0x36f10e=a114_0x513bbf;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x201747=_0x59ab23?.[_0x36f10e(0x189)]??'inherit',_0x18dd93=resolveNpmBin(_0x36f10e(0x19a)),_0x33b2e3=buildNpxSkillsAddArgv(_0x59ab23?.[_0x36f10e(0x182)]??DEFAULT_RABETBASE_SKILL_NAME),_0x3fe48f=[_0x18dd93,..._0x33b2e3][_0x36f10e(0x186)]('\x20');console[_0x36f10e(0x198)]('*\x20'+_0x3fe48f);const _0x11a85f=spawnSync(_0x18dd93,_0x33b2e3,{'cwd':_0x55ed03,'stdio':_0x201747,'env':process.env,'shell':![]}),_0x3ea062=_0x11a85f[_0x36f10e(0x199)];if(_0x3ea062===0x0)return{'ok':!![],'status':0x0};let _0x13cad7=_0x36f10e(0x193)+(_0x3ea062??_0x36f10e(0x196));if(_0x201747===_0x36f10e(0x184)){const _0x4ce281=_0x11a85f[_0x36f10e(0x18b)]?_0x11a85f[_0x36f10e(0x18b)][_0x36f10e(0x181)]()[_0x36f10e(0x194)]():'',_0x4a6e5e=_0x11a85f[_0x36f10e(0x191)]?_0x11a85f[_0x36f10e(0x191)][_0x36f10e(0x181)]()[_0x36f10e(0x194)]():'';if(_0x4ce281)_0x13cad7=_0x4ce281;else{if(_0x4a6e5e)_0x13cad7=_0x4a6e5e;}}return{'ok':![],'status':_0x3ea062??null,'error':_0x13cad7};}export function runNpxSkillsRemove(_0x11c468,_0x52b198){const _0x2146d0=a114_0x513bbf,_0x24866c=_0x52b198?.['stdio']??_0x2146d0(0x195),_0x3a9753=resolveNpmBin(_0x2146d0(0x19a)),_0x4db2f1=[NPX_FLAG_YES,NPX_SKILLS_CLI,_0x2146d0(0x188),RABETBASE_SKILL_SOURCE,NPX_SKILLS_FLAG_SKILL,_0x52b198?.[_0x2146d0(0x182)]??DEFAULT_RABETBASE_SKILL_NAME],_0x4da9b2=[_0x3a9753,..._0x4db2f1][_0x2146d0(0x186)]('\x20');console['log']('*\x20'+_0x4da9b2);const _0x10d82f=spawnSync(_0x3a9753,_0x4db2f1,{'cwd':_0x11c468,'stdio':_0x24866c,'env':process.env,'shell':![]}),_0xf0f23=_0x10d82f[_0x2146d0(0x199)];if(_0xf0f23===0x0)return{'ok':!![],'status':0x0};let _0x1529a2='exit\x20'+(_0xf0f23??_0x2146d0(0x196));if(_0x24866c==='pipe'){const _0x5ea52a=_0x10d82f[_0x2146d0(0x18b)]?_0x10d82f[_0x2146d0(0x18b)][_0x2146d0(0x181)]()['trim']():'',_0x44fbb6=_0x10d82f[_0x2146d0(0x191)]?_0x10d82f[_0x2146d0(0x191)][_0x2146d0(0x181)]()[_0x2146d0(0x194)]():'';if(_0x5ea52a)_0x1529a2=_0x5ea52a;else{if(_0x44fbb6)_0x1529a2=_0x44fbb6;}}return{'ok':![],'status':_0xf0f23??null,'error':_0x1529a2};}export function runNpxSkillsAddGlobal(_0x497bbc,_0x505fc6,_0xeaa934){const _0x366f8c=a114_0x513bbf,_0x3cdf89=_0xeaa934?.[_0x366f8c(0x189)]??'inherit',_0x5d50fe=resolveNpmBin('npx'),_0x14dac2=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x505fc6,'--global'],_0x3fc4cf=[_0x5d50fe,..._0x14dac2][_0x366f8c(0x186)]('\x20');console[_0x366f8c(0x198)]('*\x20'+_0x3fc4cf);const _0x537397=spawnSync(_0x5d50fe,_0x14dac2,{'cwd':_0x497bbc,'stdio':_0x3cdf89,'env':process.env,'shell':![]}),_0xd91cf5=_0x537397['status'];if(_0xd91cf5===0x0)return{'ok':!![],'status':0x0};let _0x2335f4=_0x366f8c(0x193)+(_0xd91cf5??_0x366f8c(0x196));if(_0x3cdf89==='pipe'){const _0xfeb3d1=_0x537397[_0x366f8c(0x18b)]?_0x537397[_0x366f8c(0x18b)][_0x366f8c(0x181)]()[_0x366f8c(0x194)]():'',_0x5bde62=_0x537397[_0x366f8c(0x191)]?_0x537397[_0x366f8c(0x191)][_0x366f8c(0x181)]()[_0x366f8c(0x194)]():'';if(_0xfeb3d1)_0x2335f4=_0xfeb3d1;else{if(_0x5bde62)_0x2335f4=_0x5bde62;}}return{'ok':![],'status':_0xd91cf5??null,'error':_0x2335f4};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xc3c524,_0x30973c){var _0x3dc47d=a115_0x28b5,_0x2bbeec=_0xc3c524();while(!![]){try{var _0x349903=parseInt(_0x3dc47d(0xd9))/0x1*(parseInt(_0x3dc47d(0xdb))/0x2)+-parseInt(_0x3dc47d(0xda))/0x3*(-parseInt(_0x3dc47d(0xde))/0x4)+-parseInt(_0x3dc47d(0xd7))/0x5+-parseInt(_0x3dc47d(0xd5))/0x6+-parseInt(_0x3dc47d(0xd4))/0x7+-parseInt(_0x3dc47d(0xd8))/0x8+parseInt(_0x3dc47d(0xdc))/0x9;if(_0x349903===_0x30973c)break;else _0x2bbeec['push'](_0x2bbeec['shift']());}catch(_0x12f52c){_0x2bbeec['push'](_0x2bbeec['shift']());}}}(a115_0x373d,0x94c6d));import{sendCliTraceLog}from'./send-cli-trace-log.js';function a115_0x373d(){var _0x45ae6c=['18107820Yztall','service','152MVEONX','Failed\x20to\x20report\x20CLI\x20help\x20trace:','error','5839225gvzDoU','3522186LCmLjx','cli.help','3591585HzzXtG','3378752fxDzRi','67680wReutT','64806xaSSMq','10KTIDVn'];a115_0x373d=function(){return _0x45ae6c;};return a115_0x373d();}function a115_0x28b5(_0x575b60,_0x2dd074){_0x575b60=_0x575b60-0xd3;var _0x373df9=a115_0x373d();var _0x28b513=_0x373df9[_0x575b60];return _0x28b513;}export async function reportCliHelpTrace(_0x5eb1b4,_0xdde000){var _0x19f00f=a115_0x28b5;try{await sendCliTraceLog({'spanName':_0x19f00f(0xd6),'logData':{'rabetbase.help.kind':_0x5eb1b4,..._0xdde000?.['service']&&{'rabetbase.help.service':_0xdde000[_0x19f00f(0xdd)]}}});}catch(_0xe00e7c){console[_0x19f00f(0xd3)](_0x19f00f(0xdf),_0xe00e7c);}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a116_0x489cae=a116_0x54e0;(function(_0x447c20,_0x55e579){const _0x16776a=a116_0x54e0,_0x2e402f=_0x447c20();while(!![]){try{const _0x5f4b0f=-parseInt(_0x16776a(0x1d6))/0x1+parseInt(_0x16776a(0x1cf))/0x2+-parseInt(_0x16776a(0x1d1))/0x3*(-parseInt(_0x16776a(0x1d5))/0x4)+parseInt(_0x16776a(0x1db))/0x5*(parseInt(_0x16776a(0x1ce))/0x6)+-parseInt(_0x16776a(0x1d3))/0x7*(-parseInt(_0x16776a(0x1d4))/0x8)+parseInt(_0x16776a(0x1e1))/0x9+-parseInt(_0x16776a(0x1d9))/0xa*(parseInt(_0x16776a(0x1d7))/0xb);if(_0x5f4b0f===_0x55e579)break;else _0x2e402f['push'](_0x2e402f['shift']());}catch(_0x21eaeb){_0x2e402f['push'](_0x2e402f['shift']());}}}(a116_0x5bd1,0x40a5d));function a116_0x5bd1(){const _0x1a02b7=['userInfo','4589001NEYago','6oGdPkp','455360xUyzzd','username','17583RPTwFb','rabetbase-cli','43421OZAAVN','344zypiBT','280jxrMDo','461931eLAAcu','54505jJZVQQ','nickname','1550hUjVbF','production','400925onQiGd','unknown','../../package.json','name','user'];a116_0x5bd1=function(){return _0x1a02b7;};return a116_0x5bd1();}import{createRequire}from'node:module';import a116_0x325af4 from'node:os';import{VERSION,GIT_COMMIT}from'../generated/build-info.js';import{getSessionUserInfo}from'../auth/get-session-user.js';import{setTraceConfig,getOtelLoggerVersion}from'@lovrabet/otel-logger';const require=createRequire(import.meta.url),pkg=require(a116_0x489cae(0x1dd));let cliOtelTraceInitialized=![];function a116_0x54e0(_0x2facf4,_0x5a1fe9){_0x2facf4=_0x2facf4-0x1ce;const _0x5bd19e=a116_0x5bd1();let _0x54e031=_0x5bd19e[_0x2facf4];return _0x54e031;}export async function ensureCliOtelTraceConfig(){const _0x4be9c4=a116_0x489cae,_0x95e463=await getSessionUserInfo();if(!cliOtelTraceInitialized){const _0x1c3ae0=_0x95e463?.[_0x4be9c4(0x1df)];setTraceConfig({'otelLoggerVersion':getOtelLoggerVersion(),'serviceName':pkg[_0x4be9c4(0x1de)],'serviceVersion':GIT_COMMIT!==_0x4be9c4(0x1dc)?VERSION+'+'+GIT_COMMIT:pkg['version'],'serviceEnv':process.env.RABETBASE_ENV??(process.env.RABETBASE_E2E_DAILY==='1'?'daily':_0x4be9c4(0x1da)),'username':_0x1c3ae0?.[_0x4be9c4(0x1d0)]??a116_0x325af4[_0x4be9c4(0x1e0)]()[_0x4be9c4(0x1d0)]??_0x4be9c4(0x1d2),..._0x1c3ae0&&{'nickname':_0x1c3ae0[_0x4be9c4(0x1d8)]}}),cliOtelTraceInitialized=!![];}return _0x95e463;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4a58a7,_0x3e7f0f){const _0x44936c=a117_0x3c15,_0x5a995c=_0x4a58a7();while(!![]){try{const _0x2e5803=-parseInt(_0x44936c(0x19c))/0x1+-parseInt(_0x44936c(0x1a1))/0x2*(parseInt(_0x44936c(0x1a4))/0x3)+-parseInt(_0x44936c(0x1a2))/0x4*(-parseInt(_0x44936c(0x1a3))/0x5)+-parseInt(_0x44936c(0x199))/0x6*(-parseInt(_0x44936c(0x19d))/0x7)+-parseInt(_0x44936c(0x19a))/0x8*(parseInt(_0x44936c(0x197))/0x9)+-parseInt(_0x44936c(0x19f))/0xa+parseInt(_0x44936c(0x1a0))/0xb;if(_0x2e5803===_0x3e7f0f)break;else _0x5a995c['push'](_0x5a995c['shift']());}catch(_0x19d59c){_0x5a995c['push'](_0x5a995c['shift']());}}}(a117_0x548b,0xc386c));import{shutdownTraces}from'@lovrabet/otel-logger';let shutdownPromise=null;function a117_0x548b(){const _0x434442=['once','983461XNFiOv','7HCnQiR','then','11262970ffGFPv','13119524lLOVYf','497774ZdEVry','4bbuDIr','7011925pJrZQU','3nbTjiW','SIGTERM','SIGINT','beforeExit','1972233zXtfZc','exit','4701534ScOgDW','8kCSqen'];a117_0x548b=function(){return _0x434442;};return a117_0x548b();}export async function flushOtelNodeIfUsed(){if(shutdownPromise)return shutdownPromise;return shutdownPromise=((async()=>{try{await shutdownTraces();}catch{}})()),shutdownPromise;}function a117_0x3c15(_0x10d645,_0x104c59){_0x10d645=_0x10d645-0x195;const _0x548b9f=a117_0x548b();let _0x3c1544=_0x548b9f[_0x10d645];return _0x3c1544;}export function registerOtelShutdownOnExit(){const _0x6999a8=a117_0x3c15;process[_0x6999a8(0x19b)](_0x6999a8(0x196),()=>{void flushOtelNodeIfUsed();});const _0x11bb0e=()=>{const _0x11a82b=_0x6999a8;void flushOtelNodeIfUsed()[_0x11a82b(0x19e)](()=>process[_0x11a82b(0x198)](0x0));};process[_0x6999a8(0x19b)](_0x6999a8(0x195),_0x11bb0e),process[_0x6999a8(0x19b)](_0x6999a8(0x1a5),_0x11bb0e);}export async function exitWithOtelShutdown(_0x4d3de1){const _0x4c6943=a117_0x3c15;await flushOtelNodeIfUsed(),process[_0x4c6943(0x198)](_0x4d3de1);}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a118_0x583a41=a118_0x44ef;(function(_0x47ad43,_0x154356){const _0x2bd723=a118_0x44ef,_0x4a8816=_0x47ad43();while(!![]){try{const _0x359554=-parseInt(_0x2bd723(0x134))/0x1*(-parseInt(_0x2bd723(0x13f))/0x2)+-parseInt(_0x2bd723(0x13b))/0x3*(-parseInt(_0x2bd723(0x13c))/0x4)+parseInt(_0x2bd723(0x13e))/0x5*(parseInt(_0x2bd723(0x130))/0x6)+-parseInt(_0x2bd723(0x12f))/0x7*(parseInt(_0x2bd723(0x138))/0x8)+-parseInt(_0x2bd723(0x13d))/0x9+parseInt(_0x2bd723(0x137))/0xa+-parseInt(_0x2bd723(0x139))/0xb*(parseInt(_0x2bd723(0x132))/0xc);if(_0x359554===_0x154356)break;else _0x4a8816['push'](_0x4a8816['shift']());}catch(_0x3a2505){_0x4a8816['push'](_0x4a8816['shift']());}}}(a118_0x4b8a,0xe9c6d));import{createRequire}from'node:module';import{sendTraceLog}from'@lovrabet/otel-logger';import{ensureCliOtelTraceConfig}from'./ensure-cli-otel-config.js';function a118_0x44ef(_0xe6717f,_0x48a50){_0xe6717f=_0xe6717f-0x12f;const _0x4b8a94=a118_0x4b8a();let _0x44ef37=_0x4b8a94[_0xe6717f];return _0x44ef37;}const require=createRequire(import.meta.url),pkg=require('../../package.json'),DEFAULT_TRACE_NAME=a118_0x583a41(0x136);function a118_0x4b8a(){const _0x190ee9=['logData','rabetbase-cli','1308210qTJpaV','2930888IbrfTa','16838701sCjLEg','manual','3vnZcLG','4628884hogKss','130347hpREne','25MWqkFG','1524954CGJOOV','spanName','7ngkoVw','982398TUOlkA','version','12ZKFOwa','traceparent','1XkCjTi'];a118_0x4b8a=function(){return _0x190ee9;};return a118_0x4b8a();}export async function sendCliTraceLog(_0x3ead34){const _0x568d62=a118_0x583a41;await ensureCliOtelTraceConfig(),sendTraceLog({'traceName':_0x3ead34['traceName']??DEFAULT_TRACE_NAME,'version':_0x3ead34['version']??pkg[_0x568d62(0x131)],'spanName':_0x3ead34[_0x568d62(0x140)],'eventType':_0x568d62(0x13a),'logData':_0x3ead34[_0x568d62(0x135)],..._0x3ead34[_0x568d62(0x133)]&&{'traceparent':_0x3ead34[_0x568d62(0x133)]}});}
|
package/lib/utils/ai_config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a120_0x46e4(_0x30f09e,_0x1d396f){_0x30f09e=_0x30f09e-0x1aa;const _0x63f3ce=a120_0x63f3();let _0x46e4e1=_0x63f3ce[_0x30f09e];return _0x46e4e1;}function a120_0x63f3(){const _0x5a985e=['.qoder','其他\x20(通用模板)','.cline/skills/lovrabet/SKILL.md','1864yInLTG','Trae\x20IDE','claude','.qoder/skills/lovrabet/SKILL.md','file','.cursorrules','CodeBuddy','.trae','.cursor','CodeBuddy\x20IDE','Cline\x20IDE','Trae','Windsurf','Windsurf\x20IDE','3410498dLyewi','Codex','.codebuddy','.claude/skills/lovrabet/SKILL.md','OpenCode','windsurf','opencode','24471bfgGud','.windsurf/workflows/rabetbase.md','Claude\x20Code','antigravity','Antigravity','通用模板\x20-\x20兜底方案','.cursor/skills/rabetbase.md','.claude','cline','trae','Qoder','.opencode','1528496hOyIZA','SKILL.md.tpl','codex','.agent','6vLjbag','.cline','qoder','.codex','133128vbgGxh','397070FMUoqD','cursor','.opencode/skills/lovrabet/SKILL.md','2319215lWmxLg','.agent/skills/lovrabet/SKILL.md','.codex/skills/lovrabet/SKILL.md','13668MfMtxh','.codebuddy/skills/lovrabet/SKILL.md','.trae/skills/lovrabet/SKILL.md','Antigravity\x20IDE','codebuddy','Qoder\x20IDE'];a120_0x63f3=function(){return _0x5a985e;};return a120_0x63f3();}const a120_0x42a07c=a120_0x46e4;(function(_0x3a240f,_0x30094d){const _0x50f5b=a120_0x46e4,_0x4d67f0=_0x3a240f();while(!![]){try{const _0x1c3f58=parseInt(_0x50f5b(0x1df))/0x1+parseInt(_0x50f5b(0x1d6))/0x2+-parseInt(_0x50f5b(0x1de))/0x3+-parseInt(_0x50f5b(0x1ac))/0x4+parseInt(_0x50f5b(0x1e2))/0x5*(parseInt(_0x50f5b(0x1da))/0x6)+-parseInt(_0x50f5b(0x1c3))/0x7+parseInt(_0x50f5b(0x1b5))/0x8*(-parseInt(_0x50f5b(0x1ca))/0x9);if(_0x1c3f58===_0x30094d)break;else _0x4d67f0['push'](_0x4d67f0['shift']());}catch(_0x598009){_0x4d67f0['push'](_0x4d67f0['shift']());}}}(a120_0x63f3,0x6f7b3));export const CORE_IDE_CONFIGS={'cursor':{'name':'Cursor','description':'Cursor\x20IDE','folders':[a120_0x42a07c(0x1ba),a120_0x42a07c(0x1bd)],'files':[{'type':'file','path':a120_0x42a07c(0x1d0),'template':a120_0x42a07c(0x1d7)}]},'windsurf':{'name':a120_0x42a07c(0x1c1),'description':a120_0x42a07c(0x1c2),'folders':['.windsurf'],'files':[{'type':a120_0x42a07c(0x1b9),'path':a120_0x42a07c(0x1cb),'template':a120_0x42a07c(0x1d7)}]},'claude':{'name':'Claude\x20Code','description':a120_0x42a07c(0x1cc),'folders':[a120_0x42a07c(0x1d1)],'files':[{'type':'file','path':a120_0x42a07c(0x1c6),'template':a120_0x42a07c(0x1d7)}]},'cline':{'name':'Cline','description':a120_0x42a07c(0x1bf),'folders':[a120_0x42a07c(0x1db)],'files':[{'type':a120_0x42a07c(0x1b9),'path':a120_0x42a07c(0x1b4),'template':a120_0x42a07c(0x1d7)}]},'codex':{'name':a120_0x42a07c(0x1c4),'description':'Codex\x20IDE','folders':[a120_0x42a07c(0x1dd)],'files':[{'type':a120_0x42a07c(0x1b9),'path':a120_0x42a07c(0x1ab),'template':a120_0x42a07c(0x1d7)}]},'opencode':{'name':a120_0x42a07c(0x1c7),'description':'OpenCode\x20IDE','folders':[a120_0x42a07c(0x1d5)],'files':[{'type':'file','path':a120_0x42a07c(0x1e1),'template':'SKILL.md.tpl'}]},'qoder':{'name':a120_0x42a07c(0x1d4),'description':a120_0x42a07c(0x1b1),'folders':[a120_0x42a07c(0x1b2)],'files':[{'type':a120_0x42a07c(0x1b9),'path':'.qoder/rules/rabetbase.md','template':a120_0x42a07c(0x1d7)},{'type':a120_0x42a07c(0x1b9),'path':a120_0x42a07c(0x1b8),'template':'SKILL.md.tpl'}]},'codebuddy':{'name':a120_0x42a07c(0x1bb),'description':a120_0x42a07c(0x1be),'folders':[a120_0x42a07c(0x1c5)],'files':[{'type':a120_0x42a07c(0x1b9),'path':a120_0x42a07c(0x1ad),'template':a120_0x42a07c(0x1d7)}]},'trae':{'name':a120_0x42a07c(0x1c0),'description':a120_0x42a07c(0x1b6),'folders':[a120_0x42a07c(0x1bc)],'files':[{'type':a120_0x42a07c(0x1b9),'path':a120_0x42a07c(0x1ae),'template':a120_0x42a07c(0x1d7)}]}};export const IDE_CONFIGS={...CORE_IDE_CONFIGS,'agent':{'name':a120_0x42a07c(0x1b3),'description':a120_0x42a07c(0x1cf),'folders':[a120_0x42a07c(0x1d9)],'files':[{'type':'file','path':a120_0x42a07c(0x1aa),'template':'SKILL.md.tpl'}]},'antigravity':{'name':a120_0x42a07c(0x1ce),'description':a120_0x42a07c(0x1af),'folders':[a120_0x42a07c(0x1d9)],'files':[{'type':a120_0x42a07c(0x1b9),'path':'.agent/skills/lovrabet/SKILL.md','template':a120_0x42a07c(0x1d7)}]}};export const CORE_IDE_LIST=['claude',a120_0x42a07c(0x1d2),a120_0x42a07c(0x1b0),a120_0x42a07c(0x1d8),'cursor',a120_0x42a07c(0x1c9),'qoder',a120_0x42a07c(0x1d3),a120_0x42a07c(0x1c8)];export const IDE_LIST=[a120_0x42a07c(0x1cd),a120_0x42a07c(0x1b7),'cline',a120_0x42a07c(0x1b0),a120_0x42a07c(0x1d8),a120_0x42a07c(0x1e0),a120_0x42a07c(0x1c9),a120_0x42a07c(0x1dc),a120_0x42a07c(0x1d3),'windsurf','agent'];export const ALL_CORE_IDES=[a120_0x42a07c(0x1e0),'windsurf','claude',a120_0x42a07c(0x1d2),a120_0x42a07c(0x1d8),a120_0x42a07c(0x1c9),a120_0x42a07c(0x1dc),a120_0x42a07c(0x1b0),a120_0x42a07c(0x1d3)];
|
package/lib/utils/cdn-config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4653de,_0x49a781){const _0x4867ac=a121_0x3e7e,_0x168d18=_0x4653de();while(!![]){try{const _0x42d649=parseInt(_0x4867ac(0x154))/0x1*(parseInt(_0x4867ac(0x14e))/0x2)+parseInt(_0x4867ac(0x14f))/0x3+parseInt(_0x4867ac(0x150))/0x4+parseInt(_0x4867ac(0x148))/0x5*(parseInt(_0x4867ac(0x153))/0x6)+parseInt(_0x4867ac(0x156))/0x7+parseInt(_0x4867ac(0x151))/0x8+-parseInt(_0x4867ac(0x14a))/0x9;if(_0x42d649===_0x49a781)break;else _0x168d18['push'](_0x168d18['shift']());}catch(_0x478ab3){_0x168d18['push'](_0x168d18['shift']());}}}(a121_0xbd8e,0x8e6c4));import{getTemplateBaseUrl}from'./config.js';export async function fetchCdnConfig(){const _0x2c69b2=a121_0x3e7e;try{const _0x4ae7a0=getTemplateBaseUrl(),_0x5e02fa=_0x4ae7a0+_0x2c69b2(0x14b),_0x5dd809=await fetch(_0x5e02fa,{'headers':{'Accept':_0x2c69b2(0x149)}});if(!_0x5dd809['ok'])return null;const _0xa334a6=await _0x5dd809[_0x2c69b2(0x14c)]();if(!_0xa334a6['cli']?.[_0x2c69b2(0x14d)]||!_0xa334a6[_0x2c69b2(0x155)]?.['node']?.['stableVersion'])return null;return _0xa334a6;}catch{return null;}}let cachedConfig=null,cacheTime=0x0;function a121_0x3e7e(_0x49733e,_0xe6ed18){_0x49733e=_0x49733e-0x148;const _0xbd8e62=a121_0xbd8e();let _0x3e7eca=_0xbd8e62[_0x49733e];return _0x3e7eca;}const CACHE_TTL=0x5*0x3c*0x3e8;export async function getCdnConfig(){const _0xa8f898=a121_0x3e7e,_0x1eaf8b=Date[_0xa8f898(0x152)]();if(cachedConfig&&_0x1eaf8b-cacheTime<CACHE_TTL)return cachedConfig;const _0x593f18=await fetchCdnConfig();return _0x593f18&&(cachedConfig=_0x593f18,cacheTime=_0x1eaf8b),_0x593f18;}function a121_0xbd8e(){const _0x4f1cc6=['/config.json','json','stableVersion','16FiOXCp','196188UjsCmZ','634412vKIIaZ','1425928WIDmJa','now','30606Phozqg','5019RbASmT','sdk','4650401bbKFjn','865hTcyDi','application/json','12652596cQmLns'];a121_0xbd8e=function(){return _0x4f1cc6;};return a121_0xbd8e();}export function clearCdnConfigCache(){cachedConfig=null,cacheTime=0x0;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a122_0x5cb6(_0x32933a,_0x1a4a06){_0x32933a=_0x32933a-0x69;const _0x30dc39=a122_0x30dc();let _0x5cb6dc=_0x30dc39[_0x32933a];return _0x5cb6dc;}const a122_0x80bb5b=a122_0x5cb6;(function(_0x3a743b,_0x4ef526){const _0x1d4601=a122_0x5cb6,_0x4fc7e4=_0x3a743b();while(!![]){try{const _0x341eb3=parseInt(_0x1d4601(0x74))/0x1*(parseInt(_0x1d4601(0x91))/0x2)+-parseInt(_0x1d4601(0x6a))/0x3+-parseInt(_0x1d4601(0x7b))/0x4+-parseInt(_0x1d4601(0x6b))/0x5*(-parseInt(_0x1d4601(0x82))/0x6)+-parseInt(_0x1d4601(0x6d))/0x7+parseInt(_0x1d4601(0x75))/0x8*(parseInt(_0x1d4601(0x76))/0x9)+-parseInt(_0x1d4601(0x7f))/0xa*(-parseInt(_0x1d4601(0x72))/0xb);if(_0x341eb3===_0x4ef526)break;else _0x4fc7e4['push'](_0x4fc7e4['shift']());}catch(_0x1c37c8){_0x4fc7e4['push'](_0x4fc7e4['shift']());}}}(a122_0x30dc,0x7a59d));import a122_0x508060 from'node:fs';import a122_0x203503 from'node:path';import a122_0x52ea64 from'semver';import{getCdnConfig}from'./cdn-config.js';const FALLBACK_MIN_SDK_VERSION=a122_0x80bb5b(0x70);function isNonNumericVersion(_0x5bfbb1){const _0x5ab7a3=a122_0x80bb5b,_0x322e14=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x322e14[_0x5ab7a3(0x90)](_0xfb82be=>_0xfb82be[_0x5ab7a3(0x6e)](_0x5bfbb1));}function getInstalledVersion(_0x48a51c,_0x5aa67f){const _0x53b3dd=a122_0x80bb5b;try{const _0x472488=a122_0x203503[_0x53b3dd(0x6f)](_0x48a51c,_0x53b3dd(0x7d),_0x5aa67f,'package.json');if(a122_0x508060['existsSync'](_0x472488)){const _0x540068=JSON[_0x53b3dd(0x7e)](a122_0x508060[_0x53b3dd(0x89)](_0x472488,_0x53b3dd(0x83)));return _0x540068[_0x53b3dd(0x8d)]||null;}}catch{}return null;}async function getSdkStableVersion(){const _0x546abc=a122_0x80bb5b;try{const _0xed216e=await getCdnConfig();return _0xed216e?.[_0x546abc(0x7a)]?.[_0x546abc(0x80)]?.[_0x546abc(0x7c)]||null;}catch{return null;}}async function getSdkPackageName(){const _0x26755c=a122_0x80bb5b;try{const _0x5d9099=await getCdnConfig();return _0x5d9099?.[_0x26755c(0x7a)]?.[_0x26755c(0x80)]?.['packageName']||'@lovrabet/sdk';}catch{return _0x26755c(0x8b);}}export async function checkSdkVersion(_0x498ee){const _0x38ab99=a122_0x80bb5b,_0x2b228f=a122_0x203503[_0x38ab99(0x6f)](_0x498ee,'package.json'),[_0x5ef6e3,_0x4e1fe9]=await Promise[_0x38ab99(0x84)]([getSdkStableVersion(),getSdkPackageName()]),_0x273a3d=_0x5ef6e3||FALLBACK_MIN_SDK_VERSION;if(!a122_0x508060['existsSync'](_0x2b228f))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x273a3d,'packageName':_0x4e1fe9,'stableVersion':_0x5ef6e3};try{const _0x13b575=JSON[_0x38ab99(0x7e)](a122_0x508060[_0x38ab99(0x89)](_0x2b228f,'utf8')),_0x4ed349=_0x13b575['dependencies']||{},_0x3d0418=_0x13b575[_0x38ab99(0x8a)]||{},_0x8f4c81=_0x4ed349[_0x4e1fe9]||_0x3d0418[_0x4e1fe9];if(!_0x8f4c81)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x273a3d,'packageName':_0x4e1fe9,'stableVersion':_0x5ef6e3};let _0x158018=getInstalledVersion(_0x498ee,_0x4e1fe9);!_0x158018&&(_0x158018=_0x8f4c81);if(isNonNumericVersion(_0x8f4c81))return{'installed':!![],'version':_0x158018,'needsUpgrade':![],'minVersion':_0x273a3d,'packageName':_0x4e1fe9,'stableVersion':_0x5ef6e3};const _0x2bdef4=a122_0x52ea64[_0x38ab99(0x78)](_0x158018),_0x290973=a122_0x52ea64['coerce'](_0x273a3d),_0x389d39=_0x2bdef4&&_0x290973?a122_0x52ea64['lt'](_0x2bdef4,_0x290973):![];return{'installed':!![],'version':_0x158018,'needsUpgrade':_0x389d39,'minVersion':_0x273a3d,'packageName':_0x4e1fe9,'stableVersion':_0x5ef6e3};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x273a3d,'packageName':_0x4e1fe9,'stableVersion':_0x5ef6e3};}}export function checkSdkVersionSync(_0x165159){const _0x36fcf4=a122_0x80bb5b,_0x3a8b2b=a122_0x203503[_0x36fcf4(0x6f)](_0x165159,_0x36fcf4(0x87)),_0x3048e3='@lovrabet/sdk';if(!a122_0x508060[_0x36fcf4(0x73)](_0x3a8b2b))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x3048e3,'stableVersion':null};try{const _0x420762=JSON[_0x36fcf4(0x7e)](a122_0x508060[_0x36fcf4(0x89)](_0x3a8b2b,_0x36fcf4(0x88))),_0x1c797a=_0x420762['dependencies']||{},_0x37661b=_0x420762[_0x36fcf4(0x8a)]||{},_0x22ce8e=_0x1c797a[_0x3048e3]||_0x37661b[_0x3048e3];if(!_0x22ce8e)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x3048e3,'stableVersion':null};let _0x4bbc31=getInstalledVersion(_0x165159,_0x3048e3);!_0x4bbc31&&(_0x4bbc31=_0x22ce8e);if(isNonNumericVersion(_0x22ce8e))return{'installed':!![],'version':_0x4bbc31,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x3048e3,'stableVersion':null};const _0xc9f939=a122_0x52ea64[_0x36fcf4(0x78)](_0x4bbc31),_0x394664=_0xc9f939?a122_0x52ea64['lt'](_0xc9f939,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x4bbc31,'needsUpgrade':_0x394664,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x3048e3,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x3048e3,'stableVersion':null};}}function a122_0x30dc(){const _0x2b5caa=['1XpPkPr','16cdxzUm','2527353OLISRM','needsUpgrade','coerce','\x20\x20\x20Current\x20version:\x20','sdk','3003364wsGtpw','stableVersion','node_modules','parse','12730840FbHPmT','node','\x20\x20\x20Upgrade\x20command:\x20','7476Sivrae','utf-8','all','\x1b[1m','minVersion','package.json','utf8','readFileSync','devDependencies','@lovrabet/sdk','latest','version','\x20\x20\x20Stable\x20version:\x20','↪\x20SDK\x20update\x20available','some','396978WDXqwX','\x1b[33m','2890914saDDWU','3920kdITiY','log','5561101WbXlUR','test','join','1.2.0','npm\x20install\x20','11EhxyzF','existsSync'];a122_0x30dc=function(){return _0x2b5caa;};return a122_0x30dc();}export function printSdkUpgradeWarning(_0x15a4ab){const _0x4916cb=a122_0x80bb5b;if(!_0x15a4ab[_0x4916cb(0x77)])return;const _0x15a527=_0x4916cb(0x69),_0x23168d='\x1b[0m',_0x1fc7f4=_0x4916cb(0x85),_0x24701e=_0x15a4ab['packageName']||_0x4916cb(0x8b),_0x6865b=_0x15a4ab[_0x4916cb(0x7c)]||_0x15a4ab[_0x4916cb(0x86)],_0x13abe1=_0x4916cb(0x71)+_0x24701e+'@'+(_0x6865b||_0x4916cb(0x8c));console[_0x4916cb(0x6c)](),console[_0x4916cb(0x6c)](''+_0x15a527+_0x1fc7f4+_0x4916cb(0x8f)+_0x23168d),console['log'](_0x15a527+_0x4916cb(0x79)+_0x24701e+'@'+_0x15a4ab['version']+_0x23168d),console[_0x4916cb(0x6c)](_0x15a527+_0x4916cb(0x8e)+_0x6865b+_0x23168d),console[_0x4916cb(0x6c)](_0x15a527+_0x4916cb(0x81)+_0x13abe1+_0x23168d),console[_0x4916cb(0x6c)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x53390b,_0x304265){const _0x3e36bd=a123_0x2f05,_0x242b3f=_0x53390b();while(!![]){try{const _0x450e7e=parseInt(_0x3e36bd(0xb0))/0x1+-parseInt(_0x3e36bd(0xca))/0x2*(-parseInt(_0x3e36bd(0xc3))/0x3)+-parseInt(_0x3e36bd(0xc7))/0x4+-parseInt(_0x3e36bd(0xbb))/0x5+-parseInt(_0x3e36bd(0xc1))/0x6*(-parseInt(_0x3e36bd(0xba))/0x7)+parseInt(_0x3e36bd(0xb8))/0x8*(-parseInt(_0x3e36bd(0xc9))/0x9)+-parseInt(_0x3e36bd(0xbe))/0xa*(-parseInt(_0x3e36bd(0xcb))/0xb);if(_0x450e7e===_0x304265)break;else _0x242b3f['push'](_0x242b3f['shift']());}catch(_0x3ffd2a){_0x242b3f['push'](_0x242b3f['shift']());}}}(a123_0x1389,0x44eca));import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a123_0x45ca9a from'semver';import{getCdnConfig}from'./cdn-config.js';function a123_0x2f05(_0x408e7c,_0x24792f){_0x408e7c=_0x408e7c-0xb0;const _0x1389cb=a123_0x1389();let _0x2f0555=_0x1389cb[_0x408e7c];return _0x2f0555;}import{NPM_PACKAGE_NAME}from'../constant/cli.js';function a123_0x1389(){const _0x5beeaa=['8vXhBnN','parse','78491FKyodw','1808875zunkxs','log','version','1426970mQvXAQ','\x20\x20\x20Stable\x20version:\x20','some','48YJYAnm','\x1b[33m','847164FADwhG','\x1b[1m','stableVersion','../..','2136720NieqSq','cli','690831jeDgdd','2BauIQP','33rJDNrB','@latest','454845hlkesA','1.0.0','↪\x20New\x20version\x20available','currentVersion','package.json','needsUpgrade','\x20\x20\x20Current\x20CLI\x20version:\x20','coerce'];a123_0x1389=function(){return _0x5beeaa;};return a123_0x1389();}function getCurrentCliVersion(){const _0x45b671=a123_0x2f05;try{const _0x260249=fileURLToPath(import.meta.url),_0x10d9e4=resolve(dirname(_0x260249),_0x45b671(0xc6)),_0x5a9039=resolve(_0x10d9e4,_0x45b671(0xb4)),_0x54fc51=JSON[_0x45b671(0xb9)](readFileSync(_0x5a9039,'utf-8'));return _0x54fc51[_0x45b671(0xbd)]||'1.0.0';}catch{return _0x45b671(0xb1);}}function isNonNumericVersion(_0x5369d0){const _0x4b24ff=a123_0x2f05,_0x414dba=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\^/,/^~/,/^>/,/^</,/^\*/,/^x$/];return _0x414dba[_0x4b24ff(0xc0)](_0x5667ab=>_0x5667ab['test'](_0x5369d0));}export async function checkCliVersion(){const _0x5ec2ce=a123_0x2f05,_0xa0de76=getCurrentCliVersion(),_0x364a3b=await getCdnConfig(),_0x4cbc9b=_0x364a3b?.[_0x5ec2ce(0xc8)]?.['stableVersion']||null;let _0x256f5e=![];if(_0x4cbc9b)try{const _0x4e6fce=a123_0x45ca9a[_0x5ec2ce(0xb7)](_0xa0de76),_0x378305=a123_0x45ca9a[_0x5ec2ce(0xb7)](_0x4cbc9b);_0x4e6fce&&_0x378305&&(_0x256f5e=a123_0x45ca9a['lt'](_0x4e6fce,_0x378305));}catch{_0x256f5e=![];}return{'currentVersion':_0xa0de76,'stableVersion':_0x4cbc9b,'needsUpgrade':_0x256f5e,'isPreRelease':![]};}export function printCliUpgradeWarning(_0x110a36){const _0x5b1012=a123_0x2f05;if(!_0x110a36[_0x5b1012(0xb5)])return;const _0x2350dc=_0x5b1012(0xc2),_0xabebd9='\x1b[0m',_0xc2ca58=_0x5b1012(0xc4),_0x356a71='npm\x20install\x20-g\x20'+NPM_PACKAGE_NAME+_0x5b1012(0xcc);console['log'](),console[_0x5b1012(0xbc)](''+_0x2350dc+_0xc2ca58+_0x5b1012(0xb2)+_0xabebd9),console[_0x5b1012(0xbc)](_0x2350dc+_0x5b1012(0xb6)+_0x110a36[_0x5b1012(0xb3)]+_0xabebd9),console[_0x5b1012(0xbc)](_0x2350dc+_0x5b1012(0xbf)+_0x110a36[_0x5b1012(0xc5)]+_0xabebd9),console[_0x5b1012(0xbc)](_0x2350dc+'\x20\x20\x20Upgrade\x20command:\x20'+_0x356a71+_0xabebd9),console['log']();}
|
package/lib/utils/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x19a0ef,_0x31c185){const _0x23c836=a124_0x2366,_0x3391db=_0x19a0ef();while(!![]){try{const _0x3c32aa=-parseInt(_0x23c836(0xc0))/0x1*(parseInt(_0x23c836(0xc9))/0x2)+parseInt(_0x23c836(0xb6))/0x3*(parseInt(_0x23c836(0xbe))/0x4)+-parseInt(_0x23c836(0xcc))/0x5*(-parseInt(_0x23c836(0xc3))/0x6)+parseInt(_0x23c836(0xce))/0x7+-parseInt(_0x23c836(0xbb))/0x8*(parseInt(_0x23c836(0xcf))/0x9)+parseInt(_0x23c836(0xc4))/0xa*(-parseInt(_0x23c836(0xba))/0xb)+-parseInt(_0x23c836(0xb5))/0xc*(parseInt(_0x23c836(0xc2))/0xd);if(_0x3c32aa===_0x31c185)break;else _0x3391db['push'](_0x3391db['shift']());}catch(_0x29ca08){_0x3391db['push'](_0x3391db['shift']());}}}(a124_0x11cb,0x2f6c4));import{initEnv}from'../constant/env.js';function a124_0x2366(_0x31330a,_0x5542e9){_0x31330a=_0x31330a-0xb1;const _0x11cb6e=a124_0x11cb();let _0x2366ea=_0x11cb6e[_0x31330a];return _0x2366ea;}import{readRawConfig}from'../context.js';export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';export{isInProject}from'../context.js';export function readConfig(_0xb39975){const _0x222618=a124_0x2366,_0x3b7e8e=readRawConfig(_0xb39975);return _0x3b7e8e[_0x222618(0xcb)]&&typeof _0x3b7e8e[_0x222618(0xcb)]===_0x222618(0xb2)&&initEnv(_0x3b7e8e[_0x222618(0xcb)]),_0x3b7e8e;}export function getConfigAppCode(){const _0x11afcc=a124_0x2366,_0x22d142=readRawConfig();if(_0x22d142[_0x11afcc(0xb1)]&&typeof _0x22d142[_0x11afcc(0xb1)]===_0x11afcc(0xb3)){const _0x46bfa0=_0x22d142[_0x11afcc(0xbd)];if(_0x46bfa0&&_0x22d142[_0x11afcc(0xb1)][_0x46bfa0]?.[_0x11afcc(0xb8)])return String(_0x22d142[_0x11afcc(0xb1)][_0x46bfa0][_0x11afcc(0xb8)])[_0x11afcc(0xcd)]();const _0x48055c=Object[_0x11afcc(0xb9)](_0x22d142[_0x11afcc(0xb1)])[0x0];if(_0x48055c?.['appcode'])return String(_0x48055c['appcode'])[_0x11afcc(0xcd)]();}const _0x4bac9c=_0x22d142[_0x11afcc(0xb8)]||_0x22d142[_0x11afcc(0xc5)];if(typeof _0x4bac9c!==_0x11afcc(0xb2)||_0x4bac9c['trim']()==='')return undefined;return _0x4bac9c[_0x11afcc(0xcd)]();}export function getMultiAppConfigs(){const _0x35e7d2=a124_0x2366,_0x3804b2=readRawConfig(),_0x1106e5=_0x3804b2[_0x35e7d2(0xb1)];if(!_0x1106e5||typeof _0x1106e5!==_0x35e7d2(0xb3)||Object[_0x35e7d2(0xca)](_0x1106e5)[_0x35e7d2(0xb7)]===0x0)return null;const _0x45fef7=_0x3804b2[_0x35e7d2(0xbd)];return Object[_0x35e7d2(0xc1)](_0x1106e5)[_0x35e7d2(0xbc)](([_0x3f03bc,_0x3a4614])=>({'name':_0x3f03bc,'appcode':_0x3a4614?.[_0x35e7d2(0xb8)]||'','isDefault':_0x3f03bc===_0x45fef7,'env':_0x3a4614?.['env'],'apiDir':_0x3a4614?.[_0x35e7d2(0xc7)],'cookie':_0x3a4614?.['cookie']||undefined}))[_0x35e7d2(0xb4)](_0xfb4a3a=>_0xfb4a3a['appcode']);}export function getTemplateBaseUrl(){const _0x1eb7f3=a124_0x2366,_0x2e75b8=readRawConfig();if(_0x2e75b8['template_base_url']&&typeof _0x2e75b8[_0x1eb7f3(0xbf)]==='string')return _0x2e75b8[_0x1eb7f3(0xbf)][_0x1eb7f3(0xc8)](/\/$/,'');return _0x1eb7f3(0xc6);}function a124_0x11cb(){const _0x5f0cec=['length','appcode','values','44YVfRkf','503912oaHVCX','map','defaultApp','8dTbVCL','template_base_url','83jIypbB','entries','1292174aCehaF','1693434iHpriE','794060ujXove','app','https://g.lovrabet.com/dist/lovrabet-skill','apiDir','replace','1046qGHeDk','keys','env','5mCZqww','trim','1832985JZTkPH','9rPTBWT','apps','string','object','filter','12unuquu','260355NkpbfD'];a124_0x11cb=function(){return _0x5f0cec;};return a124_0x11cb();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a125_0x367c(_0x5f4c49,_0x27380c){_0x5f4c49=_0x5f4c49-0x13c;const _0x3c6529=a125_0x3c65();let _0x367cf5=_0x3c6529[_0x5f4c49];return _0x367cf5;}function a125_0x3c65(){const _0x1d9273=['isDirectory','name','552985zuqwWv','144136tCNRDj','mkdirSync','23023224OHlEkg','copyFileSync','复制目录时出错:','readdirSync','25tmWLAZ','6533226ltjsSf','error','8Isvyyy','3388005zXJMaA','85112MGWpqn','2577546ZVHyqf'];a125_0x3c65=function(){return _0x1d9273;};return a125_0x3c65();}(function(_0x1c6c5f,_0x494c1e){const _0x67b432=a125_0x367c,_0x122ee8=_0x1c6c5f();while(!![]){try{const _0x255f66=-parseInt(_0x67b432(0x13f))/0x1*(parseInt(_0x67b432(0x144))/0x2)+-parseInt(_0x67b432(0x143))/0x3+-parseInt(_0x67b432(0x142))/0x4*(parseInt(_0x67b432(0x148))/0x5)+-parseInt(_0x67b432(0x145))/0x6+parseInt(_0x67b432(0x140))/0x7+-parseInt(_0x67b432(0x149))/0x8+parseInt(_0x67b432(0x14b))/0x9;if(_0x255f66===_0x494c1e)break;else _0x122ee8['push'](_0x122ee8['shift']());}catch(_0x4c129d){_0x122ee8['push'](_0x122ee8['shift']());}}}(a125_0x3c65,0x99aa9));import a125_0x40e833 from'node:path';import a125_0x20271a from'node:fs';export async function copyDirectory(_0x3112ed,_0x12a762){const _0x5e7f0b=a125_0x367c;try{const _0x13adb7=a125_0x20271a[_0x5e7f0b(0x13e)](_0x3112ed,{'withFileTypes':!![]});a125_0x20271a[_0x5e7f0b(0x14a)](_0x12a762,{'recursive':!![]});for(const _0x3a92f7 of _0x13adb7){const _0x227440=a125_0x40e833['join'](_0x3112ed,_0x3a92f7[_0x5e7f0b(0x147)]),_0x11c6df=a125_0x40e833['join'](_0x12a762,_0x3a92f7[_0x5e7f0b(0x147)]);_0x3a92f7[_0x5e7f0b(0x146)]()?await copyDirectory(_0x227440,_0x11c6df):a125_0x20271a[_0x5e7f0b(0x13c)](_0x227440,_0x11c6df);}}catch(_0x5d6587){console[_0x5e7f0b(0x141)](_0x5e7f0b(0x13d),_0x5d6587);}}
|
package/lib/utils/file-utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3a8bcb,_0x4acb19){const _0x27ea69=a126_0x1ed7,_0x1bb598=_0x3a8bcb();while(!![]){try{const _0x5b9a56=-parseInt(_0x27ea69(0xeb))/0x1*(parseInt(_0x27ea69(0xea))/0x2)+parseInt(_0x27ea69(0xec))/0x3+-parseInt(_0x27ea69(0xe8))/0x4+-parseInt(_0x27ea69(0xe7))/0x5+-parseInt(_0x27ea69(0xef))/0x6+parseInt(_0x27ea69(0xe9))/0x7+-parseInt(_0x27ea69(0xee))/0x8*(-parseInt(_0x27ea69(0xed))/0x9);if(_0x5b9a56===_0x4acb19)break;else _0x1bb598['push'](_0x1bb598['shift']());}catch(_0x253e56){_0x1bb598['push'](_0x1bb598['shift']());}}}(a126_0x1afb,0x1ab9d));function a126_0x1ed7(_0x1491b0,_0x3985d6){_0x1491b0=_0x1491b0-0xe7;const _0x1afb8c=a126_0x1afb();let _0x1ed7e1=_0x1afb8c[_0x1491b0];return _0x1ed7e1;}import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';export async function copyDir(_0x24f672,_0x2efdff){const _0x17513e=statSync(_0x24f672);if(_0x17513e['isDirectory']()){!existsSync(_0x2efdff)&&mkdirSync(_0x2efdff,{'recursive':!![]});const _0x1282fd=readdirSync(_0x24f672);for(const _0x1059c9 of _0x1282fd){await copyDir(join(_0x24f672,_0x1059c9),join(_0x2efdff,_0x1059c9));}}else copyFileSync(_0x24f672,_0x2efdff);}export function ensureDir(_0x347a9d){!existsSync(_0x347a9d)&&mkdirSync(_0x347a9d,{'recursive':!![]});}function a126_0x1afb(){const _0x199aa1=['183798tIcYZc','40icmqmg','50802JnmMTy','192675whucsW','380816bySoFc','25242aBenIN','2ZZoUpt','38679TAaTOv','553914shdqUn'];a126_0x1afb=function(){return _0x199aa1;};return a126_0x1afb();}export function pathExists(_0x23872e){return existsSync(_0x23872e);}
|