@lovrabet/rabetbase-cli 2.1.14-beta.2 → 2.1.14-beta.3
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/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 +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xcc861c,_0x25ab6a){const _0x447cd8=a182_0x2303,_0x3a6da7=_0xcc861c();while(!![]){try{const _0x2fa0ca=-parseInt(_0x447cd8(0x10b))/0x1*(parseInt(_0x447cd8(0x109))/0x2)+parseInt(_0x447cd8(0x110))/0x3+parseInt(_0x447cd8(0x10a))/0x4+parseInt(_0x447cd8(0x115))/0x5*(-parseInt(_0x447cd8(0x118))/0x6)+parseInt(_0x447cd8(0x10e))/0x7*(-parseInt(_0x447cd8(0x10d))/0x8)+-parseInt(_0x447cd8(0x113))/0x9*(-parseInt(_0x447cd8(0x114))/0xa)+parseInt(_0x447cd8(0x111))/0xb;if(_0x2fa0ca===_0x25ab6a)break;else _0x3a6da7['push'](_0x3a6da7['shift']());}catch(_0x50952b){_0x3a6da7['push'](_0x3a6da7['shift']());}}}(a182_0x215e,0x26112));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';function a182_0x215e(){const _0x26af97=['12qfYPqj','truncated','redactionKinds','138834RphHVT','999564jreATo','2CVkijU','redactionCount','35704ZBPwvJ','364gVAxUP','join','34983dwOUbH','4276591CceJbx','title','9gwTvyH','844930IJCsMz','519985IdsaxU','originalBytes','sanitize'];a182_0x215e=function(){return _0x26af97;};return a182_0x215e();}export const PLATFORM_ISSUE_TRACE_NAME='platform-issue-log-collect';function a182_0x2303(_0x1da8dc,_0x5015b1){_0x1da8dc=_0x1da8dc-0x109;const _0x215ec0=a182_0x215e();let _0x23035e=_0x215ec0[_0x1da8dc];return _0x23035e;}export const PLATFORM_ISSUE_SPAN_NAME='issue.log.collect';export async function sendPlatformIssueCollectLog(_0x5e8f2d){const _0x119a07=a182_0x2303;await sendCliTraceLog({'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x5e8f2d[_0x119a07(0x112)],'issue.description':_0x5e8f2d['description'],..._0x5e8f2d[_0x119a07(0x117)]?{'issue.description_original_bytes':_0x5e8f2d[_0x119a07(0x117)][_0x119a07(0x116)],'issue.description_truncated':_0x5e8f2d[_0x119a07(0x117)][_0x119a07(0x119)],'issue.description_redactions':_0x5e8f2d['sanitize'][_0x119a07(0x10c)],'issue.description_redaction_kinds':_0x5e8f2d[_0x119a07(0x117)][_0x119a07(0x11a)][_0x119a07(0x10f)](',')}:{}}});}
|
package/lib/utils/ai_config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a184_0x2dcd78=a184_0x480d;(function(_0x4c0f0d,_0x40f6b8){const _0x28d1fc=a184_0x480d,_0x12e770=_0x4c0f0d();while(!![]){try{const _0x1a8a97=parseInt(_0x28d1fc(0xc4))/0x1+-parseInt(_0x28d1fc(0xa9))/0x2*(parseInt(_0x28d1fc(0xb0))/0x3)+-parseInt(_0x28d1fc(0xca))/0x4+parseInt(_0x28d1fc(0xba))/0x5+parseInt(_0x28d1fc(0xc6))/0x6+parseInt(_0x28d1fc(0xd4))/0x7+parseInt(_0x28d1fc(0xb4))/0x8;if(_0x1a8a97===_0x40f6b8)break;else _0x12e770['push'](_0x12e770['shift']());}catch(_0x498f51){_0x12e770['push'](_0x12e770['shift']());}}}(a184_0x236e,0x8f613));function a184_0x480d(_0x3f38b8,_0x27c968){_0x3f38b8=_0x3f38b8-0xa9;const _0x236e45=a184_0x236e();let _0x480d15=_0x236e45[_0x3f38b8];return _0x480d15;}export const CORE_IDE_CONFIGS={'cursor':{'name':a184_0x2dcd78(0xcd),'description':a184_0x2dcd78(0xd9),'folders':[a184_0x2dcd78(0xda),a184_0x2dcd78(0xb9)],'files':[{'type':a184_0x2dcd78(0xbc),'path':'.cursor/skills/rabetbase.md','template':'SKILL.md.tpl'}]},'windsurf':{'name':'Windsurf','description':'Windsurf\x20IDE','folders':[a184_0x2dcd78(0xcb)],'files':[{'type':a184_0x2dcd78(0xbc),'path':a184_0x2dcd78(0xae),'template':a184_0x2dcd78(0xb3)}]},'claude':{'name':'Claude\x20Code','description':'Claude\x20Code','folders':[a184_0x2dcd78(0xbd)],'files':[{'type':'file','path':a184_0x2dcd78(0xd0),'template':a184_0x2dcd78(0xb3)}]},'cline':{'name':a184_0x2dcd78(0xac),'description':a184_0x2dcd78(0xd7),'folders':['.cline'],'files':[{'type':a184_0x2dcd78(0xbc),'path':a184_0x2dcd78(0xb8),'template':a184_0x2dcd78(0xb3)}]},'codex':{'name':a184_0x2dcd78(0xb6),'description':a184_0x2dcd78(0xad),'folders':[a184_0x2dcd78(0xc3)],'files':[{'type':a184_0x2dcd78(0xbc),'path':a184_0x2dcd78(0xd3),'template':'SKILL.md.tpl'}]},'opencode':{'name':a184_0x2dcd78(0xd8),'description':a184_0x2dcd78(0xb7),'folders':[a184_0x2dcd78(0xdf)],'files':[{'type':a184_0x2dcd78(0xbc),'path':a184_0x2dcd78(0xc0),'template':'SKILL.md.tpl'}]},'qoder':{'name':a184_0x2dcd78(0xd2),'description':a184_0x2dcd78(0xd6),'folders':[a184_0x2dcd78(0xbb)],'files':[{'type':a184_0x2dcd78(0xbc),'path':a184_0x2dcd78(0xb5),'template':a184_0x2dcd78(0xb3)},{'type':a184_0x2dcd78(0xbc),'path':a184_0x2dcd78(0xcc),'template':a184_0x2dcd78(0xb3)}]},'codebuddy':{'name':'CodeBuddy','description':a184_0x2dcd78(0xab),'folders':[a184_0x2dcd78(0xb1)],'files':[{'type':a184_0x2dcd78(0xbc),'path':a184_0x2dcd78(0xd5),'template':a184_0x2dcd78(0xb3)}]},'trae':{'name':a184_0x2dcd78(0xc8),'description':a184_0x2dcd78(0xbe),'folders':['.trae'],'files':[{'type':'file','path':a184_0x2dcd78(0xaa),'template':a184_0x2dcd78(0xb3)}]}};export const IDE_CONFIGS={...CORE_IDE_CONFIGS,'agent':{'name':'其他\x20(通用模板)','description':a184_0x2dcd78(0xdc),'folders':[a184_0x2dcd78(0xcf)],'files':[{'type':a184_0x2dcd78(0xbc),'path':a184_0x2dcd78(0xaf),'template':a184_0x2dcd78(0xb3)}]},'antigravity':{'name':'Antigravity','description':a184_0x2dcd78(0xc7),'folders':['.agent'],'files':[{'type':a184_0x2dcd78(0xbc),'path':a184_0x2dcd78(0xaf),'template':a184_0x2dcd78(0xb3)}]}};export const CORE_IDE_LIST=[a184_0x2dcd78(0xce),'cline',a184_0x2dcd78(0xdb),a184_0x2dcd78(0xd1),a184_0x2dcd78(0xc2),a184_0x2dcd78(0xc9),a184_0x2dcd78(0xc1),a184_0x2dcd78(0xc5),a184_0x2dcd78(0xbf)];function a184_0x236e(){const _0x5e62a2=['Codex\x20IDE','.windsurf/workflows/rabetbase.md','.agent/skills/lovrabet/SKILL.md','160155sRVJcv','.codebuddy','agent','SKILL.md.tpl','540456SDGokr','.qoder/rules/rabetbase.md','Codex','OpenCode\x20IDE','.cline/skills/lovrabet/SKILL.md','.cursor','5194615SvKbnA','.qoder','file','.claude','Trae\x20IDE','windsurf','.opencode/skills/lovrabet/SKILL.md','qoder','cursor','.codex','152274lsXclj','trae','2896416vwDdid','Antigravity\x20IDE','Trae','opencode','3502520qcOqTZ','.windsurf','.qoder/skills/lovrabet/SKILL.md','Cursor','claude','.agent','.claude/skills/lovrabet/SKILL.md','codex','Qoder','.codex/skills/lovrabet/SKILL.md','5150166ttucJL','.codebuddy/skills/lovrabet/SKILL.md','Qoder\x20IDE','Cline\x20IDE','OpenCode','Cursor\x20IDE','.cursorrules','codebuddy','通用模板\x20-\x20兜底方案','antigravity','cline','.opencode','38SADxwS','.trae/skills/lovrabet/SKILL.md','CodeBuddy\x20IDE','Cline'];a184_0x236e=function(){return _0x5e62a2;};return a184_0x236e();}export const IDE_LIST=[a184_0x2dcd78(0xdd),'claude',a184_0x2dcd78(0xde),a184_0x2dcd78(0xdb),a184_0x2dcd78(0xd1),'cursor','opencode',a184_0x2dcd78(0xc1),a184_0x2dcd78(0xc5),a184_0x2dcd78(0xbf),a184_0x2dcd78(0xb2)];export const ALL_CORE_IDES=[a184_0x2dcd78(0xc2),a184_0x2dcd78(0xbf),a184_0x2dcd78(0xce),'cline','codex',a184_0x2dcd78(0xc9),'qoder',a184_0x2dcd78(0xdb),a184_0x2dcd78(0xc5)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a185_0x406e(){const _0x2ee20d=['20QrSGBw','9961434ofYpck','1233890SCuzOb','1274938iyNoSa','3540800sCOARD','14fAadXs','1719624RGFYlR','5508036INmVjN','970263BaoxYX'];a185_0x406e=function(){return _0x2ee20d;};return a185_0x406e();}function a185_0x29b4(_0xdfd15e,_0x19aee2){_0xdfd15e=_0xdfd15e-0xf5;const _0x406edb=a185_0x406e();let _0x29b4a0=_0x406edb[_0xdfd15e];return _0x29b4a0;}(function(_0x29814b,_0x1d4e07){const _0x232569=a185_0x29b4,_0x223e0d=_0x29814b();while(!![]){try{const _0x13cfb2=-parseInt(_0x232569(0xfd))/0x1+parseInt(_0x232569(0xfc))/0x2+parseInt(_0x232569(0xf9))/0x3*(parseInt(_0x232569(0xfa))/0x4)+-parseInt(_0x232569(0xf5))/0x5+-parseInt(_0x232569(0xf8))/0x6+parseInt(_0x232569(0xf6))/0x7*(parseInt(_0x232569(0xf7))/0x8)+parseInt(_0x232569(0xfb))/0x9;if(_0x13cfb2===_0x1d4e07)break;else _0x223e0d['push'](_0x223e0d['shift']());}catch(_0x599214){_0x223e0d['push'](_0x223e0d['shift']());}}}(a185_0x406e,0xd452e));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
|
package/lib/utils/cdn-config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x6bf17d,_0x204bea){const _0x223055=a186_0x4d2f,_0x5b0fa2=_0x6bf17d();while(!![]){try{const _0x2e94ca=-parseInt(_0x223055(0xd4))/0x1+parseInt(_0x223055(0xd6))/0x2+-parseInt(_0x223055(0xe0))/0x3+-parseInt(_0x223055(0xdd))/0x4+parseInt(_0x223055(0xdf))/0x5+-parseInt(_0x223055(0xd3))/0x6+parseInt(_0x223055(0xd9))/0x7;if(_0x2e94ca===_0x204bea)break;else _0x5b0fa2['push'](_0x5b0fa2['shift']());}catch(_0xcdbed1){_0x5b0fa2['push'](_0x5b0fa2['shift']());}}}(a186_0x22c9,0x826b9));import{getTemplateBaseUrl}from'../utils/config.js';export async function fetchCdnConfig(){const _0x58de88=a186_0x4d2f,_0x3dfba3=getTemplateBaseUrl(),_0x147013=[_0x3dfba3+_0x58de88(0xda),_0x3dfba3+_0x58de88(0xe1)];for(const _0x539e08 of _0x147013){try{const _0x53c2fe=await fetch(_0x539e08,{'headers':{'Accept':_0x58de88(0xde)}});if(!_0x53c2fe['ok'])continue;const _0x4cb439=await _0x53c2fe[_0x58de88(0xd2)]();if(!_0x4cb439[_0x58de88(0xdb)]?.[_0x58de88(0xd7)]||!_0x4cb439[_0x58de88(0xd8)]?.[_0x58de88(0xd5)]?.['stableVersion'])continue;return _0x4cb439;}catch{}}return null;}function a186_0x22c9(){const _0x23ab42=['2107340ZloFSD','stableVersion','sdk','12302255WEVWnI','/config.json','cli','now','4214488BqOoBq','application/json','1484795vtCdEY','1492077lhyWQI','/config/index.json','json','3876864RFIPSb','376768IqrNlX','node'];a186_0x22c9=function(){return _0x23ab42;};return a186_0x22c9();}function a186_0x4d2f(_0x2720e4,_0xf55f78){_0x2720e4=_0x2720e4-0xd2;const _0x22c927=a186_0x22c9();let _0x4d2f37=_0x22c927[_0x2720e4];return _0x4d2f37;}let cachedConfig=null,cacheTime=0x0;const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8;let hasCachedConfig=![];export async function getCdnConfig(){const _0xf7a58=a186_0x4d2f,_0x2ce7e3=Date[_0xf7a58(0xdc)]();if(hasCachedConfig){const _0x2becf6=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x2ce7e3-cacheTime<_0x2becf6)return cachedConfig;}const _0x104339=await fetchCdnConfig();return cachedConfig=_0x104339,cacheTime=_0x2ce7e3,hasCachedConfig=!![],_0x104339;}export function clearCdnConfigCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4df015,_0x5e5ab0){const _0x2bb9a6=a187_0x9f35,_0x16a907=_0x4df015();while(!![]){try{const _0x20e1d9=parseInt(_0x2bb9a6(0x1ca))/0x1+parseInt(_0x2bb9a6(0x1c6))/0x2*(-parseInt(_0x2bb9a6(0x1b7))/0x3)+-parseInt(_0x2bb9a6(0x1b5))/0x4*(-parseInt(_0x2bb9a6(0x1b8))/0x5)+parseInt(_0x2bb9a6(0x1be))/0x6+-parseInt(_0x2bb9a6(0x1af))/0x7*(parseInt(_0x2bb9a6(0x1c3))/0x8)+parseInt(_0x2bb9a6(0x1ac))/0x9+-parseInt(_0x2bb9a6(0x1c1))/0xa;if(_0x20e1d9===_0x5e5ab0)break;else _0x16a907['push'](_0x16a907['shift']());}catch(_0x5d210a){_0x16a907['push'](_0x16a907['shift']());}}}(a187_0x55ec,0x3cd7e));import a187_0x12fd5 from'node:fs';import a187_0x25b4b1 from'node:path';import a187_0x5a509e from'semver';function a187_0x9f35(_0x2a07c8,_0x35b3a4){_0x2a07c8=_0x2a07c8-0x1ac;const _0x55ec1d=a187_0x55ec();let _0x9f35dd=_0x55ec1d[_0x2a07c8];return _0x9f35dd;}import{getCdnConfig}from'../utils/cdn-config.js';function a187_0x55ec(){const _0x20641d=['package.json','4016448vRxtFE','all','\x1b[33m','126CLyuTq','@lovrabet/sdk','latest','dependencies','node_modules','\x20\x20\x20Upgrade\x20command:\x20','181564DcrShV','readFileSync','1407993SZyxpW','35uwXdVp','existsSync','parse','minVersion','devDependencies','log','2593788UEjneh','join','\x1b[1m','2685560qkrzfp','node','149632XgxGEd','version','stableVersion','2ZLsyjc','utf8','packageName','\x1b[0m','127466pdFLgI','utf-8','npm\x20install\x20','coerce'];a187_0x55ec=function(){return _0x20641d;};return a187_0x55ec();}const FALLBACK_MIN_SDK_VERSION='1.2.0';function isNonNumericVersion(_0x275a93){const _0x45fbe6=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x45fbe6['some'](_0xe82c8=>_0xe82c8['test'](_0x275a93));}function getInstalledVersion(_0x54aa5a,_0x5ed58){const _0x501510=a187_0x9f35;try{const _0x5e2713=a187_0x25b4b1['join'](_0x54aa5a,_0x501510(0x1b3),_0x5ed58,'package.json');if(a187_0x12fd5[_0x501510(0x1b9)](_0x5e2713)){const _0x4d2ec9=JSON[_0x501510(0x1ba)](a187_0x12fd5[_0x501510(0x1b6)](_0x5e2713,_0x501510(0x1cb)));return _0x4d2ec9[_0x501510(0x1c4)]||null;}}catch{}return null;}async function getSdkStableVersion(){const _0x5691ed=a187_0x9f35;try{const _0x410fe7=await getCdnConfig();return _0x410fe7?.['sdk']?.[_0x5691ed(0x1c2)]?.[_0x5691ed(0x1c5)]||null;}catch{return null;}}async function getSdkPackageName(){const _0x180a94=a187_0x9f35;try{const _0x10d71a=await getCdnConfig();return _0x10d71a?.['sdk']?.['node']?.[_0x180a94(0x1c8)]||_0x180a94(0x1b0);}catch{return _0x180a94(0x1b0);}}export async function checkSdkVersion(_0x1c42e8){const _0x4aa21f=a187_0x9f35,_0x14ac42=a187_0x25b4b1[_0x4aa21f(0x1bf)](_0x1c42e8,_0x4aa21f(0x1ce)),[_0x2eed40,_0x111b5d]=await Promise[_0x4aa21f(0x1ad)]([getSdkStableVersion(),getSdkPackageName()]),_0x2ce2e7=_0x2eed40||FALLBACK_MIN_SDK_VERSION;if(!a187_0x12fd5[_0x4aa21f(0x1b9)](_0x14ac42))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x2ce2e7,'packageName':_0x111b5d,'stableVersion':_0x2eed40};try{const _0x31aea0=JSON[_0x4aa21f(0x1ba)](a187_0x12fd5[_0x4aa21f(0x1b6)](_0x14ac42,_0x4aa21f(0x1c7))),_0x344d04=_0x31aea0[_0x4aa21f(0x1b2)]||{},_0x57e953=_0x31aea0[_0x4aa21f(0x1bc)]||{},_0x389125=_0x344d04[_0x111b5d]||_0x57e953[_0x111b5d];if(!_0x389125)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x2ce2e7,'packageName':_0x111b5d,'stableVersion':_0x2eed40};let _0x2c1ce2=getInstalledVersion(_0x1c42e8,_0x111b5d);!_0x2c1ce2&&(_0x2c1ce2=_0x389125);if(isNonNumericVersion(_0x389125))return{'installed':!![],'version':_0x2c1ce2,'needsUpgrade':![],'minVersion':_0x2ce2e7,'packageName':_0x111b5d,'stableVersion':_0x2eed40};const _0x4c2c46=a187_0x5a509e[_0x4aa21f(0x1cd)](_0x2c1ce2),_0x12a2b7=a187_0x5a509e[_0x4aa21f(0x1cd)](_0x2ce2e7),_0x2ee9fb=_0x4c2c46&&_0x12a2b7?a187_0x5a509e['lt'](_0x4c2c46,_0x12a2b7):![];return{'installed':!![],'version':_0x2c1ce2,'needsUpgrade':_0x2ee9fb,'minVersion':_0x2ce2e7,'packageName':_0x111b5d,'stableVersion':_0x2eed40};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x2ce2e7,'packageName':_0x111b5d,'stableVersion':_0x2eed40};}}export function checkSdkVersionSync(_0x376ca8){const _0x35d7e1=a187_0x9f35,_0x2d01da=a187_0x25b4b1[_0x35d7e1(0x1bf)](_0x376ca8,'package.json'),_0x9f748a=_0x35d7e1(0x1b0);if(!a187_0x12fd5['existsSync'](_0x2d01da))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x9f748a,'stableVersion':null};try{const _0x28e576=JSON[_0x35d7e1(0x1ba)](a187_0x12fd5[_0x35d7e1(0x1b6)](_0x2d01da,_0x35d7e1(0x1c7))),_0x3d16be=_0x28e576['dependencies']||{},_0x3c11f2=_0x28e576['devDependencies']||{},_0x44637f=_0x3d16be[_0x9f748a]||_0x3c11f2[_0x9f748a];if(!_0x44637f)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x9f748a,'stableVersion':null};let _0x1c1d5c=getInstalledVersion(_0x376ca8,_0x9f748a);!_0x1c1d5c&&(_0x1c1d5c=_0x44637f);if(isNonNumericVersion(_0x44637f))return{'installed':!![],'version':_0x1c1d5c,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x9f748a,'stableVersion':null};const _0x1fd0bf=a187_0x5a509e[_0x35d7e1(0x1cd)](_0x1c1d5c),_0x144e07=_0x1fd0bf?a187_0x5a509e['lt'](_0x1fd0bf,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x1c1d5c,'needsUpgrade':_0x144e07,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x9f748a,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x9f748a,'stableVersion':null};}}export function printSdkUpgradeWarning(_0x8b5080){const _0x3e9b4b=a187_0x9f35;if(!_0x8b5080['needsUpgrade'])return;const _0x44945d=_0x3e9b4b(0x1ae),_0x1c8314=_0x3e9b4b(0x1c9),_0x2b04e3=_0x3e9b4b(0x1c0),_0x5350ea=_0x8b5080['packageName']||_0x3e9b4b(0x1b0),_0xf5f0=_0x8b5080['stableVersion']||_0x8b5080[_0x3e9b4b(0x1bb)],_0x21b8f2=_0x3e9b4b(0x1cc)+_0x5350ea+'@'+(_0xf5f0||_0x3e9b4b(0x1b1));console['log'](),console[_0x3e9b4b(0x1bd)](''+_0x44945d+_0x2b04e3+'↪\x20SDK\x20update\x20available'+_0x1c8314),console[_0x3e9b4b(0x1bd)](_0x44945d+'\x20\x20\x20Current\x20version:\x20'+_0x5350ea+'@'+_0x8b5080[_0x3e9b4b(0x1c4)]+_0x1c8314),console[_0x3e9b4b(0x1bd)](_0x44945d+'\x20\x20\x20Stable\x20version:\x20'+_0xf5f0+_0x1c8314),console[_0x3e9b4b(0x1bd)](_0x44945d+_0x3e9b4b(0x1b4)+_0x21b8f2+_0x1c8314),console[_0x3e9b4b(0x1bd)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x17b7f5,_0x2c5a43){const _0x2ff023=a188_0x1110,_0x182a3d=_0x17b7f5();while(!![]){try{const _0x576e2c=parseInt(_0x2ff023(0x18a))/0x1*(-parseInt(_0x2ff023(0x180))/0x2)+parseInt(_0x2ff023(0x179))/0x3+-parseInt(_0x2ff023(0x174))/0x4*(parseInt(_0x2ff023(0x181))/0x5)+parseInt(_0x2ff023(0x193))/0x6*(parseInt(_0x2ff023(0x171))/0x7)+parseInt(_0x2ff023(0x185))/0x8*(-parseInt(_0x2ff023(0x190))/0x9)+-parseInt(_0x2ff023(0x189))/0xa+-parseInt(_0x2ff023(0x177))/0xb*(-parseInt(_0x2ff023(0x184))/0xc);if(_0x576e2c===_0x2c5a43)break;else _0x182a3d['push'](_0x182a3d['shift']());}catch(_0x54735e){_0x182a3d['push'](_0x182a3d['shift']());}}}(a188_0x585a,0xa7256));function a188_0x585a(){const _0x1ad0a5=['1097002cxSTOy','6183590QogSCa','\x20\x20\x20','upgradeMessage','12pYKEwU','157336DAoeSG','\x1b[0m','coerce','\x1b[33m','5925620GHslIS','1ZNWeiu','log','\x20\x20\x20Recommended\x20stable:\x20','\x20\x20\x20Minimum\x20required:\x20','../..','↪\x20New\x20version\x20available','9lleyiM','minimumVersion','npm\x20install\x20-g\x20','222GTLvVx','↪\x20Critical\x20CLI\x20upgrade\x20required','minimumVersionMessage','validation','stableVersion','58982epPlYD','package.json','Current\x20CLI\x20version\x20is\x20below\x20the\x20minimum\x20supported\x20version.','4fiWeTe','1.0.0','\x20\x20\x20Upgrade\x20command:\x20','15729263rUImlr','currentVersion','4021149hWLTht','belowMinimum','Minimum\x20required:\x20','join','utf-8','Upgrade\x20command:\x20','\x1b[31m'];a188_0x585a=function(){return _0x1ad0a5;};return a188_0x585a();}function a188_0x1110(_0x4c8a1f,_0x24e8e4){_0x4c8a1f=_0x4c8a1f-0x16d;const _0x585a80=a188_0x585a();let _0x111050=_0x585a80[_0x4c8a1f];return _0x111050;}import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a188_0x1b4d57 from'semver';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';export function getCliUpgradeCommand(_0x4c8b2a){const _0x460780=a188_0x1110,_0xcfb595=_0x4c8b2a['stableVersion']||'latest';return _0x460780(0x192)+NPM_PACKAGE_NAME+'@'+_0xcfb595;}function getCurrentCliVersion(){const _0x23d649=a188_0x1110;try{const _0x4bc9e6=fileURLToPath(import.meta.url),_0x506397=resolve(dirname(_0x4bc9e6),_0x23d649(0x18e)),_0x434c10=resolve(_0x506397,_0x23d649(0x172)),_0x183646=JSON['parse'](readFileSync(_0x434c10,_0x23d649(0x17d)));return _0x183646['version']||_0x23d649(0x175);}catch{return _0x23d649(0x175);}}export async function checkCliVersion(){const _0x4461f0=a188_0x1110,_0x5b3a75=getCurrentCliVersion(),_0x16025d=await getCliVersionPolicy(),_0x584c8b=_0x16025d?.[_0x4461f0(0x170)]||null,_0x21a0b0=_0x16025d?.[_0x4461f0(0x191)]||null;let _0x35de93=![],_0x44a7ee=![];const _0x3d9814=a188_0x1b4d57[_0x4461f0(0x187)](_0x5b3a75);if(_0x3d9814&&_0x584c8b)try{const _0x55e6da=a188_0x1b4d57[_0x4461f0(0x187)](_0x584c8b);if(_0x55e6da)_0x35de93=a188_0x1b4d57['lt'](_0x3d9814,_0x55e6da);}catch{}if(_0x3d9814&&_0x21a0b0)try{const _0x3ac314=a188_0x1b4d57[_0x4461f0(0x187)](_0x21a0b0);if(_0x3ac314)_0x44a7ee=a188_0x1b4d57['lt'](_0x3d9814,_0x3ac314);}catch{}return _0x44a7ee&&(_0x35de93=!![]),{'currentVersion':_0x5b3a75,'stableVersion':_0x584c8b,'minimumVersion':_0x21a0b0,'needsUpgrade':_0x35de93,'belowMinimum':_0x44a7ee,'isPreRelease':![],'upgradeMessage':_0x16025d?.[_0x4461f0(0x183)],'minimumVersionMessage':_0x16025d?.[_0x4461f0(0x16e)]};}export function printCliUpgradeWarning(_0x12b25f){const _0x1a307c=a188_0x1110;if(!_0x12b25f['needsUpgrade']&&!_0x12b25f[_0x1a307c(0x17a)])return;const _0x7bbcc3=_0x1a307c(0x17f),_0x33dfb5=_0x1a307c(0x188),_0x58c853=_0x1a307c(0x186),_0x1836cd='\x1b[1m',_0x15d3ec=getCliUpgradeCommand(_0x12b25f);console[_0x1a307c(0x18b)](),_0x12b25f[_0x1a307c(0x17a)]?(console['log'](''+_0x7bbcc3+_0x1836cd+_0x1a307c(0x16d)+_0x58c853),console[_0x1a307c(0x18b)](_0x7bbcc3+'\x20\x20\x20Current\x20CLI\x20version:\x20'+_0x12b25f['currentVersion']+_0x58c853),_0x12b25f[_0x1a307c(0x191)]&&console[_0x1a307c(0x18b)](_0x7bbcc3+_0x1a307c(0x18d)+_0x12b25f['minimumVersion']+_0x58c853),_0x12b25f[_0x1a307c(0x170)]&&_0x12b25f[_0x1a307c(0x170)]!==_0x12b25f['minimumVersion']&&console['log'](_0x7bbcc3+_0x1a307c(0x18c)+_0x12b25f[_0x1a307c(0x170)]+_0x58c853),_0x12b25f[_0x1a307c(0x16e)]&&console['log'](_0x7bbcc3+_0x1a307c(0x182)+_0x12b25f[_0x1a307c(0x16e)]+_0x58c853),console['log'](_0x7bbcc3+'\x20\x20\x20Upgrade\x20command:\x20'+_0x15d3ec+_0x58c853)):(console[_0x1a307c(0x18b)](''+_0x33dfb5+_0x1836cd+_0x1a307c(0x18f)+_0x58c853),console[_0x1a307c(0x18b)](_0x33dfb5+'\x20\x20\x20Current\x20CLI\x20version:\x20'+_0x12b25f[_0x1a307c(0x178)]+_0x58c853),console[_0x1a307c(0x18b)](_0x33dfb5+'\x20\x20\x20Stable\x20version:\x20'+_0x12b25f[_0x1a307c(0x170)]+_0x58c853),_0x12b25f[_0x1a307c(0x183)]&&console[_0x1a307c(0x18b)](_0x33dfb5+'\x20\x20\x20'+_0x12b25f[_0x1a307c(0x183)]+_0x58c853),console[_0x1a307c(0x18b)](_0x33dfb5+_0x1a307c(0x176)+_0x15d3ec+_0x58c853)),console[_0x1a307c(0x18b)]();}export function assertCliVersionSupported(_0x2ce99b){const _0xf99261=a188_0x1110;if(!_0x2ce99b[_0xf99261(0x17a)])return;const _0x4146c7=[_0x2ce99b[_0xf99261(0x16e)],'Current\x20version:\x20'+_0x2ce99b[_0xf99261(0x178)],_0x2ce99b[_0xf99261(0x191)]?_0xf99261(0x17b)+_0x2ce99b[_0xf99261(0x191)]:null,_0xf99261(0x17e)+getCliUpgradeCommand(_0x2ce99b)]['filter'](Boolean)[_0xf99261(0x17c)]('\x0a');throw CliErrors[_0xf99261(0x16f)](_0xf99261(0x173),_0x4146c7);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x234e7d,_0x206096){const _0x2cbf94=a189_0x25fd,_0x104b03=_0x234e7d();while(!![]){try{const _0x4c09bd=parseInt(_0x2cbf94(0x7d))/0x1+parseInt(_0x2cbf94(0x72))/0x2+parseInt(_0x2cbf94(0x82))/0x3*(-parseInt(_0x2cbf94(0x85))/0x4)+-parseInt(_0x2cbf94(0x84))/0x5*(-parseInt(_0x2cbf94(0x77))/0x6)+-parseInt(_0x2cbf94(0x7f))/0x7+-parseInt(_0x2cbf94(0x7c))/0x8+-parseInt(_0x2cbf94(0x78))/0x9;if(_0x4c09bd===_0x206096)break;else _0x104b03['push'](_0x104b03['shift']());}catch(_0x47e6f9){_0x104b03['push'](_0x104b03['shift']());}}}(a189_0xcbe0,0xda2d3));import{CLI_VERSION_POLICY_URL}from'../constant/cdn.js';const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8,FETCH_TIMEOUT_MS=0xbb8;function a189_0xcbe0(){const _0x496230=['3rYwGOq','recommendedVersion','15arkSCm','2353552Editzf','latestVersion','cli','length','object','915138ZygMIK','trim','minimumVersion','minVersion','json','2536206fyybXC','2251242GeKReT','abort','string','application/json','887000DtTmwZ','1282938QUTiKF','signal','8158906pmRWJP','upgradeMessage','now'];a189_0xcbe0=function(){return _0x496230;};return a189_0xcbe0();}function pickString(_0x2ceb96){const _0x5941db=a189_0x25fd;return typeof _0x2ceb96===_0x5941db(0x7a)&&_0x2ceb96[_0x5941db(0x73)]()[_0x5941db(0x88)]>0x0?_0x2ceb96['trim']():null;}function normalizeCliVersionPolicy(_0x18326c){const _0x477f99=a189_0x25fd;if(!_0x18326c||typeof _0x18326c!==_0x477f99(0x89))return null;const _0x1dcc8d=_0x18326c,_0x4482c4=_0x1dcc8d[_0x477f99(0x87)]&&typeof _0x1dcc8d[_0x477f99(0x87)]===_0x477f99(0x89)?_0x1dcc8d[_0x477f99(0x87)]:_0x1dcc8d,_0x5aa585=pickString(_0x4482c4['stableVersion'])||pickString(_0x4482c4[_0x477f99(0x86)])||pickString(_0x4482c4[_0x477f99(0x83)]),_0x3eb267=pickString(_0x4482c4[_0x477f99(0x74)])||pickString(_0x4482c4[_0x477f99(0x75)]);if(!_0x5aa585&&!_0x3eb267)return null;return{'stableVersion':_0x5aa585,'minimumVersion':_0x3eb267,'upgradeMessage':pickString(_0x4482c4[_0x477f99(0x80)])||undefined,'minimumVersionMessage':pickString(_0x4482c4['minimumVersionMessage'])||undefined};}export async function fetchCliVersionPolicy(){const _0x16fec9=a189_0x25fd,_0x32d631=new AbortController(),_0x467f15=setTimeout(()=>_0x32d631[_0x16fec9(0x79)](),FETCH_TIMEOUT_MS);try{const _0x412370=await fetch(CLI_VERSION_POLICY_URL,{'headers':{'Accept':_0x16fec9(0x7b)},'signal':_0x32d631[_0x16fec9(0x7e)]});if(!_0x412370['ok'])return null;const _0x163ac8=await _0x412370[_0x16fec9(0x76)]();return normalizeCliVersionPolicy(_0x163ac8);}catch{return null;}finally{clearTimeout(_0x467f15);}}let cachedPolicy=null,cacheTime=0x0,hasCachedPolicy=![];function a189_0x25fd(_0x50de5e,_0x114ecf){_0x50de5e=_0x50de5e-0x72;const _0xcbe0c0=a189_0xcbe0();let _0x25fd83=_0xcbe0c0[_0x50de5e];return _0x25fd83;}export async function getCliVersionPolicy(){const _0x1d5c9f=a189_0x25fd,_0x17ac5c=Date[_0x1d5c9f(0x81)]();if(hasCachedPolicy){const _0x38c590=cachedPolicy?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x17ac5c-cacheTime<_0x38c590)return cachedPolicy;}const _0x1ca162=await fetchCliVersionPolicy();return cachedPolicy=_0x1ca162,cacheTime=_0x17ac5c,hasCachedPolicy=!![],_0x1ca162;}export function clearCliVersionPolicyCache(){cachedPolicy=null,cacheTime=0x0,hasCachedPolicy=![];}
|
package/lib/utils/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5261c3,_0x2ac356){const _0x7c6c12=a190_0x46bc,_0x346202=_0x5261c3();while(!![]){try{const _0x121965=-parseInt(_0x7c6c12(0x1ae))/0x1+-parseInt(_0x7c6c12(0x1ab))/0x2*(-parseInt(_0x7c6c12(0x1a4))/0x3)+-parseInt(_0x7c6c12(0x1ac))/0x4*(parseInt(_0x7c6c12(0x1aa))/0x5)+parseInt(_0x7c6c12(0x1a9))/0x6*(-parseInt(_0x7c6c12(0x1ad))/0x7)+-parseInt(_0x7c6c12(0x1a6))/0x8+parseInt(_0x7c6c12(0x1a3))/0x9*(-parseInt(_0x7c6c12(0x1a8))/0xa)+parseInt(_0x7c6c12(0x1a7))/0xb;if(_0x121965===_0x2ac356)break;else _0x346202['push'](_0x346202['shift']());}catch(_0x4ab21f){_0x346202['push'](_0x346202['shift']());}}}(a190_0x1230,0x81be7));import{initEnv}from'../constant/env.js';import{readRawConfig,getConfigAppCode as a190_0xf7bdc7,getMultiAppConfigs as a190_0x39b880,getTemplateBaseUrl as a190_0x259b6b}from'../context.js';export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';export{isInProject}from'../context.js';export function readConfig(_0x38006f){const _0x40ca20=a190_0x46bc,_0x22ce8a=readRawConfig(_0x38006f);return _0x22ce8a[_0x40ca20(0x1a5)]&&typeof _0x22ce8a[_0x40ca20(0x1a5)]===_0x40ca20(0x1af)&&initEnv(_0x22ce8a[_0x40ca20(0x1a5)]),_0x22ce8a;}export function getConfigAppCode(){return a190_0xf7bdc7();}function a190_0x46bc(_0x1b4709,_0x24096b){_0x1b4709=_0x1b4709-0x1a3;const _0x1230eb=a190_0x1230();let _0x46bc1a=_0x1230eb[_0x1b4709];return _0x46bc1a;}export function getMultiAppConfigs(_0x431df5='project'){return a190_0x39b880(_0x431df5);}function a190_0x1230(){const _0x18d3ee=['1982533AHSVGA','477836afyNnQ','string','45xstlXJ','3141TQqpRX','env','930784kqhIzU','10740818VnkDUw','610960QlbMqR','6DRYfad','723725wcpWwF','1686nfhbJj','4rUGNLC'];a190_0x1230=function(){return _0x18d3ee;};return a190_0x1230();}export function getTemplateBaseUrl(){return a190_0x259b6b();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a191_0x506f(){const _0x1309fb=['readdirSync','1417514CvDkVR','8073630EDhBSm','copyFileSync','21626796ZUGWoy','356396zrkoed','12wSwPkL','mkdirSync','6hwuBjH','1860336xYNBMG','13mkHzzd','40LuPMPX','isDirectory','11CiEulL','join','342628GWnRnu','error','415NoePfK','复制目录时出错:','4552DcMQRU','name'];a191_0x506f=function(){return _0x1309fb;};return a191_0x506f();}function a191_0x589b(_0x2380d3,_0x5b4e39){_0x2380d3=_0x2380d3-0x15b;const _0x506f18=a191_0x506f();let _0x589bab=_0x506f18[_0x2380d3];return _0x589bab;}(function(_0x59c184,_0x502393){const _0x353efe=a191_0x589b,_0x307884=_0x59c184();while(!![]){try{const _0x2768ba=-parseInt(_0x353efe(0x16e))/0x1+parseInt(_0x353efe(0x163))/0x2*(-parseInt(_0x353efe(0x16f))/0x3)+parseInt(_0x353efe(0x167))/0x4*(-parseInt(_0x353efe(0x165))/0x5)+parseInt(_0x353efe(0x15c))/0x6*(parseInt(_0x353efe(0x16a))/0x7)+parseInt(_0x353efe(0x15f))/0x8*(-parseInt(_0x353efe(0x15d))/0x9)+parseInt(_0x353efe(0x16b))/0xa*(parseInt(_0x353efe(0x161))/0xb)+parseInt(_0x353efe(0x16d))/0xc*(parseInt(_0x353efe(0x15e))/0xd);if(_0x2768ba===_0x502393)break;else _0x307884['push'](_0x307884['shift']());}catch(_0x643634){_0x307884['push'](_0x307884['shift']());}}}(a191_0x506f,0x9cda8));import a191_0x257760 from'node:path';import a191_0x5275b7 from'node:fs';export async function copyDirectory(_0x4d5f91,_0x4769c9){const _0x3316fb=a191_0x589b;try{const _0x270407=a191_0x5275b7[_0x3316fb(0x169)](_0x4d5f91,{'withFileTypes':!![]});a191_0x5275b7[_0x3316fb(0x15b)](_0x4769c9,{'recursive':!![]});for(const _0x4adbff of _0x270407){const _0xa35228=a191_0x257760[_0x3316fb(0x162)](_0x4d5f91,_0x4adbff[_0x3316fb(0x168)]),_0x42f8b1=a191_0x257760[_0x3316fb(0x162)](_0x4769c9,_0x4adbff[_0x3316fb(0x168)]);_0x4adbff[_0x3316fb(0x160)]()?await copyDirectory(_0xa35228,_0x42f8b1):a191_0x5275b7[_0x3316fb(0x16c)](_0xa35228,_0x42f8b1);}}catch(_0x43bfa5){console[_0x3316fb(0x164)](_0x3316fb(0x166),_0x43bfa5);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2230e7,_0x339d96){const _0x2a91c2=a192_0x4505,_0x56d01c=_0x2230e7();while(!![]){try{const _0x5afcda=parseInt(_0x2a91c2(0x15c))/0x1*(parseInt(_0x2a91c2(0x15e))/0x2)+-parseInt(_0x2a91c2(0x157))/0x3+-parseInt(_0x2a91c2(0x158))/0x4+-parseInt(_0x2a91c2(0x160))/0x5*(-parseInt(_0x2a91c2(0x15b))/0x6)+parseInt(_0x2a91c2(0x15d))/0x7+parseInt(_0x2a91c2(0x15f))/0x8+-parseInt(_0x2a91c2(0x159))/0x9;if(_0x5afcda===_0x339d96)break;else _0x56d01c['push'](_0x56d01c['shift']());}catch(_0x519481){_0x56d01c['push'](_0x56d01c['shift']());}}}(a192_0x22a2,0xe1ed0));function toFiniteNumber(_0x28ff2a){const _0x254159=a192_0x4505;if(typeof _0x28ff2a===_0x254159(0x161)&&Number['isFinite'](_0x28ff2a))return _0x28ff2a;if(typeof _0x28ff2a==='string'){const _0x53b7ef=_0x28ff2a[_0x254159(0x15a)]();if(!_0x53b7ef)return undefined;const _0xdb3e2f=Number(_0x53b7ef);if(Number['isFinite'](_0xdb3e2f))return _0xdb3e2f;}return undefined;}function a192_0x22a2(){const _0x2508a3=['24443649AdPyzm','trim','4308108vGYaEz','942389zQdBAe','7659778ULWVjR','2BqQQCT','7268392vPnZFw','10rQVNYt','number','2051427SJoOCJ','224264tJAjma'];a192_0x22a2=function(){return _0x2508a3;};return a192_0x22a2();}function a192_0x4505(_0x33a3c5,_0x2dd304){_0x33a3c5=_0x33a3c5-0x157;const _0x22a21a=a192_0x22a2();let _0x4505ce=_0x22a21a[_0x33a3c5];return _0x4505ce;}export function normalizeEntityWithIdResponse(_0x459cfa){const _0x7cf8d4=toFiniteNumber(_0x459cfa);if(_0x7cf8d4!==undefined)return{'id':_0x7cf8d4,'entity':{'id':_0x7cf8d4}};if(!_0x459cfa||typeof _0x459cfa!=='object')return{'id':undefined,'entity':{}};const _0x286874={..._0x459cfa},_0x20d5c5=toFiniteNumber(_0x286874['id']);return _0x20d5c5!==undefined&&(_0x286874['id']=_0x20d5c5),{'id':_0x20d5c5,'entity':_0x286874};}
|
package/lib/utils/file-utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xf9e3b2,_0x41ba79){const _0x5bdda0=a193_0x85fc,_0x563857=_0xf9e3b2();while(!![]){try{const _0x3dd934=parseInt(_0x5bdda0(0x1dc))/0x1*(parseInt(_0x5bdda0(0x1df))/0x2)+-parseInt(_0x5bdda0(0x1d8))/0x3*(parseInt(_0x5bdda0(0x1db))/0x4)+-parseInt(_0x5bdda0(0x1d5))/0x5+parseInt(_0x5bdda0(0x1d6))/0x6+-parseInt(_0x5bdda0(0x1d9))/0x7*(parseInt(_0x5bdda0(0x1de))/0x8)+-parseInt(_0x5bdda0(0x1d7))/0x9+-parseInt(_0x5bdda0(0x1da))/0xa*(-parseInt(_0x5bdda0(0x1dd))/0xb);if(_0x3dd934===_0x41ba79)break;else _0x563857['push'](_0x563857['shift']());}catch(_0x584524){_0x563857['push'](_0x563857['shift']());}}}(a193_0x6284,0x7c3e6));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';function a193_0x85fc(_0x317d5e,_0x4be8f3){_0x317d5e=_0x317d5e-0x1d5;const _0x62842e=a193_0x6284();let _0x85fc6=_0x62842e[_0x317d5e];return _0x85fc6;}export async function copyDir(_0x3ac7e0,_0x45d8b2){const _0x155c86=statSync(_0x3ac7e0);if(_0x155c86['isDirectory']()){!existsSync(_0x45d8b2)&&mkdirSync(_0x45d8b2,{'recursive':!![]});const _0xa7fe68=readdirSync(_0x3ac7e0);for(const _0x109975 of _0xa7fe68){await copyDir(join(_0x3ac7e0,_0x109975),join(_0x45d8b2,_0x109975));}}else copyFileSync(_0x3ac7e0,_0x45d8b2);}function a193_0x6284(){const _0x5239a2=['1571870dWrlEr','4699290gpuroc','4622166DdpsOo','1232244AuhRFk','1158XGPyjw','6493249qZOeFI','6310LstMQN','4632AGstaP','1LOYQWG','24475zqGbxK','8RQzZyf'];a193_0x6284=function(){return _0x5239a2;};return a193_0x6284();}export function ensureDir(_0x51b1f9){!existsSync(_0x51b1f9)&&mkdirSync(_0x51b1f9,{'recursive':!![]});}export function pathExists(_0x554f46){return existsSync(_0x554f46);}
|
package/lib/utils/guides-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a194_0xe96d0d=a194_0x5776;(function(_0x14e3ac,_0x571433){const _0x262f9f=a194_0x5776,_0x267d69=_0x14e3ac();while(!![]){try{const _0x592d57=parseInt(_0x262f9f(0x153))/0x1*(parseInt(_0x262f9f(0x156))/0x2)+-parseInt(_0x262f9f(0x16d))/0x3*(parseInt(_0x262f9f(0x16b))/0x4)+parseInt(_0x262f9f(0x14e))/0x5+parseInt(_0x262f9f(0x16c))/0x6*(-parseInt(_0x262f9f(0x165))/0x7)+-parseInt(_0x262f9f(0x14f))/0x8+-parseInt(_0x262f9f(0x14c))/0x9*(-parseInt(_0x262f9f(0x167))/0xa)+parseInt(_0x262f9f(0x15b))/0xb*(-parseInt(_0x262f9f(0x154))/0xc);if(_0x592d57===_0x571433)break;else _0x267d69['push'](_0x267d69['shift']());}catch(_0x20d6a8){_0x267d69['push'](_0x267d69['shift']());}}}(a194_0x4a8d,0xd65af));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 _0x3e242c=a194_0x5776,_0x2802ba=getTemplateBaseUrl();return _0x2802ba+_0x3e242c(0x160);}const CACHE_DIR=join(homedir(),'.lovrabet',a194_0xe96d0d(0x169));export async function fetchGuidesFromCDN(){const _0x1516ca=a194_0xe96d0d,_0x5d722b=getGuidesCdnUrl(),_0x31fee0=await fetch(_0x5d722b,{'headers':{'Accept':_0x1516ca(0x161)}});if(!_0x31fee0['ok'])throw new Error(_0x1516ca(0x148)+_0x31fee0['status']+'\x20'+_0x31fee0['statusText']);const _0x33b41a=await _0x31fee0[_0x1516ca(0x15f)]();if(!_0x33b41a['guides']||typeof _0x33b41a[_0x1516ca(0x159)]!==_0x1516ca(0x152))throw new Error('CDN\x20返回数据格式错误');return _0x33b41a;}export function writeGuidesToProject(_0x35bb7f,_0x31ec5c,_0x53bb61=a194_0xe96d0d(0x162),_0x480672){const _0x58f0bc=a194_0xe96d0d,_0x42989d=join(_0x31ec5c,_0x53bb61);mkdirSync(_0x42989d,{'recursive':!![]});for(const [_0x1db66b,_0xa4688d]of Object[_0x58f0bc(0x14b)](_0x35bb7f[_0x58f0bc(0x159)])){let _0x1a0058=_0xa4688d[_0x58f0bc(0x155)];_0xa4688d[_0x58f0bc(0x150)]&&(_0x1a0058=appendUpdateTime(_0x1a0058,_0xa4688d[_0x58f0bc(0x150)])),writeFileSync(join(_0x42989d,_0x1db66b+_0x58f0bc(0x168)),_0x1a0058,_0x58f0bc(0x14d));}}export function appendUpdateTime(_0x3a3606,_0x3c418c){const _0x196cc2=a194_0xe96d0d;return _0x3a3606=_0x3a3606['replace'](/\n*>更新时间:.*$/m,''),_0x3a3606[_0x196cc2(0x151)]()+(_0x196cc2(0x149)+_0x3c418c);}export function getSkillTemplate(_0x31504e){const _0x4565e8=a194_0xe96d0d;return _0x31504e[_0x4565e8(0x15c)]?.[_0x4565e8(0x155)]||'';}export function appendExtendContents(_0x4f2280,_0x20e074,_0x463974){const _0x44e664=a194_0xe96d0d,_0x2fa831=[];for(const [,_0x28f6c6]of Object[_0x44e664(0x14b)](_0x20e074[_0x44e664(0x159)])){_0x28f6c6[_0x44e664(0x15a)]&&_0x2fa831[_0x44e664(0x166)](_0x28f6c6['extendContent']['trimEnd']());}if(_0x2fa831[_0x44e664(0x163)]===0x0)return _0x4f2280;return _0x4f2280[_0x44e664(0x151)]()+'\x0a\x0a'+_0x2fa831[_0x44e664(0x158)]('\x0a\x0a')+'\x0a';}function a194_0x4a8d(){const _0x4d45f6=['title','path','json','/skills/guides.json','application/json','.lovrabet/skill/guides','length','replace','35moyzQX','push','2470LCTglW','.md','cache','CDN\x20数据中缺少\x20skillTemplate','386216vvyLnj','442230sTdDAt','3LSarNq','CDN\x20请求失败:\x20','\x0a\x0a>更新时间:','keys','entries','55359PSyFtI','utf-8','3066140sAoIGO','4211144kYXSVK','lastUpdated','trimEnd','object','1GGPTJi','139968mdnulX','content','2366564HQpyEc','map','join','guides','extendContent','1364tRHzhf','skillTemplate'];a194_0x4a8d=function(){return _0x4d45f6;};return a194_0x4a8d();}function a194_0x5776(_0x3ffe5f,_0x26d172){_0x3ffe5f=_0x3ffe5f-0x148;const _0x4a8d33=a194_0x4a8d();let _0x57767b=_0x4a8d33[_0x3ffe5f];return _0x57767b;}export function writeSkillFile(_0x1574ee,_0x1c3466,_0x258583){const _0x39cef6=a194_0xe96d0d,_0x454f6c=getSkillTemplate(_0x1574ee);if(!_0x454f6c)throw new Error(_0x39cef6(0x16a));const _0x484907=dirname(_0x1c3466);mkdirSync(_0x484907,{'recursive':!![]});let _0x1fc110=_0x454f6c[_0x39cef6(0x164)](/\{\{IDE_NAME\}\}/g,_0x258583);_0x1fc110=appendExtendContents(_0x1fc110,_0x1574ee),_0x1574ee[_0x39cef6(0x15c)][_0x39cef6(0x150)]&&(_0x1fc110=appendUpdateTime(_0x1fc110,_0x1574ee[_0x39cef6(0x15c)][_0x39cef6(0x150)])),writeFileSync(_0x1c3466,_0x1fc110,'utf-8');}export async function installGuides(_0x189937){const _0x3c7d7e=a194_0xe96d0d,_0x156075=await fetchGuidesFromCDN();return writeGuidesToProject(_0x156075,_0x189937),Object[_0x3c7d7e(0x14a)](_0x156075['guides'])[_0x3c7d7e(0x163)];}export function getGuidesSummary(_0x2ea09b){const _0x4c0457=a194_0xe96d0d;return Object['entries'](_0x2ea09b[_0x4c0457(0x159)])[_0x4c0457(0x157)](([_0x3382c5,_0x12afea])=>({'key':_0x3382c5,'title':_0x12afea[_0x4c0457(0x15d)],'path':_0x12afea[_0x4c0457(0x15e)]}));}
|
package/lib/utils/http-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x33370b,_0x2c97c0){const _0x39d8bf=a195_0xde09,_0xee3ce5=_0x33370b();while(!![]){try{const _0x2247a2=parseInt(_0x39d8bf(0x169))/0x1+-parseInt(_0x39d8bf(0x156))/0x2+-parseInt(_0x39d8bf(0x16d))/0x3+-parseInt(_0x39d8bf(0x164))/0x4+parseInt(_0x39d8bf(0x166))/0x5*(-parseInt(_0x39d8bf(0x168))/0x6)+parseInt(_0x39d8bf(0x161))/0x7*(parseInt(_0x39d8bf(0x15a))/0x8)+parseInt(_0x39d8bf(0x162))/0x9;if(_0x2247a2===_0x2c97c0)break;else _0xee3ce5['push'](_0xee3ce5['shift']());}catch(_0x34d433){_0xee3ce5['push'](_0xee3ce5['shift']());}}}(a195_0x28c0,0xeec4d));export async function httpRequest(_0x518eff,_0x277b8f={}){const _0xdaae9d=a195_0xde09,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x277b8f;let _0x430b15=null;for(let _0xdd0891=0x0;_0xdd0891<=retries;_0xdd0891++){try{const _0x57db80=new AbortController(),_0x1cade1=setTimeout(()=>_0x57db80[_0xdaae9d(0x167)](),timeout),_0x3e41fd=await fetch(_0x518eff,{'headers':headers,'signal':_0x57db80[_0xdaae9d(0x15c)]});clearTimeout(_0x1cade1);let _0x43748e;const _0x42b83c=_0x3e41fd[_0xdaae9d(0x165)][_0xdaae9d(0x163)](_0xdaae9d(0x15e));return _0x42b83c?.['includes'](_0xdaae9d(0x16c))?_0x43748e=await _0x3e41fd[_0xdaae9d(0x15b)]():_0x43748e=await _0x3e41fd[_0xdaae9d(0x16a)](),{'ok':_0x3e41fd['ok'],'status':_0x3e41fd['status'],'statusText':_0x3e41fd[_0xdaae9d(0x16e)],'data':_0x43748e,'headers':_0x3e41fd[_0xdaae9d(0x165)],'url':_0x3e41fd[_0xdaae9d(0x15f)],'text':()=>_0x3e41fd['text']()};}catch(_0x1e8c5d){_0x430b15=_0x1e8c5d instanceof Error?_0x1e8c5d:new Error(String(_0x1e8c5d));if(_0xdd0891===retries)break;if(shouldRetry(_0x1e8c5d)){console['log'](_0xdaae9d(0x16b)+retryDelay+'ms\x20后进行第\x20'+(_0xdd0891+0x1)+_0xdaae9d(0x159)),await sleep(retryDelay);continue;}else break;}}throw _0x430b15||new Error('Request\x20failed');}function a195_0x28c0(){const _0x37898f=['abort','138gzTuyB','394571eNssSM','text','*\x20请求失败,','application/json','5581959hjAlWF','statusText','3158724mhzrCu','ENOTFOUND','TypeError','\x20次重试...','8ItygEP','json','signal','includes','content-type','url','message','6310374rvwQyR','29670768DxqKKX','get','114696WZSTqO','headers','31765CLnjRX'];a195_0x28c0=function(){return _0x37898f;};return a195_0x28c0();}function shouldRetry(_0x50635d){const _0x50a1f4=a195_0xde09;if(_0x50635d instanceof Error){if(_0x50635d['name']==='AbortError')return![];if(_0x50635d['name']===_0x50a1f4(0x158)&&_0x50635d['message'][_0x50a1f4(0x15d)]('fetch'))return!![];if(_0x50635d[_0x50a1f4(0x160)]['includes']('ECONNRESET'))return!![];if(_0x50635d['message']['includes'](_0x50a1f4(0x157)))return![];}return![];}function sleep(_0x49ace6){return new Promise(_0x45ad9f=>setTimeout(_0x45ad9f,_0x49ace6));}function a195_0xde09(_0x1be648,_0x307238){_0x1be648=_0x1be648-0x156;const _0x28c055=a195_0x28c0();let _0xde0926=_0x28c055[_0x1be648];return _0xde0926;}export function validateUrl(_0x41de1c){try{return new URL(_0x41de1c),!![];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5d9092,_0x33bd51){const _0x3b0cea=a196_0x45dd,_0x22ae4b=_0x5d9092();while(!![]){try{const _0x29b8a6=-parseInt(_0x3b0cea(0xd6))/0x1*(parseInt(_0x3b0cea(0xd9))/0x2)+-parseInt(_0x3b0cea(0xdf))/0x3+parseInt(_0x3b0cea(0xdd))/0x4*(-parseInt(_0x3b0cea(0xdc))/0x5)+parseInt(_0x3b0cea(0xdb))/0x6+-parseInt(_0x3b0cea(0xd8))/0x7+-parseInt(_0x3b0cea(0xde))/0x8+parseInt(_0x3b0cea(0xd4))/0x9;if(_0x29b8a6===_0x33bd51)break;else _0x22ae4b['push'](_0x22ae4b['shift']());}catch(_0x563a34){_0x22ae4b['push'](_0x22ae4b['shift']());}}}(a196_0x2c6e,0xa7987));function a196_0x2c6e(){const _0x34ca88=['139DrsZgv','isRaw','6699105GlOgTD','13946ZhkBkg','isTTY','8105034YXxWgR','5aADLOJ','4415316PjqaXG','5798000yvotHp','3447105tBNmUC','stdin','setRawMode','nonInteractive','38155572EJSOLB','stdout'];a196_0x2c6e=function(){return _0x34ca88;};return a196_0x2c6e();}function env(_0x26e50a){return process.env[`RABETBASE_${_0x26e50a}`]||process.env[`LOVRABET_${_0x26e50a}`]||undefined;}function a196_0x45dd(_0x5a8fa1,_0x9b97fa){_0x5a8fa1=_0x5a8fa1-0xd4;const _0x2c6e01=a196_0x2c6e();let _0x45ddb8=_0x2c6e01[_0x5a8fa1];return _0x45ddb8;}export function isNonInteractive(_0x40d552){const _0x4c49a7=a196_0x45dd;return!!(_0x40d552[_0x4c49a7(0xe2)]||_0x40d552['ci']||env('CI')==='true'||process.env.CI==='true'||!process[_0x4c49a7(0xd5)][_0x4c49a7(0xda)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x1a53d5=a196_0x45dd;if(!process[_0x1a53d5(0xe0)][_0x1a53d5(0xda)])return![];try{const _0x3d8c11=process[_0x1a53d5(0xe0)][_0x1a53d5(0xd7)];return process[_0x1a53d5(0xe0)][_0x1a53d5(0xe1)](!![]),process[_0x1a53d5(0xe0)][_0x1a53d5(0xe1)](_0x3d8c11??![]),!![];}catch{return![];}}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a197_0x3ea21d=a197_0x1628;(function(_0x2c98d7,_0x82e82c){const _0x1e289d=a197_0x1628,_0xff7a89=_0x2c98d7();while(!![]){try{const _0x107c0c=-parseInt(_0x1e289d(0x12b))/0x1+-parseInt(_0x1e289d(0x127))/0x2*(-parseInt(_0x1e289d(0x150))/0x3)+parseInt(_0x1e289d(0x121))/0x4+-parseInt(_0x1e289d(0x122))/0x5+-parseInt(_0x1e289d(0x13e))/0x6+parseInt(_0x1e289d(0x140))/0x7*(-parseInt(_0x1e289d(0x14e))/0x8)+parseInt(_0x1e289d(0x13a))/0x9;if(_0x107c0c===_0x82e82c)break;else _0xff7a89['push'](_0xff7a89['shift']());}catch(_0x1b0a08){_0xff7a89['push'](_0xff7a89['shift']());}}}(a197_0x5245,0x99c86));function a197_0x5245(){const _0xb7342e=['createLogger','1535744ooCaYh','683530ZCAjVC','dirname','utf8','logTask','clear','4IkNNVL','red','currentRawCommand','失败:\x20','362509JsOLCI','duration','errors','writeFileSync','success','trim','now','timestamp','.lovrabet.log','map','printf','mkdirSync','winstonLogger','combine','parse','2745144ypSxmS','Failed\x20to\x20clear\x20logs:','message','readLogs','424578woJyej','rawCommand','122822iOSyOb','unknown','setLogPath','完成:\x20','join','开始执行:\x20','format','blue','transports','initWinstonLogger','addColors','getWinstonInstance','warn','green','264upRBgL','yellow','1634907UKKnLv','log','error','filter','existsSync','logFilePath','readFileSync','setRawCommand','File','info','toISOString'];a197_0x5245=function(){return _0xb7342e;};return a197_0x5245();}import a197_0xacef9 from'winston';import a197_0x1e5c04 from'node:fs';function a197_0x1628(_0x2592e1,_0x3c0ecb){_0x2592e1=_0x2592e1-0x11f;const _0x524506=a197_0x5245();let _0x1628f0=_0x524506[_0x2592e1];return _0x1628f0;}import a197_0x16d099 from'node:path';class Logger{['winstonLogger'];[a197_0x3ea21d(0x155)];[a197_0x3ea21d(0x129)]='';constructor(){const _0x5525a7=a197_0x3ea21d;this[_0x5525a7(0x155)]='';}[a197_0x3ea21d(0x157)](_0xd1afea){this['currentRawCommand']=_0xd1afea;}[a197_0x3ea21d(0x149)](){const _0x40f650=a197_0x3ea21d,_0x5b9f17=a197_0x16d099[_0x40f650(0x123)](this[_0x40f650(0x155)]);!a197_0x1e5c04[_0x40f650(0x154)](_0x5b9f17)&&a197_0x1e5c04[_0x40f650(0x136)](_0x5b9f17,{'recursive':!![]});const _0x568673=a197_0xacef9['format'][_0x40f650(0x138)](a197_0xacef9[_0x40f650(0x146)][_0x40f650(0x132)](),a197_0xacef9[_0x40f650(0x146)][_0x40f650(0x12d)]({'stack':!![]}),a197_0xacef9[_0x40f650(0x146)][_0x40f650(0x135)](_0x1c3428=>{const _0x312e1d=_0x40f650,_0x3c6d6d={'timestamp':_0x1c3428[_0x312e1d(0x132)]||new Date()[_0x312e1d(0x11f)](),'level':_0x1c3428['level']||_0x312e1d(0x159),'command':_0x1c3428['command']||_0x312e1d(0x141),'rawCommand':_0x1c3428[_0x312e1d(0x13f)]||this['currentRawCommand']||undefined,'message':_0x1c3428[_0x312e1d(0x13c)]||'','duration':_0x1c3428[_0x312e1d(0x12c)]||undefined,'details':_0x1c3428['details']||undefined};return JSON['stringify'](_0x3c6d6d);}));this[_0x40f650(0x137)]=a197_0xacef9[_0x40f650(0x120)]({'level':_0x40f650(0x159),'format':_0x568673,'transports':[new a197_0xacef9[(_0x40f650(0x148))][(_0x40f650(0x158))]({'filename':this[_0x40f650(0x155)],'level':_0x40f650(0x159)})],'silent':![]}),a197_0xacef9[_0x40f650(0x14a)]({'success':_0x40f650(0x14d),'error':_0x40f650(0x128),'warn':_0x40f650(0x14f),'info':_0x40f650(0x147)});}[a197_0x3ea21d(0x142)](_0x2486c5){const _0x566a5e=a197_0x3ea21d;this[_0x566a5e(0x155)]=a197_0x16d099[_0x566a5e(0x144)](_0x2486c5,_0x566a5e(0x133)),this[_0x566a5e(0x137)]&&this[_0x566a5e(0x137)][_0x566a5e(0x126)](),this[_0x566a5e(0x149)]();}[a197_0x3ea21d(0x159)](_0x923814,_0x46f17b,_0x5a39d9){const _0x37c19b=a197_0x3ea21d;if(!this[_0x37c19b(0x155)]||!this['winstonLogger'])return;this[_0x37c19b(0x137)][_0x37c19b(0x159)](_0x46f17b,{'command':_0x923814,'details':_0x5a39d9});}['success'](_0x5ca82c,_0x4a0f9f,_0x3b083a,_0x2facf7){const _0x447929=a197_0x3ea21d;if(!this[_0x447929(0x155)]||!this[_0x447929(0x137)])return;this[_0x447929(0x137)][_0x447929(0x151)]('info',_0x4a0f9f,{'level':_0x447929(0x12f),'command':_0x5ca82c,'duration':_0x3b083a,'details':_0x2facf7});}[a197_0x3ea21d(0x152)](_0x4d5c52,_0x163479,_0x4c0f7f){const _0x2bf056=a197_0x3ea21d;if(!this[_0x2bf056(0x155)]||!this[_0x2bf056(0x137)])return;this[_0x2bf056(0x137)]['error'](_0x163479,{'command':_0x4d5c52,'details':_0x4c0f7f});}[a197_0x3ea21d(0x14c)](_0x90bb72,_0x3df179,_0x598709){const _0x4e9670=a197_0x3ea21d;if(!this[_0x4e9670(0x155)]||!this['winstonLogger'])return;this[_0x4e9670(0x137)][_0x4e9670(0x14c)](_0x3df179,{'command':_0x90bb72,'details':_0x598709});}async[a197_0x3ea21d(0x125)](_0x4d76d1,_0x1d9cf9,_0x1649b5){const _0x39bf3f=a197_0x3ea21d,_0xa630f0=Date[_0x39bf3f(0x131)]();this[_0x39bf3f(0x159)](_0x4d76d1,_0x39bf3f(0x145)+_0x1d9cf9);try{const _0x32bdfb=await _0x1649b5(),_0x259936=Date[_0x39bf3f(0x131)]()-_0xa630f0;return this[_0x39bf3f(0x12f)](_0x4d76d1,_0x39bf3f(0x143)+_0x1d9cf9,_0x259936),_0x32bdfb;}catch(_0x1d79c3){const _0x338f4f=Date[_0x39bf3f(0x131)]()-_0xa630f0;this['error'](_0x4d76d1,_0x39bf3f(0x12a)+_0x1d9cf9,{'error':_0x1d79c3 instanceof Error?_0x1d79c3[_0x39bf3f(0x13c)]:String(_0x1d79c3),'duration':_0x338f4f});throw _0x1d79c3;}}[a197_0x3ea21d(0x13d)](){const _0x3f0740=a197_0x3ea21d;try{if(!a197_0x1e5c04[_0x3f0740(0x154)](this[_0x3f0740(0x155)]))return[];const _0x331486=a197_0x1e5c04[_0x3f0740(0x156)](this[_0x3f0740(0x155)],_0x3f0740(0x124));return _0x331486['split']('\x0a')[_0x3f0740(0x153)](_0x37c46d=>_0x37c46d[_0x3f0740(0x130)]())[_0x3f0740(0x134)](_0x262e30=>JSON[_0x3f0740(0x139)](_0x262e30));}catch(_0x2cf590){return console['warn']('Failed\x20to\x20read\x20logs:',_0x2cf590),[];}}['clearLogs'](){const _0x287f4d=a197_0x3ea21d;try{a197_0x1e5c04[_0x287f4d(0x154)](this['logFilePath'])&&a197_0x1e5c04[_0x287f4d(0x12e)](this[_0x287f4d(0x155)],'',_0x287f4d(0x124));}catch(_0xc333f){console[_0x287f4d(0x14c)](_0x287f4d(0x13b),_0xc333f);}}[a197_0x3ea21d(0x14b)](){const _0x42c63c=a197_0x3ea21d;return this[_0x42c63c(0x137)];}}export const logger=new Logger();
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a198_0x1277(){const _0x32dbaf=['1597236hwSHoV','3618755RejcWZ','920898firLgd','object','14060556yloJvY','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','2561545zaiIxS','parse','5051152nnFjcx','170415ONRIkx','6EoYdXv','validation','6UxjzEE','Invalid\x20JSON\x20for\x20--params:\x20'];a198_0x1277=function(){return _0x32dbaf;};return a198_0x1277();}(function(_0x472335,_0x27edee){const _0x53e6dd=a198_0xa965,_0x4d381b=_0x472335();while(!![]){try{const _0x241e7a=-parseInt(_0x53e6dd(0xa7))/0x1+parseInt(_0x53e6dd(0xa0))/0x2+parseInt(_0x53e6dd(0xaa))/0x3*(-parseInt(_0x53e6dd(0xac))/0x4)+-parseInt(_0x53e6dd(0xa4))/0x5+-parseInt(_0x53e6dd(0xa8))/0x6*(-parseInt(_0x53e6dd(0x9f))/0x7)+-parseInt(_0x53e6dd(0xa6))/0x8+parseInt(_0x53e6dd(0xa2))/0x9;if(_0x241e7a===_0x27edee)break;else _0x4d381b['push'](_0x4d381b['shift']());}catch(_0x543f50){_0x4d381b['push'](_0x4d381b['shift']());}}}(a198_0x1277,0x683d2));import{CliErrors}from'../errors.js';function a198_0xa965(_0x242c08,_0x24863b){_0x242c08=_0x242c08-0x9f;const _0x127734=a198_0x1277();let _0xa965e4=_0x127734[_0x242c08];return _0xa965e4;}export function parseJsonParams(_0x44e10f){const _0x1e5bc9=a198_0xa965;if(!_0x44e10f)return undefined;let _0x4ffbe3;try{_0x4ffbe3=JSON[_0x1e5bc9(0xa5)](_0x44e10f);}catch{throw CliErrors[_0x1e5bc9(0xa9)](_0x1e5bc9(0xab)+_0x44e10f);}if(!_0x4ffbe3||typeof _0x4ffbe3!==_0x1e5bc9(0xa1)||Array['isArray'](_0x4ffbe3))throw CliErrors[_0x1e5bc9(0xa9)]('--params\x20must\x20be\x20a\x20JSON\x20object',_0x1e5bc9(0xa3));return _0x4ffbe3;}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a199_0x161e54=a199_0x5763;(function(_0x466481,_0x2102d3){const _0x3855c=a199_0x5763,_0x1a1faa=_0x466481();while(!![]){try{const _0x57ebe4=-parseInt(_0x3855c(0x139))/0x1*(-parseInt(_0x3855c(0x13f))/0x2)+parseInt(_0x3855c(0x134))/0x3*(parseInt(_0x3855c(0x133))/0x4)+-parseInt(_0x3855c(0x13b))/0x5*(-parseInt(_0x3855c(0x13a))/0x6)+parseInt(_0x3855c(0x138))/0x7*(-parseInt(_0x3855c(0x132))/0x8)+-parseInt(_0x3855c(0x136))/0x9*(parseInt(_0x3855c(0x137))/0xa)+-parseInt(_0x3855c(0x131))/0xb*(parseInt(_0x3855c(0x13d))/0xc)+parseInt(_0x3855c(0x135))/0xd;if(_0x57ebe4===_0x2102d3)break;else _0x1a1faa['push'](_0x1a1faa['shift']());}catch(_0x308944){_0x1a1faa['push'](_0x1a1faa['shift']());}}}(a199_0x19f4,0x66c0c));export const isWindows=process[a199_0x161e54(0x13c)]===a199_0x161e54(0x13e);function a199_0x5763(_0x560357,_0x1e3fad){_0x560357=_0x560357-0x131;const _0x19f49e=a199_0x19f4();let _0x576329=_0x19f49e[_0x560357];return _0x576329;}export function resolveNpmBin(_0xc046b0){const _0x5891a7=a199_0x161e54;return isWindows?_0xc046b0+_0x5891a7(0x140):_0xc046b0;}function a199_0x19f4(){const _0x47ef43=['2WRBzod','.cmd','20834ZNRdug','176584tpcgnR','58624fgyleQ','42KZbWsf','14936532faOnxt','18rgyJNO','1550160vFdELn','217XHlcYV','128798LRXXas','38538FRwSGo','105wllBuC','platform','1284zVKCHx','win32'];a199_0x19f4=function(){return _0x47ef43;};return a199_0x19f4();}
|
package/lib/utils/rules-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a200_0x5f025a=a200_0x304b;(function(_0x437d18,_0x253420){const _0x39d7f1=a200_0x304b,_0x34d1c2=_0x437d18();while(!![]){try{const _0x2a71ea=parseInt(_0x39d7f1(0x1eb))/0x1*(-parseInt(_0x39d7f1(0x1ea))/0x2)+-parseInt(_0x39d7f1(0x1fb))/0x3+parseInt(_0x39d7f1(0x1e7))/0x4+-parseInt(_0x39d7f1(0x1f7))/0x5*(parseInt(_0x39d7f1(0x1f9))/0x6)+parseInt(_0x39d7f1(0x1ed))/0x7+-parseInt(_0x39d7f1(0x1fd))/0x8+-parseInt(_0x39d7f1(0x1ef))/0x9*(-parseInt(_0x39d7f1(0x1fc))/0xa);if(_0x2a71ea===_0x253420)break;else _0x34d1c2['push'](_0x34d1c2['shift']());}catch(_0x16eaa6){_0x34d1c2['push'](_0x34d1c2['shift']());}}}(a200_0x21c2,0x6b1a5));function a200_0x21c2(){const _0x325591=['.cursor/rules','22615HsKrDS','../../templates/rules/lovrabet_rules.mdc.tpl','1116OLLuyc','/rules/rules.json','1249014RbzJcT','6152680wEFasa','4876840XbyRVK','CDN\x20返回数据格式错误','status','1942032fZzKxI','content','statusText','628714IJCOWK','1KvvTqx','string','2022713cWQiNl','CDN\x20请求失败:\x20','27GfhjLk','agents.md','application/json','catch','lastUpdated','本地模板文件不存在:\x20','utf-8'];a200_0x21c2=function(){return _0x325591;};return a200_0x21c2();}import{existsSync,mkdirSync,readFileSync,writeFileSync}from'node:fs';import{dirname,join,resolve}from'node:path';function a200_0x304b(_0xff90a4,_0x1c6385){_0xff90a4=_0xff90a4-0x1e7;const _0x21c282=a200_0x21c2();let _0x304b48=_0x21c282[_0xff90a4];return _0x304b48;}import{fileURLToPath}from'node:url';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 _0x12773c=a200_0x304b,_0x144978=getTemplateBaseUrl();return _0x144978+_0x12773c(0x1fa);}const LOCAL_TEMPLATE_PATH=resolve(__dirname,a200_0x5f025a(0x1f8));export async function fetchRulesFromCDN(){const _0x3e3875=a200_0x5f025a,_0xb2f2eb=getRulesCdnUrl(),_0x2da1d8=await fetch(_0xb2f2eb,{'headers':{'Accept':_0x3e3875(0x1f1)}});if(!_0x2da1d8['ok'])throw new Error(_0x3e3875(0x1ee)+_0x2da1d8[_0x3e3875(0x1ff)]+'\x20'+_0x2da1d8[_0x3e3875(0x1e9)]);const _0x48fc72=await _0x2da1d8['json']();if(!_0x48fc72[_0x3e3875(0x1e8)]||typeof _0x48fc72[_0x3e3875(0x1e8)]!==_0x3e3875(0x1ec))throw new Error(_0x3e3875(0x1fe));return _0x48fc72;}export async function getRulesContent(){const _0x1b62fc=a200_0x5f025a;try{const _0x5ab326=await fetchRulesFromCDN();return _0x5ab326[_0x1b62fc(0x1e8)];}catch{return readLocalTemplate();}}export function readLocalTemplate(){const _0x323692=a200_0x5f025a;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,_0x323692(0x1f5));throw new Error(_0x323692(0x1f4)+LOCAL_TEMPLATE_PATH);}export async function writeRulesFile(_0x47599c){const _0x15a9d8=a200_0x5f025a,_0x247340=await fetchRulesFromCDN()[_0x15a9d8(0x1f2)](()=>null);let _0x4fe40d;_0x247340?(_0x4fe40d=_0x247340[_0x15a9d8(0x1e8)],_0x247340[_0x15a9d8(0x1f3)]&&(_0x4fe40d=appendUpdateTime(_0x4fe40d,_0x247340[_0x15a9d8(0x1f3)]))):_0x4fe40d=readLocalTemplate();const _0x4c7ab0=dirname(_0x47599c);!existsSync(_0x4c7ab0)&&mkdirSync(_0x4c7ab0,{'recursive':!![]}),writeFileSync(_0x47599c,_0x4fe40d,_0x15a9d8(0x1f5));}export async function copyRulesToCursor(_0x23cec3){const _0x2a5337=a200_0x5f025a,_0x4d108b=join(_0x23cec3,_0x2a5337(0x1f6)),_0x3319bb=join(_0x4d108b,'lovrabet_rules.mdc');if(existsSync(_0x3319bb))return![];return await writeRulesFile(_0x3319bb),!![];}export async function copyRulesToAgentsMd(_0x1eed90){const _0xfe0437=a200_0x5f025a,_0x89dfbf=join(_0x1eed90,_0xfe0437(0x1f0));if(existsSync(_0x89dfbf))return![];return await writeRulesFile(_0x89dfbf),!![];}
|
package/lib/utils/sleep.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function sleep(
|
|
1
|
+
export function sleep(_0x3951f4){return new Promise(_0xb5cab0=>setTimeout(_0xb5cab0,_0x3951f4));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a202_0x40f65c=a202_0x404b;(function(_0x3fd419,_0x168724){const _0x170f8c=a202_0x404b,_0x37ea8f=_0x3fd419();while(!![]){try{const _0x4f0e44=-parseInt(_0x170f8c(0x141))/0x1*(-parseInt(_0x170f8c(0x138))/0x2)+parseInt(_0x170f8c(0x143))/0x3*(-parseInt(_0x170f8c(0x12a))/0x4)+parseInt(_0x170f8c(0x115))/0x5*(parseInt(_0x170f8c(0x12f))/0x6)+-parseInt(_0x170f8c(0x149))/0x7+-parseInt(_0x170f8c(0x114))/0x8+parseInt(_0x170f8c(0x11f))/0x9*(-parseInt(_0x170f8c(0x129))/0xa)+parseInt(_0x170f8c(0x12b))/0xb;if(_0x4f0e44===_0x168724)break;else _0x37ea8f['push'](_0x37ea8f['shift']());}catch(_0x2c4a94){_0x37ea8f['push'](_0x37ea8f['shift']());}}}(a202_0x46f8,0x7ffb7));import a202_0x14a06b from'node:fs';function a202_0x46f8(){const _0x3f20fc=['pad','.css','pop','7794840BzNICw','150WfXtXE','toComponentName','tableName:\x20\x22','模板内容替换完成','模板内容替换失败','formatLocalTimestamp','replaceContent','.jsx','join','toUpperCase','9792RIiMCw','toLowerCase','success','isFile','replaceApiContent','getMinutes','.tpl','readdir','error','writeFile','4580QiwJoj','36edssrW','16552712clrSAV','.tsx','slice','getFullYear','178212HSZVUe','split','processFile','getDate','isDirectory','alias:\x20\x22','name:\x20\x22','message','processDirectory','1454JXQDRR','datasetCode','promises','\x20},','\x0a\x20\x20\x20\x20{\x20','YourModel','getHours','name','push','922dnwIDz','mkdir','190071DnEzYC','.ts','endsWith','datasetCode:\x20\x22','tableName','LOVRABET','3493413NVEjty','alias','.md','now','copyFile','template','api','getMonth','includes','map','charAt','processTemplate','default','toDisplayTitle','readFile','.json','replace'];a202_0x46f8=function(){return _0x3f20fc;};return a202_0x46f8();}import a202_0x27cde0 from'node:path';import{logger}from'../utils/logger.js';import{getCliVersion}from'../utils/version.js';function a202_0x404b(_0x737a95,_0x2b472e){_0x737a95=_0x737a95-0x10b;const _0x46f85f=a202_0x46f8();let _0x404b04=_0x46f85f[_0x737a95];return _0x404b04;}const CLI_VERSION=getCliVersion();export class TemplateReplacer{static[a202_0x40f65c(0x111)](_0x13bb0f){return String(_0x13bb0f)['padStart'](0x2,'0');}static[a202_0x40f65c(0x11a)](_0x4c9d6e){const _0xc1a493=a202_0x40f65c,_0x257453=_0x4c9d6e[_0xc1a493(0x12e)](),_0xf9a980=this['pad'](_0x4c9d6e[_0xc1a493(0x150)]()+0x1),_0x20168=this[_0xc1a493(0x111)](_0x4c9d6e[_0xc1a493(0x132)]()),_0x1b8e5d=this[_0xc1a493(0x111)](_0x4c9d6e[_0xc1a493(0x13e)]()),_0x34d452=this[_0xc1a493(0x111)](_0x4c9d6e[_0xc1a493(0x124)]()),_0x2de3b3=this['pad'](_0x4c9d6e['getSeconds']());return{'createdAt':_0x257453+'-'+_0xf9a980+'-'+_0x20168+'\x20'+_0x1b8e5d+':'+_0x34d452+':'+_0x2de3b3,'createdDate':_0x257453+'-'+_0xf9a980+'-'+_0x20168,'createdTime':_0x1b8e5d+':'+_0x34d452+':'+_0x2de3b3};}static['toComponentName'](_0x287c97){const _0x42c164=a202_0x40f65c,_0x544b0a=_0x287c97[_0x42c164(0x130)]('/')[_0x42c164(0x113)]()||_0x287c97;return _0x544b0a['split']('-')[_0x42c164(0x152)](_0x15875c=>_0x15875c['charAt'](0x0)[_0x42c164(0x11e)]()+_0x15875c[_0x42c164(0x12d)](0x1)[_0x42c164(0x120)]())[_0x42c164(0x11d)]('');}static[a202_0x40f65c(0x10d)](_0x285e24){const _0x598722=a202_0x40f65c,_0x2be9ee=_0x285e24[_0x598722(0x130)]('/')[_0x598722(0x113)]()||_0x285e24;return _0x2be9ee[_0x598722(0x130)]('-')[_0x598722(0x152)](_0xcbe8d9=>_0xcbe8d9[_0x598722(0x153)](0x0)[_0x598722(0x11e)]()+_0xcbe8d9[_0x598722(0x12d)](0x1)['toLowerCase']())['join']('\x20');}static[a202_0x40f65c(0x11b)](_0x3e99f8,_0x220455,_0xf57b21){const _0x4597c4=a202_0x40f65c,_0x375deb=this[_0x4597c4(0x116)](_0x220455),_0x3d5d47=this['toDisplayTitle'](_0x220455),{createdAt:_0x145ffa,createdDate:_0x32f997,createdTime:_0x5c86b5}=this[_0x4597c4(0x11a)](new Date());let _0x196dd2=_0x3e99f8['replace'](/\{CliVersion\}/g,CLI_VERSION)[_0x4597c4(0x110)](/\{ComponentName\}/g,_0x375deb)['replace'](/\{DisplayTitle\}/g,_0x3d5d47)[_0x4597c4(0x110)](/\{PageName\}/g,_0x220455)['replace'](/\{TemplateName\}/g,_0xf57b21)[_0x4597c4(0x110)](/\{CreatedAt\}/g,_0x145ffa)['replace'](/\{CreatedDate\}/g,_0x32f997)[_0x4597c4(0x110)](/\{CreatedTime\}/g,_0x5c86b5);return _0x196dd2;}static[a202_0x40f65c(0x123)](_0x25e038,_0x527301,_0x382ed7,_0x43d63b,_0x5b66a0,_0x24b685,_0x5c42ae,_0x7f62d2){const _0x53be24=a202_0x40f65c,_0x5f4ff1=new Date(),_0x277fd8=_0x5f4ff1['toISOString'](),_0x27fe68=_0x382ed7[_0x53be24(0x152)](_0xaaa8d5=>{const _0x37fa83=_0x53be24,_0x44b0e4=[_0x37fa83(0x146)+_0xaaa8d5[_0x37fa83(0x139)]+'\x22',_0x37fa83(0x117)+_0xaaa8d5[_0x37fa83(0x147)]+'\x22',_0x37fa83(0x135)+_0xaaa8d5[_0x37fa83(0x13f)]+'\x22'];return _0xaaa8d5[_0x37fa83(0x14a)]&&_0x44b0e4[_0x37fa83(0x140)](_0x37fa83(0x134)+_0xaaa8d5[_0x37fa83(0x14a)]+'\x22'),_0x37fa83(0x13c)+_0x44b0e4[_0x37fa83(0x11d)](',\x20')+_0x37fa83(0x13b);})[_0x53be24(0x11d)](''),_0x296c6e=_0x43d63b||_0x382ed7[0x0]?.[_0x53be24(0x14a)]||_0x53be24(0x13d);let _0x5f032c=_0x25e038['replace'](/\{AppCode\}/g,_0x527301)[_0x53be24(0x110)](/\{ModelConfigs\}/g,_0x27fe68)[_0x53be24(0x110)](/\{ExampleModelName\}/g,_0x296c6e)[_0x53be24(0x110)](/\{ApiFileName\}/g,_0x5b66a0||_0x53be24(0x14f))[_0x53be24(0x110)](/\{ConfigName\}/g,_0x24b685||_0x53be24(0x10c))[_0x53be24(0x110)](/\{ClientConfigParam\}/g,_0x5c42ae||'')[_0x53be24(0x110)](/\{VarPrefix\}/g,_0x7f62d2||_0x53be24(0x148))['replace'](/\{CreatedAt\}/g,_0x277fd8);return _0x5f032c;}static async[a202_0x40f65c(0x10b)](_0x147220,_0x3c8a8f,_0x36d193,_0x3af5db,_0x5987db=!![]){const _0x4e9df1=a202_0x40f65c,_0x3079d4=Date[_0x4e9df1(0x14c)]();try{_0x5987db&&logger['info'](_0x4e9df1(0x14e),'开始处理模板内容替换',{'templatePath':_0x147220,'targetPath':_0x3c8a8f,'pageName':_0x36d193,'templateName':_0x3af5db});await a202_0x14a06b[_0x4e9df1(0x13a)][_0x4e9df1(0x142)](_0x3c8a8f,{'recursive':!![]}),await this['processDirectory'](_0x147220,_0x3c8a8f,_0x36d193,_0x3af5db);if(_0x5987db){const _0x260ac9=Date[_0x4e9df1(0x14c)]()-_0x3079d4;logger[_0x4e9df1(0x121)](_0x4e9df1(0x14e),_0x4e9df1(0x118),_0x260ac9,{'pageName':_0x36d193,'templateName':_0x3af5db});}}catch(_0x421e4b){if(_0x5987db){const _0x43dc79=Date['now']()-_0x3079d4;logger[_0x4e9df1(0x127)](_0x4e9df1(0x14e),_0x4e9df1(0x119),{'templatePath':_0x147220,'targetPath':_0x3c8a8f,'pageName':_0x36d193,'templateName':_0x3af5db,'error':_0x421e4b instanceof Error?_0x421e4b[_0x4e9df1(0x136)]:String(_0x421e4b),'duration':_0x43dc79});}throw _0x421e4b;}}static async[a202_0x40f65c(0x137)](_0x14a68f,_0x49ed19,_0x2d1c78,_0x1af68d){const _0x3f4e4a=a202_0x40f65c,_0x14fd2d=await a202_0x14a06b[_0x3f4e4a(0x13a)][_0x3f4e4a(0x126)](_0x14a68f,{'withFileTypes':!![]});for(const _0x5d205d of _0x14fd2d){const _0x82049a=a202_0x27cde0[_0x3f4e4a(0x11d)](_0x14a68f,_0x5d205d[_0x3f4e4a(0x13f)]);let _0x46bb0c=a202_0x27cde0['join'](_0x49ed19,_0x5d205d[_0x3f4e4a(0x13f)]);_0x5d205d[_0x3f4e4a(0x13f)]['endsWith'](_0x3f4e4a(0x125))&&(_0x46bb0c=a202_0x27cde0['join'](_0x49ed19,_0x5d205d[_0x3f4e4a(0x13f)][_0x3f4e4a(0x110)](/\.tpl$/,'')));if(_0x5d205d[_0x3f4e4a(0x133)]())await a202_0x14a06b['promises'][_0x3f4e4a(0x142)](_0x46bb0c,{'recursive':!![]}),await this['processDirectory'](_0x82049a,_0x46bb0c,_0x2d1c78,_0x1af68d);else _0x5d205d[_0x3f4e4a(0x122)]()&&await this[_0x3f4e4a(0x131)](_0x82049a,_0x46bb0c,_0x2d1c78,_0x1af68d);}}static async[a202_0x40f65c(0x131)](_0x30877b,_0x9e72e2,_0x30b16f,_0x2aaf5a){const _0xb5bd7c=a202_0x40f65c,_0x1fe970=a202_0x27cde0['extname'](_0x30877b)[_0xb5bd7c(0x120)]();_0x30877b[_0xb5bd7c(0x145)](_0xb5bd7c(0x125))&&(_0x9e72e2=_0x9e72e2[_0xb5bd7c(0x110)](/\.tpl$/,''));const _0x584cf0=[_0xb5bd7c(0x12c),_0xb5bd7c(0x144),_0xb5bd7c(0x11c),'.js',_0xb5bd7c(0x10f),_0xb5bd7c(0x14b),_0xb5bd7c(0x112),'.scss',_0xb5bd7c(0x125)];if(_0x584cf0[_0xb5bd7c(0x151)](_0x1fe970)||_0x30877b[_0xb5bd7c(0x145)]('.tpl')){const _0x509d62=await a202_0x14a06b[_0xb5bd7c(0x13a)][_0xb5bd7c(0x10e)](_0x30877b,'utf8'),_0x149723=this[_0xb5bd7c(0x11b)](_0x509d62,_0x30b16f,_0x2aaf5a);await a202_0x14a06b[_0xb5bd7c(0x13a)][_0xb5bd7c(0x128)](_0x9e72e2,_0x149723,'utf8');}else await a202_0x14a06b[_0xb5bd7c(0x13a)][_0xb5bd7c(0x14d)](_0x30877b,_0x9e72e2);}}
|