@lovrabet/rabetbase-cli 2.2.1-beta.2 → 2.2.2-beta.1
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
|
+
const a203_0x33b0d8=a203_0x2353;(function(_0x225b2c,_0x536113){const _0x4c6bae=a203_0x2353,_0x3d46dd=_0x225b2c();while(!![]){try{const _0x3a6e47=-parseInt(_0x4c6bae(0x138))/0x1+-parseInt(_0x4c6bae(0x141))/0x2*(parseInt(_0x4c6bae(0x16a))/0x3)+parseInt(_0x4c6bae(0x152))/0x4*(parseInt(_0x4c6bae(0x159))/0x5)+-parseInt(_0x4c6bae(0x160))/0x6*(-parseInt(_0x4c6bae(0x15e))/0x7)+-parseInt(_0x4c6bae(0x172))/0x8*(parseInt(_0x4c6bae(0x166))/0x9)+parseInt(_0x4c6bae(0x143))/0xa+-parseInt(_0x4c6bae(0x13d))/0xb*(-parseInt(_0x4c6bae(0x131))/0xc);if(_0x3a6e47===_0x536113)break;else _0x3d46dd['push'](_0x3d46dd['shift']());}catch(_0x30583c){_0x3d46dd['push'](_0x3d46dd['shift']());}}}(a203_0x2174,0x9182d));import a203_0x745f2a from'node:fs';function a203_0x2353(_0x3e4669,_0x37e974){_0x3e4669=_0x3e4669-0x131;const _0x2174d1=a203_0x2174();let _0x2353cd=_0x2174d1[_0x3e4669];return _0x2353cd;}import a203_0x2f7c4d from'node:path';import{logger}from'../utils/logger.js';import{getCliVersion}from'../utils/version.js';const CLI_VERSION=getCliVersion();export class TemplateReplacer{static['pad'](_0x33051e){const _0x3afe1b=a203_0x2353;return String(_0x33051e)[_0x3afe1b(0x142)](0x2,'0');}static[a203_0x33b0d8(0x14c)](_0x217678){const _0x102c77=a203_0x33b0d8,_0x42be20=_0x217678[_0x102c77(0x140)](),_0x1ce890=this[_0x102c77(0x13a)](_0x217678[_0x102c77(0x173)]()+0x1),_0x50bf23=this[_0x102c77(0x13a)](_0x217678[_0x102c77(0x13f)]()),_0x4a4320=this['pad'](_0x217678[_0x102c77(0x145)]()),_0x325af6=this[_0x102c77(0x13a)](_0x217678[_0x102c77(0x150)]()),_0x5b5cbb=this['pad'](_0x217678[_0x102c77(0x16e)]());return{'createdAt':_0x42be20+'-'+_0x1ce890+'-'+_0x50bf23+'\x20'+_0x4a4320+':'+_0x325af6+':'+_0x5b5cbb,'createdDate':_0x42be20+'-'+_0x1ce890+'-'+_0x50bf23,'createdTime':_0x4a4320+':'+_0x325af6+':'+_0x5b5cbb};}static[a203_0x33b0d8(0x171)](_0x1faf9a){const _0x11a317=a203_0x33b0d8,_0x42734e=_0x1faf9a['split']('/')[_0x11a317(0x149)]()||_0x1faf9a;return _0x42734e[_0x11a317(0x174)]('-')[_0x11a317(0x161)](_0x4438ad=>_0x4438ad[_0x11a317(0x14a)](0x0)[_0x11a317(0x133)]()+_0x4438ad[_0x11a317(0x132)](0x1)[_0x11a317(0x155)]())[_0x11a317(0x135)]('');}static[a203_0x33b0d8(0x165)](_0x1d9491){const _0x57d17b=a203_0x33b0d8,_0x22bda2=_0x1d9491[_0x57d17b(0x174)]('/')['pop']()||_0x1d9491;return _0x22bda2[_0x57d17b(0x174)]('-')[_0x57d17b(0x161)](_0x4cd321=>_0x4cd321[_0x57d17b(0x14a)](0x0)[_0x57d17b(0x133)]()+_0x4cd321[_0x57d17b(0x132)](0x1)['toLowerCase']())[_0x57d17b(0x135)]('\x20');}static[a203_0x33b0d8(0x14b)](_0x1fdd6b,_0x461a6a,_0x15fe5d){const _0x482062=a203_0x33b0d8,_0x1d4b85=this[_0x482062(0x171)](_0x461a6a),_0x4f70c4=this[_0x482062(0x165)](_0x461a6a),{createdAt:_0x210d2b,createdDate:_0x2ac710,createdTime:_0x5f011a}=this['formatLocalTimestamp'](new Date());let _0x326f1e=_0x1fdd6b[_0x482062(0x13c)](/\{CliVersion\}/g,CLI_VERSION)[_0x482062(0x13c)](/\{ComponentName\}/g,_0x1d4b85)[_0x482062(0x13c)](/\{DisplayTitle\}/g,_0x4f70c4)[_0x482062(0x13c)](/\{PageName\}/g,_0x461a6a)[_0x482062(0x13c)](/\{TemplateName\}/g,_0x15fe5d)[_0x482062(0x13c)](/\{CreatedAt\}/g,_0x210d2b)['replace'](/\{CreatedDate\}/g,_0x2ac710)[_0x482062(0x13c)](/\{CreatedTime\}/g,_0x5f011a);return _0x326f1e;}static[a203_0x33b0d8(0x15b)](_0x5fdf99,_0x5c7a2e,_0x557268,_0x541418,_0x213003,_0x20a082,_0x2198d0,_0x5ad410){const _0x2c5aca=a203_0x33b0d8,_0x361567=new Date(),_0x179544=_0x361567[_0x2c5aca(0x14d)](),_0xfdd4f5=_0x557268[_0x2c5aca(0x161)](_0x4a7a8c=>{const _0x30238e=_0x2c5aca,_0x586dfe=['datasetCode:\x20\x22'+_0x4a7a8c['datasetCode']+'\x22','tableName:\x20\x22'+_0x4a7a8c['tableName']+'\x22',_0x30238e(0x146)+_0x4a7a8c['name']+'\x22'];return _0x4a7a8c[_0x30238e(0x144)]&&_0x586dfe[_0x30238e(0x157)](_0x30238e(0x175)+_0x4a7a8c[_0x30238e(0x144)]+'\x22'),_0x30238e(0x151)+_0x586dfe[_0x30238e(0x135)](',\x20')+_0x30238e(0x15a);})['join'](''),_0x3ee69e=_0x541418||_0x557268[0x0]?.['alias']||_0x2c5aca(0x158);let _0x4b6c5d=_0x5fdf99['replace'](/\{AppCode\}/g,_0x5c7a2e)['replace'](/\{ModelConfigs\}/g,_0xfdd4f5)[_0x2c5aca(0x13c)](/\{ExampleModelName\}/g,_0x3ee69e)[_0x2c5aca(0x13c)](/\{ApiFileName\}/g,_0x213003||'api')['replace'](/\{ConfigName\}/g,_0x20a082||_0x2c5aca(0x137))[_0x2c5aca(0x13c)](/\{ClientConfigParam\}/g,_0x2198d0||'')[_0x2c5aca(0x13c)](/\{VarPrefix\}/g,_0x5ad410||_0x2c5aca(0x14e))['replace'](/\{CreatedAt\}/g,_0x179544);return _0x4b6c5d;}static async[a203_0x33b0d8(0x15c)](_0x1fe304,_0x3498ea,_0x337bc3,_0x17a552,_0xd382cd=!![]){const _0x65d3b3=a203_0x33b0d8,_0x4030c4=Date[_0x65d3b3(0x167)]();try{_0xd382cd&&logger[_0x65d3b3(0x16d)](_0x65d3b3(0x156),_0x65d3b3(0x153),{'templatePath':_0x1fe304,'targetPath':_0x3498ea,'pageName':_0x337bc3,'templateName':_0x17a552});await a203_0x745f2a[_0x65d3b3(0x13e)][_0x65d3b3(0x164)](_0x3498ea,{'recursive':!![]}),await this[_0x65d3b3(0x147)](_0x1fe304,_0x3498ea,_0x337bc3,_0x17a552);if(_0xd382cd){const _0x517c82=Date[_0x65d3b3(0x167)]()-_0x4030c4;logger[_0x65d3b3(0x176)]('template',_0x65d3b3(0x163),_0x517c82,{'pageName':_0x337bc3,'templateName':_0x17a552});}}catch(_0x192bab){if(_0xd382cd){const _0x51fdcd=Date[_0x65d3b3(0x167)]()-_0x4030c4;logger[_0x65d3b3(0x13b)](_0x65d3b3(0x156),_0x65d3b3(0x139),{'templatePath':_0x1fe304,'targetPath':_0x3498ea,'pageName':_0x337bc3,'templateName':_0x17a552,'error':_0x192bab instanceof Error?_0x192bab['message']:String(_0x192bab),'duration':_0x51fdcd});}throw _0x192bab;}}static async[a203_0x33b0d8(0x147)](_0x1835f2,_0x115cdd,_0x1fac70,_0x4924fd){const _0x4d1926=a203_0x33b0d8,_0x5913ed=await a203_0x745f2a[_0x4d1926(0x13e)][_0x4d1926(0x169)](_0x1835f2,{'withFileTypes':!![]});for(const _0xca8cdc of _0x5913ed){const _0x284453=a203_0x2f7c4d[_0x4d1926(0x135)](_0x1835f2,_0xca8cdc[_0x4d1926(0x136)]);let _0x5de420=a203_0x2f7c4d[_0x4d1926(0x135)](_0x115cdd,_0xca8cdc['name']);_0xca8cdc[_0x4d1926(0x136)][_0x4d1926(0x15d)](_0x4d1926(0x154))&&(_0x5de420=a203_0x2f7c4d['join'](_0x115cdd,_0xca8cdc[_0x4d1926(0x136)][_0x4d1926(0x13c)](/\.tpl$/,'')));if(_0xca8cdc[_0x4d1926(0x134)]())await a203_0x745f2a[_0x4d1926(0x13e)][_0x4d1926(0x164)](_0x5de420,{'recursive':!![]}),await this[_0x4d1926(0x147)](_0x284453,_0x5de420,_0x1fac70,_0x4924fd);else _0xca8cdc[_0x4d1926(0x162)]()&&await this[_0x4d1926(0x170)](_0x284453,_0x5de420,_0x1fac70,_0x4924fd);}}static async['processFile'](_0x312ae2,_0x2cedad,_0x9f43b7,_0x5ea741){const _0x2c0ad3=a203_0x33b0d8,_0x48e81b=a203_0x2f7c4d['extname'](_0x312ae2)[_0x2c0ad3(0x155)]();_0x312ae2['endsWith']('.tpl')&&(_0x2cedad=_0x2cedad['replace'](/\.tpl$/,''));const _0x3ba457=[_0x2c0ad3(0x15f),_0x2c0ad3(0x16b),_0x2c0ad3(0x168),'.js','.json',_0x2c0ad3(0x148),_0x2c0ad3(0x16f),'.scss','.tpl'];if(_0x3ba457['includes'](_0x48e81b)||_0x312ae2['endsWith'](_0x2c0ad3(0x154))){const _0x577840=await a203_0x745f2a['promises']['readFile'](_0x312ae2,_0x2c0ad3(0x16c)),_0x25d6ef=this[_0x2c0ad3(0x14b)](_0x577840,_0x9f43b7,_0x5ea741);await a203_0x745f2a['promises']['writeFile'](_0x2cedad,_0x25d6ef,'utf8');}else await a203_0x745f2a[_0x2c0ad3(0x13e)][_0x2c0ad3(0x14f)](_0x312ae2,_0x2cedad);}}function a203_0x2174(){const _0xaf90af=['8732410tKHtIj','alias','getHours','name:\x20\x22','processDirectory','.md','pop','charAt','replaceContent','formatLocalTimestamp','toISOString','LOVRABET','copyFile','getMinutes','\x0a\x20\x20\x20\x20{\x20','4763596VXOCPx','开始处理模板内容替换','.tpl','toLowerCase','template','push','YourModel','5kARFnx','\x20},','replaceApiContent','processTemplate','endsWith','7gGjabc','.tsx','6796002LwJRQa','map','isFile','模板内容替换完成','mkdir','toDisplayTitle','7395660ZRGOwC','now','.jsx','readdir','4371bWknVv','.ts','utf8','info','getSeconds','.css','processFile','toComponentName','8PHvXwb','getMonth','split','alias:\x20\x22','success','48CBsZHY','slice','toUpperCase','isDirectory','join','name','default','1142451ravwhr','模板内容替换失败','pad','error','replace','1498816XlPIyr','promises','getDate','getFullYear','1622rMIQso','padStart'];a203_0x2174=function(){return _0xaf90af;};return a203_0x2174();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x111eb8,_0x223bcd){const _0x1778cc=a204_0x1c23,_0x44f02a=_0x111eb8();while(!![]){try{const _0x3c24ce=parseInt(_0x1778cc(0xb6))/0x1*(parseInt(_0x1778cc(0xb5))/0x2)+-parseInt(_0x1778cc(0xb1))/0x3+-parseInt(_0x1778cc(0xa9))/0x4+parseInt(_0x1778cc(0xb7))/0x5+parseInt(_0x1778cc(0xc2))/0x6+parseInt(_0x1778cc(0xb8))/0x7*(-parseInt(_0x1778cc(0xbd))/0x8)+parseInt(_0x1778cc(0xbb))/0x9*(-parseInt(_0x1778cc(0xb4))/0xa);if(_0x3c24ce===_0x223bcd)break;else _0x44f02a['push'](_0x44f02a['shift']());}catch(_0x1db01d){_0x44f02a['push'](_0x44f02a['shift']());}}}(a204_0x14e0,0x283c9));import{mkdir,readFile,writeFile}from'node:fs/promises';function a204_0x14e0(){const _0x20ae14=['valid','yes','checkedAt','1603110FFFkou','toLowerCase',',\x20run:\x20','now','264116ZnJFeI','https://www.npmjs.com/package/','utf8','true','number','trim','stringify','rabetbase-cli','246969RedkYK','gte','latest','437050JrGxaU','2876ocxMgy','104eknEHP','375305YcbXdE','2429gkVdRe','update-check.json','stableVersion','36dYHlns','\x20update','88KyAPtk','lastNotifiedAt'];a204_0x14e0=function(){return _0x20ae14;};return a204_0x14e0();}import{homedir}from'node:os';import{dirname,join}from'node:path';import a204_0x31d7ab 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';function a204_0x1c23(_0x3fe31e,_0x30e89d){_0x3fe31e=_0x3fe31e-0xa7;const _0x14e00a=a204_0x14e0();let _0x1c239f=_0x14e00a[_0x3fe31e];return _0x1c239f;}const UPDATE_CHECK_TTL_MS=0xc*0x3c*0x3c*0x3e8,UPDATE_NOTICE_TTL_MS=0x18*0x3c*0x3c*0x3e8;function isUpdateNoticeDisabled(){const _0x7fffd0=a204_0x1c23,_0x3e2e5f=process.env.RABETBASE_NO_UPDATE_NOTICE?.[_0x7fffd0(0xae)]()[_0x7fffd0(0xc3)]();return _0x3e2e5f==='1'||_0x3e2e5f===_0x7fffd0(0xac)||_0x3e2e5f===_0x7fffd0(0xc0);}function cacheRoot(){return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),'.cache');}export function getUpdateNoticeCachePath(){const _0x45b376=a204_0x1c23;return join(cacheRoot(),_0x45b376(0xb0),_0x45b376(0xb9));}async function readUpdateNoticeCache(){const _0x2175f4=a204_0x1c23;try{const _0x2b24a3=await readFile(getUpdateNoticeCachePath(),_0x2175f4(0xab)),_0x471b9e=JSON['parse'](_0x2b24a3);if(!_0x471b9e||typeof _0x471b9e!=='object')return{};return _0x471b9e;}catch{return{};}}async function writeUpdateNoticeCache(_0x901b41){const _0x4d780b=a204_0x1c23;try{const _0xdcee31=getUpdateNoticeCachePath();await mkdir(dirname(_0xdcee31),{'recursive':!![]}),await writeFile(_0xdcee31,JSON[_0x4d780b(0xaf)](_0x901b41,null,0x2)+'\x0a',_0x4d780b(0xab));}catch{}}function isFreshCheck(_0x458a12,_0x3b5e1a){const _0xd4cb29=a204_0x1c23;return typeof _0x458a12['checkedAt']===_0xd4cb29(0xad)&&_0x3b5e1a-_0x458a12[_0xd4cb29(0xc1)]<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x4a15a6,_0x2de73c,_0x366bd2){const _0x38670a=a204_0x1c23;return _0x4a15a6['lastNotifiedVersion']===_0x2de73c&&typeof _0x4a15a6[_0x38670a(0xbe)]===_0x38670a(0xad)&&_0x366bd2-_0x4a15a6[_0x38670a(0xbe)]<UPDATE_NOTICE_TTL_MS;}export function buildNpmVersionUrl(_0x48260e){const _0x569e39=a204_0x1c23;return _0x569e39(0xaa)+NPM_PACKAGE_NAME+'/v/'+_0x48260e;}export async function resolveLatestUpdateNotice(){const _0x43a916=a204_0x1c23;if(isUpdateNoticeDisabled())return null;try{const _0x39b4a9=Date[_0x43a916(0xa8)](),_0x23a38a=getCliVersion(),_0x1b3788=await readUpdateNoticeCache();let _0x39e417=isFreshCheck(_0x1b3788,_0x39b4a9)?_0x1b3788[_0x43a916(0xb3)]?.[_0x43a916(0xae)]():undefined;if(!_0x39e417&&!isFreshCheck(_0x1b3788,_0x39b4a9)){const _0x270296=await getCliVersionPolicy();_0x39e417=_0x270296?.[_0x43a916(0xba)]?.[_0x43a916(0xae)]()||undefined,await writeUpdateNoticeCache({..._0x1b3788,'checkedAt':_0x39b4a9,'latest':_0x39e417,'failed':!_0x39e417});}if(!_0x39e417||!a204_0x31d7ab[_0x43a916(0xbf)](_0x23a38a)||!a204_0x31d7ab['valid'](_0x39e417))return null;if(a204_0x31d7ab[_0x43a916(0xb2)](_0x23a38a,_0x39e417))return null;if(isRecentlyNotified(_0x1b3788,_0x39e417,_0x39b4a9))return null;const _0x1b7681=CLI_BIN_NAME+_0x43a916(0xbc);return await writeUpdateNoticeCache({..._0x1b3788,'checkedAt':isFreshCheck(_0x1b3788,_0x39b4a9)?_0x1b3788[_0x43a916(0xc1)]:_0x39b4a9,'latest':_0x39e417,'failed':![],'lastNotifiedVersion':_0x39e417,'lastNotifiedAt':_0x39b4a9}),{'command':_0x1b7681,'current':_0x23a38a,'latest':_0x39e417,'url':buildNpmVersionUrl(_0x39e417),'message':CLI_BIN_NAME+'\x20'+_0x39e417+'\x20available,\x20current\x20'+_0x23a38a+_0x43a916(0xa7)+_0x1b7681};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x256c6c,_0x335849){var _0x15e207=a205_0x5d59,_0x4d2ed4=_0x256c6c();while(!![]){try{var _0x27d832=parseInt(_0x15e207(0x12f))/0x1+-parseInt(_0x15e207(0x12e))/0x2+-parseInt(_0x15e207(0x131))/0x3*(-parseInt(_0x15e207(0x12c))/0x4)+-parseInt(_0x15e207(0x132))/0x5+parseInt(_0x15e207(0x130))/0x6+parseInt(_0x15e207(0x12b))/0x7+-parseInt(_0x15e207(0x12d))/0x8;if(_0x27d832===_0x335849)break;else _0x4d2ed4['push'](_0x4d2ed4['shift']());}catch(_0x3192c2){_0x4d2ed4['push'](_0x4d2ed4['shift']());}}}(a205_0x5d3b,0x39f34));import{VERSION}from'../generated/build-info.js';function a205_0x5d59(_0xeec181,_0xbfcca2){_0xeec181=_0xeec181-0x12b;var _0x5d3b8d=a205_0x5d3b();var _0x5d5966=_0x5d3b8d[_0xeec181];return _0x5d5966;}export function getCliVersion(){return VERSION;}function a205_0x5d3b(){var _0x2e5329=['2221828zcpVie','25268iKMKFj','1153320sVXjRP','359344YMGrWO','451743bIeeMm','243396CGZKkC','15LQwrHW','1400485MfGLNH'];a205_0x5d3b=function(){return _0x2e5329;};return a205_0x5d3b();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a206_0x1d97(_0x352408,_0x56141a){_0x352408=_0x352408-0x131;var _0x237c32=a206_0x237c();var _0x1d9725=_0x237c32[_0x352408];return _0x1d9725;}function a206_0x237c(){var _0x4f2fc9=['1478788LmAkSm','541673yFOSZq','16zNKIAm','320HvcRLu','166350VvHYcc','420066Cjhtxl','133lfLKzi','14056teeMcJ','2241423MfaSwf','30IZVimy','3107860OAuKtA'];a206_0x237c=function(){return _0x4f2fc9;};return a206_0x237c();}(function(_0x38e29b,_0x5c27c6){var _0x3b77bc=a206_0x1d97,_0x522cfd=_0x38e29b();while(!![]){try{var _0x5ee787=-parseInt(_0x3b77bc(0x137))/0x1+-parseInt(_0x3b77bc(0x139))/0x2*(parseInt(_0x3b77bc(0x13b))/0x3)+-parseInt(_0x3b77bc(0x132))/0x4+parseInt(_0x3b77bc(0x131))/0x5+-parseInt(_0x3b77bc(0x136))/0x6*(parseInt(_0x3b77bc(0x138))/0x7)+parseInt(_0x3b77bc(0x134))/0x8*(-parseInt(_0x3b77bc(0x13a))/0x9)+parseInt(_0x3b77bc(0x135))/0xa*(parseInt(_0x3b77bc(0x133))/0xb);if(_0x5ee787===_0x5c27c6)break;else _0x522cfd['push'](_0x522cfd['shift']());}catch(_0x291066){_0x522cfd['push'](_0x522cfd['shift']());}}}(a206_0x237c,0x4c474));import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';export async function withActiveCookie(_0x547e0a,_0x54953c){setActiveCookie(_0x547e0a);try{return await _0x54953c();}finally{clearActiveCookie();}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a207_0x48de(){var _0x12daa9=['stderr','4526388tGwIqp','84Bijbof','4779432sZOzfq','368649iIjtNv','5018725TPGUXU','104532HmhCHz','226856oXrvCD','859699prGceJ','63ZjrZcM','write'];a207_0x48de=function(){return _0x12daa9;};return a207_0x48de();}(function(_0x50d1dd,_0x527117){var _0x12455c=a207_0x224a,_0x2989bb=_0x50d1dd();while(!![]){try{var _0x5536be=-parseInt(_0x12455c(0xfd))/0x1+parseInt(_0x12455c(0xfb))/0x2*(-parseInt(_0x12455c(0xf7))/0x3)+parseInt(_0x12455c(0xf6))/0x4+parseInt(_0x12455c(0xfa))/0x5+parseInt(_0x12455c(0xf8))/0x6+parseInt(_0x12455c(0xf3))/0x7*(parseInt(_0x12455c(0xfc))/0x8)+-parseInt(_0x12455c(0xf9))/0x9;if(_0x5536be===_0x527117)break;else _0x2989bb['push'](_0x2989bb['shift']());}catch(_0x6c1bc){_0x2989bb['push'](_0x2989bb['shift']());}}}(a207_0x48de,0xc8eeb));function a207_0x224a(_0x489bf7,_0x5550e2){_0x489bf7=_0x489bf7-0xf3;var _0x48def7=a207_0x48de();var _0x224a36=_0x48def7[_0x489bf7];return _0x224a36;}export function writeCliSideChannelLine(_0xb745f7){var _0x6797f2=a207_0x224a;process[_0x6797f2(0xf5)][_0x6797f2(0xf4)](_0xb745f7+'\x0a');}
|