@lovrabet/rabetbase-cli 2.1.12 → 2.1.14-beta.0
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/dataset/rename.js +1 -0
- 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 a196_0x594715=a196_0x53a0;function a196_0x53a0(_0x57ca7e,_0xdd681c){_0x57ca7e=_0x57ca7e-0x11f;const _0x50321f=a196_0x5032();let _0x53a09d=_0x50321f[_0x57ca7e];return _0x53a09d;}(function(_0x440a21,_0x2502d8){const _0x2d1bc4=a196_0x53a0,_0x4f8b14=_0x440a21();while(!![]){try{const _0x2b0ce0=-parseInt(_0x2d1bc4(0x123))/0x1*(-parseInt(_0x2d1bc4(0x14f))/0x2)+-parseInt(_0x2d1bc4(0x155))/0x3*(parseInt(_0x2d1bc4(0x149))/0x4)+-parseInt(_0x2d1bc4(0x14d))/0x5*(parseInt(_0x2d1bc4(0x153))/0x6)+parseInt(_0x2d1bc4(0x12b))/0x7*(parseInt(_0x2d1bc4(0x157))/0x8)+parseInt(_0x2d1bc4(0x13c))/0x9+-parseInt(_0x2d1bc4(0x135))/0xa+parseInt(_0x2d1bc4(0x13a))/0xb;if(_0x2b0ce0===_0x2502d8)break;else _0x4f8b14['push'](_0x4f8b14['shift']());}catch(_0x5b578d){_0x4f8b14['push'](_0x4f8b14['shift']());}}}(a196_0x5032,0x2e2ad));import a196_0x12b4c3 from'winston';import a196_0x595078 from'node:fs';function a196_0x5032(){const _0x1c64a9=['File','stringify','unknown','Failed\x20to\x20read\x20logs:','2468530eaVWPO','writeFileSync','duration','message','command','2121119fffBMw','readLogs','125964xXKrax','error','combine','parse','red','trim','logFilePath','blue','currentRawCommand','now','success','yellow','winstonLogger','15492fVNRvu','map','errors','printf','355lcRzgI','format','30SDmWgO','createLogger','getWinstonInstance','dirname','2994RxGNkJ','.lovrabet.log','3xwBMoT','clearLogs','24XcSfMj','utf8','开始执行:\x20','info','addColors','1103QTvhsD','readFileSync','join','green','warn','split','timestamp','initWinstonLogger','587734fqMOOG','existsSync','rawCommand','setLogPath','clear','details'];a196_0x5032=function(){return _0x1c64a9;};return a196_0x5032();}import a196_0x32fd93 from'node:path';class Logger{['winstonLogger'];[a196_0x594715(0x142)];[a196_0x594715(0x144)]='';constructor(){const _0x301e41=a196_0x594715;this[_0x301e41(0x142)]='';}['setRawCommand'](_0x700b50){const _0x3deeca=a196_0x594715;this[_0x3deeca(0x144)]=_0x700b50;}['initWinstonLogger'](){const _0x12b3a9=a196_0x594715,_0x2b8146=a196_0x32fd93[_0x12b3a9(0x152)](this['logFilePath']);!a196_0x595078[_0x12b3a9(0x12c)](_0x2b8146)&&a196_0x595078['mkdirSync'](_0x2b8146,{'recursive':!![]});const _0x3729d9=a196_0x12b4c3[_0x12b3a9(0x14e)][_0x12b3a9(0x13e)](a196_0x12b4c3[_0x12b3a9(0x14e)][_0x12b3a9(0x129)](),a196_0x12b4c3[_0x12b3a9(0x14e)][_0x12b3a9(0x14b)]({'stack':!![]}),a196_0x12b4c3[_0x12b3a9(0x14e)][_0x12b3a9(0x14c)](_0x174195=>{const _0x85cc02=_0x12b3a9,_0x14dc56={'timestamp':_0x174195[_0x85cc02(0x129)]||new Date()['toISOString'](),'level':_0x174195['level']||_0x85cc02(0x121),'command':_0x174195[_0x85cc02(0x139)]||_0x85cc02(0x133),'rawCommand':_0x174195[_0x85cc02(0x12d)]||this[_0x85cc02(0x144)]||undefined,'message':_0x174195[_0x85cc02(0x138)]||'','duration':_0x174195[_0x85cc02(0x137)]||undefined,'details':_0x174195[_0x85cc02(0x130)]||undefined};return JSON[_0x85cc02(0x132)](_0x14dc56);}));this[_0x12b3a9(0x148)]=a196_0x12b4c3[_0x12b3a9(0x150)]({'level':_0x12b3a9(0x121),'format':_0x3729d9,'transports':[new a196_0x12b4c3['transports'][(_0x12b3a9(0x131))]({'filename':this[_0x12b3a9(0x142)],'level':_0x12b3a9(0x121)})],'silent':![]}),a196_0x12b4c3[_0x12b3a9(0x122)]({'success':_0x12b3a9(0x126),'error':_0x12b3a9(0x140),'warn':_0x12b3a9(0x147),'info':_0x12b3a9(0x143)});}[a196_0x594715(0x12e)](_0x572b70){const _0x5ee679=a196_0x594715;this['logFilePath']=a196_0x32fd93[_0x5ee679(0x125)](_0x572b70,_0x5ee679(0x154)),this['winstonLogger']&&this[_0x5ee679(0x148)][_0x5ee679(0x12f)](),this[_0x5ee679(0x12a)]();}[a196_0x594715(0x121)](_0x195e74,_0x7418f2,_0x4805fc){const _0xe070a0=a196_0x594715;if(!this[_0xe070a0(0x142)]||!this[_0xe070a0(0x148)])return;this[_0xe070a0(0x148)][_0xe070a0(0x121)](_0x7418f2,{'command':_0x195e74,'details':_0x4805fc});}[a196_0x594715(0x146)](_0x3228c8,_0x277088,_0x16f934,_0x1a2227){const _0x399168=a196_0x594715;if(!this['logFilePath']||!this[_0x399168(0x148)])return;this[_0x399168(0x148)]['log'](_0x399168(0x121),_0x277088,{'level':'success','command':_0x3228c8,'duration':_0x16f934,'details':_0x1a2227});}[a196_0x594715(0x13d)](_0x359fcc,_0x4f50e0,_0x3893b0){const _0x1680de=a196_0x594715;if(!this['logFilePath']||!this[_0x1680de(0x148)])return;this['winstonLogger'][_0x1680de(0x13d)](_0x4f50e0,{'command':_0x359fcc,'details':_0x3893b0});}[a196_0x594715(0x127)](_0x23203b,_0x1f1e05,_0x353b32){const _0x115fc4=a196_0x594715;if(!this[_0x115fc4(0x142)]||!this[_0x115fc4(0x148)])return;this['winstonLogger']['warn'](_0x1f1e05,{'command':_0x23203b,'details':_0x353b32});}async['logTask'](_0xad03be,_0x2b60c3,_0x121ce9){const _0x31ae73=a196_0x594715,_0x4cf30d=Date[_0x31ae73(0x145)]();this[_0x31ae73(0x121)](_0xad03be,_0x31ae73(0x120)+_0x2b60c3);try{const _0x7d22ef=await _0x121ce9(),_0x52ea86=Date['now']()-_0x4cf30d;return this['success'](_0xad03be,'完成:\x20'+_0x2b60c3,_0x52ea86),_0x7d22ef;}catch(_0x20cd8c){const _0x37fd2a=Date[_0x31ae73(0x145)]()-_0x4cf30d;this[_0x31ae73(0x13d)](_0xad03be,'失败:\x20'+_0x2b60c3,{'error':_0x20cd8c instanceof Error?_0x20cd8c['message']:String(_0x20cd8c),'duration':_0x37fd2a});throw _0x20cd8c;}}[a196_0x594715(0x13b)](){const _0x559fcc=a196_0x594715;try{if(!a196_0x595078[_0x559fcc(0x12c)](this[_0x559fcc(0x142)]))return[];const _0xacd311=a196_0x595078[_0x559fcc(0x124)](this['logFilePath'],_0x559fcc(0x11f));return _0xacd311[_0x559fcc(0x128)]('\x0a')['filter'](_0x1e1164=>_0x1e1164[_0x559fcc(0x141)]())[_0x559fcc(0x14a)](_0x366a65=>JSON[_0x559fcc(0x13f)](_0x366a65));}catch(_0x3fa30b){return console[_0x559fcc(0x127)](_0x559fcc(0x134),_0x3fa30b),[];}}[a196_0x594715(0x156)](){const _0x5d3f33=a196_0x594715;try{a196_0x595078['existsSync'](this[_0x5d3f33(0x142)])&&a196_0x595078[_0x5d3f33(0x136)](this[_0x5d3f33(0x142)],'','utf8');}catch(_0x254693){console[_0x5d3f33(0x127)]('Failed\x20to\x20clear\x20logs:',_0x254693);}}[a196_0x594715(0x151)](){const _0xcff104=a196_0x594715;return this[_0xcff104(0x148)];}}export const logger=new Logger();
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a197_0x494d(_0x509dc2,_0x86e061){_0x509dc2=_0x509dc2-0x8d;const _0x1b2ff8=a197_0x1b2f();let _0x494dfa=_0x1b2ff8[_0x509dc2];return _0x494dfa;}(function(_0x590bf6,_0x3d93d9){const _0x148eb5=a197_0x494d,_0x139bd7=_0x590bf6();while(!![]){try{const _0x45b5b4=parseInt(_0x148eb5(0x98))/0x1+parseInt(_0x148eb5(0x96))/0x2+-parseInt(_0x148eb5(0x8f))/0x3+parseInt(_0x148eb5(0x97))/0x4*(-parseInt(_0x148eb5(0x8d))/0x5)+parseInt(_0x148eb5(0x99))/0x6+-parseInt(_0x148eb5(0x95))/0x7+-parseInt(_0x148eb5(0x93))/0x8;if(_0x45b5b4===_0x3d93d9)break;else _0x139bd7['push'](_0x139bd7['shift']());}catch(_0x133038){_0x139bd7['push'](_0x139bd7['shift']());}}}(a197_0x1b2f,0xe5650));function a197_0x1b2f(){const _0x327109=['object','392574sQImdJ','validation','Invalid\x20JSON\x20for\x20--params:\x20','parse','15662472oNjRnD','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','10107923THNseC','3644502WKIeuB','13044VbzWBA','1786813VaVuKU','10481538AcIVGU','1355eWuNlY'];a197_0x1b2f=function(){return _0x327109;};return a197_0x1b2f();}import{CliErrors}from'../errors.js';export function parseJsonParams(_0x2aa28e){const _0x4a1f70=a197_0x494d;if(!_0x2aa28e)return undefined;let _0x2c22cd;try{_0x2c22cd=JSON[_0x4a1f70(0x92)](_0x2aa28e);}catch{throw CliErrors[_0x4a1f70(0x90)](_0x4a1f70(0x91)+_0x2aa28e);}if(!_0x2c22cd||typeof _0x2c22cd!==_0x4a1f70(0x8e)||Array['isArray'](_0x2c22cd))throw CliErrors['validation']('--params\x20must\x20be\x20a\x20JSON\x20object',_0x4a1f70(0x94));return _0x2c22cd;}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a198_0x4136e0=a198_0x12b9;function a198_0x2369(){const _0x5d1314=['1144644TxCjRG','22068IMPoUz','5Xrpjny','610492mQYsxi','136YirnuS','platform','22558ECliSE','3icthFR','410ebVpQz','.cmd','4065754bYqqBz','win32','990835pzPMWY','48398ALcWJz'];a198_0x2369=function(){return _0x5d1314;};return a198_0x2369();}(function(_0x49975b,_0x27e975){const _0x20195e=a198_0x12b9,_0x522085=_0x49975b();while(!![]){try{const _0x33fa68=-parseInt(_0x20195e(0x9f))/0x1*(parseInt(_0x20195e(0xa3))/0x2)+parseInt(_0x20195e(0xa4))/0x3*(-parseInt(_0x20195e(0xa0))/0x4)+-parseInt(_0x20195e(0xa9))/0x5+parseInt(_0x20195e(0x9d))/0x6+parseInt(_0x20195e(0x9c))/0x7*(-parseInt(_0x20195e(0xa1))/0x8)+parseInt(_0x20195e(0x9e))/0x9*(parseInt(_0x20195e(0xa5))/0xa)+parseInt(_0x20195e(0xa7))/0xb;if(_0x33fa68===_0x27e975)break;else _0x522085['push'](_0x522085['shift']());}catch(_0x101fcd){_0x522085['push'](_0x522085['shift']());}}}(a198_0x2369,0x21405));export const isWindows=process[a198_0x4136e0(0xa2)]===a198_0x4136e0(0xa8);function a198_0x12b9(_0x2c6254,_0xc3ae4f){_0x2c6254=_0x2c6254-0x9c;const _0x236902=a198_0x2369();let _0x12b9d7=_0x236902[_0x2c6254];return _0x12b9d7;}export function resolveNpmBin(_0x483554){const _0x227132=a198_0x4136e0;return isWindows?_0x483554+_0x227132(0xa6):_0x483554;}
|
package/lib/utils/rules-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a199_0x5d3850=a199_0x190f;(function(_0x19c04c,_0x2afdee){const _0x4b5854=a199_0x190f,_0x276ec8=_0x19c04c();while(!![]){try{const _0xaa88e8=-parseInt(_0x4b5854(0x196))/0x1*(-parseInt(_0x4b5854(0x19d))/0x2)+-parseInt(_0x4b5854(0x191))/0x3*(parseInt(_0x4b5854(0x199))/0x4)+-parseInt(_0x4b5854(0x195))/0x5+parseInt(_0x4b5854(0x1a0))/0x6+parseInt(_0x4b5854(0x19f))/0x7*(parseInt(_0x4b5854(0x198))/0x8)+-parseInt(_0x4b5854(0x19e))/0x9+parseInt(_0x4b5854(0x19c))/0xa;if(_0xaa88e8===_0x2afdee)break;else _0x276ec8['push'](_0x276ec8['shift']());}catch(_0x76754c){_0x276ec8['push'](_0x276ec8['shift']());}}}(a199_0xce15,0x6b6fb));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 _0x1342dc=a199_0x190f,_0x53ad8e=getTemplateBaseUrl();return _0x53ad8e+_0x1342dc(0x1a5);}const LOCAL_TEMPLATE_PATH=resolve(__dirname,a199_0x5d3850(0x193));export async function fetchRulesFromCDN(){const _0x1f1689=a199_0x5d3850,_0x4115b6=getRulesCdnUrl(),_0x596e62=await fetch(_0x4115b6,{'headers':{'Accept':_0x1f1689(0x190)}});if(!_0x596e62['ok'])throw new Error('CDN\x20请求失败:\x20'+_0x596e62['status']+'\x20'+_0x596e62[_0x1f1689(0x19b)]);const _0x540391=await _0x596e62[_0x1f1689(0x1a3)]();if(!_0x540391[_0x1f1689(0x19a)]||typeof _0x540391['content']!==_0x1f1689(0x197))throw new Error('CDN\x20返回数据格式错误');return _0x540391;}export async function getRulesContent(){const _0x126d0c=a199_0x5d3850;try{const _0xb902dd=await fetchRulesFromCDN();return _0xb902dd[_0x126d0c(0x19a)];}catch{return readLocalTemplate();}}export function readLocalTemplate(){const _0x4c63c1=a199_0x5d3850;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,_0x4c63c1(0x192));throw new Error(_0x4c63c1(0x194)+LOCAL_TEMPLATE_PATH);}function a199_0xce15(){const _0x2f40e3=['483cqqbPG','3150456PTbkqL','catch','lastUpdated','json','agents.md','/rules/rules.json','application/json','37998rsqaMy','utf-8','../../templates/rules/lovrabet_rules.mdc.tpl','本地模板文件不存在:\x20','125195sPHjKu','70135xlpjSO','string','69752QJPPiE','236jYiODZ','content','statusText','187790CRsRMb','10aDRjZJ','2553741tZQuSO'];a199_0xce15=function(){return _0x2f40e3;};return a199_0xce15();}export async function writeRulesFile(_0x59134e){const _0x2d9e28=a199_0x5d3850,_0x4eeedb=await fetchRulesFromCDN()[_0x2d9e28(0x1a1)](()=>null);let _0x2e9f52;_0x4eeedb?(_0x2e9f52=_0x4eeedb[_0x2d9e28(0x19a)],_0x4eeedb[_0x2d9e28(0x1a2)]&&(_0x2e9f52=appendUpdateTime(_0x2e9f52,_0x4eeedb[_0x2d9e28(0x1a2)]))):_0x2e9f52=readLocalTemplate();const _0x143e87=dirname(_0x59134e);!existsSync(_0x143e87)&&mkdirSync(_0x143e87,{'recursive':!![]}),writeFileSync(_0x59134e,_0x2e9f52,_0x2d9e28(0x192));}function a199_0x190f(_0x5452f3,_0x58498d){_0x5452f3=_0x5452f3-0x190;const _0xce152f=a199_0xce15();let _0x190fdd=_0xce152f[_0x5452f3];return _0x190fdd;}export async function copyRulesToCursor(_0x587e66){const _0x55d68a=join(_0x587e66,'.cursor/rules'),_0x1a177a=join(_0x55d68a,'lovrabet_rules.mdc');if(existsSync(_0x1a177a))return![];return await writeRulesFile(_0x1a177a),!![];}export async function copyRulesToAgentsMd(_0x28601d){const _0x38fbbf=a199_0x5d3850,_0x407843=join(_0x28601d,_0x38fbbf(0x1a4));if(existsSync(_0x407843))return![];return await writeRulesFile(_0x407843),!![];}
|
package/lib/utils/sleep.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function sleep(
|
|
1
|
+
export function sleep(_0x4c2c37){return new Promise(_0x2000da=>setTimeout(_0x2000da,_0x4c2c37));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a201_0x2a9f61=a201_0x1511;(function(_0x29b62c,_0x548d68){const _0x531471=a201_0x1511,_0x2f1053=_0x29b62c();while(!![]){try{const _0x1796ae=parseInt(_0x531471(0x15f))/0x1*(parseInt(_0x531471(0x180))/0x2)+parseInt(_0x531471(0x147))/0x3*(-parseInt(_0x531471(0x15a))/0x4)+-parseInt(_0x531471(0x16c))/0x5+parseInt(_0x531471(0x183))/0x6+-parseInt(_0x531471(0x144))/0x7*(parseInt(_0x531471(0x14f))/0x8)+-parseInt(_0x531471(0x164))/0x9+parseInt(_0x531471(0x16e))/0xa;if(_0x1796ae===_0x548d68)break;else _0x2f1053['push'](_0x2f1053['shift']());}catch(_0x26c843){_0x2f1053['push'](_0x2f1053['shift']());}}}(a201_0x504b,0xefe67));import a201_0x59ffe8 from'node:fs';import a201_0x164d17 from'node:path';function a201_0x1511(_0x2388f3,_0x485a17){_0x2388f3=_0x2388f3-0x143;const _0x504b6e=a201_0x504b();let _0x151184=_0x504b6e[_0x2388f3];return _0x151184;}function a201_0x504b(){const _0x56b57c=['模板内容替换失败','writeFile','.css','name','copyFile','pop','getFullYear','.scss','push','182672YTTaPa','template','.js','1791DNcIiR','getMonth','promises','开始处理模板内容替换','getHours','join','toLowerCase','YourModel','360lfYAqz','.tsx','模板内容替换完成','padStart','.tpl','datasetCode','endsWith','LOVRABET','processTemplate','\x0a\x20\x20\x20\x20{\x20','now','5724MqOcJR','.ts','readFile','pad','message','1677642hVyyZu','toUpperCase','extname','mkdir','name:\x20\x22','11368890uYrwIv','processFile','api','isFile','replaceContent','getDate','tableName','alias','9627620jcmJai','.json','42946290nZmBHD','formatLocalTimestamp','.jsx','slice','includes','split','default','isDirectory','datasetCode:\x20\x22','map','toComponentName','\x20},','getSeconds','processDirectory','error','utf8','alias:\x20\x22','replace','2QwxjHG','tableName:\x20\x22','toISOString','1366326QClTuI'];a201_0x504b=function(){return _0x56b57c;};return a201_0x504b();}import{logger}from'../utils/logger.js';import{getCliVersion}from'../utils/version.js';const CLI_VERSION=getCliVersion();export class TemplateReplacer{static[a201_0x2a9f61(0x15d)](_0x36f90b){const _0x3dbb83=a201_0x2a9f61;return String(_0x36f90b)[_0x3dbb83(0x152)](0x2,'0');}static['formatLocalTimestamp'](_0xf1f8a){const _0x47d39f=a201_0x2a9f61,_0x40df6a=_0xf1f8a[_0x47d39f(0x18a)](),_0x6dae13=this[_0x47d39f(0x15d)](_0xf1f8a[_0x47d39f(0x148)]()+0x1),_0x142cdf=this[_0x47d39f(0x15d)](_0xf1f8a[_0x47d39f(0x169)]()),_0x60900e=this['pad'](_0xf1f8a[_0x47d39f(0x14b)]()),_0x461b1b=this[_0x47d39f(0x15d)](_0xf1f8a['getMinutes']()),_0x88b9d6=this[_0x47d39f(0x15d)](_0xf1f8a[_0x47d39f(0x17a)]());return{'createdAt':_0x40df6a+'-'+_0x6dae13+'-'+_0x142cdf+'\x20'+_0x60900e+':'+_0x461b1b+':'+_0x88b9d6,'createdDate':_0x40df6a+'-'+_0x6dae13+'-'+_0x142cdf,'createdTime':_0x60900e+':'+_0x461b1b+':'+_0x88b9d6};}static[a201_0x2a9f61(0x178)](_0x1d3b05){const _0x17a639=a201_0x2a9f61,_0x2f3077=_0x1d3b05[_0x17a639(0x173)]('/')[_0x17a639(0x189)]()||_0x1d3b05;return _0x2f3077['split']('-')[_0x17a639(0x177)](_0x59ce06=>_0x59ce06['charAt'](0x0)[_0x17a639(0x160)]()+_0x59ce06[_0x17a639(0x171)](0x1)['toLowerCase']())['join']('');}static['toDisplayTitle'](_0x382049){const _0x3c9246=a201_0x2a9f61,_0x3d4737=_0x382049['split']('/')[_0x3c9246(0x189)]()||_0x382049;return _0x3d4737[_0x3c9246(0x173)]('-')[_0x3c9246(0x177)](_0x42eda0=>_0x42eda0['charAt'](0x0)[_0x3c9246(0x160)]()+_0x42eda0['slice'](0x1)[_0x3c9246(0x14d)]())[_0x3c9246(0x14c)]('\x20');}static[a201_0x2a9f61(0x168)](_0x19271f,_0x178a77,_0x49b94c){const _0x585dc7=a201_0x2a9f61,_0x1672ab=this['toComponentName'](_0x178a77),_0xbc1d72=this['toDisplayTitle'](_0x178a77),{createdAt:_0x4ab2bd,createdDate:_0x28c9fa,createdTime:_0x48e80a}=this[_0x585dc7(0x16f)](new Date());let _0x1c7a44=_0x19271f[_0x585dc7(0x17f)](/\{CliVersion\}/g,CLI_VERSION)[_0x585dc7(0x17f)](/\{ComponentName\}/g,_0x1672ab)[_0x585dc7(0x17f)](/\{DisplayTitle\}/g,_0xbc1d72)['replace'](/\{PageName\}/g,_0x178a77)[_0x585dc7(0x17f)](/\{TemplateName\}/g,_0x49b94c)[_0x585dc7(0x17f)](/\{CreatedAt\}/g,_0x4ab2bd)['replace'](/\{CreatedDate\}/g,_0x28c9fa)[_0x585dc7(0x17f)](/\{CreatedTime\}/g,_0x48e80a);return _0x1c7a44;}static['replaceApiContent'](_0x1be65a,_0x179bbf,_0x3d70e5,_0x819b50,_0x15069b,_0xa594bb,_0x368fbb,_0x35beba){const _0x26b489=a201_0x2a9f61,_0xa30abc=new Date(),_0x40efa9=_0xa30abc[_0x26b489(0x182)](),_0x7d8907=_0x3d70e5[_0x26b489(0x177)](_0x3de76a=>{const _0x5c25b5=_0x26b489,_0x14fda9=[_0x5c25b5(0x176)+_0x3de76a[_0x5c25b5(0x154)]+'\x22',_0x5c25b5(0x181)+_0x3de76a[_0x5c25b5(0x16a)]+'\x22',_0x5c25b5(0x163)+_0x3de76a[_0x5c25b5(0x187)]+'\x22'];return _0x3de76a['alias']&&_0x14fda9[_0x5c25b5(0x143)](_0x5c25b5(0x17e)+_0x3de76a[_0x5c25b5(0x16b)]+'\x22'),_0x5c25b5(0x158)+_0x14fda9['join'](',\x20')+_0x5c25b5(0x179);})[_0x26b489(0x14c)](''),_0x671edc=_0x819b50||_0x3d70e5[0x0]?.[_0x26b489(0x16b)]||_0x26b489(0x14e);let _0x5a0018=_0x1be65a['replace'](/\{AppCode\}/g,_0x179bbf)[_0x26b489(0x17f)](/\{ModelConfigs\}/g,_0x7d8907)[_0x26b489(0x17f)](/\{ExampleModelName\}/g,_0x671edc)['replace'](/\{ApiFileName\}/g,_0x15069b||_0x26b489(0x166))['replace'](/\{ConfigName\}/g,_0xa594bb||_0x26b489(0x174))[_0x26b489(0x17f)](/\{ClientConfigParam\}/g,_0x368fbb||'')['replace'](/\{VarPrefix\}/g,_0x35beba||_0x26b489(0x156))[_0x26b489(0x17f)](/\{CreatedAt\}/g,_0x40efa9);return _0x5a0018;}static async[a201_0x2a9f61(0x157)](_0x286c31,_0x61af78,_0x4e7ce8,_0x1b24ae,_0x2897ff=!![]){const _0x3aec35=a201_0x2a9f61,_0x5148b9=Date[_0x3aec35(0x159)]();try{_0x2897ff&&logger['info'](_0x3aec35(0x145),_0x3aec35(0x14a),{'templatePath':_0x286c31,'targetPath':_0x61af78,'pageName':_0x4e7ce8,'templateName':_0x1b24ae});await a201_0x59ffe8[_0x3aec35(0x149)][_0x3aec35(0x162)](_0x61af78,{'recursive':!![]}),await this['processDirectory'](_0x286c31,_0x61af78,_0x4e7ce8,_0x1b24ae);if(_0x2897ff){const _0x117b00=Date[_0x3aec35(0x159)]()-_0x5148b9;logger['success']('template',_0x3aec35(0x151),_0x117b00,{'pageName':_0x4e7ce8,'templateName':_0x1b24ae});}}catch(_0x53833f){if(_0x2897ff){const _0x233bc4=Date['now']()-_0x5148b9;logger[_0x3aec35(0x17c)]('template',_0x3aec35(0x184),{'templatePath':_0x286c31,'targetPath':_0x61af78,'pageName':_0x4e7ce8,'templateName':_0x1b24ae,'error':_0x53833f instanceof Error?_0x53833f[_0x3aec35(0x15e)]:String(_0x53833f),'duration':_0x233bc4});}throw _0x53833f;}}static async[a201_0x2a9f61(0x17b)](_0x58fcb0,_0x120e3e,_0x2424ea,_0x586ab0){const _0x3ba21e=a201_0x2a9f61,_0x3a0863=await a201_0x59ffe8['promises']['readdir'](_0x58fcb0,{'withFileTypes':!![]});for(const _0x18050b of _0x3a0863){const _0x20993c=a201_0x164d17[_0x3ba21e(0x14c)](_0x58fcb0,_0x18050b[_0x3ba21e(0x187)]);let _0x319bdd=a201_0x164d17[_0x3ba21e(0x14c)](_0x120e3e,_0x18050b['name']);_0x18050b[_0x3ba21e(0x187)][_0x3ba21e(0x155)](_0x3ba21e(0x153))&&(_0x319bdd=a201_0x164d17[_0x3ba21e(0x14c)](_0x120e3e,_0x18050b[_0x3ba21e(0x187)]['replace'](/\.tpl$/,'')));if(_0x18050b[_0x3ba21e(0x175)]())await a201_0x59ffe8['promises'][_0x3ba21e(0x162)](_0x319bdd,{'recursive':!![]}),await this[_0x3ba21e(0x17b)](_0x20993c,_0x319bdd,_0x2424ea,_0x586ab0);else _0x18050b[_0x3ba21e(0x167)]()&&await this[_0x3ba21e(0x165)](_0x20993c,_0x319bdd,_0x2424ea,_0x586ab0);}}static async[a201_0x2a9f61(0x165)](_0x5e6297,_0x4c8b92,_0x21ef3d,_0x34968e){const _0x563a4c=a201_0x2a9f61,_0x5b147b=a201_0x164d17[_0x563a4c(0x161)](_0x5e6297)[_0x563a4c(0x14d)]();_0x5e6297[_0x563a4c(0x155)](_0x563a4c(0x153))&&(_0x4c8b92=_0x4c8b92['replace'](/\.tpl$/,''));const _0x3cf00f=[_0x563a4c(0x150),_0x563a4c(0x15b),_0x563a4c(0x170),_0x563a4c(0x146),_0x563a4c(0x16d),'.md',_0x563a4c(0x186),_0x563a4c(0x18b),_0x563a4c(0x153)];if(_0x3cf00f[_0x563a4c(0x172)](_0x5b147b)||_0x5e6297['endsWith'](_0x563a4c(0x153))){const _0x50835f=await a201_0x59ffe8[_0x563a4c(0x149)][_0x563a4c(0x15c)](_0x5e6297,_0x563a4c(0x17d)),_0x1330b3=this['replaceContent'](_0x50835f,_0x21ef3d,_0x34968e);await a201_0x59ffe8['promises'][_0x563a4c(0x185)](_0x4c8b92,_0x1330b3,_0x563a4c(0x17d));}else await a201_0x59ffe8[_0x563a4c(0x149)][_0x563a4c(0x188)](_0x5e6297,_0x4c8b92);}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a202_0x2896(){var _0x21e51e=['988630hlbwBd','84YNNnJe','21796hHDVmJ','1FjobdN','10199pnpStv','41404zgznGZ','3387168LCdvWc','804140VWluBX','3432EZhsvp','192490BboQxw','606UxgdsQ','9ZnCLho'];a202_0x2896=function(){return _0x21e51e;};return a202_0x2896();}(function(_0xe03afe,_0xb53689){var _0x3979f5=a202_0x2774,_0x3d312c=_0xe03afe();while(!![]){try{var _0x423aee=-parseInt(_0x3979f5(0x1da))/0x1*(-parseInt(_0x3979f5(0x1e3))/0x2)+parseInt(_0x3979f5(0x1e4))/0x3*(parseInt(_0x3979f5(0x1d9))/0x4)+parseInt(_0x3979f5(0x1de))/0x5+-parseInt(_0x3979f5(0x1e1))/0x6*(-parseInt(_0x3979f5(0x1db))/0x7)+parseInt(_0x3979f5(0x1dd))/0x8+-parseInt(_0x3979f5(0x1e2))/0x9*(-parseInt(_0x3979f5(0x1e0))/0xa)+-parseInt(_0x3979f5(0x1dc))/0xb*(parseInt(_0x3979f5(0x1df))/0xc);if(_0x423aee===_0xb53689)break;else _0x3d312c['push'](_0x3d312c['shift']());}catch(_0x1011a9){_0x3d312c['push'](_0x3d312c['shift']());}}}(a202_0x2896,0x4e5f5));function a202_0x2774(_0x579e4b,_0x2a14a8){_0x579e4b=_0x579e4b-0x1d9;var _0x2896eb=a202_0x2896();var _0x2774d1=_0x2896eb[_0x579e4b];return _0x2774d1;}import{VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3fc496,_0x1bd4b2){var _0x2d0cde=a203_0x1b2a,_0xee5400=_0x3fc496();while(!![]){try{var _0x5f4225=-parseInt(_0x2d0cde(0xde))/0x1*(parseInt(_0x2d0cde(0xe0))/0x2)+parseInt(_0x2d0cde(0xdc))/0x3*(-parseInt(_0x2d0cde(0xd9))/0x4)+parseInt(_0x2d0cde(0xda))/0x5+parseInt(_0x2d0cde(0xd7))/0x6+parseInt(_0x2d0cde(0xd8))/0x7*(-parseInt(_0x2d0cde(0xdf))/0x8)+-parseInt(_0x2d0cde(0xdb))/0x9+parseInt(_0x2d0cde(0xdd))/0xa*(parseInt(_0x2d0cde(0xe1))/0xb);if(_0x5f4225===_0x1bd4b2)break;else _0xee5400['push'](_0xee5400['shift']());}catch(_0x2d5084){_0xee5400['push'](_0xee5400['shift']());}}}(a203_0x110a,0x5403a));function a203_0x1b2a(_0x4fa186,_0x23be96){_0x4fa186=_0x4fa186-0xd7;var _0x110aeb=a203_0x110a();var _0x1b2a5b=_0x110aeb[_0x4fa186];return _0x1b2a5b;}import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';export async function withActiveCookie(_0x48e05b,_0x15faf4){setActiveCookie(_0x48e05b);try{return await _0x15faf4();}finally{clearActiveCookie();}}function a203_0x110a(){var _0x3feb31=['259KvbGih','180jLRrFD','3373250ChEPTP','5663349WRXwpv','9066RWuJIS','176830sbAvPV','1kOFOQI','80432cSrKiY','11404UOPvZA','264EQuvej','2328186JDVNIM'];a203_0x110a=function(){return _0x3feb31;};return a203_0x110a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x44d434,_0x5ea1a7){var _0x140a77=a204_0x3b2a,_0x218be0=_0x44d434();while(!![]){try{var _0x4a2a44=-parseInt(_0x140a77(0x1b2))/0x1+parseInt(_0x140a77(0x1b5))/0x2+parseInt(_0x140a77(0x1b3))/0x3*(-parseInt(_0x140a77(0x1b8))/0x4)+parseInt(_0x140a77(0x1af))/0x5+parseInt(_0x140a77(0x1b9))/0x6*(parseInt(_0x140a77(0x1b0))/0x7)+parseInt(_0x140a77(0x1b4))/0x8+-parseInt(_0x140a77(0x1b7))/0x9;if(_0x4a2a44===_0x5ea1a7)break;else _0x218be0['push'](_0x218be0['shift']());}catch(_0x3bc104){_0x218be0['push'](_0x218be0['shift']());}}}(a204_0xc8ae,0x3a1b7));export function writeCliSideChannelLine(_0x1ee61e){var _0x45a176=a204_0x3b2a;process[_0x45a176(0x1b1)][_0x45a176(0x1b6)](_0x1ee61e+'\x0a');}function a204_0x3b2a(_0x309cba,_0x1faa70){_0x309cba=_0x309cba-0x1af;var _0xc8ae0=a204_0xc8ae();var _0x3b2af1=_0xc8ae0[_0x309cba];return _0x3b2af1;}function a204_0xc8ae(){var _0xc84473=['144924KIWWFc','1105528BjJRdb','951128McunvC','write','3449853YejprB','8zNUSMy','6FJbYvC','844485PXoZtB','2167193csjdHQ','stderr','374311lSYMzP'];a204_0xc8ae=function(){return _0xc84473;};return a204_0xc8ae();}
|