@lovrabet/rabetbase-cli 2.1.14-beta.3 → 2.2.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/discover.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app/use.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -0
- package/lib/commands/dataset/relation-delete.js +1 -0
- package/lib/commands/dataset/relation-shared.js +1 -0
- package/lib/commands/dataset/relation-update.js +1 -0
- package/lib/commands/dataset/relations.js +1 -0
- 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/relation-audit.js +1 -0
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/init.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -0
- 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/commands/dataset/link-create.js +0 -1
- package/lib/commands/dataset/link-delete.js +0 -1
- package/lib/commands/dataset/link-shared.js +0 -1
- package/lib/commands/dataset/link-update.js +0 -1
- package/lib/commands/dataset/links.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a172_0x1223(){const _0x32894b=['6CgQGyw','18xwHPwU','5790350LQUhKE','11yLekXt','200974VCjKpv','135088GaNwee','29141zbqBOX','3457710AoBHWL','72456XiTQcq','8lNeMDa','512730hzjSrU'];a172_0x1223=function(){return _0x32894b;};return a172_0x1223();}function a172_0x87ea(_0x281de4,_0x459647){_0x281de4=_0x281de4-0x13c;const _0x12238d=a172_0x1223();let _0x87eadb=_0x12238d[_0x281de4];return _0x87eadb;}(function(_0x3dacd2,_0x289e52){const _0x39daba=a172_0x87ea,_0x106bde=_0x3dacd2();while(!![]){try{const _0x578fd0=parseInt(_0x39daba(0x142))/0x1+-parseInt(_0x39daba(0x143))/0x2*(parseInt(_0x39daba(0x13e))/0x3)+parseInt(_0x39daba(0x146))/0x4+-parseInt(_0x39daba(0x13d))/0x5*(-parseInt(_0x39daba(0x13f))/0x6)+-parseInt(_0x39daba(0x144))/0x7*(-parseInt(_0x39daba(0x13c))/0x8)+parseInt(_0x39daba(0x145))/0x9+parseInt(_0x39daba(0x140))/0xa*(-parseInt(_0x39daba(0x141))/0xb);if(_0x578fd0===_0x289e52)break;else _0x106bde['push'](_0x106bde['shift']());}catch(_0x28ca92){_0x106bde['push'](_0x106bde['shift']());}}}(a172_0x1223,0x310fc));import{buildSchemaPayload as a172_0x3eff43}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{getCliVersion}from'../utils/version.js';export async function buildSchemaPayload(){const {serviceRegistry:_0xad664,findDefinition:_0x32379e}=await import('../commands/registry.js');return a172_0x3eff43({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':process.env.GIT_COMMIT??'','globalFlags':GLOBAL_FLAGS,'serviceRegistry':_0xad664,'buildAllFlags':buildAllFlags,'findDefinition':_0x32379e});}
|
package/lib/framework/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a173_0x11b7(){var _0x411d0d=['3437876VjUnwQ','1294092CYgLtf','2079hbwfnV','48808bMmbdW','3202776xZMYDF','1115927vONpzD','936746TfRVGw','4354070AZpPyl'];a173_0x11b7=function(){return _0x411d0d;};return a173_0x11b7();}(function(_0xebd8d2,_0x33f25e){var _0x5310c9=a173_0x2d1f,_0x1ef6a0=_0xebd8d2();while(!![]){try{var _0x5a4163=parseInt(_0x5310c9(0x118))/0x1+-parseInt(_0x5310c9(0x119))/0x2+-parseInt(_0x5310c9(0x114))/0x3+parseInt(_0x5310c9(0x113))/0x4+parseInt(_0x5310c9(0x11a))/0x5+parseInt(_0x5310c9(0x117))/0x6+parseInt(_0x5310c9(0x115))/0x7*(-parseInt(_0x5310c9(0x116))/0x8);if(_0x5a4163===_0x33f25e)break;else _0x1ef6a0['push'](_0x1ef6a0['shift']());}catch(_0x2a9a28){_0x1ef6a0['push'](_0x1ef6a0['shift']());}}}(a173_0x11b7,0xa3270));function a173_0x2d1f(_0x8a3243,_0x4cdc99){_0x8a3243=_0x8a3243-0x113;var _0x11b71d=a173_0x11b7();var _0x2d1fee=_0x11b71d[_0x8a3243];return _0x2d1fee;}export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a174_0x318f(_0x73d5af,_0x5461b0){_0x73d5af=_0x73d5af-0x9e;const _0xc8632a=a174_0xc863();let _0x318f16=_0xc8632a[_0x73d5af];return _0x318f16;}const a174_0x17bce5=a174_0x318f;(function(_0x3ee953,_0x1aec82){const _0x25857f=a174_0x318f,_0x1a3e00=_0x3ee953();while(!![]){try{const _0x4eadce=parseInt(_0x25857f(0xa7))/0x1+parseInt(_0x25857f(0xa5))/0x2+-parseInt(_0x25857f(0xa0))/0x3*(parseInt(_0x25857f(0xa2))/0x4)+parseInt(_0x25857f(0x9f))/0x5*(parseInt(_0x25857f(0xa9))/0x6)+-parseInt(_0x25857f(0xa4))/0x7*(parseInt(_0x25857f(0xaa))/0x8)+parseInt(_0x25857f(0x9e))/0x9*(-parseInt(_0x25857f(0xa3))/0xa)+parseInt(_0x25857f(0xa6))/0xb;if(_0x4eadce===_0x1aec82)break;else _0x1a3e00['push'](_0x1a3e00['shift']());}catch(_0x513530){_0x1a3e00['push'](_0x1a3e00['shift']());}}}(a174_0xc863,0xc0c4f));export const VERSION='2.2.0-beta.2';function a174_0xc863(){const _0x5315f3=['2356714HQYAtf','5984594qPuGit','1485032BIFOcn','v2.2.0','1590JsScXG','2039264ZpAEin','959994jBsSHo','7450PjdSiL','24MMGaLW','2026-06-11T13:31:35.785Z','330664fTdgpy','130YzbRJY','21PFRUZb'];a174_0xc863=function(){return _0x5315f3;};return a174_0xc863();}export const GIT_TAG=a174_0x17bce5(0xa8);export const GIT_COMMIT='da78798';export const BUILD_TIME=a174_0x17bce5(0xa1);
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a175_0x1cc8(){var _0x51be6b=['258CdaFhq','green','\x20--help','bold','\x20to\x20view\x20available\x20commands.','810530CuxgaI','39311PGDrKG','712OYqtDd','72fJdDHN','338704lAVNYW','31367vqVLBM','5HyYMlc','12774FYjnLj','26601lJMZkO','\x20\x20Use\x20','8844033zCspki','log'];a175_0x1cc8=function(){return _0x51be6b;};return a175_0x1cc8();}function a175_0x290c(_0x3644b2,_0x15fe7c){_0x3644b2=_0x3644b2-0x126;var _0x1cc8bd=a175_0x1cc8();var _0x290ce8=_0x1cc8bd[_0x3644b2];return _0x290ce8;}(function(_0x2509eb,_0x477351){var _0x22ce91=a175_0x290c,_0x496fea=_0x2509eb();while(!![]){try{var _0x134979=-parseInt(_0x22ce91(0x134))/0x1+parseInt(_0x22ce91(0x12e))/0x2*(parseInt(_0x22ce91(0x12a))/0x3)+parseInt(_0x22ce91(0x126))/0x4+-parseInt(_0x22ce91(0x128))/0x5*(parseInt(_0x22ce91(0x129))/0x6)+-parseInt(_0x22ce91(0x127))/0x7*(parseInt(_0x22ce91(0x135))/0x8)+parseInt(_0x22ce91(0x136))/0x9*(parseInt(_0x22ce91(0x133))/0xa)+-parseInt(_0x22ce91(0x12c))/0xb;if(_0x134979===_0x477351)break;else _0x496fea['push'](_0x496fea['shift']());}catch(_0x2e2987){_0x496fea['push'](_0x496fea['shift']());}}}(a175_0x1cc8,0x9a773));import a175_0x4ae488 from'chalk';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function showHelp(){var _0xc86f6c=a175_0x290c;console[_0xc86f6c(0x12d)](),console[_0xc86f6c(0x12d)](a175_0x4ae488[_0xc86f6c(0x12f)][_0xc86f6c(0x131)]('\x20\x20'+CLI_DISPLAY_NAME)),console[_0xc86f6c(0x12d)](),console[_0xc86f6c(0x12d)](_0xc86f6c(0x12b)+a175_0x4ae488['green'][_0xc86f6c(0x131)](CLI_BIN_NAME+_0xc86f6c(0x130))+_0xc86f6c(0x132)),console[_0xc86f6c(0x12d)]();}
|
package/lib/skills/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x101ee3,_0x25448e){const _0x43c93b=a176_0x5cbe,_0x6728c=_0x101ee3();while(!![]){try{const _0x1809eb=-parseInt(_0x43c93b(0x174))/0x1*(parseInt(_0x43c93b(0x171))/0x2)+parseInt(_0x43c93b(0x168))/0x3*(parseInt(_0x43c93b(0x176))/0x4)+parseInt(_0x43c93b(0x165))/0x5+parseInt(_0x43c93b(0x170))/0x6+parseInt(_0x43c93b(0x17b))/0x7+parseInt(_0x43c93b(0x172))/0x8*(parseInt(_0x43c93b(0x16e))/0x9)+-parseInt(_0x43c93b(0x15e))/0xa;if(_0x1809eb===_0x25448e)break;else _0x6728c['push'](_0x6728c['shift']());}catch(_0x47525e){_0x6728c['push'](_0x6728c['shift']());}}}(a176_0x18bd,0xbe04c));import{logger}from'../utils/logger.js';function a176_0x18bd(){const _0x5b3a2e=['6wAeuvl','dangerously-bff-save','log','cwd','\x20skill\x20--help\x0a\x20\x20','entries','54yCEQIM','help','6089262JenBCb','60794hlaTgn','1058312YPAbdG','\x0aAvailable\x20commands:','49fMoChi','\x20skill\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Interactive\x20skill\x20installation','2395796dRGoLi','(empty)','from','\x0aRabetbase\x20CLI\x20Skill\x20-\x20Developer\x20Workflow\x20Installation\x20Tool\x0a\x0aUsage:\x0a\x20\x20','-$1','1270353svIQdU','12502550KLpYVq','不支持的命令:\x20','slice','error','replace','\x20skill\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20help\x0a','argv','1650180LvQLTK','\x20skill\x20install\x0a\x0aEquivalent\x20command:\x20','includes'];a176_0x18bd=function(){return _0x5b3a2e;};return a176_0x18bd();}import{CLI_BIN_NAME}from'../constant/cli.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE}from'../skills/npx-skills-add.js';export function camelCaseFlagsToKebab(_0x2dffb2){const _0x50c037=a176_0x5cbe,_0xd8035d=[];for(const [_0x23c64b,_0x16a159]of Object[_0x50c037(0x16d)](_0x2dffb2)){if(_0x16a159===!![]){const _0x8a5a74=_0x23c64b[_0x50c037(0x162)](/([A-Z])/g,_0x50c037(0x17a))['toLowerCase']();_0xd8035d['push'](_0x8a5a74);}}return _0xd8035d;}export function parseDynamicFlags(){const _0x245130=a176_0x5cbe,_0x4006b0=[];for(let _0x24d2a0=0x3;_0x24d2a0<process['argv']['length'];_0x24d2a0++){const _0x52de7b=process[_0x245130(0x164)][_0x24d2a0];if(_0x52de7b&&_0x52de7b['startsWith']('--')){const _0x345463=_0x52de7b[_0x245130(0x160)](0x2);_0x345463&&!_0x345463[_0x245130(0x167)]('=')&&_0x4006b0['push'](_0x345463);}}return _0x4006b0;}function a176_0x5cbe(_0x30b7cd,_0x4b3abb){_0x30b7cd=_0x30b7cd-0x15e;const _0x18bd44=a176_0x18bd();let _0x5cbec4=_0x18bd44[_0x30b7cd];return _0x5cbec4;}export function getAllProvidedFlags(_0x13f759){const _0x39fce0=camelCaseFlagsToKebab(_0x13f759),_0x2ea7c2=parseDynamicFlags(),_0x124d75=new Set([..._0x39fce0,..._0x2ea7c2]);return Array['from'](_0x124d75);}export function normalizeLegacyBffSaveFlags(_0x387161){const _0x31155d=a176_0x5cbe,_0xdb506f=new Set(_0x387161);return _0xdb506f['has'](_0x31155d(0x169))&&_0xdb506f['add']('enable-bff-save'),Array[_0x31155d(0x178)](_0xdb506f);}const SKILLS_INSTALL_COMMAND_LINE=NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE;export async function skillsCommand(_0x5de898,_0x583f4e,_0x4722b4){const _0x2a5160=a176_0x5cbe;logger['setLogPath'](process[_0x2a5160(0x16b)]());if(_0x4722b4?.[_0x2a5160(0x16f)]||_0x5de898==='--help'){showHelp();return;}console['error']('Error:\x20Unsupported\x20command:\x20'+(_0x5de898||_0x2a5160(0x177))),console[_0x2a5160(0x16a)](_0x2a5160(0x173)),console[_0x2a5160(0x16a)]('\x20\x20'+CLI_BIN_NAME+_0x2a5160(0x175)),console['log']('\x20\x20'+CLI_BIN_NAME+_0x2a5160(0x163)),console[_0x2a5160(0x16a)](''),console[_0x2a5160(0x16a)]('Equivalent\x20command:\x20'+SKILLS_INSTALL_COMMAND_LINE),logger[_0x2a5160(0x161)]('skill',_0x2a5160(0x15f)+_0x5de898),process['exit'](0x1);}function showHelp(){const _0x47a881=a176_0x5cbe;console['log'](_0x47a881(0x179)+CLI_BIN_NAME+_0x47a881(0x16c)+CLI_BIN_NAME+_0x47a881(0x166)+SKILLS_INSTALL_COMMAND_LINE+'\x0a\x0aNote:\x20npx\x20skills\x20selects\x20the\x20agent\x20and\x20writes\x20files;\x20guides\x20live\x20under\x20skills/rabetbase/guides/.\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a177_0x56f1d9=a177_0xa7c7;(function(_0x266616,_0x280e49){const _0x20e5e9=a177_0xa7c7,_0x53c7ac=_0x266616();while(!![]){try{const _0x12483d=parseInt(_0x20e5e9(0x136))/0x1+parseInt(_0x20e5e9(0x11e))/0x2*(-parseInt(_0x20e5e9(0x127))/0x3)+-parseInt(_0x20e5e9(0x121))/0x4*(parseInt(_0x20e5e9(0x124))/0x5)+-parseInt(_0x20e5e9(0x123))/0x6+parseInt(_0x20e5e9(0x11d))/0x7+-parseInt(_0x20e5e9(0x137))/0x8*(parseInt(_0x20e5e9(0x12c))/0x9)+parseInt(_0x20e5e9(0x129))/0xa;if(_0x12483d===_0x280e49)break;else _0x53c7ac['push'](_0x53c7ac['shift']());}catch(_0x42e84c){_0x53c7ac['push'](_0x53c7ac['shift']());}}}(a177_0x3ae8,0x9b2b4));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';export const NPX_FLAG_YES='-y';export const SKILLS_FLAG_GLOBAL='-g';export const SKILLS_FLAG_YES='-y';function a177_0xa7c7(_0x58fb3a,_0x25556e){_0x58fb3a=_0x58fb3a-0x11b;const _0x3ae8f0=a177_0x3ae8();let _0xa7c769=_0x3ae8f0[_0x58fb3a];return _0xa7c769;}export const NPX_SKILLS_CLI=a177_0x56f1d9(0x134);export const NPX_SKILLS_SUBCOMMAND_ADD=a177_0x56f1d9(0x125);export const NPX_SKILLS_FLAG_SKILL=a177_0x56f1d9(0x132);export const RABETBASE_SKILL_SOURCE='lovrabet/rabetbase';export const LEGACY_RABETBASE_SKILL_SOURCE=a177_0x56f1d9(0x11c);export const DEFAULT_RABETBASE_SKILL_NAME=a177_0x56f1d9(0x138);function a177_0x3ae8(){const _0x20cefb=['8vzTbHz','Lovrabet','status','yes','lovrabet/lovrabet-skill','5530042RXviiu','4eEqujs','skill','npx','4Rdholc','trim','7240590plwnOo','547420IXBebK','add','join','1783167uhedFa','pipe','35176090lMBEHr','stdio','remove','11343042Eoenbj','inherit','stdout','unknown','exit\x20','log','--skill','stderr','skills','toString','93322BlDeAL'];a177_0x3ae8=function(){return _0x20cefb;};return a177_0x3ae8();}export function buildNpxSkillsAddArgv(_0x5c8a5f){const _0x38c3e6=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE];return _0x5c8a5f&&_0x38c3e6['push'](NPX_SKILLS_FLAG_SKILL,_0x5c8a5f),_0x38c3e6;}export const NPX_SKILLS_ADD_COMMAND_LINE=[a177_0x56f1d9(0x120),...buildNpxSkillsAddArgv()][a177_0x56f1d9(0x126)]('\x20');export const NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE=[a177_0x56f1d9(0x120),NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES][a177_0x56f1d9(0x126)]('\x20');export function shouldSkipNpxSkillsAdd(){return process.env.RABETBASE_SKIP_NPX_SKILLS==='1';}export function runNpxSkillsAdd(_0x29dac7,_0x28a0c7){const _0xc23542=a177_0x56f1d9;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x1e55e9=_0x28a0c7?.[_0xc23542(0x12a)]??_0xc23542(0x12d),_0x51a2e4=resolveNpmBin(_0xc23542(0x120)),_0xe1fdd1=buildNpxSkillsAddArgv(_0x28a0c7?.[_0xc23542(0x11f)]),_0x1d6134=[_0xc23542(0x120),..._0xe1fdd1][_0xc23542(0x126)]('\x20');console[_0xc23542(0x131)]('*\x20'+_0x1d6134);const _0x51133d=spawnSync(_0x51a2e4,_0xe1fdd1,{'cwd':_0x29dac7,'stdio':_0x1e55e9,'env':process.env,'shell':![]}),_0x5c275a=_0x51133d[_0xc23542(0x139)];if(_0x5c275a===0x0)return{'ok':!![],'status':0x0};let _0x42eb2f='exit\x20'+(_0x5c275a??_0xc23542(0x12f));if(_0x1e55e9===_0xc23542(0x128)){const _0x153689=_0x51133d['stderr']?_0x51133d['stderr'][_0xc23542(0x135)]()['trim']():'',_0x4a62d0=_0x51133d[_0xc23542(0x12e)]?_0x51133d[_0xc23542(0x12e)][_0xc23542(0x135)]()[_0xc23542(0x122)]():'';if(_0x153689)_0x42eb2f=_0x153689;else{if(_0x4a62d0)_0x42eb2f=_0x4a62d0;}}return{'ok':![],'status':_0x5c275a??null,'error':_0x42eb2f};}export function runNpxSkillsRemove(_0x162381,_0x45fd95,_0x1fcabd=LEGACY_RABETBASE_SKILL_SOURCE){const _0x581036=a177_0x56f1d9;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x1492a3=_0x45fd95?.['stdio']??_0x581036(0x12d),_0x2120fb=resolveNpmBin(_0x581036(0x120)),_0x3aa744=[NPX_FLAG_YES,NPX_SKILLS_CLI,_0x581036(0x12b),_0x1fcabd,NPX_SKILLS_FLAG_SKILL,_0x45fd95?.[_0x581036(0x11f)]??DEFAULT_RABETBASE_SKILL_NAME,..._0x45fd95?.[_0x581036(0x11b)]?['-y']:[]],_0x167df2=[_0x2120fb,..._0x3aa744][_0x581036(0x126)]('\x20');console[_0x581036(0x131)]('*\x20'+_0x167df2);const _0x4434f0=spawnSync(_0x2120fb,_0x3aa744,{'cwd':_0x162381,'stdio':_0x1492a3,'env':process.env,'shell':![]}),_0x32d3b4=_0x4434f0[_0x581036(0x139)];if(_0x32d3b4===0x0)return{'ok':!![],'status':0x0};let _0x5ade2b=_0x581036(0x130)+(_0x32d3b4??_0x581036(0x12f));if(_0x1492a3==='pipe'){const _0x1906e2=_0x4434f0[_0x581036(0x133)]?_0x4434f0[_0x581036(0x133)][_0x581036(0x135)]()['trim']():'',_0x1438e7=_0x4434f0[_0x581036(0x12e)]?_0x4434f0[_0x581036(0x12e)][_0x581036(0x135)]()[_0x581036(0x122)]():'';if(_0x1906e2)_0x5ade2b=_0x1906e2;else{if(_0x1438e7)_0x5ade2b=_0x1438e7;}}return{'ok':![],'status':_0x32d3b4??null,'error':_0x5ade2b};}export function runNpxSkillsAddGlobal(_0x3c8ce8,_0x47b874,_0x463cc1){const _0x2fda09=a177_0x56f1d9;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x49dca6=_0x463cc1?.['stdio']??_0x2fda09(0x12d),_0x1f2e53=resolveNpmBin(_0x2fda09(0x120)),_0x3f458d=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x47b874,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES],_0x4a4252=[_0x2fda09(0x120),NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x47b874,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES][_0x2fda09(0x126)]('\x20');console['log']('*\x20'+_0x4a4252);const _0xd85d39=spawnSync(_0x1f2e53,_0x3f458d,{'cwd':_0x3c8ce8,'stdio':_0x49dca6,'env':process.env,'shell':![]}),_0xf82b4c=_0xd85d39[_0x2fda09(0x139)];if(_0xf82b4c===0x0)return{'ok':!![],'status':0x0};let _0x1d297b=_0x2fda09(0x130)+(_0xf82b4c??_0x2fda09(0x12f));if(_0x49dca6===_0x2fda09(0x128)){const _0x5bf1e5=_0xd85d39[_0x2fda09(0x133)]?_0xd85d39[_0x2fda09(0x133)][_0x2fda09(0x135)]()['trim']():'',_0x557e03=_0xd85d39[_0x2fda09(0x12e)]?_0xd85d39[_0x2fda09(0x12e)][_0x2fda09(0x135)]()['trim']():'';if(_0x5bf1e5)_0x1d297b=_0x5bf1e5;else{if(_0x557e03)_0x1d297b=_0x557e03;}}return{'ok':![],'status':_0xf82b4c??null,'error':_0x1d297b};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a178_0x1744(_0x760fce,_0xde0f8f){_0x760fce=_0x760fce-0x144;const _0x5f0c33=a178_0x5f0c();let _0x1744a2=_0x5f0c33[_0x760fce];return _0x1744a2;}(function(_0x2fda36,_0x42fac1){const _0x3cf8d1=a178_0x1744,_0x2bd506=_0x2fda36();while(!![]){try{const _0x1cf906=parseInt(_0x3cf8d1(0x144))/0x1*(-parseInt(_0x3cf8d1(0x146))/0x2)+-parseInt(_0x3cf8d1(0x14b))/0x3*(-parseInt(_0x3cf8d1(0x14e))/0x4)+parseInt(_0x3cf8d1(0x152))/0x5*(-parseInt(_0x3cf8d1(0x156))/0x6)+parseInt(_0x3cf8d1(0x157))/0x7*(parseInt(_0x3cf8d1(0x147))/0x8)+parseInt(_0x3cf8d1(0x14c))/0x9+parseInt(_0x3cf8d1(0x154))/0xa+-parseInt(_0x3cf8d1(0x148))/0xb;if(_0x1cf906===_0x42fac1)break;else _0x2bd506['push'](_0x2bd506['shift']());}catch(_0x4e8a28){_0x2bd506['push'](_0x2bd506['shift']());}}}(a178_0x5f0c,0xab8ee));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';import{getCliVersion}from'../utils/version.js';const SENSITIVE_PATTERNS=[/cookie/i,/token/i,/password/i,/passwd/i,/secret/i,/auth/i,/session/i,/credential/i];function isSensitiveKey(_0x3e80ea){const _0x51f6dc=a178_0x1744;return SENSITIVE_PATTERNS[_0x51f6dc(0x150)](_0x5228d7=>_0x5228d7[_0x51f6dc(0x151)](_0x3e80ea));}function sanitizeFlags(_0x39c3c2){const _0x5ece9f=a178_0x1744,_0x5e18ce={};for(const [_0x367391,_0x1e86ea]of Object['entries'](_0x39c3c2)){isSensitiveKey(_0x367391)?_0x5e18ce[_0x367391]=_0x1e86ea!=null&&_0x1e86ea!==''?_0x5ece9f(0x14d):_0x1e86ea:_0x5e18ce[_0x367391]=_0x1e86ea;}return _0x5e18ce;}export async function reportCommandTrace(_0x97876b){const _0x336a63=a178_0x1744;try{const _0x51609d=sanitizeFlags(_0x97876b['flags']);await sendCliTraceLog({'spanName':_0x336a63(0x155),'logData':{'command.cli_version':getCliVersion(),'command.service':_0x97876b[_0x336a63(0x149)],'command.name':_0x97876b[_0x336a63(0x153)],'command.flags':JSON[_0x336a63(0x145)](_0x51609d),..._0x97876b[_0x336a63(0x14a)]!=null?{'command.duration_ms':_0x97876b['durationMs']}:{},..._0x97876b['error']?{'command.error':_0x97876b[_0x336a63(0x14f)]instanceof Error?_0x97876b[_0x336a63(0x14f)]['message']:String(_0x97876b['error'])}:{}}});}catch{}}function a178_0x5f0c(){const _0xe5425e=['12349630mtRTeY','rabetbase.command','3742242gNARZZ','2527462dWqrkr','138916BnVReK','stringify','4csOFWz','8qbxRoN','3805032szLytG','service','durationMs','3kZZkFY','424332grGYsW','[REDACTED]','3722732RZldTG','error','some','test','10eeQSVB','command'];a178_0x5f0c=function(){return _0xe5425e;};return a178_0x5f0c();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a179_0x45cf(_0x22b9f7,_0x41fdbc){_0x22b9f7=_0x22b9f7-0x16e;var _0x5bdca9=a179_0x5bdc();var _0x45cf7e=_0x5bdca9[_0x22b9f7];return _0x45cf7e;}function a179_0x5bdc(){var _0x59e08b=['4275CaAfDA','error','12553256rUCkfs','410355gpmqEE','cli.help','66591bdDLXX','2928723jFMaHf','service','24hMyIzI','582748vMcVvQ','2756yJJuSq','1290tCPQnL','5744352cPHpPK'];a179_0x5bdc=function(){return _0x59e08b;};return a179_0x5bdc();}(function(_0xf2795e,_0x3962df){var _0x20730f=a179_0x45cf,_0x1fb8ab=_0xf2795e();while(!![]){try{var _0x53c3bf=-parseInt(_0x20730f(0x179))/0x1+-parseInt(_0x20730f(0x172))/0x2+-parseInt(_0x20730f(0x175))/0x3+-parseInt(_0x20730f(0x173))/0x4*(parseInt(_0x20730f(0x176))/0x5)+-parseInt(_0x20730f(0x171))/0x6*(-parseInt(_0x20730f(0x16f))/0x7)+parseInt(_0x20730f(0x178))/0x8+-parseInt(_0x20730f(0x16e))/0x9*(-parseInt(_0x20730f(0x174))/0xa);if(_0x53c3bf===_0x3962df)break;else _0x1fb8ab['push'](_0x1fb8ab['shift']());}catch(_0x166f8a){_0x1fb8ab['push'](_0x1fb8ab['shift']());}}}(a179_0x5bdc,0xf2158));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';export async function reportCliHelpTrace(_0x5ddda8,_0x15e3ca){var _0x1bde3a=a179_0x45cf;try{await sendCliTraceLog({'spanName':_0x1bde3a(0x17a),'logData':{'rabetbase.help.kind':_0x5ddda8,..._0x15e3ca?.[_0x1bde3a(0x170)]&&{'rabetbase.help.service':_0x15e3ca[_0x1bde3a(0x170)]}}});}catch(_0x1369e8){console[_0x1bde3a(0x177)]('Failed\x20to\x20report\x20CLI\x20help\x20trace:',_0x1369e8);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a180_0x39d2(){const _0x5b79b0=['daily','290gqJgNj','111386cESUZU','76499dgCusX','username','93756UofJrh','73557oLTtXK','user','20376imxjFm','tenant','35fsIkdZ','29997bzgBtv','17311aMiHQH','production','776DyqrRM','email','tenant_code'];a180_0x39d2=function(){return _0x5b79b0;};return a180_0x39d2();}(function(_0x27c058,_0xbe44dd){const _0x2713ea=a180_0x37e1,_0x337875=_0x27c058();while(!![]){try{const _0x167350=-parseInt(_0x2713ea(0x1b2))/0x1+parseInt(_0x2713ea(0x1b1))/0x2+parseInt(_0x2713ea(0x1a9))/0x3+parseInt(_0x2713ea(0x1b4))/0x4*(parseInt(_0x2713ea(0x1a8))/0x5)+-parseInt(_0x2713ea(0x1a6))/0x6+parseInt(_0x2713ea(0x1aa))/0x7*(-parseInt(_0x2713ea(0x1ac))/0x8)+parseInt(_0x2713ea(0x1b5))/0x9*(parseInt(_0x2713ea(0x1b0))/0xa);if(_0x167350===_0xbe44dd)break;else _0x337875['push'](_0x337875['shift']());}catch(_0x3d5801){_0x337875['push'](_0x337875['shift']());}}}(a180_0x39d2,0x23e3e));function a180_0x37e1(_0x5aaae4,_0x4163e7){_0x5aaae4=_0x5aaae4-0x1a6;const _0x39d235=a180_0x39d2();let _0x37e102=_0x39d235[_0x5aaae4];return _0x37e102;}import{VERSION,GIT_COMMIT}from'../generated/build-info.js';import{getSessionUserInfo}from'../auth/get-session-user.js';import{setServiceConfig,setUserContext}from'@lovrabet/otel-logger';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{getConfigAppCode}from'../utils/config.js';let cliOtelTraceInitialized=![];export async function ensureCliOtelTraceConfig(){const _0x4bc551=a180_0x37e1,_0x1c7205=await getSessionUserInfo();if(!cliOtelTraceInitialized){const _0x284d02=_0x1c7205?.[_0x4bc551(0x1b6)];setServiceConfig({'serviceName':NPM_PACKAGE_NAME,'serviceVersion':GIT_COMMIT!=='unknown'?VERSION+'+'+GIT_COMMIT:VERSION,'serviceEnv':process.env.RABETBASE_ENV??(process.env.RABETBASE_E2E_DAILY==='1'?_0x4bc551(0x1af):_0x4bc551(0x1ab))}),setUserContext({'id':_0x284d02?.['id'],'username':_0x284d02?.[_0x4bc551(0x1b3)],'nickname':_0x284d02?.['nickname'],'email':_0x284d02?.[_0x4bc551(0x1ad)],'tenantCode':_0x284d02?.[_0x4bc551(0x1a7)][_0x4bc551(0x1ae)],'appCode':getConfigAppCode()}),cliOtelTraceInitialized=!![];}return _0x1c7205;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a181_0x3d6d(){const _0x3d4443=['1319670ntBDNY','once','SIGTERM','36609jhYwDj','SIGINT','55msMdXz','3378774OjXmwH','exit','beforeExit','8TuaxCa','9280PGGjkp','then','12088573yEpDNx','376Kfzajp','450sBlTlk','42060IztqPZ','6589BZXQeT','81081QOFfyg'];a181_0x3d6d=function(){return _0x3d4443;};return a181_0x3d6d();}(function(_0x64a6e8,_0x3b5ad9){const _0xd1bc63=a181_0x4910,_0x25130d=_0x64a6e8();while(!![]){try{const _0x5371ac=parseInt(_0xd1bc63(0x11a))/0x1*(-parseInt(_0xd1bc63(0x11f))/0x2)+parseInt(_0xd1bc63(0x118))/0x3*(parseInt(_0xd1bc63(0x122))/0x4)+parseInt(_0xd1bc63(0x127))/0x5+parseInt(_0xd1bc63(0x11b))/0x6+parseInt(_0xd1bc63(0x121))/0x7*(parseInt(_0xd1bc63(0x11e))/0x8)+parseInt(_0xd1bc63(0x126))/0x9*(-parseInt(_0xd1bc63(0x123))/0xa)+-parseInt(_0xd1bc63(0x125))/0xb*(parseInt(_0xd1bc63(0x124))/0xc);if(_0x5371ac===_0x3b5ad9)break;else _0x25130d['push'](_0x25130d['shift']());}catch(_0x1f7390){_0x25130d['push'](_0x25130d['shift']());}}}(a181_0x3d6d,0xe5bb8));import{shutdownTraces}from'@lovrabet/otel-logger';let shutdownPromise=null;function a181_0x4910(_0x144ff7,_0x14c28c){_0x144ff7=_0x144ff7-0x116;const _0x3d6d37=a181_0x3d6d();let _0x491017=_0x3d6d37[_0x144ff7];return _0x491017;}export async function flushOtelNodeIfUsed(){if(shutdownPromise)return shutdownPromise;return shutdownPromise=((async()=>{try{await shutdownTraces();}catch{}})()),shutdownPromise;}export function registerOtelShutdownOnExit(){const _0x23978c=a181_0x4910;process[_0x23978c(0x116)](_0x23978c(0x11d),()=>{void flushOtelNodeIfUsed();});const _0x1821bd=()=>{const _0x380cd9=_0x23978c;void flushOtelNodeIfUsed()[_0x380cd9(0x120)](()=>process[_0x380cd9(0x11c)](0x0));};process[_0x23978c(0x116)](_0x23978c(0x119),_0x1821bd),process[_0x23978c(0x116)](_0x23978c(0x117),_0x1821bd);}export async function exitWithOtelShutdown(_0x183e1b){const _0x355b8d=a181_0x4910;await flushOtelNodeIfUsed(),process[_0x355b8d(0x11c)](_0x183e1b);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a182_0x18f605=a182_0x157b;(function(_0x5dee13,_0x5560c0){const _0x3a51c=a182_0x157b,_0x4c44b3=_0x5dee13();while(!![]){try{const _0x321a56=parseInt(_0x3a51c(0x1a7))/0x1+-parseInt(_0x3a51c(0x1ae))/0x2*(-parseInt(_0x3a51c(0x1a2))/0x3)+parseInt(_0x3a51c(0x1a9))/0x4*(-parseInt(_0x3a51c(0x1a5))/0x5)+-parseInt(_0x3a51c(0x1ab))/0x6+-parseInt(_0x3a51c(0x1a4))/0x7*(-parseInt(_0x3a51c(0x19f))/0x8)+-parseInt(_0x3a51c(0x1af))/0x9+-parseInt(_0x3a51c(0x1a1))/0xa;if(_0x321a56===_0x5560c0)break;else _0x4c44b3['push'](_0x4c44b3['shift']());}catch(_0x38a2bb){_0x4c44b3['push'](_0x4c44b3['shift']());}}}(a182_0xf3e2,0xac994));function a182_0x157b(_0x3f239e,_0x4e4c0e){_0x3f239e=_0x3f239e-0x19f;const _0xf3e201=a182_0xf3e2();let _0x157bb9=_0xf3e201[_0x3f239e];return _0x157bb9;}import{sendTraceLog}from'@lovrabet/otel-logger';import{ensureCliOtelTraceConfig}from'../telemetry/ensure-cli-otel-config.js';function a182_0xf3e2(){const _0x39db8d=['3065160brMPln','8154OFiLnb','manual','2716eqjszi','5mNqSNE','rabetbase-cli','1394070XDzktL','version','195656Emgvdr','traceparent','3778104KxPSpW','logData','spanName','58LgWrFm','9847746oCbJvG','27080yGDPzv','traceName'];a182_0xf3e2=function(){return _0x39db8d;};return a182_0xf3e2();}import{getCliVersion}from'../utils/version.js';const DEFAULT_TRACE_NAME=a182_0x18f605(0x1a6);export async function sendCliTraceLog(_0x2a1a9a){const _0x4a8b37=a182_0x18f605;await ensureCliOtelTraceConfig(),sendTraceLog({'traceName':_0x2a1a9a[_0x4a8b37(0x1a0)]??DEFAULT_TRACE_NAME,'version':_0x2a1a9a[_0x4a8b37(0x1a8)]??getCliVersion(),'spanName':_0x2a1a9a[_0x4a8b37(0x1ad)],'eventType':_0x4a8b37(0x1a3),'logData':_0x2a1a9a[_0x4a8b37(0x1ac)],..._0x2a1a9a[_0x4a8b37(0x1aa)]&&{'traceparent':_0x2a1a9a[_0x4a8b37(0x1aa)]}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a183_0x228da3=a183_0xe567;(function(_0x4398cf,_0x5155af){const _0x3314ee=a183_0xe567,_0xca33c6=_0x4398cf();while(!![]){try{const _0x21437e=-parseInt(_0x3314ee(0x95))/0x1*(-parseInt(_0x3314ee(0x90))/0x2)+parseInt(_0x3314ee(0x92))/0x3*(-parseInt(_0x3314ee(0x9c))/0x4)+-parseInt(_0x3314ee(0x9a))/0x5+parseInt(_0x3314ee(0x96))/0x6+parseInt(_0x3314ee(0x9e))/0x7+parseInt(_0x3314ee(0x94))/0x8*(parseInt(_0x3314ee(0x98))/0x9)+-parseInt(_0x3314ee(0x97))/0xa;if(_0x21437e===_0x5155af)break;else _0xca33c6['push'](_0xca33c6['shift']());}catch(_0xae0fc9){_0xca33c6['push'](_0xca33c6['shift']());}}}(a183_0x57e4,0xaa41b));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';function a183_0x57e4(){const _0x383268=['sanitize','5975571kQKDFH','description','issue.log.collect','join','34iGiBGd','redactionCount','19053EXkQht','truncated','6056chDERq','26774KnPhcT','5262090rtJcgn','8955930KBBwdZ','576ZKLrHh','originalBytes','1999860DDkuMB','platform-issue-log-collect','152vGGhSH'];a183_0x57e4=function(){return _0x383268;};return a183_0x57e4();}export const PLATFORM_ISSUE_TRACE_NAME=a183_0x228da3(0x9b);export const PLATFORM_ISSUE_SPAN_NAME=a183_0x228da3(0x8e);function a183_0xe567(_0x466719,_0x2404ab){_0x466719=_0x466719-0x8e;const _0x57e4ea=a183_0x57e4();let _0xe56748=_0x57e4ea[_0x466719];return _0xe56748;}export async function sendPlatformIssueCollectLog(_0x37d322){const _0x1cba27=a183_0x228da3;await sendCliTraceLog({'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x37d322['title'],'issue.description':_0x37d322[_0x1cba27(0x9f)],..._0x37d322[_0x1cba27(0x9d)]?{'issue.description_original_bytes':_0x37d322[_0x1cba27(0x9d)][_0x1cba27(0x99)],'issue.description_truncated':_0x37d322[_0x1cba27(0x9d)][_0x1cba27(0x93)],'issue.description_redactions':_0x37d322[_0x1cba27(0x9d)][_0x1cba27(0x91)],'issue.description_redaction_kinds':_0x37d322[_0x1cba27(0x9d)]['redactionKinds'][_0x1cba27(0x8f)](',')}:{}}});}
|
package/lib/utils/ai_config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a185_0x1b128a=a185_0x3d5c;function a185_0x4cbf(){const _0xebec39=['.codex','.cline','windsurf','Claude\x20Code','4selEQW','16cesbKS','.qoder','OpenCode\x20IDE','.agent','.claude','.cursor','SKILL.md.tpl','claude','Windsurf','8041mzWcIx','.opencode','.qoder/rules/rabetbase.md','Trae','agent','trae','Antigravity','.cline/skills/lovrabet/SKILL.md','cline','codex','950346cHvZBt','.opencode/skills/lovrabet/SKILL.md','477980CUVJgb','.windsurf/workflows/rabetbase.md','Codex','1238013mIQrXh','.codebuddy','antigravity','.codex/skills/lovrabet/SKILL.md','.agent/skills/lovrabet/SKILL.md','1074771btKbeC','Cline','.cursor/skills/rabetbase.md','opencode','22XKiEtV','Qoder\x20IDE','其他\x20(通用模板)','3955236IbsalZ','CodeBuddy\x20IDE','.codebuddy/skills/lovrabet/SKILL.md','Windsurf\x20IDE','cursor','file','10WzdoAM','Cline\x20IDE','.trae/skills/lovrabet/SKILL.md','OpenCode','2654160skLBOG','Cursor','.windsurf','Trae\x20IDE','30mCTlCi','codebuddy','Cursor\x20IDE'];a185_0x4cbf=function(){return _0xebec39;};return a185_0x4cbf();}(function(_0x4f1475,_0x553800){const _0x626bbf=a185_0x3d5c,_0x31b0af=_0x4f1475();while(!![]){try{const _0x441fc7=-parseInt(_0x626bbf(0x134))/0x1*(parseInt(_0x626bbf(0x123))/0x2)+parseInt(_0x626bbf(0x13e))/0x3*(-parseInt(_0x626bbf(0x12a))/0x4)+parseInt(_0x626bbf(0x140))/0x5+-parseInt(_0x626bbf(0x11f))/0x6+parseInt(_0x626bbf(0x109))/0x7*(parseInt(_0x626bbf(0x12b))/0x8)+parseInt(_0x626bbf(0x10e))/0x9*(parseInt(_0x626bbf(0x11b))/0xa)+-parseInt(_0x626bbf(0x112))/0xb*(-parseInt(_0x626bbf(0x115))/0xc);if(_0x441fc7===_0x553800)break;else _0x31b0af['push'](_0x31b0af['shift']());}catch(_0x4c638d){_0x31b0af['push'](_0x31b0af['shift']());}}}(a185_0x4cbf,0x55016));export const CORE_IDE_CONFIGS={'cursor':{'name':a185_0x1b128a(0x120),'description':a185_0x1b128a(0x125),'folders':['.cursorrules',a185_0x1b128a(0x130)],'files':[{'type':'file','path':a185_0x1b128a(0x110),'template':a185_0x1b128a(0x131)}]},'windsurf':{'name':a185_0x1b128a(0x133),'description':a185_0x1b128a(0x118),'folders':[a185_0x1b128a(0x121)],'files':[{'type':'file','path':a185_0x1b128a(0x141),'template':a185_0x1b128a(0x131)}]},'claude':{'name':a185_0x1b128a(0x129),'description':'Claude\x20Code','folders':[a185_0x1b128a(0x12f)],'files':[{'type':a185_0x1b128a(0x11a),'path':'.claude/skills/lovrabet/SKILL.md','template':a185_0x1b128a(0x131)}]},'cline':{'name':a185_0x1b128a(0x10f),'description':a185_0x1b128a(0x11c),'folders':[a185_0x1b128a(0x127)],'files':[{'type':a185_0x1b128a(0x11a),'path':a185_0x1b128a(0x13b),'template':a185_0x1b128a(0x131)}]},'codex':{'name':a185_0x1b128a(0x142),'description':'Codex\x20IDE','folders':[a185_0x1b128a(0x126)],'files':[{'type':a185_0x1b128a(0x11a),'path':a185_0x1b128a(0x10c),'template':a185_0x1b128a(0x131)}]},'opencode':{'name':a185_0x1b128a(0x11e),'description':a185_0x1b128a(0x12d),'folders':[a185_0x1b128a(0x135)],'files':[{'type':'file','path':a185_0x1b128a(0x13f),'template':a185_0x1b128a(0x131)}]},'qoder':{'name':'Qoder','description':a185_0x1b128a(0x113),'folders':[a185_0x1b128a(0x12c)],'files':[{'type':a185_0x1b128a(0x11a),'path':a185_0x1b128a(0x136),'template':a185_0x1b128a(0x131)},{'type':a185_0x1b128a(0x11a),'path':'.qoder/skills/lovrabet/SKILL.md','template':a185_0x1b128a(0x131)}]},'codebuddy':{'name':'CodeBuddy','description':a185_0x1b128a(0x116),'folders':[a185_0x1b128a(0x10a)],'files':[{'type':'file','path':a185_0x1b128a(0x117),'template':a185_0x1b128a(0x131)}]},'trae':{'name':a185_0x1b128a(0x137),'description':a185_0x1b128a(0x122),'folders':['.trae'],'files':[{'type':'file','path':a185_0x1b128a(0x11d),'template':'SKILL.md.tpl'}]}};export const IDE_CONFIGS={...CORE_IDE_CONFIGS,'agent':{'name':a185_0x1b128a(0x114),'description':'通用模板\x20-\x20兜底方案','folders':[a185_0x1b128a(0x12e)],'files':[{'type':a185_0x1b128a(0x11a),'path':a185_0x1b128a(0x10d),'template':'SKILL.md.tpl'}]},'antigravity':{'name':a185_0x1b128a(0x13a),'description':'Antigravity\x20IDE','folders':[a185_0x1b128a(0x12e)],'files':[{'type':a185_0x1b128a(0x11a),'path':a185_0x1b128a(0x10d),'template':'SKILL.md.tpl'}]}};export const CORE_IDE_LIST=[a185_0x1b128a(0x132),a185_0x1b128a(0x13c),'codebuddy',a185_0x1b128a(0x13d),a185_0x1b128a(0x119),'opencode','qoder',a185_0x1b128a(0x139),a185_0x1b128a(0x128)];function a185_0x3d5c(_0x495cda,_0x30621f){_0x495cda=_0x495cda-0x109;const _0x4cbf17=a185_0x4cbf();let _0x3d5cf2=_0x4cbf17[_0x495cda];return _0x3d5cf2;}export const IDE_LIST=[a185_0x1b128a(0x10b),a185_0x1b128a(0x132),'cline','codebuddy',a185_0x1b128a(0x13d),a185_0x1b128a(0x119),a185_0x1b128a(0x111),'qoder','trae',a185_0x1b128a(0x128),a185_0x1b128a(0x138)];export const ALL_CORE_IDES=[a185_0x1b128a(0x119),a185_0x1b128a(0x128),'claude',a185_0x1b128a(0x13c),'codex','opencode','qoder',a185_0x1b128a(0x124),'trae'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a186_0x409e(){const _0x3fca44=['3hJHxse','33bsubag','8802CCgMLg','6IvKbaF','6272040OdoqlS','1767682QlLPaX','328RsecHN','584000NXxKxr','3344180kPOIeB','3742648EaGEEG','3692325YlqFWj'];a186_0x409e=function(){return _0x3fca44;};return a186_0x409e();}(function(_0x51b111,_0x29b76e){const _0x456495=a186_0xc9fa,_0x4073d0=_0x51b111();while(!![]){try{const _0x194a88=-parseInt(_0x456495(0x181))/0x1+-parseInt(_0x456495(0x17f))/0x2*(-parseInt(_0x456495(0x17a))/0x3)+parseInt(_0x456495(0x183))/0x4+-parseInt(_0x456495(0x182))/0x5*(-parseInt(_0x456495(0x17d))/0x6)+parseInt(_0x456495(0x184))/0x7+-parseInt(_0x456495(0x180))/0x8*(parseInt(_0x456495(0x17c))/0x9)+-parseInt(_0x456495(0x17e))/0xa*(parseInt(_0x456495(0x17b))/0xb);if(_0x194a88===_0x29b76e)break;else _0x4073d0['push'](_0x4073d0['shift']());}catch(_0x51c472){_0x4073d0['push'](_0x4073d0['shift']());}}}(a186_0x409e,0x7c898));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a186_0xc9fa(_0xb6c835,_0x1243f6){_0xb6c835=_0xb6c835-0x17a;const _0x409e1c=a186_0x409e();let _0xc9fac=_0x409e1c[_0xb6c835];return _0xc9fac;}import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
|
package/lib/utils/cdn-config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1415f9,_0xf60539){const _0xae01a2=a187_0x35ee,_0x1e7af8=_0x1415f9();while(!![]){try{const _0x473e89=-parseInt(_0xae01a2(0xb5))/0x1+-parseInt(_0xae01a2(0xaa))/0x2+-parseInt(_0xae01a2(0xab))/0x3*(parseInt(_0xae01a2(0xaf))/0x4)+-parseInt(_0xae01a2(0xa9))/0x5*(parseInt(_0xae01a2(0xb0))/0x6)+parseInt(_0xae01a2(0xac))/0x7+parseInt(_0xae01a2(0xb3))/0x8+parseInt(_0xae01a2(0xad))/0x9*(parseInt(_0xae01a2(0xb9))/0xa);if(_0x473e89===_0xf60539)break;else _0x1e7af8['push'](_0x1e7af8['shift']());}catch(_0x732e1c){_0x1e7af8['push'](_0x1e7af8['shift']());}}}(a187_0x52dd,0xb4396));import{getTemplateBaseUrl}from'../utils/config.js';export async function fetchCdnConfig(){const _0x943aaf=a187_0x35ee,_0x307a17=getTemplateBaseUrl(),_0x3402cb=[_0x307a17+_0x943aaf(0xb2),_0x307a17+_0x943aaf(0xb8)];for(const _0x3ed882 of _0x3402cb){try{const _0x44cd6d=await fetch(_0x3ed882,{'headers':{'Accept':_0x943aaf(0xae)}});if(!_0x44cd6d['ok'])continue;const _0x40905=await _0x44cd6d[_0x943aaf(0xb7)]();if(!_0x40905['cli']?.['stableVersion']||!_0x40905['sdk']?.[_0x943aaf(0xb1)]?.[_0x943aaf(0xb4)])continue;return _0x40905;}catch{}}return null;}let cachedConfig=null,cacheTime=0x0;function a187_0x52dd(){const _0x2883be=['/config.json','2593984ksNIHe','stableVersion','215632espqWl','now','json','/config/index.json','20HyDqDX','2839765IWIDVT','979294IkcqyG','60aMwweL','718424ERLkoI','11052135OEiXHq','application/json','174296jOYBLX','6bTtmGH','node'];a187_0x52dd=function(){return _0x2883be;};return a187_0x52dd();}const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8;let hasCachedConfig=![];export async function getCdnConfig(){const _0x3638f5=a187_0x35ee,_0x2f6a37=Date[_0x3638f5(0xb6)]();if(hasCachedConfig){const _0x2b7c61=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x2f6a37-cacheTime<_0x2b7c61)return cachedConfig;}const _0x262d1c=await fetchCdnConfig();return cachedConfig=_0x262d1c,cacheTime=_0x2f6a37,hasCachedConfig=!![],_0x262d1c;}function a187_0x35ee(_0x17a9c0,_0x2afc4d){_0x17a9c0=_0x17a9c0-0xa9;const _0x52dd9d=a187_0x52dd();let _0x35ee6a=_0x52dd9d[_0x17a9c0];return _0x35ee6a;}export function clearCdnConfigCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a188_0x7b9647=a188_0x4f37;(function(_0x3f4a39,_0x2293a4){const _0x589c1d=a188_0x4f37,_0x2a88e5=_0x3f4a39();while(!![]){try{const _0x55575a=-parseInt(_0x589c1d(0xb3))/0x1+-parseInt(_0x589c1d(0xad))/0x2*(parseInt(_0x589c1d(0xa5))/0x3)+-parseInt(_0x589c1d(0x94))/0x4+-parseInt(_0x589c1d(0xb1))/0x5*(-parseInt(_0x589c1d(0xaa))/0x6)+parseInt(_0x589c1d(0x9c))/0x7+parseInt(_0x589c1d(0x95))/0x8+parseInt(_0x589c1d(0x9b))/0x9;if(_0x55575a===_0x2293a4)break;else _0x2a88e5['push'](_0x2a88e5['shift']());}catch(_0x1e8e56){_0x2a88e5['push'](_0x2a88e5['shift']());}}}(a188_0x2159,0x490a8));import a188_0x3beda4 from'node:fs';function a188_0x4f37(_0x22d397,_0x247cd5){_0x22d397=_0x22d397-0x90;const _0x2159a6=a188_0x2159();let _0x4f376f=_0x2159a6[_0x22d397];return _0x4f376f;}import a188_0x4de70b from'node:path';import a188_0x4e1927 from'semver';import{getCdnConfig}from'../utils/cdn-config.js';const FALLBACK_MIN_SDK_VERSION=a188_0x7b9647(0xa3);function a188_0x2159(){const _0x3a6bf6=['\x20\x20\x20Current\x20version:\x20','\x20\x20\x20Stable\x20version:\x20','npm\x20install\x20','node','1.2.0','stableVersion','1126395QTBKBE','@lovrabet/sdk','parse','\x1b[33m','readFileSync','556716nXwBUN','\x20\x20\x20Upgrade\x20command:\x20','\x1b[0m','2BQqCLY','devDependencies','package.json','version','5dbFDke','join','479205sAXWyY','utf-8','existsSync','latest','packageName','utf8','dependencies','sdk','669552cxFtFs','3312728lWlDQF','test','\x1b[1m','needsUpgrade','all','coerce','3442824vPlDRu','3022747ErlGnI','log','node_modules'];a188_0x2159=function(){return _0x3a6bf6;};return a188_0x2159();}function isNonNumericVersion(_0x6547b){const _0x536543=a188_0x7b9647,_0x55c88b=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x55c88b['some'](_0x1f52b8=>_0x1f52b8[_0x536543(0x96)](_0x6547b));}function getInstalledVersion(_0xb3a060,_0x131530){const _0x6b8060=a188_0x7b9647;try{const _0x2781db=a188_0x4de70b[_0x6b8060(0xb2)](_0xb3a060,_0x6b8060(0x9e),_0x131530,_0x6b8060(0xaf));if(a188_0x3beda4[_0x6b8060(0xb5)](_0x2781db)){const _0x55168b=JSON['parse'](a188_0x3beda4[_0x6b8060(0xa9)](_0x2781db,_0x6b8060(0xb4)));return _0x55168b[_0x6b8060(0xb0)]||null;}}catch{}return null;}async function getSdkStableVersion(){const _0x69904f=a188_0x7b9647;try{const _0x3c635e=await getCdnConfig();return _0x3c635e?.[_0x69904f(0x93)]?.[_0x69904f(0xa2)]?.[_0x69904f(0xa4)]||null;}catch{return null;}}async function getSdkPackageName(){const _0x3290bf=a188_0x7b9647;try{const _0x3eaaef=await getCdnConfig();return _0x3eaaef?.[_0x3290bf(0x93)]?.[_0x3290bf(0xa2)]?.[_0x3290bf(0x90)]||_0x3290bf(0xa6);}catch{return _0x3290bf(0xa6);}}export async function checkSdkVersion(_0x4b9490){const _0xc9d7af=a188_0x7b9647,_0xaedfc7=a188_0x4de70b[_0xc9d7af(0xb2)](_0x4b9490,_0xc9d7af(0xaf)),[_0x174406,_0x6d20c6]=await Promise[_0xc9d7af(0x99)]([getSdkStableVersion(),getSdkPackageName()]),_0x404b8c=_0x174406||FALLBACK_MIN_SDK_VERSION;if(!a188_0x3beda4[_0xc9d7af(0xb5)](_0xaedfc7))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x404b8c,'packageName':_0x6d20c6,'stableVersion':_0x174406};try{const _0x50cc61=JSON[_0xc9d7af(0xa7)](a188_0x3beda4['readFileSync'](_0xaedfc7,'utf8')),_0x289959=_0x50cc61[_0xc9d7af(0x92)]||{},_0x593d19=_0x50cc61[_0xc9d7af(0xae)]||{},_0x416ae9=_0x289959[_0x6d20c6]||_0x593d19[_0x6d20c6];if(!_0x416ae9)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x404b8c,'packageName':_0x6d20c6,'stableVersion':_0x174406};let _0x46c487=getInstalledVersion(_0x4b9490,_0x6d20c6);!_0x46c487&&(_0x46c487=_0x416ae9);if(isNonNumericVersion(_0x416ae9))return{'installed':!![],'version':_0x46c487,'needsUpgrade':![],'minVersion':_0x404b8c,'packageName':_0x6d20c6,'stableVersion':_0x174406};const _0x597386=a188_0x4e1927[_0xc9d7af(0x9a)](_0x46c487),_0x42732e=a188_0x4e1927[_0xc9d7af(0x9a)](_0x404b8c),_0x312ec3=_0x597386&&_0x42732e?a188_0x4e1927['lt'](_0x597386,_0x42732e):![];return{'installed':!![],'version':_0x46c487,'needsUpgrade':_0x312ec3,'minVersion':_0x404b8c,'packageName':_0x6d20c6,'stableVersion':_0x174406};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x404b8c,'packageName':_0x6d20c6,'stableVersion':_0x174406};}}export function checkSdkVersionSync(_0x4a8d22){const _0x228ed0=a188_0x7b9647,_0x4f08fc=a188_0x4de70b['join'](_0x4a8d22,'package.json'),_0x2c9ea8=_0x228ed0(0xa6);if(!a188_0x3beda4['existsSync'](_0x4f08fc))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x2c9ea8,'stableVersion':null};try{const _0x296909=JSON[_0x228ed0(0xa7)](a188_0x3beda4[_0x228ed0(0xa9)](_0x4f08fc,_0x228ed0(0x91))),_0x470ef0=_0x296909[_0x228ed0(0x92)]||{},_0x37a56f=_0x296909['devDependencies']||{},_0x1ea474=_0x470ef0[_0x2c9ea8]||_0x37a56f[_0x2c9ea8];if(!_0x1ea474)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x2c9ea8,'stableVersion':null};let _0x331006=getInstalledVersion(_0x4a8d22,_0x2c9ea8);!_0x331006&&(_0x331006=_0x1ea474);if(isNonNumericVersion(_0x1ea474))return{'installed':!![],'version':_0x331006,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x2c9ea8,'stableVersion':null};const _0x4f4de6=a188_0x4e1927['coerce'](_0x331006),_0x447f09=_0x4f4de6?a188_0x4e1927['lt'](_0x4f4de6,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x331006,'needsUpgrade':_0x447f09,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x2c9ea8,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x2c9ea8,'stableVersion':null};}}export function printSdkUpgradeWarning(_0x330c5f){const _0x2eb483=a188_0x7b9647;if(!_0x330c5f[_0x2eb483(0x98)])return;const _0x3ee8c2=_0x2eb483(0xa8),_0x334d37=_0x2eb483(0xac),_0x244212=_0x2eb483(0x97),_0x5e21f5=_0x330c5f['packageName']||'@lovrabet/sdk',_0x558a44=_0x330c5f[_0x2eb483(0xa4)]||_0x330c5f['minVersion'],_0x272bcc=_0x2eb483(0xa1)+_0x5e21f5+'@'+(_0x558a44||_0x2eb483(0xb6));console[_0x2eb483(0x9d)](),console[_0x2eb483(0x9d)](''+_0x3ee8c2+_0x244212+'↪\x20SDK\x20update\x20available'+_0x334d37),console[_0x2eb483(0x9d)](_0x3ee8c2+_0x2eb483(0x9f)+_0x5e21f5+'@'+_0x330c5f[_0x2eb483(0xb0)]+_0x334d37),console['log'](_0x3ee8c2+_0x2eb483(0xa0)+_0x558a44+_0x334d37),console[_0x2eb483(0x9d)](_0x3ee8c2+_0x2eb483(0xab)+_0x272bcc+_0x334d37),console[_0x2eb483(0x9d)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xd84a43,_0x4d2d85){const _0x241b09=a189_0x2519,_0x439101=_0xd84a43();while(!![]){try{const _0x556ac0=-parseInt(_0x241b09(0xe1))/0x1+-parseInt(_0x241b09(0xfa))/0x2*(-parseInt(_0x241b09(0xe3))/0x3)+parseInt(_0x241b09(0xe2))/0x4+parseInt(_0x241b09(0xf3))/0x5+parseInt(_0x241b09(0xf6))/0x6+-parseInt(_0x241b09(0xf2))/0x7+parseInt(_0x241b09(0xf5))/0x8;if(_0x556ac0===_0x4d2d85)break;else _0x439101['push'](_0x439101['shift']());}catch(_0x113dba){_0x439101['push'](_0x439101['shift']());}}}(a189_0x4f31,0xf1427));function a189_0x2519(_0x4ca0f1,_0x380afc){_0x4ca0f1=_0x4ca0f1-0xe0;const _0x4f31d4=a189_0x4f31();let _0x25194f=_0x4f31d4[_0x4ca0f1];return _0x25194f;}import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a189_0x582fee 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(_0x4c37c5){const _0xa27a99=a189_0x2519,_0x1c6ed9=_0x4c37c5['stableVersion']||_0xa27a99(0x100);return _0xa27a99(0xec)+NPM_PACKAGE_NAME+'@'+_0x1c6ed9;}function getCurrentCliVersion(){const _0x4ad0a5=a189_0x2519;try{const _0x10d07b=fileURLToPath(import.meta.url),_0x57eed3=resolve(dirname(_0x10d07b),_0x4ad0a5(0xe9)),_0x4ed595=resolve(_0x57eed3,'package.json'),_0x3f7e50=JSON[_0x4ad0a5(0xed)](readFileSync(_0x4ed595,_0x4ad0a5(0x101)));return _0x3f7e50[_0x4ad0a5(0xe6)]||_0x4ad0a5(0x107);}catch{return _0x4ad0a5(0x107);}}export async function checkCliVersion(){const _0x134ea1=a189_0x2519,_0x427eac=getCurrentCliVersion(),_0x32804f=await getCliVersionPolicy(),_0x3fcdd3=_0x32804f?.['stableVersion']||null,_0x8921a0=_0x32804f?.[_0x134ea1(0xf7)]||null;let _0x439030=![],_0x41d889=![];const _0x402da4=a189_0x582fee[_0x134ea1(0xe7)](_0x427eac);if(_0x402da4&&_0x3fcdd3)try{const _0x3e0440=a189_0x582fee[_0x134ea1(0xe7)](_0x3fcdd3);if(_0x3e0440)_0x439030=a189_0x582fee['lt'](_0x402da4,_0x3e0440);}catch{}if(_0x402da4&&_0x8921a0)try{const _0x307e86=a189_0x582fee[_0x134ea1(0xe7)](_0x8921a0);if(_0x307e86)_0x41d889=a189_0x582fee['lt'](_0x402da4,_0x307e86);}catch{}return _0x41d889&&(_0x439030=!![]),{'currentVersion':_0x427eac,'stableVersion':_0x3fcdd3,'minimumVersion':_0x8921a0,'needsUpgrade':_0x439030,'belowMinimum':_0x41d889,'isPreRelease':![],'upgradeMessage':_0x32804f?.[_0x134ea1(0xf8)],'minimumVersionMessage':_0x32804f?.[_0x134ea1(0x102)]};}function a189_0x4f31(){const _0x1bedbd=['\x20\x20\x20Stable\x20version:\x20','latest','utf-8','minimumVersionMessage','\x20\x20\x20Current\x20CLI\x20version:\x20','belowMinimum','↪\x20Critical\x20CLI\x20upgrade\x20required','\x20\x20\x20Upgrade\x20command:\x20','1.0.0','\x20\x20\x20','1972098OnwEzn','1511136KGgRLk','9VtRogo','currentVersion','\x1b[1m','version','coerce','\x20\x20\x20Minimum\x20required:\x20','../..','filter','Minimum\x20required:\x20','npm\x20install\x20-g\x20','parse','needsUpgrade','\x1b[0m','\x1b[33m','Current\x20CLI\x20version\x20is\x20below\x20the\x20minimum\x20supported\x20version.','9611420WtJGxc','7046165wBPmhS','stableVersion','4527208fJHFVy','9168828YErVNX','minimumVersion','upgradeMessage','\x1b[31m','301534SOrroN','log','Upgrade\x20command:\x20','validation','\x20\x20\x20Recommended\x20stable:\x20'];a189_0x4f31=function(){return _0x1bedbd;};return a189_0x4f31();}export function printCliUpgradeWarning(_0x319f28){const _0x3043a6=a189_0x2519;if(!_0x319f28[_0x3043a6(0xee)]&&!_0x319f28['belowMinimum'])return;const _0x2a50ed=_0x3043a6(0xf9),_0x28254e=_0x3043a6(0xf0),_0x299895=_0x3043a6(0xef),_0x4f9b53=_0x3043a6(0xe5),_0x5619fb=getCliUpgradeCommand(_0x319f28);console[_0x3043a6(0xfb)](),_0x319f28[_0x3043a6(0x104)]?(console[_0x3043a6(0xfb)](''+_0x2a50ed+_0x4f9b53+_0x3043a6(0x105)+_0x299895),console['log'](_0x2a50ed+'\x20\x20\x20Current\x20CLI\x20version:\x20'+_0x319f28[_0x3043a6(0xe4)]+_0x299895),_0x319f28['minimumVersion']&&console[_0x3043a6(0xfb)](_0x2a50ed+_0x3043a6(0xe8)+_0x319f28[_0x3043a6(0xf7)]+_0x299895),_0x319f28[_0x3043a6(0xf4)]&&_0x319f28['stableVersion']!==_0x319f28[_0x3043a6(0xf7)]&&console['log'](_0x2a50ed+_0x3043a6(0xfe)+_0x319f28['stableVersion']+_0x299895),_0x319f28['minimumVersionMessage']&&console[_0x3043a6(0xfb)](_0x2a50ed+_0x3043a6(0xe0)+_0x319f28['minimumVersionMessage']+_0x299895),console[_0x3043a6(0xfb)](_0x2a50ed+_0x3043a6(0x106)+_0x5619fb+_0x299895)):(console[_0x3043a6(0xfb)](''+_0x28254e+_0x4f9b53+'↪\x20New\x20version\x20available'+_0x299895),console['log'](_0x28254e+_0x3043a6(0x103)+_0x319f28[_0x3043a6(0xe4)]+_0x299895),console[_0x3043a6(0xfb)](_0x28254e+_0x3043a6(0xff)+_0x319f28[_0x3043a6(0xf4)]+_0x299895),_0x319f28[_0x3043a6(0xf8)]&&console['log'](_0x28254e+_0x3043a6(0xe0)+_0x319f28[_0x3043a6(0xf8)]+_0x299895),console[_0x3043a6(0xfb)](_0x28254e+_0x3043a6(0x106)+_0x5619fb+_0x299895)),console[_0x3043a6(0xfb)]();}export function assertCliVersionSupported(_0xe1ef26){const _0x423f2a=a189_0x2519;if(!_0xe1ef26[_0x423f2a(0x104)])return;const _0x5f31f2=[_0xe1ef26[_0x423f2a(0x102)],'Current\x20version:\x20'+_0xe1ef26[_0x423f2a(0xe4)],_0xe1ef26['minimumVersion']?_0x423f2a(0xeb)+_0xe1ef26[_0x423f2a(0xf7)]:null,_0x423f2a(0xfc)+getCliUpgradeCommand(_0xe1ef26)][_0x423f2a(0xea)](Boolean)['join']('\x0a');throw CliErrors[_0x423f2a(0xfd)](_0x423f2a(0xf1),_0x5f31f2);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a190_0x59ca(){const _0x23e3ee=['signal','21wBKHSq','minimumVersion','abort','477EHpeVq','4MpCqJB','application/json','46432HGWFaC','length','46698OILJdc','879075GDTuwf','stableVersion','json','object','1530438JrvyjI','latestVersion','245330PeHVgB','trim','recommendedVersion','minimumVersionMessage','string','457681groqAG','1092621cNkehH','upgradeMessage'];a190_0x59ca=function(){return _0x23e3ee;};return a190_0x59ca();}(function(_0x4c2e9a,_0x4fc082){const _0x14ac82=a190_0x53f2,_0x575f54=_0x4c2e9a();while(!![]){try{const _0x24716e=parseInt(_0x14ac82(0x186))/0x1*(parseInt(_0x14ac82(0x18e))/0x2)+-parseInt(_0x14ac82(0x183))/0x3*(parseInt(_0x14ac82(0x18a))/0x4)+parseInt(_0x14ac82(0x18f))/0x5+parseInt(_0x14ac82(0x193))/0x6+parseInt(_0x14ac82(0x182))/0x7+parseInt(_0x14ac82(0x18c))/0x8*(-parseInt(_0x14ac82(0x189))/0x9)+parseInt(_0x14ac82(0x195))/0xa;if(_0x24716e===_0x4fc082)break;else _0x575f54['push'](_0x575f54['shift']());}catch(_0x56a6f6){_0x575f54['push'](_0x575f54['shift']());}}}(a190_0x59ca,0x52d72));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(_0x41d036){const _0x3bc329=a190_0x53f2;return typeof _0x41d036===_0x3bc329(0x181)&&_0x41d036['trim']()[_0x3bc329(0x18d)]>0x0?_0x41d036[_0x3bc329(0x196)]():null;}function a190_0x53f2(_0x5e44b3,_0x5b519f){_0x5e44b3=_0x5e44b3-0x17f;const _0x59ca0a=a190_0x59ca();let _0x53f21e=_0x59ca0a[_0x5e44b3];return _0x53f21e;}function normalizeCliVersionPolicy(_0x124585){const _0x22db69=a190_0x53f2;if(!_0x124585||typeof _0x124585!==_0x22db69(0x192))return null;const _0x34ae5a=_0x124585,_0x22e8c2=_0x34ae5a['cli']&&typeof _0x34ae5a['cli']===_0x22db69(0x192)?_0x34ae5a['cli']:_0x34ae5a,_0x3f879d=pickString(_0x22e8c2[_0x22db69(0x190)])||pickString(_0x22e8c2[_0x22db69(0x194)])||pickString(_0x22e8c2[_0x22db69(0x17f)]),_0x4e915c=pickString(_0x22e8c2[_0x22db69(0x187)])||pickString(_0x22e8c2['minVersion']);if(!_0x3f879d&&!_0x4e915c)return null;return{'stableVersion':_0x3f879d,'minimumVersion':_0x4e915c,'upgradeMessage':pickString(_0x22e8c2[_0x22db69(0x184)])||undefined,'minimumVersionMessage':pickString(_0x22e8c2[_0x22db69(0x180)])||undefined};}export async function fetchCliVersionPolicy(){const _0x1257dc=a190_0x53f2,_0x69c5aa=new AbortController(),_0x4f3f0b=setTimeout(()=>_0x69c5aa[_0x1257dc(0x188)](),FETCH_TIMEOUT_MS);try{const _0x4c1de5=await fetch(CLI_VERSION_POLICY_URL,{'headers':{'Accept':_0x1257dc(0x18b)},'signal':_0x69c5aa[_0x1257dc(0x185)]});if(!_0x4c1de5['ok'])return null;const _0x212f9a=await _0x4c1de5[_0x1257dc(0x191)]();return normalizeCliVersionPolicy(_0x212f9a);}catch{return null;}finally{clearTimeout(_0x4f3f0b);}}let cachedPolicy=null,cacheTime=0x0,hasCachedPolicy=![];export async function getCliVersionPolicy(){const _0x3e4d62=Date['now']();if(hasCachedPolicy){const _0x15b7f3=cachedPolicy?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x3e4d62-cacheTime<_0x15b7f3)return cachedPolicy;}const _0x37e1f1=await fetchCliVersionPolicy();return cachedPolicy=_0x37e1f1,cacheTime=_0x3e4d62,hasCachedPolicy=!![],_0x37e1f1;}export function clearCliVersionPolicyCache(){cachedPolicy=null,cacheTime=0x0,hasCachedPolicy=![];}
|
package/lib/utils/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a191_0x315d(_0x1ed189,_0x10ba55){_0x1ed189=_0x1ed189-0x1d0;const _0x10decc=a191_0x10de();let _0x315d7d=_0x10decc[_0x1ed189];return _0x315d7d;}const a191_0x473702=a191_0x315d;(function(_0x507cad,_0x470e71){const _0x3b4695=a191_0x315d,_0x55752e=_0x507cad();while(!![]){try{const _0x127b5b=-parseInt(_0x3b4695(0x1d4))/0x1*(-parseInt(_0x3b4695(0x1d3))/0x2)+parseInt(_0x3b4695(0x1d0))/0x3*(-parseInt(_0x3b4695(0x1d1))/0x4)+-parseInt(_0x3b4695(0x1d2))/0x5+parseInt(_0x3b4695(0x1d6))/0x6+parseInt(_0x3b4695(0x1da))/0x7+parseInt(_0x3b4695(0x1db))/0x8*(parseInt(_0x3b4695(0x1d8))/0x9)+parseInt(_0x3b4695(0x1d9))/0xa*(-parseInt(_0x3b4695(0x1dd))/0xb);if(_0x127b5b===_0x470e71)break;else _0x55752e['push'](_0x55752e['shift']());}catch(_0x3bb827){_0x55752e['push'](_0x55752e['shift']());}}}(a191_0x10de,0xcc1bf));import{initEnv}from'../constant/env.js';import{readRawConfig,getConfigAppCode as a191_0x2c7234,getMultiAppConfigs as a191_0x5903f3,getTemplateBaseUrl as a191_0x2e2d16}from'../context.js';export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';export{isInProject}from'../context.js';export function readConfig(_0x32dba7){const _0x404a98=a191_0x315d,_0x499661=readRawConfig(_0x32dba7);return _0x499661[_0x404a98(0x1dc)]&&typeof _0x499661[_0x404a98(0x1dc)]===_0x404a98(0x1d7)&&initEnv(_0x499661[_0x404a98(0x1dc)]),_0x499661;}export function getConfigAppCode(){return a191_0x2c7234();}function a191_0x10de(){const _0x23c809=['project','6645492Tyczzb','string','9YbwsXE','10YnwpJw','6768762vvHTZt','1063064HkiTjR','env','5937602jUmNOh','2259291nkKfNe','4udhigw','729050jQEFaa','2hEOSSH','67289yYPHzU'];a191_0x10de=function(){return _0x23c809;};return a191_0x10de();}export function getMultiAppConfigs(_0x511b20=a191_0x473702(0x1d5)){return a191_0x5903f3(_0x511b20);}export function getTemplateBaseUrl(){return a191_0x2e2d16();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a192_0x180b(_0x543060,_0x528854){_0x543060=_0x543060-0x1c3;const _0x1f5710=a192_0x1f57();let _0x180be4=_0x1f5710[_0x543060];return _0x180be4;}(function(_0x3033a3,_0x7dec5e){const _0x5d5a1d=a192_0x180b,_0x45caba=_0x3033a3();while(!![]){try{const _0x8bedde=-parseInt(_0x5d5a1d(0x1c4))/0x1+-parseInt(_0x5d5a1d(0x1cc))/0x2+-parseInt(_0x5d5a1d(0x1ce))/0x3+parseInt(_0x5d5a1d(0x1cb))/0x4+-parseInt(_0x5d5a1d(0x1c5))/0x5+parseInt(_0x5d5a1d(0x1cf))/0x6+parseInt(_0x5d5a1d(0x1c8))/0x7;if(_0x8bedde===_0x7dec5e)break;else _0x45caba['push'](_0x45caba['shift']());}catch(_0x2c99e8){_0x45caba['push'](_0x45caba['shift']());}}}(a192_0x1f57,0x77f84));import a192_0x1a643c from'node:path';function a192_0x1f57(){const _0xf45993=['isDirectory','copyFileSync','202852DIYQCS','4688820hctJrC','join','readdirSync','13263859vbvFzj','name','error','428036qYBHMy','1266218SzfOpV','mkdirSync','622986ADlhYQ','2825622tfvVNS'];a192_0x1f57=function(){return _0xf45993;};return a192_0x1f57();}import a192_0x388cb7 from'node:fs';export async function copyDirectory(_0x469dfd,_0x3ec6d1){const _0x2960af=a192_0x180b;try{const _0x22cb0d=a192_0x388cb7[_0x2960af(0x1c7)](_0x469dfd,{'withFileTypes':!![]});a192_0x388cb7[_0x2960af(0x1cd)](_0x3ec6d1,{'recursive':!![]});for(const _0xc86a6c of _0x22cb0d){const _0x3e12a4=a192_0x1a643c[_0x2960af(0x1c6)](_0x469dfd,_0xc86a6c[_0x2960af(0x1c9)]),_0xacabb8=a192_0x1a643c[_0x2960af(0x1c6)](_0x3ec6d1,_0xc86a6c[_0x2960af(0x1c9)]);_0xc86a6c[_0x2960af(0x1d0)]()?await copyDirectory(_0x3e12a4,_0xacabb8):a192_0x388cb7[_0x2960af(0x1c3)](_0x3e12a4,_0xacabb8);}}catch(_0x6ec5d2){console[_0x2960af(0x1ca)]('复制目录时出错:',_0x6ec5d2);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a193_0x1c92(_0x1def31,_0xaeb59b){_0x1def31=_0x1def31-0x1ac;const _0x2529f9=a193_0x2529();let _0x1c9288=_0x2529f9[_0x1def31];return _0x1c9288;}(function(_0x8d49c3,_0x59fbe6){const _0x21a625=a193_0x1c92,_0xecb58e=_0x8d49c3();while(!![]){try{const _0xc0d391=parseInt(_0x21a625(0x1ae))/0x1+-parseInt(_0x21a625(0x1b4))/0x2+parseInt(_0x21a625(0x1b2))/0x3+-parseInt(_0x21a625(0x1b5))/0x4+parseInt(_0x21a625(0x1ac))/0x5+parseInt(_0x21a625(0x1ad))/0x6*(parseInt(_0x21a625(0x1af))/0x7)+parseInt(_0x21a625(0x1b7))/0x8*(-parseInt(_0x21a625(0x1b8))/0x9);if(_0xc0d391===_0x59fbe6)break;else _0xecb58e['push'](_0xecb58e['shift']());}catch(_0xf32c6){_0xecb58e['push'](_0xecb58e['shift']());}}}(a193_0x2529,0x5da06));function a193_0x2529(){const _0x5c8954=['378444pNNoRl','2427180HMLlHK','isFinite','504DLfFwg','32247sQifIp','3243485yxQbRW','66XzWxpO','67555uNwttm','274442zCHZEn','string','object','773166qXeOVL','number'];a193_0x2529=function(){return _0x5c8954;};return a193_0x2529();}function toFiniteNumber(_0x20e966){const _0x1a84a2=a193_0x1c92;if(typeof _0x20e966===_0x1a84a2(0x1b3)&&Number[_0x1a84a2(0x1b6)](_0x20e966))return _0x20e966;if(typeof _0x20e966===_0x1a84a2(0x1b0)){const _0x2e0a44=_0x20e966['trim']();if(!_0x2e0a44)return undefined;const _0x9def55=Number(_0x2e0a44);if(Number[_0x1a84a2(0x1b6)](_0x9def55))return _0x9def55;}return undefined;}export function normalizeEntityWithIdResponse(_0x146618){const _0x458de0=a193_0x1c92,_0x1594e3=toFiniteNumber(_0x146618);if(_0x1594e3!==undefined)return{'id':_0x1594e3,'entity':{'id':_0x1594e3}};if(!_0x146618||typeof _0x146618!==_0x458de0(0x1b1))return{'id':undefined,'entity':{}};const _0x140d26={..._0x146618},_0x88e649=toFiniteNumber(_0x140d26['id']);return _0x88e649!==undefined&&(_0x140d26['id']=_0x88e649),{'id':_0x88e649,'entity':_0x140d26};}
|
package/lib/utils/file-utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a194_0x4696(_0x2ae5fb,_0x30f5c5){_0x2ae5fb=_0x2ae5fb-0xff;const _0x3071d2=a194_0x3071();let _0x4696dc=_0x3071d2[_0x2ae5fb];return _0x4696dc;}(function(_0x1c61eb,_0x118996){const _0x249eaa=a194_0x4696,_0x2cc34d=_0x1c61eb();while(!![]){try{const _0x592a3b=-parseInt(_0x249eaa(0x106))/0x1*(-parseInt(_0x249eaa(0x105))/0x2)+parseInt(_0x249eaa(0x108))/0x3+-parseInt(_0x249eaa(0x107))/0x4+parseInt(_0x249eaa(0x102))/0x5*(-parseInt(_0x249eaa(0x104))/0x6)+-parseInt(_0x249eaa(0x103))/0x7*(parseInt(_0x249eaa(0x101))/0x8)+parseInt(_0x249eaa(0x100))/0x9+parseInt(_0x249eaa(0xff))/0xa;if(_0x592a3b===_0x118996)break;else _0x2cc34d['push'](_0x2cc34d['shift']());}catch(_0x1736f5){_0x2cc34d['push'](_0x2cc34d['shift']());}}}(a194_0x3071,0xe8751));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';function a194_0x3071(){const _0x4ab2ce=['2344122HFgELb','15127704WaykgI','1565UUSIIK','7ztqJeH','10254Trweme','4GRhYYa','611749HqgQlK','3070668evrIjJ','4226502qvGbar','12529020Fbqdma'];a194_0x3071=function(){return _0x4ab2ce;};return a194_0x3071();}export async function copyDir(_0x1846ca,_0x5bf653){const _0x154cea=statSync(_0x1846ca);if(_0x154cea['isDirectory']()){!existsSync(_0x5bf653)&&mkdirSync(_0x5bf653,{'recursive':!![]});const _0x42ff6f=readdirSync(_0x1846ca);for(const _0xd29186 of _0x42ff6f){await copyDir(join(_0x1846ca,_0xd29186),join(_0x5bf653,_0xd29186));}}else copyFileSync(_0x1846ca,_0x5bf653);}export function ensureDir(_0x1bb18d){!existsSync(_0x1bb18d)&&mkdirSync(_0x1bb18d,{'recursive':!![]});}export function pathExists(_0x3b66a4){return existsSync(_0x3b66a4);}
|
package/lib/utils/guides-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a195_0x47124f=a195_0x18da;(function(_0x8b052d,_0x54cff3){const _0x3bb112=a195_0x18da,_0x16b4e9=_0x8b052d();while(!![]){try{const _0x27f613=-parseInt(_0x3bb112(0xd2))/0x1+-parseInt(_0x3bb112(0xd4))/0x2*(-parseInt(_0x3bb112(0xe3))/0x3)+parseInt(_0x3bb112(0xd3))/0x4+parseInt(_0x3bb112(0xee))/0x5+-parseInt(_0x3bb112(0xdf))/0x6*(parseInt(_0x3bb112(0xdc))/0x7)+parseInt(_0x3bb112(0xd5))/0x8+-parseInt(_0x3bb112(0xe2))/0x9*(parseInt(_0x3bb112(0xe9))/0xa);if(_0x27f613===_0x54cff3)break;else _0x16b4e9['push'](_0x16b4e9['shift']());}catch(_0xd91a9c){_0x16b4e9['push'](_0x16b4e9['shift']());}}}(a195_0x2493,0x461dc));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 _0x2a5107=getTemplateBaseUrl();return _0x2a5107+'/skills/guides.json';}const CACHE_DIR=join(homedir(),'.lovrabet',a195_0x47124f(0xe6));export async function fetchGuidesFromCDN(){const _0x3bfa78=a195_0x47124f,_0x40ccb4=getGuidesCdnUrl(),_0x2e3bf6=await fetch(_0x40ccb4,{'headers':{'Accept':_0x3bfa78(0xdd)}});if(!_0x2e3bf6['ok'])throw new Error(_0x3bfa78(0xeb)+_0x2e3bf6['status']+'\x20'+_0x2e3bf6['statusText']);const _0x40c27=await _0x2e3bf6[_0x3bfa78(0xd0)]();if(!_0x40c27[_0x3bfa78(0xda)]||typeof _0x40c27[_0x3bfa78(0xda)]!==_0x3bfa78(0xed))throw new Error(_0x3bfa78(0xde));return _0x40c27;}function a195_0x18da(_0x133e23,_0x30aacd){_0x133e23=_0x133e23-0xd0;const _0x24939d=a195_0x2493();let _0x18da6b=_0x24939d[_0x133e23];return _0x18da6b;}export function writeGuidesToProject(_0x240638,_0x549363,_0x31c963=a195_0x47124f(0xe5),_0x44b62d){const _0x41900f=a195_0x47124f,_0x4435fc=join(_0x549363,_0x31c963);mkdirSync(_0x4435fc,{'recursive':!![]});for(const [_0x5c1420,_0x133959]of Object[_0x41900f(0xec)](_0x240638['guides'])){let _0x50174c=_0x133959[_0x41900f(0xe4)];_0x133959['lastUpdated']&&(_0x50174c=appendUpdateTime(_0x50174c,_0x133959['lastUpdated'])),writeFileSync(join(_0x4435fc,_0x5c1420+'.md'),_0x50174c,'utf-8');}}export function appendUpdateTime(_0x2b5f87,_0x23920c){const _0x1b47bb=a195_0x47124f;return _0x2b5f87=_0x2b5f87[_0x1b47bb(0xe7)](/\n*>更新时间:.*$/m,''),_0x2b5f87[_0x1b47bb(0xe8)]()+(_0x1b47bb(0xea)+_0x23920c);}export function getSkillTemplate(_0x3b5172){const _0x1067b1=a195_0x47124f;return _0x3b5172[_0x1067b1(0xd8)]?.[_0x1067b1(0xe4)]||'';}export function appendExtendContents(_0x6aaaec,_0x4d17c3,_0x2ac140){const _0x3d2db5=a195_0x47124f,_0xe40ddf=[];for(const [,_0x5b3565]of Object[_0x3d2db5(0xec)](_0x4d17c3['guides'])){_0x5b3565[_0x3d2db5(0xd7)]&&_0xe40ddf['push'](_0x5b3565['extendContent'][_0x3d2db5(0xe8)]());}if(_0xe40ddf['length']===0x0)return _0x6aaaec;return _0x6aaaec[_0x3d2db5(0xe8)]()+'\x0a\x0a'+_0xe40ddf[_0x3d2db5(0xdb)]('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x3cef1a,_0x1596e6,_0x518b9e){const _0x4002fe=a195_0x47124f,_0x1c2a91=getSkillTemplate(_0x3cef1a);if(!_0x1c2a91)throw new Error(_0x4002fe(0xd9));const _0x46fb2e=dirname(_0x1596e6);mkdirSync(_0x46fb2e,{'recursive':!![]});let _0x5e9176=_0x1c2a91[_0x4002fe(0xe7)](/\{\{IDE_NAME\}\}/g,_0x518b9e);_0x5e9176=appendExtendContents(_0x5e9176,_0x3cef1a),_0x3cef1a['skillTemplate'][_0x4002fe(0xd1)]&&(_0x5e9176=appendUpdateTime(_0x5e9176,_0x3cef1a[_0x4002fe(0xd8)][_0x4002fe(0xd1)])),writeFileSync(_0x1596e6,_0x5e9176,_0x4002fe(0xe0));}function a195_0x2493(){const _0xa5e8f0=['content','.lovrabet/skill/guides','cache','replace','trimEnd','4782590LCocqp','\x0a\x0a>更新时间:','CDN\x20请求失败:\x20','entries','object','2710235egBOUo','json','lastUpdated','79964PQKUJf','118544tUTrVX','1162kmnoDQ','4279960eUHXGr','keys','extendContent','skillTemplate','CDN\x20数据中缺少\x20skillTemplate','guides','join','248766MIdFZD','application/json','CDN\x20返回数据格式错误','96XvlYYu','utf-8','title','9ueLExC','1587YMWsYi'];a195_0x2493=function(){return _0xa5e8f0;};return a195_0x2493();}export async function installGuides(_0x4e0ea1){const _0xd63f78=a195_0x47124f,_0x179394=await fetchGuidesFromCDN();return writeGuidesToProject(_0x179394,_0x4e0ea1),Object[_0xd63f78(0xd6)](_0x179394[_0xd63f78(0xda)])['length'];}export function getGuidesSummary(_0x49eb60){const _0x502e42=a195_0x47124f;return Object[_0x502e42(0xec)](_0x49eb60[_0x502e42(0xda)])['map'](([_0x383e09,_0x21ad21])=>({'key':_0x383e09,'title':_0x21ad21[_0x502e42(0xe1)],'path':_0x21ad21['path']}));}
|