@lovrabet/rabetbase-cli 2.2.2-beta.1 → 2.2.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/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
|
+
function a203_0x10de(){const _0x2dbd15=['pad','template','toDisplayTitle','.jsx','开始处理模板内容替换','\x20},','processTemplate','includes','\x0a\x20\x20\x20\x20{\x20','10fhAfSM','readFile','endsWith','message','.scss','push','.tpl','5522250weKRDN','2255625bTYwnv','.md','formatLocalTimestamp','2264372yyeSWF','default','YourModel','540104rRjhwK','tableName','toComponentName','模板内容替换失败','writeFile','replace','.ts','extname','.js','replaceApiContent','LOVRABET','copyFile','join','charAt','info','getFullYear','50EpGPNy','isDirectory','.css','replaceContent','4873649fzdVEM','getMonth','error','utf8','15882xfhmEz','name','getDate','mkdir','161YdhRIc','slice','5404458akyaNW','getMinutes','150CjpKVm','readdir','toUpperCase','toLowerCase','datasetCode','api','now','processDirectory','模板内容替换完成','split','padStart','map','promises'];a203_0x10de=function(){return _0x2dbd15;};return a203_0x10de();}function a203_0x351c(_0x5dd655,_0x54de9d){_0x5dd655=_0x5dd655-0x88;const _0x10de15=a203_0x10de();let _0x351c3b=_0x10de15[_0x5dd655];return _0x351c3b;}const a203_0x2d160a=a203_0x351c;(function(_0x3f73bc,_0x239f18){const _0x1770c1=a203_0x351c,_0x1c4d5a=_0x3f73bc();while(!![]){try{const _0x32ca8f=parseInt(_0x1770c1(0xc0))/0x1*(parseInt(_0x1770c1(0xc8))/0x2)+-parseInt(_0x1770c1(0xa1))/0x3+parseInt(_0x1770c1(0xa5))/0x4*(parseInt(_0x1770c1(0x9a))/0x5)+parseInt(_0x1770c1(0xc6))/0x6+-parseInt(_0x1770c1(0xc4))/0x7*(-parseInt(_0x1770c1(0xa8))/0x8)+parseInt(_0x1770c1(0xa2))/0x9+-parseInt(_0x1770c1(0xb8))/0xa*(parseInt(_0x1770c1(0xbc))/0xb);if(_0x32ca8f===_0x239f18)break;else _0x1c4d5a['push'](_0x1c4d5a['shift']());}catch(_0x25538a){_0x1c4d5a['push'](_0x1c4d5a['shift']());}}}(a203_0x10de,0xed2c2));import a203_0x573297 from'node:fs';import a203_0x3bdd9c from'node:path';import{logger}from'../utils/logger.js';import{getCliVersion}from'../utils/version.js';const CLI_VERSION=getCliVersion();export class TemplateReplacer{static[a203_0x2d160a(0x91)](_0x2ef83e){const _0x2affa9=a203_0x2d160a;return String(_0x2ef83e)[_0x2affa9(0x8e)](0x2,'0');}static[a203_0x2d160a(0xa4)](_0x545908){const _0x1289bf=a203_0x2d160a,_0x1e4833=_0x545908[_0x1289bf(0xb7)](),_0x19eb08=this[_0x1289bf(0x91)](_0x545908[_0x1289bf(0xbd)]()+0x1),_0x399457=this[_0x1289bf(0x91)](_0x545908[_0x1289bf(0xc2)]()),_0x537df6=this[_0x1289bf(0x91)](_0x545908['getHours']()),_0x2765eb=this['pad'](_0x545908[_0x1289bf(0xc7)]()),_0x1d6772=this[_0x1289bf(0x91)](_0x545908['getSeconds']());return{'createdAt':_0x1e4833+'-'+_0x19eb08+'-'+_0x399457+'\x20'+_0x537df6+':'+_0x2765eb+':'+_0x1d6772,'createdDate':_0x1e4833+'-'+_0x19eb08+'-'+_0x399457,'createdTime':_0x537df6+':'+_0x2765eb+':'+_0x1d6772};}static[a203_0x2d160a(0xaa)](_0x10d874){const _0x2be6d7=a203_0x2d160a,_0x1c7aa3=_0x10d874[_0x2be6d7(0x8d)]('/')['pop']()||_0x10d874;return _0x1c7aa3[_0x2be6d7(0x8d)]('-')['map'](_0x3b0079=>_0x3b0079[_0x2be6d7(0xb5)](0x0)['toUpperCase']()+_0x3b0079[_0x2be6d7(0xc5)](0x1)[_0x2be6d7(0xcb)]())[_0x2be6d7(0xb4)]('');}static['toDisplayTitle'](_0x29fe8e){const _0x14fe84=a203_0x2d160a,_0xda5dc3=_0x29fe8e[_0x14fe84(0x8d)]('/')['pop']()||_0x29fe8e;return _0xda5dc3[_0x14fe84(0x8d)]('-')['map'](_0x40778d=>_0x40778d[_0x14fe84(0xb5)](0x0)[_0x14fe84(0xca)]()+_0x40778d[_0x14fe84(0xc5)](0x1)[_0x14fe84(0xcb)]())['join']('\x20');}static[a203_0x2d160a(0xbb)](_0x18f9c0,_0x43c71d,_0x173172){const _0x1a209a=a203_0x2d160a,_0x30a7bd=this['toComponentName'](_0x43c71d),_0x390a54=this[_0x1a209a(0x93)](_0x43c71d),{createdAt:_0x13f6ef,createdDate:_0x4a63e9,createdTime:_0x1ef75b}=this[_0x1a209a(0xa4)](new Date());let _0xab85b5=_0x18f9c0[_0x1a209a(0xad)](/\{CliVersion\}/g,CLI_VERSION)[_0x1a209a(0xad)](/\{ComponentName\}/g,_0x30a7bd)['replace'](/\{DisplayTitle\}/g,_0x390a54)[_0x1a209a(0xad)](/\{PageName\}/g,_0x43c71d)[_0x1a209a(0xad)](/\{TemplateName\}/g,_0x173172)[_0x1a209a(0xad)](/\{CreatedAt\}/g,_0x13f6ef)[_0x1a209a(0xad)](/\{CreatedDate\}/g,_0x4a63e9)[_0x1a209a(0xad)](/\{CreatedTime\}/g,_0x1ef75b);return _0xab85b5;}static[a203_0x2d160a(0xb1)](_0x635758,_0x949867,_0x130aa3,_0x5525e1,_0x15715a,_0x1e7a6b,_0x587a68,_0x54721c){const _0xa3897f=a203_0x2d160a,_0x145a16=new Date(),_0x56c39e=_0x145a16['toISOString'](),_0x47b102=_0x130aa3[_0xa3897f(0x8f)](_0x53f309=>{const _0x4eea61=_0xa3897f,_0x586ce2=['datasetCode:\x20\x22'+_0x53f309[_0x4eea61(0x88)]+'\x22','tableName:\x20\x22'+_0x53f309[_0x4eea61(0xa9)]+'\x22','name:\x20\x22'+_0x53f309[_0x4eea61(0xc1)]+'\x22'];return _0x53f309['alias']&&_0x586ce2[_0x4eea61(0x9f)]('alias:\x20\x22'+_0x53f309['alias']+'\x22'),_0x4eea61(0x99)+_0x586ce2[_0x4eea61(0xb4)](',\x20')+_0x4eea61(0x96);})[_0xa3897f(0xb4)](''),_0x8d758f=_0x5525e1||_0x130aa3[0x0]?.['alias']||_0xa3897f(0xa7);let _0x533454=_0x635758[_0xa3897f(0xad)](/\{AppCode\}/g,_0x949867)['replace'](/\{ModelConfigs\}/g,_0x47b102)[_0xa3897f(0xad)](/\{ExampleModelName\}/g,_0x8d758f)[_0xa3897f(0xad)](/\{ApiFileName\}/g,_0x15715a||_0xa3897f(0x89))[_0xa3897f(0xad)](/\{ConfigName\}/g,_0x1e7a6b||_0xa3897f(0xa6))['replace'](/\{ClientConfigParam\}/g,_0x587a68||'')[_0xa3897f(0xad)](/\{VarPrefix\}/g,_0x54721c||_0xa3897f(0xb2))[_0xa3897f(0xad)](/\{CreatedAt\}/g,_0x56c39e);return _0x533454;}static async[a203_0x2d160a(0x97)](_0x3f0e60,_0x25e0bb,_0x49d8ac,_0x3ee53b,_0xa67738=!![]){const _0x1b2c4c=a203_0x2d160a,_0xf0fcac=Date[_0x1b2c4c(0x8a)]();try{_0xa67738&&logger[_0x1b2c4c(0xb6)]('template',_0x1b2c4c(0x95),{'templatePath':_0x3f0e60,'targetPath':_0x25e0bb,'pageName':_0x49d8ac,'templateName':_0x3ee53b});await a203_0x573297[_0x1b2c4c(0x90)]['mkdir'](_0x25e0bb,{'recursive':!![]}),await this['processDirectory'](_0x3f0e60,_0x25e0bb,_0x49d8ac,_0x3ee53b);if(_0xa67738){const _0x59ac33=Date[_0x1b2c4c(0x8a)]()-_0xf0fcac;logger['success'](_0x1b2c4c(0x92),_0x1b2c4c(0x8c),_0x59ac33,{'pageName':_0x49d8ac,'templateName':_0x3ee53b});}}catch(_0x576cf9){if(_0xa67738){const _0x5d514b=Date[_0x1b2c4c(0x8a)]()-_0xf0fcac;logger[_0x1b2c4c(0xbe)](_0x1b2c4c(0x92),_0x1b2c4c(0xab),{'templatePath':_0x3f0e60,'targetPath':_0x25e0bb,'pageName':_0x49d8ac,'templateName':_0x3ee53b,'error':_0x576cf9 instanceof Error?_0x576cf9[_0x1b2c4c(0x9d)]:String(_0x576cf9),'duration':_0x5d514b});}throw _0x576cf9;}}static async[a203_0x2d160a(0x8b)](_0x2cea50,_0x3e0eda,_0x60a21f,_0x5a6a50){const _0x3dd471=a203_0x2d160a,_0x12b2e1=await a203_0x573297[_0x3dd471(0x90)][_0x3dd471(0xc9)](_0x2cea50,{'withFileTypes':!![]});for(const _0x240750 of _0x12b2e1){const _0x27a573=a203_0x3bdd9c[_0x3dd471(0xb4)](_0x2cea50,_0x240750['name']);let _0x341da0=a203_0x3bdd9c[_0x3dd471(0xb4)](_0x3e0eda,_0x240750['name']);_0x240750[_0x3dd471(0xc1)]['endsWith']('.tpl')&&(_0x341da0=a203_0x3bdd9c[_0x3dd471(0xb4)](_0x3e0eda,_0x240750[_0x3dd471(0xc1)][_0x3dd471(0xad)](/\.tpl$/,'')));if(_0x240750[_0x3dd471(0xb9)]())await a203_0x573297['promises'][_0x3dd471(0xc3)](_0x341da0,{'recursive':!![]}),await this[_0x3dd471(0x8b)](_0x27a573,_0x341da0,_0x60a21f,_0x5a6a50);else _0x240750['isFile']()&&await this['processFile'](_0x27a573,_0x341da0,_0x60a21f,_0x5a6a50);}}static async['processFile'](_0xfd8b4a,_0x8d086c,_0x5c182c,_0x16f1d9){const _0x354ce5=a203_0x2d160a,_0x23e161=a203_0x3bdd9c[_0x354ce5(0xaf)](_0xfd8b4a)[_0x354ce5(0xcb)]();_0xfd8b4a[_0x354ce5(0x9c)](_0x354ce5(0xa0))&&(_0x8d086c=_0x8d086c[_0x354ce5(0xad)](/\.tpl$/,''));const _0x40f5f0=['.tsx',_0x354ce5(0xae),_0x354ce5(0x94),_0x354ce5(0xb0),'.json',_0x354ce5(0xa3),_0x354ce5(0xba),_0x354ce5(0x9e),_0x354ce5(0xa0)];if(_0x40f5f0[_0x354ce5(0x98)](_0x23e161)||_0xfd8b4a['endsWith']('.tpl')){const _0x170e20=await a203_0x573297[_0x354ce5(0x90)][_0x354ce5(0x9b)](_0xfd8b4a,_0x354ce5(0xbf)),_0x1fd7ed=this['replaceContent'](_0x170e20,_0x5c182c,_0x16f1d9);await a203_0x573297[_0x354ce5(0x90)][_0x354ce5(0xac)](_0x8d086c,_0x1fd7ed,_0x354ce5(0xbf));}else await a203_0x573297[_0x354ce5(0x90)][_0x354ce5(0xb3)](_0xfd8b4a,_0x8d086c);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4eaa44,_0x2991d7){const _0x15b960=a204_0x5b29,_0x54e077=_0x4eaa44();while(!![]){try{const _0x21ebc5=-parseInt(_0x15b960(0x176))/0x1*(parseInt(_0x15b960(0x179))/0x2)+-parseInt(_0x15b960(0x17d))/0x3+parseInt(_0x15b960(0x18e))/0x4+parseInt(_0x15b960(0x17e))/0x5+-parseInt(_0x15b960(0x17c))/0x6+parseInt(_0x15b960(0x181))/0x7*(-parseInt(_0x15b960(0x17a))/0x8)+parseInt(_0x15b960(0x18d))/0x9;if(_0x21ebc5===_0x2991d7)break;else _0x54e077['push'](_0x54e077['shift']());}catch(_0x3fd5d1){_0x54e077['push'](_0x54e077['shift']());}}}(a204_0x3675,0x70d92));import{mkdir,readFile,writeFile}from'node:fs/promises';function a204_0x5b29(_0xa8fe47,_0xe8f2e6){_0xa8fe47=_0xa8fe47-0x176;const _0x367536=a204_0x3675();let _0x5b2951=_0x367536[_0xa8fe47];return _0x5b2951;}import{homedir}from'node:os';import{dirname,join}from'node:path';import a204_0x1fe3a8 from'semver';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{getCliVersion}from'../utils/version.js';const UPDATE_CHECK_TTL_MS=0xc*0x3c*0x3c*0x3e8,UPDATE_NOTICE_TTL_MS=0x18*0x3c*0x3c*0x3e8;function isUpdateNoticeDisabled(){const _0x5bbebd=a204_0x5b29,_0x361b33=process.env.RABETBASE_NO_UPDATE_NOTICE?.[_0x5bbebd(0x18a)]()[_0x5bbebd(0x184)]();return _0x361b33==='1'||_0x361b33==='true'||_0x361b33===_0x5bbebd(0x188);}function cacheRoot(){const _0x310881=a204_0x5b29;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0x310881(0x177));}export function getUpdateNoticeCachePath(){const _0x410c0a=a204_0x5b29;return join(cacheRoot(),_0x410c0a(0x18b),'update-check.json');}async function readUpdateNoticeCache(){const _0x64bc82=a204_0x5b29;try{const _0x279778=await readFile(getUpdateNoticeCachePath(),_0x64bc82(0x185)),_0x1bee5a=JSON[_0x64bc82(0x186)](_0x279778);if(!_0x1bee5a||typeof _0x1bee5a!==_0x64bc82(0x183))return{};return _0x1bee5a;}catch{return{};}}function a204_0x3675(){const _0x1f4eda=['object','toLowerCase','utf8','parse','lastNotifiedVersion','yes','lastNotifiedAt','trim','rabetbase-cli','number','18429174dgUbWD','1465728vHvZwD','gte','latest','https://www.npmjs.com/package/','\x20update','1YDrEaG','.cache','checkedAt','932842JGBbik','2268824xKCGqD','/v/','2711892QrMrnn','2754159ESIlgf','840835SlZrVS','\x20available,\x20current\x20','now','7BLcNut','stableVersion'];a204_0x3675=function(){return _0x1f4eda;};return a204_0x3675();}async function writeUpdateNoticeCache(_0x5de64c){const _0x2a573f=a204_0x5b29;try{const _0x5236d9=getUpdateNoticeCachePath();await mkdir(dirname(_0x5236d9),{'recursive':!![]}),await writeFile(_0x5236d9,JSON['stringify'](_0x5de64c,null,0x2)+'\x0a',_0x2a573f(0x185));}catch{}}function isFreshCheck(_0x18a67b,_0x452e4f){const _0x8920f8=a204_0x5b29;return typeof _0x18a67b[_0x8920f8(0x178)]===_0x8920f8(0x18c)&&_0x452e4f-_0x18a67b[_0x8920f8(0x178)]<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x2b9570,_0x413919,_0x56fa5d){const _0x2d39e5=a204_0x5b29;return _0x2b9570[_0x2d39e5(0x187)]===_0x413919&&typeof _0x2b9570[_0x2d39e5(0x189)]===_0x2d39e5(0x18c)&&_0x56fa5d-_0x2b9570[_0x2d39e5(0x189)]<UPDATE_NOTICE_TTL_MS;}export function buildNpmVersionUrl(_0x2e55ae){const _0x33d24e=a204_0x5b29;return _0x33d24e(0x191)+NPM_PACKAGE_NAME+_0x33d24e(0x17b)+_0x2e55ae;}export async function resolveLatestUpdateNotice(){const _0x56045f=a204_0x5b29;if(isUpdateNoticeDisabled())return null;try{const _0x1f2978=Date[_0x56045f(0x180)](),_0x19e150=getCliVersion(),_0x1945f3=await readUpdateNoticeCache();let _0x1be5c5=isFreshCheck(_0x1945f3,_0x1f2978)?_0x1945f3[_0x56045f(0x190)]?.[_0x56045f(0x18a)]():undefined;if(!_0x1be5c5&&!isFreshCheck(_0x1945f3,_0x1f2978)){const _0x1c11fe=await getCliVersionPolicy();_0x1be5c5=_0x1c11fe?.[_0x56045f(0x182)]?.[_0x56045f(0x18a)]()||undefined,await writeUpdateNoticeCache({..._0x1945f3,'checkedAt':_0x1f2978,'latest':_0x1be5c5,'failed':!_0x1be5c5});}if(!_0x1be5c5||!a204_0x1fe3a8['valid'](_0x19e150)||!a204_0x1fe3a8['valid'](_0x1be5c5))return null;if(a204_0x1fe3a8[_0x56045f(0x18f)](_0x19e150,_0x1be5c5))return null;if(isRecentlyNotified(_0x1945f3,_0x1be5c5,_0x1f2978))return null;const _0x4b2a90=CLI_BIN_NAME+_0x56045f(0x192);return await writeUpdateNoticeCache({..._0x1945f3,'checkedAt':isFreshCheck(_0x1945f3,_0x1f2978)?_0x1945f3['checkedAt']:_0x1f2978,'latest':_0x1be5c5,'failed':![],'lastNotifiedVersion':_0x1be5c5,'lastNotifiedAt':_0x1f2978}),{'command':_0x4b2a90,'current':_0x19e150,'latest':_0x1be5c5,'url':buildNpmVersionUrl(_0x1be5c5),'message':CLI_BIN_NAME+'\x20'+_0x1be5c5+_0x56045f(0x17f)+_0x19e150+',\x20run:\x20'+_0x4b2a90};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5df5a2,_0x425414){var _0xcdbba5=a205_0x4901,_0x20480=_0x5df5a2();while(!![]){try{var _0x195c9c=-parseInt(_0xcdbba5(0x134))/0x1*(-parseInt(_0xcdbba5(0x13d))/0x2)+parseInt(_0xcdbba5(0x13a))/0x3*(-parseInt(_0xcdbba5(0x137))/0x4)+-parseInt(_0xcdbba5(0x138))/0x5+parseInt(_0xcdbba5(0x139))/0x6*(-parseInt(_0xcdbba5(0x13c))/0x7)+-parseInt(_0xcdbba5(0x13e))/0x8*(-parseInt(_0xcdbba5(0x13b))/0x9)+parseInt(_0xcdbba5(0x135))/0xa+parseInt(_0xcdbba5(0x136))/0xb;if(_0x195c9c===_0x425414)break;else _0x20480['push'](_0x20480['shift']());}catch(_0x93ec60){_0x20480['push'](_0x20480['shift']());}}}(a205_0x2901,0xc1e02));function a205_0x4901(_0x58025d,_0x5086c8){_0x58025d=_0x58025d-0x134;var _0x290190=a205_0x2901();var _0x4901d2=_0x290190[_0x58025d];return _0x4901d2;}function a205_0x2901(){var _0x50329a=['32aDrByK','1415360PLOlez','7626vdaqbU','420447fMtlEN','378ezQGIf','7476iYjPOd','90yQVFXO','90448uCZaef','5821OBEvRa','3746290xeSevP','26888180jChpEH'];a205_0x2901=function(){return _0x50329a;};return a205_0x2901();}import{VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a206_0x3b9a(_0x32fefa,_0x517dd9){_0x32fefa=_0x32fefa-0x9b;var _0x4cc93e=a206_0x4cc9();var _0x3b9a7b=_0x4cc93e[_0x32fefa];return _0x3b9a7b;}(function(_0x26cecd,_0x5c6f4d){var _0xf7c97d=a206_0x3b9a,_0x5507e3=_0x26cecd();while(!![]){try{var _0x44b95b=-parseInt(_0xf7c97d(0xa2))/0x1*(-parseInt(_0xf7c97d(0xa5))/0x2)+-parseInt(_0xf7c97d(0xa1))/0x3+-parseInt(_0xf7c97d(0xa4))/0x4+parseInt(_0xf7c97d(0xa0))/0x5+-parseInt(_0xf7c97d(0x9c))/0x6*(-parseInt(_0xf7c97d(0xa3))/0x7)+parseInt(_0xf7c97d(0x9b))/0x8*(parseInt(_0xf7c97d(0x9f))/0x9)+parseInt(_0xf7c97d(0x9e))/0xa*(-parseInt(_0xf7c97d(0x9d))/0xb);if(_0x44b95b===_0x5c6f4d)break;else _0x5507e3['push'](_0x5507e3['shift']());}catch(_0x5a1623){_0x5507e3['push'](_0x5507e3['shift']());}}}(a206_0x4cc9,0x4c088));function a206_0x4cc9(){var _0x1872c0=['92330ICwzWG','1618299lmDStS','302575fKdBcd','429402EMKdEI','293rthwcv','4697AkFNjc','1430108UvUJYG','1530vqXTwG','24iXjitI','5094hGmdao','693vYNgAT'];a206_0x4cc9=function(){return _0x1872c0;};return a206_0x4cc9();}import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';export async function withActiveCookie(_0x163980,_0x20266a){setActiveCookie(_0x163980);try{return await _0x20266a();}finally{clearActiveCookie();}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a207_0x5047(){var _0x2c0d2e=['4775885fIkhWk','2483655bXhGwr','1047262LAzzqt','stderr','857294OwKNLe','7ODFnLb','1749376NSuNYU','3139764wIxGrd','29577672ccvtjd'];a207_0x5047=function(){return _0x2c0d2e;};return a207_0x5047();}(function(_0x41e0b9,_0xca94b4){var _0x252a42=a207_0x57d1,_0x8df2d0=_0x41e0b9();while(!![]){try{var _0x4920be=-parseInt(_0x252a42(0xeb))/0x1+-parseInt(_0x252a42(0xe4))/0x2+-parseInt(_0x252a42(0xea))/0x3+-parseInt(_0x252a42(0xe6))/0x4+-parseInt(_0x252a42(0xe9))/0x5+parseInt(_0x252a42(0xe7))/0x6*(parseInt(_0x252a42(0xe5))/0x7)+parseInt(_0x252a42(0xe8))/0x8;if(_0x4920be===_0xca94b4)break;else _0x8df2d0['push'](_0x8df2d0['shift']());}catch(_0x57f809){_0x8df2d0['push'](_0x8df2d0['shift']());}}}(a207_0x5047,0x7ff9c));function a207_0x57d1(_0x4cef29,_0x4d601e){_0x4cef29=_0x4cef29-0xe3;var _0x50477c=a207_0x5047();var _0x57d1d5=_0x50477c[_0x4cef29];return _0x57d1d5;}export function writeCliSideChannelLine(_0x567220){var _0x453e24=a207_0x57d1;process[_0x453e24(0xe3)]['write'](_0x567220+'\x0a');}
|