@lovrabet/rabetbase-cli 2.1.12 → 2.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.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/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/discover.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app/use.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.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/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/link-create.js +1 -1
- package/lib/commands/dataset/link-delete.js +1 -1
- package/lib/commands/dataset/link-shared.js +1 -1
- package/lib/commands/dataset/link-update.js +1 -1
- package/lib/commands/dataset/links.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/update.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/init.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.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/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a195_0x369a34=a195_0x1715;(function(_0x3ca003,_0x44bd01){const _0xcc7aaf=a195_0x1715,_0x5991f2=_0x3ca003();while(!![]){try{const _0x3d80f6=-parseInt(_0xcc7aaf(0x14d))/0x1*(parseInt(_0xcc7aaf(0x154))/0x2)+parseInt(_0xcc7aaf(0x169))/0x3+parseInt(_0xcc7aaf(0x156))/0x4+-parseInt(_0xcc7aaf(0x158))/0x5+-parseInt(_0xcc7aaf(0x14a))/0x6+parseInt(_0xcc7aaf(0x14f))/0x7*(parseInt(_0xcc7aaf(0x146))/0x8)+parseInt(_0xcc7aaf(0x16c))/0x9*(-parseInt(_0xcc7aaf(0x147))/0xa);if(_0x3d80f6===_0x44bd01)break;else _0x5991f2['push'](_0x5991f2['shift']());}catch(_0x144abe){_0x5991f2['push'](_0x5991f2['shift']());}}}(a195_0x45e1,0x3098f));import a195_0x430232 from'winston';import a195_0x476222 from'node:fs';function a195_0x1715(_0x21970f,_0x3bab0d){_0x21970f=_0x21970f-0x146;const _0x45e162=a195_0x45e1();let _0x1715fb=_0x45e162[_0x21970f];return _0x1715fb;}function a195_0x45e1(){const _0x13735a=['readFileSync','10165LKgWkW','开始执行:\x20','join','createLogger','now','timestamp','unknown','mkdirSync','setLogPath','.lovrabet.log','details','stringify','winstonLogger','green','File','success','writeFileSync','293760yCjwYc','errors','addColors','3626091jNVQDb','clearLogs','yellow','duration','parse','readLogs','currentRawCommand','message','red','existsSync','Failed\x20to\x20clear\x20logs:','initWinstonLogger','rawCommand','transports','utf8','log','clear','1555816fPkWcC','10cHcDNZ','format','blue','44562kYYCQT','getWinstonInstance','info','1XNIZHW','printf','14EvvZfW','warn','Failed\x20to\x20read\x20logs:','logFilePath','error','153808mWiywr','setRawCommand','805776qplEPU'];a195_0x45e1=function(){return _0x13735a;};return a195_0x45e1();}import a195_0x1546d0 from'node:path';class Logger{[a195_0x369a34(0x164)];[a195_0x369a34(0x152)];[a195_0x369a34(0x172)]='';constructor(){const _0x25b66b=a195_0x369a34;this[_0x25b66b(0x152)]='';}[a195_0x369a34(0x155)](_0x421071){this['currentRawCommand']=_0x421071;}[a195_0x369a34(0x177)](){const _0x57ac83=a195_0x369a34,_0xa554ef=a195_0x1546d0['dirname'](this['logFilePath']);!a195_0x476222[_0x57ac83(0x175)](_0xa554ef)&&a195_0x476222[_0x57ac83(0x15f)](_0xa554ef,{'recursive':!![]});const _0x321764=a195_0x430232[_0x57ac83(0x148)]['combine'](a195_0x430232[_0x57ac83(0x148)][_0x57ac83(0x15d)](),a195_0x430232[_0x57ac83(0x148)][_0x57ac83(0x16a)]({'stack':!![]}),a195_0x430232['format'][_0x57ac83(0x14e)](_0x572700=>{const _0x23d690=_0x57ac83,_0x26d790={'timestamp':_0x572700['timestamp']||new Date()['toISOString'](),'level':_0x572700['level']||_0x23d690(0x14c),'command':_0x572700['command']||_0x23d690(0x15e),'rawCommand':_0x572700[_0x23d690(0x178)]||this[_0x23d690(0x172)]||undefined,'message':_0x572700[_0x23d690(0x173)]||'','duration':_0x572700[_0x23d690(0x16f)]||undefined,'details':_0x572700[_0x23d690(0x162)]||undefined};return JSON[_0x23d690(0x163)](_0x26d790);}));this[_0x57ac83(0x164)]=a195_0x430232[_0x57ac83(0x15b)]({'level':'info','format':_0x321764,'transports':[new a195_0x430232[(_0x57ac83(0x179))][(_0x57ac83(0x166))]({'filename':this[_0x57ac83(0x152)],'level':_0x57ac83(0x14c)})],'silent':![]}),a195_0x430232[_0x57ac83(0x16b)]({'success':_0x57ac83(0x165),'error':_0x57ac83(0x174),'warn':_0x57ac83(0x16e),'info':_0x57ac83(0x149)});}[a195_0x369a34(0x160)](_0x3ed4ef){const _0x36c373=a195_0x369a34;this['logFilePath']=a195_0x1546d0[_0x36c373(0x15a)](_0x3ed4ef,_0x36c373(0x161)),this[_0x36c373(0x164)]&&this[_0x36c373(0x164)][_0x36c373(0x17c)](),this[_0x36c373(0x177)]();}[a195_0x369a34(0x14c)](_0x3d26f1,_0x36be71,_0xcd835){const _0x6a120f=a195_0x369a34;if(!this[_0x6a120f(0x152)]||!this[_0x6a120f(0x164)])return;this[_0x6a120f(0x164)][_0x6a120f(0x14c)](_0x36be71,{'command':_0x3d26f1,'details':_0xcd835});}[a195_0x369a34(0x167)](_0x19ceed,_0x4fe323,_0x1bd98f,_0x5b2052){const _0x48ada1=a195_0x369a34;if(!this[_0x48ada1(0x152)]||!this[_0x48ada1(0x164)])return;this[_0x48ada1(0x164)][_0x48ada1(0x17b)]('info',_0x4fe323,{'level':_0x48ada1(0x167),'command':_0x19ceed,'duration':_0x1bd98f,'details':_0x5b2052});}['error'](_0x271717,_0x254dda,_0x4687db){const _0x2eeabf=a195_0x369a34;if(!this['logFilePath']||!this['winstonLogger'])return;this[_0x2eeabf(0x164)][_0x2eeabf(0x153)](_0x254dda,{'command':_0x271717,'details':_0x4687db});}[a195_0x369a34(0x150)](_0x5f388a,_0x21d3fe,_0x4c1785){const _0x11c18a=a195_0x369a34;if(!this[_0x11c18a(0x152)]||!this['winstonLogger'])return;this['winstonLogger'][_0x11c18a(0x150)](_0x21d3fe,{'command':_0x5f388a,'details':_0x4c1785});}async['logTask'](_0x441826,_0x34eba9,_0x2b3835){const _0x2e8505=a195_0x369a34,_0x1a9b20=Date[_0x2e8505(0x15c)]();this[_0x2e8505(0x14c)](_0x441826,_0x2e8505(0x159)+_0x34eba9);try{const _0x2dbf42=await _0x2b3835(),_0x1da043=Date['now']()-_0x1a9b20;return this[_0x2e8505(0x167)](_0x441826,'完成:\x20'+_0x34eba9,_0x1da043),_0x2dbf42;}catch(_0x1b221e){const _0x52d9a2=Date[_0x2e8505(0x15c)]()-_0x1a9b20;this[_0x2e8505(0x153)](_0x441826,'失败:\x20'+_0x34eba9,{'error':_0x1b221e instanceof Error?_0x1b221e['message']:String(_0x1b221e),'duration':_0x52d9a2});throw _0x1b221e;}}[a195_0x369a34(0x171)](){const _0x28bec8=a195_0x369a34;try{if(!a195_0x476222[_0x28bec8(0x175)](this[_0x28bec8(0x152)]))return[];const _0x6318dd=a195_0x476222[_0x28bec8(0x157)](this[_0x28bec8(0x152)],'utf8');return _0x6318dd['split']('\x0a')['filter'](_0x3bce62=>_0x3bce62['trim']())['map'](_0x2f81c7=>JSON[_0x28bec8(0x170)](_0x2f81c7));}catch(_0x3a6aeb){return console[_0x28bec8(0x150)](_0x28bec8(0x151),_0x3a6aeb),[];}}[a195_0x369a34(0x16d)](){const _0x89a474=a195_0x369a34;try{a195_0x476222['existsSync'](this[_0x89a474(0x152)])&&a195_0x476222[_0x89a474(0x168)](this['logFilePath'],'',_0x89a474(0x17a));}catch(_0x1fc51b){console['warn'](_0x89a474(0x176),_0x1fc51b);}}[a195_0x369a34(0x14b)](){return this['winstonLogger'];}}export const logger=new Logger();
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3e9f0a,_0xaa0261){const _0x354b66=a196_0x1d8b,_0x3684bd=_0x3e9f0a();while(!![]){try{const _0x37928b=-parseInt(_0x354b66(0xae))/0x1+parseInt(_0x354b66(0xb9))/0x2*(-parseInt(_0x354b66(0xb5))/0x3)+parseInt(_0x354b66(0xb6))/0x4*(parseInt(_0x354b66(0xb7))/0x5)+-parseInt(_0x354b66(0xad))/0x6*(parseInt(_0x354b66(0xb0))/0x7)+parseInt(_0x354b66(0xbd))/0x8*(parseInt(_0x354b66(0xb1))/0x9)+-parseInt(_0x354b66(0xbb))/0xa*(parseInt(_0x354b66(0xac))/0xb)+parseInt(_0x354b66(0xb2))/0xc;if(_0x37928b===_0xaa0261)break;else _0x3684bd['push'](_0x3684bd['shift']());}catch(_0x288972){_0x3684bd['push'](_0x3684bd['shift']());}}}(a196_0x56f8,0x64a6b));function a196_0x1d8b(_0x41942d,_0x227e86){_0x41942d=_0x41942d-0xac;const _0x56f817=a196_0x56f8();let _0x1d8bf7=_0x56f817[_0x41942d];return _0x1d8bf7;}import{CliErrors}from'../errors.js';function a196_0x56f8(){const _0x37ff08=['585836HxTsQW','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','49777fppjDV','99tWiOWs','18406848BCnMjW','--params\x20must\x20be\x20a\x20JSON\x20object','object','29373dPqRwj','1192aJraNz','9170fWYjkt','isArray','142dWjejS','parse','5430jjCRrr','validation','118720jFyGiP','2651gPGDiR','354XohGhz'];a196_0x56f8=function(){return _0x37ff08;};return a196_0x56f8();}export function parseJsonParams(_0x27d8ee){const _0x4860eb=a196_0x1d8b;if(!_0x27d8ee)return undefined;let _0x568294;try{_0x568294=JSON[_0x4860eb(0xba)](_0x27d8ee);}catch{throw CliErrors[_0x4860eb(0xbc)]('Invalid\x20JSON\x20for\x20--params:\x20'+_0x27d8ee);}if(!_0x568294||typeof _0x568294!==_0x4860eb(0xb4)||Array[_0x4860eb(0xb8)](_0x568294))throw CliErrors[_0x4860eb(0xbc)](_0x4860eb(0xb3),_0x4860eb(0xaf));return _0x568294;}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a197_0x3101a8=a197_0x22f5;function a197_0x22f5(_0x3860b9,_0x1e1f42){_0x3860b9=_0x3860b9-0x10a;const _0x18ac0e=a197_0x18ac();let _0x22f55e=_0x18ac0e[_0x3860b9];return _0x22f55e;}(function(_0xce7be,_0x2f44c5){const _0x7a5b83=a197_0x22f5,_0x4f5e1c=_0xce7be();while(!![]){try{const _0x1ea8ce=-parseInt(_0x7a5b83(0x112))/0x1*(parseInt(_0x7a5b83(0x10f))/0x2)+-parseInt(_0x7a5b83(0x115))/0x3+-parseInt(_0x7a5b83(0x10c))/0x4*(-parseInt(_0x7a5b83(0x114))/0x5)+parseInt(_0x7a5b83(0x113))/0x6+-parseInt(_0x7a5b83(0x10b))/0x7+parseInt(_0x7a5b83(0x10d))/0x8*(-parseInt(_0x7a5b83(0x10e))/0x9)+parseInt(_0x7a5b83(0x116))/0xa;if(_0x1ea8ce===_0x2f44c5)break;else _0x4f5e1c['push'](_0x4f5e1c['shift']());}catch(_0x1b844d){_0x4f5e1c['push'](_0x4f5e1c['shift']());}}}(a197_0x18ac,0xa3a13));export const isWindows=process[a197_0x3101a8(0x110)]===a197_0x3101a8(0x111);export function resolveNpmBin(_0x4ada17){const _0x12f1fb=a197_0x3101a8;return isWindows?_0x4ada17+_0x12f1fb(0x10a):_0x4ada17;}function a197_0x18ac(){const _0x56ee1c=['win32','13pYjmQj','310506uIVOAC','107880YDscqU','3451167BJNLhO','32492490RAOmtn','.cmd','6525498rcDOgE','128CpOflE','41376suxeMb','171BXvLko','175436sfeQon','platform'];a197_0x18ac=function(){return _0x56ee1c;};return a197_0x18ac();}
|
package/lib/utils/rules-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a198_0x57eb(_0x1cbab0,_0x351baa){_0x1cbab0=_0x1cbab0-0xc6;const _0x32dc82=a198_0x32dc();let _0x57ebc0=_0x32dc82[_0x1cbab0];return _0x57ebc0;}const a198_0x252e3b=a198_0x57eb;(function(_0x290276,_0xe37058){const _0x36e4eb=a198_0x57eb,_0x6dc4ef=_0x290276();while(!![]){try{const _0x469a1f=parseInt(_0x36e4eb(0xce))/0x1*(-parseInt(_0x36e4eb(0xdc))/0x2)+parseInt(_0x36e4eb(0xe1))/0x3*(parseInt(_0x36e4eb(0xcd))/0x4)+parseInt(_0x36e4eb(0xd8))/0x5*(parseInt(_0x36e4eb(0xcf))/0x6)+-parseInt(_0x36e4eb(0xd9))/0x7*(-parseInt(_0x36e4eb(0xdd))/0x8)+-parseInt(_0x36e4eb(0xda))/0x9*(parseInt(_0x36e4eb(0xca))/0xa)+parseInt(_0x36e4eb(0xcc))/0xb+-parseInt(_0x36e4eb(0xd0))/0xc;if(_0x469a1f===_0xe37058)break;else _0x6dc4ef['push'](_0x6dc4ef['shift']());}catch(_0x4365cd){_0x6dc4ef['push'](_0x6dc4ef['shift']());}}}(a198_0x32dc,0x5ae1c));import{existsSync,mkdirSync,readFileSync,writeFileSync}from'node:fs';import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';import{getTemplateBaseUrl}from'../utils/config.js';import{appendUpdateTime}from'../utils/guides-cdn.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function getRulesCdnUrl(){const _0x34f12a=a198_0x57eb,_0x34455f=getTemplateBaseUrl();return _0x34455f+_0x34f12a(0xd3);}const LOCAL_TEMPLATE_PATH=resolve(__dirname,a198_0x252e3b(0xd2));export async function fetchRulesFromCDN(){const _0x5b7397=a198_0x252e3b,_0x5b7192=getRulesCdnUrl(),_0x4baea5=await fetch(_0x5b7192,{'headers':{'Accept':_0x5b7397(0xe0)}});if(!_0x4baea5['ok'])throw new Error(_0x5b7397(0xd7)+_0x4baea5[_0x5b7397(0xc9)]+'\x20'+_0x4baea5['statusText']);const _0x47c9e1=await _0x4baea5[_0x5b7397(0xdb)]();if(!_0x47c9e1['content']||typeof _0x47c9e1[_0x5b7397(0xd1)]!==_0x5b7397(0xc8))throw new Error(_0x5b7397(0xc7));return _0x47c9e1;}export async function getRulesContent(){const _0x35fe1b=a198_0x252e3b;try{const _0x4f0551=await fetchRulesFromCDN();return _0x4f0551[_0x35fe1b(0xd1)];}catch{return readLocalTemplate();}}export function readLocalTemplate(){const _0x3ba289=a198_0x252e3b;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,'utf-8');throw new Error(_0x3ba289(0xc6)+LOCAL_TEMPLATE_PATH);}function a198_0x32dc(){const _0x22f2dc=['15TNOdcv','本地模板文件不存在:\x20','CDN\x20返回数据格式错误','string','status','10NBwkvp','agents.md','1592316gEKUgi','571608LIWZSt','9JQVSzZ','3104922JKGzdL','11000664PsowYR','content','../../templates/rules/lovrabet_rules.mdc.tpl','/rules/rules.json','catch','.cursor/rules','lovrabet_rules.mdc','CDN\x20请求失败:\x20','5vJMUwK','7kSncfQ','1010043HLNUbm','json','153342wUiScg','5715896fTZnfZ','lastUpdated','utf-8','application/json'];a198_0x32dc=function(){return _0x22f2dc;};return a198_0x32dc();}export async function writeRulesFile(_0x5540bc){const _0x370ad4=a198_0x252e3b,_0x1ca96e=await fetchRulesFromCDN()[_0x370ad4(0xd4)](()=>null);let _0x41737e;_0x1ca96e?(_0x41737e=_0x1ca96e[_0x370ad4(0xd1)],_0x1ca96e['lastUpdated']&&(_0x41737e=appendUpdateTime(_0x41737e,_0x1ca96e[_0x370ad4(0xde)]))):_0x41737e=readLocalTemplate();const _0x530ea0=dirname(_0x5540bc);!existsSync(_0x530ea0)&&mkdirSync(_0x530ea0,{'recursive':!![]}),writeFileSync(_0x5540bc,_0x41737e,_0x370ad4(0xdf));}export async function copyRulesToCursor(_0x53421d){const _0x5827cc=a198_0x252e3b,_0x1a1061=join(_0x53421d,_0x5827cc(0xd5)),_0x6f9161=join(_0x1a1061,_0x5827cc(0xd6));if(existsSync(_0x6f9161))return![];return await writeRulesFile(_0x6f9161),!![];}export async function copyRulesToAgentsMd(_0x3a7bc4){const _0x328839=a198_0x252e3b,_0x30a9f5=join(_0x3a7bc4,_0x328839(0xcb));if(existsSync(_0x30a9f5))return![];return await writeRulesFile(_0x30a9f5),!![];}
|
package/lib/utils/sleep.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function sleep(
|
|
1
|
+
export function sleep(_0x369924){return new Promise(_0x5e03d6=>setTimeout(_0x5e03d6,_0x369924));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a200_0x40b83e=a200_0x1aab;function a200_0x10c6(){const _0x4f8225=['toLowerCase','promises','mkdir','split','alias','YourModel','pop','toUpperCase','info','api','12ZHSsTF','2430666OCvgCT','toDisplayTitle','replaceContent','getMinutes','isDirectory','pad','getFullYear','.css','processTemplate','.json','replace','endsWith','utf8','message','now','readFile','success','6779210JMjeKg','开始处理模板内容替换','getMonth','getHours','.js','模板内容替换失败','push','tableName:\x20\x22','replaceApiContent','join','.ts','.jsx','formatLocalTimestamp','9rhavrS','tableName','charAt','getDate','.tpl','3477592nykcfK','3146sGpxNz','.scss','13eHKaal','1169715OHQeaS','toComponentName','6711834XzbqEo','name','padStart','processFile','readdir','template','toISOString','extname','processDirectory','1495212qFHYLK','map','datasetCode:\x20\x22','default','datasetCode'];a200_0x10c6=function(){return _0x4f8225;};return a200_0x10c6();}(function(_0x5066ac,_0x4a0ba7){const _0x57f2ba=a200_0x1aab,_0x556251=_0x5066ac();while(!![]){try{const _0x3b0360=-parseInt(_0x57f2ba(0x1ec))/0x1*(-parseInt(_0x57f2ba(0x1ea))/0x2)+-parseInt(_0x57f2ba(0x1f8))/0x3+-parseInt(_0x57f2ba(0x207))/0x4*(-parseInt(_0x57f2ba(0x1ed))/0x5)+-parseInt(_0x57f2ba(0x1ef))/0x6+parseInt(_0x57f2ba(0x208))/0x7+parseInt(_0x57f2ba(0x1e9))/0x8*(parseInt(_0x57f2ba(0x226))/0x9)+parseInt(_0x57f2ba(0x219))/0xa;if(_0x3b0360===_0x4a0ba7)break;else _0x556251['push'](_0x556251['shift']());}catch(_0x85b4f2){_0x556251['push'](_0x556251['shift']());}}}(a200_0x10c6,0x89f65));function a200_0x1aab(_0x113350,_0x371e01){_0x113350=_0x113350-0x1e8;const _0x10c6cf=a200_0x10c6();let _0x1aab32=_0x10c6cf[_0x113350];return _0x1aab32;}import a200_0x138e29 from'node:fs';import a200_0x568796 from'node:path';import{logger}from'../utils/logger.js';import{getCliVersion}from'../utils/version.js';const CLI_VERSION=getCliVersion();export class TemplateReplacer{static[a200_0x40b83e(0x20d)](_0x331d66){const _0x2f67ce=a200_0x40b83e;return String(_0x331d66)[_0x2f67ce(0x1f1)](0x2,'0');}static[a200_0x40b83e(0x225)](_0x14a97f){const _0x281dbe=a200_0x40b83e,_0x1b6e8d=_0x14a97f[_0x281dbe(0x20e)](),_0x35a522=this[_0x281dbe(0x20d)](_0x14a97f[_0x281dbe(0x21b)]()+0x1),_0x55bd15=this[_0x281dbe(0x20d)](_0x14a97f[_0x281dbe(0x229)]()),_0x56a4f1=this[_0x281dbe(0x20d)](_0x14a97f[_0x281dbe(0x21c)]()),_0x3dd875=this[_0x281dbe(0x20d)](_0x14a97f[_0x281dbe(0x20b)]()),_0xb7e99d=this[_0x281dbe(0x20d)](_0x14a97f['getSeconds']());return{'createdAt':_0x1b6e8d+'-'+_0x35a522+'-'+_0x55bd15+'\x20'+_0x56a4f1+':'+_0x3dd875+':'+_0xb7e99d,'createdDate':_0x1b6e8d+'-'+_0x35a522+'-'+_0x55bd15,'createdTime':_0x56a4f1+':'+_0x3dd875+':'+_0xb7e99d};}static[a200_0x40b83e(0x1ee)](_0x51d7ee){const _0x5be001=a200_0x40b83e,_0x28a5bb=_0x51d7ee[_0x5be001(0x200)]('/')[_0x5be001(0x203)]()||_0x51d7ee;return _0x28a5bb[_0x5be001(0x200)]('-')[_0x5be001(0x1f9)](_0x445bde=>_0x445bde[_0x5be001(0x228)](0x0)[_0x5be001(0x204)]()+_0x445bde['slice'](0x1)[_0x5be001(0x1fd)]())[_0x5be001(0x222)]('');}static[a200_0x40b83e(0x209)](_0x428bc0){const _0x50babc=a200_0x40b83e,_0x1fbf41=_0x428bc0[_0x50babc(0x200)]('/')['pop']()||_0x428bc0;return _0x1fbf41[_0x50babc(0x200)]('-')[_0x50babc(0x1f9)](_0x1ef135=>_0x1ef135[_0x50babc(0x228)](0x0)[_0x50babc(0x204)]()+_0x1ef135['slice'](0x1)[_0x50babc(0x1fd)]())[_0x50babc(0x222)]('\x20');}static[a200_0x40b83e(0x20a)](_0x3ba7d1,_0x482594,_0x17e511){const _0x53a61a=a200_0x40b83e,_0x134025=this[_0x53a61a(0x1ee)](_0x482594),_0x2b9b87=this['toDisplayTitle'](_0x482594),{createdAt:_0x47b06c,createdDate:_0x4004a2,createdTime:_0x25204e}=this[_0x53a61a(0x225)](new Date());let _0x12ae0b=_0x3ba7d1[_0x53a61a(0x212)](/\{CliVersion\}/g,CLI_VERSION)['replace'](/\{ComponentName\}/g,_0x134025)[_0x53a61a(0x212)](/\{DisplayTitle\}/g,_0x2b9b87)[_0x53a61a(0x212)](/\{PageName\}/g,_0x482594)[_0x53a61a(0x212)](/\{TemplateName\}/g,_0x17e511)[_0x53a61a(0x212)](/\{CreatedAt\}/g,_0x47b06c)[_0x53a61a(0x212)](/\{CreatedDate\}/g,_0x4004a2)[_0x53a61a(0x212)](/\{CreatedTime\}/g,_0x25204e);return _0x12ae0b;}static[a200_0x40b83e(0x221)](_0x2a2a84,_0x5622ff,_0x43f8d9,_0xd98fc0,_0x3f2e60,_0x4c9217,_0x51e1ba,_0x5cb099){const _0x3eb41c=a200_0x40b83e,_0x24102f=new Date(),_0x4f293b=_0x24102f[_0x3eb41c(0x1f5)](),_0x162b35=_0x43f8d9[_0x3eb41c(0x1f9)](_0x88b611=>{const _0x3d2683=_0x3eb41c,_0x1a2905=[_0x3d2683(0x1fa)+_0x88b611[_0x3d2683(0x1fc)]+'\x22',_0x3d2683(0x220)+_0x88b611[_0x3d2683(0x227)]+'\x22','name:\x20\x22'+_0x88b611[_0x3d2683(0x1f0)]+'\x22'];return _0x88b611[_0x3d2683(0x201)]&&_0x1a2905[_0x3d2683(0x21f)]('alias:\x20\x22'+_0x88b611[_0x3d2683(0x201)]+'\x22'),'\x0a\x20\x20\x20\x20{\x20'+_0x1a2905['join'](',\x20')+'\x20},';})['join'](''),_0x5c57b0=_0xd98fc0||_0x43f8d9[0x0]?.[_0x3eb41c(0x201)]||_0x3eb41c(0x202);let _0x5970ef=_0x2a2a84[_0x3eb41c(0x212)](/\{AppCode\}/g,_0x5622ff)[_0x3eb41c(0x212)](/\{ModelConfigs\}/g,_0x162b35)[_0x3eb41c(0x212)](/\{ExampleModelName\}/g,_0x5c57b0)['replace'](/\{ApiFileName\}/g,_0x3f2e60||_0x3eb41c(0x206))['replace'](/\{ConfigName\}/g,_0x4c9217||_0x3eb41c(0x1fb))['replace'](/\{ClientConfigParam\}/g,_0x51e1ba||'')[_0x3eb41c(0x212)](/\{VarPrefix\}/g,_0x5cb099||'LOVRABET')[_0x3eb41c(0x212)](/\{CreatedAt\}/g,_0x4f293b);return _0x5970ef;}static async[a200_0x40b83e(0x210)](_0x1f83ba,_0x23db96,_0x59dd16,_0x305de9,_0x4ae19f=!![]){const _0x50aa4f=a200_0x40b83e,_0x5d7bcd=Date['now']();try{_0x4ae19f&&logger[_0x50aa4f(0x205)]('template',_0x50aa4f(0x21a),{'templatePath':_0x1f83ba,'targetPath':_0x23db96,'pageName':_0x59dd16,'templateName':_0x305de9});await a200_0x138e29['promises'][_0x50aa4f(0x1ff)](_0x23db96,{'recursive':!![]}),await this[_0x50aa4f(0x1f7)](_0x1f83ba,_0x23db96,_0x59dd16,_0x305de9);if(_0x4ae19f){const _0x1e0d1f=Date[_0x50aa4f(0x216)]()-_0x5d7bcd;logger[_0x50aa4f(0x218)](_0x50aa4f(0x1f4),'模板内容替换完成',_0x1e0d1f,{'pageName':_0x59dd16,'templateName':_0x305de9});}}catch(_0x112a18){if(_0x4ae19f){const _0x3d7e56=Date[_0x50aa4f(0x216)]()-_0x5d7bcd;logger['error'](_0x50aa4f(0x1f4),_0x50aa4f(0x21e),{'templatePath':_0x1f83ba,'targetPath':_0x23db96,'pageName':_0x59dd16,'templateName':_0x305de9,'error':_0x112a18 instanceof Error?_0x112a18[_0x50aa4f(0x215)]:String(_0x112a18),'duration':_0x3d7e56});}throw _0x112a18;}}static async['processDirectory'](_0x1d9bb5,_0x3cd686,_0x2c8c8e,_0x349e1d){const _0x4a9098=a200_0x40b83e,_0x185287=await a200_0x138e29['promises'][_0x4a9098(0x1f3)](_0x1d9bb5,{'withFileTypes':!![]});for(const _0xe2a4dd of _0x185287){const _0x2ed1e8=a200_0x568796[_0x4a9098(0x222)](_0x1d9bb5,_0xe2a4dd[_0x4a9098(0x1f0)]);let _0x4063bd=a200_0x568796[_0x4a9098(0x222)](_0x3cd686,_0xe2a4dd[_0x4a9098(0x1f0)]);_0xe2a4dd[_0x4a9098(0x1f0)]['endsWith'](_0x4a9098(0x1e8))&&(_0x4063bd=a200_0x568796[_0x4a9098(0x222)](_0x3cd686,_0xe2a4dd['name']['replace'](/\.tpl$/,'')));if(_0xe2a4dd[_0x4a9098(0x20c)]())await a200_0x138e29[_0x4a9098(0x1fe)][_0x4a9098(0x1ff)](_0x4063bd,{'recursive':!![]}),await this['processDirectory'](_0x2ed1e8,_0x4063bd,_0x2c8c8e,_0x349e1d);else _0xe2a4dd['isFile']()&&await this[_0x4a9098(0x1f2)](_0x2ed1e8,_0x4063bd,_0x2c8c8e,_0x349e1d);}}static async['processFile'](_0x3859eb,_0x57872d,_0x358cb4,_0x349d3c){const _0x2a8efe=a200_0x40b83e,_0x39a63d=a200_0x568796[_0x2a8efe(0x1f6)](_0x3859eb)[_0x2a8efe(0x1fd)]();_0x3859eb[_0x2a8efe(0x213)](_0x2a8efe(0x1e8))&&(_0x57872d=_0x57872d[_0x2a8efe(0x212)](/\.tpl$/,''));const _0x3c1be3=['.tsx',_0x2a8efe(0x223),_0x2a8efe(0x224),_0x2a8efe(0x21d),_0x2a8efe(0x211),'.md',_0x2a8efe(0x20f),_0x2a8efe(0x1eb),'.tpl'];if(_0x3c1be3['includes'](_0x39a63d)||_0x3859eb[_0x2a8efe(0x213)]('.tpl')){const _0x4f8faf=await a200_0x138e29[_0x2a8efe(0x1fe)][_0x2a8efe(0x217)](_0x3859eb,_0x2a8efe(0x214)),_0x48ccbf=this[_0x2a8efe(0x20a)](_0x4f8faf,_0x358cb4,_0x349d3c);await a200_0x138e29[_0x2a8efe(0x1fe)]['writeFile'](_0x57872d,_0x48ccbf,'utf8');}else await a200_0x138e29['promises']['copyFile'](_0x3859eb,_0x57872d);}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2881d8,_0x44df63){var _0x4f7330=a201_0x24a0,_0x40b941=_0x2881d8();while(!![]){try{var _0x4eff9d=parseInt(_0x4f7330(0xea))/0x1*(parseInt(_0x4f7330(0xef))/0x2)+parseInt(_0x4f7330(0xe8))/0x3+-parseInt(_0x4f7330(0xe9))/0x4+-parseInt(_0x4f7330(0xe7))/0x5*(-parseInt(_0x4f7330(0xeb))/0x6)+-parseInt(_0x4f7330(0xec))/0x7*(-parseInt(_0x4f7330(0xed))/0x8)+parseInt(_0x4f7330(0xe6))/0x9*(parseInt(_0x4f7330(0xee))/0xa)+-parseInt(_0x4f7330(0xf0))/0xb;if(_0x4eff9d===_0x44df63)break;else _0x40b941['push'](_0x40b941['shift']());}catch(_0x3ef3d0){_0x40b941['push'](_0x40b941['shift']());}}}(a201_0x1022,0xc9723));function a201_0x24a0(_0x59811d,_0x33911a){_0x59811d=_0x59811d-0xe6;var _0x1022e7=a201_0x1022();var _0x24a01d=_0x1022e7[_0x59811d];return _0x24a01d;}import{VERSION}from'../generated/build-info.js';function a201_0x1022(){var _0x14cfcf=['1542603URXOxO','1439640zfWDtD','319WgXRfb','89184PbSkIz','1253yCSocl','65128NeMphW','5010nzxITr','4054thVYHL','33989054gdcuES','6534nDeicf','435oGPEjf'];a201_0x1022=function(){return _0x14cfcf;};return a201_0x1022();}export function getCliVersion(){return VERSION;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2febb2,_0x589e35){var _0x2d54f4=a202_0x14c8,_0x140d4b=_0x2febb2();while(!![]){try{var _0x413569=-parseInt(_0x2d54f4(0x1b7))/0x1+-parseInt(_0x2d54f4(0x1b5))/0x2*(parseInt(_0x2d54f4(0x1bc))/0x3)+parseInt(_0x2d54f4(0x1b8))/0x4*(parseInt(_0x2d54f4(0x1b4))/0x5)+parseInt(_0x2d54f4(0x1b9))/0x6*(-parseInt(_0x2d54f4(0x1bd))/0x7)+-parseInt(_0x2d54f4(0x1b3))/0x8+parseInt(_0x2d54f4(0x1b6))/0x9*(parseInt(_0x2d54f4(0x1bb))/0xa)+-parseInt(_0x2d54f4(0x1b2))/0xb*(-parseInt(_0x2d54f4(0x1ba))/0xc);if(_0x413569===_0x589e35)break;else _0x140d4b['push'](_0x140d4b['shift']());}catch(_0x560ca3){_0x140d4b['push'](_0x140d4b['shift']());}}}(a202_0x2702,0xc4dd2));function a202_0x14c8(_0x35064d,_0x1e789c){_0x35064d=_0x35064d-0x1b2;var _0x270206=a202_0x2702();var _0x14c8ba=_0x270206[_0x35064d];return _0x14c8ba;}function a202_0x2702(){var _0x37967c=['528111fDhyyv','2937053Hytayk','23320187CozJIj','7642368sgGYxT','120VFTvEd','2zutmxC','63lLdEYE','41774pSouAn','11372HMqenh','6QoLCDd','12ZlZVzg','301130mHjrvO'];a202_0x2702=function(){return _0x37967c;};return a202_0x2702();}import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';export async function withActiveCookie(_0x3fc242,_0xb8ff1f){setActiveCookie(_0x3fc242);try{return await _0xb8ff1f();}finally{clearActiveCookie();}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a203_0x44c2(){var _0x1f02a0=['259CFghSZ','9816ExojAF','3bluPGj','3338568Farxwv','8116174ZIPcXp','write','5088420BZRFLy','115062dbTqiq','1293484vHMkFc','stderr','1910075HBrUwl','18lpKwVt','16jJovlf'];a203_0x44c2=function(){return _0x1f02a0;};return a203_0x44c2();}function a203_0x54f4(_0x2bb8d4,_0x3385d3){_0x2bb8d4=_0x2bb8d4-0x10b;var _0x44c201=a203_0x44c2();var _0x54f493=_0x44c201[_0x2bb8d4];return _0x54f493;}(function(_0x35da70,_0x129b64){var _0x492906=a203_0x54f4,_0x50e93b=_0x35da70();while(!![]){try{var _0x1a5ccc=parseInt(_0x492906(0x111))/0x1*(parseInt(_0x492906(0x10f))/0x2)+-parseInt(_0x492906(0x112))/0x3*(-parseInt(_0x492906(0x10b))/0x4)+parseInt(_0x492906(0x10d))/0x5+parseInt(_0x492906(0x117))/0x6*(parseInt(_0x492906(0x110))/0x7)+parseInt(_0x492906(0x113))/0x8*(-parseInt(_0x492906(0x10e))/0x9)+parseInt(_0x492906(0x116))/0xa+-parseInt(_0x492906(0x114))/0xb;if(_0x1a5ccc===_0x129b64)break;else _0x50e93b['push'](_0x50e93b['shift']());}catch(_0x43f567){_0x50e93b['push'](_0x50e93b['shift']());}}}(a203_0x44c2,0x68f05));export function writeCliSideChannelLine(_0x2d235d){var _0x5bc866=a203_0x54f4;process[_0x5bc866(0x10c)][_0x5bc866(0x115)](_0x2d235d+'\x0a');}
|