@lovrabet/rabetbase-cli 2.1.14-beta.0 → 2.1.14-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/README.md +18 -0
- 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 -0
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/link-create.js +1 -1
- package/lib/commands/dataset/link-delete.js +1 -1
- package/lib/commands/dataset/link-shared.js +1 -1
- package/lib/commands/dataset/link-update.js +1 -1
- package/lib/commands/dataset/links.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.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/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/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 +3 -3
package/lib/utils/file-utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xb49c85,_0x299862){const _0x2deb1c=a193_0x59a7,_0x45e463=_0xb49c85();while(!![]){try{const _0x481117=parseInt(_0x2deb1c(0x104))/0x1*(-parseInt(_0x2deb1c(0x102))/0x2)+parseInt(_0x2deb1c(0x101))/0x3*(parseInt(_0x2deb1c(0x10d))/0x4)+-parseInt(_0x2deb1c(0x10a))/0x5*(-parseInt(_0x2deb1c(0x107))/0x6)+parseInt(_0x2deb1c(0x108))/0x7*(-parseInt(_0x2deb1c(0x109))/0x8)+-parseInt(_0x2deb1c(0x106))/0x9+parseInt(_0x2deb1c(0x100))/0xa*(-parseInt(_0x2deb1c(0x10c))/0xb)+parseInt(_0x2deb1c(0x103))/0xc*(parseInt(_0x2deb1c(0x10b))/0xd);if(_0x481117===_0x299862)break;else _0x45e463['push'](_0x45e463['shift']());}catch(_0x4f8bda){_0x45e463['push'](_0x45e463['shift']());}}}(a193_0x520a,0x504ed));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';function a193_0x520a(){const _0x9b5e9b=['2155016mpyWel','315390mzbSeg','3985098SLEkhs','2600279UMNpCs','23992FaHnRb','10nmeyoB','48uunwYu','2FsgzRz','60RvIFCI','547643JQcjqH','isDirectory','3766653ehoUXs','42ZJvSJI','14TvUVPO'];a193_0x520a=function(){return _0x9b5e9b;};return a193_0x520a();}function a193_0x59a7(_0x9b2ac1,_0x19dab9){_0x9b2ac1=_0x9b2ac1-0x100;const _0x520aef=a193_0x520a();let _0x59a733=_0x520aef[_0x9b2ac1];return _0x59a733;}import{join}from'node:path';export async function copyDir(_0x417ea3,_0x2444f1){const _0x61f81b=a193_0x59a7,_0x4d00ee=statSync(_0x417ea3);if(_0x4d00ee[_0x61f81b(0x105)]()){!existsSync(_0x2444f1)&&mkdirSync(_0x2444f1,{'recursive':!![]});const _0xa49017=readdirSync(_0x417ea3);for(const _0x19afa0 of _0xa49017){await copyDir(join(_0x417ea3,_0x19afa0),join(_0x2444f1,_0x19afa0));}}else copyFileSync(_0x417ea3,_0x2444f1);}export function ensureDir(_0x49f18f){!existsSync(_0x49f18f)&&mkdirSync(_0x49f18f,{'recursive':!![]});}export function pathExists(_0x411044){return existsSync(_0x411044);}
|
package/lib/utils/guides-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a194_0x585c53=a194_0x1bf3;(function(_0x5ca627,_0x4da79d){const _0x18deb2=a194_0x1bf3,_0x56c6b0=_0x5ca627();while(!![]){try{const _0x24dcb9=-parseInt(_0x18deb2(0x1f5))/0x1*(parseInt(_0x18deb2(0x206))/0x2)+parseInt(_0x18deb2(0x203))/0x3*(-parseInt(_0x18deb2(0x201))/0x4)+parseInt(_0x18deb2(0x1eb))/0x5*(-parseInt(_0x18deb2(0x207))/0x6)+-parseInt(_0x18deb2(0x20f))/0x7+-parseInt(_0x18deb2(0x1f2))/0x8*(parseInt(_0x18deb2(0x211))/0x9)+parseInt(_0x18deb2(0x1fc))/0xa*(parseInt(_0x18deb2(0x212))/0xb)+parseInt(_0x18deb2(0x1ff))/0xc*(parseInt(_0x18deb2(0x1ec))/0xd);if(_0x24dcb9===_0x4da79d)break;else _0x56c6b0['push'](_0x56c6b0['shift']());}catch(_0x37b803){_0x56c6b0['push'](_0x56c6b0['shift']());}}}(a194_0x4e7e,0x370e2));import{mkdirSync,writeFileSync}from'node:fs';import{dirname,join}from'node:path';import{homedir}from'node:os';import{getTemplateBaseUrl}from'../utils/config.js';function getGuidesCdnUrl(){const _0x2bc134=a194_0x1bf3,_0x290539=getTemplateBaseUrl();return _0x290539+_0x2bc134(0x1f3);}const CACHE_DIR=join(homedir(),a194_0x585c53(0x1f4),'cache');export async function fetchGuidesFromCDN(){const _0x323605=a194_0x585c53,_0x2bb016=getGuidesCdnUrl(),_0x33100b=await fetch(_0x2bb016,{'headers':{'Accept':_0x323605(0x204)}});if(!_0x33100b['ok'])throw new Error(_0x323605(0x1fe)+_0x33100b[_0x323605(0x1f6)]+'\x20'+_0x33100b[_0x323605(0x20b)]);const _0x5d86e8=await _0x33100b[_0x323605(0x1f0)]();if(!_0x5d86e8[_0x323605(0x20d)]||typeof _0x5d86e8['guides']!==_0x323605(0x202))throw new Error(_0x323605(0x1f8));return _0x5d86e8;}export function writeGuidesToProject(_0x56581a,_0x257782,_0x454d32=a194_0x585c53(0x208),_0x19d099){const _0x3b7154=a194_0x585c53,_0x1eab90=join(_0x257782,_0x454d32);mkdirSync(_0x1eab90,{'recursive':!![]});for(const [_0x3c7213,_0x3ee8f5]of Object[_0x3b7154(0x1ef)](_0x56581a[_0x3b7154(0x20d)])){let _0x50241f=_0x3ee8f5[_0x3b7154(0x1fb)];_0x3ee8f5[_0x3b7154(0x1fd)]&&(_0x50241f=appendUpdateTime(_0x50241f,_0x3ee8f5['lastUpdated'])),writeFileSync(join(_0x1eab90,_0x3c7213+_0x3b7154(0x20e)),_0x50241f,_0x3b7154(0x20c));}}export function appendUpdateTime(_0xc299b1,_0x112d9f){const _0x4624b0=a194_0x585c53;return _0xc299b1=_0xc299b1[_0x4624b0(0x1f1)](/\n*>更新时间:.*$/m,''),_0xc299b1[_0x4624b0(0x1f7)]()+(_0x4624b0(0x1fa)+_0x112d9f);}function a194_0x1bf3(_0x2ca2c6,_0x27c92c){_0x2ca2c6=_0x2ca2c6-0x1eb;const _0x4e7ef8=a194_0x4e7e();let _0x1bf31f=_0x4e7ef8[_0x2ca2c6];return _0x1bf31f;}export function getSkillTemplate(_0x461538){const _0x3c7fc2=a194_0x585c53;return _0x461538[_0x3c7fc2(0x210)]?.[_0x3c7fc2(0x1fb)]||'';}export function appendExtendContents(_0x27c9ed,_0x4216db,_0x527c68){const _0x390b1b=a194_0x585c53,_0x4bc0e0=[];for(const [,_0x3a82f4]of Object['entries'](_0x4216db[_0x390b1b(0x20d)])){_0x3a82f4[_0x390b1b(0x200)]&&_0x4bc0e0[_0x390b1b(0x1ed)](_0x3a82f4['extendContent'][_0x390b1b(0x1f7)]());}if(_0x4bc0e0[_0x390b1b(0x209)]===0x0)return _0x27c9ed;return _0x27c9ed[_0x390b1b(0x1f7)]()+'\x0a\x0a'+_0x4bc0e0[_0x390b1b(0x20a)]('\x0a\x0a')+'\x0a';}function a194_0x4e7e(){const _0x3466da=['905781Ezpcfy','application/json','title','2rdUCwB','5646tUFxKI','.lovrabet/skill/guides','length','join','statusText','utf-8','guides','.md','2507407eZCIWV','skillTemplate','603qFsymX','781ukEfMw','1640HlgXSe','720278EmQHNW','push','path','entries','json','replace','2768JJKoJK','/skills/guides.json','.lovrabet','236897QMmzEZ','status','trimEnd','CDN\x20返回数据格式错误','CDN\x20数据中缺少\x20skillTemplate','\x0a\x0a>更新时间:','content','56570NuDwYs','lastUpdated','CDN\x20请求失败:\x20','228EkwJWZ','extendContent','4llQBAu','object'];a194_0x4e7e=function(){return _0x3466da;};return a194_0x4e7e();}export function writeSkillFile(_0x3e81bb,_0x55e22c,_0x4f5ce1){const _0x4efb0d=a194_0x585c53,_0x535692=getSkillTemplate(_0x3e81bb);if(!_0x535692)throw new Error(_0x4efb0d(0x1f9));const _0x12df1b=dirname(_0x55e22c);mkdirSync(_0x12df1b,{'recursive':!![]});let _0x5e2285=_0x535692[_0x4efb0d(0x1f1)](/\{\{IDE_NAME\}\}/g,_0x4f5ce1);_0x5e2285=appendExtendContents(_0x5e2285,_0x3e81bb),_0x3e81bb[_0x4efb0d(0x210)][_0x4efb0d(0x1fd)]&&(_0x5e2285=appendUpdateTime(_0x5e2285,_0x3e81bb[_0x4efb0d(0x210)][_0x4efb0d(0x1fd)])),writeFileSync(_0x55e22c,_0x5e2285,_0x4efb0d(0x20c));}export async function installGuides(_0x51fcb7){const _0x345ab9=await fetchGuidesFromCDN();return writeGuidesToProject(_0x345ab9,_0x51fcb7),Object['keys'](_0x345ab9['guides'])['length'];}export function getGuidesSummary(_0x3bc37c){const _0x3e11df=a194_0x585c53;return Object[_0x3e11df(0x1ef)](_0x3bc37c[_0x3e11df(0x20d)])['map'](([_0x25ef22,_0x3077f0])=>({'key':_0x25ef22,'title':_0x3077f0[_0x3e11df(0x205)],'path':_0x3077f0[_0x3e11df(0x1ee)]}));}
|
package/lib/utils/http-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x215be6,_0x13408f){const _0x29b157=a195_0x57de,_0x20616f=_0x215be6();while(!![]){try{const _0x15d53c=parseInt(_0x29b157(0x108))/0x1*(-parseInt(_0x29b157(0xf3))/0x2)+-parseInt(_0x29b157(0xf1))/0x3*(-parseInt(_0x29b157(0xf2))/0x4)+parseInt(_0x29b157(0xfe))/0x5*(parseInt(_0x29b157(0x105))/0x6)+-parseInt(_0x29b157(0xfd))/0x7*(parseInt(_0x29b157(0xff))/0x8)+-parseInt(_0x29b157(0x106))/0x9*(-parseInt(_0x29b157(0x10d))/0xa)+parseInt(_0x29b157(0x104))/0xb+-parseInt(_0x29b157(0xf5))/0xc;if(_0x15d53c===_0x13408f)break;else _0x20616f['push'](_0x20616f['shift']());}catch(_0x25a43c){_0x20616f['push'](_0x20616f['shift']());}}}(a195_0x1f9a,0x7d41e));export async function httpRequest(_0x4711c6,_0x1b97c9={}){const _0x34cc6d=a195_0x57de,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x1b97c9;let _0x3fd0cd=null;for(let _0x3b902f=0x0;_0x3b902f<=retries;_0x3b902f++){try{const _0x291466=new AbortController(),_0x8d995=setTimeout(()=>_0x291466[_0x34cc6d(0xf7)](),timeout),_0x26394c=await fetch(_0x4711c6,{'headers':headers,'signal':_0x291466[_0x34cc6d(0x10b)]});clearTimeout(_0x8d995);let _0x174807;const _0xb9d20a=_0x26394c[_0x34cc6d(0xfa)][_0x34cc6d(0x10f)](_0x34cc6d(0x10e));return _0xb9d20a?.[_0x34cc6d(0xfc)](_0x34cc6d(0x100))?_0x174807=await _0x26394c['json']():_0x174807=await _0x26394c[_0x34cc6d(0x102)](),{'ok':_0x26394c['ok'],'status':_0x26394c[_0x34cc6d(0xf9)],'statusText':_0x26394c[_0x34cc6d(0x10a)],'data':_0x174807,'headers':_0x26394c[_0x34cc6d(0xfa)],'url':_0x26394c['url'],'text':()=>_0x26394c[_0x34cc6d(0x102)]()};}catch(_0x58e036){_0x3fd0cd=_0x58e036 instanceof Error?_0x58e036:new Error(String(_0x58e036));if(_0x3b902f===retries)break;if(shouldRetry(_0x58e036)){console[_0x34cc6d(0x107)]('*\x20请求失败,'+retryDelay+_0x34cc6d(0xf4)+(_0x3b902f+0x1)+_0x34cc6d(0x103)),await sleep(retryDelay);continue;}else break;}}throw _0x3fd0cd||new Error(_0x34cc6d(0xf8));}function a195_0x57de(_0x3e3825,_0x464524){_0x3e3825=_0x3e3825-0xf1;const _0x1f9a8f=a195_0x1f9a();let _0x57de09=_0x1f9a8f[_0x3e3825];return _0x57de09;}function shouldRetry(_0xf0aa83){const _0x42216c=a195_0x57de;if(_0xf0aa83 instanceof Error){if(_0xf0aa83[_0x42216c(0xf6)]==='AbortError')return![];if(_0xf0aa83[_0x42216c(0xf6)]===_0x42216c(0x10c)&&_0xf0aa83['message'][_0x42216c(0xfc)]('fetch'))return!![];if(_0xf0aa83['message']['includes'](_0x42216c(0xfb)))return!![];if(_0xf0aa83[_0x42216c(0x109)][_0x42216c(0xfc)](_0x42216c(0x101)))return![];}return![];}function a195_0x1f9a(){const _0x4093fc=['application/json','ENOTFOUND','text','\x20次重试...','3035714OUvaEo','3048oqUgOY','786843TgfzCa','log','573182fnMZPa','message','statusText','signal','TypeError','30NpdtEc','content-type','get','180618QhcZKj','68tbfWUP','2HodYEy','ms\x20后进行第\x20','10783164VnRTTL','name','abort','Request\x20failed','status','headers','ECONNRESET','includes','350csLjrm','7860gJhypl','60080SIDWti'];a195_0x1f9a=function(){return _0x4093fc;};return a195_0x1f9a();}function sleep(_0x581c33){return new Promise(_0x38da28=>setTimeout(_0x38da28,_0x581c33));}export function validateUrl(_0x3b8e39){try{return new URL(_0x3b8e39),!![];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x30609e,_0x592bc6){const _0x179547=a196_0xb405,_0x1c6a2b=_0x30609e();while(!![]){try{const _0x44abb5=parseInt(_0x179547(0xf7))/0x1*(parseInt(_0x179547(0xf4))/0x2)+-parseInt(_0x179547(0x101))/0x3+-parseInt(_0x179547(0xf6))/0x4+parseInt(_0x179547(0x102))/0x5+-parseInt(_0x179547(0xff))/0x6*(-parseInt(_0x179547(0xfb))/0x7)+-parseInt(_0x179547(0xfe))/0x8*(parseInt(_0x179547(0xf9))/0x9)+-parseInt(_0x179547(0xf5))/0xa;if(_0x44abb5===_0x592bc6)break;else _0x1c6a2b['push'](_0x1c6a2b['shift']());}catch(_0x1e260b){_0x1c6a2b['push'](_0x1c6a2b['shift']());}}}(a196_0x4153,0x94a59));function env(_0x550911){return process.env[`RABETBASE_${_0x550911}`]||process.env[`LOVRABET_${_0x550911}`]||undefined;}function a196_0xb405(_0x10513d,_0x441ba7){_0x10513d=_0x10513d-0xf4;const _0x4153e5=a196_0x4153();let _0xb405f1=_0x4153e5[_0x10513d];return _0xb405f1;}export function isNonInteractive(_0x1efad9){const _0x3722a2=a196_0xb405;return!!(_0x1efad9['nonInteractive']||_0x1efad9['ci']||env('CI')===_0x3722a2(0x100)||process.env.CI===_0x3722a2(0x100)||!process[_0x3722a2(0xf8)]['isTTY']||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x1c37aa=a196_0xb405;if(!process[_0x1c37aa(0xfd)]['isTTY'])return![];try{const _0x56da46=process[_0x1c37aa(0xfd)][_0x1c37aa(0xfc)];return process[_0x1c37aa(0xfd)][_0x1c37aa(0xfa)](!![]),process['stdin'][_0x1c37aa(0xfa)](_0x56da46??![]),!![];}catch{return![];}}function a196_0x4153(){const _0x1cd079=['132937JRzJxV','isRaw','stdin','720568CQhCIS','102DkbRmm','true','253668xUrAbW','4207540BsipYh','8898jmAwbY','2313550gPlyZH','3645884kMOdUS','232tZHSco','stdout','36dfQRom','setRawMode'];a196_0x4153=function(){return _0x1cd079;};return a196_0x4153();}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a197_0x20a7b0=a197_0x493b;(function(_0x115b73,_0x4e1850){const _0x204005=a197_0x493b,_0x118479=_0x115b73();while(!![]){try{const _0x290944=parseInt(_0x204005(0xe6))/0x1+-parseInt(_0x204005(0xe1))/0x2+-parseInt(_0x204005(0xd5))/0x3*(parseInt(_0x204005(0xf2))/0x4)+-parseInt(_0x204005(0xed))/0x5+-parseInt(_0x204005(0xbb))/0x6+-parseInt(_0x204005(0xcb))/0x7+parseInt(_0x204005(0xdb))/0x8;if(_0x290944===_0x4e1850)break;else _0x118479['push'](_0x118479['shift']());}catch(_0x1a4db1){_0x118479['push'](_0x118479['shift']());}}}(a197_0x1048,0x29f7d));import a197_0x687b07 from'winston';import a197_0x324c14 from'node:fs';import a197_0x1d6a55 from'node:path';function a197_0x1048(){const _0x521f26=['warn','currentRawCommand','10438072VDbgkL','yellow','map','printf','format','readFileSync','675514oukHhY','log','blue','mkdirSync','.lovrabet.log','178364TBzAZq','split','winstonLogger','existsSync','timestamp','join','clearLogs','1086735CkwZZn','rawCommand','失败:\x20','dirname','完成:\x20','21272UEiiiN','1713630UTIGAc','unknown','message','setLogPath','red','logFilePath','logTask','success','createLogger','error','Failed\x20to\x20read\x20logs:','readLogs','duration','clear','Failed\x20to\x20clear\x20logs:','filter','1879003qDnOEH','utf8','combine','getWinstonInstance','initWinstonLogger','trim','开始执行:\x20','stringify','File','green','114gQpUOO','info','now','addColors'];a197_0x1048=function(){return _0x521f26;};return a197_0x1048();}function a197_0x493b(_0x31588c,_0x3163e9){_0x31588c=_0x31588c-0xbb;const _0x10487b=a197_0x1048();let _0x493b2e=_0x10487b[_0x31588c];return _0x493b2e;}class Logger{[a197_0x20a7b0(0xe8)];[a197_0x20a7b0(0xc0)];['currentRawCommand']='';constructor(){const _0x41ead2=a197_0x20a7b0;this[_0x41ead2(0xc0)]='';}['setRawCommand'](_0x8b86ef){const _0x8d3120=a197_0x20a7b0;this[_0x8d3120(0xda)]=_0x8b86ef;}[a197_0x20a7b0(0xcf)](){const _0x364272=a197_0x20a7b0,_0x1026d0=a197_0x1d6a55[_0x364272(0xf0)](this[_0x364272(0xc0)]);!a197_0x324c14[_0x364272(0xe9)](_0x1026d0)&&a197_0x324c14[_0x364272(0xe4)](_0x1026d0,{'recursive':!![]});const _0x25d9c=a197_0x687b07[_0x364272(0xdf)][_0x364272(0xcd)](a197_0x687b07[_0x364272(0xdf)][_0x364272(0xea)](),a197_0x687b07[_0x364272(0xdf)]['errors']({'stack':!![]}),a197_0x687b07['format'][_0x364272(0xde)](_0x2c94f5=>{const _0x263303=_0x364272,_0x5bc3c9={'timestamp':_0x2c94f5[_0x263303(0xea)]||new Date()['toISOString'](),'level':_0x2c94f5['level']||_0x263303(0xd6),'command':_0x2c94f5['command']||_0x263303(0xbc),'rawCommand':_0x2c94f5[_0x263303(0xee)]||this['currentRawCommand']||undefined,'message':_0x2c94f5[_0x263303(0xbd)]||'','duration':_0x2c94f5[_0x263303(0xc7)]||undefined,'details':_0x2c94f5['details']||undefined};return JSON[_0x263303(0xd2)](_0x5bc3c9);}));this['winstonLogger']=a197_0x687b07[_0x364272(0xc3)]({'level':_0x364272(0xd6),'format':_0x25d9c,'transports':[new a197_0x687b07['transports'][(_0x364272(0xd3))]({'filename':this[_0x364272(0xc0)],'level':_0x364272(0xd6)})],'silent':![]}),a197_0x687b07[_0x364272(0xd8)]({'success':_0x364272(0xd4),'error':_0x364272(0xbf),'warn':_0x364272(0xdc),'info':_0x364272(0xe3)});}[a197_0x20a7b0(0xbe)](_0x971b46){const _0x4ea0aa=a197_0x20a7b0;this[_0x4ea0aa(0xc0)]=a197_0x1d6a55[_0x4ea0aa(0xeb)](_0x971b46,_0x4ea0aa(0xe5)),this[_0x4ea0aa(0xe8)]&&this[_0x4ea0aa(0xe8)][_0x4ea0aa(0xc8)](),this[_0x4ea0aa(0xcf)]();}[a197_0x20a7b0(0xd6)](_0x133344,_0x3a5fca,_0x5161e9){const _0x44f39d=a197_0x20a7b0;if(!this[_0x44f39d(0xc0)]||!this[_0x44f39d(0xe8)])return;this[_0x44f39d(0xe8)][_0x44f39d(0xd6)](_0x3a5fca,{'command':_0x133344,'details':_0x5161e9});}[a197_0x20a7b0(0xc2)](_0x3b2ece,_0x58e311,_0x304b29,_0x2e2484){const _0x1aea6d=a197_0x20a7b0;if(!this[_0x1aea6d(0xc0)]||!this[_0x1aea6d(0xe8)])return;this[_0x1aea6d(0xe8)][_0x1aea6d(0xe2)](_0x1aea6d(0xd6),_0x58e311,{'level':_0x1aea6d(0xc2),'command':_0x3b2ece,'duration':_0x304b29,'details':_0x2e2484});}['error'](_0x53b751,_0x4a6dbc,_0x2566be){const _0xd01a68=a197_0x20a7b0;if(!this[_0xd01a68(0xc0)]||!this[_0xd01a68(0xe8)])return;this[_0xd01a68(0xe8)][_0xd01a68(0xc4)](_0x4a6dbc,{'command':_0x53b751,'details':_0x2566be});}[a197_0x20a7b0(0xd9)](_0x3ad09e,_0xd1b408,_0x59af6d){const _0x5491bc=a197_0x20a7b0;if(!this['logFilePath']||!this[_0x5491bc(0xe8)])return;this[_0x5491bc(0xe8)]['warn'](_0xd1b408,{'command':_0x3ad09e,'details':_0x59af6d});}async[a197_0x20a7b0(0xc1)](_0x35602a,_0x4325ed,_0x4c8cc6){const _0x4e9e80=a197_0x20a7b0,_0x2a3ccf=Date[_0x4e9e80(0xd7)]();this[_0x4e9e80(0xd6)](_0x35602a,_0x4e9e80(0xd1)+_0x4325ed);try{const _0x41446f=await _0x4c8cc6(),_0x585d13=Date[_0x4e9e80(0xd7)]()-_0x2a3ccf;return this[_0x4e9e80(0xc2)](_0x35602a,_0x4e9e80(0xf1)+_0x4325ed,_0x585d13),_0x41446f;}catch(_0x459d5e){const _0x45714a=Date[_0x4e9e80(0xd7)]()-_0x2a3ccf;this[_0x4e9e80(0xc4)](_0x35602a,_0x4e9e80(0xef)+_0x4325ed,{'error':_0x459d5e instanceof Error?_0x459d5e[_0x4e9e80(0xbd)]:String(_0x459d5e),'duration':_0x45714a});throw _0x459d5e;}}[a197_0x20a7b0(0xc6)](){const _0x43c163=a197_0x20a7b0;try{if(!a197_0x324c14[_0x43c163(0xe9)](this[_0x43c163(0xc0)]))return[];const _0x3534e4=a197_0x324c14[_0x43c163(0xe0)](this['logFilePath'],'utf8');return _0x3534e4[_0x43c163(0xe7)]('\x0a')[_0x43c163(0xca)](_0x5428ea=>_0x5428ea[_0x43c163(0xd0)]())[_0x43c163(0xdd)](_0x2923f5=>JSON['parse'](_0x2923f5));}catch(_0x22cecc){return console[_0x43c163(0xd9)](_0x43c163(0xc5),_0x22cecc),[];}}[a197_0x20a7b0(0xec)](){const _0x41b38d=a197_0x20a7b0;try{a197_0x324c14[_0x41b38d(0xe9)](this[_0x41b38d(0xc0)])&&a197_0x324c14['writeFileSync'](this['logFilePath'],'',_0x41b38d(0xcc));}catch(_0x165d9b){console[_0x41b38d(0xd9)](_0x41b38d(0xc9),_0x165d9b);}}[a197_0x20a7b0(0xce)](){const _0x40218b=a197_0x20a7b0;return this[_0x40218b(0xe8)];}}export const logger=new Logger();
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x204ae0,_0xf76018){const _0x3309ab=a198_0x340f,_0x1a1184=_0x204ae0();while(!![]){try{const _0x4b99b8=parseInt(_0x3309ab(0x79))/0x1*(parseInt(_0x3309ab(0x89))/0x2)+-parseInt(_0x3309ab(0x84))/0x3*(-parseInt(_0x3309ab(0x87))/0x4)+-parseInt(_0x3309ab(0x82))/0x5*(-parseInt(_0x3309ab(0x7c))/0x6)+parseInt(_0x3309ab(0x80))/0x7+-parseInt(_0x3309ab(0x85))/0x8+-parseInt(_0x3309ab(0x7b))/0x9*(-parseInt(_0x3309ab(0x7f))/0xa)+parseInt(_0x3309ab(0x78))/0xb*(-parseInt(_0x3309ab(0x7d))/0xc);if(_0x4b99b8===_0xf76018)break;else _0x1a1184['push'](_0x1a1184['shift']());}catch(_0x45d555){_0x1a1184['push'](_0x1a1184['shift']());}}}(a198_0x1f6a,0xd235f));function a198_0x1f6a(){const _0x14948c=['validation','9778833TrRcyL','7668ISbhnX','48qoVWKh','isArray','10lSrDkK','9804137rWYlfv','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','2785wYsOnI','--params\x20must\x20be\x20a\x20JSON\x20object','3TTjUMK','3677696FIAalD','object','3245284RgLUIV','parse','28XUzqYb','8034004kAzwpB','16564FLeaFr'];a198_0x1f6a=function(){return _0x14948c;};return a198_0x1f6a();}import{CliErrors}from'../errors.js';function a198_0x340f(_0x465bc1,_0x55d525){_0x465bc1=_0x465bc1-0x78;const _0x1f6a29=a198_0x1f6a();let _0x340f89=_0x1f6a29[_0x465bc1];return _0x340f89;}export function parseJsonParams(_0x2bbb08){const _0x3d4340=a198_0x340f;if(!_0x2bbb08)return undefined;let _0x4e9c67;try{_0x4e9c67=JSON[_0x3d4340(0x88)](_0x2bbb08);}catch{throw CliErrors[_0x3d4340(0x7a)]('Invalid\x20JSON\x20for\x20--params:\x20'+_0x2bbb08);}if(!_0x4e9c67||typeof _0x4e9c67!==_0x3d4340(0x86)||Array[_0x3d4340(0x7e)](_0x4e9c67))throw CliErrors[_0x3d4340(0x7a)](_0x3d4340(0x83),_0x3d4340(0x81));return _0x4e9c67;}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a199_0x1e15(){const _0x1bd044=['9980464tgMUIy','144185wEWLZk','1552810IHEWdS','63kJInoe','4820725vMaUDa','platform','win32','.cmd','6dYgfqR','57zBhcDt','115265JvLrlM','30708mIexmn','2738770DVnaYj'];a199_0x1e15=function(){return _0x1bd044;};return a199_0x1e15();}const a199_0x2ad139=a199_0x484a;(function(_0x2233ec,_0x36641b){const _0x1baeb8=a199_0x484a,_0x17150a=_0x2233ec();while(!![]){try{const _0x33c1a0=-parseInt(_0x1baeb8(0x96))/0x1+parseInt(_0x1baeb8(0x97))/0x2+-parseInt(_0x1baeb8(0x91))/0x3*(-parseInt(_0x1baeb8(0x93))/0x4)+parseInt(_0x1baeb8(0x92))/0x5*(parseInt(_0x1baeb8(0x90))/0x6)+-parseInt(_0x1baeb8(0x8c))/0x7+-parseInt(_0x1baeb8(0x95))/0x8+-parseInt(_0x1baeb8(0x8b))/0x9*(-parseInt(_0x1baeb8(0x94))/0xa);if(_0x33c1a0===_0x36641b)break;else _0x17150a['push'](_0x17150a['shift']());}catch(_0xf71cfd){_0x17150a['push'](_0x17150a['shift']());}}}(a199_0x1e15,0xbeeda));export const isWindows=process[a199_0x2ad139(0x8d)]===a199_0x2ad139(0x8e);function a199_0x484a(_0x51fb06,_0xacea02){_0x51fb06=_0x51fb06-0x8b;const _0x1e152c=a199_0x1e15();let _0x484a5e=_0x1e152c[_0x51fb06];return _0x484a5e;}export function resolveNpmBin(_0x209f06){const _0x39d957=a199_0x2ad139;return isWindows?_0x209f06+_0x39d957(0x8f):_0x209f06;}
|
package/lib/utils/rules-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a200_0x4aac45=a200_0x411e;(function(_0x1d5575,_0x106e7c){const _0x47080d=a200_0x411e,_0xfea9a1=_0x1d5575();while(!![]){try{const _0x4df1ab=-parseInt(_0x47080d(0x86))/0x1+-parseInt(_0x47080d(0x84))/0x2+parseInt(_0x47080d(0x8a))/0x3+-parseInt(_0x47080d(0x7f))/0x4+parseInt(_0x47080d(0x8d))/0x5+-parseInt(_0x47080d(0x80))/0x6*(parseInt(_0x47080d(0x87))/0x7)+parseInt(_0x47080d(0x8c))/0x8;if(_0x4df1ab===_0x106e7c)break;else _0xfea9a1['push'](_0xfea9a1['shift']());}catch(_0x28e9c8){_0xfea9a1['push'](_0xfea9a1['shift']());}}}(a200_0x27ad,0x34597));import{existsSync,mkdirSync,readFileSync,writeFileSync}from'node:fs';import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';import{getTemplateBaseUrl}from'../utils/config.js';function a200_0x27ad(){const _0x89389f=['statusText','566880gqdkOZ','utf-8','294072weHNEX','2755893vhmpzP','catch','lovrabet_rules.mdc','985722LUIQFE','CDN\x20返回数据格式错误','5912504DfCHwt','1550285dmSCLU','../../templates/rules/lovrabet_rules.mdc.tpl','/rules/rules.json','status','string','content','768240GvIuuC','6swWOmN','lastUpdated','application/json'];a200_0x27ad=function(){return _0x89389f;};return a200_0x27ad();}import{appendUpdateTime}from'../utils/guides-cdn.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function getRulesCdnUrl(){const _0x5cf019=a200_0x411e,_0x437c53=getTemplateBaseUrl();return _0x437c53+_0x5cf019(0x8f);}const LOCAL_TEMPLATE_PATH=resolve(__dirname,a200_0x4aac45(0x8e));export async function fetchRulesFromCDN(){const _0x141973=a200_0x4aac45,_0x2e7be6=getRulesCdnUrl(),_0x32f3ab=await fetch(_0x2e7be6,{'headers':{'Accept':_0x141973(0x82)}});if(!_0x32f3ab['ok'])throw new Error('CDN\x20请求失败:\x20'+_0x32f3ab[_0x141973(0x7c)]+'\x20'+_0x32f3ab[_0x141973(0x83)]);const _0x27867f=await _0x32f3ab['json']();if(!_0x27867f[_0x141973(0x7e)]||typeof _0x27867f['content']!==_0x141973(0x7d))throw new Error(_0x141973(0x8b));return _0x27867f;}export async function getRulesContent(){const _0x4d3668=a200_0x4aac45;try{const _0x3001c2=await fetchRulesFromCDN();return _0x3001c2[_0x4d3668(0x7e)];}catch{return readLocalTemplate();}}function a200_0x411e(_0x18cae7,_0x73a63d){_0x18cae7=_0x18cae7-0x7c;const _0x27adcc=a200_0x27ad();let _0x411e66=_0x27adcc[_0x18cae7];return _0x411e66;}export function readLocalTemplate(){const _0x464717=a200_0x4aac45;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,_0x464717(0x85));throw new Error('本地模板文件不存在:\x20'+LOCAL_TEMPLATE_PATH);}export async function writeRulesFile(_0xd8fed0){const _0x2a0e3=a200_0x4aac45,_0x5dc1bf=await fetchRulesFromCDN()[_0x2a0e3(0x88)](()=>null);let _0x4be602;_0x5dc1bf?(_0x4be602=_0x5dc1bf[_0x2a0e3(0x7e)],_0x5dc1bf[_0x2a0e3(0x81)]&&(_0x4be602=appendUpdateTime(_0x4be602,_0x5dc1bf[_0x2a0e3(0x81)]))):_0x4be602=readLocalTemplate();const _0x2b2a27=dirname(_0xd8fed0);!existsSync(_0x2b2a27)&&mkdirSync(_0x2b2a27,{'recursive':!![]}),writeFileSync(_0xd8fed0,_0x4be602,'utf-8');}export async function copyRulesToCursor(_0x5ca1ca){const _0x56875c=a200_0x4aac45,_0x15be0c=join(_0x5ca1ca,'.cursor/rules'),_0x593fb9=join(_0x15be0c,_0x56875c(0x89));if(existsSync(_0x593fb9))return![];return await writeRulesFile(_0x593fb9),!![];}export async function copyRulesToAgentsMd(_0x5efd9e){const _0x1b7007=join(_0x5efd9e,'agents.md');if(existsSync(_0x1b7007))return![];return await writeRulesFile(_0x1b7007),!![];}
|
package/lib/utils/sleep.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function sleep(
|
|
1
|
+
export function sleep(_0xcac0fc){return new Promise(_0xe7288a=>setTimeout(_0xe7288a,_0xcac0fc));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a202_0x1113(){const _0x346348=['replaceContent','readFile','getFullYear','模板内容替换失败','.ts','73832Txheuo','pad','.js','alias','11yjcPpt','.json','toComponentName','.scss','api','toUpperCase','processFile','.md','map','padStart','toISOString','join','processDirectory','writeFile','9whYdSZ','slice','error','utf8','模板内容替换完成','46fHwKry','isFile','readdir','2327420NEsKVC','toDisplayTitle','endsWith','mkdir','template','info','default','1602706NjqMxP','toLowerCase','alias:\x20\x22','\x20},','tableName','now','.tpl','1661484cSLElA','split','3209464WnqoBA','datasetCode','message','promises','3fYLxri','开始处理模板内容替换','success','includes','.jsx','getMinutes','formatLocalTimestamp','replace','5759zuMwFt','name','replaceApiContent','pop','charAt','datasetCode:\x20\x22','name:\x20\x22','6916830wkiZsl','.tsx'];a202_0x1113=function(){return _0x346348;};return a202_0x1113();}const a202_0x29f419=a202_0x5667;(function(_0x1a6125,_0x4cbd8e){const _0x489442=a202_0x5667,_0x20fefe=_0x1a6125();while(!![]){try{const _0x6ef86f=parseInt(_0x489442(0x1f0))/0x1*(parseInt(_0x489442(0x215))/0x2)+parseInt(_0x489442(0x1e8))/0x3*(-parseInt(_0x489442(0x1fe))/0x4)+-parseInt(_0x489442(0x218))/0x5+-parseInt(_0x489442(0x1e2))/0x6+-parseInt(_0x489442(0x21f))/0x7+parseInt(_0x489442(0x1e4))/0x8*(parseInt(_0x489442(0x210))/0x9)+-parseInt(_0x489442(0x1f7))/0xa*(-parseInt(_0x489442(0x202))/0xb);if(_0x6ef86f===_0x4cbd8e)break;else _0x20fefe['push'](_0x20fefe['shift']());}catch(_0x4d3bfe){_0x20fefe['push'](_0x20fefe['shift']());}}}(a202_0x1113,0x397f5));import a202_0x1caf02 from'node:fs';import a202_0x36667a from'node:path';import{logger}from'../utils/logger.js';import{getCliVersion}from'../utils/version.js';function a202_0x5667(_0x32b193,_0x298537){_0x32b193=_0x32b193-0x1dc;const _0x111353=a202_0x1113();let _0x566794=_0x111353[_0x32b193];return _0x566794;}const CLI_VERSION=getCliVersion();export class TemplateReplacer{static['pad'](_0x1a33a2){const _0x35fac8=a202_0x5667;return String(_0x1a33a2)[_0x35fac8(0x20b)](0x2,'0');}static['formatLocalTimestamp'](_0x1bb363){const _0x11afc7=a202_0x5667,_0xf222bd=_0x1bb363[_0x11afc7(0x1fb)](),_0x5e4250=this[_0x11afc7(0x1ff)](_0x1bb363['getMonth']()+0x1),_0x4844c3=this['pad'](_0x1bb363['getDate']()),_0x530bc8=this[_0x11afc7(0x1ff)](_0x1bb363['getHours']()),_0x38f33b=this['pad'](_0x1bb363[_0x11afc7(0x1ed)]()),_0x8d1b29=this[_0x11afc7(0x1ff)](_0x1bb363['getSeconds']());return{'createdAt':_0xf222bd+'-'+_0x5e4250+'-'+_0x4844c3+'\x20'+_0x530bc8+':'+_0x38f33b+':'+_0x8d1b29,'createdDate':_0xf222bd+'-'+_0x5e4250+'-'+_0x4844c3,'createdTime':_0x530bc8+':'+_0x38f33b+':'+_0x8d1b29};}static[a202_0x29f419(0x204)](_0x30e629){const _0x3185a0=a202_0x29f419,_0xddfeb1=_0x30e629[_0x3185a0(0x1e3)]('/')[_0x3185a0(0x1f3)]()||_0x30e629;return _0xddfeb1[_0x3185a0(0x1e3)]('-')[_0x3185a0(0x20a)](_0x5e8cf7=>_0x5e8cf7[_0x3185a0(0x1f4)](0x0)[_0x3185a0(0x207)]()+_0x5e8cf7[_0x3185a0(0x211)](0x1)[_0x3185a0(0x1dc)]())['join']('');}static['toDisplayTitle'](_0x729fe4){const _0x1086bf=a202_0x29f419,_0x36bf49=_0x729fe4[_0x1086bf(0x1e3)]('/')[_0x1086bf(0x1f3)]()||_0x729fe4;return _0x36bf49[_0x1086bf(0x1e3)]('-')[_0x1086bf(0x20a)](_0x422ab1=>_0x422ab1[_0x1086bf(0x1f4)](0x0)[_0x1086bf(0x207)]()+_0x422ab1['slice'](0x1)[_0x1086bf(0x1dc)]())[_0x1086bf(0x20d)]('\x20');}static[a202_0x29f419(0x1f9)](_0x4f8fe7,_0x42040c,_0x432ba1){const _0x1e83ec=a202_0x29f419,_0x17d7af=this[_0x1e83ec(0x204)](_0x42040c),_0x242ab5=this[_0x1e83ec(0x219)](_0x42040c),{createdAt:_0x12a65e,createdDate:_0xde6bba,createdTime:_0x272d9a}=this[_0x1e83ec(0x1ee)](new Date());let _0x1448a3=_0x4f8fe7[_0x1e83ec(0x1ef)](/\{CliVersion\}/g,CLI_VERSION)['replace'](/\{ComponentName\}/g,_0x17d7af)['replace'](/\{DisplayTitle\}/g,_0x242ab5)[_0x1e83ec(0x1ef)](/\{PageName\}/g,_0x42040c)[_0x1e83ec(0x1ef)](/\{TemplateName\}/g,_0x432ba1)[_0x1e83ec(0x1ef)](/\{CreatedAt\}/g,_0x12a65e)['replace'](/\{CreatedDate\}/g,_0xde6bba)[_0x1e83ec(0x1ef)](/\{CreatedTime\}/g,_0x272d9a);return _0x1448a3;}static[a202_0x29f419(0x1f2)](_0x5db753,_0x227914,_0x112c6e,_0x149d7b,_0x233796,_0x5e9034,_0x3cf1a8,_0x4fef71){const _0x4eac49=a202_0x29f419,_0x58d720=new Date(),_0xdd69f9=_0x58d720[_0x4eac49(0x20c)](),_0x3df63a=_0x112c6e['map'](_0x285b14=>{const _0x416cbd=_0x4eac49,_0x3f0681=[_0x416cbd(0x1f5)+_0x285b14[_0x416cbd(0x1e5)]+'\x22','tableName:\x20\x22'+_0x285b14[_0x416cbd(0x1df)]+'\x22',_0x416cbd(0x1f6)+_0x285b14[_0x416cbd(0x1f1)]+'\x22'];return _0x285b14[_0x416cbd(0x201)]&&_0x3f0681['push'](_0x416cbd(0x1dd)+_0x285b14[_0x416cbd(0x201)]+'\x22'),'\x0a\x20\x20\x20\x20{\x20'+_0x3f0681[_0x416cbd(0x20d)](',\x20')+_0x416cbd(0x1de);})[_0x4eac49(0x20d)](''),_0x5baeee=_0x149d7b||_0x112c6e[0x0]?.[_0x4eac49(0x201)]||'YourModel';let _0x1ff75f=_0x5db753[_0x4eac49(0x1ef)](/\{AppCode\}/g,_0x227914)[_0x4eac49(0x1ef)](/\{ModelConfigs\}/g,_0x3df63a)[_0x4eac49(0x1ef)](/\{ExampleModelName\}/g,_0x5baeee)['replace'](/\{ApiFileName\}/g,_0x233796||_0x4eac49(0x206))['replace'](/\{ConfigName\}/g,_0x5e9034||_0x4eac49(0x21e))[_0x4eac49(0x1ef)](/\{ClientConfigParam\}/g,_0x3cf1a8||'')['replace'](/\{VarPrefix\}/g,_0x4fef71||'LOVRABET')[_0x4eac49(0x1ef)](/\{CreatedAt\}/g,_0xdd69f9);return _0x1ff75f;}static async['processTemplate'](_0xde68a3,_0x4c8d03,_0x2d0739,_0x35f85a,_0x129e72=!![]){const _0x5597c7=a202_0x29f419,_0x48d062=Date['now']();try{_0x129e72&&logger[_0x5597c7(0x21d)](_0x5597c7(0x21c),_0x5597c7(0x1e9),{'templatePath':_0xde68a3,'targetPath':_0x4c8d03,'pageName':_0x2d0739,'templateName':_0x35f85a});await a202_0x1caf02[_0x5597c7(0x1e7)][_0x5597c7(0x21b)](_0x4c8d03,{'recursive':!![]}),await this[_0x5597c7(0x20e)](_0xde68a3,_0x4c8d03,_0x2d0739,_0x35f85a);if(_0x129e72){const _0x202fb9=Date[_0x5597c7(0x1e0)]()-_0x48d062;logger[_0x5597c7(0x1ea)](_0x5597c7(0x21c),_0x5597c7(0x214),_0x202fb9,{'pageName':_0x2d0739,'templateName':_0x35f85a});}}catch(_0x1de6b7){if(_0x129e72){const _0x310e4a=Date[_0x5597c7(0x1e0)]()-_0x48d062;logger[_0x5597c7(0x212)](_0x5597c7(0x21c),_0x5597c7(0x1fc),{'templatePath':_0xde68a3,'targetPath':_0x4c8d03,'pageName':_0x2d0739,'templateName':_0x35f85a,'error':_0x1de6b7 instanceof Error?_0x1de6b7[_0x5597c7(0x1e6)]:String(_0x1de6b7),'duration':_0x310e4a});}throw _0x1de6b7;}}static async['processDirectory'](_0x2fbd7e,_0x367f09,_0x2d58a6,_0x39d3b1){const _0x4da12a=a202_0x29f419,_0x2540d3=await a202_0x1caf02[_0x4da12a(0x1e7)][_0x4da12a(0x217)](_0x2fbd7e,{'withFileTypes':!![]});for(const _0x488284 of _0x2540d3){const _0x1c5cb5=a202_0x36667a[_0x4da12a(0x20d)](_0x2fbd7e,_0x488284['name']);let _0xaf65e9=a202_0x36667a[_0x4da12a(0x20d)](_0x367f09,_0x488284[_0x4da12a(0x1f1)]);_0x488284['name'][_0x4da12a(0x21a)](_0x4da12a(0x1e1))&&(_0xaf65e9=a202_0x36667a['join'](_0x367f09,_0x488284[_0x4da12a(0x1f1)][_0x4da12a(0x1ef)](/\.tpl$/,'')));if(_0x488284['isDirectory']())await a202_0x1caf02[_0x4da12a(0x1e7)][_0x4da12a(0x21b)](_0xaf65e9,{'recursive':!![]}),await this[_0x4da12a(0x20e)](_0x1c5cb5,_0xaf65e9,_0x2d58a6,_0x39d3b1);else _0x488284[_0x4da12a(0x216)]()&&await this[_0x4da12a(0x208)](_0x1c5cb5,_0xaf65e9,_0x2d58a6,_0x39d3b1);}}static async[a202_0x29f419(0x208)](_0x23b481,_0x429023,_0x2ff962,_0x1c27cb){const _0x2c99fa=a202_0x29f419,_0x336009=a202_0x36667a['extname'](_0x23b481)['toLowerCase']();_0x23b481['endsWith'](_0x2c99fa(0x1e1))&&(_0x429023=_0x429023[_0x2c99fa(0x1ef)](/\.tpl$/,''));const _0x35dcf6=[_0x2c99fa(0x1f8),_0x2c99fa(0x1fd),_0x2c99fa(0x1ec),_0x2c99fa(0x200),_0x2c99fa(0x203),_0x2c99fa(0x209),'.css',_0x2c99fa(0x205),_0x2c99fa(0x1e1)];if(_0x35dcf6[_0x2c99fa(0x1eb)](_0x336009)||_0x23b481[_0x2c99fa(0x21a)](_0x2c99fa(0x1e1))){const _0x5a3178=await a202_0x1caf02['promises'][_0x2c99fa(0x1fa)](_0x23b481,_0x2c99fa(0x213)),_0x394b7e=this[_0x2c99fa(0x1f9)](_0x5a3178,_0x2ff962,_0x1c27cb);await a202_0x1caf02[_0x2c99fa(0x1e7)][_0x2c99fa(0x20f)](_0x429023,_0x394b7e,_0x2c99fa(0x213));}else await a202_0x1caf02[_0x2c99fa(0x1e7)]['copyFile'](_0x23b481,_0x429023);}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x508109,_0x4dfbe4){var _0x1abdaa=a203_0x383e,_0x3521f3=_0x508109();while(!![]){try{var _0x308087=-parseInt(_0x1abdaa(0xad))/0x1+parseInt(_0x1abdaa(0xb2))/0x2*(-parseInt(_0x1abdaa(0xaf))/0x3)+-parseInt(_0x1abdaa(0xae))/0x4+-parseInt(_0x1abdaa(0xb0))/0x5*(-parseInt(_0x1abdaa(0xb4))/0x6)+-parseInt(_0x1abdaa(0xb1))/0x7+-parseInt(_0x1abdaa(0xb5))/0x8*(parseInt(_0x1abdaa(0xb3))/0x9)+parseInt(_0x1abdaa(0xac))/0xa;if(_0x308087===_0x4dfbe4)break;else _0x3521f3['push'](_0x3521f3['shift']());}catch(_0x1a8f1f){_0x3521f3['push'](_0x3521f3['shift']());}}}(a203_0x5efd,0xded7c));function a203_0x5efd(){var _0x30524f=['40qzeMIm','32462150JuiGpL','98176lgxmsC','2094088bWjfDB','274143rBnlhq','2168795aZcdHE','8252888bRhSyr','6PppXRo','1246293gagJnc','6sXuEMX'];a203_0x5efd=function(){return _0x30524f;};return a203_0x5efd();}import{VERSION}from'../generated/build-info.js';function a203_0x383e(_0x5d6fb3,_0x557539){_0x5d6fb3=_0x5d6fb3-0xac;var _0x5efded=a203_0x5efd();var _0x383e52=_0x5efded[_0x5d6fb3];return _0x383e52;}export function getCliVersion(){return VERSION;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x293c92,_0x44067d){var _0x403db6=a204_0x3012,_0x44f103=_0x293c92();while(!![]){try{var _0x1de760=parseInt(_0x403db6(0x191))/0x1*(-parseInt(_0x403db6(0x197))/0x2)+-parseInt(_0x403db6(0x193))/0x3+parseInt(_0x403db6(0x198))/0x4+-parseInt(_0x403db6(0x196))/0x5+parseInt(_0x403db6(0x194))/0x6*(-parseInt(_0x403db6(0x19a))/0x7)+-parseInt(_0x403db6(0x192))/0x8+-parseInt(_0x403db6(0x199))/0x9*(-parseInt(_0x403db6(0x195))/0xa);if(_0x1de760===_0x44067d)break;else _0x44f103['push'](_0x44f103['shift']());}catch(_0x2d1684){_0x44f103['push'](_0x44f103['shift']());}}}(a204_0x569d,0xb94bb));function a204_0x3012(_0x3e5f97,_0x30b01c){_0x3e5f97=_0x3e5f97-0x191;var _0x569d32=a204_0x569d();var _0x301240=_0x569d32[_0x3e5f97];return _0x301240;}import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';export async function withActiveCookie(_0x261f20,_0x5d798a){setActiveCookie(_0x261f20);try{return await _0x5d798a();}finally{clearActiveCookie();}}function a204_0x569d(){var _0x3b3111=['6469616mQwxVn','1274376nbdsGA','282OePOLw','20tvimrP','3006770aQGnCn','1263578UobtqK','2516428ZcaVhD','17318826weYsbR','186487oMEPLK','1eTGANZ'];a204_0x569d=function(){return _0x3b3111;};return a204_0x569d();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a205_0x4b8f(){var _0x588aa7=['79754MrMAQU','9DnWgEM','10020bmYevo','77lHeRvS','stderr','44412YzHWLs','33HpyDbk','8ULqJnb','1929685CCOcpD','write','1160810qkMHWz','1246UOQxOt','7095738cajwdn','12YpLKtz','4708696OISsZx'];a205_0x4b8f=function(){return _0x588aa7;};return a205_0x4b8f();}(function(_0x1104f6,_0x4b7472){var _0x2b6328=a205_0x184e,_0x1257b6=_0x1104f6();while(!![]){try{var _0x16875a=parseInt(_0x2b6328(0x17f))/0x1*(parseInt(_0x2b6328(0x177))/0x2)+parseInt(_0x2b6328(0x176))/0x3*(-parseInt(_0x2b6328(0x175))/0x4)+-parseInt(_0x2b6328(0x178))/0x5+parseInt(_0x2b6328(0x181))/0x6*(parseInt(_0x2b6328(0x17b))/0x7)+-parseInt(_0x2b6328(0x17e))/0x8*(-parseInt(_0x2b6328(0x180))/0x9)+parseInt(_0x2b6328(0x17a))/0xa*(-parseInt(_0x2b6328(0x182))/0xb)+parseInt(_0x2b6328(0x17d))/0xc*(parseInt(_0x2b6328(0x17c))/0xd);if(_0x16875a===_0x4b7472)break;else _0x1257b6['push'](_0x1257b6['shift']());}catch(_0x8d67e2){_0x1257b6['push'](_0x1257b6['shift']());}}}(a205_0x4b8f,0x68fe4));function a205_0x184e(_0x5b98ad,_0x397113){_0x5b98ad=_0x5b98ad-0x174;var _0x4b8f39=a205_0x4b8f();var _0x184e6f=_0x4b8f39[_0x5b98ad];return _0x184e6f;}export function writeCliSideChannelLine(_0x4136cc){var _0x555fc1=a205_0x184e;process[_0x555fc1(0x174)][_0x555fc1(0x179)](_0x4136cc+'\x0a');}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lovrabet/rabetbase-cli",
|
|
3
|
-
"version": "2.1.14-beta.
|
|
3
|
+
"version": "2.1.14-beta.2",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"sync:cdn": "node scripts/sync-cdn-assets.js",
|
|
26
26
|
"verify:bundled-jq": "node scripts/verify-bundled-jq.mjs",
|
|
27
27
|
"regression:beta-smoke": "node scripts/regression-beta-smoke.mjs",
|
|
28
|
-
"beta-release": "
|
|
29
|
-
"release": "
|
|
28
|
+
"beta-release": "node scripts/beta-release.mjs",
|
|
29
|
+
"release": "node scripts/latest-release.mjs",
|
|
30
30
|
"test": "vitest run",
|
|
31
31
|
"test:run": "vitest run",
|
|
32
32
|
"test:coverage": "vitest run --coverage",
|