@lovrabet/rabetbase-cli 2.3.9 → 2.3.10-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/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.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-skill/index.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-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.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/business-group-update.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/generate.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-audit.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/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.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/file/index.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/delete.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.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/mutations.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/notification/config-list.js +1 -1
- package/lib/commands/notification/index.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/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.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/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.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/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.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/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.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-index-auditor.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/error-output.js +1 -1
- package/lib/framework/explicit-yes.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
package/lib/utils/rules-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a255_0x59bad0=a255_0x5677;(function(_0x1a5ac3,_0x371694){const _0x2acfef=a255_0x5677,_0x1db93a=_0x1a5ac3();while(!![]){try{const _0x5f446d=-parseInt(_0x2acfef(0xa6))/0x1+parseInt(_0x2acfef(0x9c))/0x2+parseInt(_0x2acfef(0x9d))/0x3+-parseInt(_0x2acfef(0xa4))/0x4+-parseInt(_0x2acfef(0xa5))/0x5+parseInt(_0x2acfef(0x98))/0x6*(parseInt(_0x2acfef(0xa7))/0x7)+parseInt(_0x2acfef(0x94))/0x8;if(_0x5f446d===_0x371694)break;else _0x1db93a['push'](_0x1db93a['shift']());}catch(_0x3f0214){_0x1db93a['push'](_0x1db93a['shift']());}}}(a255_0x3062,0x781c6));import{existsSync,mkdirSync,readFileSync,writeFileSync}from'node:fs';function a255_0x5677(_0x4dd49c,_0x4dfd3b){_0x4dd49c=_0x4dd49c-0x93;const _0x306232=a255_0x3062();let _0x567758=_0x306232[_0x4dd49c];return _0x567758;}import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';function a255_0x3062(){const _0x10ecc7=['1794OQBoNy','CDN\x20请求失败:\x20','statusText','utf-8','1929158cMEeKh','702513tkbpUP','json','../../templates/rules/lovrabet_rules.mdc.tpl','string','content','status','CDN\x20返回数据格式错误','2319036zjXdJL','3426790NjQQhK','563559RtpGmO','7763PGKWFT','本地模板文件不存在:\x20','agents.md','6322472DsCqjD','.cursor/rules','catch','/rules/rules.json'];a255_0x3062=function(){return _0x10ecc7;};return a255_0x3062();}import{getTemplateBaseUrl}from'../utils/config.js';import{appendUpdateTime}from'../utils/guides-cdn.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function getRulesCdnUrl(){const _0x472dc4=a255_0x5677,_0x40c7b8=getTemplateBaseUrl();return _0x40c7b8+_0x472dc4(0x97);}const LOCAL_TEMPLATE_PATH=resolve(__dirname,a255_0x59bad0(0x9f));export async function fetchRulesFromCDN(){const _0x2bedbe=a255_0x59bad0,_0x4d6354=getRulesCdnUrl(),_0x3393fa=await fetch(_0x4d6354,{'headers':{'Accept':'application/json'}});if(!_0x3393fa['ok'])throw new Error(_0x2bedbe(0x99)+_0x3393fa[_0x2bedbe(0xa2)]+'\x20'+_0x3393fa[_0x2bedbe(0x9a)]);const _0x565878=await _0x3393fa[_0x2bedbe(0x9e)]();if(!_0x565878[_0x2bedbe(0xa1)]||typeof _0x565878[_0x2bedbe(0xa1)]!==_0x2bedbe(0xa0))throw new Error(_0x2bedbe(0xa3));return _0x565878;}export async function getRulesContent(){try{const _0x17874d=await fetchRulesFromCDN();return _0x17874d['content'];}catch{return readLocalTemplate();}}export function readLocalTemplate(){const _0x2e0622=a255_0x59bad0;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,_0x2e0622(0x9b));throw new Error(_0x2e0622(0xa8)+LOCAL_TEMPLATE_PATH);}export async function writeRulesFile(_0x5d3701){const _0x2b741d=a255_0x59bad0,_0x48f430=await fetchRulesFromCDN()[_0x2b741d(0x96)](()=>null);let _0x9fd6d0;_0x48f430?(_0x9fd6d0=_0x48f430['content'],_0x48f430['lastUpdated']&&(_0x9fd6d0=appendUpdateTime(_0x9fd6d0,_0x48f430['lastUpdated']))):_0x9fd6d0=readLocalTemplate();const _0x5e31d9=dirname(_0x5d3701);!existsSync(_0x5e31d9)&&mkdirSync(_0x5e31d9,{'recursive':!![]}),writeFileSync(_0x5d3701,_0x9fd6d0,_0x2b741d(0x9b));}export async function copyRulesToCursor(_0x521266){const _0x3ae022=a255_0x59bad0,_0x5c2617=join(_0x521266,_0x3ae022(0x95)),_0x3c50da=join(_0x5c2617,'lovrabet_rules.mdc');if(existsSync(_0x3c50da))return![];return await writeRulesFile(_0x3c50da),!![];}export async function copyRulesToAgentsMd(_0x4e8cfe){const _0x5f0771=a255_0x59bad0,_0x4c858d=join(_0x4e8cfe,_0x5f0771(0x93));if(existsSync(_0x4c858d))return![];return await writeRulesFile(_0x4c858d),!![];}
|
package/lib/utils/sleep.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function sleep(
|
|
1
|
+
export function sleep(_0xff50fd){return new Promise(_0x13081f=>setTimeout(_0x13081f,_0xff50fd));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a257_0xfb18(_0x4ce6dc,_0xc8a293){_0x4ce6dc=_0x4ce6dc-0x142;const _0x5236cb=a257_0x5236();let _0xfb1827=_0x5236cb[_0x4ce6dc];return _0xfb1827;}const a257_0xadf9a7=a257_0xfb18;(function(_0xbb6245,_0x395841){const _0x13ad28=a257_0xfb18,_0x28b6eb=_0xbb6245();while(!![]){try{const _0x2e7303=-parseInt(_0x13ad28(0x157))/0x1+-parseInt(_0x13ad28(0x174))/0x2+parseInt(_0x13ad28(0x166))/0x3+-parseInt(_0x13ad28(0x165))/0x4+parseInt(_0x13ad28(0x186))/0x5+-parseInt(_0x13ad28(0x156))/0x6+parseInt(_0x13ad28(0x176))/0x7;if(_0x2e7303===_0x395841)break;else _0x28b6eb['push'](_0x28b6eb['shift']());}catch(_0x3108ef){_0x28b6eb['push'](_0x28b6eb['shift']());}}}(a257_0x5236,0x21296));import a257_0x39a7a3 from'node:fs';import a257_0x21c836 from'node:path';import{logger}from'../utils/logger.js';import{getCliVersion}from'../utils/version.js';const CLI_VERSION=getCliVersion();export class TemplateReplacer{static[a257_0xadf9a7(0x164)](_0x1c57f5){const _0x284168=a257_0xadf9a7;return String(_0x1c57f5)[_0x284168(0x163)](0x2,'0');}static[a257_0xadf9a7(0x178)](_0x4d37e7){const _0x182bff=a257_0xadf9a7,_0x26a793=_0x4d37e7[_0x182bff(0x172)](),_0x459210=this['pad'](_0x4d37e7[_0x182bff(0x151)]()+0x1),_0x49cbb6=this['pad'](_0x4d37e7['getDate']()),_0x1d7e68=this[_0x182bff(0x164)](_0x4d37e7[_0x182bff(0x155)]()),_0x861f32=this[_0x182bff(0x164)](_0x4d37e7[_0x182bff(0x161)]()),_0x46b5f7=this[_0x182bff(0x164)](_0x4d37e7[_0x182bff(0x147)]());return{'createdAt':_0x26a793+'-'+_0x459210+'-'+_0x49cbb6+'\x20'+_0x1d7e68+':'+_0x861f32+':'+_0x46b5f7,'createdDate':_0x26a793+'-'+_0x459210+'-'+_0x49cbb6,'createdTime':_0x1d7e68+':'+_0x861f32+':'+_0x46b5f7};}static['toComponentName'](_0x1a36d1){const _0x336e0d=a257_0xadf9a7,_0x158738=_0x1a36d1[_0x336e0d(0x146)]('/')[_0x336e0d(0x14b)]()||_0x1a36d1;return _0x158738[_0x336e0d(0x146)]('-')[_0x336e0d(0x142)](_0x2ede23=>_0x2ede23[_0x336e0d(0x170)](0x0)[_0x336e0d(0x179)]()+_0x2ede23[_0x336e0d(0x169)](0x1)[_0x336e0d(0x145)]())[_0x336e0d(0x183)]('');}static[a257_0xadf9a7(0x17b)](_0x286e47){const _0x54deb7=a257_0xadf9a7,_0xdc402=_0x286e47['split']('/')[_0x54deb7(0x14b)]()||_0x286e47;return _0xdc402[_0x54deb7(0x146)]('-')[_0x54deb7(0x142)](_0x4a971d=>_0x4a971d[_0x54deb7(0x170)](0x0)[_0x54deb7(0x179)]()+_0x4a971d[_0x54deb7(0x169)](0x1)[_0x54deb7(0x145)]())[_0x54deb7(0x183)]('\x20');}static[a257_0xadf9a7(0x16d)](_0x203f0b,_0x3a7757,_0x29aeaf){const _0x2cc5ca=a257_0xadf9a7,_0x50c560=this[_0x2cc5ca(0x14f)](_0x3a7757),_0x55fa00=this['toDisplayTitle'](_0x3a7757),{createdAt:_0x6cc81e,createdDate:_0x39d829,createdTime:_0x403dfd}=this['formatLocalTimestamp'](new Date());let _0x564509=_0x203f0b[_0x2cc5ca(0x180)](/\{CliVersion\}/g,CLI_VERSION)['replace'](/\{ComponentName\}/g,_0x50c560)['replace'](/\{DisplayTitle\}/g,_0x55fa00)[_0x2cc5ca(0x180)](/\{PageName\}/g,_0x3a7757)[_0x2cc5ca(0x180)](/\{TemplateName\}/g,_0x29aeaf)['replace'](/\{CreatedAt\}/g,_0x6cc81e)['replace'](/\{CreatedDate\}/g,_0x39d829)[_0x2cc5ca(0x180)](/\{CreatedTime\}/g,_0x403dfd);return _0x564509;}static[a257_0xadf9a7(0x17d)](_0x486229,_0xf293b6,_0x2663f6,_0x21da75,_0x3d7976,_0x588898,_0x3ea4e9,_0x2975b8){const _0x30878c=a257_0xadf9a7,_0x5db0f8=new Date(),_0x63d13c=_0x5db0f8['toISOString'](),_0x138a61=_0x2663f6[_0x30878c(0x142)](_0x387aef=>{const _0x2c48a3=_0x30878c,_0xef8bd8=[_0x2c48a3(0x153)+_0x387aef[_0x2c48a3(0x16b)]+'\x22',_0x2c48a3(0x173)+_0x387aef[_0x2c48a3(0x14e)]+'\x22',_0x2c48a3(0x14a)+_0x387aef[_0x2c48a3(0x16f)]+'\x22'];return _0x387aef[_0x2c48a3(0x181)]&&_0xef8bd8['push'](_0x2c48a3(0x15f)+_0x387aef['alias']+'\x22'),_0x2c48a3(0x167)+_0xef8bd8['join'](',\x20')+_0x2c48a3(0x149);})[_0x30878c(0x183)](''),_0x7cbedf=_0x21da75||_0x2663f6[0x0]?.[_0x30878c(0x181)]||'YourModel';let _0x4ae9b3=_0x486229[_0x30878c(0x180)](/\{AppCode\}/g,_0xf293b6)[_0x30878c(0x180)](/\{ModelConfigs\}/g,_0x138a61)[_0x30878c(0x180)](/\{ExampleModelName\}/g,_0x7cbedf)[_0x30878c(0x180)](/\{ApiFileName\}/g,_0x3d7976||_0x30878c(0x15b))[_0x30878c(0x180)](/\{ConfigName\}/g,_0x588898||_0x30878c(0x168))[_0x30878c(0x180)](/\{ClientConfigParam\}/g,_0x3ea4e9||'')['replace'](/\{VarPrefix\}/g,_0x2975b8||_0x30878c(0x162))[_0x30878c(0x180)](/\{CreatedAt\}/g,_0x63d13c);return _0x4ae9b3;}static async[a257_0xadf9a7(0x182)](_0x19152a,_0x57e22c,_0x382cbd,_0x16015e,_0x4fd280=!![]){const _0x334945=a257_0xadf9a7,_0x2be063=Date[_0x334945(0x185)]();try{_0x4fd280&&logger[_0x334945(0x15c)]('template',_0x334945(0x148),{'templatePath':_0x19152a,'targetPath':_0x57e22c,'pageName':_0x382cbd,'templateName':_0x16015e});await a257_0x39a7a3[_0x334945(0x17f)][_0x334945(0x16a)](_0x57e22c,{'recursive':!![]}),await this[_0x334945(0x17e)](_0x19152a,_0x57e22c,_0x382cbd,_0x16015e);if(_0x4fd280){const _0x5afdee=Date[_0x334945(0x185)]()-_0x2be063;logger[_0x334945(0x152)](_0x334945(0x15a),_0x334945(0x171),_0x5afdee,{'pageName':_0x382cbd,'templateName':_0x16015e});}}catch(_0x1c2afd){if(_0x4fd280){const _0x80ebf3=Date[_0x334945(0x185)]()-_0x2be063;logger[_0x334945(0x160)]('template',_0x334945(0x184),{'templatePath':_0x19152a,'targetPath':_0x57e22c,'pageName':_0x382cbd,'templateName':_0x16015e,'error':_0x1c2afd instanceof Error?_0x1c2afd['message']:String(_0x1c2afd),'duration':_0x80ebf3});}throw _0x1c2afd;}}static async[a257_0xadf9a7(0x17e)](_0x5252a9,_0xedf245,_0xa9de90,_0x4f6c04){const _0x2791d5=a257_0xadf9a7,_0x275840=await a257_0x39a7a3[_0x2791d5(0x17f)][_0x2791d5(0x175)](_0x5252a9,{'withFileTypes':!![]});for(const _0x3ae5c0 of _0x275840){const _0x49148d=a257_0x21c836[_0x2791d5(0x183)](_0x5252a9,_0x3ae5c0[_0x2791d5(0x16f)]);let _0x406a1d=a257_0x21c836['join'](_0xedf245,_0x3ae5c0[_0x2791d5(0x16f)]);_0x3ae5c0[_0x2791d5(0x16f)][_0x2791d5(0x16e)]('.tpl')&&(_0x406a1d=a257_0x21c836[_0x2791d5(0x183)](_0xedf245,_0x3ae5c0['name'][_0x2791d5(0x180)](/\.tpl$/,'')));if(_0x3ae5c0[_0x2791d5(0x150)]())await a257_0x39a7a3[_0x2791d5(0x17f)][_0x2791d5(0x16a)](_0x406a1d,{'recursive':!![]}),await this['processDirectory'](_0x49148d,_0x406a1d,_0xa9de90,_0x4f6c04);else _0x3ae5c0[_0x2791d5(0x16c)]()&&await this[_0x2791d5(0x15d)](_0x49148d,_0x406a1d,_0xa9de90,_0x4f6c04);}}static async[a257_0xadf9a7(0x15d)](_0x47e1b2,_0x1692eb,_0x39bc1f,_0x55aa61){const _0x7bd48e=a257_0xadf9a7,_0x2e99fb=a257_0x21c836['extname'](_0x47e1b2)[_0x7bd48e(0x145)]();_0x47e1b2[_0x7bd48e(0x16e)]('.tpl')&&(_0x1692eb=_0x1692eb[_0x7bd48e(0x180)](/\.tpl$/,''));const _0x8a49c8=[_0x7bd48e(0x17c),_0x7bd48e(0x143),_0x7bd48e(0x159),_0x7bd48e(0x177),_0x7bd48e(0x154),_0x7bd48e(0x158),'.css',_0x7bd48e(0x187),_0x7bd48e(0x14c)];if(_0x8a49c8[_0x7bd48e(0x144)](_0x2e99fb)||_0x47e1b2[_0x7bd48e(0x16e)]('.tpl')){const _0x121d2d=await a257_0x39a7a3[_0x7bd48e(0x17f)][_0x7bd48e(0x14d)](_0x47e1b2,_0x7bd48e(0x17a)),_0x20fbb5=this[_0x7bd48e(0x16d)](_0x121d2d,_0x39bc1f,_0x55aa61);await a257_0x39a7a3[_0x7bd48e(0x17f)][_0x7bd48e(0x15e)](_0x1692eb,_0x20fbb5,_0x7bd48e(0x17a));}else await a257_0x39a7a3[_0x7bd48e(0x17f)]['copyFile'](_0x47e1b2,_0x1692eb);}}function a257_0x5236(){const _0x463d9c=['getMonth','success','datasetCode:\x20\x22','.json','getHours','741660SXElZp','146525eKMSnM','.md','.jsx','template','api','info','processFile','writeFile','alias:\x20\x22','error','getMinutes','LOVRABET','padStart','pad','1086236AHimwO','351195owPxox','\x0a\x20\x20\x20\x20{\x20','default','slice','mkdir','datasetCode','isFile','replaceContent','endsWith','name','charAt','模板内容替换完成','getFullYear','tableName:\x20\x22','190424tqrndR','readdir','3120901vKcDzO','.js','formatLocalTimestamp','toUpperCase','utf8','toDisplayTitle','.tsx','replaceApiContent','processDirectory','promises','replace','alias','processTemplate','join','模板内容替换失败','now','1049140DIdSeH','.scss','map','.ts','includes','toLowerCase','split','getSeconds','开始处理模板内容替换','\x20},','name:\x20\x22','pop','.tpl','readFile','tableName','toComponentName','isDirectory'];a257_0x5236=function(){return _0x463d9c;};return a257_0x5236();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1e2315,_0x3a5e4b){const _0x501485=a258_0xeef8,_0x551af9=_0x1e2315();while(!![]){try{const _0x512eff=-parseInt(_0x501485(0x128))/0x1*(parseInt(_0x501485(0x121))/0x2)+parseInt(_0x501485(0x11d))/0x3+-parseInt(_0x501485(0x125))/0x4*(-parseInt(_0x501485(0x111))/0x5)+-parseInt(_0x501485(0x12a))/0x6*(-parseInt(_0x501485(0x10e))/0x7)+parseInt(_0x501485(0x11e))/0x8*(parseInt(_0x501485(0x129))/0x9)+parseInt(_0x501485(0x120))/0xa+-parseInt(_0x501485(0x118))/0xb;if(_0x512eff===_0x3a5e4b)break;else _0x551af9['push'](_0x551af9['shift']());}catch(_0x307eaa){_0x551af9['push'](_0x551af9['shift']());}}}(a258_0x175d,0x715d0));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';import a258_0x4c5917 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 _0xe93450=a258_0xeef8,_0x319464=process.env.RABETBASE_NO_UPDATE_NOTICE?.[_0xe93450(0x11c)]()['toLowerCase']();return _0x319464==='1'||_0x319464===_0xe93450(0x114)||_0x319464===_0xe93450(0x10f);}function cacheRoot(){const _0x2615e9=a258_0xeef8;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0x2615e9(0x123));}export function getUpdateNoticeCachePath(){const _0x16a33a=a258_0xeef8;return join(cacheRoot(),_0x16a33a(0x115),'update-check.json');}async function readUpdateNoticeCache(){const _0x337a1d=a258_0xeef8;try{const _0x4f9785=await readFile(getUpdateNoticeCachePath(),_0x337a1d(0x110)),_0x1bd04c=JSON['parse'](_0x4f9785);if(!_0x1bd04c||typeof _0x1bd04c!==_0x337a1d(0x11a))return{};return _0x1bd04c;}catch{return{};}}async function writeUpdateNoticeCache(_0x1639ef){const _0x58b4d8=a258_0xeef8;try{const _0x44a56a=getUpdateNoticeCachePath();await mkdir(dirname(_0x44a56a),{'recursive':!![]}),await writeFile(_0x44a56a,JSON[_0x58b4d8(0x112)](_0x1639ef,null,0x2)+'\x0a',_0x58b4d8(0x110));}catch{}}function isFreshCheck(_0x463079,_0x38defa){const _0x30b78b=a258_0xeef8;return typeof _0x463079[_0x30b78b(0x122)]===_0x30b78b(0x11f)&&_0x38defa-_0x463079['checkedAt']<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x3924c4,_0x157705,_0x1cdf13){const _0xfa721b=a258_0xeef8;return _0x3924c4[_0xfa721b(0x119)]===_0x157705&&typeof _0x3924c4['lastNotifiedAt']===_0xfa721b(0x11f)&&_0x1cdf13-_0x3924c4['lastNotifiedAt']<UPDATE_NOTICE_TTL_MS;}export function buildNpmVersionUrl(_0x27e357){const _0x299a91=a258_0xeef8;return _0x299a91(0x11b)+NPM_PACKAGE_NAME+_0x299a91(0x116)+_0x27e357;}export async function resolveLatestUpdateNotice(){const _0x4dc15f=a258_0xeef8;if(isUpdateNoticeDisabled())return null;try{const _0x4913f8=Date['now'](),_0x408b9e=getCliVersion(),_0x845971=await readUpdateNoticeCache();let _0x144494=isFreshCheck(_0x845971,_0x4913f8)?_0x845971[_0x4dc15f(0x113)]?.['trim']():undefined;if(!_0x144494&&!isFreshCheck(_0x845971,_0x4913f8)){const _0x56221c=await getCliVersionPolicy();_0x144494=_0x56221c?.['stableVersion']?.[_0x4dc15f(0x11c)]()||undefined,await writeUpdateNoticeCache({..._0x845971,'checkedAt':_0x4913f8,'latest':_0x144494,'failed':!_0x144494});}if(!_0x144494||!a258_0x4c5917['valid'](_0x408b9e)||!a258_0x4c5917[_0x4dc15f(0x124)](_0x144494))return null;if(a258_0x4c5917[_0x4dc15f(0x127)](_0x408b9e,_0x144494))return null;if(isRecentlyNotified(_0x845971,_0x144494,_0x4913f8))return null;const _0x359be5=CLI_BIN_NAME+_0x4dc15f(0x126);return await writeUpdateNoticeCache({..._0x845971,'checkedAt':isFreshCheck(_0x845971,_0x4913f8)?_0x845971[_0x4dc15f(0x122)]:_0x4913f8,'latest':_0x144494,'failed':![],'lastNotifiedVersion':_0x144494,'lastNotifiedAt':_0x4913f8}),{'command':_0x359be5,'current':_0x408b9e,'latest':_0x144494,'url':buildNpmVersionUrl(_0x144494),'message':CLI_BIN_NAME+'\x20'+_0x144494+'\x20available,\x20current\x20'+_0x408b9e+_0x4dc15f(0x117)+_0x359be5};}catch{return null;}}function a258_0xeef8(_0x3c32af,_0x28482e){_0x3c32af=_0x3c32af-0x10e;const _0x175db9=a258_0x175d();let _0xeef83b=_0x175db9[_0x3c32af];return _0xeef83b;}function a258_0x175d(){const _0x281e3f=['2367790QBSKxC','1518864gQsRsE','checkedAt','.cache','valid','3544796dOKCAa','\x20update','gte','1RJsbFP','9fFWVSq','4266uewEba','3346JTRqyY','yes','utf8','5kOPKga','stringify','latest','true','rabetbase-cli','/v/',',\x20run:\x20','11682451vCUGjV','lastNotifiedVersion','object','https://www.npmjs.com/package/','trim','2038302MMWilX','1148312gPVsin','number'];a258_0x175d=function(){return _0x281e3f;};return a258_0x175d();}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a259_0x3acd(_0x14dc62,_0x2c346a){_0x14dc62=_0x14dc62-0xce;var _0x1cf24e=a259_0x1cf2();var _0x3acd84=_0x1cf24e[_0x14dc62];return _0x3acd84;}(function(_0x1742a5,_0x652f71){var _0x3ead=a259_0x3acd,_0x2a2849=_0x1742a5();while(!![]){try{var _0x33697f=-parseInt(_0x3ead(0xce))/0x1+parseInt(_0x3ead(0xcf))/0x2+parseInt(_0x3ead(0xd4))/0x3*(-parseInt(_0x3ead(0xd0))/0x4)+parseInt(_0x3ead(0xd2))/0x5+parseInt(_0x3ead(0xd3))/0x6*(parseInt(_0x3ead(0xd7))/0x7)+-parseInt(_0x3ead(0xd5))/0x8*(-parseInt(_0x3ead(0xd6))/0x9)+parseInt(_0x3ead(0xd1))/0xa;if(_0x33697f===_0x652f71)break;else _0x2a2849['push'](_0x2a2849['shift']());}catch(_0x2840bc){_0x2a2849['push'](_0x2a2849['shift']());}}}(a259_0x1cf2,0x37636));function a259_0x1cf2(){var _0x37963e=['8asbgcJ','2117140RFbqxI','323920NkrmIm','220530FEoigR','539382wUQrqS','514720WInIvf','45fbJeyh','7yctMOL','347005HiJCku','597020bzvcYg'];a259_0x1cf2=function(){return _0x37963e;};return a259_0x1cf2();}import{VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a260_0x4fbf(_0x53d3b0,_0x5509d0){_0x53d3b0=_0x53d3b0-0x17e;var _0x14963f=a260_0x1496();var _0x4fbfe2=_0x14963f[_0x53d3b0];return _0x4fbfe2;}(function(_0x53026d,_0x2f9ca6){var _0x484f46=a260_0x4fbf,_0x46f1c2=_0x53026d();while(!![]){try{var _0x34860a=parseInt(_0x484f46(0x186))/0x1+parseInt(_0x484f46(0x180))/0x2+parseInt(_0x484f46(0x181))/0x3+-parseInt(_0x484f46(0x182))/0x4+parseInt(_0x484f46(0x17e))/0x5*(parseInt(_0x484f46(0x185))/0x6)+-parseInt(_0x484f46(0x183))/0x7*(parseInt(_0x484f46(0x184))/0x8)+-parseInt(_0x484f46(0x17f))/0x9;if(_0x34860a===_0x2f9ca6)break;else _0x46f1c2['push'](_0x46f1c2['shift']());}catch(_0x437954){_0x46f1c2['push'](_0x46f1c2['shift']());}}}(a260_0x1496,0xbf0c9));function a260_0x1496(){var _0x17a4d3=['771752ZbfKWZ','1434957dXpThV','109816ggNHJg','1028524JhSkBv','40bEcxhP','2062794ByRFSl','478992XGvseg','5pCHGMY','1281015Xltcbj'];a260_0x1496=function(){return _0x17a4d3;};return a260_0x1496();}import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';export async function withActiveCookie(_0xa4c5fb,_0xe854bd){setActiveCookie(_0xa4c5fb);try{return await _0xe854bd();}finally{clearActiveCookie();}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x33729c,_0x2057a8){var _0x4d5088=a261_0x216c,_0x7e2f3a=_0x33729c();while(!![]){try{var _0xb46ac5=-parseInt(_0x4d5088(0x107))/0x1*(-parseInt(_0x4d5088(0x10d))/0x2)+parseInt(_0x4d5088(0x10a))/0x3+parseInt(_0x4d5088(0x105))/0x4+-parseInt(_0x4d5088(0x103))/0x5+-parseInt(_0x4d5088(0x104))/0x6+-parseInt(_0x4d5088(0x108))/0x7*(-parseInt(_0x4d5088(0x10c))/0x8)+-parseInt(_0x4d5088(0x10b))/0x9;if(_0xb46ac5===_0x2057a8)break;else _0x7e2f3a['push'](_0x7e2f3a['shift']());}catch(_0x2803e4){_0x7e2f3a['push'](_0x7e2f3a['shift']());}}}(a261_0x5a64,0x6ab55));function a261_0x5a64(){var _0x271d92=['3552490eeNJfN','1685874iWLrhK','2744360YqAozr','stderr','24dePRDI','3199yzCcKr','write','2584491LrgZlX','6938361TJXVHv','8128WJYptm','15632BUrTAQ'];a261_0x5a64=function(){return _0x271d92;};return a261_0x5a64();}function a261_0x216c(_0x6dda76,_0xae00d7){_0x6dda76=_0x6dda76-0x103;var _0x5a6420=a261_0x5a64();var _0x216cc0=_0x5a6420[_0x6dda76];return _0x216cc0;}export function writeCliSideChannelLine(_0x1f553b){var _0x3e4a7f=a261_0x216c;process[_0x3e4a7f(0x106)][_0x3e4a7f(0x109)](_0x1f553b+'\x0a');}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lovrabet/rabetbase-cli",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.10-beta.1",
|
|
4
4
|
"description": "Developer CLI for Lovrabet apps, datasets, pages, SQL, BFF, database connections, skills, and AI agent workflows.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"keywords": [
|