@lovrabet/rabetbase-cli 2.2.4-beta.3 → 2.2.4-beta.4
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 +2 -2
- package/templates/projects/sub-app-react-demo/src/vite-env.d.ts +1 -1
- package/templates/rules/lovrabet_rules.mdc.tpl +3 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a204_0x2abe7c=a204_0x3c9a;(function(_0x69ce0,_0x2294fc){const _0x30bdd5=a204_0x3c9a,_0x11a650=_0x69ce0();while(!![]){try{const _0x226bd6=-parseInt(_0x30bdd5(0x1d8))/0x1+-parseInt(_0x30bdd5(0x1da))/0x2+-parseInt(_0x30bdd5(0x1eb))/0x3*(parseInt(_0x30bdd5(0x1d5))/0x4)+parseInt(_0x30bdd5(0x1e6))/0x5*(-parseInt(_0x30bdd5(0x1cd))/0x6)+parseInt(_0x30bdd5(0x1f9))/0x7*(-parseInt(_0x30bdd5(0x1e1))/0x8)+parseInt(_0x30bdd5(0x1db))/0x9*(parseInt(_0x30bdd5(0x1f4))/0xa)+parseInt(_0x30bdd5(0x1f0))/0xb;if(_0x226bd6===_0x2294fc)break;else _0x11a650['push'](_0x11a650['shift']());}catch(_0x563514){_0x11a650['push'](_0x11a650['shift']());}}}(a204_0x2ceb,0x56b03));import a204_0x319a14 from'node:fs';import a204_0x3007d5 from'node:path';function a204_0x3c9a(_0x1f366c,_0x482bf4){_0x1f366c=_0x1f366c-0x1ca;const _0x2ceb68=a204_0x2ceb();let _0x3c9a88=_0x2ceb68[_0x1f366c];return _0x3c9a88;}function a204_0x2ceb(){const _0x335080=['pop','模板内容替换完成','.css','slice','datasetCode:\x20\x22','\x0a\x20\x20\x20\x20{\x20','default','8xzHWAb','getFullYear','padStart','706202EhVwsI','charAt','802938tetDJR','336699upiFTm','.js','processTemplate','utf8','name','getDate','8QgFOCS','.scss','extname','toUpperCase','endsWith','157555BPXwOO','getSeconds','processFile','writeFile','alias:\x20\x22','474807tkrxHM','\x20},','isFile','split','now','30002599ZAbMmC','mkdir','promises','processDirectory','30EuTnFu','readFile','.ts','join','map','3232243bGufwn','.md','replace','pad','.json','tableName:\x20\x22','message','name:\x20\x22','YourModel','.tsx','formatLocalTimestamp','toLowerCase','toComponentName','success','replaceContent','toDisplayTitle','copyFile','getMinutes','toISOString','template','alias','LOVRABET','tableName','.tpl','datasetCode','114VbQDEB'];a204_0x2ceb=function(){return _0x335080;};return a204_0x2ceb();}import{logger}from'../utils/logger.js';import{getCliVersion}from'../utils/version.js';const CLI_VERSION=getCliVersion();export class TemplateReplacer{static[a204_0x2abe7c(0x1fc)](_0x192b25){const _0x2d27aa=a204_0x2abe7c;return String(_0x192b25)[_0x2d27aa(0x1d7)](0x2,'0');}static['formatLocalTimestamp'](_0x5be170){const _0x4db90b=a204_0x2abe7c,_0x39e7a2=_0x5be170[_0x4db90b(0x1d6)](),_0x367731=this[_0x4db90b(0x1fc)](_0x5be170['getMonth']()+0x1),_0x452bd1=this[_0x4db90b(0x1fc)](_0x5be170[_0x4db90b(0x1e0)]()),_0x59f5f0=this[_0x4db90b(0x1fc)](_0x5be170['getHours']()),_0x2cc7fd=this[_0x4db90b(0x1fc)](_0x5be170[_0x4db90b(0x20a)]()),_0xfb0e81=this[_0x4db90b(0x1fc)](_0x5be170[_0x4db90b(0x1e7)]());return{'createdAt':_0x39e7a2+'-'+_0x367731+'-'+_0x452bd1+'\x20'+_0x59f5f0+':'+_0x2cc7fd+':'+_0xfb0e81,'createdDate':_0x39e7a2+'-'+_0x367731+'-'+_0x452bd1,'createdTime':_0x59f5f0+':'+_0x2cc7fd+':'+_0xfb0e81};}static[a204_0x2abe7c(0x205)](_0x5a441c){const _0x337e8b=a204_0x2abe7c,_0x2a8370=_0x5a441c[_0x337e8b(0x1ee)]('/')['pop']()||_0x5a441c;return _0x2a8370[_0x337e8b(0x1ee)]('-')[_0x337e8b(0x1f8)](_0x8d5470=>_0x8d5470[_0x337e8b(0x1d9)](0x0)[_0x337e8b(0x1e4)]()+_0x8d5470[_0x337e8b(0x1d1)](0x1)[_0x337e8b(0x204)]())[_0x337e8b(0x1f7)]('');}static[a204_0x2abe7c(0x208)](_0x1d9177){const _0x4ffca9=a204_0x2abe7c,_0x43431d=_0x1d9177['split']('/')[_0x4ffca9(0x1ce)]()||_0x1d9177;return _0x43431d['split']('-')[_0x4ffca9(0x1f8)](_0x24d3ec=>_0x24d3ec[_0x4ffca9(0x1d9)](0x0)[_0x4ffca9(0x1e4)]()+_0x24d3ec[_0x4ffca9(0x1d1)](0x1)[_0x4ffca9(0x204)]())[_0x4ffca9(0x1f7)]('\x20');}static[a204_0x2abe7c(0x207)](_0x35c079,_0x56b4ab,_0x4cedff){const _0x4ba1cf=a204_0x2abe7c,_0x518dcc=this['toComponentName'](_0x56b4ab),_0x5b7e10=this[_0x4ba1cf(0x208)](_0x56b4ab),{createdAt:_0x2bb425,createdDate:_0x4cab91,createdTime:_0x3ac91e}=this[_0x4ba1cf(0x203)](new Date());let _0x3a1b2e=_0x35c079[_0x4ba1cf(0x1fb)](/\{CliVersion\}/g,CLI_VERSION)[_0x4ba1cf(0x1fb)](/\{ComponentName\}/g,_0x518dcc)['replace'](/\{DisplayTitle\}/g,_0x5b7e10)[_0x4ba1cf(0x1fb)](/\{PageName\}/g,_0x56b4ab)[_0x4ba1cf(0x1fb)](/\{TemplateName\}/g,_0x4cedff)['replace'](/\{CreatedAt\}/g,_0x2bb425)[_0x4ba1cf(0x1fb)](/\{CreatedDate\}/g,_0x4cab91)[_0x4ba1cf(0x1fb)](/\{CreatedTime\}/g,_0x3ac91e);return _0x3a1b2e;}static['replaceApiContent'](_0x2ebd6f,_0x2f9302,_0x48e640,_0x221e36,_0x5df668,_0x2ab62e,_0x5a09dd,_0x22761f){const _0x4d3a62=a204_0x2abe7c,_0x2862c0=new Date(),_0x3413a9=_0x2862c0[_0x4d3a62(0x20b)](),_0x520ba8=_0x48e640[_0x4d3a62(0x1f8)](_0x389d12=>{const _0x45bd66=_0x4d3a62,_0x1b7bf6=[_0x45bd66(0x1d2)+_0x389d12[_0x45bd66(0x1cc)]+'\x22',_0x45bd66(0x1fe)+_0x389d12[_0x45bd66(0x1ca)]+'\x22',_0x45bd66(0x200)+_0x389d12['name']+'\x22'];return _0x389d12[_0x45bd66(0x20d)]&&_0x1b7bf6['push'](_0x45bd66(0x1ea)+_0x389d12[_0x45bd66(0x20d)]+'\x22'),_0x45bd66(0x1d3)+_0x1b7bf6['join'](',\x20')+_0x45bd66(0x1ec);})['join'](''),_0x23fbbd=_0x221e36||_0x48e640[0x0]?.[_0x4d3a62(0x20d)]||_0x4d3a62(0x201);let _0x48ce9b=_0x2ebd6f[_0x4d3a62(0x1fb)](/\{AppCode\}/g,_0x2f9302)['replace'](/\{ModelConfigs\}/g,_0x520ba8)[_0x4d3a62(0x1fb)](/\{ExampleModelName\}/g,_0x23fbbd)[_0x4d3a62(0x1fb)](/\{ApiFileName\}/g,_0x5df668||'api')['replace'](/\{ConfigName\}/g,_0x2ab62e||_0x4d3a62(0x1d4))[_0x4d3a62(0x1fb)](/\{ClientConfigParam\}/g,_0x5a09dd||'')[_0x4d3a62(0x1fb)](/\{VarPrefix\}/g,_0x22761f||_0x4d3a62(0x20e))['replace'](/\{CreatedAt\}/g,_0x3413a9);return _0x48ce9b;}static async[a204_0x2abe7c(0x1dd)](_0x363778,_0x11e440,_0x53dadb,_0x28542b,_0x2fa5d3=!![]){const _0x1ed1f0=a204_0x2abe7c,_0x68d210=Date['now']();try{_0x2fa5d3&&logger['info'](_0x1ed1f0(0x20c),'开始处理模板内容替换',{'templatePath':_0x363778,'targetPath':_0x11e440,'pageName':_0x53dadb,'templateName':_0x28542b});await a204_0x319a14[_0x1ed1f0(0x1f2)][_0x1ed1f0(0x1f1)](_0x11e440,{'recursive':!![]}),await this[_0x1ed1f0(0x1f3)](_0x363778,_0x11e440,_0x53dadb,_0x28542b);if(_0x2fa5d3){const _0x48618b=Date[_0x1ed1f0(0x1ef)]()-_0x68d210;logger[_0x1ed1f0(0x206)](_0x1ed1f0(0x20c),_0x1ed1f0(0x1cf),_0x48618b,{'pageName':_0x53dadb,'templateName':_0x28542b});}}catch(_0x3d737e){if(_0x2fa5d3){const _0x2ea1fa=Date[_0x1ed1f0(0x1ef)]()-_0x68d210;logger['error']('template','模板内容替换失败',{'templatePath':_0x363778,'targetPath':_0x11e440,'pageName':_0x53dadb,'templateName':_0x28542b,'error':_0x3d737e instanceof Error?_0x3d737e[_0x1ed1f0(0x1ff)]:String(_0x3d737e),'duration':_0x2ea1fa});}throw _0x3d737e;}}static async['processDirectory'](_0x2f8041,_0x1b3b6f,_0x3c5a00,_0x26f0b5){const _0x51e30c=a204_0x2abe7c,_0x1ea58a=await a204_0x319a14[_0x51e30c(0x1f2)]['readdir'](_0x2f8041,{'withFileTypes':!![]});for(const _0x1aaab4 of _0x1ea58a){const _0x3f847d=a204_0x3007d5[_0x51e30c(0x1f7)](_0x2f8041,_0x1aaab4[_0x51e30c(0x1df)]);let _0x567135=a204_0x3007d5[_0x51e30c(0x1f7)](_0x1b3b6f,_0x1aaab4[_0x51e30c(0x1df)]);_0x1aaab4['name'][_0x51e30c(0x1e5)](_0x51e30c(0x1cb))&&(_0x567135=a204_0x3007d5['join'](_0x1b3b6f,_0x1aaab4['name'][_0x51e30c(0x1fb)](/\.tpl$/,'')));if(_0x1aaab4['isDirectory']())await a204_0x319a14[_0x51e30c(0x1f2)]['mkdir'](_0x567135,{'recursive':!![]}),await this[_0x51e30c(0x1f3)](_0x3f847d,_0x567135,_0x3c5a00,_0x26f0b5);else _0x1aaab4[_0x51e30c(0x1ed)]()&&await this[_0x51e30c(0x1e8)](_0x3f847d,_0x567135,_0x3c5a00,_0x26f0b5);}}static async[a204_0x2abe7c(0x1e8)](_0x421144,_0x2c5f9b,_0x10df15,_0x24eba0){const _0x2ff360=a204_0x2abe7c,_0x14c936=a204_0x3007d5[_0x2ff360(0x1e3)](_0x421144)[_0x2ff360(0x204)]();_0x421144['endsWith']('.tpl')&&(_0x2c5f9b=_0x2c5f9b['replace'](/\.tpl$/,''));const _0x364088=[_0x2ff360(0x202),_0x2ff360(0x1f6),'.jsx',_0x2ff360(0x1dc),_0x2ff360(0x1fd),_0x2ff360(0x1fa),_0x2ff360(0x1d0),_0x2ff360(0x1e2),'.tpl'];if(_0x364088['includes'](_0x14c936)||_0x421144['endsWith'](_0x2ff360(0x1cb))){const _0x371483=await a204_0x319a14[_0x2ff360(0x1f2)][_0x2ff360(0x1f5)](_0x421144,_0x2ff360(0x1de)),_0x325184=this['replaceContent'](_0x371483,_0x10df15,_0x24eba0);await a204_0x319a14[_0x2ff360(0x1f2)][_0x2ff360(0x1e9)](_0x2c5f9b,_0x325184,_0x2ff360(0x1de));}else await a204_0x319a14[_0x2ff360(0x1f2)][_0x2ff360(0x209)](_0x421144,_0x2c5f9b);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x51b011,_0x34eec0){const _0x5c5275=a205_0x23ee,_0x99a2ca=_0x51b011();while(!![]){try{const _0x33b85d=-parseInt(_0x5c5275(0x86))/0x1*(-parseInt(_0x5c5275(0x7b))/0x2)+-parseInt(_0x5c5275(0x8c))/0x3*(parseInt(_0x5c5275(0x76))/0x4)+-parseInt(_0x5c5275(0x8f))/0x5*(-parseInt(_0x5c5275(0x85))/0x6)+-parseInt(_0x5c5275(0x75))/0x7*(-parseInt(_0x5c5275(0x87))/0x8)+parseInt(_0x5c5275(0x90))/0x9*(parseInt(_0x5c5275(0x81))/0xa)+parseInt(_0x5c5275(0x8e))/0xb+-parseInt(_0x5c5275(0x7e))/0xc;if(_0x33b85d===_0x34eec0)break;else _0x99a2ca['push'](_0x99a2ca['shift']());}catch(_0x490244){_0x99a2ca['push'](_0x99a2ca['shift']());}}}(a205_0x19ee,0x4df8a));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';import a205_0x22ec19 from'semver';function a205_0x19ee(){const _0x5e656a=['1ADVkbP','24SFHovg','stableVersion','yes','lastNotifiedAt','latest','9XMsanW','\x20available,\x20current\x20','4766949ShHzzp','415GkZPzy','3458277HPruuU','checkedAt','rabetbase-cli','true','toLowerCase','/v/','638855oiAzXW','717252qfveND','valid','parse','trim','https://www.npmjs.com/package/','660032VvZxIi','utf8','now','8420736ztmVex','number','\x20update','10WQwHWF',',\x20run:\x20','.cache','update-check.json','9948akcnUv'];a205_0x19ee=function(){return _0x5e656a;};return a205_0x19ee();}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 _0x38c8b6=a205_0x23ee,_0x4d428b=process.env.RABETBASE_NO_UPDATE_NOTICE?.[_0x38c8b6(0x79)]()[_0x38c8b6(0x73)]();return _0x4d428b==='1'||_0x4d428b===_0x38c8b6(0x93)||_0x4d428b===_0x38c8b6(0x89);}function cacheRoot(){const _0xf97466=a205_0x23ee;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0xf97466(0x83));}export function getUpdateNoticeCachePath(){const _0x300942=a205_0x23ee;return join(cacheRoot(),_0x300942(0x92),_0x300942(0x84));}async function readUpdateNoticeCache(){const _0x5b1410=a205_0x23ee;try{const _0x32eaae=await readFile(getUpdateNoticeCachePath(),_0x5b1410(0x7c)),_0x3baf0c=JSON[_0x5b1410(0x78)](_0x32eaae);if(!_0x3baf0c||typeof _0x3baf0c!=='object')return{};return _0x3baf0c;}catch{return{};}}async function writeUpdateNoticeCache(_0x5aa7e0){try{const _0xe26a27=getUpdateNoticeCachePath();await mkdir(dirname(_0xe26a27),{'recursive':!![]}),await writeFile(_0xe26a27,JSON['stringify'](_0x5aa7e0,null,0x2)+'\x0a','utf8');}catch{}}function isFreshCheck(_0x552511,_0x176ab0){const _0x195a49=a205_0x23ee;return typeof _0x552511[_0x195a49(0x91)]===_0x195a49(0x7f)&&_0x176ab0-_0x552511['checkedAt']<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x3ba8a2,_0x2e3e4b,_0x6f8b78){const _0x549a27=a205_0x23ee;return _0x3ba8a2['lastNotifiedVersion']===_0x2e3e4b&&typeof _0x3ba8a2[_0x549a27(0x8a)]==='number'&&_0x6f8b78-_0x3ba8a2[_0x549a27(0x8a)]<UPDATE_NOTICE_TTL_MS;}function a205_0x23ee(_0x3c74e8,_0x351397){_0x3c74e8=_0x3c74e8-0x73;const _0x19eedb=a205_0x19ee();let _0x23eee3=_0x19eedb[_0x3c74e8];return _0x23eee3;}export function buildNpmVersionUrl(_0x436036){const _0x14173a=a205_0x23ee;return _0x14173a(0x7a)+NPM_PACKAGE_NAME+_0x14173a(0x74)+_0x436036;}export async function resolveLatestUpdateNotice(){const _0x274403=a205_0x23ee;if(isUpdateNoticeDisabled())return null;try{const _0x1d9452=Date[_0x274403(0x7d)](),_0x48a937=getCliVersion(),_0x37c13b=await readUpdateNoticeCache();let _0x2c6b29=isFreshCheck(_0x37c13b,_0x1d9452)?_0x37c13b[_0x274403(0x8b)]?.[_0x274403(0x79)]():undefined;if(!_0x2c6b29&&!isFreshCheck(_0x37c13b,_0x1d9452)){const _0x2acc41=await getCliVersionPolicy();_0x2c6b29=_0x2acc41?.[_0x274403(0x88)]?.[_0x274403(0x79)]()||undefined,await writeUpdateNoticeCache({..._0x37c13b,'checkedAt':_0x1d9452,'latest':_0x2c6b29,'failed':!_0x2c6b29});}if(!_0x2c6b29||!a205_0x22ec19[_0x274403(0x77)](_0x48a937)||!a205_0x22ec19['valid'](_0x2c6b29))return null;if(a205_0x22ec19['gte'](_0x48a937,_0x2c6b29))return null;if(isRecentlyNotified(_0x37c13b,_0x2c6b29,_0x1d9452))return null;const _0x4a980f=CLI_BIN_NAME+_0x274403(0x80);return await writeUpdateNoticeCache({..._0x37c13b,'checkedAt':isFreshCheck(_0x37c13b,_0x1d9452)?_0x37c13b[_0x274403(0x91)]:_0x1d9452,'latest':_0x2c6b29,'failed':![],'lastNotifiedVersion':_0x2c6b29,'lastNotifiedAt':_0x1d9452}),{'command':_0x4a980f,'current':_0x48a937,'latest':_0x2c6b29,'url':buildNpmVersionUrl(_0x2c6b29),'message':CLI_BIN_NAME+'\x20'+_0x2c6b29+_0x274403(0x8d)+_0x48a937+_0x274403(0x82)+_0x4a980f};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5a4438,_0x328f0d){var _0x3a42c8=a206_0x1150,_0x189260=_0x5a4438();while(!![]){try{var _0x579f75=parseInt(_0x3a42c8(0x99))/0x1+-parseInt(_0x3a42c8(0x9e))/0x2*(-parseInt(_0x3a42c8(0x9c))/0x3)+parseInt(_0x3a42c8(0x96))/0x4*(parseInt(_0x3a42c8(0x9d))/0x5)+-parseInt(_0x3a42c8(0x9a))/0x6+-parseInt(_0x3a42c8(0x9f))/0x7+parseInt(_0x3a42c8(0x98))/0x8*(-parseInt(_0x3a42c8(0xa0))/0x9)+-parseInt(_0x3a42c8(0x97))/0xa*(-parseInt(_0x3a42c8(0x9b))/0xb);if(_0x579f75===_0x328f0d)break;else _0x189260['push'](_0x189260['shift']());}catch(_0x1617d8){_0x189260['push'](_0x189260['shift']());}}}(a206_0x4736,0x2a0ed));function a206_0x1150(_0xf8b7a6,_0x142dbe){_0xf8b7a6=_0xf8b7a6-0x96;var _0x473634=a206_0x4736();var _0x11501a=_0x473634[_0xf8b7a6];return _0x11501a;}import{VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}function a206_0x4736(){var _0x54e444=['40LzhofD','340xePQIc','897096fkYJvW','251898SnGOPq','1521900dmPEuE','89243FwLWqQ','1110QYipot','98385yYveyx','478qAcxlW','354270nhhHsh','27iOPQQN'];a206_0x4736=function(){return _0x54e444;};return a206_0x4736();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x87a62c,_0xf32509){var _0x304f36=a207_0x435b,_0x27dca4=_0x87a62c();while(!![]){try{var _0x38c834=parseInt(_0x304f36(0xf5))/0x1+parseInt(_0x304f36(0xf6))/0x2+parseInt(_0x304f36(0xf2))/0x3*(parseInt(_0x304f36(0xf3))/0x4)+parseInt(_0x304f36(0xf0))/0x5*(-parseInt(_0x304f36(0xf4))/0x6)+-parseInt(_0x304f36(0xef))/0x7+parseInt(_0x304f36(0xee))/0x8+-parseInt(_0x304f36(0xf1))/0x9;if(_0x38c834===_0xf32509)break;else _0x27dca4['push'](_0x27dca4['shift']());}catch(_0x11e29d){_0x27dca4['push'](_0x27dca4['shift']());}}}(a207_0x17d8,0x9fa4b));function a207_0x17d8(){var _0xeae803=['795AmCdQZ','3436NVFGqh','594282jIVZLC','1166426UgCSvT','276538HsdyOr','7139880EUHxno','8283541uCMYnZ','5FVCHcE','4396554qKEPlw'];a207_0x17d8=function(){return _0xeae803;};return a207_0x17d8();}function a207_0x435b(_0x156ed0,_0x5ce339){_0x156ed0=_0x156ed0-0xee;var _0x17d800=a207_0x17d8();var _0x435be5=_0x17d800[_0x156ed0];return _0x435be5;}import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';export async function withActiveCookie(_0x3e7cea,_0x4c157f){setActiveCookie(_0x3e7cea);try{return await _0x4c157f();}finally{clearActiveCookie();}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a208_0x147b(_0x41d424,_0x5d919e){_0x41d424=_0x41d424-0x94;var _0x3d47d3=a208_0x3d47();var _0x147bd3=_0x3d47d3[_0x41d424];return _0x147bd3;}(function(_0x3f3769,_0x347c33){var _0x18fb52=a208_0x147b,_0x4057b8=_0x3f3769();while(!![]){try{var _0x4a60da=-parseInt(_0x18fb52(0x9f))/0x1*(-parseInt(_0x18fb52(0x9b))/0x2)+parseInt(_0x18fb52(0x9e))/0x3+-parseInt(_0x18fb52(0x98))/0x4+parseInt(_0x18fb52(0x99))/0x5+parseInt(_0x18fb52(0x95))/0x6*(parseInt(_0x18fb52(0x97))/0x7)+-parseInt(_0x18fb52(0x9d))/0x8+parseInt(_0x18fb52(0x96))/0x9*(-parseInt(_0x18fb52(0x94))/0xa);if(_0x4a60da===_0x347c33)break;else _0x4057b8['push'](_0x4057b8['shift']());}catch(_0x577f41){_0x4057b8['push'](_0x4057b8['shift']());}}}(a208_0x3d47,0xc1635));export function writeCliSideChannelLine(_0x55f81f){var _0x2e83cb=a208_0x147b;process[_0x2e83cb(0x9c)][_0x2e83cb(0x9a)](_0x55f81f+'\x0a');}function a208_0x3d47(){var _0x5381f9=['write','76264IRQDwZ','stderr','8490144jrfOPr','4708818rQyKgg','14FpEpGi','4169330HuRBHS','90TnaIBn','9aSEZzh','98966KTxnPY','4419676hRCvSB','5298565NktMIe'];a208_0x3d47=function(){return _0x5381f9;};return a208_0x3d47();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lovrabet/rabetbase-cli",
|
|
3
|
-
"version": "2.2.4-beta.
|
|
3
|
+
"version": "2.2.4-beta.4",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
],
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"@inquirer/prompts": "^8.3.2",
|
|
59
|
-
"@lovrabet/cli-framework": "1.0.
|
|
59
|
+
"@lovrabet/cli-framework": "1.0.4",
|
|
60
60
|
"@lovrabet/otel-logger": "1.0.1-beta.5",
|
|
61
61
|
"@opentelemetry/api": "^1.9.1",
|
|
62
62
|
"chalk": "^5.6.2",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/// <reference types="vite/client" />
|
|
2
|
-
/// <reference types="vite-plugin-pages/client" />
|
|
2
|
+
/// <reference types="vite-plugin-pages/client-react" />
|
|
@@ -798,6 +798,9 @@ import {
|
|
|
798
798
|
- **必须使用操作符**:`where: { status: { $eq: 'active' } }`,不是 `where: { status: 'active' }`
|
|
799
799
|
- **参数必须是数组**:`select: ['id', 'name']`,不是 `select: 'id,name'`
|
|
800
800
|
|
|
801
|
+
#### Aggregate 查询
|
|
802
|
+
- **聚合列用 column**:`aggregate: [{ type: 'COUNT', column: 'id', alias: 'cnt' }]`,不要写旧别名 `field`
|
|
803
|
+
|
|
801
804
|
#### SQL API
|
|
802
805
|
- **使用方式**:`client.sql.execute({ sqlCode, params })` - 对象参数格式
|
|
803
806
|
- **返回值检查**:应用层必须检查 `execSuccess` 状态
|
|
@@ -888,4 +891,3 @@ import {
|
|
|
888
891
|
---
|
|
889
892
|
|
|
890
893
|
> update:2025-01-24
|
|
891
|
-
|