@lovrabet/rabetbase-cli 2.3.7 → 2.3.8-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/update.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/init.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
package/lib/utils/ai_config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a226_0x5315(){const _0x5e4934=['trae','7146570FuRQxK','.cline/skills/lovrabet/SKILL.md','claude','5419796gqQXoL','913465HOlnxN','通用模板\x20-\x20兜底方案','codex','Cline\x20IDE','Windsurf','Antigravity\x20IDE','cursor','.claude','Qoder','.windsurf','6yRVKnr','CodeBuddy','Antigravity','5rLKGhS','Codex\x20IDE','.codex/skills/lovrabet/SKILL.md','.codebuddy/skills/lovrabet/SKILL.md','Trae','.claude/skills/lovrabet/SKILL.md','11iRchQf','Cline','4924926SxzjwP','cline','CodeBuddy\x20IDE','codebuddy','.windsurf/workflows/rabetbase.md','.cursor','Trae\x20IDE','7209636hbPgRV','.cursorrules','38VyVIeV','Claude\x20Code','.opencode/skills/lovrabet/SKILL.md','.codex','.cursor/skills/rabetbase.md','Qoder\x20IDE','16AVxSVP','antigravity','.qoder/skills/lovrabet/SKILL.md','.qoder/rules/rabetbase.md','opencode','其他\x20(通用模板)','39uSorxf','SKILL.md.tpl','windsurf','qoder','.trae/skills/lovrabet/SKILL.md','.opencode','.agent/skills/lovrabet/SKILL.md','.agent','10419549WaMywn','file','169761qxGpwz','OpenCode\x20IDE'];a226_0x5315=function(){return _0x5e4934;};return a226_0x5315();}const a226_0x5a61ae=a226_0x5e3e;function a226_0x5e3e(_0x2db050,_0xee945b){_0x2db050=_0x2db050-0x11d;const _0x5315cb=a226_0x5315();let _0x5e3e0f=_0x5315cb[_0x2db050];return _0x5e3e0f;}(function(_0x3c90c3,_0x106024){const _0x474b76=a226_0x5e3e,_0x32bad9=_0x3c90c3();while(!![]){try{const _0x121f8d=-parseInt(_0x474b76(0x147))/0x1+parseInt(_0x474b76(0x12a))/0x2*(parseInt(_0x474b76(0x140))/0x3)+-parseInt(_0x474b76(0x146))/0x4*(parseInt(_0x474b76(0x154))/0x5)+parseInt(_0x474b76(0x151))/0x6*(-parseInt(_0x474b76(0x13e))/0x7)+parseInt(_0x474b76(0x130))/0x8*(parseInt(_0x474b76(0x121))/0x9)+-parseInt(_0x474b76(0x143))/0xa*(-parseInt(_0x474b76(0x11f))/0xb)+parseInt(_0x474b76(0x128))/0xc*(parseInt(_0x474b76(0x136))/0xd);if(_0x121f8d===_0x106024)break;else _0x32bad9['push'](_0x32bad9['shift']());}catch(_0x4c8321){_0x32bad9['push'](_0x32bad9['shift']());}}}(a226_0x5315,0xe2fbe));export const CORE_IDE_CONFIGS={'cursor':{'name':'Cursor','description':'Cursor\x20IDE','folders':[a226_0x5a61ae(0x129),a226_0x5a61ae(0x126)],'files':[{'type':a226_0x5a61ae(0x13f),'path':a226_0x5a61ae(0x12e),'template':a226_0x5a61ae(0x137)}]},'windsurf':{'name':a226_0x5a61ae(0x14b),'description':'Windsurf\x20IDE','folders':[a226_0x5a61ae(0x150)],'files':[{'type':a226_0x5a61ae(0x13f),'path':a226_0x5a61ae(0x125),'template':'SKILL.md.tpl'}]},'claude':{'name':a226_0x5a61ae(0x12b),'description':a226_0x5a61ae(0x12b),'folders':[a226_0x5a61ae(0x14e)],'files':[{'type':'file','path':a226_0x5a61ae(0x11e),'template':a226_0x5a61ae(0x137)}]},'cline':{'name':a226_0x5a61ae(0x120),'description':a226_0x5a61ae(0x14a),'folders':['.cline'],'files':[{'type':a226_0x5a61ae(0x13f),'path':a226_0x5a61ae(0x144),'template':a226_0x5a61ae(0x137)}]},'codex':{'name':'Codex','description':a226_0x5a61ae(0x155),'folders':[a226_0x5a61ae(0x12d)],'files':[{'type':a226_0x5a61ae(0x13f),'path':a226_0x5a61ae(0x156),'template':a226_0x5a61ae(0x137)}]},'opencode':{'name':'OpenCode','description':a226_0x5a61ae(0x141),'folders':[a226_0x5a61ae(0x13b)],'files':[{'type':a226_0x5a61ae(0x13f),'path':a226_0x5a61ae(0x12c),'template':a226_0x5a61ae(0x137)}]},'qoder':{'name':a226_0x5a61ae(0x14f),'description':a226_0x5a61ae(0x12f),'folders':['.qoder'],'files':[{'type':a226_0x5a61ae(0x13f),'path':a226_0x5a61ae(0x133),'template':a226_0x5a61ae(0x137)},{'type':a226_0x5a61ae(0x13f),'path':a226_0x5a61ae(0x132),'template':a226_0x5a61ae(0x137)}]},'codebuddy':{'name':a226_0x5a61ae(0x152),'description':a226_0x5a61ae(0x123),'folders':['.codebuddy'],'files':[{'type':a226_0x5a61ae(0x13f),'path':a226_0x5a61ae(0x157),'template':a226_0x5a61ae(0x137)}]},'trae':{'name':a226_0x5a61ae(0x11d),'description':a226_0x5a61ae(0x127),'folders':['.trae'],'files':[{'type':a226_0x5a61ae(0x13f),'path':a226_0x5a61ae(0x13a),'template':a226_0x5a61ae(0x137)}]}};export const IDE_CONFIGS={...CORE_IDE_CONFIGS,'agent':{'name':a226_0x5a61ae(0x135),'description':a226_0x5a61ae(0x148),'folders':[a226_0x5a61ae(0x13d)],'files':[{'type':a226_0x5a61ae(0x13f),'path':a226_0x5a61ae(0x13c),'template':a226_0x5a61ae(0x137)}]},'antigravity':{'name':a226_0x5a61ae(0x153),'description':a226_0x5a61ae(0x14c),'folders':[a226_0x5a61ae(0x13d)],'files':[{'type':a226_0x5a61ae(0x13f),'path':a226_0x5a61ae(0x13c),'template':'SKILL.md.tpl'}]}};export const CORE_IDE_LIST=[a226_0x5a61ae(0x145),a226_0x5a61ae(0x122),a226_0x5a61ae(0x124),a226_0x5a61ae(0x149),a226_0x5a61ae(0x14d),a226_0x5a61ae(0x134),a226_0x5a61ae(0x139),a226_0x5a61ae(0x142),a226_0x5a61ae(0x138)];export const IDE_LIST=[a226_0x5a61ae(0x131),'claude',a226_0x5a61ae(0x122),a226_0x5a61ae(0x124),a226_0x5a61ae(0x149),'cursor',a226_0x5a61ae(0x134),a226_0x5a61ae(0x139),a226_0x5a61ae(0x142),'windsurf','agent'];export const ALL_CORE_IDES=[a226_0x5a61ae(0x14d),'windsurf','claude',a226_0x5a61ae(0x122),a226_0x5a61ae(0x149),'opencode',a226_0x5a61ae(0x139),a226_0x5a61ae(0x124),a226_0x5a61ae(0x142)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a227_0x52f3(){const _0x2395e9=['693138kLnFiL','1145744HfoiRa','28UmJsJi','3FPZKeX','63387nHXwoe','1320232wgUOJd','5041762lZJVmi','10BYEqKU','550975qWXnCx','430IBsoib','751780eviDGh'];a227_0x52f3=function(){return _0x2395e9;};return a227_0x52f3();}function a227_0x7c96(_0x40a98a,_0x180162){_0x40a98a=_0x40a98a-0xe6;const _0x52f3c6=a227_0x52f3();let _0x7c9683=_0x52f3c6[_0x40a98a];return _0x7c9683;}(function(_0xcbbc6b,_0x2731f4){const _0x4a9cc5=a227_0x7c96,_0x247a3f=_0xcbbc6b();while(!![]){try{const _0x4f48c6=parseInt(_0x4a9cc5(0xef))/0x1+-parseInt(_0x4a9cc5(0xe6))/0x2*(-parseInt(_0x4a9cc5(0xea))/0x3)+parseInt(_0x4a9cc5(0xec))/0x4+parseInt(_0x4a9cc5(0xee))/0x5*(-parseInt(_0x4a9cc5(0xe7))/0x6)+parseInt(_0x4a9cc5(0xe9))/0x7*(-parseInt(_0x4a9cc5(0xe8))/0x8)+parseInt(_0x4a9cc5(0xeb))/0x9*(parseInt(_0x4a9cc5(0xf0))/0xa)+-parseInt(_0x4a9cc5(0xed))/0xb;if(_0x4f48c6===_0x2731f4)break;else _0x247a3f['push'](_0x247a3f['shift']());}catch(_0x1e4df0){_0x247a3f['push'](_0x247a3f['shift']());}}}(a227_0x52f3,0x48a28));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(_0x2e43d7,_0x487d6d){const _0x6aea53=a228_0x227f,_0x3cd96f=_0x2e43d7();while(!![]){try{const _0x1079ed=parseInt(_0x6aea53(0xad))/0x1*(parseInt(_0x6aea53(0xa8))/0x2)+-parseInt(_0x6aea53(0xb3))/0x3+-parseInt(_0x6aea53(0xaf))/0x4*(-parseInt(_0x6aea53(0xb5))/0x5)+parseInt(_0x6aea53(0xae))/0x6+-parseInt(_0x6aea53(0xb1))/0x7*(-parseInt(_0x6aea53(0xac))/0x8)+-parseInt(_0x6aea53(0xab))/0x9+-parseInt(_0x6aea53(0xb2))/0xa;if(_0x1079ed===_0x487d6d)break;else _0x3cd96f['push'](_0x3cd96f['shift']());}catch(_0x1a0bdd){_0x3cd96f['push'](_0x3cd96f['shift']());}}}(a228_0x5f3a,0x3ab75));import{getTemplateBaseUrl}from'../utils/config.js';export async function fetchCdnConfig(){const _0x40b01d=a228_0x227f,_0x3796e6=getTemplateBaseUrl(),_0x5c7af7=[_0x3796e6+'/config.json',_0x3796e6+_0x40b01d(0xb6)];for(const _0x3c03d1 of _0x5c7af7){try{const _0x1d7963=await fetch(_0x3c03d1,{'headers':{'Accept':_0x40b01d(0xb0)}});if(!_0x1d7963['ok'])continue;const _0x1235b7=await _0x1d7963[_0x40b01d(0xaa)]();if(!_0x1235b7[_0x40b01d(0xa9)]?.['stableVersion']||!_0x1235b7[_0x40b01d(0xb7)]?.['node']?.['stableVersion'])continue;return _0x1235b7;}catch{}}return null;}let cachedConfig=null,cacheTime=0x0;const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8;function a228_0x5f3a(){const _0x16301e=['cli','json','2771784YPHGKn','27488bxaEFG','1vUGPDm','2097114nVXZpf','1095604spSCaX','application/json','469BuPhnV','3529950xFGXOK','212778ZRdvwA','now','5njhjGa','/config/index.json','sdk','237532QcwZSf'];a228_0x5f3a=function(){return _0x16301e;};return a228_0x5f3a();}function a228_0x227f(_0x4a0f25,_0x373a13){_0x4a0f25=_0x4a0f25-0xa8;const _0x5f3ab0=a228_0x5f3a();let _0x227f4c=_0x5f3ab0[_0x4a0f25];return _0x227f4c;}let hasCachedConfig=![];export async function getCdnConfig(){const _0x3a4c4b=a228_0x227f,_0x59304d=Date[_0x3a4c4b(0xb4)]();if(hasCachedConfig){const _0x5b49d2=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x59304d-cacheTime<_0x5b49d2)return cachedConfig;}const _0x2c9a16=await fetchCdnConfig();return cachedConfig=_0x2c9a16,cacheTime=_0x59304d,hasCachedConfig=!![],_0x2c9a16;}export function clearCdnConfigCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a229_0x4ecdd2=a229_0x2ec0;function a229_0x2ec0(_0x25e27f,_0xb3629){_0x25e27f=_0x25e27f-0xdc;const _0xa4df08=a229_0xa4df();let _0x2ec067=_0xa4df08[_0x25e27f];return _0x2ec067;}(function(_0x2bd80b,_0x2ca400){const _0x48144f=a229_0x2ec0,_0x50fc87=_0x2bd80b();while(!![]){try{const _0xf782fc=-parseInt(_0x48144f(0xe9))/0x1*(parseInt(_0x48144f(0xf8))/0x2)+-parseInt(_0x48144f(0xde))/0x3*(parseInt(_0x48144f(0xe8))/0x4)+parseInt(_0x48144f(0xf1))/0x5+-parseInt(_0x48144f(0xeb))/0x6+-parseInt(_0x48144f(0xdd))/0x7*(parseInt(_0x48144f(0xe5))/0x8)+parseInt(_0x48144f(0xf4))/0x9+-parseInt(_0x48144f(0xe7))/0xa;if(_0xf782fc===_0x2ca400)break;else _0x50fc87['push'](_0x50fc87['shift']());}catch(_0x506297){_0x50fc87['push'](_0x50fc87['shift']());}}}(a229_0xa4df,0xd31f8));import a229_0x519fa9 from'node:fs';import a229_0x282d6f from'node:path';import a229_0x3a95c9 from'semver';import{getCdnConfig}from'../utils/cdn-config.js';const FALLBACK_MIN_SDK_VERSION=a229_0x4ecdd2(0xe6);function isNonNumericVersion(_0x50d805){const _0x188f26=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x188f26['some'](_0x3821d6=>_0x3821d6['test'](_0x50d805));}function getInstalledVersion(_0x3622c8,_0x355b1d){const _0x20ac07=a229_0x4ecdd2;try{const _0x5fc8a6=a229_0x282d6f[_0x20ac07(0xf3)](_0x3622c8,_0x20ac07(0xe0),_0x355b1d,_0x20ac07(0xfc));if(a229_0x519fa9[_0x20ac07(0xed)](_0x5fc8a6)){const _0x1e77dc=JSON[_0x20ac07(0xe1)](a229_0x519fa9[_0x20ac07(0xee)](_0x5fc8a6,'utf-8'));return _0x1e77dc[_0x20ac07(0xf9)]||null;}}catch{}return null;}async function getSdkStableVersion(){const _0x3ebfea=a229_0x4ecdd2;try{const _0x3e48d8=await getCdnConfig();return _0x3e48d8?.['sdk']?.[_0x3ebfea(0xfa)]?.[_0x3ebfea(0xea)]||null;}catch{return null;}}async function getSdkPackageName(){const _0xda36a=a229_0x4ecdd2;try{const _0x50a3a3=await getCdnConfig();return _0x50a3a3?.['sdk']?.[_0xda36a(0xfa)]?.[_0xda36a(0xe2)]||_0xda36a(0xef);}catch{return _0xda36a(0xef);}}export async function checkSdkVersion(_0x274eb2){const _0x34eed3=a229_0x4ecdd2,_0x583008=a229_0x282d6f[_0x34eed3(0xf3)](_0x274eb2,_0x34eed3(0xfc)),[_0x4d2425,_0x337772]=await Promise[_0x34eed3(0xdf)]([getSdkStableVersion(),getSdkPackageName()]),_0x7f420c=_0x4d2425||FALLBACK_MIN_SDK_VERSION;if(!a229_0x519fa9[_0x34eed3(0xed)](_0x583008))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x7f420c,'packageName':_0x337772,'stableVersion':_0x4d2425};try{const _0x32981b=JSON[_0x34eed3(0xe1)](a229_0x519fa9[_0x34eed3(0xee)](_0x583008,_0x34eed3(0xe4))),_0x3780b2=_0x32981b[_0x34eed3(0xec)]||{},_0xd543f6=_0x32981b['devDependencies']||{},_0x18be4b=_0x3780b2[_0x337772]||_0xd543f6[_0x337772];if(!_0x18be4b)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x7f420c,'packageName':_0x337772,'stableVersion':_0x4d2425};let _0x169ad9=getInstalledVersion(_0x274eb2,_0x337772);!_0x169ad9&&(_0x169ad9=_0x18be4b);if(isNonNumericVersion(_0x18be4b))return{'installed':!![],'version':_0x169ad9,'needsUpgrade':![],'minVersion':_0x7f420c,'packageName':_0x337772,'stableVersion':_0x4d2425};const _0x1e9a3e=a229_0x3a95c9[_0x34eed3(0xf0)](_0x169ad9),_0x2124c2=a229_0x3a95c9[_0x34eed3(0xf0)](_0x7f420c),_0x462bf5=_0x1e9a3e&&_0x2124c2?a229_0x3a95c9['lt'](_0x1e9a3e,_0x2124c2):![];return{'installed':!![],'version':_0x169ad9,'needsUpgrade':_0x462bf5,'minVersion':_0x7f420c,'packageName':_0x337772,'stableVersion':_0x4d2425};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x7f420c,'packageName':_0x337772,'stableVersion':_0x4d2425};}}export function checkSdkVersionSync(_0x3b6b2a){const _0x19fa80=a229_0x4ecdd2,_0x246ad7=a229_0x282d6f[_0x19fa80(0xf3)](_0x3b6b2a,_0x19fa80(0xfc)),_0x4b2335='@lovrabet/sdk';if(!a229_0x519fa9[_0x19fa80(0xed)](_0x246ad7))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x4b2335,'stableVersion':null};try{const _0x55d507=JSON[_0x19fa80(0xe1)](a229_0x519fa9[_0x19fa80(0xee)](_0x246ad7,_0x19fa80(0xe4))),_0x28c7b9=_0x55d507[_0x19fa80(0xec)]||{},_0x402fbb=_0x55d507['devDependencies']||{},_0x5a05c4=_0x28c7b9[_0x4b2335]||_0x402fbb[_0x4b2335];if(!_0x5a05c4)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x4b2335,'stableVersion':null};let _0x1ad4dd=getInstalledVersion(_0x3b6b2a,_0x4b2335);!_0x1ad4dd&&(_0x1ad4dd=_0x5a05c4);if(isNonNumericVersion(_0x5a05c4))return{'installed':!![],'version':_0x1ad4dd,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x4b2335,'stableVersion':null};const _0x239324=a229_0x3a95c9[_0x19fa80(0xf0)](_0x1ad4dd),_0x5a5046=_0x239324?a229_0x3a95c9['lt'](_0x239324,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x1ad4dd,'needsUpgrade':_0x5a5046,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x4b2335,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x4b2335,'stableVersion':null};}}export function printSdkUpgradeWarning(_0x4adacc){const _0x37b964=a229_0x4ecdd2;if(!_0x4adacc[_0x37b964(0xfb)])return;const _0x32fd54=_0x37b964(0xe3),_0x593f71=_0x37b964(0xf6),_0x2bdbd1='\x1b[1m',_0x1938d7=_0x4adacc[_0x37b964(0xe2)]||_0x37b964(0xef),_0x19e889=_0x4adacc[_0x37b964(0xea)]||_0x4adacc['minVersion'],_0x22c77d='npm\x20install\x20'+_0x1938d7+'@'+(_0x19e889||_0x37b964(0xf2));console[_0x37b964(0xf5)](),console['log'](''+_0x32fd54+_0x2bdbd1+_0x37b964(0xf7)+_0x593f71),console[_0x37b964(0xf5)](_0x32fd54+'\x20\x20\x20Current\x20version:\x20'+_0x1938d7+'@'+_0x4adacc['version']+_0x593f71),console[_0x37b964(0xf5)](_0x32fd54+_0x37b964(0xdc)+_0x19e889+_0x593f71),console[_0x37b964(0xf5)](_0x32fd54+'\x20\x20\x20Upgrade\x20command:\x20'+_0x22c77d+_0x593f71),console[_0x37b964(0xf5)]();}function a229_0xa4df(){const _0x4909e6=['7769985fVlVJV','latest','join','11206683ycVaGR','log','\x1b[0m','↪\x20SDK\x20update\x20available','52RiAZdB','version','node','needsUpgrade','package.json','\x20\x20\x20Stable\x20version:\x20','126889AHiKpR','3ncETCG','all','node_modules','parse','packageName','\x1b[33m','utf8','8GopJWa','1.2.0','3578490glgAqf','394628UmKqdm','54424VeFgSC','stableVersion','268602hgYHbt','dependencies','existsSync','readFileSync','@lovrabet/sdk','coerce'];a229_0xa4df=function(){return _0x4909e6;};return a229_0xa4df();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
(function(_0x3dfd57,_0x5c7b17){const _0x4ad235=a230_0x4ce4,_0x200003=_0x3dfd57();while(!![]){try{const _0x307d69=-parseInt(_0x4ad235(0x190))/0x1*(parseInt(_0x4ad235(0x184))/0x2)+-parseInt(_0x4ad235(0x19f))/0x3+-parseInt(_0x4ad235(0x1a2))/0x4+-parseInt(_0x4ad235(0x1a8))/0x5*(-parseInt(_0x4ad235(0x199))/0x6)+parseInt(_0x4ad235(0x196))/0x7+parseInt(_0x4ad235(0x1aa))/0x8+-parseInt(_0x4ad235(0x18d))/0x9*(parseInt(_0x4ad235(0x18c))/0xa);if(_0x307d69===_0x5c7b17)break;else _0x200003['push'](_0x200003['shift']());}catch(_0x1162c1){_0x200003['push'](_0x200003['shift']());}}}(a230_0x2fd1,0x7ac11));function a230_0x2fd1(){const _0x2d6d54=['minimumVersionMessage','upgradeMessage','package.json','2928184TRUxBp','validation','belowMinimum','18TOaIfO','\x1b[1m','Current\x20CLI\x20version\x20is\x20below\x20the\x20service\x20compatibility\x20support\x20line.','filter','log','\x1b[33m','148434YAguXb','\x20\x20\x20Current\x20CLI\x20version:\x20','latest','1052072BvDHtd','↪\x20Critical\x20CLI\x20upgrade\x20required','\x1b[0m','../..','\x20\x20\x20Stable\x20version:\x20','\x20\x20\x20Minimum\x20supported:\x20','529805AEVfKh','parse','3944888yfQjBL','Minimum\x20supported:\x20','Current\x20version:\x20','currentVersion','16062IGGHvg','Upgrade\x20command:\x20','stableVersion','needsUpgrade','coerce','\x20\x20\x20Upgrade\x20command:\x20','version','↪\x20New\x20version\x20available','6270pUDGMH','1908qrDzZO','\x20\x20\x20Recommended\x20stable:\x20','\x20\x20\x20','35XzofhX','1.0.0','minimumVersion'];a230_0x2fd1=function(){return _0x2d6d54;};return a230_0x2fd1();}import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a230_0x4dfc0c from'semver';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';function a230_0x4ce4(_0x4597a8,_0x3b4e07){_0x4597a8=_0x4597a8-0x183;const _0x2fd101=a230_0x2fd1();let _0x4ce4c1=_0x2fd101[_0x4597a8];return _0x4ce4c1;}export function getCliUpgradeCommand(_0x2c063c){const _0x160817=a230_0x4ce4,_0x417e4d=_0x2c063c['stableVersion']||_0x160817(0x1a1);return'npm\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@'+_0x417e4d;}function getCurrentCliVersion(){const _0x301bdc=a230_0x4ce4;try{const _0x366472=fileURLToPath(import.meta.url),_0x30d8ed=resolve(dirname(_0x366472),_0x301bdc(0x1a5)),_0x521919=resolve(_0x30d8ed,_0x301bdc(0x195)),_0x56689a=JSON[_0x301bdc(0x1a9)](readFileSync(_0x521919,'utf-8'));return _0x56689a[_0x301bdc(0x18a)]||_0x301bdc(0x191);}catch{return _0x301bdc(0x191);}}export async function checkCliVersion(){const _0x77d08d=a230_0x4ce4,_0x134fea=getCurrentCliVersion(),_0x37753c=await getCliVersionPolicy(),_0x432ac5=_0x37753c?.['stableVersion']||null,_0x3a0b8e=_0x37753c?.[_0x77d08d(0x192)]||null;let _0xa4a06e=![],_0x35a203=![];const _0x55ddcb=a230_0x4dfc0c['coerce'](_0x134fea);if(_0x55ddcb&&_0x432ac5)try{const _0x1e474e=a230_0x4dfc0c[_0x77d08d(0x188)](_0x432ac5);if(_0x1e474e)_0xa4a06e=a230_0x4dfc0c['lt'](_0x55ddcb,_0x1e474e);}catch{}if(_0x55ddcb&&_0x3a0b8e)try{const _0x4b1db2=a230_0x4dfc0c[_0x77d08d(0x188)](_0x3a0b8e);if(_0x4b1db2)_0x35a203=a230_0x4dfc0c['lt'](_0x55ddcb,_0x4b1db2);}catch{}return _0x35a203&&(_0xa4a06e=!![]),{'currentVersion':_0x134fea,'stableVersion':_0x432ac5,'minimumVersion':_0x3a0b8e,'needsUpgrade':_0xa4a06e,'belowMinimum':_0x35a203,'isPreRelease':![],'upgradeMessage':_0x37753c?.[_0x77d08d(0x194)],'minimumVersionMessage':_0x37753c?.[_0x77d08d(0x193)]};}export function printCliUpgradeWarning(_0x209fd4){const _0x33cb49=a230_0x4ce4;if(!_0x209fd4[_0x33cb49(0x187)]&&!_0x209fd4[_0x33cb49(0x198)])return;const _0x4965da='\x1b[31m',_0x221894=_0x33cb49(0x19e),_0x3edddd=_0x33cb49(0x1a4),_0x2dd5e0=_0x33cb49(0x19a),_0x1bd6a6=getCliUpgradeCommand(_0x209fd4);console[_0x33cb49(0x19d)](),_0x209fd4[_0x33cb49(0x198)]?(console[_0x33cb49(0x19d)](''+_0x4965da+_0x2dd5e0+_0x33cb49(0x1a3)+_0x3edddd),console[_0x33cb49(0x19d)](_0x4965da+'\x20\x20\x20Current\x20CLI\x20version:\x20'+_0x209fd4[_0x33cb49(0x183)]+_0x3edddd),_0x209fd4['minimumVersion']&&console[_0x33cb49(0x19d)](_0x4965da+_0x33cb49(0x1a7)+_0x209fd4['minimumVersion']+_0x3edddd),_0x209fd4['stableVersion']&&_0x209fd4[_0x33cb49(0x186)]!==_0x209fd4[_0x33cb49(0x192)]&&console[_0x33cb49(0x19d)](_0x4965da+_0x33cb49(0x18e)+_0x209fd4['stableVersion']+_0x3edddd),_0x209fd4['minimumVersionMessage']&&console[_0x33cb49(0x19d)](_0x4965da+'\x20\x20\x20'+_0x209fd4[_0x33cb49(0x193)]+_0x3edddd),console[_0x33cb49(0x19d)](_0x4965da+'\x20\x20\x20Upgrade\x20command:\x20'+_0x1bd6a6+_0x3edddd)):(console['log'](''+_0x221894+_0x2dd5e0+_0x33cb49(0x18b)+_0x3edddd),console['log'](_0x221894+_0x33cb49(0x1a0)+_0x209fd4[_0x33cb49(0x183)]+_0x3edddd),console[_0x33cb49(0x19d)](_0x221894+_0x33cb49(0x1a6)+_0x209fd4['stableVersion']+_0x3edddd),_0x209fd4[_0x33cb49(0x194)]&&console[_0x33cb49(0x19d)](_0x221894+_0x33cb49(0x18f)+_0x209fd4[_0x33cb49(0x194)]+_0x3edddd),console[_0x33cb49(0x19d)](_0x221894+_0x33cb49(0x189)+_0x1bd6a6+_0x3edddd)),console[_0x33cb49(0x19d)]();}export function assertCliVersionSupported(_0x593f3e){const _0x11e528=a230_0x4ce4;if(!_0x593f3e[_0x11e528(0x198)])return;const _0x5634a5=[_0x593f3e[_0x11e528(0x193)],_0x11e528(0x1ac)+_0x593f3e['currentVersion'],_0x593f3e[_0x11e528(0x192)]?_0x11e528(0x1ab)+_0x593f3e['minimumVersion']:null,_0x11e528(0x185)+getCliUpgradeCommand(_0x593f3e)][_0x11e528(0x19c)](Boolean)['join']('\x0a');throw CliErrors[_0x11e528(0x197)](_0x11e528(0x19b),_0x5634a5);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x13f931,_0x55cc0a){const _0x3d51e3=a231_0x55e2,_0x2202aa=_0x13f931();while(!![]){try{const _0x16bc39=-parseInt(_0x3d51e3(0x1f5))/0x1+-parseInt(_0x3d51e3(0x1e6))/0x2*(parseInt(_0x3d51e3(0x1e9))/0x3)+parseInt(_0x3d51e3(0x1fb))/0x4*(parseInt(_0x3d51e3(0x1ed))/0x5)+parseInt(_0x3d51e3(0x1eb))/0x6*(parseInt(_0x3d51e3(0x1f0))/0x7)+-parseInt(_0x3d51e3(0x1e7))/0x8*(parseInt(_0x3d51e3(0x1e8))/0x9)+parseInt(_0x3d51e3(0x1f3))/0xa*(-parseInt(_0x3d51e3(0x1ef))/0xb)+parseInt(_0x3d51e3(0x1e4))/0xc;if(_0x16bc39===_0x55cc0a)break;else _0x2202aa['push'](_0x2202aa['shift']());}catch(_0x34eb5d){_0x2202aa['push'](_0x2202aa['shift']());}}}(a231_0x59cc,0xbdc28));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 pickString(_0x158b5b){const _0x5e7d56=a231_0x55e2;return typeof _0x158b5b==='string'&&_0x158b5b['trim']()[_0x5e7d56(0x1f9)]>0x0?_0x158b5b[_0x5e7d56(0x1ea)]():null;}function a231_0x59cc(){const _0x441d28=['498uxwDqG','trim','76518XYZPII','cli','16630lxtejG','minimumVersion','1870044PAwBIR','329DHeuDW','json','latestVersion','10moCrGZ','upgradeMessage','1124478rLSnCq','application/json','recommendedVersion','now','length','abort','1324OrXTVf','27912852gdhMEk','minVersion','5398irELLj','430456cJSCUo','252EtLDLb'];a231_0x59cc=function(){return _0x441d28;};return a231_0x59cc();}function normalizeCliVersionPolicy(_0x3d6357){const _0x402b6c=a231_0x55e2;if(!_0x3d6357||typeof _0x3d6357!=='object')return null;const _0xeccf11=_0x3d6357,_0x1171e3=_0xeccf11['cli']&&typeof _0xeccf11[_0x402b6c(0x1ec)]==='object'?_0xeccf11[_0x402b6c(0x1ec)]:_0xeccf11,_0x371e6b=pickString(_0x1171e3['stableVersion'])||pickString(_0x1171e3[_0x402b6c(0x1f2)])||pickString(_0x1171e3[_0x402b6c(0x1f7)]),_0x3f0505=pickString(_0x1171e3[_0x402b6c(0x1ee)])||pickString(_0x1171e3[_0x402b6c(0x1e5)]);if(!_0x371e6b&&!_0x3f0505)return null;return{'stableVersion':_0x371e6b,'minimumVersion':_0x3f0505,'upgradeMessage':pickString(_0x1171e3[_0x402b6c(0x1f4)])||undefined,'minimumVersionMessage':pickString(_0x1171e3['minimumVersionMessage'])||undefined};}export async function fetchCliVersionPolicy(){const _0x29c421=a231_0x55e2,_0xe5c72e=new AbortController(),_0x5d66f2=setTimeout(()=>_0xe5c72e[_0x29c421(0x1fa)](),FETCH_TIMEOUT_MS);try{const _0xe5277a=await fetch(CLI_VERSION_POLICY_URL,{'headers':{'Accept':_0x29c421(0x1f6)},'signal':_0xe5c72e['signal']});if(!_0xe5277a['ok'])return null;const _0x4f75e4=await _0xe5277a[_0x29c421(0x1f1)]();return normalizeCliVersionPolicy(_0x4f75e4);}catch{return null;}finally{clearTimeout(_0x5d66f2);}}function a231_0x55e2(_0x1d4cc7,_0x11f50f){_0x1d4cc7=_0x1d4cc7-0x1e4;const _0x59ccfa=a231_0x59cc();let _0x55e2c9=_0x59ccfa[_0x1d4cc7];return _0x55e2c9;}let cachedPolicy=null,cacheTime=0x0,hasCachedPolicy=![];export async function getCliVersionPolicy(){const _0x3fcea1=a231_0x55e2,_0x55c27f=Date[_0x3fcea1(0x1f8)]();if(hasCachedPolicy){const _0x101f9d=cachedPolicy?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x55c27f-cacheTime<_0x101f9d)return cachedPolicy;}const _0x2b6e05=await fetchCliVersionPolicy();return cachedPolicy=_0x2b6e05,cacheTime=_0x55c27f,hasCachedPolicy=!![],_0x2b6e05;}export function clearCliVersionPolicyCache(){cachedPolicy=null,cacheTime=0x0,hasCachedPolicy=![];}
|
package/lib/utils/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a232_0x13b495=a232_0x1d0c;(function(_0x3df0df,_0x252639){const _0x112467=a232_0x1d0c,_0x1793f8=_0x3df0df();while(!![]){try{const _0x5cb5a8=parseInt(_0x112467(0xb2))/0x1*(-parseInt(_0x112467(0xbd))/0x2)+parseInt(_0x112467(0xb5))/0x3+parseInt(_0x112467(0xb9))/0x4+parseInt(_0x112467(0xb7))/0x5*(parseInt(_0x112467(0xb8))/0x6)+-parseInt(_0x112467(0xb3))/0x7+parseInt(_0x112467(0xbc))/0x8*(parseInt(_0x112467(0xb4))/0x9)+-parseInt(_0x112467(0xbe))/0xa;if(_0x5cb5a8===_0x252639)break;else _0x1793f8['push'](_0x1793f8['shift']());}catch(_0x133826){_0x1793f8['push'](_0x1793f8['shift']());}}}(a232_0x1d13,0x8e5f0));import{initEnv}from'../constant/env.js';function a232_0x1d0c(_0x16da6,_0x4ba9ed){_0x16da6=_0x16da6-0xb2;const _0x1d137a=a232_0x1d13();let _0x1d0cd1=_0x1d137a[_0x16da6];return _0x1d0cd1;}import{readRawConfig,getConfigAppCode as a232_0x20dec3,getMultiAppConfigs as a232_0x568884,getTemplateBaseUrl as a232_0x35ddfd}from'../context.js';export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';export{isInProject}from'../context.js';export function readConfig(_0x54f9b3){const _0x3a86e7=a232_0x1d0c,_0x4682a9=readRawConfig(_0x54f9b3);return _0x4682a9[_0x3a86e7(0xb6)]&&typeof _0x4682a9[_0x3a86e7(0xb6)]===_0x3a86e7(0xba)&&initEnv(_0x4682a9[_0x3a86e7(0xb6)]),_0x4682a9;}function a232_0x1d13(){const _0x1fd2c2=['env','10UjPsgI','663990lAJozO','2665908DMDyyx','string','project','3145192pYSGZG','97160GjXpAe','11533080XQQHzc','10csvULo','534688pJhhzk','9fGjYcW','3053064rgyGFC'];a232_0x1d13=function(){return _0x1fd2c2;};return a232_0x1d13();}export function getConfigAppCode(){return a232_0x20dec3();}export function getMultiAppConfigs(_0xb4f7a6=a232_0x13b495(0xbb)){return a232_0x568884(_0xb4f7a6);}export function getTemplateBaseUrl(){return a232_0x35ddfd();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x57945d,_0x3da8d2){const _0x12338c=a233_0x558d,_0x3ae1da=_0x57945d();while(!![]){try{const _0x27cd7c=parseInt(_0x12338c(0xce))/0x1*(-parseInt(_0x12338c(0xd7))/0x2)+parseInt(_0x12338c(0xd2))/0x3+parseInt(_0x12338c(0xc9))/0x4+-parseInt(_0x12338c(0xd1))/0x5*(parseInt(_0x12338c(0xd0))/0x6)+parseInt(_0x12338c(0xcb))/0x7*(parseInt(_0x12338c(0xd5))/0x8)+-parseInt(_0x12338c(0xc8))/0x9+parseInt(_0x12338c(0xcf))/0xa*(-parseInt(_0x12338c(0xd9))/0xb);if(_0x27cd7c===_0x3da8d2)break;else _0x3ae1da['push'](_0x3ae1da['shift']());}catch(_0x212d6c){_0x3ae1da['push'](_0x3ae1da['shift']());}}}(a233_0x4d17,0xe56e4));function a233_0x4d17(){const _0x539808=['2287992voesgz','join','error','40YWdqDr','复制目录时出错:','17492wgsQCQ','mkdirSync','16489UOGSLD','7912134ZLaKGp','6816244JFirfT','name','2306479RaJKmN','isDirectory','copyFileSync','211zifpke','480Joppsb','2267868xGweqg','5zgfcDk'];a233_0x4d17=function(){return _0x539808;};return a233_0x4d17();}import a233_0x46a275 from'node:path';import a233_0x4b6998 from'node:fs';function a233_0x558d(_0x54d0bd,_0x59937f){_0x54d0bd=_0x54d0bd-0xc8;const _0x4d175e=a233_0x4d17();let _0x558de6=_0x4d175e[_0x54d0bd];return _0x558de6;}export async function copyDirectory(_0x3cfa77,_0x351441){const _0x410ea0=a233_0x558d;try{const _0x475b8e=a233_0x4b6998['readdirSync'](_0x3cfa77,{'withFileTypes':!![]});a233_0x4b6998[_0x410ea0(0xd8)](_0x351441,{'recursive':!![]});for(const _0x415663 of _0x475b8e){const _0x22b79f=a233_0x46a275[_0x410ea0(0xd3)](_0x3cfa77,_0x415663[_0x410ea0(0xca)]),_0x1b4a06=a233_0x46a275[_0x410ea0(0xd3)](_0x351441,_0x415663[_0x410ea0(0xca)]);_0x415663[_0x410ea0(0xcc)]()?await copyDirectory(_0x22b79f,_0x1b4a06):a233_0x4b6998[_0x410ea0(0xcd)](_0x22b79f,_0x1b4a06);}}catch(_0x3400a3){console[_0x410ea0(0xd4)](_0x410ea0(0xd6),_0x3400a3);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a234_0x1370(_0x137a8b,_0x2622d0){_0x137a8b=_0x137a8b-0x93;const _0x445587=a234_0x4455();let _0x1370a5=_0x445587[_0x137a8b];return _0x1370a5;}(function(_0x2a6053,_0x454688){const _0x5d7424=a234_0x1370,_0x4e0fef=_0x2a6053();while(!![]){try{const _0x40e009=parseInt(_0x5d7424(0x96))/0x1+parseInt(_0x5d7424(0x9c))/0x2+-parseInt(_0x5d7424(0x99))/0x3*(parseInt(_0x5d7424(0x9d))/0x4)+parseInt(_0x5d7424(0x95))/0x5+parseInt(_0x5d7424(0x9b))/0x6+parseInt(_0x5d7424(0x93))/0x7+parseInt(_0x5d7424(0x98))/0x8*(-parseInt(_0x5d7424(0x94))/0x9);if(_0x40e009===_0x454688)break;else _0x4e0fef['push'](_0x4e0fef['shift']());}catch(_0x1a526f){_0x4e0fef['push'](_0x4e0fef['shift']());}}}(a234_0x4455,0x551fb));function toFiniteNumber(_0x3b1185){const _0xd3a97a=a234_0x1370;if(typeof _0x3b1185==='number'&&Number['isFinite'](_0x3b1185))return _0x3b1185;if(typeof _0x3b1185===_0xd3a97a(0x9a)){const _0x31f077=_0x3b1185['trim']();if(!_0x31f077)return undefined;const _0x309cfc=Number(_0x31f077);if(Number[_0xd3a97a(0x97)](_0x309cfc))return _0x309cfc;}return undefined;}export function normalizeEntityWithIdResponse(_0x1e28d5){const _0x25fa4c=a234_0x1370,_0x10c8a0=toFiniteNumber(_0x1e28d5);if(_0x10c8a0!==undefined)return{'id':_0x10c8a0,'entity':{'id':_0x10c8a0}};if(!_0x1e28d5||typeof _0x1e28d5!==_0x25fa4c(0x9e))return{'id':undefined,'entity':{}};const _0x4950bf={..._0x1e28d5},_0x298eda=toFiniteNumber(_0x4950bf['id']);return _0x298eda!==undefined&&(_0x4950bf['id']=_0x298eda),{'id':_0x298eda,'entity':_0x4950bf};}function a234_0x4455(){const _0x518686=['16cWcgLs','object','4488365ykIcHX','80874BZlMTP','3279870bTFNaY','385401YbZoav','isFinite','1976iHPBzk','109884sfjhIX','string','3006720xKDrmw','1062062ZIrRwS'];a234_0x4455=function(){return _0x518686;};return a234_0x4455();}
|
package/lib/utils/file-utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x38710a,_0x594fd4){const _0x5f098e=a235_0x4520,_0x235b9f=_0x38710a();while(!![]){try{const _0x1b4b09=-parseInt(_0x5f098e(0xff))/0x1+parseInt(_0x5f098e(0x107))/0x2*(parseInt(_0x5f098e(0x106))/0x3)+parseInt(_0x5f098e(0x104))/0x4+-parseInt(_0x5f098e(0x103))/0x5+parseInt(_0x5f098e(0x108))/0x6*(-parseInt(_0x5f098e(0x101))/0x7)+-parseInt(_0x5f098e(0x10a))/0x8*(parseInt(_0x5f098e(0x105))/0x9)+-parseInt(_0x5f098e(0x109))/0xa*(-parseInt(_0x5f098e(0x102))/0xb);if(_0x1b4b09===_0x594fd4)break;else _0x235b9f['push'](_0x235b9f['shift']());}catch(_0x56d57b){_0x235b9f['push'](_0x235b9f['shift']());}}}(a235_0x4f94,0x506f6));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';export async function copyDir(_0x231823,_0x4d482f){const _0x41edb7=a235_0x4520,_0x537b54=statSync(_0x231823);if(_0x537b54[_0x41edb7(0x100)]()){!existsSync(_0x4d482f)&&mkdirSync(_0x4d482f,{'recursive':!![]});const _0x3efea0=readdirSync(_0x231823);for(const _0x5da038 of _0x3efea0){await copyDir(join(_0x231823,_0x5da038),join(_0x4d482f,_0x5da038));}}else copyFileSync(_0x231823,_0x4d482f);}function a235_0x4f94(){const _0x461847=['2469572AuPNVW','80982UKICmP','5163CXXCtT','156nHQJhC','54noCPPP','40DxttDk','248dKdeZW','320955kmZcZm','isDirectory','72499zlugQI','1951422kHtlqM','2193355mXezVx'];a235_0x4f94=function(){return _0x461847;};return a235_0x4f94();}export function ensureDir(_0x1dcd1b){!existsSync(_0x1dcd1b)&&mkdirSync(_0x1dcd1b,{'recursive':!![]});}function a235_0x4520(_0x495970,_0x5d2f1b){_0x495970=_0x495970-0xff;const _0x4f9409=a235_0x4f94();let _0x4520ff=_0x4f9409[_0x495970];return _0x4520ff;}export function pathExists(_0x3fe13f){return existsSync(_0x3fe13f);}
|
package/lib/utils/guides-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a236_0x3bdb78=a236_0x2edf;(function(_0x2d8a81,_0xeaafaa){const _0x34231c=a236_0x2edf,_0xb637c8=_0x2d8a81();while(!![]){try{const _0x281c79=-parseInt(_0x34231c(0x1bd))/0x1*(parseInt(_0x34231c(0x1bf))/0x2)+-parseInt(_0x34231c(0x1d3))/0x3+-parseInt(_0x34231c(0x1d6))/0x4*(parseInt(_0x34231c(0x1d8))/0x5)+-parseInt(_0x34231c(0x1c6))/0x6*(parseInt(_0x34231c(0x1c1))/0x7)+parseInt(_0x34231c(0x1d0))/0x8*(parseInt(_0x34231c(0x1c5))/0x9)+parseInt(_0x34231c(0x1d4))/0xa+parseInt(_0x34231c(0x1ce))/0xb;if(_0x281c79===_0xeaafaa)break;else _0xb637c8['push'](_0xb637c8['shift']());}catch(_0x5ccdd0){_0xb637c8['push'](_0xb637c8['shift']());}}}(a236_0x3e28,0xa6ad9));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 _0x19dfdd=getTemplateBaseUrl();return _0x19dfdd+'/skills/guides.json';}const CACHE_DIR=join(homedir(),a236_0x3bdb78(0x1cb),a236_0x3bdb78(0x1bc));export async function fetchGuidesFromCDN(){const _0x2c39c3=a236_0x3bdb78,_0xf8fc56=getGuidesCdnUrl(),_0x45edbc=await fetch(_0xf8fc56,{'headers':{'Accept':_0x2c39c3(0x1cd)}});if(!_0x45edbc['ok'])throw new Error(_0x2c39c3(0x1be)+_0x45edbc['status']+'\x20'+_0x45edbc['statusText']);const _0x2ab563=await _0x45edbc['json']();if(!_0x2ab563[_0x2c39c3(0x1c9)]||typeof _0x2ab563[_0x2c39c3(0x1c9)]!==_0x2c39c3(0x1d7))throw new Error(_0x2c39c3(0x1d9));return _0x2ab563;}export function writeGuidesToProject(_0xa26085,_0x10c6b9,_0x507b59='.lovrabet/skill/guides',_0x1f834e){const _0x589d09=a236_0x3bdb78,_0x1278b5=join(_0x10c6b9,_0x507b59);mkdirSync(_0x1278b5,{'recursive':!![]});for(const [_0x317f14,_0x3ee864]of Object[_0x589d09(0x1d2)](_0xa26085[_0x589d09(0x1c9)])){let _0x5c9801=_0x3ee864['content'];_0x3ee864[_0x589d09(0x1cc)]&&(_0x5c9801=appendUpdateTime(_0x5c9801,_0x3ee864[_0x589d09(0x1cc)])),writeFileSync(join(_0x1278b5,_0x317f14+_0x589d09(0x1ca)),_0x5c9801,_0x589d09(0x1c0));}}export function appendUpdateTime(_0x49e937,_0x47e969){const _0x583d36=a236_0x3bdb78;return _0x49e937=_0x49e937[_0x583d36(0x1c8)](/\n*>更新时间:.*$/m,''),_0x49e937[_0x583d36(0x1d5)]()+(_0x583d36(0x1da)+_0x47e969);}export function getSkillTemplate(_0x17823d){const _0x3fb8cb=a236_0x3bdb78;return _0x17823d[_0x3fb8cb(0x1bb)]?.[_0x3fb8cb(0x1cf)]||'';}export function appendExtendContents(_0x21e183,_0x5bb856,_0x1c8fb1){const _0x160c41=a236_0x3bdb78,_0x53ce7d=[];for(const [,_0x1522d0]of Object[_0x160c41(0x1d2)](_0x5bb856['guides'])){_0x1522d0[_0x160c41(0x1d1)]&&_0x53ce7d['push'](_0x1522d0[_0x160c41(0x1d1)]['trimEnd']());}if(_0x53ce7d[_0x160c41(0x1c2)]===0x0)return _0x21e183;return _0x21e183[_0x160c41(0x1d5)]()+'\x0a\x0a'+_0x53ce7d['join']('\x0a\x0a')+'\x0a';}function a236_0x3e28(){const _0x7c590f=['length','CDN\x20数据中缺少\x20skillTemplate','map','12108177AAelTr','942EGhHSf','path','replace','guides','.md','.lovrabet','lastUpdated','application/json','8906480ynanwK','content','8AEJIdT','extendContent','entries','868176XUCWBi','7774310ROvxFt','trimEnd','368MUIThm','object','36050xTRSft','CDN\x20返回数据格式错误','\x0a\x0a>更新时间:','skillTemplate','cache','2lYsgSS','CDN\x20请求失败:\x20','1154012lLFyrf','utf-8','6377xZIswo'];a236_0x3e28=function(){return _0x7c590f;};return a236_0x3e28();}export function writeSkillFile(_0x33683b,_0x243657,_0xff4ec1){const _0x3aca64=a236_0x3bdb78,_0x24556b=getSkillTemplate(_0x33683b);if(!_0x24556b)throw new Error(_0x3aca64(0x1c3));const _0x1fa41a=dirname(_0x243657);mkdirSync(_0x1fa41a,{'recursive':!![]});let _0x507ceb=_0x24556b[_0x3aca64(0x1c8)](/\{\{IDE_NAME\}\}/g,_0xff4ec1);_0x507ceb=appendExtendContents(_0x507ceb,_0x33683b),_0x33683b[_0x3aca64(0x1bb)][_0x3aca64(0x1cc)]&&(_0x507ceb=appendUpdateTime(_0x507ceb,_0x33683b[_0x3aca64(0x1bb)]['lastUpdated'])),writeFileSync(_0x243657,_0x507ceb,_0x3aca64(0x1c0));}export async function installGuides(_0x578b32){const _0x220cca=a236_0x3bdb78,_0xf27b28=await fetchGuidesFromCDN();return writeGuidesToProject(_0xf27b28,_0x578b32),Object['keys'](_0xf27b28[_0x220cca(0x1c9)])[_0x220cca(0x1c2)];}function a236_0x2edf(_0xe41d8d,_0x15139d){_0xe41d8d=_0xe41d8d-0x1bb;const _0x3e2872=a236_0x3e28();let _0x2edf6f=_0x3e2872[_0xe41d8d];return _0x2edf6f;}export function getGuidesSummary(_0x1f6ffc){const _0x3c43f7=a236_0x3bdb78;return Object['entries'](_0x1f6ffc[_0x3c43f7(0x1c9)])[_0x3c43f7(0x1c4)](([_0x7f8bdd,_0x25aeed])=>({'key':_0x7f8bdd,'title':_0x25aeed['title'],'path':_0x25aeed[_0x3c43f7(0x1c7)]}));}
|
package/lib/utils/http-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1ed6b2,_0x54857f){const _0x2eb8c8=a237_0x97dd,_0x3a042f=_0x1ed6b2();while(!![]){try{const _0x53b0e5=-parseInt(_0x2eb8c8(0x6f))/0x1*(parseInt(_0x2eb8c8(0x7b))/0x2)+-parseInt(_0x2eb8c8(0x81))/0x3+parseInt(_0x2eb8c8(0x78))/0x4*(parseInt(_0x2eb8c8(0x7c))/0x5)+-parseInt(_0x2eb8c8(0x6b))/0x6+-parseInt(_0x2eb8c8(0x6a))/0x7*(parseInt(_0x2eb8c8(0x69))/0x8)+parseInt(_0x2eb8c8(0x6c))/0x9*(-parseInt(_0x2eb8c8(0x77))/0xa)+parseInt(_0x2eb8c8(0x72))/0xb;if(_0x53b0e5===_0x54857f)break;else _0x3a042f['push'](_0x3a042f['shift']());}catch(_0x446341){_0x3a042f['push'](_0x3a042f['shift']());}}}(a237_0x5296,0x5dd7e));function a237_0x97dd(_0x425184,_0x96dee2){_0x425184=_0x425184-0x68;const _0x5296d7=a237_0x5296();let _0x97ddb2=_0x5296d7[_0x425184];return _0x97ddb2;}export async function httpRequest(_0x59e2de,_0x4f1a5a={}){const _0x1df76a=a237_0x97dd,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x4f1a5a;let _0x452d29=null;for(let _0x489219=0x0;_0x489219<=retries;_0x489219++){try{const _0x3d512b=new AbortController(),_0x60eb1b=setTimeout(()=>_0x3d512b['abort'](),timeout),_0x23d7ba=await fetch(_0x59e2de,{'headers':headers,'signal':_0x3d512b[_0x1df76a(0x85)]});clearTimeout(_0x60eb1b);let _0x20c0a2;const _0x147d77=_0x23d7ba[_0x1df76a(0x84)][_0x1df76a(0x7f)](_0x1df76a(0x6e));return _0x147d77?.[_0x1df76a(0x74)]('application/json')?_0x20c0a2=await _0x23d7ba[_0x1df76a(0x68)]():_0x20c0a2=await _0x23d7ba[_0x1df76a(0x73)](),{'ok':_0x23d7ba['ok'],'status':_0x23d7ba[_0x1df76a(0x7a)],'statusText':_0x23d7ba['statusText'],'data':_0x20c0a2,'headers':_0x23d7ba[_0x1df76a(0x84)],'url':_0x23d7ba['url'],'text':()=>_0x23d7ba[_0x1df76a(0x73)]()};}catch(_0x4af57e){_0x452d29=_0x4af57e instanceof Error?_0x4af57e:new Error(String(_0x4af57e));if(_0x489219===retries)break;if(shouldRetry(_0x4af57e)){console[_0x1df76a(0x7d)](_0x1df76a(0x70)+retryDelay+_0x1df76a(0x7e)+(_0x489219+0x1)+_0x1df76a(0x75)),await sleep(retryDelay);continue;}else break;}}throw _0x452d29||new Error(_0x1df76a(0x82));}function shouldRetry(_0x52ee1f){const _0x4699f3=a237_0x97dd;if(_0x52ee1f instanceof Error){if(_0x52ee1f[_0x4699f3(0x83)]===_0x4699f3(0x79))return![];if(_0x52ee1f[_0x4699f3(0x83)]==='TypeError'&&_0x52ee1f[_0x4699f3(0x6d)]['includes'](_0x4699f3(0x71)))return!![];if(_0x52ee1f[_0x4699f3(0x6d)]['includes'](_0x4699f3(0x76)))return!![];if(_0x52ee1f[_0x4699f3(0x6d)][_0x4699f3(0x74)](_0x4699f3(0x80)))return![];}return![];}function sleep(_0x26a4ab){return new Promise(_0x3f9a40=>setTimeout(_0x3f9a40,_0x26a4ab));}function a237_0x5296(){const _0xe54e58=['\x20次重试...','ECONNRESET','920860luWjfI','1487376LGxFvY','AbortError','status','222dlbMwP','5eyGufO','log','ms\x20后进行第\x20','get','ENOTFOUND','613065RdDUJB','Request\x20failed','name','headers','signal','json','33584NhMVeK','413wgZQmU','3098142ptcVXx','9fVrMsU','message','content-type','3168DicuVR','*\x20请求失败,','fetch','15671326qOmffy','text','includes'];a237_0x5296=function(){return _0xe54e58;};return a237_0x5296();}export function validateUrl(_0x1c6270){try{return new URL(_0x1c6270),!![];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x24c1a8,_0x3a12b){const _0xc124da=a238_0x14fa,_0x23a2b3=_0x24c1a8();while(!![]){try{const _0x21ab18=-parseInt(_0xc124da(0x1f9))/0x1*(parseInt(_0xc124da(0x1fa))/0x2)+-parseInt(_0xc124da(0x1f7))/0x3*(parseInt(_0xc124da(0x1f8))/0x4)+-parseInt(_0xc124da(0x204))/0x5*(parseInt(_0xc124da(0x200))/0x6)+parseInt(_0xc124da(0x203))/0x7*(parseInt(_0xc124da(0x202))/0x8)+-parseInt(_0xc124da(0x1fe))/0x9+parseInt(_0xc124da(0x1ff))/0xa*(parseInt(_0xc124da(0x201))/0xb)+parseInt(_0xc124da(0x1f3))/0xc;if(_0x21ab18===_0x3a12b)break;else _0x23a2b3['push'](_0x23a2b3['shift']());}catch(_0x4fc7b8){_0x23a2b3['push'](_0x23a2b3['shift']());}}}(a238_0x3678,0xe09a6));function a238_0x3678(){const _0x13f926=['isRaw','stdin','nonInteractive','15hHwmqG','834780SSZqSO','1rhPaRF','2267896MSNfmE','true','isTTY','setRawMode','12933720clrpyx','10727960hgJhbs','623886YNmrOi','11PmrvTp','8PiDXVh','7239477rXAXvF','55aDXvxJ','42855132yBzFkA'];a238_0x3678=function(){return _0x13f926;};return a238_0x3678();}function a238_0x14fa(_0x810f07,_0x3e62b6){_0x810f07=_0x810f07-0x1f3;const _0x3678db=a238_0x3678();let _0x14faa2=_0x3678db[_0x810f07];return _0x14faa2;}function env(_0x10823b){return process.env[`RABETBASE_${_0x10823b}`]||process.env[`LOVRABET_${_0x10823b}`]||undefined;}export function isNonInteractive(_0x20b77d){const _0x1fef5b=a238_0x14fa;return!!(_0x20b77d[_0x1fef5b(0x1f6)]||_0x20b77d['ci']||env('CI')===_0x1fef5b(0x1fb)||process.env.CI==='true'||!process['stdout'][_0x1fef5b(0x1fc)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0xce36a4=a238_0x14fa;if(!process[_0xce36a4(0x1f5)][_0xce36a4(0x1fc)])return![];try{const _0x3cb329=process[_0xce36a4(0x1f5)][_0xce36a4(0x1f4)];return process[_0xce36a4(0x1f5)][_0xce36a4(0x1fd)](!![]),process[_0xce36a4(0x1f5)][_0xce36a4(0x1fd)](_0x3cb329??![]),!![];}catch{return![];}}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a239_0x4370d3=a239_0x231b;(function(_0x203322,_0x5286a3){const _0x5a4589=a239_0x231b,_0x270621=_0x203322();while(!![]){try{const _0x592199=parseInt(_0x5a4589(0x1c0))/0x1+-parseInt(_0x5a4589(0x1f2))/0x2*(-parseInt(_0x5a4589(0x1cf))/0x3)+parseInt(_0x5a4589(0x1bd))/0x4+-parseInt(_0x5a4589(0x1be))/0x5+-parseInt(_0x5a4589(0x1d6))/0x6*(parseInt(_0x5a4589(0x1e6))/0x7)+parseInt(_0x5a4589(0x1ea))/0x8+parseInt(_0x5a4589(0x1c9))/0x9*(-parseInt(_0x5a4589(0x1d0))/0xa);if(_0x592199===_0x5286a3)break;else _0x270621['push'](_0x270621['shift']());}catch(_0x57655d){_0x270621['push'](_0x270621['shift']());}}}(a239_0x4f49,0xb68bb));import a239_0x5e2519 from'winston';import a239_0x3f2254 from'node:fs';import a239_0x17bf60 from'node:path';function a239_0x4f49(){const _0x53b66a=['winstonLogger','error','41898aGWLIA','clearLogs','parse','green','duration','transports','setRawCommand','level','format','getWinstonInstance','timestamp','filter','existsSync','rawCommand','readLogs','message','994gDtfMg','warn','trim','addColors','2998728AytgVh','yellow','clear','utf8','command','now','details','blue','605624oPcnwp','combine','4673896gXGbgl','679745TWxjvy','unknown','754117YWoPQK','initWinstonLogger','mkdirSync','setLogPath','toISOString','完成:\x20','stringify','info','createLogger','18eOSfaV','Failed\x20to\x20clear\x20logs:','success','currentRawCommand','dirname','开始执行:\x20','6LCjstR','5139070fftZCd','logFilePath','red','map'];a239_0x4f49=function(){return _0x53b66a;};return a239_0x4f49();}class Logger{[a239_0x4370d3(0x1d4)];[a239_0x4370d3(0x1d1)];['currentRawCommand']='';constructor(){this['logFilePath']='';}[a239_0x4370d3(0x1dc)](_0x5294f6){const _0x4afb2c=a239_0x4370d3;this[_0x4afb2c(0x1cc)]=_0x5294f6;}[a239_0x4370d3(0x1c1)](){const _0x45c093=a239_0x4370d3,_0x59c9dc=a239_0x17bf60[_0x45c093(0x1cd)](this[_0x45c093(0x1d1)]);!a239_0x3f2254[_0x45c093(0x1e2)](_0x59c9dc)&&a239_0x3f2254[_0x45c093(0x1c2)](_0x59c9dc,{'recursive':!![]});const _0x4d9109=a239_0x5e2519[_0x45c093(0x1de)][_0x45c093(0x1f3)](a239_0x5e2519[_0x45c093(0x1de)]['timestamp'](),a239_0x5e2519['format']['errors']({'stack':!![]}),a239_0x5e2519[_0x45c093(0x1de)]['printf'](_0x14a9f1=>{const _0x5249de=_0x45c093,_0x55a9f0={'timestamp':_0x14a9f1[_0x5249de(0x1e0)]||new Date()[_0x5249de(0x1c4)](),'level':_0x14a9f1[_0x5249de(0x1dd)]||_0x5249de(0x1c7),'command':_0x14a9f1[_0x5249de(0x1ee)]||_0x5249de(0x1bf),'rawCommand':_0x14a9f1[_0x5249de(0x1e3)]||this['currentRawCommand']||undefined,'message':_0x14a9f1[_0x5249de(0x1e5)]||'','duration':_0x14a9f1[_0x5249de(0x1da)]||undefined,'details':_0x14a9f1[_0x5249de(0x1f0)]||undefined};return JSON[_0x5249de(0x1c6)](_0x55a9f0);}));this[_0x45c093(0x1d4)]=a239_0x5e2519[_0x45c093(0x1c8)]({'level':_0x45c093(0x1c7),'format':_0x4d9109,'transports':[new a239_0x5e2519[(_0x45c093(0x1db))]['File']({'filename':this[_0x45c093(0x1d1)],'level':'info'})],'silent':![]}),a239_0x5e2519[_0x45c093(0x1e9)]({'success':_0x45c093(0x1d9),'error':_0x45c093(0x1d2),'warn':_0x45c093(0x1eb),'info':_0x45c093(0x1f1)});}[a239_0x4370d3(0x1c3)](_0x412b36){const _0xf9d80e=a239_0x4370d3;this[_0xf9d80e(0x1d1)]=a239_0x17bf60['join'](_0x412b36,'.lovrabet.log'),this['winstonLogger']&&this[_0xf9d80e(0x1d4)][_0xf9d80e(0x1ec)](),this['initWinstonLogger']();}[a239_0x4370d3(0x1c7)](_0x1a55e3,_0x2f7167,_0x2591c0){const _0x2e4e44=a239_0x4370d3;if(!this[_0x2e4e44(0x1d1)]||!this[_0x2e4e44(0x1d4)])return;this[_0x2e4e44(0x1d4)][_0x2e4e44(0x1c7)](_0x2f7167,{'command':_0x1a55e3,'details':_0x2591c0});}[a239_0x4370d3(0x1cb)](_0x1bbd98,_0x298a32,_0x121541,_0x299b34){const _0x2dc107=a239_0x4370d3;if(!this['logFilePath']||!this['winstonLogger'])return;this[_0x2dc107(0x1d4)]['log']('info',_0x298a32,{'level':'success','command':_0x1bbd98,'duration':_0x121541,'details':_0x299b34});}[a239_0x4370d3(0x1d5)](_0x2310d0,_0x4032f8,_0x5c818b){const _0x5e0247=a239_0x4370d3;if(!this[_0x5e0247(0x1d1)]||!this['winstonLogger'])return;this['winstonLogger'][_0x5e0247(0x1d5)](_0x4032f8,{'command':_0x2310d0,'details':_0x5c818b});}['warn'](_0xca42d7,_0x6d3e43,_0x32b392){const _0x25ac94=a239_0x4370d3;if(!this['logFilePath']||!this[_0x25ac94(0x1d4)])return;this[_0x25ac94(0x1d4)][_0x25ac94(0x1e7)](_0x6d3e43,{'command':_0xca42d7,'details':_0x32b392});}async['logTask'](_0x28cad0,_0x11c5b4,_0x4f89a4){const _0x58ca32=a239_0x4370d3,_0x580ab0=Date[_0x58ca32(0x1ef)]();this[_0x58ca32(0x1c7)](_0x28cad0,_0x58ca32(0x1ce)+_0x11c5b4);try{const _0x720396=await _0x4f89a4(),_0x4853e5=Date['now']()-_0x580ab0;return this[_0x58ca32(0x1cb)](_0x28cad0,_0x58ca32(0x1c5)+_0x11c5b4,_0x4853e5),_0x720396;}catch(_0x5ce564){const _0x1e3f3d=Date[_0x58ca32(0x1ef)]()-_0x580ab0;this['error'](_0x28cad0,'失败:\x20'+_0x11c5b4,{'error':_0x5ce564 instanceof Error?_0x5ce564[_0x58ca32(0x1e5)]:String(_0x5ce564),'duration':_0x1e3f3d});throw _0x5ce564;}}[a239_0x4370d3(0x1e4)](){const _0x1c6238=a239_0x4370d3;try{if(!a239_0x3f2254[_0x1c6238(0x1e2)](this['logFilePath']))return[];const _0x15781c=a239_0x3f2254['readFileSync'](this[_0x1c6238(0x1d1)],_0x1c6238(0x1ed));return _0x15781c['split']('\x0a')[_0x1c6238(0x1e1)](_0x29220c=>_0x29220c[_0x1c6238(0x1e8)]())[_0x1c6238(0x1d3)](_0x4f1e6b=>JSON[_0x1c6238(0x1d8)](_0x4f1e6b));}catch(_0x5ddf54){return console[_0x1c6238(0x1e7)]('Failed\x20to\x20read\x20logs:',_0x5ddf54),[];}}[a239_0x4370d3(0x1d7)](){const _0x5f442f=a239_0x4370d3;try{a239_0x3f2254[_0x5f442f(0x1e2)](this[_0x5f442f(0x1d1)])&&a239_0x3f2254['writeFileSync'](this[_0x5f442f(0x1d1)],'',_0x5f442f(0x1ed));}catch(_0xef6c07){console['warn'](_0x5f442f(0x1ca),_0xef6c07);}}[a239_0x4370d3(0x1df)](){const _0x60490a=a239_0x4370d3;return this[_0x60490a(0x1d4)];}}function a239_0x231b(_0xd7a5b1,_0x4003c8){_0xd7a5b1=_0xd7a5b1-0x1bd;const _0x4f497a=a239_0x4f49();let _0x231bd2=_0x4f497a[_0xd7a5b1];return _0x231bd2;}export const logger=new Logger();
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a240_0x4249(_0x23547b,_0x632bb0){_0x23547b=_0x23547b-0xec;const _0x575ed6=a240_0x575e();let _0x424941=_0x575ed6[_0x23547b];return _0x424941;}(function(_0x221968,_0x45b085){const _0x54d808=a240_0x4249,_0x38bf93=_0x221968();while(!![]){try{const _0x24b36a=parseInt(_0x54d808(0xf4))/0x1+-parseInt(_0x54d808(0xed))/0x2*(parseInt(_0x54d808(0xf9))/0x3)+-parseInt(_0x54d808(0xf8))/0x4+parseInt(_0x54d808(0xf0))/0x5+parseInt(_0x54d808(0xf1))/0x6+parseInt(_0x54d808(0xfa))/0x7*(parseInt(_0x54d808(0xec))/0x8)+parseInt(_0x54d808(0xf3))/0x9;if(_0x24b36a===_0x45b085)break;else _0x38bf93['push'](_0x38bf93['shift']());}catch(_0x2bd195){_0x38bf93['push'](_0x38bf93['shift']());}}}(a240_0x575e,0x356ee));import{CliErrors}from'../errors.js';function a240_0x575e(){const _0x199769=['object','validation','649105WDYQoI','430824PNDiTU','Invalid\x20JSON\x20for\x20--params:\x20','1043532VrOaPi','76245taQhDx','isArray','--params\x20must\x20be\x20a\x20JSON\x20object','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','897940nktbGk','822714AkTlHm','7dtUGuS','2590136hxRRqd','2evMBWN'];a240_0x575e=function(){return _0x199769;};return a240_0x575e();}export function parseJsonParams(_0x27ac78){const _0xd90522=a240_0x4249;if(!_0x27ac78)return undefined;let _0x2e5d75;try{_0x2e5d75=JSON['parse'](_0x27ac78);}catch{throw CliErrors['validation'](_0xd90522(0xf2)+_0x27ac78);}if(!_0x2e5d75||typeof _0x2e5d75!==_0xd90522(0xee)||Array[_0xd90522(0xf5)](_0x2e5d75))throw CliErrors[_0xd90522(0xef)](_0xd90522(0xf6),_0xd90522(0xf7));return _0x2e5d75;}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a241_0xe66d8b=a241_0x39bc;function a241_0xd29a(){const _0x4b5146=['65skvJtI','108rWtUgg','platform','4052yQVUvN','10453927Grodol','.cmd','142pfDrfx','232136KWWWUE','9eWgBjT','3245896WZdRBE','win32','367717UlMZER','6310990MLzNbz','582642QylEVM'];a241_0xd29a=function(){return _0x4b5146;};return a241_0xd29a();}(function(_0x15c970,_0x37818d){const _0x57f31a=a241_0x39bc,_0x15254d=_0x15c970();while(!![]){try{const _0x1dd2cf=parseInt(_0x57f31a(0x193))/0x1*(-parseInt(_0x57f31a(0x196))/0x2)+-parseInt(_0x57f31a(0x18f))/0x3+parseInt(_0x57f31a(0x197))/0x4*(parseInt(_0x57f31a(0x190))/0x5)+parseInt(_0x57f31a(0x191))/0x6*(parseInt(_0x57f31a(0x18d))/0x7)+-parseInt(_0x57f31a(0x18b))/0x8*(parseInt(_0x57f31a(0x198))/0x9)+parseInt(_0x57f31a(0x18e))/0xa+-parseInt(_0x57f31a(0x194))/0xb;if(_0x1dd2cf===_0x37818d)break;else _0x15254d['push'](_0x15254d['shift']());}catch(_0x3c0d3a){_0x15254d['push'](_0x15254d['shift']());}}}(a241_0xd29a,0x7862b));function a241_0x39bc(_0x437c5d,_0x3c3013){_0x437c5d=_0x437c5d-0x18b;const _0xd29a7c=a241_0xd29a();let _0x39bce1=_0xd29a7c[_0x437c5d];return _0x39bce1;}export const isWindows=process[a241_0xe66d8b(0x192)]===a241_0xe66d8b(0x18c);export function resolveNpmBin(_0xa8b429){const _0x4eb19e=a241_0xe66d8b;return isWindows?_0xa8b429+_0x4eb19e(0x195):_0xa8b429;}
|
package/lib/utils/rules-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a242_0x1439ab=a242_0x1c9b;(function(_0x35902c,_0x22ed8e){const _0x45f159=a242_0x1c9b,_0x391019=_0x35902c();while(!![]){try{const _0x582dbf=parseInt(_0x45f159(0x136))/0x1+parseInt(_0x45f159(0x13a))/0x2+-parseInt(_0x45f159(0x148))/0x3+-parseInt(_0x45f159(0x14a))/0x4+-parseInt(_0x45f159(0x13d))/0x5+parseInt(_0x45f159(0x147))/0x6+parseInt(_0x45f159(0x138))/0x7;if(_0x582dbf===_0x22ed8e)break;else _0x391019['push'](_0x391019['shift']());}catch(_0x107336){_0x391019['push'](_0x391019['shift']());}}}(a242_0x30af,0x62783));import{existsSync,mkdirSync,readFileSync,writeFileSync}from'node:fs';import{dirname,join,resolve}from'node:path';function a242_0x30af(){const _0x3d484d=['CDN\x20请求失败:\x20','content','lastUpdated','本地模板文件不存在:\x20','../../templates/rules/lovrabet_rules.mdc.tpl','3673974tpjabg','771054houBBt','agents.md','2471008nOceXC','691539pFdJml','string','1577625JKDGKm','/rules/rules.json','868096bbHrlA','catch','application/json','3425950gjTvRT','CDN\x20返回数据格式错误','statusText','json','status'];a242_0x30af=function(){return _0x3d484d;};return a242_0x30af();}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 _0x484125=a242_0x1c9b,_0x11d799=getTemplateBaseUrl();return _0x11d799+_0x484125(0x139);}const LOCAL_TEMPLATE_PATH=resolve(__dirname,a242_0x1439ab(0x146));export async function fetchRulesFromCDN(){const _0x144e5c=a242_0x1439ab,_0x2ac1cb=getRulesCdnUrl(),_0x47291b=await fetch(_0x2ac1cb,{'headers':{'Accept':_0x144e5c(0x13c)}});if(!_0x47291b['ok'])throw new Error(_0x144e5c(0x142)+_0x47291b[_0x144e5c(0x141)]+'\x20'+_0x47291b[_0x144e5c(0x13f)]);const _0x26a9f3=await _0x47291b[_0x144e5c(0x140)]();if(!_0x26a9f3[_0x144e5c(0x143)]||typeof _0x26a9f3[_0x144e5c(0x143)]!==_0x144e5c(0x137))throw new Error(_0x144e5c(0x13e));return _0x26a9f3;}export async function getRulesContent(){const _0x4a0ec7=a242_0x1439ab;try{const _0x47023d=await fetchRulesFromCDN();return _0x47023d[_0x4a0ec7(0x143)];}catch{return readLocalTemplate();}}export function readLocalTemplate(){const _0x2797a3=a242_0x1439ab;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,'utf-8');throw new Error(_0x2797a3(0x145)+LOCAL_TEMPLATE_PATH);}export async function writeRulesFile(_0x32b5d1){const _0x47b3ea=a242_0x1439ab,_0x499f0e=await fetchRulesFromCDN()[_0x47b3ea(0x13b)](()=>null);let _0x55f077;_0x499f0e?(_0x55f077=_0x499f0e[_0x47b3ea(0x143)],_0x499f0e['lastUpdated']&&(_0x55f077=appendUpdateTime(_0x55f077,_0x499f0e[_0x47b3ea(0x144)]))):_0x55f077=readLocalTemplate();const _0x1ab0e2=dirname(_0x32b5d1);!existsSync(_0x1ab0e2)&&mkdirSync(_0x1ab0e2,{'recursive':!![]}),writeFileSync(_0x32b5d1,_0x55f077,'utf-8');}export async function copyRulesToCursor(_0x5d8b44){const _0xdb06c9=join(_0x5d8b44,'.cursor/rules'),_0x64840=join(_0xdb06c9,'lovrabet_rules.mdc');if(existsSync(_0x64840))return![];return await writeRulesFile(_0x64840),!![];}function a242_0x1c9b(_0x5348d6,_0x42e4b4){_0x5348d6=_0x5348d6-0x136;const _0x30af4e=a242_0x30af();let _0x1c9b15=_0x30af4e[_0x5348d6];return _0x1c9b15;}export async function copyRulesToAgentsMd(_0x212209){const _0xdaf610=a242_0x1439ab,_0x2be785=join(_0x212209,_0xdaf610(0x149));if(existsSync(_0x2be785))return![];return await writeRulesFile(_0x2be785),!![];}
|
package/lib/utils/sleep.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function sleep(
|
|
1
|
+
export function sleep(_0x297847){return new Promise(_0x2b4b37=>setTimeout(_0x2b4b37,_0x297847));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a244_0x30ba35=a244_0x3aeb;function a244_0x4731(){const _0x276038=['1061608hJKVjV','isDirectory','\x20},','message','includes','toComponentName','toISOString','模板内容替换完成','8877092ISTjBg','.tsx','push','alias','error','datasetCode','formatLocalTimestamp','LOVRABET','endsWith','80343xRqhws','datasetCode:\x20\x22','slice','getMonth','.js','writeFile','.ts','toLowerCase','.tpl','replaceApiContent','readFile','tableName','processFile','extname','getDate','replace','toUpperCase','charAt','getSeconds','processDirectory','pop','promises','1220jMefBG','.scss','.css','padStart','pad','isFile','api','utf8','toDisplayTitle','default','mkdir','1130mmoGvE','模板内容替换失败','69262XOgNCt','.jsx','join','5509680UdQdzx','template','split','now','name:\x20\x22','37374VXNnHo','8988048YjZdmW','replaceContent','69XCfspq','readdir','YourModel','map','getFullYear','name','alias:\x20\x22'];a244_0x4731=function(){return _0x276038;};return a244_0x4731();}(function(_0x4bd3f5,_0x378e1f){const _0x3d046b=a244_0x3aeb,_0x24a98c=_0x4bd3f5();while(!![]){try{const _0x13ac13=parseInt(_0x3d046b(0x1e3))/0x1+-parseInt(_0x3d046b(0x1d1))/0x2*(parseInt(_0x3d046b(0x1dc))/0x3)+-parseInt(_0x3d046b(0x1d4))/0x4+parseInt(_0x3d046b(0x1c4))/0x5*(-parseInt(_0x3d046b(0x1d9))/0x6)+parseInt(_0x3d046b(0x1a5))/0x7+parseInt(_0x3d046b(0x1da))/0x8+-parseInt(_0x3d046b(0x1ae))/0x9*(-parseInt(_0x3d046b(0x1cf))/0xa);if(_0x13ac13===_0x378e1f)break;else _0x24a98c['push'](_0x24a98c['shift']());}catch(_0x5e9057){_0x24a98c['push'](_0x24a98c['shift']());}}}(a244_0x4731,0xbb8d4));import a244_0x507818 from'node:fs';function a244_0x3aeb(_0xfe3149,_0x86760d){_0xfe3149=_0xfe3149-0x1a5;const _0x473132=a244_0x4731();let _0x3aeb79=_0x473132[_0xfe3149];return _0x3aeb79;}import a244_0xdb3630 from'node:path';import{logger}from'../utils/logger.js';import{getCliVersion}from'../utils/version.js';const CLI_VERSION=getCliVersion();export class TemplateReplacer{static[a244_0x30ba35(0x1c8)](_0x45fd32){const _0x596ef5=a244_0x30ba35;return String(_0x45fd32)[_0x596ef5(0x1c7)](0x2,'0');}static[a244_0x30ba35(0x1ab)](_0x317a39){const _0x171347=a244_0x30ba35,_0x4a4fd9=_0x317a39[_0x171347(0x1e0)](),_0x245a7e=this[_0x171347(0x1c8)](_0x317a39[_0x171347(0x1b1)]()+0x1),_0x1d4fb9=this[_0x171347(0x1c8)](_0x317a39[_0x171347(0x1bc)]()),_0x5ec30d=this[_0x171347(0x1c8)](_0x317a39['getHours']()),_0x208985=this[_0x171347(0x1c8)](_0x317a39['getMinutes']()),_0x3f6e4f=this[_0x171347(0x1c8)](_0x317a39[_0x171347(0x1c0)]());return{'createdAt':_0x4a4fd9+'-'+_0x245a7e+'-'+_0x1d4fb9+'\x20'+_0x5ec30d+':'+_0x208985+':'+_0x3f6e4f,'createdDate':_0x4a4fd9+'-'+_0x245a7e+'-'+_0x1d4fb9,'createdTime':_0x5ec30d+':'+_0x208985+':'+_0x3f6e4f};}static[a244_0x30ba35(0x1e8)](_0x4f23ee){const _0x174ada=a244_0x30ba35,_0x377d37=_0x4f23ee[_0x174ada(0x1d6)]('/')[_0x174ada(0x1c2)]()||_0x4f23ee;return _0x377d37[_0x174ada(0x1d6)]('-')[_0x174ada(0x1df)](_0x4d9638=>_0x4d9638[_0x174ada(0x1bf)](0x0)[_0x174ada(0x1be)]()+_0x4d9638[_0x174ada(0x1b0)](0x1)[_0x174ada(0x1b5)]())[_0x174ada(0x1d3)]('');}static['toDisplayTitle'](_0x4630af){const _0x36e1da=a244_0x30ba35,_0x590930=_0x4630af[_0x36e1da(0x1d6)]('/')[_0x36e1da(0x1c2)]()||_0x4630af;return _0x590930[_0x36e1da(0x1d6)]('-')[_0x36e1da(0x1df)](_0x2e74f=>_0x2e74f['charAt'](0x0)[_0x36e1da(0x1be)]()+_0x2e74f[_0x36e1da(0x1b0)](0x1)[_0x36e1da(0x1b5)]())[_0x36e1da(0x1d3)]('\x20');}static[a244_0x30ba35(0x1db)](_0x36e5f6,_0x1feb73,_0x2eefdd){const _0x11c94f=a244_0x30ba35,_0x41828e=this[_0x11c94f(0x1e8)](_0x1feb73),_0x253fe3=this[_0x11c94f(0x1cc)](_0x1feb73),{createdAt:_0x188e41,createdDate:_0x2e87d2,createdTime:_0x2a2e7e}=this[_0x11c94f(0x1ab)](new Date());let _0x51039=_0x36e5f6['replace'](/\{CliVersion\}/g,CLI_VERSION)[_0x11c94f(0x1bd)](/\{ComponentName\}/g,_0x41828e)[_0x11c94f(0x1bd)](/\{DisplayTitle\}/g,_0x253fe3)[_0x11c94f(0x1bd)](/\{PageName\}/g,_0x1feb73)[_0x11c94f(0x1bd)](/\{TemplateName\}/g,_0x2eefdd)[_0x11c94f(0x1bd)](/\{CreatedAt\}/g,_0x188e41)[_0x11c94f(0x1bd)](/\{CreatedDate\}/g,_0x2e87d2)[_0x11c94f(0x1bd)](/\{CreatedTime\}/g,_0x2a2e7e);return _0x51039;}static[a244_0x30ba35(0x1b7)](_0x3c576e,_0x55942b,_0x2dd123,_0x53da6d,_0xd4dfd8,_0xe53e57,_0x512065,_0x2e8e19){const _0x1ab2da=a244_0x30ba35,_0x1bdcce=new Date(),_0x491146=_0x1bdcce[_0x1ab2da(0x1e9)](),_0x13e49a=_0x2dd123['map'](_0x42da09=>{const _0x1a25f4=_0x1ab2da,_0x4194f2=[_0x1a25f4(0x1af)+_0x42da09[_0x1a25f4(0x1aa)]+'\x22','tableName:\x20\x22'+_0x42da09[_0x1a25f4(0x1b9)]+'\x22',_0x1a25f4(0x1d8)+_0x42da09['name']+'\x22'];return _0x42da09[_0x1a25f4(0x1a8)]&&_0x4194f2[_0x1a25f4(0x1a7)](_0x1a25f4(0x1e2)+_0x42da09[_0x1a25f4(0x1a8)]+'\x22'),'\x0a\x20\x20\x20\x20{\x20'+_0x4194f2[_0x1a25f4(0x1d3)](',\x20')+_0x1a25f4(0x1e5);})[_0x1ab2da(0x1d3)](''),_0x24436f=_0x53da6d||_0x2dd123[0x0]?.[_0x1ab2da(0x1a8)]||_0x1ab2da(0x1de);let _0x4b5369=_0x3c576e[_0x1ab2da(0x1bd)](/\{AppCode\}/g,_0x55942b)['replace'](/\{ModelConfigs\}/g,_0x13e49a)[_0x1ab2da(0x1bd)](/\{ExampleModelName\}/g,_0x24436f)[_0x1ab2da(0x1bd)](/\{ApiFileName\}/g,_0xd4dfd8||_0x1ab2da(0x1ca))[_0x1ab2da(0x1bd)](/\{ConfigName\}/g,_0xe53e57||_0x1ab2da(0x1cd))['replace'](/\{ClientConfigParam\}/g,_0x512065||'')[_0x1ab2da(0x1bd)](/\{VarPrefix\}/g,_0x2e8e19||_0x1ab2da(0x1ac))[_0x1ab2da(0x1bd)](/\{CreatedAt\}/g,_0x491146);return _0x4b5369;}static async['processTemplate'](_0x5aa659,_0x508620,_0xce5d16,_0x3d74c8,_0x277cd9=!![]){const _0x447133=a244_0x30ba35,_0x230c2b=Date['now']();try{_0x277cd9&&logger['info'](_0x447133(0x1d5),'开始处理模板内容替换',{'templatePath':_0x5aa659,'targetPath':_0x508620,'pageName':_0xce5d16,'templateName':_0x3d74c8});await a244_0x507818[_0x447133(0x1c3)]['mkdir'](_0x508620,{'recursive':!![]}),await this[_0x447133(0x1c1)](_0x5aa659,_0x508620,_0xce5d16,_0x3d74c8);if(_0x277cd9){const _0x1bdc25=Date['now']()-_0x230c2b;logger['success']('template',_0x447133(0x1ea),_0x1bdc25,{'pageName':_0xce5d16,'templateName':_0x3d74c8});}}catch(_0x1a8888){if(_0x277cd9){const _0x1913ce=Date[_0x447133(0x1d7)]()-_0x230c2b;logger[_0x447133(0x1a9)](_0x447133(0x1d5),_0x447133(0x1d0),{'templatePath':_0x5aa659,'targetPath':_0x508620,'pageName':_0xce5d16,'templateName':_0x3d74c8,'error':_0x1a8888 instanceof Error?_0x1a8888[_0x447133(0x1e6)]:String(_0x1a8888),'duration':_0x1913ce});}throw _0x1a8888;}}static async[a244_0x30ba35(0x1c1)](_0x5c7251,_0x35e886,_0x10ca75,_0x342092){const _0x1c72fa=a244_0x30ba35,_0x4e4360=await a244_0x507818[_0x1c72fa(0x1c3)][_0x1c72fa(0x1dd)](_0x5c7251,{'withFileTypes':!![]});for(const _0x3654df of _0x4e4360){const _0x5e4f36=a244_0xdb3630['join'](_0x5c7251,_0x3654df[_0x1c72fa(0x1e1)]);let _0x56995f=a244_0xdb3630[_0x1c72fa(0x1d3)](_0x35e886,_0x3654df[_0x1c72fa(0x1e1)]);_0x3654df[_0x1c72fa(0x1e1)][_0x1c72fa(0x1ad)](_0x1c72fa(0x1b6))&&(_0x56995f=a244_0xdb3630[_0x1c72fa(0x1d3)](_0x35e886,_0x3654df[_0x1c72fa(0x1e1)][_0x1c72fa(0x1bd)](/\.tpl$/,'')));if(_0x3654df[_0x1c72fa(0x1e4)]())await a244_0x507818[_0x1c72fa(0x1c3)][_0x1c72fa(0x1ce)](_0x56995f,{'recursive':!![]}),await this[_0x1c72fa(0x1c1)](_0x5e4f36,_0x56995f,_0x10ca75,_0x342092);else _0x3654df[_0x1c72fa(0x1c9)]()&&await this[_0x1c72fa(0x1ba)](_0x5e4f36,_0x56995f,_0x10ca75,_0x342092);}}static async['processFile'](_0x3a2b50,_0x45c907,_0x2ac7de,_0x5d6995){const _0x28977b=a244_0x30ba35,_0xbc8301=a244_0xdb3630[_0x28977b(0x1bb)](_0x3a2b50)['toLowerCase']();_0x3a2b50[_0x28977b(0x1ad)](_0x28977b(0x1b6))&&(_0x45c907=_0x45c907[_0x28977b(0x1bd)](/\.tpl$/,''));const _0x37aa58=[_0x28977b(0x1a6),_0x28977b(0x1b4),_0x28977b(0x1d2),_0x28977b(0x1b2),'.json','.md',_0x28977b(0x1c6),_0x28977b(0x1c5),'.tpl'];if(_0x37aa58[_0x28977b(0x1e7)](_0xbc8301)||_0x3a2b50[_0x28977b(0x1ad)](_0x28977b(0x1b6))){const _0x215048=await a244_0x507818['promises'][_0x28977b(0x1b8)](_0x3a2b50,_0x28977b(0x1cb)),_0x3b9185=this[_0x28977b(0x1db)](_0x215048,_0x2ac7de,_0x5d6995);await a244_0x507818[_0x28977b(0x1c3)][_0x28977b(0x1b3)](_0x45c907,_0x3b9185,_0x28977b(0x1cb));}else await a244_0x507818['promises']['copyFile'](_0x3a2b50,_0x45c907);}}
|