@lovrabet/rabetbase-cli 2.3.5-beta.1 → 2.3.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/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/dry-run.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/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/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/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/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-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 +1 -1
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a233_0x239c0b=a233_0x4003;(function(_0x3d3841,_0xb02ced){const _0x964004=a233_0x4003,_0x3bf72b=_0x3d3841();while(!![]){try{const _0x27d124=-parseInt(_0x964004(0x1b7))/0x1*(parseInt(_0x964004(0x1d4))/0x2)+parseInt(_0x964004(0x1e1))/0x3*(-parseInt(_0x964004(0x1da))/0x4)+-parseInt(_0x964004(0x1dc))/0x5+-parseInt(_0x964004(0x1b9))/0x6+-parseInt(_0x964004(0x1d7))/0x7+-parseInt(_0x964004(0x1e8))/0x8+parseInt(_0x964004(0x1b4))/0x9*(parseInt(_0x964004(0x1c9))/0xa);if(_0x27d124===_0xb02ced)break;else _0x3bf72b['push'](_0x3bf72b['shift']());}catch(_0x2bb552){_0x3bf72b['push'](_0x3bf72b['shift']());}}}(a233_0x59bc,0x2e2a9));function a233_0x4003(_0x1358b4,_0x2687dd){_0x1358b4=_0x1358b4-0x1af;const _0x59bcb7=a233_0x59bc();let _0x40032b=_0x59bcb7[_0x1358b4];return _0x40032b;}import a233_0x375475 from'winston';import a233_0x3486b7 from'node:fs';import a233_0xa5a94e from'node:path';function a233_0x59bc(){const _0x26c0e4=['green','setRawCommand','开始执行:\x20','20swRnyc','combine','writeFileSync','2601333gzCAhx','split','duration','13096yCAqfG','完成:\x20','1763215FPoeWT','utf8','失败:\x20','Failed\x20to\x20clear\x20logs:','rawCommand','132ojZmZi','now','yellow','existsSync','transports','command','toISOString','2720328NHJGnI','Failed\x20to\x20read\x20logs:','blue','info','join','errors','.lovrabet.log','1378395iXAYyV','mkdirSync','timestamp','4763RjdmjT','details','1437714aOngIE','dirname','readLogs','level','readFileSync','log','clear','createLogger','success','clearLogs','printf','map','red','format','error','setLogPath','110YeArtY','currentRawCommand','warn','getWinstonInstance','winstonLogger','message','logTask','logFilePath'];a233_0x59bc=function(){return _0x26c0e4;};return a233_0x59bc();}class Logger{[a233_0x239c0b(0x1cd)];['logFilePath'];[a233_0x239c0b(0x1ca)]='';constructor(){const _0x5b4cf2=a233_0x239c0b;this[_0x5b4cf2(0x1d0)]='';}[a233_0x239c0b(0x1d2)](_0x4ac59e){const _0x8c8617=a233_0x239c0b;this[_0x8c8617(0x1ca)]=_0x4ac59e;}['initWinstonLogger'](){const _0x4fb1d1=a233_0x239c0b,_0x3cb174=a233_0xa5a94e[_0x4fb1d1(0x1ba)](this[_0x4fb1d1(0x1d0)]);!a233_0x3486b7[_0x4fb1d1(0x1e4)](_0x3cb174)&&a233_0x3486b7[_0x4fb1d1(0x1b5)](_0x3cb174,{'recursive':!![]});const _0x4cf2f6=a233_0x375475[_0x4fb1d1(0x1c6)][_0x4fb1d1(0x1d5)](a233_0x375475[_0x4fb1d1(0x1c6)][_0x4fb1d1(0x1b6)](),a233_0x375475[_0x4fb1d1(0x1c6)][_0x4fb1d1(0x1b2)]({'stack':!![]}),a233_0x375475[_0x4fb1d1(0x1c6)][_0x4fb1d1(0x1c3)](_0x5cf756=>{const _0x5b30c0=_0x4fb1d1,_0x575bef={'timestamp':_0x5cf756[_0x5b30c0(0x1b6)]||new Date()[_0x5b30c0(0x1e7)](),'level':_0x5cf756[_0x5b30c0(0x1bc)]||_0x5b30c0(0x1b0),'command':_0x5cf756[_0x5b30c0(0x1e6)]||'unknown','rawCommand':_0x5cf756[_0x5b30c0(0x1e0)]||this[_0x5b30c0(0x1ca)]||undefined,'message':_0x5cf756[_0x5b30c0(0x1ce)]||'','duration':_0x5cf756[_0x5b30c0(0x1d9)]||undefined,'details':_0x5cf756[_0x5b30c0(0x1b8)]||undefined};return JSON['stringify'](_0x575bef);}));this[_0x4fb1d1(0x1cd)]=a233_0x375475[_0x4fb1d1(0x1c0)]({'level':'info','format':_0x4cf2f6,'transports':[new a233_0x375475[(_0x4fb1d1(0x1e5))]['File']({'filename':this['logFilePath'],'level':'info'})],'silent':![]}),a233_0x375475['addColors']({'success':_0x4fb1d1(0x1d1),'error':_0x4fb1d1(0x1c5),'warn':_0x4fb1d1(0x1e3),'info':_0x4fb1d1(0x1af)});}[a233_0x239c0b(0x1c8)](_0x1eae1c){const _0x423868=a233_0x239c0b;this[_0x423868(0x1d0)]=a233_0xa5a94e[_0x423868(0x1b1)](_0x1eae1c,_0x423868(0x1b3)),this[_0x423868(0x1cd)]&&this[_0x423868(0x1cd)][_0x423868(0x1bf)](),this['initWinstonLogger']();}[a233_0x239c0b(0x1b0)](_0x67e2d1,_0x5b2142,_0x3e505a){const _0x5fa0d1=a233_0x239c0b;if(!this[_0x5fa0d1(0x1d0)]||!this[_0x5fa0d1(0x1cd)])return;this[_0x5fa0d1(0x1cd)]['info'](_0x5b2142,{'command':_0x67e2d1,'details':_0x3e505a});}[a233_0x239c0b(0x1c1)](_0x463fdc,_0x43e945,_0x591936,_0x2e6683){const _0x5da844=a233_0x239c0b;if(!this[_0x5da844(0x1d0)]||!this[_0x5da844(0x1cd)])return;this[_0x5da844(0x1cd)][_0x5da844(0x1be)](_0x5da844(0x1b0),_0x43e945,{'level':'success','command':_0x463fdc,'duration':_0x591936,'details':_0x2e6683});}[a233_0x239c0b(0x1c7)](_0x54fb62,_0xb53ee3,_0x160e0a){const _0xa648ca=a233_0x239c0b;if(!this['logFilePath']||!this[_0xa648ca(0x1cd)])return;this[_0xa648ca(0x1cd)]['error'](_0xb53ee3,{'command':_0x54fb62,'details':_0x160e0a});}[a233_0x239c0b(0x1cb)](_0x7e3dc5,_0x2c36e4,_0x3dbb5a){const _0x25e79f=a233_0x239c0b;if(!this['logFilePath']||!this['winstonLogger'])return;this[_0x25e79f(0x1cd)][_0x25e79f(0x1cb)](_0x2c36e4,{'command':_0x7e3dc5,'details':_0x3dbb5a});}async[a233_0x239c0b(0x1cf)](_0x105698,_0x39b220,_0x49996b){const _0x26eb6c=a233_0x239c0b,_0x9d8f6a=Date['now']();this[_0x26eb6c(0x1b0)](_0x105698,_0x26eb6c(0x1d3)+_0x39b220);try{const _0x3b6b74=await _0x49996b(),_0x38db64=Date[_0x26eb6c(0x1e2)]()-_0x9d8f6a;return this['success'](_0x105698,_0x26eb6c(0x1db)+_0x39b220,_0x38db64),_0x3b6b74;}catch(_0x2353e9){const _0x3f12ce=Date[_0x26eb6c(0x1e2)]()-_0x9d8f6a;this[_0x26eb6c(0x1c7)](_0x105698,_0x26eb6c(0x1de)+_0x39b220,{'error':_0x2353e9 instanceof Error?_0x2353e9['message']:String(_0x2353e9),'duration':_0x3f12ce});throw _0x2353e9;}}[a233_0x239c0b(0x1bb)](){const _0x327fad=a233_0x239c0b;try{if(!a233_0x3486b7[_0x327fad(0x1e4)](this[_0x327fad(0x1d0)]))return[];const _0x2e8217=a233_0x3486b7[_0x327fad(0x1bd)](this['logFilePath'],_0x327fad(0x1dd));return _0x2e8217[_0x327fad(0x1d8)]('\x0a')['filter'](_0x14549d=>_0x14549d['trim']())[_0x327fad(0x1c4)](_0x122fb8=>JSON['parse'](_0x122fb8));}catch(_0x37e282){return console[_0x327fad(0x1cb)](_0x327fad(0x1e9),_0x37e282),[];}}[a233_0x239c0b(0x1c2)](){const _0x5e3af7=a233_0x239c0b;try{a233_0x3486b7['existsSync'](this[_0x5e3af7(0x1d0)])&&a233_0x3486b7[_0x5e3af7(0x1d6)](this['logFilePath'],'','utf8');}catch(_0x373f47){console['warn'](_0x5e3af7(0x1df),_0x373f47);}}[a233_0x239c0b(0x1cc)](){const _0x1c0910=a233_0x239c0b;return this[_0x1c0910(0x1cd)];}}export const logger=new Logger();
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2b1328,_0x31d9e1){const _0x2815f0=a234_0x25de,_0xcb4dee=_0x2b1328();while(!![]){try{const _0x2dfeec=-parseInt(_0x2815f0(0x7f))/0x1*(-parseInt(_0x2815f0(0x7a))/0x2)+parseInt(_0x2815f0(0x79))/0x3+-parseInt(_0x2815f0(0x81))/0x4+-parseInt(_0x2815f0(0x73))/0x5*(parseInt(_0x2815f0(0x7d))/0x6)+-parseInt(_0x2815f0(0x7e))/0x7+-parseInt(_0x2815f0(0x7b))/0x8+-parseInt(_0x2815f0(0x75))/0x9*(-parseInt(_0x2815f0(0x74))/0xa);if(_0x2dfeec===_0x31d9e1)break;else _0xcb4dee['push'](_0xcb4dee['shift']());}catch(_0x25666a){_0xcb4dee['push'](_0xcb4dee['shift']());}}}(a234_0x5b95,0x882aa));import{CliErrors}from'../errors.js';function a234_0x25de(_0x434f58,_0x4b1edc){_0x434f58=_0x434f58-0x73;const _0x5b9585=a234_0x5b95();let _0x25de69=_0x5b9585[_0x434f58];return _0x25de69;}function a234_0x5b95(){const _0x253255=['--params\x20must\x20be\x20a\x20JSON\x20object','2069949GXdlmG','28mUwPMU','2451144rSjYZJ','validation','1302EAlUZv','1145900HnqfSX','19814QjIbLd','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','3803664NpnZBI','13890fdwLvk','8070970dBprdZ','18jfiySt','object','parse'];a234_0x5b95=function(){return _0x253255;};return a234_0x5b95();}export function parseJsonParams(_0x5ec7c8){const _0x15d10c=a234_0x25de;if(!_0x5ec7c8)return undefined;let _0x848ce;try{_0x848ce=JSON[_0x15d10c(0x77)](_0x5ec7c8);}catch{throw CliErrors[_0x15d10c(0x7c)]('Invalid\x20JSON\x20for\x20--params:\x20'+_0x5ec7c8);}if(!_0x848ce||typeof _0x848ce!==_0x15d10c(0x76)||Array['isArray'](_0x848ce))throw CliErrors[_0x15d10c(0x7c)](_0x15d10c(0x78),_0x15d10c(0x80));return _0x848ce;}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a235_0x48e469=a235_0xc780;function a235_0x17fa(){const _0x1c3c37=['169281NhXVXf','platform','208UrExgE','842177JcDhGv','win32','2202rWlTXd','30454932JwzeQC','6AZlDuc','2972DGdEmD','662848klvRIS','7150825GkEtYZ','13lQLGDs','3205nyTuFp','2tMmVpI','10NlILcT'];a235_0x17fa=function(){return _0x1c3c37;};return a235_0x17fa();}(function(_0x1b2ef1,_0x1d3c81){const _0x8aa3f2=a235_0xc780,_0x34f68e=_0x1b2ef1();while(!![]){try{const _0x212b5d=-parseInt(_0x8aa3f2(0x1c6))/0x1+parseInt(_0x8aa3f2(0x1bb))/0x2*(-parseInt(_0x8aa3f2(0x1c2))/0x3)+parseInt(_0x8aa3f2(0x1c5))/0x4*(-parseInt(_0x8aa3f2(0x1ba))/0x5)+-parseInt(_0x8aa3f2(0x1c4))/0x6*(-parseInt(_0x8aa3f2(0x1c0))/0x7)+-parseInt(_0x8aa3f2(0x1bf))/0x8*(parseInt(_0x8aa3f2(0x1bd))/0x9)+-parseInt(_0x8aa3f2(0x1bc))/0xa*(parseInt(_0x8aa3f2(0x1b8))/0xb)+-parseInt(_0x8aa3f2(0x1c3))/0xc*(-parseInt(_0x8aa3f2(0x1b9))/0xd);if(_0x212b5d===_0x1d3c81)break;else _0x34f68e['push'](_0x34f68e['shift']());}catch(_0x40f03f){_0x34f68e['push'](_0x34f68e['shift']());}}}(a235_0x17fa,0x5c984));export const isWindows=process[a235_0x48e469(0x1be)]===a235_0x48e469(0x1c1);function a235_0xc780(_0x378168,_0x5ccff5){_0x378168=_0x378168-0x1b8;const _0x17faa8=a235_0x17fa();let _0xc78025=_0x17faa8[_0x378168];return _0xc78025;}export function resolveNpmBin(_0x126801){return isWindows?_0x126801+'.cmd':_0x126801;}
|
package/lib/utils/rules-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a236_0x359ff0=a236_0x5cf8;(function(_0x3875bb,_0x434ca1){const _0xe999b3=a236_0x5cf8,_0x331efa=_0x3875bb();while(!![]){try{const _0x3b2d80=-parseInt(_0xe999b3(0x9a))/0x1+parseInt(_0xe999b3(0xa0))/0x2+-parseInt(_0xe999b3(0xa5))/0x3+-parseInt(_0xe999b3(0x9f))/0x4+parseInt(_0xe999b3(0xa8))/0x5*(-parseInt(_0xe999b3(0xaa))/0x6)+-parseInt(_0xe999b3(0x98))/0x7*(-parseInt(_0xe999b3(0x9b))/0x8)+parseInt(_0xe999b3(0xa7))/0x9*(parseInt(_0xe999b3(0xa6))/0xa);if(_0x3b2d80===_0x434ca1)break;else _0x331efa['push'](_0x331efa['shift']());}catch(_0x51a4a7){_0x331efa['push'](_0x331efa['shift']());}}}(a236_0x4187,0x9b7d9));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 _0x25a4d6=a236_0x5cf8,_0x4e5ac9=getTemplateBaseUrl();return _0x4e5ac9+_0x25a4d6(0x99);}const LOCAL_TEMPLATE_PATH=resolve(__dirname,a236_0x359ff0(0xa3));export async function fetchRulesFromCDN(){const _0x477010=a236_0x359ff0,_0x2101fe=getRulesCdnUrl(),_0x407973=await fetch(_0x2101fe,{'headers':{'Accept':_0x477010(0x9d)}});if(!_0x407973['ok'])throw new Error('CDN\x20请求失败:\x20'+_0x407973[_0x477010(0xa2)]+'\x20'+_0x407973[_0x477010(0x97)]);const _0x1f9bf8=await _0x407973[_0x477010(0xac)]();if(!_0x1f9bf8[_0x477010(0xa4)]||typeof _0x1f9bf8['content']!==_0x477010(0x9c))throw new Error(_0x477010(0xab));return _0x1f9bf8;}export async function getRulesContent(){const _0x34087b=a236_0x359ff0;try{const _0x5382d8=await fetchRulesFromCDN();return _0x5382d8[_0x34087b(0xa4)];}catch{return readLocalTemplate();}}export function readLocalTemplate(){const _0x29c2ec=a236_0x359ff0;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,_0x29c2ec(0x96));throw new Error('本地模板文件不存在:\x20'+LOCAL_TEMPLATE_PATH);}export async function writeRulesFile(_0x4867c9){const _0x4ea0dc=a236_0x359ff0,_0x1a4970=await fetchRulesFromCDN()[_0x4ea0dc(0x9e)](()=>null);let _0x8fcf31;_0x1a4970?(_0x8fcf31=_0x1a4970[_0x4ea0dc(0xa4)],_0x1a4970[_0x4ea0dc(0xad)]&&(_0x8fcf31=appendUpdateTime(_0x8fcf31,_0x1a4970['lastUpdated']))):_0x8fcf31=readLocalTemplate();const _0x2472f0=dirname(_0x4867c9);!existsSync(_0x2472f0)&&mkdirSync(_0x2472f0,{'recursive':!![]}),writeFileSync(_0x4867c9,_0x8fcf31,_0x4ea0dc(0x96));}export async function copyRulesToCursor(_0x47a7a8){const _0x51b9b8=a236_0x359ff0,_0x4f19c7=join(_0x47a7a8,'.cursor/rules'),_0x16c14d=join(_0x4f19c7,_0x51b9b8(0xa9));if(existsSync(_0x16c14d))return![];return await writeRulesFile(_0x16c14d),!![];}export async function copyRulesToAgentsMd(_0x555015){const _0x141a5=a236_0x359ff0,_0x3100f5=join(_0x555015,_0x141a5(0xa1));if(existsSync(_0x3100f5))return![];return await writeRulesFile(_0x3100f5),!![];}function a236_0x5cf8(_0x182e5a,_0x3b1c07){_0x182e5a=_0x182e5a-0x96;const _0x418769=a236_0x4187();let _0x5cf860=_0x418769[_0x182e5a];return _0x5cf860;}function a236_0x4187(){const _0x2ed04c=['1069632kNxtPW','226330qMdagA','1197BaNoDf','350HRkgpA','lovrabet_rules.mdc','89868WUmpQx','CDN\x20返回数据格式错误','json','lastUpdated','utf-8','statusText','56LIplqB','/rules/rules.json','986001yehXIa','43976GGyFnP','string','application/json','catch','1128768Okovtf','511842ThPrKe','agents.md','status','../../templates/rules/lovrabet_rules.mdc.tpl','content'];a236_0x4187=function(){return _0x2ed04c;};return a236_0x4187();}
|
package/lib/utils/sleep.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function sleep(
|
|
1
|
+
export function sleep(_0x4fd504){return new Promise(_0x58bb59=>setTimeout(_0x58bb59,_0x4fd504));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a238_0x23a7(){const _0x421277=['6492sURcCe','1683955QfeoJx','charAt','toDisplayTitle','info','template','.css','\x0a\x20\x20\x20\x20{\x20','13434vkAleX','api','.ts','tableName','YourModel','error','processTemplate','540134ReKxVH','mkdir','replaceContent','.tpl','message','padStart','endsWith','100fzSbgt','alias:\x20\x22','map','join','readdir','1YRLXGT','1140UVytPN','replaceApiContent','模板内容替换完成','readFile','.js','getFullYear','toISOString','toComponentName','now','2937ZaeprO','pop','.scss','388EXEhbG','.jsx','formatLocalTimestamp','LOVRABET','slice','copyFile','getMinutes','30984ztwOmP','utf8','pad','replace','name','getHours','alias','开始处理模板内容替换','toUpperCase','promises','177JSSpCo','push','isFile','split','name:\x20\x22','16yCFLHE','getSeconds','isDirectory','27tIoymp','success','writeFile','模板内容替换失败','toLowerCase','datasetCode:\x20\x22','processDirectory','getMonth','includes','processFile'];a238_0x23a7=function(){return _0x421277;};return a238_0x23a7();}const a238_0x4b4465=a238_0x29a5;(function(_0x5ca57d,_0x4c4028){const _0x15f644=a238_0x29a5,_0x5c6ddf=_0x5ca57d();while(!![]){try{const _0x54c0a2=-parseInt(_0x15f644(0x16e))/0x1*(parseInt(_0x15f644(0x137))/0x2)+parseInt(_0x15f644(0x141))/0x3*(-parseInt(_0x15f644(0x130))/0x4)+-parseInt(_0x15f644(0x169))/0x5*(parseInt(_0x15f644(0x15b))/0x6)+-parseInt(_0x15f644(0x162))/0x7*(-parseInt(_0x15f644(0x146))/0x8)+parseInt(_0x15f644(0x149))/0x9*(-parseInt(_0x15f644(0x16f))/0xa)+parseInt(_0x15f644(0x12d))/0xb*(parseInt(_0x15f644(0x153))/0xc)+-parseInt(_0x15f644(0x154))/0xd;if(_0x54c0a2===_0x4c4028)break;else _0x5c6ddf['push'](_0x5c6ddf['shift']());}catch(_0x23dbea){_0x5c6ddf['push'](_0x5c6ddf['shift']());}}}(a238_0x23a7,0x191f3));import a238_0x1f1ef9 from'node:fs';import a238_0x268e78 from'node:path';function a238_0x29a5(_0x5895c5,_0x36a5e5){_0x5895c5=_0x5895c5-0x12c;const _0x23a718=a238_0x23a7();let _0x29a5b1=_0x23a718[_0x5895c5];return _0x29a5b1;}import{logger}from'../utils/logger.js';import{getCliVersion}from'../utils/version.js';const CLI_VERSION=getCliVersion();export class TemplateReplacer{static[a238_0x4b4465(0x139)](_0x56117e){const _0x198c40=a238_0x4b4465;return String(_0x56117e)[_0x198c40(0x167)](0x2,'0');}static['formatLocalTimestamp'](_0x229122){const _0x375caa=a238_0x4b4465,_0x5a9306=_0x229122[_0x375caa(0x174)](),_0x1b8d9c=this[_0x375caa(0x139)](_0x229122[_0x375caa(0x150)]()+0x1),_0xbf4db9=this['pad'](_0x229122['getDate']()),_0xedf332=this[_0x375caa(0x139)](_0x229122[_0x375caa(0x13c)]()),_0x817268=this['pad'](_0x229122[_0x375caa(0x136)]()),_0xce1bbe=this[_0x375caa(0x139)](_0x229122[_0x375caa(0x147)]());return{'createdAt':_0x5a9306+'-'+_0x1b8d9c+'-'+_0xbf4db9+'\x20'+_0xedf332+':'+_0x817268+':'+_0xce1bbe,'createdDate':_0x5a9306+'-'+_0x1b8d9c+'-'+_0xbf4db9,'createdTime':_0xedf332+':'+_0x817268+':'+_0xce1bbe};}static[a238_0x4b4465(0x176)](_0x88eaa5){const _0x57b83d=a238_0x4b4465,_0x55071a=_0x88eaa5[_0x57b83d(0x144)]('/')[_0x57b83d(0x12e)]()||_0x88eaa5;return _0x55071a[_0x57b83d(0x144)]('-')[_0x57b83d(0x16b)](_0x483916=>_0x483916[_0x57b83d(0x155)](0x0)[_0x57b83d(0x13f)]()+_0x483916[_0x57b83d(0x134)](0x1)['toLowerCase']())[_0x57b83d(0x16c)]('');}static[a238_0x4b4465(0x156)](_0xab1330){const _0x1c13c2=a238_0x4b4465,_0x1552c2=_0xab1330[_0x1c13c2(0x144)]('/')[_0x1c13c2(0x12e)]()||_0xab1330;return _0x1552c2[_0x1c13c2(0x144)]('-')[_0x1c13c2(0x16b)](_0x31ec71=>_0x31ec71[_0x1c13c2(0x155)](0x0)[_0x1c13c2(0x13f)]()+_0x31ec71['slice'](0x1)[_0x1c13c2(0x14d)]())[_0x1c13c2(0x16c)]('\x20');}static[a238_0x4b4465(0x164)](_0x205487,_0x224fbf,_0x3ad5c5){const _0x396d8e=a238_0x4b4465,_0x6835b7=this['toComponentName'](_0x224fbf),_0x41b205=this['toDisplayTitle'](_0x224fbf),{createdAt:_0xbefd2f,createdDate:_0x3dd23a,createdTime:_0x19c2dd}=this[_0x396d8e(0x132)](new Date());let _0x582f7b=_0x205487[_0x396d8e(0x13a)](/\{CliVersion\}/g,CLI_VERSION)['replace'](/\{ComponentName\}/g,_0x6835b7)[_0x396d8e(0x13a)](/\{DisplayTitle\}/g,_0x41b205)[_0x396d8e(0x13a)](/\{PageName\}/g,_0x224fbf)['replace'](/\{TemplateName\}/g,_0x3ad5c5)[_0x396d8e(0x13a)](/\{CreatedAt\}/g,_0xbefd2f)[_0x396d8e(0x13a)](/\{CreatedDate\}/g,_0x3dd23a)[_0x396d8e(0x13a)](/\{CreatedTime\}/g,_0x19c2dd);return _0x582f7b;}static[a238_0x4b4465(0x170)](_0x1dd60c,_0x410a51,_0xaaa152,_0x55e9f0,_0x52d9e5,_0x172863,_0x242a83,_0x8f1a4b){const _0x188018=a238_0x4b4465,_0x27aae1=new Date(),_0x2b41d8=_0x27aae1[_0x188018(0x175)](),_0x5c4eba=_0xaaa152[_0x188018(0x16b)](_0x296efc=>{const _0x720c64=_0x188018,_0x5d7b2c=[_0x720c64(0x14e)+_0x296efc['datasetCode']+'\x22','tableName:\x20\x22'+_0x296efc[_0x720c64(0x15e)]+'\x22',_0x720c64(0x145)+_0x296efc[_0x720c64(0x13b)]+'\x22'];return _0x296efc[_0x720c64(0x13d)]&&_0x5d7b2c[_0x720c64(0x142)](_0x720c64(0x16a)+_0x296efc['alias']+'\x22'),_0x720c64(0x15a)+_0x5d7b2c[_0x720c64(0x16c)](',\x20')+'\x20},';})['join'](''),_0xd86b03=_0x55e9f0||_0xaaa152[0x0]?.['alias']||_0x188018(0x15f);let _0x3dadf6=_0x1dd60c['replace'](/\{AppCode\}/g,_0x410a51)[_0x188018(0x13a)](/\{ModelConfigs\}/g,_0x5c4eba)[_0x188018(0x13a)](/\{ExampleModelName\}/g,_0xd86b03)[_0x188018(0x13a)](/\{ApiFileName\}/g,_0x52d9e5||_0x188018(0x15c))[_0x188018(0x13a)](/\{ConfigName\}/g,_0x172863||'default')[_0x188018(0x13a)](/\{ClientConfigParam\}/g,_0x242a83||'')[_0x188018(0x13a)](/\{VarPrefix\}/g,_0x8f1a4b||_0x188018(0x133))[_0x188018(0x13a)](/\{CreatedAt\}/g,_0x2b41d8);return _0x3dadf6;}static async[a238_0x4b4465(0x161)](_0x18a849,_0x122528,_0xa34980,_0x162936,_0x5f06f6=!![]){const _0x54b8e9=a238_0x4b4465,_0x3b0394=Date[_0x54b8e9(0x12c)]();try{_0x5f06f6&&logger[_0x54b8e9(0x157)]('template',_0x54b8e9(0x13e),{'templatePath':_0x18a849,'targetPath':_0x122528,'pageName':_0xa34980,'templateName':_0x162936});await a238_0x1f1ef9[_0x54b8e9(0x140)]['mkdir'](_0x122528,{'recursive':!![]}),await this['processDirectory'](_0x18a849,_0x122528,_0xa34980,_0x162936);if(_0x5f06f6){const _0x2fff5e=Date['now']()-_0x3b0394;logger[_0x54b8e9(0x14a)](_0x54b8e9(0x158),_0x54b8e9(0x171),_0x2fff5e,{'pageName':_0xa34980,'templateName':_0x162936});}}catch(_0x1ddb30){if(_0x5f06f6){const _0x2e7a10=Date['now']()-_0x3b0394;logger[_0x54b8e9(0x160)]('template',_0x54b8e9(0x14c),{'templatePath':_0x18a849,'targetPath':_0x122528,'pageName':_0xa34980,'templateName':_0x162936,'error':_0x1ddb30 instanceof Error?_0x1ddb30[_0x54b8e9(0x166)]:String(_0x1ddb30),'duration':_0x2e7a10});}throw _0x1ddb30;}}static async[a238_0x4b4465(0x14f)](_0x135d0e,_0x526209,_0x3257cd,_0x416086){const _0xc9cfa7=a238_0x4b4465,_0x1cbbf6=await a238_0x1f1ef9[_0xc9cfa7(0x140)][_0xc9cfa7(0x16d)](_0x135d0e,{'withFileTypes':!![]});for(const _0xb306fd of _0x1cbbf6){const _0x3ec754=a238_0x268e78[_0xc9cfa7(0x16c)](_0x135d0e,_0xb306fd['name']);let _0x39f9d1=a238_0x268e78['join'](_0x526209,_0xb306fd[_0xc9cfa7(0x13b)]);_0xb306fd[_0xc9cfa7(0x13b)][_0xc9cfa7(0x168)]('.tpl')&&(_0x39f9d1=a238_0x268e78[_0xc9cfa7(0x16c)](_0x526209,_0xb306fd[_0xc9cfa7(0x13b)][_0xc9cfa7(0x13a)](/\.tpl$/,'')));if(_0xb306fd[_0xc9cfa7(0x148)]())await a238_0x1f1ef9[_0xc9cfa7(0x140)][_0xc9cfa7(0x163)](_0x39f9d1,{'recursive':!![]}),await this['processDirectory'](_0x3ec754,_0x39f9d1,_0x3257cd,_0x416086);else _0xb306fd[_0xc9cfa7(0x143)]()&&await this['processFile'](_0x3ec754,_0x39f9d1,_0x3257cd,_0x416086);}}static async[a238_0x4b4465(0x152)](_0x5dc408,_0x4dc9b7,_0x2dd8ff,_0x529dae){const _0x56dfc8=a238_0x4b4465,_0x54c6bb=a238_0x268e78['extname'](_0x5dc408)[_0x56dfc8(0x14d)]();_0x5dc408[_0x56dfc8(0x168)](_0x56dfc8(0x165))&&(_0x4dc9b7=_0x4dc9b7['replace'](/\.tpl$/,''));const _0x47363c=['.tsx',_0x56dfc8(0x15d),_0x56dfc8(0x131),_0x56dfc8(0x173),'.json','.md',_0x56dfc8(0x159),_0x56dfc8(0x12f),_0x56dfc8(0x165)];if(_0x47363c[_0x56dfc8(0x151)](_0x54c6bb)||_0x5dc408[_0x56dfc8(0x168)]('.tpl')){const _0x4ecdf5=await a238_0x1f1ef9['promises'][_0x56dfc8(0x172)](_0x5dc408,_0x56dfc8(0x138)),_0x67458a=this[_0x56dfc8(0x164)](_0x4ecdf5,_0x2dd8ff,_0x529dae);await a238_0x1f1ef9[_0x56dfc8(0x140)][_0x56dfc8(0x14b)](_0x4dc9b7,_0x67458a,'utf8');}else await a238_0x1f1ef9[_0x56dfc8(0x140)][_0x56dfc8(0x135)](_0x5dc408,_0x4dc9b7);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2d65ee,_0x3eda2a){const _0x3b85e7=a239_0x1469,_0x590491=_0x2d65ee();while(!![]){try{const _0x403a9b=-parseInt(_0x3b85e7(0x185))/0x1*(-parseInt(_0x3b85e7(0x19e))/0x2)+parseInt(_0x3b85e7(0x1a0))/0x3*(-parseInt(_0x3b85e7(0x197))/0x4)+-parseInt(_0x3b85e7(0x18c))/0x5*(-parseInt(_0x3b85e7(0x1a1))/0x6)+parseInt(_0x3b85e7(0x189))/0x7*(parseInt(_0x3b85e7(0x186))/0x8)+parseInt(_0x3b85e7(0x196))/0x9*(-parseInt(_0x3b85e7(0x19c))/0xa)+-parseInt(_0x3b85e7(0x193))/0xb*(parseInt(_0x3b85e7(0x198))/0xc)+parseInt(_0x3b85e7(0x187))/0xd;if(_0x403a9b===_0x3eda2a)break;else _0x590491['push'](_0x590491['shift']());}catch(_0x4f001a){_0x590491['push'](_0x590491['shift']());}}}(a239_0x4eab,0xa0275));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';import a239_0x284ecc 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 a239_0x4eab(){const _0x23cb93=['1694367rCoefB','18cZrWMq','/v/','stableVersion','checkedAt','192559KNpFId','4449560lhHGHE','13559962DfSuIt','\x20available,\x20current\x20','7jUfaui','lastNotifiedAt','now','774275iscJfx','update-check.json','parse','valid','number','.cache','true','18315cLoqkJ','object','utf8','786645dDWCvr','4QzHpHo','6204nPBzrD','trim','latest',',\x20run:\x20','20WXhNSU','yes','2rWFByn','https://www.npmjs.com/package/'];a239_0x4eab=function(){return _0x23cb93;};return a239_0x4eab();}function isUpdateNoticeDisabled(){const _0x5c4c3c=a239_0x1469,_0x25ba79=process.env.RABETBASE_NO_UPDATE_NOTICE?.['trim']()['toLowerCase']();return _0x25ba79==='1'||_0x25ba79===_0x5c4c3c(0x192)||_0x25ba79===_0x5c4c3c(0x19d);}function cacheRoot(){const _0x334dc0=a239_0x1469;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0x334dc0(0x191));}function a239_0x1469(_0x592a9a,_0x142146){_0x592a9a=_0x592a9a-0x182;const _0x4eab36=a239_0x4eab();let _0x1469f9=_0x4eab36[_0x592a9a];return _0x1469f9;}export function getUpdateNoticeCachePath(){const _0x1714a9=a239_0x1469;return join(cacheRoot(),'rabetbase-cli',_0x1714a9(0x18d));}async function readUpdateNoticeCache(){const _0x40e5d4=a239_0x1469;try{const _0x4ec28d=await readFile(getUpdateNoticeCachePath(),_0x40e5d4(0x195)),_0x324f34=JSON[_0x40e5d4(0x18e)](_0x4ec28d);if(!_0x324f34||typeof _0x324f34!==_0x40e5d4(0x194))return{};return _0x324f34;}catch{return{};}}async function writeUpdateNoticeCache(_0xbde9e0){const _0x216c25=a239_0x1469;try{const _0x2f4195=getUpdateNoticeCachePath();await mkdir(dirname(_0x2f4195),{'recursive':!![]}),await writeFile(_0x2f4195,JSON['stringify'](_0xbde9e0,null,0x2)+'\x0a',_0x216c25(0x195));}catch{}}function isFreshCheck(_0x3e94aa,_0x389da3){const _0x21943b=a239_0x1469;return typeof _0x3e94aa[_0x21943b(0x184)]===_0x21943b(0x190)&&_0x389da3-_0x3e94aa[_0x21943b(0x184)]<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0xb1cc81,_0x23e32b,_0xbe3361){const _0x2aafcc=a239_0x1469;return _0xb1cc81['lastNotifiedVersion']===_0x23e32b&&typeof _0xb1cc81['lastNotifiedAt']==='number'&&_0xbe3361-_0xb1cc81[_0x2aafcc(0x18a)]<UPDATE_NOTICE_TTL_MS;}export function buildNpmVersionUrl(_0x1f058b){const _0x2e1374=a239_0x1469;return _0x2e1374(0x19f)+NPM_PACKAGE_NAME+_0x2e1374(0x182)+_0x1f058b;}export async function resolveLatestUpdateNotice(){const _0x491b4d=a239_0x1469;if(isUpdateNoticeDisabled())return null;try{const _0x21da05=Date[_0x491b4d(0x18b)](),_0x5c8421=getCliVersion(),_0x6c9627=await readUpdateNoticeCache();let _0x187b0a=isFreshCheck(_0x6c9627,_0x21da05)?_0x6c9627[_0x491b4d(0x19a)]?.[_0x491b4d(0x199)]():undefined;if(!_0x187b0a&&!isFreshCheck(_0x6c9627,_0x21da05)){const _0x3005d1=await getCliVersionPolicy();_0x187b0a=_0x3005d1?.[_0x491b4d(0x183)]?.[_0x491b4d(0x199)]()||undefined,await writeUpdateNoticeCache({..._0x6c9627,'checkedAt':_0x21da05,'latest':_0x187b0a,'failed':!_0x187b0a});}if(!_0x187b0a||!a239_0x284ecc['valid'](_0x5c8421)||!a239_0x284ecc[_0x491b4d(0x18f)](_0x187b0a))return null;if(a239_0x284ecc['gte'](_0x5c8421,_0x187b0a))return null;if(isRecentlyNotified(_0x6c9627,_0x187b0a,_0x21da05))return null;const _0x266be6=CLI_BIN_NAME+'\x20update';return await writeUpdateNoticeCache({..._0x6c9627,'checkedAt':isFreshCheck(_0x6c9627,_0x21da05)?_0x6c9627[_0x491b4d(0x184)]:_0x21da05,'latest':_0x187b0a,'failed':![],'lastNotifiedVersion':_0x187b0a,'lastNotifiedAt':_0x21da05}),{'command':_0x266be6,'current':_0x5c8421,'latest':_0x187b0a,'url':buildNpmVersionUrl(_0x187b0a),'message':CLI_BIN_NAME+'\x20'+_0x187b0a+_0x491b4d(0x188)+_0x5c8421+_0x491b4d(0x19b)+_0x266be6};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x48547f,_0x384435){var _0xfc940c=a240_0x3693,_0x7e4248=_0x48547f();while(!![]){try{var _0x43ef23=parseInt(_0xfc940c(0xf8))/0x1+-parseInt(_0xfc940c(0xf9))/0x2+-parseInt(_0xfc940c(0xfa))/0x3*(-parseInt(_0xfc940c(0xfd))/0x4)+-parseInt(_0xfc940c(0xf7))/0x5+parseInt(_0xfc940c(0xfb))/0x6*(parseInt(_0xfc940c(0xfc))/0x7)+parseInt(_0xfc940c(0xf6))/0x8*(parseInt(_0xfc940c(0xf5))/0x9)+-parseInt(_0xfc940c(0xf4))/0xa;if(_0x43ef23===_0x384435)break;else _0x7e4248['push'](_0x7e4248['shift']());}catch(_0x1d6f2a){_0x7e4248['push'](_0x7e4248['shift']());}}}(a240_0x3e86,0xd37bc));function a240_0x3693(_0x4f9fd5,_0x22dd7a){_0x4f9fd5=_0x4f9fd5-0xf4;var _0x3e862d=a240_0x3e86();var _0x36935c=_0x3e862d[_0x4f9fd5];return _0x36935c;}import{VERSION}from'../generated/build-info.js';function a240_0x3e86(){var _0x292d75=['7yoIqIt','6884jPuIHV','22203440abqnTG','18hswLxv','2487304jviQxz','1924600PqqGeX','1313154iJkbIQ','2708004rChkwQ','2166YJZgju','9887760AsBWNv'];a240_0x3e86=function(){return _0x292d75;};return a240_0x3e86();}export function getCliVersion(){return VERSION;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a241_0x2480(_0x50d718,_0x84b002){_0x50d718=_0x50d718-0x138;var _0x47066a=a241_0x4706();var _0x2480e2=_0x47066a[_0x50d718];return _0x2480e2;}function a241_0x4706(){var _0x1b4c0d=['566546eHnjPe','1192DedCJT','17335oDoyjg','32903091gZFQSt','1497209LjEFou','88vDjEia','590211LeZClx','1376540BLWhun','6xKbNHP','12JrmXrX','771WsqIZI','24VeVpLj','110FPGxLJ'];a241_0x4706=function(){return _0x1b4c0d;};return a241_0x4706();}(function(_0x2b7929,_0xb9b6bc){var _0x345e50=a241_0x2480,_0xaa0484=_0x2b7929();while(!![]){try{var _0x2c8a77=parseInt(_0x345e50(0x142))/0x1+-parseInt(_0x345e50(0x138))/0x2*(parseInt(_0x345e50(0x140))/0x3)+-parseInt(_0x345e50(0x139))/0x4*(parseInt(_0x345e50(0x13a))/0x5)+parseInt(_0x345e50(0x143))/0x6*(-parseInt(_0x345e50(0x13c))/0x7)+-parseInt(_0x345e50(0x13d))/0x8*(parseInt(_0x345e50(0x13e))/0x9)+-parseInt(_0x345e50(0x13f))/0xa*(-parseInt(_0x345e50(0x144))/0xb)+parseInt(_0x345e50(0x141))/0xc*(parseInt(_0x345e50(0x13b))/0xd);if(_0x2c8a77===_0xb9b6bc)break;else _0xaa0484['push'](_0xaa0484['shift']());}catch(_0x3e7e75){_0xaa0484['push'](_0xaa0484['shift']());}}}(a241_0x4706,0xb2a29));import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';export async function withActiveCookie(_0x2c9533,_0x431de2){setActiveCookie(_0x2c9533);try{return await _0x431de2();}finally{clearActiveCookie();}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a242_0x5b09(_0x4ebf29,_0x302654){_0x4ebf29=_0x4ebf29-0x178;var _0x4a1664=a242_0x4a16();var _0x5b09c3=_0x4a1664[_0x4ebf29];return _0x5b09c3;}(function(_0x560e26,_0x5ede9c){var _0x4f9d2b=a242_0x5b09,_0x2f51e8=_0x560e26();while(!![]){try{var _0x43a8ff=-parseInt(_0x4f9d2b(0x17e))/0x1*(parseInt(_0x4f9d2b(0x181))/0x2)+parseInt(_0x4f9d2b(0x178))/0x3*(-parseInt(_0x4f9d2b(0x17c))/0x4)+parseInt(_0x4f9d2b(0x179))/0x5+parseInt(_0x4f9d2b(0x17f))/0x6+parseInt(_0x4f9d2b(0x180))/0x7+-parseInt(_0x4f9d2b(0x17d))/0x8+parseInt(_0x4f9d2b(0x17a))/0x9;if(_0x43a8ff===_0x5ede9c)break;else _0x2f51e8['push'](_0x2f51e8['shift']());}catch(_0x3c9b4f){_0x2f51e8['push'](_0x2f51e8['shift']());}}}(a242_0x4a16,0x683eb));function a242_0x4a16(){var _0x958352=['write','36gUAglp','4753800RQymSu','14MPmcnK','1638954EWzpxI','2070264zBAzPF','57412vWPyda','52467HuOamj','3047110iMfefU','3619476vqnIlE'];a242_0x4a16=function(){return _0x958352;};return a242_0x4a16();}export function writeCliSideChannelLine(_0x3e3cd7){var _0x5ed4da=a242_0x5b09;process['stderr'][_0x5ed4da(0x17b)](_0x3e3cd7+'\x0a');}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lovrabet/rabetbase-cli",
|
|
3
|
-
"version": "2.3.5
|
|
3
|
+
"version": "2.3.5",
|
|
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": [
|