@lovrabet/rabetbase-cli 2.3.9-beta.3 → 2.3.9
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/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.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-skill/index.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-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.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/business-group-update.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/generate.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-audit.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/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.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/file/index.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/delete.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.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/mutations.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/notification/config-list.js +1 -1
- package/lib/commands/notification/index.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/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.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/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.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/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.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 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.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-index-auditor.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/error-output.js +1 -1
- package/lib/framework/explicit-yes.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 +1 -1
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a252_0x426e13=a252_0x2b39;(function(_0x49d704,_0x17c041){const _0x363439=a252_0x2b39,_0x32efdf=_0x49d704();while(!![]){try{const _0x3b9521=-parseInt(_0x363439(0xce))/0x1+-parseInt(_0x363439(0x9d))/0x2*(parseInt(_0x363439(0xa5))/0x3)+-parseInt(_0x363439(0xc7))/0x4*(-parseInt(_0x363439(0xae))/0x5)+parseInt(_0x363439(0xbf))/0x6+-parseInt(_0x363439(0xa8))/0x7+-parseInt(_0x363439(0x9c))/0x8+parseInt(_0x363439(0xa0))/0x9;if(_0x3b9521===_0x17c041)break;else _0x32efdf['push'](_0x32efdf['shift']());}catch(_0x2f4a37){_0x32efdf['push'](_0x32efdf['shift']());}}}(a252_0x52b8,0x4d207));import a252_0x47ae04 from'winston';import a252_0x48d55 from'node:fs';function a252_0x52b8(){const _0x5cf62d=['toISOString','logTask','9324900QTRJLG','Failed\x20to\x20clear\x20logs:','getWinstonInstance','printf','success','3156dKuhXZ','blue','开始执行:\x20','3304630gYXkqP','map','rawCommand','addColors','完成:\x20','error','1569045LIFPtO','winstonLogger','失败:\x20','info','split','join','timestamp','writeFileSync','setLogPath','setRawCommand','yellow','trim','message','format','clear','currentRawCommand','utf8','679566UtgPDS','level','clearLogs','stringify','existsSync','File','unknown','readLogs','8GajjTY','details','duration','transports','warn','green','now','339324WafLFk','errors','initWinstonLogger','createLogger','command','Failed\x20to\x20read\x20logs:','logFilePath','3615024GKguOy','376rTZxQF'];a252_0x52b8=function(){return _0x5cf62d;};return a252_0x52b8();}import a252_0x4795e8 from'node:path';class Logger{['winstonLogger'];[a252_0x426e13(0x9b)];['currentRawCommand']='';constructor(){const _0x495bb6=a252_0x426e13;this[_0x495bb6(0x9b)]='';}[a252_0x426e13(0xb7)](_0x52fc16){const _0x50ba04=a252_0x426e13;this[_0x50ba04(0xbd)]=_0x52fc16;}[a252_0x426e13(0xd0)](){const _0x4beb81=a252_0x426e13,_0x44eadf=a252_0x4795e8['dirname'](this[_0x4beb81(0x9b)]);!a252_0x48d55['existsSync'](_0x44eadf)&&a252_0x48d55['mkdirSync'](_0x44eadf,{'recursive':!![]});const _0x4b39d8=a252_0x47ae04[_0x4beb81(0xbb)]['combine'](a252_0x47ae04[_0x4beb81(0xbb)][_0x4beb81(0xb4)](),a252_0x47ae04[_0x4beb81(0xbb)][_0x4beb81(0xcf)]({'stack':!![]}),a252_0x47ae04[_0x4beb81(0xbb)][_0x4beb81(0xa3)](_0x124f46=>{const _0x189407=_0x4beb81,_0x30176e={'timestamp':_0x124f46[_0x189407(0xb4)]||new Date()[_0x189407(0x9e)](),'level':_0x124f46[_0x189407(0xc0)]||'info','command':_0x124f46[_0x189407(0x99)]||_0x189407(0xc5),'rawCommand':_0x124f46[_0x189407(0xaa)]||this[_0x189407(0xbd)]||undefined,'message':_0x124f46[_0x189407(0xba)]||'','duration':_0x124f46[_0x189407(0xc9)]||undefined,'details':_0x124f46[_0x189407(0xc8)]||undefined};return JSON[_0x189407(0xc2)](_0x30176e);}));this['winstonLogger']=a252_0x47ae04[_0x4beb81(0xd1)]({'level':_0x4beb81(0xb1),'format':_0x4b39d8,'transports':[new a252_0x47ae04[(_0x4beb81(0xca))][(_0x4beb81(0xc4))]({'filename':this[_0x4beb81(0x9b)],'level':_0x4beb81(0xb1)})],'silent':![]}),a252_0x47ae04[_0x4beb81(0xab)]({'success':_0x4beb81(0xcc),'error':'red','warn':_0x4beb81(0xb8),'info':_0x4beb81(0xa6)});}[a252_0x426e13(0xb6)](_0x4e049d){const _0x12c414=a252_0x426e13;this['logFilePath']=a252_0x4795e8[_0x12c414(0xb3)](_0x4e049d,'.lovrabet.log'),this[_0x12c414(0xaf)]&&this[_0x12c414(0xaf)][_0x12c414(0xbc)](),this[_0x12c414(0xd0)]();}['info'](_0x17c3ad,_0xcd171e,_0x55a602){const _0x1aa804=a252_0x426e13;if(!this[_0x1aa804(0x9b)]||!this[_0x1aa804(0xaf)])return;this[_0x1aa804(0xaf)][_0x1aa804(0xb1)](_0xcd171e,{'command':_0x17c3ad,'details':_0x55a602});}['success'](_0x2973d1,_0x47f761,_0x2fd2cf,_0x4bc808){const _0x3eab27=a252_0x426e13;if(!this[_0x3eab27(0x9b)]||!this[_0x3eab27(0xaf)])return;this['winstonLogger']['log'](_0x3eab27(0xb1),_0x47f761,{'level':_0x3eab27(0xa4),'command':_0x2973d1,'duration':_0x2fd2cf,'details':_0x4bc808});}[a252_0x426e13(0xad)](_0x4fbd22,_0x5289a1,_0x4cd03e){const _0x42dbbf=a252_0x426e13;if(!this[_0x42dbbf(0x9b)]||!this[_0x42dbbf(0xaf)])return;this[_0x42dbbf(0xaf)][_0x42dbbf(0xad)](_0x5289a1,{'command':_0x4fbd22,'details':_0x4cd03e});}[a252_0x426e13(0xcb)](_0x3e0624,_0x1adb8c,_0x8bfa3b){const _0xd41f40=a252_0x426e13;if(!this[_0xd41f40(0x9b)]||!this['winstonLogger'])return;this[_0xd41f40(0xaf)][_0xd41f40(0xcb)](_0x1adb8c,{'command':_0x3e0624,'details':_0x8bfa3b});}async[a252_0x426e13(0x9f)](_0x11d2e1,_0x28fb74,_0x252e59){const _0x3c805e=a252_0x426e13,_0x1a3e44=Date[_0x3c805e(0xcd)]();this['info'](_0x11d2e1,_0x3c805e(0xa7)+_0x28fb74);try{const _0x137bc4=await _0x252e59(),_0x41b5f9=Date[_0x3c805e(0xcd)]()-_0x1a3e44;return this[_0x3c805e(0xa4)](_0x11d2e1,_0x3c805e(0xac)+_0x28fb74,_0x41b5f9),_0x137bc4;}catch(_0x5c0952){const _0x496a84=Date['now']()-_0x1a3e44;this[_0x3c805e(0xad)](_0x11d2e1,_0x3c805e(0xb0)+_0x28fb74,{'error':_0x5c0952 instanceof Error?_0x5c0952[_0x3c805e(0xba)]:String(_0x5c0952),'duration':_0x496a84});throw _0x5c0952;}}[a252_0x426e13(0xc6)](){const _0x27928c=a252_0x426e13;try{if(!a252_0x48d55[_0x27928c(0xc3)](this[_0x27928c(0x9b)]))return[];const _0x506cb2=a252_0x48d55['readFileSync'](this[_0x27928c(0x9b)],'utf8');return _0x506cb2[_0x27928c(0xb2)]('\x0a')['filter'](_0x25310d=>_0x25310d[_0x27928c(0xb9)]())[_0x27928c(0xa9)](_0x55cdb3=>JSON['parse'](_0x55cdb3));}catch(_0x2aa75b){return console['warn'](_0x27928c(0x9a),_0x2aa75b),[];}}[a252_0x426e13(0xc1)](){const _0x45d84f=a252_0x426e13;try{a252_0x48d55['existsSync'](this['logFilePath'])&&a252_0x48d55[_0x45d84f(0xb5)](this[_0x45d84f(0x9b)],'',_0x45d84f(0xbe));}catch(_0x1f8ab0){console[_0x45d84f(0xcb)](_0x45d84f(0xa1),_0x1f8ab0);}}[a252_0x426e13(0xa2)](){const _0x1aebef=a252_0x426e13;return this[_0x1aebef(0xaf)];}}function a252_0x2b39(_0x3560ea,_0x5ea06b){_0x3560ea=_0x3560ea-0x99;const _0x52b860=a252_0x52b8();let _0x2b3959=_0x52b860[_0x3560ea];return _0x2b3959;}export const logger=new Logger();
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x24b3f5,_0x7c147e){const _0x1fcb66=a253_0x6256,_0x741182=_0x24b3f5();while(!![]){try{const _0x30b7d9=-parseInt(_0x1fcb66(0x1b1))/0x1+parseInt(_0x1fcb66(0x1a7))/0x2+-parseInt(_0x1fcb66(0x1ad))/0x3*(-parseInt(_0x1fcb66(0x1b0))/0x4)+-parseInt(_0x1fcb66(0x1ac))/0x5+parseInt(_0x1fcb66(0x1a8))/0x6+-parseInt(_0x1fcb66(0x1ae))/0x7+parseInt(_0x1fcb66(0x1a6))/0x8;if(_0x30b7d9===_0x7c147e)break;else _0x741182['push'](_0x741182['shift']());}catch(_0x1b4ec6){_0x741182['push'](_0x741182['shift']());}}}(a253_0x47e8,0x9e444));import{CliErrors}from'../errors.js';function a253_0x47e8(){const _0x55f8e8=['validation','isArray','Invalid\x20JSON\x20for\x20--params:\x20','2503680ZpcGou','539454XxfaHE','7912604TpNjBs','object','20iuCVVH','174354LencxK','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','parse','--params\x20must\x20be\x20a\x20JSON\x20object','5813184UgmAUv','1499204OHTyps','470292bbitYY'];a253_0x47e8=function(){return _0x55f8e8;};return a253_0x47e8();}function a253_0x6256(_0x388458,_0x48d156){_0x388458=_0x388458-0x1a3;const _0x47e8cb=a253_0x47e8();let _0x62566a=_0x47e8cb[_0x388458];return _0x62566a;}export function parseJsonParams(_0x433562){const _0x1f2202=a253_0x6256;if(!_0x433562)return undefined;let _0xc6fd77;try{_0xc6fd77=JSON[_0x1f2202(0x1a4)](_0x433562);}catch{throw CliErrors[_0x1f2202(0x1a9)](_0x1f2202(0x1ab)+_0x433562);}if(!_0xc6fd77||typeof _0xc6fd77!==_0x1f2202(0x1af)||Array[_0x1f2202(0x1aa)](_0xc6fd77))throw CliErrors[_0x1f2202(0x1a9)](_0x1f2202(0x1a5),_0x1f2202(0x1a3));return _0xc6fd77;}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a254_0x19d093=a254_0x3245;(function(_0x4a0cc2,_0x2d025f){const _0x17acc7=a254_0x3245,_0x51669b=_0x4a0cc2();while(!![]){try{const _0x4e1eb0=parseInt(_0x17acc7(0x14b))/0x1+parseInt(_0x17acc7(0x150))/0x2+parseInt(_0x17acc7(0x154))/0x3*(parseInt(_0x17acc7(0x14d))/0x4)+parseInt(_0x17acc7(0x151))/0x5+parseInt(_0x17acc7(0x152))/0x6+-parseInt(_0x17acc7(0x14f))/0x7*(parseInt(_0x17acc7(0x14e))/0x8)+-parseInt(_0x17acc7(0x149))/0x9;if(_0x4e1eb0===_0x2d025f)break;else _0x51669b['push'](_0x51669b['shift']());}catch(_0x1db84e){_0x51669b['push'](_0x51669b['shift']());}}}(a254_0x261d,0xde467));export const isWindows=process[a254_0x19d093(0x14c)]===a254_0x19d093(0x14a);function a254_0x3245(_0x400815,_0x28e2a9){_0x400815=_0x400815-0x149;const _0x261da9=a254_0x261d();let _0x3245fe=_0x261da9[_0x400815];return _0x3245fe;}export function resolveNpmBin(_0x5edac6){const _0xc95263=a254_0x19d093;return isWindows?_0x5edac6+_0xc95263(0x153):_0x5edac6;}function a254_0x261d(){const _0x194a8c=['6167UkTxCq','1900978NMNccn','1903960sQlZjR','5450868OMvJgH','.cmd','70194DAmAjw','7088508RdxrYO','win32','135872HlogWc','platform','164mOhKXR','14864SzityB'];a254_0x261d=function(){return _0x194a8c;};return a254_0x261d();}
|
package/lib/utils/rules-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x394e30,_0xf1d43d){const _0x57efd7=a255_0x3675,_0x3141e2=_0x394e30();while(!![]){try{const _0x1c86b4=-parseInt(_0x57efd7(0x12e))/0x1*(-parseInt(_0x57efd7(0x12c))/0x2)+-parseInt(_0x57efd7(0x11f))/0x3*(parseInt(_0x57efd7(0x120))/0x4)+parseInt(_0x57efd7(0x11e))/0x5*(-parseInt(_0x57efd7(0x123))/0x6)+parseInt(_0x57efd7(0x131))/0x7*(-parseInt(_0x57efd7(0x11c))/0x8)+parseInt(_0x57efd7(0x12f))/0x9+-parseInt(_0x57efd7(0x125))/0xa+parseInt(_0x57efd7(0x11b))/0xb;if(_0x1c86b4===_0xf1d43d)break;else _0x3141e2['push'](_0x3141e2['shift']());}catch(_0x2cde03){_0x3141e2['push'](_0x3141e2['shift']());}}}(a255_0x1717,0xe8381));function a255_0x1717(){const _0x546192=['statusText','10ItFCXP','本地模板文件不存在:\x20','229781EQPOLY','4188420LDGGfO','json','4123IKKVSF','/rules/rules.json','32117525fiXnHC','16888ubcVUw','utf-8','1585QwyjQA','5572641VLbpcc','4Ukmvvt','lastUpdated','.cursor/rules','978bRloGt','application/json','4302940EuSuEi','catch','CDN\x20返回数据格式错误','CDN\x20请求失败:\x20','lovrabet_rules.mdc','content'];a255_0x1717=function(){return _0x546192;};return a255_0x1717();}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';function a255_0x3675(_0x5bb5a6,_0x25cb70){_0x5bb5a6=_0x5bb5a6-0x11b;const _0x171708=a255_0x1717();let _0x3675f7=_0x171708[_0x5bb5a6];return _0x3675f7;}import{appendUpdateTime}from'../utils/guides-cdn.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function getRulesCdnUrl(){const _0x3de7af=a255_0x3675,_0x2e2222=getTemplateBaseUrl();return _0x2e2222+_0x3de7af(0x132);}const LOCAL_TEMPLATE_PATH=resolve(__dirname,'../../templates/rules/lovrabet_rules.mdc.tpl');export async function fetchRulesFromCDN(){const _0x271c67=a255_0x3675,_0x58dcbb=getRulesCdnUrl(),_0x2e735b=await fetch(_0x58dcbb,{'headers':{'Accept':_0x271c67(0x124)}});if(!_0x2e735b['ok'])throw new Error(_0x271c67(0x128)+_0x2e735b['status']+'\x20'+_0x2e735b[_0x271c67(0x12b)]);const _0x3de922=await _0x2e735b[_0x271c67(0x130)]();if(!_0x3de922[_0x271c67(0x12a)]||typeof _0x3de922[_0x271c67(0x12a)]!=='string')throw new Error(_0x271c67(0x127));return _0x3de922;}export async function getRulesContent(){const _0xdc849d=a255_0x3675;try{const _0x1aa730=await fetchRulesFromCDN();return _0x1aa730[_0xdc849d(0x12a)];}catch{return readLocalTemplate();}}export function readLocalTemplate(){const _0x5d96fe=a255_0x3675;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,_0x5d96fe(0x11d));throw new Error(_0x5d96fe(0x12d)+LOCAL_TEMPLATE_PATH);}export async function writeRulesFile(_0x50cb17){const _0x131367=a255_0x3675,_0x50a6af=await fetchRulesFromCDN()[_0x131367(0x126)](()=>null);let _0x4adf07;_0x50a6af?(_0x4adf07=_0x50a6af[_0x131367(0x12a)],_0x50a6af[_0x131367(0x121)]&&(_0x4adf07=appendUpdateTime(_0x4adf07,_0x50a6af['lastUpdated']))):_0x4adf07=readLocalTemplate();const _0x8e3a5b=dirname(_0x50cb17);!existsSync(_0x8e3a5b)&&mkdirSync(_0x8e3a5b,{'recursive':!![]}),writeFileSync(_0x50cb17,_0x4adf07,_0x131367(0x11d));}export async function copyRulesToCursor(_0xc0448e){const _0xd4eb44=a255_0x3675,_0x1f23d6=join(_0xc0448e,_0xd4eb44(0x122)),_0x5d37e7=join(_0x1f23d6,_0xd4eb44(0x129));if(existsSync(_0x5d37e7))return![];return await writeRulesFile(_0x5d37e7),!![];}export async function copyRulesToAgentsMd(_0x2cac5f){const _0x436e2f=join(_0x2cac5f,'agents.md');if(existsSync(_0x436e2f))return![];return await writeRulesFile(_0x436e2f),!![];}
|
package/lib/utils/sleep.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function sleep(
|
|
1
|
+
export function sleep(_0x3148e2){return new Promise(_0x310851=>setTimeout(_0x310851,_0x3148e2));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a257_0x5a72(){const _0x16fe83=['datasetCode:\x20\x22','.tsx','datasetCode','formatLocalTimestamp','replaceContent','slice','getMinutes','default','52IzBbie','now','push','charAt','utf8','开始处理模板内容替换','.jsx','name','2133880ZDAuiY','split','padStart','processFile','\x0a\x20\x20\x20\x20{\x20','tableName:\x20\x22','extname','LOVRABET','3184587QmMbdq','getFullYear','template','endsWith','getMonth','.js','32772RPSdqY','replace','readFile','isFile','23588MJeWyq','getSeconds','replaceApiContent','error','message','toUpperCase','58BuZpQs','pad','success','模板内容替换失败','toComponentName','toISOString','.md','writeFile','getDate','13851717jufFxy','map','模板内容替换完成','join','alias','pop','promises','toDisplayTitle','copyFile','2696smORGE','tableName','.tpl','isDirectory','.scss','6fXNGyr','17127vbcooY','alias:\x20\x22','mkdir','readdir','.json','processDirectory','2006700JwCkkt','toLowerCase','includes'];a257_0x5a72=function(){return _0x16fe83;};return a257_0x5a72();}const a257_0x3a67e8=a257_0x521d;(function(_0x50a947,_0xdf850b){const _0x10d8be=a257_0x521d,_0x305e4f=_0x50a947();while(!![]){try{const _0x5a8570=-parseInt(_0x10d8be(0x1b5))/0x1*(-parseInt(_0x10d8be(0x1af))/0x2)+-parseInt(_0x10d8be(0x1ab))/0x3*(-parseInt(_0x10d8be(0x195))/0x4)+parseInt(_0x10d8be(0x19d))/0x5+-parseInt(_0x10d8be(0x183))/0x6*(parseInt(_0x10d8be(0x1a5))/0x7)+-parseInt(_0x10d8be(0x17e))/0x8*(-parseInt(_0x10d8be(0x184))/0x9)+parseInt(_0x10d8be(0x18a))/0xa+-parseInt(_0x10d8be(0x1be))/0xb;if(_0x5a8570===_0xdf850b)break;else _0x305e4f['push'](_0x305e4f['shift']());}catch(_0xe9d4){_0x305e4f['push'](_0x305e4f['shift']());}}}(a257_0x5a72,0x5ced9));import a257_0x4dfd38 from'node:fs';import a257_0x681b0c from'node:path';import{logger}from'../utils/logger.js';import{getCliVersion}from'../utils/version.js';const CLI_VERSION=getCliVersion();function a257_0x521d(_0x157926,_0x418d79){_0x157926=_0x157926-0x17d;const _0x5a722c=a257_0x5a72();let _0x521df9=_0x5a722c[_0x157926];return _0x521df9;}export class TemplateReplacer{static[a257_0x3a67e8(0x1b6)](_0x4b71b2){const _0x47207b=a257_0x3a67e8;return String(_0x4b71b2)[_0x47207b(0x19f)](0x2,'0');}static[a257_0x3a67e8(0x190)](_0x246299){const _0x2c4c0b=a257_0x3a67e8,_0x2eeb9b=_0x246299[_0x2c4c0b(0x1a6)](),_0x263b36=this[_0x2c4c0b(0x1b6)](_0x246299[_0x2c4c0b(0x1a9)]()+0x1),_0xc9eb2d=this[_0x2c4c0b(0x1b6)](_0x246299[_0x2c4c0b(0x1bd)]()),_0x41d097=this[_0x2c4c0b(0x1b6)](_0x246299['getHours']()),_0x16d06f=this[_0x2c4c0b(0x1b6)](_0x246299[_0x2c4c0b(0x193)]()),_0x2ce9fa=this[_0x2c4c0b(0x1b6)](_0x246299[_0x2c4c0b(0x1b0)]());return{'createdAt':_0x2eeb9b+'-'+_0x263b36+'-'+_0xc9eb2d+'\x20'+_0x41d097+':'+_0x16d06f+':'+_0x2ce9fa,'createdDate':_0x2eeb9b+'-'+_0x263b36+'-'+_0xc9eb2d,'createdTime':_0x41d097+':'+_0x16d06f+':'+_0x2ce9fa};}static['toComponentName'](_0x5940fd){const _0x5f56d9=a257_0x3a67e8,_0x4332b2=_0x5940fd[_0x5f56d9(0x19e)]('/')[_0x5f56d9(0x1c3)]()||_0x5940fd;return _0x4332b2[_0x5f56d9(0x19e)]('-')[_0x5f56d9(0x1bf)](_0x148dc9=>_0x148dc9[_0x5f56d9(0x198)](0x0)[_0x5f56d9(0x1b4)]()+_0x148dc9[_0x5f56d9(0x192)](0x1)[_0x5f56d9(0x18b)]())[_0x5f56d9(0x1c1)]('');}static[a257_0x3a67e8(0x1c5)](_0x535f69){const _0x84509b=a257_0x3a67e8,_0x4e7e8f=_0x535f69[_0x84509b(0x19e)]('/')[_0x84509b(0x1c3)]()||_0x535f69;return _0x4e7e8f[_0x84509b(0x19e)]('-')[_0x84509b(0x1bf)](_0xa0ccd1=>_0xa0ccd1[_0x84509b(0x198)](0x0)[_0x84509b(0x1b4)]()+_0xa0ccd1['slice'](0x1)['toLowerCase']())[_0x84509b(0x1c1)]('\x20');}static['replaceContent'](_0x1f18ce,_0x3607ee,_0xdbc9f0){const _0x4927fb=a257_0x3a67e8,_0x4a44b4=this[_0x4927fb(0x1b9)](_0x3607ee),_0x29acf6=this[_0x4927fb(0x1c5)](_0x3607ee),{createdAt:_0x7b066e,createdDate:_0x1869b1,createdTime:_0x11a06c}=this[_0x4927fb(0x190)](new Date());let _0x56a5cf=_0x1f18ce[_0x4927fb(0x1ac)](/\{CliVersion\}/g,CLI_VERSION)[_0x4927fb(0x1ac)](/\{ComponentName\}/g,_0x4a44b4)[_0x4927fb(0x1ac)](/\{DisplayTitle\}/g,_0x29acf6)[_0x4927fb(0x1ac)](/\{PageName\}/g,_0x3607ee)[_0x4927fb(0x1ac)](/\{TemplateName\}/g,_0xdbc9f0)[_0x4927fb(0x1ac)](/\{CreatedAt\}/g,_0x7b066e)['replace'](/\{CreatedDate\}/g,_0x1869b1)[_0x4927fb(0x1ac)](/\{CreatedTime\}/g,_0x11a06c);return _0x56a5cf;}static[a257_0x3a67e8(0x1b1)](_0x3d30b4,_0x203f4e,_0x47fd8c,_0x2c0704,_0x124130,_0x5470c9,_0x29c4c2,_0x52207b){const _0x1e93ae=a257_0x3a67e8,_0x45232d=new Date(),_0x4c8da2=_0x45232d[_0x1e93ae(0x1ba)](),_0x508655=_0x47fd8c[_0x1e93ae(0x1bf)](_0x292bd3=>{const _0x43cc64=_0x1e93ae,_0x415ac3=[_0x43cc64(0x18d)+_0x292bd3[_0x43cc64(0x18f)]+'\x22',_0x43cc64(0x1a2)+_0x292bd3[_0x43cc64(0x17f)]+'\x22','name:\x20\x22'+_0x292bd3[_0x43cc64(0x19c)]+'\x22'];return _0x292bd3[_0x43cc64(0x1c2)]&&_0x415ac3[_0x43cc64(0x197)](_0x43cc64(0x185)+_0x292bd3[_0x43cc64(0x1c2)]+'\x22'),_0x43cc64(0x1a1)+_0x415ac3[_0x43cc64(0x1c1)](',\x20')+'\x20},';})[_0x1e93ae(0x1c1)](''),_0x56d395=_0x2c0704||_0x47fd8c[0x0]?.[_0x1e93ae(0x1c2)]||'YourModel';let _0xacb690=_0x3d30b4['replace'](/\{AppCode\}/g,_0x203f4e)['replace'](/\{ModelConfigs\}/g,_0x508655)[_0x1e93ae(0x1ac)](/\{ExampleModelName\}/g,_0x56d395)[_0x1e93ae(0x1ac)](/\{ApiFileName\}/g,_0x124130||'api')[_0x1e93ae(0x1ac)](/\{ConfigName\}/g,_0x5470c9||_0x1e93ae(0x194))[_0x1e93ae(0x1ac)](/\{ClientConfigParam\}/g,_0x29c4c2||'')[_0x1e93ae(0x1ac)](/\{VarPrefix\}/g,_0x52207b||_0x1e93ae(0x1a4))[_0x1e93ae(0x1ac)](/\{CreatedAt\}/g,_0x4c8da2);return _0xacb690;}static async['processTemplate'](_0x159b16,_0x4f6fd7,_0x1a3c7e,_0x4a4def,_0x403282=!![]){const _0x1ec31e=a257_0x3a67e8,_0x352568=Date['now']();try{_0x403282&&logger['info'](_0x1ec31e(0x1a7),_0x1ec31e(0x19a),{'templatePath':_0x159b16,'targetPath':_0x4f6fd7,'pageName':_0x1a3c7e,'templateName':_0x4a4def});await a257_0x4dfd38[_0x1ec31e(0x1c4)]['mkdir'](_0x4f6fd7,{'recursive':!![]}),await this['processDirectory'](_0x159b16,_0x4f6fd7,_0x1a3c7e,_0x4a4def);if(_0x403282){const _0x51a271=Date['now']()-_0x352568;logger[_0x1ec31e(0x1b7)](_0x1ec31e(0x1a7),_0x1ec31e(0x1c0),_0x51a271,{'pageName':_0x1a3c7e,'templateName':_0x4a4def});}}catch(_0x2ee39d){if(_0x403282){const _0xdcf89c=Date[_0x1ec31e(0x196)]()-_0x352568;logger[_0x1ec31e(0x1b2)](_0x1ec31e(0x1a7),_0x1ec31e(0x1b8),{'templatePath':_0x159b16,'targetPath':_0x4f6fd7,'pageName':_0x1a3c7e,'templateName':_0x4a4def,'error':_0x2ee39d instanceof Error?_0x2ee39d[_0x1ec31e(0x1b3)]:String(_0x2ee39d),'duration':_0xdcf89c});}throw _0x2ee39d;}}static async[a257_0x3a67e8(0x189)](_0x40da93,_0x1b5ec7,_0x2853e0,_0x132743){const _0x33f9cc=a257_0x3a67e8,_0xa2283b=await a257_0x4dfd38[_0x33f9cc(0x1c4)][_0x33f9cc(0x187)](_0x40da93,{'withFileTypes':!![]});for(const _0x9a9306 of _0xa2283b){const _0x5e4990=a257_0x681b0c[_0x33f9cc(0x1c1)](_0x40da93,_0x9a9306['name']);let _0x1ae809=a257_0x681b0c[_0x33f9cc(0x1c1)](_0x1b5ec7,_0x9a9306[_0x33f9cc(0x19c)]);_0x9a9306[_0x33f9cc(0x19c)][_0x33f9cc(0x1a8)](_0x33f9cc(0x180))&&(_0x1ae809=a257_0x681b0c[_0x33f9cc(0x1c1)](_0x1b5ec7,_0x9a9306['name'][_0x33f9cc(0x1ac)](/\.tpl$/,'')));if(_0x9a9306[_0x33f9cc(0x181)]())await a257_0x4dfd38[_0x33f9cc(0x1c4)][_0x33f9cc(0x186)](_0x1ae809,{'recursive':!![]}),await this['processDirectory'](_0x5e4990,_0x1ae809,_0x2853e0,_0x132743);else _0x9a9306[_0x33f9cc(0x1ae)]()&&await this[_0x33f9cc(0x1a0)](_0x5e4990,_0x1ae809,_0x2853e0,_0x132743);}}static async[a257_0x3a67e8(0x1a0)](_0x266a10,_0x442b87,_0x5b6e77,_0x61a10f){const _0x53d769=a257_0x3a67e8,_0x3a6e23=a257_0x681b0c[_0x53d769(0x1a3)](_0x266a10)['toLowerCase']();_0x266a10[_0x53d769(0x1a8)](_0x53d769(0x180))&&(_0x442b87=_0x442b87[_0x53d769(0x1ac)](/\.tpl$/,''));const _0x3f6a4b=[_0x53d769(0x18e),'.ts',_0x53d769(0x19b),_0x53d769(0x1aa),_0x53d769(0x188),_0x53d769(0x1bb),'.css',_0x53d769(0x182),'.tpl'];if(_0x3f6a4b[_0x53d769(0x18c)](_0x3a6e23)||_0x266a10[_0x53d769(0x1a8)]('.tpl')){const _0x485ad5=await a257_0x4dfd38[_0x53d769(0x1c4)][_0x53d769(0x1ad)](_0x266a10,_0x53d769(0x199)),_0x3435d7=this[_0x53d769(0x191)](_0x485ad5,_0x5b6e77,_0x61a10f);await a257_0x4dfd38['promises'][_0x53d769(0x1bc)](_0x442b87,_0x3435d7,_0x53d769(0x199));}else await a257_0x4dfd38[_0x53d769(0x1c4)][_0x53d769(0x17d)](_0x266a10,_0x442b87);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x51a13e,_0xd937a7){const _0x448bcc=a258_0x4732,_0x58f8c3=_0x51a13e();while(!![]){try{const _0x34c7d7=parseInt(_0x448bcc(0x176))/0x1+parseInt(_0x448bcc(0x184))/0x2+parseInt(_0x448bcc(0x18b))/0x3+parseInt(_0x448bcc(0x177))/0x4*(parseInt(_0x448bcc(0x181))/0x5)+parseInt(_0x448bcc(0x17e))/0x6*(-parseInt(_0x448bcc(0x175))/0x7)+-parseInt(_0x448bcc(0x179))/0x8+parseInt(_0x448bcc(0x18a))/0x9*(parseInt(_0x448bcc(0x182))/0xa);if(_0x34c7d7===_0xd937a7)break;else _0x58f8c3['push'](_0x58f8c3['shift']());}catch(_0x4d337e){_0x58f8c3['push'](_0x58f8c3['shift']());}}}(a258_0x1dda,0x9824e));function a258_0x1dda(){const _0x9c91d5=['lastNotifiedAt','gte','18QelPRb','326796hPYMdN','utf8','object','469lkAAXU','704944RBNHnU','4JliMMo','yes','6742784eniRty','\x20update','update-check.json','trim','parse','50826qrxdkc',',\x20run:\x20','valid','502595cONwQf','1006330CcNiZD','.cache','1835852zsMCNl','lastNotifiedVersion','toLowerCase','checkedAt'];a258_0x1dda=function(){return _0x9c91d5;};return a258_0x1dda();}import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';import a258_0x42eb79 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 a258_0x4732(_0x43671d,_0x24400d){_0x43671d=_0x43671d-0x174;const _0x1ddacd=a258_0x1dda();let _0x4732a6=_0x1ddacd[_0x43671d];return _0x4732a6;}function isUpdateNoticeDisabled(){const _0x2662eb=a258_0x4732,_0x3b2c9d=process.env.RABETBASE_NO_UPDATE_NOTICE?.[_0x2662eb(0x17c)]()[_0x2662eb(0x186)]();return _0x3b2c9d==='1'||_0x3b2c9d==='true'||_0x3b2c9d===_0x2662eb(0x178);}function cacheRoot(){const _0x11e98c=a258_0x4732;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0x11e98c(0x183));}export function getUpdateNoticeCachePath(){const _0x5b818b=a258_0x4732;return join(cacheRoot(),'rabetbase-cli',_0x5b818b(0x17b));}async function readUpdateNoticeCache(){const _0x55e889=a258_0x4732;try{const _0x291825=await readFile(getUpdateNoticeCachePath(),_0x55e889(0x18c)),_0x3e2c7b=JSON[_0x55e889(0x17d)](_0x291825);if(!_0x3e2c7b||typeof _0x3e2c7b!==_0x55e889(0x174))return{};return _0x3e2c7b;}catch{return{};}}async function writeUpdateNoticeCache(_0x1c9cd5){try{const _0x1329be=getUpdateNoticeCachePath();await mkdir(dirname(_0x1329be),{'recursive':!![]}),await writeFile(_0x1329be,JSON['stringify'](_0x1c9cd5,null,0x2)+'\x0a','utf8');}catch{}}function isFreshCheck(_0x10f854,_0x258a0f){const _0x1cb982=a258_0x4732;return typeof _0x10f854[_0x1cb982(0x187)]==='number'&&_0x258a0f-_0x10f854[_0x1cb982(0x187)]<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x42a8f3,_0x517c25,_0xac44fe){const _0x15c133=a258_0x4732;return _0x42a8f3[_0x15c133(0x185)]===_0x517c25&&typeof _0x42a8f3[_0x15c133(0x188)]==='number'&&_0xac44fe-_0x42a8f3[_0x15c133(0x188)]<UPDATE_NOTICE_TTL_MS;}export function buildNpmVersionUrl(_0x713cea){return'https://www.npmjs.com/package/'+NPM_PACKAGE_NAME+'/v/'+_0x713cea;}export async function resolveLatestUpdateNotice(){const _0x297fdf=a258_0x4732;if(isUpdateNoticeDisabled())return null;try{const _0x2ee661=Date['now'](),_0x48a848=getCliVersion(),_0x2b83ab=await readUpdateNoticeCache();let _0x27d809=isFreshCheck(_0x2b83ab,_0x2ee661)?_0x2b83ab['latest']?.['trim']():undefined;if(!_0x27d809&&!isFreshCheck(_0x2b83ab,_0x2ee661)){const _0x2ea190=await getCliVersionPolicy();_0x27d809=_0x2ea190?.['stableVersion']?.[_0x297fdf(0x17c)]()||undefined,await writeUpdateNoticeCache({..._0x2b83ab,'checkedAt':_0x2ee661,'latest':_0x27d809,'failed':!_0x27d809});}if(!_0x27d809||!a258_0x42eb79[_0x297fdf(0x180)](_0x48a848)||!a258_0x42eb79[_0x297fdf(0x180)](_0x27d809))return null;if(a258_0x42eb79[_0x297fdf(0x189)](_0x48a848,_0x27d809))return null;if(isRecentlyNotified(_0x2b83ab,_0x27d809,_0x2ee661))return null;const _0x36f1ab=CLI_BIN_NAME+_0x297fdf(0x17a);return await writeUpdateNoticeCache({..._0x2b83ab,'checkedAt':isFreshCheck(_0x2b83ab,_0x2ee661)?_0x2b83ab['checkedAt']:_0x2ee661,'latest':_0x27d809,'failed':![],'lastNotifiedVersion':_0x27d809,'lastNotifiedAt':_0x2ee661}),{'command':_0x36f1ab,'current':_0x48a848,'latest':_0x27d809,'url':buildNpmVersionUrl(_0x27d809),'message':CLI_BIN_NAME+'\x20'+_0x27d809+'\x20available,\x20current\x20'+_0x48a848+_0x297fdf(0x17f)+_0x36f1ab};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x10b26d,_0x9a1545){var _0x992c95=a259_0x199a,_0x351d97=_0x10b26d();while(!![]){try{var _0x3ddda5=-parseInt(_0x992c95(0x79))/0x1*(-parseInt(_0x992c95(0x7f))/0x2)+parseInt(_0x992c95(0x7d))/0x3+-parseInt(_0x992c95(0x7b))/0x4+-parseInt(_0x992c95(0x80))/0x5+-parseInt(_0x992c95(0x7e))/0x6*(parseInt(_0x992c95(0x82))/0x7)+-parseInt(_0x992c95(0x7c))/0x8*(-parseInt(_0x992c95(0x83))/0x9)+-parseInt(_0x992c95(0x81))/0xa*(-parseInt(_0x992c95(0x7a))/0xb);if(_0x3ddda5===_0x9a1545)break;else _0x351d97['push'](_0x351d97['shift']());}catch(_0x44827f){_0x351d97['push'](_0x351d97['shift']());}}}(a259_0x21c7,0x237f2));import{VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}function a259_0x199a(_0x46a04a,_0x243122){_0x46a04a=_0x46a04a-0x79;var _0x21c7d9=a259_0x21c7();var _0x199ab7=_0x21c7d9[_0x46a04a];return _0x199ab7;}function a259_0x21c7(){var _0x12f8d5=['567RdOImW','909DqNMFk','1OePpYP','401170QnURck','762900dcBvKL','12112KYPCfX','245190YCwTuY','10284jypJOq','474662IgAOhl','1443910WZuNKy','80buVand'];a259_0x21c7=function(){return _0x12f8d5;};return a259_0x21c7();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a260_0x4791(){var _0x1ce4e3=['19580oLkjfn','2755208GpvHjz','16170348gXrEty','1512838fkPtqA','11DmoKZW','100BztqvG','128664YANSNi','99415LACZYU','16BDEELw','3SAqVQG','228lGLqAD','796383ngjVza'];a260_0x4791=function(){return _0x1ce4e3;};return a260_0x4791();}(function(_0x471500,_0x530384){var _0x38ae71=a260_0x6df9,_0xb4b635=_0x471500();while(!![]){try{var _0x238443=parseInt(_0x38ae71(0x1a1))/0x1+-parseInt(_0x38ae71(0x1a4))/0x2*(parseInt(_0x38ae71(0x19e))/0x3)+parseInt(_0x38ae71(0x1a2))/0x4+parseInt(_0x38ae71(0x19c))/0x5*(-parseInt(_0x38ae71(0x19f))/0x6)+-parseInt(_0x38ae71(0x1a0))/0x7*(parseInt(_0x38ae71(0x19d))/0x8)+-parseInt(_0x38ae71(0x19b))/0x9*(-parseInt(_0x38ae71(0x19a))/0xa)+parseInt(_0x38ae71(0x1a5))/0xb*(parseInt(_0x38ae71(0x1a3))/0xc);if(_0x238443===_0x530384)break;else _0xb4b635['push'](_0xb4b635['shift']());}catch(_0xd0552e){_0xb4b635['push'](_0xb4b635['shift']());}}}(a260_0x4791,0x70260));import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';function a260_0x6df9(_0x40d61e,_0xfdae6e){_0x40d61e=_0x40d61e-0x19a;var _0x4791d8=a260_0x4791();var _0x6df9f4=_0x4791d8[_0x40d61e];return _0x6df9f4;}export async function withActiveCookie(_0x24b8c2,_0x558a34){setActiveCookie(_0x24b8c2);try{return await _0x558a34();}finally{clearActiveCookie();}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x551c5e,_0x1f46bc){var _0x38ca7d=a261_0x222e,_0x375f4a=_0x551c5e();while(!![]){try{var _0x307b99=parseInt(_0x38ca7d(0x140))/0x1*(parseInt(_0x38ca7d(0x144))/0x2)+-parseInt(_0x38ca7d(0x142))/0x3*(parseInt(_0x38ca7d(0x146))/0x4)+-parseInt(_0x38ca7d(0x13f))/0x5+parseInt(_0x38ca7d(0x147))/0x6+parseInt(_0x38ca7d(0x13d))/0x7+parseInt(_0x38ca7d(0x143))/0x8+parseInt(_0x38ca7d(0x13e))/0x9*(-parseInt(_0x38ca7d(0x145))/0xa);if(_0x307b99===_0x1f46bc)break;else _0x375f4a['push'](_0x375f4a['shift']());}catch(_0x311cc0){_0x375f4a['push'](_0x375f4a['shift']());}}}(a261_0x288d,0xd973c));function a261_0x288d(){var _0xd05c93=['996MlKfva','6473862ySdNwq','stderr','9612169MqpCxY','36pdbpdz','3599990AnpDrn','1BBwHCd','write','20301EvIPuF','1437152FgaGix','2120578eAlQev','991030HjnYeo'];a261_0x288d=function(){return _0xd05c93;};return a261_0x288d();}function a261_0x222e(_0x5baa65,_0x4a98c9){_0x5baa65=_0x5baa65-0x13c;var _0x288d62=a261_0x288d();var _0x222e67=_0x288d62[_0x5baa65];return _0x222e67;}export function writeCliSideChannelLine(_0x156b3f){var _0x2cab86=a261_0x222e;process[_0x2cab86(0x13c)][_0x2cab86(0x141)](_0x156b3f+'\x0a');}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lovrabet/rabetbase-cli",
|
|
3
|
-
"version": "2.3.9
|
|
3
|
+
"version": "2.3.9",
|
|
4
4
|
"description": "Developer CLI for Lovrabet apps, datasets, pages, SQL, BFF, database connections, skills, and AI agent workflows.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"keywords": [
|