@lovrabet/rabetbase-cli 2.2.3-beta.1 → 2.2.3-beta.2
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.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
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a204_0x5ac0e9=a204_0x492f;(function(_0x5d8ea4,_0x1b2023){const _0x4fbed5=a204_0x492f,_0x539a1c=_0x5d8ea4();while(!![]){try{const _0x2bfec6=-parseInt(_0x4fbed5(0x17c))/0x1*(parseInt(_0x4fbed5(0x15d))/0x2)+-parseInt(_0x4fbed5(0x18e))/0x3+parseInt(_0x4fbed5(0x16b))/0x4*(-parseInt(_0x4fbed5(0x16c))/0x5)+-parseInt(_0x4fbed5(0x197))/0x6+-parseInt(_0x4fbed5(0x176))/0x7*(-parseInt(_0x4fbed5(0x15f))/0x8)+parseInt(_0x4fbed5(0x188))/0x9*(parseInt(_0x4fbed5(0x1a1))/0xa)+-parseInt(_0x4fbed5(0x18a))/0xb*(-parseInt(_0x4fbed5(0x194))/0xc);if(_0x2bfec6===_0x1b2023)break;else _0x539a1c['push'](_0x539a1c['shift']());}catch(_0x1f84b5){_0x539a1c['push'](_0x539a1c['shift']());}}}(a204_0x4957,0xc8da4));import a204_0x59ab08 from'node:fs';import a204_0xaaf136 from'node:path';function a204_0x4957(){const _0x5bbfa0=['getHours','YourModel','toLowerCase','name','pop','toISOString','模板内容替换失败','name:\x20\x22','1076652INLtvT','readdir','1719278mVFQhx','map','.jsx','pad','628152BeSypm','开始处理模板内容替换','.json','split','utf8','replace','72xbyQqk','template','extname','8185662GEaMDz','\x0a\x20\x20\x20\x20{\x20','default','\x20},','success','mkdir','processDirectory','formatLocalTimestamp','getDate','.tpl','120nBDqYl','info','tableName:\x20\x22','copyFile','2oZZkLY','.tsx','4424pINrtj','promises','LOVRABET','tableName','padStart','.md','error','replaceContent','alias','getMonth','replaceApiContent','now','32776iKIoRb','85jGWWoi','datasetCode','getMinutes','isDirectory','processFile','slice','.ts','toComponentName','join','includes','10633tjTjmn','.css','alias:\x20\x22','toDisplayTitle','.js','endsWith','677680JmXEtk','datasetCode:\x20\x22','processTemplate','message'];a204_0x4957=function(){return _0x5bbfa0;};return a204_0x4957();}import{logger}from'../utils/logger.js';import{getCliVersion}from'../utils/version.js';function a204_0x492f(_0x4c6b5c,_0x5c695c){_0x4c6b5c=_0x4c6b5c-0x15a;const _0x495751=a204_0x4957();let _0x492fff=_0x495751[_0x4c6b5c];return _0x492fff;}const CLI_VERSION=getCliVersion();export class TemplateReplacer{static['pad'](_0x5e9e81){const _0x5a8e2c=a204_0x492f;return String(_0x5e9e81)[_0x5a8e2c(0x163)](0x2,'0');}static[a204_0x5ac0e9(0x19e)](_0x4e309f){const _0x25f995=a204_0x5ac0e9,_0x570b78=_0x4e309f['getFullYear'](),_0x1b5fec=this[_0x25f995(0x18d)](_0x4e309f[_0x25f995(0x168)]()+0x1),_0x2b3881=this[_0x25f995(0x18d)](_0x4e309f[_0x25f995(0x19f)]()),_0x53b625=this[_0x25f995(0x18d)](_0x4e309f[_0x25f995(0x180)]()),_0x19b234=this[_0x25f995(0x18d)](_0x4e309f[_0x25f995(0x16e)]()),_0x29ce23=this[_0x25f995(0x18d)](_0x4e309f['getSeconds']());return{'createdAt':_0x570b78+'-'+_0x1b5fec+'-'+_0x2b3881+'\x20'+_0x53b625+':'+_0x19b234+':'+_0x29ce23,'createdDate':_0x570b78+'-'+_0x1b5fec+'-'+_0x2b3881,'createdTime':_0x53b625+':'+_0x19b234+':'+_0x29ce23};}static[a204_0x5ac0e9(0x173)](_0x248912){const _0x3350c9=a204_0x5ac0e9,_0xf995bd=_0x248912[_0x3350c9(0x191)]('/')[_0x3350c9(0x184)]()||_0x248912;return _0xf995bd['split']('-')[_0x3350c9(0x18b)](_0x45a040=>_0x45a040['charAt'](0x0)['toUpperCase']()+_0x45a040[_0x3350c9(0x171)](0x1)['toLowerCase']())[_0x3350c9(0x174)]('');}static['toDisplayTitle'](_0x49ed69){const _0x2934b7=a204_0x5ac0e9,_0x5d2465=_0x49ed69['split']('/')[_0x2934b7(0x184)]()||_0x49ed69;return _0x5d2465[_0x2934b7(0x191)]('-')[_0x2934b7(0x18b)](_0x2f7ed5=>_0x2f7ed5['charAt'](0x0)['toUpperCase']()+_0x2f7ed5['slice'](0x1)['toLowerCase']())[_0x2934b7(0x174)]('\x20');}static['replaceContent'](_0x476f98,_0x4b7b02,_0x2c6ab3){const _0x346b95=a204_0x5ac0e9,_0x16ec4d=this[_0x346b95(0x173)](_0x4b7b02),_0x5388b8=this[_0x346b95(0x179)](_0x4b7b02),{createdAt:_0x5ea1b2,createdDate:_0x4ee7f4,createdTime:_0x372c36}=this[_0x346b95(0x19e)](new Date());let _0x38cf0c=_0x476f98[_0x346b95(0x193)](/\{CliVersion\}/g,CLI_VERSION)['replace'](/\{ComponentName\}/g,_0x16ec4d)['replace'](/\{DisplayTitle\}/g,_0x5388b8)[_0x346b95(0x193)](/\{PageName\}/g,_0x4b7b02)[_0x346b95(0x193)](/\{TemplateName\}/g,_0x2c6ab3)[_0x346b95(0x193)](/\{CreatedAt\}/g,_0x5ea1b2)[_0x346b95(0x193)](/\{CreatedDate\}/g,_0x4ee7f4)[_0x346b95(0x193)](/\{CreatedTime\}/g,_0x372c36);return _0x38cf0c;}static[a204_0x5ac0e9(0x169)](_0x324779,_0x34d720,_0x243945,_0x4502fb,_0x17522a,_0x2d995d,_0x12b65e,_0x1716ed){const _0x5b172f=a204_0x5ac0e9,_0x3456d7=new Date(),_0x3cf2c3=_0x3456d7[_0x5b172f(0x185)](),_0x326966=_0x243945[_0x5b172f(0x18b)](_0x2f53ac=>{const _0x46157d=_0x5b172f,_0x3533f0=[_0x46157d(0x17d)+_0x2f53ac[_0x46157d(0x16d)]+'\x22',_0x46157d(0x15b)+_0x2f53ac[_0x46157d(0x162)]+'\x22',_0x46157d(0x187)+_0x2f53ac['name']+'\x22'];return _0x2f53ac[_0x46157d(0x167)]&&_0x3533f0['push'](_0x46157d(0x178)+_0x2f53ac[_0x46157d(0x167)]+'\x22'),_0x46157d(0x198)+_0x3533f0[_0x46157d(0x174)](',\x20')+_0x46157d(0x19a);})[_0x5b172f(0x174)](''),_0x59c518=_0x4502fb||_0x243945[0x0]?.[_0x5b172f(0x167)]||_0x5b172f(0x181);let _0x3fb894=_0x324779[_0x5b172f(0x193)](/\{AppCode\}/g,_0x34d720)['replace'](/\{ModelConfigs\}/g,_0x326966)['replace'](/\{ExampleModelName\}/g,_0x59c518)[_0x5b172f(0x193)](/\{ApiFileName\}/g,_0x17522a||'api')['replace'](/\{ConfigName\}/g,_0x2d995d||_0x5b172f(0x199))['replace'](/\{ClientConfigParam\}/g,_0x12b65e||'')[_0x5b172f(0x193)](/\{VarPrefix\}/g,_0x1716ed||_0x5b172f(0x161))[_0x5b172f(0x193)](/\{CreatedAt\}/g,_0x3cf2c3);return _0x3fb894;}static async[a204_0x5ac0e9(0x17e)](_0x1d5fa3,_0x1f6098,_0x2717c1,_0x4f5fed,_0x58ca14=!![]){const _0x3254b7=a204_0x5ac0e9,_0x5e9d70=Date['now']();try{_0x58ca14&&logger[_0x3254b7(0x15a)]('template',_0x3254b7(0x18f),{'templatePath':_0x1d5fa3,'targetPath':_0x1f6098,'pageName':_0x2717c1,'templateName':_0x4f5fed});await a204_0x59ab08[_0x3254b7(0x160)][_0x3254b7(0x19c)](_0x1f6098,{'recursive':!![]}),await this[_0x3254b7(0x19d)](_0x1d5fa3,_0x1f6098,_0x2717c1,_0x4f5fed);if(_0x58ca14){const _0x34695c=Date[_0x3254b7(0x16a)]()-_0x5e9d70;logger[_0x3254b7(0x19b)](_0x3254b7(0x195),'模板内容替换完成',_0x34695c,{'pageName':_0x2717c1,'templateName':_0x4f5fed});}}catch(_0x2477f2){if(_0x58ca14){const _0xd8b801=Date[_0x3254b7(0x16a)]()-_0x5e9d70;logger[_0x3254b7(0x165)](_0x3254b7(0x195),_0x3254b7(0x186),{'templatePath':_0x1d5fa3,'targetPath':_0x1f6098,'pageName':_0x2717c1,'templateName':_0x4f5fed,'error':_0x2477f2 instanceof Error?_0x2477f2[_0x3254b7(0x17f)]:String(_0x2477f2),'duration':_0xd8b801});}throw _0x2477f2;}}static async[a204_0x5ac0e9(0x19d)](_0x5d38ce,_0x52fd57,_0x5b1be8,_0x100261){const _0x40a162=a204_0x5ac0e9,_0x132983=await a204_0x59ab08[_0x40a162(0x160)][_0x40a162(0x189)](_0x5d38ce,{'withFileTypes':!![]});for(const _0x275fda of _0x132983){const _0x5230a0=a204_0xaaf136[_0x40a162(0x174)](_0x5d38ce,_0x275fda[_0x40a162(0x183)]);let _0xce00c=a204_0xaaf136['join'](_0x52fd57,_0x275fda['name']);_0x275fda[_0x40a162(0x183)]['endsWith'](_0x40a162(0x1a0))&&(_0xce00c=a204_0xaaf136[_0x40a162(0x174)](_0x52fd57,_0x275fda['name'][_0x40a162(0x193)](/\.tpl$/,'')));if(_0x275fda[_0x40a162(0x16f)]())await a204_0x59ab08[_0x40a162(0x160)][_0x40a162(0x19c)](_0xce00c,{'recursive':!![]}),await this[_0x40a162(0x19d)](_0x5230a0,_0xce00c,_0x5b1be8,_0x100261);else _0x275fda['isFile']()&&await this[_0x40a162(0x170)](_0x5230a0,_0xce00c,_0x5b1be8,_0x100261);}}static async[a204_0x5ac0e9(0x170)](_0x45483f,_0x437752,_0x27c317,_0x1f1c10){const _0x56f102=a204_0x5ac0e9,_0x215fb4=a204_0xaaf136[_0x56f102(0x196)](_0x45483f)[_0x56f102(0x182)]();_0x45483f[_0x56f102(0x17b)](_0x56f102(0x1a0))&&(_0x437752=_0x437752[_0x56f102(0x193)](/\.tpl$/,''));const _0x324aa3=[_0x56f102(0x15e),_0x56f102(0x172),_0x56f102(0x18c),_0x56f102(0x17a),_0x56f102(0x190),_0x56f102(0x164),_0x56f102(0x177),'.scss','.tpl'];if(_0x324aa3[_0x56f102(0x175)](_0x215fb4)||_0x45483f[_0x56f102(0x17b)](_0x56f102(0x1a0))){const _0x1f9d69=await a204_0x59ab08[_0x56f102(0x160)]['readFile'](_0x45483f,_0x56f102(0x192)),_0x3cc9fc=this[_0x56f102(0x166)](_0x1f9d69,_0x27c317,_0x1f1c10);await a204_0x59ab08[_0x56f102(0x160)]['writeFile'](_0x437752,_0x3cc9fc,'utf8');}else await a204_0x59ab08[_0x56f102(0x160)][_0x56f102(0x15c)](_0x45483f,_0x437752);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2c6b91,_0x32433e){const _0x1311ba=a205_0x178f,_0x1c1144=_0x2c6b91();while(!![]){try{const _0x185f4f=-parseInt(_0x1311ba(0x16c))/0x1*(parseInt(_0x1311ba(0x15d))/0x2)+-parseInt(_0x1311ba(0x16a))/0x3*(parseInt(_0x1311ba(0x16f))/0x4)+-parseInt(_0x1311ba(0x165))/0x5+parseInt(_0x1311ba(0x16b))/0x6+parseInt(_0x1311ba(0x162))/0x7*(parseInt(_0x1311ba(0x160))/0x8)+parseInt(_0x1311ba(0x15c))/0x9+parseInt(_0x1311ba(0x15e))/0xa*(parseInt(_0x1311ba(0x164))/0xb);if(_0x185f4f===_0x32433e)break;else _0x1c1144['push'](_0x1c1144['shift']());}catch(_0x191927){_0x1c1144['push'](_0x1c1144['shift']());}}}(a205_0x2ee2,0xf2bad));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';import a205_0x2c2c66 from'semver';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';function a205_0x2ee2(){const _0x2f48eb=['24dRdrIZ','https://www.npmjs.com/package/','581819sNBivm','latest','33xSphWv','6731525mXiAmB','stringify','number','valid','\x20update','3NneMpN','815256Cogkbn','3877mauwRE','trim','rabetbase-cli','637324IZBOPR','lastNotifiedAt','\x20available,\x20current\x20','checkedAt','.cache','11361834gnOXDm','18YiPgyh','2956990fedEAN','gte'];a205_0x2ee2=function(){return _0x2f48eb;};return a205_0x2ee2();}import{getCliVersionPolicy}from'../utils/cli-version-policy.js';function a205_0x178f(_0x586bb6,_0x23c6f9){_0x586bb6=_0x586bb6-0x15c;const _0x2ee207=a205_0x2ee2();let _0x178f4b=_0x2ee207[_0x586bb6];return _0x178f4b;}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 _0x351481=a205_0x178f,_0x2d5840=process.env.RABETBASE_NO_UPDATE_NOTICE?.[_0x351481(0x16d)]()['toLowerCase']();return _0x2d5840==='1'||_0x2d5840==='true'||_0x2d5840==='yes';}function cacheRoot(){const _0x3d2cec=a205_0x178f;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0x3d2cec(0x173));}export function getUpdateNoticeCachePath(){const _0x54f959=a205_0x178f;return join(cacheRoot(),_0x54f959(0x16e),'update-check.json');}async function readUpdateNoticeCache(){try{const _0xf1fe42=await readFile(getUpdateNoticeCachePath(),'utf8'),_0xf13171=JSON['parse'](_0xf1fe42);if(!_0xf13171||typeof _0xf13171!=='object')return{};return _0xf13171;}catch{return{};}}async function writeUpdateNoticeCache(_0x4eaa6d){const _0x457e9f=a205_0x178f;try{const _0x39eb9b=getUpdateNoticeCachePath();await mkdir(dirname(_0x39eb9b),{'recursive':!![]}),await writeFile(_0x39eb9b,JSON[_0x457e9f(0x166)](_0x4eaa6d,null,0x2)+'\x0a','utf8');}catch{}}function isFreshCheck(_0x400040,_0x107916){const _0x38055a=a205_0x178f;return typeof _0x400040[_0x38055a(0x172)]===_0x38055a(0x167)&&_0x107916-_0x400040['checkedAt']<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x88c227,_0x538409,_0x522359){const _0x14a104=a205_0x178f;return _0x88c227['lastNotifiedVersion']===_0x538409&&typeof _0x88c227[_0x14a104(0x170)]===_0x14a104(0x167)&&_0x522359-_0x88c227[_0x14a104(0x170)]<UPDATE_NOTICE_TTL_MS;}export function buildNpmVersionUrl(_0x5161e8){const _0x2ee5c6=a205_0x178f;return _0x2ee5c6(0x161)+NPM_PACKAGE_NAME+'/v/'+_0x5161e8;}export async function resolveLatestUpdateNotice(){const _0x3b476b=a205_0x178f;if(isUpdateNoticeDisabled())return null;try{const _0x5e708d=Date['now'](),_0x39f5d7=getCliVersion(),_0xdcc552=await readUpdateNoticeCache();let _0x3d8620=isFreshCheck(_0xdcc552,_0x5e708d)?_0xdcc552[_0x3b476b(0x163)]?.[_0x3b476b(0x16d)]():undefined;if(!_0x3d8620&&!isFreshCheck(_0xdcc552,_0x5e708d)){const _0x263617=await getCliVersionPolicy();_0x3d8620=_0x263617?.['stableVersion']?.[_0x3b476b(0x16d)]()||undefined,await writeUpdateNoticeCache({..._0xdcc552,'checkedAt':_0x5e708d,'latest':_0x3d8620,'failed':!_0x3d8620});}if(!_0x3d8620||!a205_0x2c2c66[_0x3b476b(0x168)](_0x39f5d7)||!a205_0x2c2c66[_0x3b476b(0x168)](_0x3d8620))return null;if(a205_0x2c2c66[_0x3b476b(0x15f)](_0x39f5d7,_0x3d8620))return null;if(isRecentlyNotified(_0xdcc552,_0x3d8620,_0x5e708d))return null;const _0x20d8e8=CLI_BIN_NAME+_0x3b476b(0x169);return await writeUpdateNoticeCache({..._0xdcc552,'checkedAt':isFreshCheck(_0xdcc552,_0x5e708d)?_0xdcc552[_0x3b476b(0x172)]:_0x5e708d,'latest':_0x3d8620,'failed':![],'lastNotifiedVersion':_0x3d8620,'lastNotifiedAt':_0x5e708d}),{'command':_0x20d8e8,'current':_0x39f5d7,'latest':_0x3d8620,'url':buildNpmVersionUrl(_0x3d8620),'message':CLI_BIN_NAME+'\x20'+_0x3d8620+_0x3b476b(0x171)+_0x39f5d7+',\x20run:\x20'+_0x20d8e8};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x369f84,_0x56cae5){var _0x57a8f6=a206_0x12fc,_0x2133a7=_0x369f84();while(!![]){try{var _0x20dbdd=-parseInt(_0x57a8f6(0x13f))/0x1*(-parseInt(_0x57a8f6(0x141))/0x2)+-parseInt(_0x57a8f6(0x144))/0x3+-parseInt(_0x57a8f6(0x148))/0x4*(-parseInt(_0x57a8f6(0x145))/0x5)+parseInt(_0x57a8f6(0x14a))/0x6*(-parseInt(_0x57a8f6(0x149))/0x7)+-parseInt(_0x57a8f6(0x143))/0x8*(parseInt(_0x57a8f6(0x142))/0x9)+-parseInt(_0x57a8f6(0x13e))/0xa*(-parseInt(_0x57a8f6(0x147))/0xb)+parseInt(_0x57a8f6(0x146))/0xc*(parseInt(_0x57a8f6(0x140))/0xd);if(_0x20dbdd===_0x56cae5)break;else _0x2133a7['push'](_0x2133a7['shift']());}catch(_0x58448e){_0x2133a7['push'](_0x2133a7['shift']());}}}(a206_0x379d,0x64df9));function a206_0x379d(){var _0x4836ab=['10EabBcX','605796UwsQsR','2750qwYOkP','1076092iZlEJe','3031231AcysxQ','6jfdwNl','8760eTiFbv','22kfdLOO','117kYZopO','16774niGvBk','81lODebG','165112ftobXr','1091838CUVJgH'];a206_0x379d=function(){return _0x4836ab;};return a206_0x379d();}function a206_0x12fc(_0x41a9f3,_0x8b5eb2){_0x41a9f3=_0x41a9f3-0x13e;var _0x379d71=a206_0x379d();var _0x12fc78=_0x379d71[_0x41a9f3];return _0x12fc78;}import{VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3d64a5,_0x4bfc79){var _0x399477=a207_0x1d46,_0x1924c6=_0x3d64a5();while(!![]){try{var _0x2166d2=-parseInt(_0x399477(0x107))/0x1*(parseInt(_0x399477(0x10a))/0x2)+parseInt(_0x399477(0x10f))/0x3+-parseInt(_0x399477(0x108))/0x4*(parseInt(_0x399477(0x10c))/0x5)+-parseInt(_0x399477(0x105))/0x6+-parseInt(_0x399477(0x10d))/0x7*(parseInt(_0x399477(0x109))/0x8)+-parseInt(_0x399477(0x10e))/0x9*(parseInt(_0x399477(0x106))/0xa)+parseInt(_0x399477(0x10b))/0xb;if(_0x2166d2===_0x4bfc79)break;else _0x1924c6['push'](_0x1924c6['shift']());}catch(_0x42fc80){_0x1924c6['push'](_0x1924c6['shift']());}}}(a207_0x1bb7,0xa3dc5));function a207_0x1d46(_0x559c2b,_0x1b11d3){_0x559c2b=_0x559c2b-0x105;var _0x1bb75c=a207_0x1bb7();var _0x1d46ae=_0x1bb75c[_0x559c2b];return _0x1d46ae;}import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';function a207_0x1bb7(){var _0x1fdc6f=['1960992qEwGvC','389178EfTmeA','7072032zJRpYX','30oJadSk','128khfrOA','79984jZsCmq','7384vPxAHy','15258KCpdIS','49523958zrCZSd','45uYWqgz','7371ipSfhX'];a207_0x1bb7=function(){return _0x1fdc6f;};return a207_0x1bb7();}export async function withActiveCookie(_0x5dd026,_0x1798b3){setActiveCookie(_0x5dd026);try{return await _0x1798b3();}finally{clearActiveCookie();}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x494dc2,_0x127b25){var _0x1c7825=a208_0x1fca,_0x50e915=_0x494dc2();while(!![]){try{var _0x2d692c=-parseInt(_0x1c7825(0x1f0))/0x1*(parseInt(_0x1c7825(0x1ee))/0x2)+-parseInt(_0x1c7825(0x1f5))/0x3+-parseInt(_0x1c7825(0x1ed))/0x4*(parseInt(_0x1c7825(0x1f2))/0x5)+parseInt(_0x1c7825(0x1f1))/0x6*(parseInt(_0x1c7825(0x1f7))/0x7)+-parseInt(_0x1c7825(0x1f6))/0x8*(-parseInt(_0x1c7825(0x1eb))/0x9)+-parseInt(_0x1c7825(0x1f3))/0xa*(parseInt(_0x1c7825(0x1ea))/0xb)+parseInt(_0x1c7825(0x1f8))/0xc*(parseInt(_0x1c7825(0x1f4))/0xd);if(_0x2d692c===_0x127b25)break;else _0x50e915['push'](_0x50e915['shift']());}catch(_0x578184){_0x50e915['push'](_0x50e915['shift']());}}}(a208_0x1677,0x60d36));function a208_0x1fca(_0x573e3f,_0x1bb4ba){_0x573e3f=_0x573e3f-0x1ea;var _0x16771f=a208_0x1677();var _0x1fca11=_0x16771f[_0x573e3f];return _0x1fca11;}export function writeCliSideChannelLine(_0x543fc4){var _0x2eab39=a208_0x1fca;process[_0x2eab39(0x1ec)][_0x2eab39(0x1ef)](_0x543fc4+'\x0a');}function a208_0x1677(){var _0x41cf9f=['206792ppdOxN','49OjYJIG','5508kygXdR','414535cpAXPi','252DKgJKh','stderr','4ZsMDgt','1272432gpKmsL','write','1HlHcPD','86718xKTwQn','2662510QiAGFv','130MxDIdS','42003jnsugP','758253IKbZyG'];a208_0x1677=function(){return _0x41cf9f;};return a208_0x1677();}
|