@lovrabet/rabetbase-cli 2.2.4-beta.4 → 2.2.4-beta.5
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/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.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/list.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/relation-audit.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/app-resolver.js +1 -0
- package/lib/context/auth-resolver.js +1 -0
- package/lib/context/config-loader.js +1 -0
- 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/update-notice.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 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a201_0x134e(){const _0x6136d5=['1888851YklnYH','stdout','20820195TyeDjb','true','setRawMode','12kQsPea','isTTY','4DOFFyr','54712XZOcoY','14945292nizvup','nonInteractive','isRaw','stdin','794692KInKFR','2LiUrlG','11407480RVOung','4162915bDYoNn','1582bGtNcE'];a201_0x134e=function(){return _0x6136d5;};return a201_0x134e();}(function(_0x55b8bc,_0x1f9b4c){const _0x2451d7=a201_0x3642,_0x325465=_0x55b8bc();while(!![]){try{const _0x372501=parseInt(_0x2451d7(0x19d))/0x1*(parseInt(_0x2451d7(0x19c))/0x2)+-parseInt(_0x2451d7(0x1a1))/0x3*(parseInt(_0x2451d7(0x1a8))/0x4)+-parseInt(_0x2451d7(0x19f))/0x5*(-parseInt(_0x2451d7(0x1a6))/0x6)+parseInt(_0x2451d7(0x1a0))/0x7*(parseInt(_0x2451d7(0x1a9))/0x8)+-parseInt(_0x2451d7(0x1aa))/0x9+parseInt(_0x2451d7(0x19e))/0xa+-parseInt(_0x2451d7(0x1a3))/0xb;if(_0x372501===_0x1f9b4c)break;else _0x325465['push'](_0x325465['shift']());}catch(_0x4c2bb3){_0x325465['push'](_0x325465['shift']());}}}(a201_0x134e,0xeb2c6));function a201_0x3642(_0x256db2,_0x285cf9){_0x256db2=_0x256db2-0x19a;const _0x134ee9=a201_0x134e();let _0x364223=_0x134ee9[_0x256db2];return _0x364223;}function env(_0x478f05){return process.env[`RABETBASE_${_0x478f05}`]||process.env[`LOVRABET_${_0x478f05}`]||undefined;}export function isNonInteractive(_0x19def7){const _0x8f51aa=a201_0x3642;return!!(_0x19def7[_0x8f51aa(0x1ab)]||_0x19def7['ci']||env('CI')===_0x8f51aa(0x1a4)||process.env.CI===_0x8f51aa(0x1a4)||!process[_0x8f51aa(0x1a2)][_0x8f51aa(0x1a7)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x2013b6=a201_0x3642;if(!process['stdin'][_0x2013b6(0x1a7)])return![];try{const _0x36f027=process[_0x2013b6(0x19b)][_0x2013b6(0x19a)];return process[_0x2013b6(0x19b)]['setRawMode'](!![]),process[_0x2013b6(0x19b)][_0x2013b6(0x1a5)](_0x36f027??![]),!![];}catch{return![];}}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a202_0x1cc858=a202_0x326c;function a202_0x438f(){const _0x17f408=['logFilePath','失败:\x20','now','combine','printf','createLogger','red','readLogs','parse','timestamp','36iWStGU','Failed\x20to\x20clear\x20logs:','开始执行:\x20','writeFileSync','error','clear','13026hWalcP','597834whxMrA','File','map','stringify','8668bEWrCM','command','2140448iiWbyC','success','2nlROuY','format','1325745zZJiDi','errors','split','info','setRawCommand','871451GJXioA','Failed\x20to\x20read\x20logs:','existsSync','mkdirSync','utf8','readFileSync','dirname','yellow','message','toISOString','level','details','setLogPath','1022yQBlCH','getWinstonInstance','trim','winstonLogger','3212772xaMybS','.lovrabet.log','warn','transports','duration','addColors','logTask','currentRawCommand','unknown','initWinstonLogger','11450kqTNbF'];a202_0x438f=function(){return _0x17f408;};return a202_0x438f();}(function(_0x8dc24d,_0x3d2143){const _0x4a8d9e=a202_0x326c,_0x28e568=_0x8dc24d();while(!![]){try{const _0x25a2a1=-parseInt(_0x4a8d9e(0x7c))/0x1*(parseInt(_0x4a8d9e(0x75))/0x2)+parseInt(_0x4a8d9e(0x6d))/0x3+-parseInt(_0x4a8d9e(0x8d))/0x4+-parseInt(_0x4a8d9e(0x77))/0x5+parseInt(_0x4a8d9e(0x6c))/0x6*(parseInt(_0x4a8d9e(0x89))/0x7)+parseInt(_0x4a8d9e(0x73))/0x8*(parseInt(_0x4a8d9e(0x66))/0x9)+parseInt(_0x4a8d9e(0x97))/0xa*(parseInt(_0x4a8d9e(0x71))/0xb);if(_0x25a2a1===_0x3d2143)break;else _0x28e568['push'](_0x28e568['shift']());}catch(_0x2ad4d4){_0x28e568['push'](_0x28e568['shift']());}}}(a202_0x438f,0x86047));import a202_0x57a2e6 from'winston';import a202_0x4c3937 from'node:fs';import a202_0x1f1594 from'node:path';class Logger{[a202_0x1cc858(0x8c)];[a202_0x1cc858(0x98)];[a202_0x1cc858(0x94)]='';constructor(){const _0x520979=a202_0x1cc858;this[_0x520979(0x98)]='';}[a202_0x1cc858(0x7b)](_0x25cfaa){const _0x2c5f16=a202_0x1cc858;this[_0x2c5f16(0x94)]=_0x25cfaa;}[a202_0x1cc858(0x96)](){const _0x8f71ab=a202_0x1cc858,_0x114e11=a202_0x1f1594[_0x8f71ab(0x82)](this[_0x8f71ab(0x98)]);!a202_0x4c3937['existsSync'](_0x114e11)&&a202_0x4c3937[_0x8f71ab(0x7f)](_0x114e11,{'recursive':!![]});const _0x28ed32=a202_0x57a2e6[_0x8f71ab(0x76)][_0x8f71ab(0x9b)](a202_0x57a2e6[_0x8f71ab(0x76)][_0x8f71ab(0x65)](),a202_0x57a2e6[_0x8f71ab(0x76)][_0x8f71ab(0x78)]({'stack':!![]}),a202_0x57a2e6[_0x8f71ab(0x76)][_0x8f71ab(0x9c)](_0xb28cb7=>{const _0x23dcf4=_0x8f71ab,_0x149d2e={'timestamp':_0xb28cb7['timestamp']||new Date()[_0x23dcf4(0x85)](),'level':_0xb28cb7[_0x23dcf4(0x86)]||_0x23dcf4(0x7a),'command':_0xb28cb7[_0x23dcf4(0x72)]||_0x23dcf4(0x95),'rawCommand':_0xb28cb7['rawCommand']||this['currentRawCommand']||undefined,'message':_0xb28cb7[_0x23dcf4(0x84)]||'','duration':_0xb28cb7[_0x23dcf4(0x91)]||undefined,'details':_0xb28cb7[_0x23dcf4(0x87)]||undefined};return JSON[_0x23dcf4(0x70)](_0x149d2e);}));this[_0x8f71ab(0x8c)]=a202_0x57a2e6[_0x8f71ab(0x9d)]({'level':_0x8f71ab(0x7a),'format':_0x28ed32,'transports':[new a202_0x57a2e6[(_0x8f71ab(0x90))][(_0x8f71ab(0x6e))]({'filename':this['logFilePath'],'level':_0x8f71ab(0x7a)})],'silent':![]}),a202_0x57a2e6[_0x8f71ab(0x92)]({'success':'green','error':_0x8f71ab(0x9e),'warn':_0x8f71ab(0x83),'info':'blue'});}[a202_0x1cc858(0x88)](_0x14db81){const _0x59fc0c=a202_0x1cc858;this[_0x59fc0c(0x98)]=a202_0x1f1594['join'](_0x14db81,_0x59fc0c(0x8e)),this['winstonLogger']&&this['winstonLogger'][_0x59fc0c(0x6b)](),this[_0x59fc0c(0x96)]();}['info'](_0x4a30b6,_0xe14e7c,_0x1ec665){const _0x2a5d5=a202_0x1cc858;if(!this[_0x2a5d5(0x98)]||!this[_0x2a5d5(0x8c)])return;this[_0x2a5d5(0x8c)][_0x2a5d5(0x7a)](_0xe14e7c,{'command':_0x4a30b6,'details':_0x1ec665});}[a202_0x1cc858(0x74)](_0x3db9bc,_0x579fcf,_0x23e3e4,_0x310f33){const _0x45c201=a202_0x1cc858;if(!this[_0x45c201(0x98)]||!this[_0x45c201(0x8c)])return;this[_0x45c201(0x8c)]['log'](_0x45c201(0x7a),_0x579fcf,{'level':_0x45c201(0x74),'command':_0x3db9bc,'duration':_0x23e3e4,'details':_0x310f33});}[a202_0x1cc858(0x6a)](_0x21e855,_0x4bd0df,_0x43fcb2){const _0x25f988=a202_0x1cc858;if(!this[_0x25f988(0x98)]||!this[_0x25f988(0x8c)])return;this['winstonLogger'][_0x25f988(0x6a)](_0x4bd0df,{'command':_0x21e855,'details':_0x43fcb2});}['warn'](_0x1839a5,_0x4151dd,_0x265074){const _0x16ca2c=a202_0x1cc858;if(!this[_0x16ca2c(0x98)]||!this[_0x16ca2c(0x8c)])return;this[_0x16ca2c(0x8c)][_0x16ca2c(0x8f)](_0x4151dd,{'command':_0x1839a5,'details':_0x265074});}async[a202_0x1cc858(0x93)](_0x364497,_0x35d0f4,_0x43305c){const _0x3e44a6=a202_0x1cc858,_0x455fc9=Date[_0x3e44a6(0x9a)]();this[_0x3e44a6(0x7a)](_0x364497,_0x3e44a6(0x68)+_0x35d0f4);try{const _0x440c17=await _0x43305c(),_0x3c0142=Date[_0x3e44a6(0x9a)]()-_0x455fc9;return this[_0x3e44a6(0x74)](_0x364497,'完成:\x20'+_0x35d0f4,_0x3c0142),_0x440c17;}catch(_0x24c45e){const _0x1847ca=Date['now']()-_0x455fc9;this[_0x3e44a6(0x6a)](_0x364497,_0x3e44a6(0x99)+_0x35d0f4,{'error':_0x24c45e instanceof Error?_0x24c45e['message']:String(_0x24c45e),'duration':_0x1847ca});throw _0x24c45e;}}[a202_0x1cc858(0x9f)](){const _0x48b710=a202_0x1cc858;try{if(!a202_0x4c3937['existsSync'](this['logFilePath']))return[];const _0x23d913=a202_0x4c3937[_0x48b710(0x81)](this['logFilePath'],_0x48b710(0x80));return _0x23d913[_0x48b710(0x79)]('\x0a')['filter'](_0x557856=>_0x557856[_0x48b710(0x8b)]())[_0x48b710(0x6f)](_0x4f7309=>JSON[_0x48b710(0x64)](_0x4f7309));}catch(_0x6ff7ef){return console['warn'](_0x48b710(0x7d),_0x6ff7ef),[];}}['clearLogs'](){const _0x14e7a6=a202_0x1cc858;try{a202_0x4c3937[_0x14e7a6(0x7e)](this[_0x14e7a6(0x98)])&&a202_0x4c3937[_0x14e7a6(0x69)](this['logFilePath'],'',_0x14e7a6(0x80));}catch(_0x38009a){console['warn'](_0x14e7a6(0x67),_0x38009a);}}[a202_0x1cc858(0x8a)](){return this['winstonLogger'];}}function a202_0x326c(_0x59db15,_0x394c7d){_0x59db15=_0x59db15-0x64;const _0x438fd8=a202_0x438f();let _0x326c78=_0x438fd8[_0x59db15];return _0x326c78;}export const logger=new Logger();
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x270428,_0x3ab155){const _0x126f9c=a203_0x3955,_0x41abe8=_0x270428();while(!![]){try{const _0x589588=parseInt(_0x126f9c(0x16d))/0x1+parseInt(_0x126f9c(0x165))/0x2+-parseInt(_0x126f9c(0x167))/0x3+parseInt(_0x126f9c(0x166))/0x4+parseInt(_0x126f9c(0x172))/0x5+parseInt(_0x126f9c(0x16c))/0x6*(parseInt(_0x126f9c(0x16f))/0x7)+-parseInt(_0x126f9c(0x16e))/0x8;if(_0x589588===_0x3ab155)break;else _0x41abe8['push'](_0x41abe8['shift']());}catch(_0x449b3b){_0x41abe8['push'](_0x41abe8['shift']());}}}(a203_0x48a0,0xa3107));import{CliErrors}from'../errors.js';function a203_0x3955(_0x54e436,_0x1d0982){_0x54e436=_0x54e436-0x164;const _0x48a053=a203_0x48a0();let _0x395542=_0x48a053[_0x54e436];return _0x395542;}function a203_0x48a0(){const _0xc37640=['20623848whFHip','28ldAEfB','parse','--params\x20must\x20be\x20a\x20JSON\x20object','5072925JXSdAL','object','265274ZaoMZZ','4049988bfOzGo','136440sIJSXq','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','isArray','validation','Invalid\x20JSON\x20for\x20--params:\x20','883134WETGVX','542897FaogxE'];a203_0x48a0=function(){return _0xc37640;};return a203_0x48a0();}export function parseJsonParams(_0x4a3a46){const _0x3e7710=a203_0x3955;if(!_0x4a3a46)return undefined;let _0x4cdd31;try{_0x4cdd31=JSON[_0x3e7710(0x170)](_0x4a3a46);}catch{throw CliErrors[_0x3e7710(0x16a)](_0x3e7710(0x16b)+_0x4a3a46);}if(!_0x4cdd31||typeof _0x4cdd31!==_0x3e7710(0x164)||Array[_0x3e7710(0x169)](_0x4cdd31))throw CliErrors[_0x3e7710(0x16a)](_0x3e7710(0x171),_0x3e7710(0x168));return _0x4cdd31;}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a204_0x6081fb=a204_0x3f21;(function(_0x9aafd5,_0x10ca51){const _0x5f5079=a204_0x3f21,_0xf11666=_0x9aafd5();while(!![]){try{const _0x348d45=-parseInt(_0x5f5079(0x116))/0x1+-parseInt(_0x5f5079(0x110))/0x2+-parseInt(_0x5f5079(0x114))/0x3+parseInt(_0x5f5079(0x113))/0x4+parseInt(_0x5f5079(0x10e))/0x5+-parseInt(_0x5f5079(0x112))/0x6+parseInt(_0x5f5079(0x10f))/0x7;if(_0x348d45===_0x10ca51)break;else _0xf11666['push'](_0xf11666['shift']());}catch(_0x339ff6){_0xf11666['push'](_0xf11666['shift']());}}}(a204_0x2898,0x8b3ca));function a204_0x3f21(_0x51a839,_0x2c2bcd){_0x51a839=_0x51a839-0x10e;const _0x28987a=a204_0x2898();let _0x3f2150=_0x28987a[_0x51a839];return _0x3f2150;}function a204_0x2898(){const _0x515051=['win32','702871jCzmWH','2874980nsYsWe','7637952agacIn','1823260FNzdvN','.cmd','1814106qrvwIB','3710344JBhxmN','319656lDuMUo'];a204_0x2898=function(){return _0x515051;};return a204_0x2898();}export const isWindows=process['platform']===a204_0x6081fb(0x115);export function resolveNpmBin(_0x31e5c4){const _0x514070=a204_0x6081fb;return isWindows?_0x31e5c4+_0x514070(0x111):_0x31e5c4;}
|
package/lib/utils/rules-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a205_0x17a2a6=a205_0x4777;(function(_0x415d12,_0x5ba985){const _0x106ed4=a205_0x4777,_0x443ecf=_0x415d12();while(!![]){try{const _0x4184b7=-parseInt(_0x106ed4(0x10b))/0x1*(parseInt(_0x106ed4(0x10c))/0x2)+parseInt(_0x106ed4(0x101))/0x3*(-parseInt(_0x106ed4(0x107))/0x4)+-parseInt(_0x106ed4(0x113))/0x5*(-parseInt(_0x106ed4(0x106))/0x6)+-parseInt(_0x106ed4(0x114))/0x7+-parseInt(_0x106ed4(0x109))/0x8*(parseInt(_0x106ed4(0x100))/0x9)+-parseInt(_0x106ed4(0x10d))/0xa+-parseInt(_0x106ed4(0x102))/0xb*(-parseInt(_0x106ed4(0x10a))/0xc);if(_0x4184b7===_0x5ba985)break;else _0x443ecf['push'](_0x443ecf['shift']());}catch(_0x1400a3){_0x443ecf['push'](_0x443ecf['shift']());}}}(a205_0x4b00,0x8638b));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 _0x1d4f83=a205_0x4777,_0x42e031=getTemplateBaseUrl();return _0x42e031+_0x1d4f83(0x10f);}const LOCAL_TEMPLATE_PATH=resolve(__dirname,a205_0x17a2a6(0x103));export async function fetchRulesFromCDN(){const _0x171729=a205_0x17a2a6,_0x26dc68=getRulesCdnUrl(),_0x2b8b7d=await fetch(_0x26dc68,{'headers':{'Accept':'application/json'}});if(!_0x2b8b7d['ok'])throw new Error(_0x171729(0xfd)+_0x2b8b7d[_0x171729(0x10e)]+'\x20'+_0x2b8b7d[_0x171729(0xff)]);const _0x43378f=await _0x2b8b7d['json']();if(!_0x43378f[_0x171729(0x115)]||typeof _0x43378f[_0x171729(0x115)]!==_0x171729(0x108))throw new Error('CDN\x20返回数据格式错误');return _0x43378f;}export async function getRulesContent(){const _0x3f3a66=a205_0x17a2a6;try{const _0x487412=await fetchRulesFromCDN();return _0x487412[_0x3f3a66(0x115)];}catch{return readLocalTemplate();}}export function readLocalTemplate(){const _0x574f31=a205_0x17a2a6;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,_0x574f31(0xfe));throw new Error('本地模板文件不存在:\x20'+LOCAL_TEMPLATE_PATH);}export async function writeRulesFile(_0x143797){const _0x192878=a205_0x17a2a6,_0x538d5d=await fetchRulesFromCDN()[_0x192878(0x105)](()=>null);let _0x33e19d;_0x538d5d?(_0x33e19d=_0x538d5d[_0x192878(0x115)],_0x538d5d[_0x192878(0x110)]&&(_0x33e19d=appendUpdateTime(_0x33e19d,_0x538d5d[_0x192878(0x110)]))):_0x33e19d=readLocalTemplate();const _0x606c9d=dirname(_0x143797);!existsSync(_0x606c9d)&&mkdirSync(_0x606c9d,{'recursive':!![]}),writeFileSync(_0x143797,_0x33e19d,_0x192878(0xfe));}export async function copyRulesToCursor(_0x4255f9){const _0x50427a=a205_0x17a2a6,_0x552072=join(_0x4255f9,_0x50427a(0x104)),_0x11a6ea=join(_0x552072,_0x50427a(0x111));if(existsSync(_0x11a6ea))return![];return await writeRulesFile(_0x11a6ea),!![];}function a205_0x4b00(){const _0x311a78=['agents.md','5jxxdRR','2583427QkZURP','content','CDN\x20请求失败:\x20','utf-8','statusText','21591IMdNlc','62217HNmZRf','1804FydjrG','../../templates/rules/lovrabet_rules.mdc.tpl','.cursor/rules','catch','4324566CnGTVi','100PHWZFI','string','3160hfCOSm','175932oLdrxz','586stzrWp','2334JsHOOB','563910NETWwu','status','/rules/rules.json','lastUpdated','lovrabet_rules.mdc'];a205_0x4b00=function(){return _0x311a78;};return a205_0x4b00();}function a205_0x4777(_0x5cbc30,_0x54c76e){_0x5cbc30=_0x5cbc30-0xfd;const _0x4b00bf=a205_0x4b00();let _0x47777e=_0x4b00bf[_0x5cbc30];return _0x47777e;}export async function copyRulesToAgentsMd(_0x456b4b){const _0x200dd0=a205_0x17a2a6,_0x294ad8=join(_0x456b4b,_0x200dd0(0x112));if(existsSync(_0x294ad8))return![];return await writeRulesFile(_0x294ad8),!![];}
|
package/lib/utils/sleep.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function sleep(
|
|
1
|
+
export function sleep(_0x9ebd1e){return new Promise(_0x12c608=>setTimeout(_0x12c608,_0x9ebd1e));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a207_0x51c731=a207_0x5336;(function(_0x1b2407,_0x21daec){const _0x4597c6=a207_0x5336,_0x306410=_0x1b2407();while(!![]){try{const _0x3ee5cb=parseInt(_0x4597c6(0xae))/0x1+parseInt(_0x4597c6(0xa6))/0x2+parseInt(_0x4597c6(0x8d))/0x3+-parseInt(_0x4597c6(0x9c))/0x4*(-parseInt(_0x4597c6(0x8a))/0x5)+parseInt(_0x4597c6(0xa9))/0x6+-parseInt(_0x4597c6(0x8c))/0x7*(-parseInt(_0x4597c6(0x99))/0x8)+-parseInt(_0x4597c6(0x9f))/0x9*(parseInt(_0x4597c6(0x9e))/0xa);if(_0x3ee5cb===_0x21daec)break;else _0x306410['push'](_0x306410['shift']());}catch(_0x398ec2){_0x306410['push'](_0x306410['shift']());}}}(a207_0x48d0,0x9df6d));import a207_0x5c41d2 from'node:fs';import a207_0x4ff2bd from'node:path';import{logger}from'../utils/logger.js';import{getCliVersion}from'../utils/version.js';const CLI_VERSION=getCliVersion();export class TemplateReplacer{static[a207_0x51c731(0x87)](_0x84041e){return String(_0x84041e)['padStart'](0x2,'0');}static[a207_0x51c731(0x75)](_0x3d3380){const _0x24d189=a207_0x51c731,_0x95646e=_0x3d3380['getFullYear'](),_0x589e41=this['pad'](_0x3d3380['getMonth']()+0x1),_0x274cc6=this[_0x24d189(0x87)](_0x3d3380[_0x24d189(0x9a)]()),_0x548691=this[_0x24d189(0x87)](_0x3d3380[_0x24d189(0x76)]()),_0x335130=this[_0x24d189(0x87)](_0x3d3380[_0x24d189(0xb1)]()),_0x110dc5=this[_0x24d189(0x87)](_0x3d3380[_0x24d189(0xa4)]());return{'createdAt':_0x95646e+'-'+_0x589e41+'-'+_0x274cc6+'\x20'+_0x548691+':'+_0x335130+':'+_0x110dc5,'createdDate':_0x95646e+'-'+_0x589e41+'-'+_0x274cc6,'createdTime':_0x548691+':'+_0x335130+':'+_0x110dc5};}static[a207_0x51c731(0x88)](_0x1dff5c){const _0x267aa6=a207_0x51c731,_0x48a198=_0x1dff5c['split']('/')[_0x267aa6(0x94)]()||_0x1dff5c;return _0x48a198[_0x267aa6(0x82)]('-')[_0x267aa6(0x7c)](_0x14e3d2=>_0x14e3d2[_0x267aa6(0x74)](0x0)[_0x267aa6(0xa0)]()+_0x14e3d2[_0x267aa6(0x6e)](0x1)[_0x267aa6(0x96)]())[_0x267aa6(0x97)]('');}static[a207_0x51c731(0xb2)](_0xac24f6){const _0x436e00=a207_0x51c731,_0x4787a9=_0xac24f6[_0x436e00(0x82)]('/')[_0x436e00(0x94)]()||_0xac24f6;return _0x4787a9[_0x436e00(0x82)]('-')[_0x436e00(0x7c)](_0xddd12e=>_0xddd12e[_0x436e00(0x74)](0x0)['toUpperCase']()+_0xddd12e[_0x436e00(0x6e)](0x1)[_0x436e00(0x96)]())['join']('\x20');}static['replaceContent'](_0x20fb43,_0x1c0ee2,_0x304ae2){const _0x2e035a=a207_0x51c731,_0x1448b3=this['toComponentName'](_0x1c0ee2),_0xd9d24a=this['toDisplayTitle'](_0x1c0ee2),{createdAt:_0x11084c,createdDate:_0x268992,createdTime:_0x3dcc9a}=this[_0x2e035a(0x75)](new Date());let _0x216403=_0x20fb43[_0x2e035a(0x93)](/\{CliVersion\}/g,CLI_VERSION)[_0x2e035a(0x93)](/\{ComponentName\}/g,_0x1448b3)['replace'](/\{DisplayTitle\}/g,_0xd9d24a)[_0x2e035a(0x93)](/\{PageName\}/g,_0x1c0ee2)[_0x2e035a(0x93)](/\{TemplateName\}/g,_0x304ae2)['replace'](/\{CreatedAt\}/g,_0x11084c)[_0x2e035a(0x93)](/\{CreatedDate\}/g,_0x268992)['replace'](/\{CreatedTime\}/g,_0x3dcc9a);return _0x216403;}static['replaceApiContent'](_0x81230e,_0xa88515,_0x50992a,_0x542468,_0x54df23,_0x5cdc75,_0x5389f6,_0x3fe525){const _0x26227c=a207_0x51c731,_0x37c43d=new Date(),_0x286a14=_0x37c43d[_0x26227c(0x8f)](),_0x2a6c2b=_0x50992a[_0x26227c(0x7c)](_0x45411e=>{const _0x5d8865=_0x26227c,_0xb380f9=[_0x5d8865(0xa2)+_0x45411e[_0x5d8865(0x77)]+'\x22',_0x5d8865(0x90)+_0x45411e[_0x5d8865(0x91)]+'\x22',_0x5d8865(0x98)+_0x45411e[_0x5d8865(0x79)]+'\x22'];return _0x45411e[_0x5d8865(0x86)]&&_0xb380f9[_0x5d8865(0x85)](_0x5d8865(0x80)+_0x45411e['alias']+'\x22'),_0x5d8865(0x7a)+_0xb380f9[_0x5d8865(0x97)](',\x20')+_0x5d8865(0x6d);})['join'](''),_0x4f44f9=_0x542468||_0x50992a[0x0]?.[_0x26227c(0x86)]||_0x26227c(0x71);let _0x2695bb=_0x81230e[_0x26227c(0x93)](/\{AppCode\}/g,_0xa88515)[_0x26227c(0x93)](/\{ModelConfigs\}/g,_0x2a6c2b)['replace'](/\{ExampleModelName\}/g,_0x4f44f9)[_0x26227c(0x93)](/\{ApiFileName\}/g,_0x54df23||_0x26227c(0x6f))[_0x26227c(0x93)](/\{ConfigName\}/g,_0x5cdc75||'default')['replace'](/\{ClientConfigParam\}/g,_0x5389f6||'')[_0x26227c(0x93)](/\{VarPrefix\}/g,_0x3fe525||'LOVRABET')[_0x26227c(0x93)](/\{CreatedAt\}/g,_0x286a14);return _0x2695bb;}static async[a207_0x51c731(0x7d)](_0x29e6ad,_0xfa1c78,_0x4b67be,_0x1dfca0,_0x22fdb6=!![]){const _0x295d83=a207_0x51c731,_0x47a32a=Date[_0x295d83(0xaa)]();try{_0x22fdb6&&logger[_0x295d83(0xa5)](_0x295d83(0x9d),_0x295d83(0xaf),{'templatePath':_0x29e6ad,'targetPath':_0xfa1c78,'pageName':_0x4b67be,'templateName':_0x1dfca0});await a207_0x5c41d2[_0x295d83(0xab)][_0x295d83(0x70)](_0xfa1c78,{'recursive':!![]}),await this[_0x295d83(0x7f)](_0x29e6ad,_0xfa1c78,_0x4b67be,_0x1dfca0);if(_0x22fdb6){const _0x1d1549=Date['now']()-_0x47a32a;logger[_0x295d83(0xad)](_0x295d83(0x9d),_0x295d83(0x9b),_0x1d1549,{'pageName':_0x4b67be,'templateName':_0x1dfca0});}}catch(_0x844522){if(_0x22fdb6){const _0x1e531b=Date[_0x295d83(0xaa)]()-_0x47a32a;logger['error'](_0x295d83(0x9d),_0x295d83(0xb0),{'templatePath':_0x29e6ad,'targetPath':_0xfa1c78,'pageName':_0x4b67be,'templateName':_0x1dfca0,'error':_0x844522 instanceof Error?_0x844522[_0x295d83(0x84)]:String(_0x844522),'duration':_0x1e531b});}throw _0x844522;}}static async[a207_0x51c731(0x7f)](_0x5a6f15,_0x24d56c,_0x25bed2,_0x1de041){const _0xb8f810=a207_0x51c731,_0x42cae5=await a207_0x5c41d2['promises'][_0xb8f810(0xa8)](_0x5a6f15,{'withFileTypes':!![]});for(const _0x2a4743 of _0x42cae5){const _0x3967ad=a207_0x4ff2bd[_0xb8f810(0x97)](_0x5a6f15,_0x2a4743[_0xb8f810(0x79)]);let _0x525f77=a207_0x4ff2bd['join'](_0x24d56c,_0x2a4743['name']);_0x2a4743[_0xb8f810(0x79)][_0xb8f810(0xa7)](_0xb8f810(0x95))&&(_0x525f77=a207_0x4ff2bd['join'](_0x24d56c,_0x2a4743[_0xb8f810(0x79)]['replace'](/\.tpl$/,'')));if(_0x2a4743[_0xb8f810(0x8e)]())await a207_0x5c41d2[_0xb8f810(0xab)]['mkdir'](_0x525f77,{'recursive':!![]}),await this[_0xb8f810(0x7f)](_0x3967ad,_0x525f77,_0x25bed2,_0x1de041);else _0x2a4743['isFile']()&&await this['processFile'](_0x3967ad,_0x525f77,_0x25bed2,_0x1de041);}}static async[a207_0x51c731(0x78)](_0x39de19,_0x377895,_0x2b7f19,_0x407b7e){const _0x47139b=a207_0x51c731,_0xe01b69=a207_0x4ff2bd[_0x47139b(0x7e)](_0x39de19)[_0x47139b(0x96)]();_0x39de19[_0x47139b(0xa7)]('.tpl')&&(_0x377895=_0x377895['replace'](/\.tpl$/,''));const _0x22ad61=[_0x47139b(0x83),'.ts',_0x47139b(0x73),_0x47139b(0xac),_0x47139b(0x81),_0x47139b(0xa3),'.css',_0x47139b(0x7b),_0x47139b(0x95)];if(_0x22ad61[_0x47139b(0x72)](_0xe01b69)||_0x39de19[_0x47139b(0xa7)](_0x47139b(0x95))){const _0x9de180=await a207_0x5c41d2[_0x47139b(0xab)][_0x47139b(0x92)](_0x39de19,_0x47139b(0xa1)),_0x13f1df=this['replaceContent'](_0x9de180,_0x2b7f19,_0x407b7e);await a207_0x5c41d2[_0x47139b(0xab)][_0x47139b(0x89)](_0x377895,_0x13f1df,'utf8');}else await a207_0x5c41d2[_0x47139b(0xab)][_0x47139b(0x8b)](_0x39de19,_0x377895);}}function a207_0x5336(_0x27a683,_0x5cf567){_0x27a683=_0x27a683-0x6d;const _0x48d097=a207_0x48d0();let _0x533685=_0x48d097[_0x27a683];return _0x533685;}function a207_0x48d0(){const _0xb0b485=['模板内容替换完成','4167900PTjUby','template','30vqFyeK','12548043KpyHkj','toUpperCase','utf8','datasetCode:\x20\x22','.md','getSeconds','info','2282492COMfKW','endsWith','readdir','4196742uYiApk','now','promises','.js','success','1259941TbkoxE','开始处理模板内容替换','模板内容替换失败','getMinutes','toDisplayTitle','\x20},','slice','api','mkdir','YourModel','includes','.jsx','charAt','formatLocalTimestamp','getHours','datasetCode','processFile','name','\x0a\x20\x20\x20\x20{\x20','.scss','map','processTemplate','extname','processDirectory','alias:\x20\x22','.json','split','.tsx','message','push','alias','pad','toComponentName','writeFile','5ZeoGrV','copyFile','119XiPnjZ','529056wgXEys','isDirectory','toISOString','tableName:\x20\x22','tableName','readFile','replace','pop','.tpl','toLowerCase','join','name:\x20\x22','240344GfNKzs','getDate'];a207_0x48d0=function(){return _0xb0b485;};return a207_0x48d0();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2a9737,_0x4bc69d){const _0x5720a0=a208_0x53c8,_0x111778=_0x2a9737();while(!![]){try{const _0x23a802=parseInt(_0x5720a0(0x161))/0x1*(parseInt(_0x5720a0(0x170))/0x2)+-parseInt(_0x5720a0(0x177))/0x3+parseInt(_0x5720a0(0x163))/0x4*(-parseInt(_0x5720a0(0x17a))/0x5)+-parseInt(_0x5720a0(0x171))/0x6*(parseInt(_0x5720a0(0x166))/0x7)+parseInt(_0x5720a0(0x17b))/0x8+-parseInt(_0x5720a0(0x167))/0x9*(parseInt(_0x5720a0(0x16c))/0xa)+-parseInt(_0x5720a0(0x175))/0xb*(-parseInt(_0x5720a0(0x169))/0xc);if(_0x23a802===_0x4bc69d)break;else _0x111778['push'](_0x111778['shift']());}catch(_0x1e78c5){_0x111778['push'](_0x111778['shift']());}}}(a208_0x360a,0x51117));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';import a208_0x532cc7 from'semver';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{getCliVersion}from'../utils/version.js';const UPDATE_CHECK_TTL_MS=0xc*0x3c*0x3c*0x3e8,UPDATE_NOTICE_TTL_MS=0x18*0x3c*0x3c*0x3e8;function isUpdateNoticeDisabled(){const _0x50c6eb=a208_0x53c8,_0x1c5f93=process.env.RABETBASE_NO_UPDATE_NOTICE?.[_0x50c6eb(0x162)]()[_0x50c6eb(0x174)]();return _0x1c5f93==='1'||_0x1c5f93===_0x50c6eb(0x16d)||_0x1c5f93===_0x50c6eb(0x17d);}function cacheRoot(){const _0x38ae33=a208_0x53c8;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0x38ae33(0x16b));}function a208_0x360a(){const _0xc5eb76=['2211610XuqbjE','1500208YhJwMX','\x20update','yes','lastNotifiedAt','now','\x20available,\x20current\x20','21bXTykJ','trim','4JhtCqs','stringify','rabetbase-cli','2009KdxtMY','45NfmcFk','latest','228EccAcm','https://www.npmjs.com/package/','.cache','1209920lwxlIw','true','gte','object','57044EwhFrA','10866swtYFM','valid','checkedAt','toLowerCase','675675rFuXEC','number','163407TLjGJr','parse','lastNotifiedVersion'];a208_0x360a=function(){return _0xc5eb76;};return a208_0x360a();}export function getUpdateNoticeCachePath(){const _0x2d4434=a208_0x53c8;return join(cacheRoot(),_0x2d4434(0x165),'update-check.json');}async function readUpdateNoticeCache(){const _0x564f6f=a208_0x53c8;try{const _0x365428=await readFile(getUpdateNoticeCachePath(),'utf8'),_0x2d62fe=JSON[_0x564f6f(0x178)](_0x365428);if(!_0x2d62fe||typeof _0x2d62fe!==_0x564f6f(0x16f))return{};return _0x2d62fe;}catch{return{};}}function a208_0x53c8(_0xc4ebfc,_0x1991dd){_0xc4ebfc=_0xc4ebfc-0x15e;const _0x360a3e=a208_0x360a();let _0x53c839=_0x360a3e[_0xc4ebfc];return _0x53c839;}async function writeUpdateNoticeCache(_0xa79751){const _0x308e32=a208_0x53c8;try{const _0x5e1dba=getUpdateNoticeCachePath();await mkdir(dirname(_0x5e1dba),{'recursive':!![]}),await writeFile(_0x5e1dba,JSON[_0x308e32(0x164)](_0xa79751,null,0x2)+'\x0a','utf8');}catch{}}function isFreshCheck(_0x50a70e,_0x27355b){const _0x4f8deb=a208_0x53c8;return typeof _0x50a70e[_0x4f8deb(0x173)]===_0x4f8deb(0x176)&&_0x27355b-_0x50a70e[_0x4f8deb(0x173)]<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x43e128,_0x3787cc,_0x4ecba5){const _0x37e1e8=a208_0x53c8;return _0x43e128[_0x37e1e8(0x179)]===_0x3787cc&&typeof _0x43e128[_0x37e1e8(0x15e)]===_0x37e1e8(0x176)&&_0x4ecba5-_0x43e128[_0x37e1e8(0x15e)]<UPDATE_NOTICE_TTL_MS;}export function buildNpmVersionUrl(_0x13765e){const _0x1f3e6d=a208_0x53c8;return _0x1f3e6d(0x16a)+NPM_PACKAGE_NAME+'/v/'+_0x13765e;}export async function resolveLatestUpdateNotice(){const _0x210312=a208_0x53c8;if(isUpdateNoticeDisabled())return null;try{const _0x182b7b=Date[_0x210312(0x15f)](),_0x2fb0fb=getCliVersion(),_0xabb5c2=await readUpdateNoticeCache();let _0x1fb38e=isFreshCheck(_0xabb5c2,_0x182b7b)?_0xabb5c2[_0x210312(0x168)]?.[_0x210312(0x162)]():undefined;if(!_0x1fb38e&&!isFreshCheck(_0xabb5c2,_0x182b7b)){const _0x510cb3=await getCliVersionPolicy();_0x1fb38e=_0x510cb3?.['stableVersion']?.[_0x210312(0x162)]()||undefined,await writeUpdateNoticeCache({..._0xabb5c2,'checkedAt':_0x182b7b,'latest':_0x1fb38e,'failed':!_0x1fb38e});}if(!_0x1fb38e||!a208_0x532cc7[_0x210312(0x172)](_0x2fb0fb)||!a208_0x532cc7[_0x210312(0x172)](_0x1fb38e))return null;if(a208_0x532cc7[_0x210312(0x16e)](_0x2fb0fb,_0x1fb38e))return null;if(isRecentlyNotified(_0xabb5c2,_0x1fb38e,_0x182b7b))return null;const _0x3ce2f2=CLI_BIN_NAME+_0x210312(0x17c);return await writeUpdateNoticeCache({..._0xabb5c2,'checkedAt':isFreshCheck(_0xabb5c2,_0x182b7b)?_0xabb5c2['checkedAt']:_0x182b7b,'latest':_0x1fb38e,'failed':![],'lastNotifiedVersion':_0x1fb38e,'lastNotifiedAt':_0x182b7b}),{'command':_0x3ce2f2,'current':_0x2fb0fb,'latest':_0x1fb38e,'url':buildNpmVersionUrl(_0x1fb38e),'message':CLI_BIN_NAME+'\x20'+_0x1fb38e+_0x210312(0x160)+_0x2fb0fb+',\x20run:\x20'+_0x3ce2f2};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2028e8,_0x5b8d4a){var _0x516548=a209_0x330f,_0x32bf35=_0x2028e8();while(!![]){try{var _0x92c6ac=-parseInt(_0x516548(0x14f))/0x1*(-parseInt(_0x516548(0x14c))/0x2)+-parseInt(_0x516548(0x14e))/0x3+parseInt(_0x516548(0x14d))/0x4*(-parseInt(_0x516548(0x14a))/0x5)+-parseInt(_0x516548(0x151))/0x6+parseInt(_0x516548(0x152))/0x7*(parseInt(_0x516548(0x149))/0x8)+parseInt(_0x516548(0x153))/0x9+-parseInt(_0x516548(0x14b))/0xa*(-parseInt(_0x516548(0x150))/0xb);if(_0x92c6ac===_0x5b8d4a)break;else _0x32bf35['push'](_0x32bf35['shift']());}catch(_0x7f596d){_0x32bf35['push'](_0x32bf35['shift']());}}}(a209_0x2bd2,0x4f2bb));import{VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}function a209_0x330f(_0x422455,_0x5ce020){_0x422455=_0x422455-0x149;var _0x2bd224=a209_0x2bd2();var _0x330f91=_0x2bd224[_0x422455];return _0x330f91;}function a209_0x2bd2(){var _0x4d473d=['10japBtq','9518590lJGgCB','6184nCHjqy','440556ADhZtu','479502eFERFb','61LNBHze','11CZZeFZ','3567426bKERBI','35DUCscl','540225RZtvxe','157552ZPzofw'];a209_0x2bd2=function(){return _0x4d473d;};return a209_0x2bd2();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a210_0x2a77(){var _0x2b056f=['64JJmWBA','1831670ExwnYF','7674275sEQOVL','2333634jAgERg','30252608iJOaHb','159909IiTnjZ','2873860wKpGtU','1123688fVfzae'];a210_0x2a77=function(){return _0x2b056f;};return a210_0x2a77();}(function(_0x10ce7d,_0x33c563){var _0x10ce9e=a210_0x52a8,_0x507742=_0x10ce7d();while(!![]){try{var _0x15c06e=-parseInt(_0x10ce9e(0x187))/0x1+parseInt(_0x10ce9e(0x189))/0x2+parseInt(_0x10ce9e(0x185))/0x3*(-parseInt(_0x10ce9e(0x188))/0x4)+-parseInt(_0x10ce9e(0x186))/0x5+-parseInt(_0x10ce9e(0x183))/0x6+-parseInt(_0x10ce9e(0x18a))/0x7+parseInt(_0x10ce9e(0x184))/0x8;if(_0x15c06e===_0x33c563)break;else _0x507742['push'](_0x507742['shift']());}catch(_0x39a9cb){_0x507742['push'](_0x507742['shift']());}}}(a210_0x2a77,0xa1567));function a210_0x52a8(_0x1a4b91,_0x5ca16e){_0x1a4b91=_0x1a4b91-0x183;var _0x2a7755=a210_0x2a77();var _0x52a8e8=_0x2a7755[_0x1a4b91];return _0x52a8e8;}import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';export async function withActiveCookie(_0x3e8b51,_0xb5ccfa){setActiveCookie(_0x3e8b51);try{return await _0xb5ccfa();}finally{clearActiveCookie();}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a211_0x458f(_0x592e2e,_0x399247){_0x592e2e=_0x592e2e-0xc1;var _0x3c1b1a=a211_0x3c1b();var _0x458fbf=_0x3c1b1a[_0x592e2e];return _0x458fbf;}(function(_0x243d7d,_0x4a00be){var _0x1e6c3c=a211_0x458f,_0x15402c=_0x243d7d();while(!![]){try{var _0x16f702=-parseInt(_0x1e6c3c(0xc1))/0x1+parseInt(_0x1e6c3c(0xc7))/0x2+parseInt(_0x1e6c3c(0xc9))/0x3*(-parseInt(_0x1e6c3c(0xc2))/0x4)+parseInt(_0x1e6c3c(0xc6))/0x5*(parseInt(_0x1e6c3c(0xc5))/0x6)+parseInt(_0x1e6c3c(0xca))/0x7*(-parseInt(_0x1e6c3c(0xc8))/0x8)+parseInt(_0x1e6c3c(0xc4))/0x9+parseInt(_0x1e6c3c(0xc3))/0xa;if(_0x16f702===_0x4a00be)break;else _0x15402c['push'](_0x15402c['shift']());}catch(_0x2b8bfd){_0x15402c['push'](_0x15402c['shift']());}}}(a211_0x3c1b,0xa3e64));export function writeCliSideChannelLine(_0x3157d5){process['stderr']['write'](_0x3157d5+'\x0a');}function a211_0x3c1b(){var _0x4b4876=['10XMBntu','707052kbkLlQ','2826216LfXJgt','99LbxcyP','7JIPUFF','769611seowHk','60404ZgEwMC','8382640qaCPjJ','3865545Cojbun','2013774ygESwS'];a211_0x3c1b=function(){return _0x4b4876;};return a211_0x3c1b();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lovrabet/rabetbase-cli",
|
|
3
|
-
"version": "2.2.4-beta.
|
|
3
|
+
"version": "2.2.4-beta.5",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
],
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"@inquirer/prompts": "^8.3.2",
|
|
59
|
-
"@lovrabet/cli-framework": "1.0.
|
|
59
|
+
"@lovrabet/cli-framework": "1.0.5",
|
|
60
60
|
"@lovrabet/otel-logger": "1.0.1-beta.5",
|
|
61
61
|
"@opentelemetry/api": "^1.9.1",
|
|
62
62
|
"chalk": "^5.6.2",
|