@lovrabet/rabetbase-cli 2.2.1-beta.1 → 2.2.1-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/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
|
-
function
|
|
1
|
+
const a203_0x4444cc=a203_0x4d22;function a203_0x4d22(_0x57c773,_0x2d2f02){_0x57c773=_0x57c773-0x68;const _0x37c83e=a203_0x37c8();let _0x4d2269=_0x37c83e[_0x57c773];return _0x4d2269;}function a203_0x37c8(){const _0x3a5e9a=['processDirectory','toLowerCase','now','getDate','103279KZuGZl','getMinutes','toISOString','5tCzRJF','datasetCode','readFile','14rMrDtR','\x20},','getMonth','1418916xLDcBQ','模板内容替换失败','302520jWaQLE','getSeconds','toUpperCase','163zOIWtX','.jsx','.tsx','replace','3489696FXTkch','1614SHsCUh','isFile','promises','map','YourModel','slice','split','push','template','datasetCode:\x20\x22','.ts','isDirectory','charAt','.js','processTemplate','470aZYnZh','replaceApiContent','1861608rXNFEN','success','processFile','toDisplayTitle','message','模板内容替换完成','.css','default','endsWith','pad','alias','utf8','alias:\x20\x22','1068352OWtoeB','.json','开始处理模板内容替换','info','toComponentName','\x0a\x20\x20\x20\x20{\x20','.tpl','error','api','join','name','pop','.md','name:\x20\x22','extname'];a203_0x37c8=function(){return _0x3a5e9a;};return a203_0x37c8();}(function(_0x2134bb,_0x2ed7be){const _0x2ec1bc=a203_0x4d22,_0x5e1edd=_0x2134bb();while(!![]){try{const _0x4835eb=-parseInt(_0x2ec1bc(0x82))/0x1*(-parseInt(_0x2ec1bc(0x87))/0x2)+parseInt(_0x2ec1bc(0x7d))/0x3+-parseInt(_0x2ec1bc(0x7f))/0x4+-parseInt(_0x2ec1bc(0x77))/0x5*(-parseInt(_0x2ec1bc(0x98))/0x6)+parseInt(_0x2ec1bc(0x7a))/0x7*(parseInt(_0x2ec1bc(0xa5))/0x8)+-parseInt(_0x2ec1bc(0x86))/0x9+parseInt(_0x2ec1bc(0x96))/0xa*(-parseInt(_0x2ec1bc(0x74))/0xb);if(_0x4835eb===_0x2ed7be)break;else _0x5e1edd['push'](_0x5e1edd['shift']());}catch(_0x2afbfd){_0x5e1edd['push'](_0x5e1edd['shift']());}}}(a203_0x37c8,0x43adc));import a203_0x4523f0 from'node:fs';import a203_0x1d345c from'node:path';import{logger}from'../utils/logger.js';import{getCliVersion}from'../utils/version.js';const CLI_VERSION=getCliVersion();export class TemplateReplacer{static[a203_0x4444cc(0xa1)](_0x21e647){return String(_0x21e647)['padStart'](0x2,'0');}static['formatLocalTimestamp'](_0x2fc4cf){const _0x8650a=a203_0x4444cc,_0x9b5fd4=_0x2fc4cf['getFullYear'](),_0x750399=this[_0x8650a(0xa1)](_0x2fc4cf[_0x8650a(0x7c)]()+0x1),_0x124486=this['pad'](_0x2fc4cf[_0x8650a(0x73)]()),_0x449ffb=this[_0x8650a(0xa1)](_0x2fc4cf['getHours']()),_0xa1af1e=this[_0x8650a(0xa1)](_0x2fc4cf[_0x8650a(0x75)]()),_0x38b770=this['pad'](_0x2fc4cf[_0x8650a(0x80)]());return{'createdAt':_0x9b5fd4+'-'+_0x750399+'-'+_0x124486+'\x20'+_0x449ffb+':'+_0xa1af1e+':'+_0x38b770,'createdDate':_0x9b5fd4+'-'+_0x750399+'-'+_0x124486,'createdTime':_0x449ffb+':'+_0xa1af1e+':'+_0x38b770};}static[a203_0x4444cc(0xa9)](_0x1ef97b){const _0x2019ef=a203_0x4444cc,_0x2fe456=_0x1ef97b[_0x2019ef(0x8d)]('/')[_0x2019ef(0x6c)]()||_0x1ef97b;return _0x2fe456['split']('-')['map'](_0x244e7a=>_0x244e7a[_0x2019ef(0x93)](0x0)[_0x2019ef(0x81)]()+_0x244e7a[_0x2019ef(0x8c)](0x1)[_0x2019ef(0x71)]())[_0x2019ef(0x6a)]('');}static[a203_0x4444cc(0x9b)](_0x3a16fb){const _0x4f6604=a203_0x4444cc,_0x2e1a5d=_0x3a16fb[_0x4f6604(0x8d)]('/')[_0x4f6604(0x6c)]()||_0x3a16fb;return _0x2e1a5d[_0x4f6604(0x8d)]('-')[_0x4f6604(0x8a)](_0x410fa3=>_0x410fa3[_0x4f6604(0x93)](0x0)['toUpperCase']()+_0x410fa3[_0x4f6604(0x8c)](0x1)[_0x4f6604(0x71)]())[_0x4f6604(0x6a)]('\x20');}static['replaceContent'](_0x2affea,_0x5bb275,_0x385304){const _0x33168e=a203_0x4444cc,_0x5d3d9c=this[_0x33168e(0xa9)](_0x5bb275),_0x366ba0=this['toDisplayTitle'](_0x5bb275),{createdAt:_0x2647a9,createdDate:_0x3a4869,createdTime:_0x385445}=this['formatLocalTimestamp'](new Date());let _0x3786c6=_0x2affea[_0x33168e(0x85)](/\{CliVersion\}/g,CLI_VERSION)[_0x33168e(0x85)](/\{ComponentName\}/g,_0x5d3d9c)[_0x33168e(0x85)](/\{DisplayTitle\}/g,_0x366ba0)['replace'](/\{PageName\}/g,_0x5bb275)[_0x33168e(0x85)](/\{TemplateName\}/g,_0x385304)[_0x33168e(0x85)](/\{CreatedAt\}/g,_0x2647a9)[_0x33168e(0x85)](/\{CreatedDate\}/g,_0x3a4869)[_0x33168e(0x85)](/\{CreatedTime\}/g,_0x385445);return _0x3786c6;}static[a203_0x4444cc(0x97)](_0x444603,_0x24238f,_0x279500,_0x30f163,_0xf2cc06,_0x14ae2a,_0x2ec776,_0x40e9df){const _0x51a764=a203_0x4444cc,_0x3c6c76=new Date(),_0x5562a9=_0x3c6c76[_0x51a764(0x76)](),_0x5bea7f=_0x279500['map'](_0x520d10=>{const _0x5ab0a8=_0x51a764,_0x3d9555=[_0x5ab0a8(0x90)+_0x520d10[_0x5ab0a8(0x78)]+'\x22','tableName:\x20\x22'+_0x520d10['tableName']+'\x22',_0x5ab0a8(0x6e)+_0x520d10['name']+'\x22'];return _0x520d10[_0x5ab0a8(0xa2)]&&_0x3d9555[_0x5ab0a8(0x8e)](_0x5ab0a8(0xa4)+_0x520d10[_0x5ab0a8(0xa2)]+'\x22'),_0x5ab0a8(0xaa)+_0x3d9555[_0x5ab0a8(0x6a)](',\x20')+_0x5ab0a8(0x7b);})['join'](''),_0x40764e=_0x30f163||_0x279500[0x0]?.['alias']||_0x51a764(0x8b);let _0xff7a08=_0x444603['replace'](/\{AppCode\}/g,_0x24238f)['replace'](/\{ModelConfigs\}/g,_0x5bea7f)[_0x51a764(0x85)](/\{ExampleModelName\}/g,_0x40764e)[_0x51a764(0x85)](/\{ApiFileName\}/g,_0xf2cc06||_0x51a764(0x69))[_0x51a764(0x85)](/\{ConfigName\}/g,_0x14ae2a||_0x51a764(0x9f))[_0x51a764(0x85)](/\{ClientConfigParam\}/g,_0x2ec776||'')[_0x51a764(0x85)](/\{VarPrefix\}/g,_0x40e9df||'LOVRABET')[_0x51a764(0x85)](/\{CreatedAt\}/g,_0x5562a9);return _0xff7a08;}static async[a203_0x4444cc(0x95)](_0xfb58b2,_0x432540,_0x100866,_0x4eb559,_0x58a9a9=!![]){const _0x5e3569=a203_0x4444cc,_0x10bca3=Date[_0x5e3569(0x72)]();try{_0x58a9a9&&logger[_0x5e3569(0xa8)](_0x5e3569(0x8f),_0x5e3569(0xa7),{'templatePath':_0xfb58b2,'targetPath':_0x432540,'pageName':_0x100866,'templateName':_0x4eb559});await a203_0x4523f0[_0x5e3569(0x89)]['mkdir'](_0x432540,{'recursive':!![]}),await this[_0x5e3569(0x70)](_0xfb58b2,_0x432540,_0x100866,_0x4eb559);if(_0x58a9a9){const _0x35a618=Date[_0x5e3569(0x72)]()-_0x10bca3;logger[_0x5e3569(0x99)](_0x5e3569(0x8f),_0x5e3569(0x9d),_0x35a618,{'pageName':_0x100866,'templateName':_0x4eb559});}}catch(_0x8b5ad7){if(_0x58a9a9){const _0xbe8893=Date[_0x5e3569(0x72)]()-_0x10bca3;logger[_0x5e3569(0x68)](_0x5e3569(0x8f),_0x5e3569(0x7e),{'templatePath':_0xfb58b2,'targetPath':_0x432540,'pageName':_0x100866,'templateName':_0x4eb559,'error':_0x8b5ad7 instanceof Error?_0x8b5ad7[_0x5e3569(0x9c)]:String(_0x8b5ad7),'duration':_0xbe8893});}throw _0x8b5ad7;}}static async[a203_0x4444cc(0x70)](_0x587785,_0x341646,_0x1eac2a,_0x7605e9){const _0x23a05b=a203_0x4444cc,_0x334176=await a203_0x4523f0[_0x23a05b(0x89)]['readdir'](_0x587785,{'withFileTypes':!![]});for(const _0x2698f2 of _0x334176){const _0x1c34c3=a203_0x1d345c[_0x23a05b(0x6a)](_0x587785,_0x2698f2[_0x23a05b(0x6b)]);let _0x103632=a203_0x1d345c[_0x23a05b(0x6a)](_0x341646,_0x2698f2['name']);_0x2698f2[_0x23a05b(0x6b)][_0x23a05b(0xa0)](_0x23a05b(0xab))&&(_0x103632=a203_0x1d345c[_0x23a05b(0x6a)](_0x341646,_0x2698f2[_0x23a05b(0x6b)][_0x23a05b(0x85)](/\.tpl$/,'')));if(_0x2698f2[_0x23a05b(0x92)]())await a203_0x4523f0[_0x23a05b(0x89)]['mkdir'](_0x103632,{'recursive':!![]}),await this[_0x23a05b(0x70)](_0x1c34c3,_0x103632,_0x1eac2a,_0x7605e9);else _0x2698f2[_0x23a05b(0x88)]()&&await this[_0x23a05b(0x9a)](_0x1c34c3,_0x103632,_0x1eac2a,_0x7605e9);}}static async[a203_0x4444cc(0x9a)](_0x17c725,_0x5ace3d,_0x12ca9a,_0x5c923d){const _0x1becfc=a203_0x4444cc,_0x12fc2f=a203_0x1d345c[_0x1becfc(0x6f)](_0x17c725)[_0x1becfc(0x71)]();_0x17c725[_0x1becfc(0xa0)](_0x1becfc(0xab))&&(_0x5ace3d=_0x5ace3d[_0x1becfc(0x85)](/\.tpl$/,''));const _0x3ee8ed=[_0x1becfc(0x84),_0x1becfc(0x91),_0x1becfc(0x83),_0x1becfc(0x94),_0x1becfc(0xa6),_0x1becfc(0x6d),_0x1becfc(0x9e),'.scss',_0x1becfc(0xab)];if(_0x3ee8ed['includes'](_0x12fc2f)||_0x17c725[_0x1becfc(0xa0)](_0x1becfc(0xab))){const _0x862b52=await a203_0x4523f0[_0x1becfc(0x89)][_0x1becfc(0x79)](_0x17c725,_0x1becfc(0xa3)),_0x14890e=this['replaceContent'](_0x862b52,_0x12ca9a,_0x5c923d);await a203_0x4523f0[_0x1becfc(0x89)]['writeFile'](_0x5ace3d,_0x14890e,_0x1becfc(0xa3));}else await a203_0x4523f0[_0x1becfc(0x89)]['copyFile'](_0x17c725,_0x5ace3d);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x357f98,_0x19b58f){const _0x26d563=a204_0x49a1,_0x3ca2ca=_0x357f98();while(!![]){try{const _0x83df77=-parseInt(_0x26d563(0x7e))/0x1*(-parseInt(_0x26d563(0x7f))/0x2)+parseInt(_0x26d563(0x97))/0x3+parseInt(_0x26d563(0x9f))/0x4+parseInt(_0x26d563(0x90))/0x5*(-parseInt(_0x26d563(0x8a))/0x6)+parseInt(_0x26d563(0x82))/0x7*(-parseInt(_0x26d563(0x8d))/0x8)+-parseInt(_0x26d563(0x9b))/0x9*(-parseInt(_0x26d563(0x7c))/0xa)+-parseInt(_0x26d563(0x84))/0xb;if(_0x83df77===_0x19b58f)break;else _0x3ca2ca['push'](_0x3ca2ca['shift']());}catch(_0x31998f){_0x3ca2ca['push'](_0x3ca2ca['shift']());}}}(a204_0x552e,0x2055c));import{mkdir,readFile,writeFile}from'node:fs/promises';function a204_0x49a1(_0x2ccb58,_0x42d1a1){_0x2ccb58=_0x2ccb58-0x7c;const _0x552e70=a204_0x552e();let _0x49a1b1=_0x552e70[_0x2ccb58];return _0x49a1b1;}import{homedir}from'node:os';import{dirname,join}from'node:path';function a204_0x552e(){const _0x227d6c=['latest',',\x20run:\x20','update-check.json','filter','608847PhAATl','number','stringify','json','9GgBhrD','map','valid','checkedAt','785288eFXZPH','https://registry.npmjs.org/-/package/','\x20available,\x20current\x20','https://www.npmjs.com/package/','/dist-tags','766390uPUVxu','string','243772qqcHvM','2fLXhwe','toLowerCase','lastNotifiedVersion','679coXNvK','length','3534905anRzXs','timeout','object','utf8','gte','rabetbase-cli','19674AYfmpq','lastNotifiedAt','trim','17872zcuWPQ','true','now','75QrNMCj','entries','/v/'];a204_0x552e=function(){return _0x227d6c;};return a204_0x552e();}import a204_0x26d3ee from'semver';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.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 _0x191bcd=a204_0x49a1,_0x338e53=process.env.RABETBASE_NO_UPDATE_NOTICE?.[_0x191bcd(0x8c)]()[_0x191bcd(0x80)]();return _0x338e53==='1'||_0x338e53===_0x191bcd(0x8e)||_0x338e53==='yes';}function cacheRoot(){return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),'.cache');}export function getUpdateNoticeCachePath(){const _0x256b90=a204_0x49a1;return join(cacheRoot(),_0x256b90(0x89),_0x256b90(0x95));}async function readUpdateNoticeCache(){const _0x507e94=a204_0x49a1;try{const _0x73dc99=await readFile(getUpdateNoticeCachePath(),_0x507e94(0x87)),_0x538848=JSON['parse'](_0x73dc99);if(!_0x538848||typeof _0x538848!==_0x507e94(0x86))return{};return _0x538848;}catch{return{};}}async function writeUpdateNoticeCache(_0x4b357d){const _0xcddb3a=a204_0x49a1;try{const _0x4f2513=getUpdateNoticeCachePath();await mkdir(dirname(_0x4f2513),{'recursive':!![]}),await writeFile(_0x4f2513,JSON[_0xcddb3a(0x99)](_0x4b357d,null,0x2)+'\x0a','utf8');}catch{}}function isFreshCheck(_0x3173ad,_0x53dd6e){const _0x3b30b0=a204_0x49a1;return typeof _0x3173ad[_0x3b30b0(0x9e)]==='number'&&_0x53dd6e-_0x3173ad['checkedAt']<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x3560ae,_0x43d533,_0x280d64){const _0x3d632f=a204_0x49a1;return _0x3560ae[_0x3d632f(0x81)]===_0x43d533&&typeof _0x3560ae[_0x3d632f(0x8b)]===_0x3d632f(0x98)&&_0x280d64-_0x3560ae[_0x3d632f(0x8b)]<UPDATE_NOTICE_TTL_MS;}async function fetchNpmDistTags(_0x23aa7e=0x5dc){const _0x469836=a204_0x49a1;try{const _0x74945e=await fetch(_0x469836(0xa0)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x469836(0xa3),{'signal':AbortSignal[_0x469836(0x85)](_0x23aa7e)});if(!_0x74945e['ok'])return null;const _0xe14b4a=await _0x74945e[_0x469836(0x9a)]();if(!_0xe14b4a||typeof _0xe14b4a!==_0x469836(0x86))return null;return Object['fromEntries'](Object[_0x469836(0x91)](_0xe14b4a)[_0x469836(0x96)](([,_0x25b54d])=>typeof _0x25b54d===_0x469836(0x7d)&&_0x25b54d['trim']()[_0x469836(0x83)]>0x0)[_0x469836(0x9c)](([_0x268e5a,_0x4ed6c5])=>[_0x268e5a,String(_0x4ed6c5)[_0x469836(0x8c)]()]));}catch{return null;}}export function buildNpmVersionUrl(_0x284a4b){const _0x288aa4=a204_0x49a1;return _0x288aa4(0xa2)+NPM_PACKAGE_NAME+_0x288aa4(0x92)+_0x284a4b;}export async function resolveLatestUpdateNotice(){const _0x347945=a204_0x49a1;if(isUpdateNoticeDisabled())return null;try{const _0x1685fc=Date[_0x347945(0x8f)](),_0x2d520f=getCliVersion(),_0x3ee6e1=await readUpdateNoticeCache();let _0x128baa=isFreshCheck(_0x3ee6e1,_0x1685fc)?_0x3ee6e1[_0x347945(0x93)]?.[_0x347945(0x8c)]():undefined;if(!_0x128baa&&!isFreshCheck(_0x3ee6e1,_0x1685fc)){const _0x58f22f=await fetchNpmDistTags();_0x128baa=_0x58f22f?.[_0x347945(0x93)]?.[_0x347945(0x8c)](),await writeUpdateNoticeCache({..._0x3ee6e1,'checkedAt':_0x1685fc,'latest':_0x128baa,'failed':!_0x128baa});}if(!_0x128baa||!a204_0x26d3ee[_0x347945(0x9d)](_0x2d520f)||!a204_0x26d3ee[_0x347945(0x9d)](_0x128baa))return null;if(a204_0x26d3ee[_0x347945(0x88)](_0x2d520f,_0x128baa))return null;if(isRecentlyNotified(_0x3ee6e1,_0x128baa,_0x1685fc))return null;const _0x55d824=CLI_BIN_NAME+'\x20update';return await writeUpdateNoticeCache({..._0x3ee6e1,'checkedAt':isFreshCheck(_0x3ee6e1,_0x1685fc)?_0x3ee6e1[_0x347945(0x9e)]:_0x1685fc,'latest':_0x128baa,'failed':![],'lastNotifiedVersion':_0x128baa,'lastNotifiedAt':_0x1685fc}),{'command':_0x55d824,'current':_0x2d520f,'latest':_0x128baa,'url':buildNpmVersionUrl(_0x128baa),'message':CLI_BIN_NAME+'\x20'+_0x128baa+_0x347945(0xa1)+_0x2d520f+_0x347945(0x94)+_0x55d824};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a205_0x1bee(_0x55801a,_0x471e84){_0x55801a=_0x55801a-0x18a;var _0x2d2778=a205_0x2d27();var _0x1bee86=_0x2d2778[_0x55801a];return _0x1bee86;}(function(_0x3270cb,_0xd404ab){var _0x4a7814=a205_0x1bee,_0x5d5ea8=_0x3270cb();while(!![]){try{var _0x293d06=parseInt(_0x4a7814(0x18f))/0x1*(-parseInt(_0x4a7814(0x18b))/0x2)+-parseInt(_0x4a7814(0x192))/0x3*(parseInt(_0x4a7814(0x18c))/0x4)+-parseInt(_0x4a7814(0x18a))/0x5*(-parseInt(_0x4a7814(0x194))/0x6)+-parseInt(_0x4a7814(0x193))/0x7*(-parseInt(_0x4a7814(0x190))/0x8)+parseInt(_0x4a7814(0x18d))/0x9+-parseInt(_0x4a7814(0x18e))/0xa+parseInt(_0x4a7814(0x191))/0xb;if(_0x293d06===_0xd404ab)break;else _0x5d5ea8['push'](_0x5d5ea8['shift']());}catch(_0x5f4f4a){_0x5d5ea8['push'](_0x5d5ea8['shift']());}}}(a205_0x2d27,0xdba25));import{VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}function a205_0x2d27(){var _0x5390a8=['12WHlzEy','23845SQjddo','183760QAUWrD','4lILOIU','76050UfzNQk','6124430ymCFqa','1wbzlxv','5003088ELrbjd','15635477jrXtTq','1382511viWzpg','7gyHlwq'];a205_0x2d27=function(){return _0x5390a8;};return a205_0x2d27();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x11af1e,_0x93d0da){var _0xcdd5a4=a206_0x4c47,_0x125a55=_0x11af1e();while(!![]){try{var _0x484a56=-parseInt(_0xcdd5a4(0xcd))/0x1*(-parseInt(_0xcdd5a4(0xc7))/0x2)+-parseInt(_0xcdd5a4(0xc5))/0x3+parseInt(_0xcdd5a4(0xca))/0x4*(parseInt(_0xcdd5a4(0xc6))/0x5)+-parseInt(_0xcdd5a4(0xcb))/0x6*(-parseInt(_0xcdd5a4(0xc9))/0x7)+parseInt(_0xcdd5a4(0xc8))/0x8*(-parseInt(_0xcdd5a4(0xcc))/0x9)+parseInt(_0xcdd5a4(0xce))/0xa+-parseInt(_0xcdd5a4(0xc4))/0xb;if(_0x484a56===_0x93d0da)break;else _0x125a55['push'](_0x125a55['shift']());}catch(_0x2f06ea){_0x125a55['push'](_0x125a55['shift']());}}}(a206_0x3a38,0xc46cc));function a206_0x3a38(){var _0x514672=['1199853QuYOXJ','162746RhfpVS','13246660NPqRAu','17443998XzkBzg','3507012kgJkhw','1115WGzwJa','12vhCJLt','40lRYyBI','2765KKYGXh','7588piWpsX','22812bgNNrH'];a206_0x3a38=function(){return _0x514672;};return a206_0x3a38();}import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';function a206_0x4c47(_0x565070,_0x33fee8){_0x565070=_0x565070-0xc4;var _0x3a38f6=a206_0x3a38();var _0x4c4777=_0x3a38f6[_0x565070];return _0x4c4777;}export async function withActiveCookie(_0x5561cc,_0x463b6c){setActiveCookie(_0x5561cc);try{return await _0x463b6c();}finally{clearActiveCookie();}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a207_0x2e5f(){var _0xf5d152=['544508mXFSJH','8HzwYak','1058656nqudeA','write','587410Hcunwg','253494nGFWaR','stderr','3861135vwZdIh','28VBPJit','122285dNprBw','428991ASePNv'];a207_0x2e5f=function(){return _0xf5d152;};return a207_0x2e5f();}function a207_0xa68a(_0x593b4a,_0x9a7ea4){_0x593b4a=_0x593b4a-0x13e;var _0x2e5fdf=a207_0x2e5f();var _0xa68a29=_0x2e5fdf[_0x593b4a];return _0xa68a29;}(function(_0x5bdd63,_0x540cc6){var _0x5751cb=a207_0xa68a,_0x346999=_0x5bdd63();while(!![]){try{var _0x434199=parseInt(_0x5751cb(0x140))/0x1+parseInt(_0x5751cb(0x142))/0x2+-parseInt(_0x5751cb(0x141))/0x3+parseInt(_0x5751cb(0x143))/0x4*(-parseInt(_0x5751cb(0x146))/0x5)+-parseInt(_0x5751cb(0x147))/0x6*(parseInt(_0x5751cb(0x13f))/0x7)+-parseInt(_0x5751cb(0x144))/0x8+parseInt(_0x5751cb(0x13e))/0x9;if(_0x434199===_0x540cc6)break;else _0x346999['push'](_0x346999['shift']());}catch(_0x3ce40a){_0x346999['push'](_0x346999['shift']());}}}(a207_0x2e5f,0x23389));export function writeCliSideChannelLine(_0x7c3d6e){var _0xb12237=a207_0xa68a;process[_0xb12237(0x148)][_0xb12237(0x145)](_0x7c3d6e+'\x0a');}
|