@lovrabet/rabetbase-cli 2.1.6 → 2.1.7-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/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/delete.js +1 -0
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/link-create.js +1 -0
- package/lib/commands/dataset/link-delete.js +1 -0
- package/lib/commands/dataset/link-shared.js +1 -0
- package/lib/commands/dataset/link-update.js +1 -0
- 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 -0
- package/lib/commands/issue/report.js +1 -0
- 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 -0
- 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 +2 -1
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a191_0x48fcdb=a191_0x3000;function a191_0x5dfd(){const _0x5329c6=['addColors','311190HbsLlO','duration','info','transports','currentRawCommand','winstonLogger','logFilePath','4441195oEmiss','readFileSync','existsSync','join','1SzyaBc','initWinstonLogger','writeFileSync','timestamp','.lovrabet.log','setLogPath','error','dirname','trim','utf8','details','90879BLbkDj','setRawCommand','map','green','stringify','readLogs','errors','red','getWinstonInstance','2833420icuFSy','format','level','printf','warn','开始执行:\x20','3220202Vlywdf','3159940eZzxXs','119eSReMq','now','897296GCMcxB','blue','toISOString','rawCommand','yellow','90qIxSov','success'];a191_0x5dfd=function(){return _0x5329c6;};return a191_0x5dfd();}(function(_0x5284a2,_0x144e35){const _0x2b4ca9=a191_0x3000,_0x32470f=_0x5284a2();while(!![]){try{const _0x79de3d=parseInt(_0x2b4ca9(0xdc))/0x1*(-parseInt(_0x2b4ca9(0xc5))/0x2)+parseInt(_0x2b4ca9(0xb6))/0x3+-parseInt(_0x2b4ca9(0xc6))/0x4+parseInt(_0x2b4ca9(0xd8))/0x5+parseInt(_0x2b4ca9(0xd1))/0x6*(parseInt(_0x2b4ca9(0xc7))/0x7)+-parseInt(_0x2b4ca9(0xc9))/0x8*(-parseInt(_0x2b4ca9(0xce))/0x9)+parseInt(_0x2b4ca9(0xbf))/0xa;if(_0x79de3d===_0x144e35)break;else _0x32470f['push'](_0x32470f['shift']());}catch(_0x4835b3){_0x32470f['push'](_0x32470f['shift']());}}}(a191_0x5dfd,0xc48f9));import a191_0x7859df from'winston';import a191_0xc925f4 from'node:fs';function a191_0x3000(_0x1f3eeb,_0x5635b1){_0x1f3eeb=_0x1f3eeb-0xb3;const _0x5dfde5=a191_0x5dfd();let _0x300045=_0x5dfde5[_0x1f3eeb];return _0x300045;}import a191_0x5eb79c from'node:path';class Logger{[a191_0x48fcdb(0xd6)];[a191_0x48fcdb(0xd7)];['currentRawCommand']='';constructor(){const _0x5eba00=a191_0x48fcdb;this[_0x5eba00(0xd7)]='';}[a191_0x48fcdb(0xb7)](_0x3e908d){const _0x4fb042=a191_0x48fcdb;this[_0x4fb042(0xd5)]=_0x3e908d;}[a191_0x48fcdb(0xdd)](){const _0x557f45=a191_0x48fcdb,_0x299b36=a191_0x5eb79c[_0x557f45(0xe3)](this[_0x557f45(0xd7)]);!a191_0xc925f4['existsSync'](_0x299b36)&&a191_0xc925f4['mkdirSync'](_0x299b36,{'recursive':!![]});const _0x431423=a191_0x7859df[_0x557f45(0xc0)]['combine'](a191_0x7859df[_0x557f45(0xc0)][_0x557f45(0xdf)](),a191_0x7859df['format'][_0x557f45(0xbc)]({'stack':!![]}),a191_0x7859df['format'][_0x557f45(0xc2)](_0x48c053=>{const _0x343e84=_0x557f45,_0x57443c={'timestamp':_0x48c053[_0x343e84(0xdf)]||new Date()[_0x343e84(0xcb)](),'level':_0x48c053[_0x343e84(0xc1)]||'info','command':_0x48c053['command']||'unknown','rawCommand':_0x48c053[_0x343e84(0xcc)]||this[_0x343e84(0xd5)]||undefined,'message':_0x48c053['message']||'','duration':_0x48c053[_0x343e84(0xd2)]||undefined,'details':_0x48c053[_0x343e84(0xb5)]||undefined};return JSON[_0x343e84(0xba)](_0x57443c);}));this[_0x557f45(0xd6)]=a191_0x7859df['createLogger']({'level':_0x557f45(0xd3),'format':_0x431423,'transports':[new a191_0x7859df[(_0x557f45(0xd4))]['File']({'filename':this[_0x557f45(0xd7)],'level':'info'})],'silent':![]}),a191_0x7859df[_0x557f45(0xd0)]({'success':_0x557f45(0xb9),'error':_0x557f45(0xbd),'warn':_0x557f45(0xcd),'info':_0x557f45(0xca)});}[a191_0x48fcdb(0xe1)](_0x5a5d8f){const _0x4043d1=a191_0x48fcdb;this['logFilePath']=a191_0x5eb79c[_0x4043d1(0xdb)](_0x5a5d8f,_0x4043d1(0xe0)),this[_0x4043d1(0xd6)]&&this[_0x4043d1(0xd6)]['clear'](),this[_0x4043d1(0xdd)]();}[a191_0x48fcdb(0xd3)](_0x21d983,_0x1bff8f,_0x463e2f){const _0x2ce5b5=a191_0x48fcdb;if(!this[_0x2ce5b5(0xd7)]||!this[_0x2ce5b5(0xd6)])return;this[_0x2ce5b5(0xd6)][_0x2ce5b5(0xd3)](_0x1bff8f,{'command':_0x21d983,'details':_0x463e2f});}[a191_0x48fcdb(0xcf)](_0x16ed63,_0x39f572,_0x444865,_0x570099){const _0x204aa5=a191_0x48fcdb;if(!this[_0x204aa5(0xd7)]||!this['winstonLogger'])return;this[_0x204aa5(0xd6)]['log'](_0x204aa5(0xd3),_0x39f572,{'level':'success','command':_0x16ed63,'duration':_0x444865,'details':_0x570099});}[a191_0x48fcdb(0xe2)](_0x5d519b,_0x423110,_0x310b40){const _0x2667d0=a191_0x48fcdb;if(!this[_0x2667d0(0xd7)]||!this[_0x2667d0(0xd6)])return;this[_0x2667d0(0xd6)][_0x2667d0(0xe2)](_0x423110,{'command':_0x5d519b,'details':_0x310b40});}[a191_0x48fcdb(0xc3)](_0x5ad758,_0x4d6e90,_0x53eacd){const _0x4a31c5=a191_0x48fcdb;if(!this[_0x4a31c5(0xd7)]||!this[_0x4a31c5(0xd6)])return;this[_0x4a31c5(0xd6)][_0x4a31c5(0xc3)](_0x4d6e90,{'command':_0x5ad758,'details':_0x53eacd});}async['logTask'](_0x27c9d4,_0x3d65cd,_0x342eff){const _0x4f70ba=a191_0x48fcdb,_0x342400=Date[_0x4f70ba(0xc8)]();this[_0x4f70ba(0xd3)](_0x27c9d4,_0x4f70ba(0xc4)+_0x3d65cd);try{const _0x226390=await _0x342eff(),_0x620149=Date[_0x4f70ba(0xc8)]()-_0x342400;return this[_0x4f70ba(0xcf)](_0x27c9d4,'完成:\x20'+_0x3d65cd,_0x620149),_0x226390;}catch(_0x4ad333){const _0x2b0cb2=Date[_0x4f70ba(0xc8)]()-_0x342400;this['error'](_0x27c9d4,'失败:\x20'+_0x3d65cd,{'error':_0x4ad333 instanceof Error?_0x4ad333['message']:String(_0x4ad333),'duration':_0x2b0cb2});throw _0x4ad333;}}[a191_0x48fcdb(0xbb)](){const _0x2f0ff3=a191_0x48fcdb;try{if(!a191_0xc925f4[_0x2f0ff3(0xda)](this[_0x2f0ff3(0xd7)]))return[];const _0x2a25ac=a191_0xc925f4[_0x2f0ff3(0xd9)](this[_0x2f0ff3(0xd7)],_0x2f0ff3(0xb4));return _0x2a25ac['split']('\x0a')['filter'](_0x5039e0=>_0x5039e0[_0x2f0ff3(0xb3)]())[_0x2f0ff3(0xb8)](_0x52b393=>JSON['parse'](_0x52b393));}catch(_0x56f289){return console[_0x2f0ff3(0xc3)]('Failed\x20to\x20read\x20logs:',_0x56f289),[];}}['clearLogs'](){const _0x2f82ed=a191_0x48fcdb;try{a191_0xc925f4['existsSync'](this['logFilePath'])&&a191_0xc925f4[_0x2f82ed(0xde)](this['logFilePath'],'','utf8');}catch(_0x4f95f9){console[_0x2f82ed(0xc3)]('Failed\x20to\x20clear\x20logs:',_0x4f95f9);}}[a191_0x48fcdb(0xbe)](){const _0x55dace=a191_0x48fcdb;return this[_0x55dace(0xd6)];}}export const logger=new Logger();
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a192_0x50cc(_0x4b5e3b,_0x5135d6){_0x4b5e3b=_0x4b5e3b-0x1ba;const _0x34f9c3=a192_0x34f9();let _0x50cc21=_0x34f9c3[_0x4b5e3b];return _0x50cc21;}(function(_0x1787d4,_0x35bdcc){const _0x418c52=a192_0x50cc,_0x5b8f2c=_0x1787d4();while(!![]){try{const _0x320543=-parseInt(_0x418c52(0x1c6))/0x1+parseInt(_0x418c52(0x1ca))/0x2*(-parseInt(_0x418c52(0x1c7))/0x3)+-parseInt(_0x418c52(0x1c4))/0x4*(parseInt(_0x418c52(0x1c9))/0x5)+-parseInt(_0x418c52(0x1c3))/0x6*(-parseInt(_0x418c52(0x1c1))/0x7)+-parseInt(_0x418c52(0x1c5))/0x8+-parseInt(_0x418c52(0x1bd))/0x9*(-parseInt(_0x418c52(0x1c8))/0xa)+parseInt(_0x418c52(0x1ba))/0xb;if(_0x320543===_0x35bdcc)break;else _0x5b8f2c['push'](_0x5b8f2c['shift']());}catch(_0x4c7257){_0x5b8f2c['push'](_0x5b8f2c['shift']());}}}(a192_0x34f9,0x281d3));import{CliErrors}from'../errors.js';function a192_0x34f9(){const _0x1fad01=['3DIRrYi','20EECslA','615675RilmHM','240074UvKNfh','object','4959955lXPNcI','parse','isArray','372753zLfZVu','Invalid\x20JSON\x20for\x20--params:\x20','validation','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','7fCcoVo','--params\x20must\x20be\x20a\x20JSON\x20object','1941834HNndQc','4GdvYbW','1818896QjxkMe','222537ilFiEq'];a192_0x34f9=function(){return _0x1fad01;};return a192_0x34f9();}export function parseJsonParams(_0x4ceea1){const _0x12ac99=a192_0x50cc;if(!_0x4ceea1)return undefined;let _0x31fec0;try{_0x31fec0=JSON[_0x12ac99(0x1bb)](_0x4ceea1);}catch{throw CliErrors[_0x12ac99(0x1bf)](_0x12ac99(0x1be)+_0x4ceea1);}if(!_0x31fec0||typeof _0x31fec0!==_0x12ac99(0x1cb)||Array[_0x12ac99(0x1bc)](_0x31fec0))throw CliErrors[_0x12ac99(0x1bf)](_0x12ac99(0x1c2),_0x12ac99(0x1c0));return _0x31fec0;}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a193_0x1bb6(_0x29b782,_0x16ff5b){_0x29b782=_0x29b782-0x11b;const _0x27219b=a193_0x2721();let _0x1bb6c8=_0x27219b[_0x29b782];return _0x1bb6c8;}const a193_0x480580=a193_0x1bb6;(function(_0x23539e,_0x3bdb13){const _0x3fd286=a193_0x1bb6,_0x4199cf=_0x23539e();while(!![]){try{const _0x2cd569=-parseInt(_0x3fd286(0x11e))/0x1*(-parseInt(_0x3fd286(0x120))/0x2)+parseInt(_0x3fd286(0x11d))/0x3*(parseInt(_0x3fd286(0x124))/0x4)+-parseInt(_0x3fd286(0x122))/0x5+parseInt(_0x3fd286(0x126))/0x6+-parseInt(_0x3fd286(0x11b))/0x7+parseInt(_0x3fd286(0x11f))/0x8+-parseInt(_0x3fd286(0x11c))/0x9*(parseInt(_0x3fd286(0x123))/0xa);if(_0x2cd569===_0x3bdb13)break;else _0x4199cf['push'](_0x4199cf['shift']());}catch(_0x1afc17){_0x4199cf['push'](_0x4199cf['shift']());}}}(a193_0x2721,0x70fb2));export const isWindows=process[a193_0x480580(0x121)]==='win32';export function resolveNpmBin(_0x182617){const _0x105348=a193_0x480580;return isWindows?_0x182617+_0x105348(0x125):_0x182617;}function a193_0x2721(){const _0x1374a3=['4518342BrwcUN','1432060tplHiD','270909ooXYkD','2392245MEibJi','172savADL','4940816znGrcT','2620FMKjzW','platform','4566585zsctPm','270OLSouh','4tplQGM','.cmd'];a193_0x2721=function(){return _0x1374a3;};return a193_0x2721();}
|
package/lib/utils/rules-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a194_0x4cc999=a194_0x290a;(function(_0x500b5f,_0x441dcc){const _0x44db77=a194_0x290a,_0x22a9ca=_0x500b5f();while(!![]){try{const _0x1c424b=-parseInt(_0x44db77(0x13c))/0x1*(parseInt(_0x44db77(0x13f))/0x2)+-parseInt(_0x44db77(0x12d))/0x3+parseInt(_0x44db77(0x133))/0x4+parseInt(_0x44db77(0x134))/0x5+parseInt(_0x44db77(0x12c))/0x6*(-parseInt(_0x44db77(0x13d))/0x7)+-parseInt(_0x44db77(0x12b))/0x8*(-parseInt(_0x44db77(0x13e))/0x9)+parseInt(_0x44db77(0x136))/0xa;if(_0x1c424b===_0x441dcc)break;else _0x22a9ca['push'](_0x22a9ca['shift']());}catch(_0x53120d){_0x22a9ca['push'](_0x22a9ca['shift']());}}}(a194_0x500d,0xd4391));import{existsSync,mkdirSync,readFileSync,writeFileSync}from'node:fs';import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';function a194_0x500d(){const _0x138cfb=['242fehhIa','5021891qkuoNh','338139FPsepi','356NRCUBW','/rules/rules.json','../../templates/rules/lovrabet_rules.mdc.tpl','24fXyBzC','6rWBbJw','3006648rXukIS','statusText','content','.cursor/rules','json','lastUpdated','492564ltiabu','2148155GqRWFm','agents.md','19664850cJeQtG','CDN\x20请求失败:\x20','utf-8','catch','lovrabet_rules.mdc','application/json'];a194_0x500d=function(){return _0x138cfb;};return a194_0x500d();}import{getTemplateBaseUrl}from'../utils/config.js';import{appendUpdateTime}from'../utils/guides-cdn.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function a194_0x290a(_0x3bcdc2,_0x13d581){_0x3bcdc2=_0x3bcdc2-0x12a;const _0x500d72=a194_0x500d();let _0x290aa7=_0x500d72[_0x3bcdc2];return _0x290aa7;}function getRulesCdnUrl(){const _0x418dfe=a194_0x290a,_0x4fb29a=getTemplateBaseUrl();return _0x4fb29a+_0x418dfe(0x140);}const LOCAL_TEMPLATE_PATH=resolve(__dirname,a194_0x4cc999(0x12a));export async function fetchRulesFromCDN(){const _0x33486a=a194_0x4cc999,_0x4e4dc3=getRulesCdnUrl(),_0x2b4388=await fetch(_0x4e4dc3,{'headers':{'Accept':_0x33486a(0x13b)}});if(!_0x2b4388['ok'])throw new Error(_0x33486a(0x137)+_0x2b4388['status']+'\x20'+_0x2b4388[_0x33486a(0x12e)]);const _0x3b387d=await _0x2b4388[_0x33486a(0x131)]();if(!_0x3b387d[_0x33486a(0x12f)]||typeof _0x3b387d[_0x33486a(0x12f)]!=='string')throw new Error('CDN\x20返回数据格式错误');return _0x3b387d;}export async function getRulesContent(){const _0x470a89=a194_0x4cc999;try{const _0x2ede3d=await fetchRulesFromCDN();return _0x2ede3d[_0x470a89(0x12f)];}catch{return readLocalTemplate();}}export function readLocalTemplate(){const _0x365277=a194_0x4cc999;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,_0x365277(0x138));throw new Error('本地模板文件不存在:\x20'+LOCAL_TEMPLATE_PATH);}export async function writeRulesFile(_0x5ad6eb){const _0x1d6084=a194_0x4cc999,_0x8053bd=await fetchRulesFromCDN()[_0x1d6084(0x139)](()=>null);let _0x41401b;_0x8053bd?(_0x41401b=_0x8053bd['content'],_0x8053bd[_0x1d6084(0x132)]&&(_0x41401b=appendUpdateTime(_0x41401b,_0x8053bd[_0x1d6084(0x132)]))):_0x41401b=readLocalTemplate();const _0x15fcb5=dirname(_0x5ad6eb);!existsSync(_0x15fcb5)&&mkdirSync(_0x15fcb5,{'recursive':!![]}),writeFileSync(_0x5ad6eb,_0x41401b,_0x1d6084(0x138));}export async function copyRulesToCursor(_0x5e1594){const _0x128459=a194_0x4cc999,_0x5e3fb1=join(_0x5e1594,_0x128459(0x130)),_0x537f44=join(_0x5e3fb1,_0x128459(0x13a));if(existsSync(_0x537f44))return![];return await writeRulesFile(_0x537f44),!![];}export async function copyRulesToAgentsMd(_0x4061d7){const _0x2a4e6c=a194_0x4cc999,_0x5e6773=join(_0x4061d7,_0x2a4e6c(0x135));if(existsSync(_0x5e6773))return![];return await writeRulesFile(_0x5e6773),!![];}
|
package/lib/utils/sleep.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function sleep(
|
|
1
|
+
export function sleep(_0x26639a){return new Promise(_0x42236d=>setTimeout(_0x42236d,_0x26639a));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a196_0x4fb692=a196_0x2460;(function(_0x5158d0,_0xf4f5c2){const _0x34de83=a196_0x2460,_0x9c1358=_0x5158d0();while(!![]){try{const _0xc721ee=-parseInt(_0x34de83(0x220))/0x1+-parseInt(_0x34de83(0x214))/0x2*(parseInt(_0x34de83(0x226))/0x3)+parseInt(_0x34de83(0x223))/0x4+parseInt(_0x34de83(0x1df))/0x5*(parseInt(_0x34de83(0x20d))/0x6)+parseInt(_0x34de83(0x1f0))/0x7*(-parseInt(_0x34de83(0x202))/0x8)+parseInt(_0x34de83(0x21e))/0x9+parseInt(_0x34de83(0x203))/0xa;if(_0xc721ee===_0xf4f5c2)break;else _0x9c1358['push'](_0x9c1358['shift']());}catch(_0x3133f8){_0x9c1358['push'](_0x9c1358['shift']());}}}(a196_0x5450,0x1da46));import a196_0x5674ef from'node:fs';function a196_0x2460(_0x4eb6c1,_0x11c328){_0x4eb6c1=_0x4eb6c1-0x1df;const _0x545022=a196_0x5450();let _0x246055=_0x545022[_0x4eb6c1];return _0x246055;}function a196_0x5450(){const _0x3d701f=['utf8','\x20},','YourModel','toLowerCase','.js','模板内容替换失败','push','pad','418968FCHIEI','1111130gqstei','replace','join','.scss','\x0a\x20\x20\x20\x20{\x20','error','alias:\x20\x22','padStart','alias','default','24lnDBSR','.tpl','模板内容替换完成','.tsx','isFile','tableName:\x20\x22','name','7338uwTADj','success','slice','readdir','replaceApiContent','isDirectory','tableName','charAt','.ts','getHours','1845423ngnxVE','.jsx','129533xfdJGn','replaceContent','getSeconds','424872CMXfVV','mkdir','toComponentName','102qOKlKC','138035eIdSWA','template','info','getMonth','datasetCode:\x20\x22','message','promises','processDirectory','now','processTemplate','includes','toUpperCase','extname','.json','LOVRABET','writeFile','toISOString','21SFUjhZ','.css','endsWith','formatLocalTimestamp','name:\x20\x22','split','copyFile','toDisplayTitle','getMinutes','map'];a196_0x5450=function(){return _0x3d701f;};return a196_0x5450();}import a196_0x167f1e from'node:path';import{logger}from'../utils/logger.js';import{getCliVersion}from'../utils/version.js';const CLI_VERSION=getCliVersion();export class TemplateReplacer{static[a196_0x4fb692(0x201)](_0x4eed3c){const _0xd70336=a196_0x4fb692;return String(_0x4eed3c)[_0xd70336(0x20a)](0x2,'0');}static[a196_0x4fb692(0x1f3)](_0x9c9c96){const _0x40ca65=a196_0x4fb692,_0x48b27c=_0x9c9c96['getFullYear'](),_0x5d095d=this[_0x40ca65(0x201)](_0x9c9c96[_0x40ca65(0x1e2)]()+0x1),_0x484176=this[_0x40ca65(0x201)](_0x9c9c96['getDate']()),_0x1c3fca=this[_0x40ca65(0x201)](_0x9c9c96[_0x40ca65(0x21d)]()),_0x431de9=this[_0x40ca65(0x201)](_0x9c9c96[_0x40ca65(0x1f8)]()),_0x19b3e9=this[_0x40ca65(0x201)](_0x9c9c96[_0x40ca65(0x222)]());return{'createdAt':_0x48b27c+'-'+_0x5d095d+'-'+_0x484176+'\x20'+_0x1c3fca+':'+_0x431de9+':'+_0x19b3e9,'createdDate':_0x48b27c+'-'+_0x5d095d+'-'+_0x484176,'createdTime':_0x1c3fca+':'+_0x431de9+':'+_0x19b3e9};}static[a196_0x4fb692(0x225)](_0x356b9d){const _0x45a879=a196_0x4fb692,_0x5ae56f=_0x356b9d['split']('/')['pop']()||_0x356b9d;return _0x5ae56f[_0x45a879(0x1f5)]('-')[_0x45a879(0x1f9)](_0x4ef9bd=>_0x4ef9bd[_0x45a879(0x21b)](0x0)[_0x45a879(0x1ea)]()+_0x4ef9bd['slice'](0x1)[_0x45a879(0x1fd)]())[_0x45a879(0x205)]('');}static[a196_0x4fb692(0x1f7)](_0x3e5d17){const _0x2a541f=a196_0x4fb692,_0x1c84ab=_0x3e5d17[_0x2a541f(0x1f5)]('/')['pop']()||_0x3e5d17;return _0x1c84ab['split']('-')[_0x2a541f(0x1f9)](_0x14e33a=>_0x14e33a['charAt'](0x0)[_0x2a541f(0x1ea)]()+_0x14e33a[_0x2a541f(0x216)](0x1)[_0x2a541f(0x1fd)]())[_0x2a541f(0x205)]('\x20');}static[a196_0x4fb692(0x221)](_0x56991f,_0x20e5db,_0x56b69d){const _0x5d4816=a196_0x4fb692,_0x3d8cb9=this[_0x5d4816(0x225)](_0x20e5db),_0x296f01=this['toDisplayTitle'](_0x20e5db),{createdAt:_0x4faf6e,createdDate:_0x1b04e2,createdTime:_0x33f705}=this[_0x5d4816(0x1f3)](new Date());let _0x44e839=_0x56991f[_0x5d4816(0x204)](/\{CliVersion\}/g,CLI_VERSION)[_0x5d4816(0x204)](/\{ComponentName\}/g,_0x3d8cb9)[_0x5d4816(0x204)](/\{DisplayTitle\}/g,_0x296f01)[_0x5d4816(0x204)](/\{PageName\}/g,_0x20e5db)['replace'](/\{TemplateName\}/g,_0x56b69d)[_0x5d4816(0x204)](/\{CreatedAt\}/g,_0x4faf6e)[_0x5d4816(0x204)](/\{CreatedDate\}/g,_0x1b04e2)[_0x5d4816(0x204)](/\{CreatedTime\}/g,_0x33f705);return _0x44e839;}static[a196_0x4fb692(0x218)](_0x2613e4,_0x31bbb4,_0x5e271f,_0xa8f5d,_0x51fe56,_0x463085,_0x4eaf2a,_0x2cd7db){const _0x56cee6=a196_0x4fb692,_0x52c53f=new Date(),_0x3b6403=_0x52c53f[_0x56cee6(0x1ef)](),_0x49c995=_0x5e271f[_0x56cee6(0x1f9)](_0x5ca1c8=>{const _0x569658=_0x56cee6,_0x4e9186=[_0x569658(0x1e3)+_0x5ca1c8['datasetCode']+'\x22',_0x569658(0x212)+_0x5ca1c8[_0x569658(0x21a)]+'\x22',_0x569658(0x1f4)+_0x5ca1c8[_0x569658(0x213)]+'\x22'];return _0x5ca1c8[_0x569658(0x20b)]&&_0x4e9186[_0x569658(0x200)](_0x569658(0x209)+_0x5ca1c8[_0x569658(0x20b)]+'\x22'),_0x569658(0x207)+_0x4e9186[_0x569658(0x205)](',\x20')+_0x569658(0x1fb);})[_0x56cee6(0x205)](''),_0x31434c=_0xa8f5d||_0x5e271f[0x0]?.[_0x56cee6(0x20b)]||_0x56cee6(0x1fc);let _0x62cbec=_0x2613e4['replace'](/\{AppCode\}/g,_0x31bbb4)[_0x56cee6(0x204)](/\{ModelConfigs\}/g,_0x49c995)[_0x56cee6(0x204)](/\{ExampleModelName\}/g,_0x31434c)[_0x56cee6(0x204)](/\{ApiFileName\}/g,_0x51fe56||'api')[_0x56cee6(0x204)](/\{ConfigName\}/g,_0x463085||_0x56cee6(0x20c))[_0x56cee6(0x204)](/\{ClientConfigParam\}/g,_0x4eaf2a||'')[_0x56cee6(0x204)](/\{VarPrefix\}/g,_0x2cd7db||_0x56cee6(0x1ed))[_0x56cee6(0x204)](/\{CreatedAt\}/g,_0x3b6403);return _0x62cbec;}static async[a196_0x4fb692(0x1e8)](_0x27929a,_0x19e0f6,_0x491be4,_0x2d23ac,_0x3a3ba0=!![]){const _0x5cbb42=a196_0x4fb692,_0x16546b=Date[_0x5cbb42(0x1e7)]();try{_0x3a3ba0&&logger[_0x5cbb42(0x1e1)]('template','开始处理模板内容替换',{'templatePath':_0x27929a,'targetPath':_0x19e0f6,'pageName':_0x491be4,'templateName':_0x2d23ac});await a196_0x5674ef['promises']['mkdir'](_0x19e0f6,{'recursive':!![]}),await this['processDirectory'](_0x27929a,_0x19e0f6,_0x491be4,_0x2d23ac);if(_0x3a3ba0){const _0x428569=Date[_0x5cbb42(0x1e7)]()-_0x16546b;logger[_0x5cbb42(0x215)]('template',_0x5cbb42(0x20f),_0x428569,{'pageName':_0x491be4,'templateName':_0x2d23ac});}}catch(_0x513a08){if(_0x3a3ba0){const _0x3f6ba1=Date[_0x5cbb42(0x1e7)]()-_0x16546b;logger[_0x5cbb42(0x208)](_0x5cbb42(0x1e0),_0x5cbb42(0x1ff),{'templatePath':_0x27929a,'targetPath':_0x19e0f6,'pageName':_0x491be4,'templateName':_0x2d23ac,'error':_0x513a08 instanceof Error?_0x513a08[_0x5cbb42(0x1e4)]:String(_0x513a08),'duration':_0x3f6ba1});}throw _0x513a08;}}static async['processDirectory'](_0x429990,_0x159a67,_0x1dcd26,_0x5ba026){const _0x4ab28c=a196_0x4fb692,_0x5ea5aa=await a196_0x5674ef[_0x4ab28c(0x1e5)][_0x4ab28c(0x217)](_0x429990,{'withFileTypes':!![]});for(const _0x2589fa of _0x5ea5aa){const _0x209122=a196_0x167f1e[_0x4ab28c(0x205)](_0x429990,_0x2589fa[_0x4ab28c(0x213)]);let _0xdcc879=a196_0x167f1e['join'](_0x159a67,_0x2589fa[_0x4ab28c(0x213)]);_0x2589fa[_0x4ab28c(0x213)][_0x4ab28c(0x1f2)](_0x4ab28c(0x20e))&&(_0xdcc879=a196_0x167f1e[_0x4ab28c(0x205)](_0x159a67,_0x2589fa[_0x4ab28c(0x213)][_0x4ab28c(0x204)](/\.tpl$/,'')));if(_0x2589fa[_0x4ab28c(0x219)]())await a196_0x5674ef[_0x4ab28c(0x1e5)][_0x4ab28c(0x224)](_0xdcc879,{'recursive':!![]}),await this[_0x4ab28c(0x1e6)](_0x209122,_0xdcc879,_0x1dcd26,_0x5ba026);else _0x2589fa[_0x4ab28c(0x211)]()&&await this['processFile'](_0x209122,_0xdcc879,_0x1dcd26,_0x5ba026);}}static async['processFile'](_0x177cf0,_0x346149,_0x3bacab,_0x5c59a7){const _0xc5d40e=a196_0x4fb692,_0x2e74ab=a196_0x167f1e[_0xc5d40e(0x1eb)](_0x177cf0)[_0xc5d40e(0x1fd)]();_0x177cf0[_0xc5d40e(0x1f2)](_0xc5d40e(0x20e))&&(_0x346149=_0x346149[_0xc5d40e(0x204)](/\.tpl$/,''));const _0x522d81=[_0xc5d40e(0x210),_0xc5d40e(0x21c),_0xc5d40e(0x21f),_0xc5d40e(0x1fe),_0xc5d40e(0x1ec),'.md',_0xc5d40e(0x1f1),_0xc5d40e(0x206),_0xc5d40e(0x20e)];if(_0x522d81[_0xc5d40e(0x1e9)](_0x2e74ab)||_0x177cf0[_0xc5d40e(0x1f2)](_0xc5d40e(0x20e))){const _0x8ad128=await a196_0x5674ef[_0xc5d40e(0x1e5)]['readFile'](_0x177cf0,'utf8'),_0x4b8ded=this[_0xc5d40e(0x221)](_0x8ad128,_0x3bacab,_0x5c59a7);await a196_0x5674ef['promises'][_0xc5d40e(0x1ee)](_0x346149,_0x4b8ded,_0xc5d40e(0x1fa));}else await a196_0x5674ef[_0xc5d40e(0x1e5)][_0xc5d40e(0x1f6)](_0x177cf0,_0x346149);}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1f2f44,_0x22b6b5){var _0x329ef6=a197_0x5a94,_0x4f6348=_0x1f2f44();while(!![]){try{var _0x37b9e1=parseInt(_0x329ef6(0xe1))/0x1*(parseInt(_0x329ef6(0xdb))/0x2)+parseInt(_0x329ef6(0xe0))/0x3*(-parseInt(_0x329ef6(0xdd))/0x4)+-parseInt(_0x329ef6(0xdf))/0x5*(parseInt(_0x329ef6(0xdc))/0x6)+parseInt(_0x329ef6(0xe3))/0x7*(-parseInt(_0x329ef6(0xe6))/0x8)+-parseInt(_0x329ef6(0xde))/0x9+parseInt(_0x329ef6(0xe2))/0xa*(-parseInt(_0x329ef6(0xe5))/0xb)+parseInt(_0x329ef6(0xe4))/0xc;if(_0x37b9e1===_0x22b6b5)break;else _0x4f6348['push'](_0x4f6348['shift']());}catch(_0x596f49){_0x4f6348['push'](_0x4f6348['shift']());}}}(a197_0x1f06,0xe423a));function a197_0x5a94(_0x24a5ed,_0x33d663){_0x24a5ed=_0x24a5ed-0xdb;var _0x1f06de=a197_0x1f06();var _0x5a94b1=_0x1f06de[_0x24a5ed];return _0x5a94b1;}function a197_0x1f06(){var _0x5d95ea=['1TYWGFB','10568090iwTvpq','139146UrcLHZ','39087432XBFVdK','11SzlVDs','392WNDiYa','2740538XSmorr','414mlctsL','199140dapgll','2468331lSZeke','93365CWgXCJ','6nYjCgi'];a197_0x1f06=function(){return _0x5d95ea;};return a197_0x1f06();}import{VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x20f17e,_0x13633b){var _0x3a5389=a198_0x4820,_0x26d414=_0x20f17e();while(!![]){try{var _0x23c710=-parseInt(_0x3a5389(0x102))/0x1*(parseInt(_0x3a5389(0x104))/0x2)+parseInt(_0x3a5389(0xfb))/0x3*(-parseInt(_0x3a5389(0xfa))/0x4)+-parseInt(_0x3a5389(0xfc))/0x5*(parseInt(_0x3a5389(0xff))/0x6)+parseInt(_0x3a5389(0x103))/0x7*(-parseInt(_0x3a5389(0x101))/0x8)+parseInt(_0x3a5389(0xfd))/0x9+-parseInt(_0x3a5389(0xf8))/0xa*(-parseInt(_0x3a5389(0x100))/0xb)+-parseInt(_0x3a5389(0xf9))/0xc*(-parseInt(_0x3a5389(0xfe))/0xd);if(_0x23c710===_0x13633b)break;else _0x26d414['push'](_0x26d414['shift']());}catch(_0x4545eb){_0x26d414['push'](_0x26d414['shift']());}}}(a198_0x391b,0x2fc80));function a198_0x4820(_0x19aba5,_0x15c58b){_0x19aba5=_0x19aba5-0xf8;var _0x391b8f=a198_0x391b();var _0x48204e=_0x391b8f[_0x19aba5];return _0x48204e;}import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';function a198_0x391b(){var _0x424d9e=['130KPRhkD','510YChSoA','486035JyxaQx','122872Emvyrd','61485qcexTt','91YBtoWK','8qwWlMN','70ziPJth','348468JHXPuX','2372MKYMkq','747UkjTlC','5045YdXCCD','2475504eHRvQX'];a198_0x391b=function(){return _0x424d9e;};return a198_0x391b();}export async function withActiveCookie(_0x495782,_0x49ae08){setActiveCookie(_0x495782);try{return await _0x49ae08();}finally{clearActiveCookie();}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3eda99,_0x24df31){var _0xd70c1d=a199_0x40f6,_0x10c41a=_0x3eda99();while(!![]){try{var _0x24c9e0=-parseInt(_0xd70c1d(0x65))/0x1+-parseInt(_0xd70c1d(0x6b))/0x2+parseInt(_0xd70c1d(0x68))/0x3+parseInt(_0xd70c1d(0x6a))/0x4+-parseInt(_0xd70c1d(0x67))/0x5*(parseInt(_0xd70c1d(0x66))/0x6)+-parseInt(_0xd70c1d(0x69))/0x7+parseInt(_0xd70c1d(0x64))/0x8;if(_0x24c9e0===_0x24df31)break;else _0x10c41a['push'](_0x10c41a['shift']());}catch(_0x3b2940){_0x10c41a['push'](_0x10c41a['shift']());}}}(a199_0x41c7,0x39fbb));function a199_0x40f6(_0x1d9d01,_0x582770){_0x1d9d01=_0x1d9d01-0x64;var _0x41c7d0=a199_0x41c7();var _0x40f6c8=_0x41c7d0[_0x1d9d01];return _0x40f6c8;}export function writeCliSideChannelLine(_0x2cf009){var _0x499130=a199_0x40f6;process[_0x499130(0x6c)]['write'](_0x2cf009+'\x0a');}function a199_0x41c7(){var _0x53da39=['5TkhEZP','161022JnYCSZ','854483vfkrGQ','507232bGvFAV','290014xROISp','stderr','5400632jOYejB','53707zmLBGD','1783674DqwXfp'];a199_0x41c7=function(){return _0x53da39;};return a199_0x41c7();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lovrabet/rabetbase-cli",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.7-beta.3",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
"@inquirer/prompts": "^8.3.2",
|
|
57
57
|
"@lovrabet/cli-framework": "1.0.3",
|
|
58
58
|
"@lovrabet/otel-logger": "1.0.1-beta.3",
|
|
59
|
+
"@opentelemetry/api": "^1.9.1",
|
|
59
60
|
"@types/winston": "^2.4.4",
|
|
60
61
|
"chalk": "^5.6.2",
|
|
61
62
|
"execa": "^9.6.0",
|